@karmaniverous/stan-cli 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e=require("node:fs"),t=require("node:fs/promises"),n=require("node:path"),r=require("fs-extra"),o=require("node:process"),i=require("node:url"),s=require("process"),a=require("buffer"),u=require("node:crypto"),c=require("node:child_process"),l=require("os"),p=require("path"),f=require("util"),d=require("stream"),h=require("events"),D=require("fs"),g=require("node:os"),m=require("node:tty"),y=require("child_process"),b=require("node:readline"),v="undefined"!=typeof document?document.currentScript:null;const E="archive.tar",F="archive.prev.tar",C=e=>e.replace(/\\/g,"/"),w=(e,t)=>{const n=C(e).replace(/\/+$/,""),r=C(t);return r===n||r.startsWith(`${n}/`)},_=(e,t)=>{const n=C(e);return w(`${n}/diff`,t)||w(`${n}/patch`,t)},A=w,S=e=>{const t=e.replace(/\\/g,"/");return e=>!(_(t,e)||((e,t)=>{const n=C(e);return C(t)===`${n}/output/${E}`||C(t)===`${n}/output/archive.diff.tar`||C(t)===`${n}/output/archive.warnings.txt`})(t,e))},k=1048576,P=async(e,r)=>{const o=[],i=[],s=[];await Promise.all(r.map(async r=>{const a=r.replace(/\\/g,"/"),u=n.resolve(e,r);let c=null;try{c=await t.stat(u)}catch{return}const l=c?.size??0;let p,f=!1;try{f=await(async e=>{try{const n=await t.open(e,"r");try{const e=Buffer.allocUnsafe(8192),{bytesRead:t}=await n.read(e,0,e.length,0);for(let n=0;n<t;n+=1)if(0===e[n])return!0;return!1}finally{await n.close().catch(()=>{})}}catch{return!1}})(u)}catch{f=!1}if(f)i.push({path:a,size:l});else{o.push(a);try{(l<=k||l<5*k)&&(p=(e=>{const t=e.replace(/\r\n/g,"\n");return 0===t.length?0:t.split("\n").length})(await t.readFile(u,"utf8")))}catch{}(l>k||"number"==typeof p&&p>3e3)&&s.push({path:a,size:l,loc:p})}}));const a=[];if(i.length>0){a.push(`Binary files excluded from archive (${i.length.toString()}):`);for(const e of i)a.push(` - ${e.path} (${e.size.toString()} bytes)`);a.push("")}if(s.length>0){a.push(`Large text files (included; consider excludes if unwanted) (${s.length.toString()}):`);for(const e of s){const t=[` - ${e.path}`,`(${e.size.toString()} bytes)`];"number"==typeof e.loc&&t.push(`${e.loc.toString()} LOC`),a.push(t.join(" "))}a.push(""),a.push(`Thresholds: size > ${k.toString()} bytes or LOC > ${3e3.toString()}`)}0===a.length&&a.push("No archive warnings.");const u=a.join("\n")+(a.length?"\n":"");return{textFiles:o,excludedBinaries:i,largeText:s,warningsBody:u}};var R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function x(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var B,O,T,$,L,N,M,j,I,H,z,U,q={exports:{}},K=(B||(B=1,function(e){function t(e){return Array.isArray(e)?e:[e]}const n=/^\s+$/,r=/(?:[^\\]|^)\\$/,o=/^\\!/,i=/^\\#/,s=/\r?\n/g,a=/^\.{0,2}\/|^\.{1,2}$/,u=/\/$/,c="/";let l="node-ignore";"undefined"!=typeof Symbol&&(l=Symbol.for("node-ignore"));const p=l,f=(e,t,n)=>(Object.defineProperty(e,t,{value:n}),n),d=/([0-z])-([0-z])/g,h=()=>!1,D=[[/^\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,r,o)=>"\\"===t?`\\[${n}${(e=>{const{length:t}=e;return e.slice(0,t-t%2)})(r)}${o}`:"]"===o&&r.length%2==0?`[${(e=>e.replace(d,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:""))(n)}${r}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`]],g=/(^|\\\/)?\\\*$/,m="regex",y="checkRegex",b={[m]:(e,t)=>(t?`${t}[^/]+`:"[^/]*")+"(?=$|\\/$)",[y]:(e,t)=>(t?`${t}[^/]*`:"[^/]*")+"(?=$|\\/$)"},v=e=>"string"==typeof e;class E{constructor(e,t,n,r,o,i){this.pattern=e,this.mark=t,this.negative=o,f(this,"body",n),f(this,"ignoreCase",r),f(this,"regexPrefix",i)}get regex(){const e="_"+m;return this[e]?this[e]:this._make(m,e)}get checkRegex(){const e="_"+y;return this[e]?this[e]:this._make(y,e)}_make(e,t){const n=this.regexPrefix.replace(g,b[e]),r=this.ignoreCase?new RegExp(n,"i"):new RegExp(n);return f(this,t,r)}}class F{constructor(e){this._ignoreCase=e,this._rules=[]}_add(e){if(e&&e[p])return this._rules=this._rules.concat(e._rules._rules),void(this._added=!0);if(v(e)&&(e={pattern:e}),(e=>e&&v(e)&&!n.test(e)&&!r.test(e)&&0!==e.indexOf("#"))(e.pattern)){const t=(({pattern:e,mark:t},n)=>{let r=!1,s=e;0===s.indexOf("!")&&(r=!0,s=s.substr(1)),s=s.replace(o,"!").replace(i,"#");const a=(e=>D.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e))(s);return new E(e,t,s,n,r,a)})(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,t(v(e)?(e=>e.split(s).filter(Boolean))(e):e).forEach(this._add,this),this._added}test(e,t,n){let r,o=!1,i=!1;this._rules.forEach(s=>{const{negative:a}=s;i===a&&o!==i||a&&!o&&!i&&!t||s[n].test(e)&&(o=!a,i=a,r=a?void 0:s)});const s={ignored:o,unignored:i};return r&&(s.rule=r),s}}const C=(e,t)=>{throw new t(e)},w=(e,t,n)=>v(e)?e?!w.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),_=e=>a.test(e);w.isNotRelative=_,w.convert=e=>e;class A{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){f(this,p,!0),this._rules=new F(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,r){const o=e&&w.convert(e);return w(o,e,this._strictPathCheck?C:h),this._t(o,t,n,r)}checkIgnore(e){if(!u.test(e))return this.test(e);const t=e.split(c).filter(Boolean);if(t.pop(),t.length){const e=this._t(t.join(c)+c,this._testCache,!0,t);if(e.ignored)return e}return this._rules.test(e,!1,y)}_t(e,t,n,r){if(e in t)return t[e];if(r||(r=e.split(c).filter(Boolean)),r.pop(),!r.length)return t[e]=this._rules.test(e,n,m);const o=this._t(r.join(c)+c,t,n,r);return t[e]=o.ignored?o:this._rules.test(e,n,m)}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 S=e=>new A(e),k=()=>{w.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");const e=/^[a-z]:\//i;w.isNotRelative=t=>e.test(t)||_(t)};"undefined"!=typeof process&&"win32"===process.platform&&k(),e.exports=S,S.default=S,e.exports.isPathValid=e=>w(e&&w.convert(e),e,h),f(e.exports,Symbol.for("setupWindows"),k)}(q)),q.exports),G=x(K),W={};function Z(){if(T)return O;T=1;const e="\\\\/",t=`[^${e}]`,n="\\.",r="\\/",o="[^/]",i=`(?:${r}|$)`,s=`(?:^|${r})`,a=`${n}{1,2}${i}`,u={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:r,ONE_CHAR:"(?=.)",QMARK:o,END_ANCHOR:i,DOTS_SLASH:a,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${s}${a})`,NO_DOT_SLASH:`(?!${n}{0,1}${i})`,NO_DOTS_SLASH:`(?!${a})`,QMARK_NO_DOT:`[^.${r}]`,STAR:`${o}*?`,START_ANCHOR:s,SEP:"/"},c={...u,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 O={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?c:u}}function V(){return $||($=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:o}=Z();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(o,"\\$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,r)=>{const o=t.lastIndexOf(n,r);return-1===o?t:"\\"===t[o-1]?e.escapeLast(t,n,o-1):`${t.slice(0,o)}\\${t.slice(o)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{const n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return""===r?n[n.length-2]:r}}(W)),W}function J(){if(H)return I;H=1;const e=function(){if(N)return L;N=1;const e=V(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:o,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:s,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:p,CHAR_QUESTION_MARK:f,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:h,CHAR_RIGHT_SQUARE_BRACKET:D}=Z(),g=e=>e===a||e===r,m=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return L=(y,b)=>{const v=b||{},E=y.length-1,F=!0===v.parts||!0===v.scanToEnd,C=[],w=[],_=[];let A,S,k=y,P=-1,R=0,x=0,B=!1,O=!1,T=!1,$=!1,L=!1,N=!1,M=!1,j=!1,I=!1,H=!1,z=0,U={value:"",depth:0,isGlob:!1};const q=()=>P>=E,K=()=>k.charCodeAt(P+1),G=()=>(A=S,k.charCodeAt(++P));for(;P<E;){let e;if(S=G(),S!==r){if(!0===N||S===u){for(z++;!0!==q()&&(S=G());)if(S!==r)if(S!==u){if(!0!==N&&S===i&&(S=G())===i){if(B=U.isBrace=!0,T=U.isGlob=!0,H=!0,!0===F)continue;break}if(!0!==N&&S===o){if(B=U.isBrace=!0,T=U.isGlob=!0,H=!0,!0===F)continue;break}if(S===d&&(z--,0===z)){N=!1,B=U.isBrace=!0,H=!0;break}}else z++;else M=U.backslashes=!0,G();if(!0===F)continue;break}if(S!==a){if(!0!==v.noext&&1==(S===p||S===n||S===t||S===f||S===s)&&K()===c){if(T=U.isGlob=!0,$=U.isExtglob=!0,H=!0,S===s&&P===R&&(I=!0),!0===F){for(;!0!==q()&&(S=G());)if(S!==r){if(S===h){T=U.isGlob=!0,H=!0;break}}else M=U.backslashes=!0,S=G();continue}break}if(S===t){if(A===t&&(L=U.isGlobstar=!0),T=U.isGlob=!0,H=!0,!0===F)continue;break}if(S===f){if(T=U.isGlob=!0,H=!0,!0===F)continue;break}if(S===l){for(;!0!==q()&&(e=G());)if(e!==r){if(e===D){O=U.isBracket=!0,T=U.isGlob=!0,H=!0;break}}else M=U.backslashes=!0,G();if(!0===F)continue;break}if(!0===v.nonegate||S!==s||P!==R){if(!0!==v.noparen&&S===c){if(T=U.isGlob=!0,!0===F){for(;!0!==q()&&(S=G());)if(S!==c){if(S===h){H=!0;break}}else M=U.backslashes=!0,S=G();continue}break}if(!0===T){if(H=!0,!0===F)continue;break}}else j=U.negated=!0,R++}else{if(C.push(P),w.push(U),U={value:"",depth:0,isGlob:!1},!0===H)continue;if(A===i&&P===R+1){R+=2;continue}x=P+1}}else M=U.backslashes=!0,S=G(),S===u&&(N=!0)}!0===v.noext&&($=!1,T=!1);let W=k,Z="",V="";R>0&&(Z=k.slice(0,R),k=k.slice(R),x-=R),W&&!0===T&&x>0?(W=k.slice(0,x),V=k.slice(x)):!0===T?(W="",V=k):W=k,W&&""!==W&&"/"!==W&&W!==k&&g(W.charCodeAt(W.length-1))&&(W=W.slice(0,-1)),!0===v.unescape&&(V&&(V=e.removeBackslashes(V)),W&&!0===M&&(W=e.removeBackslashes(W)));const J={prefix:Z,input:y,start:R,base:W,glob:V,isBrace:B,isBracket:O,isGlob:T,isExtglob:$,isGlobstar:L,negated:j,negatedExtglob:I};if(!0===v.tokens&&(J.maxDepth=0,g(S)||w.push(U),J.tokens=w),!0===v.parts||!0===v.tokens){let e;for(let t=0;t<C.length;t++){const n=e?e+1:R,r=C[t],o=y.slice(n,r);v.tokens&&(0===t&&0!==R?(w[t].isPrefix=!0,w[t].value=Z):w[t].value=o,m(w[t]),J.maxDepth+=w[t].depth),0===t&&""===o||_.push(o),e=r}if(e&&e+1<y.length){const t=y.slice(e+1);_.push(t),v.tokens&&(w[w.length-1].value=t,m(w[w.length-1]),J.maxDepth+=w[w.length-1].depth)}J.slashes=C,J.parts=_}return J},L}(),t=function(){if(j)return M;j=1;const e=Z(),t=V(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:s}=e,a=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return r},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,c=(l,p)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=s[l]||l;const f={...p},d="number"==typeof f.maxLength?Math.min(n,f.maxLength):n;let h=l.length;if(h>d)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${d}`);const D={type:"bos",value:"",output:f.prepend||""},g=[D],m=f.capture?"":"?:",y=e.globChars(f.windows),b=e.extglobChars(y),{DOT_LITERAL:v,PLUS_LITERAL:E,SLASH_LITERAL:F,ONE_CHAR:C,DOTS_SLASH:w,NO_DOT:_,NO_DOT_SLASH:A,NO_DOTS_SLASH:S,QMARK:k,QMARK_NO_DOT:P,STAR:R,START_ANCHOR:x}=y,B=e=>`(${m}(?:(?!${x}${e.dot?w:v}).)*?)`,O=f.dot?"":_,T=f.dot?k:P;let $=!0===f.bash?B(f):R;f.capture&&($=`(${$})`),"boolean"==typeof f.noext&&(f.noextglob=f.noext);const L={input:l,index:-1,start:0,dot:!0===f.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};l=t.removePrefix(l,L),h=l.length;const N=[],M=[],j=[];let I,H=D;const z=()=>L.index===h-1,U=L.peek=(e=1)=>l[L.index+e],q=L.advance=()=>l[++L.index]||"",K=()=>l.slice(L.index+1),G=(e="",t=0)=>{L.consumed+=e,L.index+=t},W=e=>{L.output+=null!=e.output?e.output:e.value,G(e.value)},Z=()=>{let e=1;for(;"!"===U()&&("("!==U(2)||"?"===U(3));)q(),L.start++,e++;return e%2!=0&&(L.negated=!0,L.start++,!0)},V=e=>{L[e]++,j.push(e)},J=e=>{L[e]--,j.pop()},Y=e=>{if("globstar"===H.type){const t=L.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||N.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(L.output=L.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=$,L.output+=H.output)}if(N.length&&"paren"!==e.type&&(N[N.length-1].inner+=e.value),(e.value||e.output)&&W(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={...b[t],conditions:1,inner:""};n.prev=H,n.parens=L.parens,n.output=L.output;const r=(f.capture?"(":"")+n.open;V("parens"),Y({type:e,value:t,output:L.output?"":C}),Y({type:"paren",extglob:!0,value:q(),output:r}),N.push(n)},X=e=>{let t,n=e.close+(f.capture?")":"");if("negate"===e.type){let r=$;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=B(f)),(r!==$||z()||/^\)+$/.test(K()))&&(n=e.close=`)$))${r}`),e.inner.includes("*")&&(t=K())&&/^\.[^\\/.]+$/.test(t)){const o=c(t,{...p,fastpaths:!1}).output;n=e.close=`)${o})${r})`}"bos"===e.prev.type&&(L.negatedExtglob=!0)}Y({type:"paren",extglob:!0,value:I,output:n}),J("parens")};if(!1!==f.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,n=l.replace(i,(t,n,r,o,i,s)=>"\\"===o?(e=!0,t):"?"===o?n?n+o+(i?k.repeat(i.length):""):0===s?T+(i?k.repeat(i.length):""):k.repeat(r.length):"."===o?v.repeat(r.length):"*"===o?n?n+o+(i?$:""):$:n?t:`\\${t}`);return!0===e&&(n=!0===f.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===l&&!0===f.contains?(L.output=l,L):(L.output=t.wrapOutput(n,L,p),L)}for(;!z();){if(I=q(),"\0"===I)continue;if("\\"===I){const e=U();if("/"===e&&!0!==f.bash)continue;if("."===e||";"===e)continue;if(!e){I+="\\",Y({type:"text",value:I});continue}const t=/^\\+/.exec(K());let n=0;if(t&&t[0].length>2&&(n=t[0].length,L.index+=n,n%2!=0&&(I+="\\")),!0===f.unescape?I=q():I+=q(),0===L.brackets){Y({type:"text",value:I});continue}}if(L.brackets>0&&("]"!==I||"["===H.value||"[^"===H.value)){if(!1!==f.posix&&":"===I){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),o=r[n];if(o){H.value=t+o,L.backtrack=!0,q(),D.output||1!==g.indexOf(H)||(D.output=C);continue}}}("["===I&&":"!==U()||"-"===I&&"]"===U())&&(I=`\\${I}`),"]"!==I||"["!==H.value&&"[^"!==H.value||(I=`\\${I}`),!0===f.posix&&"!"===I&&"["===H.value&&(I="^"),H.value+=I,W({value:I});continue}if(1===L.quotes&&'"'!==I){I=t.escapeRegex(I),H.value+=I,W({value:I});continue}if('"'===I){L.quotes=1===L.quotes?0:1,!0===f.keepQuotes&&Y({type:"text",value:I});continue}if("("===I){V("parens"),Y({type:"paren",value:I});continue}if(")"===I){if(0===L.parens&&!0===f.strictBrackets)throw new SyntaxError(u("opening","("));const e=N[N.length-1];if(e&&L.parens===e.parens+1){X(N.pop());continue}Y({type:"paren",value:I,output:L.parens?")":"\\)"}),J("parens");continue}if("["===I){if(!0!==f.nobracket&&K().includes("]"))V("brackets");else{if(!0!==f.nobracket&&!0===f.strictBrackets)throw new SyntaxError(u("closing","]"));I=`\\${I}`}Y({type:"bracket",value:I});continue}if("]"===I){if(!0===f.nobracket||H&&"bracket"===H.type&&1===H.value.length){Y({type:"text",value:I,output:`\\${I}`});continue}if(0===L.brackets){if(!0===f.strictBrackets)throw new SyntaxError(u("opening","["));Y({type:"text",value:I,output:`\\${I}`});continue}J("brackets");const e=H.value.slice(1);if(!0===H.posix||"^"!==e[0]||e.includes("/")||(I=`/${I}`),H.value+=I,W({value:I}),!1===f.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(H.value);if(L.output=L.output.slice(0,-H.value.length),!0===f.literalBrackets){L.output+=n,H.value=n;continue}H.value=`(${m}${n}|${H.value})`,L.output+=H.value;continue}if("{"===I&&!0!==f.nobrace){V("braces");const e={type:"brace",value:I,output:"(",outputIndex:L.output.length,tokensIndex:L.tokens.length};M.push(e),Y(e);continue}if("}"===I){const e=M[M.length-1];if(!0===f.nobrace||!e){Y({type:"text",value:I,output:I});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,f),L.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=L.output.slice(0,e.outputIndex),r=L.tokens.slice(e.tokensIndex);e.value=e.output="\\{",I=t="\\}",L.output=n;for(const e of r)L.output+=e.output||e.value}Y({type:"brace",value:I,output:t}),J("braces"),M.pop();continue}if("|"===I){N.length>0&&N[N.length-1].conditions++,Y({type:"text",value:I});continue}if(","===I){let e=I;const t=M[M.length-1];t&&"braces"===j[j.length-1]&&(t.comma=!0,e="|"),Y({type:"comma",value:I,output:e});continue}if("/"===I){if("dot"===H.type&&L.index===L.start+1){L.start=L.index+1,L.consumed="",L.output="",g.pop(),H=D;continue}Y({type:"slash",value:I,output:F});continue}if("."===I){if(L.braces>0&&"dot"===H.type){"."===H.value&&(H.output=v);const e=M[M.length-1];H.type="dots",H.output+=I,H.value+=I,e.dots=!0;continue}if(L.braces+L.parens===0&&"bos"!==H.type&&"slash"!==H.type){Y({type:"text",value:I,output:v});continue}Y({type:"dot",value:I,output:v});continue}if("?"===I){if((!H||"("!==H.value)&&!0!==f.noextglob&&"("===U()&&"?"!==U(2)){Q("qmark",I);continue}if(H&&"paren"===H.type){const e=U();let t=I;("("===H.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(K()))&&(t=`\\${I}`),Y({type:"text",value:I,output:t});continue}if(!0!==f.dot&&("slash"===H.type||"bos"===H.type)){Y({type:"qmark",value:I,output:P});continue}Y({type:"qmark",value:I,output:k});continue}if("!"===I){if(!0!==f.noextglob&&"("===U()&&("?"!==U(2)||!/[!=<:]/.test(U(3)))){Q("negate",I);continue}if(!0!==f.nonegate&&0===L.index){Z();continue}}if("+"===I){if(!0!==f.noextglob&&"("===U()&&"?"!==U(2)){Q("plus",I);continue}if(H&&"("===H.value||!1===f.regex){Y({type:"plus",value:I,output:E});continue}if(H&&("bracket"===H.type||"paren"===H.type||"brace"===H.type)||L.parens>0){Y({type:"plus",value:I});continue}Y({type:"plus",value:E});continue}if("@"===I){if(!0!==f.noextglob&&"("===U()&&"?"!==U(2)){Y({type:"at",extglob:!0,value:I,output:""});continue}Y({type:"text",value:I});continue}if("*"!==I){"$"!==I&&"^"!==I||(I=`\\${I}`);const e=o.exec(K());e&&(I+=e[0],L.index+=e[0].length),Y({type:"text",value:I});continue}if(H&&("globstar"===H.type||!0===H.star)){H.type="star",H.star=!0,H.value+=I,H.output=$,L.backtrack=!0,L.globstar=!0,G(I);continue}let e=K();if(!0!==f.noextglob&&/^\([^?]/.test(e)){Q("star",I);continue}if("star"===H.type){if(!0===f.noglobstar){G(I);continue}const t=H.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,o=n&&("star"===n.type||"globstar"===n.type);if(!0===f.bash&&(!r||e[0]&&"/"!==e[0])){Y({type:"star",value:I,output:""});continue}const i=L.braces>0&&("comma"===t.type||"brace"===t.type),s=N.length&&("pipe"===t.type||"paren"===t.type);if(!r&&"paren"!==t.type&&!i&&!s){Y({type:"star",value:I,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[L.index+4];if(t&&"/"!==t)break;e=e.slice(3),G("/**",3)}if("bos"===t.type&&z()){H.type="globstar",H.value+=I,H.output=B(f),L.output=H.output,L.globstar=!0,G(I);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!o&&z()){L.output=L.output.slice(0,-(t.output+H.output).length),t.output=`(?:${t.output}`,H.type="globstar",H.output=B(f)+(f.strictSlashes?")":"|$)"),H.value+=I,L.globstar=!0,L.output+=t.output+H.output,G(I);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";L.output=L.output.slice(0,-(t.output+H.output).length),t.output=`(?:${t.output}`,H.type="globstar",H.output=`${B(f)}${F}|${F}${n})`,H.value+=I,L.output+=t.output+H.output,L.globstar=!0,G(I+q()),Y({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){H.type="globstar",H.value+=I,H.output=`(?:^|${F}|${B(f)}${F})`,L.output=H.output,L.globstar=!0,G(I+q()),Y({type:"slash",value:"/",output:""});continue}L.output=L.output.slice(0,-H.output.length),H.type="globstar",H.output=B(f),H.value+=I,L.output+=H.output,L.globstar=!0,G(I);continue}const n={type:"star",value:I,output:$};!0!==f.bash?!H||"bracket"!==H.type&&"paren"!==H.type||!0!==f.regex?(L.index!==L.start&&"slash"!==H.type&&"dot"!==H.type||("dot"===H.type?(L.output+=A,H.output+=A):!0===f.dot?(L.output+=S,H.output+=S):(L.output+=O,H.output+=O),"*"!==U()&&(L.output+=C,H.output+=C)),Y(n)):(n.output=I,Y(n)):(n.output=".*?","bos"!==H.type&&"slash"!==H.type||(n.output=O+n.output),Y(n))}for(;L.brackets>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing","]"));L.output=t.escapeLast(L.output,"["),J("brackets")}for(;L.parens>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing",")"));L.output=t.escapeLast(L.output,"("),J("parens")}for(;L.braces>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing","}"));L.output=t.escapeLast(L.output,"{"),J("braces")}if(!0===f.strictSlashes||"star"!==H.type&&"bracket"!==H.type||Y({type:"maybe_slash",value:"",output:`${F}?`}),!0===L.backtrack){L.output="";for(const e of L.tokens)L.output+=null!=e.output?e.output:e.value,e.suffix&&(L.output+=e.suffix)}return L};return c.fastpaths=(r,o)=>{const i={...o},a="number"==typeof i.maxLength?Math.min(n,i.maxLength):n,u=r.length;if(u>a)throw new SyntaxError(`Input length: ${u}, exceeds maximum allowed length: ${a}`);r=s[r]||r;const{DOT_LITERAL:c,SLASH_LITERAL:l,ONE_CHAR:p,DOTS_SLASH:f,NO_DOT:d,NO_DOTS:h,NO_DOTS_SLASH:D,STAR:g,START_ANCHOR:m}=e.globChars(i.windows),y=i.dot?h:d,b=i.dot?D:d,v=i.capture?"":"?:";let E=!0===i.bash?".*?":g;i.capture&&(E=`(${E})`);const F=e=>!0===e.noglobstar?E:`(${v}(?:(?!${m}${e.dot?f:c}).)*?)`,C=e=>{switch(e){case"*":return`${y}${p}${E}`;case".*":return`${c}${p}${E}`;case"*.*":return`${y}${E}${c}${p}${E}`;case"*/*":return`${y}${E}${l}${p}${b}${E}`;case"**":return y+F(i);case"**/*":return`(?:${y}${F(i)}${l})?${b}${p}${E}`;case"**/*.*":return`(?:${y}${F(i)}${l})?${b}${E}${c}${p}${E}`;case"**/.*":return`(?:${y}${F(i)}${l})?${c}${p}${E}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=C(t[1]);if(!n)return;return n+c+t[2]}}},w=t.removePrefix(r,{negated:!1,prefix:""});let _=C(w);return _&&!0!==i.strictSlashes&&(_+=`${l}?`),_},M=c}(),n=V(),r=Z(),o=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map(e=>o(e,t,n)),i=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return i}const r=(i=e)&&"object"==typeof i&&!Array.isArray(i)&&e.tokens&&e.input;var i;if(""===e||"string"!=typeof e&&!r)throw new TypeError("Expected pattern to be a non-empty string");const s=t||{},a=s.windows,u=r?o.compileRe(e,t):o.makeRe(e,t,!1,!0),c=u.state;delete u.state;let l=()=>!1;if(s.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};l=o(s.ignore,e,n)}const p=(n,r=!1)=>{const{isMatch:i,match:p,output:f}=o.test(n,u,t,{glob:e,posix:a}),d={glob:e,state:c,regex:u,posix:a,input:n,output:f,match:p,isMatch:i};return"function"==typeof s.onResult&&s.onResult(d),!1===i?(d.isMatch=!1,!!r&&d):l(n)?("function"==typeof s.onIgnore&&s.onIgnore(d),d.isMatch=!1,!!r&&d):("function"==typeof s.onMatch&&s.onMatch(d),!r||d)};return n&&(p.state=c),p};return o.test=(e,t,r,{glob:i,posix:s}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=r||{},u=a.format||(s?n.toPosixSlashes:null);let c=e===i,l=c&&u?u(e):e;return!1===c&&(l=u?u(e):e,c=l===i),!1!==c&&!0!==a.capture||(c=!0===a.matchBase||!0===a.basename?o.matchBase(e,t,r,s):t.exec(l)),{isMatch:Boolean(c),match:c,output:l}},o.matchBase=(e,t,r)=>(t instanceof RegExp?t:o.makeRe(t,r)).test(n.basename(e)),o.isMatch=(e,t,n)=>o(t,n)(e),o.parse=(e,n)=>Array.isArray(e)?e.map(e=>o.parse(e,n)):t(e,{...n,fastpaths:!1}),o.scan=(t,n)=>e(t,n),o.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const i=t||{},s=i.contains?"":"^",a=i.contains?"":"$";let u=`${s}(?:${e.output})${a}`;e&&!0===e.negated&&(u=`^(?!${u}).*$`);const c=o.toRegex(u,t);return!0===r&&(c.state=e),c},o.makeRe=(e,n={},r=!1,i=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return!1===n.fastpaths||"."!==e[0]&&"*"!==e[0]||(s.output=t.fastpaths(e,n)),s.output||(s=t(e,n)),o.compileRe(s,n,r,i)},o.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/$^/}},o.constants=r,I=o}var Y=x(function(){if(U)return z;U=1;const e=J(),t=V();function n(n,r,o=!1){return!r||null!==r.windows&&void 0!==r.windows||(r={...r,windows:t.isWindows()}),e(n,r,o)}return Object.assign(n,e),z=n}());const Q=(e,t)=>{const r=t.replace(/\\/g,"/").replace(/^\.\/+/,""),o=`${r}/system`,i=`${r}/output`,s=`${r}/diff`,a=`${r}/dist`,u=`${r}/patch`,c=`${r}/imports`;return{rootRel:r,systemRel:o,outputRel:i,diffRel:s,distRel:a,patchRel:u,importsRel:c,rootAbs:n.resolve(e,r),systemAbs:n.resolve(e,o),outputAbs:n.resolve(e,i),diffAbs:n.resolve(e,s),distAbs:n.resolve(e,a),patchAbs:n.resolve(e,u),importsAbs:n.resolve(e,c)}},X=async e=>{const r=[],o=["."];for(;o.length;){const i=o.pop(),s=n.resolve(e,i),a=await t.readdir(s,{withFileTypes:!0});for(const e of a){const t="."===i?e.name:n.join(i,e.name);e.isDirectory()?o.push(t):r.push(t.replace(/\\/g,"/"))}}return r},ee=(e,t)=>{const n=t.replace(/\\/g,"/").replace(/\/+$/,"");return e===n||e.startsWith(n+"/")},te=e=>{const t=e.replace(/\\/g,"/").replace(/^\.\/+/,"").replace(/\/+$/,"");if(!/[*?[\]{}()!]/.test(n=t)&&!n.includes("**"))return t?e=>ee(e,t):()=>!1;var n;const r=Y(t,{dot:!0});return e=>r(e)},ne=async(r,{cwd:o,stanPath:i,includeOutputDir:s,includes:a=[],excludes:u=[]})=>{const c=i.replace(/\\/g,"/"),l=((e,t)=>{const n=new Set;for(const r of e){if("package.json"===r)continue;if(!r.endsWith("/package.json"))continue;const e=r.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)})(r,c),p=await(async r=>{const o=n.resolve(r,".gitignore");if(!e.existsSync(o))return null;try{const e=await t.readFile(o,"utf8"),n=G();return n.add(e),n}catch{return null}})(o),f=[e=>ee(e,"node_modules"),e=>ee(e,".git"),...p?[e=>p.ignores(e)]:[],...u.map(te),...l.map(e=>t=>ee(t,e)),e=>_(c,e)];s||f.push(e=>A(`${c}/output`,e));const d=r.filter(e=>!f.some(t=>t(e)));if(a.length>0){const e=a.map(te),t=[e=>_(c,e),...s?[]:[e=>A(`${c}/output`,e)]],n=new Set(d);for(const t of r)e.some(e=>e(t))&&n.add(t);const o=u.map(te);return r.filter(e=>n.has(e)&&!t.some(t=>t(e))&&!o.some(t=>t(e)))}return d},re=async(e,t)=>{const n=Q(e,t);return await r.ensureDir(n.rootAbs),await r.ensureDir(n.outputAbs),await r.ensureDir(n.diffAbs),await r.ensureDir(n.patchAbs),{rootAbs:n.rootAbs,outputAbs:n.outputAbs,diffAbs:n.diffAbs,patchAbs:n.patchAbs}},oe=async(e,t)=>{const n=await re(e,t);return{outDir:n.outputAbs,diffDir:n.diffAbs}},ie=e=>e instanceof URL?i.fileURLToPath(e):e;function se({cwd:t}={}){const r=function(t,{cwd:r=o.cwd(),type:i="file",stopAt:s}={}){let a=n.resolve(ie(r)??"");const{root:u}=n.parse(a);s=n.resolve(a,ie(s)??u);const c=n.isAbsolute(t);for(;a;){const r=c?t:n.join(a,t);try{const t=e.statSync(r,{throwIfNoEntry:!1});if("file"===i&&t?.isFile()||"directory"===i&&t?.isDirectory())return r}catch{}if(a===s||a===u)break;a=n.dirname(a)}}("package.json",{cwd:t});return r&&n.dirname(r)}const ae=["stan.config.yml","stan.config.yaml","stan.config.json"],ue=t=>{for(const r of ae){const o=n.resolve(t,r);if(e.existsSync(o))return o}return null};var ce,le={},pe={},fe={},de={};function he(){if(ce)return de;ce=1;const e=Symbol.for("yaml.alias"),t=Symbol.for("yaml.document"),n=Symbol.for("yaml.map"),r=Symbol.for("yaml.pair"),o=Symbol.for("yaml.scalar"),i=Symbol.for("yaml.seq"),s=Symbol.for("yaml.node.type"),a=e=>!!e&&"object"==typeof e&&e[s]===o;function u(e){if(e&&"object"==typeof e)switch(e[s]){case n:case i:return!0}return!1}return de.ALIAS=e,de.DOC=t,de.MAP=n,de.NODE_TYPE=s,de.PAIR=r,de.SCALAR=o,de.SEQ=i,de.hasAnchor=e=>(a(e)||u(e))&&!!e.anchor,de.isAlias=t=>!!t&&"object"==typeof t&&t[s]===e,de.isCollection=u,de.isDocument=e=>!!e&&"object"==typeof e&&e[s]===t,de.isMap=e=>!!e&&"object"==typeof e&&e[s]===n,de.isNode=function(t){if(t&&"object"==typeof t)switch(t[s]){case e:case n:case o:case i:return!0}return!1},de.isPair=e=>!!e&&"object"==typeof e&&e[s]===r,de.isScalar=a,de.isSeq=e=>!!e&&"object"==typeof e&&e[s]===i,de}var De,ge,me={};function ye(){if(De)return me;De=1;var e=he();const t=Symbol("break visit"),n=Symbol("skip children"),r=Symbol("remove node");function o(t,n){const o=u(n);e.isDocument(t)?i(null,t.contents,o,Object.freeze([t]))===r&&(t.contents=null):i(null,t,o,Object.freeze([]))}function i(n,o,s,a){const u=c(n,o,s,a);if(e.isNode(u)||e.isPair(u))return l(n,a,u),i(n,u,s,a);if("symbol"!=typeof u)if(e.isCollection(o)){a=Object.freeze(a.concat(o));for(let e=0;e<o.items.length;++e){const n=i(e,o.items[e],s,a);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(o.items.splice(e,1),e-=1)}}}else if(e.isPair(o)){a=Object.freeze(a.concat(o));const e=i("key",o.key,s,a);if(e===t)return t;e===r&&(o.key=null);const n=i("value",o.value,s,a);if(n===t)return t;n===r&&(o.value=null)}return u}async function s(t,n){const o=u(n);e.isDocument(t)?await a(null,t.contents,o,Object.freeze([t]))===r&&(t.contents=null):await a(null,t,o,Object.freeze([]))}async function a(n,o,i,s){const u=await c(n,o,i,s);if(e.isNode(u)||e.isPair(u))return l(n,s,u),a(n,u,i,s);if("symbol"!=typeof u)if(e.isCollection(o)){s=Object.freeze(s.concat(o));for(let e=0;e<o.items.length;++e){const n=await a(e,o.items[e],i,s);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(o.items.splice(e,1),e-=1)}}}else if(e.isPair(o)){s=Object.freeze(s.concat(o));const e=await a("key",o.key,i,s);if(e===t)return t;e===r&&(o.key=null);const n=await a("value",o.value,i,s);if(n===t)return t;n===r&&(o.value=null)}return u}function u(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 c(t,n,r,o){return"function"==typeof r?r(t,n,o):e.isMap(n)?r.Map?.(t,n,o):e.isSeq(n)?r.Seq?.(t,n,o):e.isPair(n)?r.Pair?.(t,n,o):e.isScalar(n)?r.Scalar?.(t,n,o):e.isAlias(n)?r.Alias?.(t,n,o):void 0}function l(t,n,r){const o=n[n.length-1];if(e.isCollection(o))o.items[t]=r;else if(e.isPair(o))"key"===t?o.key=r:o.value=r;else{if(!e.isDocument(o)){const t=e.isAlias(o)?"alias":"scalar";throw new Error(`Cannot replace node with ${t} parent`)}o.contents=r}}return o.BREAK=t,o.SKIP=n,o.REMOVE=r,s.BREAK=t,s.SKIP=n,s.REMOVE=r,me.visit=o,me.visitAsync=s,me}function be(){if(ge)return fe;ge=1;var e=he(),t=ye();const n={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},r=e=>e.replace(/[!,[\]{}]/g,e=>n[e]);class o{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},o.defaultYaml,e),this.tags=Object.assign({},o.defaultTags,t)}clone(){const e=new o(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new o(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:o.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},o.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:o.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},o.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,r]=n;return this.tags[e]=r,!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;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${r}`,!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,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);const o=this.tags[n];if(o)try{return o+decodeURIComponent(r)}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+r(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(n){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],o=Object.entries(this.tags);let i;if(n&&o.length>0&&e.isNode(n.contents)){const r={};t.visit(n.contents,(t,n)=>{e.isNode(n)&&n.tag&&(r[n.tag]=!0)}),i=Object.keys(r)}else i=[];for(const[e,t]of o)"!!"===e&&"tag:yaml.org,2002:"===t||n&&!i.some(e=>e.startsWith(t))||r.push(`%TAG ${e} ${t}`);return r.join("\n")}}return o.defaultYaml={explicit:!1,version:"1.2"},o.defaultTags={"!!":"tag:yaml.org,2002:"},fe.Directives=o,fe}var ve,Ee={},Fe={},Ce={};function we(){if(ve)return Ce;ve=1;var e=he(),t=ye();function n(e){const n=new Set;return t.visit(e,{Value(e,t){t.anchor&&n.add(t.anchor)}}),n}function r(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}return Ce.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},Ce.anchorNames=n,Ce.createNodeAnchors=function(t,o){const i=[],s=new Map;let a=null;return{onAnchor:e=>{i.push(e),a??(a=n(t));const s=r(o,a);return a.add(s),s},setAnchors:()=>{for(const t of i){const n=s.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:s}},Ce.findNewAnchor=r,Ce}var _e,Ae={},Se={};function ke(){return _e||(_e=1,Se.applyReviver=function e(t,n,r,o){if(o&&"object"==typeof o)if(Array.isArray(o))for(let n=0,r=o.length;n<r;++n){const r=o[n],i=e(t,o,String(n),r);void 0===i?delete o[n]:i!==r&&(o[n]=i)}else if(o instanceof Map)for(const n of Array.from(o.keys())){const r=o.get(n),i=e(t,o,n,r);void 0===i?o.delete(n):i!==r&&o.set(n,i)}else if(o instanceof Set)for(const n of Array.from(o)){const r=e(t,o,n,n);void 0===r?o.delete(n):r!==n&&(o.delete(n),o.add(r))}else for(const[n,r]of Object.entries(o)){const i=e(t,o,n,r);void 0===i?delete o[n]:i!==r&&(o[n]=i)}return t.call(n,r,o)}),Se}var Pe,Re,xe,Be={};function Oe(){if(Pe)return Be;Pe=1;var e=he();return Be.toJS=function t(n,r,o){if(Array.isArray(n))return n.map((e,n)=>t(e,String(n),o));if(n&&"function"==typeof n.toJSON){if(!o||!e.hasAnchor(n))return n.toJSON(r,o);const t={aliasCount:0,count:1,res:void 0};o.anchors.set(n,t),o.onCreate=e=>{t.res=e,delete o.onCreate};const i=n.toJSON(r,o);return o.onCreate&&o.onCreate(i),i}return"bigint"!=typeof n||o?.keep?n:Number(n)},Be}function Te(){if(Re)return Ae;Re=1;var e=ke(),t=he(),n=Oe();return Ae.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(r,{mapAsMap:o,maxAliasCount:i,onAnchor:s,reviver:a}={}){if(!t.isDocument(r))throw new TypeError("A document argument is required");const u={anchors:new Map,doc:r,keep:!0,mapAsMap:!0===o,mapKeyWarned:!1,maxAliasCount:"number"==typeof i?i:100},c=n.toJS(this,"",u);if("function"==typeof s)for(const{count:e,res:t}of u.anchors.values())s(t,e);return"function"==typeof a?e.applyReviver(a,{"":c},"",c):c}},Ae}function $e(){if(xe)return Fe;xe=1;var e=we(),t=ye(),n=he(),r=Te(),o=Oe();let i=class extends r.NodeBase{constructor(e){super(n.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){let o,i;r?.aliasResolveCache?o=r.aliasResolveCache:(o=[],t.visit(e,{Node:(e,t)=>{(n.isAlias(t)||n.hasAnchor(t))&&o.push(t)}}),r&&(r.aliasResolveCache=o));for(const e of o){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:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let u=n.get(a);if(u||(o.toJS(a,null,t),u=n.get(a)),!u||void 0===u.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(u.count+=1,0===u.aliasCount&&(u.aliasCount=s(r,a,n)),u.count*u.aliasCount>i))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");return u.res}toString(t,n,r){const o=`*${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`${o} `}return o}};function s(e,t,r){if(n.isAlias(t)){const n=t.resolve(e),o=r&&n&&r.get(n);return o?o.count*o.aliasCount:0}if(n.isCollection(t)){let n=0;for(const o of t.items){const t=s(e,o,r);t>n&&(n=t)}return n}if(n.isPair(t)){const n=s(e,t.key,r),o=s(e,t.value,r);return Math.max(n,o)}return 1}return Fe.Alias=i,Fe}var Le,Ne,Me,je={},Ie={},He={};function ze(){if(Le)return He;Le=1;var e=he(),t=Te(),n=Oe();let r=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 r.BLOCK_FOLDED="BLOCK_FOLDED",r.BLOCK_LITERAL="BLOCK_LITERAL",r.PLAIN="PLAIN",r.QUOTE_DOUBLE="QUOTE_DOUBLE",r.QUOTE_SINGLE="QUOTE_SINGLE",He.Scalar=r,He.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,He}function Ue(){if(Ne)return Ie;Ne=1;var e=$e(),t=he(),n=ze();return Ie.createNode=function(r,o,i){if(t.isDocument(r)&&(r=r.contents),t.isNode(r))return r;if(t.isPair(r)){const e=i.schema[t.MAP].createNode?.(i.schema,null,i);return e.items.push(r),e}(r instanceof String||r instanceof Number||r instanceof Boolean||"undefined"!=typeof BigInt&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:s,onAnchor:a,onTagObj:u,schema:c,sourceObjects:l}=i;let p;if(s&&r&&"object"==typeof r){if(p=l.get(r),p)return p.anchor??(p.anchor=a(r)),new e.Alias(p.anchor);p={anchor:null,node:null},l.set(r,p)}o?.startsWith("!!")&&(o="tag:yaml.org,2002:"+o.slice(2));let f=function(e,t,n){if(t){const e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}(r,o,c.tags);if(!f){if(r&&"function"==typeof r.toJSON&&(r=r.toJSON()),!r||"object"!=typeof r){const e=new n.Scalar(r);return p&&(p.node=e),e}f=r instanceof Map?c[t.MAP]:Symbol.iterator in Object(r)?c[t.SEQ]:c[t.MAP]}u&&(u(f),delete i.onTagObj);const d=f?.createNode?f.createNode(i.schema,r,i):"function"==typeof f?.nodeClass?.from?f.nodeClass.from(i.schema,r,i):new n.Scalar(r);return o?d.tag=o:f.default||(d.tag=f.tag),p&&(p.node=d),d},Ie}function qe(){if(Me)return je;Me=1;var e=Ue(),t=he(),n=Te();function r(t,n,r){let o=r;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]=o,o=e}else o=new Map([[t,o]])}return e.createNode(o,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const o=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(o(e))this.add(n);else{const[o,...i]=e,s=this.get(o,!0);if(t.isCollection(s))s.addIn(i,n);else{if(void 0!==s||!this.schema)throw new Error(`Expected YAML collection at ${o}. Remaining path: ${i}`);this.set(o,r(this.schema,i,n))}}}deleteIn(e){const[n,...r]=e;if(0===r.length)return this.delete(n);const o=this.get(n,!0);if(t.isCollection(o))return o.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...o]=e,i=this.get(r,!0);return 0===o.length?!n&&t.isScalar(i)?i.value:i:t.isCollection(i)?i.getIn(o,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!t.isPair(n))return!1;const r=n.value;return null==r||e&&t.isScalar(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(0===r.length)return this.has(n);const o=this.get(n,!0);return!!t.isCollection(o)&&o.hasIn(r)}setIn(e,n){const[o,...i]=e;if(0===i.length)this.set(o,n);else{const e=this.get(o,!0);if(t.isCollection(e))e.setIn(i,n);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${o}. Remaining path: ${i}`);this.set(o,r(this.schema,i,n))}}}};return je.Collection=i,je.collectionFromPath=r,je.isEmptyPath=o,je}var Ke,Ge={},We={},Ze={},Ve={};function Je(){if(Ke)return Ve;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return Ke=1,Ve.indentComment=e,Ve.lineComment=(t,n,r)=>t.endsWith("\n")?e(r,n):r.includes("\n")?"\n"+e(r,n):(t.endsWith(" ")?"":" ")+r,Ve.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),Ve}var Ye,Qe,Xe,et,tt={},nt={};function rt(){if(Qe)return tt;Qe=1;var e=ze(),t=function(){if(Ye)return nt;Ye=1;const e="block",t="quoted";function n(e,t,n){let r=t,o=t+1,i=e[o];for(;" "===i||"\t"===i;)if(t<o+n)i=e[++t];else{do{i=e[++t]}while(i&&"\n"!==i);r=t,o=t+1,i=e[o]}return r}return nt.FOLD_BLOCK=e,nt.FOLD_FLOW="flow",nt.FOLD_QUOTED=t,nt.foldFlowLines=function(r,o,i="flow",{indentAtStart:s,lineWidth:a=80,minContentWidth:u=20,onFold:c,onOverflow:l}={}){if(!a||a<0)return r;a<u&&(u=0);const p=Math.max(1+u,1+a-o.length);if(r.length<=p)return r;const f=[],d={};let h,D,g=a-o.length;"number"==typeof s&&(s>a-Math.max(2,u)?f.push(0):g=a-s);let m=!1,y=-1,b=-1,v=-1;i===e&&(y=n(r,y,o.length),-1!==y&&(g=y+p));for(let s;s=r[y+=1];){if(i===t&&"\\"===s){switch(b=y,r[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}v=y}if("\n"===s)i===e&&(y=n(r,y,o.length)),g=y+o.length+p,h=void 0;else{if(" "===s&&D&&" "!==D&&"\n"!==D&&"\t"!==D){const e=r[y+1];e&&" "!==e&&"\n"!==e&&"\t"!==e&&(h=y)}if(y>=g)if(h)f.push(h),g=h+p,h=void 0;else if(i===t){for(;" "===D||"\t"===D;)D=s,s=r[y+=1],m=!0;const e=y>v+1?y-2:b-1;if(d[e])return r;f.push(e),d[e]=!0,g=e+p,h=void 0}else m=!0}D=s}if(m&&l&&l(),0===f.length)return r;c&&c();let E=r.slice(0,f[0]);for(let e=0;e<f.length;++e){const n=f[e],s=f[e+1]||r.length;0===n?E=`\n${o}${r.slice(0,s)}`:(i===t&&d[n]&&(E+=`${r[n]}\\`),E+=`\n${o}${r.slice(n+1,s)}`)}return E},nt}();const n=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),r=e=>/^(%|---|\.\.\.)/m.test(e);function o(e,o){const i=JSON.stringify(e);if(o.options.doubleQuotedAsJSON)return i;const{implicitKey:s}=o,a=o.options.doubleQuotedMinMultiLineLength,u=o.indent||(r(e)?" ":"");let c="",l=0;for(let e=0,t=i[e];t;t=i[++e])if(" "===t&&"\\"===i[e+1]&&"n"===i[e+2]&&(c+=i.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(i[e+1]){case"u":{c+=i.slice(l,e);const t=i.substr(e+2,4);switch(t){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:"00"===t.substr(0,2)?c+="\\x"+t.substr(2):c+=i.substr(e,6)}e+=5,l=e+1}break;case"n":if(s||'"'===i[e+2]||i.length<a)e+=1;else{for(c+=i.slice(l,e)+"\n\n";"\\"===i[e+2]&&"n"===i[e+3]&&'"'!==i[e+4];)c+="\n",e+=2;c+=u," "===i[e+2]&&(c+="\\"),e+=1,l=e+1}break;default:e+=1}return c=l?c+i.slice(l):i,s?c:t.foldFlowLines(c,u,t.FOLD_QUOTED,n(o,!1))}function i(e,i){if(!1===i.options.singleQuote||i.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return o(e,i);const s=i.indent||(r(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${s}`)+"'";return i.implicitKey?a:t.foldFlowLines(a,s,t.FOLD_FLOW,n(i,!1))}function s(e,t){const{singleQuote:n}=t.options;let r;if(!1===n)r=o;else{const t=e.includes('"'),s=e.includes("'");r=t&&!s?i:s&&!t?o:n?i:o}return r(e,t)}let a;try{a=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{a=/\n+(?!\n|$)/g}function u({comment:o,type:i,value:u},c,l,p){const{blockQuote:f,commentString:d,lineWidth:h}=c.options;if(!f||/\n[\t ]+$/.test(u))return s(u,c);const D=c.indent||(c.forceBlockIndent||r(u)?" ":""),g="literal"===f||"folded"!==f&&i!==e.Scalar.BLOCK_FOLDED&&(i===e.Scalar.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,o=e.length;if(o<=r)return!1;for(let t=0,n=0;t<o;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,o-n<=r)return!1}return!0}(u,h,D.length));if(!u)return g?"|\n":">\n";let m,y;for(y=u.length;y>0;--y){const e=u[y-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let b=u.substring(y);const v=b.indexOf("\n");-1===v?m="-":u===b||v!==b.length-1?(m="+",p&&p()):m="",b&&(u=u.slice(0,-b.length),"\n"===b[b.length-1]&&(b=b.slice(0,-1)),b=b.replace(a,`$&${D}`));let E,F=!1,C=-1;for(E=0;E<u.length;++E){const e=u[E];if(" "===e)F=!0;else{if("\n"!==e)break;C=E}}let w=u.substring(0,C<E?C+1:E);w&&(u=u.substring(w.length),w=w.replace(/\n+/g,`$&${D}`));let _=(F?D?"2":"1":"")+m;if(o&&(_+=" "+d(o.replace(/ ?[\r\n]+/g," ")),l&&l()),!g){const r=u.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${D}`);let o=!1;const s=n(c,!0);"folded"!==f&&i!==e.Scalar.BLOCK_FOLDED&&(s.onOverflow=()=>{o=!0});const a=t.foldFlowLines(`${w}${r}${b}`,D,t.FOLD_BLOCK,s);if(!o)return`>${_}\n${D}${a}`}return`|${_}\n${D}${w}${u=u.replace(/\n+/g,`$&${D}`)}${b}`}return tt.stringifyString=function(a,c,l,p){const{implicitKey:f,inFlow:d}=c,h="string"==typeof a.value?a:Object.assign({},a,{value:String(a.value)});let{type:D}=a;D!==e.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(h.value)&&(D=e.Scalar.QUOTE_DOUBLE);const g=a=>{switch(a){case e.Scalar.BLOCK_FOLDED:case e.Scalar.BLOCK_LITERAL:return f||d?s(h.value,c):u(h,c,l,p);case e.Scalar.QUOTE_DOUBLE:return o(h.value,c);case e.Scalar.QUOTE_SINGLE:return i(h.value,c);case e.Scalar.PLAIN:return function(o,i,a,c){const{type:l,value:p}=o,{actualString:f,implicitKey:d,indent:h,indentStep:D,inFlow:g}=i;if(d&&p.includes("\n")||g&&/[[\]{},]/.test(p))return s(p,i);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(p))return d||g||!p.includes("\n")?s(p,i):u(o,i,a,c);if(!d&&!g&&l!==e.Scalar.PLAIN&&p.includes("\n"))return u(o,i,a,c);if(r(p)){if(""===h)return i.forceBlockIndent=!0,u(o,i,a,c);if(d&&h===D)return s(p,i)}const m=p.replace(/\n+/g,`$&\n${h}`);if(f){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(m),{compat:t,tags:n}=i.doc.schema;if(n.some(e)||t?.some(e))return s(p,i)}return d?m:t.foldFlowLines(m,h,t.FOLD_FLOW,n(i,!1))}(h,c,l,p);default:return null}};let m=g(D);if(null===m){const{defaultKeyType:e,defaultStringType:t}=c.options,n=f&&e||t;if(m=g(n),null===m)throw new Error(`Unsupported default string type ${n}`)}return m},tt}function ot(){if(Xe)return Ze;Xe=1;var e=we(),t=he(),n=Je(),r=rt();return Ze.createStringifyContext=function(e,t){const r=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 o;switch(r.collectionStyle){case"block":o=!1;break;case"flow":o=!0;break;default:o=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:o,options:r}},Ze.stringify=function(n,o,i,s){if(t.isPair(n))return n.toString(o,i,s);if(t.isAlias(n)){if(o.doc.directives)return n.toString(o);if(o.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");o.resolvedAliases?o.resolvedAliases.add(n):o.resolvedAliases=new Set([n]),n=n.resolve(o.doc)}let a;const u=t.isNode(n)?n:o.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 r,o;if(t.isScalar(n)){o=n.value;let t=e.filter(e=>e.identify?.(o));if(t.length>1){const e=t.filter(e=>e.test);e.length>0&&(t=e)}r=t.find(e=>e.format===n.format)??t.find(e=>!e.format)}else o=n,r=e.find(e=>e.nodeClass&&o instanceof e.nodeClass);if(!r)throw new Error(`Tag not resolved for ${o?.constructor?.name??(null===o?"null":typeof o)} value`);return r}(o.doc.schema.tags,u));const c=function(n,r,{anchors:o,doc:i}){if(!i.directives)return"";const s=[],a=(t.isScalar(n)||t.isCollection(n))&&n.anchor;a&&e.anchorIsValid(a)&&(o.add(a),s.push(`&${a}`));const u=n.tag??(r.default?null:r.tag);return u&&s.push(i.directives.tagString(u)),s.join(" ")}(u,a,o);c.length>0&&(o.indentAtStart=(o.indentAtStart??0)+c.length+1);const l="function"==typeof a.stringify?a.stringify(u,o,i,s):t.isScalar(u)?r.stringifyString(u,o,i,s):u.toString(o,i,s);return c?t.isScalar(u)||"{"===l[0]||"["===l[0]?`${c} ${l}`:`${c}\n${o.indent}${l}`:l},Ze}var it,st={},at={};function ut(){if(it)return at;it=1;var e=s;return at.debug=function(e,...t){"debug"===e&&console.log(...t)},at.warn=function(t,n){"debug"!==t&&"warn"!==t||("function"==typeof e.emitWarning?e.emitWarning(n):console.warn(n))},at}var ct,lt,pt,ft={};function dt(){if(ct)return ft;ct=1;var e=he(),t=ze();const n="<<",r={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:o}),stringify:()=>n};function o(t,n,r){if(r=t&&e.isAlias(r)?r.resolve(t.doc):r,e.isSeq(r))for(const e of r.items)i(t,n,e);else if(Array.isArray(r))for(const e of r)i(t,n,e);else i(t,n,r)}function i(t,n,r){const o=t&&e.isAlias(r)?r.resolve(t.doc):r;if(!e.isMap(o))throw new Error("Merge sources must be maps or map aliases");const i=o.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 ft.addMergeToJSMap=o,ft.isMergeKey=(n,o)=>(r.identify(o)||e.isScalar(o)&&(!o.type||o.type===t.Scalar.PLAIN)&&r.identify(o.value))&&n?.doc.schema.tags.some(e=>e.tag===r.tag&&e.default),ft.merge=r,ft}function ht(){if(lt)return st;lt=1;var e=ut(),t=dt(),n=ot(),r=he(),o=Oe();return st.addPairToJSMap=function(i,s,{key:a,value:u}){if(r.isNode(a)&&a.addToJSMap)a.addToJSMap(i,s,u);else if(t.isMergeKey(i,a))t.addMergeToJSMap(i,s,u);else{const t=o.toJS(a,"",i);if(s instanceof Map)s.set(t,o.toJS(u,t,i));else if(s instanceof Set)s.add(t);else{const c=function(t,o,i){if(null===o)return"";if("object"!=typeof o)return String(o);if(r.isNode(t)&&i?.doc){const r=n.createStringifyContext(i.doc,{});r.anchors=new Set;for(const e of i.anchors.keys())r.anchors.add(e.anchor);r.inFlow=!0,r.inStringifyKey=!0;const o=t.toString(r);if(!i.mapKeyWarned){let t=JSON.stringify(o);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 o}return JSON.stringify(o)}(a,t,i),l=o.toJS(u,c,i);c in s?Object.defineProperty(s,c,{value:l,writable:!0,enumerable:!0,configurable:!0}):s[c]=l}}return s},st}function Dt(){if(pt)return Ge;pt=1;var e=Ue(),t=function(){if(et)return We;et=1;var e=he(),t=ze(),n=ot(),r=Je();return We.stringifyPair=function({key:o,value:i},s,a,u){const{allNullValues:c,doc:l,indent:p,indentStep:f,options:{commentString:d,indentSeq:h,simpleKeys:D}}=s;let g=e.isNode(o)&&o.comment||null;if(D){if(g)throw new Error("With simple keys, key nodes cannot have comments");if(e.isCollection(o)||!e.isNode(o)&&"object"==typeof o)throw new Error("With simple keys, collection cannot be used as a key value")}let m=!D&&(!o||g&&null==i&&!s.inFlow||e.isCollection(o)||(e.isScalar(o)?o.type===t.Scalar.BLOCK_FOLDED||o.type===t.Scalar.BLOCK_LITERAL:"object"==typeof o));s=Object.assign({},s,{allNullValues:!1,implicitKey:!m&&(D||!c),indent:p+f});let y,b,v,E=!1,F=!1,C=n.stringify(o,s,()=>E=!0,()=>F=!0);if(!m&&!s.inFlow&&C.length>1024){if(D)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(s.inFlow){if(c||null==i)return E&&a&&a(),""===C?"?":m?`? ${C}`:C}else if(c&&!D||null==i&&m)return C=`? ${C}`,g&&!E?C+=r.lineComment(C,s.indent,d(g)):F&&u&&u(),C;E&&(g=null),m?(g&&(C+=r.lineComment(C,s.indent,d(g))),C=`? ${C}\n${p}:`):(C=`${C}:`,g&&(C+=r.lineComment(C,s.indent,d(g)))),e.isNode(i)?(y=!!i.spaceBefore,b=i.commentBefore,v=i.comment):(y=!1,b=null,v=null,i&&"object"==typeof i&&(i=l.createNode(i))),s.implicitKey=!1,m||g||!e.isScalar(i)||(s.indentAtStart=C.length+1),F=!1,h||!(f.length>=2)||s.inFlow||m||!e.isSeq(i)||i.flow||i.tag||i.anchor||(s.indent=s.indent.substring(2));let w=!1;const _=n.stringify(i,s,()=>w=!0,()=>F=!0);let A=" ";if(g||y||b){if(A=y?"\n":"",b){const e=d(b);A+=`\n${r.indentComment(e,s.indent)}`}""!==_||s.inFlow?A+=`\n${s.indent}`:"\n"===A&&(A="\n\n")}else if(!m&&e.isCollection(i)){const e=_[0],t=_.indexOf("\n"),n=-1!==t,r=s.inFlow??i.flow??0===i.items.length;if(n||!r){let r=!1;if(n&&("&"===e||"!"===e)){let n=_.indexOf(" ");"&"===e&&-1!==n&&n<t&&"!"===_[n+1]&&(n=_.indexOf(" ",n+1)),(-1===n||t<n)&&(r=!0)}r||(A=`\n${s.indent}`)}}else""!==_&&"\n"!==_[0]||(A="");return C+=A+_,s.inFlow?w&&a&&a():v&&!w?C+=r.lineComment(C,s.indent,d(v)):F&&u&&u(),C},We}(),n=ht(),r=he();let o=class e{constructor(e,t=null){Object.defineProperty(this,r.NODE_TYPE,{value:r.PAIR}),this.key=e,this.value=t}clone(t){let{key:n,value:o}=this;return r.isNode(n)&&(n=n.clone(t)),r.isNode(o)&&(o=o.clone(t)),new e(n,o)}toJSON(e,t){const r=t?.mapAsMap?new Map:{};return n.addPairToJSMap(t,r,this)}toString(e,n,r){return e?.doc?t.stringifyPair(this,e,n,r):JSON.stringify(this)}};return Ge.Pair=o,Ge.createPair=function(t,n,r){const i=e.createNode(t,void 0,r),s=e.createNode(n,void 0,r);return new o(i,s)},Ge}var gt,mt,yt,bt={},vt={},Et={},Ft={};function Ct(){if(gt)return Ft;gt=1;var e=he(),t=ot(),n=Je();function r({comment:r,items:o},s,{blockItemPrefix:a,flowChars:u,itemIndent:c,onChompKeep:l,onComment:p}){const{indent:f,options:{commentString:d}}=s,h=Object.assign({},s,{indent:c,type:null});let D=!1;const g=[];for(let r=0;r<o.length;++r){const u=o[r];let l=null;if(e.isNode(u))!D&&u.spaceBefore&&g.push(""),i(s,g,u.commentBefore,D),u.comment&&(l=u.comment);else if(e.isPair(u)){const t=e.isNode(u.key)?u.key:null;t&&(!D&&t.spaceBefore&&g.push(""),i(s,g,t.commentBefore,D))}D=!1;let p=t.stringify(u,h,()=>l=null,()=>D=!0);l&&(p+=n.lineComment(p,c,d(l))),D&&l&&(D=!1),g.push(a+p)}let m;if(0===g.length)m=u.start+u.end;else{m=g[0];for(let e=1;e<g.length;++e){const t=g[e];m+=t?`\n${f}${t}`:"\n"}}return r?(m+="\n"+n.indentComment(d(r),f),p&&p()):D&&l&&l(),m}function o({items:r},o,{flowChars:s,itemIndent:a}){const{indent:u,indentStep:c,flowCollectionPadding:l,options:{commentString:p}}=o;a+=c;const f=Object.assign({},o,{indent:a,inFlow:!0,type:null});let d=!1,h=0;const D=[];for(let s=0;s<r.length;++s){const u=r[s];let c=null;if(e.isNode(u))u.spaceBefore&&D.push(""),i(o,D,u.commentBefore,!1),u.comment&&(c=u.comment);else if(e.isPair(u)){const t=e.isNode(u.key)?u.key:null;t&&(t.spaceBefore&&D.push(""),i(o,D,t.commentBefore,!1),t.comment&&(d=!0));const n=e.isNode(u.value)?u.value:null;n?(n.comment&&(c=n.comment),n.commentBefore&&(d=!0)):null==u.value&&t?.comment&&(c=t.comment)}c&&(d=!0);let l=t.stringify(u,f,()=>c=null);s<r.length-1&&(l+=","),c&&(l+=n.lineComment(l,a,p(c))),!d&&(D.length>h||l.includes("\n"))&&(d=!0),D.push(l),h=D.length}const{start:g,end:m}=s;if(0===D.length)return g+m;if(!d){const e=D.reduce((e,t)=>e+t.length+2,2);d=o.options.lineWidth>0&&e>o.options.lineWidth}if(d){let e=g;for(const t of D)e+=t?`\n${c}${u}${t}`:"\n";return`${e}\n${u}${m}`}return`${g}${l}${D.join(" ")}${l}${m}`}function i({indent:e,options:{commentString:t}},r,o,i){if(o&&i&&(o=o.replace(/^\n+/,"")),o){const i=n.indentComment(t(o),e);r.push(i.trimStart())}}return Ft.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?o:r)(e,t,n)},Ft}function wt(){if(mt)return Et;mt=1;var e=Ct(),t=ht(),n=qe(),r=he(),o=Dt(),i=ze();function s(e,t){const n=r.isScalar(t)?t.value:t;for(const o of e)if(r.isPair(o)){if(o.key===t||o.key===n)return o;if(r.isScalar(o.key)&&o.key.value===n)return o}}let a=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(r.MAP,e),this.items=[]}static from(e,t,n){const{keepUndefined:r,replacer:i}=n,s=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||r)&&s.items.push(o.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&&s.items.sort(e.sortMapEntries),s}add(e,t){let n;n=r.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new o.Pair(e.key,e.value):new o.Pair(e,e?.value);const a=s(this.items,n.key),u=this.schema?.sortMapEntries;if(a){if(!t)throw new Error(`Key ${n.key} already set`);r.isScalar(a.value)&&i.isScalarValue(n.value)?a.value.value=n.value:a.value=n.value}else if(u){const e=this.items.findIndex(e=>u(n,e)<0);-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=s(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=s(this.items,e),o=n?.value;return(!t&&r.isScalar(o)?o.value:o)??void 0}has(e){return!!s(this.items,e)}set(e,t){this.add(new o.Pair(e,t),!0)}toJSON(e,n,r){const o=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(o);for(const e of this.items)t.addPairToJSMap(n,o,e);return o}toString(t,n,o){if(!t)return JSON.stringify(this);for(const e of this.items)if(!r.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:o,onComment:n})}};return Et.YAMLMap=a,Et.findPair=s,Et}function _t(){if(yt)return vt;yt=1;var e=he(),t=wt();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,r)=>t.YAMLMap.from(e,n,r)};return vt.map=n,vt}var At,St,kt={},Pt={};function Rt(){if(At)return Pt;At=1;var e=Ue(),t=Ct(),n=qe(),r=he(),o=ze(),i=Oe();let s=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(r.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=a(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const n=a(e);if("number"!=typeof n)return;const o=this.items[n];return!t&&r.isScalar(o)?o.value:o}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];r.isScalar(i)&&o.isScalarValue(t)?i.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let r=0;for(const e of this.items)n.push(i.toJS(e,String(r++),t));return n}toString(e,n,r){return e?t.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:o}=r,i=new this(t);if(n&&Symbol.iterator in Object(n)){let t=0;for(let s of n){if("function"==typeof o){const e=n instanceof Set?s:String(t++);s=o.call(n,e,s)}i.items.push(e.createNode(s,void 0,r))}}return i}};function a(e){let t=r.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}return Pt.YAMLSeq=s,Pt}function xt(){if(St)return kt;St=1;var e=he(),t=Rt();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,r)=>t.YAMLSeq.from(e,n,r)};return kt.seq=n,kt}var Bt,Ot={};function Tt(){if(Bt)return Ot;Bt=1;var e=rt();const t={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(t,n,r,o)=>(n=Object.assign({actualString:!0},n),e.stringifyString(t,n,r,o))};return Ot.string=t,Ot}var $t,Lt={},Nt={};function Mt(){if($t)return Nt;$t=1;var e=ze();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 Nt.nullTag=t,Nt}var jt,It={};function Ht(){if(jt)return It;jt=1;var e=ze();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},r)=>e&&t.test.test(e)&&n===("t"===e[0]||"T"===e[0])?e:n?r.options.trueStr:r.options.falseStr};return It.boolTag=t,It}var zt,Ut,qt={},Kt={};function Gt(){return zt||(zt=1,Kt.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);const o="number"==typeof r?r:Number(r);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let i=JSON.stringify(r);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}),Kt}function Wt(){if(Ut)return qt;Ut=1;var e=ze(),t=Gt();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},r={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)}},o={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)),r=t.indexOf(".");return-1!==r&&"0"===t[t.length-1]&&(n.minFractionDigits=t.length-r-1),n},stringify:t.stringifyNumber};return qt.float=o,qt.floatExp=r,qt.floatNaN=n,qt}var Zt,Vt={};function Jt(){if(Zt)return Vt;Zt=1;var e=Gt();const t=e=>"bigint"==typeof e||Number.isInteger(e),n=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function r(n,r,o){const{value:i}=n;return t(i)&&i>=0?o+i.toString(r):e.stringifyNumber(n)}const o={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>n(e,2,8,r),stringify:e=>r(e,8,"0o")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},s={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,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return Vt.int=i,Vt.intHex=s,Vt.intOct=o,Vt}var Yt,Qt={};var Xt,en={};var tn,nn={};function rn(){if(tn)return nn;tn=1;var e=a,t=ze(),n=rt();const r={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:r,type:o,value:i},s,a,u){if(!i)return"";const c=i;let l;if("function"==typeof e.Buffer)l=c instanceof e.Buffer?c.toString("base64"):e.Buffer.from(c.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<c.length;++t)e+=String.fromCharCode(c[t]);l=btoa(e)}}if(o??(o=t.Scalar.BLOCK_LITERAL),o!==t.Scalar.QUOTE_DOUBLE){const e=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),n=Math.ceil(l.length/e),r=new Array(n);for(let t=0,o=0;t<n;++t,o+=e)r[t]=l.substr(o,e);l=r.join(o===t.Scalar.BLOCK_LITERAL?"\n":" ")}return n.stringifyString({comment:r,type:o,value:l},s,a,u)}};return nn.binary=r,nn}var on,sn,an={},un={};function cn(){if(on)return un;on=1;var e=he(),t=Dt(),n=ze(),r=Rt();function o(r,o){if(e.isSeq(r))for(let i=0;i<r.items.length;++i){let s=r.items[i];if(!e.isPair(s)){if(e.isMap(s)){s.items.length>1&&o("Each pair must have its own sequence indicator");const e=s.items[0]||new t.Pair(new n.Scalar(null));if(s.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${s.commentBefore}\n${e.key.commentBefore}`:s.commentBefore),s.comment){const t=e.value??e.key;t.comment=t.comment?`${s.comment}\n${t.comment}`:s.comment}s=e}r.items[i]=e.isPair(s)?s:new t.Pair(s)}}else o("Expected a sequence for this tag");return r}function i(e,n,o){const{replacer:i}=o,s=new r.YAMLSeq(e);s.tag="tag:yaml.org,2002:pairs";let a=0;if(n&&Symbol.iterator in Object(n))for(let e of n){let r,u;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}`);r=e[0],u=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`);r=t[0],u=e[r]}else r=e;s.items.push(t.createPair(r,u,o))}return s}const s={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:o,createNode:i};return un.createPairs=i,un.pairs=s,un.resolvePairs=o,un}function ln(){if(sn)return an;sn=1;var e=he(),t=Oe(),n=wt(),r=Rt(),o=cn();class i extends r.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,r){if(!r)return super.toJSON(n);const o=new Map;r?.onCreate&&r.onCreate(o);for(const n of this.items){let i,s;if(e.isPair(n)?(i=t.toJS(n.key,"",r),s=t.toJS(n.value,i,r)):i=t.toJS(n,"",r),o.has(i))throw new Error("Ordered maps must not include duplicate keys");o.set(i,s)}return o}static from(e,t,n){const r=o.createPairs(e,t,n),i=new this;return i.items=r.items,i}}i.tag="tag:yaml.org,2002:omap";const s={collection:"seq",identify:e=>e instanceof Map,nodeClass:i,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,n){const r=o.resolvePairs(t,n),s=[];for(const{key:t}of r.items)e.isScalar(t)&&(s.includes(t.value)?n(`Ordered maps must not include duplicate keys: ${t.value}`):s.push(t.value));return Object.assign(new i,r)},createNode:(e,t,n)=>i.from(e,t,n)};return an.YAMLOMap=i,an.omap=s,an}var pn,fn={},dn={};var hn,Dn={};var gn,mn,yn={},bn={};function vn(){if(mn)return bn;mn=1;var e=he(),t=Dt(),n=wt();class r extends n.YAMLMap{constructor(e){super(e),this.tag=r.tag}add(r){let o;o=e.isPair(r)?r:r&&"object"==typeof r&&"key"in r&&"value"in r&&null===r.value?new t.Pair(r.key,null):new t.Pair(r,null),n.findPair(this.items,o.key)||this.items.push(o)}get(t,r){const o=n.findPair(this.items,t);return!r&&e.isPair(o)?e.isScalar(o.key)?o.key.value:o.key:o}set(e,r){if("boolean"!=typeof r)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof r);const o=n.findPair(this.items,e);o&&!r?this.items.splice(this.items.indexOf(o),1):!o&&r&&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,r){const{replacer:o}=r,i=new this(e);if(n&&Symbol.iterator in Object(n))for(let e of n)"function"==typeof o&&(e=o.call(n,e,e)),i.items.push(t.createPair(e,null,r));return i}}r.tag="tag:yaml.org,2002:set";const o={collection:"map",identify:e=>e instanceof Set,nodeClass:r,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>r.from(e,t,n),resolve(t,n){if(e.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new r,t);n("Set items must all have null values")}else n("Expected a mapping for this tag");return t}};return bn.YAMLSet=r,bn.set=o,bn}var En,Fn,Cn,wn,_n={};function An(){if(En)return _n;En=1;var e=Gt();function t(e,t){const n=e[0],r="-"===n||"+"===n?e.substring(1):e,o=e=>t?BigInt(e):Number(e),i=r.replace(/_/g,"").split(":").reduce((e,t)=>e*o(60)+o(t),o(0));return"-"===n?o(-1)*i:i}function n(t){let{value:n}=t,r=e=>e;if("bigint"==typeof n)r=e=>BigInt(e);else if(isNaN(n)||!isFinite(n))return e.stringifyNumber(t);let o="";n<0&&(o="-",n*=r(-1));const i=r(60),s=[n%i];return n<60?s.unshift(0):(n=(n-s[0])/i,s.unshift(n%i),n>=60&&(n=(n-s[0])/i,s.unshift(n))),o+s.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const r={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:r})=>t(e,r),stringify:n},o={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[,r,o,s,a,u,c]=n.map(Number),l=n[7]?Number((n[7]+"00").substr(1,3)):0;let p=Date.UTC(r,o-1,s,a||0,u||0,c||0,l);const f=n[8];if(f&&"Z"!==f){let e=t(f,!1);Math.abs(e)<30&&(e*=60),p-=6e4*e}return new Date(p)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};return _n.floatTime=o,_n.intTime=r,_n.timestamp=i,_n}function Sn(){if(Fn)return fn;Fn=1;var e=_t(),t=Mt(),n=xt(),r=Tt(),o=rn(),i=function(){if(pn)return dn;pn=1;var e=ze();function t({value:e,source:t},o){return t&&(e?n:r).test.test(t)?t:e?o.options.trueStr:o.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},r={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 dn.falseTag=r,dn.trueTag=n,dn}(),s=function(){if(hn)return Dn;hn=1;var e=ze(),t=Gt();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},r={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)}},o={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,""))),r=t.indexOf(".");if(-1!==r){const e=t.substring(r+1).replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:t.stringifyNumber};return Dn.float=o,Dn.floatExp=r,Dn.floatNaN=n,Dn}(),a=function(){if(gn)return yn;gn=1;var e=Gt();const t=e=>"bigint"==typeof e||Number.isInteger(e);function n(e,t,n,{intAsBigInt:r}){const o=e[0];if("-"!==o&&"+"!==o||(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===o?BigInt(-1)*t:t}const i=parseInt(e,n);return"-"===o?-1*i:i}function r(n,r,o){const{value:i}=n;if(t(i)){const e=i.toString(r);return i<0?"-"+o+e.substr(1):o+e}return e.stringifyNumber(n)}const o={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>n(e,2,2,r),stringify:e=>r(e,2,"0b")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>n(e,1,8,r),stringify:e=>r(e,8,"0")},s={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>n(e,0,10,r),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,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return yn.int=s,yn.intBin=o,yn.intHex=a,yn.intOct=i,yn}(),u=dt(),c=ln(),l=cn(),p=vn(),f=An();const d=[e.map,n.seq,r.string,t.nullTag,i.trueTag,i.falseTag,a.intBin,a.intOct,a.int,a.intHex,s.floatNaN,s.floatExp,s.float,o.binary,u.merge,c.omap,l.pairs,p.set,f.intTime,f.floatTime,f.timestamp];return fn.schema=d,fn}function kn(){if(Cn)return Lt;Cn=1;var e=_t(),t=Mt(),n=xt(),r=Tt(),o=Ht(),i=Wt(),s=Jt(),a=function(){if(Yt)return Qt;Yt=1;var e=_t(),t=Mt(),n=xt(),r=Tt(),o=Ht(),i=Wt(),s=Jt();const a=[e.map,n.seq,r.string,t.nullTag,o.boolTag,s.intOct,s.int,s.intHex,i.floatNaN,i.floatExp,i.float];return Qt.schema=a,Qt}(),u=function(){if(Xt)return en;Xt=1;var e=ze(),t=_t(),n=xt();function r(e){return"bigint"==typeof e||Number.isInteger(e)}const o=({value:e})=>JSON.stringify(e),i=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:o},{identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:o},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:o},{identify:r,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})=>r(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:o}],s={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},a=[t.map,n.seq].concat(i,s);return en.schema=a,en}(),c=rn(),l=dt(),p=ln(),f=cn(),d=Sn(),h=vn(),D=An();const g=new Map([["core",a.schema],["failsafe",[e.map,n.seq,r.string]],["json",u.schema],["yaml11",d.schema],["yaml-1.1",d.schema]]),m={binary:c.binary,bool:o.boolTag,float:i.float,floatExp:i.floatExp,floatNaN:i.floatNaN,floatTime:D.floatTime,int:s.int,intHex:s.intHex,intOct:s.intOct,intTime:D.intTime,map:e.map,merge:l.merge,null:t.nullTag,omap:p.omap,pairs:f.pairs,seq:n.seq,set:h.set,timestamp:D.timestamp},y={"tag:yaml.org,2002:binary":c.binary,"tag:yaml.org,2002:merge":l.merge,"tag:yaml.org,2002:omap":p.omap,"tag:yaml.org,2002:pairs":f.pairs,"tag:yaml.org,2002:set":h.set,"tag:yaml.org,2002:timestamp":D.timestamp};return Lt.coreKnownTags=y,Lt.getTags=function(e,t,n){const r=g.get(t);if(r&&!e)return n&&!r.includes(l.merge)?r.concat(l.merge):r.slice();let o=r;if(!o){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`)}o=[]}if(Array.isArray(e))for(const t of e)o=o.concat(t);else"function"==typeof e&&(o=e(o.slice()));return n&&(o=o.concat(l.merge)),o.reduce((e,t)=>{const n="string"==typeof t?m[t]:t;if(!n){const e=JSON.stringify(t),n=Object.keys(m).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},[])},Lt}function Pn(){if(wn)return bt;wn=1;var e=he(),t=_t(),n=xt(),r=Tt(),o=kn();const i=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;return bt.Schema=class s{constructor({compat:s,customTags:a,merge:u,resolveKnownTags:c,schema:l,sortMapEntries:p,toStringDefaults:f}){this.compat=Array.isArray(s)?o.getTags(s,"compat"):s?o.getTags(null,s):null,this.name="string"==typeof l&&l||"core",this.knownTags=c?o.coreKnownTags:{},this.tags=o.getTags(a,this.name,u),this.toStringOptions=f??null,Object.defineProperty(this,e.MAP,{value:t.map}),Object.defineProperty(this,e.SCALAR,{value:r.string}),Object.defineProperty(this,e.SEQ,{value:n.seq}),this.sortMapEntries="function"==typeof p?p:!0===p?i:null}clone(){const e=Object.create(s.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}},bt}var Rn,xn,Bn={};function On(){if(xn)return Ee;xn=1;var e=$e(),t=qe(),n=he(),r=Dt(),o=Oe(),i=Pn(),s=function(){if(Rn)return Bn;Rn=1;var e=he(),t=ot(),n=Je();return Bn.stringifyDocument=function(r,o){const i=[];let s=!0===o.directives;if(!1!==o.directives&&r.directives){const e=r.directives.toString(r);e?(i.push(e),s=!0):r.directives.docStart&&(s=!0)}s&&i.push("---");const a=t.createStringifyContext(r,o),{commentString:u}=a.options;if(r.commentBefore){1!==i.length&&i.unshift("");const e=u(r.commentBefore);i.unshift(n.indentComment(e,""))}let c=!1,l=null;if(r.contents){if(e.isNode(r.contents)){if(r.contents.spaceBefore&&s&&i.push(""),r.contents.commentBefore){const e=u(r.contents.commentBefore);i.push(n.indentComment(e,""))}a.forceBlockIndent=!!r.comment,l=r.contents.comment}const o=l?void 0:()=>c=!0;let p=t.stringify(r.contents,a,()=>l=null,o);l&&(p+=n.lineComment(p,"",u(l))),"|"!==p[0]&&">"!==p[0]||"---"!==i[i.length-1]?i.push(p):i[i.length-1]=`--- ${p}`}else i.push(t.stringify(r.contents,a));if(r.directives?.docEnd)if(r.comment){const e=u(r.comment);e.includes("\n")?(i.push("..."),i.push(n.indentComment(e,""))):i.push(`... ${e}`)}else i.push("...");else{let e=r.comment;e&&c&&(e=e.replace(/^\n+/,"")),e&&(c&&!l||""===i[i.length-1]||i.push(""),i.push(n.indentComment(u(e),"")))}return i.join("\n")+"\n"},Bn}(),a=we(),u=ke(),c=Ue(),l=be();function p(e){if(n.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}return Ee.Document=class f{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,n.NODE_TYPE,{value:n.DOC});let o=null;"function"==typeof t||Array.isArray(t)?o=t:void 0===r&&t&&(r=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"},r);this.options=i;let{version:s}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new l.Directives({version:s}),this.setSchema(s,r),this.contents=void 0===e?null:this.createNode(e,o,r)}clone(){const e=Object.create(f.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){p(this.contents)&&this.contents.add(e)}addIn(e,t){p(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,r){let o;if("function"==typeof t)e=t.call({"":e},"",e),o=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)),o=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:s,flow:u,keepUndefined:l,onTagObj:p,tag:f}=r??{},{onAnchor:d,setAnchors:h,sourceObjects:D}=a.createNodeAnchors(this,s||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:p,replacer:o,schema:this.schema,sourceObjects:D},m=c.createNode(e,f,g);return u&&n.isCollection(m)&&(m.flow=!0),h(),m}createPair(e,t,n={}){const o=this.createNode(e,null,n),i=this.createNode(t,null,n);return new r.Pair(o,i)}delete(e){return!!p(this.contents)&&this.contents.delete(e)}deleteIn(e){return t.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!p(this.contents)&&this.contents.deleteIn(e)}get(e,t){return n.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,r){return t.isEmptyPath(e)?!r&&n.isScalar(this.contents)?this.contents.value:this.contents:n.isCollection(this.contents)?this.contents.getIn(e,r):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):p(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):p(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:r,onAnchor:i,reviver:s}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},c=o.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 s?u.applyReviver(s,{"":c},"",c):c}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 s.stringifyDocument(this,e)}},Ee}var Tn,$n={};function Ln(){if(Tn)return $n;Tn=1;class e extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}return $n.YAMLError=e,$n.YAMLParseError=class extends e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},$n.YAMLWarning=class extends e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},$n.prettifyError=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));const{line:r,col:o}=n.linePos[0];n.message+=` at line ${r}, column ${o}`;let i=o-1,s=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&s.length>80){const e=Math.min(i-39,s.length-79);s="…"+s.substring(e),i-=e-1}if(s.length>80&&(s=s.substring(0,79)+"…"),r>1&&/^ *$/.test(s.substring(0,i))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),s=n+s}if(/[^ ]/.test(s)){let e=1;const t=n.linePos[1];t&&t.line===r&&t.col>o&&(e=Math.max(1,Math.min(t.col-o,80-i)));const a=" ".repeat(i)+"^".repeat(e);n.message+=`:\n\n${s}\n${a}\n`}},$n}var Nn,Mn={},jn={},In={},Hn={},zn={};function Un(){return Nn||(Nn=1,zn.resolveProps=function(e,{flow:t,indicator:n,next:r,offset:o,onError:i,parentIndent:s,startOnNewline:a}){let u=!1,c=a,l=a,p="",f="",d=!1,h=!1,D=null,g=null,m=null,y=null,b=null,v=null,E=null;for(const o of e)switch(h&&("space"!==o.type&&"newline"!==o.type&&"comma"!==o.type&&i(o.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),D&&(c&&"comment"!==o.type&&"newline"!==o.type&&i(D,"TAB_AS_INDENT","Tabs are not allowed as indentation"),D=null),o.type){case"space":t||"doc-start"===n&&"flow-collection"===r?.type||!o.source.includes("\t")||(D=o),l=!0;break;case"comment":{l||i(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=o.source.substring(1)||" ";p?p+=f+e:p=e,f="",c=!1;break}case"newline":c?p?p+=o.source:v&&"seq-item-ind"===n||(u=!0):f+=o.source,c=!0,d=!0,(g||m)&&(y=o),l=!0;break;case"anchor":g&&i(o,"MULTIPLE_ANCHORS","A node can have at most one anchor"),o.source.endsWith(":")&&i(o.offset+o.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=o,E??(E=o.offset),c=!1,l=!1,h=!0;break;case"tag":m&&i(o,"MULTIPLE_TAGS","A node can have at most one tag"),m=o,E??(E=o.offset),c=!1,l=!1,h=!0;break;case n:(g||m)&&i(o,"BAD_PROP_ORDER",`Anchors and tags must be after the ${o.source} indicator`),v&&i(o,"UNEXPECTED_TOKEN",`Unexpected ${o.source} in ${t??"collection"}`),v=o,c="seq-item-ind"===n||"explicit-key-ind"===n,l=!1;break;case"comma":if(t){b&&i(o,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),b=o,c=!1,l=!1;break}default:i(o,"UNEXPECTED_TOKEN",`Unexpected ${o.type} token`),c=!1,l=!1}const F=e[e.length-1],C=F?F.offset+F.source.length:o;return h&&r&&"space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&("scalar"!==r.type||""!==r.source)&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),D&&(c&&D.indent<=s||"block-map"===r?.type||"block-seq"===r?.type)&&i(D,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:v,spaceBefore:u,comment:p,hasNewline:d,anchor:g,tag:m,newlineAfterProp:y,end:C,start:E??C}}),zn}var qn,Kn={};function Gn(){return qn||(qn=1,Kn.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}}),Kn}var Wn,Zn={};function Vn(){if(Wn)return Zn;Wn=1;var e=Gn();return Zn.flowIndentCheck=function(t,n,r){if("flow-collection"===n?.type){const o=n.end[0];o.indent!==t||"]"!==o.source&&"}"!==o.source||!e.containsNewline(n)||r(o,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}},Zn}var Jn,Yn,Qn={};function Xn(){if(Jn)return Qn;Jn=1;var e=he();return Qn.mapIncludes=function(t,n,r){const{uniqueKeys:o}=t.options;if(!1===o)return!1;const i="function"==typeof o?o:(t,n)=>t===n||e.isScalar(t)&&e.isScalar(n)&&t.value===n.value;return n.some(e=>i(e.key,r))},Qn}var er,tr={};var nr,rr,or,ir={},sr={};function ar(){return nr||(nr=1,sr.resolveEnd=function(e,t,n,r){let o="";if(e){let i=!1,s="";for(const a of e){const{source:e,type:u}=a;switch(u){case"space":i=!0;break;case"comment":{n&&!i&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";o?o+=s+t:o=t,s="";break}case"newline":o&&(s+=e),i=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}t+=e.length}}return{comment:o,offset:t}}),sr}function ur(){if(or)return In;or=1;var e=he(),t=ze(),n=wt(),r=Rt(),o=function(){if(Yn)return Hn;Yn=1;var e=Dt(),t=wt(),n=Un(),r=Gn(),o=Vn(),i=Xn();const s="All mapping items must start at the same column";return Hn.resolveBlockMap=function({composeNode:a,composeEmptyNode:u},c,l,p,f){const d=new(f?.nodeClass??t.YAMLMap)(c.schema);c.atRoot&&(c.atRoot=!1);let h=l.offset,D=null;for(const t of l.items){const{start:f,key:g,sep:m,value:y}=t,b=n.resolveProps(f,{indicator:"explicit-key-ind",next:g??m?.[0],offset:h,onError:p,parentIndent:l.indent,startOnNewline:!0}),v=!b.found;if(v){if(g&&("block-seq"===g.type?p(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==l.indent&&p(h,"BAD_INDENT",s)),!b.anchor&&!b.tag&&!m){D=b.end,b.comment&&(d.comment?d.comment+="\n"+b.comment:d.comment=b.comment);continue}(b.newlineAfterProp||r.containsNewline(g))&&p(g??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else b.found?.indent!==l.indent&&p(h,"BAD_INDENT",s);c.atKey=!0;const E=b.end,F=g?a(c,g,b,p):u(c,E,f,null,b,p);c.schema.compat&&o.flowIndentCheck(l.indent,g,p),c.atKey=!1,i.mapIncludes(c,d.items,F)&&p(E,"DUPLICATE_KEY","Map keys must be unique");const C=n.resolveProps(m??[],{indicator:"map-value-ind",next:y,offset:F.range[2],onError:p,parentIndent:l.indent,startOnNewline:!g||"block-scalar"===g.type});if(h=C.end,C.found){v&&("block-map"!==y?.type||C.hasNewline||p(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),c.options.strict&&b.start<C.found.offset-1024&&p(F.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const n=y?a(c,y,C,p):u(c,h,m,null,C,p);c.schema.compat&&o.flowIndentCheck(l.indent,y,p),h=n.range[2];const r=new e.Pair(F,n);c.options.keepSourceTokens&&(r.srcToken=t),d.items.push(r)}else{v&&p(F.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),C.comment&&(F.comment?F.comment+="\n"+C.comment:F.comment=C.comment);const n=new e.Pair(F);c.options.keepSourceTokens&&(n.srcToken=t),d.items.push(n)}}return D&&D<h&&p(D,"IMPOSSIBLE","Map comment with trailing content"),d.range=[l.offset,h,D??h],d},Hn}(),i=function(){if(er)return tr;er=1;var e=Rt(),t=Un(),n=Vn();return tr.resolveBlockSeq=function({composeNode:r,composeEmptyNode:o},i,s,a,u){const c=new(u?.nodeClass??e.YAMLSeq)(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let l=s.offset,p=null;for(const{start:e,value:u}of s.items){const f=t.resolveProps(e,{indicator:"seq-item-ind",next:u,offset:l,onError:a,parentIndent:s.indent,startOnNewline:!0});if(!f.found){if(!(f.anchor||f.tag||u)){p=f.end,f.comment&&(c.comment=f.comment);continue}u&&"block-seq"===u.type?a(f.end,"BAD_INDENT","All sequence items must start at the same column"):a(l,"MISSING_CHAR","Sequence item without - indicator")}const d=u?r(i,u,f,a):o(i,f.end,e,null,f,a);i.schema.compat&&n.flowIndentCheck(s.indent,u,a),l=d.range[2],c.items.push(d)}return c.range=[s.offset,l,p??l],c},tr}(),s=function(){if(rr)return ir;rr=1;var e=he(),t=Dt(),n=wt(),r=Rt(),o=ar(),i=Un(),s=Gn(),a=Xn();const u="Block collections are not allowed within flow collections",c=e=>e&&("block-map"===e.type||"block-seq"===e.type);return ir.resolveFlowCollection=function({composeNode:l,composeEmptyNode:p},f,d,h,D){const g="{"===d.start.source,m=g?"flow map":"flow sequence",y=new(D?.nodeClass??(g?n.YAMLMap:r.YAMLSeq))(f.schema);y.flow=!0;const b=f.atRoot;b&&(f.atRoot=!1),f.atKey&&(f.atKey=!1);let v=d.offset+d.start.source.length;for(let r=0;r<d.items.length;++r){const o=d.items[r],{start:D,key:b,sep:E,value:F}=o,C=i.resolveProps(D,{flow:m,indicator:"explicit-key-ind",next:b??E?.[0],offset:v,onError:h,parentIndent:d.indent,startOnNewline:!1});if(!C.found){if(!(C.anchor||C.tag||E||F)){0===r&&C.comma?h(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`):r<d.items.length-1&&h(C.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${m}`),C.comment&&(y.comment?y.comment+="\n"+C.comment:y.comment=C.comment),v=C.end;continue}!g&&f.options.strict&&s.containsNewline(b)&&h(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===r)C.comma&&h(C.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`);else if(C.comma||h(C.start,"MISSING_CHAR",`Missing , between ${m} items`),C.comment){let t="";e:for(const e of D)switch(e.type){case"comma":case"space":break;case"comment":t=e.source.substring(1);break e;default:break e}if(t){let n=y.items[y.items.length-1];e.isPair(n)&&(n=n.value??n.key),n.comment?n.comment+="\n"+t:n.comment=t,C.comment=C.comment.substring(t.length+1)}}if(g||E||C.found){f.atKey=!0;const e=C.end,r=b?l(f,b,C,h):p(f,e,D,null,C,h);c(b)&&h(r.range,"BLOCK_IN_FLOW",u),f.atKey=!1;const s=i.resolveProps(E??[],{flow:m,indicator:"map-value-ind",next:F,offset:r.range[2],onError:h,parentIndent:d.indent,startOnNewline:!1});if(s.found){if(!g&&!C.found&&f.options.strict){if(E)for(const e of E){if(e===s.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}}C.start<s.found.offset-1024&&h(s.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else F&&("source"in F&&F.source&&":"===F.source[0]?h(F,"MISSING_CHAR",`Missing space after : in ${m}`):h(s.start,"MISSING_CHAR",`Missing , or : between ${m} items`));const w=F?l(f,F,s,h):s.found?p(f,s.end,E,null,s,h):null;w?c(F)&&h(w.range,"BLOCK_IN_FLOW",u):s.comment&&(r.comment?r.comment+="\n"+s.comment:r.comment=s.comment);const _=new t.Pair(r,w);if(f.options.keepSourceTokens&&(_.srcToken=o),g){const t=y;a.mapIncludes(f,t.items,r)&&h(e,"DUPLICATE_KEY","Map keys must be unique"),t.items.push(_)}else{const e=new n.YAMLMap(f.schema);e.flow=!0,e.items.push(_);const t=(w??r).range;e.range=[r.range[0],t[1],t[2]],y.items.push(e)}v=w?w.range[2]:s.end}else{const e=F?l(f,F,C,h):p(f,C.end,E,null,C,h);y.items.push(e),v=e.range[2],c(F)&&h(e.range,"BLOCK_IN_FLOW",u)}}const E=g?"}":"]",[F,...C]=d.end;let w=v;if(F&&F.source===E)w=F.offset+F.source.length;else{const e=m[0].toUpperCase()+m.substring(1);h(v,b?"MISSING_CHAR":"BAD_INDENT",b?`${e} must end with a ${E}`:`${e} in block collection must be sufficiently indented and end with a ${E}`),F&&1!==F.source.length&&C.unshift(F)}if(C.length>0){const e=o.resolveEnd(C,w,f.options.strict,h);e.comment&&(y.comment?y.comment+="\n"+e.comment:y.comment=e.comment),y.range=[d.offset,w,e.offset]}else y.range=[d.offset,w,w];return y},ir}();function a(e,t,n,r,a,u){const c="block-map"===n.type?o.resolveBlockMap(e,t,n,r,u):"block-seq"===n.type?i.resolveBlockSeq(e,t,n,r,u):s.resolveFlowCollection(e,t,n,r,u),l=c.constructor;return"!"===a||a===l.tagName?(c.tag=l.tagName,c):(a&&(c.tag=a),c)}return In.composeCollection=function(o,i,s,u,c){const l=u.tag,p=l?i.directives.tagName(l.source,e=>c(l,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===s.type){const{anchor:e,newlineAfterProp:t}=u,n=e&&l?e.offset>l.offset?e:l:e??l;n&&(!t||t.offset<n.offset)&&c(n,"MISSING_CHAR","Missing newline after block sequence props")}const f="block-map"===s.type?"map":"block-seq"===s.type?"seq":"{"===s.start.source?"map":"seq";if(!l||!p||"!"===p||p===n.YAMLMap.tagName&&"map"===f||p===r.YAMLSeq.tagName&&"seq"===f)return a(o,i,s,c,p);let d=i.schema.tags.find(e=>e.tag===p&&e.collection===f);if(!d){const e=i.schema.knownTags[p];if(!e||e.collection!==f)return e?c(l,"BAD_COLLECTION_TYPE",`${e.tag} used for ${f} collection, but expects ${e.collection??"scalar"}`,!0):c(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${p}`,!0),a(o,i,s,c,p);i.schema.tags.push(Object.assign({},e,{default:!1})),d=e}const h=a(o,i,s,c,p,d),D=d.resolve?.(h,e=>c(l,"TAG_RESOLVE_FAILED",e),i.options)??h,g=e.isNode(D)?D:new t.Scalar(D);return g.range=h.range,g.tag=p,d?.format&&(g.format=d.format),g},In}var cr,lr={},pr={};function fr(){if(cr)return pr;cr=1;var e=ze();return pr.resolveBlockScalar=function(t,n,r){const o=n.offset,i=function({offset:e,props:t},n,r){if("block-scalar-header"!==t[0].type)return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=t[0],i=o[0];let s=0,a="",u=-1;for(let t=1;t<o.length;++t){const n=o[t];if(a||"-"!==n&&"+"!==n){const r=Number(n);!s&&r?s=r:-1===u&&(u=e+t)}else a=n}-1!==u&&r(u,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let c=!1,l="",p=o.length;for(let e=1;e<t.length;++e){const o=t[e];switch(o.type){case"space":c=!0;case"newline":p+=o.source.length;break;case"comment":n&&!c&&r(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),p+=o.source.length,l=o.source.substring(1);break;case"error":r(o,"UNEXPECTED_TOKEN",o.message),p+=o.source.length;break;default:{r(o,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${o.type}`);const e=o.source;e&&"string"==typeof e&&(p+=e.length)}}}return{mode:i,indent:s,chomp:a,comment:l,length:p}}(n,t.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[o,o,o]};const s=">"===i.mode?e.Scalar.BLOCK_FOLDED:e.Scalar.BLOCK_LITERAL,a=n.source?function(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),o=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)o.push([t[e],t[e+1]]);return o}(n.source):[];let u=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;u=e}if(0===u){const e="+"===i.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let t=o+i.length;return n.source&&(t+=n.source.length),{value:e,type:s,comment:i.comment,range:[o,t,t]}}let c=n.indent+i.indent,l=n.offset+i.length,p=0;for(let e=0;e<u;++e){const[n,o]=a[e];if(""!==o&&"\r"!==o){if(n.length<c){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(l+n.length,"MISSING_CHAR",e)}0===i.indent&&(c=n.length),p=e,0!==c||t.atRoot||r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}0===i.indent&&n.length>c&&(c=n.length),l+=n.length+o.length+1}for(let e=a.length-1;e>=u;--e)a[e][0].length>c&&(u=e+1);let f="",d="",h=!1;for(let e=0;e<p;++e)f+=a[e][0].slice(c)+"\n";for(let t=p;t<u;++t){let[n,o]=a[t];l+=n.length+o.length+1;const u="\r"===o[o.length-1];if(u&&(o=o.slice(0,-1)),o&&n.length<c){const e="Block scalar lines must not be less indented than their "+(i.indent?"explicit indentation indicator":"first line");r(l-o.length-(u?2:1),"BAD_INDENT",e),n=""}s===e.Scalar.BLOCK_LITERAL?(f+=d+n.slice(c)+o,d="\n"):n.length>c||"\t"===o[0]?(" "===d?d="\n":h||"\n"!==d||(d="\n\n"),f+=d+n.slice(c)+o,d="\n",h=!0):""===o?"\n"===d?f+="\n":d="\n":(f+=d+o,d=" ",h=!1)}switch(i.chomp){case"-":break;case"+":for(let e=u;e<a.length;++e)f+="\n"+a[e][0].slice(c);"\n"!==f[f.length-1]&&(f+="\n");break;default:f+="\n"}const D=o+i.length+n.source.length;return{value:f,type:s,comment:i.comment,range:[o,D,D]}},pr}var dr,hr,Dr={};function gr(){if(dr)return Dr;dr=1;var e=ze(),t=ar();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 r=t.exec(e);if(!r)return e;let o=r[1],i=" ",s=t.lastIndex;for(n.lastIndex=s;r=n.exec(e);)""===r[1]?"\n"===i?o+=i:i="\n":(o+=i+r[1],i=" "),s=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=s,r=a.exec(e),o+i+(r?.[1]??"")}function r(e,t){let n="",r=e[t+1];for(;!(" "!==r&&"\t"!==r&&"\n"!==r&&"\r"!==r||"\r"===r&&"\n"!==e[t+2]);)"\n"===r&&(n+="\n"),r=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const o={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,r){const o=e.substr(t,n),i=o.length===n&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(i)){const o=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(i)}return Dr.resolveFlowScalar=function(s,a,u){const{offset:c,type:l,source:p,end:f}=s;let d,h;const D=(e,t,n)=>u(c+e,t,n);switch(l){case"scalar":d=e.Scalar.PLAIN,h=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),n(e)}(p,D);break;case"single-quoted-scalar":d=e.Scalar.QUOTE_SINGLE,h=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),n(e.slice(1,-1)).replace(/''/g,"'")}(p,D);break;case"double-quoted-scalar":d=e.Scalar.QUOTE_DOUBLE,h=function(e,t){let n="";for(let s=1;s<e.length-1;++s){const a=e[s];if("\r"!==a||"\n"!==e[s+1])if("\n"===a){const{fold:t,offset:o}=r(e,s);n+=t,s=o}else if("\\"===a){let r=e[++s];const a=o[r];if(a)n+=a;else if("\n"===r)for(r=e[s+1];" "===r||"\t"===r;)r=e[1+ ++s];else if("\r"===r&&"\n"===e[s+1])for(r=e[1+ ++s];" "===r||"\t"===r;)r=e[1+ ++s];else if("x"===r||"u"===r||"U"===r){const o={x:2,u:4,U:8}[r];n+=i(e,s+1,o,t),s+=o}else{const r=e.substr(s-1,2);t(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${r}`),n+=r}}else if(" "===a||"\t"===a){const t=s;let r=e[s+1];for(;" "===r||"\t"===r;)r=e[1+ ++s];"\n"===r||"\r"===r&&"\n"===e[s+2]||(n+=s>t?e.slice(t,s+1):a)}else n+=a}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}(p,D);break;default:return u(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[c,c+p.length,c+p.length]}}const g=c+p.length,m=t.resolveEnd(f,g,a,u);return{value:h,type:d,comment:m.comment,range:[c,g,m.offset]}},Dr}var mr,yr,br,vr,Er={};function Fr(){if(yr)return jn;yr=1;var e=$e(),t=he(),n=ur(),r=function(){if(hr)return lr;hr=1;var e=he(),t=ze(),n=fr(),r=gr();return lr.composeScalar=function(o,i,s,a){const{value:u,type:c,comment:l,range:p}="block-scalar"===i.type?n.resolveBlockScalar(o,i,a):r.resolveFlowScalar(i,o.options.strict,a),f=s?o.directives.tagName(s.source,e=>a(s,"TAG_RESOLVE_FAILED",e)):null;let d,h;d=o.options.stringKeys&&o.atKey?o.schema[e.SCALAR]:f?function(t,n,r,o,i){if("!"===r)return t[e.SCALAR];const s=[];for(const e of t.tags)if(!e.collection&&e.tag===r){if(!e.default||!e.test)return e;s.push(e)}for(const e of s)if(e.test?.test(n))return e;const a=t.knownTags[r];return a&&!a.collection?(t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(i(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),t[e.SCALAR])}(o.schema,u,f,s,a):"scalar"===i.type?function({atKey:t,directives:n,schema:r},o,i,s){const a=r.tags.find(e=>(!0===e.default||t&&"key"===e.default)&&e.test?.test(o))||r[e.SCALAR];if(r.compat){const t=r.compat.find(e=>e.default&&e.test?.test(o))??r[e.SCALAR];a.tag!==t.tag&&s(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${n.tagString(a.tag)} or ${n.tagString(t.tag)}`,!0)}return a}(o,u,i,a):o.schema[e.SCALAR];try{const n=d.resolve(u,e=>a(s??i,"TAG_RESOLVE_FAILED",e),o.options);h=e.isScalar(n)?n:new t.Scalar(n)}catch(e){const n=e instanceof Error?e.message:String(e);a(s??i,"TAG_RESOLVE_FAILED",n),h=new t.Scalar(u)}return h.range=p,h.source=u,c&&(h.type=c),f&&(h.tag=f),d.format&&(h.format=d.format),l&&(h.comment=l),h},lr}(),o=ar(),i=(mr||(mr=1,Er.emptyScalarPosition=function(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++r];"space"===n?.type;)e+=n.source.length,n=t[++r];break}}return e}),Er);const s={composeNode:a,composeEmptyNode:u};function a(i,a,c,l){const p=i.atKey,{spaceBefore:f,comment:d,anchor:h,tag:D}=c;let g,m=!0;switch(a.type){case"alias":g=function({options:t},{offset:n,source:r,end:i},s){const a=new e.Alias(r.substring(1));""===a.source&&s(n,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&s(n+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const u=n+r.length,c=o.resolveEnd(i,u,t.strict,s);return a.range=[n,u,c.offset],c.comment&&(a.comment=c.comment),a}(i,a,l),(h||D)&&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=r.composeScalar(i,a,D,l),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=n.composeCollection(s,i,a,c,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=u(i,a.offset,void 0,null,c,l),m=!1}return h&&""===g.anchor&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),p&&i.options.stringKeys&&(!t.isScalar(g)||"string"!=typeof g.value||g.tag&&"tag:yaml.org,2002:str"!==g.tag)&&l(D??a,"NON_STRING_KEY","With stringKeys, all keys must be strings"),f&&(g.spaceBefore=!0),d&&("scalar"===a.type&&""===a.source?g.comment=d:g.commentBefore=d),i.options.keepSourceTokens&&m&&(g.srcToken=a),g}function u(e,t,n,o,{spaceBefore:s,comment:a,anchor:u,tag:c,end:l},p){const f={type:"scalar",offset:i.emptyScalarPosition(t,n,o),indent:-1,source:""},d=r.composeScalar(e,f,c,p);return u&&(d.anchor=u.source.substring(1),""===d.anchor&&p(u,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=l),d}return jn.composeEmptyNode=u,jn.composeNode=a,jn}function Cr(){if(vr)return pe;vr=1;var e=s,t=be(),n=On(),r=Ln(),o=he(),i=function(){if(br)return Mn;br=1;var e=On(),t=Fr(),n=ar(),r=Un();return Mn.composeDoc=function(o,i,{offset:s,start:a,value:u,end:c},l){const p=Object.assign({_directives:i},o),f=new e.Document(void 0,p),d={atKey:!1,atRoot:!0,directives:f.directives,options:f.options,schema:f.schema},h=r.resolveProps(a,{indicator:"doc-start",next:u??c?.[0],offset:s,onError:l,parentIndent:0,startOnNewline:!0});h.found&&(f.directives.docStart=!0,!u||"block-map"!==u.type&&"block-seq"!==u.type||h.hasNewline||l(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),f.contents=u?t.composeNode(d,u,h,l):t.composeEmptyNode(d,h.end,a,null,h,l);const D=f.contents.range[2],g=n.resolveEnd(c,D,!1,l);return g.comment&&(f.comment=g.comment),f.range=[s,D,g.offset],f},Mn}(),a=ar();function u(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,r=!1;for(let o=0;o<e.length;++o){const i=e[o];switch(i[0]){case"#":t+=(""===t?"":r?"\n\n":"\n")+(i.substring(1)||" "),n=!0,r=!1;break;case"%":"#"!==e[o+1]?.[0]&&(o+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}return pe.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,o)=>{const i=u(e);o?this.warnings.push(new r.YAMLWarning(i,t,n)):this.errors.push(new r.YAMLParseError(i,t,n))},this.directives=new t.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:r}=c(this.prelude);if(n){const i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(o.isCollection(i)&&!i.flow&&i.items.length>0){let e=i.items[0];o.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,r)=>{const o=u(t);o[0]+=e,this.onError(o,"BAD_DIRECTIVE",n,r)}),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 r.YAMLParseError(u(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 r.YAMLParseError(u(t),"UNEXPECTED_TOKEN",e));break}this.doc.directives.docEnd=!0;const e=a.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 r.YAMLParseError(u(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),r=new n.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}},pe}var wr,_r={},Ar={};var Sr,kr={};var Pr,Rr,xr={};function Br(){if(Rr)return _r;Rr=1;var e=function(){if(wr)return Ar;wr=1;var e=fr(),t=gr(),n=Ln(),r=rt();function o(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 r=e.props.slice(1);let o=t.length;"block-scalar-header"===e.props[0].type&&(o-=e.props[0].source.length);for(const e of r)e.offset+=o;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{const r="indent"in e?e.indent:-1,o="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:r,source:t,end:o})}}}return Ar.createScalarToken=function(e,t){const{implicitKey:n=!1,indent:i,inFlow:s=!1,offset:a=-1,type:u="PLAIN"}=t,c=r.stringifyString({type:u,value:e},{implicitKey:n,indent:i>0?" ".repeat(i):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:i,source:"\n"}];switch(c[0]){case"|":case">":{const e=c.indexOf("\n"),t=c.substring(0,e),n=c.substring(e+1)+"\n",r=[{type:"block-scalar-header",offset:a,indent:i,source:t}];return o(r,l)||r.push({type:"newline",offset:-1,indent:i,source:"\n"}),{type:"block-scalar",offset:a,indent:i,props:r,source:n}}case'"':return{type:"double-quoted-scalar",offset:a,indent:i,source:c,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:i,source:c,end:l};default:return{type:"scalar",offset:a,indent:i,source:c,end:l}}},Ar.resolveAsScalar=function(r,o=!0,i){if(r){const s=(e,t,r)=>{const o="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!i)throw new n.YAMLParseError([o,o+1],t,r);i(o,t,r)};switch(r.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return t.resolveFlowScalar(r,o,s);case"block-scalar":return e.resolveBlockScalar({options:{strict:o}},r,s)}}return null},Ar.setScalarValue=function(e,t,n={}){let{afterKey:s=!1,implicitKey:a=!1,inFlow:u=!1,type:c}=n,l="indent"in e?e.indent:null;if(s&&"number"==typeof l&&(l+=2),!c)switch(e.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");c=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const p=r.stringifyString({type:c,value:t},{implicitKey:a||null===l,indent:null!==l&&l>0?" ".repeat(l):"",inFlow:u,options:{blockQuote:!0,lineWidth:-1}});switch(p[0]){case"|":case">":!function(e,t){const n=t.indexOf("\n"),r=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=r,e.source=i}else{const{offset:t}=e,n="indent"in e?e.indent:-1,s=[{type:"block-scalar-header",offset:t,indent:n,source:r}];o(s,"end"in e?e.end:void 0)||s.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:s,source:i})}}(e,p);break;case'"':i(e,p,"double-quoted-scalar");break;case"'":i(e,p,"single-quoted-scalar");break;default:i(e,p,"scalar")}},Ar}(),t=function(){if(Sr)return kr;function e(n){switch(n.type){case"block-scalar":{let t="";for(const r of n.props)t+=e(r);return t+n.source}case"block-map":case"block-seq":{let e="";for(const r of n.items)e+=t(r);return e}case"flow-collection":{let e=n.start.source;for(const r of n.items)e+=t(r);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:r,value:o}){let i="";for(const e of t)i+=e.source;if(n&&(i+=e(n)),r)for(const e of r)i+=e.source;return o&&(i+=e(o)),i}return Sr=1,kr.stringify=n=>"type"in n?e(n):t(n),kr}(),n=function(){if(Pr)return xr;Pr=1;const e=Symbol("break visit"),t=Symbol("skip children"),n=Symbol("remove item");function r(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),o(Object.freeze([]),e,t)}function o(t,r,i){let s=i(r,t);if("symbol"==typeof s)return s;for(const a of["key","value"]){const u=r[a];if(u&&"items"in u){for(let r=0;r<u.items.length;++r){const s=o(Object.freeze(t.concat([[a,r]])),u.items[r],i);if("number"==typeof s)r=s-1;else{if(s===e)return e;s===n&&(u.items.splice(r,1),r-=1)}}"function"==typeof s&&"key"===a&&(s=s(r,t))}}return"function"==typeof s?s(r,t):s}return r.BREAK=e,r.SKIP=t,r.REMOVE=n,r.itemAtPath=(e,t)=>{let n=e;for(const[e,r]of t){const t=n?.[e];if(!t||!("items"in t))return;n=t.items[r]}return n},r.parentCollection=(e,t)=>{const n=r.itemAtPath(e,t.slice(0,-1)),o=t[t.length-1][0],i=n?.[o];if(i&&"items"in i)return i;throw new Error("Parent collection not found")},xr.visit=r,xr}();return _r.createScalarToken=e.createScalarToken,_r.resolveAsScalar=e.resolveAsScalar,_r.setScalarValue=e.setScalarValue,_r.stringify=t.stringify,_r.visit=n.visit,_r.BOM="\ufeff",_r.DOCUMENT="",_r.FLOW_END="",_r.SCALAR="",_r.isCollection=e=>!!e&&"items"in e,_r.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),_r.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},_r.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},_r}var Or,Tr={};function $r(){if(Or)return Tr;Or=1;var e=Br();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"),r=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),o=new Set(",[]{}"),i=new Set(" ,[]{}\n\r\t"),s=e=>!e||i.has(e);return Tr.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 r=t[n-1];if(" "===r||"\t"===r){e=n-1;break}n=t.indexOf("#",n+1)}for(;;){const n=t[e-1];if(" "!==n&&"\t"!==n)break;e-=1}const r=(yield*this.pushCount(e))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-r),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(s),"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,r,o=-1;do{n=yield*this.pushNewline(),n>0?(r=yield*this.pushSpaces(!1),this.indentValue=o=r):r=0,r+=(yield*this.pushSpaces(!0))}while(n+r>0);const i=this.getLine();if(null===i)return this.setNext("flow");if((-1!==o&&o<this.indentNext&&"#"!==i[0]||0===o&&(i.startsWith("---")||i.startsWith("..."))&&t(i[3]))&&(o!==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(s),"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 r=n.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){const e=this.continueScalar(r+1);if(-1===e)break;r=n.indexOf("\n",e)}-1!==r&&(t=r-("\r"===n[r-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,r=0;e:for(let e=this.pos;t=this.buffer[e];++e)switch(t){case" ":r+=1;break;case"\n":n=e,r=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(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r: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 o=n+1;for(t=this.buffer[o];" "===t;)t=this.buffer[++o];if("\t"===t){for(;"\t"===t||" "===t||"\r"===t||"\n"===t;)t=this.buffer[++o];n=o-1}else if(!this.blockScalarKeep)for(;;){let e=n-1,t=this.buffer[e];"\r"===t&&(t=this.buffer[--e]);const o=e;for(;" "===t;)t=this.buffer[--e];if(!("\n"===t&&e>=this.pos&&e+1+r>o))break;n=e}return yield e.SCALAR,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let r,i=this.pos-1,s=this.pos-1;for(;r=this.buffer[++s];)if(":"===r){const e=this.buffer[s+1];if(t(e)||n&&o.has(e))break;i=s}else if(t(r)){let e=this.buffer[s+1];if("\r"===r&&("\n"===e?(s+=1,r="\n",e=this.buffer[s+1]):i=s),"#"===e||n&&o.has(e))break;if("\n"===r){const e=this.continueScalar(s+1);if(-1===e)break;s=Math.max(s,e-2)}}else{if(n&&o.has(r))break;i=s}return r||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(s))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(t(n)||e&&o.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(r.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 r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},Tr}var Lr,Nr={};function Mr(){return Lr||(Lr=1,Nr.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 r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}),Nr}var jr,Ir={};function Hr(){if(jr)return Ir;jr=1;var e=s,t=Br(),n=$r();function r(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function o(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 a(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 u(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||r(t.start,"explicit-key-ind")||r(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 Ir.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 r=t.tokenType(n);if(r)if("scalar"===r)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+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||e&&"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===o(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!==o(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=u(a(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const r={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]=r}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,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.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],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.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,o=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let s=[];if(o&&t.sep&&!t.value){const n=[];for(let r=0;r<t.sep.length;++r){const o=t.sep[r];switch(o.type){case"newline":n.push(r);break;case"space":break;case"comment":o.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(s=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":return void(o||t.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?o||t.value?(s.push(this.sourceToken),e.items.push({start:s,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(r(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(i(t.key)&&!r(t.sep,"newline")){const e=u(t.start),n=t.key,r=t.sep;r.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:r}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(r(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=u(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||o?e.items.push({start:s,key:null,sep:[this.sourceToken]}):r(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});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(o||t.value?(e.items.push({start:s,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0))}default:{const o=this.startBlockValue(e);if(o){if("block-seq"===o.type){if(!t.explicitKey&&t.sep&&!r(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else n&&e.items.push({start:s});return void this.stack.push(o)}}}}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,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.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],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.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||r(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(e&&"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=u(a(t));c(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}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=u(a(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=u(a(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())}}},Ir}var zr,Ur,qr={};var Kr=function(){if(Ur)return le;Ur=1;var e=Cr(),t=On(),n=Pn(),r=Ln(),o=$e(),i=he(),s=Dt(),a=ze(),u=wt(),c=Rt(),l=Br(),p=$r(),f=Mr(),d=Hr(),h=function(){if(zr)return qr;zr=1;var e=Cr(),t=On(),n=Ln(),r=ut(),o=he(),i=Mr(),s=Hr();function a(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new i.LineCounter||null,prettyErrors:t}}function u(t,r={}){const{lineCounter:o,prettyErrors:i}=a(r),u=new s.Parser(o?.addNewLine),c=new e.Composer(r);let l=null;for(const e of c.compose(u.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&&o&&(l.errors.forEach(n.prettifyError(t,o)),l.warnings.forEach(n.prettifyError(t,o))),l}return qr.parse=function(e,t,n){let o;"function"==typeof t?o=t:void 0===n&&t&&"object"==typeof t&&(n=t);const i=u(e,n);if(!i)return null;if(i.warnings.forEach(e=>r.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:o},n))},qr.parseAllDocuments=function(t,r={}){const{lineCounter:o,prettyErrors:i}=a(r),u=new s.Parser(o?.addNewLine),c=new e.Composer(r),l=Array.from(c.compose(u.parse(t)));if(i&&o)for(const e of l)e.errors.forEach(n.prettifyError(t,o)),e.warnings.forEach(n.prettifyError(t,o));return l.length>0?l:Object.assign([],{empty:!0},c.streamInfo())},qr.parseDocument=u,qr.stringify=function(e,n,r){let i=null;if("function"==typeof n||Array.isArray(n)?i=n:void 0===r&&n&&(r=n),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??n??{};if(!e)return}return o.isDocument(e)&&!i?e.toString(r):new t.Document(e,i,r).toString(r)},qr}(),D=ye();return le.Composer=e.Composer,le.Document=t.Document,le.Schema=n.Schema,le.YAMLError=r.YAMLError,le.YAMLParseError=r.YAMLParseError,le.YAMLWarning=r.YAMLWarning,le.Alias=o.Alias,le.isAlias=i.isAlias,le.isCollection=i.isCollection,le.isDocument=i.isDocument,le.isMap=i.isMap,le.isNode=i.isNode,le.isPair=i.isPair,le.isScalar=i.isScalar,le.isSeq=i.isSeq,le.Pair=s.Pair,le.Scalar=a.Scalar,le.YAMLMap=u.YAMLMap,le.YAMLSeq=c.YAMLSeq,le.CST=l,le.Lexer=p.Lexer,le.LineCounter=f.LineCounter,le.Parser=d.Parser,le.parse=h.parse,le.parseAllDocuments=h.parseAllDocuments,le.parseDocument=h.parseDocument,le.stringify=h.stringify,le.visit=D.visit,le.visitAsync=D.visitAsync,le}(),Gr=x(Kr);function Wr(e,t,n){function r(n,r){var o;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(o=n._zod).traits??(o.traits=new Set),n._zod.traits.add(e),t(n,r);for(const e in s.prototype)e in n||Object.defineProperty(n,e,{value:s.prototype[e].bind(n)});n._zod.constr=s,n._zod.def=r}const o=n?.Parent??Object;class i extends o{}function s(e){var t;const o=n?.Parent?new i:this;r(o,e),(t=o._zod).deferred??(t.deferred=[]);for(const e of o._zod.deferred)e();return o}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class Zr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Vr extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const Jr={};function Yr(e){return Jr}function Qr(e,t){return"bigint"==typeof t?t.toString():t}function Xr(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function eo(e){return null==e}function to(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const no=Symbol("evaluating");function ro(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==no)return void 0===r&&(r=no,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function oo(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function io(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function so(e){return JSON.stringify(e)}const ao="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function uo(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const co=Xr(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function lo(e){if(!1===uo(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==uo(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function po(e){return lo(e)?{...e}:Array.isArray(e)?[...e]:e}const fo=new Set(["string","number","symbol"]);function ho(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Do(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function go(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 mo={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 yo(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 bo(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function vo(e){return"string"==typeof e?e:e?.message}function Eo(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=vo(e.inst?._zod.def?.error?.(e))??vo(t?.error?.(e))??vo(n.customError?.(e))??vo(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Fo(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Co(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const wo=(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,Qr,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},_o=Wr("$ZodError",wo),Ao=Wr("$ZodError",wo,{Parent:Error}),So=e=>(t,n,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Zr;if(s.issues.length){const t=new(o?.Err??e)(s.issues.map(e=>Eo(e,i,Yr())));throw ao(t,o?.callee),t}return s.value},ko=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const t=new(o?.Err??e)(s.issues.map(e=>Eo(e,i,Yr())));throw ao(t,o?.callee),t}return s.value},Po=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new Zr;return i.issues.length?{success:!1,error:new(e??_o)(i.issues.map(e=>Eo(e,o,Yr())))}:{success:!0,data:i.value}},Ro=Po(Ao),xo=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>Eo(e,o,Yr())))}:{success:!0,data:i.value}},Bo=xo(Ao),Oo=/^[cC][^\s-]{8,}$/,To=/^[0-9a-z]+$/,$o=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Lo=/^[0-9a-vA-V]{20}$/,No=/^[A-Za-z0-9]{27}$/,Mo=/^[a-zA-Z0-9_-]{21}$/,jo=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Io=/^([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})$/,Ho=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)$/,zo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Uo=/^(?:(?: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])$/,qo=/^(([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}|:))$/,Ko=/^((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])$/,Go=/^(([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])$/,Wo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Zo=/^[A-Za-z0-9_-]*$/,Vo=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Jo=/^\+(?:[0-9]){6,14}[0-9]$/,Yo="(?:(?:\\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])))",Qo=new RegExp(`^${Yo}$`);function Xo(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 ei=/^-?\d+$/,ti=/^-?\d+(?:\.\d+)?/,ni=/^(?:true|false)$/i,ri=/^[^A-Z]*$/,oi=/^[^a-z]*$/,ii=Wr("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),si={number:"number",bigint:"bigint",object:"date"},ai=Wr("$ZodCheckLessThan",(e,t)=>{ii.init(e,t);const n=si[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ui=Wr("$ZodCheckGreaterThan",(e,t)=>{ii.init(e,t);const n=si[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ci=Wr("$ZodCheckMultipleOf",(e,t)=>{ii.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,r=t.toString();let o=(r.split(".")[1]||"").length;if(0===o&&/\d?e-\d?/.test(r)){const e=r.match(/\d?e-(\d?)/);e?.[1]&&(o=Number.parseInt(e[1]))}const i=n>o?n:o;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})}}),li=Wr("$ZodCheckNumberFormat",(e,t)=>{ii.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=mo[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=o,r.maximum=i,n&&(r.pattern=ei)}),e._zod.check=s=>{const a=s.value;if(n){if(!Number.isInteger(a))return void s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}))}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e})}}),pi=Wr("$ZodCheckMaxLength",(e,t)=>{var n;ii.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!eo(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 r=n.value;if(r.length<=t.maximum)return;const o=Fo(r);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),fi=Wr("$ZodCheckMinLength",(e,t)=>{var n;ii.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!eo(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 r=n.value;if(r.length>=t.minimum)return;const o=Fo(r);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),di=Wr("$ZodCheckLengthEquals",(e,t)=>{var n;ii.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!eo(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 r=n.value,o=r.length;if(o===t.length)return;const i=Fo(r),s=o>t.length;n.issues.push({origin:i,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),hi=Wr("$ZodCheckStringFormat",(e,t)=>{var n,r;ii.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})}):(r=e._zod).check??(r.check=()=>{})}),Di=Wr("$ZodCheckRegex",(e,t)=>{hi.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})}}),gi=Wr("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ri),hi.init(e,t)}),mi=Wr("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=oi),hi.init(e,t)}),yi=Wr("$ZodCheckIncludes",(e,t)=>{ii.init(e,t);const n=ho(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),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})}}),bi=Wr("$ZodCheckStartsWith",(e,t)=>{ii.init(e,t);const n=new RegExp(`^${ho(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})}}),vi=Wr("$ZodCheckEndsWith",(e,t)=>{ii.init(e,t);const n=new RegExp(`.*${ho(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})}}),Ei=Wr("$ZodCheckOverwrite",(e,t)=>{ii.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class Fi{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)),r=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const Ci={major:4,minor:1,patch:11},wi=Wr("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ci;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const t of r)for(const n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let r,o=yo(e);for(const i of t){if(i._zod.def.when){if(!i._zod.def.when(e))continue}else if(o)continue;const t=e.issues.length,s=i._zod.check(e);if(s instanceof Promise&&!1===n?.async)throw new Zr;if(r||s instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await s,e.issues.length!==t&&(o||(o=yo(e,t)))});else{if(e.issues.length===t)continue;o||(o=yo(e,t))}}return r?r.then(()=>e):e},n=(n,o,i)=>{if(yo(n))return n.aborted=!0,n;const s=t(o,r,i);if(s instanceof Promise){if(!1===i.async)throw new Zr;return s.then(t=>e._zod.parse(t,i))}return e._zod.parse(s,i)};e._zod.run=(o,i)=>{if(i.skipChecks)return e._zod.parse(o,i);if("backward"===i.direction){const t=e._zod.parse({value:o.value,issues:[]},{...i,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,o,i)):n(t,o,i)}const s=e._zod.parse(o,i);if(s instanceof Promise){if(!1===i.async)throw new Zr;return s.then(e=>t(e,r,i))}return t(s,r,i)}}e["~standard"]={validate:t=>{try{const n=Ro(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return Bo(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),_i=Wr("$ZodString",(e,t)=>{var n;wi.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,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ai=Wr("$ZodStringFormat",(e,t)=>{hi.init(e,t),_i.init(e,t)}),Si=Wr("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Io),Ai.init(e,t)}),ki=Wr("$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=Ho(e))}else t.pattern??(t.pattern=Ho());Ai.init(e,t)}),Pi=Wr("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=zo),Ai.init(e,t)}),Ri=Wr("$ZodURL",(e,t)=>{Ai.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Vo.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.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=o.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),xi=Wr("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Ai.init(e,t)}),Bi=Wr("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Mo),Ai.init(e,t)}),Oi=Wr("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Oo),Ai.init(e,t)}),Ti=Wr("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=To),Ai.init(e,t)}),$i=Wr("$ZodULID",(e,t)=>{t.pattern??(t.pattern=$o),Ai.init(e,t)}),Li=Wr("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Lo),Ai.init(e,t)}),Ni=Wr("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=No),Ai.init(e,t)}),Mi=Wr("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=Xo({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Yo}T(?:${r})$`)}(t)),Ai.init(e,t)}),ji=Wr("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Qo),Ai.init(e,t)}),Ii=Wr("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${Xo(t)}$`)),Ai.init(e,t)}),Hi=Wr("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=jo),Ai.init(e,t)}),zi=Wr("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Uo),Ai.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),Ui=Wr("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=qo),Ai.init(e,t),e._zod.onattach.push(e=>{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})}}}),qi=Wr("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ko),Ai.init(e,t)}),Ki=Wr("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Go),Ai.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(2!==r.length)throw new Error;const[e,t]=r;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 Gi(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Wi=Wr("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Wo),Ai.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Gi(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),Zi=Wr("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Zo),Ai.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{(function(e){if(!Zo.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Gi(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})}}),Vi=Wr("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Jo),Ai.init(e,t)}),Ji=Wr("$ZodJWT",(e,t)=>{Ai.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&"JWT"!==o?.typ||!o.alg||t&&(!("alg"in o)||o.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})}}),Yi=Wr("$ZodNumber",(e,t)=>{wi.init(e,t),e._zod.pattern=e._zod.bag.pattern??ti,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const o=n.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return n;const i="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}}),Qi=Wr("$ZodNumber",(e,t)=>{li.init(e,t),Yi.init(e,t)}),Xi=Wr("$ZodBoolean",(e,t)=>{wi.init(e,t),e._zod.pattern=ni,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const o=n.value;return"boolean"==typeof o||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),es=Wr("$ZodUnknown",(e,t)=>{wi.init(e,t),e._zod.parse=e=>e}),ts=Wr("$ZodNever",(e,t)=>{wi.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function ns(e,t,n){e.issues.length&&t.issues.push(...bo(n,e.issues)),t.value[n]=e.value}const rs=Wr("$ZodArray",(e,t)=>{wi.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let e=0;e<o.length;e++){const s=o[e],a=t.element._zod.run({value:s,issues:[]},r);a instanceof Promise?i.push(a.then(t=>ns(t,n,e))):ns(a,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function os(e,t,n,r){e.issues.length&&t.issues.push(...bo(n,e.issues)),void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function is(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=(r=e.shape,Object.keys(r).filter(e=>"optional"===r[e]._zod.optin&&"optional"===r[e]._zod.optout));var r;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ss(e,t,n,r,o,i){const s=[],a=o.keySet,u=o.catchall._zod,c=u.def.type;for(const o of Object.keys(t)){if(a.has(o))continue;if("never"===c){s.push(o);continue}const i=u.run({value:t[o],issues:[]},r);i instanceof Promise?e.push(i.then(e=>os(e,n,o,t))):os(i,n,o,t)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const as=Wr("$ZodObject",(e,t)=>{wi.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 r=Xr(()=>is(t));ro(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n});const o=uo,i=t.catchall;let s;e._zod.parse=(t,n)=>{s??(s=r.value);const a=t.value;if(!o(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const u=[],c=s.shape;for(const e of s.keys){const r=c[e]._zod.run({value:a[e],issues:[]},n);r instanceof Promise?u.push(r.then(n=>os(n,t,e,a))):os(r,t,e,a)}return i?ss(u,a,t,n,r.value,e):u.length?Promise.all(u).then(()=>t):t}}),us=Wr("$ZodObjectJIT",(e,t)=>{as.init(e,t);const n=e._zod.parse,r=Xr(()=>is(t));let o;const i=uo,s=!Jr.jitless,a=s&&co.value,u=t.catchall;let c;e._zod.parse=(l,p)=>{c??(c=r.value);const f=l.value;return i(f)?s&&a&&!1===p?.async&&!0!==p.jitless?(o||(o=(e=>{const t=new Fi(["shape","payload","ctx"]),n=r.value,o=e=>{const t=so(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let s=0;for(const e of n.keys)i[e]="key_"+s++;t.write("const newResult = {};");for(const e of n.keys){const n=i[e],r=so(e);t.write(`const ${n} = ${o(e)};`),t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${r}, ...iss.path] : [${r}]\n })));\n }\n \n \n if (${n}.value === undefined) {\n if (${r} in input) {\n newResult[${r}] = undefined;\n }\n } else {\n newResult[${r}] = ${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=o(l,p),u?ss([],f,l,p,c,e):l):n(l,p):(l.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),l)}});function cs(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const o=e.filter(e=>!yo(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Eo(e,r,Yr())))}),t)}const ls=Wr("$ZodUnion",(e,t)=>{wi.init(e,t),ro(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),ro(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),ro(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),ro(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=>to(e.source)).join("|")})$`)}});const n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let s=!1;const a=[];for(const e of t.options){const t=e._zod.run({value:o.value,issues:[]},i);if(t instanceof Promise)a.push(t),s=!0;else{if(0===t.issues.length)return t;a.push(t)}}return s?Promise.all(a).then(t=>cs(t,o,e,i)):cs(a,o,e,i)}}),ps=Wr("$ZodIntersection",(e,t)=>{wi.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,o=t.left._zod.run({value:r,issues:[]},n),i=t.right._zod.run({value:r,issues:[]},n);return o instanceof Promise||i instanceof Promise?Promise.all([o,i]).then(([t,n])=>ds(e,t,n)):ds(e,o,i)}});function fs(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(lo(e)&&lo(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),o={...e,...t};for(const n of r){const r=fs(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};o[n]=r.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=fs(e[r],t[r]);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ds(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),yo(e))return e;const r=fs(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const hs=Wr("$ZodRecord",(e,t)=>{wi.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!lo(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const i=[];if(t.keyType._zod.values){const s=t.keyType._zod.values;n.value={};for(const e of s)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){const s=t.valueType._zod.run({value:o[e],issues:[]},r);s instanceof Promise?i.push(s.then(t=>{t.issues.length&&n.issues.push(...bo(e,t.issues)),n.value[e]=t.value})):(s.issues.length&&n.issues.push(...bo(e,s.issues)),n.value[e]=s.value)}let a;for(const e in o)s.has(e)||(a=a??[],a.push(e));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:a})}else{n.value={};for(const s of Reflect.ownKeys(o)){if("__proto__"===s)continue;const a=t.keyType._zod.run({value:s,issues:[]},r);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>Eo(e,r,Yr())),input:s,path:[s],inst:e}),n.value[a.value]=a.value;continue}const u=t.valueType._zod.run({value:o[s],issues:[]},r);u instanceof Promise?i.push(u.then(e=>{e.issues.length&&n.issues.push(...bo(s,e.issues)),n.value[a.value]=e.value})):(u.issues.length&&n.issues.push(...bo(s,u.issues)),n.value[a.value]=u.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Ds=Wr("$ZodEnum",(e,t)=>{wi.init(e,t);const n=function(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)}(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(e=>fo.has(typeof e)).map(e=>"string"==typeof e?ho(e):e.toString()).join("|")})$`),e._zod.parse=(t,o)=>{const i=t.value;return r.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),gs=Wr("$ZodTransform",(e,t)=>{wi.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Vr(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(n.value=e,n));if(o instanceof Promise)throw new Zr;return n.value=o,n}});function ms(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const ys=Wr("$ZodOptional",(e,t)=>{wi.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ro(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ro(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${to(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>ms(t,e.value)):ms(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),bs=Wr("$ZodNullable",(e,t)=>{wi.init(e,t),ro(e._zod,"optin",()=>t.innerType._zod.optin),ro(e._zod,"optout",()=>t.innerType._zod.optout),ro(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${to(e.source)}|null)$`):void 0}),ro(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)}),vs=Wr("$ZodDefault",(e,t)=>{wi.init(e,t),e._zod.optin="optional",ro(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 r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Es(e,t)):Es(r,t)}});function Es(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const Fs=Wr("$ZodPrefault",(e,t)=>{wi.init(e,t),e._zod.optin="optional",ro(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))}),Cs=Wr("$ZodNonOptional",(e,t)=>{wi.init(e,t),ro(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,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(t=>ws(t,e)):ws(o,e)}});function ws(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 _s=Wr("$ZodCatch",(e,t)=>{wi.init(e,t),ro(e._zod,"optin",()=>t.innerType._zod.optin),ro(e._zod,"optout",()=>t.innerType._zod.optout),ro(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Eo(e,n,Yr()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Eo(e,n,Yr()))},input:e.value}),e.issues=[]),e)}}),As=Wr("$ZodPipe",(e,t)=>{wi.init(e,t),ro(e._zod,"values",()=>t.in._zod.values),ro(e._zod,"optin",()=>t.in._zod.optin),ro(e._zod,"optout",()=>t.out._zod.optout),ro(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Ss(e,t.in,n)):Ss(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ss(e,t.out,n)):Ss(r,t.out,n)}});function Ss(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const ks=Wr("$ZodReadonly",(e,t)=>{wi.init(e,t),ro(e._zod,"propValues",()=>t.innerType._zod.propValues),ro(e._zod,"values",()=>t.innerType._zod.values),ro(e._zod,"optin",()=>t.innerType._zod.optin),ro(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Ps):Ps(r)}});function Ps(e){return e.value=Object.freeze(e.value),e}const Rs=Wr("$ZodCustom",(e,t)=>{ii.init(e,t),wi.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(t=>xs(t,n,r,e));xs(o,n,r,e)}});function xs(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Co(e))}}class Bs{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return 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 r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}const Os=new Bs;function Ts(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...go(t)})}function $s(e,t){return new ai({check:"less_than",...go(t),value:e,inclusive:!1})}function Ls(e,t){return new ai({check:"less_than",...go(t),value:e,inclusive:!0})}function Ns(e,t){return new ui({check:"greater_than",...go(t),value:e,inclusive:!1})}function Ms(e,t){return new ui({check:"greater_than",...go(t),value:e,inclusive:!0})}function js(e,t){return new ci({check:"multiple_of",...go(t),value:e})}function Is(e,t){return new pi({check:"max_length",...go(t),maximum:e})}function Hs(e,t){return new fi({check:"min_length",...go(t),minimum:e})}function zs(e,t){return new di({check:"length_equals",...go(t),length:e})}function Us(e){return new Ei({check:"overwrite",tx:e})}const qs=Wr("ZodISODateTime",(e,t)=>{Mi.init(e,t),ha.init(e,t)});const Ks=Wr("ZodISODate",(e,t)=>{ji.init(e,t),ha.init(e,t)});const Gs=Wr("ZodISOTime",(e,t)=>{Ii.init(e,t),ha.init(e,t)});const Ws=Wr("ZodISODuration",(e,t)=>{Hi.init(e,t),ha.init(e,t)});const Zs=(e,t)=>{_o.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t){const n=t||function(e){return e.message},r={_errors:[]},o=e=>{for(const t of e.issues)if("invalid_union"===t.code&&t.errors.length)t.errors.map(e=>o({issues:e}));else if("invalid_key"===t.code)o({issues:t.issues});else if("invalid_element"===t.code)o({issues:t.issues});else if(0===t.path.length)r._errors.push(n(t));else{let e=r,o=0;for(;o<t.path.length;){const r=t.path[o];o===t.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(n(t))):e[r]=e[r]||{_errors:[]},e=e[r],o++}}};return o(e),r}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Qr,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Qr,2)}},isEmpty:{get:()=>0===e.issues.length}})},Vs=Wr("ZodError",Zs),Js=Wr("ZodError",Zs,{Parent:Error}),Ys=So(Js),Qs=ko(Js),Xs=Po(Js),ea=xo(Js),ta=(fa=Js,(e,t,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return So(fa)(e,t,r)}),na=(e=>(t,n,r)=>So(e)(t,n,r))(Js),ra=(e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ko(e)(t,n,o)})(Js),oa=(e=>async(t,n,r)=>ko(e)(t,n,r))(Js),ia=(e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Po(e)(t,n,o)})(Js),sa=(e=>(t,n,r)=>Po(e)(t,n,r))(Js),aa=(e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return xo(e)(t,n,o)})(Js),ua=(e=>async(t,n,r)=>xo(e)(t,n,r))(Js),ca=Wr("ZodType",(e,t)=>(wi.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(io(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,n)=>Do(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Ys(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Xs(e,t,n),e.parseAsync=async(t,n)=>Qs(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ea(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ta(e,t,n),e.decode=(t,n)=>na(e,t,n),e.encodeAsync=async(t,n)=>ra(e,t,n),e.decodeAsync=async(t,n)=>oa(e,t,n),e.safeEncode=(t,n)=>ia(e,t,n),e.safeDecode=(t,n)=>sa(e,t,n),e.safeEncodeAsync=async(t,n)=>aa(e,t,n),e.safeDecodeAsync=async(t,n)=>ua(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new pu({type:"custom",check:"custom",fn:t,...go(n)})}(0,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){const t=function(e){const t=new ii({check:"custom",...go(void 0)});return t._zod.check=e,t}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Co(e,n.value,t._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Co(r))}},e(n.value,n)));return t}(t)),e.overwrite=t=>e.check(Us(t)),e.optional=()=>tu(e),e.nullable=()=>ru(e),e.nullish=()=>tu(ru(e)),e.nonoptional=t=>function(e,t){return new su({type:"nonoptional",innerType:e,...go(t)})}(e,t),e.array=()=>qa(e),e.or=t=>Za([e,t]),e.and=t=>new Va({type:"intersection",left:e,right:t}),e.transform=t=>cu(e,new Xa({type:"transform",transform:t})),e.default=t=>{return n=t,new ou({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():po(n)}});var n},e.prefault=t=>{return n=t,new iu({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():po(n)}});var n},e.catch=t=>{return new au({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>cu(e,t),e.readonly=()=>new lu({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Os.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Os.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Os.get(e);const n=e.clone();return Os.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),la=Wr("_ZodString",(e,t)=>{_i.init(e,t),ca.init(e,t);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 Di({check:"string_format",format:"regex",...go(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new yi({check:"string_format",format:"includes",...go(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new bi({check:"string_format",format:"starts_with",...go(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new vi({check:"string_format",format:"ends_with",...go(t),suffix:e})}(...t)),e.min=(...t)=>e.check(Hs(...t)),e.max=(...t)=>e.check(Is(...t)),e.length=(...t)=>e.check(zs(...t)),e.nonempty=(...t)=>e.check(Hs(1,...t)),e.lowercase=t=>e.check(function(e){return new gi({check:"string_format",format:"lowercase",...go(e)})}(t)),e.uppercase=t=>e.check(function(e){return new mi({check:"string_format",format:"uppercase",...go(e)})}(t)),e.trim=()=>e.check(Us(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return Us(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(Us(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(Us(e=>e.toUpperCase()))}),pa=Wr("ZodString",(e,t)=>{_i.init(e,t),la.init(e,t),e.email=t=>e.check(function(e,t){return new Da({type:"string",format:"email",check:"string_format",abort:!1,...go(t)})}(0,t)),e.url=t=>e.check(function(e,t){return new ya({type:"string",format:"url",check:"string_format",abort:!1,...go(t)})}(0,t)),e.jwt=t=>e.check(function(e,t){return new Oa({type:"string",format:"jwt",check:"string_format",abort:!1,...go(t)})}(0,t)),e.emoji=t=>e.check(function(e,t){return new ba({type:"string",format:"emoji",check:"string_format",abort:!1,...go(t)})}(0,t)),e.guid=t=>e.check(Ts(ga,t)),e.uuid=t=>e.check(function(e,t){return new ma({type:"string",format:"uuid",check:"string_format",abort:!1,...go(t)})}(0,t)),e.uuidv4=t=>e.check(function(e,t){return new ma({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...go(t)})}(0,t)),e.uuidv6=t=>e.check(function(e,t){return new ma({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...go(t)})}(0,t)),e.uuidv7=t=>e.check(function(e,t){return new ma({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...go(t)})}(0,t)),e.nanoid=t=>e.check(function(e,t){return new va({type:"string",format:"nanoid",check:"string_format",abort:!1,...go(t)})}(0,t)),e.guid=t=>e.check(Ts(ga,t)),e.cuid=t=>e.check(function(e,t){return new Ea({type:"string",format:"cuid",check:"string_format",abort:!1,...go(t)})}(0,t)),e.cuid2=t=>e.check(function(e,t){return new Fa({type:"string",format:"cuid2",check:"string_format",abort:!1,...go(t)})}(0,t)),e.ulid=t=>e.check(function(e,t){return new Ca({type:"string",format:"ulid",check:"string_format",abort:!1,...go(t)})}(0,t)),e.base64=t=>e.check(function(e,t){return new Ra({type:"string",format:"base64",check:"string_format",abort:!1,...go(t)})}(0,t)),e.base64url=t=>e.check(function(e,t){return new xa({type:"string",format:"base64url",check:"string_format",abort:!1,...go(t)})}(0,t)),e.xid=t=>e.check(function(e,t){return new wa({type:"string",format:"xid",check:"string_format",abort:!1,...go(t)})}(0,t)),e.ksuid=t=>e.check(function(e,t){return new _a({type:"string",format:"ksuid",check:"string_format",abort:!1,...go(t)})}(0,t)),e.ipv4=t=>e.check(function(e,t){return new Aa({type:"string",format:"ipv4",check:"string_format",abort:!1,...go(t)})}(0,t)),e.ipv6=t=>e.check(function(e,t){return new Sa({type:"string",format:"ipv6",check:"string_format",abort:!1,...go(t)})}(0,t)),e.cidrv4=t=>e.check(function(e,t){return new ka({type:"string",format:"cidrv4",check:"string_format",abort:!1,...go(t)})}(0,t)),e.cidrv6=t=>e.check(function(e,t){return new Pa({type:"string",format:"cidrv6",check:"string_format",abort:!1,...go(t)})}(0,t)),e.e164=t=>e.check(function(e,t){return new Ba({type:"string",format:"e164",check:"string_format",abort:!1,...go(t)})}(0,t)),e.datetime=t=>e.check(function(e){return new qs({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...go(e)})}(t)),e.date=t=>e.check(function(e){return new Ks({type:"string",format:"date",check:"string_format",...go(e)})}(t)),e.time=t=>e.check(function(e){return new Gs({type:"string",format:"time",check:"string_format",precision:null,...go(e)})}(t)),e.duration=t=>e.check(function(e){return new Ws({type:"string",format:"duration",check:"string_format",...go(e)})}(t))});var fa;function da(e){return new pa({type:"string",...go(e)})}const ha=Wr("ZodStringFormat",(e,t)=>{Ai.init(e,t),la.init(e,t)}),Da=Wr("ZodEmail",(e,t)=>{Pi.init(e,t),ha.init(e,t)}),ga=Wr("ZodGUID",(e,t)=>{Si.init(e,t),ha.init(e,t)}),ma=Wr("ZodUUID",(e,t)=>{ki.init(e,t),ha.init(e,t)}),ya=Wr("ZodURL",(e,t)=>{Ri.init(e,t),ha.init(e,t)}),ba=Wr("ZodEmoji",(e,t)=>{xi.init(e,t),ha.init(e,t)}),va=Wr("ZodNanoID",(e,t)=>{Bi.init(e,t),ha.init(e,t)}),Ea=Wr("ZodCUID",(e,t)=>{Oi.init(e,t),ha.init(e,t)}),Fa=Wr("ZodCUID2",(e,t)=>{Ti.init(e,t),ha.init(e,t)}),Ca=Wr("ZodULID",(e,t)=>{$i.init(e,t),ha.init(e,t)}),wa=Wr("ZodXID",(e,t)=>{Li.init(e,t),ha.init(e,t)}),_a=Wr("ZodKSUID",(e,t)=>{Ni.init(e,t),ha.init(e,t)}),Aa=Wr("ZodIPv4",(e,t)=>{zi.init(e,t),ha.init(e,t)}),Sa=Wr("ZodIPv6",(e,t)=>{Ui.init(e,t),ha.init(e,t)}),ka=Wr("ZodCIDRv4",(e,t)=>{qi.init(e,t),ha.init(e,t)}),Pa=Wr("ZodCIDRv6",(e,t)=>{Ki.init(e,t),ha.init(e,t)}),Ra=Wr("ZodBase64",(e,t)=>{Wi.init(e,t),ha.init(e,t)}),xa=Wr("ZodBase64URL",(e,t)=>{Zi.init(e,t),ha.init(e,t)}),Ba=Wr("ZodE164",(e,t)=>{Vi.init(e,t),ha.init(e,t)}),Oa=Wr("ZodJWT",(e,t)=>{Ji.init(e,t),ha.init(e,t)}),Ta=Wr("ZodNumber",(e,t)=>{Yi.init(e,t),ca.init(e,t),e.gt=(t,n)=>e.check(Ns(t,n)),e.gte=(t,n)=>e.check(Ms(t,n)),e.min=(t,n)=>e.check(Ms(t,n)),e.lt=(t,n)=>e.check($s(t,n)),e.lte=(t,n)=>e.check(Ls(t,n)),e.max=(t,n)=>e.check(Ls(t,n)),e.int=t=>e.check(La(t)),e.safe=t=>e.check(La(t)),e.positive=t=>e.check(Ns(0,t)),e.nonnegative=t=>e.check(Ms(0,t)),e.negative=t=>e.check($s(0,t)),e.nonpositive=t=>e.check(Ls(0,t)),e.multipleOf=(t,n)=>e.check(js(t,n)),e.step=(t,n)=>e.check(js(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}),$a=Wr("ZodNumberFormat",(e,t)=>{Qi.init(e,t),Ta.init(e,t)});function La(e){return new $a({type:"number",check:"number_format",abort:!1,format:"safeint",...go(e)})}const Na=Wr("ZodBoolean",(e,t)=>{Xi.init(e,t),ca.init(e,t)});function Ma(e){return new Na({type:"boolean",...go(e)})}const ja=Wr("ZodUnknown",(e,t)=>{es.init(e,t),ca.init(e,t)});function Ia(){return new ja({type:"unknown"})}const Ha=Wr("ZodNever",(e,t)=>{ts.init(e,t),ca.init(e,t)});function za(e){return new Ha({type:"never",...go(e)})}const Ua=Wr("ZodArray",(e,t)=>{rs.init(e,t),ca.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(Hs(t,n)),e.nonempty=t=>e.check(Hs(1,t)),e.max=(t,n)=>e.check(Is(t,n)),e.length=(t,n)=>e.check(zs(t,n)),e.unwrap=()=>e.element});function qa(e,t){return function(e,t,n){return new Ua({type:"array",element:t,...go(n)})}(0,e,t)}const Ka=Wr("ZodObject",(e,t)=>{us.init(e,t),ca.init(e,t),ro(e,"shape",()=>t.shape),e.keyof=()=>function(e){const t=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Qa({type:"enum",entries:t,...go(void 0)})}(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ia()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ia()}),e.strict=()=>e.clone({...e._zod.def,catchall:za()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!lo(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=io(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return oo(this,"shape",n),n},checks:[]});return Do(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!lo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return oo(this,"shape",n),n},checks:e._zod.def.checks};return Do(e,n)}(e,t),e.merge=t=>function(e,t){const n=io(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return oo(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Do(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return Do(e,io(e._zod.def,{get shape(){const e={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return oo(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=io(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return oo(this,"shape",r),r},checks:[]});return Do(e,r)}(e,t),e.partial=(...t)=>function(e,t,n){const r=io(t._zod.def,{get shape(){const r=t._zod.def.shape,o={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)o[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return oo(this,"shape",o),o},checks:[]});return Do(t,r)}(eu,e,t[0]),e.required=(...t)=>function(e,t,n){const r=io(t._zod.def,{get shape(){const r=t._zod.def.shape,o={...r};if(n)for(const t in n){if(!(t in o))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)o[t]=new e({type:"nonoptional",innerType:r[t]});return oo(this,"shape",o),o},checks:[]});return Do(t,r)}(su,e,t[0])});function Ga(e,t){const n={type:"object",shape:e??{},...go(t)};return new Ka(n)}const Wa=Wr("ZodUnion",(e,t)=>{ls.init(e,t),ca.init(e,t),e.options=t.options});function Za(e,t){return new Wa({type:"union",options:e,...go(t)})}const Va=Wr("ZodIntersection",(e,t)=>{ps.init(e,t),ca.init(e,t)}),Ja=Wr("ZodRecord",(e,t)=>{hs.init(e,t),ca.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ya(e,t,n){return new Ja({type:"record",keyType:e,valueType:t,...go(n)})}const Qa=Wr("ZodEnum",(e,t)=>{Ds.init(e,t),ca.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const o={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);o[r]=t.entries[r]}return new Qa({...t,checks:[],...go(r),entries:o})},e.exclude=(e,r)=>{const o={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete o[t]}return new Qa({...t,checks:[],...go(r),entries:o})}}),Xa=Wr("ZodTransform",(e,t)=>{gs.init(e,t),ca.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Vr(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(Co(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(Co(t))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(e=>(n.value=e,n)):(n.value=o,n)}}),eu=Wr("ZodOptional",(e,t)=>{ys.init(e,t),ca.init(e,t),e.unwrap=()=>e._zod.def.innerType});function tu(e){return new eu({type:"optional",innerType:e})}const nu=Wr("ZodNullable",(e,t)=>{bs.init(e,t),ca.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ru(e){return new nu({type:"nullable",innerType:e})}const ou=Wr("ZodDefault",(e,t)=>{vs.init(e,t),ca.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),iu=Wr("ZodPrefault",(e,t)=>{Fs.init(e,t),ca.init(e,t),e.unwrap=()=>e._zod.def.innerType}),su=Wr("ZodNonOptional",(e,t)=>{Cs.init(e,t),ca.init(e,t),e.unwrap=()=>e._zod.def.innerType}),au=Wr("ZodCatch",(e,t)=>{_s.init(e,t),ca.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),uu=Wr("ZodPipe",(e,t)=>{As.init(e,t),ca.init(e,t),e.in=t.in,e.out=t.out});function cu(e,t){return new uu({type:"pipe",in:e,out:t})}const lu=Wr("ZodReadonly",(e,t)=>{ks.init(e,t),ca.init(e,t),e.unwrap=()=>e._zod.def.innerType}),pu=Wr("ZodCustom",(e,t)=>{Rs.init(e,t),ca.init(e,t)});function fu(e){return new Ta({type:"number",coerce:!0,checks:[],...go(e)})}const du=qa(da()).default([]).optional(),hu=Za([da(),qa(da())]),Du=Ya(da(),hu).optional(),gu=Ga({script:da().min(1,{message:"script must be a non-empty string"}),warnPattern:da().min(1,{message:"warnPattern must be a non-empty string"}).optional().refine(e=>"string"!=typeof e||(e=>{try{return new RegExp(e),!0}catch{return!1}})(e),{message:"warnPattern: invalid regular expression"})}).strict(),mu=Ya(da(),Za([da().min(1),gu])).default({}),yu=Za([Ma(),da(),new Ta({type:"number",checks:[],...go(undefined)})]).transform(e=>{if("boolean"==typeof e)return e;if("number"==typeof e)return 1===e;const t=String(e).trim().toLowerCase();return"1"===t||"true"===t||"0"!==t&&"false"!==t&&void 0}).optional();const bu=Ga({archive:yu,combine:yu,keep:yu,sequential:yu,live:yu,plan:yu,hangWarn:fu().int().positive().optional(),hangKill:fu().int().positive().optional(),hangKillGrace:fu().int().positive().optional(),scripts:Za([Ma(),qa(da())]).optional()}).strict().optional(),vu=Ga({file:da().optional()}).strict().optional(),Eu=Ga({stash:yu}).strict().optional(),Fu=Ga({debug:yu,boring:yu,patch:vu,run:bu,snap:Eu}).strict().optional(),Cu=Ga({stanPath:da().min(1,{message:"stanPath must be a non-empty string"}),scripts:mu,includes:du,excludes:du,imports:Du,maxUndos:fu().int().positive().optional(),devMode:yu,cliDefaults:Fu,patchOpenCommand:da().optional()}).strict(),wu=t=>{const r=(e=>{const t=ue(e);if(t)return t;const r=new Set;let o=e;for(;o;){const e=se({cwd:o});if(!e||r.has(e))break;r.add(e);const t=ue(e);if(t)return t;const i=n.dirname(e);if(i===e||r.has(i))break;o=i}return null})(t);if(!r)throw new Error("stan config not found");const o=e.readFileSync(r,"utf8"),i=r.endsWith(".json")?JSON.parse(o):Gr.parse(o);try{const e=Cu.parse(i);(e=>{if(["archive","init"].filter(t=>Object.prototype.hasOwnProperty.call(e??{},t)).length>0)throw new Error('scripts: keys "archive" and "init" not allowed')})(e.scripts??{});const t=(e=>{if(!e||"object"!=typeof e)return;const t=e,n={};for(const e of Object.keys(t)){const r=t[e];if("string"==typeof r){const t=r.trim();t&&(n[e]=[t])}else if(Array.isArray(r)){const t=r.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})(e.imports);return{stanPath:e.stanPath,scripts:e.scripts,includes:e.includes??[],excludes:e.excludes??[],imports:t,maxUndos:e.maxUndos,devMode:e.devMode,patchOpenCommand:e.patchOpenCommand??"code -g {file}",cliDefaults:e.cliDefaults}}catch(t){throw new Error((e=>e instanceof Vs?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"),"scripts"===t&&/expected\s+(record|object)/i.test(n)&&(n="scripts must be an object"),`${t}: ${n}`}).join("\n"):String(e))(t))}},_u=async({cwd:r,stanPath:o,baseName:i,includes:s,excludes:a,updateSnapshot:c="createIfMissing",includeOutputDirInDiff:l=!1,onArchiveWarnings:p})=>{const{outDir:f,diffDir:d}=await oe(r,o),h=await X(r),D=await ne(h,{cwd:r,stanPath:o,includeOutputDir:!1,includes:s??[],excludes:a??[]}),g=await(async(e,r)=>{const o={};for(const i of r){const r=n.resolve(e,i),s=await t.readFile(r),a=u.createHash("sha256").update(s).digest("hex");o[i]=a}return o})(r,D),m=(e=>n.join(e,".archive.snapshot.json"))(d),y=e.existsSync(m),b=y?JSON.parse(await t.readFile(m,"utf8")):{},v=y?D.filter(e=>!b[e]||b[e]!==g[e]):[...D],{textFiles:E,warningsBody:F}=await P(r,v),C=E,w=(F??"").trim();w&&"No archive warnings."!==w&&p?.(w);const _=n.join(f,`${i}.diff.tar`),A=await Promise.resolve().then(function(){return require("./index-ucZa1KMb-CeffVEuy.js")});if(l){const e=Array.from(new Set([...C,`${o.replace(/\\/g,"/")}/output`]));await A.create({file:_,cwd:r,filter:S(o)},e)}else if(0===C.length){const e=(e=>n.join(e,".stan_no_changes"))(d);await t.writeFile(e,"no changes","utf8");const i=[`${o.replace(/\\/g,"/")}/diff/.stan_no_changes`];await A.create({file:_,cwd:r},i)}else{const e=Array.from(new Set([...C]));await A.create({file:_,cwd:r},e)}return"replace"===c?await t.writeFile(m,JSON.stringify(g,null,2),"utf8"):"createIfMissing"!==c||y||await t.writeFile(m,JSON.stringify(g,null,2),"utf8"),{diffPath:_}};var Au,Su={},ku={},Pu={};var Ru,xu={};var Bu,Ou,Tu={},$u={};var Lu,Nu,Mu,ju,Iu,Hu,zu={};function Uu(){if(ju)return Mu;ju=1;var e=Nu?Lu:(Nu=1,Lu=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}),t={"{":"}","(":")","[":"]"},n=function(e){if("!"===e[0])return!0;for(var n=0,r=-2,o=-2,i=-2,s=-2,a=-2;n<e.length;){if("*"===e[n])return!0;if("?"===e[n+1]&&/[\].+)]/.test(e[n]))return!0;if(-1!==o&&"["===e[n]&&"]"!==e[n+1]&&(o<n&&(o=e.indexOf("]",n)),o>n)){if(-1===a||a>o)return!0;if(-1===(a=e.indexOf("\\",n))||a>o)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!==s&&"("===e[n]&&"?"===e[n+1]&&/[:!=]/.test(e[n+2])&&")"!==e[n+3]&&(s=e.indexOf(")",n))>n&&(-1===(a=e.indexOf("\\",n))||a>s))return!0;if(-1!==r&&"("===e[n]&&"|"!==e[n+1]&&(r<n&&(r=e.indexOf("|",n)),-1!==r&&")"!==e[r+1]&&(s=e.indexOf(")",r))>r&&(-1===(a=e.indexOf("\\",r))||a>s)))return!0;if("\\"===e[n]){var u=e[n+1];n+=2;var c=t[u];if(c){var l=e.indexOf(c,n);-1!==l&&(n=l+1)}if("!"===e[n])return!0}else n++}return!1},r=function(e){if("!"===e[0])return!0;for(var n=0;n<e.length;){if(/[*?{}()[\]]/.test(e[n]))return!0;if("\\"===e[n]){var r=e[n+1];n+=2;var o=t[r];if(o){var i=e.indexOf(o,n);-1!==i&&(n=i+1)}if("!"===e[n])return!0}else n++}return!1};return Mu=function(t,o){if("string"!=typeof t||""===t)return!1;if(e(t))return!0;var i=n;return o&&!1===o.strict&&(i=r),i(t)}}var qu,Ku,Gu,Wu,Zu,Vu,Ju,Yu,Qu,Xu,ec,tc,nc,rc,oc,ic,sc,ac,uc,cc={};function lc(){return qu||(qu=1,(e=cc).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,r=1,o)=>!1!==o&&!(!e.isInteger(t)||!e.isInteger(n))&&(Number(n)-Number(t))/Number(r)>=o,e.escapeNode=(e,t=0,n)=>{const r=e.nodes[t];r&&(n&&r.type===n||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.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 r=0;r<e.length;r++){const o=e[r];Array.isArray(o)?n(o):void 0!==o&&t.push(o)}return t};return n(e),t}),cc;var e}function pc(){if(Gu)return Ku;Gu=1;const e=lc();return Ku=(t,n={})=>{const r=(t,o={})=>{const i=n.escapeInvalid&&e.isInvalidBrace(o),s=!0===t.invalid&&!0===n.escapeInvalid;let a="";if(t.value)return(i||s)&&e.isOpenOrClose(t)?"\\"+t.value:t.value;if(t.value)return t.value;if(t.nodes)for(const e of t.nodes)a+=r(e);return a};return r(t)}}function fc(){if(Ju)return Vu;Ju=1;const e=Zu?Wu:(Zu=1,Wu=function(e){return"number"==typeof e?e-e===0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))}),t=(n,i,s)=>{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,...s};"boolean"==typeof a.strictZeros&&(a.relaxZeros=!1===a.strictZeros);let u=n+":"+i+"="+String(a.relaxZeros)+String(a.shorthand)+String(a.capture)+String(a.wrap);if(t.cache.hasOwnProperty(u))return t.cache[u].result;let c=Math.min(n,i),l=Math.max(n,i);if(1===Math.abs(c-l)){let e=n+"|"+i;return a.capture?`(${e})`:!1===a.wrap?e:`(?:${e})`}let f=p(n)||p(i),d={min:n,max:i,a:c,b:l},h=[],D=[];return f&&(d.isPadded=f,d.maxLen=String(d.max).length),c<0&&(D=r(l<0?Math.abs(l):1,Math.abs(c),d,a),c=d.a=0),l>=0&&(h=r(c,l,d,a)),d.negatives=D,d.positives=h,d.result=function(e,t){let n=o(e,t,"-",!1)||[],r=o(t,e,"",!1)||[],i=o(e,t,"-?",!0)||[];return n.concat(i).concat(r).join("|")}(D,h),!0===a.capture?d.result=`(${d.result})`:!1!==a.wrap&&h.length+D.length>1&&(d.result=`(?:${d.result})`),t.cache[u]=d,d.result};function n(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let r=function(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}(e,t),o=r.length,i="",s=0;for(let e=0;e<o;e++){let[t,n]=r[e];t===n?i+=t:"0"!==t||"9"!==n?i+=l(t,n):s++}return s&&(i+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:i,count:[s],digits:o}}function r(e,t,r,o){let s,l=function(e,t){let n=1,r=1,o=a(e,n),s=new Set([t]);for(;e<=o&&o<=t;)s.add(o),n+=1,o=a(e,n);for(o=u(t+1,r)-1;e<o&&o<=t;)s.add(o),r+=1,o=u(t+1,r)-1;return s=[...s],s.sort(i),s}(e,t),p=[],d=e;for(let e=0;e<l.length;e++){let t=l[e],i=n(String(d),String(t),o),a="";r.isPadded||!s||s.pattern!==i.pattern?(r.isPadded&&(a=f(t,r,o)),i.string=a+i.pattern+c(i.count),p.push(i),d=t+1,s=i):(s.count.length>1&&s.count.pop(),s.count.push(i.count[0]),s.string=s.pattern+c(s.count),d=t+1)}return p}function o(e,t,n,r,o){let i=[];for(let o of e){let{string:e}=o;r||s(t,"string",e)||i.push(n+e),r&&s(t,"string",e)&&i.push(n+e)}return i}function i(e,t){return e>t?1:t>e?-1:0}function s(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 u(e,t){return e-e%Math.pow(10,t)}function c(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 p(e){return/^-?(0+)\d/.test(e)}function f(e,t,n){if(!t.isPadded)return e;let r=Math.abs(t.maxLen-String(e).length),o=!1!==n.relaxZeros;switch(r){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${r}}`:`0{${r}}`}}return t.cache={},t.clearCache=()=>t.cache={},Vu=t}function dc(){if(Qu)return Yu;Qu=1;const e=f,t=fc(),n=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),r=e=>"number"==typeof e||"string"==typeof e&&""!==e,o=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},s=(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},u=(e,n,r,o)=>{if(r)return t(e,n,{wrap:!1,...o});let i=String.fromCharCode(e);return e===n?i:`[${i}-${String.fromCharCode(n)}]`},c=(e,n,r)=>{if(Array.isArray(e)){let t=!0===r.wrap,n=r.capture?"":"?:";return t?`(${n}${e.join("|")})`:e.join("|")}return t(e,n,r)},l=(...t)=>new RangeError("Invalid range arguments: "+e.inspect(...t)),p=(e,t,n)=>{if(!0===n.strictRanges)throw l([e,t]);return[]},d=(e,t,n=1,r={})=>{let o=Number(e),p=Number(t);if(!Number.isInteger(o)||!Number.isInteger(p)){if(!0===r.strictRanges)throw l([e,t]);return[]}0===o&&(o=0),0===p&&(p=0);let f=o>p,d=String(e),h=String(t),D=String(n);n=Math.max(Math.abs(n),1);let g=i(d)||i(h)||i(D),m=g?Math.max(d.length,h.length,D.length):0,y=!1===g&&!1===((e,t,n)=>"string"==typeof e||"string"==typeof t||!0===n.stringify)(e,t,r),b=r.transform||(e=>t=>!0===e?Number(t):String(t))(y);if(r.toRegex&&1===n)return u(a(e,m),a(t,m),!0,r);let v={negatives:[],positives:[]},E=e=>v[e<0?"negatives":"positives"].push(Math.abs(e)),F=[],C=0;for(;f?o>=p:o<=p;)!0===r.toRegex&&n>1?E(o):F.push(s(b(o,C),m,y)),o=f?o-n:o+n,C++;return!0===r.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 r,o=t.capture?"":"?:",i="",s="";return e.positives.length&&(i=e.positives.map(e=>a(String(e),n)).join("|")),e.negatives.length&&(s=`-(${o}${e.negatives.map(e=>a(String(e),n)).join("|")})`),r=i&&s?`${i}|${s}`:i||s,t.wrap?`(${o}${r})`:r})(v,r,m):c(F,null,{wrap:!1,...r}):F},h=(e,t,i,s={})=>{if(null==t&&r(e))return[e];if(!r(e)||!r(t))return p(e,t,s);if("function"==typeof i)return h(e,t,1,{transform:i});if(n(i))return h(e,t,0,i);let a={...s};return!0===a.capture&&(a.wrap=!0),i=i||a.step||1,o(i)?o(e)&&o(t)?d(e,t,i,a):((e,t,n=1,r={})=>{if(!o(e)&&e.length>1||!o(t)&&t.length>1)return p(e,t,r);let i=r.transform||(e=>String.fromCharCode(e)),s=`${e}`.charCodeAt(0),a=`${t}`.charCodeAt(0),l=s>a,f=Math.min(s,a),d=Math.max(s,a);if(r.toRegex&&1===n)return u(f,d,!1,r);let h=[],D=0;for(;l?s>=a:s<=a;)h.push(i(s,D)),s=l?s-n:s+n,D++;return!0===r.toRegex?c(h,null,{wrap:!1,options:r}):h})(e,t,Math.max(Math.abs(i),1),a):null==i||n(i)?h(e,t,1,i):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(i,a)};return Yu=h}function hc(){if(uc)return ac;uc=1;const e=pc(),t=function(){if(ec)return Xu;ec=1;const e=dc(),t=lc();return Xu=(n,r={})=>{const o=(n,i={})=>{const s=t.isInvalidBrace(i),a=!0===n.invalid&&!0===r.escapeInvalid,u=!0===s||!0===a,c=!0===r.escapeInvalid?"\\":"";let l="";if(!0===n.isOpen)return c+n.value;if(!0===n.isClose)return console.log("node.isClose",c,n.value),c+n.value;if("open"===n.type)return u?c+n.value:"(";if("close"===n.type)return u?c+n.value:")";if("comma"===n.type)return"comma"===n.prev.type?"":u?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){const o=t.reduce(n.nodes),i=e(...o,{...r,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==i.length)return o.length>1&&i.length>1?`(${i})`:i}if(n.nodes)for(const e of n.nodes)l+=o(e,n);return l};return o(n)}}(),n=function(){if(nc)return tc;nc=1;const e=dc(),t=pc(),n=lc(),r=(e="",t="",o=!1)=>{const i=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return o?n.flatten(t).map(e=>`{${e}}`):t;for(const n of e)if(Array.isArray(n))for(const e of n)i.push(r(e,t,o));else for(let e of t)!0===o&&"string"==typeof e&&(e=`{${e}}`),i.push(Array.isArray(e)?r(n,e,o):n+e);return n.flatten(i)};return tc=(o,i={})=>{const s=void 0===i.rangeLimit?1e3:i.rangeLimit,a=(o,u={})=>{o.queue=[];let c=u,l=u.queue;for(;"brace"!==c.type&&"root"!==c.type&&c.parent;)c=c.parent,l=c.queue;if(o.invalid||o.dollar)return void l.push(r(l.pop(),t(o,i)));if("brace"===o.type&&!0!==o.invalid&&2===o.nodes.length)return void l.push(r(l.pop(),["{}"]));if(o.nodes&&o.ranges>0){const a=n.reduce(o.nodes);if(n.exceedsLimit(...a,i.step,s))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let u=e(...a,i);return 0===u.length&&(u=t(o,i)),l.push(r(l.pop(),u)),void(o.nodes=[])}const p=n.encloseBrace(o);let f=o.queue,d=o;for(;"brace"!==d.type&&"root"!==d.type&&d.parent;)d=d.parent,f=d.queue;for(let e=0;e<o.nodes.length;e++){const t=o.nodes[e];"comma"!==t.type||"brace"!==o.type?"close"!==t.type?t.value&&"open"!==t.type?f.push(r(f.pop(),t.value)):t.nodes&&a(t,o):l.push(r(l.pop(),f,p)):(1===e&&f.push(""),f.push(""))}return f};return n.flatten(a(o))},tc}(),r=function(){if(sc)return ic;sc=1;const e=pc(),{MAX_LENGTH:t,CHAR_BACKSLASH:n,CHAR_BACKTICK:r,CHAR_COMMA:o,CHAR_DOT:i,CHAR_LEFT_PARENTHESES:s,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_RIGHT_CURLY_BRACE:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:f,CHAR_SINGLE_QUOTE:d,CHAR_NO_BREAK_SPACE:h,CHAR_ZERO_WIDTH_NOBREAK_SPACE:D}=oc?rc:(oc=1,rc={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 ic=(g,m={})=>{if("string"!=typeof g)throw new TypeError("Expected a string");const y=m||{},b="number"==typeof y.maxLength?Math.min(t,y.maxLength):t;if(g.length>b)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${b})`);const v={type:"root",input:g,nodes:[]},E=[v];let F=v,C=v,w=0;const _=g.length;let A,S=0,k=0;const P=()=>g[S++],R=e=>{if("text"===e.type&&"dot"===C.type&&(C.type="text"),!C||"text"!==C.type||"text"!==e.type)return F.nodes.push(e),e.parent=F,e.prev=C,C=e,e;C.value+=e.value};for(R({type:"bos"});S<_;)if(F=E[E.length-1],A=P(),A!==D&&A!==h)if(A!==n)if(A!==p){if(A===l){let e;for(w++;S<_&&(e=P());)if(A+=e,e!==l)if(e!==n){if(e===p&&(w--,0===w))break}else A+=P();else w++;R({type:"text",value:A});continue}if(A!==s)if(A!==a){if(A===f||A===d||A===r){const e=A;let t;for(!0!==m.keepQuotes&&(A="");S<_&&(t=P());)if(t!==n){if(t===e){!0===m.keepQuotes&&(A+=t);break}A+=t}else A+=t+P();R({type:"text",value:A});continue}if(A===u){k++;const e=C.value&&"$"===C.value.slice(-1)||!0===F.dollar;F=R({type:"brace",open:!0,close:!1,dollar:e,depth:k,commas:0,ranges:0,nodes:[]}),E.push(F),R({type:"open",value:A});continue}if(A===c){if("brace"!==F.type){R({type:"text",value:A});continue}const e="close";F=E.pop(),F.close=!0,R({type:e,value:A}),k--,F=E[E.length-1];continue}if(A===o&&k>0){if(F.ranges>0){F.ranges=0;const t=F.nodes.shift();F.nodes=[t,{type:"text",value:e(F)}]}R({type:"comma",value:A}),F.commas++}else{if(A===i&&k>0&&0===F.commas){const e=F.nodes;if(0===k||0===e.length){R({type:"text",value:A});continue}if("dot"===C.type){if(F.range=[],C.value+=A,C.type="range",3!==F.nodes.length&&5!==F.nodes.length){F.invalid=!0,F.ranges=0,C.type="text";continue}F.ranges++,F.args=[];continue}if("range"===C.type){e.pop();const t=e[e.length-1];t.value+=C.value+A,C=t,F.ranges--;continue}R({type:"dot",value:A});continue}R({type:"text",value:A})}}else{if("paren"!==F.type){R({type:"text",value:A});continue}F=E.pop(),R({type:"text",value:A}),F=E[E.length-1]}else F=R({type:"paren",nodes:[]}),E.push(F),R({type:"text",value:A})}else R({type:"text",value:"\\"+A});else R({type:"text",value:(m.keepEscaping?A:"")+P()});do{if(F=E.pop(),"root"!==F.type){F.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=E[E.length-1],t=e.nodes.indexOf(F);e.nodes.splice(t,1,...F.nodes)}}while(E.length>0);return R({type:"eos"}),v},ic}(),o=(e,t={})=>{let n=[];if(Array.isArray(e))for(const r of e){const e=o.create(r,t);Array.isArray(e)?n.push(...e):n.push(e)}else n=[].concat(o.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(n=[...new Set(n)]),n};return o.parse=(e,t={})=>r(e,t),o.stringify=(t,n={})=>e("string"==typeof t?o.parse(t,n):t,n),o.compile=(e,n={})=>("string"==typeof e&&(e=o.parse(e,n)),t(e,n)),o.expand=(e,t={})=>{"string"==typeof e&&(e=o.parse(e,t));let r=n(e,t);return!0===t.noempty&&(r=r.filter(Boolean)),!0===t.nodupes&&(r=[...new Set(r)]),r},o.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?o.compile(e,t):o.expand(e,t),ac=o}var Dc,gc,mc,yc,bc,vc,Ec,Fc,Cc,wc,_c,Ac,Sc,kc,Pc={};function Rc(){if(gc)return Dc;gc=1;const e=p,t="\\\\/",n=`[^${t}]`,r="\\.",o="\\/",i="[^/]",s=`(?:${o}|$)`,a=`(?:^|${o})`,u=`${r}{1,2}${s}`,c={DOT_LITERAL:r,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:o,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:s,DOTS_SLASH:u,NO_DOT:`(?!${r})`,NO_DOTS:`(?!${a}${u})`,NO_DOT_SLASH:`(?!${r}{0,1}${s})`,NO_DOTS_SLASH:`(?!${u})`,QMARK_NO_DOT:`[^.${o}]`,STAR:`${i}*?`,START_ANCHOR:a},l={...c,SLASH_LITERAL:`[${t}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${r}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[${t}])${r}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`};return Dc={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:c}}function xc(){return mc||(mc=1,function(e){const t=p,n="win32"===process.platform,{REGEX_BACKSLASH:r,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:s}=Rc();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(s,"\\$1"),e.toPosixSlashes=e=>e.replace(r,"/"),e.removeBackslashes=e=>e.replace(o,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,r)=>{const o=t.lastIndexOf(n,r);return-1===o?t:"\\"===t[o-1]?e.escapeLast(t,n,o-1):`${t.slice(0,o)}\\${t.slice(o)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r}}(Pc)),Pc}function Bc(){return _c?wc:(_c=1,wc=function(){if(Cc)return Fc;Cc=1;const e=p,t=function(){if(bc)return yc;bc=1;const e=xc(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:o,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:s,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:p,CHAR_QUESTION_MARK:f,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:h,CHAR_RIGHT_SQUARE_BRACKET:D}=Rc(),g=e=>e===a||e===r,m=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return yc=(y,b)=>{const v=b||{},E=y.length-1,F=!0===v.parts||!0===v.scanToEnd,C=[],w=[],_=[];let A,S,k=y,P=-1,R=0,x=0,B=!1,O=!1,T=!1,$=!1,L=!1,N=!1,M=!1,j=!1,I=!1,H=!1,z=0,U={value:"",depth:0,isGlob:!1};const q=()=>P>=E,K=()=>k.charCodeAt(P+1),G=()=>(A=S,k.charCodeAt(++P));for(;P<E;){let e;if(S=G(),S!==r){if(!0===N||S===u){for(z++;!0!==q()&&(S=G());)if(S!==r)if(S!==u){if(!0!==N&&S===i&&(S=G())===i){if(B=U.isBrace=!0,T=U.isGlob=!0,H=!0,!0===F)continue;break}if(!0!==N&&S===o){if(B=U.isBrace=!0,T=U.isGlob=!0,H=!0,!0===F)continue;break}if(S===d&&(z--,0===z)){N=!1,B=U.isBrace=!0,H=!0;break}}else z++;else M=U.backslashes=!0,G();if(!0===F)continue;break}if(S!==a){if(!0!==v.noext&&1==(S===p||S===n||S===t||S===f||S===s)&&K()===c){if(T=U.isGlob=!0,$=U.isExtglob=!0,H=!0,S===s&&P===R&&(I=!0),!0===F){for(;!0!==q()&&(S=G());)if(S!==r){if(S===h){T=U.isGlob=!0,H=!0;break}}else M=U.backslashes=!0,S=G();continue}break}if(S===t){if(A===t&&(L=U.isGlobstar=!0),T=U.isGlob=!0,H=!0,!0===F)continue;break}if(S===f){if(T=U.isGlob=!0,H=!0,!0===F)continue;break}if(S===l){for(;!0!==q()&&(e=G());)if(e!==r){if(e===D){O=U.isBracket=!0,T=U.isGlob=!0,H=!0;break}}else M=U.backslashes=!0,G();if(!0===F)continue;break}if(!0===v.nonegate||S!==s||P!==R){if(!0!==v.noparen&&S===c){if(T=U.isGlob=!0,!0===F){for(;!0!==q()&&(S=G());)if(S!==c){if(S===h){H=!0;break}}else M=U.backslashes=!0,S=G();continue}break}if(!0===T){if(H=!0,!0===F)continue;break}}else j=U.negated=!0,R++}else{if(C.push(P),w.push(U),U={value:"",depth:0,isGlob:!1},!0===H)continue;if(A===i&&P===R+1){R+=2;continue}x=P+1}}else M=U.backslashes=!0,S=G(),S===u&&(N=!0)}!0===v.noext&&($=!1,T=!1);let W=k,Z="",V="";R>0&&(Z=k.slice(0,R),k=k.slice(R),x-=R),W&&!0===T&&x>0?(W=k.slice(0,x),V=k.slice(x)):!0===T?(W="",V=k):W=k,W&&""!==W&&"/"!==W&&W!==k&&g(W.charCodeAt(W.length-1))&&(W=W.slice(0,-1)),!0===v.unescape&&(V&&(V=e.removeBackslashes(V)),W&&!0===M&&(W=e.removeBackslashes(W)));const J={prefix:Z,input:y,start:R,base:W,glob:V,isBrace:B,isBracket:O,isGlob:T,isExtglob:$,isGlobstar:L,negated:j,negatedExtglob:I};if(!0===v.tokens&&(J.maxDepth=0,g(S)||w.push(U),J.tokens=w),!0===v.parts||!0===v.tokens){let e;for(let t=0;t<C.length;t++){const n=e?e+1:R,r=C[t],o=y.slice(n,r);v.tokens&&(0===t&&0!==R?(w[t].isPrefix=!0,w[t].value=Z):w[t].value=o,m(w[t]),J.maxDepth+=w[t].depth),0===t&&""===o||_.push(o),e=r}if(e&&e+1<y.length){const t=y.slice(e+1);_.push(t),v.tokens&&(w[w.length-1].value=t,m(w[w.length-1]),J.maxDepth+=w[w.length-1].depth)}J.slashes=C,J.parts=_}return J},yc}(),n=function(){if(Ec)return vc;Ec=1;const e=Rc(),t=xc(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:s}=e,a=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return r},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,c=(l,p)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=s[l]||l;const f={...p},d="number"==typeof f.maxLength?Math.min(n,f.maxLength):n;let h=l.length;if(h>d)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${d}`);const D={type:"bos",value:"",output:f.prepend||""},g=[D],m=f.capture?"":"?:",y=t.isWindows(p),b=e.globChars(y),v=e.extglobChars(b),{DOT_LITERAL:E,PLUS_LITERAL:F,SLASH_LITERAL:C,ONE_CHAR:w,DOTS_SLASH:_,NO_DOT:A,NO_DOT_SLASH:S,NO_DOTS_SLASH:k,QMARK:P,QMARK_NO_DOT:R,STAR:x,START_ANCHOR:B}=b,O=e=>`(${m}(?:(?!${B}${e.dot?_:E}).)*?)`,T=f.dot?"":A,$=f.dot?P:R;let L=!0===f.bash?O(f):x;f.capture&&(L=`(${L})`),"boolean"==typeof f.noext&&(f.noextglob=f.noext);const N={input:l,index:-1,start:0,dot:!0===f.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};l=t.removePrefix(l,N),h=l.length;const M=[],j=[],I=[];let H,z=D;const U=()=>N.index===h-1,q=N.peek=(e=1)=>l[N.index+e],K=N.advance=()=>l[++N.index]||"",G=()=>l.slice(N.index+1),W=(e="",t=0)=>{N.consumed+=e,N.index+=t},Z=e=>{N.output+=null!=e.output?e.output:e.value,W(e.value)},V=()=>{let e=1;for(;"!"===q()&&("("!==q(2)||"?"===q(3));)K(),N.start++,e++;return e%2!=0&&(N.negated=!0,N.start++,!0)},J=e=>{N[e]++,I.push(e)},Y=e=>{N[e]--,I.pop()},Q=e=>{if("globstar"===z.type){const t=N.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||M.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(N.output=N.output.slice(0,-z.output.length),z.type="star",z.value="*",z.output=L,N.output+=z.output)}if(M.length&&"paren"!==e.type&&(M[M.length-1].inner+=e.value),(e.value||e.output)&&Z(e),z&&"text"===z.type&&"text"===e.type)return z.value+=e.value,void(z.output=(z.output||"")+e.value);e.prev=z,g.push(e),z=e},X=(e,t)=>{const n={...v[t],conditions:1,inner:""};n.prev=z,n.parens=N.parens,n.output=N.output;const r=(f.capture?"(":"")+n.open;J("parens"),Q({type:e,value:t,output:N.output?"":w}),Q({type:"paren",extglob:!0,value:K(),output:r}),M.push(n)},ee=e=>{let t,n=e.close+(f.capture?")":"");if("negate"===e.type){let r=L;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=O(f)),(r!==L||U()||/^\)+$/.test(G()))&&(n=e.close=`)$))${r}`),e.inner.includes("*")&&(t=G())&&/^\.[^\\/.]+$/.test(t)){const o=c(t,{...p,fastpaths:!1}).output;n=e.close=`)${o})${r})`}"bos"===e.prev.type&&(N.negatedExtglob=!0)}Q({type:"paren",extglob:!0,value:H,output:n}),Y("parens")};if(!1!==f.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,n=l.replace(i,(t,n,r,o,i,s)=>"\\"===o?(e=!0,t):"?"===o?n?n+o+(i?P.repeat(i.length):""):0===s?$+(i?P.repeat(i.length):""):P.repeat(r.length):"."===o?E.repeat(r.length):"*"===o?n?n+o+(i?L:""):L:n?t:`\\${t}`);return!0===e&&(n=!0===f.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===l&&!0===f.contains?(N.output=l,N):(N.output=t.wrapOutput(n,N,p),N)}for(;!U();){if(H=K(),"\0"===H)continue;if("\\"===H){const e=q();if("/"===e&&!0!==f.bash)continue;if("."===e||";"===e)continue;if(!e){H+="\\",Q({type:"text",value:H});continue}const t=/^\\+/.exec(G());let n=0;if(t&&t[0].length>2&&(n=t[0].length,N.index+=n,n%2!=0&&(H+="\\")),!0===f.unescape?H=K():H+=K(),0===N.brackets){Q({type:"text",value:H});continue}}if(N.brackets>0&&("]"!==H||"["===z.value||"[^"===z.value)){if(!1!==f.posix&&":"===H){const e=z.value.slice(1);if(e.includes("[")&&(z.posix=!0,e.includes(":"))){const e=z.value.lastIndexOf("["),t=z.value.slice(0,e),n=z.value.slice(e+2),o=r[n];if(o){z.value=t+o,N.backtrack=!0,K(),D.output||1!==g.indexOf(z)||(D.output=w);continue}}}("["===H&&":"!==q()||"-"===H&&"]"===q())&&(H=`\\${H}`),"]"!==H||"["!==z.value&&"[^"!==z.value||(H=`\\${H}`),!0===f.posix&&"!"===H&&"["===z.value&&(H="^"),z.value+=H,Z({value:H});continue}if(1===N.quotes&&'"'!==H){H=t.escapeRegex(H),z.value+=H,Z({value:H});continue}if('"'===H){N.quotes=1===N.quotes?0:1,!0===f.keepQuotes&&Q({type:"text",value:H});continue}if("("===H){J("parens"),Q({type:"paren",value:H});continue}if(")"===H){if(0===N.parens&&!0===f.strictBrackets)throw new SyntaxError(u("opening","("));const e=M[M.length-1];if(e&&N.parens===e.parens+1){ee(M.pop());continue}Q({type:"paren",value:H,output:N.parens?")":"\\)"}),Y("parens");continue}if("["===H){if(!0!==f.nobracket&&G().includes("]"))J("brackets");else{if(!0!==f.nobracket&&!0===f.strictBrackets)throw new SyntaxError(u("closing","]"));H=`\\${H}`}Q({type:"bracket",value:H});continue}if("]"===H){if(!0===f.nobracket||z&&"bracket"===z.type&&1===z.value.length){Q({type:"text",value:H,output:`\\${H}`});continue}if(0===N.brackets){if(!0===f.strictBrackets)throw new SyntaxError(u("opening","["));Q({type:"text",value:H,output:`\\${H}`});continue}Y("brackets");const e=z.value.slice(1);if(!0===z.posix||"^"!==e[0]||e.includes("/")||(H=`/${H}`),z.value+=H,Z({value:H}),!1===f.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(z.value);if(N.output=N.output.slice(0,-z.value.length),!0===f.literalBrackets){N.output+=n,z.value=n;continue}z.value=`(${m}${n}|${z.value})`,N.output+=z.value;continue}if("{"===H&&!0!==f.nobrace){J("braces");const e={type:"brace",value:H,output:"(",outputIndex:N.output.length,tokensIndex:N.tokens.length};j.push(e),Q(e);continue}if("}"===H){const e=j[j.length-1];if(!0===f.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,f),N.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=N.output.slice(0,e.outputIndex),r=N.tokens.slice(e.tokensIndex);e.value=e.output="\\{",H=t="\\}",N.output=n;for(const e of r)N.output+=e.output||e.value}Q({type:"brace",value:H,output:t}),Y("braces"),j.pop();continue}if("|"===H){M.length>0&&M[M.length-1].conditions++,Q({type:"text",value:H});continue}if(","===H){let e=H;const t=j[j.length-1];t&&"braces"===I[I.length-1]&&(t.comma=!0,e="|"),Q({type:"comma",value:H,output:e});continue}if("/"===H){if("dot"===z.type&&N.index===N.start+1){N.start=N.index+1,N.consumed="",N.output="",g.pop(),z=D;continue}Q({type:"slash",value:H,output:C});continue}if("."===H){if(N.braces>0&&"dot"===z.type){"."===z.value&&(z.output=E);const e=j[j.length-1];z.type="dots",z.output+=H,z.value+=H,e.dots=!0;continue}if(N.braces+N.parens===0&&"bos"!==z.type&&"slash"!==z.type){Q({type:"text",value:H,output:E});continue}Q({type:"dot",value:H,output:E});continue}if("?"===H){if((!z||"("!==z.value)&&!0!==f.noextglob&&"("===q()&&"?"!==q(2)){X("qmark",H);continue}if(z&&"paren"===z.type){const e=q();let n=H;if("<"===e&&!t.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===z.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(G()))&&(n=`\\${H}`),Q({type:"text",value:H,output:n});continue}if(!0!==f.dot&&("slash"===z.type||"bos"===z.type)){Q({type:"qmark",value:H,output:R});continue}Q({type:"qmark",value:H,output:P});continue}if("!"===H){if(!0!==f.noextglob&&"("===q()&&("?"!==q(2)||!/[!=<:]/.test(q(3)))){X("negate",H);continue}if(!0!==f.nonegate&&0===N.index){V();continue}}if("+"===H){if(!0!==f.noextglob&&"("===q()&&"?"!==q(2)){X("plus",H);continue}if(z&&"("===z.value||!1===f.regex){Q({type:"plus",value:H,output:F});continue}if(z&&("bracket"===z.type||"paren"===z.type||"brace"===z.type)||N.parens>0){Q({type:"plus",value:H});continue}Q({type:"plus",value:F});continue}if("@"===H){if(!0!==f.noextglob&&"("===q()&&"?"!==q(2)){Q({type:"at",extglob:!0,value:H,output:""});continue}Q({type:"text",value:H});continue}if("*"!==H){"$"!==H&&"^"!==H||(H=`\\${H}`);const e=o.exec(G());e&&(H+=e[0],N.index+=e[0].length),Q({type:"text",value:H});continue}if(z&&("globstar"===z.type||!0===z.star)){z.type="star",z.star=!0,z.value+=H,z.output=L,N.backtrack=!0,N.globstar=!0,W(H);continue}let e=G();if(!0!==f.noextglob&&/^\([^?]/.test(e)){X("star",H);continue}if("star"===z.type){if(!0===f.noglobstar){W(H);continue}const t=z.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,o=n&&("star"===n.type||"globstar"===n.type);if(!0===f.bash&&(!r||e[0]&&"/"!==e[0])){Q({type:"star",value:H,output:""});continue}const i=N.braces>0&&("comma"===t.type||"brace"===t.type),s=M.length&&("pipe"===t.type||"paren"===t.type);if(!r&&"paren"!==t.type&&!i&&!s){Q({type:"star",value:H,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[N.index+4];if(t&&"/"!==t)break;e=e.slice(3),W("/**",3)}if("bos"===t.type&&U()){z.type="globstar",z.value+=H,z.output=O(f),N.output=z.output,N.globstar=!0,W(H);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!o&&U()){N.output=N.output.slice(0,-(t.output+z.output).length),t.output=`(?:${t.output}`,z.type="globstar",z.output=O(f)+(f.strictSlashes?")":"|$)"),z.value+=H,N.globstar=!0,N.output+=t.output+z.output,W(H);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";N.output=N.output.slice(0,-(t.output+z.output).length),t.output=`(?:${t.output}`,z.type="globstar",z.output=`${O(f)}${C}|${C}${n})`,z.value+=H,N.output+=t.output+z.output,N.globstar=!0,W(H+K()),Q({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){z.type="globstar",z.value+=H,z.output=`(?:^|${C}|${O(f)}${C})`,N.output=z.output,N.globstar=!0,W(H+K()),Q({type:"slash",value:"/",output:""});continue}N.output=N.output.slice(0,-z.output.length),z.type="globstar",z.output=O(f),z.value+=H,N.output+=z.output,N.globstar=!0,W(H);continue}const n={type:"star",value:H,output:L};!0!==f.bash?!z||"bracket"!==z.type&&"paren"!==z.type||!0!==f.regex?(N.index!==N.start&&"slash"!==z.type&&"dot"!==z.type||("dot"===z.type?(N.output+=S,z.output+=S):!0===f.dot?(N.output+=k,z.output+=k):(N.output+=T,z.output+=T),"*"!==q()&&(N.output+=w,z.output+=w)),Q(n)):(n.output=H,Q(n)):(n.output=".*?","bos"!==z.type&&"slash"!==z.type||(n.output=T+n.output),Q(n))}for(;N.brackets>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing","]"));N.output=t.escapeLast(N.output,"["),Y("brackets")}for(;N.parens>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing",")"));N.output=t.escapeLast(N.output,"("),Y("parens")}for(;N.braces>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing","}"));N.output=t.escapeLast(N.output,"{"),Y("braces")}if(!0===f.strictSlashes||"star"!==z.type&&"bracket"!==z.type||Q({type:"maybe_slash",value:"",output:`${C}?`}),!0===N.backtrack){N.output="";for(const e of N.tokens)N.output+=null!=e.output?e.output:e.value,e.suffix&&(N.output+=e.suffix)}return N};return c.fastpaths=(r,o)=>{const i={...o},a="number"==typeof i.maxLength?Math.min(n,i.maxLength):n,u=r.length;if(u>a)throw new SyntaxError(`Input length: ${u}, exceeds maximum allowed length: ${a}`);r=s[r]||r;const c=t.isWindows(o),{DOT_LITERAL:l,SLASH_LITERAL:p,ONE_CHAR:f,DOTS_SLASH:d,NO_DOT:h,NO_DOTS:D,NO_DOTS_SLASH:g,STAR:m,START_ANCHOR:y}=e.globChars(c),b=i.dot?D:h,v=i.dot?g:h,E=i.capture?"":"?:";let F=!0===i.bash?".*?":m;i.capture&&(F=`(${F})`);const C=e=>!0===e.noglobstar?F:`(${E}(?:(?!${y}${e.dot?d:l}).)*?)`,w=e=>{switch(e){case"*":return`${b}${f}${F}`;case".*":return`${l}${f}${F}`;case"*.*":return`${b}${F}${l}${f}${F}`;case"*/*":return`${b}${F}${p}${f}${v}${F}`;case"**":return b+C(i);case"**/*":return`(?:${b}${C(i)}${p})?${v}${f}${F}`;case"**/*.*":return`(?:${b}${C(i)}${p})?${v}${F}${l}${f}${F}`;case"**/.*":return`(?:${b}${C(i)}${p})?${l}${f}${F}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=w(t[1]);if(!n)return;return n+l+t[2]}}},_=t.removePrefix(r,{negated:!1,prefix:""});let A=w(_);return A&&!0!==i.strictSlashes&&(A+=`${p}?`),A},vc=c}(),r=xc(),o=Rc(),i=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map(e=>i(e,t,n)),o=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return o}const o=(s=e)&&"object"==typeof s&&!Array.isArray(s)&&e.tokens&&e.input;var s;if(""===e||"string"!=typeof e&&!o)throw new TypeError("Expected pattern to be a non-empty string");const a=t||{},u=r.isWindows(t),c=o?i.compileRe(e,t):i.makeRe(e,t,!1,!0),l=c.state;delete c.state;let p=()=>!1;if(a.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};p=i(a.ignore,e,n)}const f=(n,r=!1)=>{const{isMatch:o,match:s,output:f}=i.test(n,c,t,{glob:e,posix:u}),d={glob:e,state:l,regex:c,posix:u,input:n,output:f,match:s,isMatch:o};return"function"==typeof a.onResult&&a.onResult(d),!1===o?(d.isMatch=!1,!!r&&d):p(n)?("function"==typeof a.onIgnore&&a.onIgnore(d),d.isMatch=!1,!!r&&d):("function"==typeof a.onMatch&&a.onMatch(d),!r||d)};return n&&(f.state=l),f};return i.test=(e,t,n,{glob:o,posix:s}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=n||{},u=a.format||(s?r.toPosixSlashes:null);let c=e===o,l=c&&u?u(e):e;return!1===c&&(l=u?u(e):e,c=l===o),!1!==c&&!0!==a.capture||(c=!0===a.matchBase||!0===a.basename?i.matchBase(e,t,n,s):t.exec(l)),{isMatch:Boolean(c),match:c,output:l}},i.matchBase=(t,n,o,s=r.isWindows(o))=>(n instanceof RegExp?n:i.makeRe(n,o)).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,r=!1)=>{if(!0===n)return e.output;const o=t||{},s=o.contains?"":"^",a=o.contains?"":"$";let u=`${s}(?:${e.output})${a}`;e&&!0===e.negated&&(u=`^(?!${u}).*$`);const c=i.toRegex(u,t);return!0===r&&(c.state=e),c},i.makeRe=(e,t={},r=!1,o=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(s.output=n.fastpaths(e,t)),s.output||(s=n(e,t)),i.compileRe(s,t,r,o)},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=o,Fc=i}())}var Oc,Tc,$c,Lc={};function Nc(){if(Tc)return Oc;Tc=1;const e=d.PassThrough,t=Array.prototype.slice;function n(t,r){if(Array.isArray(t))for(let e=0,o=t.length;e<o;e++)t[e]=n(t[e],r);else{if(!t._readableState&&t.pipe&&(t=t.pipe(e(r))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}return Oc=function(){const r=[],o=t.call(arguments);let i=!1,s=o[o.length-1];s&&!Array.isArray(s)&&null==s.pipe?o.pop():s={};const a=!1!==s.end,u=!0===s.pipeError;null==s.objectMode&&(s.objectMode=!0),null==s.highWaterMark&&(s.highWaterMark=65536);const c=e(s);function l(){for(let e=0,t=arguments.length;e<t;e++)r.push(n(arguments[e],s));return p(),this}function p(){if(i)return;i=!0;let e=r.shift();if(!e)return void process.nextTick(f);Array.isArray(e)||(e=[e]);let t=e.length+1;function n(){--t>0||(i=!1,p())}function o(e){function t(){e.removeListener("merge2UnpipeEnd",t),e.removeListener("end",t),u&&e.removeListener("error",r),n()}function r(e){c.emit("error",e)}if(e._readableState.endEmitted)return n();e.on("merge2UnpipeEnd",t),e.on("end",t),u&&e.on("error",r),e.pipe(c,{end:!1}),e.resume()}for(let t=0;t<e.length;t++)o(e[t]);n()}function f(){i=!1,c.emit("queueDrain"),a&&c.end()}return c.setMaxListeners(0),c.add=l,c.on("unpipe",function(e){e.emit("merge2UnpipeEnd")}),o.length&&l.apply(null,o),c},Oc}var Mc,jc,Ic,Hc={};function zc(){if(jc)return ku;jc=1,Object.defineProperty(ku,"__esModule",{value:!0}),ku.string=ku.stream=ku.pattern=ku.path=ku.fs=ku.errno=ku.array=void 0;const e=(Au||(Au=1,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.splitWhen=Pu.flatten=void 0,Pu.flatten=function(e){return e.reduce((e,t)=>[].concat(e,t),[])},Pu.splitWhen=function(e,t){const n=[[]];let r=0;for(const o of e)t(o)?(r++,n[r]=[]):n[r].push(o);return n}),Pu);ku.array=e;const t=(Ru||(Ru=1,Object.defineProperty(xu,"__esModule",{value:!0}),xu.isEnoentCodeError=void 0,xu.isEnoentCodeError=function(e){return"ENOENT"===e.code}),xu);ku.errno=t;const n=function(){if(Bu)return Tu;Bu=1,Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.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 Tu.createDirentFromStats=function(t,n){return new e(t,n)},Tu}();ku.fs=n;const r=function(){if(Ou)return $u;Ou=1,Object.defineProperty($u,"__esModule",{value:!0}),$u.convertPosixPathToPattern=$u.convertWindowsPathToPattern=$u.convertPathToPattern=$u.escapePosixPath=$u.escapeWindowsPath=$u.escape=$u.removeLeadingDotSegment=$u.makeAbsolute=$u.unixify=void 0;const e=p,t="win32"===l.platform(),n=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,r=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,o=/^\\\\([.?])/,i=/\\(?![!()+@[\]{}])/g;function s(e){return e.replace(r,"\\$2")}function a(e){return e.replace(n,"\\$2")}function u(e){return s(e).replace(o,"//$1").replace(i,"/")}function c(e){return a(e)}return $u.unixify=function(e){return e.replace(/\\/g,"/")},$u.makeAbsolute=function(t,n){return e.resolve(t,n)},$u.removeLeadingDotSegment=function(e){if("."===e.charAt(0)){const t=e.charAt(1);if("/"===t||"\\"===t)return e.slice(2)}return e},$u.escape=t?s:a,$u.escapeWindowsPath=s,$u.escapePosixPath=a,$u.convertPathToPattern=t?u:c,$u.convertWindowsPathToPattern=u,$u.convertPosixPathToPattern=c,$u}();ku.path=r;const o=function(){if(kc)return zu;kc=1,Object.defineProperty(zu,"__esModule",{value:!0}),zu.isAbsolute=zu.partitionAbsoluteAndRelative=zu.removeDuplicateSlashes=zu.matchAny=zu.convertPatternsToRe=zu.makeRe=zu.getPatternParts=zu.expandBraceExpansion=zu.expandPatternsWithBraceExpansion=zu.isAffectDepthOfReadingPattern=zu.endsWithSlashGlobStar=zu.hasGlobStar=zu.getBaseDirectory=zu.isPatternRelatedToParentDirectory=zu.getPatternsOutsideCurrentDirectory=zu.getPatternsInsideCurrentDirectory=zu.getPositivePatterns=zu.getNegativePatterns=zu.isPositivePattern=zu.isNegativePattern=zu.convertToNegativePattern=zu.convertToPositivePattern=zu.isDynamicPattern=zu.isStaticPattern=void 0;const e=p,t=function(){if(Hu)return Iu;Hu=1;var e=Uu(),t=p.posix.dirname,n="win32"===l.platform(),r=/\\/g,o=/[\{\[].*[\}\]]$/,i=/(^|[^\\])([\{\[]|\([^\)]+$)/,s=/\\([\!\*\?\|\[\]\(\)\{\}])/g;return Iu=function(a,u){Object.assign({flipBackslashes:!0},u).flipBackslashes&&n&&a.indexOf("/")<0&&(a=a.replace(r,"/")),o.test(a)&&(a+="/"),a+="a";do{a=t(a)}while(e(a)||i.test(a));return a.replace(s,"$1")}}(),n=function(){if(Sc)return Ac;Sc=1;const e=f,t=hc(),n=Bc(),r=xc(),o=e=>""===e||"./"===e,i=e=>{const t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},s=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let o=new Set,i=new Set,s=new Set,a=0,u=e=>{s.add(e.output),r&&r.onResult&&r.onResult(e)};for(let s=0;s<t.length;s++){let c=n(String(t[s]),{...r,onResult:u},!0),l=c.state.negated||c.state.negatedExtglob;l&&a++;for(let t of e){let e=c(t,!0);(l?!e.isMatch:e.isMatch)&&(l?o.add(e.output):(o.delete(e.output),i.add(e.output)))}}let c=(a===t.length?[...s]:[...i]).filter(e=>!o.has(e));if(r&&0===c.length){if(!0===r.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===r.nonull||!0===r.nullglob)return r.unescape?t.map(e=>e.replace(/\\/g,"")):t}return c};return s.match=s,s.matcher=(e,t)=>n(e,t),s.any=s.isMatch=(e,t,r)=>n(t,r)(e),s.not=(e,t,n={})=>{t=[].concat(t).map(String);let r=new Set,o=[],i=new Set(s(e,t,{...n,onResult:e=>{n.onResult&&n.onResult(e),o.push(e.output)}}));for(let e of o)i.has(e)||r.add(e);return[...r]},s.contains=(t,n,r)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);if(Array.isArray(n))return n.some(e=>s.contains(t,e,r));if("string"==typeof n){if(o(t)||o(n))return!1;if(t.includes(n)||t.startsWith("./")&&t.slice(2).includes(n))return!0}return s.isMatch(t,n,{...r,contains:!0})},s.matchKeys=(e,t,n)=>{if(!r.isObject(e))throw new TypeError("Expected the first argument to be an object");let o=s(Object.keys(e),t,n),i={};for(let t of o)i[t]=e[t];return i},s.some=(e,t,r)=>{let o=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),r);if(o.some(e=>t(e)))return!0}return!1},s.every=(e,t,r)=>{let o=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),r);if(!o.every(e=>t(e)))return!1}return!0},s.all=(t,r,o)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);return[].concat(r).every(e=>n(e,o)(t))},s.capture=(e,t,o)=>{let i=r.isWindows(o),s=n.makeRe(String(e),{...o,capture:!0}).exec(i?r.toPosixSlashes(t):t);if(s)return s.slice(1).map(e=>void 0===e?"":e)},s.makeRe=(...e)=>n.makeRe(...e),s.scan=(...e)=>n.scan(...e),s.parse=(e,r)=>{let o=[];for(let i of[].concat(e||[]))for(let e of t(String(i),r))o.push(n.parse(e,r));return o},s.braces=(e,n)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return n&&!0===n.nobrace||!i(e)?[e]:t(e,n)},s.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return s.braces(e,{...t,expand:!0})},s.hasBraces=i,Ac=s}(),r=/[*?]|^!/,o=/\[[^[]*]/,i=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,s=/[!*+?@]\([^(]*\)/,a=/,|\.\./,u=/(?!^)\/{2,}/g;function c(e,t={}){return!d(e,t)}function d(e,t={}){return!(""===e||!(!1===t.caseSensitiveMatch||e.includes("\\")||r.test(e)||o.test(e)||i.test(e)||!1!==t.extglob&&s.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 r=e.slice(t,n);return a.test(r)}(e)))}function h(e){return e.startsWith("!")&&"("!==e[1]}function D(e){return!h(e)}function g(e){return e.startsWith("..")||e.startsWith("./..")}function m(e){return e.endsWith("/**")}function y(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 b(e,t){return n.makeRe(e,t)}function v(t){return e.isAbsolute(t)}return zu.isStaticPattern=c,zu.isDynamicPattern=d,zu.convertToPositivePattern=function(e){return h(e)?e.slice(1):e},zu.convertToNegativePattern=function(e){return"!"+e},zu.isNegativePattern=h,zu.isPositivePattern=D,zu.getNegativePatterns=function(e){return e.filter(h)},zu.getPositivePatterns=function(e){return e.filter(D)},zu.getPatternsInsideCurrentDirectory=function(e){return e.filter(e=>!g(e))},zu.getPatternsOutsideCurrentDirectory=function(e){return e.filter(g)},zu.isPatternRelatedToParentDirectory=g,zu.getBaseDirectory=function(e){return t(e,{flipBackslashes:!1})},zu.hasGlobStar=function(e){return e.includes("**")},zu.endsWithSlashGlobStar=m,zu.isAffectDepthOfReadingPattern=function(t){const n=e.basename(t);return m(t)||c(n)},zu.expandPatternsWithBraceExpansion=function(e){return e.reduce((e,t)=>e.concat(y(t)),[])},zu.expandBraceExpansion=y,zu.getPatternParts=function(e,t){let{parts:r}=n.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return 0===r.length&&(r=[e]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r},zu.makeRe=b,zu.convertPatternsToRe=function(e,t){return e.map(e=>b(e,t))},zu.matchAny=function(e,t){return t.some(t=>t.test(e))},zu.removeDuplicateSlashes=function(e){return e.replace(u,"/")},zu.partitionAbsoluteAndRelative=function(e){const t=[],n=[];for(const r of e)v(r)?t.push(r):n.push(r);return[t,n]},zu.isAbsolute=v,zu}();ku.pattern=o;const i=function(){if($c)return Lc;$c=1,Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.merge=void 0;const e=Nc();function t(e){e.forEach(e=>e.emit("close"))}return Lc.merge=function(n){const r=e(n);return n.forEach(e=>{e.once("error",e=>r.emit("error",e))}),r.once("close",()=>t(n)),r.once("end",()=>t(n)),r},Lc}();ku.stream=i;const s=(Mc||(Mc=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.isEmpty=Hc.isString=void 0,Hc.isString=function(e){return"string"==typeof e},Hc.isEmpty=function(e){return""===e}),Hc);return ku.string=s,ku}var Uc,qc={},Kc={},Gc={},Wc={},Zc={},Vc={},Jc={},Yc={},Qc={};var Xc,el,tl,nl,rl,ol,il,sl,al={},ul={},cl={};function ll(){if(nl)return Yc;nl=1,Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.statSync=Yc.stat=Yc.Settings=void 0;const e=function(){if(Uc)return Qc;function e(e,t){e(t)}function t(e,t){e(null,t)}return Uc=1,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.read=void 0,Qc.read=function(n,r,o){r.fs.lstat(n,(i,s)=>{null===i?s.isSymbolicLink()&&r.followSymbolicLink?r.fs.stat(n,(n,i)=>{if(null!==n)return r.throwErrorOnBrokenSymbolicLink?void e(o,n):void t(o,s);r.markSymbolicLink&&(i.isSymbolicLink=()=>!0),t(o,i)}):t(o,s):e(o,i)})},Qc}(),t=(Xc||(Xc=1,Object.defineProperty(al,"__esModule",{value:!0}),al.read=void 0,al.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}}),al),n=function(){if(tl)return ul;tl=1,Object.defineProperty(ul,"__esModule",{value:!0});const e=(el||(el=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=D;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)}}(cl)),cl);return ul.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}},ul}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return Yc.Settings=n.default,Yc.stat=function(t,n,o){"function"!=typeof n?e.read(t,r(n),o):e.read(t,r(),n)},Yc.statSync=function(e,n){const o=r(n);return t.read(e,o)},Yc}var pl,fl={};function dl(){if(pl)return fl;pl=1,Object.defineProperty(fl,"__esModule",{value:!0}),fl.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),r=t>10,o=10===t&&n>=10;return fl.IS_SUPPORT_READDIR_WITH_FILE_TYPES=r||o,fl}var hl,Dl,gl={},ml={};function yl(){if(Dl)return gl;Dl=1,Object.defineProperty(gl,"__esModule",{value:!0}),gl.fs=void 0;const e=function(){if(hl)return ml;hl=1,Object.defineProperty(ml,"__esModule",{value:!0}),ml.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 ml.createDirentFromStats=function(t,n){return new e(t,n)},ml}();return gl.fs=e,gl}var bl,vl,El={};function Fl(){return bl||(bl=1,Object.defineProperty(El,"__esModule",{value:!0}),El.joinPathSegments=void 0,El.joinPathSegments=function(e,t,n){return e.endsWith(n)?e+t:e+n+t}),El}function Cl(){if(vl)return Jc;vl=1,Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.readdir=Jc.readdirWithFileTypes=Jc.read=void 0;const e=ll(),t=function(){if(sl)return il;sl=1,il=function(t,n){let r,o,i,s=!0;function a(t){function o(){n&&n(t,r),n=null}s?e(o):o()}function u(e,t,n){r[e]=n,(0===--o||t)&&a(t)}Array.isArray(t)?(r=[],o=t.length):(i=Object.keys(t),r={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,n){u(e,t,n)})}):t.forEach(function(e,t){e(function(e,n){u(t,e,n)})}):a(null),s=!1};const e=function(){if(ol)return rl;let e;return ol=1,rl="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:R):t=>(e||(e=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))}();return il}(),n=dl(),r=yl(),o=Fl();function i(e,n,i){n.fs.readdir(e,{withFileTypes:!0},(s,c)=>{if(null!==s)return void a(i,s);const l=c.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,n.pathSegmentSeparator)}));if(!n.followSymbolicLinks)return void u(i,l);const p=l.map(e=>function(e,t){return n=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void n(o):void n(null,e);e.dirent=r.fs.createDirentFromStats(e.name,i),n(null,e)}):n(null,e)}}(e,n));t(p,(e,t)=>{null===e?u(i,t):a(i,e)})})}function s(n,i,s){i.fs.readdir(n,(c,l)=>{if(null!==c)return void a(s,c);const p=l.map(t=>{const s=o.joinPathSegments(n,t,i.pathSegmentSeparator);return n=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void n(e);const a={name:t,path:s,dirent:r.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),n(null,a)})}});t(p,(e,t)=>{null===e?u(s,t):a(s,e)})})}function a(e,t){e(t)}function u(e,t){e(null,t)}return Jc.read=function(e,t,r){t.stats||!n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,r):i(e,t,r)},Jc.readdirWithFileTypes=i,Jc.readdir=s,Jc}var wl,_l,Al,Sl,kl={},Pl={},Rl={};function xl(){if(Sl)return Vc;Sl=1,Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.Settings=Vc.scandirSync=Vc.scandir=void 0;const e=Cl(),t=function(){if(wl)return kl;wl=1,Object.defineProperty(kl,"__esModule",{value:!0}),kl.readdir=kl.readdirWithFileTypes=kl.read=void 0;const e=ll(),t=dl(),n=yl(),r=Fl();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:r.joinPathSegments(e,o.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,o){return o.fs.readdirSync(t).map(i=>{const s=r.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),u={name:i,path:s,dirent:n.fs.createDirentFromStats(i,a)};return o.stats&&(u.stats=a),u})}return kl.read=function(e,n){return!n.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,n):i(e,n)},kl.readdirWithFileTypes=o,kl.readdir=i,kl}(),n=function(){if(Al)return Pl;Al=1,Object.defineProperty(Pl,"__esModule",{value:!0});const e=p,t=ll(),n=(_l||(_l=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=D;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)}}(Rl)),Rl);return Pl.default=class{constructor(r={}){this._options=r,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}},Pl}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return Vc.Settings=n.default,Vc.scandir=function(t,n,o){"function"!=typeof n?e.read(t,r(n),o):e.read(t,r(),n)},Vc.scandirSync=function(e,n){const o=r(n);return t.read(e,o)},Vc}var Bl,Ol,Tl,$l={exports:{}};var Ll,Nl={};function Ml(){return Ll||(Ll=1,Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.joinPathSegments=Nl.replacePathSegmentSeparator=Nl.isAppliedFilter=Nl.isFatalError=void 0,Nl.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Nl.isAppliedFilter=function(e,t){return null===e||e(t)},Nl.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Nl.joinPathSegments=function(e,t,n){return""===e?t:e.endsWith(n)?e+t:e+n+t}),Nl}var jl,Il,Hl,zl={};function Ul(){if(jl)return zl;jl=1,Object.defineProperty(zl,"__esModule",{value:!0});const e=Ml();return zl.default=class{constructor(t,n){this._root=t,this._settings=n,this._root=e.replacePathSegmentSeparator(t,n.pathSegmentSeparator)}},zl}function ql(){if(Il)return Zc;Il=1,Object.defineProperty(Zc,"__esModule",{value:!0});const e=h,t=xl(),n=function(){if(Tl)return $l.exports;Tl=1;var e=Ol?Bl:(Ol=1,Bl=function(e){var t=new e,n=t;return{get:function(){var r=t;return r.next?t=r.next:(t=new e,n=t),r.next=null,r},release:function(e){n.next=e,n=e}}});function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(r),a=null,u=null,c=0,l=null,p={push:function(e,r){var d=s.get();d.context=t,d.release=f,d.value=e,d.callback=r||n,d.errorHandler=l,c>=i||p.paused?u?(u.next=d,u=d):(a=d,u=d,p.saturated()):(c++,o.call(t,d.value,d.worked))},drain:n,saturated:n,pause:function(){p.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,!p.paused)for(;a&&c<i;)c++,f()},running:function(){return c},resume:function(){if(p.paused){if(p.paused=!1,null===a)return c++,void f();for(;a&&c<i;)c++,f()}},idle:function(){return 0===c&&0===p.length()},length:function(){for(var e=a,t=0;e;)e=e.next,t++;return t},getQueue:function(){for(var e=a,t=[];e;)t.push(e.value),e=e.next;return t},unshift:function(e,r){var d=s.get();d.context=t,d.release=f,d.value=e,d.callback=r||n,d.errorHandler=l,c>=i||p.paused?a?(d.next=a,a=d):(a=d,u=d,p.saturated()):(c++,o.call(t,d.value,d.worked))},empty:n,kill:function(){a=null,u=null,p.drain=n},killAndDrain:function(){a=null,u=null,p.drain(),p.drain=n},error:function(e){l=e}};return p;function f(e){e&&s.release(e);var n=a;n&&c<=i?p.paused?c--:(u===a&&(u=null),a=n.next,n.next=null,o.call(t,n.value,n.worked),null===u&&p.empty()):0===--c&&p.drain()}}function n(){}function r(){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,r){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=n,e.errorHandler&&i(t,s),o.call(e.context,t,r),e.release(e)}}return $l.exports=t,$l.exports.promise=function(e,r,o){"function"==typeof e&&(o=r,r=e,e=null);var i=t(e,function(e,t){r.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,n){s(e,function(e,r){e?n(e):t(r)})});return t.catch(n),t},i.unshift=function(e){var t=new Promise(function(t,n){a(e,function(e,r){e?n(e):t(r)})});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},$l.exports}(),r=Ml(),o=Ul();class i extends o.default{constructor(r,o){super(r,o),this._settings=o,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,r)=>{if(null===n){for(const t of r)this._handleEntry(t,e.base);t(null,void 0)}else t(n,void 0)})}_handleError(e){!this._isDestroyed&&r.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=r.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),r.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&r.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Zc.default=i,Zc}var Kl,Gl,Wl,Zl={},Vl={},Jl={};var Yl,Ql,Xl={};function ep(){if(Ql)return Gc;Ql=1,Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.Settings=Gc.walkStream=Gc.walkSync=Gc.walk=void 0;const e=function(){if(Hl)return Wc;Hl=1,Object.defineProperty(Wc,"__esModule",{value:!0});const e=ql();return Wc.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()}},Wc}(),t=function(){if(Kl)return Zl;Kl=1,Object.defineProperty(Zl,"__esModule",{value:!0});const e=d,t=ql();return Zl.default=class{constructor(n,r){this._root=n,this._settings=r,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}},Zl}(),n=function(){if(Wl)return Vl;Wl=1,Object.defineProperty(Vl,"__esModule",{value:!0});const e=function(){if(Gl)return Jl;Gl=1,Object.defineProperty(Jl,"__esModule",{value:!0});const e=xl(),t=Ml(),n=Ul();class r 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 r=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(r,void 0===n?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return Jl.default=r,Jl}();return Vl.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()}},Vl}(),r=function(){if(Yl)return Xl;Yl=1,Object.defineProperty(Xl,"__esModule",{value:!0});const e=p,t=xl();return Xl.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}},Xl}();function o(e={}){return e instanceof r.default?e:new r.default(e)}return Gc.Settings=r.default,Gc.walk=function(t,n,r){"function"!=typeof n?new e.default(t,o(n)).read(r):new e.default(t,o()).read(n)},Gc.walkSync=function(e,t){const r=o(t);return new n.default(e,r).read()},Gc.walkStream=function(e,n){const r=o(n);return new t.default(e,r).read()},Gc}var tp,np={};function rp(){if(tp)return np;tp=1,Object.defineProperty(np,"__esModule",{value:!0});const e=p,t=ll(),n=zc();return np.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 r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},np}var op,ip,sp={};function ap(){if(op)return sp;op=1,Object.defineProperty(sp,"__esModule",{value:!0});const e=d,t=ll(),n=ep(),r=rp();class o extends r.default{constructor(){super(...arguments),this._walkStream=n.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,n){const r=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(r[e],t[e],n).then(t=>{null!==t&&n.entryFilter(t)&&o.push(t),e===r.length-1&&o.end(),s()}).catch(s);for(let e=0;e<r.length;e++)o.write(e);return o}_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,r)=>null===e?t(r):n(e))})}}return sp.default=o,sp}var up,cp,lp,pp={},fp={},dp={},hp={};var Dp,gp,mp,yp,bp,vp={},Ep={},Fp={};function Cp(){if(yp)return pp;yp=1,Object.defineProperty(pp,"__esModule",{value:!0});const e=p,t=function(){if(lp)return fp;lp=1,Object.defineProperty(fp,"__esModule",{value:!0});const e=zc(),t=function(){if(cp)return dp;cp=1,Object.defineProperty(dp,"__esModule",{value:!0});const e=function(){if(up)return hp;up=1,Object.defineProperty(hp,"__esModule",{value:!0});const e=zc();return hp.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))}},hp}();class t extends e.default{match(e){const t=e.split("/"),n=t.length,r=this._storage.filter(e=>!e.complete||e.segments.length>n);for(const e of r){const r=e.sections[0];if(!e.complete&&n>r.length)return!0;if(t.every((t,n)=>{const r=e.segments[n];return!(!r.dynamic||!r.patternRe.test(t))||!r.dynamic&&r.pattern===t}))return!0}return!1}}return dp.default=t,dp}();return fp.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,n){const r=this._getMatcher(t),o=this._getNegativePatternsRe(n);return t=>this._filter(e,t,r,o)}_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,r,o){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,r)&&this._isSkippedByNegativePatterns(i,o)}_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)}},fp}(),n=function(){if(Dp)return vp;Dp=1,Object.defineProperty(vp,"__esModule",{value:!0});const e=zc();return vp.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,n){const[r,o]=e.pattern.partitionAbsoluteAndRelative(n),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,n){const r=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(r))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(r,n,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(r),o}_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,r){if(0===n.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,n,r)}_isMatchToPatterns(t,n,r){if(0===n.length)return!1;const o=e.pattern.matchAny(t,n);return!o&&r?e.pattern.matchAny(t+"/",n):o}},vp}(),r=function(){if(gp)return Ep;gp=1,Object.defineProperty(Ep,"__esModule",{value:!0});const e=zc();return Ep.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},Ep}(),o=function(){if(mp)return Fp;mp=1,Object.defineProperty(Fp,"__esModule",{value:!0});const e=zc();return Fp.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}},Fp}();return pp.default=class{constructor(e){this._settings=e,this.errorFilter=new r.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new o.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}}},pp}var wp,_p,Ap,Sp={},kp={},Pp={};var Rp,xp,Bp,Op,Tp,$p={},Lp=function(){if(Bp)return xp;Bp=1;const e=function(){if(Ic)return Su;Ic=1,Object.defineProperty(Su,"__esModule",{value:!0}),Su.convertPatternGroupToTask=Su.convertPatternGroupsToTasks=Su.groupPatternsByBaseDirectory=Su.getNegativePatternsAsPositive=Su.getPositivePatterns=Su.convertPatternsToTasks=Su.generate=void 0;const e=zc();function t(t,n){let r=t;return n.braceExpansion&&(r=e.pattern.expandPatternsWithBraceExpansion(r)),n.baseNameMatch&&(r=r.map(e=>e.includes("/")?e:`**/${e}`)),r.map(t=>e.pattern.removeDuplicateSlashes(t))}function n(t,n,r){const o=[],u=e.pattern.getPatternsOutsideCurrentDirectory(t),c=e.pattern.getPatternsInsideCurrentDirectory(t),l=i(u),p=i(c);return o.push(...s(l,n,r)),"."in p?o.push(a(".",c,n,r)):o.push(...s(p,n,r)),o}function r(t){return e.pattern.getPositivePatterns(t)}function o(t,n){return e.pattern.getNegativePatterns(t).concat(n).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,n)=>{const r=e.pattern.getBaseDirectory(n);return r in t?t[r].push(n):t[r]=[n],t},{})}function s(e,t,n){return Object.keys(e).map(r=>a(r,e[r],t,n))}function a(t,n,r,o){return{dynamic:o,positive:n,negative:r,base:t,patterns:[].concat(n,r.map(e.pattern.convertToNegativePattern))}}return Su.generate=function(i,s){const a=t(i,s),u=t(s.ignore,s),c=r(a),l=o(a,u),p=c.filter(t=>e.pattern.isStaticPattern(t,s)),f=c.filter(t=>e.pattern.isDynamicPattern(t,s)),d=n(p,l,!1),h=n(f,l,!0);return d.concat(h)},Su.convertPatternsToTasks=n,Su.getPositivePatterns=r,Su.getNegativePatternsAsPositive=o,Su.groupPatternsByBaseDirectory=i,Su.convertPatternGroupsToTasks=s,Su.convertPatternGroupToTask=a,Su}(),t=function(){if(bp)return qc;bp=1,Object.defineProperty(qc,"__esModule",{value:!0});const e=function(){if(ip)return Kc;ip=1,Object.defineProperty(Kc,"__esModule",{value:!0});const e=ep(),t=rp(),n=ap();class r extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new n.default(this._settings)}dynamic(e,t){return new Promise((n,r)=>{this._walkAsync(e,t,(e,t)=>{null===e?n(t):r(e)})})}async static(e,t){const n=[],r=this._readerStream.static(e,t);return new Promise((e,t)=>{r.once("error",t),r.on("data",e=>n.push(e)),r.once("end",()=>e(n))})}}return Kc.default=r,Kc}(),t=Cp();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 qc.default=n,qc}(),n=function(){if(wp)return Sp;wp=1,Object.defineProperty(Sp,"__esModule",{value:!0});const e=d,t=ap(),n=Cp();class r extends n.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const n=this._getRootDirectory(t),r=this._getReaderOptions(t),o=this.api(n,t,r),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",r.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return Sp.default=r,Sp}(),r=function(){if(Ap)return kp;Ap=1,Object.defineProperty(kp,"__esModule",{value:!0});const e=function(){if(_p)return Pp;_p=1,Object.defineProperty(Pp,"__esModule",{value:!0});const e=ll(),t=ep(),n=rp();class r 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 r of e){const e=this._getFullEntryPath(r),o=this._getEntry(e,r,t);null!==o&&t.entryFilter(o)&&n.push(o)}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 Pp.default=r,Pp}(),t=Cp();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 kp.default=n,kp}(),o=(Rp||(Rp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const t=D,n=l,r=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,r),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)}}}($p)),$p),i=zc();async function s(e,n){u(e);const r=a(e,t.default,n),o=await Promise.all(r);return i.array.flatten(o)}function a(t,n,r){const i=[].concat(t),s=new o.default(r),a=e.generate(i,s),u=new n(s);return a.map(u.read,u)}function u(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 s(e,t){u(e);const n=a(e,r.default,t);return i.array.flatten(n)}function c(e,t){u(e);const r=a(e,n.default,t);return i.stream.merge(r)}var l,p;t.glob=t,t.globSync=s,t.globStream=c,t.async=t,t.sync=s,t.stream=c,t.generateTasks=function(t,n){u(t);const r=[].concat(t),i=new o.default(n);return e.generate(r,i)},t.isDynamicPattern=function(e,t){u(e);const n=new o.default(t);return i.pattern.isDynamicPattern(e,n)},t.escapePath=function(e){return u(e),i.path.escape(e)},t.convertPathToPattern=function(e){return u(e),i.path.convertPathToPattern(e)},(l=t.posix||(t.posix={})).escapePath=function(e){return u(e),i.path.escapePosixPath(e)},l.convertPathToPattern=function(e){return u(e),i.path.convertPosixPathToPattern(e)},(p=t.win32||(t.win32={})).escapePath=function(e){return u(e),i.path.escapeWindowsPath(e)},p.convertPathToPattern=function(e){return u(e),i.path.convertWindowsPathToPattern(e)}}(s||(s={})),xp=s}(),Np=x(Lp),Mp=function(){if(Tp)return Op;Tp=1;var e=Uu(),t=p.posix.dirname,n="win32"===l.platform(),r="/",o=/\\/g,i=/\\([!*?|[\](){}])/g;function s(t){return!!/\([^()]+$/.test(t)||"{"===t[0]||"["===t[0]||!!/[^\\][{[]/.test(t)||e(t)}return Op=function(e,a){Object.assign({flipBackslashes:!0},a).flipBackslashes&&n&&e.indexOf(r)<0&&(e=e.replace(o,r)),function(e){var t;switch(e.slice(-1)){case"}":t="{";break;case"]":t="[";break;default:return!1}var n=e.indexOf(t);return!(n<0)&&e.slice(n+1,-1).includes(r)}(e)&&(e+=r),e+="a";do{e=t(e)}while(s(e));return e.replace(i,"$1")}}(),jp=x(Mp);const Ip=e=>""!==e&&".."!==e,Hp=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(!Ip(e))return null;return t.join("/")},zp=async e=>{try{return(await t.stat(e)).isFile()}catch{return!1}},Up=e=>e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),qp=(e=0)=>t=>`[${t+e}m`,Kp=(e=0)=>t=>`[${38+e};5;${t}m`,Gp=(e=0)=>(t,n,r)=>`[${38+e};2;${t};${n};${r}m`,Wp={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(Wp.modifier);Object.keys(Wp.color),Object.keys(Wp.bgColor);const Zp=function(){const e=new Map;for(const[t,n]of Object.entries(Wp)){for(const[t,r]of Object.entries(n))Wp[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=Wp[t],e.set(r[0],r[1]);Object.defineProperty(Wp,t,{value:n,enumerable:!1})}return Object.defineProperty(Wp,"codes",{value:e,enumerable:!1}),Wp.color.close="",Wp.bgColor.close="",Wp.color.ansi=qp(),Wp.color.ansi256=Kp(),Wp.color.ansi16m=Gp(),Wp.bgColor.ansi=qp(10),Wp.bgColor.ansi256=Kp(10),Wp.bgColor.ansi16m=Gp(10),Object.defineProperties(Wp,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;3===n.length&&(n=[...n].map(e=>e+e).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},enumerable:!1},hexToAnsi256:{value:e=>Wp.rgbToAnsi256(...Wp.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return e-8+90;let t,n,r;if(e>=232)t=(10*(e-232)+8)/255,n=t,r=t;else{const o=(e-=16)%36;t=Math.floor(e/36)/5,n=Math.floor(o/6)/5,r=o%6/5}const o=2*Math.max(t,n,r);if(0===o)return 30;let i=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return 2===o&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>Wp.ansi256ToAnsi(Wp.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>Wp.ansi256ToAnsi(Wp.hexToAnsi256(e)),enumerable:!1}}),Wp}();function Vp(e,t=(globalThis.Deno?globalThis.Deno.args:o.argv)){const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)}const{env:Jp}=o;let Yp;function Qp(e,{streamIsTTY:t,sniffFlags:n=!0}={}){const r=function(){if("FORCE_COLOR"in Jp)return"true"===Jp.FORCE_COLOR?1:"false"===Jp.FORCE_COLOR?0:0===Jp.FORCE_COLOR.length?1:Math.min(Number.parseInt(Jp.FORCE_COLOR,10),3)}();void 0!==r&&(Yp=r);const i=n?Yp:r;if(0===i)return 0;if(n){if(Vp("color=16m")||Vp("color=full")||Vp("color=truecolor"))return 3;if(Vp("color=256"))return 2}if("TF_BUILD"in Jp&&"AGENT_NAME"in Jp)return 1;if(e&&!t&&void 0===i)return 0;const s=i||0;if("dumb"===Jp.TERM)return s;if("win32"===o.platform){const e=g.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in Jp)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(e=>e in Jp)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(e=>e in Jp)||"codeship"===Jp.CI_NAME?1:s;if("TEAMCITY_VERSION"in Jp)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Jp.TEAMCITY_VERSION)?1:0;if("truecolor"===Jp.COLORTERM)return 3;if("xterm-kitty"===Jp.TERM)return 3;if("xterm-ghostty"===Jp.TERM)return 3;if("wezterm"===Jp.TERM)return 3;if("TERM_PROGRAM"in Jp){const e=Number.parseInt((Jp.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Jp.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Jp.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Jp.TERM)||"COLORTERM"in Jp?1:s}function Xp(e,t={}){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(Qp(e,{streamIsTTY:e&&e.isTTY,...t}))}Vp("no-color")||Vp("no-colors")||Vp("color=false")||Vp("color=never")?Yp=0:(Vp("color")||Vp("colors")||Vp("color=true")||Vp("color=always"))&&(Yp=1);const ef={stdout:Xp({isTTY:m.isatty(1)}),stderr:Xp({isTTY:m.isatty(2)})};function tf(e,t,n){let r=e.indexOf(t);if(-1===r)return e;const o=t.length;let i=0,s="";do{s+=e.slice(i,r)+t+n,i=r+o,r=e.indexOf(t,i)}while(-1!==r);return s+=e.slice(i),s}const{stdout:nf,stderr:rf}=ef,of=Symbol("GENERATOR"),sf=Symbol("STYLER"),af=Symbol("IS_EMPTY"),uf=["ansi","ansi","ansi256","ansi16m"],cf=Object.create(null),lf=e=>{const t=(...e)=>e.join(" ");return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const n=nf?nf.level:0;e.level=void 0===t.level?n:t.level})(t,e),Object.setPrototypeOf(t,pf.prototype),t};function pf(e){return lf(e)}Object.setPrototypeOf(pf.prototype,Function.prototype);for(const[e,t]of Object.entries(Zp))cf[e]={get(){const n=gf(this,Df(t.open,t.close,this[sf]),this[af]);return Object.defineProperty(this,e,{value:n}),n}};cf.visible={get(){const e=gf(this,this[sf],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const ff=(e,t,n,...r)=>"rgb"===e?"ansi16m"===t?Zp[n].ansi16m(...r):"ansi256"===t?Zp[n].ansi256(Zp.rgbToAnsi256(...r)):Zp[n].ansi(Zp.rgbToAnsi(...r)):"hex"===e?ff("rgb",t,n,...Zp.hexToRgb(...r)):Zp[n][e](...r),df=["rgb","hex","ansi256"];for(const e of df){cf[e]={get(){const{level:t}=this;return function(...n){const r=Df(ff(e,uf[t],"color",...n),Zp.color.close,this[sf]);return gf(this,r,this[af])}}};cf["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...n){const r=Df(ff(e,uf[t],"bgColor",...n),Zp.bgColor.close,this[sf]);return gf(this,r,this[af])}}}}const hf=Object.defineProperties(()=>{},{...cf,level:{enumerable:!0,get(){return this[of].level},set(e){this[of].level=e}}}),Df=(e,t,n)=>{let r,o;return void 0===n?(r=e,o=t):(r=n.openAll+e,o=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:o,parent:n}},gf=(e,t,n)=>{const r=(...e)=>mf(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,hf),r[of]=e,r[sf]=t,r[af]=n,r},mf=(e,t)=>{if(e.level<=0||!t)return e[af]?"":t;let n=e[sf];if(void 0===n)return t;const{openAll:r,closeAll:o}=n;if(t.includes(""))for(;void 0!==n;)t=tf(t,n.close,n.open),n=n.parent;const i=t.indexOf("\n");return-1!==i&&(t=function(e,t,n,r){let o=0,i="";do{const s="\r"===e[r-1];i+=e.slice(o,s?r-1:r)+t+(s?"\r\n":"\n")+n,o=r+1,r=e.indexOf("\n",o)}while(-1!==r);return i+=e.slice(o),i}(t,o,r,i)),r+t+o};Object.defineProperties(pf.prototype,cf);const yf=pf();pf({level:rf?rf.level:0});const bf=Boolean(process.stdout?.isTTY),vf=()=>"1"===process.env.STAN_BORING||"1"===process.env.NO_COLOR||"0"===process.env.FORCE_COLOR||!bf,Ef=e=>vf()?e:yf.green(e),Ff=e=>vf()?e:yf.cyan(e),Cf=e=>vf()?e:yf.blue(e),wf=e=>vf()?e:yf.red(e),_f=e=>vf()?e:yf.black(e),Af=e=>vf()?e:yf.gray(e),Sf=e=>vf()?e:yf.hex("#FFA500")(e),kf=e=>vf()?e:yf.bold(e),Pf=e=>vf()?e:yf.dim(e),Rf=e=>e instanceof URL?i.fileURLToPath(e):e;function xf({cwd:t}={}){const r=function(t,{cwd:r=o.cwd(),type:i="file",stopAt:s}={}){let a=n.resolve(Rf(r)??"");const{root:u}=n.parse(a);s=n.resolve(a,Rf(s)??u);const c=n.isAbsolute(t);for(;a;){const r=c?t:n.join(a,t);try{const t=e.statSync(r,{throwIfNoEntry:!1});if("file"===i&&t?.isFile()||"directory"===i&&t?.isDirectory())return r}catch{}if(a===s||a===u)break;a=n.dirname(a)}}("package.json",{cwd:t});return r&&n.dirname(r)}const Bf=async e=>{const n=await t.readFile(e);return u.createHash("sha256").update(n).digest("hex")},Of=async e=>{if(!e)return null;try{return await t.realpath(e)}catch{return e?n.resolve(e):null}},Tf=async e=>{try{const n=await t.readFile(e,"utf8");return JSON.parse(n)}catch{return null}},$f=async t=>{let r=t;try{const e=xf({cwd:t})??t;r=e}catch{}const o=(()=>{try{return wu(r).stanPath}catch{return(e=>{try{return wu(e).stanPath}catch{return".stan"}})(r)}})();let s;try{const e=wu(r);s="boolean"==typeof e.devMode?e.devMode:void 0}catch{s=void 0}const a=((e,t)=>({systemAbs:n.join(e,t,"system")}))(r,o),u=n.join(a.systemAbs,"stan.system.md"),c=n.join(a.systemAbs,".docs.meta.json");let l=null;const p=xf({cwd:n.dirname(i.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:v&&"SCRIPT"===v.tagName.toUpperCase()&&v.src||new URL("index.js",document.baseURI).href))})??null;if(p)try{const e=await Tf(n.join(p,"package.json"));l=e?.version??null}catch{l=null}const f=p&&e.existsSync(n.join(p,"dist","stan.system.md"))?n.join(p,"dist","stan.system.md"):null,d=e.existsSync(u),h=!!f&&e.existsSync(f),[D,g]=await Promise.all([d?Bf(u):Promise.resolve(void 0),h&&f?Bf(f):Promise.resolve(void 0)]),m=!(!D||!g)&&D===g,y=await Tf(c),[b,E]=await Promise.all([Of(p),Of(r)]),F=!!b&&!!E&&b===E,C=process.env.STAN_DEV_MODE?.trim().toLowerCase(),w="1"===C||"true"===C||"0"!==C&&"false"!==C&&void 0,_="boolean"==typeof w?w:"boolean"==typeof s?s:F;return{packageVersion:l,nodeVersion:process.version,repoRoot:r,stanPath:o,isDevModuleRepo:_,systemPrompt:{localExists:d,baselineExists:h,inSync:m,localHash:D,baselineHash:g},docsMeta:y??null}},Lf=()=>(()=>{const t=(()=>{try{const e=i.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:v&&"SCRIPT"===v.tagName.toUpperCase()&&v.src||new URL("index.js",document.baseURI).href);return se({cwd:n.dirname(e)})??null}catch{return null}})();if(!t)return null;const r=n.join(t,"dist","stan.system.md");return e.existsSync(r)?r:null})(),Nf=(e,t)=>({outputAbs:n.join(e,t,"output"),patchAbs:n.join(e,t,"patch")}),Mf=async(o,i)=>{try{await(async(o,i)=>{const s=n.join(o,i,"system"),a=n.join(s,"parts"),u=n.join(s,"stan.system.md");if(await r.ensureDir(s),!e.existsSync(a))return{target:u,action:"skipped-no-parts",partsDir:a};const c=(await t.readdir(a,{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===c.length)return{target:u,action:"skipped-no-md",partsDir:a};const l=[];for(const e of c){const r=n.join(a,e),o=Up(await t.readFile(r,"utf8")).trimEnd();l.push(o)}const p=(e=>`\x3c!-- GENERATED: assembled from ${e}/system/parts; edit parts and run \`npm run gen:system\` --\x3e\n`)(i)+l.join("\n\n")+"\n";return await t.writeFile(u,p,"utf8"),{target:u,action:"written"}})(o,i)}catch{}},jf=async(o,i)=>{const{cwd:s,config:a,includeOutputs:u}=o,c=Boolean(i?.silent),l=Nf(s,a.stanPath);c||console.log(`stan: start "${Ff("archive")}"`);let p=async()=>{};if((await $f(s)).isDevModuleRepo)try{await Mf(s,a.stanPath)}catch{}else p=await(async(r,o)=>{const i=Lf();if(!i)return async()=>{};const s=n.resolve(r,o,"system");await t.mkdir(s,{recursive:!0});const a=n.join(s,"stan.system.md"),u=e.existsSync(a);let c=null;if(u)try{c=await t.readFile(a,"utf8")}catch{c=null}const l=await t.readFile(i,"utf8");return await t.writeFile(a,l,"utf8"),async()=>{try{u?null!==c&&await t.writeFile(a,c,"utf8"):await t.rm(a,{force:!0})}catch{}}})(s,a.stanPath);let f="",d="";try{try{a.imports&&"object"==typeof a.imports&&await(async e=>{const{cwd:o,stanPath:i,map:s,onStage:a}=e;if(!s||"object"!=typeof s)return;const u=Q(o,i),c=n.join(u.rootAbs,"imports");await r.ensureDir(c);const l=Object.keys(s).sort();for(const e of l){const i=s[e]??[];if(!Array.isArray(i)||0===i.length)continue;const u=Hp(e);if(!u)continue;const l=n.join(c,u);await t.rm(l,{recursive:!0,force:!0}).catch(()=>{}),await r.ensureDir(l).catch(()=>{});const p=[];for(const e of i){const i=String(e??"").trim();if(!i)continue;const s=jp(i.replace(/\\/g,"/"));try{const e=await Np(i,{cwd:o,absolute:!0,dot:!0,onlyFiles:!1,followSymbolicLinks:!1});for(const i of e){if(!await zp(i))continue;const e=n.relative(n.isAbsolute(s)?s:n.resolve(o,s),i).replace(/\\/g,"/");if(!e||e.includes(".."))continue;const a=n.join(l,e);await r.ensureDir(n.dirname(a)).catch(()=>{});try{await t.copyFile(i,a),p.push(a)}catch{}}}catch{}}try{"function"==typeof a&&a(u,p.map(e=>n.relative(o,e).replace(/\\/g,"/")))}catch{}}})({cwd:s,stanPath:a.stanPath,map:a.imports})}catch{}i?.progress?.start?.("full");const o=Date.now();f=await(async(r,o,i={})=>{const{includeOutputDir:s=!1,fileName:a,includes:u=[],excludes:c=[]}=i;let l=a??"archive.tar";l.endsWith(".tar")||(l+=".tar");const{outDir:p,diffDir:f}=await oe(r,o),d=await X(r),h=await ne(d,{cwd:r,stanPath:o,includeOutputDir:s,includes:u,excludes:c}),D=n.resolve(p,l),g=n.resolve(f,F);if(e.existsSync(D))try{await t.copyFile(D,g)}catch{}const{textFiles:m,warningsBody:y}=await P(r,h),b=m,v=(y??"").trim();v&&"No archive warnings."!==v&&i.onArchiveWarnings?.(v);const E=await Promise.resolve().then(function(){return require("./index-ucZa1KMb-CeffVEuy.js")});if(s){const e=Array.from(new Set([...b,`${o.replace(/\\/g,"/")}/output`]));await E.create({file:D,cwd:r,filter:S(o)},e)}else await E.create({file:D,cwd:r,filter:S(o)},b);if(!e.existsSync(g))try{await t.copyFile(D,g)}catch{}return D})(s,a.stanPath,{includeOutputDir:u,includes:a.includes??[],excludes:a.excludes??[]}),i?.progress?.done?.("full",f,o,Date.now()),c||console.log(`stan: ${Ef("done")} "${Ff("archive")}" -> ${Ff(f.replace(/\\/g,"/"))}`),await p(),p=async()=>{},c||console.log(`stan: start "${Ff("archive (diff)")}"`),i?.progress?.start?.("diff");const l=Date.now();({diffPath:d}=await _u({cwd:s,stanPath:a.stanPath,baseName:"archive",includes:a.includes??[],excludes:a.excludes??[],updateSnapshot:"createIfMissing",includeOutputDirInDiff:u})),i?.progress?.done?.("diff",d,l,Date.now()),c||console.log(`stan: ${Ef("done")} "${Ff("archive (diff)")}" -> ${Ff(d.replace(/\\/g,"/"))}`)}finally{await p()}return u&&await(async e=>{const r=await t.readdir(e,{withFileTypes:!0}),o=new Set(["archive.tar","archive.diff.tar"]);await Promise.all(r.map(async r=>{o.has(r.name)||await t.rm(n.resolve(e,r.name),{recursive:!0,force:!0})}))})(l.outputAbs),await(async(e,r)=>{const o=Nf(e,r);try{const e=await t.readdir(o.patchAbs,{withFileTypes:!0});await Promise.all(e.map(e=>t.rm(n.resolve(o.patchAbs,e.name),{recursive:!0,force:!0})))}catch{}})(s,a.stanPath),{archivePath:f,diffPath:d}};var If,Hf,zf="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Uf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qf=function(){if(Hf)return If;Hf=1;var e=y,t=e.spawn,n=e.exec;function r(e,t,n){var r={};try{Object.keys(e).forEach(function(n){e[n].forEach(function(e){r[e]||(o(e,t),r[e]=1)}),r[n]||(o(n,t),r[n]=1)})}catch(e){if(n)return n(e);throw e}if(n)return n()}function o(e,t){try{process.kill(parseInt(e,10),t)}catch(e){if("ESRCH"!==e.code)throw e}}function i(e,t,n,r,o){var s=r(e),a="";s.stdout.on("data",function(e){e=e.toString("ascii");a+=e});s.on("close",function(s){delete n[e],0==s?a.match(/\d+/g).forEach(function(s){s=parseInt(s,10),t[e].push(s),t[s]=[],n[s]=1,i(s,t,n,r,o)}):0==Object.keys(n).length&&o()})}return If=function(e,o,s){if("function"==typeof o&&void 0===s&&(s=o,o=void 0),e=parseInt(e),Number.isNaN(e)){if(s)return s(new Error("pid must be a number"));throw new Error("pid must be a number")}var a={},u={};switch(a[e]=[],u[e]=1,process.platform){case"win32":n("taskkill /pid "+e+" /T /F",s);break;case"darwin":i(e,a,u,function(e){return t("pgrep",["-P",e])},function(){r(a,o,s)});break;default:i(e,a,u,function(e){return t("ps",["-o","pid","--no-headers","--ppid",e])},function(){r(a,o,s)})}}}(),Kf=Uf(qf);const Gf=()=>new Promise(e=>setImmediate(e)),Wf=async(r,o,i,s,a,u,l,p,f)=>{const d=n.resolve(o,`${s}.txt`),h=Date.now();l?.onStart?.(s);const D=c.spawn(a,{cwd:r,shell:!0,windowsHide:!0}),g="1"===process.env.STAN_DEBUG;let m="";const y="number"==typeof p?.hangWarn&&p.hangWarn>0?p.hangWarn:0,b="number"==typeof p?.hangKill&&p.hangKill>0?p.hangKill:0,v="number"==typeof p?.hangKillGrace&&p.hangKillGrace>0?p.hangKillGrace:10;let E,F,C=Date.now(),w=!1,_=!1;try{"number"==typeof D.pid&&f&&f.track(`script:${s}`,D.pid)}catch{}const A=e.createWriteStream(d,{encoding:"utf8"});D.stdout.on("data",e=>{A.write(e),m+=e.toString("utf8"),g&&process.stdout.write(e),C=Date.now()}),D.stderr.on("data",e=>{A.write(e),m+=e.toString("utf8"),g&&process.stderr.write(e),C=Date.now()}),(y>0||b>0)&&(E=setInterval(()=>{const e=Date.now()-C;if(!w&&y>0&&e>=1e3*y&&(w=!0,l?.onHangWarn?.(s,y)),!_&&b>0&&e>=1e3*b){_=!0;try{"number"==typeof D.pid&&process.kill(D.pid,"SIGTERM")}catch{}l?.onHangTimeout?.(s,b);const e=Math.max(0,1e3*v);F=setTimeout(()=>{try{"number"==typeof D.pid&&Kf(D.pid,"SIGKILL")}catch{}l?.onHangKilled?.(s,v)},e)}},1e3));const S=await new Promise((e,t)=>{D.on("error",e=>t(e instanceof Error?e:new Error(String(e)))),D.on("close",t=>e(t??0))});E&&clearInterval(E),F&&clearTimeout(F),A.end(),await(e=>new Promise((t,n)=>{e.on("close",()=>t()),e.on("error",e=>n(e instanceof Error?e:new Error(String(e))))}))(A);let k="ok";if("number"==typeof S&&0!==S)k="error";else if(p?.warnPatterns&&p.warnPatterns.length>0){const e=(e,t)=>e.some(e=>{try{return e.lastIndex=0,e.test(t)}catch{return!1}});let n=!1;if(m.length>0&&e(p.warnPatterns,m))n=!0;else try{const r=await t.readFile(d,"utf8");e(p.warnPatterns,r)&&(n=!0)}catch{}n&&(k="warn")}return l?.onEnd?.(s,d,h,Date.now(),S,k),u&&await t.appendFile(u,s.slice(0,1).toUpperCase(),"utf8"),d},Zf=[];Zf.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Zf.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Zf.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Vf=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,Jf=Symbol.for("signal-exit emitter"),Yf=globalThis,Qf=Object.defineProperty.bind(Object);class Xf{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Yf[Jf])return Yf[Jf];Qf(Yf,Jf,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const n=this.listeners[e],r=n.indexOf(t);-1!==r&&(0===r&&1===n.length?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(const o of this.listeners[e])r=!0===o(t,n)||r;return"exit"===e&&(r=this.emit("afterExit",t,n)||r),r}}class ed{}const td=globalThis.process,{onExit:nd}=(rd=Vf(td)?new class extends ed{#e="win32"===td.platform?"SIGINT":"SIGHUP";#t=new Xf;#n;#r;#o;#i={};#s=!1;constructor(e){super(),this.#n=e,this.#i={};for(const t of Zf)this.#i[t]=()=>{const n=this.#n.listeners(t);let{count:r}=this.#t;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(r+=o.__signal_exit_emitter__.count),n.length===r){this.unload();const n=this.#t.emit("exit",null,t),r="SIGHUP"===t?this.#e:t;n||e.kill(e.pid,r)}};this.#o=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!Vf(this.#n))return()=>{};!1===this.#s&&this.load();const n=t?.alwaysLast?"afterExit":"exit";return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),0===this.#t.listeners.exit.length&&0===this.#t.listeners.afterExit.length&&this.unload()}}load(){if(!this.#s){this.#s=!0,this.#t.count+=1;for(const e of Zf)try{const t=this.#i[e];t&&this.#n.on(e,t)}catch(e){}this.#n.emit=(e,...t)=>this.#a(e,...t),this.#n.reallyExit=e=>this.#u(e)}}unload(){this.#s&&(this.#s=!1,Zf.forEach(e=>{const t=this.#i[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#n.removeListener(e,t)}catch(e){}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#o,this.#t.count-=1)}#u(e){return Vf(this.#n)?(this.#n.exitCode=e||0,this.#t.emit("exit",this.#n.exitCode,null),this.#o.call(this.#n,this.#n.exitCode)):0}#a(e,...t){const n=this.#r;if("exit"===e&&Vf(this.#n)){"number"==typeof t[0]&&(this.#n.exitCode=t[0]);const r=n.call(this.#n,e,...t);return this.#t.emit("exit",this.#n.exitCode,null),r}return n.call(this.#n,e,...t)}}(td):new class extends ed{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>rd.onExit(e,t),load:()=>rd.load(),unload:()=>rd.unload()});var rd;class od{behavior;constructor(e){this.behavior=e}pids=new Map;lastCancelled=[];track(e,t){this.pids.set(e,t)}cancelAll(e){const t="number"==typeof this.behavior.hangKillGrace?this.behavior.hangKillGrace:10,n=e?.immediate?0:Math.max(0,1e3*t),r=Array.from(this.pids.entries()),o=Array.from(this.pids.values());this.lastCancelled=o;for(const[,e]of r)try{Number.isFinite(e)&&process.kill(e,"SIGTERM")}catch{}const i=()=>{for(const[,e]of r)try{Number.isFinite(e)&&Kf(e,"SIGKILL")}catch{}};n<=0?setTimeout(i,0):setTimeout(i,n),this.pids.clear()}async waitAll(e=2e3){const t=this.lastCancelled.length>0?[...this.lastCancelled]:Array.from(this.pids.values());if(0===t.length)return;const n=Date.now()+Math.max(0,e),r=e=>{try{return process.kill(e,0)}catch{return!1}};for(;Date.now()<n;){if(0===t.filter(e=>r(e)).length)break;await new Promise(e=>setTimeout(e,50))}this.lastCancelled=[]}}class id{onCancel;onRestart;attached=!1;keyHandler;dataHandler;constructor(e){this.onCancel=e.onCancel,this.onRestart=e.onRestart}attach(){if(this.attached)return;this.attached=!0;const e=process.stdin,t=Boolean(process.stdout.isTTY),n=Boolean(e.isTTY);if(t&&n){try{b.emitKeypressEvents(e),e.setRawMode?.(!0),e.resume?.()}catch{}this.keyHandler=(e,t)=>{const n=((t??{}).name??"").toLowerCase();"q"!==n?"r"===n&&this.onRestart?.():this.onCancel()},this.dataHandler=e=>{try{if("string"==typeof e){const t=e.toLowerCase();return void(""===t||"q"===t?this.onCancel():"r"===t&&this.onRestart?.())}if(Buffer.isBuffer(e)){if(e.includes(3))return void this.onCancel();const t=e.toString("utf8").toLowerCase();"q"===t?this.onCancel():"r"===t&&this.onRestart?.()}}catch{}},e.on?.("keypress",this.keyHandler),e.on?.("data",this.dataHandler)}}detach(){if(!this.attached)return;this.attached=!1;const e=process.stdin,t=e.off?.bind(e)??e.removeListener?.bind(e);try{t&&this.keyHandler&&t("keypress",this.keyHandler),t&&this.dataHandler&&t("data",this.dataHandler)}catch{}try{e.setRawMode?.(!1),e.pause?.()}catch{}}}class sd{rows=new Map;listeners=new Set;subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}update(e,t,n){const r=this.rows.get(e),o=n??r?.meta;if(!o){const n=e.startsWith("archive:")?{type:"archive",item:e.slice(8)||"(unnamed)"}:{type:"script",item:e.replace(/^script:/,"")||"(unnamed)"};return this.rows.set(e,{meta:n,state:t}),void this.emit(e,n,t)}this.rows.set(e,{meta:o,state:t}),this.emit(e,o,t)}emit(e,t,n){for(const r of this.listeners)try{r({key:e,meta:t,state:n})}catch{}}counts(){let e=0,t=0,n=0,r=0,o=0,i=0,s=0,a=0,u=0;for(const[,c]of this.rows){switch(c.state.kind){case"warn":e+=1;break;case"waiting":t+=1;break;case"running":n+=1;break;case"quiet":r+=1;break;case"stalled":o+=1;break;case"done":i+=1;break;case"timedout":u+=1;break;case"cancelled":s+=1;break;case"error":case"killed":a+=1}}return{warn:e,waiting:t,running:n,quiet:r,stalled:o,ok:i,cancelled:s,fail:a,timeout:u}}}const ad=void 0!==globalThis.window?.document;globalThis.process,globalThis.process,globalThis.Deno,globalThis.process,globalThis.navigator?.userAgent?.includes("jsdom"),"undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope),"undefined"!=typeof DedicatedWorkerGlobalScope&&(globalThis,DedicatedWorkerGlobalScope),"undefined"!=typeof SharedWorkerGlobalScope&&(globalThis,SharedWorkerGlobalScope),"undefined"!=typeof ServiceWorkerGlobalScope&&(globalThis,ServiceWorkerGlobalScope);const ud=globalThis.navigator?.userAgentData?.platform;"macOS"===ud||"MacIntel"===globalThis.navigator?.platform||!0===globalThis.navigator?.userAgent?.includes(" Mac ")||globalThis.process,"Windows"===ud||"Win32"===globalThis.navigator?.platform||globalThis.process,"Linux"===ud||!0===globalThis.navigator?.platform?.startsWith("Linux")||!0===globalThis.navigator?.userAgent?.includes(" Linux ")||globalThis.process,"Android"===ud||"Android"===globalThis.navigator?.platform||!0===globalThis.navigator?.userAgent?.includes(" Android ")||globalThis.process;const cd="[";!ad&&o.env.TERM_PROGRAM,!ad&&o.platform,ad||o.cwd;const ld=(e=1)=>cd+e+"A",pd=(e=1)=>cd+e+"B",fd="",dd=e=>{let t="";for(let n=0;n<e;n++)t+=hd+(n<e-1?ld():"");return e&&(t+=fd),t},hd="",Dd=(e,t,n,r)=>{if("length"===n||"prototype"===n)return;if("arguments"===n||"caller"===n)return;const o=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!gd(o,i)&&r||Object.defineProperty(e,n,i)},gd=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},md=(e,t)=>`/* Wrapped ${e}*/\n${t}`,yd=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),bd=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");function vd(e,t,{ignoreNonConfigurable:n=!1}={}){const{name:r}=e;for(const r of Reflect.ownKeys(t))Dd(e,t,r,n);return((e,t)=>{const n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)})(e,t),((e,t,n)=>{const r=""===n?"":`with ${n.trim()}() `,o=md.bind(null,r,t.toString());Object.defineProperty(o,"name",bd);const{writable:i,enumerable:s,configurable:a}=yd;Object.defineProperty(e,"toString",{value:o,writable:i,enumerable:s,configurable:a})})(e,t,r),e}const Ed=new WeakMap,Fd=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let n,r=0;const o=e.displayName||e.name||"<anonymous>",i=function(...s){if(Ed.set(i,++r),1===r)n=e.apply(this,s),e=void 0;else if(!0===t.throw)throw new Error(`Function \`${o}\` can only be called once`);return n};return vd(i,e),Ed.set(i,r),i};Fd.callCount=e=>{if(!Ed.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Ed.get(e)};const Cd=o.stderr.isTTY?o.stderr:o.stdout.isTTY?o.stdout:void 0,wd=Cd?Fd(()=>{nd(()=>{Cd.write("[?25h")},{alwaysLast:!0})}):()=>{};let _d=!1;const Ad={};Ad.show=(e=o.stderr)=>{e.isTTY&&(_d=!1,e.write("[?25h"))},Ad.hide=(e=o.stderr)=>{e.isTTY&&(wd(),_d=!0,e.write("[?25l"))},Ad.toggle=(e,t)=>{void 0!==e&&(_d=e),_d?Ad.show(t):Ad.hide(t)};const Sd=function({onlyFirst:e=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",e?void 0:"g")}();function kd(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Sd,"")}function Pd(e){return 12288===e||e>=65281&&e<=65376||e>=65504&&e<=65510}function Rd(e){return e>=4352&&e<=4447||8986===e||8987===e||9001===e||9002===e||e>=9193&&e<=9196||9200===e||9203===e||9725===e||9726===e||9748===e||9749===e||e>=9776&&e<=9783||e>=9800&&e<=9811||9855===e||e>=9866&&e<=9871||9875===e||9889===e||9898===e||9899===e||9917===e||9918===e||9924===e||9925===e||9934===e||9940===e||9962===e||9970===e||9971===e||9973===e||9978===e||9981===e||9989===e||9994===e||9995===e||10024===e||10060===e||10062===e||e>=10067&&e<=10069||10071===e||e>=10133&&e<=10135||10160===e||10175===e||11035===e||11036===e||11088===e||11093===e||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||110589===e||110590===e||e>=110592&&e<=110882||110898===e||e>=110928&&e<=110930||110933===e||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||126980===e||127183===e||127374===e||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||127568===e||127569===e||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||127988===e||e>=127992&&e<=128062||128064===e||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||128378===e||128405===e||128406===e||128420===e||e>=128507&&e<=128591||e>=128640&&e<=128709||128716===e||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||128747===e||128748===e||e>=128756&&e<=128764||e>=128992&&e<=129003||129008===e||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||129736===e||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function xd(e,{ambiguousAsWide:t=!1}={}){return function(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}(e),Pd(e)||Rd(e)||t&&function(e){return 161===e||164===e||167===e||168===e||170===e||173===e||174===e||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||198===e||208===e||215===e||216===e||e>=222&&e<=225||230===e||e>=232&&e<=234||236===e||237===e||240===e||242===e||243===e||e>=247&&e<=250||252===e||254===e||257===e||273===e||275===e||283===e||294===e||295===e||299===e||e>=305&&e<=307||312===e||e>=319&&e<=322||324===e||e>=328&&e<=331||333===e||338===e||339===e||358===e||359===e||363===e||462===e||464===e||466===e||468===e||470===e||472===e||474===e||476===e||593===e||609===e||708===e||711===e||e>=713&&e<=715||717===e||720===e||e>=728&&e<=731||733===e||735===e||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||1025===e||e>=1040&&e<=1103||1105===e||8208===e||e>=8211&&e<=8214||8216===e||8217===e||8220===e||8221===e||e>=8224&&e<=8226||e>=8228&&e<=8231||8240===e||8242===e||8243===e||8245===e||8251===e||8254===e||8308===e||8319===e||e>=8321&&e<=8324||8364===e||8451===e||8453===e||8457===e||8467===e||8470===e||8481===e||8482===e||8486===e||8491===e||8531===e||8532===e||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||8585===e||e>=8592&&e<=8601||8632===e||8633===e||8658===e||8660===e||8679===e||8704===e||8706===e||8707===e||8711===e||8712===e||8715===e||8719===e||8721===e||8725===e||8730===e||e>=8733&&e<=8736||8739===e||8741===e||e>=8743&&e<=8748||8750===e||e>=8756&&e<=8759||8764===e||8765===e||8776===e||8780===e||8786===e||8800===e||8801===e||e>=8804&&e<=8807||8810===e||8811===e||8814===e||8815===e||8834===e||8835===e||8838===e||8839===e||8853===e||8857===e||8869===e||8895===e||8978===e||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||9632===e||9633===e||e>=9635&&e<=9641||9650===e||9651===e||9654===e||9655===e||9660===e||9661===e||9664===e||9665===e||e>=9670&&e<=9672||9675===e||e>=9678&&e<=9681||e>=9698&&e<=9701||9711===e||9733===e||9734===e||9737===e||9742===e||9743===e||9756===e||9758===e||9792===e||9794===e||9824===e||9825===e||e>=9827&&e<=9829||e>=9831&&e<=9834||9836===e||9837===e||9839===e||9886===e||9887===e||9919===e||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||9955===e||9960===e||9961===e||e>=9963&&e<=9969||9972===e||e>=9974&&e<=9977||9979===e||9980===e||9982===e||9983===e||10045===e||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||65533===e||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||127375===e||127376===e||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}(e)?2:1}var Bd=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;const Od=new Intl.Segmenter,Td=/^\p{Default_Ignorable_Code_Point}$/u;function $d(e,t={}){if("string"!=typeof e||0===e.length)return 0;const{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=kd(e)),0===e.length)return 0;let o=0;const i={ambiguousAsWide:!n};for(const{segment:t}of Od.segment(e)){const e=t.codePointAt(0);e<=31||e>=127&&e<=159||(e>=8203&&e<=8207||65279===e||e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071||e>=55296&&e<=57343||e>=65024&&e<=65039||Td.test(t)||(Bd().test(t)?o+=2:o+=xd(e,i)))}return o}const Ld=(e=0)=>t=>`[${t+e}m`,Nd=(e=0)=>t=>`[${38+e};5;${t}m`,Md=(e=0)=>(t,n,r)=>`[${38+e};2;${t};${n};${r}m`,jd={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(jd.modifier);Object.keys(jd.color),Object.keys(jd.bgColor);const Id=function(){const e=new Map;for(const[t,n]of Object.entries(jd)){for(const[t,r]of Object.entries(n))jd[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=jd[t],e.set(r[0],r[1]);Object.defineProperty(jd,t,{value:n,enumerable:!1})}return Object.defineProperty(jd,"codes",{value:e,enumerable:!1}),jd.color.close="",jd.bgColor.close="",jd.color.ansi=Ld(),jd.color.ansi256=Nd(),jd.color.ansi16m=Md(),jd.bgColor.ansi=Ld(10),jd.bgColor.ansi256=Nd(10),jd.bgColor.ansi16m=Md(10),Object.defineProperties(jd,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;3===n.length&&(n=[...n].map(e=>e+e).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},enumerable:!1},hexToAnsi256:{value:e=>jd.rgbToAnsi256(...jd.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return e-8+90;let t,n,r;if(e>=232)t=(10*(e-232)+8)/255,n=t,r=t;else{const o=(e-=16)%36;t=Math.floor(e/36)/5,n=Math.floor(o/6)/5,r=o%6/5}const o=2*Math.max(t,n,r);if(0===o)return 30;let i=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return 2===o&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>jd.ansi256ToAnsi(jd.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>jd.ansi256ToAnsi(jd.hexToAnsi256(e)),enumerable:!1}}),jd}(),Hd=new Set(["","›"]),zd="]8;;",Ud=e=>`${Hd.values().next().value}[${e}m`,qd=e=>`${Hd.values().next().value}${zd}${e}`,Kd=(e,t,n)=>{const r=[...t];let o=!1,i=!1,s=$d(kd(e.at(-1)));for(const[t,a]of r.entries()){const u=$d(a);if(s+u<=n?e[e.length-1]+=a:(e.push(a),s=0),Hd.has(a)){o=!0;i=r.slice(t+1,t+1+4).join("")===zd}o?i?""===a&&(o=!1,i=!1):"m"===a&&(o=!1):(s+=u,s===n&&t<r.length-1&&(e.push(""),s=0))}!s&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Gd=(e,t,n={})=>{if(!1!==n.trim&&""===e.trim())return"";let r,o,i="";const s=(e=>e.split(" ").map(e=>$d(e)))(e);let a=[""];for(const[r,o]of e.split(" ").entries()){!1!==n.trim&&(a[a.length-1]=a.at(-1).trimStart());let e=$d(a.at(-1));if(0!==r&&(e>=t&&(!1===n.wordWrap||!1===n.trim)&&(a.push(""),e=0),(e>0||!1===n.trim)&&(a[a.length-1]+=" ",e++)),n.hard&&s[r]>t){const n=t-e,i=1+Math.floor((s[r]-n-1)/t);Math.floor((s[r]-1)/t)<i&&a.push(""),Kd(a,o,t);continue}if(e+s[r]>t&&e>0&&s[r]>0){if(!1===n.wordWrap&&e<t){Kd(a,o,t);continue}a.push("")}e+s[r]>t&&!1===n.wordWrap?Kd(a,o,t):a[a.length-1]+=o}!1!==n.trim&&(a=a.map(e=>(e=>{const t=e.split(" ");let n=t.length;for(;n>0&&!($d(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(" ")+t.slice(n).join("")})(e)));const u=a.join("\n"),c=[...u];let l=0;for(const[e,t]of c.entries()){if(i+=t,Hd.has(t)){const{groups:e}=new RegExp(`(?:\\[(?<code>\\d+)m|\\${zd}(?<uri>.*))`).exec(u.slice(l))||{groups:{}};if(void 0!==e.code){const t=Number.parseFloat(e.code);r=39===t?void 0:t}else void 0!==e.uri&&(o=0===e.uri.length?void 0:e.uri)}const n=Id.codes.get(Number(r));"\n"===c[e+1]?(o&&(i+=qd("")),r&&n&&(i+=Ud(n))):"\n"===t&&(r&&n&&(i+=Ud(r)),o&&(i+=qd(o))),l+=t.length}return i};function Wd(e){return!!Number.isInteger(e)&&(Pd(e)||Rd(e))}const Zd=new Set([27,155]),Vd="0".codePointAt(0),Jd="9".codePointAt(0),Yd=new Set,Qd=new Map;for(const[e,t]of Id.codes)Yd.add(Id.color.ansi(t)),Qd.set(Id.color.ansi(e),Id.color.ansi(t));function Xd(e){if(Yd.has(e))return e;if(Qd.has(e))return Qd.get(e);(e=e.slice(2)).includes(";")&&(e=e[0]+"0");const t=Id.codes.get(Number.parseInt(e,10));return t?Id.color.ansi(t):Id.reset.open}function eh(e,t){const n=function(e){for(let t=0;t<e.length;t++){const n=e.codePointAt(t);if(n>=Vd&&n<=Jd)return t}return-1}(e=e.slice(t,t+19));if(-1!==n){let t=e.indexOf("m",n);return-1===t&&(t=e.length),e.slice(0,t+1)}}function th(e){let t=[];for(const n of e)n.code===Id.reset.open?t=[]:Yd.has(n.code)?t=t.filter(e=>e.endCode!==n.code):(t=t.filter(e=>e.endCode!==n.endCode),t.push(n));return t}function nh(e,t,n){const r=function(e,t=Number.POSITIVE_INFINITY){const n=[];let r=0,o=0;for(;r<e.length;){const i=e.codePointAt(r);if(Zd.has(i)){const t=eh(e,r);if(t){n.push({type:"ansi",code:t,endCode:Xd(t)}),r+=t.length;continue}}const s=Wd(i),a=String.fromCodePoint(i);if(n.push({type:"character",value:a,isFullWidth:s}),r+=a.length,o+=s?2:a.length,o>=t)break}return n}(e,n);let o=[],i=0,s="",a=!1;for(const e of r)"ansi"===e.type?(o.push(e),a&&(s+=e.code)):(!a&&i>=t&&(a=!0,o=th(o),s=o.map(({code:e})=>e).join("")),a&&(s+=e.value),i+=e.isFullWidth?2:e.value.length);return s+=th(o).map(({endCode:e})=>e).reverse().join(""),s}const rh=(e,t)=>e.columns??t??80;function oh(e,{showCursor:t=!1,defaultWidth:n,defaultHeight:r}={}){let o=0,i=rh(e,n),s="";const a=(t,n)=>{const o=String(t),i=o.endsWith("\n")?o:`${o}\n`,s=(a=n,u={trim:!1,hard:!0,wordWrap:!1},String(i).normalize().replaceAll("\r\n","\n").split("\n").map(e=>Gd(e,a,u)).join("\n"));var a,u;const{text:c,wasClipped:l}=((e,t,n)=>{const r=e.rows??n??24;if(void 0===r)return{text:t,wasClipped:!1};if(0===r)return{text:"",wasClipped:""!==t};const o=kd(t),i=[...o].filter(e=>"\n"===e).length+1,s=Math.max(0,i-r);if(0===s)return{text:t,wasClipped:!1};let a=0,u=0;for(const[e,t]of[...o].entries())if("\n"===t&&(a++,a===s)){u=e+1;break}return{text:nh(t,u),wasClipped:!0}})(e,s,r),p=""===c?[]:c.split("\n");return{wrapped:c,lines:p,wasClipped:l}},u=()=>{s="",i=rh(e,n),o=0},c=(...r)=>{t||Ad.hide();const u=rh(e,n),{wrapped:c,lines:l,wasClipped:p}=a(r.join(" "),u);if(0===l.length)return s=c,i=u,void(o=0);if(c===s&&i===u)return;if(0===o)return e.write(c),s=c,i=u,void(o=l.length);if(i!==u||p)return e.write(dd(o)+c),s=c,i=u,void(o=l.length);const f=""===s?[]:s.split("\n"),{start:d,endPrevious:h,endNext:D}=((e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);let r=e.length-1,o=t.length-1;for(;r>=n&&o>=n&&e[r]===t[o];)r--,o--;return{start:n,endPrevious:r,endNext:o}})(f,l);if(d===l.length&&o===l.length)return;if(0===d)return e.write(dd(o)+c),s=c,i=u,void(o=l.length);const g=(({prevCount:e,start:t,endPrevious:n,endNext:r,nextLines:o,nextWrappedEndsWithNewline:i})=>{let s="";const a=Math.max(0,e-1-t);a>0&&(s+=ld(a)),s+=fd;const u=Math.max(0,n-t+1);for(let e=0;e<u;e++)s+=hd,e<u-1&&(s+=pd());u>1&&(s+=ld(u-1)),s+=fd;const c=o.slice(t,r+1);if(c.length>0){let e=c.join("\n");i&&!e.endsWith("\n")&&(e+="\n"),s+=e,s+=""}const l=t+c.length,p=o.length-1-l;return p>0&&(s+=pd(p)),s})({prevCount:o,start:d,endPrevious:h,endNext:D,nextLines:l,nextWrappedEndsWithNewline:c.endsWith("\n")});e.write(g),s=c,i=u,o=l.length};return c.clear=()=>{e.write(dd(o)),u()},c.done=()=>{u(),t||Ad.show()},c.persist=(...t)=>{o>0&&(e.write(dd(o)),o=0);const r=`${t.join(" ")}`,i=rh(e,n),{wrapped:s}=a(r,i);e.write(s),u()},c}const ih=oh(o.stdout);oh(o.stderr);var sh,ah,uh,ch,lh={},ph={},fh={},dh={},hh={exports:{}};function Dh(){return ah?sh:(ah=1,sh=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})}function gh(){if(ch)return uh;ch=1;const e=Dh();return uh=t=>"string"==typeof t?t.replace(e(),""):t}var mh,yh,bh,vh,Eh={exports:{}};function Fh(){if(mh)return Eh.exports;mh=1;const e=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));return Eh.exports=e,Eh.exports.default=e,Eh.exports}function Ch(){return bh?yh:(bh=1,yh=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g})}function wh(){if(vh)return hh.exports;vh=1;const e=gh(),t=Fh(),n=Ch(),r=r=>{if("string"!=typeof r||0===r.length)return 0;if(0===(r=e(r)).length)return 0;r=r.replace(n()," ");let o=0;for(let e=0;e<r.length;e++){const n=r.codePointAt(e);n<=31||n>=127&&n<=159||(n>=768&&n<=879||(n>65535&&e++,o+=t(n)?2:1))}return o};return hh.exports=r,hh.exports.default=r,hh.exports}var _h,Ah,Sh={};var kh,Ph,Rh,xh,Bh,Oh,Th,$h,Lh,Nh,Mh,jh={exports:{}};function Ih(){if(xh)return Rh;xh=1;const e=Ph?kh:(Ph=1,kh={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Rh=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}function r(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=i-o;let a,u;i===o?a=0:t===i?a=(n-r)/s:n===i?a=2+(r-t)/s:r===i&&(a=4+(t-n)/s),a=Math.min(60*a,360),a<0&&(a+=360);const c=(o+i)/2;return u=i===o?0:c<=.5?s/(i+o):s/(2-i-o),[a,100*u,100*c]},n.rgb.hsv=function(e){let t,n,r,o,i;const s=e[0]/255,a=e[1]/255,u=e[2]/255,c=Math.max(s,a,u),l=c-Math.min(s,a,u),p=function(e){return(c-e)/6/l+.5};return 0===l?(o=0,i=0):(i=l/c,t=p(s),n=p(a),r=p(u),s===c?o=r-n:a===c?o=1/3+t-r:u===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*c]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let o=e[2];const i=n.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(r,o));return o=1-1/255*Math.max(t,Math.max(r,o)),[i,100*s,100*o]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},n.rgb.keyword=function(n){const o=t[n];if(o)return o;let i,s=1/0;for(const t of Object.keys(e)){const o=r(n,e[t]);o<s&&(s=o,i=t)}return i},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],o=t[1],i=t[2];r/=95.047,o/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*o-16,500*(r-o),200*(o-i)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,i,s;if(0===n)return s=255*r,[s,s,s];o=r<.5?r*(1+n):r+n-r*n;const a=2*r-o,u=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,s=6*i<1?a+6*(o-a)*i:2*i<1?o:3*i<2?a+(o-a)*(2/3-i)*6:a,u[e]=255*s;return u},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const i=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=i<=1?i:2-i;return[t,100*(0===r?2*o/(i+o):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,i=t-Math.floor(t),s=255*r*(1-n),a=255*r*(1-n*i),u=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,u,s];case 1:return[a,r,s];case 2:return[s,r,u];case 3:return[s,a,r];case 4:return[u,s,r];case 5:return[r,s,a]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let i,s;s=(2-n)*r;const a=(2-n)*o;return i=n*o,i/=a<=1?a:2-a,i=i||0,s/=2,[t,100*i,100*s]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let i;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),a=1-r;i=6*t-s,1&s&&(i=1-i);const u=n+i*(a-n);let c,l,p;switch(s){default:case 6:case 0:c=a,l=u,p=n;break;case 1:c=u,l=a,p=n;break;case 2:c=n,l=a,p=u;break;case 3:c=n,l=u,p=a;break;case 4:c=u,l=n,p=a;break;case 5:c=a,l=n,p=u}return[255*c,255*l,255*p]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,i,s;return o=3.2406*t+-1.5372*n+-.4986*r,i=-.9689*t+1.8758*n+.0415*r,s=.0557*t+-.204*n+1.057*r,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),[255*o,255*i,255*s]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const o=n**3,i=t**3,s=r**3;return n=o>.008856?o:(n-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=360*Math.atan2(r,n)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(n*n+r*r),o]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,o,i]=e;let s=null===t?n.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),0===s)return 30;let a=30+(Math.round(i/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return 2===s&&(a+=60),a},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map(e=>e+e).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),i=Math.min(Math.min(t,n),r),s=o-i;let a,u;return a=s<1?i/(1-s):0,u=s<=0?0:o===t?(n-r)/s%6:o===n?2+(r-t)/s:4+(t-n)/s,u/=6,u%=1,[360*u,100*s,100*a]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const o=[0,0,0],i=t%1*6,s=i%1,a=1-s;let u=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=a,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=a,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=a}return u=(1-n)*r,[255*(n*o[0]+u),255*(n*o[1]+u),255*(n*o[2]+u)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},Rh}function Hh(){if(Oh)return Bh;Oh=1;const e=Ih();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),o=Object.keys(e[t]);for(let e=o.length,i=0;i<e;i++){const e=o[i],s=n[e];-1===s.distance&&(s.distance=n[t].distance+1,s.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const o=[r[t].parent,t];let i=e[r[t].parent][t],s=r[t].parent;for(;r[s].parent;)o.unshift(r[s].parent),i=n(e[r[s].parent][s],i),s=r[s].parent;return i.conversion=o,i}return Bh=function(e){const n=t(e),o={},i=Object.keys(n);for(let e=i.length,t=0;t<e;t++){const e=i[t];null!==n[e].parent&&(o[e]=r(e,n))}return o},Bh}function zh(){if($h)return Th;$h=1;const e=Ih(),t=Hh(),n={};return Object.keys(e).forEach(r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const o=t(r);Object.keys(o).forEach(e=>{const t=o[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)})}),Th=n}function Uh(){return Lh||(Lh=1,function(e){const t=(e,t)=>(...n)=>`[${e(...n)+t}m`,n=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`},r=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`},o=e=>e,i=(e,t,n)=>[e,t,n],s=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let a;const u=(e,t,n,r)=>{void 0===a&&(a=zh());const o=r?10:0,i={};for(const[r,s]of Object.entries(a)){const a="ansi16"===r?"ansi":r;r===t?i[a]=e(n,o):"object"==typeof s&&(i[a]=e(s[t],o))}return i};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.gray=a.color.blackBright,a.bgColor.bgGray=a.bgColor.bgBlackBright,a.color.grey=a.color.blackBright,a.bgColor.bgGrey=a.bgColor.bgBlackBright;for(const[t,n]of Object.entries(a)){for(const[t,r]of Object.entries(n))a[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=a[t],e.set(r[0],r[1]);Object.defineProperty(a,t,{value:n,enumerable:!1})}return Object.defineProperty(a,"codes",{value:e,enumerable:!1}),a.color.close="",a.bgColor.close="",s(a.color,"ansi",()=>u(t,"ansi16",o,!1)),s(a.color,"ansi256",()=>u(n,"ansi256",o,!1)),s(a.color,"ansi16m",()=>u(r,"rgb",i,!1)),s(a.bgColor,"ansi",()=>u(t,"ansi16",o,!0)),s(a.bgColor,"ansi256",()=>u(n,"ansi256",o,!0)),s(a.bgColor,"ansi16m",()=>u(r,"rgb",i,!0)),a}})}(jh)),jh.exports}function qh(){if(Mh)return Nh;Mh=1;const e=Fh(),t=function(){if(Ah)return _h;Ah=1;const e="[\ud800-\udbff][\udc00-\udfff]";return _h=t=>t&&t.exact?new RegExp(`^${e}$`):new RegExp(e,"g")}(),n=Uh(),r=["","›"],o=e=>`${r[0]}[${e}m`,i=(e,t,r)=>{let i=[];e=[...e];for(let r of e){const s=r;r.includes(";")&&(r=r.split(";")[0][0]+"0");const a=n.codes.get(Number.parseInt(r,10));if(a){const n=e.indexOf(a.toString());-1===n?i.push(o(t?a:s)):e.splice(n,1)}else{if(t){i.push(o(0));break}i.push(o(s))}}if(t&&(i=i.filter((e,t)=>i.indexOf(e)===t),void 0!==r)){const e=o(n.codes.get(Number.parseInt(r,10)));i=i.reduce((t,n)=>n===e?[n,...t]:[...t,n],[])}return i.join("")};return Nh=(n,o,s)=>{const a=[...n],u=[];let c,l="number"==typeof s?s:a.length,p=!1,f=0,d="";for(const[h,D]of a.entries()){let a=!1;if(r.includes(D)){const e=/\d[^m]*/.exec(n.slice(h,h+18));c=e&&e.length>0?e[0]:void 0,f<l&&(p=!0,void 0!==c&&u.push(c))}else p&&"m"===D&&(p=!1,a=!0);if(p||a||f++,!t({exact:!0}).test(D)&&e(D.codePointAt())&&(f++,"number"!=typeof s&&l++),f>o&&f<=l)d+=D;else if(f!==o||p||void 0===c){if(f>=l){d+=i(u,!0,c);break}}else d=i(u)}return d}}var Kh,Gh,Wh,Zh,Vh={};function Jh(){if(Kh)return Vh;Kh=1,Object.defineProperty(Vh,"__esModule",{value:!0}),Vh.getBorderCharacters=void 0;return Vh.getBorderCharacters=e=>{if("honeywell"===e)return{topBody:"═",topJoin:"╤",topLeft:"╔",topRight:"╗",bottomBody:"═",bottomJoin:"╧",bottomLeft:"╚",bottomRight:"╝",bodyLeft:"║",bodyRight:"║",bodyJoin:"│",headerJoin:"┬",joinBody:"─",joinLeft:"╟",joinRight:"╢",joinJoin:"┼",joinMiddleDown:"┬",joinMiddleUp:"┴",joinMiddleLeft:"┤",joinMiddleRight:"├"};if("norc"===e)return{topBody:"─",topJoin:"┬",topLeft:"┌",topRight:"┐",bottomBody:"─",bottomJoin:"┴",bottomLeft:"└",bottomRight:"┘",bodyLeft:"│",bodyRight:"│",bodyJoin:"│",headerJoin:"┬",joinBody:"─",joinLeft:"├",joinRight:"┤",joinJoin:"┼",joinMiddleDown:"┬",joinMiddleUp:"┴",joinMiddleLeft:"┤",joinMiddleRight:"├"};if("ramac"===e)return{topBody:"-",topJoin:"+",topLeft:"+",topRight:"+",bottomBody:"-",bottomJoin:"+",bottomLeft:"+",bottomRight:"+",bodyLeft:"|",bodyRight:"|",bodyJoin:"|",headerJoin:"+",joinBody:"-",joinLeft:"|",joinRight:"|",joinJoin:"|",joinMiddleDown:"+",joinMiddleUp:"+",joinMiddleLeft:"+",joinMiddleRight:"+"};if("void"===e)return{topBody:"",topJoin:"",topLeft:"",topRight:"",bottomBody:"",bottomJoin:"",bottomLeft:"",bottomRight:"",bodyLeft:"",bodyRight:"",bodyJoin:"",headerJoin:"",joinBody:"",joinLeft:"",joinRight:"",joinJoin:"",joinMiddleDown:"",joinMiddleUp:"",joinMiddleLeft:"",joinMiddleRight:""};throw new Error('Unknown border template "'+e+'".')},Vh}function Yh(){if(Gh)return Sh;Gh=1;var e=Sh&&Sh.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.isCellInRange=Sh.areCellEqual=Sh.calculateRangeCoordinate=Sh.flatten=Sh.extractTruncates=Sh.sumArray=Sh.sequence=Sh.distributeUnevenly=Sh.countSpaceSequence=Sh.groupBySizes=Sh.makeBorderConfig=Sh.splitAnsi=Sh.normalizeString=void 0;const t=e(qh()),n=e(wh()),r=e(gh()),o=Jh();Sh.normalizeString=e=>e.replace(/\r\n/g,"\n");Sh.splitAnsi=e=>{const o=(0,r.default)(e).split("\n").map(n.default),i=[];let s=0;return o.forEach(n=>{i.push(0===n?"":(0,t.default)(e,s,s+n)),s+=n+1}),i};Sh.makeBorderConfig=e=>({...(0,o.getBorderCharacters)("honeywell"),...e});Sh.groupBySizes=(e,t)=>{let n=0;return t.map(t=>{const r=e.slice(n,n+t);return n+=t,r})};Sh.countSpaceSequence=e=>{var t,n;return null!==(n=null===(t=e.match(/\s+/g))||void 0===t?void 0:t.length)&&void 0!==n?n:0};Sh.distributeUnevenly=(e,t)=>Array.from({length:t}).fill(Math.floor(e/t)).map((n,r)=>n+(r<e%t?1:0));Sh.sequence=(e,t)=>Array.from({length:t-e+1},(t,n)=>n+e);Sh.sumArray=e=>e.reduce((e,t)=>e+t,0);Sh.extractTruncates=e=>e.columns.map(({truncate:e})=>e);Sh.flatten=e=>[].concat(...e);Sh.calculateRangeCoordinate=e=>{const{row:t,col:n,colSpan:r=1,rowSpan:o=1}=e;return{bottomRight:{col:n+r-1,row:t+o-1},topLeft:{col:n,row:t}}};Sh.areCellEqual=(e,t)=>e.row===t.row&&e.col===t.col;return Sh.isCellInRange=(e,{topLeft:t,bottomRight:n})=>t.row<=e.row&&e.row<=n.row&&t.col<=e.col&&e.col<=n.col,Sh}function Qh(){if(Wh)return dh;Wh=1;var e=dh&&dh.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dh,"__esModule",{value:!0}),dh.alignString=void 0;const t=e(wh()),n=Yh(),r=(e,t)=>e+" ".repeat(t);return dh.alignString=(e,o,i)=>{const s=(0,t.default)(e);if(s===o)return e;if(s>o)throw new Error("Subject parameter value width cannot be greater than the container width.");if(0===s)return" ".repeat(o);const a=o-s;return"left"===i?r(e,a):"right"===i?((e,t)=>" ".repeat(t)+e)(e,a):"justify"===i?((e,t)=>{const o=(0,n.countSpaceSequence)(e);if(0===o)return r(e,t);const i=(0,n.distributeUnevenly)(t,o);if(Math.max(...i)>3)return r(e,t);let s=0;return e.replace(/\s+/g,e=>e+" ".repeat(i[s++]))})(e,a):((e,t)=>" ".repeat(Math.floor(t/2))+e+" ".repeat(Math.ceil(t/2)))(e,a)},dh}function Xh(){if(Zh)return fh;Zh=1,Object.defineProperty(fh,"__esModule",{value:!0}),fh.alignTableData=void 0;const e=Qh();return fh.alignTableData=(t,n)=>t.map((t,r)=>t.map((t,o)=>{var i;const{width:s,alignment:a}=n.columns[o];return(null===(i=n.spanningCellManager)||void 0===i?void 0:i.getContainingRange({col:o,row:r},{mapped:!0}))?t:(0,e.alignString)(t,s,a)})),fh}var eD,tD={},nD={},rD={},oD={};function iD(){if(eD)return oD;eD=1;var e=oD&&oD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oD,"__esModule",{value:!0}),oD.wrapString=void 0;const t=e(qh()),n=e(wh());return oD.wrapString=(e,r)=>{let o=e;const i=[];do{i.push((0,t.default)(o,0,r)),o=(0,t.default)(o,r).trim()}while((0,n.default)(o));return i},oD}var sD,aD,uD,cD,lD={};function pD(){if(sD)return lD;sD=1;var e=lD&&lD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lD,"__esModule",{value:!0}),lD.wrapWord=void 0;const t=e(qh()),n=e(gh());return lD.wrapWord=(e,r)=>{const o=[];let i=0;return((e,t)=>{let r=(0,n.default)(e);const o=[],i=new RegExp("(^.{1,"+String(Math.max(t,1))+"}(\\s+|$))|(^.{1,"+String(Math.max(t-1,1))+"}(\\\\|/|_|\\.|,|;|-))");do{let e;const n=i.exec(r);if(n){e=n[0],r=r.slice(e.length);const t=e.trim().length,i=e.length-t;o.push([t,i])}else e=r.slice(0,t),r=r.slice(t),o.push([e.length,0])}while(r.length);return o})(e,r).forEach(([n,r])=>{o.push((0,t.default)(e,i,i+n)),i+=n+r}),o},lD}function fD(){if(aD)return rD;aD=1,Object.defineProperty(rD,"__esModule",{value:!0}),rD.wrapCell=void 0;const e=Yh(),t=iD(),n=pD();return rD.wrapCell=(r,o,i)=>{const s=(0,e.splitAnsi)(r);for(let e=0;e<s.length;){let r;r=i?(0,n.wrapWord)(s[e],o):(0,t.wrapString)(s[e],o),s.splice(e,1,...r),e+=r.length}return s},rD}function dD(){if(uD)return nD;uD=1,Object.defineProperty(nD,"__esModule",{value:!0}),nD.calculateCellHeight=void 0;const e=fD();return nD.calculateCellHeight=(t,n,r=!1)=>(0,e.wrapCell)(t,n,r).length,nD}function hD(){if(cD)return tD;cD=1,Object.defineProperty(tD,"__esModule",{value:!0}),tD.calculateRowHeights=void 0;const e=dD(),t=Yh();return tD.calculateRowHeights=(n,r)=>{const o=[];for(const[i,s]of n.entries()){let a=1;s.forEach((s,u)=>{var c;const l=null===(c=r.spanningCellManager)||void 0===c?void 0:c.getContainingRange({col:u,row:i});if(!l){const t=(0,e.calculateCellHeight)(s,r.columns[u].width,r.columns[u].wrapWord);return void(a=Math.max(a,t))}const{topLeft:p,bottomRight:f,height:d}=l;if(i===f.row){const e=(0,t.sumArray)(o.slice(p.row)),i=f.row-p.row,s=(0,t.sequence)(p.row+1,f.row).filter(e=>{var t;return!(null===(t=r.drawHorizontalLine)||void 0===t?void 0:t.call(r,e,n.length))}).length,u=d-e-i+s;a=Math.max(a,u)}}),o.push(a)}return o},tD}var DD,gD,mD={},yD={};function bD(){if(DD)return yD;DD=1,Object.defineProperty(yD,"__esModule",{value:!0}),yD.drawContent=void 0;return yD.drawContent=e=>{const{contents:t,separatorGetter:n,drawSeparator:r,spanningCellManager:o,rowIndex:i,elementType:s}=e,a=t.length,u=[];return r(0,a)&&u.push(n(0,a)),t.forEach((e,t)=>{if(s&&"border"!==s&&"row"!==s||u.push(e),"cell"===s&&void 0===i&&u.push(e),"cell"===s&&void 0!==i){const n=null==o?void 0:o.getContainingRange({col:t,row:i});n&&t!==n.topLeft.col||u.push(e)}if(t+1<a&&r(t+1,a)){const e=n(t+1,a);if("cell"===s&&void 0!==i){const n={col:t+1,row:i},r=null==o?void 0:o.getContainingRange(n);r&&r.topLeft.col!==n.col||u.push(e)}else u.push(e)}}),r(a,a)&&u.push(n(a,a)),u.join("")},yD}function vD(){return gD||(gD=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createTableBorderGetter=e.drawBorderBottom=e.drawBorderJoin=e.drawBorderTop=e.drawBorder=e.createSeparatorGetter=e.drawBorderSegments=void 0;const t=bD();e.drawBorderSegments=(e,t)=>{const{separator:n,horizontalBorderIndex:r,spanningCellManager:o}=t;return e.map((e,t)=>{const i=n.body.repeat(e);if(void 0===r)return i;const s=null==o?void 0:o.getContainingRange({col:t,row:r});if(!s)return i;const{topLeft:a}=s;return r===a.row?i:t!==a.col?"":s.extractBorderContent(r)})};e.createSeparatorGetter=e=>{const{separator:t,spanningCellManager:n,horizontalBorderIndex:r,rowCount:o}=e;return(e,i)=>{const s=null==n?void 0:n.inSameRange;if(void 0!==r&&s){const n={col:e,row:r-1},a={col:e-1,row:r},u={col:e-1,row:r-1},c={col:e,row:r},l=[[u,n],[n,c],[c,a],[a,u]];if(0===e)return s(c,n)&&t.bodyJoinOuter?t.bodyJoinOuter:t.left;if(e===i)return s(u,a)&&t.bodyJoinOuter?t.bodyJoinOuter:t.right;if(0===r)return s(c,a)?t.body:t.join;if(r===o)return s(n,u)?t.body:t.join;const p=l.map(e=>s(...e)).filter(Boolean).length;if(0===p)return t.join;if(4===p)return"";if(2===p)return s(...l[1])&&s(...l[3])&&t.bodyJoinInner?t.bodyJoinInner:t.body;if(1===p){if(!(t.joinRight&&t.joinLeft&&t.joinUp&&t.joinDown))throw new Error(`Can not get border separator for position [${r}, ${e}]`);return s(...l[0])?t.joinDown:s(...l[1])?t.joinLeft:s(...l[2])?t.joinUp:t.joinRight}throw new Error("Invalid case")}return 0===e?t.left:e===i?t.right:t.join}};e.drawBorder=(n,r)=>{const o=(0,e.drawBorderSegments)(n,r),{drawVerticalLine:i,horizontalBorderIndex:s,spanningCellManager:a}=r;return(0,t.drawContent)({contents:o,drawSeparator:i,elementType:"border",rowIndex:s,separatorGetter:(0,e.createSeparatorGetter)(r),spanningCellManager:a})+"\n"};e.drawBorderTop=(t,n)=>{const{border:r}=n,o=(0,e.drawBorder)(t,{...n,separator:{body:r.topBody,join:r.topJoin,left:r.topLeft,right:r.topRight}});return"\n"===o?"":o};e.drawBorderJoin=(t,n)=>{const{border:r}=n;return(0,e.drawBorder)(t,{...n,separator:{body:r.joinBody,bodyJoinInner:r.bodyJoin,bodyJoinOuter:r.bodyLeft,join:r.joinJoin,joinDown:r.joinMiddleDown,joinLeft:r.joinMiddleLeft,joinRight:r.joinMiddleRight,joinUp:r.joinMiddleUp,left:r.joinLeft,right:r.joinRight}})};e.drawBorderBottom=(t,n)=>{const{border:r}=n;return(0,e.drawBorder)(t,{...n,separator:{body:r.bottomBody,join:r.bottomJoin,left:r.bottomLeft,right:r.bottomRight}})};e.createTableBorderGetter=(t,n)=>(r,o)=>{const i={...n,horizontalBorderIndex:r};return 0===r?(0,e.drawBorderTop)(t,i):r===o?(0,e.drawBorderBottom)(t,i):(0,e.drawBorderJoin)(t,i)}}(mD)),mD}var ED,FD={};function CD(){if(ED)return FD;ED=1,Object.defineProperty(FD,"__esModule",{value:!0}),FD.drawRow=void 0;const e=bD();return FD.drawRow=(t,n)=>{const{border:r,drawVerticalLine:o,rowIndex:i,spanningCellManager:s}=n;return(0,e.drawContent)({contents:t,drawSeparator:o,elementType:"cell",rowIndex:i,separatorGetter:(e,t)=>0===e?r.bodyLeft:e===t?r.bodyRight:r.bodyJoin,spanningCellManager:s})+"\n"},FD}var wD,_D,AD,SD,kD,PD,RD={},xD={},BD={},OD={};function TD(){if(AD)return OD;AD=1,Object.defineProperty(OD,"__esModule",{value:!0});const e=(_D||(_D=1,wD=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!==o--;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}),wD);return e.code='require("ajv/dist/runtime/equal").default',OD.default=e,OD}function $D(){return SD||(SD=1,function(e){e["config.json"]=function e(n,{instancePath:o="",parentData:s,parentDataProperty:u,rootData:c=n}={}){let l=null,p=0;if(n&&"object"==typeof n&&!Array.isArray(n)){for(const e in n)if("border"!==e&&"header"!==e&&"columns"!==e&&"columnDefault"!==e&&"drawVerticalLine"!==e&&"drawHorizontalLine"!==e&&"singleLine"!==e&&"spanningCells"!==e){const t={instancePath:o,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===l?l=[t]:l.push(t),p++}if(void 0!==n.border&&(i(n.border,{instancePath:o+"/border",parentData:n,parentDataProperty:"border",rootData:c})||(l=null===l?i.errors:l.concat(i.errors),p=l.length)),void 0!==n.header){let e=n.header;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.content){const e={instancePath:o+"/header",schemaPath:"#/properties/header/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};null===l?l=[e]:l.push(e),p++}for(const t in e)if("content"!==t&&"alignment"!==t&&"wrapWord"!==t&&"truncate"!==t&&"paddingLeft"!==t&&"paddingRight"!==t){const e={instancePath:o+"/header",schemaPath:"#/properties/header/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:t},message:"must NOT have additional properties"};null===l?l=[e]:l.push(e),p++}if(void 0!==e.content&&"string"!=typeof e.content){const e={instancePath:o+"/header/content",schemaPath:"#/properties/header/properties/content/type",keyword:"type",params:{type:"string"},message:"must be string"};null===l?l=[e]:l.push(e),p++}if(void 0!==e.alignment&&(a(e.alignment,{instancePath:o+"/header/alignment",parentData:e,parentDataProperty:"alignment",rootData:c})||(l=null===l?a.errors:l.concat(a.errors),p=l.length)),void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:o+"/header/wrapWord",schemaPath:"#/properties/header/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===l?l=[e]:l.push(e),p++}if(void 0!==e.truncate){let t=e.truncate;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:o+"/header/truncate",schemaPath:"#/properties/header/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}}if(void 0!==e.paddingLeft){let t=e.paddingLeft;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:o+"/header/paddingLeft",schemaPath:"#/properties/header/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}}if(void 0!==e.paddingRight){let t=e.paddingRight;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:o+"/header/paddingRight",schemaPath:"#/properties/header/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}}}else{const e={instancePath:o+"/header",schemaPath:"#/properties/header/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),p++}}if(void 0!==n.columns&&(d(n.columns,{instancePath:o+"/columns",parentData:n,parentDataProperty:"columns",rootData:c})||(l=null===l?d.errors:l.concat(d.errors),p=l.length)),void 0!==n.columnDefault&&(h(n.columnDefault,{instancePath:o+"/columnDefault",parentData:n,parentDataProperty:"columnDefault",rootData:c})||(l=null===l?h.errors:l.concat(h.errors),p=l.length)),void 0!==n.drawVerticalLine&&"function"!=typeof n.drawVerticalLine){const e={instancePath:o+"/drawVerticalLine",schemaPath:"#/properties/drawVerticalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),p++}if(void 0!==n.drawHorizontalLine&&"function"!=typeof n.drawHorizontalLine){const e={instancePath:o+"/drawHorizontalLine",schemaPath:"#/properties/drawHorizontalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),p++}if(void 0!==n.singleLine&&"boolean"!=typeof n.singleLine){const e={instancePath:o+"/singleLine",schemaPath:"#/properties/singleLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),p++}if(void 0!==n.spanningCells){let e=n.spanningCells;if(Array.isArray(e)){const n=e.length;for(let i=0;i<n;i++){let n=e[i];if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.row){const e={instancePath:o+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/required",keyword:"required",params:{missingProperty:"row"},message:"must have required property 'row'"};null===l?l=[e]:l.push(e),p++}if(void 0===n.col){const e={instancePath:o+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/required",keyword:"required",params:{missingProperty:"col"},message:"must have required property 'col'"};null===l?l=[e]:l.push(e),p++}for(const e in n)if(!r.call(t.properties.spanningCells.items.properties,e)){const t={instancePath:o+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===l?l=[t]:l.push(t),p++}if(void 0!==n.col){let e=n.col;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:o+"/spanningCells/"+i+"/col",schemaPath:"#/properties/spanningCells/items/properties/col/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}if("number"==typeof e&&isFinite(e)&&(e<0||isNaN(e))){const e={instancePath:o+"/spanningCells/"+i+"/col",schemaPath:"#/properties/spanningCells/items/properties/col/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===l?l=[e]:l.push(e),p++}}if(void 0!==n.row){let e=n.row;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:o+"/spanningCells/"+i+"/row",schemaPath:"#/properties/spanningCells/items/properties/row/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}if("number"==typeof e&&isFinite(e)&&(e<0||isNaN(e))){const e={instancePath:o+"/spanningCells/"+i+"/row",schemaPath:"#/properties/spanningCells/items/properties/row/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===l?l=[e]:l.push(e),p++}}if(void 0!==n.colSpan){let e=n.colSpan;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:o+"/spanningCells/"+i+"/colSpan",schemaPath:"#/properties/spanningCells/items/properties/colSpan/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:o+"/spanningCells/"+i+"/colSpan",schemaPath:"#/properties/spanningCells/items/properties/colSpan/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===l?l=[e]:l.push(e),p++}}if(void 0!==n.rowSpan){let e=n.rowSpan;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:o+"/spanningCells/"+i+"/rowSpan",schemaPath:"#/properties/spanningCells/items/properties/rowSpan/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:o+"/spanningCells/"+i+"/rowSpan",schemaPath:"#/properties/spanningCells/items/properties/rowSpan/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===l?l=[e]:l.push(e),p++}}if(void 0!==n.alignment&&(a(n.alignment,{instancePath:o+"/spanningCells/"+i+"/alignment",parentData:n,parentDataProperty:"alignment",rootData:c})||(l=null===l?a.errors:l.concat(a.errors),p=l.length)),void 0!==n.verticalAlignment&&(D(n.verticalAlignment,{instancePath:o+"/spanningCells/"+i+"/verticalAlignment",parentData:n,parentDataProperty:"verticalAlignment",rootData:c})||(l=null===l?D.errors:l.concat(D.errors),p=l.length)),void 0!==n.wrapWord&&"boolean"!=typeof n.wrapWord){const e={instancePath:o+"/spanningCells/"+i+"/wrapWord",schemaPath:"#/properties/spanningCells/items/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===l?l=[e]:l.push(e),p++}if(void 0!==n.truncate){let e=n.truncate;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:o+"/spanningCells/"+i+"/truncate",schemaPath:"#/properties/spanningCells/items/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}}if(void 0!==n.paddingLeft){let e=n.paddingLeft;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:o+"/spanningCells/"+i+"/paddingLeft",schemaPath:"#/properties/spanningCells/items/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}}if(void 0!==n.paddingRight){let e=n.paddingRight;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:o+"/spanningCells/"+i+"/paddingRight",schemaPath:"#/properties/spanningCells/items/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}}}else{const e={instancePath:o+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),p++}}}else{const e={instancePath:o+"/spanningCells",schemaPath:"#/properties/spanningCells/type",keyword:"type",params:{type:"array"},message:"must be array"};null===l?l=[e]:l.push(e),p++}}}else{const e={instancePath:o,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),p++}return e.errors=l,0===p};const t={properties:{spanningCells:{items:{properties:{col:{type:"integer",minimum:0},row:{type:"integer",minimum:0},colSpan:{type:"integer",minimum:1},rowSpan:{type:"integer",minimum:1},alignment:{$ref:"shared.json#/definitions/alignment"},verticalAlignment:{$ref:"shared.json#/definitions/verticalAlignment"},wrapWord:{type:"boolean"},truncate:{type:"integer"},paddingLeft:{type:"integer"},paddingRight:{type:"integer"}}}}}},n={properties:{topBody:{$ref:"#/definitions/border"},topJoin:{$ref:"#/definitions/border"},topLeft:{$ref:"#/definitions/border"},topRight:{$ref:"#/definitions/border"},bottomBody:{$ref:"#/definitions/border"},bottomJoin:{$ref:"#/definitions/border"},bottomLeft:{$ref:"#/definitions/border"},bottomRight:{$ref:"#/definitions/border"},bodyLeft:{$ref:"#/definitions/border"},bodyRight:{$ref:"#/definitions/border"},bodyJoin:{$ref:"#/definitions/border"},headerJoin:{$ref:"#/definitions/border"},joinBody:{$ref:"#/definitions/border"},joinLeft:{$ref:"#/definitions/border"},joinRight:{$ref:"#/definitions/border"},joinJoin:{$ref:"#/definitions/border"},joinMiddleUp:{$ref:"#/definitions/border"},joinMiddleDown:{$ref:"#/definitions/border"},joinMiddleLeft:{$ref:"#/definitions/border"},joinMiddleRight:{$ref:"#/definitions/border"}}},r=Object.prototype.hasOwnProperty;function o(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:i=e}={}){let s=null,a=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===s?s=[e]:s.push(e),a++}return o.errors=s,0===a}function i(e,{instancePath:t="",parentData:s,parentDataProperty:a,rootData:u=e}={}){let c=null,l=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const o in e)if(!r.call(n.properties,o)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};null===c?c=[e]:c.push(e),l++}void 0!==e.topBody&&(o(e.topBody,{instancePath:t+"/topBody",parentData:e,parentDataProperty:"topBody",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.topJoin&&(o(e.topJoin,{instancePath:t+"/topJoin",parentData:e,parentDataProperty:"topJoin",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.topLeft&&(o(e.topLeft,{instancePath:t+"/topLeft",parentData:e,parentDataProperty:"topLeft",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.topRight&&(o(e.topRight,{instancePath:t+"/topRight",parentData:e,parentDataProperty:"topRight",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.bottomBody&&(o(e.bottomBody,{instancePath:t+"/bottomBody",parentData:e,parentDataProperty:"bottomBody",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.bottomJoin&&(o(e.bottomJoin,{instancePath:t+"/bottomJoin",parentData:e,parentDataProperty:"bottomJoin",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.bottomLeft&&(o(e.bottomLeft,{instancePath:t+"/bottomLeft",parentData:e,parentDataProperty:"bottomLeft",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.bottomRight&&(o(e.bottomRight,{instancePath:t+"/bottomRight",parentData:e,parentDataProperty:"bottomRight",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.bodyLeft&&(o(e.bodyLeft,{instancePath:t+"/bodyLeft",parentData:e,parentDataProperty:"bodyLeft",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.bodyRight&&(o(e.bodyRight,{instancePath:t+"/bodyRight",parentData:e,parentDataProperty:"bodyRight",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.bodyJoin&&(o(e.bodyJoin,{instancePath:t+"/bodyJoin",parentData:e,parentDataProperty:"bodyJoin",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.headerJoin&&(o(e.headerJoin,{instancePath:t+"/headerJoin",parentData:e,parentDataProperty:"headerJoin",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinBody&&(o(e.joinBody,{instancePath:t+"/joinBody",parentData:e,parentDataProperty:"joinBody",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinLeft&&(o(e.joinLeft,{instancePath:t+"/joinLeft",parentData:e,parentDataProperty:"joinLeft",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinRight&&(o(e.joinRight,{instancePath:t+"/joinRight",parentData:e,parentDataProperty:"joinRight",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinJoin&&(o(e.joinJoin,{instancePath:t+"/joinJoin",parentData:e,parentDataProperty:"joinJoin",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinMiddleUp&&(o(e.joinMiddleUp,{instancePath:t+"/joinMiddleUp",parentData:e,parentDataProperty:"joinMiddleUp",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinMiddleDown&&(o(e.joinMiddleDown,{instancePath:t+"/joinMiddleDown",parentData:e,parentDataProperty:"joinMiddleDown",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinMiddleLeft&&(o(e.joinMiddleLeft,{instancePath:t+"/joinMiddleLeft",parentData:e,parentDataProperty:"joinMiddleLeft",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinMiddleRight&&(o(e.joinMiddleRight,{instancePath:t+"/joinMiddleRight",parentData:e,parentDataProperty:"joinMiddleRight",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===c?c=[e]:c.push(e),l++}return i.errors=c,0===l}const s={enum:["left","right","center","justify"]};function a(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,u=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),u++}if("left"!==e&&"right"!==e&&"center"!==e&&"justify"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:s.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),u++}return a.errors=i,0===u}TD().default;const u=new RegExp("^[0-9]+$","u");function c(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,a=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),a++}if("left"!==e&&"right"!==e&&"center"!==e&&"justify"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:s.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),a++}return c.errors=i,0===a}const l={enum:["top","middle","bottom"]};function p(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,s=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),s++}if("top"!==e&&"middle"!==e&&"bottom"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:l.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),s++}return p.errors=i,0===s}function f(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,s=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),s++}if(void 0!==e.alignment&&(c(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:o})||(i=null===i?c.errors:i.concat(c.errors),s=i.length)),void 0!==e.verticalAlignment&&(p(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:o})||(i=null===i?p.errors:i.concat(p.errors),s=i.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===i?i=[e]:i.push(e),s++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),s++}return f.errors=i,0===s}function d(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,s=0;const a=s;let c=!1,l=null;const p=s;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if(!u.test(n)){const e={instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),s++}for(const n in e)u.test(n)&&(f(e[n],{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:o})||(i=null===i?f.errors:i.concat(f.errors),s=i.length))}else{const e={instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),s++}(D=p===s)&&(c=!0,l=0);const h=s;if(Array.isArray(e)){const n=e.length;for(let r=0;r<n;r++)f(e[r],{instancePath:t+"/"+r,parentData:e,parentDataProperty:r,rootData:o})||(i=null===i?f.errors:i.concat(f.errors),s=i.length)}else{const e={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===i?i=[e]:i.push(e),s++}var D;if((D=h===s)&&c?(c=!1,l=[l,1]):D&&(c=!0,l=1),c)s=a,null!==i&&(a?i.length=a:i=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===i?i=[e]:i.push(e),s++}return d.errors=i,0===s}function h(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,s=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),s++}if(void 0!==e.alignment&&(c(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:o})||(i=null===i?c.errors:i.concat(c.errors),s=i.length)),void 0!==e.verticalAlignment&&(p(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:o})||(i=null===i?p.errors:i.concat(p.errors),s=i.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===i?i=[e]:i.push(e),s++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),s++}return h.errors=i,0===s}function D(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,s=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),s++}if("top"!==e&&"middle"!==e&&"bottom"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:l.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),s++}return D.errors=i,0===s}function g(e,{instancePath:t="",parentData:i,parentDataProperty:s,rootData:a=e}={}){let u=null,c=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const o in e)if(!r.call(n.properties,o)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};null===u?u=[e]:u.push(e),c++}void 0!==e.topBody&&(o(e.topBody,{instancePath:t+"/topBody",parentData:e,parentDataProperty:"topBody",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.topJoin&&(o(e.topJoin,{instancePath:t+"/topJoin",parentData:e,parentDataProperty:"topJoin",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.topLeft&&(o(e.topLeft,{instancePath:t+"/topLeft",parentData:e,parentDataProperty:"topLeft",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.topRight&&(o(e.topRight,{instancePath:t+"/topRight",parentData:e,parentDataProperty:"topRight",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.bottomBody&&(o(e.bottomBody,{instancePath:t+"/bottomBody",parentData:e,parentDataProperty:"bottomBody",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.bottomJoin&&(o(e.bottomJoin,{instancePath:t+"/bottomJoin",parentData:e,parentDataProperty:"bottomJoin",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.bottomLeft&&(o(e.bottomLeft,{instancePath:t+"/bottomLeft",parentData:e,parentDataProperty:"bottomLeft",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.bottomRight&&(o(e.bottomRight,{instancePath:t+"/bottomRight",parentData:e,parentDataProperty:"bottomRight",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.bodyLeft&&(o(e.bodyLeft,{instancePath:t+"/bodyLeft",parentData:e,parentDataProperty:"bodyLeft",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.bodyRight&&(o(e.bodyRight,{instancePath:t+"/bodyRight",parentData:e,parentDataProperty:"bodyRight",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.bodyJoin&&(o(e.bodyJoin,{instancePath:t+"/bodyJoin",parentData:e,parentDataProperty:"bodyJoin",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.headerJoin&&(o(e.headerJoin,{instancePath:t+"/headerJoin",parentData:e,parentDataProperty:"headerJoin",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinBody&&(o(e.joinBody,{instancePath:t+"/joinBody",parentData:e,parentDataProperty:"joinBody",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinLeft&&(o(e.joinLeft,{instancePath:t+"/joinLeft",parentData:e,parentDataProperty:"joinLeft",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinRight&&(o(e.joinRight,{instancePath:t+"/joinRight",parentData:e,parentDataProperty:"joinRight",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinJoin&&(o(e.joinJoin,{instancePath:t+"/joinJoin",parentData:e,parentDataProperty:"joinJoin",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinMiddleUp&&(o(e.joinMiddleUp,{instancePath:t+"/joinMiddleUp",parentData:e,parentDataProperty:"joinMiddleUp",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinMiddleDown&&(o(e.joinMiddleDown,{instancePath:t+"/joinMiddleDown",parentData:e,parentDataProperty:"joinMiddleDown",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinMiddleLeft&&(o(e.joinMiddleLeft,{instancePath:t+"/joinMiddleLeft",parentData:e,parentDataProperty:"joinMiddleLeft",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinMiddleRight&&(o(e.joinMiddleRight,{instancePath:t+"/joinMiddleRight",parentData:e,parentDataProperty:"joinMiddleRight",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===u?u=[e]:u.push(e),c++}return g.errors=u,0===c}function m(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,s=0;const a=s;let c=!1,l=null;const p=s;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if(!u.test(n)){const e={instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),s++}for(const n in e)u.test(n)&&(f(e[n],{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:o})||(i=null===i?f.errors:i.concat(f.errors),s=i.length))}else{const e={instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),s++}(h=p===s)&&(c=!0,l=0);const d=s;if(Array.isArray(e)){const n=e.length;for(let r=0;r<n;r++)f(e[r],{instancePath:t+"/"+r,parentData:e,parentDataProperty:r,rootData:o})||(i=null===i?f.errors:i.concat(f.errors),s=i.length)}else{const e={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===i?i=[e]:i.push(e),s++}var h;if((h=d===s)&&c?(c=!1,l=[l,1]):h&&(c=!0,l=1),c)s=a,null!==i&&(a?i.length=a:i=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===i?i=[e]:i.push(e),s++}return m.errors=i,0===s}function y(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,s=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),s++}if(void 0!==e.alignment&&(c(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:o})||(i=null===i?c.errors:i.concat(c.errors),s=i.length)),void 0!==e.verticalAlignment&&(p(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:o})||(i=null===i?p.errors:i.concat(p.errors),s=i.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===i?i=[e]:i.push(e),s++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),s++}return y.errors=i,0===s}e["streamConfig.json"]=function e(t,{instancePath:n="",parentData:r,parentDataProperty:o,rootData:i=t}={}){let s=null,a=0;if(t&&"object"==typeof t&&!Array.isArray(t)){if(void 0===t.columnDefault){const e={instancePath:n,schemaPath:"#/required",keyword:"required",params:{missingProperty:"columnDefault"},message:"must have required property 'columnDefault'"};null===s?s=[e]:s.push(e),a++}if(void 0===t.columnCount){const e={instancePath:n,schemaPath:"#/required",keyword:"required",params:{missingProperty:"columnCount"},message:"must have required property 'columnCount'"};null===s?s=[e]:s.push(e),a++}for(const e in t)if("border"!==e&&"columns"!==e&&"columnDefault"!==e&&"columnCount"!==e&&"drawVerticalLine"!==e){const t={instancePath:n,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===s?s=[t]:s.push(t),a++}if(void 0!==t.border&&(g(t.border,{instancePath:n+"/border",parentData:t,parentDataProperty:"border",rootData:i})||(s=null===s?g.errors:s.concat(g.errors),a=s.length)),void 0!==t.columns&&(m(t.columns,{instancePath:n+"/columns",parentData:t,parentDataProperty:"columns",rootData:i})||(s=null===s?m.errors:s.concat(m.errors),a=s.length)),void 0!==t.columnDefault&&(y(t.columnDefault,{instancePath:n+"/columnDefault",parentData:t,parentDataProperty:"columnDefault",rootData:i})||(s=null===s?y.errors:s.concat(y.errors),a=s.length)),void 0!==t.columnCount){let e=t.columnCount;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:n+"/columnCount",schemaPath:"#/properties/columnCount/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===s?s=[e]:s.push(e),a++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:n+"/columnCount",schemaPath:"#/properties/columnCount/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===s?s=[e]:s.push(e),a++}}if(void 0!==t.drawVerticalLine&&"function"!=typeof t.drawVerticalLine){const e={instancePath:n+"/drawVerticalLine",schemaPath:"#/properties/drawVerticalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===s?s=[e]:s.push(e),a++}}else{const e={instancePath:n,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===s?s=[e]:s.push(e),a++}return e.errors=s,0===a}}(BD)),BD}function LD(){if(kD)return xD;kD=1;var e=xD&&xD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xD,"__esModule",{value:!0}),xD.validateConfig=void 0;const t=e($D());return xD.validateConfig=(e,n)=>{const r=t.default[e];if(!r(n)&&r.errors){const e=r.errors.map(e=>({message:e.message,params:e.params,schemaPath:e.schemaPath}));throw console.log("config",n),console.log("errors",e),new Error("Invalid config.")}},xD}function ND(){if(PD)return RD;PD=1,Object.defineProperty(RD,"__esModule",{value:!0}),RD.makeStreamConfig=void 0;const e=Yh(),t=LD(),n=(e,t={},n)=>Array.from({length:e}).map((e,r)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",wrapWord:!1,...n,...t[r]}));return RD.makeStreamConfig=r=>{if((0,t.validateConfig)("streamConfig.json",r),void 0===r.columnDefault.width)throw new Error("Must provide config.columnDefault.width when creating a stream.");return{drawVerticalLine:()=>!0,...r,border:(0,e.makeBorderConfig)(r.border),columns:n(r.columnCount,r.columns,r.columnDefault)}},RD}var MD,jD={};function ID(){return MD||(MD=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mapDataUsingRowHeights=e.padCellVertically=void 0;const t=Yh(),n=fD(),r=e=>new Array(e).fill("");e.padCellVertically=(e,t,n)=>{const o=t-e.length;return"top"===n?[...e,...r(o)]:"bottom"===n?[...r(o),...e]:[...r(Math.floor(o/2)),...e,...r(Math.ceil(o/2))]};e.mapDataUsingRowHeights=(r,o,i)=>{const s=r[0].length,a=r.map((t,r)=>{const a=o[r],u=Array.from({length:a},()=>new Array(s).fill(""));return t.forEach((t,o)=>{var s;const c=null===(s=i.spanningCellManager)||void 0===s?void 0:s.getContainingRange({col:o,row:r});if(c)return void c.extractCellContent(r).forEach((e,t)=>{u[t][o]=e});const l=(0,n.wrapCell)(t,i.columns[o].width,i.columns[o].wrapWord);(0,e.padCellVertically)(l,a,i.columns[o].verticalAlignment).forEach((e,t)=>{u[t][o]=e})}),u});return(0,t.flatten)(a)}}(jD)),jD}var HD,zD={};function UD(){return HD||(HD=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.padTableData=e.padString=void 0;e.padString=(e,t,n)=>" ".repeat(t)+e+" ".repeat(n);e.padTableData=(t,n)=>t.map((t,r)=>t.map((t,o)=>{var i;if(null===(i=n.spanningCellManager)||void 0===i?void 0:i.getContainingRange({col:o,row:r},{mapped:!0}))return t;const{paddingLeft:s,paddingRight:a}=n.columns[o];return(0,e.padString)(t,s,a)}))}(zD)),zD}var qD,KD={};function GD(){if(qD)return KD;qD=1,Object.defineProperty(KD,"__esModule",{value:!0}),KD.stringifyTableData=void 0;const e=Yh();return KD.stringifyTableData=t=>t.map(t=>t.map(t=>(0,e.normalizeString)(String(t)))),KD}var WD,ZD,VD,JD={},YD={exports:{}};function QD(){return WD||(WD=1,function(e,t){var n,r=1/0,o=NaN,i=/^\s+|\s+$/g,s=/\w*$/,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l="\\ud800-\\udfff",p="\\u0300-\\u036f\\ufe20-\\ufe23",f="\\u20d0-\\u20f0",d="\\ufe0e\\ufe0f",h="["+l+"]",D="["+p+f+"]",g="\\ud83c[\\udffb-\\udfff]",m="[^"+l+"]",y="(?:\\ud83c[\\udde6-\\uddff]){2}",b="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",E="(?:"+D+"|"+g+")"+"?",F="["+d+"]?",C=F+E+("(?:"+v+"(?:"+[m,y,b].join("|")+")"+F+E+")*"),w="(?:"+[m+D+"?",D,y,b,h].join("|")+")",_=RegExp(g+"(?="+g+")|"+w+C,"g"),A=RegExp("["+v+l+p+f+d+"]"),S=parseInt,k="object"==typeof zf&&zf&&zf.Object===Object&&zf,P="object"==typeof self&&self&&self.Object===Object&&self,R=k||P||Function("return this")(),x=t&&!t.nodeType&&t,B=x&&e&&!e.nodeType&&e,O=B&&B.exports===x&&k.process,T=function(){try{return O&&O.binding("util")}catch(e){}}(),$=T&&T.isRegExp,L=(n="length",function(e){return null==e?void 0:e[n]});function N(e){return A.test(e)}function M(e){return N(e)?function(e){var t=_.lastIndex=0;for(;_.test(e);)t++;return t}(e):L(e)}function j(e){return N(e)?function(e){return e.match(_)||[]}(e):function(e){return e.split("")}(e)}var I=Object.prototype.toString,H=R.Symbol,z=H?H.prototype:void 0,U=z?z.toString:void 0;function q(e){if("string"==typeof e)return e;if(V(e))return U?U.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function K(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,t,n)}function G(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var W,Z=$?(W=$,function(e){return W(e)}):function(e){return G(e)&&"[object RegExp]"==I.call(e)};function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==I.call(e)}function J(e){return e?(e=function(e){if("number"==typeof e)return e;if(V(e))return o;if(G(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=G(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=u.test(e);return n||c.test(e)?S(e.slice(2),n?2:8):a.test(e)?o:+e}(e))===r||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Y(e){return null==e?"":q(e)}e.exports=function(e,t){var n=30,r="...";if(G(t)){var o="separator"in t?t.separator:o;n="length"in t?function(e){var t=J(e),n=t%1;return t==t?n?t-n:t:0}(t.length):n,r="omission"in t?q(t.omission):r}var i=(e=Y(e)).length;if(N(e)){var a=j(e);i=a.length}if(n>=i)return e;var u=n-M(r);if(u<1)return r;var c=a?K(a,0,u).join(""):e.slice(0,u);if(void 0===o)return c+r;if(a&&(u+=c.length-u),Z(o)){if(e.slice(u).search(o)){var l,p=c;for(o.global||(o=RegExp(o.source,Y(s.exec(o))+"g")),o.lastIndex=0;l=o.exec(p);)var f=l.index;c=c.slice(0,void 0===f?u:f)}}else if(e.indexOf(q(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r}}(YD,YD.exports)),YD.exports}function XD(){return ZD||(ZD=1,function(e){var t=JD&&JD.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.truncateTableData=e.truncateString=void 0;const n=t(QD());e.truncateString=(e,t)=>(0,n.default)(e,{length:t,omission:"…"});e.truncateTableData=(t,n)=>t.map(t=>t.map((t,r)=>(0,e.truncateString)(t,n[r])))}(JD)),JD}function eg(){if(VD)return ph;VD=1,Object.defineProperty(ph,"__esModule",{value:!0}),ph.createStream=void 0;const e=Xh(),t=hD(),n=vD(),r=CD(),o=ND(),i=ID(),s=UD(),a=GD(),u=XD(),c=Yh(),l=(n,r)=>{let o=(0,a.stringifyTableData)(n);o=(0,u.truncateTableData)(o,(0,c.extractTruncates)(r));const l=(0,t.calculateRowHeights)(o,r);return o=(0,i.mapDataUsingRowHeights)(o,l,r),o=(0,e.alignTableData)(o,r),o=(0,s.padTableData)(o,r),o};return ph.createStream=e=>{const t=(0,o.makeStreamConfig)(e),i=Object.values(t.columns).map(e=>e.width+e.paddingLeft+e.paddingRight);let s=!0;return{write:e=>{if(e.length!==t.columnCount)throw new Error("Row cell count does not match the config.columnCount.");s?(s=!1,((e,t,o)=>{const i=l([e],o).map(e=>(0,r.drawRow)(e,o)).join("");let s;s="",s+=(0,n.drawBorderTop)(t,o),s+=i,s+=(0,n.drawBorderBottom)(t,o),s=s.trimEnd(),process.stdout.write(s)})(e,i,t)):((e,t,o)=>{const i=l([e],o).map(e=>(0,r.drawRow)(e,o)).join("");let s="";const a=(0,n.drawBorderBottom)(t,o);"\n"!==a&&(s="\r"),s+=(0,n.drawBorderJoin)(t,o),s+=i,s+=a,s=s.trimEnd(),process.stdout.write(s)})(e,i,t)}}},ph}var tg,ng={},rg={};function og(){if(tg)return rg;tg=1,Object.defineProperty(rg,"__esModule",{value:!0}),rg.calculateOutputColumnWidths=void 0;return rg.calculateOutputColumnWidths=e=>e.columns.map(e=>e.paddingLeft+e.width+e.paddingRight),rg}var ig,sg={};function ag(){if(ig)return sg;ig=1,Object.defineProperty(sg,"__esModule",{value:!0}),sg.drawTable=void 0;const e=vD(),t=bD(),n=CD(),r=Yh();return sg.drawTable=(o,i,s,a)=>{const{drawHorizontalLine:u,singleLine:c}=a,l=(0,r.groupBySizes)(o,s).map((e,t)=>e.map(e=>(0,n.drawRow)(e,{...a,rowIndex:t})).join(""));return(0,t.drawContent)({contents:l,drawSeparator:(e,t)=>(0===e||e===t||!c)&&u(e,t),elementType:"row",rowIndex:-1,separatorGetter:(0,e.createTableBorderGetter)(i,{...a,rowCount:l.length}),spanningCellManager:a.spanningCellManager})},sg}var ug,cg={};function lg(){if(ug)return cg;ug=1,Object.defineProperty(cg,"__esModule",{value:!0}),cg.injectHeaderConfig=void 0;return cg.injectHeaderConfig=(e,t)=>{var n;let r=null!==(n=t.spanningCells)&&void 0!==n?n:[];const o=t.header,i=[...e];if(o){r=r.map(({row:e,...t})=>({...t,row:e+1}));const{content:t,...n}=o;r.unshift({alignment:"center",col:0,colSpan:e[0].length,paddingLeft:1,paddingRight:1,row:0,wrapWord:!1,...n}),i.unshift([t,...Array.from({length:e[0].length-1}).fill("")])}return[i,r]},cg}var pg,fg={},dg={};function hg(){return pg||(pg=1,function(e){var t=dg&&dg.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.calculateMaximumColumnWidths=e.calculateMaximumCellWidth=void 0;const n=t(wh()),r=Yh();e.calculateMaximumCellWidth=e=>Math.max(...e.split("\n").map(n.default));e.calculateMaximumColumnWidths=(t,n=[])=>{const o=new Array(t[0].length).fill(0),i=n.map(r.calculateRangeCoordinate);return t.forEach((t,n)=>{t.forEach((t,s)=>{((e,t)=>i.some(n=>(0,r.isCellInRange)({col:t,row:e},n)))(n,s)||(o[s]=Math.max(o[s],(0,e.calculateMaximumCellWidth)(t)))})}),o}}(dg)),dg}var Dg,gg={},mg={};function yg(){if(Dg)return mg;Dg=1;var e=mg&&mg.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mg,"__esModule",{value:!0}),mg.alignVerticalRangeContent=mg.wrapRangeContent=void 0;const t=e(wh()),n=Qh(),r=ID(),o=UD(),i=XD(),s=Yh(),a=fD();mg.wrapRangeContent=(e,t,r)=>{const{topLeft:s,paddingRight:u,paddingLeft:c,truncate:l,wrapWord:p,alignment:f}=e,d=r.rows[s.row][s.col],h=t-c-u;return(0,a.wrapCell)((0,i.truncateString)(d,l),h,p).map(e=>{const t=(0,n.alignString)(e,h,f);return(0,o.padString)(t,c,u)})};return mg.alignVerticalRangeContent=(e,n,o)=>{const{rows:i,drawHorizontalLine:a,rowHeights:u}=o,{topLeft:c,bottomRight:l,verticalAlignment:p}=e;if(0===u.length)return[];const f=(0,s.sumArray)(u.slice(c.row,l.row+1))+(l.row-c.row)-(0,s.sequence)(c.row+1,l.row).filter(e=>!a(e,i.length)).length;return(0,r.padCellVertically)(n,f,p).map(e=>0===e.length?" ".repeat((0,t.default)(n[0])):e)},mg}var bg,vg={};function Eg(){if(bg)return vg;bg=1,Object.defineProperty(vg,"__esModule",{value:!0}),vg.calculateSpanningCellWidth=void 0;const e=Yh();return vg.calculateSpanningCellWidth=(t,n)=>{const{columnsConfig:r,drawVerticalLine:o}=n,{topLeft:i,bottomRight:s}=t;return(0,e.sumArray)(r.slice(i.col,s.col+1).map(({width:e})=>e))+(i.col===s.col?r[i.col].paddingRight+r[s.col].paddingLeft:(0,e.sumArray)(r.slice(i.col,s.col+1).map(({paddingLeft:e,paddingRight:t})=>e+t)))+(s.col-i.col)-(0,e.sequence)(i.col+1,s.col).filter(e=>!o(e,r.length)).length},vg}var Fg,Cg,wg={};function _g(){if(Fg)return wg;Fg=1,Object.defineProperty(wg,"__esModule",{value:!0}),wg.makeRangeConfig=void 0;const e=Yh();return wg.makeRangeConfig=(t,n)=>{var r;const{topLeft:o,bottomRight:i}=(0,e.calculateRangeCoordinate)(t);return{...{...n[o.col],...t,paddingRight:null!==(r=t.paddingRight)&&void 0!==r?r:n[i.col].paddingRight},bottomRight:i,topLeft:o}},wg}function Ag(){if(Cg)return gg;Cg=1,Object.defineProperty(gg,"__esModule",{value:!0}),gg.createSpanningCellManager=void 0;const e=yg(),t=Eg(),n=_g(),r=Yh(),o=(e,t)=>t.find(t=>(0,r.isCellInRange)(e,t)),i=(n,o)=>{const i=(0,t.calculateSpanningCellWidth)(n,o),s=(0,e.wrapRangeContent)(n,i,o),a=(0,e.alignVerticalRangeContent)(n,s,o);return{...n,extractBorderContent:e=>{const{topLeft:t}=n,i=(0,r.sumArray)(o.rowHeights.slice(t.row,e))+(e-t.row-1);return a[i]},extractCellContent:e=>{const{topLeft:t}=n,{drawHorizontalLine:i,rowHeights:s}=o,u=e-t.row,c=(0,r.sequence)(t.row+1,e).filter(e=>!(null==i?void 0:i(e,s.length))).length,l=(0,r.sumArray)(s.slice(t.row,e))+u-c;return a.slice(l,l+s[e])},height:s.length,width:i}};return gg.createSpanningCellManager=e=>{const{spanningCellConfigs:t,columnsConfig:s}=e,a=t.map(e=>(0,n.makeRangeConfig)(e,s)),u={};let c=[],l=[];return{getContainingRange:(t,n)=>{var r;const s=(null==n?void 0:n.mapped)?l[t.row]:t.row,p=o({...t,row:s},a);if(!p)return;if(0===c.length)return i(p,{...e,rowHeights:c});const f=(e=>{const{row:t,col:n}=e.topLeft;return`${t}/${n}`})(p);return null!==(r=u[f])&&void 0!==r||(u[f]=i(p,{...e,rowHeights:c})),u[f]},inSameRange:(e,t)=>((e,t,n)=>{const i=o(e,n),s=o(t,n);return!(!i||!s)&&(0,r.areCellEqual)(i.topLeft,s.topLeft)})(e,t,a),rowHeights:c,rowIndexMapping:l,setRowHeights:e=>{c=e},setRowIndexMapping:e=>{l=(0,r.flatten)(e.map((e,t)=>Array.from({length:e},()=>t)))}}},gg}var Sg,kg,Pg={};function Rg(){if(Sg)return Pg;Sg=1,Object.defineProperty(Pg,"__esModule",{value:!0}),Pg.validateSpanningCellConfig=void 0;const e=Yh(),t=(e,t,n)=>e<=n&&n<=t;return Pg.validateSpanningCellConfig=(n,r)=>{const[o,i]=[n.length,n[0].length];r.forEach((e,t)=>{const{colSpan:n,rowSpan:r}=e;if(void 0===n&&void 0===r)throw new Error(`Expect at least colSpan or rowSpan is provided in config.spanningCells[${t}]`);if(void 0!==n&&n<1)throw new Error(`Expect colSpan is not equal zero, instead got: ${n} in config.spanningCells[${t}]`);if(void 0!==r&&r<1)throw new Error(`Expect rowSpan is not equal zero, instead got: ${r} in config.spanningCells[${t}]`)});const s=r.map(e.calculateRangeCoordinate);s.forEach(({topLeft:e,bottomRight:n},r)=>{if(!(t(0,i-1,e.col)&&t(0,o-1,e.row)&&t(0,i-1,n.col)&&t(0,o-1,n.row)))throw new Error(`Some cells in config.spanningCells[${r}] are out of the table`)});const a=Array.from({length:o},()=>Array.from({length:i}));s.forEach(({topLeft:t,bottomRight:n},r)=>{(0,e.sequence)(t.row,n.row).forEach(o=>{(0,e.sequence)(t.col,n.col).forEach(e=>{if(void 0!==a[o][e])throw new Error(`Spanning cells in config.spanningCells[${a[o][e]}] and config.spanningCells[${r}] are overlap each other`);a[o][e]=r})})})},Pg}function xg(){if(kg)return fg;kg=1,Object.defineProperty(fg,"__esModule",{value:!0}),fg.makeTableConfig=void 0;const e=hg(),t=Ag(),n=Yh(),r=LD(),o=Rg();return fg.makeTableConfig=(i,s={},a)=>{var u,c,l,p,f;(0,r.validateConfig)("config.json",s),(0,o.validateSpanningCellConfig)(i,null!==(u=s.spanningCells)&&void 0!==u?u:[]);const d=null!==(c=null!=a?a:s.spanningCells)&&void 0!==c?c:[],h=((t,n,r,o)=>{const i=(0,e.calculateMaximumColumnWidths)(t,o);return t[0].map((e,t)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",width:i[t],wrapWord:!1,...r,...null==n?void 0:n[t]}))})(i,s.columns,s.columnDefault,d),D=null!==(l=s.drawVerticalLine)&&void 0!==l?l:()=>!0,g=null!==(p=s.drawHorizontalLine)&&void 0!==p?p:()=>!0;return{...s,border:(0,n.makeBorderConfig)(s.border),columns:h,drawHorizontalLine:g,drawVerticalLine:D,singleLine:null!==(f=s.singleLine)&&void 0!==f&&f,spanningCellManager:(0,t.createSpanningCellManager)({columnsConfig:h,drawHorizontalLine:g,drawVerticalLine:D,rows:i,spanningCellConfigs:d})}},fg}var Bg,Og,Tg={};function $g(){if(Bg)return Tg;Bg=1,Object.defineProperty(Tg,"__esModule",{value:!0}),Tg.validateTableData=void 0;const e=Yh();return Tg.validateTableData=t=>{if(!Array.isArray(t))throw new TypeError("Table data must be an array.");if(0===t.length)throw new Error("Table must define at least one row.");if(0===t[0].length)throw new Error("Table must define at least one column.");const n=t[0].length;for(const r of t){if(!Array.isArray(r))throw new TypeError("Table row data must be an array.");if(r.length!==n)throw new Error("Table must have a consistent number of cells.");for(const t of r)if(/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test((0,e.normalizeString)(String(t))))throw new Error("Table data must not contain control characters.")}},Tg}function Lg(){if(Og)return ng;Og=1,Object.defineProperty(ng,"__esModule",{value:!0}),ng.table=void 0;const e=Xh(),t=og(),n=hD(),r=ag(),o=lg(),i=xg(),s=ID(),a=UD(),u=GD(),c=XD(),l=Yh(),p=$g();return ng.table=(f,d={})=>{(0,p.validateTableData)(f);let h=(0,u.stringifyTableData)(f);const[D,g]=(0,o.injectHeaderConfig)(h,d),m=(0,i.makeTableConfig)(D,d,g);h=(0,c.truncateTableData)(D,(0,l.extractTruncates)(m));const y=(0,n.calculateRowHeights)(h,m);m.spanningCellManager.setRowHeights(y),m.spanningCellManager.setRowIndexMapping(y),h=(0,s.mapDataUsingRowHeights)(h,y,m),h=(0,e.alignTableData)(h,m),h=(0,a.padTableData)(h,m);const b=(0,t.calculateOutputColumnWidths)(m);return(0,r.drawTable)(h,b,y,m)},ng}var Ng,Mg,jg={};function Ig(){return Ng||(Ng=1,Object.defineProperty(jg,"__esModule",{value:!0})),jg}function Hg(){return Mg||(Mg=1,function(e){var t=lh&&lh.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=lh&&lh.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.getBorderCharacters=e.createStream=e.table=void 0;const r=eg();Object.defineProperty(e,"createStream",{enumerable:!0,get:function(){return r.createStream}});const o=Jh();Object.defineProperty(e,"getBorderCharacters",{enumerable:!0,get:function(){return o.getBorderCharacters}});const i=Lg();Object.defineProperty(e,"table",{enumerable:!0,get:function(){return i.table}}),n(Ig(),e)}(lh)),lh}var zg=Hg();const Ug=Boolean(process.stdout?.isTTY),qg=e=>{if("1"===process.env.STAN_BORING||"1"===process.env.NO_COLOR||"0"===process.env.FORCE_COLOR||!Ug){if("warn"===e)return"[WARN]";switch(e){case"waiting":return"[WAIT]";case"run":return"[RUN]";case"ok":return"[OK]";case"error":return"[FAIL]";case"cancelled":return"[CANCELLED]";case"timeout":return"[TIMEOUT]";case"quiet":return"[QUIET]";case"stalled":return"[STALLED]";case"killed":return"[KILLED]";default:return""}}switch(e){case"warn":return Sf("⚠ warn");case"waiting":return Af("⏸ waiting");case"run":return Cf("▶ run");case"ok":return Ef("✔ ok");case"error":return wf("✖ fail");case"cancelled":return _f("◼ cancelled");case"timeout":return wf("⏱ timeout");case"quiet":return Ff("⏱ quiet");case"stalled":return Sf("⏱ stalled");case"killed":return wf("◼ killed");default:return""}},Kg=()=>Date.now(),Gg=e=>e.toString().padStart(2,"0"),Wg=e=>{e<0&&(e=0);const t=Math.floor(e/1e3),n=Math.floor(t/60),r=t%60;return`${Gg(n)}:${Gg(r)}`};class Zg{rows=new Map;opts;timer;startedAt=Kg();constructor(e){this.opts={boring:Boolean(e?.boring),refreshMs:e?.refreshMs??1e3}}flush(){this.render()}start(){this.timer||(this.timer=setInterval(()=>this.render(),this.opts.refreshMs))}clear(){try{ih.clear?.()}catch{}}stop(){this.timer&&clearInterval(this.timer),this.timer=void 0;try{ih.done?.()}catch{}}update(e,t,n){const r=this.rows.get(e),o=n??this.deriveMetaFromKey(e)??(r?.type?{type:r.type,item:r.item}:void 0);if(!o){const n={type:"script",item:e};return void this.rows.set(e,{...n,state:{...r?.state??{},...t}})}this.rows.set(e,{...o,state:{...r?.state??{},...t}})}cancelPending(){const e=Kg();for(const[t,n]of this.rows.entries()){const r=n.state;switch(r.kind){case"waiting":this.update(t,{kind:"cancelled"});break;case"running":case"quiet":case"stalled":{const n="number"==typeof r.startedAt?r.startedAt:void 0,o="number"==typeof n?Math.max(0,e-n):0;this.update(t,{kind:"cancelled",durationMs:o});break}}}}deriveMetaFromKey(e){return e.startsWith("script:")?{type:"script",item:e.slice(7)||"(unnamed)"}:e.startsWith("archive:")?{type:"archive",item:e.slice(8)||"(unnamed)"}:void 0}render(){const e=["Type","Item","Status","Time","Output"].map(e=>kf(e)),t=[];if(t.push(e),0===this.rows.size){const e=Wg(Kg()-this.startedAt);t.push([Pf("—"),Pf("—"),Pf(this.opts.boring?"[IDLE]":"idle"),Pf(e),Pf("")])}else{const e=Array.from(this.rows.values()),n=[...e.filter(e=>"script"===e.type),...e.filter(e=>"archive"===e.type)];for(const e of n){const n=e.state;let r="";r="running"===n.kind||"quiet"===n.kind||"stalled"===n.kind?Wg(Kg()-n.startedAt):"durationMs"in n&&"number"==typeof n.durationMs?Wg(n.durationMs):"";const o="done"===n.kind||"error"===n.kind||"timedout"===n.kind||"cancelled"===n.kind||"killed"===n.kind?n.outputPath??"":"",i="warn"===n.kind?"warn":"waiting"===n.kind?"waiting":"running"===n.kind?"run":"quiet"===n.kind?"quiet":"stalled"===n.kind?"stalled":"done"===n.kind?"ok":"error"===n.kind?"error":"timedout"===n.kind?"timeout":"cancelled"===n.kind?"cancelled":"killed";t.push([e.type,e.item,qg(i),r,o??""])}}const n=zg.table(t,{border:{topBody:"",topJoin:"",topLeft:"",topRight:"",bottomBody:"",bottomJoin:"",bottomLeft:"",bottomRight:"",bodyLeft:"",bodyRight:"",bodyJoin:"",joinBody:"",joinLeft:"",joinRight:"",joinJoin:""},drawHorizontalLine:()=>!1,columns:{2:{alignment:"left"},3:{alignment:"right"}}}).split("\n").map(e=>e.startsWith(" ")?e.slice(1):e).join("\n"),r=((e,t,n)=>n?[`${e}`,`waiting ${t.waiting.toString()}`,`running ${t.running.toString()}`,`quiet ${t.quiet.toString()}`,`stalled ${t.stalled.toString()}`,`TIMEOUT ${t.timeout.toString()}`,`OK ${t.ok.toString()}`,`WARN ${t.warn.toString()}`,`FAIL ${t.fail.toString()}`,`CANCELLED ${t.cancelled.toString()}`].join(" • "):[`${e}`,Af(`⏸ ${t.waiting.toString()}`),Cf(`▶ ${t.running.toString()}`),Ff(`⏱ ${t.quiet.toString()}`),Sf(`⏱ ${t.stalled.toString()}`),wf(`⏱ ${t.timeout.toString()}`),Ef(`✔ ${t.ok.toString()}`),Sf(`⚠ ${t.warn.toString()}`),wf(`✖ ${t.fail.toString()}`),_f(`◼ ${t.cancelled.toString()}`)].join(" • "))(Wg(Kg()-this.startedAt),this.counts(),this.opts.boring),o=`${Pf("Press")} ${kf("q")} ${Pf("to cancel,")} ${kf("r")} ${Pf("to restart")}`,i=`${n.trimEnd()}\n\n${r}\n${o}`.split("\n").map(e=>` ${e}`).join("\n");try{ih(i)}catch{}}counts(){let e=0,t=0,n=0,r=0,o=0,i=0,s=0,a=0,u=0;for(const[,c]of this.rows.entries()){switch(c.state.kind){case"warn":e+=1;break;case"waiting":t+=1;break;case"running":n+=1;break;case"quiet":r+=1;break;case"stalled":o+=1;break;case"done":i+=1;break;case"timedout":u+=1;break;case"cancelled":s+=1;break;case"error":case"killed":a+=1}}return{warn:e,waiting:t,running:n,quiet:r,stalled:o,ok:i,cancelled:s,fail:a,timeout:u}}}class Vg{model;opts;renderer=null;unsubscribe;constructor(e,t){this.model=e,this.opts=t}start(){this.renderer||(this.renderer=new Zg({boring:Boolean(this.opts?.boring)}),this.renderer.start(),this.unsubscribe=this.model.subscribe(e=>this.onUpdate(e.key,e.meta,e.state)))}stop(){try{this.renderer?.flush(),this.renderer?.stop()}catch{}this.unsubscribe&&this.unsubscribe(),this.unsubscribe=void 0}clear(){try{this.renderer?.clear?.(),this.renderer?.stop()}catch{}}cancelPending(){this.renderer?.cancelPending?.()}onUpdate(e,t,n){this.renderer?.update(`${t.type}:${t.item}`,n,t)}}class Jg{model;cwd;unsubscribe;constructor(e,t){this.model=e,this.cwd=t}start(){this.unsubscribe=this.model.subscribe(e=>this.onUpdate(e.meta,e.state))}stop(){this.unsubscribe&&this.unsubscribe(),this.unsubscribe=void 0}onUpdate(e,t){const n=e.item,r="archive"===e.type?"diff"===n?"archive (diff)":"archive":n;if("waiting"!==t.kind)if("running"!==t.kind){if("warn"===t.kind){const e=(t.outputPath??"").replace(/\\/g,"/");return void console.log(`stan: ${qg("warn")} "${r}" -> ${e}`)}if("done"===t.kind||"error"===t.kind){const e="done"===t.kind,n=(t.outputPath??"").replace(/\\/g,"/"),o=qg(e?"ok":"error"),i=e?"":" (exit 1)",s=n||"";return void console.log(`stan: ${o} "${r}" -> ${s}${i}`)}}else console.log(`stan: ${qg("run")} "${r}"`);else console.log(`stan: ${qg("waiting")} "${r}"`)}}class Yg{model=new sd;sink;constructor(){this.sink=new Jg(this.model,process.cwd())}start(){this.sink.start()}onPlan(e){console.log(e)}onScriptQueued(e){this.model.update(`script:${e}`,{kind:"waiting"},{type:"script",item:e})}onScriptStart(e){this.model.update(`script:${e}`,{kind:"running",startedAt:Date.now()},{type:"script",item:e})}onScriptEnd(e,t,r,o,i,s,a){const u=n.relative(r,t).replace(/\\/g,"/"),c="error"===a?{kind:"error",durationMs:0,outputPath:u}:"warn"===a?{kind:"warn",durationMs:0,outputPath:u}:{kind:"done",durationMs:0,outputPath:u};this.model.update(`script:${e}`,c,{type:"script",item:e})}onArchiveQueued(){}onArchiveStart(e){const t="full"===e?"full":"diff";this.model.update(`archive:${t}`,{kind:"running",startedAt:Date.now()},{type:"archive",item:t})}onArchiveEnd(e,t,r){const o=n.relative(r,t).replace(/\\/g,"/"),i="full"===e?"full":"diff";this.model.update(`archive:${i}`,{kind:"done",durationMs:0,outputPath:o},{type:"archive",item:i})}onCancelled(e){}installCancellation(e){}stop(){this.sink.stop()}}class Qg{opts;renderer=null;control=null;model=new sd;sink;constructor(e){this.opts=e,this.sink=new Vg(this.model,{boring:Boolean(e?.boring)})}start(){this.renderer||(this.sink.start(),this.renderer=this.sink.renderer??null)}onPlan(e){console.log(e)}onScriptQueued(e){this.model.update(`script:${e}`,{kind:"waiting"},{type:"script",item:e})}onScriptStart(e){this.model.update(`script:${e}`,{kind:"running",startedAt:Date.now()},{type:"script",item:e})}onScriptEnd(e,t,r,o,i,s,a){const u=n.relative(r,t).replace(/\\/g,"/"),c="error"===a||"number"==typeof s&&0!==s?{kind:"error",durationMs:Math.max(0,i-o),outputPath:u}:"warn"===a?{kind:"warn",durationMs:Math.max(0,i-o),outputPath:u}:{kind:"done",durationMs:Math.max(0,i-o),outputPath:u};this.model.update(`script:${e}`,c,{type:"script",item:e})}onArchiveQueued(e){const t="full"===e?"full":"diff";this.model.update(`archive:${t}`,{kind:"waiting"},{type:"archive",item:t})}onArchiveStart(e){const t="full"===e?"full":"diff";this.model.update(`archive:${t}`,{kind:"running",startedAt:Date.now()},{type:"archive",item:t})}onArchiveEnd(e,t,r,o,i){const s="full"===e?"full":"diff",a=n.relative(r,t).replace(/\\/g,"/");this.model.update(`archive:${s}`,{kind:"done",durationMs:Math.max(0,i-o),outputPath:a},{type:"archive",item:s})}onCancelled(e="cancel"){try{this.sink?.cancelPending?.()}catch{}try{"restart"===e?this.sink?.clear?.():this.sink.stop()}catch{}try{this.control?.detach()}catch{}this.control=null,this.renderer=null}installCancellation(e,t){try{this.control=new id({onCancel:e,onRestart:t}),this.control.attach()}catch{this.control=null}}stop(){try{this.sink.stop()}catch{}try{this.control?.detach()}catch{}this.control=null}}const Xg="test"===process.env.NODE_ENV||"1"===process.env.STAN_WRITE_ORDER,em=async e=>{const{cwd:r,config:o,selection:i,mode:s,behavior:a,liveEnabled:u,planBody:c,printPlan:l}=e,p={outputAbs:n.resolve(r,o.stanPath,"output"),outputRel:n.resolve(o.stanPath,"output").replace(/\\/g,"/")},f=p.outputAbs,d=u?new Qg({boring:"1"===process.env.STAN_BORING}):new Yg;let h;Xg&&(h=n.resolve(f,"order.txt"),a.keep||await t.writeFile(h,"","utf8")),l&&c&&(d.onPlan(c),console.log("")),d.start();const D=(i??[]).filter(e=>Object.prototype.hasOwnProperty.call(o.scripts,e));for(const e of D)d.onScriptQueued(e);a.archive&&(d.onArchiveQueued("full"),d.onArchiveQueued("diff"));const g=new od({hangWarn:a.hangWarn,hangKill:a.hangKill,hangKillGrace:a.hangKillGrace});let m=!1,y=!1;const b=new Set;let v=null;const E=new Promise(e=>{v=e}),F=()=>{if(!m){m=!0;for(const e of D)b.add(`script:${e}`);try{d.onCancelled("cancel")}catch{}try{g.cancelAll({immediate:!0})}catch{}try{process.exitCode=1,"test"!==process.env.NODE_ENV&&process.exit(1)}catch{}try{v?.()}catch{}}},C=()=>F();try{process.on("SIGINT",C)}catch{}d.installCancellation(F,u?()=>{if(!y){y=!0,m=!0;try{d.onCancelled("restart")}catch{}try{g.cancelAll({immediate:!0})}catch{}try{v?.()}catch{}}}:void 0);const w=(_=async()=>{try{d.stop()}catch{}try{g.cancelAll({immediate:!0})}catch{}try{await g.waitAll(3e3)}catch{}try{process.stdin.pause?.()}catch{}},nd(()=>{try{const e=_();e&&"function"==typeof e.then&&e.catch(()=>{})}catch{}}));var _;const A=()=>{try{process.off("SIGINT",C)}catch{}try{w()}catch{}},S=[];let k=null;if(D.length>0&&(k=(async(e,t,n,r,o,i,s,a,u,c,l)=>{const p=[],f=async n=>{try{if("function"==typeof c&&!c())return}catch{}const o=r.scripts[n],i="string"==typeof o?o:"object"==typeof o&&o&&"script"in o?String(o.script):"",f=[];if(o&&"object"==typeof o&&"warnPattern"in o){const e=o.warnPattern;if("string"==typeof e&&e.trim().length){const t=e.trim();try{f.push(new RegExp(t))}catch{}try{const e=t.replace(/\\\\/g,"\\");e!==t&&f.push(new RegExp(e))}catch{}try{f.push(new RegExp(t,"i"))}catch{}}}const d=await Wf(e,t,0,n,i,s,a,{silent:a.silent,hangWarn:u?.hangWarn,hangKill:u?.hangKill,hangKillGrace:u?.hangKillGrace,warnPatterns:f},l);p.push(d)};if("sequential"===i)for(const e of o){const t=e=>new Promise(t=>setTimeout(t,e));if("function"==typeof c){if(!c())break;if(await Gf(),!c())break;if(await t(25),!c())break}if(await f(e),"function"==typeof c&&(await Gf(),!c()))break}else{const e="function"==typeof c?o.filter(()=>c()):o;await Promise.all(e.map(e=>f(e).then(()=>{})))}return p})(r,f,0,o,D,s,h,{onStart:e=>d.onScriptStart(e),onEnd:(e,t,n,o,i,s)=>{m&&b.has(`script:${e}`)||(d.onScriptEnd(e,t,r,n,o,i,s),("error"===s||"number"==typeof i&&0!==i)&&(process.exitCode=1))},silent:!0,onHangWarn:(e,t)=>{u||console.log(`stan: ⏱ stalled "${e}" after ${t}s of inactivity`)},onHangTimeout:(e,t)=>{u||console.log(`stan: ⏱ timeout "${e}" after ${t}s; sending SIGTERM`)},onHangKilled:(e,t)=>{u||console.log(`stan: ◼ killed "${e}" after ${t}s grace`)}},{hangWarn:a.hangWarn,hangKill:a.hangKill,hangKillGrace:a.hangKillGrace},()=>!m,g).then(e=>{S.push(...e)}),k.catch?.(()=>{}),await Promise.race([k,E])),m){try{d.stop()}catch{}u&&console.log("");try{k&&await Promise.race([k,new Promise(e=>setTimeout(e,2500))])}catch{}try{await g.waitAll(3e3)}catch{}try{process.stdin.pause?.()}catch{}try{const e="win32"===process.platform?1600:400;await new Promise(t=>setTimeout(t,e))}catch{}return{created:S,cancelled:!0,restartRequested:y}}try{await new Promise(e=>setImmediate(e))}catch{}if(m)return A(),{created:S,cancelled:!0,restartRequested:y};if(a.archive){const e=Boolean(a.combine),{archivePath:t,diffPath:n}=await jf({cwd:r,config:o,includeOutputs:e},{silent:!0,progress:{start:e=>d.onArchiveStart(e),done:(e,t,n,o)=>d.onArchiveEnd(e,t,r,n,o)}});S.push(t,n)}return d.stop(),u&&console.log(""),A(),{created:S,cancelled:!1,restartRequested:y}};exports.renderAvailableScriptsHelp=e=>{try{const t=wu(e),n=Object.keys(t.scripts);if(!n.length)return"";const r=n[0]??"lint";return["","Default: runs all scripts and writes archives.","","Available script keys:",` ${n.join(", ")}`,"","Examples:"," stan run # all scripts, with archives",` stan run -s ${r}`,` stan run -q -x ${r}`," stan run -A # no archives"," stan run -S -A -p # plan only, no scripts, no archives",` stan run -c -s ${r}`,""].join("\n")}catch(e){return"1"===process.env.STAN_DEBUG&&console.error("stan: unable to load config for help footer",e),""}},exports.runSelected=async(r,o,i=null,s="concurrent",a)=>{const u=a??{};try{await(async e=>{const t=await $f(e),n=Boolean(process.stdout?.isTTY);if(!t.systemPrompt.localExists||t.systemPrompt.inSync||t.isDevModuleRepo||"1"===process.env.STAN_SUPPRESS_DRIFT||"test"===process.env.NODE_ENV&&"1"!==process.env.STAN_FORCE_DRIFT_WARN||(n?(console.warn(Ff("stan: warning: local system prompt differs from packaged baseline.")),console.warn(Pf(" Edits in downstream repos will be overwritten by `stan init`.")),console.warn(Pf(" Move customizations to <stanPath>/system/stan.project.md instead."))):console.warn("stan: warning: system prompt drift detected; run `stan init` to update (non‑TTY)")),!t.isDevModuleRepo&&t.packageVersion&&t.docsMeta?.version){const e=t.docsMeta.version,r=t.packageVersion;e!==r&&(n?(console.log(`stan: docs baseline has changed since last install (${e} -> ${r}).`),console.log(Pf(" Run `stan init` to update prompts in your repo."))):console.log(`stan: docs baseline changed ${e} -> ${r}; run \`stan init\` to update`))}})(r)}catch(e){if("1"===process.env.STAN_DEBUG){const t=e instanceof Error?e.message:String(e);console.error("stan: preflight failed",t)}}await(async(r,o,i=!1)=>{const s=Q(r,o);if(await re(r,o),!i){const r=n.resolve(s.outputAbs,E);if(e.existsSync(r))try{await t.copyFile(r,n.resolve(s.diffAbs,F))}catch{}const o=await t.readdir(s.outputAbs,{withFileTypes:!0});for(const t of o)e.rmSync(n.resolve(s.outputAbs,t.name),{recursive:!0,force:!0})}return s.rootAbs})(r,o.stanPath,Boolean(u.keep));const c=((e,t)=>{const{selection:r,config:o,mode:i,behavior:s}=t,a=(null==r?Object.keys(o.scripts):r)??[],u=n.join(o.stanPath,"output").replace(/\\/g,"/");return`stan:\n ${[kf("STAN run plan"),"mode: "+("sequential"===i?"sequential":"concurrent"),`output: ${u}/`,`scripts: ${a.length?a.join(", "):"none"}`,"archive: "+(s.archive?"yes":"no"),"combine: "+(s.combine?"yes":"no"),"keep output dir: "+(s.keep?"yes":"no"),"live: "+(s.live?"yes":"no"),`hang warn: ${"number"==typeof s.hangWarn?s.hangWarn.toString():"n/a"}s`,`hang kill: ${"number"==typeof s.hangKill?s.hangKill.toString():"n/a"}s`,`hang kill grace: ${"number"==typeof s.hangKillGrace?s.hangKillGrace.toString():"n/a"}s`].join("\n ")}`})(0,{selection:i,config:o,mode:s,behavior:u}),l=process.stdout,p=Boolean(l?.isTTY),f=(u.live??!0)&&p,d=null==i?Object.keys(o.scripts):i;let h=!1;for(;;){const{created:e,cancelled:t,restartRequested:n}=await em({cwd:r,config:o,selection:d,mode:s,behavior:u,liveEnabled:f,planBody:c,printPlan:!h&&!1!==u.plan});if(h=!0,!n)return e}};
1
+ "use strict";var e=require("node:fs"),t=require("node:fs/promises"),n=require("node:path"),r=require("fs-extra"),o=require("node:process"),i=require("node:url"),s=require("process"),a=require("buffer"),u=require("node:crypto"),c=require("node:child_process"),l=require("os"),p=require("path"),f=require("util"),d=require("stream"),h=require("events"),g=require("fs"),m=require("node:os"),y=require("node:tty"),D=require("child_process"),b=require("node:readline"),v="undefined"!=typeof document?document.currentScript:null;const w="archive.tar",_="archive.prev.tar",E=e=>e.replace(/\\/g,"/"),A=(e,t)=>{const n=E(e).replace(/\/+$/,""),r=E(t);return r===n||r.startsWith(`${n}/`)},S=(e,t)=>{const n=E(e);return A(`${n}/diff`,t)||A(`${n}/patch`,t)},C=A,k=e=>{const t=e.replace(/\\/g,"/");return e=>!(S(t,e)||((e,t)=>{const n=E(e);return E(t)===`${n}/output/${w}`||E(t)===`${n}/output/archive.diff.tar`||E(t)===`${n}/output/archive.warnings.txt`})(t,e))},P=1048576,R=async(e,r)=>{const o=[],i=[],s=[];await Promise.all(r.map(async r=>{const a=r.replace(/\\/g,"/"),u=n.resolve(e,r);let c=null;try{c=await t.stat(u)}catch{return}const l=c?.size??0;let p,f=!1;try{f=await(async e=>{try{const n=await t.open(e,"r");try{const e=Buffer.allocUnsafe(8192),{bytesRead:t}=await n.read(e,0,e.length,0);for(let n=0;n<t;n+=1)if(0===e[n])return!0;return!1}finally{await n.close().catch(()=>{})}}catch{return!1}})(u)}catch{f=!1}if(f)i.push({path:a,size:l});else{o.push(a);try{(l<=P||l<5*P)&&(p=(e=>{const t=e.replace(/\r\n/g,"\n");return 0===t.length?0:t.split("\n").length})(await t.readFile(u,"utf8")))}catch{}(l>P||"number"==typeof p&&p>3e3)&&s.push({path:a,size:l,loc:p})}}));const a=[];if(i.length>0){a.push(`Binary files excluded from archive (${i.length.toString()}):`);for(const e of i)a.push(` - ${e.path} (${e.size.toString()} bytes)`);a.push("")}if(s.length>0){a.push(`Large text files (included; consider excludes if unwanted) (${s.length.toString()}):`);for(const e of s){const t=[` - ${e.path}`,`(${e.size.toString()} bytes)`];"number"==typeof e.loc&&t.push(`${e.loc.toString()} LOC`),a.push(t.join(" "))}a.push(""),a.push(`Thresholds: size > ${P.toString()} bytes or LOC > ${3e3.toString()}`)}0===a.length&&a.push("No archive warnings.");const u=a.join("\n")+(a.length?"\n":"");return{textFiles:o,excludedBinaries:i,largeText:s,warningsBody:u}};var x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function O(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var F,T,$,L,N,M,B,I,j,H,z,U,q={exports:{}},K=(F||(F=1,function(e){function t(e){return Array.isArray(e)?e:[e]}const n=/^\s+$/,r=/(?:[^\\]|^)\\$/,o=/^\\!/,i=/^\\#/,s=/\r?\n/g,a=/^\.{0,2}\/|^\.{1,2}$/,u=/\/$/,c="/";let l="node-ignore";"undefined"!=typeof Symbol&&(l=Symbol.for("node-ignore"));const p=l,f=(e,t,n)=>(Object.defineProperty(e,t,{value:n}),n),d=/([0-z])-([0-z])/g,h=()=>!1,g=[[/^\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,r,o)=>"\\"===t?`\\[${n}${(e=>{const{length:t}=e;return e.slice(0,t-t%2)})(r)}${o}`:"]"===o&&r.length%2==0?`[${(e=>e.replace(d,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:""))(n)}${r}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`]],m=/(^|\\\/)?\\\*$/,y="regex",D="checkRegex",b={[y]:(e,t)=>(t?`${t}[^/]+`:"[^/]*")+"(?=$|\\/$)",[D]:(e,t)=>(t?`${t}[^/]*`:"[^/]*")+"(?=$|\\/$)"},v=e=>"string"==typeof e;class w{constructor(e,t,n,r,o,i){this.pattern=e,this.mark=t,this.negative=o,f(this,"body",n),f(this,"ignoreCase",r),f(this,"regexPrefix",i)}get regex(){const e="_"+y;return this[e]?this[e]:this._make(y,e)}get checkRegex(){const e="_"+D;return this[e]?this[e]:this._make(D,e)}_make(e,t){const n=this.regexPrefix.replace(m,b[e]),r=this.ignoreCase?new RegExp(n,"i"):new RegExp(n);return f(this,t,r)}}class _{constructor(e){this._ignoreCase=e,this._rules=[]}_add(e){if(e&&e[p])return this._rules=this._rules.concat(e._rules._rules),void(this._added=!0);if(v(e)&&(e={pattern:e}),(e=>e&&v(e)&&!n.test(e)&&!r.test(e)&&0!==e.indexOf("#"))(e.pattern)){const t=(({pattern:e,mark:t},n)=>{let r=!1,s=e;0===s.indexOf("!")&&(r=!0,s=s.substr(1)),s=s.replace(o,"!").replace(i,"#");const a=(e=>g.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e))(s);return new w(e,t,s,n,r,a)})(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,t(v(e)?(e=>e.split(s).filter(Boolean))(e):e).forEach(this._add,this),this._added}test(e,t,n){let r,o=!1,i=!1;this._rules.forEach(s=>{const{negative:a}=s;i===a&&o!==i||a&&!o&&!i&&!t||s[n].test(e)&&(o=!a,i=a,r=a?void 0:s)});const s={ignored:o,unignored:i};return r&&(s.rule=r),s}}const E=(e,t)=>{throw new t(e)},A=(e,t,n)=>v(e)?e?!A.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),S=e=>a.test(e);A.isNotRelative=S,A.convert=e=>e;class C{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){f(this,p,!0),this._rules=new _(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,r){const o=e&&A.convert(e);return A(o,e,this._strictPathCheck?E:h),this._t(o,t,n,r)}checkIgnore(e){if(!u.test(e))return this.test(e);const t=e.split(c).filter(Boolean);if(t.pop(),t.length){const e=this._t(t.join(c)+c,this._testCache,!0,t);if(e.ignored)return e}return this._rules.test(e,!1,D)}_t(e,t,n,r){if(e in t)return t[e];if(r||(r=e.split(c).filter(Boolean)),r.pop(),!r.length)return t[e]=this._rules.test(e,n,y);const o=this._t(r.join(c)+c,t,n,r);return t[e]=o.ignored?o: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 k=e=>new C(e),P=()=>{A.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");const e=/^[a-z]:\//i;A.isNotRelative=t=>e.test(t)||S(t)};"undefined"!=typeof process&&"win32"===process.platform&&P(),e.exports=k,k.default=k,e.exports.isPathValid=e=>A(e&&A.convert(e),e,h),f(e.exports,Symbol.for("setupWindows"),P)}(q)),q.exports),G=O(K),W={};function V(){if($)return T;$=1;const e="\\\\/",t=`[^${e}]`,n="\\.",r="\\/",o="[^/]",i=`(?:${r}|$)`,s=`(?:^|${r})`,a=`${n}{1,2}${i}`,u={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:r,ONE_CHAR:"(?=.)",QMARK:o,END_ANCHOR:i,DOTS_SLASH:a,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${s}${a})`,NO_DOT_SLASH:`(?!${n}{0,1}${i})`,NO_DOTS_SLASH:`(?!${a})`,QMARK_NO_DOT:`[^.${r}]`,STAR:`${o}*?`,START_ANCHOR:s,SEP:"/"},c={...u,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 T={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?c:u}}function Z(){return L||(L=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:o}=V();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(o,"\\$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,r)=>{const o=t.lastIndexOf(n,r);return-1===o?t:"\\"===t[o-1]?e.escapeLast(t,n,o-1):`${t.slice(0,o)}\\${t.slice(o)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{const n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return""===r?n[n.length-2]:r}}(W)),W}function J(){if(H)return j;H=1;const e=function(){if(M)return N;M=1;const e=Z(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:o,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:s,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:p,CHAR_QUESTION_MARK:f,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:h,CHAR_RIGHT_SQUARE_BRACKET:g}=V(),m=e=>e===a||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return N=(D,b)=>{const v=b||{},w=D.length-1,_=!0===v.parts||!0===v.scanToEnd,E=[],A=[],S=[];let C,k,P=D,R=-1,x=0,O=0,F=!1,T=!1,$=!1,L=!1,N=!1,M=!1,B=!1,I=!1,j=!1,H=!1,z=0,U={value:"",depth:0,isGlob:!1};const q=()=>R>=w,K=()=>P.charCodeAt(R+1),G=()=>(C=k,P.charCodeAt(++R));for(;R<w;){let e;if(k=G(),k!==r){if(!0===M||k===u){for(z++;!0!==q()&&(k=G());)if(k!==r)if(k!==u){if(!0!==M&&k===i&&(k=G())===i){if(F=U.isBrace=!0,$=U.isGlob=!0,H=!0,!0===_)continue;break}if(!0!==M&&k===o){if(F=U.isBrace=!0,$=U.isGlob=!0,H=!0,!0===_)continue;break}if(k===d&&(z--,0===z)){M=!1,F=U.isBrace=!0,H=!0;break}}else z++;else B=U.backslashes=!0,G();if(!0===_)continue;break}if(k!==a){if(!0!==v.noext&&1==(k===p||k===n||k===t||k===f||k===s)&&K()===c){if($=U.isGlob=!0,L=U.isExtglob=!0,H=!0,k===s&&R===x&&(j=!0),!0===_){for(;!0!==q()&&(k=G());)if(k!==r){if(k===h){$=U.isGlob=!0,H=!0;break}}else B=U.backslashes=!0,k=G();continue}break}if(k===t){if(C===t&&(N=U.isGlobstar=!0),$=U.isGlob=!0,H=!0,!0===_)continue;break}if(k===f){if($=U.isGlob=!0,H=!0,!0===_)continue;break}if(k===l){for(;!0!==q()&&(e=G());)if(e!==r){if(e===g){T=U.isBracket=!0,$=U.isGlob=!0,H=!0;break}}else B=U.backslashes=!0,G();if(!0===_)continue;break}if(!0===v.nonegate||k!==s||R!==x){if(!0!==v.noparen&&k===c){if($=U.isGlob=!0,!0===_){for(;!0!==q()&&(k=G());)if(k!==c){if(k===h){H=!0;break}}else B=U.backslashes=!0,k=G();continue}break}if(!0===$){if(H=!0,!0===_)continue;break}}else I=U.negated=!0,x++}else{if(E.push(R),A.push(U),U={value:"",depth:0,isGlob:!1},!0===H)continue;if(C===i&&R===x+1){x+=2;continue}O=R+1}}else B=U.backslashes=!0,k=G(),k===u&&(M=!0)}!0===v.noext&&(L=!1,$=!1);let W=P,V="",Z="";x>0&&(V=P.slice(0,x),P=P.slice(x),O-=x),W&&!0===$&&O>0?(W=P.slice(0,O),Z=P.slice(O)):!0===$?(W="",Z=P):W=P,W&&""!==W&&"/"!==W&&W!==P&&m(W.charCodeAt(W.length-1))&&(W=W.slice(0,-1)),!0===v.unescape&&(Z&&(Z=e.removeBackslashes(Z)),W&&!0===B&&(W=e.removeBackslashes(W)));const J={prefix:V,input:D,start:x,base:W,glob:Z,isBrace:F,isBracket:T,isGlob:$,isExtglob:L,isGlobstar:N,negated:I,negatedExtglob:j};if(!0===v.tokens&&(J.maxDepth=0,m(k)||A.push(U),J.tokens=A),!0===v.parts||!0===v.tokens){let e;for(let t=0;t<E.length;t++){const n=e?e+1:x,r=E[t],o=D.slice(n,r);v.tokens&&(0===t&&0!==x?(A[t].isPrefix=!0,A[t].value=V):A[t].value=o,y(A[t]),J.maxDepth+=A[t].depth),0===t&&""===o||S.push(o),e=r}if(e&&e+1<D.length){const t=D.slice(e+1);S.push(t),v.tokens&&(A[A.length-1].value=t,y(A[A.length-1]),J.maxDepth+=A[A.length-1].depth)}J.slashes=E,J.parts=S}return J},N}(),t=function(){if(I)return B;I=1;const e=V(),t=Z(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:s}=e,a=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return r},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,c=(l,p)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=s[l]||l;const f={...p},d="number"==typeof f.maxLength?Math.min(n,f.maxLength):n;let h=l.length;if(h>d)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${d}`);const g={type:"bos",value:"",output:f.prepend||""},m=[g],y=f.capture?"":"?:",D=e.globChars(f.windows),b=e.extglobChars(D),{DOT_LITERAL:v,PLUS_LITERAL:w,SLASH_LITERAL:_,ONE_CHAR:E,DOTS_SLASH:A,NO_DOT:S,NO_DOT_SLASH:C,NO_DOTS_SLASH:k,QMARK:P,QMARK_NO_DOT:R,STAR:x,START_ANCHOR:O}=D,F=e=>`(${y}(?:(?!${O}${e.dot?A:v}).)*?)`,T=f.dot?"":S,$=f.dot?P:R;let L=!0===f.bash?F(f):x;f.capture&&(L=`(${L})`),"boolean"==typeof f.noext&&(f.noextglob=f.noext);const N={input:l,index:-1,start:0,dot:!0===f.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:m};l=t.removePrefix(l,N),h=l.length;const M=[],B=[],I=[];let j,H=g;const z=()=>N.index===h-1,U=N.peek=(e=1)=>l[N.index+e],q=N.advance=()=>l[++N.index]||"",K=()=>l.slice(N.index+1),G=(e="",t=0)=>{N.consumed+=e,N.index+=t},W=e=>{N.output+=null!=e.output?e.output:e.value,G(e.value)},V=()=>{let e=1;for(;"!"===U()&&("("!==U(2)||"?"===U(3));)q(),N.start++,e++;return e%2!=0&&(N.negated=!0,N.start++,!0)},Z=e=>{N[e]++,I.push(e)},J=e=>{N[e]--,I.pop()},Y=e=>{if("globstar"===H.type){const t=N.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||M.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(N.output=N.output.slice(0,-H.output.length),H.type="star",H.value="*",H.output=L,N.output+=H.output)}if(M.length&&"paren"!==e.type&&(M[M.length-1].inner+=e.value),(e.value||e.output)&&W(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,m.push(e),H=e},Q=(e,t)=>{const n={...b[t],conditions:1,inner:""};n.prev=H,n.parens=N.parens,n.output=N.output;const r=(f.capture?"(":"")+n.open;Z("parens"),Y({type:e,value:t,output:N.output?"":E}),Y({type:"paren",extglob:!0,value:q(),output:r}),M.push(n)},X=e=>{let t,n=e.close+(f.capture?")":"");if("negate"===e.type){let r=L;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=F(f)),(r!==L||z()||/^\)+$/.test(K()))&&(n=e.close=`)$))${r}`),e.inner.includes("*")&&(t=K())&&/^\.[^\\/.]+$/.test(t)){const o=c(t,{...p,fastpaths:!1}).output;n=e.close=`)${o})${r})`}"bos"===e.prev.type&&(N.negatedExtglob=!0)}Y({type:"paren",extglob:!0,value:j,output:n}),J("parens")};if(!1!==f.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,n=l.replace(i,(t,n,r,o,i,s)=>"\\"===o?(e=!0,t):"?"===o?n?n+o+(i?P.repeat(i.length):""):0===s?$+(i?P.repeat(i.length):""):P.repeat(r.length):"."===o?v.repeat(r.length):"*"===o?n?n+o+(i?L:""):L:n?t:`\\${t}`);return!0===e&&(n=!0===f.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===l&&!0===f.contains?(N.output=l,N):(N.output=t.wrapOutput(n,N,p),N)}for(;!z();){if(j=q(),"\0"===j)continue;if("\\"===j){const e=U();if("/"===e&&!0!==f.bash)continue;if("."===e||";"===e)continue;if(!e){j+="\\",Y({type:"text",value:j});continue}const t=/^\\+/.exec(K());let n=0;if(t&&t[0].length>2&&(n=t[0].length,N.index+=n,n%2!=0&&(j+="\\")),!0===f.unescape?j=q():j+=q(),0===N.brackets){Y({type:"text",value:j});continue}}if(N.brackets>0&&("]"!==j||"["===H.value||"[^"===H.value)){if(!1!==f.posix&&":"===j){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),o=r[n];if(o){H.value=t+o,N.backtrack=!0,q(),g.output||1!==m.indexOf(H)||(g.output=E);continue}}}("["===j&&":"!==U()||"-"===j&&"]"===U())&&(j=`\\${j}`),"]"!==j||"["!==H.value&&"[^"!==H.value||(j=`\\${j}`),!0===f.posix&&"!"===j&&"["===H.value&&(j="^"),H.value+=j,W({value:j});continue}if(1===N.quotes&&'"'!==j){j=t.escapeRegex(j),H.value+=j,W({value:j});continue}if('"'===j){N.quotes=1===N.quotes?0:1,!0===f.keepQuotes&&Y({type:"text",value:j});continue}if("("===j){Z("parens"),Y({type:"paren",value:j});continue}if(")"===j){if(0===N.parens&&!0===f.strictBrackets)throw new SyntaxError(u("opening","("));const e=M[M.length-1];if(e&&N.parens===e.parens+1){X(M.pop());continue}Y({type:"paren",value:j,output:N.parens?")":"\\)"}),J("parens");continue}if("["===j){if(!0!==f.nobracket&&K().includes("]"))Z("brackets");else{if(!0!==f.nobracket&&!0===f.strictBrackets)throw new SyntaxError(u("closing","]"));j=`\\${j}`}Y({type:"bracket",value:j});continue}if("]"===j){if(!0===f.nobracket||H&&"bracket"===H.type&&1===H.value.length){Y({type:"text",value:j,output:`\\${j}`});continue}if(0===N.brackets){if(!0===f.strictBrackets)throw new SyntaxError(u("opening","["));Y({type:"text",value:j,output:`\\${j}`});continue}J("brackets");const e=H.value.slice(1);if(!0===H.posix||"^"!==e[0]||e.includes("/")||(j=`/${j}`),H.value+=j,W({value:j}),!1===f.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(H.value);if(N.output=N.output.slice(0,-H.value.length),!0===f.literalBrackets){N.output+=n,H.value=n;continue}H.value=`(${y}${n}|${H.value})`,N.output+=H.value;continue}if("{"===j&&!0!==f.nobrace){Z("braces");const e={type:"brace",value:j,output:"(",outputIndex:N.output.length,tokensIndex:N.tokens.length};B.push(e),Y(e);continue}if("}"===j){const e=B[B.length-1];if(!0===f.nobrace||!e){Y({type:"text",value:j,output:j});continue}let t=")";if(!0===e.dots){const e=m.slice(),n=[];for(let t=e.length-1;t>=0&&(m.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,f),N.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=N.output.slice(0,e.outputIndex),r=N.tokens.slice(e.tokensIndex);e.value=e.output="\\{",j=t="\\}",N.output=n;for(const e of r)N.output+=e.output||e.value}Y({type:"brace",value:j,output:t}),J("braces"),B.pop();continue}if("|"===j){M.length>0&&M[M.length-1].conditions++,Y({type:"text",value:j});continue}if(","===j){let e=j;const t=B[B.length-1];t&&"braces"===I[I.length-1]&&(t.comma=!0,e="|"),Y({type:"comma",value:j,output:e});continue}if("/"===j){if("dot"===H.type&&N.index===N.start+1){N.start=N.index+1,N.consumed="",N.output="",m.pop(),H=g;continue}Y({type:"slash",value:j,output:_});continue}if("."===j){if(N.braces>0&&"dot"===H.type){"."===H.value&&(H.output=v);const e=B[B.length-1];H.type="dots",H.output+=j,H.value+=j,e.dots=!0;continue}if(N.braces+N.parens===0&&"bos"!==H.type&&"slash"!==H.type){Y({type:"text",value:j,output:v});continue}Y({type:"dot",value:j,output:v});continue}if("?"===j){if((!H||"("!==H.value)&&!0!==f.noextglob&&"("===U()&&"?"!==U(2)){Q("qmark",j);continue}if(H&&"paren"===H.type){const e=U();let t=j;("("===H.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(K()))&&(t=`\\${j}`),Y({type:"text",value:j,output:t});continue}if(!0!==f.dot&&("slash"===H.type||"bos"===H.type)){Y({type:"qmark",value:j,output:R});continue}Y({type:"qmark",value:j,output:P});continue}if("!"===j){if(!0!==f.noextglob&&"("===U()&&("?"!==U(2)||!/[!=<:]/.test(U(3)))){Q("negate",j);continue}if(!0!==f.nonegate&&0===N.index){V();continue}}if("+"===j){if(!0!==f.noextglob&&"("===U()&&"?"!==U(2)){Q("plus",j);continue}if(H&&"("===H.value||!1===f.regex){Y({type:"plus",value:j,output:w});continue}if(H&&("bracket"===H.type||"paren"===H.type||"brace"===H.type)||N.parens>0){Y({type:"plus",value:j});continue}Y({type:"plus",value:w});continue}if("@"===j){if(!0!==f.noextglob&&"("===U()&&"?"!==U(2)){Y({type:"at",extglob:!0,value:j,output:""});continue}Y({type:"text",value:j});continue}if("*"!==j){"$"!==j&&"^"!==j||(j=`\\${j}`);const e=o.exec(K());e&&(j+=e[0],N.index+=e[0].length),Y({type:"text",value:j});continue}if(H&&("globstar"===H.type||!0===H.star)){H.type="star",H.star=!0,H.value+=j,H.output=L,N.backtrack=!0,N.globstar=!0,G(j);continue}let e=K();if(!0!==f.noextglob&&/^\([^?]/.test(e)){Q("star",j);continue}if("star"===H.type){if(!0===f.noglobstar){G(j);continue}const t=H.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,o=n&&("star"===n.type||"globstar"===n.type);if(!0===f.bash&&(!r||e[0]&&"/"!==e[0])){Y({type:"star",value:j,output:""});continue}const i=N.braces>0&&("comma"===t.type||"brace"===t.type),s=M.length&&("pipe"===t.type||"paren"===t.type);if(!r&&"paren"!==t.type&&!i&&!s){Y({type:"star",value:j,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[N.index+4];if(t&&"/"!==t)break;e=e.slice(3),G("/**",3)}if("bos"===t.type&&z()){H.type="globstar",H.value+=j,H.output=F(f),N.output=H.output,N.globstar=!0,G(j);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!o&&z()){N.output=N.output.slice(0,-(t.output+H.output).length),t.output=`(?:${t.output}`,H.type="globstar",H.output=F(f)+(f.strictSlashes?")":"|$)"),H.value+=j,N.globstar=!0,N.output+=t.output+H.output,G(j);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";N.output=N.output.slice(0,-(t.output+H.output).length),t.output=`(?:${t.output}`,H.type="globstar",H.output=`${F(f)}${_}|${_}${n})`,H.value+=j,N.output+=t.output+H.output,N.globstar=!0,G(j+q()),Y({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){H.type="globstar",H.value+=j,H.output=`(?:^|${_}|${F(f)}${_})`,N.output=H.output,N.globstar=!0,G(j+q()),Y({type:"slash",value:"/",output:""});continue}N.output=N.output.slice(0,-H.output.length),H.type="globstar",H.output=F(f),H.value+=j,N.output+=H.output,N.globstar=!0,G(j);continue}const n={type:"star",value:j,output:L};!0!==f.bash?!H||"bracket"!==H.type&&"paren"!==H.type||!0!==f.regex?(N.index!==N.start&&"slash"!==H.type&&"dot"!==H.type||("dot"===H.type?(N.output+=C,H.output+=C):!0===f.dot?(N.output+=k,H.output+=k):(N.output+=T,H.output+=T),"*"!==U()&&(N.output+=E,H.output+=E)),Y(n)):(n.output=j,Y(n)):(n.output=".*?","bos"!==H.type&&"slash"!==H.type||(n.output=T+n.output),Y(n))}for(;N.brackets>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing","]"));N.output=t.escapeLast(N.output,"["),J("brackets")}for(;N.parens>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing",")"));N.output=t.escapeLast(N.output,"("),J("parens")}for(;N.braces>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing","}"));N.output=t.escapeLast(N.output,"{"),J("braces")}if(!0===f.strictSlashes||"star"!==H.type&&"bracket"!==H.type||Y({type:"maybe_slash",value:"",output:`${_}?`}),!0===N.backtrack){N.output="";for(const e of N.tokens)N.output+=null!=e.output?e.output:e.value,e.suffix&&(N.output+=e.suffix)}return N};return c.fastpaths=(r,o)=>{const i={...o},a="number"==typeof i.maxLength?Math.min(n,i.maxLength):n,u=r.length;if(u>a)throw new SyntaxError(`Input length: ${u}, exceeds maximum allowed length: ${a}`);r=s[r]||r;const{DOT_LITERAL:c,SLASH_LITERAL:l,ONE_CHAR:p,DOTS_SLASH:f,NO_DOT:d,NO_DOTS:h,NO_DOTS_SLASH:g,STAR:m,START_ANCHOR:y}=e.globChars(i.windows),D=i.dot?h:d,b=i.dot?g:d,v=i.capture?"":"?:";let w=!0===i.bash?".*?":m;i.capture&&(w=`(${w})`);const _=e=>!0===e.noglobstar?w:`(${v}(?:(?!${y}${e.dot?f:c}).)*?)`,E=e=>{switch(e){case"*":return`${D}${p}${w}`;case".*":return`${c}${p}${w}`;case"*.*":return`${D}${w}${c}${p}${w}`;case"*/*":return`${D}${w}${l}${p}${b}${w}`;case"**":return D+_(i);case"**/*":return`(?:${D}${_(i)}${l})?${b}${p}${w}`;case"**/*.*":return`(?:${D}${_(i)}${l})?${b}${w}${c}${p}${w}`;case"**/.*":return`(?:${D}${_(i)}${l})?${c}${p}${w}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=E(t[1]);if(!n)return;return n+c+t[2]}}},A=t.removePrefix(r,{negated:!1,prefix:""});let S=E(A);return S&&!0!==i.strictSlashes&&(S+=`${l}?`),S},B=c}(),n=Z(),r=V(),o=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map(e=>o(e,t,n)),i=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return i}const r=(i=e)&&"object"==typeof i&&!Array.isArray(i)&&e.tokens&&e.input;var i;if(""===e||"string"!=typeof e&&!r)throw new TypeError("Expected pattern to be a non-empty string");const s=t||{},a=s.windows,u=r?o.compileRe(e,t):o.makeRe(e,t,!1,!0),c=u.state;delete u.state;let l=()=>!1;if(s.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};l=o(s.ignore,e,n)}const p=(n,r=!1)=>{const{isMatch:i,match:p,output:f}=o.test(n,u,t,{glob:e,posix:a}),d={glob:e,state:c,regex:u,posix:a,input:n,output:f,match:p,isMatch:i};return"function"==typeof s.onResult&&s.onResult(d),!1===i?(d.isMatch=!1,!!r&&d):l(n)?("function"==typeof s.onIgnore&&s.onIgnore(d),d.isMatch=!1,!!r&&d):("function"==typeof s.onMatch&&s.onMatch(d),!r||d)};return n&&(p.state=c),p};return o.test=(e,t,r,{glob:i,posix:s}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=r||{},u=a.format||(s?n.toPosixSlashes:null);let c=e===i,l=c&&u?u(e):e;return!1===c&&(l=u?u(e):e,c=l===i),!1!==c&&!0!==a.capture||(c=!0===a.matchBase||!0===a.basename?o.matchBase(e,t,r,s):t.exec(l)),{isMatch:Boolean(c),match:c,output:l}},o.matchBase=(e,t,r)=>(t instanceof RegExp?t:o.makeRe(t,r)).test(n.basename(e)),o.isMatch=(e,t,n)=>o(t,n)(e),o.parse=(e,n)=>Array.isArray(e)?e.map(e=>o.parse(e,n)):t(e,{...n,fastpaths:!1}),o.scan=(t,n)=>e(t,n),o.compileRe=(e,t,n=!1,r=!1)=>{if(!0===n)return e.output;const i=t||{},s=i.contains?"":"^",a=i.contains?"":"$";let u=`${s}(?:${e.output})${a}`;e&&!0===e.negated&&(u=`^(?!${u}).*$`);const c=o.toRegex(u,t);return!0===r&&(c.state=e),c},o.makeRe=(e,n={},r=!1,i=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return!1===n.fastpaths||"."!==e[0]&&"*"!==e[0]||(s.output=t.fastpaths(e,n)),s.output||(s=t(e,n)),o.compileRe(s,n,r,i)},o.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/$^/}},o.constants=r,j=o}var Y=O(function(){if(U)return z;U=1;const e=J(),t=Z();function n(n,r,o=!1){return!r||null!==r.windows&&void 0!==r.windows||(r={...r,windows:t.isWindows()}),e(n,r,o)}return Object.assign(n,e),z=n}());const Q=(e,t)=>{const r=t.replace(/\\/g,"/").replace(/^\.\/+/,""),o=`${r}/system`,i=`${r}/output`,s=`${r}/diff`,a=`${r}/dist`,u=`${r}/patch`,c=`${r}/imports`;return{rootRel:r,systemRel:o,outputRel:i,diffRel:s,distRel:a,patchRel:u,importsRel:c,rootAbs:n.resolve(e,r),systemAbs:n.resolve(e,o),outputAbs:n.resolve(e,i),diffAbs:n.resolve(e,s),distAbs:n.resolve(e,a),patchAbs:n.resolve(e,u),importsAbs:n.resolve(e,c)}},X=async e=>{const r=[],o=["."];for(;o.length;){const i=o.pop(),s=n.resolve(e,i),a=await t.readdir(s,{withFileTypes:!0});for(const e of a){const t="."===i?e.name:n.join(i,e.name);e.isDirectory()?o.push(t):r.push(t.replace(/\\/g,"/"))}}return r},ee=(e,t)=>{const n=t.replace(/\\/g,"/").replace(/\/+$/,"");return e===n||e.startsWith(n+"/")},te=e=>{const t=e.replace(/\\/g,"/").replace(/^\.\/+/,"").replace(/\/+$/,"");if(!/[*?[\]{}()!]/.test(n=t)&&!n.includes("**"))return t?e=>ee(e,t):()=>!1;var n;const r=Y(t,{dot:!0});return e=>r(e)},ne=async(r,{cwd:o,stanPath:i,includeOutputDir:s,includes:a=[],excludes:u=[]})=>{const c=i.replace(/\\/g,"/"),l=((e,t)=>{const n=new Set;for(const r of e){if("package.json"===r)continue;if(!r.endsWith("/package.json"))continue;const e=r.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)})(r,c),p=await(async r=>{const o=n.resolve(r,".gitignore");if(!e.existsSync(o))return null;try{const e=await t.readFile(o,"utf8"),n=G();return n.add(e),n}catch{return null}})(o),f=[e=>ee(e,"node_modules"),e=>ee(e,".git"),...p?[e=>p.ignores(e)]:[],...u.map(te),...l.map(e=>t=>ee(t,e)),e=>S(c,e)];s||f.push(e=>C(`${c}/output`,e));const d=r.filter(e=>!f.some(t=>t(e)));if(a.length>0){const e=a.map(te),t=[e=>S(c,e),...s?[]:[e=>C(`${c}/output`,e)]],n=new Set(d);for(const t of r)e.some(e=>e(t))&&n.add(t);const o=u.map(te);return r.filter(e=>n.has(e)&&!t.some(t=>t(e))&&!o.some(t=>t(e)))}return d},re=async(e,t)=>{const n=Q(e,t);return await r.ensureDir(n.rootAbs),await r.ensureDir(n.outputAbs),await r.ensureDir(n.diffAbs),await r.ensureDir(n.patchAbs),{rootAbs:n.rootAbs,outputAbs:n.outputAbs,diffAbs:n.diffAbs,patchAbs:n.patchAbs}},oe=async(e,t)=>{const n=await re(e,t);return{outDir:n.outputAbs,diffDir:n.diffAbs}},ie=e=>e instanceof URL?i.fileURLToPath(e):e;function se({cwd:t}={}){const r=function(t,{cwd:r=o.cwd(),type:i="file",stopAt:s}={}){let a=n.resolve(ie(r)??"");const{root:u}=n.parse(a);s=n.resolve(a,ie(s)??u);const c=n.isAbsolute(t);for(;a;){const r=c?t:n.join(a,t);try{const t=e.statSync(r,{throwIfNoEntry:!1});if("file"===i&&t?.isFile()||"directory"===i&&t?.isDirectory())return r}catch{}if(a===s||a===u)break;a=n.dirname(a)}}("package.json",{cwd:t});return r&&n.dirname(r)}const ae=["stan.config.yml","stan.config.yaml","stan.config.json"],ue=t=>{for(const r of ae){const o=n.resolve(t,r);if(e.existsSync(o))return o}return null};var ce,le={},pe={},fe={},de={};function he(){if(ce)return de;ce=1;const e=Symbol.for("yaml.alias"),t=Symbol.for("yaml.document"),n=Symbol.for("yaml.map"),r=Symbol.for("yaml.pair"),o=Symbol.for("yaml.scalar"),i=Symbol.for("yaml.seq"),s=Symbol.for("yaml.node.type"),a=e=>!!e&&"object"==typeof e&&e[s]===o;function u(e){if(e&&"object"==typeof e)switch(e[s]){case n:case i:return!0}return!1}return de.ALIAS=e,de.DOC=t,de.MAP=n,de.NODE_TYPE=s,de.PAIR=r,de.SCALAR=o,de.SEQ=i,de.hasAnchor=e=>(a(e)||u(e))&&!!e.anchor,de.isAlias=t=>!!t&&"object"==typeof t&&t[s]===e,de.isCollection=u,de.isDocument=e=>!!e&&"object"==typeof e&&e[s]===t,de.isMap=e=>!!e&&"object"==typeof e&&e[s]===n,de.isNode=function(t){if(t&&"object"==typeof t)switch(t[s]){case e:case n:case o:case i:return!0}return!1},de.isPair=e=>!!e&&"object"==typeof e&&e[s]===r,de.isScalar=a,de.isSeq=e=>!!e&&"object"==typeof e&&e[s]===i,de}var ge,me,ye={};function De(){if(ge)return ye;ge=1;var e=he();const t=Symbol("break visit"),n=Symbol("skip children"),r=Symbol("remove node");function o(t,n){const o=u(n);e.isDocument(t)?i(null,t.contents,o,Object.freeze([t]))===r&&(t.contents=null):i(null,t,o,Object.freeze([]))}function i(n,o,s,a){const u=c(n,o,s,a);if(e.isNode(u)||e.isPair(u))return l(n,a,u),i(n,u,s,a);if("symbol"!=typeof u)if(e.isCollection(o)){a=Object.freeze(a.concat(o));for(let e=0;e<o.items.length;++e){const n=i(e,o.items[e],s,a);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(o.items.splice(e,1),e-=1)}}}else if(e.isPair(o)){a=Object.freeze(a.concat(o));const e=i("key",o.key,s,a);if(e===t)return t;e===r&&(o.key=null);const n=i("value",o.value,s,a);if(n===t)return t;n===r&&(o.value=null)}return u}async function s(t,n){const o=u(n);e.isDocument(t)?await a(null,t.contents,o,Object.freeze([t]))===r&&(t.contents=null):await a(null,t,o,Object.freeze([]))}async function a(n,o,i,s){const u=await c(n,o,i,s);if(e.isNode(u)||e.isPair(u))return l(n,s,u),a(n,u,i,s);if("symbol"!=typeof u)if(e.isCollection(o)){s=Object.freeze(s.concat(o));for(let e=0;e<o.items.length;++e){const n=await a(e,o.items[e],i,s);if("number"==typeof n)e=n-1;else{if(n===t)return t;n===r&&(o.items.splice(e,1),e-=1)}}}else if(e.isPair(o)){s=Object.freeze(s.concat(o));const e=await a("key",o.key,i,s);if(e===t)return t;e===r&&(o.key=null);const n=await a("value",o.value,i,s);if(n===t)return t;n===r&&(o.value=null)}return u}function u(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 c(t,n,r,o){return"function"==typeof r?r(t,n,o):e.isMap(n)?r.Map?.(t,n,o):e.isSeq(n)?r.Seq?.(t,n,o):e.isPair(n)?r.Pair?.(t,n,o):e.isScalar(n)?r.Scalar?.(t,n,o):e.isAlias(n)?r.Alias?.(t,n,o):void 0}function l(t,n,r){const o=n[n.length-1];if(e.isCollection(o))o.items[t]=r;else if(e.isPair(o))"key"===t?o.key=r:o.value=r;else{if(!e.isDocument(o)){const t=e.isAlias(o)?"alias":"scalar";throw new Error(`Cannot replace node with ${t} parent`)}o.contents=r}}return o.BREAK=t,o.SKIP=n,o.REMOVE=r,s.BREAK=t,s.SKIP=n,s.REMOVE=r,ye.visit=o,ye.visitAsync=s,ye}function be(){if(me)return fe;me=1;var e=he(),t=De();const n={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},r=e=>e.replace(/[!,[\]{}]/g,e=>n[e]);class o{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},o.defaultYaml,e),this.tags=Object.assign({},o.defaultTags,t)}clone(){const e=new o(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new o(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:o.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},o.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:o.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},o.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[e,r]=n;return this.tags[e]=r,!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;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${r}`,!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,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);const o=this.tags[n];if(o)try{return o+decodeURIComponent(r)}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+r(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(n){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],o=Object.entries(this.tags);let i;if(n&&o.length>0&&e.isNode(n.contents)){const r={};t.visit(n.contents,(t,n)=>{e.isNode(n)&&n.tag&&(r[n.tag]=!0)}),i=Object.keys(r)}else i=[];for(const[e,t]of o)"!!"===e&&"tag:yaml.org,2002:"===t||n&&!i.some(e=>e.startsWith(t))||r.push(`%TAG ${e} ${t}`);return r.join("\n")}}return o.defaultYaml={explicit:!1,version:"1.2"},o.defaultTags={"!!":"tag:yaml.org,2002:"},fe.Directives=o,fe}var ve,we={},_e={},Ee={};function Ae(){if(ve)return Ee;ve=1;var e=he(),t=De();function n(e){const n=new Set;return t.visit(e,{Value(e,t){t.anchor&&n.add(t.anchor)}}),n}function r(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}return Ee.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},Ee.anchorNames=n,Ee.createNodeAnchors=function(t,o){const i=[],s=new Map;let a=null;return{onAnchor:e=>{i.push(e),a??(a=n(t));const s=r(o,a);return a.add(s),s},setAnchors:()=>{for(const t of i){const n=s.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:s}},Ee.findNewAnchor=r,Ee}var Se,Ce={},ke={};function Pe(){return Se||(Se=1,ke.applyReviver=function e(t,n,r,o){if(o&&"object"==typeof o)if(Array.isArray(o))for(let n=0,r=o.length;n<r;++n){const r=o[n],i=e(t,o,String(n),r);void 0===i?delete o[n]:i!==r&&(o[n]=i)}else if(o instanceof Map)for(const n of Array.from(o.keys())){const r=o.get(n),i=e(t,o,n,r);void 0===i?o.delete(n):i!==r&&o.set(n,i)}else if(o instanceof Set)for(const n of Array.from(o)){const r=e(t,o,n,n);void 0===r?o.delete(n):r!==n&&(o.delete(n),o.add(r))}else for(const[n,r]of Object.entries(o)){const i=e(t,o,n,r);void 0===i?delete o[n]:i!==r&&(o[n]=i)}return t.call(n,r,o)}),ke}var Re,xe,Oe,Fe={};function Te(){if(Re)return Fe;Re=1;var e=he();return Fe.toJS=function t(n,r,o){if(Array.isArray(n))return n.map((e,n)=>t(e,String(n),o));if(n&&"function"==typeof n.toJSON){if(!o||!e.hasAnchor(n))return n.toJSON(r,o);const t={aliasCount:0,count:1,res:void 0};o.anchors.set(n,t),o.onCreate=e=>{t.res=e,delete o.onCreate};const i=n.toJSON(r,o);return o.onCreate&&o.onCreate(i),i}return"bigint"!=typeof n||o?.keep?n:Number(n)},Fe}function $e(){if(xe)return Ce;xe=1;var e=Pe(),t=he(),n=Te();return Ce.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(r,{mapAsMap:o,maxAliasCount:i,onAnchor:s,reviver:a}={}){if(!t.isDocument(r))throw new TypeError("A document argument is required");const u={anchors:new Map,doc:r,keep:!0,mapAsMap:!0===o,mapKeyWarned:!1,maxAliasCount:"number"==typeof i?i:100},c=n.toJS(this,"",u);if("function"==typeof s)for(const{count:e,res:t}of u.anchors.values())s(t,e);return"function"==typeof a?e.applyReviver(a,{"":c},"",c):c}},Ce}function Le(){if(Oe)return _e;Oe=1;var e=Ae(),t=De(),n=he(),r=$e(),o=Te();let i=class extends r.NodeBase{constructor(e){super(n.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){let o,i;r?.aliasResolveCache?o=r.aliasResolveCache:(o=[],t.visit(e,{Node:(e,t)=>{(n.isAlias(t)||n.hasAnchor(t))&&o.push(t)}}),r&&(r.aliasResolveCache=o));for(const e of o){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:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let u=n.get(a);if(u||(o.toJS(a,null,t),u=n.get(a)),!u||void 0===u.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(u.count+=1,0===u.aliasCount&&(u.aliasCount=s(r,a,n)),u.count*u.aliasCount>i))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");return u.res}toString(t,n,r){const o=`*${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`${o} `}return o}};function s(e,t,r){if(n.isAlias(t)){const n=t.resolve(e),o=r&&n&&r.get(n);return o?o.count*o.aliasCount:0}if(n.isCollection(t)){let n=0;for(const o of t.items){const t=s(e,o,r);t>n&&(n=t)}return n}if(n.isPair(t)){const n=s(e,t.key,r),o=s(e,t.value,r);return Math.max(n,o)}return 1}return _e.Alias=i,_e}var Ne,Me,Be,Ie={},je={},He={};function ze(){if(Ne)return He;Ne=1;var e=he(),t=$e(),n=Te();let r=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 r.BLOCK_FOLDED="BLOCK_FOLDED",r.BLOCK_LITERAL="BLOCK_LITERAL",r.PLAIN="PLAIN",r.QUOTE_DOUBLE="QUOTE_DOUBLE",r.QUOTE_SINGLE="QUOTE_SINGLE",He.Scalar=r,He.isScalarValue=e=>!e||"function"!=typeof e&&"object"!=typeof e,He}function Ue(){if(Me)return je;Me=1;var e=Le(),t=he(),n=ze();return je.createNode=function(r,o,i){if(t.isDocument(r)&&(r=r.contents),t.isNode(r))return r;if(t.isPair(r)){const e=i.schema[t.MAP].createNode?.(i.schema,null,i);return e.items.push(r),e}(r instanceof String||r instanceof Number||r instanceof Boolean||"undefined"!=typeof BigInt&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:s,onAnchor:a,onTagObj:u,schema:c,sourceObjects:l}=i;let p;if(s&&r&&"object"==typeof r){if(p=l.get(r),p)return p.anchor??(p.anchor=a(r)),new e.Alias(p.anchor);p={anchor:null,node:null},l.set(r,p)}o?.startsWith("!!")&&(o="tag:yaml.org,2002:"+o.slice(2));let f=function(e,t,n){if(t){const e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}(r,o,c.tags);if(!f){if(r&&"function"==typeof r.toJSON&&(r=r.toJSON()),!r||"object"!=typeof r){const e=new n.Scalar(r);return p&&(p.node=e),e}f=r instanceof Map?c[t.MAP]:Symbol.iterator in Object(r)?c[t.SEQ]:c[t.MAP]}u&&(u(f),delete i.onTagObj);const d=f?.createNode?f.createNode(i.schema,r,i):"function"==typeof f?.nodeClass?.from?f.nodeClass.from(i.schema,r,i):new n.Scalar(r);return o?d.tag=o:f.default||(d.tag=f.tag),p&&(p.node=d),d},je}function qe(){if(Be)return Ie;Be=1;var e=Ue(),t=he(),n=$e();function r(t,n,r){let o=r;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]=o,o=e}else o=new Map([[t,o]])}return e.createNode(o,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const o=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(o(e))this.add(n);else{const[o,...i]=e,s=this.get(o,!0);if(t.isCollection(s))s.addIn(i,n);else{if(void 0!==s||!this.schema)throw new Error(`Expected YAML collection at ${o}. Remaining path: ${i}`);this.set(o,r(this.schema,i,n))}}}deleteIn(e){const[n,...r]=e;if(0===r.length)return this.delete(n);const o=this.get(n,!0);if(t.isCollection(o))return o.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...o]=e,i=this.get(r,!0);return 0===o.length?!n&&t.isScalar(i)?i.value:i:t.isCollection(i)?i.getIn(o,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!t.isPair(n))return!1;const r=n.value;return null==r||e&&t.isScalar(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(0===r.length)return this.has(n);const o=this.get(n,!0);return!!t.isCollection(o)&&o.hasIn(r)}setIn(e,n){const[o,...i]=e;if(0===i.length)this.set(o,n);else{const e=this.get(o,!0);if(t.isCollection(e))e.setIn(i,n);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${o}. Remaining path: ${i}`);this.set(o,r(this.schema,i,n))}}}};return Ie.Collection=i,Ie.collectionFromPath=r,Ie.isEmptyPath=o,Ie}var Ke,Ge={},We={},Ve={},Ze={};function Je(){if(Ke)return Ze;function e(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}return Ke=1,Ze.indentComment=e,Ze.lineComment=(t,n,r)=>t.endsWith("\n")?e(r,n):r.includes("\n")?"\n"+e(r,n):(t.endsWith(" ")?"":" ")+r,Ze.stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#"),Ze}var Ye,Qe,Xe,et,tt={},nt={};function rt(){if(Qe)return tt;Qe=1;var e=ze(),t=function(){if(Ye)return nt;Ye=1;const e="block",t="quoted";function n(e,t,n){let r=t,o=t+1,i=e[o];for(;" "===i||"\t"===i;)if(t<o+n)i=e[++t];else{do{i=e[++t]}while(i&&"\n"!==i);r=t,o=t+1,i=e[o]}return r}return nt.FOLD_BLOCK=e,nt.FOLD_FLOW="flow",nt.FOLD_QUOTED=t,nt.foldFlowLines=function(r,o,i="flow",{indentAtStart:s,lineWidth:a=80,minContentWidth:u=20,onFold:c,onOverflow:l}={}){if(!a||a<0)return r;a<u&&(u=0);const p=Math.max(1+u,1+a-o.length);if(r.length<=p)return r;const f=[],d={};let h,g,m=a-o.length;"number"==typeof s&&(s>a-Math.max(2,u)?f.push(0):m=a-s);let y=!1,D=-1,b=-1,v=-1;i===e&&(D=n(r,D,o.length),-1!==D&&(m=D+p));for(let s;s=r[D+=1];){if(i===t&&"\\"===s){switch(b=D,r[D+1]){case"x":D+=3;break;case"u":D+=5;break;case"U":D+=9;break;default:D+=1}v=D}if("\n"===s)i===e&&(D=n(r,D,o.length)),m=D+o.length+p,h=void 0;else{if(" "===s&&g&&" "!==g&&"\n"!==g&&"\t"!==g){const e=r[D+1];e&&" "!==e&&"\n"!==e&&"\t"!==e&&(h=D)}if(D>=m)if(h)f.push(h),m=h+p,h=void 0;else if(i===t){for(;" "===g||"\t"===g;)g=s,s=r[D+=1],y=!0;const e=D>v+1?D-2:b-1;if(d[e])return r;f.push(e),d[e]=!0,m=e+p,h=void 0}else y=!0}g=s}if(y&&l&&l(),0===f.length)return r;c&&c();let w=r.slice(0,f[0]);for(let e=0;e<f.length;++e){const n=f[e],s=f[e+1]||r.length;0===n?w=`\n${o}${r.slice(0,s)}`:(i===t&&d[n]&&(w+=`${r[n]}\\`),w+=`\n${o}${r.slice(n+1,s)}`)}return w},nt}();const n=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),r=e=>/^(%|---|\.\.\.)/m.test(e);function o(e,o){const i=JSON.stringify(e);if(o.options.doubleQuotedAsJSON)return i;const{implicitKey:s}=o,a=o.options.doubleQuotedMinMultiLineLength,u=o.indent||(r(e)?" ":"");let c="",l=0;for(let e=0,t=i[e];t;t=i[++e])if(" "===t&&"\\"===i[e+1]&&"n"===i[e+2]&&(c+=i.slice(l,e)+"\\ ",e+=1,l=e,t="\\"),"\\"===t)switch(i[e+1]){case"u":{c+=i.slice(l,e);const t=i.substr(e+2,4);switch(t){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:"00"===t.substr(0,2)?c+="\\x"+t.substr(2):c+=i.substr(e,6)}e+=5,l=e+1}break;case"n":if(s||'"'===i[e+2]||i.length<a)e+=1;else{for(c+=i.slice(l,e)+"\n\n";"\\"===i[e+2]&&"n"===i[e+3]&&'"'!==i[e+4];)c+="\n",e+=2;c+=u," "===i[e+2]&&(c+="\\"),e+=1,l=e+1}break;default:e+=1}return c=l?c+i.slice(l):i,s?c:t.foldFlowLines(c,u,t.FOLD_QUOTED,n(o,!1))}function i(e,i){if(!1===i.options.singleQuote||i.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return o(e,i);const s=i.indent||(r(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${s}`)+"'";return i.implicitKey?a:t.foldFlowLines(a,s,t.FOLD_FLOW,n(i,!1))}function s(e,t){const{singleQuote:n}=t.options;let r;if(!1===n)r=o;else{const t=e.includes('"'),s=e.includes("'");r=t&&!s?i:s&&!t?o:n?i:o}return r(e,t)}let a;try{a=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{a=/\n+(?!\n|$)/g}function u({comment:o,type:i,value:u},c,l,p){const{blockQuote:f,commentString:d,lineWidth:h}=c.options;if(!f||/\n[\t ]+$/.test(u))return s(u,c);const g=c.indent||(c.forceBlockIndent||r(u)?" ":""),m="literal"===f||"folded"!==f&&i!==e.Scalar.BLOCK_FOLDED&&(i===e.Scalar.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;const r=t-n,o=e.length;if(o<=r)return!1;for(let t=0,n=0;t<o;++t)if("\n"===e[t]){if(t-n>r)return!0;if(n=t+1,o-n<=r)return!1}return!0}(u,h,g.length));if(!u)return m?"|\n":">\n";let y,D;for(D=u.length;D>0;--D){const e=u[D-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let b=u.substring(D);const v=b.indexOf("\n");-1===v?y="-":u===b||v!==b.length-1?(y="+",p&&p()):y="",b&&(u=u.slice(0,-b.length),"\n"===b[b.length-1]&&(b=b.slice(0,-1)),b=b.replace(a,`$&${g}`));let w,_=!1,E=-1;for(w=0;w<u.length;++w){const e=u[w];if(" "===e)_=!0;else{if("\n"!==e)break;E=w}}let A=u.substring(0,E<w?E+1:w);A&&(u=u.substring(A.length),A=A.replace(/\n+/g,`$&${g}`));let S=(_?g?"2":"1":"")+y;if(o&&(S+=" "+d(o.replace(/ ?[\r\n]+/g," ")),l&&l()),!m){const r=u.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${g}`);let o=!1;const s=n(c,!0);"folded"!==f&&i!==e.Scalar.BLOCK_FOLDED&&(s.onOverflow=()=>{o=!0});const a=t.foldFlowLines(`${A}${r}${b}`,g,t.FOLD_BLOCK,s);if(!o)return`>${S}\n${g}${a}`}return`|${S}\n${g}${A}${u=u.replace(/\n+/g,`$&${g}`)}${b}`}return tt.stringifyString=function(a,c,l,p){const{implicitKey:f,inFlow:d}=c,h="string"==typeof a.value?a:Object.assign({},a,{value:String(a.value)});let{type:g}=a;g!==e.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(h.value)&&(g=e.Scalar.QUOTE_DOUBLE);const m=a=>{switch(a){case e.Scalar.BLOCK_FOLDED:case e.Scalar.BLOCK_LITERAL:return f||d?s(h.value,c):u(h,c,l,p);case e.Scalar.QUOTE_DOUBLE:return o(h.value,c);case e.Scalar.QUOTE_SINGLE:return i(h.value,c);case e.Scalar.PLAIN:return function(o,i,a,c){const{type:l,value:p}=o,{actualString:f,implicitKey:d,indent:h,indentStep:g,inFlow:m}=i;if(d&&p.includes("\n")||m&&/[[\]{},]/.test(p))return s(p,i);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(p))return d||m||!p.includes("\n")?s(p,i):u(o,i,a,c);if(!d&&!m&&l!==e.Scalar.PLAIN&&p.includes("\n"))return u(o,i,a,c);if(r(p)){if(""===h)return i.forceBlockIndent=!0,u(o,i,a,c);if(d&&h===g)return s(p,i)}const y=p.replace(/\n+/g,`$&\n${h}`);if(f){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 s(p,i)}return d?y:t.foldFlowLines(y,h,t.FOLD_FLOW,n(i,!1))}(h,c,l,p);default:return null}};let y=m(g);if(null===y){const{defaultKeyType:e,defaultStringType:t}=c.options,n=f&&e||t;if(y=m(n),null===y)throw new Error(`Unsupported default string type ${n}`)}return y},tt}function ot(){if(Xe)return Ve;Xe=1;var e=Ae(),t=he(),n=Je(),r=rt();return Ve.createStringifyContext=function(e,t){const r=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 o;switch(r.collectionStyle){case"block":o=!1;break;case"flow":o=!0;break;default:o=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:o,options:r}},Ve.stringify=function(n,o,i,s){if(t.isPair(n))return n.toString(o,i,s);if(t.isAlias(n)){if(o.doc.directives)return n.toString(o);if(o.resolvedAliases?.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");o.resolvedAliases?o.resolvedAliases.add(n):o.resolvedAliases=new Set([n]),n=n.resolve(o.doc)}let a;const u=t.isNode(n)?n:o.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 r,o;if(t.isScalar(n)){o=n.value;let t=e.filter(e=>e.identify?.(o));if(t.length>1){const e=t.filter(e=>e.test);e.length>0&&(t=e)}r=t.find(e=>e.format===n.format)??t.find(e=>!e.format)}else o=n,r=e.find(e=>e.nodeClass&&o instanceof e.nodeClass);if(!r)throw new Error(`Tag not resolved for ${o?.constructor?.name??(null===o?"null":typeof o)} value`);return r}(o.doc.schema.tags,u));const c=function(n,r,{anchors:o,doc:i}){if(!i.directives)return"";const s=[],a=(t.isScalar(n)||t.isCollection(n))&&n.anchor;a&&e.anchorIsValid(a)&&(o.add(a),s.push(`&${a}`));const u=n.tag??(r.default?null:r.tag);return u&&s.push(i.directives.tagString(u)),s.join(" ")}(u,a,o);c.length>0&&(o.indentAtStart=(o.indentAtStart??0)+c.length+1);const l="function"==typeof a.stringify?a.stringify(u,o,i,s):t.isScalar(u)?r.stringifyString(u,o,i,s):u.toString(o,i,s);return c?t.isScalar(u)||"{"===l[0]||"["===l[0]?`${c} ${l}`:`${c}\n${o.indent}${l}`:l},Ve}var it,st={},at={};function ut(){if(it)return at;it=1;var e=s;return at.debug=function(e,...t){"debug"===e&&console.log(...t)},at.warn=function(t,n){"debug"!==t&&"warn"!==t||("function"==typeof e.emitWarning?e.emitWarning(n):console.warn(n))},at}var ct,lt,pt,ft={};function dt(){if(ct)return ft;ct=1;var e=he(),t=ze();const n="<<",r={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:o}),stringify:()=>n};function o(t,n,r){if(r=t&&e.isAlias(r)?r.resolve(t.doc):r,e.isSeq(r))for(const e of r.items)i(t,n,e);else if(Array.isArray(r))for(const e of r)i(t,n,e);else i(t,n,r)}function i(t,n,r){const o=t&&e.isAlias(r)?r.resolve(t.doc):r;if(!e.isMap(o))throw new Error("Merge sources must be maps or map aliases");const i=o.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 ft.addMergeToJSMap=o,ft.isMergeKey=(n,o)=>(r.identify(o)||e.isScalar(o)&&(!o.type||o.type===t.Scalar.PLAIN)&&r.identify(o.value))&&n?.doc.schema.tags.some(e=>e.tag===r.tag&&e.default),ft.merge=r,ft}function ht(){if(lt)return st;lt=1;var e=ut(),t=dt(),n=ot(),r=he(),o=Te();return st.addPairToJSMap=function(i,s,{key:a,value:u}){if(r.isNode(a)&&a.addToJSMap)a.addToJSMap(i,s,u);else if(t.isMergeKey(i,a))t.addMergeToJSMap(i,s,u);else{const t=o.toJS(a,"",i);if(s instanceof Map)s.set(t,o.toJS(u,t,i));else if(s instanceof Set)s.add(t);else{const c=function(t,o,i){if(null===o)return"";if("object"!=typeof o)return String(o);if(r.isNode(t)&&i?.doc){const r=n.createStringifyContext(i.doc,{});r.anchors=new Set;for(const e of i.anchors.keys())r.anchors.add(e.anchor);r.inFlow=!0,r.inStringifyKey=!0;const o=t.toString(r);if(!i.mapKeyWarned){let t=JSON.stringify(o);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 o}return JSON.stringify(o)}(a,t,i),l=o.toJS(u,c,i);c in s?Object.defineProperty(s,c,{value:l,writable:!0,enumerable:!0,configurable:!0}):s[c]=l}}return s},st}function gt(){if(pt)return Ge;pt=1;var e=Ue(),t=function(){if(et)return We;et=1;var e=he(),t=ze(),n=ot(),r=Je();return We.stringifyPair=function({key:o,value:i},s,a,u){const{allNullValues:c,doc:l,indent:p,indentStep:f,options:{commentString:d,indentSeq:h,simpleKeys:g}}=s;let m=e.isNode(o)&&o.comment||null;if(g){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(e.isCollection(o)||!e.isNode(o)&&"object"==typeof o)throw new Error("With simple keys, collection cannot be used as a key value")}let y=!g&&(!o||m&&null==i&&!s.inFlow||e.isCollection(o)||(e.isScalar(o)?o.type===t.Scalar.BLOCK_FOLDED||o.type===t.Scalar.BLOCK_LITERAL:"object"==typeof o));s=Object.assign({},s,{allNullValues:!1,implicitKey:!y&&(g||!c),indent:p+f});let D,b,v,w=!1,_=!1,E=n.stringify(o,s,()=>w=!0,()=>_=!0);if(!y&&!s.inFlow&&E.length>1024){if(g)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");y=!0}if(s.inFlow){if(c||null==i)return w&&a&&a(),""===E?"?":y?`? ${E}`:E}else if(c&&!g||null==i&&y)return E=`? ${E}`,m&&!w?E+=r.lineComment(E,s.indent,d(m)):_&&u&&u(),E;w&&(m=null),y?(m&&(E+=r.lineComment(E,s.indent,d(m))),E=`? ${E}\n${p}:`):(E=`${E}:`,m&&(E+=r.lineComment(E,s.indent,d(m)))),e.isNode(i)?(D=!!i.spaceBefore,b=i.commentBefore,v=i.comment):(D=!1,b=null,v=null,i&&"object"==typeof i&&(i=l.createNode(i))),s.implicitKey=!1,y||m||!e.isScalar(i)||(s.indentAtStart=E.length+1),_=!1,h||!(f.length>=2)||s.inFlow||y||!e.isSeq(i)||i.flow||i.tag||i.anchor||(s.indent=s.indent.substring(2));let A=!1;const S=n.stringify(i,s,()=>A=!0,()=>_=!0);let C=" ";if(m||D||b){if(C=D?"\n":"",b){const e=d(b);C+=`\n${r.indentComment(e,s.indent)}`}""!==S||s.inFlow?C+=`\n${s.indent}`:"\n"===C&&(C="\n\n")}else if(!y&&e.isCollection(i)){const e=S[0],t=S.indexOf("\n"),n=-1!==t,r=s.inFlow??i.flow??0===i.items.length;if(n||!r){let r=!1;if(n&&("&"===e||"!"===e)){let n=S.indexOf(" ");"&"===e&&-1!==n&&n<t&&"!"===S[n+1]&&(n=S.indexOf(" ",n+1)),(-1===n||t<n)&&(r=!0)}r||(C=`\n${s.indent}`)}}else""!==S&&"\n"!==S[0]||(C="");return E+=C+S,s.inFlow?A&&a&&a():v&&!A?E+=r.lineComment(E,s.indent,d(v)):_&&u&&u(),E},We}(),n=ht(),r=he();let o=class e{constructor(e,t=null){Object.defineProperty(this,r.NODE_TYPE,{value:r.PAIR}),this.key=e,this.value=t}clone(t){let{key:n,value:o}=this;return r.isNode(n)&&(n=n.clone(t)),r.isNode(o)&&(o=o.clone(t)),new e(n,o)}toJSON(e,t){const r=t?.mapAsMap?new Map:{};return n.addPairToJSMap(t,r,this)}toString(e,n,r){return e?.doc?t.stringifyPair(this,e,n,r):JSON.stringify(this)}};return Ge.Pair=o,Ge.createPair=function(t,n,r){const i=e.createNode(t,void 0,r),s=e.createNode(n,void 0,r);return new o(i,s)},Ge}var mt,yt,Dt,bt={},vt={},wt={},_t={};function Et(){if(mt)return _t;mt=1;var e=he(),t=ot(),n=Je();function r({comment:r,items:o},s,{blockItemPrefix:a,flowChars:u,itemIndent:c,onChompKeep:l,onComment:p}){const{indent:f,options:{commentString:d}}=s,h=Object.assign({},s,{indent:c,type:null});let g=!1;const m=[];for(let r=0;r<o.length;++r){const u=o[r];let l=null;if(e.isNode(u))!g&&u.spaceBefore&&m.push(""),i(s,m,u.commentBefore,g),u.comment&&(l=u.comment);else if(e.isPair(u)){const t=e.isNode(u.key)?u.key:null;t&&(!g&&t.spaceBefore&&m.push(""),i(s,m,t.commentBefore,g))}g=!1;let p=t.stringify(u,h,()=>l=null,()=>g=!0);l&&(p+=n.lineComment(p,c,d(l))),g&&l&&(g=!1),m.push(a+p)}let y;if(0===m.length)y=u.start+u.end;else{y=m[0];for(let e=1;e<m.length;++e){const t=m[e];y+=t?`\n${f}${t}`:"\n"}}return r?(y+="\n"+n.indentComment(d(r),f),p&&p()):g&&l&&l(),y}function o({items:r},o,{flowChars:s,itemIndent:a}){const{indent:u,indentStep:c,flowCollectionPadding:l,options:{commentString:p}}=o;a+=c;const f=Object.assign({},o,{indent:a,inFlow:!0,type:null});let d=!1,h=0;const g=[];for(let s=0;s<r.length;++s){const u=r[s];let c=null;if(e.isNode(u))u.spaceBefore&&g.push(""),i(o,g,u.commentBefore,!1),u.comment&&(c=u.comment);else if(e.isPair(u)){const t=e.isNode(u.key)?u.key:null;t&&(t.spaceBefore&&g.push(""),i(o,g,t.commentBefore,!1),t.comment&&(d=!0));const n=e.isNode(u.value)?u.value:null;n?(n.comment&&(c=n.comment),n.commentBefore&&(d=!0)):null==u.value&&t?.comment&&(c=t.comment)}c&&(d=!0);let l=t.stringify(u,f,()=>c=null);s<r.length-1&&(l+=","),c&&(l+=n.lineComment(l,a,p(c))),!d&&(g.length>h||l.includes("\n"))&&(d=!0),g.push(l),h=g.length}const{start:m,end:y}=s;if(0===g.length)return m+y;if(!d){const e=g.reduce((e,t)=>e+t.length+2,2);d=o.options.lineWidth>0&&e>o.options.lineWidth}if(d){let e=m;for(const t of g)e+=t?`\n${c}${u}${t}`:"\n";return`${e}\n${u}${y}`}return`${m}${l}${g.join(" ")}${l}${y}`}function i({indent:e,options:{commentString:t}},r,o,i){if(o&&i&&(o=o.replace(/^\n+/,"")),o){const i=n.indentComment(t(o),e);r.push(i.trimStart())}}return _t.stringifyCollection=function(e,t,n){return(t.inFlow??e.flow?o:r)(e,t,n)},_t}function At(){if(yt)return wt;yt=1;var e=Et(),t=ht(),n=qe(),r=he(),o=gt(),i=ze();function s(e,t){const n=r.isScalar(t)?t.value:t;for(const o of e)if(r.isPair(o)){if(o.key===t||o.key===n)return o;if(r.isScalar(o.key)&&o.key.value===n)return o}}let a=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(r.MAP,e),this.items=[]}static from(e,t,n){const{keepUndefined:r,replacer:i}=n,s=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||r)&&s.items.push(o.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&&s.items.sort(e.sortMapEntries),s}add(e,t){let n;n=r.isPair(e)?e:e&&"object"==typeof e&&"key"in e?new o.Pair(e.key,e.value):new o.Pair(e,e?.value);const a=s(this.items,n.key),u=this.schema?.sortMapEntries;if(a){if(!t)throw new Error(`Key ${n.key} already set`);r.isScalar(a.value)&&i.isScalarValue(n.value)?a.value.value=n.value:a.value=n.value}else if(u){const e=this.items.findIndex(e=>u(n,e)<0);-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){const t=s(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const n=s(this.items,e),o=n?.value;return(!t&&r.isScalar(o)?o.value:o)??void 0}has(e){return!!s(this.items,e)}set(e,t){this.add(new o.Pair(e,t),!0)}toJSON(e,n,r){const o=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(o);for(const e of this.items)t.addPairToJSMap(n,o,e);return o}toString(t,n,o){if(!t)return JSON.stringify(this);for(const e of this.items)if(!r.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:o,onComment:n})}};return wt.YAMLMap=a,wt.findPair=s,wt}function St(){if(Dt)return vt;Dt=1;var e=he(),t=At();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,r)=>t.YAMLMap.from(e,n,r)};return vt.map=n,vt}var Ct,kt,Pt={},Rt={};function xt(){if(Ct)return Rt;Ct=1;var e=Ue(),t=Et(),n=qe(),r=he(),o=ze(),i=Te();let s=class extends n.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(r.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=a(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const n=a(e);if("number"!=typeof n)return;const o=this.items[n];return!t&&r.isScalar(o)?o.value:o}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];r.isScalar(i)&&o.isScalarValue(t)?i.value=t:this.items[n]=t}toJSON(e,t){const n=[];t?.onCreate&&t.onCreate(n);let r=0;for(const e of this.items)n.push(i.toJS(e,String(r++),t));return n}toString(e,n,r){return e?t.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:o}=r,i=new this(t);if(n&&Symbol.iterator in Object(n)){let t=0;for(let s of n){if("function"==typeof o){const e=n instanceof Set?s:String(t++);s=o.call(n,e,s)}i.items.push(e.createNode(s,void 0,r))}}return i}};function a(e){let t=r.isScalar(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}return Rt.YAMLSeq=s,Rt}function Ot(){if(kt)return Pt;kt=1;var e=he(),t=xt();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,r)=>t.YAMLSeq.from(e,n,r)};return Pt.seq=n,Pt}var Ft,Tt={};function $t(){if(Ft)return Tt;Ft=1;var e=rt();const t={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(t,n,r,o)=>(n=Object.assign({actualString:!0},n),e.stringifyString(t,n,r,o))};return Tt.string=t,Tt}var Lt,Nt={},Mt={};function Bt(){if(Lt)return Mt;Lt=1;var e=ze();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 Mt.nullTag=t,Mt}var It,jt={};function Ht(){if(It)return jt;It=1;var e=ze();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},r)=>e&&t.test.test(e)&&n===("t"===e[0]||"T"===e[0])?e:n?r.options.trueStr:r.options.falseStr};return jt.boolTag=t,jt}var zt,Ut,qt={},Kt={};function Gt(){return zt||(zt=1,Kt.stringifyNumber=function({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);const o="number"==typeof r?r:Number(r);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let i=JSON.stringify(r);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}),Kt}function Wt(){if(Ut)return qt;Ut=1;var e=ze(),t=Gt();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},r={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)}},o={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)),r=t.indexOf(".");return-1!==r&&"0"===t[t.length-1]&&(n.minFractionDigits=t.length-r-1),n},stringify:t.stringifyNumber};return qt.float=o,qt.floatExp=r,qt.floatNaN=n,qt}var Vt,Zt={};function Jt(){if(Vt)return Zt;Vt=1;var e=Gt();const t=e=>"bigint"==typeof e||Number.isInteger(e),n=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function r(n,r,o){const{value:i}=n;return t(i)&&i>=0?o+i.toString(r):e.stringifyNumber(n)}const o={identify:e=>t(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>n(e,2,8,r),stringify:e=>r(e,8,"0o")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>n(e,0,10,r),stringify:e.stringifyNumber},s={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,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return Zt.int=i,Zt.intHex=s,Zt.intOct=o,Zt}var Yt,Qt={};var Xt,en={};var tn,nn={};function rn(){if(tn)return nn;tn=1;var e=a,t=ze(),n=rt();const r={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:r,type:o,value:i},s,a,u){if(!i)return"";const c=i;let l;if("function"==typeof e.Buffer)l=c instanceof e.Buffer?c.toString("base64"):e.Buffer.from(c.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<c.length;++t)e+=String.fromCharCode(c[t]);l=btoa(e)}}if(o??(o=t.Scalar.BLOCK_LITERAL),o!==t.Scalar.QUOTE_DOUBLE){const e=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),n=Math.ceil(l.length/e),r=new Array(n);for(let t=0,o=0;t<n;++t,o+=e)r[t]=l.substr(o,e);l=r.join(o===t.Scalar.BLOCK_LITERAL?"\n":" ")}return n.stringifyString({comment:r,type:o,value:l},s,a,u)}};return nn.binary=r,nn}var on,sn,an={},un={};function cn(){if(on)return un;on=1;var e=he(),t=gt(),n=ze(),r=xt();function o(r,o){if(e.isSeq(r))for(let i=0;i<r.items.length;++i){let s=r.items[i];if(!e.isPair(s)){if(e.isMap(s)){s.items.length>1&&o("Each pair must have its own sequence indicator");const e=s.items[0]||new t.Pair(new n.Scalar(null));if(s.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${s.commentBefore}\n${e.key.commentBefore}`:s.commentBefore),s.comment){const t=e.value??e.key;t.comment=t.comment?`${s.comment}\n${t.comment}`:s.comment}s=e}r.items[i]=e.isPair(s)?s:new t.Pair(s)}}else o("Expected a sequence for this tag");return r}function i(e,n,o){const{replacer:i}=o,s=new r.YAMLSeq(e);s.tag="tag:yaml.org,2002:pairs";let a=0;if(n&&Symbol.iterator in Object(n))for(let e of n){let r,u;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}`);r=e[0],u=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`);r=t[0],u=e[r]}else r=e;s.items.push(t.createPair(r,u,o))}return s}const s={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:o,createNode:i};return un.createPairs=i,un.pairs=s,un.resolvePairs=o,un}function ln(){if(sn)return an;sn=1;var e=he(),t=Te(),n=At(),r=xt(),o=cn();class i extends r.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,r){if(!r)return super.toJSON(n);const o=new Map;r?.onCreate&&r.onCreate(o);for(const n of this.items){let i,s;if(e.isPair(n)?(i=t.toJS(n.key,"",r),s=t.toJS(n.value,i,r)):i=t.toJS(n,"",r),o.has(i))throw new Error("Ordered maps must not include duplicate keys");o.set(i,s)}return o}static from(e,t,n){const r=o.createPairs(e,t,n),i=new this;return i.items=r.items,i}}i.tag="tag:yaml.org,2002:omap";const s={collection:"seq",identify:e=>e instanceof Map,nodeClass:i,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,n){const r=o.resolvePairs(t,n),s=[];for(const{key:t}of r.items)e.isScalar(t)&&(s.includes(t.value)?n(`Ordered maps must not include duplicate keys: ${t.value}`):s.push(t.value));return Object.assign(new i,r)},createNode:(e,t,n)=>i.from(e,t,n)};return an.YAMLOMap=i,an.omap=s,an}var pn,fn={},dn={};var hn,gn={};var mn,yn,Dn={},bn={};function vn(){if(yn)return bn;yn=1;var e=he(),t=gt(),n=At();class r extends n.YAMLMap{constructor(e){super(e),this.tag=r.tag}add(r){let o;o=e.isPair(r)?r:r&&"object"==typeof r&&"key"in r&&"value"in r&&null===r.value?new t.Pair(r.key,null):new t.Pair(r,null),n.findPair(this.items,o.key)||this.items.push(o)}get(t,r){const o=n.findPair(this.items,t);return!r&&e.isPair(o)?e.isScalar(o.key)?o.key.value:o.key:o}set(e,r){if("boolean"!=typeof r)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof r);const o=n.findPair(this.items,e);o&&!r?this.items.splice(this.items.indexOf(o),1):!o&&r&&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,r){const{replacer:o}=r,i=new this(e);if(n&&Symbol.iterator in Object(n))for(let e of n)"function"==typeof o&&(e=o.call(n,e,e)),i.items.push(t.createPair(e,null,r));return i}}r.tag="tag:yaml.org,2002:set";const o={collection:"map",identify:e=>e instanceof Set,nodeClass:r,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>r.from(e,t,n),resolve(t,n){if(e.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new r,t);n("Set items must all have null values")}else n("Expected a mapping for this tag");return t}};return bn.YAMLSet=r,bn.set=o,bn}var wn,_n,En,An,Sn={};function Cn(){if(wn)return Sn;wn=1;var e=Gt();function t(e,t){const n=e[0],r="-"===n||"+"===n?e.substring(1):e,o=e=>t?BigInt(e):Number(e),i=r.replace(/_/g,"").split(":").reduce((e,t)=>e*o(60)+o(t),o(0));return"-"===n?o(-1)*i:i}function n(t){let{value:n}=t,r=e=>e;if("bigint"==typeof n)r=e=>BigInt(e);else if(isNaN(n)||!isFinite(n))return e.stringifyNumber(t);let o="";n<0&&(o="-",n*=r(-1));const i=r(60),s=[n%i];return n<60?s.unshift(0):(n=(n-s[0])/i,s.unshift(n%i),n>=60&&(n=(n-s[0])/i,s.unshift(n))),o+s.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const r={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:r})=>t(e,r),stringify:n},o={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[,r,o,s,a,u,c]=n.map(Number),l=n[7]?Number((n[7]+"00").substr(1,3)):0;let p=Date.UTC(r,o-1,s,a||0,u||0,c||0,l);const f=n[8];if(f&&"Z"!==f){let e=t(f,!1);Math.abs(e)<30&&(e*=60),p-=6e4*e}return new Date(p)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};return Sn.floatTime=o,Sn.intTime=r,Sn.timestamp=i,Sn}function kn(){if(_n)return fn;_n=1;var e=St(),t=Bt(),n=Ot(),r=$t(),o=rn(),i=function(){if(pn)return dn;pn=1;var e=ze();function t({value:e,source:t},o){return t&&(e?n:r).test.test(t)?t:e?o.options.trueStr:o.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},r={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 dn.falseTag=r,dn.trueTag=n,dn}(),s=function(){if(hn)return gn;hn=1;var e=ze(),t=Gt();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},r={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)}},o={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,""))),r=t.indexOf(".");if(-1!==r){const e=t.substring(r+1).replace(/_/g,"");"0"===e[e.length-1]&&(n.minFractionDigits=e.length)}return n},stringify:t.stringifyNumber};return gn.float=o,gn.floatExp=r,gn.floatNaN=n,gn}(),a=function(){if(mn)return Dn;mn=1;var e=Gt();const t=e=>"bigint"==typeof e||Number.isInteger(e);function n(e,t,n,{intAsBigInt:r}){const o=e[0];if("-"!==o&&"+"!==o||(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===o?BigInt(-1)*t:t}const i=parseInt(e,n);return"-"===o?-1*i:i}function r(n,r,o){const{value:i}=n;if(t(i)){const e=i.toString(r);return i<0?"-"+o+e.substr(1):o+e}return e.stringifyNumber(n)}const o={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>n(e,2,2,r),stringify:e=>r(e,2,"0b")},i={identify:t,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>n(e,1,8,r),stringify:e=>r(e,8,"0")},s={identify:t,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>n(e,0,10,r),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,r)=>n(e,2,16,r),stringify:e=>r(e,16,"0x")};return Dn.int=s,Dn.intBin=o,Dn.intHex=a,Dn.intOct=i,Dn}(),u=dt(),c=ln(),l=cn(),p=vn(),f=Cn();const d=[e.map,n.seq,r.string,t.nullTag,i.trueTag,i.falseTag,a.intBin,a.intOct,a.int,a.intHex,s.floatNaN,s.floatExp,s.float,o.binary,u.merge,c.omap,l.pairs,p.set,f.intTime,f.floatTime,f.timestamp];return fn.schema=d,fn}function Pn(){if(En)return Nt;En=1;var e=St(),t=Bt(),n=Ot(),r=$t(),o=Ht(),i=Wt(),s=Jt(),a=function(){if(Yt)return Qt;Yt=1;var e=St(),t=Bt(),n=Ot(),r=$t(),o=Ht(),i=Wt(),s=Jt();const a=[e.map,n.seq,r.string,t.nullTag,o.boolTag,s.intOct,s.int,s.intHex,i.floatNaN,i.floatExp,i.float];return Qt.schema=a,Qt}(),u=function(){if(Xt)return en;Xt=1;var e=ze(),t=St(),n=Ot();function r(e){return"bigint"==typeof e||Number.isInteger(e)}const o=({value:e})=>JSON.stringify(e),i=[{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:o},{identify:e=>null==e,createNode:()=>new e.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:o},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:o},{identify:r,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})=>r(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:o}],s={default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)},a=[t.map,n.seq].concat(i,s);return en.schema=a,en}(),c=rn(),l=dt(),p=ln(),f=cn(),d=kn(),h=vn(),g=Cn();const m=new Map([["core",a.schema],["failsafe",[e.map,n.seq,r.string]],["json",u.schema],["yaml11",d.schema],["yaml-1.1",d.schema]]),y={binary:c.binary,bool:o.boolTag,float:i.float,floatExp:i.floatExp,floatNaN:i.floatNaN,floatTime:g.floatTime,int:s.int,intHex:s.intHex,intOct:s.intOct,intTime:g.intTime,map:e.map,merge:l.merge,null:t.nullTag,omap:p.omap,pairs:f.pairs,seq:n.seq,set:h.set,timestamp:g.timestamp},D={"tag:yaml.org,2002:binary":c.binary,"tag:yaml.org,2002:merge":l.merge,"tag:yaml.org,2002:omap":p.omap,"tag:yaml.org,2002:pairs":f.pairs,"tag:yaml.org,2002:set":h.set,"tag:yaml.org,2002:timestamp":g.timestamp};return Nt.coreKnownTags=D,Nt.getTags=function(e,t,n){const r=m.get(t);if(r&&!e)return n&&!r.includes(l.merge)?r.concat(l.merge):r.slice();let o=r;if(!o){if(!Array.isArray(e)){const e=Array.from(m.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`)}o=[]}if(Array.isArray(e))for(const t of e)o=o.concat(t);else"function"==typeof e&&(o=e(o.slice()));return n&&(o=o.concat(l.merge)),o.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},[])},Nt}function Rn(){if(An)return bt;An=1;var e=he(),t=St(),n=Ot(),r=$t(),o=Pn();const i=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;return bt.Schema=class s{constructor({compat:s,customTags:a,merge:u,resolveKnownTags:c,schema:l,sortMapEntries:p,toStringDefaults:f}){this.compat=Array.isArray(s)?o.getTags(s,"compat"):s?o.getTags(null,s):null,this.name="string"==typeof l&&l||"core",this.knownTags=c?o.coreKnownTags:{},this.tags=o.getTags(a,this.name,u),this.toStringOptions=f??null,Object.defineProperty(this,e.MAP,{value:t.map}),Object.defineProperty(this,e.SCALAR,{value:r.string}),Object.defineProperty(this,e.SEQ,{value:n.seq}),this.sortMapEntries="function"==typeof p?p:!0===p?i:null}clone(){const e=Object.create(s.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}},bt}var xn,On,Fn={};function Tn(){if(On)return we;On=1;var e=Le(),t=qe(),n=he(),r=gt(),o=Te(),i=Rn(),s=function(){if(xn)return Fn;xn=1;var e=he(),t=ot(),n=Je();return Fn.stringifyDocument=function(r,o){const i=[];let s=!0===o.directives;if(!1!==o.directives&&r.directives){const e=r.directives.toString(r);e?(i.push(e),s=!0):r.directives.docStart&&(s=!0)}s&&i.push("---");const a=t.createStringifyContext(r,o),{commentString:u}=a.options;if(r.commentBefore){1!==i.length&&i.unshift("");const e=u(r.commentBefore);i.unshift(n.indentComment(e,""))}let c=!1,l=null;if(r.contents){if(e.isNode(r.contents)){if(r.contents.spaceBefore&&s&&i.push(""),r.contents.commentBefore){const e=u(r.contents.commentBefore);i.push(n.indentComment(e,""))}a.forceBlockIndent=!!r.comment,l=r.contents.comment}const o=l?void 0:()=>c=!0;let p=t.stringify(r.contents,a,()=>l=null,o);l&&(p+=n.lineComment(p,"",u(l))),"|"!==p[0]&&">"!==p[0]||"---"!==i[i.length-1]?i.push(p):i[i.length-1]=`--- ${p}`}else i.push(t.stringify(r.contents,a));if(r.directives?.docEnd)if(r.comment){const e=u(r.comment);e.includes("\n")?(i.push("..."),i.push(n.indentComment(e,""))):i.push(`... ${e}`)}else i.push("...");else{let e=r.comment;e&&c&&(e=e.replace(/^\n+/,"")),e&&(c&&!l||""===i[i.length-1]||i.push(""),i.push(n.indentComment(u(e),"")))}return i.join("\n")+"\n"},Fn}(),a=Ae(),u=Pe(),c=Ue(),l=be();function p(e){if(n.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}return we.Document=class f{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,n.NODE_TYPE,{value:n.DOC});let o=null;"function"==typeof t||Array.isArray(t)?o=t:void 0===r&&t&&(r=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"},r);this.options=i;let{version:s}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new l.Directives({version:s}),this.setSchema(s,r),this.contents=void 0===e?null:this.createNode(e,o,r)}clone(){const e=Object.create(f.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){p(this.contents)&&this.contents.add(e)}addIn(e,t){p(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,r){let o;if("function"==typeof t)e=t.call({"":e},"",e),o=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)),o=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:s,flow:u,keepUndefined:l,onTagObj:p,tag:f}=r??{},{onAnchor:d,setAnchors:h,sourceObjects:g}=a.createNodeAnchors(this,s||"a"),m={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:p,replacer:o,schema:this.schema,sourceObjects:g},y=c.createNode(e,f,m);return u&&n.isCollection(y)&&(y.flow=!0),h(),y}createPair(e,t,n={}){const o=this.createNode(e,null,n),i=this.createNode(t,null,n);return new r.Pair(o,i)}delete(e){return!!p(this.contents)&&this.contents.delete(e)}deleteIn(e){return t.isEmptyPath(e)?null!=this.contents&&(this.contents=null,!0):!!p(this.contents)&&this.contents.deleteIn(e)}get(e,t){return n.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,r){return t.isEmptyPath(e)?!r&&n.isScalar(this.contents)?this.contents.value:this.contents:n.isCollection(this.contents)?this.contents.getIn(e,r):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):p(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):p(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:r,onAnchor:i,reviver:s}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},c=o.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 s?u.applyReviver(s,{"":c},"",c):c}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 s.stringifyDocument(this,e)}},we}var $n,Ln={};function Nn(){if($n)return Ln;$n=1;class e extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}return Ln.YAMLError=e,Ln.YAMLParseError=class extends e{constructor(e,t,n){super("YAMLParseError",e,t,n)}},Ln.YAMLWarning=class extends e{constructor(e,t,n){super("YAMLWarning",e,t,n)}},Ln.prettifyError=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));const{line:r,col:o}=n.linePos[0];n.message+=` at line ${r}, column ${o}`;let i=o-1,s=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&s.length>80){const e=Math.min(i-39,s.length-79);s="…"+s.substring(e),i-=e-1}if(s.length>80&&(s=s.substring(0,79)+"…"),r>1&&/^ *$/.test(s.substring(0,i))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),s=n+s}if(/[^ ]/.test(s)){let e=1;const t=n.linePos[1];t&&t.line===r&&t.col>o&&(e=Math.max(1,Math.min(t.col-o,80-i)));const a=" ".repeat(i)+"^".repeat(e);n.message+=`:\n\n${s}\n${a}\n`}},Ln}var Mn,Bn={},In={},jn={},Hn={},zn={};function Un(){return Mn||(Mn=1,zn.resolveProps=function(e,{flow:t,indicator:n,next:r,offset:o,onError:i,parentIndent:s,startOnNewline:a}){let u=!1,c=a,l=a,p="",f="",d=!1,h=!1,g=null,m=null,y=null,D=null,b=null,v=null,w=null;for(const o of e)switch(h&&("space"!==o.type&&"newline"!==o.type&&"comma"!==o.type&&i(o.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),g&&(c&&"comment"!==o.type&&"newline"!==o.type&&i(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),g=null),o.type){case"space":t||"doc-start"===n&&"flow-collection"===r?.type||!o.source.includes("\t")||(g=o),l=!0;break;case"comment":{l||i(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=o.source.substring(1)||" ";p?p+=f+e:p=e,f="",c=!1;break}case"newline":c?p?p+=o.source:v&&"seq-item-ind"===n||(u=!0):f+=o.source,c=!0,d=!0,(m||y)&&(D=o),l=!0;break;case"anchor":m&&i(o,"MULTIPLE_ANCHORS","A node can have at most one anchor"),o.source.endsWith(":")&&i(o.offset+o.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=o,w??(w=o.offset),c=!1,l=!1,h=!0;break;case"tag":y&&i(o,"MULTIPLE_TAGS","A node can have at most one tag"),y=o,w??(w=o.offset),c=!1,l=!1,h=!0;break;case n:(m||y)&&i(o,"BAD_PROP_ORDER",`Anchors and tags must be after the ${o.source} indicator`),v&&i(o,"UNEXPECTED_TOKEN",`Unexpected ${o.source} in ${t??"collection"}`),v=o,c="seq-item-ind"===n||"explicit-key-ind"===n,l=!1;break;case"comma":if(t){b&&i(o,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),b=o,c=!1,l=!1;break}default:i(o,"UNEXPECTED_TOKEN",`Unexpected ${o.type} token`),c=!1,l=!1}const _=e[e.length-1],E=_?_.offset+_.source.length:o;return h&&r&&"space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&("scalar"!==r.type||""!==r.source)&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g&&(c&&g.indent<=s||"block-map"===r?.type||"block-seq"===r?.type)&&i(g,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:v,spaceBefore:u,comment:p,hasNewline:d,anchor:m,tag:y,newlineAfterProp:D,end:E,start:w??E}}),zn}var qn,Kn={};function Gn(){return qn||(qn=1,Kn.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}}),Kn}var Wn,Vn={};function Zn(){if(Wn)return Vn;Wn=1;var e=Gn();return Vn.flowIndentCheck=function(t,n,r){if("flow-collection"===n?.type){const o=n.end[0];o.indent!==t||"]"!==o.source&&"}"!==o.source||!e.containsNewline(n)||r(o,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}},Vn}var Jn,Yn,Qn={};function Xn(){if(Jn)return Qn;Jn=1;var e=he();return Qn.mapIncludes=function(t,n,r){const{uniqueKeys:o}=t.options;if(!1===o)return!1;const i="function"==typeof o?o:(t,n)=>t===n||e.isScalar(t)&&e.isScalar(n)&&t.value===n.value;return n.some(e=>i(e.key,r))},Qn}var er,tr={};var nr,rr,or,ir={},sr={};function ar(){return nr||(nr=1,sr.resolveEnd=function(e,t,n,r){let o="";if(e){let i=!1,s="";for(const a of e){const{source:e,type:u}=a;switch(u){case"space":i=!0;break;case"comment":{n&&!i&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";o?o+=s+t:o=t,s="";break}case"newline":o&&(s+=e),i=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}t+=e.length}}return{comment:o,offset:t}}),sr}function ur(){if(or)return jn;or=1;var e=he(),t=ze(),n=At(),r=xt(),o=function(){if(Yn)return Hn;Yn=1;var e=gt(),t=At(),n=Un(),r=Gn(),o=Zn(),i=Xn();const s="All mapping items must start at the same column";return Hn.resolveBlockMap=function({composeNode:a,composeEmptyNode:u},c,l,p,f){const d=new(f?.nodeClass??t.YAMLMap)(c.schema);c.atRoot&&(c.atRoot=!1);let h=l.offset,g=null;for(const t of l.items){const{start:f,key:m,sep:y,value:D}=t,b=n.resolveProps(f,{indicator:"explicit-key-ind",next:m??y?.[0],offset:h,onError:p,parentIndent:l.indent,startOnNewline:!0}),v=!b.found;if(v){if(m&&("block-seq"===m.type?p(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in m&&m.indent!==l.indent&&p(h,"BAD_INDENT",s)),!b.anchor&&!b.tag&&!y){g=b.end,b.comment&&(d.comment?d.comment+="\n"+b.comment:d.comment=b.comment);continue}(b.newlineAfterProp||r.containsNewline(m))&&p(m??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else b.found?.indent!==l.indent&&p(h,"BAD_INDENT",s);c.atKey=!0;const w=b.end,_=m?a(c,m,b,p):u(c,w,f,null,b,p);c.schema.compat&&o.flowIndentCheck(l.indent,m,p),c.atKey=!1,i.mapIncludes(c,d.items,_)&&p(w,"DUPLICATE_KEY","Map keys must be unique");const E=n.resolveProps(y??[],{indicator:"map-value-ind",next:D,offset:_.range[2],onError:p,parentIndent:l.indent,startOnNewline:!m||"block-scalar"===m.type});if(h=E.end,E.found){v&&("block-map"!==D?.type||E.hasNewline||p(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),c.options.strict&&b.start<E.found.offset-1024&&p(_.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const n=D?a(c,D,E,p):u(c,h,y,null,E,p);c.schema.compat&&o.flowIndentCheck(l.indent,D,p),h=n.range[2];const r=new e.Pair(_,n);c.options.keepSourceTokens&&(r.srcToken=t),d.items.push(r)}else{v&&p(_.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),E.comment&&(_.comment?_.comment+="\n"+E.comment:_.comment=E.comment);const n=new e.Pair(_);c.options.keepSourceTokens&&(n.srcToken=t),d.items.push(n)}}return g&&g<h&&p(g,"IMPOSSIBLE","Map comment with trailing content"),d.range=[l.offset,h,g??h],d},Hn}(),i=function(){if(er)return tr;er=1;var e=xt(),t=Un(),n=Zn();return tr.resolveBlockSeq=function({composeNode:r,composeEmptyNode:o},i,s,a,u){const c=new(u?.nodeClass??e.YAMLSeq)(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let l=s.offset,p=null;for(const{start:e,value:u}of s.items){const f=t.resolveProps(e,{indicator:"seq-item-ind",next:u,offset:l,onError:a,parentIndent:s.indent,startOnNewline:!0});if(!f.found){if(!(f.anchor||f.tag||u)){p=f.end,f.comment&&(c.comment=f.comment);continue}u&&"block-seq"===u.type?a(f.end,"BAD_INDENT","All sequence items must start at the same column"):a(l,"MISSING_CHAR","Sequence item without - indicator")}const d=u?r(i,u,f,a):o(i,f.end,e,null,f,a);i.schema.compat&&n.flowIndentCheck(s.indent,u,a),l=d.range[2],c.items.push(d)}return c.range=[s.offset,l,p??l],c},tr}(),s=function(){if(rr)return ir;rr=1;var e=he(),t=gt(),n=At(),r=xt(),o=ar(),i=Un(),s=Gn(),a=Xn();const u="Block collections are not allowed within flow collections",c=e=>e&&("block-map"===e.type||"block-seq"===e.type);return ir.resolveFlowCollection=function({composeNode:l,composeEmptyNode:p},f,d,h,g){const m="{"===d.start.source,y=m?"flow map":"flow sequence",D=new(g?.nodeClass??(m?n.YAMLMap:r.YAMLSeq))(f.schema);D.flow=!0;const b=f.atRoot;b&&(f.atRoot=!1),f.atKey&&(f.atKey=!1);let v=d.offset+d.start.source.length;for(let r=0;r<d.items.length;++r){const o=d.items[r],{start:g,key:b,sep:w,value:_}=o,E=i.resolveProps(g,{flow:y,indicator:"explicit-key-ind",next:b??w?.[0],offset:v,onError:h,parentIndent:d.indent,startOnNewline:!1});if(!E.found){if(!(E.anchor||E.tag||w||_)){0===r&&E.comma?h(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`):r<d.items.length-1&&h(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${y}`),E.comment&&(D.comment?D.comment+="\n"+E.comment:D.comment=E.comment),v=E.end;continue}!m&&f.options.strict&&s.containsNewline(b)&&h(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===r)E.comma&&h(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${y}`);else if(E.comma||h(E.start,"MISSING_CHAR",`Missing , between ${y} items`),E.comment){let t="";e:for(const e of g)switch(e.type){case"comma":case"space":break;case"comment":t=e.source.substring(1);break e;default:break e}if(t){let n=D.items[D.items.length-1];e.isPair(n)&&(n=n.value??n.key),n.comment?n.comment+="\n"+t:n.comment=t,E.comment=E.comment.substring(t.length+1)}}if(m||w||E.found){f.atKey=!0;const e=E.end,r=b?l(f,b,E,h):p(f,e,g,null,E,h);c(b)&&h(r.range,"BLOCK_IN_FLOW",u),f.atKey=!1;const s=i.resolveProps(w??[],{flow:y,indicator:"map-value-ind",next:_,offset:r.range[2],onError:h,parentIndent:d.indent,startOnNewline:!1});if(s.found){if(!m&&!E.found&&f.options.strict){if(w)for(const e of w){if(e===s.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}}E.start<s.found.offset-1024&&h(s.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else _&&("source"in _&&_.source&&":"===_.source[0]?h(_,"MISSING_CHAR",`Missing space after : in ${y}`):h(s.start,"MISSING_CHAR",`Missing , or : between ${y} items`));const A=_?l(f,_,s,h):s.found?p(f,s.end,w,null,s,h):null;A?c(_)&&h(A.range,"BLOCK_IN_FLOW",u):s.comment&&(r.comment?r.comment+="\n"+s.comment:r.comment=s.comment);const S=new t.Pair(r,A);if(f.options.keepSourceTokens&&(S.srcToken=o),m){const t=D;a.mapIncludes(f,t.items,r)&&h(e,"DUPLICATE_KEY","Map keys must be unique"),t.items.push(S)}else{const e=new n.YAMLMap(f.schema);e.flow=!0,e.items.push(S);const t=(A??r).range;e.range=[r.range[0],t[1],t[2]],D.items.push(e)}v=A?A.range[2]:s.end}else{const e=_?l(f,_,E,h):p(f,E.end,w,null,E,h);D.items.push(e),v=e.range[2],c(_)&&h(e.range,"BLOCK_IN_FLOW",u)}}const w=m?"}":"]",[_,...E]=d.end;let A=v;if(_&&_.source===w)A=_.offset+_.source.length;else{const e=y[0].toUpperCase()+y.substring(1);h(v,b?"MISSING_CHAR":"BAD_INDENT",b?`${e} must end with a ${w}`:`${e} in block collection must be sufficiently indented and end with a ${w}`),_&&1!==_.source.length&&E.unshift(_)}if(E.length>0){const e=o.resolveEnd(E,A,f.options.strict,h);e.comment&&(D.comment?D.comment+="\n"+e.comment:D.comment=e.comment),D.range=[d.offset,A,e.offset]}else D.range=[d.offset,A,A];return D},ir}();function a(e,t,n,r,a,u){const c="block-map"===n.type?o.resolveBlockMap(e,t,n,r,u):"block-seq"===n.type?i.resolveBlockSeq(e,t,n,r,u):s.resolveFlowCollection(e,t,n,r,u),l=c.constructor;return"!"===a||a===l.tagName?(c.tag=l.tagName,c):(a&&(c.tag=a),c)}return jn.composeCollection=function(o,i,s,u,c){const l=u.tag,p=l?i.directives.tagName(l.source,e=>c(l,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===s.type){const{anchor:e,newlineAfterProp:t}=u,n=e&&l?e.offset>l.offset?e:l:e??l;n&&(!t||t.offset<n.offset)&&c(n,"MISSING_CHAR","Missing newline after block sequence props")}const f="block-map"===s.type?"map":"block-seq"===s.type?"seq":"{"===s.start.source?"map":"seq";if(!l||!p||"!"===p||p===n.YAMLMap.tagName&&"map"===f||p===r.YAMLSeq.tagName&&"seq"===f)return a(o,i,s,c,p);let d=i.schema.tags.find(e=>e.tag===p&&e.collection===f);if(!d){const e=i.schema.knownTags[p];if(!e||e.collection!==f)return e?c(l,"BAD_COLLECTION_TYPE",`${e.tag} used for ${f} collection, but expects ${e.collection??"scalar"}`,!0):c(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${p}`,!0),a(o,i,s,c,p);i.schema.tags.push(Object.assign({},e,{default:!1})),d=e}const h=a(o,i,s,c,p,d),g=d.resolve?.(h,e=>c(l,"TAG_RESOLVE_FAILED",e),i.options)??h,m=e.isNode(g)?g:new t.Scalar(g);return m.range=h.range,m.tag=p,d?.format&&(m.format=d.format),m},jn}var cr,lr={},pr={};function fr(){if(cr)return pr;cr=1;var e=ze();return pr.resolveBlockScalar=function(t,n,r){const o=n.offset,i=function({offset:e,props:t},n,r){if("block-scalar-header"!==t[0].type)return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=t[0],i=o[0];let s=0,a="",u=-1;for(let t=1;t<o.length;++t){const n=o[t];if(a||"-"!==n&&"+"!==n){const r=Number(n);!s&&r?s=r:-1===u&&(u=e+t)}else a=n}-1!==u&&r(u,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let c=!1,l="",p=o.length;for(let e=1;e<t.length;++e){const o=t[e];switch(o.type){case"space":c=!0;case"newline":p+=o.source.length;break;case"comment":n&&!c&&r(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),p+=o.source.length,l=o.source.substring(1);break;case"error":r(o,"UNEXPECTED_TOKEN",o.message),p+=o.source.length;break;default:{r(o,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${o.type}`);const e=o.source;e&&"string"==typeof e&&(p+=e.length)}}}return{mode:i,indent:s,chomp:a,comment:l,length:p}}(n,t.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[o,o,o]};const s=">"===i.mode?e.Scalar.BLOCK_FOLDED:e.Scalar.BLOCK_LITERAL,a=n.source?function(e){const t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),o=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)o.push([t[e],t[e+1]]);return o}(n.source):[];let u=a.length;for(let e=a.length-1;e>=0;--e){const t=a[e][1];if(""!==t&&"\r"!==t)break;u=e}if(0===u){const e="+"===i.chomp&&a.length>0?"\n".repeat(Math.max(1,a.length-1)):"";let t=o+i.length;return n.source&&(t+=n.source.length),{value:e,type:s,comment:i.comment,range:[o,t,t]}}let c=n.indent+i.indent,l=n.offset+i.length,p=0;for(let e=0;e<u;++e){const[n,o]=a[e];if(""!==o&&"\r"!==o){if(n.length<c){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(l+n.length,"MISSING_CHAR",e)}0===i.indent&&(c=n.length),p=e,0!==c||t.atRoot||r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}0===i.indent&&n.length>c&&(c=n.length),l+=n.length+o.length+1}for(let e=a.length-1;e>=u;--e)a[e][0].length>c&&(u=e+1);let f="",d="",h=!1;for(let e=0;e<p;++e)f+=a[e][0].slice(c)+"\n";for(let t=p;t<u;++t){let[n,o]=a[t];l+=n.length+o.length+1;const u="\r"===o[o.length-1];if(u&&(o=o.slice(0,-1)),o&&n.length<c){const e="Block scalar lines must not be less indented than their "+(i.indent?"explicit indentation indicator":"first line");r(l-o.length-(u?2:1),"BAD_INDENT",e),n=""}s===e.Scalar.BLOCK_LITERAL?(f+=d+n.slice(c)+o,d="\n"):n.length>c||"\t"===o[0]?(" "===d?d="\n":h||"\n"!==d||(d="\n\n"),f+=d+n.slice(c)+o,d="\n",h=!0):""===o?"\n"===d?f+="\n":d="\n":(f+=d+o,d=" ",h=!1)}switch(i.chomp){case"-":break;case"+":for(let e=u;e<a.length;++e)f+="\n"+a[e][0].slice(c);"\n"!==f[f.length-1]&&(f+="\n");break;default:f+="\n"}const g=o+i.length+n.source.length;return{value:f,type:s,comment:i.comment,range:[o,g,g]}},pr}var dr,hr,gr={};function mr(){if(dr)return gr;dr=1;var e=ze(),t=ar();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 r=t.exec(e);if(!r)return e;let o=r[1],i=" ",s=t.lastIndex;for(n.lastIndex=s;r=n.exec(e);)""===r[1]?"\n"===i?o+=i:i="\n":(o+=i+r[1],i=" "),s=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=s,r=a.exec(e),o+i+(r?.[1]??"")}function r(e,t){let n="",r=e[t+1];for(;!(" "!==r&&"\t"!==r&&"\n"!==r&&"\r"!==r||"\r"===r&&"\n"!==e[t+2]);)"\n"===r&&(n+="\n"),r=e[(t+=1)+1];return n||(n=" "),{fold:n,offset:t}}const o={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,r){const o=e.substr(t,n),i=o.length===n&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(i)){const o=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(i)}return gr.resolveFlowScalar=function(s,a,u){const{offset:c,type:l,source:p,end:f}=s;let d,h;const g=(e,t,n)=>u(c+e,t,n);switch(l){case"scalar":d=e.Scalar.PLAIN,h=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),n(e)}(p,g);break;case"single-quoted-scalar":d=e.Scalar.QUOTE_SINGLE,h=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),n(e.slice(1,-1)).replace(/''/g,"'")}(p,g);break;case"double-quoted-scalar":d=e.Scalar.QUOTE_DOUBLE,h=function(e,t){let n="";for(let s=1;s<e.length-1;++s){const a=e[s];if("\r"!==a||"\n"!==e[s+1])if("\n"===a){const{fold:t,offset:o}=r(e,s);n+=t,s=o}else if("\\"===a){let r=e[++s];const a=o[r];if(a)n+=a;else if("\n"===r)for(r=e[s+1];" "===r||"\t"===r;)r=e[1+ ++s];else if("\r"===r&&"\n"===e[s+1])for(r=e[1+ ++s];" "===r||"\t"===r;)r=e[1+ ++s];else if("x"===r||"u"===r||"U"===r){const o={x:2,u:4,U:8}[r];n+=i(e,s+1,o,t),s+=o}else{const r=e.substr(s-1,2);t(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${r}`),n+=r}}else if(" "===a||"\t"===a){const t=s;let r=e[s+1];for(;" "===r||"\t"===r;)r=e[1+ ++s];"\n"===r||"\r"===r&&"\n"===e[s+2]||(n+=s>t?e.slice(t,s+1):a)}else n+=a}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}(p,g);break;default:return u(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[c,c+p.length,c+p.length]}}const m=c+p.length,y=t.resolveEnd(f,m,a,u);return{value:h,type:d,comment:y.comment,range:[c,m,y.offset]}},gr}var yr,Dr,br,vr,wr={};function _r(){if(Dr)return In;Dr=1;var e=Le(),t=he(),n=ur(),r=function(){if(hr)return lr;hr=1;var e=he(),t=ze(),n=fr(),r=mr();return lr.composeScalar=function(o,i,s,a){const{value:u,type:c,comment:l,range:p}="block-scalar"===i.type?n.resolveBlockScalar(o,i,a):r.resolveFlowScalar(i,o.options.strict,a),f=s?o.directives.tagName(s.source,e=>a(s,"TAG_RESOLVE_FAILED",e)):null;let d,h;d=o.options.stringKeys&&o.atKey?o.schema[e.SCALAR]:f?function(t,n,r,o,i){if("!"===r)return t[e.SCALAR];const s=[];for(const e of t.tags)if(!e.collection&&e.tag===r){if(!e.default||!e.test)return e;s.push(e)}for(const e of s)if(e.test?.test(n))return e;const a=t.knownTags[r];return a&&!a.collection?(t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(i(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),t[e.SCALAR])}(o.schema,u,f,s,a):"scalar"===i.type?function({atKey:t,directives:n,schema:r},o,i,s){const a=r.tags.find(e=>(!0===e.default||t&&"key"===e.default)&&e.test?.test(o))||r[e.SCALAR];if(r.compat){const t=r.compat.find(e=>e.default&&e.test?.test(o))??r[e.SCALAR];a.tag!==t.tag&&s(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${n.tagString(a.tag)} or ${n.tagString(t.tag)}`,!0)}return a}(o,u,i,a):o.schema[e.SCALAR];try{const n=d.resolve(u,e=>a(s??i,"TAG_RESOLVE_FAILED",e),o.options);h=e.isScalar(n)?n:new t.Scalar(n)}catch(e){const n=e instanceof Error?e.message:String(e);a(s??i,"TAG_RESOLVE_FAILED",n),h=new t.Scalar(u)}return h.range=p,h.source=u,c&&(h.type=c),f&&(h.tag=f),d.format&&(h.format=d.format),l&&(h.comment=l),h},lr}(),o=ar(),i=(yr||(yr=1,wr.emptyScalarPosition=function(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++r];"space"===n?.type;)e+=n.source.length,n=t[++r];break}}return e}),wr);const s={composeNode:a,composeEmptyNode:u};function a(i,a,c,l){const p=i.atKey,{spaceBefore:f,comment:d,anchor:h,tag:g}=c;let m,y=!0;switch(a.type){case"alias":m=function({options:t},{offset:n,source:r,end:i},s){const a=new e.Alias(r.substring(1));""===a.source&&s(n,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&s(n+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const u=n+r.length,c=o.resolveEnd(i,u,t.strict,s);return a.range=[n,u,c.offset],c.comment&&(a.comment=c.comment),a}(i,a,l),(h||g)&&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":m=r.composeScalar(i,a,g,l),h&&(m.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":m=n.composeCollection(s,i,a,c,l),h&&(m.anchor=h.source.substring(1));break;default:l(a,"UNEXPECTED_TOKEN","error"===a.type?a.message:`Unsupported token (type: ${a.type})`),m=u(i,a.offset,void 0,null,c,l),y=!1}return h&&""===m.anchor&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),p&&i.options.stringKeys&&(!t.isScalar(m)||"string"!=typeof m.value||m.tag&&"tag:yaml.org,2002:str"!==m.tag)&&l(g??a,"NON_STRING_KEY","With stringKeys, all keys must be strings"),f&&(m.spaceBefore=!0),d&&("scalar"===a.type&&""===a.source?m.comment=d:m.commentBefore=d),i.options.keepSourceTokens&&y&&(m.srcToken=a),m}function u(e,t,n,o,{spaceBefore:s,comment:a,anchor:u,tag:c,end:l},p){const f={type:"scalar",offset:i.emptyScalarPosition(t,n,o),indent:-1,source:""},d=r.composeScalar(e,f,c,p);return u&&(d.anchor=u.source.substring(1),""===d.anchor&&p(u,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=l),d}return In.composeEmptyNode=u,In.composeNode=a,In}function Er(){if(vr)return pe;vr=1;var e=s,t=be(),n=Tn(),r=Nn(),o=he(),i=function(){if(br)return Bn;br=1;var e=Tn(),t=_r(),n=ar(),r=Un();return Bn.composeDoc=function(o,i,{offset:s,start:a,value:u,end:c},l){const p=Object.assign({_directives:i},o),f=new e.Document(void 0,p),d={atKey:!1,atRoot:!0,directives:f.directives,options:f.options,schema:f.schema},h=r.resolveProps(a,{indicator:"doc-start",next:u??c?.[0],offset:s,onError:l,parentIndent:0,startOnNewline:!0});h.found&&(f.directives.docStart=!0,!u||"block-map"!==u.type&&"block-seq"!==u.type||h.hasNewline||l(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),f.contents=u?t.composeNode(d,u,h,l):t.composeEmptyNode(d,h.end,a,null,h,l);const g=f.contents.range[2],m=n.resolveEnd(c,g,!1,l);return m.comment&&(f.comment=m.comment),f.range=[s,g,m.offset],f},Bn}(),a=ar();function u(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,r=!1;for(let o=0;o<e.length;++o){const i=e[o];switch(i[0]){case"#":t+=(""===t?"":r?"\n\n":"\n")+(i.substring(1)||" "),n=!0,r=!1;break;case"%":"#"!==e[o+1]?.[0]&&(o+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}return pe.Composer=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,o)=>{const i=u(e);o?this.warnings.push(new r.YAMLWarning(i,t,n)):this.errors.push(new r.YAMLParseError(i,t,n))},this.directives=new t.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:r}=c(this.prelude);if(n){const i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(o.isCollection(i)&&!i.flow&&i.items.length>0){let e=i.items[0];o.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,r)=>{const o=u(t);o[0]+=e,this.onError(o,"BAD_DIRECTIVE",n,r)}),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 r.YAMLParseError(u(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 r.YAMLParseError(u(t),"UNEXPECTED_TOKEN",e));break}this.doc.directives.docEnd=!0;const e=a.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 r.YAMLParseError(u(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),r=new n.Document(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}},pe}var Ar,Sr={},Cr={};var kr,Pr={};var Rr,xr,Or={};function Fr(){if(xr)return Sr;xr=1;var e=function(){if(Ar)return Cr;Ar=1;var e=fr(),t=mr(),n=Nn(),r=rt();function o(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 r=e.props.slice(1);let o=t.length;"block-scalar-header"===e.props[0].type&&(o-=e.props[0].source.length);for(const e of r)e.offset+=o;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{const r="indent"in e?e.indent:-1,o="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:r,source:t,end:o})}}}return Cr.createScalarToken=function(e,t){const{implicitKey:n=!1,indent:i,inFlow:s=!1,offset:a=-1,type:u="PLAIN"}=t,c=r.stringifyString({type:u,value:e},{implicitKey:n,indent:i>0?" ".repeat(i):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:i,source:"\n"}];switch(c[0]){case"|":case">":{const e=c.indexOf("\n"),t=c.substring(0,e),n=c.substring(e+1)+"\n",r=[{type:"block-scalar-header",offset:a,indent:i,source:t}];return o(r,l)||r.push({type:"newline",offset:-1,indent:i,source:"\n"}),{type:"block-scalar",offset:a,indent:i,props:r,source:n}}case'"':return{type:"double-quoted-scalar",offset:a,indent:i,source:c,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:i,source:c,end:l};default:return{type:"scalar",offset:a,indent:i,source:c,end:l}}},Cr.resolveAsScalar=function(r,o=!0,i){if(r){const s=(e,t,r)=>{const o="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!i)throw new n.YAMLParseError([o,o+1],t,r);i(o,t,r)};switch(r.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return t.resolveFlowScalar(r,o,s);case"block-scalar":return e.resolveBlockScalar({options:{strict:o}},r,s)}}return null},Cr.setScalarValue=function(e,t,n={}){let{afterKey:s=!1,implicitKey:a=!1,inFlow:u=!1,type:c}=n,l="indent"in e?e.indent:null;if(s&&"number"==typeof l&&(l+=2),!c)switch(e.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");c=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const p=r.stringifyString({type:c,value:t},{implicitKey:a||null===l,indent:null!==l&&l>0?" ".repeat(l):"",inFlow:u,options:{blockQuote:!0,lineWidth:-1}});switch(p[0]){case"|":case">":!function(e,t){const n=t.indexOf("\n"),r=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=r,e.source=i}else{const{offset:t}=e,n="indent"in e?e.indent:-1,s=[{type:"block-scalar-header",offset:t,indent:n,source:r}];o(s,"end"in e?e.end:void 0)||s.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:s,source:i})}}(e,p);break;case'"':i(e,p,"double-quoted-scalar");break;case"'":i(e,p,"single-quoted-scalar");break;default:i(e,p,"scalar")}},Cr}(),t=function(){if(kr)return Pr;function e(n){switch(n.type){case"block-scalar":{let t="";for(const r of n.props)t+=e(r);return t+n.source}case"block-map":case"block-seq":{let e="";for(const r of n.items)e+=t(r);return e}case"flow-collection":{let e=n.start.source;for(const r of n.items)e+=t(r);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:r,value:o}){let i="";for(const e of t)i+=e.source;if(n&&(i+=e(n)),r)for(const e of r)i+=e.source;return o&&(i+=e(o)),i}return kr=1,Pr.stringify=n=>"type"in n?e(n):t(n),Pr}(),n=function(){if(Rr)return Or;Rr=1;const e=Symbol("break visit"),t=Symbol("skip children"),n=Symbol("remove item");function r(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),o(Object.freeze([]),e,t)}function o(t,r,i){let s=i(r,t);if("symbol"==typeof s)return s;for(const a of["key","value"]){const u=r[a];if(u&&"items"in u){for(let r=0;r<u.items.length;++r){const s=o(Object.freeze(t.concat([[a,r]])),u.items[r],i);if("number"==typeof s)r=s-1;else{if(s===e)return e;s===n&&(u.items.splice(r,1),r-=1)}}"function"==typeof s&&"key"===a&&(s=s(r,t))}}return"function"==typeof s?s(r,t):s}return r.BREAK=e,r.SKIP=t,r.REMOVE=n,r.itemAtPath=(e,t)=>{let n=e;for(const[e,r]of t){const t=n?.[e];if(!t||!("items"in t))return;n=t.items[r]}return n},r.parentCollection=(e,t)=>{const n=r.itemAtPath(e,t.slice(0,-1)),o=t[t.length-1][0],i=n?.[o];if(i&&"items"in i)return i;throw new Error("Parent collection not found")},Or.visit=r,Or}();return Sr.createScalarToken=e.createScalarToken,Sr.resolveAsScalar=e.resolveAsScalar,Sr.setScalarValue=e.setScalarValue,Sr.stringify=t.stringify,Sr.visit=n.visit,Sr.BOM="\ufeff",Sr.DOCUMENT="",Sr.FLOW_END="",Sr.SCALAR="",Sr.isCollection=e=>!!e&&"items"in e,Sr.isScalar=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type),Sr.prettyToken=function(e){switch(e){case"\ufeff":return"<BOM>";case"":return"<DOC>";case"":return"<FLOW_END>";case"":return"<SCALAR>";default:return JSON.stringify(e)}},Sr.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},Sr}var Tr,$r={};function Lr(){if(Tr)return $r;Tr=1;var e=Fr();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"),r=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),o=new Set(",[]{}"),i=new Set(" ,[]{}\n\r\t"),s=e=>!e||i.has(e);return $r.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 r=t[n-1];if(" "===r||"\t"===r){e=n-1;break}n=t.indexOf("#",n+1)}for(;;){const n=t[e-1];if(" "!==n&&"\t"!==n)break;e-=1}const r=(yield*this.pushCount(e))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-r),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(s),"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,r,o=-1;do{n=yield*this.pushNewline(),n>0?(r=yield*this.pushSpaces(!1),this.indentValue=o=r):r=0,r+=(yield*this.pushSpaces(!0))}while(n+r>0);const i=this.getLine();if(null===i)return this.setNext("flow");if((-1!==o&&o<this.indentNext&&"#"!==i[0]||0===o&&(i.startsWith("---")||i.startsWith("..."))&&t(i[3]))&&(o!==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(s),"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 r=n.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){const e=this.continueScalar(r+1);if(-1===e)break;r=n.indexOf("\n",e)}-1!==r&&(t=r-("\r"===n[r-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,r=0;e:for(let e=this.pos;t=this.buffer[e];++e)switch(t){case" ":r+=1;break;case"\n":n=e,r=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(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r: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 o=n+1;for(t=this.buffer[o];" "===t;)t=this.buffer[++o];if("\t"===t){for(;"\t"===t||" "===t||"\r"===t||"\n"===t;)t=this.buffer[++o];n=o-1}else if(!this.blockScalarKeep)for(;;){let e=n-1,t=this.buffer[e];"\r"===t&&(t=this.buffer[--e]);const o=e;for(;" "===t;)t=this.buffer[--e];if(!("\n"===t&&e>=this.pos&&e+1+r>o))break;n=e}return yield e.SCALAR,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let r,i=this.pos-1,s=this.pos-1;for(;r=this.buffer[++s];)if(":"===r){const e=this.buffer[s+1];if(t(e)||n&&o.has(e))break;i=s}else if(t(r)){let e=this.buffer[s+1];if("\r"===r&&("\n"===e?(s+=1,r="\n",e=this.buffer[s+1]):i=s),"#"===e||n&&o.has(e))break;if("\n"===r){const e=this.continueScalar(s+1);if(-1===e)break;s=Math.max(s,e-2)}}else{if(n&&o.has(r))break;i=s}return r||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(s))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(t(n)||e&&o.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(r.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 r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},$r}var Nr,Mr={};function Br(){return Nr||(Nr=1,Mr.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 r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}),Mr}var Ir,jr={};function Hr(){if(Ir)return jr;Ir=1;var e=s,t=Fr(),n=Lr();function r(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function o(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 a(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 u(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||r(t.start,"explicit-key-ind")||r(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 jr.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 r=t.tokenType(n);if(r)if("scalar"===r)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+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||e&&"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===o(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!==o(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=u(a(this.peek(2)));let n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];const r={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]=r}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,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.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],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.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,o=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let s=[];if(o&&t.sep&&!t.value){const n=[];for(let r=0;r<t.sep.length;++r){const o=t.sep[r];switch(o.type){case"newline":n.push(r);break;case"space":break;case"comment":o.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(s=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":return void(o||t.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?o||t.value?(s.push(this.sourceToken),e.items.push({start:s,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(r(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(i(t.key)&&!r(t.sep,"newline")){const e=u(t.start),n=t.key,r=t.sep;r.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:r}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(r(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=u(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||o?e.items.push({start:s,key:null,sep:[this.sourceToken]}):r(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});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(o||t.value?(e.items.push({start:s,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0))}default:{const o=this.startBlockValue(e);if(o){if("block-seq"===o.type){if(!t.explicitKey&&t.sep&&!r(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else n&&e.items.push({start:s});return void this.stack.push(o)}}}}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,r=Array.isArray(n)?n[n.length-1]:void 0;"comment"===r?.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],r=n?.value?.end;if(Array.isArray(r))return Array.prototype.push.apply(r,t.start),r.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||r(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(e&&"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=u(a(t));c(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}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=u(a(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=u(a(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())}}},jr}var zr,Ur,qr={};var Kr=function(){if(Ur)return le;Ur=1;var e=Er(),t=Tn(),n=Rn(),r=Nn(),o=Le(),i=he(),s=gt(),a=ze(),u=At(),c=xt(),l=Fr(),p=Lr(),f=Br(),d=Hr(),h=function(){if(zr)return qr;zr=1;var e=Er(),t=Tn(),n=Nn(),r=ut(),o=he(),i=Br(),s=Hr();function a(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new i.LineCounter||null,prettyErrors:t}}function u(t,r={}){const{lineCounter:o,prettyErrors:i}=a(r),u=new s.Parser(o?.addNewLine),c=new e.Composer(r);let l=null;for(const e of c.compose(u.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&&o&&(l.errors.forEach(n.prettifyError(t,o)),l.warnings.forEach(n.prettifyError(t,o))),l}return qr.parse=function(e,t,n){let o;"function"==typeof t?o=t:void 0===n&&t&&"object"==typeof t&&(n=t);const i=u(e,n);if(!i)return null;if(i.warnings.forEach(e=>r.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:o},n))},qr.parseAllDocuments=function(t,r={}){const{lineCounter:o,prettyErrors:i}=a(r),u=new s.Parser(o?.addNewLine),c=new e.Composer(r),l=Array.from(c.compose(u.parse(t)));if(i&&o)for(const e of l)e.errors.forEach(n.prettifyError(t,o)),e.warnings.forEach(n.prettifyError(t,o));return l.length>0?l:Object.assign([],{empty:!0},c.streamInfo())},qr.parseDocument=u,qr.stringify=function(e,n,r){let i=null;if("function"==typeof n||Array.isArray(n)?i=n:void 0===r&&n&&(r=n),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??n??{};if(!e)return}return o.isDocument(e)&&!i?e.toString(r):new t.Document(e,i,r).toString(r)},qr}(),g=De();return le.Composer=e.Composer,le.Document=t.Document,le.Schema=n.Schema,le.YAMLError=r.YAMLError,le.YAMLParseError=r.YAMLParseError,le.YAMLWarning=r.YAMLWarning,le.Alias=o.Alias,le.isAlias=i.isAlias,le.isCollection=i.isCollection,le.isDocument=i.isDocument,le.isMap=i.isMap,le.isNode=i.isNode,le.isPair=i.isPair,le.isScalar=i.isScalar,le.isSeq=i.isSeq,le.Pair=s.Pair,le.Scalar=a.Scalar,le.YAMLMap=u.YAMLMap,le.YAMLSeq=c.YAMLSeq,le.CST=l,le.Lexer=p.Lexer,le.LineCounter=f.LineCounter,le.Parser=d.Parser,le.parse=h.parse,le.parseAllDocuments=h.parseAllDocuments,le.parseDocument=h.parseDocument,le.stringify=h.stringify,le.visit=g.visit,le.visitAsync=g.visitAsync,le}(),Gr=O(Kr);function Wr(e,t,n){function r(n,r){var o;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(o=n._zod).traits??(o.traits=new Set),n._zod.traits.add(e),t(n,r);for(const e in s.prototype)e in n||Object.defineProperty(n,e,{value:s.prototype[e].bind(n)});n._zod.constr=s,n._zod.def=r}const o=n?.Parent??Object;class i extends o{}function s(e){var t;const o=n?.Parent?new i:this;r(o,e),(t=o._zod).deferred??(t.deferred=[]);for(const e of o._zod.deferred)e();return o}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class Vr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Zr extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const Jr={};function Yr(e){return Jr}function Qr(e,t){return"bigint"==typeof t?t.toString():t}function Xr(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function eo(e){return null==e}function to(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const no=Symbol("evaluating");function ro(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==no)return void 0===r&&(r=no,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function oo(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function io(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function so(e){return JSON.stringify(e)}const ao="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function uo(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const co=Xr(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function lo(e){if(!1===uo(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==uo(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function po(e){return lo(e)?{...e}:Array.isArray(e)?[...e]:e}const fo=new Set(["string","number","symbol"]);function ho(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function go(e,t,n){const r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function mo(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 yo={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 Do(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 bo(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function vo(e){return"string"==typeof e?e:e?.message}function wo(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=vo(e.inst?._zod.def?.error?.(e))??vo(t?.error?.(e))??vo(n.customError?.(e))??vo(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function _o(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Eo(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const Ao=(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,Qr,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},So=Wr("$ZodError",Ao),Co=Wr("$ZodError",Ao,{Parent:Error}),ko=e=>(t,n,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Vr;if(s.issues.length){const t=new(o?.Err??e)(s.issues.map(e=>wo(e,i,Yr())));throw ao(t,o?.callee),t}return s.value},Po=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const t=new(o?.Err??e)(s.issues.map(e=>wo(e,i,Yr())));throw ao(t,o?.callee),t}return s.value},Ro=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new Vr;return i.issues.length?{success:!1,error:new(e??So)(i.issues.map(e=>wo(e,o,Yr())))}:{success:!0,data:i.value}},xo=Ro(Co),Oo=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>wo(e,o,Yr())))}:{success:!0,data:i.value}},Fo=Oo(Co),To=/^[cC][^\s-]{8,}$/,$o=/^[0-9a-z]+$/,Lo=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,No=/^[0-9a-vA-V]{20}$/,Mo=/^[A-Za-z0-9]{27}$/,Bo=/^[a-zA-Z0-9_-]{21}$/,Io=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,jo=/^([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})$/,Ho=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)$/,zo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Uo=/^(?:(?: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])$/,qo=/^(([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}|:))$/,Ko=/^((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])$/,Go=/^(([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])$/,Wo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Vo=/^[A-Za-z0-9_-]*$/,Zo=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Jo=/^\+(?:[0-9]){6,14}[0-9]$/,Yo="(?:(?:\\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])))",Qo=new RegExp(`^${Yo}$`);function Xo(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 ei=/^-?\d+$/,ti=/^-?\d+(?:\.\d+)?/,ni=/^(?:true|false)$/i,ri=/^[^A-Z]*$/,oi=/^[^a-z]*$/,ii=Wr("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),si={number:"number",bigint:"bigint",object:"date"},ai=Wr("$ZodCheckLessThan",(e,t)=>{ii.init(e,t);const n=si[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ui=Wr("$ZodCheckGreaterThan",(e,t)=>{ii.init(e,t);const n=si[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ci=Wr("$ZodCheckMultipleOf",(e,t)=>{ii.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,r=t.toString();let o=(r.split(".")[1]||"").length;if(0===o&&/\d?e-\d?/.test(r)){const e=r.match(/\d?e-(\d?)/);e?.[1]&&(o=Number.parseInt(e[1]))}const i=n>o?n:o;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})}}),li=Wr("$ZodCheckNumberFormat",(e,t)=>{ii.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=yo[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=o,r.maximum=i,n&&(r.pattern=ei)}),e._zod.check=s=>{const a=s.value;if(n){if(!Number.isInteger(a))return void s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});if(!Number.isSafeInteger(a))return void(a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,continue:!t.abort}))}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e})}}),pi=Wr("$ZodCheckMaxLength",(e,t)=>{var n;ii.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!eo(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 r=n.value;if(r.length<=t.maximum)return;const o=_o(r);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),fi=Wr("$ZodCheckMinLength",(e,t)=>{var n;ii.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!eo(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 r=n.value;if(r.length>=t.minimum)return;const o=_o(r);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),di=Wr("$ZodCheckLengthEquals",(e,t)=>{var n;ii.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!eo(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 r=n.value,o=r.length;if(o===t.length)return;const i=_o(r),s=o>t.length;n.issues.push({origin:i,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),hi=Wr("$ZodCheckStringFormat",(e,t)=>{var n,r;ii.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})}):(r=e._zod).check??(r.check=()=>{})}),gi=Wr("$ZodCheckRegex",(e,t)=>{hi.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})}}),mi=Wr("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ri),hi.init(e,t)}),yi=Wr("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=oi),hi.init(e,t)}),Di=Wr("$ZodCheckIncludes",(e,t)=>{ii.init(e,t);const n=ho(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),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})}}),bi=Wr("$ZodCheckStartsWith",(e,t)=>{ii.init(e,t);const n=new RegExp(`^${ho(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})}}),vi=Wr("$ZodCheckEndsWith",(e,t)=>{ii.init(e,t);const n=new RegExp(`.*${ho(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})}}),wi=Wr("$ZodCheckOverwrite",(e,t)=>{ii.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class _i{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)),r=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of r)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const Ei={major:4,minor:1,patch:11},Ai=Wr("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ei;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const t of r)for(const n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const t=(e,t,n)=>{let r,o=Do(e);for(const i of t){if(i._zod.def.when){if(!i._zod.def.when(e))continue}else if(o)continue;const t=e.issues.length,s=i._zod.check(e);if(s instanceof Promise&&!1===n?.async)throw new Vr;if(r||s instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await s,e.issues.length!==t&&(o||(o=Do(e,t)))});else{if(e.issues.length===t)continue;o||(o=Do(e,t))}}return r?r.then(()=>e):e},n=(n,o,i)=>{if(Do(n))return n.aborted=!0,n;const s=t(o,r,i);if(s instanceof Promise){if(!1===i.async)throw new Vr;return s.then(t=>e._zod.parse(t,i))}return e._zod.parse(s,i)};e._zod.run=(o,i)=>{if(i.skipChecks)return e._zod.parse(o,i);if("backward"===i.direction){const t=e._zod.parse({value:o.value,issues:[]},{...i,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,o,i)):n(t,o,i)}const s=e._zod.parse(o,i);if(s instanceof Promise){if(!1===i.async)throw new Vr;return s.then(e=>t(e,r,i))}return t(s,r,i)}}e["~standard"]={validate:t=>{try{const n=xo(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return Fo(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),Si=Wr("$ZodString",(e,t)=>{var n;Ai.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,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ci=Wr("$ZodStringFormat",(e,t)=>{hi.init(e,t),Si.init(e,t)}),ki=Wr("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=jo),Ci.init(e,t)}),Pi=Wr("$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=Ho(e))}else t.pattern??(t.pattern=Ho());Ci.init(e,t)}),Ri=Wr("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=zo),Ci.init(e,t)}),xi=Wr("$ZodURL",(e,t)=>{Ci.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Zo.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.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=o.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Oi=Wr("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Ci.init(e,t)}),Fi=Wr("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Bo),Ci.init(e,t)}),Ti=Wr("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=To),Ci.init(e,t)}),$i=Wr("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=$o),Ci.init(e,t)}),Li=Wr("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Lo),Ci.init(e,t)}),Ni=Wr("$ZodXID",(e,t)=>{t.pattern??(t.pattern=No),Ci.init(e,t)}),Mi=Wr("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Mo),Ci.init(e,t)}),Bi=Wr("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=Xo({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Yo}T(?:${r})$`)}(t)),Ci.init(e,t)}),Ii=Wr("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Qo),Ci.init(e,t)}),ji=Wr("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${Xo(t)}$`)),Ci.init(e,t)}),Hi=Wr("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Io),Ci.init(e,t)}),zi=Wr("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Uo),Ci.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),Ui=Wr("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=qo),Ci.init(e,t),e._zod.onattach.push(e=>{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})}}}),qi=Wr("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ko),Ci.init(e,t)}),Ki=Wr("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Go),Ci.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(2!==r.length)throw new Error;const[e,t]=r;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 Gi(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Wi=Wr("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Wo),Ci.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Gi(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),Vi=Wr("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Vo),Ci.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{(function(e){if(!Vo.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return Gi(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})}}),Zi=Wr("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Jo),Ci.init(e,t)}),Ji=Wr("$ZodJWT",(e,t)=>{Ci.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&"JWT"!==o?.typ||!o.alg||t&&(!("alg"in o)||o.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})}}),Yi=Wr("$ZodNumber",(e,t)=>{Ai.init(e,t),e._zod.pattern=e._zod.bag.pattern??ti,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const o=n.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return n;const i="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}}),Qi=Wr("$ZodNumber",(e,t)=>{li.init(e,t),Yi.init(e,t)}),Xi=Wr("$ZodBoolean",(e,t)=>{Ai.init(e,t),e._zod.pattern=ni,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const o=n.value;return"boolean"==typeof o||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),es=Wr("$ZodUnknown",(e,t)=>{Ai.init(e,t),e._zod.parse=e=>e}),ts=Wr("$ZodNever",(e,t)=>{Ai.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function ns(e,t,n){e.issues.length&&t.issues.push(...bo(n,e.issues)),t.value[n]=e.value}const rs=Wr("$ZodArray",(e,t)=>{Ai.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let e=0;e<o.length;e++){const s=o[e],a=t.element._zod.run({value:s,issues:[]},r);a instanceof Promise?i.push(a.then(t=>ns(t,n,e))):ns(a,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function os(e,t,n,r){e.issues.length&&t.issues.push(...bo(n,e.issues)),void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function is(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=(r=e.shape,Object.keys(r).filter(e=>"optional"===r[e]._zod.optin&&"optional"===r[e]._zod.optout));var r;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ss(e,t,n,r,o,i){const s=[],a=o.keySet,u=o.catchall._zod,c=u.def.type;for(const o of Object.keys(t)){if(a.has(o))continue;if("never"===c){s.push(o);continue}const i=u.run({value:t[o],issues:[]},r);i instanceof Promise?e.push(i.then(e=>os(e,n,o,t))):os(i,n,o,t)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const as=Wr("$ZodObject",(e,t)=>{Ai.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 r=Xr(()=>is(t));ro(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(const e of r.values)n[t].add(e)}}return n});const o=uo,i=t.catchall;let s;e._zod.parse=(t,n)=>{s??(s=r.value);const a=t.value;if(!o(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};const u=[],c=s.shape;for(const e of s.keys){const r=c[e]._zod.run({value:a[e],issues:[]},n);r instanceof Promise?u.push(r.then(n=>os(n,t,e,a))):os(r,t,e,a)}return i?ss(u,a,t,n,r.value,e):u.length?Promise.all(u).then(()=>t):t}}),us=Wr("$ZodObjectJIT",(e,t)=>{as.init(e,t);const n=e._zod.parse,r=Xr(()=>is(t));let o;const i=uo,s=!Jr.jitless,a=s&&co.value,u=t.catchall;let c;e._zod.parse=(l,p)=>{c??(c=r.value);const f=l.value;return i(f)?s&&a&&!1===p?.async&&!0!==p.jitless?(o||(o=(e=>{const t=new _i(["shape","payload","ctx"]),n=r.value,o=e=>{const t=so(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let s=0;for(const e of n.keys)i[e]="key_"+s++;t.write("const newResult = {};");for(const e of n.keys){const n=i[e],r=so(e);t.write(`const ${n} = ${o(e)};`),t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${r}, ...iss.path] : [${r}]\n })));\n }\n \n \n if (${n}.value === undefined) {\n if (${r} in input) {\n newResult[${r}] = undefined;\n }\n } else {\n newResult[${r}] = ${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=o(l,p),u?ss([],f,l,p,c,e):l):n(l,p):(l.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),l)}});function cs(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const o=e.filter(e=>!Do(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>wo(e,r,Yr())))}),t)}const ls=Wr("$ZodUnion",(e,t)=>{Ai.init(e,t),ro(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),ro(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),ro(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),ro(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=>to(e.source)).join("|")})$`)}});const n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let s=!1;const a=[];for(const e of t.options){const t=e._zod.run({value:o.value,issues:[]},i);if(t instanceof Promise)a.push(t),s=!0;else{if(0===t.issues.length)return t;a.push(t)}}return s?Promise.all(a).then(t=>cs(t,o,e,i)):cs(a,o,e,i)}}),ps=Wr("$ZodIntersection",(e,t)=>{Ai.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,o=t.left._zod.run({value:r,issues:[]},n),i=t.right._zod.run({value:r,issues:[]},n);return o instanceof Promise||i instanceof Promise?Promise.all([o,i]).then(([t,n])=>ds(e,t,n)):ds(e,o,i)}});function fs(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(lo(e)&&lo(t)){const n=Object.keys(t),r=Object.keys(e).filter(e=>-1!==n.indexOf(e)),o={...e,...t};for(const n of r){const r=fs(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};o[n]=r.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=fs(e[r],t[r]);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ds(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Do(e))return e;const r=fs(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const hs=Wr("$ZodRecord",(e,t)=>{Ai.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!lo(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const i=[];if(t.keyType._zod.values){const s=t.keyType._zod.values;n.value={};for(const e of s)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){const s=t.valueType._zod.run({value:o[e],issues:[]},r);s instanceof Promise?i.push(s.then(t=>{t.issues.length&&n.issues.push(...bo(e,t.issues)),n.value[e]=t.value})):(s.issues.length&&n.issues.push(...bo(e,s.issues)),n.value[e]=s.value)}let a;for(const e in o)s.has(e)||(a=a??[],a.push(e));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:a})}else{n.value={};for(const s of Reflect.ownKeys(o)){if("__proto__"===s)continue;const a=t.keyType._zod.run({value:s,issues:[]},r);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(e=>wo(e,r,Yr())),input:s,path:[s],inst:e}),n.value[a.value]=a.value;continue}const u=t.valueType._zod.run({value:o[s],issues:[]},r);u instanceof Promise?i.push(u.then(e=>{e.issues.length&&n.issues.push(...bo(s,e.issues)),n.value[a.value]=e.value})):(u.issues.length&&n.issues.push(...bo(s,u.issues)),n.value[a.value]=u.value)}}return i.length?Promise.all(i).then(()=>n):n}}),gs=Wr("$ZodEnum",(e,t)=>{Ai.init(e,t);const n=function(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)}(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(e=>fo.has(typeof e)).map(e=>"string"==typeof e?ho(e):e.toString()).join("|")})$`),e._zod.parse=(t,o)=>{const i=t.value;return r.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),ms=Wr("$ZodTransform",(e,t)=>{Ai.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Zr(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(n.value=e,n));if(o instanceof Promise)throw new Vr;return n.value=o,n}});function ys(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const Ds=Wr("$ZodOptional",(e,t)=>{Ai.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ro(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ro(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${to(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>ys(t,e.value)):ys(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),bs=Wr("$ZodNullable",(e,t)=>{Ai.init(e,t),ro(e._zod,"optin",()=>t.innerType._zod.optin),ro(e._zod,"optout",()=>t.innerType._zod.optout),ro(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${to(e.source)}|null)$`):void 0}),ro(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)}),vs=Wr("$ZodDefault",(e,t)=>{Ai.init(e,t),e._zod.optin="optional",ro(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 r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ws(e,t)):ws(r,t)}});function ws(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const _s=Wr("$ZodPrefault",(e,t)=>{Ai.init(e,t),e._zod.optin="optional",ro(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))}),Es=Wr("$ZodNonOptional",(e,t)=>{Ai.init(e,t),ro(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,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(t=>As(t,e)):As(o,e)}});function As(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 Ss=Wr("$ZodCatch",(e,t)=>{Ai.init(e,t),ro(e._zod,"optin",()=>t.innerType._zod.optin),ro(e._zod,"optout",()=>t.innerType._zod.optout),ro(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>wo(e,n,Yr()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>wo(e,n,Yr()))},input:e.value}),e.issues=[]),e)}}),Cs=Wr("$ZodPipe",(e,t)=>{Ai.init(e,t),ro(e._zod,"values",()=>t.in._zod.values),ro(e._zod,"optin",()=>t.in._zod.optin),ro(e._zod,"optout",()=>t.out._zod.optout),ro(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>ks(e,t.in,n)):ks(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>ks(e,t.out,n)):ks(r,t.out,n)}});function ks(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Ps=Wr("$ZodReadonly",(e,t)=>{Ai.init(e,t),ro(e._zod,"propValues",()=>t.innerType._zod.propValues),ro(e._zod,"values",()=>t.innerType._zod.values),ro(e._zod,"optin",()=>t.innerType._zod.optin),ro(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Rs):Rs(r)}});function Rs(e){return e.value=Object.freeze(e.value),e}const xs=Wr("$ZodCustom",(e,t)=>{ii.init(e,t),Ai.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(t=>Os(t,n,r,e));Os(o,n,r,e)}});function Os(e,t,n,r){if(!e){const e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Eo(e))}}class Fs{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return 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 r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}const Ts=new Fs;function $s(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...mo(t)})}function Ls(e,t){return new ai({check:"less_than",...mo(t),value:e,inclusive:!1})}function Ns(e,t){return new ai({check:"less_than",...mo(t),value:e,inclusive:!0})}function Ms(e,t){return new ui({check:"greater_than",...mo(t),value:e,inclusive:!1})}function Bs(e,t){return new ui({check:"greater_than",...mo(t),value:e,inclusive:!0})}function Is(e,t){return new ci({check:"multiple_of",...mo(t),value:e})}function js(e,t){return new pi({check:"max_length",...mo(t),maximum:e})}function Hs(e,t){return new fi({check:"min_length",...mo(t),minimum:e})}function zs(e,t){return new di({check:"length_equals",...mo(t),length:e})}function Us(e){return new wi({check:"overwrite",tx:e})}const qs=Wr("ZodISODateTime",(e,t)=>{Bi.init(e,t),ha.init(e,t)});const Ks=Wr("ZodISODate",(e,t)=>{Ii.init(e,t),ha.init(e,t)});const Gs=Wr("ZodISOTime",(e,t)=>{ji.init(e,t),ha.init(e,t)});const Ws=Wr("ZodISODuration",(e,t)=>{Hi.init(e,t),ha.init(e,t)});const Vs=(e,t)=>{So.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t){const n=t||function(e){return e.message},r={_errors:[]},o=e=>{for(const t of e.issues)if("invalid_union"===t.code&&t.errors.length)t.errors.map(e=>o({issues:e}));else if("invalid_key"===t.code)o({issues:t.issues});else if("invalid_element"===t.code)o({issues:t.issues});else if(0===t.path.length)r._errors.push(n(t));else{let e=r,o=0;for(;o<t.path.length;){const r=t.path[o];o===t.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(n(t))):e[r]=e[r]||{_errors:[]},e=e[r],o++}}};return o(e),r}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Qr,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Qr,2)}},isEmpty:{get:()=>0===e.issues.length}})},Zs=Wr("ZodError",Vs),Js=Wr("ZodError",Vs,{Parent:Error}),Ys=ko(Js),Qs=Po(Js),Xs=Ro(Js),ea=Oo(Js),ta=(fa=Js,(e,t,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ko(fa)(e,t,r)}),na=(e=>(t,n,r)=>ko(e)(t,n,r))(Js),ra=(e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Po(e)(t,n,o)})(Js),oa=(e=>async(t,n,r)=>Po(e)(t,n,r))(Js),ia=(e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ro(e)(t,n,o)})(Js),sa=(e=>(t,n,r)=>Ro(e)(t,n,r))(Js),aa=(e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Oo(e)(t,n,o)})(Js),ua=(e=>async(t,n,r)=>Oo(e)(t,n,r))(Js),ca=Wr("ZodType",(e,t)=>(Ai.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(io(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]})),e.clone=(t,n)=>go(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Ys(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Xs(e,t,n),e.parseAsync=async(t,n)=>Qs(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ea(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ta(e,t,n),e.decode=(t,n)=>na(e,t,n),e.encodeAsync=async(t,n)=>ra(e,t,n),e.decodeAsync=async(t,n)=>oa(e,t,n),e.safeEncode=(t,n)=>ia(e,t,n),e.safeDecode=(t,n)=>sa(e,t,n),e.safeEncodeAsync=async(t,n)=>aa(e,t,n),e.safeDecodeAsync=async(t,n)=>ua(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new pu({type:"custom",check:"custom",fn:t,...mo(n)})}(0,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){const t=function(e){const t=new ii({check:"custom",...mo(void 0)});return t._zod.check=e,t}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Eo(e,n.value,t._zod.def));else{const r=e;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Eo(r))}},e(n.value,n)));return t}(t)),e.overwrite=t=>e.check(Us(t)),e.optional=()=>tu(e),e.nullable=()=>ru(e),e.nullish=()=>tu(ru(e)),e.nonoptional=t=>function(e,t){return new su({type:"nonoptional",innerType:e,...mo(t)})}(e,t),e.array=()=>qa(e),e.or=t=>Va([e,t]),e.and=t=>new Za({type:"intersection",left:e,right:t}),e.transform=t=>cu(e,new Xa({type:"transform",transform:t})),e.default=t=>{return n=t,new ou({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():po(n)}});var n},e.prefault=t=>{return n=t,new iu({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():po(n)}});var n},e.catch=t=>{return new au({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>cu(e,t),e.readonly=()=>new lu({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Ts.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Ts.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Ts.get(e);const n=e.clone();return Ts.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),la=Wr("_ZodString",(e,t)=>{Si.init(e,t),ca.init(e,t);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 gi({check:"string_format",format:"regex",...mo(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new Di({check:"string_format",format:"includes",...mo(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new bi({check:"string_format",format:"starts_with",...mo(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new vi({check:"string_format",format:"ends_with",...mo(t),suffix:e})}(...t)),e.min=(...t)=>e.check(Hs(...t)),e.max=(...t)=>e.check(js(...t)),e.length=(...t)=>e.check(zs(...t)),e.nonempty=(...t)=>e.check(Hs(1,...t)),e.lowercase=t=>e.check(function(e){return new mi({check:"string_format",format:"lowercase",...mo(e)})}(t)),e.uppercase=t=>e.check(function(e){return new yi({check:"string_format",format:"uppercase",...mo(e)})}(t)),e.trim=()=>e.check(Us(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return Us(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(Us(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(Us(e=>e.toUpperCase()))}),pa=Wr("ZodString",(e,t)=>{Si.init(e,t),la.init(e,t),e.email=t=>e.check(function(e,t){return new ga({type:"string",format:"email",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.url=t=>e.check(function(e,t){return new Da({type:"string",format:"url",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.jwt=t=>e.check(function(e,t){return new Ta({type:"string",format:"jwt",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.emoji=t=>e.check(function(e,t){return new ba({type:"string",format:"emoji",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.guid=t=>e.check($s(ma,t)),e.uuid=t=>e.check(function(e,t){return new ya({type:"string",format:"uuid",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.uuidv4=t=>e.check(function(e,t){return new ya({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...mo(t)})}(0,t)),e.uuidv6=t=>e.check(function(e,t){return new ya({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...mo(t)})}(0,t)),e.uuidv7=t=>e.check(function(e,t){return new ya({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...mo(t)})}(0,t)),e.nanoid=t=>e.check(function(e,t){return new va({type:"string",format:"nanoid",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.guid=t=>e.check($s(ma,t)),e.cuid=t=>e.check(function(e,t){return new wa({type:"string",format:"cuid",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.cuid2=t=>e.check(function(e,t){return new _a({type:"string",format:"cuid2",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.ulid=t=>e.check(function(e,t){return new Ea({type:"string",format:"ulid",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.base64=t=>e.check(function(e,t){return new xa({type:"string",format:"base64",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.base64url=t=>e.check(function(e,t){return new Oa({type:"string",format:"base64url",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.xid=t=>e.check(function(e,t){return new Aa({type:"string",format:"xid",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.ksuid=t=>e.check(function(e,t){return new Sa({type:"string",format:"ksuid",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.ipv4=t=>e.check(function(e,t){return new Ca({type:"string",format:"ipv4",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.ipv6=t=>e.check(function(e,t){return new ka({type:"string",format:"ipv6",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.cidrv4=t=>e.check(function(e,t){return new Pa({type:"string",format:"cidrv4",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.cidrv6=t=>e.check(function(e,t){return new Ra({type:"string",format:"cidrv6",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.e164=t=>e.check(function(e,t){return new Fa({type:"string",format:"e164",check:"string_format",abort:!1,...mo(t)})}(0,t)),e.datetime=t=>e.check(function(e){return new qs({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...mo(e)})}(t)),e.date=t=>e.check(function(e){return new Ks({type:"string",format:"date",check:"string_format",...mo(e)})}(t)),e.time=t=>e.check(function(e){return new Gs({type:"string",format:"time",check:"string_format",precision:null,...mo(e)})}(t)),e.duration=t=>e.check(function(e){return new Ws({type:"string",format:"duration",check:"string_format",...mo(e)})}(t))});var fa;function da(e){return new pa({type:"string",...mo(e)})}const ha=Wr("ZodStringFormat",(e,t)=>{Ci.init(e,t),la.init(e,t)}),ga=Wr("ZodEmail",(e,t)=>{Ri.init(e,t),ha.init(e,t)}),ma=Wr("ZodGUID",(e,t)=>{ki.init(e,t),ha.init(e,t)}),ya=Wr("ZodUUID",(e,t)=>{Pi.init(e,t),ha.init(e,t)}),Da=Wr("ZodURL",(e,t)=>{xi.init(e,t),ha.init(e,t)}),ba=Wr("ZodEmoji",(e,t)=>{Oi.init(e,t),ha.init(e,t)}),va=Wr("ZodNanoID",(e,t)=>{Fi.init(e,t),ha.init(e,t)}),wa=Wr("ZodCUID",(e,t)=>{Ti.init(e,t),ha.init(e,t)}),_a=Wr("ZodCUID2",(e,t)=>{$i.init(e,t),ha.init(e,t)}),Ea=Wr("ZodULID",(e,t)=>{Li.init(e,t),ha.init(e,t)}),Aa=Wr("ZodXID",(e,t)=>{Ni.init(e,t),ha.init(e,t)}),Sa=Wr("ZodKSUID",(e,t)=>{Mi.init(e,t),ha.init(e,t)}),Ca=Wr("ZodIPv4",(e,t)=>{zi.init(e,t),ha.init(e,t)}),ka=Wr("ZodIPv6",(e,t)=>{Ui.init(e,t),ha.init(e,t)}),Pa=Wr("ZodCIDRv4",(e,t)=>{qi.init(e,t),ha.init(e,t)}),Ra=Wr("ZodCIDRv6",(e,t)=>{Ki.init(e,t),ha.init(e,t)}),xa=Wr("ZodBase64",(e,t)=>{Wi.init(e,t),ha.init(e,t)}),Oa=Wr("ZodBase64URL",(e,t)=>{Vi.init(e,t),ha.init(e,t)}),Fa=Wr("ZodE164",(e,t)=>{Zi.init(e,t),ha.init(e,t)}),Ta=Wr("ZodJWT",(e,t)=>{Ji.init(e,t),ha.init(e,t)}),$a=Wr("ZodNumber",(e,t)=>{Yi.init(e,t),ca.init(e,t),e.gt=(t,n)=>e.check(Ms(t,n)),e.gte=(t,n)=>e.check(Bs(t,n)),e.min=(t,n)=>e.check(Bs(t,n)),e.lt=(t,n)=>e.check(Ls(t,n)),e.lte=(t,n)=>e.check(Ns(t,n)),e.max=(t,n)=>e.check(Ns(t,n)),e.int=t=>e.check(Na(t)),e.safe=t=>e.check(Na(t)),e.positive=t=>e.check(Ms(0,t)),e.nonnegative=t=>e.check(Bs(0,t)),e.negative=t=>e.check(Ls(0,t)),e.nonpositive=t=>e.check(Ns(0,t)),e.multipleOf=(t,n)=>e.check(Is(t,n)),e.step=(t,n)=>e.check(Is(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}),La=Wr("ZodNumberFormat",(e,t)=>{Qi.init(e,t),$a.init(e,t)});function Na(e){return new La({type:"number",check:"number_format",abort:!1,format:"safeint",...mo(e)})}const Ma=Wr("ZodBoolean",(e,t)=>{Xi.init(e,t),ca.init(e,t)});function Ba(e){return new Ma({type:"boolean",...mo(e)})}const Ia=Wr("ZodUnknown",(e,t)=>{es.init(e,t),ca.init(e,t)});function ja(){return new Ia({type:"unknown"})}const Ha=Wr("ZodNever",(e,t)=>{ts.init(e,t),ca.init(e,t)});function za(e){return new Ha({type:"never",...mo(e)})}const Ua=Wr("ZodArray",(e,t)=>{rs.init(e,t),ca.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(Hs(t,n)),e.nonempty=t=>e.check(Hs(1,t)),e.max=(t,n)=>e.check(js(t,n)),e.length=(t,n)=>e.check(zs(t,n)),e.unwrap=()=>e.element});function qa(e,t){return function(e,t,n){return new Ua({type:"array",element:t,...mo(n)})}(0,e,t)}const Ka=Wr("ZodObject",(e,t)=>{us.init(e,t),ca.init(e,t),ro(e,"shape",()=>t.shape),e.keyof=()=>function(e){const t=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Qa({type:"enum",entries:t,...mo(void 0)})}(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ja()}),e.loose=()=>e.clone({...e._zod.def,catchall:ja()}),e.strict=()=>e.clone({...e._zod.def,catchall:za()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!lo(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=io(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return oo(this,"shape",n),n},checks:[]});return go(e,r)}(e,t),e.safeExtend=t=>function(e,t){if(!lo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return oo(this,"shape",n),n},checks:e._zod.def.checks};return go(e,n)}(e,t),e.merge=t=>function(e,t){const n=io(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return oo(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return go(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return go(e,io(e._zod.def,{get shape(){const e={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return oo(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,r=io(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return oo(this,"shape",r),r},checks:[]});return go(e,r)}(e,t),e.partial=(...t)=>function(e,t,n){const r=io(t._zod.def,{get shape(){const r=t._zod.def.shape,o={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)o[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return oo(this,"shape",o),o},checks:[]});return go(t,r)}(eu,e,t[0]),e.required=(...t)=>function(e,t,n){const r=io(t._zod.def,{get shape(){const r=t._zod.def.shape,o={...r};if(n)for(const t in n){if(!(t in o))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)o[t]=new e({type:"nonoptional",innerType:r[t]});return oo(this,"shape",o),o},checks:[]});return go(t,r)}(su,e,t[0])});function Ga(e,t){const n={type:"object",shape:e??{},...mo(t)};return new Ka(n)}const Wa=Wr("ZodUnion",(e,t)=>{ls.init(e,t),ca.init(e,t),e.options=t.options});function Va(e,t){return new Wa({type:"union",options:e,...mo(t)})}const Za=Wr("ZodIntersection",(e,t)=>{ps.init(e,t),ca.init(e,t)}),Ja=Wr("ZodRecord",(e,t)=>{hs.init(e,t),ca.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ya(e,t,n){return new Ja({type:"record",keyType:e,valueType:t,...mo(n)})}const Qa=Wr("ZodEnum",(e,t)=>{gs.init(e,t),ca.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const o={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);o[r]=t.entries[r]}return new Qa({...t,checks:[],...mo(r),entries:o})},e.exclude=(e,r)=>{const o={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete o[t]}return new Qa({...t,checks:[],...mo(r),entries:o})}}),Xa=Wr("ZodTransform",(e,t)=>{ms.init(e,t),ca.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Zr(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(Eo(r,n.value,t));else{const t=r;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(Eo(t))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(e=>(n.value=e,n)):(n.value=o,n)}}),eu=Wr("ZodOptional",(e,t)=>{Ds.init(e,t),ca.init(e,t),e.unwrap=()=>e._zod.def.innerType});function tu(e){return new eu({type:"optional",innerType:e})}const nu=Wr("ZodNullable",(e,t)=>{bs.init(e,t),ca.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ru(e){return new nu({type:"nullable",innerType:e})}const ou=Wr("ZodDefault",(e,t)=>{vs.init(e,t),ca.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),iu=Wr("ZodPrefault",(e,t)=>{_s.init(e,t),ca.init(e,t),e.unwrap=()=>e._zod.def.innerType}),su=Wr("ZodNonOptional",(e,t)=>{Es.init(e,t),ca.init(e,t),e.unwrap=()=>e._zod.def.innerType}),au=Wr("ZodCatch",(e,t)=>{Ss.init(e,t),ca.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),uu=Wr("ZodPipe",(e,t)=>{Cs.init(e,t),ca.init(e,t),e.in=t.in,e.out=t.out});function cu(e,t){return new uu({type:"pipe",in:e,out:t})}const lu=Wr("ZodReadonly",(e,t)=>{Ps.init(e,t),ca.init(e,t),e.unwrap=()=>e._zod.def.innerType}),pu=Wr("ZodCustom",(e,t)=>{xs.init(e,t),ca.init(e,t)});function fu(e){return new $a({type:"number",coerce:!0,checks:[],...mo(e)})}const du=qa(da()).default([]).optional(),hu=Va([da(),qa(da())]),gu=Ya(da(),hu).optional(),mu=Ga({script:da().min(1,{message:"script must be a non-empty string"}),warnPattern:da().min(1,{message:"warnPattern must be a non-empty string"}).optional().refine(e=>"string"!=typeof e||(e=>{try{return new RegExp(e),!0}catch{return!1}})(e),{message:"warnPattern: invalid regular expression"})}).strict(),yu=Ya(da(),Va([da().min(1),mu])).default({}),Du=Va([Ba(),da(),new $a({type:"number",checks:[],...mo(undefined)})]).transform(e=>{if("boolean"==typeof e)return e;if("number"==typeof e)return 1===e;const t=String(e).trim().toLowerCase();return"1"===t||"true"===t||"0"!==t&&"false"!==t&&void 0}).optional();const bu=Ga({archive:Du,combine:Du,keep:Du,sequential:Du,live:Du,plan:Du,hangWarn:fu().int().positive().optional(),hangKill:fu().int().positive().optional(),hangKillGrace:fu().int().positive().optional(),scripts:Va([Ba(),qa(da())]).optional()}).strict().optional(),vu=Ga({file:da().optional()}).strict().optional(),wu=Ga({stash:Du}).strict().optional(),_u=Ga({debug:Du,boring:Du,patch:vu,run:bu,snap:wu}).strict().optional(),Eu=Ga({stanPath:da().min(1,{message:"stanPath must be a non-empty string"}),scripts:yu,includes:du,excludes:du,imports:gu,maxUndos:fu().int().positive().optional(),devMode:Du,cliDefaults:_u,patchOpenCommand:da().optional()}).strict(),Au=t=>{const r=(e=>{const t=ue(e);if(t)return t;const r=new Set;let o=e;for(;o;){const e=se({cwd:o});if(!e||r.has(e))break;r.add(e);const t=ue(e);if(t)return t;const i=n.dirname(e);if(i===e||r.has(i))break;o=i}return null})(t);if(!r)throw new Error("stan config not found");const o=e.readFileSync(r,"utf8"),i=r.endsWith(".json")?JSON.parse(o):Gr.parse(o);try{const e=Eu.parse(i);(e=>{if(["archive","init"].filter(t=>Object.prototype.hasOwnProperty.call(e??{},t)).length>0)throw new Error('scripts: keys "archive" and "init" not allowed')})(e.scripts??{});const t=(e=>{if(!e||"object"!=typeof e)return;const t=e,n={};for(const e of Object.keys(t)){const r=t[e];if("string"==typeof r){const t=r.trim();t&&(n[e]=[t])}else if(Array.isArray(r)){const t=r.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})(e.imports);return{stanPath:e.stanPath,scripts:e.scripts,includes:e.includes??[],excludes:e.excludes??[],imports:t,maxUndos:e.maxUndos,devMode:e.devMode,patchOpenCommand:e.patchOpenCommand??"code -g {file}",cliDefaults:e.cliDefaults}}catch(t){throw new Error((e=>e instanceof Zs?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"),"scripts"===t&&/expected\s+(record|object)/i.test(n)&&(n="scripts must be an object"),`${t}: ${n}`}).join("\n"):String(e))(t))}},Su=async({cwd:r,stanPath:o,baseName:i,includes:s,excludes:a,updateSnapshot:c="createIfMissing",includeOutputDirInDiff:l=!1,onArchiveWarnings:p})=>{const{outDir:f,diffDir:d}=await oe(r,o),h=await X(r),g=await ne(h,{cwd:r,stanPath:o,includeOutputDir:!1,includes:s??[],excludes:a??[]}),m=await(async(e,r)=>{const o={};for(const i of r){const r=n.resolve(e,i),s=await t.readFile(r),a=u.createHash("sha256").update(s).digest("hex");o[i]=a}return o})(r,g),y=(e=>n.join(e,".archive.snapshot.json"))(d),D=e.existsSync(y),b=D?JSON.parse(await t.readFile(y,"utf8")):{},v=D?g.filter(e=>!b[e]||b[e]!==m[e]):[...g],{textFiles:w,warningsBody:_}=await R(r,v),E=w,A=(_??"").trim();A&&"No archive warnings."!==A&&p?.(A);const S=n.join(f,`${i}.diff.tar`),C=await Promise.resolve().then(function(){return require("./index-ucZa1KMb-CeffVEuy.js")});if(l){const e=Array.from(new Set([...E,`${o.replace(/\\/g,"/")}/output`]));await C.create({file:S,cwd:r,filter:k(o)},e)}else if(0===E.length){const e=(e=>n.join(e,".stan_no_changes"))(d);await t.writeFile(e,"no changes","utf8");const i=[`${o.replace(/\\/g,"/")}/diff/.stan_no_changes`];await C.create({file:S,cwd:r},i)}else{const e=Array.from(new Set([...E]));await C.create({file:S,cwd:r},e)}return"replace"===c?await t.writeFile(y,JSON.stringify(m,null,2),"utf8"):"createIfMissing"!==c||D||await t.writeFile(y,JSON.stringify(m,null,2),"utf8"),{diffPath:S}};var Cu,ku={},Pu={},Ru={};var xu,Ou={};var Fu,Tu,$u={},Lu={};var Nu,Mu,Bu,Iu,ju,Hu,zu={};function Uu(){if(Iu)return Bu;Iu=1;var e=Mu?Nu:(Mu=1,Nu=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}),t={"{":"}","(":")","[":"]"},n=function(e){if("!"===e[0])return!0;for(var n=0,r=-2,o=-2,i=-2,s=-2,a=-2;n<e.length;){if("*"===e[n])return!0;if("?"===e[n+1]&&/[\].+)]/.test(e[n]))return!0;if(-1!==o&&"["===e[n]&&"]"!==e[n+1]&&(o<n&&(o=e.indexOf("]",n)),o>n)){if(-1===a||a>o)return!0;if(-1===(a=e.indexOf("\\",n))||a>o)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!==s&&"("===e[n]&&"?"===e[n+1]&&/[:!=]/.test(e[n+2])&&")"!==e[n+3]&&(s=e.indexOf(")",n))>n&&(-1===(a=e.indexOf("\\",n))||a>s))return!0;if(-1!==r&&"("===e[n]&&"|"!==e[n+1]&&(r<n&&(r=e.indexOf("|",n)),-1!==r&&")"!==e[r+1]&&(s=e.indexOf(")",r))>r&&(-1===(a=e.indexOf("\\",r))||a>s)))return!0;if("\\"===e[n]){var u=e[n+1];n+=2;var c=t[u];if(c){var l=e.indexOf(c,n);-1!==l&&(n=l+1)}if("!"===e[n])return!0}else n++}return!1},r=function(e){if("!"===e[0])return!0;for(var n=0;n<e.length;){if(/[*?{}()[\]]/.test(e[n]))return!0;if("\\"===e[n]){var r=e[n+1];n+=2;var o=t[r];if(o){var i=e.indexOf(o,n);-1!==i&&(n=i+1)}if("!"===e[n])return!0}else n++}return!1};return Bu=function(t,o){if("string"!=typeof t||""===t)return!1;if(e(t))return!0;var i=n;return o&&!1===o.strict&&(i=r),i(t)}}var qu,Ku,Gu,Wu,Vu,Zu,Ju,Yu,Qu,Xu,ec,tc,nc,rc,oc,ic,sc,ac,uc,cc={};function lc(){return qu||(qu=1,(e=cc).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,r=1,o)=>!1!==o&&!(!e.isInteger(t)||!e.isInteger(n))&&(Number(n)-Number(t))/Number(r)>=o,e.escapeNode=(e,t=0,n)=>{const r=e.nodes[t];r&&(n&&r.type===n||"open"===r.type||"close"===r.type)&&!0!==r.escaped&&(r.value="\\"+r.value,r.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 r=0;r<e.length;r++){const o=e[r];Array.isArray(o)?n(o):void 0!==o&&t.push(o)}return t};return n(e),t}),cc;var e}function pc(){if(Gu)return Ku;Gu=1;const e=lc();return Ku=(t,n={})=>{const r=(t,o={})=>{const i=n.escapeInvalid&&e.isInvalidBrace(o),s=!0===t.invalid&&!0===n.escapeInvalid;let a="";if(t.value)return(i||s)&&e.isOpenOrClose(t)?"\\"+t.value:t.value;if(t.value)return t.value;if(t.nodes)for(const e of t.nodes)a+=r(e);return a};return r(t)}}function fc(){if(Ju)return Zu;Ju=1;const e=Vu?Wu:(Vu=1,Wu=function(e){return"number"==typeof e?e-e===0:"string"==typeof e&&""!==e.trim()&&(Number.isFinite?Number.isFinite(+e):isFinite(+e))}),t=(n,i,s)=>{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,...s};"boolean"==typeof a.strictZeros&&(a.relaxZeros=!1===a.strictZeros);let u=n+":"+i+"="+String(a.relaxZeros)+String(a.shorthand)+String(a.capture)+String(a.wrap);if(t.cache.hasOwnProperty(u))return t.cache[u].result;let c=Math.min(n,i),l=Math.max(n,i);if(1===Math.abs(c-l)){let e=n+"|"+i;return a.capture?`(${e})`:!1===a.wrap?e:`(?:${e})`}let f=p(n)||p(i),d={min:n,max:i,a:c,b:l},h=[],g=[];return f&&(d.isPadded=f,d.maxLen=String(d.max).length),c<0&&(g=r(l<0?Math.abs(l):1,Math.abs(c),d,a),c=d.a=0),l>=0&&(h=r(c,l,d,a)),d.negatives=g,d.positives=h,d.result=function(e,t){let n=o(e,t,"-",!1)||[],r=o(t,e,"",!1)||[],i=o(e,t,"-?",!0)||[];return n.concat(i).concat(r).join("|")}(g,h),!0===a.capture?d.result=`(${d.result})`:!1!==a.wrap&&h.length+g.length>1&&(d.result=`(?:${d.result})`),t.cache[u]=d,d.result};function n(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let r=function(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}(e,t),o=r.length,i="",s=0;for(let e=0;e<o;e++){let[t,n]=r[e];t===n?i+=t:"0"!==t||"9"!==n?i+=l(t,n):s++}return s&&(i+=!0===n.shorthand?"\\d":"[0-9]"),{pattern:i,count:[s],digits:o}}function r(e,t,r,o){let s,l=function(e,t){let n=1,r=1,o=a(e,n),s=new Set([t]);for(;e<=o&&o<=t;)s.add(o),n+=1,o=a(e,n);for(o=u(t+1,r)-1;e<o&&o<=t;)s.add(o),r+=1,o=u(t+1,r)-1;return s=[...s],s.sort(i),s}(e,t),p=[],d=e;for(let e=0;e<l.length;e++){let t=l[e],i=n(String(d),String(t),o),a="";r.isPadded||!s||s.pattern!==i.pattern?(r.isPadded&&(a=f(t,r,o)),i.string=a+i.pattern+c(i.count),p.push(i),d=t+1,s=i):(s.count.length>1&&s.count.pop(),s.count.push(i.count[0]),s.string=s.pattern+c(s.count),d=t+1)}return p}function o(e,t,n,r,o){let i=[];for(let o of e){let{string:e}=o;r||s(t,"string",e)||i.push(n+e),r&&s(t,"string",e)&&i.push(n+e)}return i}function i(e,t){return e>t?1:t>e?-1:0}function s(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 u(e,t){return e-e%Math.pow(10,t)}function c(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 p(e){return/^-?(0+)\d/.test(e)}function f(e,t,n){if(!t.isPadded)return e;let r=Math.abs(t.maxLen-String(e).length),o=!1!==n.relaxZeros;switch(r){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${r}}`:`0{${r}}`}}return t.cache={},t.clearCache=()=>t.cache={},Zu=t}function dc(){if(Qu)return Yu;Qu=1;const e=f,t=fc(),n=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),r=e=>"number"==typeof e||"string"==typeof e&&""!==e,o=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},s=(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},u=(e,n,r,o)=>{if(r)return t(e,n,{wrap:!1,...o});let i=String.fromCharCode(e);return e===n?i:`[${i}-${String.fromCharCode(n)}]`},c=(e,n,r)=>{if(Array.isArray(e)){let t=!0===r.wrap,n=r.capture?"":"?:";return t?`(${n}${e.join("|")})`:e.join("|")}return t(e,n,r)},l=(...t)=>new RangeError("Invalid range arguments: "+e.inspect(...t)),p=(e,t,n)=>{if(!0===n.strictRanges)throw l([e,t]);return[]},d=(e,t,n=1,r={})=>{let o=Number(e),p=Number(t);if(!Number.isInteger(o)||!Number.isInteger(p)){if(!0===r.strictRanges)throw l([e,t]);return[]}0===o&&(o=0),0===p&&(p=0);let f=o>p,d=String(e),h=String(t),g=String(n);n=Math.max(Math.abs(n),1);let m=i(d)||i(h)||i(g),y=m?Math.max(d.length,h.length,g.length):0,D=!1===m&&!1===((e,t,n)=>"string"==typeof e||"string"==typeof t||!0===n.stringify)(e,t,r),b=r.transform||(e=>t=>!0===e?Number(t):String(t))(D);if(r.toRegex&&1===n)return u(a(e,y),a(t,y),!0,r);let v={negatives:[],positives:[]},w=e=>v[e<0?"negatives":"positives"].push(Math.abs(e)),_=[],E=0;for(;f?o>=p:o<=p;)!0===r.toRegex&&n>1?w(o):_.push(s(b(o,E),y,D)),o=f?o-n:o+n,E++;return!0===r.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 r,o=t.capture?"":"?:",i="",s="";return e.positives.length&&(i=e.positives.map(e=>a(String(e),n)).join("|")),e.negatives.length&&(s=`-(${o}${e.negatives.map(e=>a(String(e),n)).join("|")})`),r=i&&s?`${i}|${s}`:i||s,t.wrap?`(${o}${r})`:r})(v,r,y):c(_,null,{wrap:!1,...r}):_},h=(e,t,i,s={})=>{if(null==t&&r(e))return[e];if(!r(e)||!r(t))return p(e,t,s);if("function"==typeof i)return h(e,t,1,{transform:i});if(n(i))return h(e,t,0,i);let a={...s};return!0===a.capture&&(a.wrap=!0),i=i||a.step||1,o(i)?o(e)&&o(t)?d(e,t,i,a):((e,t,n=1,r={})=>{if(!o(e)&&e.length>1||!o(t)&&t.length>1)return p(e,t,r);let i=r.transform||(e=>String.fromCharCode(e)),s=`${e}`.charCodeAt(0),a=`${t}`.charCodeAt(0),l=s>a,f=Math.min(s,a),d=Math.max(s,a);if(r.toRegex&&1===n)return u(f,d,!1,r);let h=[],g=0;for(;l?s>=a:s<=a;)h.push(i(s,g)),s=l?s-n:s+n,g++;return!0===r.toRegex?c(h,null,{wrap:!1,options:r}):h})(e,t,Math.max(Math.abs(i),1),a):null==i||n(i)?h(e,t,1,i):((e,t)=>{if(!0===t.strictRanges)throw new TypeError(`Expected step "${e}" to be a number`);return[]})(i,a)};return Yu=h}function hc(){if(uc)return ac;uc=1;const e=pc(),t=function(){if(ec)return Xu;ec=1;const e=dc(),t=lc();return Xu=(n,r={})=>{const o=(n,i={})=>{const s=t.isInvalidBrace(i),a=!0===n.invalid&&!0===r.escapeInvalid,u=!0===s||!0===a,c=!0===r.escapeInvalid?"\\":"";let l="";if(!0===n.isOpen)return c+n.value;if(!0===n.isClose)return console.log("node.isClose",c,n.value),c+n.value;if("open"===n.type)return u?c+n.value:"(";if("close"===n.type)return u?c+n.value:")";if("comma"===n.type)return"comma"===n.prev.type?"":u?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){const o=t.reduce(n.nodes),i=e(...o,{...r,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==i.length)return o.length>1&&i.length>1?`(${i})`:i}if(n.nodes)for(const e of n.nodes)l+=o(e,n);return l};return o(n)}}(),n=function(){if(nc)return tc;nc=1;const e=dc(),t=pc(),n=lc(),r=(e="",t="",o=!1)=>{const i=[];if(e=[].concat(e),!(t=[].concat(t)).length)return e;if(!e.length)return o?n.flatten(t).map(e=>`{${e}}`):t;for(const n of e)if(Array.isArray(n))for(const e of n)i.push(r(e,t,o));else for(let e of t)!0===o&&"string"==typeof e&&(e=`{${e}}`),i.push(Array.isArray(e)?r(n,e,o):n+e);return n.flatten(i)};return tc=(o,i={})=>{const s=void 0===i.rangeLimit?1e3:i.rangeLimit,a=(o,u={})=>{o.queue=[];let c=u,l=u.queue;for(;"brace"!==c.type&&"root"!==c.type&&c.parent;)c=c.parent,l=c.queue;if(o.invalid||o.dollar)return void l.push(r(l.pop(),t(o,i)));if("brace"===o.type&&!0!==o.invalid&&2===o.nodes.length)return void l.push(r(l.pop(),["{}"]));if(o.nodes&&o.ranges>0){const a=n.reduce(o.nodes);if(n.exceedsLimit(...a,i.step,s))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let u=e(...a,i);return 0===u.length&&(u=t(o,i)),l.push(r(l.pop(),u)),void(o.nodes=[])}const p=n.encloseBrace(o);let f=o.queue,d=o;for(;"brace"!==d.type&&"root"!==d.type&&d.parent;)d=d.parent,f=d.queue;for(let e=0;e<o.nodes.length;e++){const t=o.nodes[e];"comma"!==t.type||"brace"!==o.type?"close"!==t.type?t.value&&"open"!==t.type?f.push(r(f.pop(),t.value)):t.nodes&&a(t,o):l.push(r(l.pop(),f,p)):(1===e&&f.push(""),f.push(""))}return f};return n.flatten(a(o))},tc}(),r=function(){if(sc)return ic;sc=1;const e=pc(),{MAX_LENGTH:t,CHAR_BACKSLASH:n,CHAR_BACKTICK:r,CHAR_COMMA:o,CHAR_DOT:i,CHAR_LEFT_PARENTHESES:s,CHAR_RIGHT_PARENTHESES:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_RIGHT_CURLY_BRACE:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:f,CHAR_SINGLE_QUOTE:d,CHAR_NO_BREAK_SPACE:h,CHAR_ZERO_WIDTH_NOBREAK_SPACE:g}=oc?rc:(oc=1,rc={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 ic=(m,y={})=>{if("string"!=typeof m)throw new TypeError("Expected a string");const D=y||{},b="number"==typeof D.maxLength?Math.min(t,D.maxLength):t;if(m.length>b)throw new SyntaxError(`Input length (${m.length}), exceeds max characters (${b})`);const v={type:"root",input:m,nodes:[]},w=[v];let _=v,E=v,A=0;const S=m.length;let C,k=0,P=0;const R=()=>m[k++],x=e=>{if("text"===e.type&&"dot"===E.type&&(E.type="text"),!E||"text"!==E.type||"text"!==e.type)return _.nodes.push(e),e.parent=_,e.prev=E,E=e,e;E.value+=e.value};for(x({type:"bos"});k<S;)if(_=w[w.length-1],C=R(),C!==g&&C!==h)if(C!==n)if(C!==p){if(C===l){let e;for(A++;k<S&&(e=R());)if(C+=e,e!==l)if(e!==n){if(e===p&&(A--,0===A))break}else C+=R();else A++;x({type:"text",value:C});continue}if(C!==s)if(C!==a){if(C===f||C===d||C===r){const e=C;let t;for(!0!==y.keepQuotes&&(C="");k<S&&(t=R());)if(t!==n){if(t===e){!0===y.keepQuotes&&(C+=t);break}C+=t}else C+=t+R();x({type:"text",value:C});continue}if(C===u){P++;const e=E.value&&"$"===E.value.slice(-1)||!0===_.dollar;_=x({type:"brace",open:!0,close:!1,dollar:e,depth:P,commas:0,ranges:0,nodes:[]}),w.push(_),x({type:"open",value:C});continue}if(C===c){if("brace"!==_.type){x({type:"text",value:C});continue}const e="close";_=w.pop(),_.close=!0,x({type:e,value:C}),P--,_=w[w.length-1];continue}if(C===o&&P>0){if(_.ranges>0){_.ranges=0;const t=_.nodes.shift();_.nodes=[t,{type:"text",value:e(_)}]}x({type:"comma",value:C}),_.commas++}else{if(C===i&&P>0&&0===_.commas){const e=_.nodes;if(0===P||0===e.length){x({type:"text",value:C});continue}if("dot"===E.type){if(_.range=[],E.value+=C,E.type="range",3!==_.nodes.length&&5!==_.nodes.length){_.invalid=!0,_.ranges=0,E.type="text";continue}_.ranges++,_.args=[];continue}if("range"===E.type){e.pop();const t=e[e.length-1];t.value+=E.value+C,E=t,_.ranges--;continue}x({type:"dot",value:C});continue}x({type:"text",value:C})}}else{if("paren"!==_.type){x({type:"text",value:C});continue}_=w.pop(),x({type:"text",value:C}),_=w[w.length-1]}else _=x({type:"paren",nodes:[]}),w.push(_),x({type:"text",value:C})}else x({type:"text",value:"\\"+C});else x({type:"text",value:(y.keepEscaping?C:"")+R()});do{if(_=w.pop(),"root"!==_.type){_.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(_);e.nodes.splice(t,1,..._.nodes)}}while(w.length>0);return x({type:"eos"}),v},ic}(),o=(e,t={})=>{let n=[];if(Array.isArray(e))for(const r of e){const e=o.create(r,t);Array.isArray(e)?n.push(...e):n.push(e)}else n=[].concat(o.create(e,t));return t&&!0===t.expand&&!0===t.nodupes&&(n=[...new Set(n)]),n};return o.parse=(e,t={})=>r(e,t),o.stringify=(t,n={})=>e("string"==typeof t?o.parse(t,n):t,n),o.compile=(e,n={})=>("string"==typeof e&&(e=o.parse(e,n)),t(e,n)),o.expand=(e,t={})=>{"string"==typeof e&&(e=o.parse(e,t));let r=n(e,t);return!0===t.noempty&&(r=r.filter(Boolean)),!0===t.nodupes&&(r=[...new Set(r)]),r},o.create=(e,t={})=>""===e||e.length<3?[e]:!0!==t.expand?o.compile(e,t):o.expand(e,t),ac=o}var gc,mc,yc,Dc,bc,vc,wc,_c,Ec,Ac,Sc,Cc,kc,Pc,Rc={};function xc(){if(mc)return gc;mc=1;const e=p,t="\\\\/",n=`[^${t}]`,r="\\.",o="\\/",i="[^/]",s=`(?:${o}|$)`,a=`(?:^|${o})`,u=`${r}{1,2}${s}`,c={DOT_LITERAL:r,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:o,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:s,DOTS_SLASH:u,NO_DOT:`(?!${r})`,NO_DOTS:`(?!${a}${u})`,NO_DOT_SLASH:`(?!${r}{0,1}${s})`,NO_DOTS_SLASH:`(?!${u})`,QMARK_NO_DOT:`[^.${o}]`,STAR:`${i}*?`,START_ANCHOR:a},l={...c,SLASH_LITERAL:`[${t}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${r}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[${t}])${r}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`};return gc={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:c}}function Oc(){return yc||(yc=1,function(e){const t=p,n="win32"===process.platform,{REGEX_BACKSLASH:r,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:s}=xc();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(s,"\\$1"),e.toPosixSlashes=e=>e.replace(r,"/"),e.removeBackslashes=e=>e.replace(o,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,r)=>{const o=t.lastIndexOf(n,r);return-1===o?t:"\\"===t[o-1]?e.escapeLast(t,n,o-1):`${t.slice(0,o)}\\${t.slice(o)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(r=`(?:^(?!${r}).*$)`),r}}(Rc)),Rc}function Fc(){return Sc?Ac:(Sc=1,Ac=function(){if(Ec)return _c;Ec=1;const e=p,t=function(){if(bc)return Dc;bc=1;const e=Oc(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:o,CHAR_DOT:i,CHAR_EXCLAMATION_MARK:s,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:l,CHAR_PLUS:p,CHAR_QUESTION_MARK:f,CHAR_RIGHT_CURLY_BRACE:d,CHAR_RIGHT_PARENTHESES:h,CHAR_RIGHT_SQUARE_BRACKET:g}=xc(),m=e=>e===a||e===r,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return Dc=(D,b)=>{const v=b||{},w=D.length-1,_=!0===v.parts||!0===v.scanToEnd,E=[],A=[],S=[];let C,k,P=D,R=-1,x=0,O=0,F=!1,T=!1,$=!1,L=!1,N=!1,M=!1,B=!1,I=!1,j=!1,H=!1,z=0,U={value:"",depth:0,isGlob:!1};const q=()=>R>=w,K=()=>P.charCodeAt(R+1),G=()=>(C=k,P.charCodeAt(++R));for(;R<w;){let e;if(k=G(),k!==r){if(!0===M||k===u){for(z++;!0!==q()&&(k=G());)if(k!==r)if(k!==u){if(!0!==M&&k===i&&(k=G())===i){if(F=U.isBrace=!0,$=U.isGlob=!0,H=!0,!0===_)continue;break}if(!0!==M&&k===o){if(F=U.isBrace=!0,$=U.isGlob=!0,H=!0,!0===_)continue;break}if(k===d&&(z--,0===z)){M=!1,F=U.isBrace=!0,H=!0;break}}else z++;else B=U.backslashes=!0,G();if(!0===_)continue;break}if(k!==a){if(!0!==v.noext&&1==(k===p||k===n||k===t||k===f||k===s)&&K()===c){if($=U.isGlob=!0,L=U.isExtglob=!0,H=!0,k===s&&R===x&&(j=!0),!0===_){for(;!0!==q()&&(k=G());)if(k!==r){if(k===h){$=U.isGlob=!0,H=!0;break}}else B=U.backslashes=!0,k=G();continue}break}if(k===t){if(C===t&&(N=U.isGlobstar=!0),$=U.isGlob=!0,H=!0,!0===_)continue;break}if(k===f){if($=U.isGlob=!0,H=!0,!0===_)continue;break}if(k===l){for(;!0!==q()&&(e=G());)if(e!==r){if(e===g){T=U.isBracket=!0,$=U.isGlob=!0,H=!0;break}}else B=U.backslashes=!0,G();if(!0===_)continue;break}if(!0===v.nonegate||k!==s||R!==x){if(!0!==v.noparen&&k===c){if($=U.isGlob=!0,!0===_){for(;!0!==q()&&(k=G());)if(k!==c){if(k===h){H=!0;break}}else B=U.backslashes=!0,k=G();continue}break}if(!0===$){if(H=!0,!0===_)continue;break}}else I=U.negated=!0,x++}else{if(E.push(R),A.push(U),U={value:"",depth:0,isGlob:!1},!0===H)continue;if(C===i&&R===x+1){x+=2;continue}O=R+1}}else B=U.backslashes=!0,k=G(),k===u&&(M=!0)}!0===v.noext&&(L=!1,$=!1);let W=P,V="",Z="";x>0&&(V=P.slice(0,x),P=P.slice(x),O-=x),W&&!0===$&&O>0?(W=P.slice(0,O),Z=P.slice(O)):!0===$?(W="",Z=P):W=P,W&&""!==W&&"/"!==W&&W!==P&&m(W.charCodeAt(W.length-1))&&(W=W.slice(0,-1)),!0===v.unescape&&(Z&&(Z=e.removeBackslashes(Z)),W&&!0===B&&(W=e.removeBackslashes(W)));const J={prefix:V,input:D,start:x,base:W,glob:Z,isBrace:F,isBracket:T,isGlob:$,isExtglob:L,isGlobstar:N,negated:I,negatedExtglob:j};if(!0===v.tokens&&(J.maxDepth=0,m(k)||A.push(U),J.tokens=A),!0===v.parts||!0===v.tokens){let e;for(let t=0;t<E.length;t++){const n=e?e+1:x,r=E[t],o=D.slice(n,r);v.tokens&&(0===t&&0!==x?(A[t].isPrefix=!0,A[t].value=V):A[t].value=o,y(A[t]),J.maxDepth+=A[t].depth),0===t&&""===o||S.push(o),e=r}if(e&&e+1<D.length){const t=D.slice(e+1);S.push(t),v.tokens&&(A[A.length-1].value=t,y(A[A.length-1]),J.maxDepth+=A[A.length-1].depth)}J.slashes=E,J.parts=S}return J},Dc}(),n=function(){if(wc)return vc;wc=1;const e=xc(),t=Oc(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:i,REPLACEMENTS:s}=e,a=(e,n)=>{if("function"==typeof n.expandRange)return n.expandRange(...e,n);e.sort();const r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(e=>t.escapeRegex(e)).join("..")}return r},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,c=(l,p)=>{if("string"!=typeof l)throw new TypeError("Expected a string");l=s[l]||l;const f={...p},d="number"==typeof f.maxLength?Math.min(n,f.maxLength):n;let h=l.length;if(h>d)throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${d}`);const g={type:"bos",value:"",output:f.prepend||""},m=[g],y=f.capture?"":"?:",D=t.isWindows(p),b=e.globChars(D),v=e.extglobChars(b),{DOT_LITERAL:w,PLUS_LITERAL:_,SLASH_LITERAL:E,ONE_CHAR:A,DOTS_SLASH:S,NO_DOT:C,NO_DOT_SLASH:k,NO_DOTS_SLASH:P,QMARK:R,QMARK_NO_DOT:x,STAR:O,START_ANCHOR:F}=b,T=e=>`(${y}(?:(?!${F}${e.dot?S:w}).)*?)`,$=f.dot?"":C,L=f.dot?R:x;let N=!0===f.bash?T(f):O;f.capture&&(N=`(${N})`),"boolean"==typeof f.noext&&(f.noextglob=f.noext);const M={input:l,index:-1,start:0,dot:!0===f.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:m};l=t.removePrefix(l,M),h=l.length;const B=[],I=[],j=[];let H,z=g;const U=()=>M.index===h-1,q=M.peek=(e=1)=>l[M.index+e],K=M.advance=()=>l[++M.index]||"",G=()=>l.slice(M.index+1),W=(e="",t=0)=>{M.consumed+=e,M.index+=t},V=e=>{M.output+=null!=e.output?e.output:e.value,W(e.value)},Z=()=>{let e=1;for(;"!"===q()&&("("!==q(2)||"?"===q(3));)K(),M.start++,e++;return e%2!=0&&(M.negated=!0,M.start++,!0)},J=e=>{M[e]++,j.push(e)},Y=e=>{M[e]--,j.pop()},Q=e=>{if("globstar"===z.type){const t=M.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||B.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(M.output=M.output.slice(0,-z.output.length),z.type="star",z.value="*",z.output=N,M.output+=z.output)}if(B.length&&"paren"!==e.type&&(B[B.length-1].inner+=e.value),(e.value||e.output)&&V(e),z&&"text"===z.type&&"text"===e.type)return z.value+=e.value,void(z.output=(z.output||"")+e.value);e.prev=z,m.push(e),z=e},X=(e,t)=>{const n={...v[t],conditions:1,inner:""};n.prev=z,n.parens=M.parens,n.output=M.output;const r=(f.capture?"(":"")+n.open;J("parens"),Q({type:e,value:t,output:M.output?"":A}),Q({type:"paren",extglob:!0,value:K(),output:r}),B.push(n)},ee=e=>{let t,n=e.close+(f.capture?")":"");if("negate"===e.type){let r=N;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=T(f)),(r!==N||U()||/^\)+$/.test(G()))&&(n=e.close=`)$))${r}`),e.inner.includes("*")&&(t=G())&&/^\.[^\\/.]+$/.test(t)){const o=c(t,{...p,fastpaths:!1}).output;n=e.close=`)${o})${r})`}"bos"===e.prev.type&&(M.negatedExtglob=!0)}Q({type:"paren",extglob:!0,value:H,output:n}),Y("parens")};if(!1!==f.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(l)){let e=!1,n=l.replace(i,(t,n,r,o,i,s)=>"\\"===o?(e=!0,t):"?"===o?n?n+o+(i?R.repeat(i.length):""):0===s?L+(i?R.repeat(i.length):""):R.repeat(r.length):"."===o?w.repeat(r.length):"*"===o?n?n+o+(i?N:""):N:n?t:`\\${t}`);return!0===e&&(n=!0===f.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===l&&!0===f.contains?(M.output=l,M):(M.output=t.wrapOutput(n,M,p),M)}for(;!U();){if(H=K(),"\0"===H)continue;if("\\"===H){const e=q();if("/"===e&&!0!==f.bash)continue;if("."===e||";"===e)continue;if(!e){H+="\\",Q({type:"text",value:H});continue}const t=/^\\+/.exec(G());let n=0;if(t&&t[0].length>2&&(n=t[0].length,M.index+=n,n%2!=0&&(H+="\\")),!0===f.unescape?H=K():H+=K(),0===M.brackets){Q({type:"text",value:H});continue}}if(M.brackets>0&&("]"!==H||"["===z.value||"[^"===z.value)){if(!1!==f.posix&&":"===H){const e=z.value.slice(1);if(e.includes("[")&&(z.posix=!0,e.includes(":"))){const e=z.value.lastIndexOf("["),t=z.value.slice(0,e),n=z.value.slice(e+2),o=r[n];if(o){z.value=t+o,M.backtrack=!0,K(),g.output||1!==m.indexOf(z)||(g.output=A);continue}}}("["===H&&":"!==q()||"-"===H&&"]"===q())&&(H=`\\${H}`),"]"!==H||"["!==z.value&&"[^"!==z.value||(H=`\\${H}`),!0===f.posix&&"!"===H&&"["===z.value&&(H="^"),z.value+=H,V({value:H});continue}if(1===M.quotes&&'"'!==H){H=t.escapeRegex(H),z.value+=H,V({value:H});continue}if('"'===H){M.quotes=1===M.quotes?0:1,!0===f.keepQuotes&&Q({type:"text",value:H});continue}if("("===H){J("parens"),Q({type:"paren",value:H});continue}if(")"===H){if(0===M.parens&&!0===f.strictBrackets)throw new SyntaxError(u("opening","("));const e=B[B.length-1];if(e&&M.parens===e.parens+1){ee(B.pop());continue}Q({type:"paren",value:H,output:M.parens?")":"\\)"}),Y("parens");continue}if("["===H){if(!0!==f.nobracket&&G().includes("]"))J("brackets");else{if(!0!==f.nobracket&&!0===f.strictBrackets)throw new SyntaxError(u("closing","]"));H=`\\${H}`}Q({type:"bracket",value:H});continue}if("]"===H){if(!0===f.nobracket||z&&"bracket"===z.type&&1===z.value.length){Q({type:"text",value:H,output:`\\${H}`});continue}if(0===M.brackets){if(!0===f.strictBrackets)throw new SyntaxError(u("opening","["));Q({type:"text",value:H,output:`\\${H}`});continue}Y("brackets");const e=z.value.slice(1);if(!0===z.posix||"^"!==e[0]||e.includes("/")||(H=`/${H}`),z.value+=H,V({value:H}),!1===f.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(z.value);if(M.output=M.output.slice(0,-z.value.length),!0===f.literalBrackets){M.output+=n,z.value=n;continue}z.value=`(${y}${n}|${z.value})`,M.output+=z.value;continue}if("{"===H&&!0!==f.nobrace){J("braces");const e={type:"brace",value:H,output:"(",outputIndex:M.output.length,tokensIndex:M.tokens.length};I.push(e),Q(e);continue}if("}"===H){const e=I[I.length-1];if(!0===f.nobrace||!e){Q({type:"text",value:H,output:H});continue}let t=")";if(!0===e.dots){const e=m.slice(),n=[];for(let t=e.length-1;t>=0&&(m.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,f),M.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=M.output.slice(0,e.outputIndex),r=M.tokens.slice(e.tokensIndex);e.value=e.output="\\{",H=t="\\}",M.output=n;for(const e of r)M.output+=e.output||e.value}Q({type:"brace",value:H,output:t}),Y("braces"),I.pop();continue}if("|"===H){B.length>0&&B[B.length-1].conditions++,Q({type:"text",value:H});continue}if(","===H){let e=H;const t=I[I.length-1];t&&"braces"===j[j.length-1]&&(t.comma=!0,e="|"),Q({type:"comma",value:H,output:e});continue}if("/"===H){if("dot"===z.type&&M.index===M.start+1){M.start=M.index+1,M.consumed="",M.output="",m.pop(),z=g;continue}Q({type:"slash",value:H,output:E});continue}if("."===H){if(M.braces>0&&"dot"===z.type){"."===z.value&&(z.output=w);const e=I[I.length-1];z.type="dots",z.output+=H,z.value+=H,e.dots=!0;continue}if(M.braces+M.parens===0&&"bos"!==z.type&&"slash"!==z.type){Q({type:"text",value:H,output:w});continue}Q({type:"dot",value:H,output:w});continue}if("?"===H){if((!z||"("!==z.value)&&!0!==f.noextglob&&"("===q()&&"?"!==q(2)){X("qmark",H);continue}if(z&&"paren"===z.type){const e=q();let n=H;if("<"===e&&!t.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===z.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(G()))&&(n=`\\${H}`),Q({type:"text",value:H,output:n});continue}if(!0!==f.dot&&("slash"===z.type||"bos"===z.type)){Q({type:"qmark",value:H,output:x});continue}Q({type:"qmark",value:H,output:R});continue}if("!"===H){if(!0!==f.noextglob&&"("===q()&&("?"!==q(2)||!/[!=<:]/.test(q(3)))){X("negate",H);continue}if(!0!==f.nonegate&&0===M.index){Z();continue}}if("+"===H){if(!0!==f.noextglob&&"("===q()&&"?"!==q(2)){X("plus",H);continue}if(z&&"("===z.value||!1===f.regex){Q({type:"plus",value:H,output:_});continue}if(z&&("bracket"===z.type||"paren"===z.type||"brace"===z.type)||M.parens>0){Q({type:"plus",value:H});continue}Q({type:"plus",value:_});continue}if("@"===H){if(!0!==f.noextglob&&"("===q()&&"?"!==q(2)){Q({type:"at",extglob:!0,value:H,output:""});continue}Q({type:"text",value:H});continue}if("*"!==H){"$"!==H&&"^"!==H||(H=`\\${H}`);const e=o.exec(G());e&&(H+=e[0],M.index+=e[0].length),Q({type:"text",value:H});continue}if(z&&("globstar"===z.type||!0===z.star)){z.type="star",z.star=!0,z.value+=H,z.output=N,M.backtrack=!0,M.globstar=!0,W(H);continue}let e=G();if(!0!==f.noextglob&&/^\([^?]/.test(e)){X("star",H);continue}if("star"===z.type){if(!0===f.noglobstar){W(H);continue}const t=z.prev,n=t.prev,r="slash"===t.type||"bos"===t.type,o=n&&("star"===n.type||"globstar"===n.type);if(!0===f.bash&&(!r||e[0]&&"/"!==e[0])){Q({type:"star",value:H,output:""});continue}const i=M.braces>0&&("comma"===t.type||"brace"===t.type),s=B.length&&("pipe"===t.type||"paren"===t.type);if(!r&&"paren"!==t.type&&!i&&!s){Q({type:"star",value:H,output:""});continue}for(;"/**"===e.slice(0,3);){const t=l[M.index+4];if(t&&"/"!==t)break;e=e.slice(3),W("/**",3)}if("bos"===t.type&&U()){z.type="globstar",z.value+=H,z.output=T(f),M.output=z.output,M.globstar=!0,W(H);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!o&&U()){M.output=M.output.slice(0,-(t.output+z.output).length),t.output=`(?:${t.output}`,z.type="globstar",z.output=T(f)+(f.strictSlashes?")":"|$)"),z.value+=H,M.globstar=!0,M.output+=t.output+z.output,W(H);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+z.output).length),t.output=`(?:${t.output}`,z.type="globstar",z.output=`${T(f)}${E}|${E}${n})`,z.value+=H,M.output+=t.output+z.output,M.globstar=!0,W(H+K()),Q({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){z.type="globstar",z.value+=H,z.output=`(?:^|${E}|${T(f)}${E})`,M.output=z.output,M.globstar=!0,W(H+K()),Q({type:"slash",value:"/",output:""});continue}M.output=M.output.slice(0,-z.output.length),z.type="globstar",z.output=T(f),z.value+=H,M.output+=z.output,M.globstar=!0,W(H);continue}const n={type:"star",value:H,output:N};!0!==f.bash?!z||"bracket"!==z.type&&"paren"!==z.type||!0!==f.regex?(M.index!==M.start&&"slash"!==z.type&&"dot"!==z.type||("dot"===z.type?(M.output+=k,z.output+=k):!0===f.dot?(M.output+=P,z.output+=P):(M.output+=$,z.output+=$),"*"!==q()&&(M.output+=A,z.output+=A)),Q(n)):(n.output=H,Q(n)):(n.output=".*?","bos"!==z.type&&"slash"!==z.type||(n.output=$+n.output),Q(n))}for(;M.brackets>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing","]"));M.output=t.escapeLast(M.output,"["),Y("brackets")}for(;M.parens>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing",")"));M.output=t.escapeLast(M.output,"("),Y("parens")}for(;M.braces>0;){if(!0===f.strictBrackets)throw new SyntaxError(u("closing","}"));M.output=t.escapeLast(M.output,"{"),Y("braces")}if(!0===f.strictSlashes||"star"!==z.type&&"bracket"!==z.type||Q({type:"maybe_slash",value:"",output:`${E}?`}),!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 c.fastpaths=(r,o)=>{const i={...o},a="number"==typeof i.maxLength?Math.min(n,i.maxLength):n,u=r.length;if(u>a)throw new SyntaxError(`Input length: ${u}, exceeds maximum allowed length: ${a}`);r=s[r]||r;const c=t.isWindows(o),{DOT_LITERAL:l,SLASH_LITERAL:p,ONE_CHAR:f,DOTS_SLASH:d,NO_DOT:h,NO_DOTS:g,NO_DOTS_SLASH:m,STAR:y,START_ANCHOR:D}=e.globChars(c),b=i.dot?g:h,v=i.dot?m:h,w=i.capture?"":"?:";let _=!0===i.bash?".*?":y;i.capture&&(_=`(${_})`);const E=e=>!0===e.noglobstar?_:`(${w}(?:(?!${D}${e.dot?d:l}).)*?)`,A=e=>{switch(e){case"*":return`${b}${f}${_}`;case".*":return`${l}${f}${_}`;case"*.*":return`${b}${_}${l}${f}${_}`;case"*/*":return`${b}${_}${p}${f}${v}${_}`;case"**":return b+E(i);case"**/*":return`(?:${b}${E(i)}${p})?${v}${f}${_}`;case"**/*.*":return`(?:${b}${E(i)}${p})?${v}${_}${l}${f}${_}`;case"**/.*":return`(?:${b}${E(i)}${p})?${l}${f}${_}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=A(t[1]);if(!n)return;return n+l+t[2]}}},S=t.removePrefix(r,{negated:!1,prefix:""});let C=A(S);return C&&!0!==i.strictSlashes&&(C+=`${p}?`),C},vc=c}(),r=Oc(),o=xc(),i=(e,t,n=!1)=>{if(Array.isArray(e)){const r=e.map(e=>i(e,t,n)),o=e=>{for(const t of r){const n=t(e);if(n)return n}return!1};return o}const o=(s=e)&&"object"==typeof s&&!Array.isArray(s)&&e.tokens&&e.input;var s;if(""===e||"string"!=typeof e&&!o)throw new TypeError("Expected pattern to be a non-empty string");const a=t||{},u=r.isWindows(t),c=o?i.compileRe(e,t):i.makeRe(e,t,!1,!0),l=c.state;delete c.state;let p=()=>!1;if(a.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};p=i(a.ignore,e,n)}const f=(n,r=!1)=>{const{isMatch:o,match:s,output:f}=i.test(n,c,t,{glob:e,posix:u}),d={glob:e,state:l,regex:c,posix:u,input:n,output:f,match:s,isMatch:o};return"function"==typeof a.onResult&&a.onResult(d),!1===o?(d.isMatch=!1,!!r&&d):p(n)?("function"==typeof a.onIgnore&&a.onIgnore(d),d.isMatch=!1,!!r&&d):("function"==typeof a.onMatch&&a.onMatch(d),!r||d)};return n&&(f.state=l),f};return i.test=(e,t,n,{glob:o,posix:s}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=n||{},u=a.format||(s?r.toPosixSlashes:null);let c=e===o,l=c&&u?u(e):e;return!1===c&&(l=u?u(e):e,c=l===o),!1!==c&&!0!==a.capture||(c=!0===a.matchBase||!0===a.basename?i.matchBase(e,t,n,s):t.exec(l)),{isMatch:Boolean(c),match:c,output:l}},i.matchBase=(t,n,o,s=r.isWindows(o))=>(n instanceof RegExp?n:i.makeRe(n,o)).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,r=!1)=>{if(!0===n)return e.output;const o=t||{},s=o.contains?"":"^",a=o.contains?"":"$";let u=`${s}(?:${e.output})${a}`;e&&!0===e.negated&&(u=`^(?!${u}).*$`);const c=i.toRegex(u,t);return!0===r&&(c.state=e),c},i.makeRe=(e,t={},r=!1,o=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return!1===t.fastpaths||"."!==e[0]&&"*"!==e[0]||(s.output=n.fastpaths(e,t)),s.output||(s=n(e,t)),i.compileRe(s,t,r,o)},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=o,_c=i}())}var Tc,$c,Lc,Nc={};function Mc(){if($c)return Tc;$c=1;const e=d.PassThrough,t=Array.prototype.slice;function n(t,r){if(Array.isArray(t))for(let e=0,o=t.length;e<o;e++)t[e]=n(t[e],r);else{if(!t._readableState&&t.pipe&&(t=t.pipe(e(r))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}return Tc=function(){const r=[],o=t.call(arguments);let i=!1,s=o[o.length-1];s&&!Array.isArray(s)&&null==s.pipe?o.pop():s={};const a=!1!==s.end,u=!0===s.pipeError;null==s.objectMode&&(s.objectMode=!0),null==s.highWaterMark&&(s.highWaterMark=65536);const c=e(s);function l(){for(let e=0,t=arguments.length;e<t;e++)r.push(n(arguments[e],s));return p(),this}function p(){if(i)return;i=!0;let e=r.shift();if(!e)return void process.nextTick(f);Array.isArray(e)||(e=[e]);let t=e.length+1;function n(){--t>0||(i=!1,p())}function o(e){function t(){e.removeListener("merge2UnpipeEnd",t),e.removeListener("end",t),u&&e.removeListener("error",r),n()}function r(e){c.emit("error",e)}if(e._readableState.endEmitted)return n();e.on("merge2UnpipeEnd",t),e.on("end",t),u&&e.on("error",r),e.pipe(c,{end:!1}),e.resume()}for(let t=0;t<e.length;t++)o(e[t]);n()}function f(){i=!1,c.emit("queueDrain"),a&&c.end()}return c.setMaxListeners(0),c.add=l,c.on("unpipe",function(e){e.emit("merge2UnpipeEnd")}),o.length&&l.apply(null,o),c},Tc}var Bc,Ic,jc,Hc={};function zc(){if(Ic)return Pu;Ic=1,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.string=Pu.stream=Pu.pattern=Pu.path=Pu.fs=Pu.errno=Pu.array=void 0;const e=(Cu||(Cu=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.splitWhen=Ru.flatten=void 0,Ru.flatten=function(e){return e.reduce((e,t)=>[].concat(e,t),[])},Ru.splitWhen=function(e,t){const n=[[]];let r=0;for(const o of e)t(o)?(r++,n[r]=[]):n[r].push(o);return n}),Ru);Pu.array=e;const t=(xu||(xu=1,Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.isEnoentCodeError=void 0,Ou.isEnoentCodeError=function(e){return"ENOENT"===e.code}),Ou);Pu.errno=t;const n=function(){if(Fu)return $u;Fu=1,Object.defineProperty($u,"__esModule",{value:!0}),$u.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 $u.createDirentFromStats=function(t,n){return new e(t,n)},$u}();Pu.fs=n;const r=function(){if(Tu)return Lu;Tu=1,Object.defineProperty(Lu,"__esModule",{value:!0}),Lu.convertPosixPathToPattern=Lu.convertWindowsPathToPattern=Lu.convertPathToPattern=Lu.escapePosixPath=Lu.escapeWindowsPath=Lu.escape=Lu.removeLeadingDotSegment=Lu.makeAbsolute=Lu.unixify=void 0;const e=p,t="win32"===l.platform(),n=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,r=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,o=/^\\\\([.?])/,i=/\\(?![!()+@[\]{}])/g;function s(e){return e.replace(r,"\\$2")}function a(e){return e.replace(n,"\\$2")}function u(e){return s(e).replace(o,"//$1").replace(i,"/")}function c(e){return a(e)}return Lu.unixify=function(e){return e.replace(/\\/g,"/")},Lu.makeAbsolute=function(t,n){return e.resolve(t,n)},Lu.removeLeadingDotSegment=function(e){if("."===e.charAt(0)){const t=e.charAt(1);if("/"===t||"\\"===t)return e.slice(2)}return e},Lu.escape=t?s:a,Lu.escapeWindowsPath=s,Lu.escapePosixPath=a,Lu.convertPathToPattern=t?u:c,Lu.convertWindowsPathToPattern=u,Lu.convertPosixPathToPattern=c,Lu}();Pu.path=r;const o=function(){if(Pc)return zu;Pc=1,Object.defineProperty(zu,"__esModule",{value:!0}),zu.isAbsolute=zu.partitionAbsoluteAndRelative=zu.removeDuplicateSlashes=zu.matchAny=zu.convertPatternsToRe=zu.makeRe=zu.getPatternParts=zu.expandBraceExpansion=zu.expandPatternsWithBraceExpansion=zu.isAffectDepthOfReadingPattern=zu.endsWithSlashGlobStar=zu.hasGlobStar=zu.getBaseDirectory=zu.isPatternRelatedToParentDirectory=zu.getPatternsOutsideCurrentDirectory=zu.getPatternsInsideCurrentDirectory=zu.getPositivePatterns=zu.getNegativePatterns=zu.isPositivePattern=zu.isNegativePattern=zu.convertToNegativePattern=zu.convertToPositivePattern=zu.isDynamicPattern=zu.isStaticPattern=void 0;const e=p,t=function(){if(Hu)return ju;Hu=1;var e=Uu(),t=p.posix.dirname,n="win32"===l.platform(),r=/\\/g,o=/[\{\[].*[\}\]]$/,i=/(^|[^\\])([\{\[]|\([^\)]+$)/,s=/\\([\!\*\?\|\[\]\(\)\{\}])/g;return ju=function(a,u){Object.assign({flipBackslashes:!0},u).flipBackslashes&&n&&a.indexOf("/")<0&&(a=a.replace(r,"/")),o.test(a)&&(a+="/"),a+="a";do{a=t(a)}while(e(a)||i.test(a));return a.replace(s,"$1")}}(),n=function(){if(kc)return Cc;kc=1;const e=f,t=hc(),n=Fc(),r=Oc(),o=e=>""===e||"./"===e,i=e=>{const t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},s=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let o=new Set,i=new Set,s=new Set,a=0,u=e=>{s.add(e.output),r&&r.onResult&&r.onResult(e)};for(let s=0;s<t.length;s++){let c=n(String(t[s]),{...r,onResult:u},!0),l=c.state.negated||c.state.negatedExtglob;l&&a++;for(let t of e){let e=c(t,!0);(l?!e.isMatch:e.isMatch)&&(l?o.add(e.output):(o.delete(e.output),i.add(e.output)))}}let c=(a===t.length?[...s]:[...i]).filter(e=>!o.has(e));if(r&&0===c.length){if(!0===r.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===r.nonull||!0===r.nullglob)return r.unescape?t.map(e=>e.replace(/\\/g,"")):t}return c};return s.match=s,s.matcher=(e,t)=>n(e,t),s.any=s.isMatch=(e,t,r)=>n(t,r)(e),s.not=(e,t,n={})=>{t=[].concat(t).map(String);let r=new Set,o=[],i=new Set(s(e,t,{...n,onResult:e=>{n.onResult&&n.onResult(e),o.push(e.output)}}));for(let e of o)i.has(e)||r.add(e);return[...r]},s.contains=(t,n,r)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);if(Array.isArray(n))return n.some(e=>s.contains(t,e,r));if("string"==typeof n){if(o(t)||o(n))return!1;if(t.includes(n)||t.startsWith("./")&&t.slice(2).includes(n))return!0}return s.isMatch(t,n,{...r,contains:!0})},s.matchKeys=(e,t,n)=>{if(!r.isObject(e))throw new TypeError("Expected the first argument to be an object");let o=s(Object.keys(e),t,n),i={};for(let t of o)i[t]=e[t];return i},s.some=(e,t,r)=>{let o=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),r);if(o.some(e=>t(e)))return!0}return!1},s.every=(e,t,r)=>{let o=[].concat(e);for(let e of[].concat(t)){let t=n(String(e),r);if(!o.every(e=>t(e)))return!1}return!0},s.all=(t,r,o)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${e.inspect(t)}"`);return[].concat(r).every(e=>n(e,o)(t))},s.capture=(e,t,o)=>{let i=r.isWindows(o),s=n.makeRe(String(e),{...o,capture:!0}).exec(i?r.toPosixSlashes(t):t);if(s)return s.slice(1).map(e=>void 0===e?"":e)},s.makeRe=(...e)=>n.makeRe(...e),s.scan=(...e)=>n.scan(...e),s.parse=(e,r)=>{let o=[];for(let i of[].concat(e||[]))for(let e of t(String(i),r))o.push(n.parse(e,r));return o},s.braces=(e,n)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return n&&!0===n.nobrace||!i(e)?[e]:t(e,n)},s.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return s.braces(e,{...t,expand:!0})},s.hasBraces=i,Cc=s}(),r=/[*?]|^!/,o=/\[[^[]*]/,i=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,s=/[!*+?@]\([^(]*\)/,a=/,|\.\./,u=/(?!^)\/{2,}/g;function c(e,t={}){return!d(e,t)}function d(e,t={}){return!(""===e||!(!1===t.caseSensitiveMatch||e.includes("\\")||r.test(e)||o.test(e)||i.test(e)||!1!==t.extglob&&s.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 r=e.slice(t,n);return a.test(r)}(e)))}function h(e){return e.startsWith("!")&&"("!==e[1]}function g(e){return!h(e)}function m(e){return e.startsWith("..")||e.startsWith("./..")}function y(e){return e.endsWith("/**")}function D(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 b(e,t){return n.makeRe(e,t)}function v(t){return e.isAbsolute(t)}return zu.isStaticPattern=c,zu.isDynamicPattern=d,zu.convertToPositivePattern=function(e){return h(e)?e.slice(1):e},zu.convertToNegativePattern=function(e){return"!"+e},zu.isNegativePattern=h,zu.isPositivePattern=g,zu.getNegativePatterns=function(e){return e.filter(h)},zu.getPositivePatterns=function(e){return e.filter(g)},zu.getPatternsInsideCurrentDirectory=function(e){return e.filter(e=>!m(e))},zu.getPatternsOutsideCurrentDirectory=function(e){return e.filter(m)},zu.isPatternRelatedToParentDirectory=m,zu.getBaseDirectory=function(e){return t(e,{flipBackslashes:!1})},zu.hasGlobStar=function(e){return e.includes("**")},zu.endsWithSlashGlobStar=y,zu.isAffectDepthOfReadingPattern=function(t){const n=e.basename(t);return y(t)||c(n)},zu.expandPatternsWithBraceExpansion=function(e){return e.reduce((e,t)=>e.concat(D(t)),[])},zu.expandBraceExpansion=D,zu.getPatternParts=function(e,t){let{parts:r}=n.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return 0===r.length&&(r=[e]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r},zu.makeRe=b,zu.convertPatternsToRe=function(e,t){return e.map(e=>b(e,t))},zu.matchAny=function(e,t){return t.some(t=>t.test(e))},zu.removeDuplicateSlashes=function(e){return e.replace(u,"/")},zu.partitionAbsoluteAndRelative=function(e){const t=[],n=[];for(const r of e)v(r)?t.push(r):n.push(r);return[t,n]},zu.isAbsolute=v,zu}();Pu.pattern=o;const i=function(){if(Lc)return Nc;Lc=1,Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.merge=void 0;const e=Mc();function t(e){e.forEach(e=>e.emit("close"))}return Nc.merge=function(n){const r=e(n);return n.forEach(e=>{e.once("error",e=>r.emit("error",e))}),r.once("close",()=>t(n)),r.once("end",()=>t(n)),r},Nc}();Pu.stream=i;const s=(Bc||(Bc=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.isEmpty=Hc.isString=void 0,Hc.isString=function(e){return"string"==typeof e},Hc.isEmpty=function(e){return""===e}),Hc);return Pu.string=s,Pu}var Uc,qc={},Kc={},Gc={},Wc={},Vc={},Zc={},Jc={},Yc={},Qc={};var Xc,el,tl,nl,rl,ol,il,sl,al={},ul={},cl={};function ll(){if(nl)return Yc;nl=1,Object.defineProperty(Yc,"__esModule",{value:!0}),Yc.statSync=Yc.stat=Yc.Settings=void 0;const e=function(){if(Uc)return Qc;function e(e,t){e(t)}function t(e,t){e(null,t)}return Uc=1,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.read=void 0,Qc.read=function(n,r,o){r.fs.lstat(n,(i,s)=>{null===i?s.isSymbolicLink()&&r.followSymbolicLink?r.fs.stat(n,(n,i)=>{if(null!==n)return r.throwErrorOnBrokenSymbolicLink?void e(o,n):void t(o,s);r.markSymbolicLink&&(i.isSymbolicLink=()=>!0),t(o,i)}):t(o,s):e(o,i)})},Qc}(),t=(Xc||(Xc=1,Object.defineProperty(al,"__esModule",{value:!0}),al.read=void 0,al.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}}),al),n=function(){if(tl)return ul;tl=1,Object.defineProperty(ul,"__esModule",{value:!0});const e=(el||(el=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=g;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)}}(cl)),cl);return ul.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}},ul}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return Yc.Settings=n.default,Yc.stat=function(t,n,o){"function"!=typeof n?e.read(t,r(n),o):e.read(t,r(),n)},Yc.statSync=function(e,n){const o=r(n);return t.read(e,o)},Yc}var pl,fl={};function dl(){if(pl)return fl;pl=1,Object.defineProperty(fl,"__esModule",{value:!0}),fl.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),r=t>10,o=10===t&&n>=10;return fl.IS_SUPPORT_READDIR_WITH_FILE_TYPES=r||o,fl}var hl,gl,ml={},yl={};function Dl(){if(gl)return ml;gl=1,Object.defineProperty(ml,"__esModule",{value:!0}),ml.fs=void 0;const e=function(){if(hl)return yl;hl=1,Object.defineProperty(yl,"__esModule",{value:!0}),yl.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 yl.createDirentFromStats=function(t,n){return new e(t,n)},yl}();return ml.fs=e,ml}var bl,vl,wl={};function _l(){return bl||(bl=1,Object.defineProperty(wl,"__esModule",{value:!0}),wl.joinPathSegments=void 0,wl.joinPathSegments=function(e,t,n){return e.endsWith(n)?e+t:e+n+t}),wl}function El(){if(vl)return Jc;vl=1,Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.readdir=Jc.readdirWithFileTypes=Jc.read=void 0;const e=ll(),t=function(){if(sl)return il;sl=1,il=function(t,n){let r,o,i,s=!0;function a(t){function o(){n&&n(t,r),n=null}s?e(o):o()}function u(e,t,n){r[e]=n,(0===--o||t)&&a(t)}Array.isArray(t)?(r=[],o=t.length):(i=Object.keys(t),r={},o=i.length),o?i?i.forEach(function(e){t[e](function(t,n){u(e,t,n)})}):t.forEach(function(e,t){e(function(e,n){u(t,e,n)})}):a(null),s=!1};const e=function(){if(ol)return rl;let e;return ol=1,rl="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:x):t=>(e||(e=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))}();return il}(),n=dl(),r=Dl(),o=_l();function i(e,n,i){n.fs.readdir(e,{withFileTypes:!0},(s,c)=>{if(null!==s)return void a(i,s);const l=c.map(t=>({dirent:t,name:t.name,path:o.joinPathSegments(e,t.name,n.pathSegmentSeparator)}));if(!n.followSymbolicLinks)return void u(i,l);const p=l.map(e=>function(e,t){return n=>{e.dirent.isSymbolicLink()?t.fs.stat(e.path,(o,i)=>{if(null!==o)return t.throwErrorOnBrokenSymbolicLink?void n(o):void n(null,e);e.dirent=r.fs.createDirentFromStats(e.name,i),n(null,e)}):n(null,e)}}(e,n));t(p,(e,t)=>{null===e?u(i,t):a(i,e)})})}function s(n,i,s){i.fs.readdir(n,(c,l)=>{if(null!==c)return void a(s,c);const p=l.map(t=>{const s=o.joinPathSegments(n,t,i.pathSegmentSeparator);return n=>{e.stat(s,i.fsStatSettings,(e,o)=>{if(null!==e)return void n(e);const a={name:t,path:s,dirent:r.fs.createDirentFromStats(t,o)};i.stats&&(a.stats=o),n(null,a)})}});t(p,(e,t)=>{null===e?u(s,t):a(s,e)})})}function a(e,t){e(t)}function u(e,t){e(null,t)}return Jc.read=function(e,t,r){t.stats||!n.IS_SUPPORT_READDIR_WITH_FILE_TYPES?s(e,t,r):i(e,t,r)},Jc.readdirWithFileTypes=i,Jc.readdir=s,Jc}var Al,Sl,Cl,kl,Pl={},Rl={},xl={};function Ol(){if(kl)return Zc;kl=1,Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.Settings=Zc.scandirSync=Zc.scandir=void 0;const e=El(),t=function(){if(Al)return Pl;Al=1,Object.defineProperty(Pl,"__esModule",{value:!0}),Pl.readdir=Pl.readdirWithFileTypes=Pl.read=void 0;const e=ll(),t=dl(),n=Dl(),r=_l();function o(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(o=>{const i={dirent:o,name:o.name,path:r.joinPathSegments(e,o.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,o){return o.fs.readdirSync(t).map(i=>{const s=r.joinPathSegments(t,i,o.pathSegmentSeparator),a=e.statSync(s,o.fsStatSettings),u={name:i,path:s,dirent:n.fs.createDirentFromStats(i,a)};return o.stats&&(u.stats=a),u})}return Pl.read=function(e,n){return!n.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?o(e,n):i(e,n)},Pl.readdirWithFileTypes=o,Pl.readdir=i,Pl}(),n=function(){if(Cl)return Rl;Cl=1,Object.defineProperty(Rl,"__esModule",{value:!0});const e=p,t=ll(),n=(Sl||(Sl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const t=g;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)}}(xl)),xl);return Rl.default=class{constructor(r={}){this._options=r,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}},Rl}();function r(e={}){return e instanceof n.default?e:new n.default(e)}return Zc.Settings=n.default,Zc.scandir=function(t,n,o){"function"!=typeof n?e.read(t,r(n),o):e.read(t,r(),n)},Zc.scandirSync=function(e,n){const o=r(n);return t.read(e,o)},Zc}var Fl,Tl,$l,Ll={exports:{}};var Nl,Ml={};function Bl(){return Nl||(Nl=1,Object.defineProperty(Ml,"__esModule",{value:!0}),Ml.joinPathSegments=Ml.replacePathSegmentSeparator=Ml.isAppliedFilter=Ml.isFatalError=void 0,Ml.isFatalError=function(e,t){return null===e.errorFilter||!e.errorFilter(t)},Ml.isAppliedFilter=function(e,t){return null===e||e(t)},Ml.replacePathSegmentSeparator=function(e,t){return e.split(/[/\\]/).join(t)},Ml.joinPathSegments=function(e,t,n){return""===e?t:e.endsWith(n)?e+t:e+n+t}),Ml}var Il,jl,Hl,zl={};function Ul(){if(Il)return zl;Il=1,Object.defineProperty(zl,"__esModule",{value:!0});const e=Bl();return zl.default=class{constructor(t,n){this._root=t,this._settings=n,this._root=e.replacePathSegmentSeparator(t,n.pathSegmentSeparator)}},zl}function ql(){if(jl)return Vc;jl=1,Object.defineProperty(Vc,"__esModule",{value:!0});const e=h,t=Ol(),n=function(){if($l)return Ll.exports;$l=1;var e=Tl?Fl:(Tl=1,Fl=function(e){var t=new e,n=t;return{get:function(){var r=t;return r.next?t=r.next:(t=new e,n=t),r.next=null,r},release:function(e){n.next=e,n=e}}});function t(t,o,i){if("function"==typeof t&&(i=o,o=t,t=null),!(i>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var s=e(r),a=null,u=null,c=0,l=null,p={push:function(e,r){var d=s.get();d.context=t,d.release=f,d.value=e,d.callback=r||n,d.errorHandler=l,c>=i||p.paused?u?(u.next=d,u=d):(a=d,u=d,p.saturated()):(c++,o.call(t,d.value,d.worked))},drain:n,saturated:n,pause:function(){p.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,!p.paused)for(;a&&c<i;)c++,f()},running:function(){return c},resume:function(){if(p.paused){if(p.paused=!1,null===a)return c++,void f();for(;a&&c<i;)c++,f()}},idle:function(){return 0===c&&0===p.length()},length:function(){for(var e=a,t=0;e;)e=e.next,t++;return t},getQueue:function(){for(var e=a,t=[];e;)t.push(e.value),e=e.next;return t},unshift:function(e,r){var d=s.get();d.context=t,d.release=f,d.value=e,d.callback=r||n,d.errorHandler=l,c>=i||p.paused?a?(d.next=a,a=d):(a=d,u=d,p.saturated()):(c++,o.call(t,d.value,d.worked))},empty:n,kill:function(){a=null,u=null,p.drain=n},killAndDrain:function(){a=null,u=null,p.drain(),p.drain=n},error:function(e){l=e}};return p;function f(e){e&&s.release(e);var n=a;n&&c<=i?p.paused?c--:(u===a&&(u=null),a=n.next,n.next=null,o.call(t,n.value,n.worked),null===u&&p.empty()):0===--c&&p.drain()}}function n(){}function r(){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,r){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=n,e.errorHandler&&i(t,s),o.call(e.context,t,r),e.release(e)}}return Ll.exports=t,Ll.exports.promise=function(e,r,o){"function"==typeof e&&(o=r,r=e,e=null);var i=t(e,function(e,t){r.call(this,e).then(function(e){t(null,e)},t)},o),s=i.push,a=i.unshift;return i.push=function(e){var t=new Promise(function(t,n){s(e,function(e,r){e?n(e):t(r)})});return t.catch(n),t},i.unshift=function(e){var t=new Promise(function(t,n){a(e,function(e,r){e?n(e):t(r)})});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},Ll.exports}(),r=Bl(),o=Ul();class i extends o.default{constructor(r,o){super(r,o),this._settings=o,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,r)=>{if(null===n){for(const t of r)this._handleEntry(t,e.base);t(null,void 0)}else t(n,void 0)})}_handleError(e){!this._isDestroyed&&r.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=r.joinPathSegments(t,e.name,this._settings.pathSegmentSeparator)),r.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&r.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,void 0===t?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}return Vc.default=i,Vc}var Kl,Gl,Wl,Vl={},Zl={},Jl={};var Yl,Ql,Xl={};function ep(){if(Ql)return Gc;Ql=1,Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.Settings=Gc.walkStream=Gc.walkSync=Gc.walk=void 0;const e=function(){if(Hl)return Wc;Hl=1,Object.defineProperty(Wc,"__esModule",{value:!0});const e=ql();return Wc.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()}},Wc}(),t=function(){if(Kl)return Vl;Kl=1,Object.defineProperty(Vl,"__esModule",{value:!0});const e=d,t=ql();return Vl.default=class{constructor(n,r){this._root=n,this._settings=r,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}},Vl}(),n=function(){if(Wl)return Zl;Wl=1,Object.defineProperty(Zl,"__esModule",{value:!0});const e=function(){if(Gl)return Jl;Gl=1,Object.defineProperty(Jl,"__esModule",{value:!0});const e=Ol(),t=Bl(),n=Ul();class r 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 r=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(r,void 0===n?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}return Jl.default=r,Jl}();return Zl.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()}},Zl}(),r=function(){if(Yl)return Xl;Yl=1,Object.defineProperty(Xl,"__esModule",{value:!0});const e=p,t=Ol();return Xl.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}},Xl}();function o(e={}){return e instanceof r.default?e:new r.default(e)}return Gc.Settings=r.default,Gc.walk=function(t,n,r){"function"!=typeof n?new e.default(t,o(n)).read(r):new e.default(t,o()).read(n)},Gc.walkSync=function(e,t){const r=o(t);return new n.default(e,r).read()},Gc.walkStream=function(e,n){const r=o(n);return new t.default(e,r).read()},Gc}var tp,np={};function rp(){if(tp)return np;tp=1,Object.defineProperty(np,"__esModule",{value:!0});const e=p,t=ll(),n=zc();return np.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 r={name:t,path:t,dirent:n.fs.createDirentFromStats(t,e)};return this._settings.stats&&(r.stats=e),r}_isFatalError(e){return!n.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}},np}var op,ip,sp={};function ap(){if(op)return sp;op=1,Object.defineProperty(sp,"__esModule",{value:!0});const e=d,t=ll(),n=ep(),r=rp();class o extends r.default{constructor(){super(...arguments),this._walkStream=n.walkStream,this._stat=t.stat}dynamic(e,t){return this._walkStream(e,t)}static(t,n){const r=t.map(this._getFullEntryPath,this),o=new e.PassThrough({objectMode:!0});o._write=(e,i,s)=>this._getEntry(r[e],t[e],n).then(t=>{null!==t&&n.entryFilter(t)&&o.push(t),e===r.length-1&&o.end(),s()}).catch(s);for(let e=0;e<r.length;e++)o.write(e);return o}_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,r)=>null===e?t(r):n(e))})}}return sp.default=o,sp}var up,cp,lp,pp={},fp={},dp={},hp={};var gp,mp,yp,Dp,bp,vp={},wp={},_p={};function Ep(){if(Dp)return pp;Dp=1,Object.defineProperty(pp,"__esModule",{value:!0});const e=p,t=function(){if(lp)return fp;lp=1,Object.defineProperty(fp,"__esModule",{value:!0});const e=zc(),t=function(){if(cp)return dp;cp=1,Object.defineProperty(dp,"__esModule",{value:!0});const e=function(){if(up)return hp;up=1,Object.defineProperty(hp,"__esModule",{value:!0});const e=zc();return hp.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))}},hp}();class t extends e.default{match(e){const t=e.split("/"),n=t.length,r=this._storage.filter(e=>!e.complete||e.segments.length>n);for(const e of r){const r=e.sections[0];if(!e.complete&&n>r.length)return!0;if(t.every((t,n)=>{const r=e.segments[n];return!(!r.dynamic||!r.patternRe.test(t))||!r.dynamic&&r.pattern===t}))return!0}return!1}}return dp.default=t,dp}();return fp.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t}getFilter(e,t,n){const r=this._getMatcher(t),o=this._getNegativePatternsRe(n);return t=>this._filter(e,t,r,o)}_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,r,o){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,r)&&this._isSkippedByNegativePatterns(i,o)}_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)}},fp}(),n=function(){if(gp)return vp;gp=1,Object.defineProperty(vp,"__esModule",{value:!0});const e=zc();return vp.default=class{constructor(e,t){this._settings=e,this._micromatchOptions=t,this.index=new Map}getFilter(t,n){const[r,o]=e.pattern.partitionAbsoluteAndRelative(n),i={positive:{all:e.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:e.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:e.pattern.convertPatternsToRe(o,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return e=>this._filter(e,i)}_filter(t,n){const r=e.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(r))return!1;if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;const o=this._isMatchToPatternsSet(r,n,t.dirent.isDirectory());return this._settings.unique&&o&&this._createIndexRecord(r),o}_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,r){if(0===n.length)return!1;const o=e.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(o,n,r)}_isMatchToPatterns(t,n,r){if(0===n.length)return!1;const o=e.pattern.matchAny(t,n);return!o&&r?e.pattern.matchAny(t+"/",n):o}},vp}(),r=function(){if(mp)return wp;mp=1,Object.defineProperty(wp,"__esModule",{value:!0});const e=zc();return wp.default=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(t){return e.errno.isEnoentCodeError(t)||this._settings.suppressErrors}},wp}(),o=function(){if(yp)return _p;yp=1,Object.defineProperty(_p,"__esModule",{value:!0});const e=zc();return _p.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}},_p}();return pp.default=class{constructor(e){this._settings=e,this.errorFilter=new r.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new o.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}}},pp}var Ap,Sp,Cp,kp={},Pp={},Rp={};var xp,Op,Fp,Tp,$p,Lp={},Np=function(){if(Fp)return Op;Fp=1;const e=function(){if(jc)return ku;jc=1,Object.defineProperty(ku,"__esModule",{value:!0}),ku.convertPatternGroupToTask=ku.convertPatternGroupsToTasks=ku.groupPatternsByBaseDirectory=ku.getNegativePatternsAsPositive=ku.getPositivePatterns=ku.convertPatternsToTasks=ku.generate=void 0;const e=zc();function t(t,n){let r=t;return n.braceExpansion&&(r=e.pattern.expandPatternsWithBraceExpansion(r)),n.baseNameMatch&&(r=r.map(e=>e.includes("/")?e:`**/${e}`)),r.map(t=>e.pattern.removeDuplicateSlashes(t))}function n(t,n,r){const o=[],u=e.pattern.getPatternsOutsideCurrentDirectory(t),c=e.pattern.getPatternsInsideCurrentDirectory(t),l=i(u),p=i(c);return o.push(...s(l,n,r)),"."in p?o.push(a(".",c,n,r)):o.push(...s(p,n,r)),o}function r(t){return e.pattern.getPositivePatterns(t)}function o(t,n){return e.pattern.getNegativePatterns(t).concat(n).map(e.pattern.convertToPositivePattern)}function i(t){return t.reduce((t,n)=>{const r=e.pattern.getBaseDirectory(n);return r in t?t[r].push(n):t[r]=[n],t},{})}function s(e,t,n){return Object.keys(e).map(r=>a(r,e[r],t,n))}function a(t,n,r,o){return{dynamic:o,positive:n,negative:r,base:t,patterns:[].concat(n,r.map(e.pattern.convertToNegativePattern))}}return ku.generate=function(i,s){const a=t(i,s),u=t(s.ignore,s),c=r(a),l=o(a,u),p=c.filter(t=>e.pattern.isStaticPattern(t,s)),f=c.filter(t=>e.pattern.isDynamicPattern(t,s)),d=n(p,l,!1),h=n(f,l,!0);return d.concat(h)},ku.convertPatternsToTasks=n,ku.getPositivePatterns=r,ku.getNegativePatternsAsPositive=o,ku.groupPatternsByBaseDirectory=i,ku.convertPatternGroupsToTasks=s,ku.convertPatternGroupToTask=a,ku}(),t=function(){if(bp)return qc;bp=1,Object.defineProperty(qc,"__esModule",{value:!0});const e=function(){if(ip)return Kc;ip=1,Object.defineProperty(Kc,"__esModule",{value:!0});const e=ep(),t=rp(),n=ap();class r extends t.default{constructor(){super(...arguments),this._walkAsync=e.walk,this._readerStream=new n.default(this._settings)}dynamic(e,t){return new Promise((n,r)=>{this._walkAsync(e,t,(e,t)=>{null===e?n(t):r(e)})})}async static(e,t){const n=[],r=this._readerStream.static(e,t);return new Promise((e,t)=>{r.once("error",t),r.on("data",e=>n.push(e)),r.once("end",()=>e(n))})}}return Kc.default=r,Kc}(),t=Ep();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 qc.default=n,qc}(),n=function(){if(Ap)return kp;Ap=1,Object.defineProperty(kp,"__esModule",{value:!0});const e=d,t=ap(),n=Ep();class r extends n.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(t){const n=this._getRootDirectory(t),r=this._getReaderOptions(t),o=this.api(n,t,r),i=new e.Readable({objectMode:!0,read:()=>{}});return o.once("error",e=>i.emit("error",e)).on("data",e=>i.emit("data",r.transform(e))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(e,t,n){return t.dynamic?this._reader.dynamic(e,n):this._reader.static(t.patterns,n)}}return kp.default=r,kp}(),r=function(){if(Cp)return Pp;Cp=1,Object.defineProperty(Pp,"__esModule",{value:!0});const e=function(){if(Sp)return Rp;Sp=1,Object.defineProperty(Rp,"__esModule",{value:!0});const e=ll(),t=ep(),n=rp();class r 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 r of e){const e=this._getFullEntryPath(r),o=this._getEntry(e,r,t);null!==o&&t.entryFilter(o)&&n.push(o)}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 Rp.default=r,Rp}(),t=Ep();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 Pp.default=n,Pp}(),o=(xp||(xp=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const t=g,n=l,r=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,r),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)}}}(Lp)),Lp),i=zc();async function s(e,n){u(e);const r=a(e,t.default,n),o=await Promise.all(r);return i.array.flatten(o)}function a(t,n,r){const i=[].concat(t),s=new o.default(r),a=e.generate(i,s),u=new n(s);return a.map(u.read,u)}function u(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 s(e,t){u(e);const n=a(e,r.default,t);return i.array.flatten(n)}function c(e,t){u(e);const r=a(e,n.default,t);return i.stream.merge(r)}var l,p;t.glob=t,t.globSync=s,t.globStream=c,t.async=t,t.sync=s,t.stream=c,t.generateTasks=function(t,n){u(t);const r=[].concat(t),i=new o.default(n);return e.generate(r,i)},t.isDynamicPattern=function(e,t){u(e);const n=new o.default(t);return i.pattern.isDynamicPattern(e,n)},t.escapePath=function(e){return u(e),i.path.escape(e)},t.convertPathToPattern=function(e){return u(e),i.path.convertPathToPattern(e)},(l=t.posix||(t.posix={})).escapePath=function(e){return u(e),i.path.escapePosixPath(e)},l.convertPathToPattern=function(e){return u(e),i.path.convertPosixPathToPattern(e)},(p=t.win32||(t.win32={})).escapePath=function(e){return u(e),i.path.escapeWindowsPath(e)},p.convertPathToPattern=function(e){return u(e),i.path.convertWindowsPathToPattern(e)}}(s||(s={})),Op=s}(),Mp=O(Np),Bp=function(){if($p)return Tp;$p=1;var e=Uu(),t=p.posix.dirname,n="win32"===l.platform(),r="/",o=/\\/g,i=/\\([!*?|[\](){}])/g;function s(t){return!!/\([^()]+$/.test(t)||"{"===t[0]||"["===t[0]||!!/[^\\][{[]/.test(t)||e(t)}return Tp=function(e,a){Object.assign({flipBackslashes:!0},a).flipBackslashes&&n&&e.indexOf(r)<0&&(e=e.replace(o,r)),function(e){var t;switch(e.slice(-1)){case"}":t="{";break;case"]":t="[";break;default:return!1}var n=e.indexOf(t);return!(n<0)&&e.slice(n+1,-1).includes(r)}(e)&&(e+=r),e+="a";do{e=t(e)}while(s(e));return e.replace(i,"$1")}}(),Ip=O(Bp);const jp=e=>""!==e&&".."!==e,Hp=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(!jp(e))return null;return t.join("/")},zp=async e=>{try{return(await t.stat(e)).isFile()}catch{return!1}},Up=(e=0)=>t=>`[${t+e}m`,qp=(e=0)=>t=>`[${38+e};5;${t}m`,Kp=(e=0)=>(t,n,r)=>`[${38+e};2;${t};${n};${r}m`,Gp={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(Gp.modifier);Object.keys(Gp.color),Object.keys(Gp.bgColor);const Wp=function(){const e=new Map;for(const[t,n]of Object.entries(Gp)){for(const[t,r]of Object.entries(n))Gp[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=Gp[t],e.set(r[0],r[1]);Object.defineProperty(Gp,t,{value:n,enumerable:!1})}return Object.defineProperty(Gp,"codes",{value:e,enumerable:!1}),Gp.color.close="",Gp.bgColor.close="",Gp.color.ansi=Up(),Gp.color.ansi256=qp(),Gp.color.ansi16m=Kp(),Gp.bgColor.ansi=Up(10),Gp.bgColor.ansi256=qp(10),Gp.bgColor.ansi16m=Kp(10),Object.defineProperties(Gp,{rgbToAnsi256:{value:(e,t,n)=>e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value(e){const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;3===n.length&&(n=[...n].map(e=>e+e).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},enumerable:!1},hexToAnsi256:{value:e=>Gp.rgbToAnsi256(...Gp.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return e-8+90;let t,n,r;if(e>=232)t=(10*(e-232)+8)/255,n=t,r=t;else{const o=(e-=16)%36;t=Math.floor(e/36)/5,n=Math.floor(o/6)/5,r=o%6/5}const o=2*Math.max(t,n,r);if(0===o)return 30;let i=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return 2===o&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>Gp.ansi256ToAnsi(Gp.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>Gp.ansi256ToAnsi(Gp.hexToAnsi256(e)),enumerable:!1}}),Gp}();function Vp(e,t=(globalThis.Deno?globalThis.Deno.args:o.argv)){const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)}const{env:Zp}=o;let Jp;function Yp(e,{streamIsTTY:t,sniffFlags:n=!0}={}){const r=function(){if("FORCE_COLOR"in Zp)return"true"===Zp.FORCE_COLOR?1:"false"===Zp.FORCE_COLOR?0:0===Zp.FORCE_COLOR.length?1:Math.min(Number.parseInt(Zp.FORCE_COLOR,10),3)}();void 0!==r&&(Jp=r);const i=n?Jp:r;if(0===i)return 0;if(n){if(Vp("color=16m")||Vp("color=full")||Vp("color=truecolor"))return 3;if(Vp("color=256"))return 2}if("TF_BUILD"in Zp&&"AGENT_NAME"in Zp)return 1;if(e&&!t&&void 0===i)return 0;const s=i||0;if("dumb"===Zp.TERM)return s;if("win32"===o.platform){const e=m.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in Zp)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(e=>e in Zp)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(e=>e in Zp)||"codeship"===Zp.CI_NAME?1:s;if("TEAMCITY_VERSION"in Zp)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Zp.TEAMCITY_VERSION)?1:0;if("truecolor"===Zp.COLORTERM)return 3;if("xterm-kitty"===Zp.TERM)return 3;if("xterm-ghostty"===Zp.TERM)return 3;if("wezterm"===Zp.TERM)return 3;if("TERM_PROGRAM"in Zp){const e=Number.parseInt((Zp.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Zp.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Zp.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Zp.TERM)||"COLORTERM"in Zp?1:s}function Qp(e,t={}){return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(Yp(e,{streamIsTTY:e&&e.isTTY,...t}))}Vp("no-color")||Vp("no-colors")||Vp("color=false")||Vp("color=never")?Jp=0:(Vp("color")||Vp("colors")||Vp("color=true")||Vp("color=always"))&&(Jp=1);const Xp={stdout:Qp({isTTY:y.isatty(1)}),stderr:Qp({isTTY:y.isatty(2)})};function ef(e,t,n){let r=e.indexOf(t);if(-1===r)return e;const o=t.length;let i=0,s="";do{s+=e.slice(i,r)+t+n,i=r+o,r=e.indexOf(t,i)}while(-1!==r);return s+=e.slice(i),s}const{stdout:tf,stderr:nf}=Xp,rf=Symbol("GENERATOR"),of=Symbol("STYLER"),sf=Symbol("IS_EMPTY"),af=["ansi","ansi","ansi256","ansi16m"],uf=Object.create(null),cf=e=>{const t=(...e)=>e.join(" ");return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const n=tf?tf.level:0;e.level=void 0===t.level?n:t.level})(t,e),Object.setPrototypeOf(t,lf.prototype),t};function lf(e){return cf(e)}Object.setPrototypeOf(lf.prototype,Function.prototype);for(const[e,t]of Object.entries(Wp))uf[e]={get(){const n=gf(this,hf(t.open,t.close,this[of]),this[sf]);return Object.defineProperty(this,e,{value:n}),n}};uf.visible={get(){const e=gf(this,this[of],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const pf=(e,t,n,...r)=>"rgb"===e?"ansi16m"===t?Wp[n].ansi16m(...r):"ansi256"===t?Wp[n].ansi256(Wp.rgbToAnsi256(...r)):Wp[n].ansi(Wp.rgbToAnsi(...r)):"hex"===e?pf("rgb",t,n,...Wp.hexToRgb(...r)):Wp[n][e](...r),ff=["rgb","hex","ansi256"];for(const e of ff){uf[e]={get(){const{level:t}=this;return function(...n){const r=hf(pf(e,af[t],"color",...n),Wp.color.close,this[of]);return gf(this,r,this[sf])}}};uf["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...n){const r=hf(pf(e,af[t],"bgColor",...n),Wp.bgColor.close,this[of]);return gf(this,r,this[sf])}}}}const df=Object.defineProperties(()=>{},{...uf,level:{enumerable:!0,get(){return this[rf].level},set(e){this[rf].level=e}}}),hf=(e,t,n)=>{let r,o;return void 0===n?(r=e,o=t):(r=n.openAll+e,o=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:o,parent:n}},gf=(e,t,n)=>{const r=(...e)=>mf(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,df),r[rf]=e,r[of]=t,r[sf]=n,r},mf=(e,t)=>{if(e.level<=0||!t)return e[sf]?"":t;let n=e[of];if(void 0===n)return t;const{openAll:r,closeAll:o}=n;if(t.includes(""))for(;void 0!==n;)t=ef(t,n.close,n.open),n=n.parent;const i=t.indexOf("\n");return-1!==i&&(t=function(e,t,n,r){let o=0,i="";do{const s="\r"===e[r-1];i+=e.slice(o,s?r-1:r)+t+(s?"\r\n":"\n")+n,o=r+1,r=e.indexOf("\n",o)}while(-1!==r);return i+=e.slice(o),i}(t,o,r,i)),r+t+o};Object.defineProperties(lf.prototype,uf);const yf=lf();lf({level:nf?nf.level:0});const Df=Boolean(process.stdout?.isTTY),bf=()=>"1"===process.env.STAN_BORING||"1"===process.env.NO_COLOR||"0"===process.env.FORCE_COLOR||!Df,vf=e=>bf()?e:yf.green(e),wf=e=>bf()?e:yf.cyan(e),_f=e=>bf()?e:yf.blue(e),Ef=e=>bf()?e:yf.red(e),Af=e=>bf()?e:yf.black(e),Sf=e=>bf()?e:yf.gray(e),Cf=e=>bf()?e:yf.hex("#FFA500")(e),kf=e=>bf()?e:yf.bold(e),Pf=e=>bf()?e:yf.dim(e),Rf=e=>e instanceof URL?i.fileURLToPath(e):e;function xf({cwd:t}={}){const r=function(t,{cwd:r=o.cwd(),type:i="file",stopAt:s}={}){let a=n.resolve(Rf(r)??"");const{root:u}=n.parse(a);s=n.resolve(a,Rf(s)??u);const c=n.isAbsolute(t);for(;a;){const r=c?t:n.join(a,t);try{const t=e.statSync(r,{throwIfNoEntry:!1});if("file"===i&&t?.isFile()||"directory"===i&&t?.isDirectory())return r}catch{}if(a===s||a===u)break;a=n.dirname(a)}}("package.json",{cwd:t});return r&&n.dirname(r)}const Of=async e=>{const n=await t.readFile(e);return u.createHash("sha256").update(n).digest("hex")},Ff=async e=>{if(!e)return null;try{return await t.realpath(e)}catch{return e?n.resolve(e):null}},Tf=async e=>{try{const n=await t.readFile(e,"utf8");return JSON.parse(n)}catch{return null}},$f=async t=>{let r=t;try{const e=xf({cwd:t})??t;r=e}catch{}const o=(()=>{try{return Au(r).stanPath}catch{return(e=>{try{return Au(e).stanPath}catch{return".stan"}})(r)}})();let s;try{const e=Au(r);s="boolean"==typeof e.devMode?e.devMode:void 0}catch{s=void 0}const a=((e,t)=>({systemAbs:n.join(e,t,"system")}))(r,o),u=n.join(a.systemAbs,"stan.system.md"),c=n.join(a.systemAbs,".docs.meta.json");let l=null;const p=xf({cwd:n.dirname(i.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:v&&"SCRIPT"===v.tagName.toUpperCase()&&v.src||new URL("index.js",document.baseURI).href))})??null;if(p)try{const e=await Tf(n.join(p,"package.json"));l=e?.version??null}catch{l=null}const f=p&&e.existsSync(n.join(p,"dist","stan.system.md"))?n.join(p,"dist","stan.system.md"):null,d=e.existsSync(u),h=!!f&&e.existsSync(f),[g,m]=await Promise.all([d?Of(u):Promise.resolve(void 0),h&&f?Of(f):Promise.resolve(void 0)]),y=!(!g||!m)&&g===m,D=await Tf(c),[b,w]=await Promise.all([Ff(p),Ff(r)]),_=!!b&&!!w&&b===w,E=process.env.STAN_DEV_MODE?.trim().toLowerCase(),A="1"===E||"true"===E||"0"!==E&&"false"!==E&&void 0,S="boolean"==typeof A?A:"boolean"==typeof s?s:_;return{packageVersion:l,nodeVersion:process.version,repoRoot:r,stanPath:o,isDevModuleRepo:S,systemPrompt:{localExists:d,baselineExists:h,inSync:y,localHash:g,baselineHash:m},docsMeta:D??null}},Lf=(()=>{try{return"1"===process.env.STAN_LIVE_DEBUG}catch{return!1}})(),Nf=(e,t,n)=>{if(Lf)try{n&&Object.keys(n).length>0?console.error(`[stan:live:${e}] ${t}`,n):console.error(`[stan:live:${e}] ${t}`)}catch{}},Mf={get enabled(){return Lf},renderer:{start(e){Nf("renderer","start()",e)},update(e){Nf("renderer","update()",e)},render(e){Nf("renderer","render()",e)},headerOnly(e){Nf("renderer","render(header-only)",e)},flush(){Nf("renderer","flush()")},clear(){Nf("renderer","clear()")},stop(){Nf("renderer","stop()")},done(){Nf("renderer","stop():done()")}},ui:{start(){Nf("UI","start()")},installCancellation(){Nf("UI","installCancellation(): control.attach()")},onCancelled(e){Nf("UI","onCancelled()",{mode:e})},stop(){Nf("UI","stop() -> sink.stop()")}},session:{info(e,t){Nf("session",e,t)},exitHook(){Nf("session","exit hook fired: ui.stop + supervisor cancel + pause stdin")}}},Bf=()=>(()=>{const t=(()=>{try{const e=i.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:v&&"SCRIPT"===v.tagName.toUpperCase()&&v.src||new URL("index.js",document.baseURI).href);return se({cwd:n.dirname(e)})??null}catch{return null}})();if(!t)return null;const r=n.join(t,"dist","stan.system.md");return e.existsSync(r)?r:null})(),If=(e,t)=>({outputAbs:n.join(e,t,"output"),patchAbs:n.join(e,t,"patch")}),jf=async(o,i)=>{const{cwd:s,config:a,includeOutputs:u}=o,c=Boolean(i?.silent),l=If(s,a.stanPath);c||console.log(`stan: start "${wf("archive")}"`);let p=await(async(r,o)=>{const i=Bf();if(!i)return async()=>{};const s=n.resolve(r,o,"system");await t.mkdir(s,{recursive:!0});const a=n.join(s,"stan.system.md"),u=e.existsSync(a);let c=null;if(u)try{c=await t.readFile(a,"utf8")}catch{c=null}const l=await t.readFile(i,"utf8");return await t.writeFile(a,l,"utf8"),async()=>{try{u?null!==c&&await t.writeFile(a,c,"utf8"):await t.rm(a,{force:!0})}catch{}}})(s,a.stanPath),f="",d="";try{try{a.imports&&"object"==typeof a.imports&&await(async e=>{const{cwd:o,stanPath:i,map:s,onStage:a}=e;if(!s||"object"!=typeof s)return;const u=Q(o,i),c=n.join(u.rootAbs,"imports");await r.ensureDir(c);const l=Object.keys(s).sort();for(const e of l){const i=s[e]??[];if(!Array.isArray(i)||0===i.length)continue;const u=Hp(e);if(!u)continue;const l=n.join(c,u);await t.rm(l,{recursive:!0,force:!0}).catch(()=>{}),await r.ensureDir(l).catch(()=>{});const p=[];for(const e of i){const i=String(e??"").trim();if(!i)continue;const s=Ip(i.replace(/\\/g,"/"));try{const e=await Mp(i,{cwd:o,absolute:!0,dot:!0,onlyFiles:!1,followSymbolicLinks:!1});for(const i of e){if(!await zp(i))continue;const e=n.relative(n.isAbsolute(s)?s:n.resolve(o,s),i).replace(/\\/g,"/");if(!e||e.includes(".."))continue;const a=n.join(l,e);await r.ensureDir(n.dirname(a)).catch(()=>{});try{await t.copyFile(i,a),p.push(a)}catch{}}}catch{}}try{"function"==typeof a&&a(u,p.map(e=>n.relative(o,e).replace(/\\/g,"/")))}catch{}}})({cwd:s,stanPath:a.stanPath,map:a.imports})}catch{}i?.progress?.start?.("full");const o=Date.now();f=await(async(r,o,i={})=>{const{includeOutputDir:s=!1,fileName:a,includes:u=[],excludes:c=[]}=i;let l=a??"archive.tar";l.endsWith(".tar")||(l+=".tar");const{outDir:p,diffDir:f}=await oe(r,o),d=await X(r),h=await ne(d,{cwd:r,stanPath:o,includeOutputDir:s,includes:u,excludes:c}),g=n.resolve(p,l),m=n.resolve(f,_);if(e.existsSync(g))try{await t.copyFile(g,m)}catch{}const{textFiles:y,warningsBody:D}=await R(r,h),b=y,v=(D??"").trim();v&&"No archive warnings."!==v&&i.onArchiveWarnings?.(v);const w=await Promise.resolve().then(function(){return require("./index-ucZa1KMb-CeffVEuy.js")});if(s){const e=Array.from(new Set([...b,`${o.replace(/\\/g,"/")}/output`]));await w.create({file:g,cwd:r,filter:k(o)},e)}else await w.create({file:g,cwd:r,filter:k(o)},b);if(!e.existsSync(m))try{await t.copyFile(g,m)}catch{}return g})(s,a.stanPath,{includeOutputDir:u,includes:a.includes??[],excludes:a.excludes??[]}),i?.progress?.done?.("full",f,o,Date.now()),c||console.log(`stan: ${vf("done")} "${wf("archive")}" -> ${wf(f.replace(/\\/g,"/"))}`),await p(),p=async()=>{},c||console.log(`stan: start "${wf("archive (diff)")}"`),i?.progress?.start?.("diff");const l=Date.now();({diffPath:d}=await Su({cwd:s,stanPath:a.stanPath,baseName:"archive",includes:a.includes??[],excludes:a.excludes??[],updateSnapshot:"createIfMissing",includeOutputDirInDiff:u})),i?.progress?.done?.("diff",d,l,Date.now()),c||console.log(`stan: ${vf("done")} "${wf("archive (diff)")}" -> ${wf(d.replace(/\\/g,"/"))}`)}finally{await p()}return u&&await(async e=>{const r=await t.readdir(e,{withFileTypes:!0}),o=new Set(["archive.tar","archive.diff.tar"]);await Promise.all(r.map(async r=>{o.has(r.name)||await t.rm(n.resolve(e,r.name),{recursive:!0,force:!0})}))})(l.outputAbs),await(async(e,r)=>{const o=If(e,r);try{const e=await t.readdir(o.patchAbs,{withFileTypes:!0});await Promise.all(e.map(e=>t.rm(n.resolve(o.patchAbs,e.name),{recursive:!0,force:!0})))}catch{}})(s,a.stanPath),{archivePath:f,diffPath:d}},Hf=[];Hf.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&Hf.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Hf.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const zf=e=>!!e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on,Uf=Symbol.for("signal-exit emitter"),qf=globalThis,Kf=Object.defineProperty.bind(Object);class Gf{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(qf[Uf])return qf[Uf];Kf(qf,Uf,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){const n=this.listeners[e],r=n.indexOf(t);-1!==r&&(0===r&&1===n.length?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(const o of this.listeners[e])r=!0===o(t,n)||r;return"exit"===e&&(r=this.emit("afterExit",t,n)||r),r}}class Wf{}const Vf=globalThis.process,{onExit:Zf}=(Jf=zf(Vf)?new class extends Wf{#e="win32"===Vf.platform?"SIGINT":"SIGHUP";#t=new Gf;#n;#r;#o;#i={};#s=!1;constructor(e){super(),this.#n=e,this.#i={};for(const t of Hf)this.#i[t]=()=>{const n=this.#n.listeners(t);let{count:r}=this.#t;const o=e;if("object"==typeof o.__signal_exit_emitter__&&"number"==typeof o.__signal_exit_emitter__.count&&(r+=o.__signal_exit_emitter__.count),n.length===r){this.unload();const n=this.#t.emit("exit",null,t),r="SIGHUP"===t?this.#e:t;n||e.kill(e.pid,r)}};this.#o=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!zf(this.#n))return()=>{};!1===this.#s&&this.load();const n=t?.alwaysLast?"afterExit":"exit";return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),0===this.#t.listeners.exit.length&&0===this.#t.listeners.afterExit.length&&this.unload()}}load(){if(!this.#s){this.#s=!0,this.#t.count+=1;for(const e of Hf)try{const t=this.#i[e];t&&this.#n.on(e,t)}catch(e){}this.#n.emit=(e,...t)=>this.#a(e,...t),this.#n.reallyExit=e=>this.#u(e)}}unload(){this.#s&&(this.#s=!1,Hf.forEach(e=>{const t=this.#i[e];if(!t)throw new Error("Listener not defined for signal: "+e);try{this.#n.removeListener(e,t)}catch(e){}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#o,this.#t.count-=1)}#u(e){return zf(this.#n)?(this.#n.exitCode=e||0,this.#t.emit("exit",this.#n.exitCode,null),this.#o.call(this.#n,this.#n.exitCode)):0}#a(e,...t){const n=this.#r;if("exit"===e&&zf(this.#n)){"number"==typeof t[0]&&(this.#n.exitCode=t[0]);const r=n.call(this.#n,e,...t);return this.#t.emit("exit",this.#n.exitCode,null),r}return n.call(this.#n,e,...t)}}(Vf):new class extends Wf{onExit(){return()=>{}}load(){}unload(){}},{onExit:(e,t)=>Jf.onExit(e,t),load:()=>Jf.load(),unload:()=>Jf.unload()});var Jf;const Yf=(e,t)=>{try{Mf.session.info("install SIGINT handler"),process.on("SIGINT",e)}catch{}const n=(r=t,Zf(()=>{try{const e=r();e&&"function"==typeof e.then&&e.catch(()=>{})}catch{}}));var r;return()=>{try{Mf.session.info("detach SIGINT handler"),process.off("SIGINT",e)}catch{}try{Mf.session.info("uninstall exit hook"),n()}catch{}}};var Qf,Xf,ed="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function td(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nd=function(){if(Xf)return Qf;Xf=1;var e=D,t=e.spawn,n=e.exec;function r(e,t,n){var r={};try{Object.keys(e).forEach(function(n){e[n].forEach(function(e){r[e]||(o(e,t),r[e]=1)}),r[n]||(o(n,t),r[n]=1)})}catch(e){if(n)return n(e);throw e}if(n)return n()}function o(e,t){try{process.kill(parseInt(e,10),t)}catch(e){if("ESRCH"!==e.code)throw e}}function i(e,t,n,r,o){var s=r(e),a="";s.stdout.on("data",function(e){e=e.toString("ascii");a+=e});s.on("close",function(s){delete n[e],0==s?a.match(/\d+/g).forEach(function(s){s=parseInt(s,10),t[e].push(s),t[s]=[],n[s]=1,i(s,t,n,r,o)}):0==Object.keys(n).length&&o()})}return Qf=function(e,o,s){if("function"==typeof o&&void 0===s&&(s=o,o=void 0),e=parseInt(e),Number.isNaN(e)){if(s)return s(new Error("pid must be a number"));throw new Error("pid must be a number")}var a={},u={};switch(a[e]=[],u[e]=1,process.platform){case"win32":n("taskkill /pid "+e+" /T /F",s);break;case"darwin":i(e,a,u,function(e){return t("pgrep",["-P",e])},function(){r(a,o,s)});break;default:i(e,a,u,function(e){return t("ps",["-o","pid","--no-headers","--ppid",e])},function(){r(a,o,s)})}}}(),rd=td(nd);const od=()=>new Promise(e=>setImmediate(e)),id=async(r,o,i,s,a,u,l,p,f)=>{const d=n.resolve(o,`${s}.txt`),h=Date.now();l?.onStart?.(s);const g=c.spawn(a,{cwd:r,shell:!0,windowsHide:!0}),m="1"===process.env.STAN_DEBUG;let y="";const D="number"==typeof p?.hangWarn&&p.hangWarn>0?p.hangWarn:0,b="number"==typeof p?.hangKill&&p.hangKill>0?p.hangKill:0,v="number"==typeof p?.hangKillGrace&&p.hangKillGrace>0?p.hangKillGrace:10;let w,_,E=Date.now(),A=!1,S=!1;try{"number"==typeof g.pid&&f&&f.track(`script:${s}`,g.pid)}catch{}const C=e.createWriteStream(d,{encoding:"utf8"});g.stdout.on("data",e=>{C.write(e),y+=e.toString("utf8"),m&&process.stdout.write(e),E=Date.now()}),g.stderr.on("data",e=>{C.write(e),y+=e.toString("utf8"),m&&process.stderr.write(e),E=Date.now()}),(D>0||b>0)&&(w=setInterval(()=>{const e=Date.now()-E;if(!A&&D>0&&e>=1e3*D&&(A=!0,l?.onHangWarn?.(s,D)),!S&&b>0&&e>=1e3*b){S=!0;try{"number"==typeof g.pid&&process.kill(g.pid,"SIGTERM")}catch{}l?.onHangTimeout?.(s,b);const e=Math.max(0,1e3*v);_=setTimeout(()=>{try{"number"==typeof g.pid&&rd(g.pid,"SIGKILL")}catch{}l?.onHangKilled?.(s,v)},e)}},1e3));const k=await new Promise((e,t)=>{g.on("error",e=>t(e instanceof Error?e:new Error(String(e)))),g.on("close",t=>e(t??0))});w&&clearInterval(w),_&&clearTimeout(_),C.end(),await(e=>new Promise((t,n)=>{e.on("close",()=>t()),e.on("error",e=>n(e instanceof Error?e:new Error(String(e))))}))(C);let P="ok";if("number"==typeof k&&0!==k)P="error";else if(p?.warnPatterns&&p.warnPatterns.length>0){const e=(e,t)=>e.some(e=>{try{return e.lastIndex=0,e.test(t)}catch{return!1}});let n=!1;if(y.length>0&&e(p.warnPatterns,y))n=!0;else try{const r=await t.readFile(d,"utf8");e(p.warnPatterns,r)&&(n=!0)}catch{}n&&(P="warn")}return l?.onEnd?.(s,d,h,Date.now(),k,P),u&&await t.appendFile(u,s.slice(0,1).toUpperCase(),"utf8"),d};class sd{behavior;constructor(e){this.behavior=e}pids=new Map;lastCancelled=[];track(e,t){this.pids.set(e,t)}cancelAll(e){const t="number"==typeof this.behavior.hangKillGrace?this.behavior.hangKillGrace:10,n=e?.immediate?0:Math.max(0,1e3*t),r=Array.from(this.pids.entries()),o=Array.from(this.pids.values());this.lastCancelled=o;for(const[,e]of r)try{Number.isFinite(e)&&process.kill(e,"SIGTERM")}catch{}const i=()=>{for(const[,e]of r)try{Number.isFinite(e)&&rd(e,"SIGKILL")}catch{}};n<=0?setTimeout(i,0):setTimeout(i,n),this.pids.clear()}async waitAll(e=2e3){const t=this.lastCancelled.length>0?[...this.lastCancelled]:Array.from(this.pids.values());if(0===t.length)return;const n=Date.now()+Math.max(0,e),r=e=>{try{return process.kill(e,0)}catch{return!1}};for(;Date.now()<n;){if(0===t.filter(e=>r(e)).length)break;await new Promise(e=>setTimeout(e,50))}this.lastCancelled=[]}}let ad=null;const ud="test"===process.env.NODE_ENV||"1"===process.env.STAN_WRITE_ORDER,cd=async e=>{const{cwd:r,config:o,selection:i,mode:s,behavior:a,liveEnabled:u,planBody:c,printPlan:l,ui:p}=e,f=Symbol("session-epoch");ad=f;const d={outputAbs:n.resolve(r,o.stanPath,"output"),outputRel:n.resolve(o.stanPath,"output").replace(/\\/g,"/")},h=d.outputAbs,g=await(async(e,r,o)=>{if(!e)return;const i=n.resolve(r,"order.txt");return o||await t.writeFile(i,"","utf8"),i})(ud,h,Boolean(a.keep));l&&c&&(p.onPlan(c),console.log("")),p.start();const m=new sd({hangWarn:a.hangWarn,hangKill:a.hangKill,hangKillGrace:a.hangKillGrace});let y=!1,D=!1;const b=new Set;let v=null;const w=new Promise(e=>{v=e});let _=[];const E=()=>{if(!y){y=!0;try{if(Array.isArray(_))for(const e of _)b.add(`script:${e}`)}catch{}try{p.onCancelled("cancel")}catch{}try{m.cancelAll({immediate:!0})}catch{}try{process.exitCode=1,"test"!==process.env.NODE_ENV&&process.exit(1)}catch{}try{v?.()}catch{}}},A=()=>{if(!D){D=!0,y=!0;try{if(Array.isArray(_))for(const e of _)b.add(`script:${e}`)}catch{}try{p.onCancelled("restart")}catch{}try{m.cancelAll({immediate:!0})}catch{}try{v?.()}catch{}}};try{p.installCancellation(E,u?A:void 0)}catch{}const S=Yf(()=>E(),async()=>{Mf.session.exitHook();try{p.stop()}catch{}try{m.cancelAll({immediate:!0})}catch{}try{await m.waitAll(3e3)}catch{}try{process.stdin.pause?.()}catch{}});try{p?.prepareForNewSession?.()}catch{}_=((e,t,n,r)=>{const o=(t??[]).filter(e=>Object.prototype.hasOwnProperty.call(n.scripts,e));for(const t of o)e.onScriptQueued(t);return r&&(e.onArchiveQueued("full"),e.onArchiveQueued("diff")),o})(p,i,o,Boolean(a.archive));try{p?.flushNow?.()}catch{}const C=[];let k=null;if(_.length>0&&(k=(async(e,t,n,r,o,i,s,a,u,c,l)=>{const p=[],f=async n=>{try{if("function"==typeof c&&!c())return}catch{}const o=r.scripts[n],i="string"==typeof o?o:"object"==typeof o&&o&&"script"in o?String(o.script):"",f=[];if(o&&"object"==typeof o&&"warnPattern"in o){const e=o.warnPattern;if("string"==typeof e&&e.trim().length){const t=e.trim();try{f.push(new RegExp(t))}catch{}try{const e=t.replace(/\\\\/g,"\\");e!==t&&f.push(new RegExp(e))}catch{}try{f.push(new RegExp(t,"i"))}catch{}}}const d=await id(e,t,0,n,i,s,a,{silent:a.silent,hangWarn:u?.hangWarn,hangKill:u?.hangKill,hangKillGrace:u?.hangKillGrace,warnPatterns:f},l);p.push(d)};if("sequential"===i)for(const e of o){const t=e=>new Promise(t=>setTimeout(t,e));if("function"==typeof c){if(!c())break;if(await od(),!c())break;if(await t(25),!c())break}if(await f(e),"function"==typeof c&&(await od(),!c()))break}else{const e="function"==typeof c?o.filter(()=>c()):o;await Promise.all(e.map(e=>f(e).then(()=>{})))}return p})(r,h,0,o,_,s,g,{onStart:e=>{ad===f&&p.onScriptStart(e)},onEnd:(e,t,n,o,i,s)=>{ad===f&&(y&&b.has(`script:${e}`)||(p.onScriptEnd(e,t,r,n,o,i,s),("error"===s||"number"==typeof i&&0!==i)&&(process.exitCode=1)))},silent:!0,onHangWarn:(e,t)=>{ad===f&&(u||console.log(`stan: ⏱ stalled "${e}" after ${t}s of inactivity`))},onHangTimeout:(e,t)=>{ad===f&&(u||console.log(`stan: ⏱ timeout "${e}" after ${t}s; sending SIGTERM`))},onHangKilled:(e,t)=>{ad===f&&(u||console.log(`stan: ◼ killed "${e}" after ${t}s grace`))}},{hangWarn:a.hangWarn,hangKill:a.hangKill,hangKillGrace:a.hangKillGrace},()=>!y,m).then(e=>{C.push(...e)}),k.catch?.(()=>{}),await Promise.race([k,w])),y){try{D||(Mf.session.info("cancel path: ui.stop()"),p.stop())}catch{}u&&!D&&console.log("");try{k&&await Promise.race([k,new Promise(e=>setTimeout(e,2500))])}catch{}try{await m.waitAll(3e3)}catch{}try{process.stdin.pause?.()}catch{}try{const e="win32"===process.platform?1600:400;await new Promise(t=>setTimeout(t,e))}catch{}return S(),{created:C,cancelled:!0,restartRequested:D}}try{await new Promise(e=>setImmediate(e))}catch{}if(y)return S(),{created:C,cancelled:!0,restartRequested:D};if(a.archive){const e=Boolean(a.combine),{archivePath:t,diffPath:n}=await(async e=>{const{cwd:t,config:n,includeOutputs:r,ui:o}=e,{archivePath:i,diffPath:s}=await jf({cwd:t,config:n,includeOutputs:r},{silent:!0,progress:{start:e=>o.onArchiveStart(e),done:(e,n,r,i)=>o.onArchiveEnd(e,n,t,r,i)}});return{archivePath:i,diffPath:s}})({cwd:r,config:o,includeOutputs:e,ui:p});C.push(t,n)}return Mf.session.info("normal path: detach signals, returning to caller (no ui.stop() here)"),S(),{created:C,cancelled:!1,restartRequested:D}};class ld{onCancel;onRestart;attached=!1;keyHandler;dataHandler;constructor(e){this.onCancel=e.onCancel,this.onRestart=e.onRestart}attach(){if(this.attached)return;this.attached=!0;const e=process.stdin,t=Boolean(process.stdout.isTTY),n=Boolean(e.isTTY);if(t&&n){try{b.emitKeypressEvents(e),e.setRawMode?.(!0),e.resume?.()}catch{}this.keyHandler=(e,t)=>{const n=((t??{}).name??"").toLowerCase();"q"!==n?"r"===n&&this.onRestart?.():this.onCancel()},this.dataHandler=e=>{try{if("string"==typeof e){const t=e.toLowerCase();return void(""===t||"q"===t?this.onCancel():"r"===t&&this.onRestart?.())}if(Buffer.isBuffer(e)){if(e.includes(3))return void this.onCancel();const t=e.toString("utf8").toLowerCase();"q"===t?this.onCancel():"r"===t&&this.onRestart?.()}}catch{}},e.on?.("keypress",this.keyHandler),e.on?.("data",this.dataHandler)}}detach(){if(!this.attached)return;this.attached=!1;const e=process.stdin,t=e.off?.bind(e)??e.removeListener?.bind(e);try{t&&this.keyHandler&&t("keypress",this.keyHandler),t&&this.dataHandler&&t("data",this.dataHandler)}catch{}try{e.setRawMode?.(!1),e.pause?.()}catch{}}}const pd=e=>e.startsWith("script:")?{type:"script",item:e.slice(7)||"(unnamed)"}:e.startsWith("archive:")?{type:"archive",item:e.slice(8)||"(unnamed)"}:void 0,fd=e=>{const t={warn:0,waiting:0,running:0,quiet:0,stalled:0,ok:0,cancelled:0,fail:0,timeout:0};for(const{state:n}of e)"warn"===n.kind?t.warn+=1:"waiting"===n.kind?t.waiting+=1:"running"===n.kind?t.running+=1:"quiet"===n.kind?t.quiet+=1:"stalled"===n.kind?t.stalled+=1:"done"===n.kind?t.ok+=1:"timedout"===n.kind?t.timeout+=1:"cancelled"===n.kind?t.cancelled+=1:"error"!==n.kind&&"killed"!==n.kind||(t.fail+=1);return t};class dd{rows=new Map;listeners=new Set;subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}clearAll(){this.rows.clear()}update(e,t,n){const r=this.rows.get(e),o=n??r?.meta;if(!o){const n=pd(e)??(e.startsWith("archive:")?{type:"archive",item:e.slice(8)||"(unnamed)"}:{type:"script",item:e.replace(/^script:/,"")||"(unnamed)"});return this.rows.set(e,{meta:n,state:t}),void this.emit(e,n,t)}this.rows.set(e,{meta:o,state:t}),this.emit(e,o,t)}emit(e,t,n){for(const r of this.listeners)try{r({key:e,meta:t,state:n})}catch{}}counts(){return fd(Array.from(this.rows.values()).map(e=>({state:e.state})))}}const hd="[",gd=`${hd}?25l`,md=`${hd}?25h`,yd=`${hd}K`,Dd=e=>e>0?`${hd}${e}F`:"",bd=`${hd}1E`,vd=()=>{const e=process.stdout;let t=0;return{start(){try{e.write(gd)}catch{}},write(n){try{const r=n.endsWith("\n")?n:`${n}\n`;(n=>{let r="";t>0&&(r+=Dd(t));for(let e=0;e<n.length;e+=1){const o=n[e]??"";r+=0===t&&0===e&&""===o?"\n":`\r${yd}${o}\n`}const o=t-n.length;for(let e=0;e<o;e+=1)r+=`\r${yd}`,e<o-1&&(r+=bd);e.write(r),t=n.length})(r.split("\n"))}catch{}},clear(){try{let n="";t>0&&(n+=Dd(t));for(let e=0;e<t;e+=1)n+=`\r${yd}\n`;e.write(n),t=0}catch{}},done(){try{e.write(md)}catch{}}}},wd=e=>{if(bf()){if("warn"===e)return"[WARN]";switch(e){case"waiting":return"[WAIT]";case"run":return"[RUN]";case"ok":return"[OK]";case"error":return"[FAIL]";case"cancelled":return"[CANCELLED]";case"timeout":return"[TIMEOUT]";case"quiet":return"[QUIET]";case"stalled":return"[STALLED]";case"killed":return"[KILLED]";default:return""}}switch(e){case"warn":return Cf("⚠︎ warn");case"waiting":return Sf("⏸︎ waiting");case"run":return _f("▶︎ run");case"ok":return vf("✔︎ ok");case"error":return Ef("✖︎ fail");case"cancelled":return Af("◼︎ cancelled");case"timeout":return Ef("⏱︎ timeout");case"quiet":return wf("⏱︎ quiet");case"stalled":return Cf("⏱︎ stalled");case"killed":return Ef("◼︎ killed");default:return""}};var _d,Ed,Ad,Sd,Cd={},kd={},Pd={},Rd={},xd={exports:{}};function Od(){return Ed?_d:(Ed=1,_d=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})}function Fd(){if(Sd)return Ad;Sd=1;const e=Od();return Ad=t=>"string"==typeof t?t.replace(e(),""):t}var Td,$d,Ld,Nd,Md={exports:{}};function Bd(){if(Td)return Md.exports;Td=1;const e=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));return Md.exports=e,Md.exports.default=e,Md.exports}function Id(){return Ld?$d:(Ld=1,$d=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g})}function jd(){if(Nd)return xd.exports;Nd=1;const e=Fd(),t=Bd(),n=Id(),r=r=>{if("string"!=typeof r||0===r.length)return 0;if(0===(r=e(r)).length)return 0;r=r.replace(n()," ");let o=0;for(let e=0;e<r.length;e++){const n=r.codePointAt(e);n<=31||n>=127&&n<=159||(n>=768&&n<=879||(n>65535&&e++,o+=t(n)?2:1))}return o};return xd.exports=r,xd.exports.default=r,xd.exports}var Hd,zd,Ud={};var qd,Kd,Gd,Wd,Vd,Zd,Jd,Yd,Qd,Xd,eh,th={exports:{}};function nh(){if(Wd)return Gd;Wd=1;const e=Kd?qd:(Kd=1,qd={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Gd=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}function r(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=i-o;let a,u;i===o?a=0:t===i?a=(n-r)/s:n===i?a=2+(r-t)/s:r===i&&(a=4+(t-n)/s),a=Math.min(60*a,360),a<0&&(a+=360);const c=(o+i)/2;return u=i===o?0:c<=.5?s/(i+o):s/(2-i-o),[a,100*u,100*c]},n.rgb.hsv=function(e){let t,n,r,o,i;const s=e[0]/255,a=e[1]/255,u=e[2]/255,c=Math.max(s,a,u),l=c-Math.min(s,a,u),p=function(e){return(c-e)/6/l+.5};return 0===l?(o=0,i=0):(i=l/c,t=p(s),n=p(a),r=p(u),s===c?o=r-n:a===c?o=1/3+t-r:u===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*c]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let o=e[2];const i=n.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(r,o));return o=1-1/255*Math.max(t,Math.max(r,o)),[i,100*s,100*o]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},n.rgb.keyword=function(n){const o=t[n];if(o)return o;let i,s=1/0;for(const t of Object.keys(e)){const o=r(n,e[t]);o<s&&(s=o,i=t)}return i},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],o=t[1],i=t[2];r/=95.047,o/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*o-16,500*(r-o),200*(o-i)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,i,s;if(0===n)return s=255*r,[s,s,s];o=r<.5?r*(1+n):r+n-r*n;const a=2*r-o,u=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,s=6*i<1?a+6*(o-a)*i:2*i<1?o:3*i<2?a+(o-a)*(2/3-i)*6:a,u[e]=255*s;return u},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const i=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=i<=1?i:2-i;return[t,100*(0===r?2*o/(i+o):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,i=t-Math.floor(t),s=255*r*(1-n),a=255*r*(1-n*i),u=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,u,s];case 1:return[a,r,s];case 2:return[s,r,u];case 3:return[s,a,r];case 4:return[u,s,r];case 5:return[r,s,a]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let i,s;s=(2-n)*r;const a=(2-n)*o;return i=n*o,i/=a<=1?a:2-a,i=i||0,s/=2,[t,100*i,100*s]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let i;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),a=1-r;i=6*t-s,1&s&&(i=1-i);const u=n+i*(a-n);let c,l,p;switch(s){default:case 6:case 0:c=a,l=u,p=n;break;case 1:c=u,l=a,p=n;break;case 2:c=n,l=a,p=u;break;case 3:c=n,l=u,p=a;break;case 4:c=u,l=n,p=a;break;case 5:c=a,l=n,p=u}return[255*c,255*l,255*p]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,i,s;return o=3.2406*t+-1.5372*n+-.4986*r,i=-.9689*t+1.8758*n+.0415*r,s=.0557*t+-.204*n+1.057*r,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),[255*o,255*i,255*s]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const o=n**3,i=t**3,s=r**3;return n=o>.008856?o:(n-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=360*Math.atan2(r,n)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(n*n+r*r),o]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,o,i]=e;let s=null===t?n.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),0===s)return 30;let a=30+(Math.round(i/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return 2===s&&(a+=60),a},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map(e=>e+e).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),i=Math.min(Math.min(t,n),r),s=o-i;let a,u;return a=s<1?i/(1-s):0,u=s<=0?0:o===t?(n-r)/s%6:o===n?2+(r-t)/s:4+(t-n)/s,u/=6,u%=1,[360*u,100*s,100*a]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const o=[0,0,0],i=t%1*6,s=i%1,a=1-s;let u=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=a,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=a,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=a}return u=(1-n)*r,[255*(n*o[0]+u),255*(n*o[1]+u),255*(n*o[2]+u)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},Gd}function rh(){if(Zd)return Vd;Zd=1;const e=nh();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),o=Object.keys(e[t]);for(let e=o.length,i=0;i<e;i++){const e=o[i],s=n[e];-1===s.distance&&(s.distance=n[t].distance+1,s.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const o=[r[t].parent,t];let i=e[r[t].parent][t],s=r[t].parent;for(;r[s].parent;)o.unshift(r[s].parent),i=n(e[r[s].parent][s],i),s=r[s].parent;return i.conversion=o,i}return Vd=function(e){const n=t(e),o={},i=Object.keys(n);for(let e=i.length,t=0;t<e;t++){const e=i[t];null!==n[e].parent&&(o[e]=r(e,n))}return o},Vd}function oh(){if(Yd)return Jd;Yd=1;const e=nh(),t=rh(),n={};return Object.keys(e).forEach(r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const o=t(r);Object.keys(o).forEach(e=>{const t=o[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)})}),Jd=n}function ih(){return Qd||(Qd=1,function(e){const t=(e,t)=>(...n)=>`[${e(...n)+t}m`,n=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`},r=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`},o=e=>e,i=(e,t,n)=>[e,t,n],s=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let a;const u=(e,t,n,r)=>{void 0===a&&(a=oh());const o=r?10:0,i={};for(const[r,s]of Object.entries(a)){const a="ansi16"===r?"ansi":r;r===t?i[a]=e(n,o):"object"==typeof s&&(i[a]=e(s[t],o))}return i};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.gray=a.color.blackBright,a.bgColor.bgGray=a.bgColor.bgBlackBright,a.color.grey=a.color.blackBright,a.bgColor.bgGrey=a.bgColor.bgBlackBright;for(const[t,n]of Object.entries(a)){for(const[t,r]of Object.entries(n))a[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=a[t],e.set(r[0],r[1]);Object.defineProperty(a,t,{value:n,enumerable:!1})}return Object.defineProperty(a,"codes",{value:e,enumerable:!1}),a.color.close="",a.bgColor.close="",s(a.color,"ansi",()=>u(t,"ansi16",o,!1)),s(a.color,"ansi256",()=>u(n,"ansi256",o,!1)),s(a.color,"ansi16m",()=>u(r,"rgb",i,!1)),s(a.bgColor,"ansi",()=>u(t,"ansi16",o,!0)),s(a.bgColor,"ansi256",()=>u(n,"ansi256",o,!0)),s(a.bgColor,"ansi16m",()=>u(r,"rgb",i,!0)),a}})}(th)),th.exports}function sh(){if(eh)return Xd;eh=1;const e=Bd(),t=function(){if(zd)return Hd;zd=1;const e="[\ud800-\udbff][\udc00-\udfff]";return Hd=t=>t&&t.exact?new RegExp(`^${e}$`):new RegExp(e,"g")}(),n=ih(),r=["","›"],o=e=>`${r[0]}[${e}m`,i=(e,t,r)=>{let i=[];e=[...e];for(let r of e){const s=r;r.includes(";")&&(r=r.split(";")[0][0]+"0");const a=n.codes.get(Number.parseInt(r,10));if(a){const n=e.indexOf(a.toString());-1===n?i.push(o(t?a:s)):e.splice(n,1)}else{if(t){i.push(o(0));break}i.push(o(s))}}if(t&&(i=i.filter((e,t)=>i.indexOf(e)===t),void 0!==r)){const e=o(n.codes.get(Number.parseInt(r,10)));i=i.reduce((t,n)=>n===e?[n,...t]:[...t,n],[])}return i.join("")};return Xd=(n,o,s)=>{const a=[...n],u=[];let c,l="number"==typeof s?s:a.length,p=!1,f=0,d="";for(const[h,g]of a.entries()){let a=!1;if(r.includes(g)){const e=/\d[^m]*/.exec(n.slice(h,h+18));c=e&&e.length>0?e[0]:void 0,f<l&&(p=!0,void 0!==c&&u.push(c))}else p&&"m"===g&&(p=!1,a=!0);if(p||a||f++,!t({exact:!0}).test(g)&&e(g.codePointAt())&&(f++,"number"!=typeof s&&l++),f>o&&f<=l)d+=g;else if(f!==o||p||void 0===c){if(f>=l){d+=i(u,!0,c);break}}else d=i(u)}return d}}var ah,uh,ch,lh,ph={};function fh(){if(ah)return ph;ah=1,Object.defineProperty(ph,"__esModule",{value:!0}),ph.getBorderCharacters=void 0;return ph.getBorderCharacters=e=>{if("honeywell"===e)return{topBody:"═",topJoin:"╤",topLeft:"╔",topRight:"╗",bottomBody:"═",bottomJoin:"╧",bottomLeft:"╚",bottomRight:"╝",bodyLeft:"║",bodyRight:"║",bodyJoin:"│",headerJoin:"┬",joinBody:"─",joinLeft:"╟",joinRight:"╢",joinJoin:"┼",joinMiddleDown:"┬",joinMiddleUp:"┴",joinMiddleLeft:"┤",joinMiddleRight:"├"};if("norc"===e)return{topBody:"─",topJoin:"┬",topLeft:"┌",topRight:"┐",bottomBody:"─",bottomJoin:"┴",bottomLeft:"└",bottomRight:"┘",bodyLeft:"│",bodyRight:"│",bodyJoin:"│",headerJoin:"┬",joinBody:"─",joinLeft:"├",joinRight:"┤",joinJoin:"┼",joinMiddleDown:"┬",joinMiddleUp:"┴",joinMiddleLeft:"┤",joinMiddleRight:"├"};if("ramac"===e)return{topBody:"-",topJoin:"+",topLeft:"+",topRight:"+",bottomBody:"-",bottomJoin:"+",bottomLeft:"+",bottomRight:"+",bodyLeft:"|",bodyRight:"|",bodyJoin:"|",headerJoin:"+",joinBody:"-",joinLeft:"|",joinRight:"|",joinJoin:"|",joinMiddleDown:"+",joinMiddleUp:"+",joinMiddleLeft:"+",joinMiddleRight:"+"};if("void"===e)return{topBody:"",topJoin:"",topLeft:"",topRight:"",bottomBody:"",bottomJoin:"",bottomLeft:"",bottomRight:"",bodyLeft:"",bodyRight:"",bodyJoin:"",headerJoin:"",joinBody:"",joinLeft:"",joinRight:"",joinJoin:"",joinMiddleDown:"",joinMiddleUp:"",joinMiddleLeft:"",joinMiddleRight:""};throw new Error('Unknown border template "'+e+'".')},ph}function dh(){if(uh)return Ud;uh=1;var e=Ud&&Ud.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ud,"__esModule",{value:!0}),Ud.isCellInRange=Ud.areCellEqual=Ud.calculateRangeCoordinate=Ud.flatten=Ud.extractTruncates=Ud.sumArray=Ud.sequence=Ud.distributeUnevenly=Ud.countSpaceSequence=Ud.groupBySizes=Ud.makeBorderConfig=Ud.splitAnsi=Ud.normalizeString=void 0;const t=e(sh()),n=e(jd()),r=e(Fd()),o=fh();Ud.normalizeString=e=>e.replace(/\r\n/g,"\n");Ud.splitAnsi=e=>{const o=(0,r.default)(e).split("\n").map(n.default),i=[];let s=0;return o.forEach(n=>{i.push(0===n?"":(0,t.default)(e,s,s+n)),s+=n+1}),i};Ud.makeBorderConfig=e=>({...(0,o.getBorderCharacters)("honeywell"),...e});Ud.groupBySizes=(e,t)=>{let n=0;return t.map(t=>{const r=e.slice(n,n+t);return n+=t,r})};Ud.countSpaceSequence=e=>{var t,n;return null!==(n=null===(t=e.match(/\s+/g))||void 0===t?void 0:t.length)&&void 0!==n?n:0};Ud.distributeUnevenly=(e,t)=>Array.from({length:t}).fill(Math.floor(e/t)).map((n,r)=>n+(r<e%t?1:0));Ud.sequence=(e,t)=>Array.from({length:t-e+1},(t,n)=>n+e);Ud.sumArray=e=>e.reduce((e,t)=>e+t,0);Ud.extractTruncates=e=>e.columns.map(({truncate:e})=>e);Ud.flatten=e=>[].concat(...e);Ud.calculateRangeCoordinate=e=>{const{row:t,col:n,colSpan:r=1,rowSpan:o=1}=e;return{bottomRight:{col:n+r-1,row:t+o-1},topLeft:{col:n,row:t}}};Ud.areCellEqual=(e,t)=>e.row===t.row&&e.col===t.col;return Ud.isCellInRange=(e,{topLeft:t,bottomRight:n})=>t.row<=e.row&&e.row<=n.row&&t.col<=e.col&&e.col<=n.col,Ud}function hh(){if(ch)return Rd;ch=1;var e=Rd&&Rd.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rd,"__esModule",{value:!0}),Rd.alignString=void 0;const t=e(jd()),n=dh(),r=(e,t)=>e+" ".repeat(t);return Rd.alignString=(e,o,i)=>{const s=(0,t.default)(e);if(s===o)return e;if(s>o)throw new Error("Subject parameter value width cannot be greater than the container width.");if(0===s)return" ".repeat(o);const a=o-s;return"left"===i?r(e,a):"right"===i?((e,t)=>" ".repeat(t)+e)(e,a):"justify"===i?((e,t)=>{const o=(0,n.countSpaceSequence)(e);if(0===o)return r(e,t);const i=(0,n.distributeUnevenly)(t,o);if(Math.max(...i)>3)return r(e,t);let s=0;return e.replace(/\s+/g,e=>e+" ".repeat(i[s++]))})(e,a):((e,t)=>" ".repeat(Math.floor(t/2))+e+" ".repeat(Math.ceil(t/2)))(e,a)},Rd}function gh(){if(lh)return Pd;lh=1,Object.defineProperty(Pd,"__esModule",{value:!0}),Pd.alignTableData=void 0;const e=hh();return Pd.alignTableData=(t,n)=>t.map((t,r)=>t.map((t,o)=>{var i;const{width:s,alignment:a}=n.columns[o];return(null===(i=n.spanningCellManager)||void 0===i?void 0:i.getContainingRange({col:o,row:r},{mapped:!0}))?t:(0,e.alignString)(t,s,a)})),Pd}var mh,yh={},Dh={},bh={},vh={};function wh(){if(mh)return vh;mh=1;var e=vh&&vh.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vh,"__esModule",{value:!0}),vh.wrapString=void 0;const t=e(sh()),n=e(jd());return vh.wrapString=(e,r)=>{let o=e;const i=[];do{i.push((0,t.default)(o,0,r)),o=(0,t.default)(o,r).trim()}while((0,n.default)(o));return i},vh}var _h,Eh,Ah,Sh,Ch={};function kh(){if(_h)return Ch;_h=1;var e=Ch&&Ch.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ch,"__esModule",{value:!0}),Ch.wrapWord=void 0;const t=e(sh()),n=e(Fd());return Ch.wrapWord=(e,r)=>{const o=[];let i=0;return((e,t)=>{let r=(0,n.default)(e);const o=[],i=new RegExp("(^.{1,"+String(Math.max(t,1))+"}(\\s+|$))|(^.{1,"+String(Math.max(t-1,1))+"}(\\\\|/|_|\\.|,|;|-))");do{let e;const n=i.exec(r);if(n){e=n[0],r=r.slice(e.length);const t=e.trim().length,i=e.length-t;o.push([t,i])}else e=r.slice(0,t),r=r.slice(t),o.push([e.length,0])}while(r.length);return o})(e,r).forEach(([n,r])=>{o.push((0,t.default)(e,i,i+n)),i+=n+r}),o},Ch}function Ph(){if(Eh)return bh;Eh=1,Object.defineProperty(bh,"__esModule",{value:!0}),bh.wrapCell=void 0;const e=dh(),t=wh(),n=kh();return bh.wrapCell=(r,o,i)=>{const s=(0,e.splitAnsi)(r);for(let e=0;e<s.length;){let r;r=i?(0,n.wrapWord)(s[e],o):(0,t.wrapString)(s[e],o),s.splice(e,1,...r),e+=r.length}return s},bh}function Rh(){if(Ah)return Dh;Ah=1,Object.defineProperty(Dh,"__esModule",{value:!0}),Dh.calculateCellHeight=void 0;const e=Ph();return Dh.calculateCellHeight=(t,n,r=!1)=>(0,e.wrapCell)(t,n,r).length,Dh}function xh(){if(Sh)return yh;Sh=1,Object.defineProperty(yh,"__esModule",{value:!0}),yh.calculateRowHeights=void 0;const e=Rh(),t=dh();return yh.calculateRowHeights=(n,r)=>{const o=[];for(const[i,s]of n.entries()){let a=1;s.forEach((s,u)=>{var c;const l=null===(c=r.spanningCellManager)||void 0===c?void 0:c.getContainingRange({col:u,row:i});if(!l){const t=(0,e.calculateCellHeight)(s,r.columns[u].width,r.columns[u].wrapWord);return void(a=Math.max(a,t))}const{topLeft:p,bottomRight:f,height:d}=l;if(i===f.row){const e=(0,t.sumArray)(o.slice(p.row)),i=f.row-p.row,s=(0,t.sequence)(p.row+1,f.row).filter(e=>{var t;return!(null===(t=r.drawHorizontalLine)||void 0===t?void 0:t.call(r,e,n.length))}).length,u=d-e-i+s;a=Math.max(a,u)}}),o.push(a)}return o},yh}var Oh,Fh,Th={},$h={};function Lh(){if(Oh)return $h;Oh=1,Object.defineProperty($h,"__esModule",{value:!0}),$h.drawContent=void 0;return $h.drawContent=e=>{const{contents:t,separatorGetter:n,drawSeparator:r,spanningCellManager:o,rowIndex:i,elementType:s}=e,a=t.length,u=[];return r(0,a)&&u.push(n(0,a)),t.forEach((e,t)=>{if(s&&"border"!==s&&"row"!==s||u.push(e),"cell"===s&&void 0===i&&u.push(e),"cell"===s&&void 0!==i){const n=null==o?void 0:o.getContainingRange({col:t,row:i});n&&t!==n.topLeft.col||u.push(e)}if(t+1<a&&r(t+1,a)){const e=n(t+1,a);if("cell"===s&&void 0!==i){const n={col:t+1,row:i},r=null==o?void 0:o.getContainingRange(n);r&&r.topLeft.col!==n.col||u.push(e)}else u.push(e)}}),r(a,a)&&u.push(n(a,a)),u.join("")},$h}function Nh(){return Fh||(Fh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createTableBorderGetter=e.drawBorderBottom=e.drawBorderJoin=e.drawBorderTop=e.drawBorder=e.createSeparatorGetter=e.drawBorderSegments=void 0;const t=Lh();e.drawBorderSegments=(e,t)=>{const{separator:n,horizontalBorderIndex:r,spanningCellManager:o}=t;return e.map((e,t)=>{const i=n.body.repeat(e);if(void 0===r)return i;const s=null==o?void 0:o.getContainingRange({col:t,row:r});if(!s)return i;const{topLeft:a}=s;return r===a.row?i:t!==a.col?"":s.extractBorderContent(r)})};e.createSeparatorGetter=e=>{const{separator:t,spanningCellManager:n,horizontalBorderIndex:r,rowCount:o}=e;return(e,i)=>{const s=null==n?void 0:n.inSameRange;if(void 0!==r&&s){const n={col:e,row:r-1},a={col:e-1,row:r},u={col:e-1,row:r-1},c={col:e,row:r},l=[[u,n],[n,c],[c,a],[a,u]];if(0===e)return s(c,n)&&t.bodyJoinOuter?t.bodyJoinOuter:t.left;if(e===i)return s(u,a)&&t.bodyJoinOuter?t.bodyJoinOuter:t.right;if(0===r)return s(c,a)?t.body:t.join;if(r===o)return s(n,u)?t.body:t.join;const p=l.map(e=>s(...e)).filter(Boolean).length;if(0===p)return t.join;if(4===p)return"";if(2===p)return s(...l[1])&&s(...l[3])&&t.bodyJoinInner?t.bodyJoinInner:t.body;if(1===p){if(!(t.joinRight&&t.joinLeft&&t.joinUp&&t.joinDown))throw new Error(`Can not get border separator for position [${r}, ${e}]`);return s(...l[0])?t.joinDown:s(...l[1])?t.joinLeft:s(...l[2])?t.joinUp:t.joinRight}throw new Error("Invalid case")}return 0===e?t.left:e===i?t.right:t.join}};e.drawBorder=(n,r)=>{const o=(0,e.drawBorderSegments)(n,r),{drawVerticalLine:i,horizontalBorderIndex:s,spanningCellManager:a}=r;return(0,t.drawContent)({contents:o,drawSeparator:i,elementType:"border",rowIndex:s,separatorGetter:(0,e.createSeparatorGetter)(r),spanningCellManager:a})+"\n"};e.drawBorderTop=(t,n)=>{const{border:r}=n,o=(0,e.drawBorder)(t,{...n,separator:{body:r.topBody,join:r.topJoin,left:r.topLeft,right:r.topRight}});return"\n"===o?"":o};e.drawBorderJoin=(t,n)=>{const{border:r}=n;return(0,e.drawBorder)(t,{...n,separator:{body:r.joinBody,bodyJoinInner:r.bodyJoin,bodyJoinOuter:r.bodyLeft,join:r.joinJoin,joinDown:r.joinMiddleDown,joinLeft:r.joinMiddleLeft,joinRight:r.joinMiddleRight,joinUp:r.joinMiddleUp,left:r.joinLeft,right:r.joinRight}})};e.drawBorderBottom=(t,n)=>{const{border:r}=n;return(0,e.drawBorder)(t,{...n,separator:{body:r.bottomBody,join:r.bottomJoin,left:r.bottomLeft,right:r.bottomRight}})};e.createTableBorderGetter=(t,n)=>(r,o)=>{const i={...n,horizontalBorderIndex:r};return 0===r?(0,e.drawBorderTop)(t,i):r===o?(0,e.drawBorderBottom)(t,i):(0,e.drawBorderJoin)(t,i)}}(Th)),Th}var Mh,Bh={};function Ih(){if(Mh)return Bh;Mh=1,Object.defineProperty(Bh,"__esModule",{value:!0}),Bh.drawRow=void 0;const e=Lh();return Bh.drawRow=(t,n)=>{const{border:r,drawVerticalLine:o,rowIndex:i,spanningCellManager:s}=n;return(0,e.drawContent)({contents:t,drawSeparator:o,elementType:"cell",rowIndex:i,separatorGetter:(e,t)=>0===e?r.bodyLeft:e===t?r.bodyRight:r.bodyJoin,spanningCellManager:s})+"\n"},Bh}var jh,Hh,zh,Uh,qh,Kh,Gh={},Wh={},Vh={},Zh={};function Jh(){if(zh)return Zh;zh=1,Object.defineProperty(Zh,"__esModule",{value:!0});const e=(Hh||(Hh=1,jh=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!==o--;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}),jh);return e.code='require("ajv/dist/runtime/equal").default',Zh.default=e,Zh}function Yh(){return Uh||(Uh=1,function(e){e["config.json"]=function e(n,{instancePath:o="",parentData:s,parentDataProperty:u,rootData:c=n}={}){let l=null,p=0;if(n&&"object"==typeof n&&!Array.isArray(n)){for(const e in n)if("border"!==e&&"header"!==e&&"columns"!==e&&"columnDefault"!==e&&"drawVerticalLine"!==e&&"drawHorizontalLine"!==e&&"singleLine"!==e&&"spanningCells"!==e){const t={instancePath:o,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===l?l=[t]:l.push(t),p++}if(void 0!==n.border&&(i(n.border,{instancePath:o+"/border",parentData:n,parentDataProperty:"border",rootData:c})||(l=null===l?i.errors:l.concat(i.errors),p=l.length)),void 0!==n.header){let e=n.header;if(e&&"object"==typeof e&&!Array.isArray(e)){if(void 0===e.content){const e={instancePath:o+"/header",schemaPath:"#/properties/header/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};null===l?l=[e]:l.push(e),p++}for(const t in e)if("content"!==t&&"alignment"!==t&&"wrapWord"!==t&&"truncate"!==t&&"paddingLeft"!==t&&"paddingRight"!==t){const e={instancePath:o+"/header",schemaPath:"#/properties/header/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:t},message:"must NOT have additional properties"};null===l?l=[e]:l.push(e),p++}if(void 0!==e.content&&"string"!=typeof e.content){const e={instancePath:o+"/header/content",schemaPath:"#/properties/header/properties/content/type",keyword:"type",params:{type:"string"},message:"must be string"};null===l?l=[e]:l.push(e),p++}if(void 0!==e.alignment&&(a(e.alignment,{instancePath:o+"/header/alignment",parentData:e,parentDataProperty:"alignment",rootData:c})||(l=null===l?a.errors:l.concat(a.errors),p=l.length)),void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:o+"/header/wrapWord",schemaPath:"#/properties/header/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===l?l=[e]:l.push(e),p++}if(void 0!==e.truncate){let t=e.truncate;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:o+"/header/truncate",schemaPath:"#/properties/header/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}}if(void 0!==e.paddingLeft){let t=e.paddingLeft;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:o+"/header/paddingLeft",schemaPath:"#/properties/header/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}}if(void 0!==e.paddingRight){let t=e.paddingRight;if("number"!=typeof t||t%1||isNaN(t)||!isFinite(t)){const e={instancePath:o+"/header/paddingRight",schemaPath:"#/properties/header/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}}}else{const e={instancePath:o+"/header",schemaPath:"#/properties/header/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),p++}}if(void 0!==n.columns&&(d(n.columns,{instancePath:o+"/columns",parentData:n,parentDataProperty:"columns",rootData:c})||(l=null===l?d.errors:l.concat(d.errors),p=l.length)),void 0!==n.columnDefault&&(h(n.columnDefault,{instancePath:o+"/columnDefault",parentData:n,parentDataProperty:"columnDefault",rootData:c})||(l=null===l?h.errors:l.concat(h.errors),p=l.length)),void 0!==n.drawVerticalLine&&"function"!=typeof n.drawVerticalLine){const e={instancePath:o+"/drawVerticalLine",schemaPath:"#/properties/drawVerticalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),p++}if(void 0!==n.drawHorizontalLine&&"function"!=typeof n.drawHorizontalLine){const e={instancePath:o+"/drawHorizontalLine",schemaPath:"#/properties/drawHorizontalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),p++}if(void 0!==n.singleLine&&"boolean"!=typeof n.singleLine){const e={instancePath:o+"/singleLine",schemaPath:"#/properties/singleLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===l?l=[e]:l.push(e),p++}if(void 0!==n.spanningCells){let e=n.spanningCells;if(Array.isArray(e)){const n=e.length;for(let i=0;i<n;i++){let n=e[i];if(n&&"object"==typeof n&&!Array.isArray(n)){if(void 0===n.row){const e={instancePath:o+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/required",keyword:"required",params:{missingProperty:"row"},message:"must have required property 'row'"};null===l?l=[e]:l.push(e),p++}if(void 0===n.col){const e={instancePath:o+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/required",keyword:"required",params:{missingProperty:"col"},message:"must have required property 'col'"};null===l?l=[e]:l.push(e),p++}for(const e in n)if(!r.call(t.properties.spanningCells.items.properties,e)){const t={instancePath:o+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===l?l=[t]:l.push(t),p++}if(void 0!==n.col){let e=n.col;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:o+"/spanningCells/"+i+"/col",schemaPath:"#/properties/spanningCells/items/properties/col/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}if("number"==typeof e&&isFinite(e)&&(e<0||isNaN(e))){const e={instancePath:o+"/spanningCells/"+i+"/col",schemaPath:"#/properties/spanningCells/items/properties/col/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===l?l=[e]:l.push(e),p++}}if(void 0!==n.row){let e=n.row;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:o+"/spanningCells/"+i+"/row",schemaPath:"#/properties/spanningCells/items/properties/row/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}if("number"==typeof e&&isFinite(e)&&(e<0||isNaN(e))){const e={instancePath:o+"/spanningCells/"+i+"/row",schemaPath:"#/properties/spanningCells/items/properties/row/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===l?l=[e]:l.push(e),p++}}if(void 0!==n.colSpan){let e=n.colSpan;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:o+"/spanningCells/"+i+"/colSpan",schemaPath:"#/properties/spanningCells/items/properties/colSpan/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:o+"/spanningCells/"+i+"/colSpan",schemaPath:"#/properties/spanningCells/items/properties/colSpan/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===l?l=[e]:l.push(e),p++}}if(void 0!==n.rowSpan){let e=n.rowSpan;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:o+"/spanningCells/"+i+"/rowSpan",schemaPath:"#/properties/spanningCells/items/properties/rowSpan/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:o+"/spanningCells/"+i+"/rowSpan",schemaPath:"#/properties/spanningCells/items/properties/rowSpan/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===l?l=[e]:l.push(e),p++}}if(void 0!==n.alignment&&(a(n.alignment,{instancePath:o+"/spanningCells/"+i+"/alignment",parentData:n,parentDataProperty:"alignment",rootData:c})||(l=null===l?a.errors:l.concat(a.errors),p=l.length)),void 0!==n.verticalAlignment&&(g(n.verticalAlignment,{instancePath:o+"/spanningCells/"+i+"/verticalAlignment",parentData:n,parentDataProperty:"verticalAlignment",rootData:c})||(l=null===l?g.errors:l.concat(g.errors),p=l.length)),void 0!==n.wrapWord&&"boolean"!=typeof n.wrapWord){const e={instancePath:o+"/spanningCells/"+i+"/wrapWord",schemaPath:"#/properties/spanningCells/items/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===l?l=[e]:l.push(e),p++}if(void 0!==n.truncate){let e=n.truncate;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:o+"/spanningCells/"+i+"/truncate",schemaPath:"#/properties/spanningCells/items/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}}if(void 0!==n.paddingLeft){let e=n.paddingLeft;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:o+"/spanningCells/"+i+"/paddingLeft",schemaPath:"#/properties/spanningCells/items/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}}if(void 0!==n.paddingRight){let e=n.paddingRight;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:o+"/spanningCells/"+i+"/paddingRight",schemaPath:"#/properties/spanningCells/items/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===l?l=[e]:l.push(e),p++}}}else{const e={instancePath:o+"/spanningCells/"+i,schemaPath:"#/properties/spanningCells/items/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),p++}}}else{const e={instancePath:o+"/spanningCells",schemaPath:"#/properties/spanningCells/type",keyword:"type",params:{type:"array"},message:"must be array"};null===l?l=[e]:l.push(e),p++}}}else{const e={instancePath:o,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===l?l=[e]:l.push(e),p++}return e.errors=l,0===p};const t={properties:{spanningCells:{items:{properties:{col:{type:"integer",minimum:0},row:{type:"integer",minimum:0},colSpan:{type:"integer",minimum:1},rowSpan:{type:"integer",minimum:1},alignment:{$ref:"shared.json#/definitions/alignment"},verticalAlignment:{$ref:"shared.json#/definitions/verticalAlignment"},wrapWord:{type:"boolean"},truncate:{type:"integer"},paddingLeft:{type:"integer"},paddingRight:{type:"integer"}}}}}},n={properties:{topBody:{$ref:"#/definitions/border"},topJoin:{$ref:"#/definitions/border"},topLeft:{$ref:"#/definitions/border"},topRight:{$ref:"#/definitions/border"},bottomBody:{$ref:"#/definitions/border"},bottomJoin:{$ref:"#/definitions/border"},bottomLeft:{$ref:"#/definitions/border"},bottomRight:{$ref:"#/definitions/border"},bodyLeft:{$ref:"#/definitions/border"},bodyRight:{$ref:"#/definitions/border"},bodyJoin:{$ref:"#/definitions/border"},headerJoin:{$ref:"#/definitions/border"},joinBody:{$ref:"#/definitions/border"},joinLeft:{$ref:"#/definitions/border"},joinRight:{$ref:"#/definitions/border"},joinJoin:{$ref:"#/definitions/border"},joinMiddleUp:{$ref:"#/definitions/border"},joinMiddleDown:{$ref:"#/definitions/border"},joinMiddleLeft:{$ref:"#/definitions/border"},joinMiddleRight:{$ref:"#/definitions/border"}}},r=Object.prototype.hasOwnProperty;function o(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:i=e}={}){let s=null,a=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===s?s=[e]:s.push(e),a++}return o.errors=s,0===a}function i(e,{instancePath:t="",parentData:s,parentDataProperty:a,rootData:u=e}={}){let c=null,l=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const o in e)if(!r.call(n.properties,o)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};null===c?c=[e]:c.push(e),l++}void 0!==e.topBody&&(o(e.topBody,{instancePath:t+"/topBody",parentData:e,parentDataProperty:"topBody",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.topJoin&&(o(e.topJoin,{instancePath:t+"/topJoin",parentData:e,parentDataProperty:"topJoin",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.topLeft&&(o(e.topLeft,{instancePath:t+"/topLeft",parentData:e,parentDataProperty:"topLeft",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.topRight&&(o(e.topRight,{instancePath:t+"/topRight",parentData:e,parentDataProperty:"topRight",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.bottomBody&&(o(e.bottomBody,{instancePath:t+"/bottomBody",parentData:e,parentDataProperty:"bottomBody",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.bottomJoin&&(o(e.bottomJoin,{instancePath:t+"/bottomJoin",parentData:e,parentDataProperty:"bottomJoin",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.bottomLeft&&(o(e.bottomLeft,{instancePath:t+"/bottomLeft",parentData:e,parentDataProperty:"bottomLeft",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.bottomRight&&(o(e.bottomRight,{instancePath:t+"/bottomRight",parentData:e,parentDataProperty:"bottomRight",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.bodyLeft&&(o(e.bodyLeft,{instancePath:t+"/bodyLeft",parentData:e,parentDataProperty:"bodyLeft",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.bodyRight&&(o(e.bodyRight,{instancePath:t+"/bodyRight",parentData:e,parentDataProperty:"bodyRight",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.bodyJoin&&(o(e.bodyJoin,{instancePath:t+"/bodyJoin",parentData:e,parentDataProperty:"bodyJoin",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.headerJoin&&(o(e.headerJoin,{instancePath:t+"/headerJoin",parentData:e,parentDataProperty:"headerJoin",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinBody&&(o(e.joinBody,{instancePath:t+"/joinBody",parentData:e,parentDataProperty:"joinBody",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinLeft&&(o(e.joinLeft,{instancePath:t+"/joinLeft",parentData:e,parentDataProperty:"joinLeft",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinRight&&(o(e.joinRight,{instancePath:t+"/joinRight",parentData:e,parentDataProperty:"joinRight",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinJoin&&(o(e.joinJoin,{instancePath:t+"/joinJoin",parentData:e,parentDataProperty:"joinJoin",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinMiddleUp&&(o(e.joinMiddleUp,{instancePath:t+"/joinMiddleUp",parentData:e,parentDataProperty:"joinMiddleUp",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinMiddleDown&&(o(e.joinMiddleDown,{instancePath:t+"/joinMiddleDown",parentData:e,parentDataProperty:"joinMiddleDown",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinMiddleLeft&&(o(e.joinMiddleLeft,{instancePath:t+"/joinMiddleLeft",parentData:e,parentDataProperty:"joinMiddleLeft",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length)),void 0!==e.joinMiddleRight&&(o(e.joinMiddleRight,{instancePath:t+"/joinMiddleRight",parentData:e,parentDataProperty:"joinMiddleRight",rootData:u})||(c=null===c?o.errors:c.concat(o.errors),l=c.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===c?c=[e]:c.push(e),l++}return i.errors=c,0===l}const s={enum:["left","right","center","justify"]};function a(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,u=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),u++}if("left"!==e&&"right"!==e&&"center"!==e&&"justify"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:s.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),u++}return a.errors=i,0===u}Jh().default;const u=new RegExp("^[0-9]+$","u");function c(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,a=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),a++}if("left"!==e&&"right"!==e&&"center"!==e&&"justify"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:s.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),a++}return c.errors=i,0===a}const l={enum:["top","middle","bottom"]};function p(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,s=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),s++}if("top"!==e&&"middle"!==e&&"bottom"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:l.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),s++}return p.errors=i,0===s}function f(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,s=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),s++}if(void 0!==e.alignment&&(c(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:o})||(i=null===i?c.errors:i.concat(c.errors),s=i.length)),void 0!==e.verticalAlignment&&(p(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:o})||(i=null===i?p.errors:i.concat(p.errors),s=i.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===i?i=[e]:i.push(e),s++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),s++}return f.errors=i,0===s}function d(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,s=0;const a=s;let c=!1,l=null;const p=s;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if(!u.test(n)){const e={instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),s++}for(const n in e)u.test(n)&&(f(e[n],{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:o})||(i=null===i?f.errors:i.concat(f.errors),s=i.length))}else{const e={instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),s++}(g=p===s)&&(c=!0,l=0);const h=s;if(Array.isArray(e)){const n=e.length;for(let r=0;r<n;r++)f(e[r],{instancePath:t+"/"+r,parentData:e,parentDataProperty:r,rootData:o})||(i=null===i?f.errors:i.concat(f.errors),s=i.length)}else{const e={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===i?i=[e]:i.push(e),s++}var g;if((g=h===s)&&c?(c=!1,l=[l,1]):g&&(c=!0,l=1),c)s=a,null!==i&&(a?i.length=a:i=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===i?i=[e]:i.push(e),s++}return d.errors=i,0===s}function h(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,s=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),s++}if(void 0!==e.alignment&&(c(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:o})||(i=null===i?c.errors:i.concat(c.errors),s=i.length)),void 0!==e.verticalAlignment&&(p(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:o})||(i=null===i?p.errors:i.concat(p.errors),s=i.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===i?i=[e]:i.push(e),s++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),s++}return h.errors=i,0===s}function g(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,s=0;if("string"!=typeof e){const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};null===i?i=[e]:i.push(e),s++}if("top"!==e&&"middle"!==e&&"bottom"!==e){const e={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:l.enum},message:"must be equal to one of the allowed values"};null===i?i=[e]:i.push(e),s++}return g.errors=i,0===s}function m(e,{instancePath:t="",parentData:i,parentDataProperty:s,rootData:a=e}={}){let u=null,c=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const o in e)if(!r.call(n.properties,o)){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};null===u?u=[e]:u.push(e),c++}void 0!==e.topBody&&(o(e.topBody,{instancePath:t+"/topBody",parentData:e,parentDataProperty:"topBody",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.topJoin&&(o(e.topJoin,{instancePath:t+"/topJoin",parentData:e,parentDataProperty:"topJoin",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.topLeft&&(o(e.topLeft,{instancePath:t+"/topLeft",parentData:e,parentDataProperty:"topLeft",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.topRight&&(o(e.topRight,{instancePath:t+"/topRight",parentData:e,parentDataProperty:"topRight",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.bottomBody&&(o(e.bottomBody,{instancePath:t+"/bottomBody",parentData:e,parentDataProperty:"bottomBody",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.bottomJoin&&(o(e.bottomJoin,{instancePath:t+"/bottomJoin",parentData:e,parentDataProperty:"bottomJoin",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.bottomLeft&&(o(e.bottomLeft,{instancePath:t+"/bottomLeft",parentData:e,parentDataProperty:"bottomLeft",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.bottomRight&&(o(e.bottomRight,{instancePath:t+"/bottomRight",parentData:e,parentDataProperty:"bottomRight",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.bodyLeft&&(o(e.bodyLeft,{instancePath:t+"/bodyLeft",parentData:e,parentDataProperty:"bodyLeft",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.bodyRight&&(o(e.bodyRight,{instancePath:t+"/bodyRight",parentData:e,parentDataProperty:"bodyRight",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.bodyJoin&&(o(e.bodyJoin,{instancePath:t+"/bodyJoin",parentData:e,parentDataProperty:"bodyJoin",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.headerJoin&&(o(e.headerJoin,{instancePath:t+"/headerJoin",parentData:e,parentDataProperty:"headerJoin",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinBody&&(o(e.joinBody,{instancePath:t+"/joinBody",parentData:e,parentDataProperty:"joinBody",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinLeft&&(o(e.joinLeft,{instancePath:t+"/joinLeft",parentData:e,parentDataProperty:"joinLeft",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinRight&&(o(e.joinRight,{instancePath:t+"/joinRight",parentData:e,parentDataProperty:"joinRight",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinJoin&&(o(e.joinJoin,{instancePath:t+"/joinJoin",parentData:e,parentDataProperty:"joinJoin",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinMiddleUp&&(o(e.joinMiddleUp,{instancePath:t+"/joinMiddleUp",parentData:e,parentDataProperty:"joinMiddleUp",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinMiddleDown&&(o(e.joinMiddleDown,{instancePath:t+"/joinMiddleDown",parentData:e,parentDataProperty:"joinMiddleDown",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinMiddleLeft&&(o(e.joinMiddleLeft,{instancePath:t+"/joinMiddleLeft",parentData:e,parentDataProperty:"joinMiddleLeft",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length)),void 0!==e.joinMiddleRight&&(o(e.joinMiddleRight,{instancePath:t+"/joinMiddleRight",parentData:e,parentDataProperty:"joinMiddleRight",rootData:a})||(u=null===u?o.errors:u.concat(o.errors),c=u.length))}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===u?u=[e]:u.push(e),c++}return m.errors=u,0===c}function y(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,s=0;const a=s;let c=!1,l=null;const p=s;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if(!u.test(n)){const e={instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),s++}for(const n in e)u.test(n)&&(f(e[n],{instancePath:t+"/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:n,rootData:o})||(i=null===i?f.errors:i.concat(f.errors),s=i.length))}else{const e={instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),s++}(h=p===s)&&(c=!0,l=0);const d=s;if(Array.isArray(e)){const n=e.length;for(let r=0;r<n;r++)f(e[r],{instancePath:t+"/"+r,parentData:e,parentDataProperty:r,rootData:o})||(i=null===i?f.errors:i.concat(f.errors),s=i.length)}else{const e={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};null===i?i=[e]:i.push(e),s++}var h;if((h=d===s)&&c?(c=!1,l=[l,1]):h&&(c=!0,l=1),c)s=a,null!==i&&(a?i.length=a:i=null);else{const e={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:l},message:"must match exactly one schema in oneOf"};null===i?i=[e]:i.push(e),s++}return y.errors=i,0===s}function D(e,{instancePath:t="",parentData:n,parentDataProperty:r,rootData:o=e}={}){let i=null,s=0;if(e&&"object"==typeof e&&!Array.isArray(e)){for(const n in e)if("alignment"!==n&&"verticalAlignment"!==n&&"width"!==n&&"wrapWord"!==n&&"truncate"!==n&&"paddingLeft"!==n&&"paddingRight"!==n){const e={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};null===i?i=[e]:i.push(e),s++}if(void 0!==e.alignment&&(c(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:o})||(i=null===i?c.errors:i.concat(c.errors),s=i.length)),void 0!==e.verticalAlignment&&(p(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:o})||(i=null===i?p.errors:i.concat(p.errors),s=i.length)),void 0!==e.width){let n=e.width;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}if("number"==typeof n&&isFinite(n)&&(n<1||isNaN(n))){const e={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.wrapWord&&"boolean"!=typeof e.wrapWord){const e={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};null===i?i=[e]:i.push(e),s++}if(void 0!==e.truncate){let n=e.truncate;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.paddingLeft){let n=e.paddingLeft;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}if(void 0!==e.paddingRight){let n=e.paddingRight;if("number"!=typeof n||n%1||isNaN(n)||!isFinite(n)){const e={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===i?i=[e]:i.push(e),s++}}}else{const e={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===i?i=[e]:i.push(e),s++}return D.errors=i,0===s}e["streamConfig.json"]=function e(t,{instancePath:n="",parentData:r,parentDataProperty:o,rootData:i=t}={}){let s=null,a=0;if(t&&"object"==typeof t&&!Array.isArray(t)){if(void 0===t.columnDefault){const e={instancePath:n,schemaPath:"#/required",keyword:"required",params:{missingProperty:"columnDefault"},message:"must have required property 'columnDefault'"};null===s?s=[e]:s.push(e),a++}if(void 0===t.columnCount){const e={instancePath:n,schemaPath:"#/required",keyword:"required",params:{missingProperty:"columnCount"},message:"must have required property 'columnCount'"};null===s?s=[e]:s.push(e),a++}for(const e in t)if("border"!==e&&"columns"!==e&&"columnDefault"!==e&&"columnCount"!==e&&"drawVerticalLine"!==e){const t={instancePath:n,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:e},message:"must NOT have additional properties"};null===s?s=[t]:s.push(t),a++}if(void 0!==t.border&&(m(t.border,{instancePath:n+"/border",parentData:t,parentDataProperty:"border",rootData:i})||(s=null===s?m.errors:s.concat(m.errors),a=s.length)),void 0!==t.columns&&(y(t.columns,{instancePath:n+"/columns",parentData:t,parentDataProperty:"columns",rootData:i})||(s=null===s?y.errors:s.concat(y.errors),a=s.length)),void 0!==t.columnDefault&&(D(t.columnDefault,{instancePath:n+"/columnDefault",parentData:t,parentDataProperty:"columnDefault",rootData:i})||(s=null===s?D.errors:s.concat(D.errors),a=s.length)),void 0!==t.columnCount){let e=t.columnCount;if("number"!=typeof e||e%1||isNaN(e)||!isFinite(e)){const e={instancePath:n+"/columnCount",schemaPath:"#/properties/columnCount/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===s?s=[e]:s.push(e),a++}if("number"==typeof e&&isFinite(e)&&(e<1||isNaN(e))){const e={instancePath:n+"/columnCount",schemaPath:"#/properties/columnCount/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};null===s?s=[e]:s.push(e),a++}}if(void 0!==t.drawVerticalLine&&"function"!=typeof t.drawVerticalLine){const e={instancePath:n+"/drawVerticalLine",schemaPath:"#/properties/drawVerticalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};null===s?s=[e]:s.push(e),a++}}else{const e={instancePath:n,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};null===s?s=[e]:s.push(e),a++}return e.errors=s,0===a}}(Vh)),Vh}function Qh(){if(qh)return Wh;qh=1;var e=Wh&&Wh.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wh,"__esModule",{value:!0}),Wh.validateConfig=void 0;const t=e(Yh());return Wh.validateConfig=(e,n)=>{const r=t.default[e];if(!r(n)&&r.errors){const e=r.errors.map(e=>({message:e.message,params:e.params,schemaPath:e.schemaPath}));throw console.log("config",n),console.log("errors",e),new Error("Invalid config.")}},Wh}function Xh(){if(Kh)return Gh;Kh=1,Object.defineProperty(Gh,"__esModule",{value:!0}),Gh.makeStreamConfig=void 0;const e=dh(),t=Qh(),n=(e,t={},n)=>Array.from({length:e}).map((e,r)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",wrapWord:!1,...n,...t[r]}));return Gh.makeStreamConfig=r=>{if((0,t.validateConfig)("streamConfig.json",r),void 0===r.columnDefault.width)throw new Error("Must provide config.columnDefault.width when creating a stream.");return{drawVerticalLine:()=>!0,...r,border:(0,e.makeBorderConfig)(r.border),columns:n(r.columnCount,r.columns,r.columnDefault)}},Gh}var eg,tg={};function ng(){return eg||(eg=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mapDataUsingRowHeights=e.padCellVertically=void 0;const t=dh(),n=Ph(),r=e=>new Array(e).fill("");e.padCellVertically=(e,t,n)=>{const o=t-e.length;return"top"===n?[...e,...r(o)]:"bottom"===n?[...r(o),...e]:[...r(Math.floor(o/2)),...e,...r(Math.ceil(o/2))]};e.mapDataUsingRowHeights=(r,o,i)=>{const s=r[0].length,a=r.map((t,r)=>{const a=o[r],u=Array.from({length:a},()=>new Array(s).fill(""));return t.forEach((t,o)=>{var s;const c=null===(s=i.spanningCellManager)||void 0===s?void 0:s.getContainingRange({col:o,row:r});if(c)return void c.extractCellContent(r).forEach((e,t)=>{u[t][o]=e});const l=(0,n.wrapCell)(t,i.columns[o].width,i.columns[o].wrapWord);(0,e.padCellVertically)(l,a,i.columns[o].verticalAlignment).forEach((e,t)=>{u[t][o]=e})}),u});return(0,t.flatten)(a)}}(tg)),tg}var rg,og={};function ig(){return rg||(rg=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.padTableData=e.padString=void 0;e.padString=(e,t,n)=>" ".repeat(t)+e+" ".repeat(n);e.padTableData=(t,n)=>t.map((t,r)=>t.map((t,o)=>{var i;if(null===(i=n.spanningCellManager)||void 0===i?void 0:i.getContainingRange({col:o,row:r},{mapped:!0}))return t;const{paddingLeft:s,paddingRight:a}=n.columns[o];return(0,e.padString)(t,s,a)}))}(og)),og}var sg,ag={};function ug(){if(sg)return ag;sg=1,Object.defineProperty(ag,"__esModule",{value:!0}),ag.stringifyTableData=void 0;const e=dh();return ag.stringifyTableData=t=>t.map(t=>t.map(t=>(0,e.normalizeString)(String(t)))),ag}var cg,lg,pg,fg={},dg={exports:{}};function hg(){return cg||(cg=1,function(e,t){var n,r=1/0,o=NaN,i=/^\s+|\s+$/g,s=/\w*$/,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l="\\ud800-\\udfff",p="\\u0300-\\u036f\\ufe20-\\ufe23",f="\\u20d0-\\u20f0",d="\\ufe0e\\ufe0f",h="["+l+"]",g="["+p+f+"]",m="\\ud83c[\\udffb-\\udfff]",y="[^"+l+"]",D="(?:\\ud83c[\\udde6-\\uddff]){2}",b="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",w="(?:"+g+"|"+m+")"+"?",_="["+d+"]?",E=_+w+("(?:"+v+"(?:"+[y,D,b].join("|")+")"+_+w+")*"),A="(?:"+[y+g+"?",g,D,b,h].join("|")+")",S=RegExp(m+"(?="+m+")|"+A+E,"g"),C=RegExp("["+v+l+p+f+d+"]"),k=parseInt,P="object"==typeof ed&&ed&&ed.Object===Object&&ed,R="object"==typeof self&&self&&self.Object===Object&&self,x=P||R||Function("return this")(),O=t&&!t.nodeType&&t,F=O&&e&&!e.nodeType&&e,T=F&&F.exports===O&&P.process,$=function(){try{return T&&T.binding("util")}catch(e){}}(),L=$&&$.isRegExp,N=(n="length",function(e){return null==e?void 0:e[n]});function M(e){return C.test(e)}function B(e){return M(e)?function(e){var t=S.lastIndex=0;for(;S.test(e);)t++;return t}(e):N(e)}function I(e){return M(e)?function(e){return e.match(S)||[]}(e):function(e){return e.split("")}(e)}var j=Object.prototype.toString,H=x.Symbol,z=H?H.prototype:void 0,U=z?z.toString:void 0;function q(e){if("string"==typeof e)return e;if(Z(e))return U?U.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function K(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,t,n)}function G(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var W,V=L?(W=L,function(e){return W(e)}):function(e){return G(e)&&"[object RegExp]"==j.call(e)};function Z(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==j.call(e)}function J(e){return e?(e=function(e){if("number"==typeof e)return e;if(Z(e))return o;if(G(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=G(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=u.test(e);return n||c.test(e)?k(e.slice(2),n?2:8):a.test(e)?o:+e}(e))===r||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Y(e){return null==e?"":q(e)}e.exports=function(e,t){var n=30,r="...";if(G(t)){var o="separator"in t?t.separator:o;n="length"in t?function(e){var t=J(e),n=t%1;return t==t?n?t-n:t:0}(t.length):n,r="omission"in t?q(t.omission):r}var i=(e=Y(e)).length;if(M(e)){var a=I(e);i=a.length}if(n>=i)return e;var u=n-B(r);if(u<1)return r;var c=a?K(a,0,u).join(""):e.slice(0,u);if(void 0===o)return c+r;if(a&&(u+=c.length-u),V(o)){if(e.slice(u).search(o)){var l,p=c;for(o.global||(o=RegExp(o.source,Y(s.exec(o))+"g")),o.lastIndex=0;l=o.exec(p);)var f=l.index;c=c.slice(0,void 0===f?u:f)}}else if(e.indexOf(q(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r}}(dg,dg.exports)),dg.exports}function gg(){return lg||(lg=1,function(e){var t=fg&&fg.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.truncateTableData=e.truncateString=void 0;const n=t(hg());e.truncateString=(e,t)=>(0,n.default)(e,{length:t,omission:"…"});e.truncateTableData=(t,n)=>t.map(t=>t.map((t,r)=>(0,e.truncateString)(t,n[r])))}(fg)),fg}function mg(){if(pg)return kd;pg=1,Object.defineProperty(kd,"__esModule",{value:!0}),kd.createStream=void 0;const e=gh(),t=xh(),n=Nh(),r=Ih(),o=Xh(),i=ng(),s=ig(),a=ug(),u=gg(),c=dh(),l=(n,r)=>{let o=(0,a.stringifyTableData)(n);o=(0,u.truncateTableData)(o,(0,c.extractTruncates)(r));const l=(0,t.calculateRowHeights)(o,r);return o=(0,i.mapDataUsingRowHeights)(o,l,r),o=(0,e.alignTableData)(o,r),o=(0,s.padTableData)(o,r),o};return kd.createStream=e=>{const t=(0,o.makeStreamConfig)(e),i=Object.values(t.columns).map(e=>e.width+e.paddingLeft+e.paddingRight);let s=!0;return{write:e=>{if(e.length!==t.columnCount)throw new Error("Row cell count does not match the config.columnCount.");s?(s=!1,((e,t,o)=>{const i=l([e],o).map(e=>(0,r.drawRow)(e,o)).join("");let s;s="",s+=(0,n.drawBorderTop)(t,o),s+=i,s+=(0,n.drawBorderBottom)(t,o),s=s.trimEnd(),process.stdout.write(s)})(e,i,t)):((e,t,o)=>{const i=l([e],o).map(e=>(0,r.drawRow)(e,o)).join("");let s="";const a=(0,n.drawBorderBottom)(t,o);"\n"!==a&&(s="\r"),s+=(0,n.drawBorderJoin)(t,o),s+=i,s+=a,s=s.trimEnd(),process.stdout.write(s)})(e,i,t)}}},kd}var yg,Dg={},bg={};function vg(){if(yg)return bg;yg=1,Object.defineProperty(bg,"__esModule",{value:!0}),bg.calculateOutputColumnWidths=void 0;return bg.calculateOutputColumnWidths=e=>e.columns.map(e=>e.paddingLeft+e.width+e.paddingRight),bg}var wg,_g={};function Eg(){if(wg)return _g;wg=1,Object.defineProperty(_g,"__esModule",{value:!0}),_g.drawTable=void 0;const e=Nh(),t=Lh(),n=Ih(),r=dh();return _g.drawTable=(o,i,s,a)=>{const{drawHorizontalLine:u,singleLine:c}=a,l=(0,r.groupBySizes)(o,s).map((e,t)=>e.map(e=>(0,n.drawRow)(e,{...a,rowIndex:t})).join(""));return(0,t.drawContent)({contents:l,drawSeparator:(e,t)=>(0===e||e===t||!c)&&u(e,t),elementType:"row",rowIndex:-1,separatorGetter:(0,e.createTableBorderGetter)(i,{...a,rowCount:l.length}),spanningCellManager:a.spanningCellManager})},_g}var Ag,Sg={};function Cg(){if(Ag)return Sg;Ag=1,Object.defineProperty(Sg,"__esModule",{value:!0}),Sg.injectHeaderConfig=void 0;return Sg.injectHeaderConfig=(e,t)=>{var n;let r=null!==(n=t.spanningCells)&&void 0!==n?n:[];const o=t.header,i=[...e];if(o){r=r.map(({row:e,...t})=>({...t,row:e+1}));const{content:t,...n}=o;r.unshift({alignment:"center",col:0,colSpan:e[0].length,paddingLeft:1,paddingRight:1,row:0,wrapWord:!1,...n}),i.unshift([t,...Array.from({length:e[0].length-1}).fill("")])}return[i,r]},Sg}var kg,Pg={},Rg={};function xg(){return kg||(kg=1,function(e){var t=Rg&&Rg.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.calculateMaximumColumnWidths=e.calculateMaximumCellWidth=void 0;const n=t(jd()),r=dh();e.calculateMaximumCellWidth=e=>Math.max(...e.split("\n").map(n.default));e.calculateMaximumColumnWidths=(t,n=[])=>{const o=new Array(t[0].length).fill(0),i=n.map(r.calculateRangeCoordinate);return t.forEach((t,n)=>{t.forEach((t,s)=>{((e,t)=>i.some(n=>(0,r.isCellInRange)({col:t,row:e},n)))(n,s)||(o[s]=Math.max(o[s],(0,e.calculateMaximumCellWidth)(t)))})}),o}}(Rg)),Rg}var Og,Fg={},Tg={};function $g(){if(Og)return Tg;Og=1;var e=Tg&&Tg.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tg,"__esModule",{value:!0}),Tg.alignVerticalRangeContent=Tg.wrapRangeContent=void 0;const t=e(jd()),n=hh(),r=ng(),o=ig(),i=gg(),s=dh(),a=Ph();Tg.wrapRangeContent=(e,t,r)=>{const{topLeft:s,paddingRight:u,paddingLeft:c,truncate:l,wrapWord:p,alignment:f}=e,d=r.rows[s.row][s.col],h=t-c-u;return(0,a.wrapCell)((0,i.truncateString)(d,l),h,p).map(e=>{const t=(0,n.alignString)(e,h,f);return(0,o.padString)(t,c,u)})};return Tg.alignVerticalRangeContent=(e,n,o)=>{const{rows:i,drawHorizontalLine:a,rowHeights:u}=o,{topLeft:c,bottomRight:l,verticalAlignment:p}=e;if(0===u.length)return[];const f=(0,s.sumArray)(u.slice(c.row,l.row+1))+(l.row-c.row)-(0,s.sequence)(c.row+1,l.row).filter(e=>!a(e,i.length)).length;return(0,r.padCellVertically)(n,f,p).map(e=>0===e.length?" ".repeat((0,t.default)(n[0])):e)},Tg}var Lg,Ng={};function Mg(){if(Lg)return Ng;Lg=1,Object.defineProperty(Ng,"__esModule",{value:!0}),Ng.calculateSpanningCellWidth=void 0;const e=dh();return Ng.calculateSpanningCellWidth=(t,n)=>{const{columnsConfig:r,drawVerticalLine:o}=n,{topLeft:i,bottomRight:s}=t;return(0,e.sumArray)(r.slice(i.col,s.col+1).map(({width:e})=>e))+(i.col===s.col?r[i.col].paddingRight+r[s.col].paddingLeft:(0,e.sumArray)(r.slice(i.col,s.col+1).map(({paddingLeft:e,paddingRight:t})=>e+t)))+(s.col-i.col)-(0,e.sequence)(i.col+1,s.col).filter(e=>!o(e,r.length)).length},Ng}var Bg,Ig,jg={};function Hg(){if(Bg)return jg;Bg=1,Object.defineProperty(jg,"__esModule",{value:!0}),jg.makeRangeConfig=void 0;const e=dh();return jg.makeRangeConfig=(t,n)=>{var r;const{topLeft:o,bottomRight:i}=(0,e.calculateRangeCoordinate)(t);return{...{...n[o.col],...t,paddingRight:null!==(r=t.paddingRight)&&void 0!==r?r:n[i.col].paddingRight},bottomRight:i,topLeft:o}},jg}function zg(){if(Ig)return Fg;Ig=1,Object.defineProperty(Fg,"__esModule",{value:!0}),Fg.createSpanningCellManager=void 0;const e=$g(),t=Mg(),n=Hg(),r=dh(),o=(e,t)=>t.find(t=>(0,r.isCellInRange)(e,t)),i=(n,o)=>{const i=(0,t.calculateSpanningCellWidth)(n,o),s=(0,e.wrapRangeContent)(n,i,o),a=(0,e.alignVerticalRangeContent)(n,s,o);return{...n,extractBorderContent:e=>{const{topLeft:t}=n,i=(0,r.sumArray)(o.rowHeights.slice(t.row,e))+(e-t.row-1);return a[i]},extractCellContent:e=>{const{topLeft:t}=n,{drawHorizontalLine:i,rowHeights:s}=o,u=e-t.row,c=(0,r.sequence)(t.row+1,e).filter(e=>!(null==i?void 0:i(e,s.length))).length,l=(0,r.sumArray)(s.slice(t.row,e))+u-c;return a.slice(l,l+s[e])},height:s.length,width:i}};return Fg.createSpanningCellManager=e=>{const{spanningCellConfigs:t,columnsConfig:s}=e,a=t.map(e=>(0,n.makeRangeConfig)(e,s)),u={};let c=[],l=[];return{getContainingRange:(t,n)=>{var r;const s=(null==n?void 0:n.mapped)?l[t.row]:t.row,p=o({...t,row:s},a);if(!p)return;if(0===c.length)return i(p,{...e,rowHeights:c});const f=(e=>{const{row:t,col:n}=e.topLeft;return`${t}/${n}`})(p);return null!==(r=u[f])&&void 0!==r||(u[f]=i(p,{...e,rowHeights:c})),u[f]},inSameRange:(e,t)=>((e,t,n)=>{const i=o(e,n),s=o(t,n);return!(!i||!s)&&(0,r.areCellEqual)(i.topLeft,s.topLeft)})(e,t,a),rowHeights:c,rowIndexMapping:l,setRowHeights:e=>{c=e},setRowIndexMapping:e=>{l=(0,r.flatten)(e.map((e,t)=>Array.from({length:e},()=>t)))}}},Fg}var Ug,qg,Kg={};function Gg(){if(Ug)return Kg;Ug=1,Object.defineProperty(Kg,"__esModule",{value:!0}),Kg.validateSpanningCellConfig=void 0;const e=dh(),t=(e,t,n)=>e<=n&&n<=t;return Kg.validateSpanningCellConfig=(n,r)=>{const[o,i]=[n.length,n[0].length];r.forEach((e,t)=>{const{colSpan:n,rowSpan:r}=e;if(void 0===n&&void 0===r)throw new Error(`Expect at least colSpan or rowSpan is provided in config.spanningCells[${t}]`);if(void 0!==n&&n<1)throw new Error(`Expect colSpan is not equal zero, instead got: ${n} in config.spanningCells[${t}]`);if(void 0!==r&&r<1)throw new Error(`Expect rowSpan is not equal zero, instead got: ${r} in config.spanningCells[${t}]`)});const s=r.map(e.calculateRangeCoordinate);s.forEach(({topLeft:e,bottomRight:n},r)=>{if(!(t(0,i-1,e.col)&&t(0,o-1,e.row)&&t(0,i-1,n.col)&&t(0,o-1,n.row)))throw new Error(`Some cells in config.spanningCells[${r}] are out of the table`)});const a=Array.from({length:o},()=>Array.from({length:i}));s.forEach(({topLeft:t,bottomRight:n},r)=>{(0,e.sequence)(t.row,n.row).forEach(o=>{(0,e.sequence)(t.col,n.col).forEach(e=>{if(void 0!==a[o][e])throw new Error(`Spanning cells in config.spanningCells[${a[o][e]}] and config.spanningCells[${r}] are overlap each other`);a[o][e]=r})})})},Kg}function Wg(){if(qg)return Pg;qg=1,Object.defineProperty(Pg,"__esModule",{value:!0}),Pg.makeTableConfig=void 0;const e=xg(),t=zg(),n=dh(),r=Qh(),o=Gg();return Pg.makeTableConfig=(i,s={},a)=>{var u,c,l,p,f;(0,r.validateConfig)("config.json",s),(0,o.validateSpanningCellConfig)(i,null!==(u=s.spanningCells)&&void 0!==u?u:[]);const d=null!==(c=null!=a?a:s.spanningCells)&&void 0!==c?c:[],h=((t,n,r,o)=>{const i=(0,e.calculateMaximumColumnWidths)(t,o);return t[0].map((e,t)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",width:i[t],wrapWord:!1,...r,...null==n?void 0:n[t]}))})(i,s.columns,s.columnDefault,d),g=null!==(l=s.drawVerticalLine)&&void 0!==l?l:()=>!0,m=null!==(p=s.drawHorizontalLine)&&void 0!==p?p:()=>!0;return{...s,border:(0,n.makeBorderConfig)(s.border),columns:h,drawHorizontalLine:m,drawVerticalLine:g,singleLine:null!==(f=s.singleLine)&&void 0!==f&&f,spanningCellManager:(0,t.createSpanningCellManager)({columnsConfig:h,drawHorizontalLine:m,drawVerticalLine:g,rows:i,spanningCellConfigs:d})}},Pg}var Vg,Zg,Jg={};function Yg(){if(Vg)return Jg;Vg=1,Object.defineProperty(Jg,"__esModule",{value:!0}),Jg.validateTableData=void 0;const e=dh();return Jg.validateTableData=t=>{if(!Array.isArray(t))throw new TypeError("Table data must be an array.");if(0===t.length)throw new Error("Table must define at least one row.");if(0===t[0].length)throw new Error("Table must define at least one column.");const n=t[0].length;for(const r of t){if(!Array.isArray(r))throw new TypeError("Table row data must be an array.");if(r.length!==n)throw new Error("Table must have a consistent number of cells.");for(const t of r)if(/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test((0,e.normalizeString)(String(t))))throw new Error("Table data must not contain control characters.")}},Jg}function Qg(){if(Zg)return Dg;Zg=1,Object.defineProperty(Dg,"__esModule",{value:!0}),Dg.table=void 0;const e=gh(),t=vg(),n=xh(),r=Eg(),o=Cg(),i=Wg(),s=ng(),a=ig(),u=ug(),c=gg(),l=dh(),p=Yg();return Dg.table=(f,d={})=>{(0,p.validateTableData)(f);let h=(0,u.stringifyTableData)(f);const[g,m]=(0,o.injectHeaderConfig)(h,d),y=(0,i.makeTableConfig)(g,d,m);h=(0,c.truncateTableData)(g,(0,l.extractTruncates)(y));const D=(0,n.calculateRowHeights)(h,y);y.spanningCellManager.setRowHeights(D),y.spanningCellManager.setRowIndexMapping(D),h=(0,s.mapDataUsingRowHeights)(h,D,y),h=(0,e.alignTableData)(h,y),h=(0,a.padTableData)(h,y);const b=(0,t.calculateOutputColumnWidths)(y);return(0,r.drawTable)(h,b,D,y)},Dg}var Xg,em,tm={};function nm(){return Xg||(Xg=1,Object.defineProperty(tm,"__esModule",{value:!0})),tm}function rm(){return em||(em=1,function(e){var t=Cd&&Cd.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=Cd&&Cd.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.getBorderCharacters=e.createStream=e.table=void 0;const r=mg();Object.defineProperty(e,"createStream",{enumerable:!0,get:function(){return r.createStream}});const o=fh();Object.defineProperty(e,"getBorderCharacters",{enumerable:!0,get:function(){return o.getBorderCharacters}});const i=Qg();Object.defineProperty(e,"table",{enumerable:!0,get:function(){return i.table}}),n(nm(),e)}(Cd)),Cd}var om=rm();const im=e=>e.toString().padStart(2,"0"),sm=e=>{e<0&&(e=0);const t=Math.floor(e/1e3),n=Math.floor(t/60),r=t%60;return`${im(n)}:${im(r)}`},am=e=>{const{rows:t,startedAt:n,boring:r,uiId:o,includeHint:i}=e,s=["Type","Item","Status","Time","Output"].map(e=>kf(e)),a=[];if(a.push(s),0===t.length){const e=sm(Date.now()-n);a.push(["—","—",r?"[IDLE]":"idle",e,""])}else for(const e of t){const t=e.state;let n="";if("running"===t.kind||"quiet"===t.kind||"stalled"===t.kind){const e="number"==typeof t.startedAt?t.startedAt:Date.now();n=sm(Math.max(0,Date.now()-e))}else"number"==typeof t.durationMs&&(n=sm(Math.max(0,t.durationMs)));const r="done"===t.kind||"warn"===t.kind||"error"===t.kind||"timedout"===t.kind||"cancelled"===t.kind||"killed"===t.kind?t.outputPath??"":"",o="warn"===t.kind?"warn":"waiting"===t.kind?"waiting":"running"===t.kind?"run":"quiet"===t.kind?"quiet":"stalled"===t.kind?"stalled":"done"===t.kind?"ok":"error"===t.kind?"error":"timedout"===t.kind?"timeout":"cancelled"===t.kind?"cancelled":"killed";a.push([e.type,e.item,wd(o),n,r??""])}const u=(e=>om.table(e,{columnDefault:{paddingLeft:0,paddingRight:2},border:{topBody:"",topJoin:"",topLeft:"",topRight:"",bottomBody:"",bottomJoin:"",bottomLeft:"",bottomRight:"",bodyLeft:"",bodyRight:"",bodyJoin:"",joinBody:"",joinLeft:"",joinRight:"",joinJoin:""},drawHorizontalLine:()=>!1,columns:{0:{alignment:"left"},1:{alignment:"left"},2:{alignment:"left"},3:{alignment:"left"},4:{alignment:"left"}}}))(a),c=((e,t,n)=>n?[`${e}`,`waiting ${t.waiting.toString()}`,`running ${t.running.toString()}`,`quiet ${t.quiet.toString()}`,`stalled ${t.stalled.toString()}`,`timeout ${t.timeout.toString()}`,`ok ${t.ok.toString()}`,`warn ${t.warn.toString()}`,`fail ${t.fail.toString()}`,`cancelled ${t.cancelled.toString()}`].join(" • "):[`${e}`,Sf(`⏸︎ ${t.waiting.toString()}`),_f(`▶︎ ${t.running.toString()}`),wf(`⏱︎ ${t.quiet.toString()}`),Cf(`⏱︎ ${t.stalled.toString()}`),Ef(`⏱︎ ${t.timeout.toString()}`),vf(`✔︎ ${t.ok.toString()}`),Cf(`⚠︎ ${t.warn.toString()}`),Ef(`✖︎ ${t.fail.toString()}`),Af(`◼︎ ${t.cancelled.toString()}`)].join(" • "))(sm(Date.now()-n),fd(t.map(e=>({state:e.state}))),r),l=i?`\n${(e=>{const t="1"===process.env.STAN_TEST_UI_TAG?` UI#${e.toString()}`:"";return`${Pf("Press")} ${kf("q")} ${Pf("to cancel,")} ${kf("r")} ${Pf("to restart")}${t}`})(o)}`:"",p=`\n${`${u.trimEnd()}\n\n${c}${l}`}\n`;if("1"===process.env.STAN_LIVE_DEBUG)try{const e=/(?:^|\n)Type\s+Item\s+Status\s+Time\s+Output(?:\n|$)/g,t=((e=>{try{return e.replace(/\x1B\[[0-?]*[ -/]*[@-~]/g,"")}catch{return e}})(p).match(e)??[]).length;console.error("[stan:live:frame]",{headerMatches:t,includeHint:i})}catch{}return p};let um=1;const cm=()=>Date.now();class lm{rows=new Map;opts;frameNo=0;timer;startedAt=cm();writer=null;uiId;constructor(e){this.opts={boring:Boolean(e?.boring),refreshMs:e?.refreshMs??1e3},this.uiId=um++}resetElapsed(){this.startedAt=cm(),this.frameNo=0}finalize(){this.timer&&clearInterval(this.timer),this.timer=void 0,this.renderFinalNoHint(),Mf.renderer.stop(),Mf.renderer.done(),this.writer?.done()}flush(){Mf.renderer.flush(),this.render()}resetRows(){this.rows.clear()}start(){Mf.renderer.start({refreshMs:this.opts.refreshMs}),this.timer||(this.writer||(this.writer=vd()),this.writer.start(),this.timer=setInterval(()=>this.render(),this.opts.refreshMs))}clear(){Mf.renderer.clear(),this.writer?.clear()}stop(){Mf.renderer.stop(),this.timer&&clearInterval(this.timer),this.timer=void 0,Mf.renderer.done(),this.writer?.done()}update(e,t,n){const r=this.rows.get(e),o=n??pd(e)??(r?.type?{type:r.type,item:r.item}:void 0);if(!o){const n={type:"script",item:e};return void this.rows.set(e,{...n,state:{...r?.state??{},...t}})}this.rows.set(e,{...o,state:{...r?.state??{},...t}}),Mf.renderer.update({key:e,kind:t.kind,rowsSize:this.rows.size})}cancelPending(){const e=cm();for(const[t,n]of this.rows.entries()){const r=n.state;switch(r.kind){case"waiting":this.update(t,{kind:"cancelled"});break;case"running":case"quiet":case"stalled":{const n="number"==typeof r.startedAt?r.startedAt:void 0,o="number"==typeof n?Math.max(0,e-n):0;this.update(t,{kind:"cancelled",durationMs:o});break}}}}renderFinalNoHint(){let e=am({rows:Array.from(this.rows.values()),startedAt:this.startedAt,boring:this.opts.boring,uiId:this.uiId,includeHint:!1});e.endsWith("\n")||(e+="\n"),e+="\n",this.writer?.write(e)}render(){const e=am({rows:Array.from(this.rows.values()),startedAt:this.startedAt,boring:this.opts.boring,uiId:this.uiId,includeHint:!0});if(this.frameNo+=1,Mf.enabled)try{const e=fd(this.rows.values()),t=Array.from(this.rows.keys()).slice(0,5);Mf.renderer.render({frameNo:this.frameNo,rowsSize:this.rows.size,keys:t,headerCount:1,hasHint:!0,counts:e})}catch{}this.writer?.write(e)}}class pm{model;opts;dbg(...e){try{"1"===process.env.STAN_LIVE_DEBUG&&console.error("[stan:live:sink]",...e)}catch{}}renderer=null;unsubscribe;stopped=!1;constructor(e,t){this.model=e,this.opts=t}start(){this.stopped=!1,this.renderer?this.dbg("start() renderer=existing"):(this.dbg("start() renderer=create"),this.renderer=new lm({boring:Boolean(this.opts?.boring)}),this.renderer.start(),this.unsubscribe=this.model.subscribe(e=>this.onUpdate(e.key,e.meta,e.state)))}stop(){if(this.stopped)this.dbg("stop():already-stopped");else{this.stopped=!0;try{const e=this.renderer;"function"==typeof e?.finalize&&(this.dbg("stop() finalize(full)"),e.finalize?.())}catch{}this.unsubscribe&&this.unsubscribe(),this.unsubscribe=void 0}}flushNow(){try{this.renderer?.flush()}catch{}}resetForRestart(){try{this.dbg("resetForRestart()"),this.renderer?.resetRows?.()}catch{}}resetElapsed(){try{this.renderer?.resetElapsed?.()}catch{}}cancelPending(){this.dbg("cancelPending()"),this.renderer?.cancelPending?.()}onUpdate(e,t,n){this.dbg("update",{key:e,type:t.type,item:t.item,kind:n.kind}),this.renderer?.update(`${t.type}:${t.item}`,n,t)}}const fm=e=>e.replace(/\\/g,"/"),dm=(e,t)=>{if(!t)return"";const r=t;return n.isAbsolute(r)?fm(n.relative(e,r)):fm(r)};class hm{opts;renderer=null;control=null;model=new dd;sink;stopped=!1;constructor(e){this.opts=e,this.sink=new pm(this.model,{boring:Boolean(e?.boring)})}start(){Mf.ui.start(),this.stopped=!1,this.renderer||(this.sink.start(),this.renderer=this.sink.renderer??null)}onPlan(e){console.log(e)}onScriptQueued(e){this.model.update(`script:${e}`,{kind:"waiting"},{type:"script",item:e})}onScriptStart(e){this.model.update(`script:${e}`,{kind:"running",startedAt:Date.now()},{type:"script",item:e})}onScriptEnd(e,t,n,r,o,i,s){const a=dm(n,t),u="error"===s||"number"==typeof i&&0!==i?{kind:"error",durationMs:Math.max(0,o-r),outputPath:a}:"warn"===s?{kind:"warn",durationMs:Math.max(0,o-r),outputPath:a}:{kind:"done",durationMs:Math.max(0,o-r),outputPath:a};this.model.update(`script:${e}`,u,{type:"script",item:e})}onArchiveQueued(e){const t="full"===e?"full":"diff";this.model.update(`archive:${t}`,{kind:"waiting"},{type:"archive",item:t})}onArchiveStart(e){const t="full"===e?"full":"diff";this.model.update(`archive:${t}`,{kind:"running",startedAt:Date.now()},{type:"archive",item:t})}onArchiveEnd(e,t,n,r,o){const i="full"===e?"full":"diff",s=dm(n,t);this.model.update(`archive:${i}`,{kind:"done",durationMs:Math.max(0,o-r),outputPath:s},{type:"archive",item:i})}onCancelled(e="cancel"){Mf.ui.onCancelled(e);try{this.sink.cancelPending()}catch{}try{this.sink.resetElapsed()}catch{}try{if("restart"===e){Mf.session.info("restart: paint CANCELLED immediately; detach keys; table remains for overwrite");try{this.sink.flushNow()}catch{}this.control?.detach(),this.control=null}else Mf.ui.stop(),this.sink.stop()}catch{}try{this.control?.detach()}catch{}this.control=null}prepareForNewSession(){try{this.model?.clearAll?.()}catch{}try{this.sink.resetElapsed()}catch{}try{this.sink.resetForRestart()}catch{}}flushNow(){try{this.sink.flushNow()}catch{}}installCancellation(e,t){try{this.control=new ld({onCancel:e,onRestart:t}),Mf.ui.installCancellation(),this.control.attach()}catch{this.control=null}}stop(){if(!this.stopped){this.stopped=!0,Mf.ui.stop();try{this.sink.stop()}catch{}try{this.control?.detach()}catch{}this.control=null}}}class gm{model;cwd;unsubscribe;constructor(e,t){this.model=e,this.cwd=t}start(){this.unsubscribe=this.model.subscribe(e=>this.onUpdate(e.meta,e.state))}stop(){this.unsubscribe&&this.unsubscribe(),this.unsubscribe=void 0}onUpdate(e,t){const n=e.item,r="archive"===e.type?"diff"===n?"archive (diff)":"archive":n;if("waiting"!==t.kind)if("running"!==t.kind){if("warn"===t.kind){const e=dm(this.cwd,t.outputPath);return void console.log(`stan: ${wd("warn")} "${r}" -> ${e}`)}if("done"===t.kind||"error"===t.kind){const e="done"===t.kind,n=dm(this.cwd,t.outputPath),o=wd(e?"ok":"error"),i=e?"":" (exit 1)",s=n||"";return void console.log(`stan: ${o} "${r}" -> ${s}${i}`)}}else console.log(`stan: ${wd("run")} "${r}"`);else console.log(`stan: ${wd("waiting")} "${r}"`)}}class mm{model=new dd;sink;constructor(){this.sink=new gm(this.model,process.cwd())}start(){this.sink.start()}onPlan(e){console.log(e)}onScriptQueued(e){this.model.update(`script:${e}`,{kind:"waiting"},{type:"script",item:e})}onScriptStart(e){this.model.update(`script:${e}`,{kind:"running",startedAt:Date.now()},{type:"script",item:e})}onScriptEnd(e,t,n,r,o,i,s){const a=dm(n,t),u="error"===s?{kind:"error",durationMs:0,outputPath:a}:"warn"===s?{kind:"warn",durationMs:0,outputPath:a}:{kind:"done",durationMs:0,outputPath:a};this.model.update(`script:${e}`,u,{type:"script",item:e})}onArchiveQueued(){}onArchiveStart(e){const t="full"===e?"full":"diff";this.model.update(`archive:${t}`,{kind:"running",startedAt:Date.now()},{type:"archive",item:t})}onArchiveEnd(e,t,n){const r=dm(n,t),o="full"===e?"full":"diff";this.model.update(`archive:${o}`,{kind:"done",durationMs:0,outputPath:r},{type:"archive",item:o})}onCancelled(){}installCancellation(){}stop(){this.sink.stop()}}exports.renderAvailableScriptsHelp=e=>{try{const t=Au(e),n=Object.keys(t.scripts);if(!n.length)return"";const r=n[0]??"lint";return["","Default: runs all scripts and writes archives.","","Available script keys:",` ${n.join(", ")}`,"","Examples:"," stan run # all scripts, with archives",` stan run -s ${r}`,` stan run -q -x ${r}`," stan run -A # no archives"," stan run -S -A -p # plan only, no scripts, no archives",` stan run -c -s ${r}`,""].join("\n")}catch(e){return"1"===process.env.STAN_DEBUG&&console.error("stan: unable to load config for help footer",e),""}},exports.runSelected=async(r,o,i=null,s="concurrent",a)=>{const u=a??{};try{await(async e=>{const t=await $f(e),n=Boolean(process.stdout?.isTTY);if(!t.systemPrompt.localExists||t.systemPrompt.inSync||t.isDevModuleRepo||"1"===process.env.STAN_SUPPRESS_DRIFT||"test"===process.env.NODE_ENV&&"1"!==process.env.STAN_FORCE_DRIFT_WARN||(n?(console.warn(wf("stan: warning: local system prompt differs from packaged baseline.")),console.warn(Pf(" Edits in downstream repos will be overwritten by `stan init`.")),console.warn(Pf(" Move customizations to <stanPath>/system/stan.project.md instead."))):console.warn("stan: warning: system prompt drift detected; run `stan init` to update (non‑TTY)")),!t.isDevModuleRepo&&t.packageVersion&&t.docsMeta?.version){const e=t.docsMeta.version,r=t.packageVersion;e!==r&&(n?(console.log(`stan: docs baseline has changed since last install (${e} -> ${r}).`),console.log(Pf(" Run `stan init` to update prompts in your repo."))):console.log(`stan: docs baseline changed ${e} -> ${r}; run \`stan init\` to update`))}})(r)}catch(e){if("1"===process.env.STAN_DEBUG){const t=e instanceof Error?e.message:String(e);console.error("stan: preflight failed",t)}}await(async(r,o,i=!1)=>{const s=Q(r,o);if(await re(r,o),!i){const r=n.resolve(s.outputAbs,w);if(e.existsSync(r))try{await t.copyFile(r,n.resolve(s.diffAbs,_))}catch{}const o=await t.readdir(s.outputAbs,{withFileTypes:!0});for(const t of o)e.rmSync(n.resolve(s.outputAbs,t.name),{recursive:!0,force:!0})}return s.rootAbs})(r,o.stanPath,Boolean(u.keep));const c=((e,t)=>{const{selection:r,config:o,mode:i,behavior:s}=t,a=(null==r?Object.keys(o.scripts):r)??[],u=n.join(o.stanPath,"output").replace(/\\/g,"/");return`stan:\n ${[kf("STAN run plan"),"mode: "+("sequential"===i?"sequential":"concurrent"),`output: ${u}/`,`scripts: ${a.length?a.join(", "):"none"}`,"archive: "+(s.archive?"yes":"no"),"combine: "+(s.combine?"yes":"no"),"keep output dir: "+(s.keep?"yes":"no"),"live: "+(s.live?"yes":"no"),`hang warn: ${"number"==typeof s.hangWarn?s.hangWarn.toString():"n/a"}s`,`hang kill: ${"number"==typeof s.hangKill?s.hangKill.toString():"n/a"}s`,`hang kill grace: ${"number"==typeof s.hangKillGrace?s.hangKillGrace.toString():"n/a"}s`].join("\n ")}`})(0,{selection:i,config:o,mode:s,behavior:u}),l=process.stdout,p=Boolean(l?.isTTY),f=(u.live??!0)&&p,d=null==i?Object.keys(o.scripts):i,h=f?new hm({boring:"1"===process.env.STAN_BORING}):new mm;let g=!1;for(;;){const{created:e,cancelled:t,restartRequested:n}=await cd({cwd:r,config:o,selection:d,mode:s,behavior:u,liveEnabled:f,planBody:c,printPlan:!g&&!1!==u.plan,ui:h});if(g=!0,!n){if(t)return e;try{h.stop()}catch{}return e}}};