view-contracts 0.4.3 → 0.4.5
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/cli-contract.yaml +1 -1
- package/dist/preview.mjs +262 -115
- package/dist/preview.mjs.map +4 -4
- package/dist/view-contracts.bundle.mjs +159 -159
- package/dist/view-contracts.bundle.mjs.map +4 -4
- package/docs/cli-reference.md +1 -1
- package/package.json +1 -1
- package/renderers/react/renderComponents.ts +4 -1
- package/renderers/react/routes.yaml +9 -6
- package/renderers/registry.ts +62 -0
package/dist/preview.mjs
CHANGED
|
@@ -1,149 +1,296 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
`+i.mark.snippet),c+" "+a):c}function n(i,s){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=s,this.message=r(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(s){return this.name+": "+r(this,s)},e.exports=n})),_f=se(((t,e)=>{var r=vr();function n(a,c,l,f,p){let u="",m="",h=Math.floor(p/2)-1;return f-c>h&&(u=" ... ",c=f-h+u.length),l-f>h&&(m=" ...",l=f+h-m.length),{str:u+a.slice(c,l).replace(/\t/g,"\u2192")+m,pos:f-c+u.length}}function i(a,c){return r.repeat(" ",c-a.length)+a}function s(a,c){if(c=Object.create(c||null),!a.buffer)return null;c.maxLength||(c.maxLength=79),typeof c.indent!="number"&&(c.indent=1),typeof c.linesBefore!="number"&&(c.linesBefore=3),typeof c.linesAfter!="number"&&(c.linesAfter=2);let l=/\r?\n|\r|\0/g,f=[0],p=[],u,m=-1;for(;u=l.exec(a.buffer);)p.push(u.index),f.push(u.index+u[0].length),a.position<=u.index&&m<0&&(m=f.length-2);m<0&&(m=f.length-1);let h="",y=Math.min(a.line+c.linesAfter,p.length).toString().length,v=c.maxLength-(c.indent+y+3);for(let P=1;P<=c.linesBefore&&!(m-P<0);P++){let D=n(a.buffer,f[m-P],p[m-P],a.position-(f[m]-f[m-P]),v);h=r.repeat(" ",c.indent)+i((a.line-P+1).toString(),y)+" | "+D.str+`
|
|
4
|
-
`+h}let I=n(a.buffer,f[m],p[m],a.position,v);h+=r.repeat(" ",c.indent)+i((a.line+1).toString(),y)+" | "+I.str+`
|
|
5
|
-
`,h+=r.repeat("-",c.indent+y+3+I.pos)+`^
|
|
6
|
-
`;for(let P=1;P<=c.linesAfter&&!(m+P>=p.length);P++){let D=n(a.buffer,f[m+P],p[m+P],a.position-(f[m]-f[m+P]),v);h+=r.repeat(" ",c.indent)+i((a.line+P+1).toString(),y)+" | "+D.str+`
|
|
7
|
-
`}return h.replace(/\n$/,"")}e.exports=s})),be=se(((t,e)=>{var r=$r(),n=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function s(c){let l={};return c!==null&&Object.keys(c).forEach(function(f){c[f].forEach(function(p){l[String(p)]=f})}),l}function a(c,l){if(l=l||{},Object.keys(l).forEach(function(f){if(n.indexOf(f)===-1)throw new r('Unknown option "'+f+'" is met in definition of "'+c+'" YAML type.')}),this.options=l,this.tag=c,this.kind=l.kind||null,this.resolve=l.resolve||function(){return!0},this.construct=l.construct||function(f){return f},this.instanceOf=l.instanceOf||null,this.predicate=l.predicate||null,this.represent=l.represent||null,this.representName=l.representName||null,this.defaultStyle=l.defaultStyle||null,this.multi=l.multi||!1,this.styleAliases=s(l.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+c+'" YAML type.')}e.exports=a})),ga=se(((t,e)=>{var r=$r(),n=be();function i(c,l){let f=[];return c[l].forEach(function(p){let u=f.length;f.forEach(function(m,h){m.tag===p.tag&&m.kind===p.kind&&m.multi===p.multi&&(u=h)}),f[u]=p}),f}function s(){let c={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function l(f){f.multi?(c.multi[f.kind].push(f),c.multi.fallback.push(f)):c[f.kind][f.tag]=c.fallback[f.tag]=f}for(let f=0,p=arguments.length;f<p;f+=1)arguments[f].forEach(l);return c}function a(c){return this.extend(c)}a.prototype.extend=function(l){let f=[],p=[];if(l instanceof n)p.push(l);else if(Array.isArray(l))p=p.concat(l);else if(l&&(Array.isArray(l.implicit)||Array.isArray(l.explicit)))l.implicit&&(f=f.concat(l.implicit)),l.explicit&&(p=p.concat(l.explicit));else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");f.forEach(function(m){if(!(m instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(m.loadKind&&m.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(m.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),p.forEach(function(m){if(!(m instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let u=Object.create(a.prototype);return u.implicit=(this.implicit||[]).concat(f),u.explicit=(this.explicit||[]).concat(p),u.compiledImplicit=i(u,"implicit"),u.compiledExplicit=i(u,"explicit"),u.compiledTypeMap=s(u.compiledImplicit,u.compiledExplicit),u},e.exports=a})),ya=se(((t,e)=>{e.exports=new(be())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})})),wa=se(((t,e)=>{e.exports=new(be())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})})),va=se(((t,e)=>{e.exports=new(be())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})})),$a=se(((t,e)=>{e.exports=new(ga())({explicit:[ya(),wa(),va()]})})),ba=se(((t,e)=>{var r=be();function n(a){if(a===null)return!0;let c=a.length;return c===1&&a==="~"||c===4&&(a==="null"||a==="Null"||a==="NULL")}function i(){return null}function s(a){return a===null}e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:n,construct:i,predicate:s,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})})),_a=se(((t,e)=>{var r=be();function n(a){if(a===null)return!1;let c=a.length;return c===4&&(a==="true"||a==="True"||a==="TRUE")||c===5&&(a==="false"||a==="False"||a==="FALSE")}function i(a){return a==="true"||a==="True"||a==="TRUE"}function s(a){return Object.prototype.toString.call(a)==="[object Boolean]"}e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:n,construct:i,predicate:s,represent:{lowercase:function(a){return a?"true":"false"},uppercase:function(a){return a?"TRUE":"FALSE"},camelcase:function(a){return a?"True":"False"}},defaultStyle:"lowercase"})})),xa=se(((t,e)=>{var r=vr(),n=be();function i(u){return u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102}function s(u){return u>=48&&u<=55}function a(u){return u>=48&&u<=57}function c(u){if(u===null)return!1;let m=u.length,h=0,y=!1;if(!m)return!1;let v=u[h];if((v==="-"||v==="+")&&(v=u[++h]),v==="0"){if(h+1===m)return!0;if(v=u[++h],v==="b"){for(h++;h<m;h++){if(v=u[h],v!=="0"&&v!=="1")return!1;y=!0}return y&&Number.isFinite(l(u))}if(v==="x"){for(h++;h<m;h++){if(!i(u.charCodeAt(h)))return!1;y=!0}return y&&Number.isFinite(l(u))}if(v==="o"){for(h++;h<m;h++){if(!s(u.charCodeAt(h)))return!1;y=!0}return y&&Number.isFinite(l(u))}}for(;h<m;h++){if(!a(u.charCodeAt(h)))return!1;y=!0}return y?Number.isFinite(l(u)):!1}function l(u){let m=u,h=1,y=m[0];if((y==="-"||y==="+")&&(y==="-"&&(h=-1),m=m.slice(1),y=m[0]),m==="0")return 0;if(y==="0"){if(m[1]==="b")return h*parseInt(m.slice(2),2);if(m[1]==="x")return h*parseInt(m.slice(2),16);if(m[1]==="o")return h*parseInt(m.slice(2),8)}return h*parseInt(m,10)}function f(u){return l(u)}function p(u){return Object.prototype.toString.call(u)==="[object Number]"&&u%1===0&&!r.isNegativeZero(u)}e.exports=new n("tag:yaml.org,2002:int",{kind:"scalar",resolve:c,construct:f,predicate:p,represent:{binary:function(u){return u>=0?"0b"+u.toString(2):"-0b"+u.toString(2).slice(1)},octal:function(u){return u>=0?"0o"+u.toString(8):"-0o"+u.toString(8).slice(1)},decimal:function(u){return u.toString(10)},hexadecimal:function(u){return u>=0?"0x"+u.toString(16).toUpperCase():"-0x"+u.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})})),Ea=se(((t,e)=>{var r=vr(),n=be(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),s=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function a(u){return u===null||!i.test(u)?!1:Number.isFinite(parseFloat(u,10))?!0:s.test(u)}function c(u){let m=u.toLowerCase(),h=m[0]==="-"?-1:1;return"+-".indexOf(m[0])>=0&&(m=m.slice(1)),m===".inf"?h===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:m===".nan"?NaN:h*parseFloat(m,10)}var l=/^[-+]?[0-9]+e/;function f(u,m){if(isNaN(u))switch(m){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===u)switch(m){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===u)switch(m){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(u))return"-0.0";let h=u.toString(10);return l.test(h)?h.replace("e",".e"):h}function p(u){return Object.prototype.toString.call(u)==="[object Number]"&&(u%1!==0||r.isNegativeZero(u))}e.exports=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:a,construct:c,predicate:p,represent:f,defaultStyle:"lowercase"})})),Sa=se(((t,e)=>{e.exports=$a().extend({implicit:[ba(),_a(),xa(),Ea()]})})),Pa=se(((t,e)=>{e.exports=Sa()})),ka=se(((t,e)=>{var r=be(),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function s(l){return l===null?!1:n.exec(l)!==null||i.exec(l)!==null}function a(l){let f=0,p=null,u=n.exec(l);if(u===null&&(u=i.exec(l)),u===null)throw new Error("Date resolve error");let m=+u[1],h=+u[2]-1,y=+u[3];if(!u[4])return new Date(Date.UTC(m,h,y));let v=+u[4],I=+u[5],P=+u[6];if(u[7]){for(f=u[7].slice(0,3);f.length<3;)f+="0";f=+f}if(u[9]){let z=+u[10],L=+(u[11]||0);p=(z*60+L)*6e4,u[9]==="-"&&(p=-p)}let D=new Date(Date.UTC(m,h,y,v,I,P,f));return p&&D.setTime(D.getTime()-p),D}function c(l){return l.toISOString()}e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:s,construct:a,instanceOf:Date,represent:c})})),Ra=se(((t,e)=>{var r=be();function n(i){return i==="<<"||i===null}e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n})})),Ia=se(((t,e)=>{var r=be(),n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
8
|
-
\r`;function i(l){if(l===null)return!1;let f=0,p=l.length,u=n;for(let m=0;m<p;m++){let h=u.indexOf(l.charAt(m));if(!(h>64)){if(h<0)return!1;f+=6}}return f%8===0}function s(l){let f=l.replace(/[\r\n=]/g,""),p=f.length,u=n,m=0,h=[];for(let v=0;v<p;v++)v%4===0&&v&&(h.push(m>>16&255),h.push(m>>8&255),h.push(m&255)),m=m<<6|u.indexOf(f.charAt(v));let y=p%4*6;return y===0?(h.push(m>>16&255),h.push(m>>8&255),h.push(m&255)):y===18?(h.push(m>>10&255),h.push(m>>2&255)):y===12&&h.push(m>>4&255),new Uint8Array(h)}function a(l){let f="",p=0,u=l.length,m=n;for(let y=0;y<u;y++)y%3===0&&y&&(f+=m[p>>18&63],f+=m[p>>12&63],f+=m[p>>6&63],f+=m[p&63]),p=(p<<8)+l[y];let h=u%3;return h===0?(f+=m[p>>18&63],f+=m[p>>12&63],f+=m[p>>6&63],f+=m[p&63]):h===2?(f+=m[p>>10&63],f+=m[p>>4&63],f+=m[p<<2&63],f+=m[64]):h===1&&(f+=m[p>>2&63],f+=m[p<<4&63],f+=m[64],f+=m[64]),f}function c(l){return Object.prototype.toString.call(l)==="[object Uint8Array]"}e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:s,predicate:c,represent:a})})),Ca=se(((t,e)=>{var r=be(),n=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function s(c){if(c===null)return!0;let l=[],f=c;for(let p=0,u=f.length;p<u;p+=1){let m=f[p],h=!1;if(i.call(m)!=="[object Object]")return!1;let y;for(y in m)if(n.call(m,y))if(!h)h=!0;else return!1;if(!h)return!1;if(l.indexOf(y)===-1)l.push(y);else return!1}return!0}function a(c){return c!==null?c:[]}e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:s,construct:a})})),Ta=se(((t,e)=>{var r=be(),n=Object.prototype.toString;function i(a){if(a===null)return!0;let c=a,l=new Array(c.length);for(let f=0,p=c.length;f<p;f+=1){let u=c[f];if(n.call(u)!=="[object Object]")return!1;let m=Object.keys(u);if(m.length!==1)return!1;l[f]=[m[0],u[m[0]]]}return!0}function s(a){if(a===null)return[];let c=a,l=new Array(c.length);for(let f=0,p=c.length;f<p;f+=1){let u=c[f],m=Object.keys(u);l[f]=[m[0],u[m[0]]]}return l}e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:s})})),Aa=se(((t,e)=>{var r=be(),n=Object.prototype.hasOwnProperty;function i(a){if(a===null)return!0;let c=a;for(let l in c)if(n.call(c,l)&&c[l]!==null)return!1;return!0}function s(a){return a!==null?a:{}}e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:s})})),Pi=se(((t,e)=>{e.exports=Pa().extend({implicit:[ka(),Ra()],explicit:[Ia(),Ca(),Ta(),Aa()]})})),xf=se(((t,e)=>{var r=vr(),n=$r(),i=_f(),s=Pi(),a=Object.prototype.hasOwnProperty,c=1,l=2,f=3,p=4,u=1,m=2,h=3,y=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,v=/[\x85\u2028\u2029]/,I=/[,\[\]{}]/,P=/^(?:!|!!|![0-9A-Za-z-]+!)$/,D=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function z(o){return Object.prototype.toString.call(o)}function L(o){return o===10||o===13}function N(o){return o===9||o===32}function X(o){return o===9||o===32||o===10||o===13}function fe(o){return o===44||o===91||o===93||o===123||o===125}function wt(o){if(o>=48&&o<=57)return o-48;let g=o|32;return g>=97&&g<=102?g-97+10:-1}function vt(o){return o===120?2:o===117?4:o===85?8:0}function ze(o){return o>=48&&o<=57?o-48:-1}function Je(o){switch(o){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
9
|
-
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function Vt(o){return o<=65535?String.fromCharCode(o):String.fromCharCode((o-65536>>10)+55296,(o-65536&1023)+56320)}function ot(o,g,b){g==="__proto__"?Object.defineProperty(o,g,{configurable:!0,enumerable:!0,writable:!0,value:b}):o[g]=b}var qt=new Array(256),mr=new Array(256);for(let o=0;o<256;o++)qt[o]=Je(o)?1:0,mr[o]=Je(o);function pe(o,g){this.input=o,this.filename=g.filename||null,this.schema=g.schema||s,this.onWarning=g.onWarning||null,this.legacy=g.legacy||!1,this.json=g.json||!1,this.listener=g.listener||null,this.maxDepth=typeof g.maxDepth=="number"?g.maxDepth:100,this.maxMergeSeqLength=typeof g.maxMergeSeqLength=="number"?g.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=o.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function un(o,g){let b={name:o.filename,buffer:o.input.slice(0,-1),position:o.position,line:o.line,column:o.position-o.lineStart};return b.snippet=i(b),new n(g,b)}function M(o,g){throw un(o,g)}function Dt(o,g){o.onWarning&&o.onWarning.call(null,un(o,g))}function We(o,g,b){let E=o.anchorMapTransactions;if(E.length!==0){let $=E[E.length-1];a.call($,g)||($[g]={existed:a.call(o.anchorMap,g),value:o.anchorMap[g]})}o.anchorMap[g]=b}function vi(o){o.anchorMapTransactions.push(Object.create(null))}function $t(o){let g=o.anchorMapTransactions.pop(),b=o.anchorMapTransactions;if(b.length===0)return;let E=b[b.length-1],$=Object.keys(g);for(let C=0,d=$.length;C<d;C+=1){let w=$[C];a.call(E,w)||(E[w]=g[w])}}function $i(o){let g=o.anchorMapTransactions.pop(),b=Object.keys(g);for(let E=b.length-1;E>=0;E-=1){let $=g[b[E]];$.existed?o.anchorMap[b[E]]=$.value:delete o.anchorMap[b[E]]}}function hr(o){return{position:o.position,line:o.line,lineStart:o.lineStart,lineIndent:o.lineIndent,firstTabInLine:o.firstTabInLine,tag:o.tag,anchor:o.anchor,kind:o.kind,result:o.result}}function Lt(o,g){o.position=g.position,o.line=g.line,o.lineStart=g.lineStart,o.lineIndent=g.lineIndent,o.firstTabInLine=g.firstTabInLine,o.tag=g.tag,o.anchor=g.anchor,o.kind=g.kind,o.result=g.result}var dn={YAML:function(g,b,E){g.version!==null&&M(g,"duplication of %YAML directive"),E.length!==1&&M(g,"YAML directive accepts exactly one argument");let $=/^([0-9]+)\.([0-9]+)$/.exec(E[0]);$===null&&M(g,"ill-formed argument of the YAML directive");let C=parseInt($[1],10),d=parseInt($[2],10);C!==1&&M(g,"unacceptable YAML version of the document"),g.version=E[0],g.checkLineBreaks=d<2,d!==1&&d!==2&&Dt(g,"unsupported YAML version of the document")},TAG:function(g,b,E){let $;E.length!==2&&M(g,"TAG directive accepts exactly two arguments");let C=E[0];$=E[1],P.test(C)||M(g,"ill-formed tag handle (first argument) of the TAG directive"),a.call(g.tagMap,C)&&M(g,'there is a previously declared suffix for "'+C+'" tag handle'),D.test($)||M(g,"ill-formed tag prefix (second argument) of the TAG directive");try{$=decodeURIComponent($)}catch{M(g,"tag prefix is malformed: "+$)}g.tagMap[C]=$}};function Re(o,g,b,E){if(g<b){let $=o.input.slice(g,b);if(E)for(let C=0,d=$.length;C<d;C+=1){let w=$.charCodeAt(C);w===9||w>=32&&w<=1114111||M(o,"expected valid JSON character")}else y.test($)&&M(o,"the stream contains non-printable characters");o.result+=$}}function st(o,g,b,E){r.isObject(b)||M(o,"cannot merge mappings; the provided source object is unacceptable");let $=Object.keys(b);for(let C=0,d=$.length;C<d;C+=1){let w=$[C];a.call(g,w)||(ot(g,w,b[w]),E[w]=!0)}}function Ye(o,g,b,E,$,C,d,w,R){if(Array.isArray($)){$=Array.prototype.slice.call($);for(let _=0,x=$.length;_<x;_+=1)Array.isArray($[_])&&M(o,"nested arrays are not supported inside keys"),typeof $=="object"&&z($[_])==="[object Object]"&&($[_]="[object Object]")}if(typeof $=="object"&&z($)==="[object Object]"&&($="[object Object]"),$=String($),g===null&&(g={}),E==="tag:yaml.org,2002:merge")if(Array.isArray(C)){C.length>o.maxMergeSeqLength&&M(o,"merge sequence length exceeded maxMergeSeqLength ("+o.maxMergeSeqLength+")");let _=new Set;for(let x=0,k=C.length;x<k;x+=1){let S=C[x];_.has(S)||(_.add(S),st(o,g,S,b))}}else st(o,g,C,b);else!o.json&&!a.call(b,$)&&a.call(g,$)&&(o.line=d||o.line,o.lineStart=w||o.lineStart,o.position=R||o.position,M(o,"duplicated mapping key")),ot(g,$,C),delete b[$];return g}function Ft(o){let g=o.input.charCodeAt(o.position);g===10?o.position++:g===13?(o.position++,o.input.charCodeAt(o.position)===10&&o.position++):M(o,"a line break is expected"),o.line+=1,o.lineStart=o.position,o.firstTabInLine=-1}function ue(o,g,b){let E=0,$=o.input.charCodeAt(o.position);for(;$!==0;){for(;N($);)$===9&&o.firstTabInLine===-1&&(o.firstTabInLine=o.position),$=o.input.charCodeAt(++o.position);if(g&&$===35)do $=o.input.charCodeAt(++o.position);while($!==10&&$!==13&&$!==0);if(L($))for(Ft(o),$=o.input.charCodeAt(o.position),E++,o.lineIndent=0;$===32;)o.lineIndent++,$=o.input.charCodeAt(++o.position);else break}return b!==-1&&E!==0&&o.lineIndent<b&&Dt(o,"deficient indentation"),E}function zt(o){let g=o.position,b=o.input.charCodeAt(g);return!!((b===45||b===46)&&b===o.input.charCodeAt(g+1)&&b===o.input.charCodeAt(g+2)&&(g+=3,b=o.input.charCodeAt(g),b===0||X(b)))}function Ge(o,g){g===1?o.result+=" ":g>1&&(o.result+=r.repeat(`
|
|
10
|
-
`,g-1))}function fn(o,g,b){let E,$,C,d,w,R,_=o.kind,x=o.result,k=o.input.charCodeAt(o.position);if(X(k)||fe(k)||k===35||k===38||k===42||k===33||k===124||k===62||k===39||k===34||k===37||k===64||k===96)return!1;if(k===63||k===45){let S=o.input.charCodeAt(o.position+1);if(X(S)||b&&fe(S))return!1}for(o.kind="scalar",o.result="",E=$=o.position,C=!1;k!==0;){if(k===58){let S=o.input.charCodeAt(o.position+1);if(X(S)||b&&fe(S))break}else if(k===35){if(X(o.input.charCodeAt(o.position-1)))break}else{if(o.position===o.lineStart&&zt(o)||b&&fe(k))break;if(L(k))if(d=o.line,w=o.lineStart,R=o.lineIndent,ue(o,!1,-1),o.lineIndent>=g){C=!0,k=o.input.charCodeAt(o.position);continue}else{o.position=$,o.line=d,o.lineStart=w,o.lineIndent=R;break}}C&&(Re(o,E,$,!1),Ge(o,o.line-d),E=$=o.position,C=!1),N(k)||($=o.position+1),k=o.input.charCodeAt(++o.position)}return Re(o,E,$,!1),o.result?!0:(o.kind=_,o.result=x,!1)}function pn(o,g){let b,E,$=o.input.charCodeAt(o.position);if($!==39)return!1;for(o.kind="scalar",o.result="",o.position++,b=E=o.position;($=o.input.charCodeAt(o.position))!==0;)if($===39)if(Re(o,b,o.position,!0),$=o.input.charCodeAt(++o.position),$===39)b=o.position,o.position++,E=o.position;else return!0;else L($)?(Re(o,b,E,!0),Ge(o,ue(o,!1,g)),b=E=o.position):o.position===o.lineStart&&zt(o)?M(o,"unexpected end of the document within a single quoted scalar"):(o.position++,N($)||(E=o.position));M(o,"unexpected end of the stream within a single quoted scalar")}function gr(o,g){let b,E,$,C=o.input.charCodeAt(o.position);if(C!==34)return!1;for(o.kind="scalar",o.result="",o.position++,b=E=o.position;(C=o.input.charCodeAt(o.position))!==0;){if(C===34)return Re(o,b,o.position,!0),o.position++,!0;if(C===92){if(Re(o,b,o.position,!0),C=o.input.charCodeAt(++o.position),L(C))ue(o,!1,g);else if(C<256&&qt[C])o.result+=mr[C],o.position++;else if(($=vt(C))>0){let d=$,w=0;for(;d>0;d--)C=o.input.charCodeAt(++o.position),($=wt(C))>=0?w=(w<<4)+$:M(o,"expected hexadecimal character");o.result+=Vt(w),o.position++}else M(o,"unknown escape sequence");b=E=o.position}else L(C)?(Re(o,b,E,!0),Ge(o,ue(o,!1,g)),b=E=o.position):o.position===o.lineStart&&zt(o)?M(o,"unexpected end of the document within a double quoted scalar"):(o.position++,N(C)||(E=o.position))}M(o,"unexpected end of the stream within a double quoted scalar")}function mn(o,g){let b=!0,E,$,C,d=o.tag,w,R=o.anchor,_,x,k,S,O=Object.create(null),j,q,F,Q=o.input.charCodeAt(o.position);if(Q===91)_=93,S=!1,w=[];else if(Q===123)_=125,S=!0,w={};else return!1;for(o.anchor!==null&&We(o,o.anchor,w),Q=o.input.charCodeAt(++o.position);Q!==0;){if(ue(o,!0,g),Q=o.input.charCodeAt(o.position),Q===_)return o.position++,o.tag=d,o.anchor=R,o.kind=S?"mapping":"sequence",o.result=w,!0;b?Q===44&&M(o,"expected the node content, but found ','"):M(o,"missed comma between flow collection entries"),q=j=F=null,x=k=!1,Q===63&&X(o.input.charCodeAt(o.position+1))&&(x=k=!0,o.position++,ue(o,!0,g)),E=o.line,$=o.lineStart,C=o.position,Qe(o,g,c,!1,!0),q=o.tag,j=o.result,ue(o,!0,g),Q=o.input.charCodeAt(o.position),(k||o.line===E)&&Q===58&&(x=!0,Q=o.input.charCodeAt(++o.position),ue(o,!0,g),Qe(o,g,c,!1,!0),F=o.result),S?Ye(o,w,O,q,j,F,E,$,C):x?w.push(Ye(o,null,O,q,j,F,E,$,C)):w.push(j),ue(o,!0,g),Q=o.input.charCodeAt(o.position),Q===44?(b=!0,Q=o.input.charCodeAt(++o.position)):b=!1}M(o,"unexpected end of the stream within a flow collection")}function hn(o,g){let b,E=u,$=!1,C=!1,d=g,w=0,R=!1,_,x=o.input.charCodeAt(o.position);if(x===124)b=!1;else if(x===62)b=!0;else return!1;for(o.kind="scalar",o.result="";x!==0;)if(x=o.input.charCodeAt(++o.position),x===43||x===45)u===E?E=x===43?h:m:M(o,"repeat of a chomping mode identifier");else if((_=ze(x))>=0)_===0?M(o,"bad explicit indentation width of a block scalar; it cannot be less than one"):C?M(o,"repeat of an indentation width identifier"):(d=g+_-1,C=!0);else break;if(N(x)){do x=o.input.charCodeAt(++o.position);while(N(x));if(x===35)do x=o.input.charCodeAt(++o.position);while(!L(x)&&x!==0)}for(;x!==0;){for(Ft(o),o.lineIndent=0,x=o.input.charCodeAt(o.position);(!C||o.lineIndent<d)&&x===32;)o.lineIndent++,x=o.input.charCodeAt(++o.position);if(!C&&o.lineIndent>d&&(d=o.lineIndent),L(x)){w++;continue}if(!C&&d===0&&M(o,"missing indentation for block scalar"),o.lineIndent<d){E===h?o.result+=r.repeat(`
|
|
11
|
-
`,$?1+w:w):E===u&&$&&(o.result+=`
|
|
12
|
-
`);break}b?N(x)?(R=!0,o.result+=r.repeat(`
|
|
13
|
-
`,$?1+w:w)):R?(R=!1,o.result+=r.repeat(`
|
|
14
|
-
`,w+1)):w===0?$&&(o.result+=" "):o.result+=r.repeat(`
|
|
15
|
-
`,w):o.result+=r.repeat(`
|
|
16
|
-
`,$?1+w:w),$=!0,C=!0,w=0;let k=o.position;for(;!L(x)&&x!==0;)x=o.input.charCodeAt(++o.position);Re(o,k,o.position,!1)}return!0}function Xe(o,g){let b=o.tag,E=o.anchor,$=[],C=!1;if(o.firstTabInLine!==-1)return!1;o.anchor!==null&&We(o,o.anchor,$);let d=o.input.charCodeAt(o.position);for(;d!==0&&(o.firstTabInLine!==-1&&(o.position=o.firstTabInLine,M(o,"tab characters must not be used in indentation")),!(d!==45||!X(o.input.charCodeAt(o.position+1))));){if(C=!0,o.position++,ue(o,!0,-1)&&o.lineIndent<=g){$.push(null),d=o.input.charCodeAt(o.position);continue}let w=o.line;if(Qe(o,g,f,!1,!0),$.push(o.result),ue(o,!0,-1),d=o.input.charCodeAt(o.position),(o.line===w||o.lineIndent>g)&&d!==0)M(o,"bad indentation of a sequence entry");else if(o.lineIndent<g)break}return C?(o.tag=b,o.anchor=E,o.kind="sequence",o.result=$,!0):!1}function gn(o,g,b){let E,$,C,d,w=o.tag,R=o.anchor,_={},x=Object.create(null),k=null,S=null,O=null,j=!1,q=!1;if(o.firstTabInLine!==-1)return!1;o.anchor!==null&&We(o,o.anchor,_);let F=o.input.charCodeAt(o.position);for(;F!==0;){!j&&o.firstTabInLine!==-1&&(o.position=o.firstTabInLine,M(o,"tab characters must not be used in indentation"));let Q=o.input.charCodeAt(o.position+1),le=o.line;if((F===63||F===58)&&X(Q))F===63?(j&&(Ye(o,_,x,k,S,null,$,C,d),k=S=O=null),q=!0,j=!0,E=!0):j?(j=!1,E=!0):M(o,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),o.position+=1,F=Q;else{if($=o.line,C=o.lineStart,d=o.position,!Qe(o,b,l,!1,!0))break;if(o.line===le){for(F=o.input.charCodeAt(o.position);N(F);)F=o.input.charCodeAt(++o.position);if(F===58)F=o.input.charCodeAt(++o.position),X(F)||M(o,"a whitespace character is expected after the key-value separator within a block mapping"),j&&(Ye(o,_,x,k,S,null,$,C,d),k=S=O=null),q=!0,j=!1,E=!1,k=o.tag,S=o.result;else if(q)M(o,"can not read an implicit mapping pair; a colon is missed");else return o.tag=w,o.anchor=R,!0}else if(q)M(o,"can not read a block mapping entry; a multiline key may not be an implicit key");else return o.tag=w,o.anchor=R,!0}if((o.line===le||o.lineIndent>g)&&(j&&($=o.line,C=o.lineStart,d=o.position),Qe(o,g,p,!0,E)&&(j?S=o.result:O=o.result),j||(Ye(o,_,x,k,S,O,$,C,d),k=S=O=null),ue(o,!0,-1),F=o.input.charCodeAt(o.position)),(o.line===le||o.lineIndent>g)&&F!==0)M(o,"bad indentation of a mapping entry");else if(o.lineIndent<g)break}return j&&Ye(o,_,x,k,S,null,$,C,d),q&&(o.tag=w,o.anchor=R,o.kind="mapping",o.result=_),q}function bi(o){let g=!1,b=!1,E,$,C=o.input.charCodeAt(o.position);if(C!==33)return!1;o.tag!==null&&M(o,"duplication of a tag property"),C=o.input.charCodeAt(++o.position),C===60?(g=!0,C=o.input.charCodeAt(++o.position)):C===33?(b=!0,E="!!",C=o.input.charCodeAt(++o.position)):E="!";let d=o.position;if(g){do C=o.input.charCodeAt(++o.position);while(C!==0&&C!==62);o.position<o.length?($=o.input.slice(d,o.position),C=o.input.charCodeAt(++o.position)):M(o,"unexpected end of the stream within a verbatim tag")}else{for(;C!==0&&!X(C);)C===33&&(b?M(o,"tag suffix cannot contain exclamation marks"):(E=o.input.slice(d-1,o.position+1),P.test(E)||M(o,"named tag handle cannot contain such characters"),b=!0,d=o.position+1)),C=o.input.charCodeAt(++o.position);$=o.input.slice(d,o.position),I.test($)&&M(o,"tag suffix cannot contain flow indicator characters")}$&&!D.test($)&&M(o,"tag name cannot contain such characters: "+$);try{$=decodeURIComponent($)}catch{M(o,"tag name is malformed: "+$)}return g?o.tag=$:a.call(o.tagMap,E)?o.tag=o.tagMap[E]+$:E==="!"?o.tag="!"+$:E==="!!"?o.tag="tag:yaml.org,2002:"+$:M(o,'undeclared tag handle "'+E+'"'),!0}function yn(o){let g=o.input.charCodeAt(o.position);if(g!==38)return!1;o.anchor!==null&&M(o,"duplication of an anchor property"),g=o.input.charCodeAt(++o.position);let b=o.position;for(;g!==0&&!X(g)&&!fe(g);)g=o.input.charCodeAt(++o.position);return o.position===b&&M(o,"name of an anchor node must contain at least one character"),o.anchor=o.input.slice(b,o.position),!0}function wn(o){let g=o.input.charCodeAt(o.position);if(g!==42)return!1;g=o.input.charCodeAt(++o.position);let b=o.position;for(;g!==0&&!X(g)&&!fe(g);)g=o.input.charCodeAt(++o.position);o.position===b&&M(o,"name of an alias node must contain at least one character");let E=o.input.slice(b,o.position);return a.call(o.anchorMap,E)||M(o,'unidentified alias "'+E+'"'),o.result=o.anchorMap[E],ue(o,!0,-1),!0}function _i(o,g,b,E){let $=hr(o);return vi(o),Lt(o,g),o.tag=null,o.anchor=null,o.kind=null,o.result=null,gn(o,b,E)&&o.kind==="mapping"?($t(o),!0):($i(o),Lt(o,$),!1)}function Qe(o,g,b,E,$){let C,d,w=1,R=!1,_=!1,x=null,k,S,O;o.depth>=o.maxDepth&&M(o,"nesting exceeded maxDepth ("+o.maxDepth+")"),o.depth+=1,o.listener!==null&&o.listener("open",o),o.tag=null,o.anchor=null,o.kind=null,o.result=null;let j=C=d=p===b||f===b;if(E&&ue(o,!0,-1)&&(R=!0,o.lineIndent>g?w=1:o.lineIndent===g?w=0:o.lineIndent<g&&(w=-1)),w===1)for(;;){let q=o.input.charCodeAt(o.position),F=hr(o);if(R&&(q===33&&o.tag!==null||q===38&&o.anchor!==null)||!bi(o)&&!yn(o))break;x===null&&(x=F),ue(o,!0,-1)?(R=!0,d=j,o.lineIndent>g?w=1:o.lineIndent===g?w=0:o.lineIndent<g&&(w=-1)):d=!1}if(d&&(d=R||$),w===1||p===b)if(c===b||l===b?S=g:S=g+1,O=o.position-o.lineStart,w===1)if(d&&(Xe(o,O)||gn(o,O,S))||mn(o,S))_=!0;else{let q=o.input.charCodeAt(o.position);x!==null&&j&&!d&&q!==124&&q!==62&&_i(o,x,x.position-x.lineStart,S)||C&&hn(o,S)||pn(o,S)||gr(o,S)?_=!0:wn(o)?(_=!0,(o.tag!==null||o.anchor!==null)&&M(o,"alias node should not have any properties")):fn(o,S,c===b)&&(_=!0,o.tag===null&&(o.tag="?")),o.anchor!==null&&We(o,o.anchor,o.result)}else w===0&&(_=d&&Xe(o,O));if(o.tag===null)o.anchor!==null&&We(o,o.anchor,o.result);else if(o.tag==="?"){o.result!==null&&o.kind!=="scalar"&&M(o,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+o.kind+'"');for(let q=0,F=o.implicitTypes.length;q<F;q+=1)if(k=o.implicitTypes[q],k.resolve(o.result)){o.result=k.construct(o.result),o.tag=k.tag,o.anchor!==null&&We(o,o.anchor,o.result);break}}else if(o.tag!=="!"){if(a.call(o.typeMap[o.kind||"fallback"],o.tag))k=o.typeMap[o.kind||"fallback"][o.tag];else{k=null;let q=o.typeMap.multi[o.kind||"fallback"];for(let F=0,Q=q.length;F<Q;F+=1)if(o.tag.slice(0,q[F].tag.length)===q[F].tag){k=q[F];break}}k||M(o,"unknown tag !<"+o.tag+">"),o.result!==null&&k.kind!==o.kind&&M(o,"unacceptable node kind for !<"+o.tag+'> tag; it should be "'+k.kind+'", not "'+o.kind+'"'),k.resolve(o.result,o.tag)?(o.result=k.construct(o.result,o.tag),o.anchor!==null&&We(o,o.anchor,o.result)):M(o,"cannot resolve a node with !<"+o.tag+"> explicit tag")}return o.listener!==null&&o.listener("close",o),o.depth-=1,o.tag!==null||o.anchor!==null||_}function xi(o){let g=o.position,b=!1,E;for(o.version=null,o.checkLineBreaks=o.legacy,o.tagMap=Object.create(null),o.anchorMap=Object.create(null);(E=o.input.charCodeAt(o.position))!==0&&(ue(o,!0,-1),E=o.input.charCodeAt(o.position),!(o.lineIndent>0||E!==37));){b=!0,E=o.input.charCodeAt(++o.position);let $=o.position;for(;E!==0&&!X(E);)E=o.input.charCodeAt(++o.position);let C=o.input.slice($,o.position),d=[];for(C.length<1&&M(o,"directive name must not be less than one character in length");E!==0;){for(;N(E);)E=o.input.charCodeAt(++o.position);if(E===35){do E=o.input.charCodeAt(++o.position);while(E!==0&&!L(E));break}if(L(E))break;for($=o.position;E!==0&&!X(E);)E=o.input.charCodeAt(++o.position);d.push(o.input.slice($,o.position))}E!==0&&Ft(o),a.call(dn,C)?dn[C](o,C,d):Dt(o,'unknown document directive "'+C+'"')}if(ue(o,!0,-1),o.lineIndent===0&&o.input.charCodeAt(o.position)===45&&o.input.charCodeAt(o.position+1)===45&&o.input.charCodeAt(o.position+2)===45?(o.position+=3,ue(o,!0,-1)):b&&M(o,"directives end mark is expected"),Qe(o,o.lineIndent-1,p,!1,!0),ue(o,!0,-1),o.checkLineBreaks&&v.test(o.input.slice(g,o.position))&&Dt(o,"non-ASCII line breaks are interpreted as content"),o.documents.push(o.result),o.position===o.lineStart&&zt(o)){o.input.charCodeAt(o.position)===46&&(o.position+=3,ue(o,!0,-1));return}o.position<o.length-1&&M(o,"end of the stream or a document separator is expected")}function vn(o,g){o=String(o),g=g||{},o.length!==0&&(o.charCodeAt(o.length-1)!==10&&o.charCodeAt(o.length-1)!==13&&(o+=`
|
|
17
|
-
`),o.charCodeAt(0)===65279&&(o=o.slice(1)));let b=new pe(o,g),E=o.indexOf("\0");for(E!==-1&&(b.position=E,M(b,"null byte is not allowed in input")),b.input+="\0";b.input.charCodeAt(b.position)===32;)b.lineIndent+=1,b.position+=1;for(;b.position<b.length-1;)xi(b);return b.documents}function $n(o,g,b){g!==null&&typeof g=="object"&&typeof b>"u"&&(b=g,g=null);let E=vn(o,b);if(typeof g!="function")return E;for(let $=0,C=E.length;$<C;$+=1)g(E[$])}function Ei(o,g){let b=vn(o,g);if(b.length!==0){if(b.length===1)return b[0];throw new n("expected a single document in the stream, but found more")}}e.exports.loadAll=$n,e.exports.load=Ei})),Ef=se(((t,e)=>{var r=vr(),n=$r(),i=Pi(),s=Object.prototype.toString,a=Object.prototype.hasOwnProperty,c=65279,l=9,f=10,p=13,u=32,m=33,h=34,y=35,v=37,I=38,P=39,D=42,z=44,L=45,N=58,X=61,fe=62,wt=63,vt=64,ze=91,Je=93,Vt=96,ot=123,qt=124,mr=125,pe={};pe[0]="\\0",pe[7]="\\a",pe[8]="\\b",pe[9]="\\t",pe[10]="\\n",pe[11]="\\v",pe[12]="\\f",pe[13]="\\r",pe[27]="\\e",pe[34]='\\"',pe[92]="\\\\",pe[133]="\\N",pe[160]="\\_",pe[8232]="\\L",pe[8233]="\\P";var un=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],M=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Dt(d,w){if(w===null)return{};let R={},_=Object.keys(w);for(let x=0,k=_.length;x<k;x+=1){let S=_[x],O=String(w[S]);S.slice(0,2)==="!!"&&(S="tag:yaml.org,2002:"+S.slice(2));let j=d.compiledTypeMap.fallback[S];j&&a.call(j.styleAliases,O)&&(O=j.styleAliases[O]),R[S]=O}return R}function We(d){let w,R,_=d.toString(16).toUpperCase();if(d<=255)w="x",R=2;else if(d<=65535)w="u",R=4;else if(d<=4294967295)w="U",R=8;else throw new n("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+w+r.repeat("0",R-_.length)+_}var vi=1,$t=2;function $i(d){this.schema=d.schema||i,this.indent=Math.max(1,d.indent||2),this.noArrayIndent=d.noArrayIndent||!1,this.skipInvalid=d.skipInvalid||!1,this.flowLevel=r.isNothing(d.flowLevel)?-1:d.flowLevel,this.styleMap=Dt(this.schema,d.styles||null),this.sortKeys=d.sortKeys||!1,this.lineWidth=d.lineWidth||80,this.noRefs=d.noRefs||!1,this.noCompatMode=d.noCompatMode||!1,this.condenseFlow=d.condenseFlow||!1,this.quotingType=d.quotingType==='"'?$t:vi,this.forceQuotes=d.forceQuotes||!1,this.replacer=typeof d.replacer=="function"?d.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function hr(d,w){let R=r.repeat(" ",w),_=0,x="",k=d.length;for(;_<k;){let S,O=d.indexOf(`
|
|
18
|
-
`,_);O===-1?(S=d.slice(_),_=k):(S=d.slice(_,O+1),_=O+1),S.length&&S!==`
|
|
19
|
-
`&&(x+=R),x+=S}return x}function Lt(d,w){return`
|
|
20
|
-
`+r.repeat(" ",d.indent*w)}function dn(d,w){for(let R=0,_=d.implicitTypes.length;R<_;R+=1)if(d.implicitTypes[R].resolve(w))return!0;return!1}function Re(d){return d===u||d===l}function st(d){return d>=32&&d<=126||d>=161&&d<=55295&&d!==8232&&d!==8233||d>=57344&&d<=65533&&d!==c||d>=65536&&d<=1114111}function Ye(d){return st(d)&&d!==c&&d!==p&&d!==f}function Ft(d,w,R){let _=Ye(d),x=_&&!Re(d);return(R?_:_&&d!==z&&d!==ze&&d!==Je&&d!==ot&&d!==mr)&&d!==y&&!(w===N&&!x)||Ye(w)&&!Re(w)&&d===y||w===N&&x}function ue(d){return st(d)&&d!==c&&!Re(d)&&d!==L&&d!==wt&&d!==N&&d!==z&&d!==ze&&d!==Je&&d!==ot&&d!==mr&&d!==y&&d!==I&&d!==D&&d!==m&&d!==qt&&d!==X&&d!==fe&&d!==P&&d!==h&&d!==v&&d!==vt&&d!==Vt}function zt(d){return!Re(d)&&d!==N}function Ge(d,w){let R=d.charCodeAt(w),_;return R>=55296&&R<=56319&&w+1<d.length&&(_=d.charCodeAt(w+1),_>=56320&&_<=57343)?(R-55296)*1024+_-56320+65536:R}function fn(d){return/^\n* /.test(d)}var pn=1,gr=2,mn=3,hn=4,Xe=5;function gn(d,w,R,_,x,k,S,O){let j,q=0,F=null,Q=!1,le=!1,ma=_!==-1,yr=-1,wr=ue(Ge(d,0))&&zt(Ge(d,d.length-1));if(w||S)for(j=0;j<d.length;q>=65536?j+=2:j++){if(q=Ge(d,j),!st(q))return Xe;wr=wr&&Ft(q,F,O),F=q}else{for(j=0;j<d.length;q>=65536?j+=2:j++){if(q=Ge(d,j),q===f)Q=!0,ma&&(le=le||j-yr-1>_&&d[yr+1]!==" ",yr=j);else if(!st(q))return Xe;wr=wr&&Ft(q,F,O),F=q}le=le||ma&&j-yr-1>_&&d[yr+1]!==" "}return!Q&&!le?wr&&!S&&!x(d)?pn:k===$t?Xe:gr:R>9&&fn(d)?Xe:S?k===$t?Xe:gr:le?hn:mn}function bi(d,w,R,_,x){d.dump=(function(){if(w.length===0)return d.quotingType===$t?'""':"''";if(!d.noCompatMode&&(un.indexOf(w)!==-1||M.test(w)))return d.quotingType===$t?'"'+w+'"':"'"+w+"'";let k=d.indent*Math.max(1,R),S=d.lineWidth===-1?-1:Math.max(Math.min(d.lineWidth,40),d.lineWidth-k),O=_||d.flowLevel>-1&&R>=d.flowLevel;function j(q){return dn(d,q)}switch(gn(w,O,d.indent,S,j,d.quotingType,d.forceQuotes&&!_,x)){case pn:return w;case gr:return"'"+w.replace(/'/g,"''")+"'";case mn:return"|"+yn(w,d.indent)+wn(hr(w,k));case hn:return">"+yn(w,d.indent)+wn(hr(_i(w,S),k));case Xe:return'"'+xi(w,S)+'"';default:throw new n("impossible error: invalid scalar style")}})()}function yn(d,w){let R=fn(d)?String(w):"",_=d[d.length-1]===`
|
|
21
|
-
`;return R+(_&&(d[d.length-2]===`
|
|
22
|
-
`||d===`
|
|
23
|
-
`)?"+":_?"":"-")+`
|
|
24
|
-
`}function wn(d){return d[d.length-1]===`
|
|
25
|
-
`?d.slice(0,-1):d}function _i(d,w){let R=/(\n+)([^\n]*)/g,_=(function(){let O=d.indexOf(`
|
|
26
|
-
`);return O=O!==-1?O:d.length,R.lastIndex=O,Qe(d.slice(0,O),w)})(),x=d[0]===`
|
|
27
|
-
`||d[0]===" ",k,S;for(;S=R.exec(d);){let O=S[1],j=S[2];k=j[0]===" ",_+=O+(!x&&!k&&j!==""?`
|
|
28
|
-
`:"")+Qe(j,w),x=k}return _}function Qe(d,w){if(d===""||d[0]===" ")return d;let R=/ [^ ]/g,_,x=0,k,S=0,O=0,j="";for(;_=R.exec(d);)O=_.index,O-x>w&&(k=S>x?S:O,j+=`
|
|
29
|
-
`+d.slice(x,k),x=k+1),S=O;return j+=`
|
|
30
|
-
`,d.length-x>w&&S>x?j+=d.slice(x,S)+`
|
|
31
|
-
`+d.slice(S+1):j+=d.slice(x),j.slice(1)}function xi(d){let w="",R=0;for(let _=0;_<d.length;R>=65536?_+=2:_++){R=Ge(d,_);let x=pe[R];!x&&st(R)?(w+=d[_],R>=65536&&(w+=d[_+1])):w+=x||We(R)}return w}function vn(d,w,R){let _="",x=d.tag;for(let k=0,S=R.length;k<S;k+=1){let O=R[k];d.replacer&&(O=d.replacer.call(R,String(k),O)),(b(d,w,O,!1,!1)||typeof O>"u"&&b(d,w,null,!1,!1))&&(_!==""&&(_+=","+(d.condenseFlow?"":" ")),_+=d.dump)}d.tag=x,d.dump="["+_+"]"}function $n(d,w,R,_){let x="",k=d.tag;for(let S=0,O=R.length;S<O;S+=1){let j=R[S];d.replacer&&(j=d.replacer.call(R,String(S),j)),(b(d,w+1,j,!0,!0,!1,!0)||typeof j>"u"&&b(d,w+1,null,!0,!0,!1,!0))&&((!_||x!=="")&&(x+=Lt(d,w)),d.dump&&f===d.dump.charCodeAt(0)?x+="-":x+="- ",x+=d.dump)}d.tag=k,d.dump=x||"[]"}function Ei(d,w,R){let _="",x=d.tag,k=Object.keys(R);for(let S=0,O=k.length;S<O;S+=1){let j="";_!==""&&(j+=", "),d.condenseFlow&&(j+='"');let q=k[S],F=R[q];d.replacer&&(F=d.replacer.call(R,q,F)),b(d,w,q,!1,!1)&&(d.dump.length>1024&&(j+="? "),j+=d.dump+(d.condenseFlow?'"':"")+":"+(d.condenseFlow?"":" "),b(d,w,F,!1,!1)&&(j+=d.dump,_+=j))}d.tag=x,d.dump="{"+_+"}"}function o(d,w,R,_){let x="",k=d.tag,S=Object.keys(R);if(d.sortKeys===!0)S.sort();else if(typeof d.sortKeys=="function")S.sort(d.sortKeys);else if(d.sortKeys)throw new n("sortKeys must be a boolean or a function");for(let O=0,j=S.length;O<j;O+=1){let q="";(!_||x!=="")&&(q+=Lt(d,w));let F=S[O],Q=R[F];if(d.replacer&&(Q=d.replacer.call(R,F,Q)),!b(d,w+1,F,!0,!0,!0))continue;let le=d.tag!==null&&d.tag!=="?"||d.dump&&d.dump.length>1024;le&&(d.dump&&f===d.dump.charCodeAt(0)?q+="?":q+="? "),q+=d.dump,le&&(q+=Lt(d,w)),b(d,w+1,Q,!0,le)&&(d.dump&&f===d.dump.charCodeAt(0)?q+=":":q+=": ",q+=d.dump,x+=q)}d.tag=k,d.dump=x||"{}"}function g(d,w,R){let _=R?d.explicitTypes:d.implicitTypes;for(let x=0,k=_.length;x<k;x+=1){let S=_[x];if((S.instanceOf||S.predicate)&&(!S.instanceOf||typeof w=="object"&&w instanceof S.instanceOf)&&(!S.predicate||S.predicate(w))){if(R?S.multi&&S.representName?d.tag=S.representName(w):d.tag=S.tag:d.tag="?",S.represent){let O=d.styleMap[S.tag]||S.defaultStyle,j;if(s.call(S.represent)==="[object Function]")j=S.represent(w,O);else if(a.call(S.represent,O))j=S.represent[O](w,O);else throw new n("!<"+S.tag+'> tag resolver accepts not "'+O+'" style');d.dump=j}return!0}}return!1}function b(d,w,R,_,x,k,S){d.tag=null,d.dump=R,g(d,R,!1)||g(d,R,!0);let O=s.call(d.dump),j=_;_&&(_=d.flowLevel<0||d.flowLevel>w);let q=O==="[object Object]"||O==="[object Array]",F,Q;if(q&&(F=d.duplicates.indexOf(R),Q=F!==-1),(d.tag!==null&&d.tag!=="?"||Q||d.indent!==2&&w>0)&&(x=!1),Q&&d.usedDuplicates[F])d.dump="*ref_"+F;else{if(q&&Q&&!d.usedDuplicates[F]&&(d.usedDuplicates[F]=!0),O==="[object Object]")_&&Object.keys(d.dump).length!==0?(o(d,w,d.dump,x),Q&&(d.dump="&ref_"+F+d.dump)):(Ei(d,w,d.dump),Q&&(d.dump="&ref_"+F+" "+d.dump));else if(O==="[object Array]")_&&d.dump.length!==0?(d.noArrayIndent&&!S&&w>0?$n(d,w-1,d.dump,x):$n(d,w,d.dump,x),Q&&(d.dump="&ref_"+F+d.dump)):(vn(d,w,d.dump),Q&&(d.dump="&ref_"+F+" "+d.dump));else if(O==="[object String]")d.tag!=="?"&&bi(d,d.dump,w,k,j);else{if(O==="[object Undefined]")return!1;if(d.skipInvalid)return!1;throw new n("unacceptable kind of an object to dump "+O)}if(d.tag!==null&&d.tag!=="?"){let le=encodeURI(d.tag[0]==="!"?d.tag.slice(1):d.tag).replace(/!/g,"%21");d.tag[0]==="!"?le="!"+le:le.slice(0,18)==="tag:yaml.org,2002:"?le="!!"+le.slice(18):le="!<"+le+">",d.dump=le+" "+d.dump}}return!0}function E(d,w){let R=[],_=[];$(d,R,_);let x=_.length;for(let k=0;k<x;k+=1)w.duplicates.push(R[_[k]]);w.usedDuplicates=new Array(x)}function $(d,w,R){if(d!==null&&typeof d=="object"){let _=w.indexOf(d);if(_!==-1)R.indexOf(_)===-1&&R.push(_);else if(w.push(d),Array.isArray(d))for(let x=0,k=d.length;x<k;x+=1)$(d[x],w,R);else{let x=Object.keys(d);for(let k=0,S=x.length;k<S;k+=1)$(d[x[k]],w,R)}}}function C(d,w){w=w||{};let R=new $i(w);R.noRefs||E(d,R);let _=d;return R.replacer&&(_=R.replacer.call({"":_},"",_)),b(R,0,_,!0,!0)?R.dump+`
|
|
32
|
-
`:""}e.exports.dump=C})),Na=bf(se(((t,e)=>{var r=xf(),n=Ef();function i(s,a){return function(){throw new Error("Function yaml."+s+" is removed in js-yaml 4. Use yaml."+a+" instead, which is now safe by default.")}}e.exports.Type=be(),e.exports.Schema=ga(),e.exports.FAILSAFE_SCHEMA=$a(),e.exports.JSON_SCHEMA=Sa(),e.exports.CORE_SCHEMA=Pa(),e.exports.DEFAULT_SCHEMA=Pi(),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=n.dump,e.exports.YAMLException=$r(),e.exports.types={binary:Ia(),float:Ea(),map:va(),null:ba(),pairs:Ta(),set:Aa(),timestamp:ka(),bool:_a(),int:xa(),merge:Ra(),omap:Ca(),seq:wa(),str:ya()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:W$,Schema:Y$,FAILSAFE_SCHEMA:G$,JSON_SCHEMA:X$,CORE_SCHEMA:Q$,DEFAULT_SCHEMA:Z$,load:eb,loadAll:tb,dump:rb,YAMLException:nb,types:ib,safeLoad:ob,safeLoadAll:sb,safeDump:ab}=Na.default,Oe=Na.default});import{access as ub,readFile as ja}from"node:fs/promises";import{dirname as Sf,relative as fb,resolve as me}from"node:path";async function at(t){let e=me(t),r=await ja(e,"utf-8"),n=Oe.load(r);return Pf(e,n)}function Pf(t,e){let r=Ie(t);return{...e,openapi:me(r,e.openapi),bindings:me(r,e.bindings),microContractsConfig:me(r,e.microContractsConfig),viewsDir:me(r,e.viewsDir),generated:{contractDir:me(r,e.generated.contractDir),actions:me(r,e.generated.actions),bridge:me(r,e.generated.bridge),reactDir:me(r,e.generated.reactDir)},runtimeModule:e.runtimeModule?me(r,e.runtimeModule):e.componentsModule?me(r,e.componentsModule):void 0,themeModule:e.themeModule?me(r,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?me(r,e.design.tokens):void 0,theme:e.design.theme?me(r,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?me(r,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?me(r,e.extensions):void 0}}async function Oa(t){let e=await ja(me(t),"utf-8");return Oe.load(e)}function Ie(t){return Sf(me(t))}function bn(t){let e=t.design?.tokens,r=t.design?.theme;if(!e)throw new Error("view-contracts.config.yaml must define design.tokens (project tokens file path).");if(!r)throw new Error("view-contracts.config.yaml must define design.theme (project theme file path).");return{tokensPath:e,themePath:r}}var bt=ne(()=>{"use strict";Ht()});import{readFileSync as kf}from"node:fs";import{createRequire as Rf}from"node:module";import{dirname as ki,resolve as If}from"node:path";import{fileURLToPath as Cf}from"node:url";function Ze(){if(Ut)return Ut;let t=Rf(import.meta.url);try{return Ut=ki(t.resolve("view-contracts/package.json")),Ut}catch{let e=ki(Cf(import.meta.url));for(;;){try{let n=If(e,"package.json");if(JSON.parse(kf(n,"utf8")).name==="view-contracts")return Ut=e,Ut}catch{}let r=ki(e);if(r===e)break;e=r}throw new Error("view-contracts package root not found")}}var Ut,br=ne(()=>{"use strict"});import{resolve as Ma}from"node:path";function Tf(){return Ma(Ze(),"renderers/react/runtime")}function _n(){return Ma(Tf(),"structural.css")}var Ri=ne(()=>{"use strict";br()});import{readFile as Af}from"node:fs/promises";import{extname as Nf,resolve as jf}from"node:path";async function xn(t){let e=jf(t),r=await Af(e,"utf-8"),n=Nf(e).toLowerCase();if(n===".json")return JSON.parse(r);if(n===".yaml"||n===".yml")return Oe.load(r);throw new Error(`Unsupported design file extension "${n}" (expected .yaml, .yml, or .json): ${e}`)}var Ii=ne(()=>{"use strict";Ht()});var En,He,Kt,Sn,he,Bt,_t=ne(()=>{"use strict";En=["color","dimension","shadow","typography","layout"],He=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},Kt=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],Sn={background:["color"],foreground:["color"],radius:["dimension","layout"],padding:["dimension","layout"],shadow:["shadow"],typography:["typography"],display:["layout"],gridTemplateColumns:["layout"],minHeight:["dimension","layout"],maxWidth:["dimension","layout"],width:["dimension","layout"],height:["dimension","layout"],margin:["dimension","layout"],border:["layout"],borderColor:["color"],flexDirection:["layout"],fontWeight:["layout"],fontSize:["dimension","layout"],alignItems:["layout"],justifyContent:["layout"]},he=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}},Bt=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function Jt(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Mf(t){if(!Kt.includes(t))throw new he(`Unknown variant property "${t}" (expected ${Kt.join(", ")})`);return t}function Vf(t,e,r){if(typeof t!="string")throw new he(`${e}.${r} must be a token reference string like "{ui.primary}"`);let n=t.match(Of);if(!n)throw new he(`${e}.${r} must be a token reference like "{ui.primary}", got "${t}"`);return n[1]}function Va(t,e){let r={};for(let[n,i]of Object.entries(e)){let s=Mf(n),a=Vf(i,t,n);r[s]={ref:a,accepts:[...Sn[s]]}}return r}function qf(t){if(t===void 0)return{};if(!Jt(t))throw new he('Theme "defaults" must be an object');let e={};for(let[r,n]of Object.entries(t)){if(!Jt(n))throw new he(`Theme defaults for "${r}" must be an object`);e[r]=Va(`defaults.${r}`,n)}return e}function Ci(t){if(!Jt(t))throw new he("Theme document must be a YAML/JSON object");let e=t.variants;if(!Jt(e))throw new he('Theme document must contain a "variants" object');let r={};for(let[n,i]of Object.entries(e)){if(!Jt(i))throw new he(`Theme variants for "${n}" must be an object`);let s={};for(let[a,c]of Object.entries(i)){if(!Jt(c))throw new he(`Theme variant "${n}.${a}" must be an object`);s[a]=Va(`${n}.${a}`,c)}r[n]=s}return{defaults:qf(t.defaults),variants:r}}var Of,Ti=ne(()=>{"use strict";_t();Of=/^\{([^}]+)\}$/});function _r(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Lf(t){return`--${t.replace(/\./g,"-")}`}function Ff(t,e){if(typeof t!="string"||!En.includes(t))throw new He(`Token "${e}" has unsupported $type "${String(t)}" (expected ${En.join(", ")})`);return t}function qa(t,e,r){if(_r(t)){if("$type"in t&&"$value"in t){r.push({path:e,type:Ff(t.$type,e),rawValue:t.$value});return}for(let[n,i]of Object.entries(t)){if(n.startsWith("$"))continue;let s=e?`${e}.${n}`:n;qa(i,s,r)}}}function zf(t,e){if(typeof e=="string")return e;if(t==="typography"&&_r(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let r=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(n=>n!=null);if(r.length>0)return r.map(String).join(" ")}if(t==="shadow"&&Array.isArray(e))return e.map(r=>_r(r)?`${r.offsetX??0} ${r.offsetY??0} ${r.blur??0} ${r.color??"transparent"}`:String(r)).join(", ");if(t==="shadow"&&_r(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new He(`Token value for "${t}" must be a string or supported object`)}function Hf(t){return typeof t!="string"?null:t.match(Df)?.[1]??null}function Da(t,e,r,n,i){let s=Hf(e);if(!s){let l=r.get(t);if(!l)throw new He(`Unknown token path "${t}"`);return{value:zf(l.type,e)}}if(n.has(t))throw new He(`Circular token reference detected at "${t}"`);let a=r.get(s);if(!a)throw new He(`Token "${t}" references unknown token "{${s}}"`);if(i.has(s))return{value:i.get(s),ref:s};n.add(t);let c=Da(s,a.rawValue,r,n,i);return n.delete(t),i.set(s,c.value),{value:c.value,ref:s}}function Ai(t){if(!_r(t))throw new He("Token document must be a YAML/JSON object");let e=[];qa(t,"",e);let r=new Map(e.map(s=>[s.path,s])),n=new Map,i=[];for(let s of e){let{value:a,ref:c}=Da(s.path,s.rawValue,r,new Set,n);n.set(s.path,a),i.push({path:s.path,type:s.type,value:a,cssVar:Lf(s.path),ref:c})}return{entries:i}}var Df,Ni=ne(()=>{"use strict";_t();Df=/^\{([^}]+)\}$/});function Fa(t){return kn[t]?.properties??[]}function za(t,e){let r=kn[e];return r?r.properties.includes(t):!1}var Pn,kn,et,La,Ab,ct=ne(()=>{"use strict";Pn={id:{type:"string",category:"identity",lowering:"attribute",description:"Stable identifier for tests and diff updates"},role:{type:"string",category:"identity",lowering:"attribute",enum:"role",description:"Accessibility semantics (not HTML tag names)"},label:{type:"string",category:"identity",lowering:"attribute",description:"Accessible name; required for IconButton"},visible:{type:"boolean",category:"state",lowering:"none",description:"Show or omit from render tree"},enabled:{type:"boolean",category:"state",lowering:"attribute"},selected:{type:"boolean",category:"state",lowering:"attribute"},checked:{type:"boolean",category:"state",lowering:"attribute"},readonly:{type:"boolean",category:"state",lowering:"attribute"},required:{type:"boolean",category:"state",lowering:"attribute"},width:{type:["string","number"],category:"size",lowering:"inline-css",enum:"widthSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},height:{type:["string","number"],category:"size",lowering:"inline-css",enum:"heightSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},minWidth:{type:"number",category:"size",lowering:"inline-css"},maxWidth:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},minHeight:{type:"number",category:"size",lowering:"inline-css"},maxHeight:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},aspectRatio:{type:"number",category:"size",lowering:"inline-css"},weight:{type:"number",category:"size",lowering:"inline-css",notes:"Flex ratio among Row/Column direct children; Spacer is the primary use case"},padding:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},gap:{type:["string","number"],category:"spacing",lowering:"inline-css"},align:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},justify:{type:"string",category:"alignment",lowering:"inline-css",enum:"justify"},selfAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},contentAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"contentAlign"},axis:{type:"string",category:"direction",lowering:"inline-css",enum:"axis"},direction:{type:"string",category:"direction",lowering:"attribute",enum:"direction",description:"Text/layout direction; set at app or screen root, not per layout container"},scroll:{type:"string",category:"overflow",lowering:"inline-css",enum:"scroll"},background:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},foreground:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},border:{type:["string","object"],category:"visual",lowering:"inline-css",enum:"border",notes:"none|token|{width,color}"},separator:{type:"number",category:"visual",lowering:"inline-css",notes:"Row separator width in px/dp/pt (0=off)"},separatorColor:{type:"string",category:"visual",lowering:"inline-css",notes:"Row separator color token"},radius:{type:"string",category:"visual",lowering:"inline-css",notes:"radius token"},shadow:{type:"string",category:"visual",lowering:"inline-css",enum:"shadow"},opacity:{type:"number",category:"visual",lowering:"inline-css",notes:"0..1"},clip:{type:"string",category:"visual",lowering:"inline-css",enum:"clip"},textStyle:{type:"string",category:"text",lowering:"inline-css",notes:"typography token"},textAlign:{type:"string",category:"text",lowering:"inline-css",enum:"textAlign"},lineLimit:{type:["string","number"],category:"text",lowering:"inline-css",enum:"lineLimit"},textOverflow:{type:"string",category:"text",lowering:"inline-css",enum:"textOverflow"},fontWeight:{type:"string",category:"text",lowering:"inline-css",enum:"fontWeight"},size:{type:"number",category:"text",lowering:"inline-css",notes:"Font size shorthand (px/dp/pt)"},fit:{type:"string",category:"image",lowering:"inline-css",enum:"imageFit"},src:{type:"string",category:"image",lowering:"attribute",description:"Image source URL or asset reference"},alt:{type:"string",category:"image",lowering:"attribute",description:"Alternative text; not a source reference"},name:{type:"string",category:"image",lowering:"attribute",description:"Icon token or asset name in the renderer icon set"},onClick:{type:"action",category:"interaction",lowering:"none",description:"Action id, not arbitrary code"},onSubmit:{type:"action",category:"interaction",lowering:"none",description:"Form submit/validation action id"},onChange:{type:"action",category:"interaction",lowering:"none"},focusable:{type:"boolean",category:"interaction",lowering:"attribute"},autoFocus:{type:"boolean",category:"interaction",lowering:"attribute"},keyboardType:{type:"string",category:"interaction",lowering:"attribute",enum:"keyboardType"},value:{type:["string","number","boolean"],category:"data",lowering:"attribute"},binding:{type:"string",category:"data",lowering:"none",description:"ViewModel or form state field identifier"},placeholder:{type:"string",category:"data",lowering:"attribute"},options:{type:"array",category:"data",lowering:"none",notes:"array<{value,label}>"},error:{type:["string","null"],category:"validation",lowering:"none"},help:{type:["string","null"],category:"validation",lowering:"none"},variant:{type:"string",category:"visual",lowering:"class-name",notes:"design token variant"},theme:{type:"string",category:"visual",lowering:"class-name",notes:"active theme id for runtime theme switching"},display:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS display value (grid, flex, etc.)"},gridTemplateColumns:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS grid-template-columns"},flexDirection:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS flex-direction"},alignItems:{type:"string",category:"alignment",lowering:"inline-css",notes:"CSS align-items"},margin:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},borderColor:{type:"string",category:"visual",lowering:"inline-css",notes:"border color token"},fontSize:{type:["string","number"],category:"text",lowering:"inline-css",notes:"CSS font-size"},flex:{type:"number",category:"size",lowering:"inline-css",description:"Flex grow ratio for proportional sizing in table columns/cells"},each:{type:"string",category:"data",lowering:"none",description:"Iterator variable name for data-bound row repetition"},source:{type:"string",category:"data",lowering:"none",description:"ViewModel array binding for data-driven elements"},headerVisible:{type:"boolean",category:"state",lowering:"attribute"}},kn={App:{description:"App root; holds theme/token/navigation context",tier:"core",category:"structure",notes:"Optional; not required for single-screen DSL",properties:["id","padding","direction","theme","variant"],children:{kind:"list",items:["Page"]}},Page:{description:"Screen root; viewport and safe-area boundary",tier:"core",category:"structure",properties:["id","visible","padding","direction","variant"],children:{kind:"list",items:["Column","Row","Stack","Box"]}},SafeArea:{description:"Insets for OS/browser safe areas",tier:"core",category:"structure",properties:["id","padding","variant"],children:{kind:"list",items:["Box","Column","Row"]}},Box:{description:"Single region; background, bounds, child placement",tier:"core",category:"layout",properties:["id","visible","width","height","minWidth","maxWidth","minHeight","maxHeight","padding","margin","gap","contentAlign","background","foreground","border","borderColor","radius","shadow","opacity","clip","selfAlign","display","gridTemplateColumns","flexDirection","variant"],children:{kind:"any"}},Row:{description:"Horizontal child layout",tier:"core",category:"layout",properties:["id","visible","gap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Column:{description:"Vertical child layout",tier:"core",category:"layout",properties:["id","visible","gap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Stack:{description:"Overlay children by z-order (not absolute positioning)",tier:"core",category:"layout",properties:["id","visible","gap","contentAlign","padding","width","height","background","variant"],children:{kind:"any"}},Spacer:{description:"Occupies remaining flex space",tier:"core",category:"layout",notes:"Direct child of Row/Column only",properties:["id","width","height","weight","variant"],children:{kind:"none"}},Divider:{description:"Horizontal or vertical separator",tier:"core",category:"layout",properties:["id","axis","variant"],children:{kind:"none"}},ScrollArea:{description:"Internal scroll boundary",tier:"core",category:"scroll",properties:["id","axis","scroll","width","height","minHeight","maxHeight","padding","variant"],children:{kind:"single"}},List:{description:"Homogeneous list of items",tier:"core",category:"scroll",properties:["id","gap","axis","role","visible","variant"],children:{kind:"list",items:["ListItem"]}},ListItem:{description:"One row/cell in a list",tier:"core",category:"scroll",properties:["id","selected","padding","gap","role","visible","variant"],children:{kind:"any"}},Text:{description:"Text display",tier:"core",category:"text",properties:["id","visible","textStyle","textAlign","lineLimit","textOverflow","fontWeight","fontSize","size","foreground","background","opacity","padding","radius","display","alignItems","role","variant"],children:{kind:"text"}},Link:{description:"Navigable text or region",tier:"optional",category:"text",properties:["id","visible","onClick","label","foreground","role","variant"],children:{kind:"text"}},Image:{description:"Image display",tier:"core",category:"media",properties:["id","visible","src","fit","alt","width","height","aspectRatio","radius","variant"],children:{kind:"none"}},Icon:{description:"Icon display; asset set referenced by name token at renderer",tier:"core",category:"media",properties:["id","visible","name","alt","foreground","opacity","variant"],children:{kind:"none"}},Button:{description:"Pressable action; label or children required (label is a11y name when both present)",tier:"core",category:"input",properties:["id","visible","enabled","onClick","label","foreground","background","radius","padding","shadow","border","borderColor","fontWeight","fontSize","variant","role"],children:{kind:"list",items:["Text","Icon","Row"]}},IconButton:{description:"Icon-primary button; label required for accessibility",tier:"optional",category:"input",properties:["id","visible","enabled","onClick","label","foreground","background","radius","padding","variant"],children:{kind:"list",items:["Icon"]}},TextInput:{description:"Single-line text input",tier:"core",category:"input",properties:["id","visible","enabled","readonly","required","value","binding","placeholder","onChange","error","help","keyboardType","focusable","autoFocus","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},TextArea:{description:"Multi-line text input",tier:"core",category:"input",properties:["id","visible","enabled","readonly","required","value","binding","placeholder","onChange","error","help","focusable","width","minHeight","label","foreground","background","radius","padding","border","borderColor","fontSize","variant"],children:{kind:"none"}},Select:{description:"Single selection",tier:"core",category:"input",properties:["id","visible","enabled","required","value","binding","options","onChange","error","help","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},Checkbox:{description:"Boolean or multi-select toggle",tier:"core",category:"input",properties:["id","visible","enabled","checked","required","binding","label","onChange","variant"],children:{kind:"none"}},Radio:{description:"Single choice in a group (use Row/Column to group; binding identifies group)",tier:"core",category:"input",notes:"RadioGroup is expressed via layout Group, not a separate element",properties:["id","visible","enabled","checked","binding","label","value","onChange","variant"],children:{kind:"none"}},Switch:{description:"On/off toggle",tier:"core",category:"input",properties:["id","visible","enabled","checked","binding","label","onChange","variant"],children:{kind:"none"}},Form:{description:"Input group submit/validation boundary",tier:"core",category:"form",properties:["id","visible","gap","onSubmit","variant"],children:{kind:"any"}},Field:{description:"label/help/error/input unit",tier:"core",category:"form",properties:["id","visible","label","help","error","required","gap","variant"],children:{kind:"any"}},Modal:{description:"Primary transient dialog",tier:"core",category:"overlay",notes:"Direct child of Page or App; role defaults to dialog at renderer",properties:["id","visible","role","autoFocus","variant"],children:{kind:"list",items:["Box","Column"]}},Drawer:{description:"Edge panel overlay",tier:"extension",category:"overlay",notes:"Placement limited to start/end/bottom at renderer",properties:["id","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Popover:{description:"Small anchored panel",tier:"extension",category:"overlay",properties:["id","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Tooltip:{description:"Supplementary description",tier:"extension",category:"overlay",properties:["id","visible","label","variant"],children:{kind:"text"}},Progress:{description:"Determinate progress",tier:"core",category:"feedback",properties:["id","visible","value","variant"],children:{kind:"none"}},Spinner:{description:"Indeterminate loading",tier:"core",category:"feedback",properties:["id","visible","variant"],children:{kind:"none"}},Table:{description:"Data table with header and repeated rows",tier:"core",category:"data",properties:["id","visible","source","gap","border","borderColor","separator","separatorColor","variant"],children:{kind:"list",items:["TableHeader","TableRow"]}},TableHeader:{description:"Table header row defining column labels",tier:"core",category:"data",properties:["height","border","borderColor","background","alignItems","variant"],children:{kind:"list",items:["TableColumn"]}},TableColumn:{description:"Header cell definition; children override label text",tier:"core",category:"data",properties:["label","width","flex","align","border","borderColor","padding","fontSize","fontWeight","foreground","variant"],children:{kind:"any"}},TableRow:{description:"Row template repeated for each source item",tier:"core",category:"data",properties:["each","height","border","borderColor","alignItems","variant"],children:{kind:"list",items:["TableCell"]}},TableCell:{description:"Data cell; children define cell content",tier:"core",category:"data",properties:["width","flex","align","border","borderColor","padding","fontSize","foreground","variant"],children:{kind:"any"}}},et=new Set(Object.keys(kn)),La=new Set(Object.entries(Pn).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),Ab=new Set(Object.entries(Pn).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});function ji(t){let e=Fa(t),r=new Set;for(let n of e)Kt.includes(n)&&r.add(n);return r}var Ha=ne(()=>{"use strict";ct();_t()});function Uf(t){return new Map(t.entries.map(e=>[e.path,e]))}function Ua(t,e,r,n,i){for(let[s,a]of Object.entries(r)){let c=Sn[s];if(!c)throw new he(`Unknown variant property "${s}" on ${t}`);if(!n.has(s))throw new he(`Property "${s}" is not allowed for ${e} in ${t}`);let l=i.get(a.ref);if(!l)throw new he(`${t}.${s} references unknown token "{${a.ref}}"`);if(!c.includes(l.type))throw new he(`${t}.${s} requires a ${c.join(" or ")} token, but "{${a.ref}}" is ${l.type}`)}}function Ba(t,e){let r=Uf(t);for(let[n,i]of Object.entries(e.defaults)){let s=ji(n);Ua(`defaults.${n}`,n,i,s,r)}for(let[n,i]of Object.entries(e.variants)){let s=ji(n);for(let[a,c]of Object.entries(i))Ua(`variants.${n}.${a}`,n,c,s,r)}}function Oi(t,e){Ba(t,e)}var Mi=ne(()=>{"use strict";_t();Ha()});function Vi(t){let e=[":root {"];for(let r of t.entries)e.push(` ${r.cssVar}: ${r.value};`);return e.push("}"),e.join(`
|
|
33
|
-
`)}var Ka=ne(()=>{"use strict"});var Rn,qi=ne(()=>{"use strict";Rn={background:"background-color",foreground:"color",radius:"border-radius",padding:"padding",shadow:"box-shadow",typography:"font",display:"display",gridTemplateColumns:"grid-template-columns",minHeight:"min-height",maxWidth:"max-width",width:"width",height:"height",margin:"margin",border:"border",borderColor:"border-color",flexDirection:"flex-direction",fontWeight:"font-weight",fontSize:"font-size",alignItems:"align-items",justifyContent:"justify-content"}});function In(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Cn(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while emitting theme CSS`);return r.cssVar}var Di=ne(()=>{"use strict"});function Li(t,e){let r=[];for(let[n,i]of Object.entries(e.defaults)){let s=In(n),a=[];for(let[c,l]of Object.entries(i)){let f=Rn[c];if(!f){console.warn(`[view-contracts] CSS theme: variant property "${c}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let p=Cn(t,l.ref);a.push(` ${f}: var(${p});`)}a.length!==0&&r.push(`.vc-${s} {
|
|
34
|
-
${a.join(`
|
|
35
|
-
`)}
|
|
36
|
-
}`)}return r.join(`
|
|
37
|
-
|
|
38
|
-
`)}var Ja=ne(()=>{"use strict";qi();Di()});function Fi(t,e){let r=[];for(let[n,i]of Object.entries(e.variants)){let s=In(n);for(let[a,c]of Object.entries(i)){let l=[];for(let[f,p]of Object.entries(c)){let u=Rn[f];if(!u){console.warn(`[view-contracts] CSS theme: variant property "${f}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let m=Cn(t,p.ref);l.push(` ${u}: var(${m});`)}l.length!==0&&r.push(`.vc-${s}--${a} {
|
|
39
|
-
${l.join(`
|
|
40
|
-
`)}
|
|
41
|
-
}`)}}return r.join(`
|
|
42
|
-
|
|
43
|
-
`)}var Wa=ne(()=>{"use strict";qi();Di()});function Ya(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function Bf(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function Ga(t,e,r,n,i,s){let a=r.variants[t];if(!a){e!==void 0&&!Ya(e)&&typeof e=="string"&&i.push(`${n}: <${t}> references variant "${e}" but no variants are defined for ${t} in theme.yaml`);return}if(e===void 0||Ya(e)||typeof e!="string")return;(s?.mapMutedToDefault&&e==="muted"?"default":e)in a||i.push(`${n}: <${t}> references unknown variant "${e}" (not defined in theme.yaml)`)}function Tn(t,e,r,n){if(t.kind==="component"){let i=Bf(t.props);t.props.variant!==void 0?Ga(t.name,t.props.variant,e,r,n):i!==void 0&&t.name in e.variants&&Ga(t.name,i,e,r,n,{mapMutedToDefault:!0});for(let s of t.children)Tn(s,e,r,n);return}if(t.kind==="map"){Tn(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)Tn(i,e,r,n);return}t.kind}function zi(t,e){let r=[];for(let n of t)Tn(n.root,e,n.source,r);if(r.length>0)throw new Error(`View variant validation failed:
|
|
44
|
-
${r.map(n=>` - ${n}`).join(`
|
|
45
|
-
`)}`)}var Xa=ne(()=>{"use strict"});function Hi(t,e){return[...new Set([...t.matchAll(e)].map(r=>r[0]))]}function Qa(t,e,r){let n=e.slice(0,5).map(s=>` - ${t}: ${s}`).join(`
|
|
46
|
-
`),i=e.length>5?`
|
|
47
|
-
\u2026 and ${e.length-5} more`:"";return`${r}
|
|
48
|
-
${n}${i}`}function Ui(t,e){let r=Hi(t,Kf);if(r.length!==0)throw new Bt(Qa(e,r,".vc-* selectors are reserved for DSL output (theme.yaml variants + package structural CSS). Use project-owned class names (e.g. ext-*) in extension CSS."))}function Bi(t,e){let r=Hi(t,Jf),n=Hi(t,Wf),i=[...r,...n];if(i.length!==0)throw new Bt(Qa(e,i,".vc-* class names are reserved for DSL lowering output. Extension components must use project-owned class names (e.g. ext-*) in src/components/."))}var Kf,Jf,Wf,Ki=ne(()=>{"use strict";_t();Kf=/\.vc-[a-z][\w-]*/g,Jf=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,Wf=/\bextensionClassName\s*\(/g});import{readFile as Za,stat as Yf}from"node:fs/promises";import{resolve as Gf}from"node:path";async function ec(t){try{return await Yf(t),!0}catch{return!1}}async function xr(t,e){let r=t.design?.extensionsCss;r&&await ec(r)&&Ui(await Za(r,"utf-8"),r);let n=Ie(e);for(let i of["extensions.tsx","extensions.ts"]){let s=Gf(n,"src/components",i);await ec(s)&&Bi(await Za(s,"utf-8"),s)}}var tc=ne(()=>{"use strict";bt();Ki()});async function Xf(t){let e=await xn(t);return Ai(e)}async function Qf(t){let e=await xn(t);return Ci(e)}async function An(t,e){let r=await Xf(t),n=await Qf(e);return Oi(r,n),{tokenIR:r,themeIR:n}}var Ji=ne(()=>{"use strict";Ii();Ti();Ni();Mi();Ka();Ja();Wa();Ii();Ti();Ni();Mi();Xa();Ki();tc();Yi();_t()});import{readFile as rc,stat as Zf}from"node:fs/promises";async function ep(t){try{return await Zf(t),!0}catch{return!1}}async function Wi(t,e){let r=Ie(e),{tokensPath:n,themePath:i}=bn(t),{tokenIR:s,themeIR:a}=await An(n,i);await xr(t,e);let c=await rc(_n(),"utf-8"),l=Li(s,a),f=Fi(s,a),p=`${Vi(s)}
|
|
49
|
-
|
|
50
|
-
${c.trim()}`;l&&(p+=`
|
|
51
|
-
|
|
52
|
-
${l}`),p+=`
|
|
1
|
+
var Hy=Object.create;var As=Object.defineProperty;var Uy=Object.getOwnPropertyDescriptor;var zy=Object.getOwnPropertyNames;var Wy=Object.getPrototypeOf,Gy=Object.prototype.hasOwnProperty;var Pr=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var J=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var $=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},Cr=(t,e)=>{for(var r in e)As(t,r,{get:e[r],enumerable:!0})},Ky=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of zy(e))!Gy.call(t,i)&&i!==r&&As(t,i,{get:()=>e[i],enumerable:!(n=Uy(e,i))||n.enumerable});return t};var Eu=(t,e,r)=>(r=t!=null?Hy(Wy(t)):{},Ky(e||!t||!t.__esModule?As(r,"default",{value:t,enumerable:!0}):r,t));var Jy,Pu,Yy,Xy,Qy,Zy,pe,ev,tv,yn,vn,rv,Me,Cu,Iu,Ru,Nu,Tu,Au,Ou,Mu,Lu,ju,Vu,Du,qu,Fu,Bu,Hu,Uu,Os,nv,iv,zu,$P,xP,kP,EP,PP,CP,IP,RP,NP,TP,AP,OP,MP,LP,st,Ir=J(()=>{Jy=Object.create,Pu=Object.defineProperty,Yy=Object.getOwnPropertyDescriptor,Xy=Object.getOwnPropertyNames,Qy=Object.getPrototypeOf,Zy=Object.prototype.hasOwnProperty,pe=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),ev=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(var i=Xy(e),o=0,s=i.length,a;o<s;o++)a=i[o],!Zy.call(t,a)&&a!==r&&Pu(t,a,{get:(l=>e[l]).bind(null,a),enumerable:!(n=Yy(e,a))||n.enumerable});return t},tv=(t,e,r)=>(r=t!=null?Jy(Qy(t)):{},ev(e||!t||!t.__esModule?Pu(r,"default",{value:t,enumerable:!0}):r,t)),yn=pe(((t,e)=>{function r(l){return typeof l>"u"||l===null}function n(l){return typeof l=="object"&&l!==null}function i(l){return Array.isArray(l)?l:r(l)?[]:[l]}function o(l,u){if(u){let p=Object.keys(u);for(let f=0,d=p.length;f<d;f+=1){let m=p[f];l[m]=u[m]}}return l}function s(l,u){let p="";for(let f=0;f<u;f+=1)p+=l;return p}function a(l){return l===0&&Number.NEGATIVE_INFINITY===1/l}e.exports.isNothing=r,e.exports.isObject=n,e.exports.toArray=i,e.exports.repeat=s,e.exports.isNegativeZero=a,e.exports.extend=o})),vn=pe(((t,e)=>{function r(i,o){let s="",a=i.reason||"(unknown reason)";return i.mark?(i.mark.name&&(s+='in "'+i.mark.name+'" '),s+="("+(i.mark.line+1)+":"+(i.mark.column+1)+")",!o&&i.mark.snippet&&(s+=`
|
|
53
2
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
${await rc(u,"utf-8")}`),p}var Yi=ne(()=>{"use strict";bt();Ri();Ji()});var Ir=T(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.regexpCode=te.getEsmExportName=te.getProperty=te.safeStringify=te.stringify=te.strConcat=te.addCodeArg=te.str=te._=te.nil=te._Code=te.Name=te.IDENTIFIER=te._CodeOrName=void 0;var kr=class{};te._CodeOrName=kr;te.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var xt=class extends kr{constructor(e){if(super(),!te.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};te.Name=xt;var Ce=class extends kr{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof xt&&(r[n.str]=(r[n.str]||0)+1),r),{})}};te._Code=Ce;te.nil=new Ce("");function wc(t,...e){let r=[t[0]],n=0;for(;n<e.length;)oo(r,e[n]),r.push(t[++n]);return new Ce(r)}te._=wc;var io=new Ce("+");function vc(t,...e){let r=[Rr(t[0])],n=0;for(;n<e.length;)r.push(io),oo(r,e[n]),r.push(io,Rr(t[++n]));return yp(r),new Ce(r)}te.str=vc;function oo(t,e){e instanceof Ce?t.push(...e._items):e instanceof xt?t.push(e):t.push($p(e))}te.addCodeArg=oo;function yp(t){let e=1;for(;e<t.length-1;){if(t[e]===io){let r=wp(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function wp(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof xt||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof xt))return`"${t}${e.slice(1)}`}function vp(t,e){return e.emptyStr()?t:t.emptyStr()?e:vc`${t}${e}`}te.strConcat=vp;function $p(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Rr(Array.isArray(t)?t.join(","):t)}function bp(t){return new Ce(Rr(t))}te.stringify=bp;function Rr(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}te.safeStringify=Rr;function _p(t){return typeof t=="string"&&te.IDENTIFIER.test(t)?new Ce(`.${t}`):wc`[${t}]`}te.getProperty=_p;function xp(t){if(typeof t=="string"&&te.IDENTIFIER.test(t))return new Ce(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}te.getEsmExportName=xp;function Ep(t){return new Ce(t.toString())}te.regexpCode=Ep});var co=T(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.ValueScope=Se.ValueScopeName=Se.Scope=Se.varKinds=Se.UsedValueState=void 0;var Ee=Ir(),so=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},jn;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(jn||(Se.UsedValueState=jn={}));Se.varKinds={const:new Ee.Name("const"),let:new Ee.Name("let"),var:new Ee.Name("var")};var On=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Ee.Name?e:this.name(e)}name(e){return new Ee.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Se.Scope=On;var Mn=class extends Ee.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Ee._)`.${new Ee.Name(r)}[${n}]`}};Se.ValueScopeName=Mn;var Sp=(0,Ee._)`\n`,ao=class extends On{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Sp:Ee.nil}}get(){return this._scope}name(e){return new Mn(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:s}=i,a=(n=r.key)!==null&&n!==void 0?n:r.ref,c=this._values[s];if(c){let p=c.get(a);if(p)return p}else c=this._values[s]=new Map;c.set(a,i);let l=this._scope[s]||(this._scope[s]=[]),f=l.length;return l[f]=r.ref,i.setValue(r,{property:s,itemIndex:f}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Ee._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let s=Ee.nil;for(let a in e){let c=e[a];if(!c)continue;let l=n[a]=n[a]||new Map;c.forEach(f=>{if(l.has(f))return;l.set(f,jn.Started);let p=r(f);if(p){let u=this.opts.es5?Se.varKinds.var:Se.varKinds.const;s=(0,Ee._)`${s}${u} ${f} = ${p};${this.opts._n}`}else if(p=i?.(f))s=(0,Ee._)`${s}${p}${this.opts._n}`;else throw new so(f);l.set(f,jn.Completed)})}return s}};Se.ValueScope=ao});var K=T(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.or=W.and=W.not=W.CodeGen=W.operators=W.varKinds=W.ValueScopeName=W.ValueScope=W.Scope=W.Name=W.regexpCode=W.stringify=W.getProperty=W.nil=W.strConcat=W.str=W._=void 0;var Z=Ir(),Me=co(),lt=Ir();Object.defineProperty(W,"_",{enumerable:!0,get:function(){return lt._}});Object.defineProperty(W,"str",{enumerable:!0,get:function(){return lt.str}});Object.defineProperty(W,"strConcat",{enumerable:!0,get:function(){return lt.strConcat}});Object.defineProperty(W,"nil",{enumerable:!0,get:function(){return lt.nil}});Object.defineProperty(W,"getProperty",{enumerable:!0,get:function(){return lt.getProperty}});Object.defineProperty(W,"stringify",{enumerable:!0,get:function(){return lt.stringify}});Object.defineProperty(W,"regexpCode",{enumerable:!0,get:function(){return lt.regexpCode}});Object.defineProperty(W,"Name",{enumerable:!0,get:function(){return lt.Name}});var Ln=co();Object.defineProperty(W,"Scope",{enumerable:!0,get:function(){return Ln.Scope}});Object.defineProperty(W,"ValueScope",{enumerable:!0,get:function(){return Ln.ValueScope}});Object.defineProperty(W,"ValueScopeName",{enumerable:!0,get:function(){return Ln.ValueScopeName}});Object.defineProperty(W,"varKinds",{enumerable:!0,get:function(){return Ln.varKinds}});W.operators={GT:new Z._Code(">"),GTE:new Z._Code(">="),LT:new Z._Code("<"),LTE:new Z._Code("<="),EQ:new Z._Code("==="),NEQ:new Z._Code("!=="),NOT:new Z._Code("!"),OR:new Z._Code("||"),AND:new Z._Code("&&"),ADD:new Z._Code("+")};var tt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},lo=class extends tt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Me.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Gt(this.rhs,e,r)),this}get names(){return this.rhs instanceof Z._CodeOrName?this.rhs.names:{}}},Vn=class extends tt{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof Z.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Gt(this.rhs,e,r),this}get names(){let e=this.lhs instanceof Z.Name?{}:{...this.lhs.names};return Dn(e,this.rhs)}},uo=class extends Vn{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},fo=class extends tt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},po=class extends tt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},mo=class extends tt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},ho=class extends tt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Gt(this.code,e,r),this}get names(){return this.code instanceof Z._CodeOrName?this.code.names:{}}},Cr=class extends tt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let s=n[i];s.optimizeNames(e,r)||(Pp(e,s.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Pt(e,r.names),{})}},rt=class extends Cr{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},go=class extends Cr{},Yt=class extends rt{};Yt.kind="else";var Et=class t extends rt{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Yt(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t($c(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Gt(this.condition,e,r),this}get names(){let e=super.names;return Dn(e,this.condition),this.else&&Pt(e,this.else.names),e}};Et.kind="if";var St=class extends rt{};St.kind="for";var yo=class extends St{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Gt(this.iteration,e,r),this}get names(){return Pt(super.names,this.iteration.names)}},wo=class extends St{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?Me.varKinds.var:this.varKind,{name:n,from:i,to:s}=this;return`for(${r} ${n}=${i}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=Dn(super.names,this.from);return Dn(e,this.to)}},qn=class extends St{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Gt(this.iterable,e,r),this}get names(){return Pt(super.names,this.iterable.names)}},Tr=class extends rt{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Tr.kind="func";var Ar=class extends Cr{render(e){return"return "+super.render(e)}};Ar.kind="return";var vo=class extends rt{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Pt(e,this.catch.names),this.finally&&Pt(e,this.finally.names),e}},Nr=class extends rt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Nr.kind="catch";var jr=class extends rt{render(e){return"finally"+super.render(e)}};jr.kind="finally";var $o=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
57
|
-
`:""},this._extScope=e,this._scope=new Me.Scope({parent:e}),this._nodes=[new go]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let s=this._scope.toName(r);return n!==void 0&&i&&(this._constants[s.str]=n),this._leafNode(new lo(e,s,n)),s}const(e,r,n){return this._def(Me.varKinds.const,e,r,n)}let(e,r,n){return this._def(Me.varKinds.let,e,r,n)}var(e,r,n){return this._def(Me.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new Vn(e,r,n))}add(e,r){return this._leafNode(new uo(e,W.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==Z.nil&&this._leafNode(new ho(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,Z.addCodeArg)(r,i));return r.push("}"),new Z._Code(r)}if(e,r,n){if(this._blockNode(new Et(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Et(e))}else(){return this._elseNode(new Yt)}endIf(){return this._endBlockNode(Et,Yt)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new yo(e),r)}forRange(e,r,n,i,s=this.opts.es5?Me.varKinds.var:Me.varKinds.let){let a=this._scope.toName(e);return this._for(new wo(s,a,r,n),()=>i(a))}forOf(e,r,n,i=Me.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let a=r instanceof Z.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,Z._)`${a}.length`,c=>{this.var(s,(0,Z._)`${a}[${c}]`),n(s)})}return this._for(new qn("of",i,s,r),()=>n(s))}forIn(e,r,n,i=this.opts.es5?Me.varKinds.var:Me.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Z._)`Object.keys(${r})`,n);let s=this._scope.toName(e);return this._for(new qn("in",i,s,r),()=>n(s))}endFor(){return this._endBlockNode(St)}label(e){return this._leafNode(new fo(e))}break(e){return this._leafNode(new po(e))}return(e){let r=new Ar;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ar)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new vo;if(this._blockNode(i),this.code(e),r){let s=this.name("e");this._currNode=i.catch=new Nr(s),r(s)}return n&&(this._currNode=i.finally=new jr,this.code(n)),this._endBlockNode(Nr,jr)}throw(e){return this._leafNode(new mo(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=Z.nil,n,i){return this._blockNode(new Tr(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Tr)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof Et))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};W.CodeGen=$o;function Pt(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Dn(t,e){return e instanceof Z._CodeOrName?Pt(t,e.names):t}function Gt(t,e,r){if(t instanceof Z.Name)return n(t);if(!i(t))return t;return new Z._Code(t._items.reduce((s,a)=>(a instanceof Z.Name&&(a=n(a)),a instanceof Z._Code?s.push(...a._items):s.push(a),s),[]));function n(s){let a=r[s.str];return a===void 0||e[s.str]!==1?s:(delete e[s.str],a)}function i(s){return s instanceof Z._Code&&s._items.some(a=>a instanceof Z.Name&&e[a.str]===1&&r[a.str]!==void 0)}}function Pp(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function $c(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Z._)`!${bo(t)}`}W.not=$c;var kp=bc(W.operators.AND);function Rp(...t){return t.reduce(kp)}W.and=Rp;var Ip=bc(W.operators.OR);function Cp(...t){return t.reduce(Ip)}W.or=Cp;function bc(t){return(e,r)=>e===Z.nil?r:r===Z.nil?e:(0,Z._)`${bo(e)} ${t} ${bo(r)}`}function bo(t){return t instanceof Z.Name?t:(0,Z._)`(${t})`}});var G=T(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.checkStrictMode=Y.getErrorPath=Y.Type=Y.useFunc=Y.setEvaluated=Y.evaluatedPropsToName=Y.mergeEvaluated=Y.eachItem=Y.unescapeJsonPointer=Y.escapeJsonPointer=Y.escapeFragment=Y.unescapeFragment=Y.schemaRefOrVal=Y.schemaHasRulesButRef=Y.schemaHasRules=Y.checkUnknownRules=Y.alwaysValidSchema=Y.toHash=void 0;var oe=K(),Tp=Ir();function Ap(t){let e={};for(let r of t)e[r]=!0;return e}Y.toHash=Ap;function Np(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Ec(t,e),!Sc(e,t.self.RULES.all))}Y.alwaysValidSchema=Np;function Ec(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let s in e)i[s]||Rc(t,`unknown keyword: "${s}"`)}Y.checkUnknownRules=Ec;function Sc(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}Y.schemaHasRules=Sc;function jp(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}Y.schemaHasRulesButRef=jp;function Op({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,oe._)`${r}`}return(0,oe._)`${t}${e}${(0,oe.getProperty)(n)}`}Y.schemaRefOrVal=Op;function Mp(t){return Pc(decodeURIComponent(t))}Y.unescapeFragment=Mp;function Vp(t){return encodeURIComponent(xo(t))}Y.escapeFragment=Vp;function xo(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}Y.escapeJsonPointer=xo;function Pc(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}Y.unescapeJsonPointer=Pc;function qp(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}Y.eachItem=qp;function _c({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,s,a,c)=>{let l=a===void 0?s:a instanceof oe.Name?(s instanceof oe.Name?t(i,s,a):e(i,s,a),a):s instanceof oe.Name?(e(i,a,s),s):r(s,a);return c===oe.Name&&!(l instanceof oe.Name)?n(i,l):l}}Y.mergeEvaluated={props:_c({mergeNames:(t,e,r)=>t.if((0,oe._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,oe._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,oe._)`${r} || {}`).code((0,oe._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,oe._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,oe._)`${r} || {}`),Eo(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:kc}),items:_c({mergeNames:(t,e,r)=>t.if((0,oe._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,oe._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,oe._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,oe._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function kc(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,oe._)`{}`);return e!==void 0&&Eo(t,r,e),r}Y.evaluatedPropsToName=kc;function Eo(t,e,r){Object.keys(r).forEach(n=>t.assign((0,oe._)`${e}${(0,oe.getProperty)(n)}`,!0))}Y.setEvaluated=Eo;var xc={};function Dp(t,e){return t.scopeValue("func",{ref:e,code:xc[e.code]||(xc[e.code]=new Tp._Code(e.code))})}Y.useFunc=Dp;var _o;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(_o||(Y.Type=_o={}));function Lp(t,e,r){if(t instanceof oe.Name){let n=e===_o.Num;return r?n?(0,oe._)`"[" + ${t} + "]"`:(0,oe._)`"['" + ${t} + "']"`:n?(0,oe._)`"/" + ${t}`:(0,oe._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,oe.getProperty)(t).toString():"/"+xo(t)}Y.getErrorPath=Lp;function Rc(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}Y.checkStrictMode=Rc});var Te=T(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});var we=K(),Fp={data:new we.Name("data"),valCxt:new we.Name("valCxt"),instancePath:new we.Name("instancePath"),parentData:new we.Name("parentData"),parentDataProperty:new we.Name("parentDataProperty"),rootData:new we.Name("rootData"),dynamicAnchors:new we.Name("dynamicAnchors"),vErrors:new we.Name("vErrors"),errors:new we.Name("errors"),this:new we.Name("this"),self:new we.Name("self"),scope:new we.Name("scope"),json:new we.Name("json"),jsonPos:new we.Name("jsonPos"),jsonLen:new we.Name("jsonLen"),jsonPart:new we.Name("jsonPart")};So.default=Fp});var Or=T(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.extendErrors=ve.resetErrorsCount=ve.reportExtraError=ve.reportError=ve.keyword$DataError=ve.keywordError=void 0;var ee=K(),Fn=G(),_e=Te();ve.keywordError={message:({keyword:t})=>(0,ee.str)`must pass "${t}" keyword validation`};ve.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ee.str)`"${t}" keyword must be ${e} ($data)`:(0,ee.str)`"${t}" keyword is invalid ($data)`};function zp(t,e=ve.keywordError,r,n){let{it:i}=t,{gen:s,compositeRule:a,allErrors:c}=i,l=Tc(t,e,r);n??(a||c)?Ic(s,l):Cc(i,(0,ee._)`[${l}]`)}ve.reportError=zp;function Hp(t,e=ve.keywordError,r){let{it:n}=t,{gen:i,compositeRule:s,allErrors:a}=n,c=Tc(t,e,r);Ic(i,c),s||a||Cc(n,_e.default.vErrors)}ve.reportExtraError=Hp;function Up(t,e){t.assign(_e.default.errors,e),t.if((0,ee._)`${_e.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ee._)`${_e.default.vErrors}.length`,e),()=>t.assign(_e.default.vErrors,null)))}ve.resetErrorsCount=Up;function Bp({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:s}){if(i===void 0)throw new Error("ajv implementation error");let a=t.name("err");t.forRange("i",i,_e.default.errors,c=>{t.const(a,(0,ee._)`${_e.default.vErrors}[${c}]`),t.if((0,ee._)`${a}.instancePath === undefined`,()=>t.assign((0,ee._)`${a}.instancePath`,(0,ee.strConcat)(_e.default.instancePath,s.errorPath))),t.assign((0,ee._)`${a}.schemaPath`,(0,ee.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(t.assign((0,ee._)`${a}.schema`,r),t.assign((0,ee._)`${a}.data`,n))})}ve.extendErrors=Bp;function Ic(t,e){let r=t.const("err",e);t.if((0,ee._)`${_e.default.vErrors} === null`,()=>t.assign(_e.default.vErrors,(0,ee._)`[${r}]`),(0,ee._)`${_e.default.vErrors}.push(${r})`),t.code((0,ee._)`${_e.default.errors}++`)}function Cc(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,ee._)`new ${t.ValidationError}(${e})`):(r.assign((0,ee._)`${n}.errors`,e),r.return(!1))}var kt={keyword:new ee.Name("keyword"),schemaPath:new ee.Name("schemaPath"),params:new ee.Name("params"),propertyName:new ee.Name("propertyName"),message:new ee.Name("message"),schema:new ee.Name("schema"),parentSchema:new ee.Name("parentSchema")};function Tc(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,ee._)`{}`:Kp(t,e,r)}function Kp(t,e,r={}){let{gen:n,it:i}=t,s=[Jp(i,r),Wp(t,r)];return Yp(t,e,s),n.object(...s)}function Jp({errorPath:t},{instancePath:e}){let r=e?(0,ee.str)`${t}${(0,Fn.getErrorPath)(e,Fn.Type.Str)}`:t;return[_e.default.instancePath,(0,ee.strConcat)(_e.default.instancePath,r)]}function Wp({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,ee.str)`${e}/${t}`;return r&&(i=(0,ee.str)`${i}${(0,Fn.getErrorPath)(r,Fn.Type.Str)}`),[kt.schemaPath,i]}function Yp(t,{params:e,message:r},n){let{keyword:i,data:s,schemaValue:a,it:c}=t,{opts:l,propertyName:f,topSchemaRef:p,schemaPath:u}=c;n.push([kt.keyword,i],[kt.params,typeof e=="function"?e(t):e||(0,ee._)`{}`]),l.messages&&n.push([kt.message,typeof r=="function"?r(t):r]),l.verbose&&n.push([kt.schema,a],[kt.parentSchema,(0,ee._)`${p}${u}`],[_e.default.data,s]),f&&n.push([kt.propertyName,f])}});var Nc=T(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.boolOrEmptySchema=Xt.topBoolOrEmptySchema=void 0;var Gp=Or(),Xp=K(),Qp=Te(),Zp={message:"boolean schema is false"};function em(t){let{gen:e,schema:r,validateName:n}=t;r===!1?Ac(t,!1):typeof r=="object"&&r.$async===!0?e.return(Qp.default.data):(e.assign((0,Xp._)`${n}.errors`,null),e.return(!0))}Xt.topBoolOrEmptySchema=em;function tm(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Ac(t)):r.var(e,!0)}Xt.boolOrEmptySchema=tm;function Ac(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,Gp.reportError)(i,Zp,void 0,e)}});var Po=T(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.getRules=Qt.isJSONType=void 0;var rm=["string","number","integer","boolean","null","object","array"],nm=new Set(rm);function im(t){return typeof t=="string"&&nm.has(t)}Qt.isJSONType=im;function om(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Qt.getRules=om});var ko=T(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.shouldUseRule=ut.shouldUseGroup=ut.schemaHasRulesForType=void 0;function sm({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&jc(t,n)}ut.schemaHasRulesForType=sm;function jc(t,e){return e.rules.some(r=>Oc(t,r))}ut.shouldUseGroup=jc;function Oc(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}ut.shouldUseRule=Oc});var Mr=T($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.reportTypeError=$e.checkDataTypes=$e.checkDataType=$e.coerceAndCheckDataType=$e.getJSONTypes=$e.getSchemaTypes=$e.DataType=void 0;var am=Po(),cm=ko(),lm=Or(),J=K(),Mc=G(),Zt;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Zt||($e.DataType=Zt={}));function um(t){let e=Vc(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}$e.getSchemaTypes=um;function Vc(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(am.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}$e.getJSONTypes=Vc;function dm(t,e){let{gen:r,data:n,opts:i}=t,s=fm(e,i.coerceTypes),a=e.length>0&&!(s.length===0&&e.length===1&&(0,cm.schemaHasRulesForType)(t,e[0]));if(a){let c=Io(e,n,i.strictNumbers,Zt.Wrong);r.if(c,()=>{s.length?pm(t,e,s):Co(t)})}return a}$e.coerceAndCheckDataType=dm;var qc=new Set(["string","number","integer","boolean","null"]);function fm(t,e){return e?t.filter(r=>qc.has(r)||e==="array"&&r==="array"):[]}function pm(t,e,r){let{gen:n,data:i,opts:s}=t,a=n.let("dataType",(0,J._)`typeof ${i}`),c=n.let("coerced",(0,J._)`undefined`);s.coerceTypes==="array"&&n.if((0,J._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,J._)`${i}[0]`).assign(a,(0,J._)`typeof ${i}`).if(Io(e,i,s.strictNumbers),()=>n.assign(c,i))),n.if((0,J._)`${c} !== undefined`);for(let f of r)(qc.has(f)||f==="array"&&s.coerceTypes==="array")&&l(f);n.else(),Co(t),n.endIf(),n.if((0,J._)`${c} !== undefined`,()=>{n.assign(i,c),mm(t,c)});function l(f){switch(f){case"string":n.elseIf((0,J._)`${a} == "number" || ${a} == "boolean"`).assign(c,(0,J._)`"" + ${i}`).elseIf((0,J._)`${i} === null`).assign(c,(0,J._)`""`);return;case"number":n.elseIf((0,J._)`${a} == "boolean" || ${i} === null
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|| ${a} === "boolean" || ${i} === null`).assign(c,(0,J._)`[${i}]`)}}}function mm({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,J._)`${e} !== undefined`,()=>t.assign((0,J._)`${e}[${r}]`,n))}function Ro(t,e,r,n=Zt.Correct){let i=n===Zt.Correct?J.operators.EQ:J.operators.NEQ,s;switch(t){case"null":return(0,J._)`${e} ${i} null`;case"array":s=(0,J._)`Array.isArray(${e})`;break;case"object":s=(0,J._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=a((0,J._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=a();break;default:return(0,J._)`typeof ${e} ${i} ${t}`}return n===Zt.Correct?s:(0,J.not)(s);function a(c=J.nil){return(0,J.and)((0,J._)`typeof ${e} == "number"`,c,r?(0,J._)`isFinite(${e})`:J.nil)}}$e.checkDataType=Ro;function Io(t,e,r,n){if(t.length===1)return Ro(t[0],e,r,n);let i,s=(0,Mc.toHash)(t);if(s.array&&s.object){let a=(0,J._)`typeof ${e} != "object"`;i=s.null?a:(0,J._)`!${e} || ${a}`,delete s.null,delete s.array,delete s.object}else i=J.nil;s.number&&delete s.integer;for(let a in s)i=(0,J.and)(i,Ro(a,e,r,n));return i}$e.checkDataTypes=Io;var hm={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,J._)`{type: ${t}}`:(0,J._)`{type: ${e}}`};function Co(t){let e=gm(t);(0,lm.reportError)(e,hm)}$e.reportTypeError=Co;function gm(t){let{gen:e,data:r,schema:n}=t,i=(0,Mc.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var Lc=T(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.assignDefaults=void 0;var er=K(),ym=G();function wm(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)Dc(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,s)=>Dc(t,s,i.default))}zn.assignDefaults=wm;function Dc(t,e,r){let{gen:n,compositeRule:i,data:s,opts:a}=t;if(r===void 0)return;let c=(0,er._)`${s}${(0,er.getProperty)(e)}`;if(i){(0,ym.checkStrictMode)(t,`default is ignored for: ${c}`);return}let l=(0,er._)`${c} === undefined`;a.useDefaults==="empty"&&(l=(0,er._)`${l} || ${c} === null || ${c} === ""`),n.if(l,(0,er._)`${c} = ${(0,er.stringify)(r)}`)}});var Ae=T(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.validateUnion=ie.validateArray=ie.usePattern=ie.callValidateCode=ie.schemaProperties=ie.allSchemaProperties=ie.noPropertyInData=ie.propertyInData=ie.isOwnProperty=ie.hasPropFunc=ie.reportMissingProp=ie.checkMissingProp=ie.checkReportMissingProp=void 0;var ae=K(),To=G(),dt=Te(),vm=G();function $m(t,e){let{gen:r,data:n,it:i}=t;r.if(No(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ae._)`${e}`},!0),t.error()})}ie.checkReportMissingProp=$m;function bm({gen:t,data:e,it:{opts:r}},n,i){return(0,ae.or)(...n.map(s=>(0,ae.and)(No(t,e,s,r.ownProperties),(0,ae._)`${i} = ${s}`)))}ie.checkMissingProp=bm;function _m(t,e){t.setParams({missingProperty:e},!0),t.error()}ie.reportMissingProp=_m;function Fc(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ae._)`Object.prototype.hasOwnProperty`})}ie.hasPropFunc=Fc;function Ao(t,e,r){return(0,ae._)`${Fc(t)}.call(${e}, ${r})`}ie.isOwnProperty=Ao;function xm(t,e,r,n){let i=(0,ae._)`${e}${(0,ae.getProperty)(r)} !== undefined`;return n?(0,ae._)`${i} && ${Ao(t,e,r)}`:i}ie.propertyInData=xm;function No(t,e,r,n){let i=(0,ae._)`${e}${(0,ae.getProperty)(r)} === undefined`;return n?(0,ae.or)(i,(0,ae.not)(Ao(t,e,r))):i}ie.noPropertyInData=No;function zc(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}ie.allSchemaProperties=zc;function Em(t,e){return zc(e).filter(r=>!(0,To.alwaysValidSchema)(t,e[r]))}ie.schemaProperties=Em;function Sm({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:s},it:a},c,l,f){let p=f?(0,ae._)`${t}, ${e}, ${n}${i}`:e,u=[[dt.default.instancePath,(0,ae.strConcat)(dt.default.instancePath,s)],[dt.default.parentData,a.parentData],[dt.default.parentDataProperty,a.parentDataProperty],[dt.default.rootData,dt.default.rootData]];a.opts.dynamicRef&&u.push([dt.default.dynamicAnchors,dt.default.dynamicAnchors]);let m=(0,ae._)`${p}, ${r.object(...u)}`;return l!==ae.nil?(0,ae._)`${c}.call(${l}, ${m})`:(0,ae._)`${c}(${m})`}ie.callValidateCode=Sm;var Pm=(0,ae._)`new RegExp`;function km({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,s=i(r,n);return t.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,ae._)`${i.code==="new RegExp"?Pm:(0,vm.useFunc)(t,i)}(${r}, ${n})`})}ie.usePattern=km;function Rm(t){let{gen:e,data:r,keyword:n,it:i}=t,s=e.name("valid");if(i.allErrors){let c=e.let("valid",!0);return a(()=>e.assign(c,!1)),c}return e.var(s,!0),a(()=>e.break()),s;function a(c){let l=e.const("len",(0,ae._)`${r}.length`);e.forRange("i",0,l,f=>{t.subschema({keyword:n,dataProp:f,dataPropType:To.Type.Num},s),e.if((0,ae.not)(s),c)})}}ie.validateArray=Rm;function Im(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(l=>(0,To.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let a=e.let("valid",!1),c=e.name("_valid");e.block(()=>r.forEach((l,f)=>{let p=t.subschema({keyword:n,schemaProp:f,compositeRule:!0},c);e.assign(a,(0,ae._)`${a} || ${c}`),t.mergeValidEvaluated(p,c)||e.if((0,ae.not)(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}ie.validateUnion=Im});var Bc=T(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.validateKeywordUsage=Ue.validSchemaType=Ue.funcKeywordCode=Ue.macroKeywordCode=void 0;var xe=K(),Rt=Te(),Cm=Ae(),Tm=Or();function Am(t,e){let{gen:r,keyword:n,schema:i,parentSchema:s,it:a}=t,c=e.macro.call(a.self,i,s,a),l=Uc(r,n,c);a.opts.validateSchema!==!1&&a.self.validateSchema(c,!0);let f=r.name("valid");t.subschema({schema:c,schemaPath:xe.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:!0},f),t.pass(f,()=>t.error(!0))}Ue.macroKeywordCode=Am;function Nm(t,e){var r;let{gen:n,keyword:i,schema:s,parentSchema:a,$data:c,it:l}=t;Om(l,e);let f=!c&&e.compile?e.compile.call(l.self,s,a,l):e.validate,p=Uc(n,i,f),u=n.let("valid");t.block$data(u,m),t.ok((r=e.valid)!==null&&r!==void 0?r:u);function m(){if(e.errors===!1)v(),e.modifying&&Hc(t),I(()=>t.error());else{let P=e.async?h():y();e.modifying&&Hc(t),I(()=>jm(t,P))}}function h(){let P=n.let("ruleErrs",null);return n.try(()=>v((0,xe._)`await `),D=>n.assign(u,!1).if((0,xe._)`${D} instanceof ${l.ValidationError}`,()=>n.assign(P,(0,xe._)`${D}.errors`),()=>n.throw(D))),P}function y(){let P=(0,xe._)`${p}.errors`;return n.assign(P,null),v(xe.nil),P}function v(P=e.async?(0,xe._)`await `:xe.nil){let D=l.opts.passContext?Rt.default.this:Rt.default.self,z=!("compile"in e&&!c||e.schema===!1);n.assign(u,(0,xe._)`${P}${(0,Cm.callValidateCode)(t,p,D,z)}`,e.modifying)}function I(P){var D;n.if((0,xe.not)((D=e.valid)!==null&&D!==void 0?D:u),P)}}Ue.funcKeywordCode=Nm;function Hc(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,xe._)`${n.parentData}[${n.parentDataProperty}]`))}function jm(t,e){let{gen:r}=t;r.if((0,xe._)`Array.isArray(${e})`,()=>{r.assign(Rt.default.vErrors,(0,xe._)`${Rt.default.vErrors} === null ? ${e} : ${Rt.default.vErrors}.concat(${e})`).assign(Rt.default.errors,(0,xe._)`${Rt.default.vErrors}.length`),(0,Tm.extendErrors)(t)},()=>t.error())}function Om({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Uc(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,xe.stringify)(r)})}function Mm(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}Ue.validSchemaType=Mm;function Vm({schema:t,opts:e,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");let a=i.dependencies;if(a?.some(c=>!Object.prototype.hasOwnProperty.call(t,c)))throw new Error(`parent schema must have dependencies of ${s}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[s])){let l=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}Ue.validateKeywordUsage=Vm});var Jc=T(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.extendSubschemaMode=ft.extendSubschemaData=ft.getSubschema=void 0;var Be=K(),Kc=G();function qm(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:s,topSchemaRef:a}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let c=t.schema[e];return r===void 0?{schema:c,schemaPath:(0,Be._)`${t.schemaPath}${(0,Be.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:c[r],schemaPath:(0,Be._)`${t.schemaPath}${(0,Be.getProperty)(e)}${(0,Be.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Kc.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||s===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}ft.getSubschema=qm;function Dm(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:s,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=e;if(r!==void 0){let{errorPath:f,dataPathArr:p,opts:u}=e,m=c.let("data",(0,Be._)`${e.data}${(0,Be.getProperty)(r)}`,!0);l(m),t.errorPath=(0,Be.str)`${f}${(0,Kc.getErrorPath)(r,n,u.jsPropertySyntax)}`,t.parentDataProperty=(0,Be._)`${r}`,t.dataPathArr=[...p,t.parentDataProperty]}if(i!==void 0){let f=i instanceof Be.Name?i:c.let("data",i,!0);l(f),a!==void 0&&(t.propertyName=a)}s&&(t.dataTypes=s);function l(f){t.data=f,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,f]}}ft.extendSubschemaData=Dm;function Lm(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),s!==void 0&&(t.allErrors=s),t.jtdDiscriminator=e,t.jtdMetadata=r}ft.extendSubschemaMode=Lm});var jo=T((c0,Wc)=>{"use strict";Wc.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var a=s[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}});var Gc=T((l0,Yc)=>{"use strict";var pt=Yc.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};Hn(e,n,i,t,"",t)};pt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};pt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};pt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};pt.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Hn(t,e,r,n,i,s,a,c,l,f){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,s,a,c,l,f);for(var p in n){var u=n[p];if(Array.isArray(u)){if(p in pt.arrayKeywords)for(var m=0;m<u.length;m++)Hn(t,e,r,u[m],i+"/"+p+"/"+m,s,i,p,n,m)}else if(p in pt.propsKeywords){if(u&&typeof u=="object")for(var h in u)Hn(t,e,r,u[h],i+"/"+p+"/"+Fm(h),s,i,p,n,h)}else(p in pt.keywords||t.allKeys&&!(p in pt.skipKeywords))&&Hn(t,e,r,u,i+"/"+p,s,i,p,n)}r(n,i,s,a,c,l,f)}}function Fm(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Vr=T(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.getSchemaRefs=Pe.resolveUrl=Pe.normalizeId=Pe._getFullPath=Pe.getFullPath=Pe.inlineRef=void 0;var zm=G(),Hm=jo(),Um=Gc(),Bm=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Km(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Oo(t):e?Xc(t)<=e:!1}Pe.inlineRef=Km;var Jm=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Oo(t){for(let e in t){if(Jm.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Oo)||typeof r=="object"&&Oo(r))return!0}return!1}function Xc(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!Bm.has(r)&&(typeof t[r]=="object"&&(0,zm.eachItem)(t[r],n=>e+=Xc(n)),e===1/0))return 1/0}return e}function Qc(t,e="",r){r!==!1&&(e=tr(e));let n=t.parse(e);return Zc(t,n)}Pe.getFullPath=Qc;function Zc(t,e){return t.serialize(e).split("#")[0]+"#"}Pe._getFullPath=Zc;var Wm=/#\/?$/;function tr(t){return t?t.replace(Wm,""):""}Pe.normalizeId=tr;function Ym(t,e,r){return r=tr(r),t.resolve(e,r)}Pe.resolveUrl=Ym;var Gm=/^[a-z_][-a-z0-9._]*$/i;function Xm(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=tr(t[r]||e),s={"":i},a=Qc(n,i,!1),c={},l=new Set;return Um(t,{allKeys:!0},(u,m,h,y)=>{if(y===void 0)return;let v=a+m,I=s[y];typeof u[r]=="string"&&(I=P.call(this,u[r])),D.call(this,u.$anchor),D.call(this,u.$dynamicAnchor),s[m]=I;function P(z){let L=this.opts.uriResolver.resolve;if(z=tr(I?L(I,z):z),l.has(z))throw p(z);l.add(z);let N=this.refs[z];return typeof N=="string"&&(N=this.refs[N]),typeof N=="object"?f(u,N.schema,z):z!==tr(v)&&(z[0]==="#"?(f(u,c[z],z),c[z]=u):this.refs[z]=v),z}function D(z){if(typeof z=="string"){if(!Gm.test(z))throw new Error(`invalid anchor "${z}"`);P.call(this,`#${z}`)}}}),c;function f(u,m,h){if(m!==void 0&&!Hm(u,m))throw p(h)}function p(u){return new Error(`reference "${u}" resolves to more than one schema`)}}Pe.getSchemaRefs=Xm});var Lr=T(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.getData=mt.KeywordCxt=mt.validateFunctionCode=void 0;var il=Nc(),el=Mr(),Vo=ko(),Un=Mr(),Qm=Lc(),Dr=Bc(),Mo=Jc(),V=K(),B=Te(),Zm=Vr(),nt=G(),qr=Or();function eh(t){if(al(t)&&(cl(t),sl(t))){nh(t);return}ol(t,()=>(0,il.topBoolOrEmptySchema)(t))}mt.validateFunctionCode=eh;function ol({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},s){i.code.es5?t.func(e,(0,V._)`${B.default.data}, ${B.default.valCxt}`,n.$async,()=>{t.code((0,V._)`"use strict"; ${tl(r,i)}`),rh(t,i),t.code(s)}):t.func(e,(0,V._)`${B.default.data}, ${th(i)}`,n.$async,()=>t.code(tl(r,i)).code(s))}function th(t){return(0,V._)`{${B.default.instancePath}="", ${B.default.parentData}, ${B.default.parentDataProperty}, ${B.default.rootData}=${B.default.data}${t.dynamicRef?(0,V._)`, ${B.default.dynamicAnchors}={}`:V.nil}}={}`}function rh(t,e){t.if(B.default.valCxt,()=>{t.var(B.default.instancePath,(0,V._)`${B.default.valCxt}.${B.default.instancePath}`),t.var(B.default.parentData,(0,V._)`${B.default.valCxt}.${B.default.parentData}`),t.var(B.default.parentDataProperty,(0,V._)`${B.default.valCxt}.${B.default.parentDataProperty}`),t.var(B.default.rootData,(0,V._)`${B.default.valCxt}.${B.default.rootData}`),e.dynamicRef&&t.var(B.default.dynamicAnchors,(0,V._)`${B.default.valCxt}.${B.default.dynamicAnchors}`)},()=>{t.var(B.default.instancePath,(0,V._)`""`),t.var(B.default.parentData,(0,V._)`undefined`),t.var(B.default.parentDataProperty,(0,V._)`undefined`),t.var(B.default.rootData,B.default.data),e.dynamicRef&&t.var(B.default.dynamicAnchors,(0,V._)`{}`)})}function nh(t){let{schema:e,opts:r,gen:n}=t;ol(t,()=>{r.$comment&&e.$comment&&ul(t),ch(t),n.let(B.default.vErrors,null),n.let(B.default.errors,0),r.unevaluated&&ih(t),ll(t),dh(t)})}function ih(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,V._)`${r}.evaluated`),e.if((0,V._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,V._)`${t.evaluated}.props`,(0,V._)`undefined`)),e.if((0,V._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,V._)`${t.evaluated}.items`,(0,V._)`undefined`))}function tl(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,V._)`/*# sourceURL=${r} */`:V.nil}function oh(t,e){if(al(t)&&(cl(t),sl(t))){sh(t,e);return}(0,il.boolOrEmptySchema)(t,e)}function sl({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function al(t){return typeof t.schema!="boolean"}function sh(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&ul(t),lh(t),uh(t);let s=n.const("_errs",B.default.errors);ll(t,s),n.var(e,(0,V._)`${s} === ${B.default.errors}`)}function cl(t){(0,nt.checkUnknownRules)(t),ah(t)}function ll(t,e){if(t.opts.jtd)return rl(t,[],!1,e);let r=(0,el.getSchemaTypes)(t.schema),n=(0,el.coerceAndCheckDataType)(t,r);rl(t,r,!n,e)}function ah(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,nt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function ch(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,nt.checkStrictMode)(t,"default is ignored in the schema root")}function lh(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Zm.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function uh(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function ul({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let s=r.$comment;if(i.$comment===!0)t.code((0,V._)`${B.default.self}.logger.log(${s})`);else if(typeof i.$comment=="function"){let a=(0,V.str)`${n}/$comment`,c=t.scopeValue("root",{ref:e.root});t.code((0,V._)`${B.default.self}.opts.$comment(${s}, ${a}, ${c}.schema)`)}}function dh(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=t;r.$async?e.if((0,V._)`${B.default.errors} === 0`,()=>e.return(B.default.data),()=>e.throw((0,V._)`new ${i}(${B.default.vErrors})`)):(e.assign((0,V._)`${n}.errors`,B.default.vErrors),s.unevaluated&&fh(t),e.return((0,V._)`${B.default.errors} === 0`))}function fh({gen:t,evaluated:e,props:r,items:n}){r instanceof V.Name&&t.assign((0,V._)`${e}.props`,r),n instanceof V.Name&&t.assign((0,V._)`${e}.items`,n)}function rl(t,e,r,n){let{gen:i,schema:s,data:a,allErrors:c,opts:l,self:f}=t,{RULES:p}=f;if(s.$ref&&(l.ignoreKeywordsWithRef||!(0,nt.schemaHasRulesButRef)(s,p))){i.block(()=>fl(t,"$ref",p.all.$ref.definition));return}l.jtd||ph(t,e),i.block(()=>{for(let m of p.rules)u(m);u(p.post)});function u(m){(0,Vo.shouldUseGroup)(s,m)&&(m.type?(i.if((0,Un.checkDataType)(m.type,a,l.strictNumbers)),nl(t,m),e.length===1&&e[0]===m.type&&r&&(i.else(),(0,Un.reportTypeError)(t)),i.endIf()):nl(t,m),c||i.if((0,V._)`${B.default.errors} === ${n||0}`))}}function nl(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,Qm.assignDefaults)(t,e.type),r.block(()=>{for(let s of e.rules)(0,Vo.shouldUseRule)(n,s)&&fl(t,s.keyword,s.definition,e.type)})}function ph(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(mh(t,e),t.opts.allowUnionTypes||hh(t,e),gh(t,t.dataTypes))}function mh(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{dl(t.dataTypes,r)||qo(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),wh(t,e)}}function hh(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&qo(t,"use allowUnionTypes to allow union type keyword")}function gh(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Vo.shouldUseRule)(t.schema,i)){let{type:s}=i.definition;s.length&&!s.some(a=>yh(e,a))&&qo(t,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function yh(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function dl(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function wh(t,e){let r=[];for(let n of t.dataTypes)dl(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function qo(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,nt.checkStrictMode)(t,e,t.opts.strictTypes)}var Bn=class{constructor(e,r,n){if((0,Dr.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,nt.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",pl(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Dr.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",B.default.errors))}result(e,r,n){this.failResult((0,V.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,V.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,V._)`${r} !== undefined && (${(0,V.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?qr.reportExtraError:qr.reportError)(this,this.def.error,r)}$dataError(){(0,qr.reportError)(this,this.def.$dataError||qr.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,qr.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=V.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=V.nil,r=V.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:s,def:a}=this;n.if((0,V.or)((0,V._)`${i} === undefined`,r)),e!==V.nil&&n.assign(e,!0),(s.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==V.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:s}=this;return(0,V.or)(a(),c());function a(){if(n.length){if(!(r instanceof V.Name))throw new Error("ajv implementation error");let l=Array.isArray(n)?n:[n];return(0,V._)`${(0,Un.checkDataTypes)(l,r,s.opts.strictNumbers,Un.DataType.Wrong)}`}return V.nil}function c(){if(i.validateSchema){let l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,V._)`!${l}(${r})`}return V.nil}}subschema(e,r){let n=(0,Mo.getSubschema)(this.it,e);(0,Mo.extendSubschemaData)(n,this.it,e),(0,Mo.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return oh(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=nt.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=nt.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,V.Name)),!0}};mt.KeywordCxt=Bn;function fl(t,e,r,n){let i=new Bn(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Dr.funcKeywordCode)(i,r):"macro"in r?(0,Dr.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Dr.funcKeywordCode)(i,r)}var vh=/^\/(?:[^~]|~0|~1)*$/,$h=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function pl(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,s;if(t==="")return B.default.rootData;if(t[0]==="/"){if(!vh.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,s=B.default.rootData}else{let f=$h.exec(t);if(!f)throw new Error(`Invalid JSON-pointer: ${t}`);let p=+f[1];if(i=f[2],i==="#"){if(p>=e)throw new Error(l("property/index",p));return n[e-p]}if(p>e)throw new Error(l("data",p));if(s=r[e-p],!i)return s}let a=s,c=i.split("/");for(let f of c)f&&(s=(0,V._)`${s}${(0,V.getProperty)((0,nt.unescapeJsonPointer)(f))}`,a=(0,V._)`${a} && ${s}`);return a;function l(f,p){return`Cannot access ${f} ${p} levels up, current level is ${e}`}}mt.getData=pl});var Kn=T(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});var Do=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Lo.default=Do});var Fr=T(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});var Fo=Vr(),zo=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Fo.resolveUrl)(e,r,n),this.missingSchema=(0,Fo.normalizeId)((0,Fo.getFullPath)(e,this.missingRef))}};Ho.default=zo});var zr=T(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.resolveSchema=Ne.getCompilingSchema=Ne.resolveRef=Ne.compileSchema=Ne.SchemaEnv=void 0;var Ve=K(),bh=Kn(),It=Te(),qe=Vr(),ml=G(),_h=Lr(),rr=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,qe.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};Ne.SchemaEnv=rr;function Bo(t){let e=hl.call(this,t);if(e)return e;let r=(0,qe.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,a=new Ve.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s}),c;t.$async&&(c=a.scopeValue("Error",{ref:bh.default,code:(0,Ve._)`require("ajv/dist/runtime/validation_error").default`}));let l=a.scopeName("validate");t.validateName=l;let f={gen:a,allErrors:this.opts.allErrors,data:It.default.data,parentData:It.default.parentData,parentDataProperty:It.default.parentDataProperty,dataNames:[It.default.data],dataPathArr:[Ve.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Ve.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:c,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:Ve.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ve._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),(0,_h.validateFunctionCode)(f),a.optimize(this.opts.code.optimize);let u=a.toString();p=`${a.scopeRefs(It.default.scope)}return ${u}`,this.opts.code.process&&(p=this.opts.code.process(p,t));let h=new Function(`${It.default.self}`,`${It.default.scope}`,p)(this,this.scope.get());if(this.scope.value(l,{ref:h}),h.errors=null,h.schema=t.schema,h.schemaEnv=t,t.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:l,validateCode:u,scopeValues:a._values}),this.opts.unevaluated){let{props:y,items:v}=f;h.evaluated={props:y instanceof Ve.Name?void 0:y,items:v instanceof Ve.Name?void 0:v,dynamicProps:y instanceof Ve.Name,dynamicItems:v instanceof Ve.Name},h.source&&(h.source.evaluated=(0,Ve.stringify)(h.evaluated))}return t.validate=h,t}catch(u){throw delete t.validate,delete t.validateName,p&&this.logger.error("Error compiling schema, function code:",p),u}finally{this._compilations.delete(t)}}Ne.compileSchema=Bo;function xh(t,e,r){var n;r=(0,qe.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let s=Ph.call(this,t,r);if(s===void 0){let a=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:c}=this.opts;a&&(s=new rr({schema:a,schemaId:c,root:t,baseId:e}))}if(s!==void 0)return t.refs[r]=Eh.call(this,s)}Ne.resolveRef=xh;function Eh(t){return(0,qe.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Bo.call(this,t)}function hl(t){for(let e of this._compilations)if(Sh(e,t))return e}Ne.getCompilingSchema=hl;function Sh(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Ph(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Jn.call(this,t,e)}function Jn(t,e){let r=this.opts.uriResolver.parse(e),n=(0,qe._getFullPath)(this.opts.uriResolver,r),i=(0,qe.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return Uo.call(this,r,t);let s=(0,qe.normalizeId)(n),a=this.refs[s]||this.schemas[s];if(typeof a=="string"){let c=Jn.call(this,t,a);return typeof c?.schema!="object"?void 0:Uo.call(this,r,c)}if(typeof a?.schema=="object"){if(a.validate||Bo.call(this,a),s===(0,qe.normalizeId)(e)){let{schema:c}=a,{schemaId:l}=this.opts,f=c[l];return f&&(i=(0,qe.resolveUrl)(this.opts.uriResolver,i,f)),new rr({schema:c,schemaId:l,root:t,baseId:i})}return Uo.call(this,r,a)}}Ne.resolveSchema=Jn;var kh=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Uo(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let c of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let l=r[(0,ml.unescapeFragment)(c)];if(l===void 0)return;r=l;let f=typeof r=="object"&&r[this.opts.schemaId];!kh.has(c)&&f&&(e=(0,qe.resolveUrl)(this.opts.uriResolver,e,f))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,ml.schemaHasRulesButRef)(r,this.RULES)){let c=(0,qe.resolveUrl)(this.opts.uriResolver,e,r.$ref);s=Jn.call(this,n,c)}let{schemaId:a}=this.opts;if(s=s||new rr({schema:r,schemaId:a,root:n,baseId:e}),s.schema!==s.root.schema)return s}});var gl=T((h0,Rh)=>{Rh.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Wo=T((g0,_l)=>{"use strict";var Ih=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),wl=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),Ko=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),vl=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Ch=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Jo(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var Th=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function yl(t){return t.length=0,!0}function Ah(t,e,r){if(t.length){let n=Jo(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function Nh(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],s=!1,a=!1,c=Ah;for(let l=0;l<t.length;l++){let f=t[l];if(!(f==="["||f==="]"))if(f===":"){if(s===!0&&(a=!0),!c(i,n,r))break;if(++e>7){r.error=!0;break}l>0&&t[l-1]===":"&&(s=!0),n.push(":");continue}else if(f==="%"){if(!c(i,n,r))break;c=yl}else{i.push(f);continue}}return i.length&&(c===yl?r.zone=i.join(""):a?n.push(i.join("")):n.push(Jo(i))),r.address=n.join(""),r}function $l(t){if(jh(t,":")<2)return{host:t,isIPV6:!1};let e=Nh(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function jh(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function Oh(t){let e=t,r=[],n=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(i===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}var Mh={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},Vh=/[@/?#:]/g,qh=/[@/?#]/g;function bl(t,e){let r=e?qh:Vh;return r.lastIndex=0,t.replace(r,n=>Mh[n])}function Dh(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(Ko(i)){let s=i.toUpperCase(),a=String.fromCharCode(parseInt(s,16));e&&vl(a)?r+=a:r+="%"+s,n+=2;continue}}r+=t[n]}return r}function Lh(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(Ko(n)){let i=n.toUpperCase(),s=String.fromCharCode(parseInt(i,16));s!=="."&&vl(s)?e+=s:e+="%"+i,r+=2;continue}}Ch(t[r])?e+=t[r]:e+=escape(t[r])}return e}function Fh(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(Ko(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function zh(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!wl(r)){let n=$l(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=bl(r,!1)}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}_l.exports={nonSimpleDomain:Th,recomposeAuthority:zh,reescapeHostDelimiters:bl,normalizePercentEncoding:Dh,normalizePathEncoding:Lh,escapePreservingEscapes:Fh,removeDotSegments:Oh,isIPv4:wl,isUUID:Ih,normalizeIPv6:$l,stringArrayToHexStripped:Jo}});var kl=T((y0,Pl)=>{"use strict";var{isUUID:Hh}=Wo(),Uh=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Bh=["http","https","ws","wss","urn","urn:uuid"];function Kh(t){return Bh.indexOf(t)!==-1}function Yo(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function xl(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function El(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function Jh(t){return t.secure=Yo(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function Wh(t){if((t.port===(Yo(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function Yh(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(Uh);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let i=`${n}:${e.nid||t.nid}`,s=Go(i);t.path=void 0,s&&(t=s.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function Gh(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),i=`${r}:${e.nid||n}`,s=Go(i);s&&(t=s.serialize(t,e));let a=t,c=t.nss;return a.path=`${n||e.nid}:${c}`,e.skipEscape=!0,a}function Xh(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!Hh(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function Qh(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Sl={scheme:"http",domainHost:!0,parse:xl,serialize:El},Zh={scheme:"https",domainHost:Sl.domainHost,parse:xl,serialize:El},Wn={scheme:"ws",domainHost:!0,parse:Jh,serialize:Wh},eg={scheme:"wss",domainHost:Wn.domainHost,parse:Wn.parse,serialize:Wn.serialize},tg={scheme:"urn",parse:Yh,serialize:Gh,skipNormalize:!0},rg={scheme:"urn:uuid",parse:Xh,serialize:Qh,skipNormalize:!0},Yn={http:Sl,https:Zh,ws:Wn,wss:eg,urn:tg,"urn:uuid":rg};Object.setPrototypeOf(Yn,null);function Go(t){return t&&(Yn[t]||Yn[t.toLowerCase()])||void 0}Pl.exports={wsIsSecure:Yo,SCHEMES:Yn,isValidSchemeName:Kh,getSchemeHandler:Go}});var Nl=T((w0,Gn)=>{"use strict";var{normalizeIPv6:ng,removeDotSegments:Hr,recomposeAuthority:ig,normalizePercentEncoding:og,normalizePathEncoding:sg,escapePreservingEscapes:ag,reescapeHostDelimiters:cg,isIPv4:lg,nonSimpleDomain:ug}=Wo(),{SCHEMES:dg,getSchemeHandler:Il}=kl();function fg(t,e){return typeof t=="string"?t=yg(t,e):typeof t=="object"&&(t=nr(Ct(t,e),e)),t}function pg(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=Cl(nr(t,n),nr(e,n),n,!0);return n.skipEscape=!0,Ct(i,n)}function Cl(t,e,r,n){let i={};return n||(t=nr(Ct(t,r),r),e=nr(Ct(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=Hr(e.path||""),i.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=Hr(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=Hr(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?i.path="/"+e.path:t.path?i.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:i.path=e.path,i.path=Hr(i.path)),i.query=e.query):(i.path=t.path,e.query!==void 0?i.query=e.query:i.query=t.query),i.userinfo=t.userinfo,i.host=t.host,i.port=t.port),i.scheme=t.scheme),i.fragment=e.fragment,i}function mg(t,e,r){let n=Rl(t,r),i=Rl(e,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function Ct(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),i=[],s=Il(n.scheme||r.scheme);s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=og(r.path):(r.path=ag(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let a=ig(r);if(a!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(a),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let c=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(c=Hr(c)),a===void 0&&c[0]==="/"&&c[1]==="/"&&(c="/%2F"+c.slice(2)),i.push(c)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var hg=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function gg(t,e){if(e[2]!==void 0&&t.path&&t.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof t.port=="number"&&(t.port<0||t.port>65535))return"URI port is malformed."}function Tl(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,s=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let a=t.match(hg);if(a){n.scheme=a[1],n.userinfo=a[3],n.host=a[4],n.port=parseInt(a[5],10),n.path=a[6]||"",n.query=a[7],n.fragment=a[8],isNaN(n.port)&&(n.port=a[5]);let c=gg(n,a);if(c!==void 0&&(n.error=n.error||c,i=!0),n.host)if(lg(n.host)===!1){let p=ng(n.host);n.host=p.host.toLowerCase(),s=p.isIPV6}else s=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let l=Il(r.scheme||n.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&s===!1&&ug(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(f){n.error=n.error||"Host's domain name can not be converted to ASCII: "+f}if((!l||l&&!l.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=cg(unescape(n.host),s))),n.path&&(n.path=sg(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}l&&l.parse&&l.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}}function nr(t,e){return Tl(t,e).parsed}function yg(t,e){return Al(t,e).normalized}function Al(t,e){let{parsed:r,malformedAuthorityOrPort:n}=Tl(t,e);return{normalized:n?t:Ct(r,e),malformedAuthorityOrPort:n}}function Rl(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=Al(t,e);return n?void 0:r}if(typeof t=="object")return Ct(t,e)}var Xo={SCHEMES:dg,normalize:fg,resolve:pg,resolveComponent:Cl,equal:mg,serialize:Ct,parse:nr};Gn.exports=Xo;Gn.exports.default=Xo;Gn.exports.fastUri=Xo});var Ol=T(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});var jl=Nl();jl.code='require("ajv/dist/runtime/uri").default';Qo.default=jl});var Hl=T(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.CodeGen=ge.Name=ge.nil=ge.stringify=ge.str=ge._=ge.KeywordCxt=void 0;var wg=Lr();Object.defineProperty(ge,"KeywordCxt",{enumerable:!0,get:function(){return wg.KeywordCxt}});var ir=K();Object.defineProperty(ge,"_",{enumerable:!0,get:function(){return ir._}});Object.defineProperty(ge,"str",{enumerable:!0,get:function(){return ir.str}});Object.defineProperty(ge,"stringify",{enumerable:!0,get:function(){return ir.stringify}});Object.defineProperty(ge,"nil",{enumerable:!0,get:function(){return ir.nil}});Object.defineProperty(ge,"Name",{enumerable:!0,get:function(){return ir.Name}});Object.defineProperty(ge,"CodeGen",{enumerable:!0,get:function(){return ir.CodeGen}});var vg=Kn(),Ll=Fr(),$g=Po(),Ur=zr(),bg=K(),Br=Vr(),Xn=Mr(),es=G(),Ml=gl(),_g=Ol(),Fl=(t,e)=>new RegExp(t,e);Fl.code="new RegExp";var xg=["removeAdditional","useDefaults","coerceTypes"],Eg=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Sg={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Pg={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Vl=200;function kg(t){var e,r,n,i,s,a,c,l,f,p,u,m,h,y,v,I,P,D,z,L,N,X,fe,wt,vt;let ze=t.strict,Je=(e=t.code)===null||e===void 0?void 0:e.optimize,Vt=Je===!0||Je===void 0?1:Je||0,ot=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Fl,qt=(i=t.uriResolver)!==null&&i!==void 0?i:_g.default;return{strictSchema:(a=(s=t.strictSchema)!==null&&s!==void 0?s:ze)!==null&&a!==void 0?a:!0,strictNumbers:(l=(c=t.strictNumbers)!==null&&c!==void 0?c:ze)!==null&&l!==void 0?l:!0,strictTypes:(p=(f=t.strictTypes)!==null&&f!==void 0?f:ze)!==null&&p!==void 0?p:"log",strictTuples:(m=(u=t.strictTuples)!==null&&u!==void 0?u:ze)!==null&&m!==void 0?m:"log",strictRequired:(y=(h=t.strictRequired)!==null&&h!==void 0?h:ze)!==null&&y!==void 0?y:!1,code:t.code?{...t.code,optimize:Vt,regExp:ot}:{optimize:Vt,regExp:ot},loopRequired:(v=t.loopRequired)!==null&&v!==void 0?v:Vl,loopEnum:(I=t.loopEnum)!==null&&I!==void 0?I:Vl,meta:(P=t.meta)!==null&&P!==void 0?P:!0,messages:(D=t.messages)!==null&&D!==void 0?D:!0,inlineRefs:(z=t.inlineRefs)!==null&&z!==void 0?z:!0,schemaId:(L=t.schemaId)!==null&&L!==void 0?L:"$id",addUsedSchema:(N=t.addUsedSchema)!==null&&N!==void 0?N:!0,validateSchema:(X=t.validateSchema)!==null&&X!==void 0?X:!0,validateFormats:(fe=t.validateFormats)!==null&&fe!==void 0?fe:!0,unicodeRegExp:(wt=t.unicodeRegExp)!==null&&wt!==void 0?wt:!0,int32range:(vt=t.int32range)!==null&&vt!==void 0?vt:!0,uriResolver:qt}}var Kr=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...kg(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new bg.ValueScope({scope:{},prefixes:Eg,es5:r,lines:n}),this.logger=Ng(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,$g.getRules)(),ql.call(this,Sg,e,"NOT SUPPORTED"),ql.call(this,Pg,e,"DEPRECATED","warn"),this._metaOpts=Tg.call(this),e.formats&&Ig.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Cg.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Rg.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=Ml;n==="id"&&(i={...Ml},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(p,u){await s.call(this,p.$schema);let m=this._addSchema(p,u);return m.validate||a.call(this,m)}async function s(p){p&&!this.getSchema(p)&&await i.call(this,{$ref:p},!0)}async function a(p){try{return this._compileSchemaEnv(p)}catch(u){if(!(u instanceof Ll.default))throw u;return c.call(this,u),await l.call(this,u.missingSchema),a.call(this,p)}}function c({missingSchema:p,missingRef:u}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${u} cannot be resolved`)}async function l(p){let u=await f.call(this,p);this.refs[p]||await s.call(this,u.$schema),this.refs[p]||this.addSchema(u,p,r)}async function f(p){let u=this._loading[p];if(u)return u;try{return await(this._loading[p]=n(p))}finally{delete this._loading[p]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,n,i);return this}let s;if(typeof e=="object"){let{schemaId:a}=this.opts;if(s=e[a],s!==void 0&&typeof s!="string")throw new Error(`schema ${a} must be string`)}return r=(0,Br.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return i}getSchema(e){let r;for(;typeof(r=Dl.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Ur.SchemaEnv({schema:{},schemaId:n});if(r=Ur.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Dl.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,Br.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Og.call(this,n,r),!r)return(0,es.eachItem)(n,s=>Zo.call(this,s)),this;Vg.call(this,r);let i={...r,type:(0,Xn.getJSONTypes)(r.type),schemaType:(0,Xn.getJSONTypes)(r.schemaType)};return(0,es.eachItem)(n,i.type.length===0?s=>Zo.call(this,s,i):s=>i.type.forEach(a=>Zo.call(this,s,i,a))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(s=>s.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,s)=>i+r+s)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let s=i.split("/").slice(1),a=e;for(let c of s)a=a[c];for(let c in n){let l=n[c];if(typeof l!="object")continue;let{$data:f}=l.definition,p=a[c];f&&p&&(a[c]=zl(p))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,s=this.opts.addUsedSchema){let a,{schemaId:c}=this.opts;if(typeof e=="object")a=e[c];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let l=this._cache.get(e);if(l!==void 0)return l;n=(0,Br.normalizeId)(a||n);let f=Br.getSchemaRefs.call(this,e,n);return l=new Ur.SchemaEnv({schema:e,schemaId:c,meta:r,baseId:n,localRefs:f}),this._cache.set(l.schema,l),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),i&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Ur.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{Ur.compileSchema.call(this,e)}finally{this.opts=r}}};Kr.ValidationError=vg.default;Kr.MissingRefError=Ll.default;ge.default=Kr;function ql(t,e,r,n="error"){for(let i in t){let s=i;s in e&&this.logger[n](`${r}: option ${i}. ${t[s]}`)}}function Dl(t){return t=(0,Br.normalizeId)(t),this.schemas[t]||this.refs[t]}function Rg(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function Ig(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Cg(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Tg(){let t={...this.opts};for(let e of xg)delete t[e];return t}var Ag={log(){},warn(){},error(){}};function Ng(t){if(t===!1)return Ag;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var jg=/^[a-z_$][a-z0-9_$:-]*$/i;function Og(t,e){let{RULES:r}=this;if((0,es.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!jg.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Zo(t,e,r){var n;let i=e?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,a=i?s.post:s.rules.find(({type:l})=>l===r);if(a||(a={type:r,rules:[]},s.rules.push(a)),s.keywords[t]=!0,!e)return;let c={keyword:t,definition:{...e,type:(0,Xn.getJSONTypes)(e.type),schemaType:(0,Xn.getJSONTypes)(e.schemaType)}};e.before?Mg.call(this,a,c,e.before):a.rules.push(c),s.all[t]=c,(n=e.implements)===null||n===void 0||n.forEach(l=>this.addKeyword(l))}function Mg(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function Vg(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=zl(e)),t.validateSchema=this.compile(e,!0))}var qg={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function zl(t){return{anyOf:[t,qg]}}});var Ul=T(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});var Dg={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};ts.default=Dg});var ei=T(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.callRef=Tt.getValidate=void 0;var Lg=Fr(),Bl=Ae(),ke=K(),or=Te(),Kl=zr(),Qn=G(),Fg={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:s,validateName:a,opts:c,self:l}=n,{root:f}=s;if((r==="#"||r==="#/")&&i===f.baseId)return u();let p=Kl.resolveRef.call(l,f,i,r);if(p===void 0)throw new Lg.default(n.opts.uriResolver,i,r);if(p instanceof Kl.SchemaEnv)return m(p);return h(p);function u(){if(s===f)return Zn(t,a,s,s.$async);let y=e.scopeValue("root",{ref:f});return Zn(t,(0,ke._)`${y}.validate`,f,f.$async)}function m(y){let v=Jl(t,y);Zn(t,v,y,y.$async)}function h(y){let v=e.scopeValue("schema",c.code.source===!0?{ref:y,code:(0,ke.stringify)(y)}:{ref:y}),I=e.name("valid"),P=t.subschema({schema:y,dataTypes:[],schemaPath:ke.nil,topSchemaRef:v,errSchemaPath:r},I);t.mergeEvaluated(P),t.ok(I)}}};function Jl(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,ke._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Tt.getValidate=Jl;function Zn(t,e,r,n){let{gen:i,it:s}=t,{allErrors:a,schemaEnv:c,opts:l}=s,f=l.passContext?or.default.this:ke.nil;n?p():u();function p(){if(!c.$async)throw new Error("async schema referenced by sync schema");let y=i.let("valid");i.try(()=>{i.code((0,ke._)`await ${(0,Bl.callValidateCode)(t,e,f)}`),h(e),a||i.assign(y,!0)},v=>{i.if((0,ke._)`!(${v} instanceof ${s.ValidationError})`,()=>i.throw(v)),m(v),a||i.assign(y,!1)}),t.ok(y)}function u(){t.result((0,Bl.callValidateCode)(t,e,f),()=>h(e),()=>m(e))}function m(y){let v=(0,ke._)`${y}.errors`;i.assign(or.default.vErrors,(0,ke._)`${or.default.vErrors} === null ? ${v} : ${or.default.vErrors}.concat(${v})`),i.assign(or.default.errors,(0,ke._)`${or.default.vErrors}.length`)}function h(y){var v;if(!s.opts.unevaluated)return;let I=(v=r?.validate)===null||v===void 0?void 0:v.evaluated;if(s.props!==!0)if(I&&!I.dynamicProps)I.props!==void 0&&(s.props=Qn.mergeEvaluated.props(i,I.props,s.props));else{let P=i.var("props",(0,ke._)`${y}.evaluated.props`);s.props=Qn.mergeEvaluated.props(i,P,s.props,ke.Name)}if(s.items!==!0)if(I&&!I.dynamicItems)I.items!==void 0&&(s.items=Qn.mergeEvaluated.items(i,I.items,s.items));else{let P=i.var("items",(0,ke._)`${y}.evaluated.items`);s.items=Qn.mergeEvaluated.items(i,P,s.items,ke.Name)}}}Tt.callRef=Zn;Tt.default=Fg});var Wl=T(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});var zg=Ul(),Hg=ei(),Ug=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",zg.default,Hg.default];rs.default=Ug});var Yl=T(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});var ti=K(),ht=ti.operators,ri={maximum:{okStr:"<=",ok:ht.LTE,fail:ht.GT},minimum:{okStr:">=",ok:ht.GTE,fail:ht.LT},exclusiveMaximum:{okStr:"<",ok:ht.LT,fail:ht.GTE},exclusiveMinimum:{okStr:">",ok:ht.GT,fail:ht.LTE}},Bg={message:({keyword:t,schemaCode:e})=>(0,ti.str)`must be ${ri[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,ti._)`{comparison: ${ri[t].okStr}, limit: ${e}}`},Kg={keyword:Object.keys(ri),type:"number",schemaType:"number",$data:!0,error:Bg,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,ti._)`${r} ${ri[e].fail} ${n} || isNaN(${r})`)}};ns.default=Kg});var Gl=T(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});var Jr=K(),Jg={message:({schemaCode:t})=>(0,Jr.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Jr._)`{multipleOf: ${t}}`},Wg={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Jg,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,s=i.opts.multipleOfPrecision,a=e.let("res"),c=s?(0,Jr._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:(0,Jr._)`${a} !== parseInt(${a})`;t.fail$data((0,Jr._)`(${n} === 0 || (${a} = ${r}/${n}, ${c}))`)}};is.default=Wg});var Ql=T(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});function Xl(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}os.default=Xl;Xl.code='require("ajv/dist/runtime/ucs2length").default'});var Zl=T(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});var At=K(),Yg=G(),Gg=Ql(),Xg={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,At.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,At._)`{limit: ${t}}`},Qg={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Xg,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,s=e==="maxLength"?At.operators.GT:At.operators.LT,a=i.opts.unicode===!1?(0,At._)`${r}.length`:(0,At._)`${(0,Yg.useFunc)(t.gen,Gg.default)}(${r})`;t.fail$data((0,At._)`${a} ${s} ${n}`)}};ss.default=Qg});var eu=T(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});var Zg=Ae(),ey=G(),sr=K(),ty={message:({schemaCode:t})=>(0,sr.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,sr._)`{pattern: ${t}}`},ry={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:ty,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:s,it:a}=t,c=a.opts.unicodeRegExp?"u":"";if(n){let{regExp:l}=a.opts.code,f=l.code==="new RegExp"?(0,sr._)`new RegExp`:(0,ey.useFunc)(e,l),p=e.let("valid");e.try(()=>e.assign(p,(0,sr._)`${f}(${s}, ${c}).test(${r})`),()=>e.assign(p,!1)),t.fail$data((0,sr._)`!${p}`)}else{let l=(0,Zg.usePattern)(t,i);t.fail$data((0,sr._)`!${l}.test(${r})`)}}};as.default=ry});var tu=T(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});var Wr=K(),ny={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Wr.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Wr._)`{limit: ${t}}`},iy={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:ny,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?Wr.operators.GT:Wr.operators.LT;t.fail$data((0,Wr._)`Object.keys(${r}).length ${i} ${n}`)}};cs.default=iy});var ru=T(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});var Yr=Ae(),Gr=K(),oy=G(),sy={message:({params:{missingProperty:t}})=>(0,Gr.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Gr._)`{missingProperty: ${t}}`},ay={keyword:"required",type:"object",schemaType:"array",$data:!0,error:sy,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:s,it:a}=t,{opts:c}=a;if(!s&&r.length===0)return;let l=r.length>=c.loopRequired;if(a.allErrors?f():p(),c.strictRequired){let h=t.parentSchema.properties,{definedProperties:y}=t.it;for(let v of r)if(h?.[v]===void 0&&!y.has(v)){let I=a.schemaEnv.baseId+a.errSchemaPath,P=`required property "${v}" is not defined at "${I}" (strictRequired)`;(0,oy.checkStrictMode)(a,P,a.opts.strictRequired)}}function f(){if(l||s)t.block$data(Gr.nil,u);else for(let h of r)(0,Yr.checkReportMissingProp)(t,h)}function p(){let h=e.let("missing");if(l||s){let y=e.let("valid",!0);t.block$data(y,()=>m(h,y)),t.ok(y)}else e.if((0,Yr.checkMissingProp)(t,r,h)),(0,Yr.reportMissingProp)(t,h),e.else()}function u(){e.forOf("prop",n,h=>{t.setParams({missingProperty:h}),e.if((0,Yr.noPropertyInData)(e,i,h,c.ownProperties),()=>t.error())})}function m(h,y){t.setParams({missingProperty:h}),e.forOf(h,n,()=>{e.assign(y,(0,Yr.propertyInData)(e,i,h,c.ownProperties)),e.if((0,Gr.not)(y),()=>{t.error(),e.break()})},Gr.nil)}}};ls.default=ay});var nu=T(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});var Xr=K(),cy={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,Xr.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Xr._)`{limit: ${t}}`},ly={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:cy,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?Xr.operators.GT:Xr.operators.LT;t.fail$data((0,Xr._)`${r}.length ${i} ${n}`)}};us.default=ly});var ni=T(ds=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});var iu=jo();iu.code='require("ajv/dist/runtime/equal").default';ds.default=iu});var ou=T(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});var fs=Mr(),ye=K(),uy=G(),dy=ni(),fy={message:({params:{i:t,j:e}})=>(0,ye.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,ye._)`{i: ${t}, j: ${e}}`},py={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:fy,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:s,schemaCode:a,it:c}=t;if(!n&&!i)return;let l=e.let("valid"),f=s.items?(0,fs.getSchemaTypes)(s.items):[];t.block$data(l,p,(0,ye._)`${a} === false`),t.ok(l);function p(){let y=e.let("i",(0,ye._)`${r}.length`),v=e.let("j");t.setParams({i:y,j:v}),e.assign(l,!0),e.if((0,ye._)`${y} > 1`,()=>(u()?m:h)(y,v))}function u(){return f.length>0&&!f.some(y=>y==="object"||y==="array")}function m(y,v){let I=e.name("item"),P=(0,fs.checkDataTypes)(f,I,c.opts.strictNumbers,fs.DataType.Wrong),D=e.const("indices",(0,ye._)`{}`);e.for((0,ye._)`;${y}--;`,()=>{e.let(I,(0,ye._)`${r}[${y}]`),e.if(P,(0,ye._)`continue`),f.length>1&&e.if((0,ye._)`typeof ${I} == "string"`,(0,ye._)`${I} += "_"`),e.if((0,ye._)`typeof ${D}[${I}] == "number"`,()=>{e.assign(v,(0,ye._)`${D}[${I}]`),t.error(),e.assign(l,!1).break()}).code((0,ye._)`${D}[${I}] = ${y}`)})}function h(y,v){let I=(0,uy.useFunc)(e,dy.default),P=e.name("outer");e.label(P).for((0,ye._)`;${y}--;`,()=>e.for((0,ye._)`${v} = ${y}; ${v}--;`,()=>e.if((0,ye._)`${I}(${r}[${y}], ${r}[${v}])`,()=>{t.error(),e.assign(l,!1).break(P)})))}}};ps.default=py});var su=T(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});var ms=K(),my=G(),hy=ni(),gy={message:"must be equal to constant",params:({schemaCode:t})=>(0,ms._)`{allowedValue: ${t}}`},yy={keyword:"const",$data:!0,error:gy,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:s}=t;n||s&&typeof s=="object"?t.fail$data((0,ms._)`!${(0,my.useFunc)(e,hy.default)}(${r}, ${i})`):t.fail((0,ms._)`${s} !== ${r}`)}};hs.default=yy});var au=T(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});var Qr=K(),wy=G(),vy=ni(),$y={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Qr._)`{allowedValues: ${t}}`},by={keyword:"enum",schemaType:"array",$data:!0,error:$y,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:s,it:a}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let c=i.length>=a.opts.loopEnum,l,f=()=>l??(l=(0,wy.useFunc)(e,vy.default)),p;if(c||n)p=e.let("valid"),t.block$data(p,u);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let h=e.const("vSchema",s);p=(0,Qr.or)(...i.map((y,v)=>m(h,v)))}t.pass(p);function u(){e.assign(p,!1),e.forOf("v",s,h=>e.if((0,Qr._)`${f()}(${r}, ${h})`,()=>e.assign(p,!0).break()))}function m(h,y){let v=i[y];return typeof v=="object"&&v!==null?(0,Qr._)`${f()}(${r}, ${h}[${y}])`:(0,Qr._)`${r} === ${v}`}}};gs.default=by});var cu=T(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});var _y=Yl(),xy=Gl(),Ey=Zl(),Sy=eu(),Py=tu(),ky=ru(),Ry=nu(),Iy=ou(),Cy=su(),Ty=au(),Ay=[_y.default,xy.default,Ey.default,Sy.default,Py.default,ky.default,Ry.default,Iy.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Cy.default,Ty.default];ys.default=Ay});var vs=T(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.validateAdditionalItems=void 0;var Nt=K(),ws=G(),Ny={message:({params:{len:t}})=>(0,Nt.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Nt._)`{limit: ${t}}`},jy={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Ny,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,ws.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}lu(t,n)}};function lu(t,e){let{gen:r,schema:n,data:i,keyword:s,it:a}=t;a.items=!0;let c=r.const("len",(0,Nt._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Nt._)`${c} <= ${e.length}`);else if(typeof n=="object"&&!(0,ws.alwaysValidSchema)(a,n)){let f=r.var("valid",(0,Nt._)`${c} <= ${e.length}`);r.if((0,Nt.not)(f),()=>l(f)),t.ok(f)}function l(f){r.forRange("i",e.length,c,p=>{t.subschema({keyword:s,dataProp:p,dataPropType:ws.Type.Num},f),a.allErrors||r.if((0,Nt.not)(f),()=>r.break())})}}Zr.validateAdditionalItems=lu;Zr.default=jy});var $s=T(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.validateTuple=void 0;var uu=K(),ii=G(),Oy=Ae(),My={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return du(t,"additionalItems",e);r.items=!0,!(0,ii.alwaysValidSchema)(r,e)&&t.ok((0,Oy.validateArray)(t))}};function du(t,e,r=t.schema){let{gen:n,parentSchema:i,data:s,keyword:a,it:c}=t;p(i),c.opts.unevaluated&&r.length&&c.items!==!0&&(c.items=ii.mergeEvaluated.items(n,r.length,c.items));let l=n.name("valid"),f=n.const("len",(0,uu._)`${s}.length`);r.forEach((u,m)=>{(0,ii.alwaysValidSchema)(c,u)||(n.if((0,uu._)`${f} > ${m}`,()=>t.subschema({keyword:a,schemaProp:m,dataProp:m},l)),t.ok(l))});function p(u){let{opts:m,errSchemaPath:h}=c,y=r.length,v=y===u.minItems&&(y===u.maxItems||u[e]===!1);if(m.strictTuples&&!v){let I=`"${a}" is ${y}-tuple, but minItems or maxItems/${e} are not specified or different at path "${h}"`;(0,ii.checkStrictMode)(c,I,m.strictTuples)}}}en.validateTuple=du;en.default=My});var fu=T(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});var Vy=$s(),qy={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Vy.validateTuple)(t,"items")};bs.default=qy});var mu=T(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});var pu=K(),Dy=G(),Ly=Ae(),Fy=vs(),zy={message:({params:{len:t}})=>(0,pu.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,pu._)`{limit: ${t}}`},Hy={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:zy,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,Dy.alwaysValidSchema)(n,e)&&(i?(0,Fy.validateAdditionalItems)(t,i):t.ok((0,Ly.validateArray)(t)))}};_s.default=Hy});var hu=T(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});var je=K(),oi=G(),Uy={message:({params:{min:t,max:e}})=>e===void 0?(0,je.str)`must contain at least ${t} valid item(s)`:(0,je.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,je._)`{minContains: ${t}}`:(0,je._)`{minContains: ${t}, maxContains: ${e}}`},By={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Uy,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:s}=t,a,c,{minContains:l,maxContains:f}=n;s.opts.next?(a=l===void 0?1:l,c=f):a=1;let p=e.const("len",(0,je._)`${i}.length`);if(t.setParams({min:a,max:c}),c===void 0&&a===0){(0,oi.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(c!==void 0&&a>c){(0,oi.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,oi.alwaysValidSchema)(s,r)){let v=(0,je._)`${p} >= ${a}`;c!==void 0&&(v=(0,je._)`${v} && ${p} <= ${c}`),t.pass(v);return}s.items=!0;let u=e.name("valid");c===void 0&&a===1?h(u,()=>e.if(u,()=>e.break())):a===0?(e.let(u,!0),c!==void 0&&e.if((0,je._)`${i}.length > 0`,m)):(e.let(u,!1),m()),t.result(u,()=>t.reset());function m(){let v=e.name("_valid"),I=e.let("count",0);h(v,()=>e.if(v,()=>y(I)))}function h(v,I){e.forRange("i",0,p,P=>{t.subschema({keyword:"contains",dataProp:P,dataPropType:oi.Type.Num,compositeRule:!0},v),I()})}function y(v){e.code((0,je._)`${v}++`),c===void 0?e.if((0,je._)`${v} >= ${a}`,()=>e.assign(u,!0).break()):(e.if((0,je._)`${v} > ${c}`,()=>e.assign(u,!1).break()),a===1?e.assign(u,!0):e.if((0,je._)`${v} >= ${a}`,()=>e.assign(u,!0)))}}};xs.default=By});var si=T(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.validateSchemaDeps=Ke.validatePropertyDeps=Ke.error=void 0;var Es=K(),Ky=G(),tn=Ae();Ke.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Es.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Es._)`{property: ${t},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
deps: ${r}}`};var Jy={keyword:"dependencies",type:"object",schemaType:"object",error:Ke.error,code(t){let[e,r]=Wy(t);gu(t,e),yu(t,r)}};function Wy({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function gu(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let s=r.let("missing");for(let a in e){let c=e[a];if(c.length===0)continue;let l=(0,tn.propertyInData)(r,n,a,i.opts.ownProperties);t.setParams({property:a,depsCount:c.length,deps:c.join(", ")}),i.allErrors?r.if(l,()=>{for(let f of c)(0,tn.checkReportMissingProp)(t,f)}):(r.if((0,Es._)`${l} && (${(0,tn.checkMissingProp)(t,c,s)})`),(0,tn.reportMissingProp)(t,s),r.else())}}Ke.validatePropertyDeps=gu;function yu(t,e=t.schema){let{gen:r,data:n,keyword:i,it:s}=t,a=r.name("valid");for(let c in e)(0,Ky.alwaysValidSchema)(s,e[c])||(r.if((0,tn.propertyInData)(r,n,c,s.opts.ownProperties),()=>{let l=t.subschema({keyword:i,schemaProp:c},a);t.mergeValidEvaluated(l,a)},()=>r.var(a,!0)),t.ok(a))}Ke.validateSchemaDeps=yu;Ke.default=Jy});var vu=T(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});var wu=K(),Yy=G(),Gy={message:"property name must be valid",params:({params:t})=>(0,wu._)`{propertyName: ${t.propertyName}}`},Xy={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Gy,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,Yy.alwaysValidSchema)(i,r))return;let s=e.name("valid");e.forIn("key",n,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},s),e.if((0,wu.not)(s),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(s)}};Ss.default=Xy});var ks=T(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});var ai=Ae(),De=K(),Qy=Te(),ci=G(),Zy={message:"must NOT have additional properties",params:({params:t})=>(0,De._)`{additionalProperty: ${t.additionalProperty}}`},ew={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Zy,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:s,it:a}=t;if(!s)throw new Error("ajv implementation error");let{allErrors:c,opts:l}=a;if(a.props=!0,l.removeAdditional!=="all"&&(0,ci.alwaysValidSchema)(a,r))return;let f=(0,ai.allSchemaProperties)(n.properties),p=(0,ai.allSchemaProperties)(n.patternProperties);u(),t.ok((0,De._)`${s} === ${Qy.default.errors}`);function u(){e.forIn("key",i,I=>{!f.length&&!p.length?y(I):e.if(m(I),()=>y(I))})}function m(I){let P;if(f.length>8){let D=(0,ci.schemaRefOrVal)(a,n.properties,"properties");P=(0,ai.isOwnProperty)(e,D,I)}else f.length?P=(0,De.or)(...f.map(D=>(0,De._)`${I} === ${D}`)):P=De.nil;return p.length&&(P=(0,De.or)(P,...p.map(D=>(0,De._)`${(0,ai.usePattern)(t,D)}.test(${I})`))),(0,De.not)(P)}function h(I){e.code((0,De._)`delete ${i}[${I}]`)}function y(I){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){h(I);return}if(r===!1){t.setParams({additionalProperty:I}),t.error(),c||e.break();return}if(typeof r=="object"&&!(0,ci.alwaysValidSchema)(a,r)){let P=e.name("valid");l.removeAdditional==="failing"?(v(I,P,!1),e.if((0,De.not)(P),()=>{t.reset(),h(I)})):(v(I,P),c||e.if((0,De.not)(P),()=>e.break()))}}function v(I,P,D){let z={keyword:"additionalProperties",dataProp:I,dataPropType:ci.Type.Str};D===!1&&Object.assign(z,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(z,P)}}};Ps.default=ew});var _u=T(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});var tw=Lr(),$u=Ae(),Rs=G(),bu=ks(),rw={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:s}=t;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&bu.default.code(new tw.KeywordCxt(s,bu.default,"additionalProperties"));let a=(0,$u.allSchemaProperties)(r);for(let u of a)s.definedProperties.add(u);s.opts.unevaluated&&a.length&&s.props!==!0&&(s.props=Rs.mergeEvaluated.props(e,(0,Rs.toHash)(a),s.props));let c=a.filter(u=>!(0,Rs.alwaysValidSchema)(s,r[u]));if(c.length===0)return;let l=e.name("valid");for(let u of c)f(u)?p(u):(e.if((0,$u.propertyInData)(e,i,u,s.opts.ownProperties)),p(u),s.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(u),t.ok(l);function f(u){return s.opts.useDefaults&&!s.compositeRule&&r[u].default!==void 0}function p(u){t.subschema({keyword:"properties",schemaProp:u,dataProp:u},l)}}};Is.default=rw});var Pu=T(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});var xu=Ae(),li=K(),Eu=G(),Su=G(),nw={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:s}=t,{opts:a}=s,c=(0,xu.allSchemaProperties)(r),l=c.filter(v=>(0,Eu.alwaysValidSchema)(s,r[v]));if(c.length===0||l.length===c.length&&(!s.opts.unevaluated||s.props===!0))return;let f=a.strictSchema&&!a.allowMatchingProperties&&i.properties,p=e.name("valid");s.props!==!0&&!(s.props instanceof li.Name)&&(s.props=(0,Su.evaluatedPropsToName)(e,s.props));let{props:u}=s;m();function m(){for(let v of c)f&&h(v),s.allErrors?y(v):(e.var(p,!0),y(v),e.if(p))}function h(v){for(let I in f)new RegExp(v).test(I)&&(0,Eu.checkStrictMode)(s,`property ${I} matches pattern ${v} (use allowMatchingProperties)`)}function y(v){e.forIn("key",n,I=>{e.if((0,li._)`${(0,xu.usePattern)(t,v)}.test(${I})`,()=>{let P=l.includes(v);P||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:I,dataPropType:Su.Type.Str},p),s.opts.unevaluated&&u!==!0?e.assign((0,li._)`${u}[${I}]`,!0):!P&&!s.allErrors&&e.if((0,li.not)(p),()=>e.break())})})}}};Cs.default=nw});var ku=T(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});var iw=G(),ow={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,iw.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Ts.default=ow});var Ru=T(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});var sw=Ae(),aw={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:sw.validateUnion,error:{message:"must match a schema in anyOf"}};As.default=aw});var Iu=T(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});var ui=K(),cw=G(),lw={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,ui._)`{passingSchemas: ${t.passing}}`},uw={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:lw,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let s=r,a=e.let("valid",!1),c=e.let("passing",null),l=e.name("_valid");t.setParams({passing:c}),e.block(f),t.result(a,()=>t.reset(),()=>t.error(!0));function f(){s.forEach((p,u)=>{let m;(0,cw.alwaysValidSchema)(i,p)?e.var(l,!0):m=t.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},l),u>0&&e.if((0,ui._)`${l} && ${a}`).assign(a,!1).assign(c,(0,ui._)`[${c}, ${u}]`).else(),e.if(l,()=>{e.assign(a,!0),e.assign(c,u),m&&t.mergeEvaluated(m,ui.Name)})})}}};Ns.default=uw});var Cu=T(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});var dw=G(),fw={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((s,a)=>{if((0,dw.alwaysValidSchema)(n,s))return;let c=t.subschema({keyword:"allOf",schemaProp:a},i);t.ok(i),t.mergeEvaluated(c)})}};js.default=fw});var Nu=T(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});var di=K(),Au=G(),pw={message:({params:t})=>(0,di.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,di._)`{failingKeyword: ${t.ifClause}}`},mw={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:pw,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Au.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=Tu(n,"then"),s=Tu(n,"else");if(!i&&!s)return;let a=e.let("valid",!0),c=e.name("_valid");if(l(),t.reset(),i&&s){let p=e.let("ifClause");t.setParams({ifClause:p}),e.if(c,f("then",p),f("else",p))}else i?e.if(c,f("then")):e.if((0,di.not)(c),f("else"));t.pass(a,()=>t.error(!0));function l(){let p=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);t.mergeEvaluated(p)}function f(p,u){return()=>{let m=t.subschema({keyword:p},c);e.assign(a,c),t.mergeValidEvaluated(m,a),u?e.assign(u,(0,di._)`${p}`):t.setParams({ifClause:p})}}}};function Tu(t,e){let r=t.schema[e];return r!==void 0&&!(0,Au.alwaysValidSchema)(t,r)}Os.default=mw});var ju=T(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});var hw=G(),gw={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,hw.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Ms.default=gw});var Ou=T(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});var yw=vs(),ww=fu(),vw=$s(),$w=mu(),bw=hu(),_w=si(),xw=vu(),Ew=ks(),Sw=_u(),Pw=Pu(),kw=ku(),Rw=Ru(),Iw=Iu(),Cw=Cu(),Tw=Nu(),Aw=ju();function Nw(t=!1){let e=[kw.default,Rw.default,Iw.default,Cw.default,Tw.default,Aw.default,xw.default,Ew.default,_w.default,Sw.default,Pw.default];return t?e.push(ww.default,$w.default):e.push(yw.default,vw.default),e.push(bw.default),e}Vs.default=Nw});var Ds=T(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.dynamicAnchor=void 0;var qs=K(),jw=Te(),Mu=zr(),Ow=ei(),Mw={keyword:"$dynamicAnchor",schemaType:"string",code:t=>Vu(t,t.schema)};function Vu(t,e){let{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,qs._)`${jw.default.dynamicAnchors}${(0,qs.getProperty)(e)}`,s=n.errSchemaPath==="#"?n.validateName:Vw(t);r.if((0,qs._)`!${i}`,()=>r.assign(i,s))}rn.dynamicAnchor=Vu;function Vw(t){let{schemaEnv:e,schema:r,self:n}=t.it,{root:i,baseId:s,localRefs:a,meta:c}=e.root,{schemaId:l}=n.opts,f=new Mu.SchemaEnv({schema:r,schemaId:l,root:i,baseId:s,localRefs:a,meta:c});return Mu.compileSchema.call(n,f),(0,Ow.getValidate)(t,f)}rn.default=Mw});var Ls=T(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.dynamicRef=void 0;var qu=K(),qw=Te(),Du=ei(),Dw={keyword:"$dynamicRef",schemaType:"string",code:t=>Lu(t,t.schema)};function Lu(t,e){let{gen:r,keyword:n,it:i}=t;if(e[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let s=e.slice(1);if(i.allErrors)a();else{let l=r.let("valid",!1);a(l),t.ok(l)}function a(l){if(i.schemaEnv.root.dynamicAnchors[s]){let f=r.let("_v",(0,qu._)`${qw.default.dynamicAnchors}${(0,qu.getProperty)(s)}`);r.if(f,c(f,l),c(i.validateName,l))}else c(i.validateName,l)()}function c(l,f){return f?()=>r.block(()=>{(0,Du.callRef)(t,l),r.let(f,!0)}):()=>(0,Du.callRef)(t,l)}}nn.dynamicRef=Lu;nn.default=Dw});var Fu=T(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});var Lw=Ds(),Fw=G(),zw={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,Lw.dynamicAnchor)(t,""):(0,Fw.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};Fs.default=zw});var zu=T(zs=>{"use strict";Object.defineProperty(zs,"__esModule",{value:!0});var Hw=Ls(),Uw={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,Hw.dynamicRef)(t,t.schema)};zs.default=Uw});var Hu=T(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});var Bw=Ds(),Kw=Ls(),Jw=Fu(),Ww=zu(),Yw=[Bw.default,Kw.default,Jw.default,Ww.default];Hs.default=Yw});var Bu=T(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});var Uu=si(),Gw={keyword:"dependentRequired",type:"object",schemaType:"object",error:Uu.error,code:t=>(0,Uu.validatePropertyDeps)(t)};Us.default=Gw});var Ku=T(Bs=>{"use strict";Object.defineProperty(Bs,"__esModule",{value:!0});var Xw=si(),Qw={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,Xw.validateSchemaDeps)(t)};Bs.default=Qw});var Ju=T(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});var Zw=G(),ev={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,Zw.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};Ks.default=ev});var Wu=T(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});var tv=Bu(),rv=Ku(),nv=Ju(),iv=[tv.default,rv.default,nv.default];Js.default=iv});var Gu=T(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});var gt=K(),Yu=G(),ov=Te(),sv={message:"must NOT have unevaluated properties",params:({params:t})=>(0,gt._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},av={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:sv,code(t){let{gen:e,schema:r,data:n,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:a,props:c}=s;c instanceof gt.Name?e.if((0,gt._)`${c} !== true`,()=>e.forIn("key",n,u=>e.if(f(c,u),()=>l(u)))):c!==!0&&e.forIn("key",n,u=>c===void 0?l(u):e.if(p(c,u),()=>l(u))),s.props=!0,t.ok((0,gt._)`${i} === ${ov.default.errors}`);function l(u){if(r===!1){t.setParams({unevaluatedProperty:u}),t.error(),a||e.break();return}if(!(0,Yu.alwaysValidSchema)(s,r)){let m=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:u,dataPropType:Yu.Type.Str},m),a||e.if((0,gt.not)(m),()=>e.break())}}function f(u,m){return(0,gt._)`!${u} || !${u}[${m}]`}function p(u,m){let h=[];for(let y in u)u[y]===!0&&h.push((0,gt._)`${m} !== ${y}`);return(0,gt.and)(...h)}}};Ws.default=av});var Qu=T(Ys=>{"use strict";Object.defineProperty(Ys,"__esModule",{value:!0});var jt=K(),Xu=G(),cv={message:({params:{len:t}})=>(0,jt.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,jt._)`{limit: ${t}}`},lv={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:cv,code(t){let{gen:e,schema:r,data:n,it:i}=t,s=i.items||0;if(s===!0)return;let a=e.const("len",(0,jt._)`${n}.length`);if(r===!1)t.setParams({len:s}),t.fail((0,jt._)`${a} > ${s}`);else if(typeof r=="object"&&!(0,Xu.alwaysValidSchema)(i,r)){let l=e.var("valid",(0,jt._)`${a} <= ${s}`);e.if((0,jt.not)(l),()=>c(l,s)),t.ok(l)}i.items=!0;function c(l,f){e.forRange("i",f,a,p=>{t.subschema({keyword:"unevaluatedItems",dataProp:p,dataPropType:Xu.Type.Num},l),i.allErrors||e.if((0,jt.not)(l),()=>e.break())})}}};Ys.default=lv});var Zu=T(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});var uv=Gu(),dv=Qu(),fv=[uv.default,dv.default];Gs.default=fv});var ed=T(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});var de=K(),pv={message:({schemaCode:t})=>(0,de.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,de._)`{format: ${t}}`},mv={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:pv,code(t,e){let{gen:r,data:n,$data:i,schema:s,schemaCode:a,it:c}=t,{opts:l,errSchemaPath:f,schemaEnv:p,self:u}=c;if(!l.validateFormats)return;i?m():h();function m(){let y=r.scopeValue("formats",{ref:u.formats,code:l.code.formats}),v=r.const("fDef",(0,de._)`${y}[${a}]`),I=r.let("fType"),P=r.let("format");r.if((0,de._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(I,(0,de._)`${v}.type || "string"`).assign(P,(0,de._)`${v}.validate`),()=>r.assign(I,(0,de._)`"string"`).assign(P,v)),t.fail$data((0,de.or)(D(),z()));function D(){return l.strictSchema===!1?de.nil:(0,de._)`${a} && !${P}`}function z(){let L=p.$async?(0,de._)`(${v}.async ? await ${P}(${n}) : ${P}(${n}))`:(0,de._)`${P}(${n})`,N=(0,de._)`(typeof ${P} == "function" ? ${L} : ${P}.test(${n}))`;return(0,de._)`${P} && ${P} !== true && ${I} === ${e} && !${N}`}}function h(){let y=u.formats[s];if(!y){D();return}if(y===!0)return;let[v,I,P]=z(y);v===e&&t.pass(L());function D(){if(l.strictSchema===!1){u.logger.warn(N());return}throw new Error(N());function N(){return`unknown format "${s}" ignored in schema at path "${f}"`}}function z(N){let X=N instanceof RegExp?(0,de.regexpCode)(N):l.code.formats?(0,de._)`${l.code.formats}${(0,de.getProperty)(s)}`:void 0,fe=r.scopeValue("formats",{key:s,ref:N,code:X});return typeof N=="object"&&!(N instanceof RegExp)?[N.type||"string",N.validate,(0,de._)`${fe}.validate`]:["string",N,fe]}function L(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!p.$async)throw new Error("async format in sync schema");return(0,de._)`await ${P}(${n})`}return typeof I=="function"?(0,de._)`${P}(${n})`:(0,de._)`${P}.test(${n})`}}}};Xs.default=mv});var td=T(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});var hv=ed(),gv=[hv.default];Qs.default=gv});var rd=T(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.contentVocabulary=ar.metadataVocabulary=void 0;ar.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];ar.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var id=T(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});var yv=Wl(),wv=cu(),vv=Ou(),$v=Hu(),bv=Wu(),_v=Zu(),xv=td(),nd=rd(),Ev=[$v.default,yv.default,wv.default,(0,vv.default)(!0),xv.default,nd.metadataVocabulary,nd.contentVocabulary,bv.default,_v.default];Zs.default=Ev});var sd=T(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.DiscrError=void 0;var od;(function(t){t.Tag="tag",t.Mapping="mapping"})(od||(fi.DiscrError=od={}))});var cd=T(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});var cr=K(),ea=sd(),ad=zr(),Sv=Fr(),Pv=G(),kv={message:({params:{discrError:t,tagName:e}})=>t===ea.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,cr._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},Rv={keyword:"discriminator",type:"object",schemaType:"object",error:kv,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:s}=t,{oneOf:a}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let c=n.propertyName;if(typeof c!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let l=e.let("valid",!1),f=e.const("tag",(0,cr._)`${r}${(0,cr.getProperty)(c)}`);e.if((0,cr._)`typeof ${f} == "string"`,()=>p(),()=>t.error(!1,{discrError:ea.DiscrError.Tag,tag:f,tagName:c})),t.ok(l);function p(){let h=m();e.if(!1);for(let y in h)e.elseIf((0,cr._)`${f} === ${y}`),e.assign(l,u(h[y]));e.else(),t.error(!1,{discrError:ea.DiscrError.Mapping,tag:f,tagName:c}),e.endIf()}function u(h){let y=e.name("valid"),v=t.subschema({keyword:"oneOf",schemaProp:h},y);return t.mergeEvaluated(v,cr.Name),y}function m(){var h;let y={},v=P(i),I=!0;for(let L=0;L<a.length;L++){let N=a[L];if(N?.$ref&&!(0,Pv.schemaHasRulesButRef)(N,s.self.RULES)){let fe=N.$ref;if(N=ad.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,fe),N instanceof ad.SchemaEnv&&(N=N.schema),N===void 0)throw new Sv.default(s.opts.uriResolver,s.baseId,fe)}let X=(h=N?.properties)===null||h===void 0?void 0:h[c];if(typeof X!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${c}"`);I=I&&(v||P(N)),D(X,L)}if(!I)throw new Error(`discriminator: "${c}" must be required`);return y;function P({required:L}){return Array.isArray(L)&&L.includes(c)}function D(L,N){if(L.const)z(L.const,N);else if(L.enum)for(let X of L.enum)z(X,N);else throw new Error(`discriminator: "properties/${c}" must have "const" or "enum"`)}function z(L,N){if(typeof L!="string"||L in y)throw new Error(`discriminator: "${c}" values must be unique strings`);y[L]=N}}}};ta.default=Rv});var ld=T((wx,Iv)=>{Iv.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var ud=T((vx,Cv)=>{Cv.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var dd=T(($x,Tv)=>{Tv.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var fd=T((bx,Av)=>{Av.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var pd=T((_x,Nv)=>{Nv.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var md=T((xx,jv)=>{jv.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var hd=T((Ex,Ov)=>{Ov.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var gd=T((Sx,Mv)=>{Mv.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var yd=T(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});var Vv=ld(),qv=ud(),Dv=dd(),Lv=fd(),Fv=pd(),zv=md(),Hv=hd(),Uv=gd(),Bv=["/properties"];function Kv(t){return[Vv,qv,Dv,Lv,Fv,e(this,zv),Hv,e(this,Uv)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,Bv):n}}ra.default=Kv});var wd=T((ce,ia)=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.MissingRefError=ce.ValidationError=ce.CodeGen=ce.Name=ce.nil=ce.stringify=ce.str=ce._=ce.KeywordCxt=ce.Ajv2020=void 0;var Jv=Hl(),Wv=id(),Yv=cd(),Gv=yd(),na="https://json-schema.org/draft/2020-12/schema",lr=class extends Jv.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),Wv.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Yv.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(Gv.default.call(this,e),this.refs["http://json-schema.org/schema"]=na)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(na)?na:void 0)}};ce.Ajv2020=lr;ia.exports=ce=lr;ia.exports.Ajv2020=lr;Object.defineProperty(ce,"__esModule",{value:!0});ce.default=lr;var Xv=Lr();Object.defineProperty(ce,"KeywordCxt",{enumerable:!0,get:function(){return Xv.KeywordCxt}});var ur=K();Object.defineProperty(ce,"_",{enumerable:!0,get:function(){return ur._}});Object.defineProperty(ce,"str",{enumerable:!0,get:function(){return ur.str}});Object.defineProperty(ce,"stringify",{enumerable:!0,get:function(){return ur.stringify}});Object.defineProperty(ce,"nil",{enumerable:!0,get:function(){return ur.nil}});Object.defineProperty(ce,"Name",{enumerable:!0,get:function(){return ur.Name}});Object.defineProperty(ce,"CodeGen",{enumerable:!0,get:function(){return ur.CodeGen}});var Qv=Kn();Object.defineProperty(ce,"ValidationError",{enumerable:!0,get:function(){return Qv.default}});var Zv=Fr();Object.defineProperty(ce,"MissingRefError",{enumerable:!0,get:function(){return Zv.default}})});import{readFile as n$}from"node:fs/promises";async function xd(t){return Oe.load(await n$(t,"utf-8"))}function Ed(t,e,r){for(let n of t)if(!e.has(n))throw new Error(`${r}: unknown element "${n}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function Sd(t,e,r){for(let[n,i]of Object.entries(t))for(let s of e)if(i[s]===void 0||i[s]===null||i[s]==="")throw new Error(`${r}: element "${n}" is missing required "${String(s)}"`)}var Pd=ne(()=>{"use strict";Ht()});import{resolve as i$}from"node:path";function o$(t){Ed(Object.keys(t.elements),et,kd),Sd(t.elements,["tag"],kd)}async function sa(t){if(!t&&oa)return oa;let e=t??i$(Ze(),"renderers/react/elements.yaml"),r=await xd(e);return o$(r),t||(oa=r),r}var kd,oa,Rd=ne(()=>{"use strict";ct();ct();br();Pd();kd="renderers/react/elements.yaml",oa=null});function Id(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function Cd(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t==="between"||t==="spaceBetween"?"space-between":t==="around"||t==="spaceAround"?"space-around":t==="spaceEvenly"?"space-evenly":t}var Td=ne(()=>{"use strict"});function Le(t){return`${t}px`}function dr(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function aa(t){let e={},r=t.width;typeof r=="number"?e.width=Le(r):r==="fill"?e.width="100%":typeof r=="string"&&r!=="wrap"&&(e.width=r),typeof t.minWidth=="number"&&(e.minWidth=Le(t.minWidth));let n=t.maxWidth;typeof n=="number"?e.maxWidth=Le(n):n==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=Le(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=Le(t.minHeight));let s=t.maxHeight;typeof s=="number"?e.maxHeight=Le(s):s==="fill"&&(e.maxHeight="100%"),t.aspectRatio!==void 0&&(e.aspectRatio=String(t.aspectRatio));let a=t.weight;typeof a=="number"&&(e.flexGrow=a),typeof t.padding=="number"&&(e.padding=Le(t.padding)),typeof t.margin=="number"&&(e.margin=Le(t.margin)),typeof t.gap=="number"&&(e.gap=Le(t.gap));let c=t.textAlign;typeof c=="string"&&(e.textAlign=c==="start"?"left":c==="end"?"right":c);let l=t.contentAlign;typeof l=="string"&&l in Ad&&(e.placeItems=Ad[l]),typeof t.overflow=="string"&&(e.overflow=t.overflow);let f=t.selfAlign;typeof f=="string"&&(e.alignSelf=f==="start"?"flex-start":f==="end"?"flex-end":f);let p=t.size;typeof p=="number"?e.fontSize=Le(p):typeof p=="string"&&(e.fontSize=p);let u=typeof a=="string"?a:t.fontWeight;typeof u=="string"&&(e.fontWeight=u);let m=t.background;typeof m=="string"&&(e.background=dr(m)??m);let h=t.foreground;typeof h=="string"&&(e.color=dr(h)??h);let y=t.radius;typeof y=="number"?e.borderRadius=Le(y):typeof y=="string"&&(e.borderRadius=dr(y)??y);let v=t.shadow;v===!0?e.boxShadow="var(--ui-shadow)":v===!1?e.boxShadow="none":typeof v=="string"&&(e.boxShadow=s$[v]??dr(v)??v);let I=t.border;typeof I=="string"&&(e.border=dr(I)??I),typeof t.opacity=="number"&&(e.opacity=t.opacity);let P=t.clip;typeof P=="string"&&(e.overflow=P==="hidden"?"hidden":P);let D=t.align;if(typeof D=="string"){let X=Id(D);X&&(e.alignItems=X)}let z=t.justify;if(typeof z=="string"){let X=Cd(z);X&&(e.justifyContent=X)}typeof t.display=="string"&&(e.display=t.display),typeof t.gridTemplateColumns=="string"&&(e.gridTemplateColumns=t.gridTemplateColumns),typeof t.flexDirection=="string"&&(e.flexDirection=t.flexDirection),typeof t.alignItems=="string"&&(e.alignItems=t.alignItems);let L=t.borderColor;typeof L=="string"&&(e.borderColor=dr(L)??L);let N=t.flex;return typeof N=="number"&&(e.flex=N),e}function on(t){let e=Object.entries(t);return e.length===0?"":`style={{ ${e.map(([n,i])=>typeof i=="number"?`${n}: ${i}`:`${n}: ${JSON.stringify(i)}`).join(", ")} }}`}var Ad,s$,ca=ne(()=>{"use strict";Td();Ad={topStart:"start start",top:"center start",topEnd:"end start",start:"start center",center:"center center",end:"end center",bottomStart:"start end",bottom:"center end",bottomEnd:"end end"},s$={none:"none",sm:"var(--ui-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))",md:"var(--ui-shadow)",lg:"var(--ui-shadow-lg, 0 10px 15px rgba(0,0,0,0.1))"}});function mi(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function a$(t,e){if(e!=null&&!(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&!(typeof e=="object"&&"kind"in e&&e.kind==="literal"))throw new Error(`Style property "${t}" must be a compile-time literal; ViewModel bindings are not allowed on layout/visual props`)}function c$(t){let e={};for(let[r,n]of Object.entries(t)){if(!La.has(r))continue;a$(r,n);let i=mi(t,r);i!==void 0&&(e[r]=i)}return e}function l$(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function u$(t){return t==="horizontal"?{overflowX:"auto",overflowY:"hidden"}:t==="both"?{overflowX:"auto",overflowY:"auto"}:t==="none"?{overflowX:"hidden",overflowY:"hidden"}:{overflowX:"hidden",overflowY:"auto"}}function Nd(t,e){let r=c$(e),n=aa(r);if(n={...n,...l$(t)},t.tableCell){if("alignItems"in n){let i=String(n.alignItems);n.textAlign=i==="flex-end"?"right":i==="center"?"center":"left",delete n.alignItems}"width"in n&&!("flex"in n)&&(n.flexShrink=0,n.flexGrow=0)}if(t.scrollContainer){let i=mi(e,"scroll"),s=mi(e,"axis"),a=typeof i=="string"?i:typeof s=="string"?s==="horizontal"?"horizontal":"vertical":void 0;if(a)return n={...n,...u$(a)},on(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=mi(e,t.flexGrowProp);if(typeof i=="number")return n.flexGrow=i,on(n);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return on(n)}var jd=ne(()=>{"use strict";ct();ca();ca()});function U(t){return" ".repeat(t)}function Mt(t,e="vm"){let r=t.scope??e;return t.path?`${r}.${t.path}`:r}function Dd(t){return t.parts.map(e=>typeof e=="string"?e:`\${${Mt(e)}}`).join("")}function d$(t){return`\`${Dd(t)}\``}function hi(t,e=!1){let r=e?" as ActionDescriptor":"";if(!t.params||Object.keys(t.params).length===0)return`{ name: ${JSON.stringify(t.name)} }${r}`;let n=Object.entries(t.params).map(([i,s])=>`${i}: ${pr(s,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${n} } }${r}`}function ua(t,e,r=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
|
|
64
|
-
|
|
3
|
+
`+i.mark.snippet),a+" "+s):a}function n(i,o){Error.call(this),this.name="YAMLException",this.reason=i,this.mark=o,this.message=r(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n.prototype.toString=function(o){return this.name+": "+r(this,o)},e.exports=n})),rv=pe(((t,e)=>{var r=yn();function n(s,a,l,u,p){let f="",d="",m=Math.floor(p/2)-1;return u-a>m&&(f=" ... ",a=u-m+f.length),l-u>m&&(d=" ...",l=u+m-d.length),{str:f+s.slice(a,l).replace(/\t/g,"\u2192")+d,pos:u-a+f.length}}function i(s,a){return r.repeat(" ",a-s.length)+s}function o(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);let l=/\r?\n|\r|\0/g,u=[0],p=[],f,d=-1;for(;f=l.exec(s.buffer);)p.push(f.index),u.push(f.index+f[0].length),s.position<=f.index&&d<0&&(d=u.length-2);d<0&&(d=u.length-1);let m="",g=Math.min(s.line+a.linesAfter,p.length).toString().length,y=a.maxLength-(a.indent+g+3);for(let b=1;b<=a.linesBefore&&!(d-b<0);b++){let L=n(s.buffer,u[d-b],p[d-b],s.position-(u[d]-u[d-b]),y);m=r.repeat(" ",a.indent)+i((s.line-b+1).toString(),g)+" | "+L.str+`
|
|
4
|
+
`+m}let _=n(s.buffer,u[d],p[d],s.position,y);m+=r.repeat(" ",a.indent)+i((s.line+1).toString(),g)+" | "+_.str+`
|
|
5
|
+
`,m+=r.repeat("-",a.indent+g+3+_.pos)+`^
|
|
6
|
+
`;for(let b=1;b<=a.linesAfter&&!(d+b>=p.length);b++){let L=n(s.buffer,u[d+b],p[d+b],s.position-(u[d]-u[d+b]),y);m+=r.repeat(" ",a.indent)+i((s.line+b+1).toString(),g)+" | "+L.str+`
|
|
7
|
+
`}return m.replace(/\n$/,"")}e.exports=o})),Me=pe(((t,e)=>{var r=vn(),n=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];function o(a){let l={};return a!==null&&Object.keys(a).forEach(function(u){a[u].forEach(function(p){l[String(p)]=u})}),l}function s(a,l){if(l=l||{},Object.keys(l).forEach(function(u){if(n.indexOf(u)===-1)throw new r('Unknown option "'+u+'" is met in definition of "'+a+'" YAML type.')}),this.options=l,this.tag=a,this.kind=l.kind||null,this.resolve=l.resolve||function(){return!0},this.construct=l.construct||function(u){return u},this.instanceOf=l.instanceOf||null,this.predicate=l.predicate||null,this.represent=l.represent||null,this.representName=l.representName||null,this.defaultStyle=l.defaultStyle||null,this.multi=l.multi||!1,this.styleAliases=o(l.styleAliases||null),i.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}e.exports=s})),Cu=pe(((t,e)=>{var r=vn(),n=Me();function i(a,l){let u=[];return a[l].forEach(function(p){let f=u.length;u.forEach(function(d,m){d.tag===p.tag&&d.kind===p.kind&&d.multi===p.multi&&(f=m)}),u[f]=p}),u}function o(){let a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function l(u){u.multi?(a.multi[u.kind].push(u),a.multi.fallback.push(u)):a[u.kind][u.tag]=a.fallback[u.tag]=u}for(let u=0,p=arguments.length;u<p;u+=1)arguments[u].forEach(l);return a}function s(a){return this.extend(a)}s.prototype.extend=function(l){let u=[],p=[];if(l instanceof n)p.push(l);else if(Array.isArray(l))p=p.concat(l);else if(l&&(Array.isArray(l.implicit)||Array.isArray(l.explicit)))l.implicit&&(u=u.concat(l.implicit)),l.explicit&&(p=p.concat(l.explicit));else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");u.forEach(function(d){if(!(d instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(d.loadKind&&d.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(d.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),p.forEach(function(d){if(!(d instanceof n))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let f=Object.create(s.prototype);return f.implicit=(this.implicit||[]).concat(u),f.explicit=(this.explicit||[]).concat(p),f.compiledImplicit=i(f,"implicit"),f.compiledExplicit=i(f,"explicit"),f.compiledTypeMap=o(f.compiledImplicit,f.compiledExplicit),f},e.exports=s})),Iu=pe(((t,e)=>{e.exports=new(Me())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})})),Ru=pe(((t,e)=>{e.exports=new(Me())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})})),Nu=pe(((t,e)=>{e.exports=new(Me())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})})),Tu=pe(((t,e)=>{e.exports=new(Cu())({explicit:[Iu(),Ru(),Nu()]})})),Au=pe(((t,e)=>{var r=Me();function n(s){if(s===null)return!0;let a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}function i(){return null}function o(s){return s===null}e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})})),Ou=pe(((t,e)=>{var r=Me();function n(s){if(s===null)return!1;let a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}function i(s){return s==="true"||s==="True"||s==="TRUE"}function o(s){return Object.prototype.toString.call(s)==="[object Boolean]"}e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:n,construct:i,predicate:o,represent:{lowercase:function(s){return s?"true":"false"},uppercase:function(s){return s?"TRUE":"FALSE"},camelcase:function(s){return s?"True":"False"}},defaultStyle:"lowercase"})})),Mu=pe(((t,e)=>{var r=yn(),n=Me();function i(f){return f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102}function o(f){return f>=48&&f<=55}function s(f){return f>=48&&f<=57}function a(f){if(f===null)return!1;let d=f.length,m=0,g=!1;if(!d)return!1;let y=f[m];if((y==="-"||y==="+")&&(y=f[++m]),y==="0"){if(m+1===d)return!0;if(y=f[++m],y==="b"){for(m++;m<d;m++){if(y=f[m],y!=="0"&&y!=="1")return!1;g=!0}return g&&Number.isFinite(l(f))}if(y==="x"){for(m++;m<d;m++){if(!i(f.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(l(f))}if(y==="o"){for(m++;m<d;m++){if(!o(f.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(l(f))}}for(;m<d;m++){if(!s(f.charCodeAt(m)))return!1;g=!0}return g?Number.isFinite(l(f)):!1}function l(f){let d=f,m=1,g=d[0];if((g==="-"||g==="+")&&(g==="-"&&(m=-1),d=d.slice(1),g=d[0]),d==="0")return 0;if(g==="0"){if(d[1]==="b")return m*parseInt(d.slice(2),2);if(d[1]==="x")return m*parseInt(d.slice(2),16);if(d[1]==="o")return m*parseInt(d.slice(2),8)}return m*parseInt(d,10)}function u(f){return l(f)}function p(f){return Object.prototype.toString.call(f)==="[object Number]"&&f%1===0&&!r.isNegativeZero(f)}e.exports=new n("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:u,predicate:p,represent:{binary:function(f){return f>=0?"0b"+f.toString(2):"-0b"+f.toString(2).slice(1)},octal:function(f){return f>=0?"0o"+f.toString(8):"-0o"+f.toString(8).slice(1)},decimal:function(f){return f.toString(10)},hexadecimal:function(f){return f>=0?"0x"+f.toString(16).toUpperCase():"-0x"+f.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})})),Lu=pe(((t,e)=>{var r=yn(),n=Me(),i=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),o=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(f){return f===null||!i.test(f)?!1:Number.isFinite(parseFloat(f,10))?!0:o.test(f)}function a(f){let d=f.toLowerCase(),m=d[0]==="-"?-1:1;return"+-".indexOf(d[0])>=0&&(d=d.slice(1)),d===".inf"?m===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:d===".nan"?NaN:m*parseFloat(d,10)}var l=/^[-+]?[0-9]+e/;function u(f,d){if(isNaN(f))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===f)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===f)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(f))return"-0.0";let m=f.toString(10);return l.test(m)?m.replace("e",".e"):m}function p(f){return Object.prototype.toString.call(f)==="[object Number]"&&(f%1!==0||r.isNegativeZero(f))}e.exports=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:p,represent:u,defaultStyle:"lowercase"})})),ju=pe(((t,e)=>{e.exports=Tu().extend({implicit:[Au(),Ou(),Mu(),Lu()]})})),Vu=pe(((t,e)=>{e.exports=ju()})),Du=pe(((t,e)=>{var r=Me(),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function o(l){return l===null?!1:n.exec(l)!==null||i.exec(l)!==null}function s(l){let u=0,p=null,f=n.exec(l);if(f===null&&(f=i.exec(l)),f===null)throw new Error("Date resolve error");let d=+f[1],m=+f[2]-1,g=+f[3];if(!f[4])return new Date(Date.UTC(d,m,g));let y=+f[4],_=+f[5],b=+f[6];if(f[7]){for(u=f[7].slice(0,3);u.length<3;)u+="0";u=+u}if(f[9]){let q=+f[10],A=+(f[11]||0);p=(q*60+A)*6e4,f[9]==="-"&&(p=-p)}let L=new Date(Date.UTC(d,m,g,y,_,b,u));return p&&L.setTime(L.getTime()-p),L}function a(l){return l.toISOString()}e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o,construct:s,instanceOf:Date,represent:a})})),qu=pe(((t,e)=>{var r=Me();function n(i){return i==="<<"||i===null}e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n})})),Fu=pe(((t,e)=>{var r=Me(),n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
8
|
+
\r`;function i(l){if(l===null)return!1;let u=0,p=l.length,f=n;for(let d=0;d<p;d++){let m=f.indexOf(l.charAt(d));if(!(m>64)){if(m<0)return!1;u+=6}}return u%8===0}function o(l){let u=l.replace(/[\r\n=]/g,""),p=u.length,f=n,d=0,m=[];for(let y=0;y<p;y++)y%4===0&&y&&(m.push(d>>16&255),m.push(d>>8&255),m.push(d&255)),d=d<<6|f.indexOf(u.charAt(y));let g=p%4*6;return g===0?(m.push(d>>16&255),m.push(d>>8&255),m.push(d&255)):g===18?(m.push(d>>10&255),m.push(d>>2&255)):g===12&&m.push(d>>4&255),new Uint8Array(m)}function s(l){let u="",p=0,f=l.length,d=n;for(let g=0;g<f;g++)g%3===0&&g&&(u+=d[p>>18&63],u+=d[p>>12&63],u+=d[p>>6&63],u+=d[p&63]),p=(p<<8)+l[g];let m=f%3;return m===0?(u+=d[p>>18&63],u+=d[p>>12&63],u+=d[p>>6&63],u+=d[p&63]):m===2?(u+=d[p>>10&63],u+=d[p>>4&63],u+=d[p<<2&63],u+=d[64]):m===1&&(u+=d[p>>2&63],u+=d[p<<4&63],u+=d[64],u+=d[64]),u}function a(l){return Object.prototype.toString.call(l)==="[object Uint8Array]"}e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:o,predicate:a,represent:s})})),Bu=pe(((t,e)=>{var r=Me(),n=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function o(a){if(a===null)return!0;let l=[],u=a;for(let p=0,f=u.length;p<f;p+=1){let d=u[p],m=!1;if(i.call(d)!=="[object Object]")return!1;let g;for(g in d)if(n.call(d,g))if(!m)m=!0;else return!1;if(!m)return!1;if(l.indexOf(g)===-1)l.push(g);else return!1}return!0}function s(a){return a!==null?a:[]}e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o,construct:s})})),Hu=pe(((t,e)=>{var r=Me(),n=Object.prototype.toString;function i(s){if(s===null)return!0;let a=s,l=new Array(a.length);for(let u=0,p=a.length;u<p;u+=1){let f=a[u];if(n.call(f)!=="[object Object]")return!1;let d=Object.keys(f);if(d.length!==1)return!1;l[u]=[d[0],f[d[0]]]}return!0}function o(s){if(s===null)return[];let a=s,l=new Array(a.length);for(let u=0,p=a.length;u<p;u+=1){let f=a[u],d=Object.keys(f);l[u]=[d[0],f[d[0]]]}return l}e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:o})})),Uu=pe(((t,e)=>{var r=Me(),n=Object.prototype.hasOwnProperty;function i(s){if(s===null)return!0;let a=s;for(let l in a)if(n.call(a,l)&&a[l]!==null)return!1;return!0}function o(s){return s!==null?s:{}}e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:o})})),Os=pe(((t,e)=>{e.exports=Vu().extend({implicit:[Du(),qu()],explicit:[Fu(),Bu(),Hu(),Uu()]})})),nv=pe(((t,e)=>{var r=yn(),n=vn(),i=rv(),o=Os(),s=Object.prototype.hasOwnProperty,a=1,l=2,u=3,p=4,f=1,d=2,m=3,g=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/[\x85\u2028\u2029]/,_=/[,\[\]{}]/,b=/^(?:!|!!|![0-9A-Za-z-]+!)$/,L=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function q(c){return Object.prototype.toString.call(c)}function A(c){return c===10||c===13}function T(c){return c===9||c===32}function M(c){return c===9||c===32||c===10||c===13}function X(c){return c===44||c===91||c===93||c===123||c===125}function fe(c){if(c>=48&&c<=57)return c-48;let v=c|32;return v>=97&&v<=102?v-97+10:-1}function Ie(c){return c===120?2:c===117?4:c===85?8:0}function $e(c){return c>=48&&c<=57?c-48:-1}function qe(c){switch(c){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
9
|
+
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function Re(c){return c<=65535?String.fromCharCode(c):String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}function it(c,v,x){v==="__proto__"?Object.defineProperty(c,v,{configurable:!0,enumerable:!0,writable:!0,value:x}):c[v]=x}var ot=new Array(256),St=new Array(256);for(let c=0;c<256;c++)ot[c]=qe(c)?1:0,St[c]=qe(c);function ae(c,v){this.input=c,this.filename=v.filename||null,this.schema=v.schema||o,this.onWarning=v.onWarning||null,this.legacy=v.legacy||!1,this.json=v.json||!1,this.listener=v.listener||null,this.maxDepth=typeof v.maxDepth=="number"?v.maxDepth:100,this.maxMergeSeqLength=typeof v.maxMergeSeqLength=="number"?v.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=c.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function Ei(c,v){let x={name:c.filename,buffer:c.input.slice(0,-1),position:c.position,line:c.line,column:c.position-c.lineStart};return x.snippet=i(x),new n(v,x)}function B(c,v){throw Ei(c,v)}function $r(c,v){c.onWarning&&c.onWarning.call(null,Ei(c,v))}function $t(c,v,x){let P=c.anchorMapTransactions;if(P.length!==0){let S=P[P.length-1];s.call(S,v)||(S[v]={existed:s.call(c.anchorMap,v),value:c.anchorMap[v]})}c.anchorMap[v]=x}function Ps(c){c.anchorMapTransactions.push(Object.create(null))}function Qt(c){let v=c.anchorMapTransactions.pop(),x=c.anchorMapTransactions;if(x.length===0)return;let P=x[x.length-1],S=Object.keys(v);for(let N=0,h=S.length;N<h;N+=1){let w=S[N];s.call(P,w)||(P[w]=v[w])}}function Cs(c){let v=c.anchorMapTransactions.pop(),x=Object.keys(v);for(let P=x.length-1;P>=0;P-=1){let S=v[x[P]];S.existed?c.anchorMap[x[P]]=S.value:delete c.anchorMap[x[P]]}}function dn(c){return{position:c.position,line:c.line,lineStart:c.lineStart,lineIndent:c.lineIndent,firstTabInLine:c.firstTabInLine,tag:c.tag,anchor:c.anchor,kind:c.kind,result:c.result}}function xr(c,v){c.position=v.position,c.line=v.line,c.lineStart=v.lineStart,c.lineIndent=v.lineIndent,c.firstTabInLine=v.firstTabInLine,c.tag=v.tag,c.anchor=v.anchor,c.kind=v.kind,c.result=v.result}var Pi={YAML:function(v,x,P){v.version!==null&&B(v,"duplication of %YAML directive"),P.length!==1&&B(v,"YAML directive accepts exactly one argument");let S=/^([0-9]+)\.([0-9]+)$/.exec(P[0]);S===null&&B(v,"ill-formed argument of the YAML directive");let N=parseInt(S[1],10),h=parseInt(S[2],10);N!==1&&B(v,"unacceptable YAML version of the document"),v.version=P[0],v.checkLineBreaks=h<2,h!==1&&h!==2&&$r(v,"unsupported YAML version of the document")},TAG:function(v,x,P){let S;P.length!==2&&B(v,"TAG directive accepts exactly two arguments");let N=P[0];S=P[1],b.test(N)||B(v,"ill-formed tag handle (first argument) of the TAG directive"),s.call(v.tagMap,N)&&B(v,'there is a previously declared suffix for "'+N+'" tag handle'),L.test(S)||B(v,"ill-formed tag prefix (second argument) of the TAG directive");try{S=decodeURIComponent(S)}catch{B(v,"tag prefix is malformed: "+S)}v.tagMap[N]=S}};function ze(c,v,x,P){if(v<x){let S=c.input.slice(v,x);if(P)for(let N=0,h=S.length;N<h;N+=1){let w=S.charCodeAt(N);w===9||w>=32&&w<=1114111||B(c,"expected valid JSON character")}else g.test(S)&&B(c,"the stream contains non-printable characters");c.result+=S}}function Dt(c,v,x,P){r.isObject(x)||B(c,"cannot merge mappings; the provided source object is unacceptable");let S=Object.keys(x);for(let N=0,h=S.length;N<h;N+=1){let w=S[N];s.call(v,w)||(it(v,w,x[w]),P[w]=!0)}}function xt(c,v,x,P,S,N,h,w,R){if(Array.isArray(S)){S=Array.prototype.slice.call(S);for(let k=0,E=S.length;k<E;k+=1)Array.isArray(S[k])&&B(c,"nested arrays are not supported inside keys"),typeof S=="object"&&q(S[k])==="[object Object]"&&(S[k]="[object Object]")}if(typeof S=="object"&&q(S)==="[object Object]"&&(S="[object Object]"),S=String(S),v===null&&(v={}),P==="tag:yaml.org,2002:merge")if(Array.isArray(N)){N.length>c.maxMergeSeqLength&&B(c,"merge sequence length exceeded maxMergeSeqLength ("+c.maxMergeSeqLength+")");let k=new Set;for(let E=0,I=N.length;E<I;E+=1){let C=N[E];k.has(C)||(k.add(C),Dt(c,v,C,x))}}else Dt(c,v,N,x);else!c.json&&!s.call(x,S)&&s.call(v,S)&&(c.line=h||c.line,c.lineStart=w||c.lineStart,c.position=R||c.position,B(c,"duplicated mapping key")),it(v,S,N),delete x[S];return v}function kr(c){let v=c.input.charCodeAt(c.position);v===10?c.position++:v===13?(c.position++,c.input.charCodeAt(c.position)===10&&c.position++):B(c,"a line break is expected"),c.line+=1,c.lineStart=c.position,c.firstTabInLine=-1}function ye(c,v,x){let P=0,S=c.input.charCodeAt(c.position);for(;S!==0;){for(;T(S);)S===9&&c.firstTabInLine===-1&&(c.firstTabInLine=c.position),S=c.input.charCodeAt(++c.position);if(v&&S===35)do S=c.input.charCodeAt(++c.position);while(S!==10&&S!==13&&S!==0);if(A(S))for(kr(c),S=c.input.charCodeAt(c.position),P++,c.lineIndent=0;S===32;)c.lineIndent++,S=c.input.charCodeAt(++c.position);else break}return x!==-1&&P!==0&&c.lineIndent<x&&$r(c,"deficient indentation"),P}function Er(c){let v=c.position,x=c.input.charCodeAt(v);return!!((x===45||x===46)&&x===c.input.charCodeAt(v+1)&&x===c.input.charCodeAt(v+2)&&(v+=3,x=c.input.charCodeAt(v),x===0||M(x)))}function kt(c,v){v===1?c.result+=" ":v>1&&(c.result+=r.repeat(`
|
|
10
|
+
`,v-1))}function Ci(c,v,x){let P,S,N,h,w,R,k=c.kind,E=c.result,I=c.input.charCodeAt(c.position);if(M(I)||X(I)||I===35||I===38||I===42||I===33||I===124||I===62||I===39||I===34||I===37||I===64||I===96)return!1;if(I===63||I===45){let C=c.input.charCodeAt(c.position+1);if(M(C)||x&&X(C))return!1}for(c.kind="scalar",c.result="",P=S=c.position,N=!1;I!==0;){if(I===58){let C=c.input.charCodeAt(c.position+1);if(M(C)||x&&X(C))break}else if(I===35){if(M(c.input.charCodeAt(c.position-1)))break}else{if(c.position===c.lineStart&&Er(c)||x&&X(I))break;if(A(I))if(h=c.line,w=c.lineStart,R=c.lineIndent,ye(c,!1,-1),c.lineIndent>=v){N=!0,I=c.input.charCodeAt(c.position);continue}else{c.position=S,c.line=h,c.lineStart=w,c.lineIndent=R;break}}N&&(ze(c,P,S,!1),kt(c,c.line-h),P=S=c.position,N=!1),T(I)||(S=c.position+1),I=c.input.charCodeAt(++c.position)}return ze(c,P,S,!1),c.result?!0:(c.kind=k,c.result=E,!1)}function Ii(c,v){let x,P,S=c.input.charCodeAt(c.position);if(S!==39)return!1;for(c.kind="scalar",c.result="",c.position++,x=P=c.position;(S=c.input.charCodeAt(c.position))!==0;)if(S===39)if(ze(c,x,c.position,!0),S=c.input.charCodeAt(++c.position),S===39)x=c.position,c.position++,P=c.position;else return!0;else A(S)?(ze(c,x,P,!0),kt(c,ye(c,!1,v)),x=P=c.position):c.position===c.lineStart&&Er(c)?B(c,"unexpected end of the document within a single quoted scalar"):(c.position++,T(S)||(P=c.position));B(c,"unexpected end of the stream within a single quoted scalar")}function hn(c,v){let x,P,S,N=c.input.charCodeAt(c.position);if(N!==34)return!1;for(c.kind="scalar",c.result="",c.position++,x=P=c.position;(N=c.input.charCodeAt(c.position))!==0;){if(N===34)return ze(c,x,c.position,!0),c.position++,!0;if(N===92){if(ze(c,x,c.position,!0),N=c.input.charCodeAt(++c.position),A(N))ye(c,!1,v);else if(N<256&&ot[N])c.result+=St[N],c.position++;else if((S=Ie(N))>0){let h=S,w=0;for(;h>0;h--)N=c.input.charCodeAt(++c.position),(S=fe(N))>=0?w=(w<<4)+S:B(c,"expected hexadecimal character");c.result+=Re(w),c.position++}else B(c,"unknown escape sequence");x=P=c.position}else A(N)?(ze(c,x,P,!0),kt(c,ye(c,!1,v)),x=P=c.position):c.position===c.lineStart&&Er(c)?B(c,"unexpected end of the document within a double quoted scalar"):(c.position++,T(N)||(P=c.position))}B(c,"unexpected end of the stream within a double quoted scalar")}function Ri(c,v){let x=!0,P,S,N,h=c.tag,w,R=c.anchor,k,E,I,C,V=Object.create(null),j,U,z,re=c.input.charCodeAt(c.position);if(re===91)k=93,C=!1,w=[];else if(re===123)k=125,C=!0,w={};else return!1;for(c.anchor!==null&&$t(c,c.anchor,w),re=c.input.charCodeAt(++c.position);re!==0;){if(ye(c,!0,v),re=c.input.charCodeAt(c.position),re===k)return c.position++,c.tag=h,c.anchor=R,c.kind=C?"mapping":"sequence",c.result=w,!0;x?re===44&&B(c,"expected the node content, but found ','"):B(c,"missed comma between flow collection entries"),U=j=z=null,E=I=!1,re===63&&M(c.input.charCodeAt(c.position+1))&&(E=I=!0,c.position++,ye(c,!0,v)),P=c.line,S=c.lineStart,N=c.position,Pt(c,v,a,!1,!0),U=c.tag,j=c.result,ye(c,!0,v),re=c.input.charCodeAt(c.position),(I||c.line===P)&&re===58&&(E=!0,re=c.input.charCodeAt(++c.position),ye(c,!0,v),Pt(c,v,a,!1,!0),z=c.result),C?xt(c,w,V,U,j,z,P,S,N):E?w.push(xt(c,null,V,U,j,z,P,S,N)):w.push(j),ye(c,!0,v),re=c.input.charCodeAt(c.position),re===44?(x=!0,re=c.input.charCodeAt(++c.position)):x=!1}B(c,"unexpected end of the stream within a flow collection")}function Ni(c,v){let x,P=f,S=!1,N=!1,h=v,w=0,R=!1,k,E=c.input.charCodeAt(c.position);if(E===124)x=!1;else if(E===62)x=!0;else return!1;for(c.kind="scalar",c.result="";E!==0;)if(E=c.input.charCodeAt(++c.position),E===43||E===45)f===P?P=E===43?m:d:B(c,"repeat of a chomping mode identifier");else if((k=$e(E))>=0)k===0?B(c,"bad explicit indentation width of a block scalar; it cannot be less than one"):N?B(c,"repeat of an indentation width identifier"):(h=v+k-1,N=!0);else break;if(T(E)){do E=c.input.charCodeAt(++c.position);while(T(E));if(E===35)do E=c.input.charCodeAt(++c.position);while(!A(E)&&E!==0)}for(;E!==0;){for(kr(c),c.lineIndent=0,E=c.input.charCodeAt(c.position);(!N||c.lineIndent<h)&&E===32;)c.lineIndent++,E=c.input.charCodeAt(++c.position);if(!N&&c.lineIndent>h&&(h=c.lineIndent),A(E)){w++;continue}if(!N&&h===0&&B(c,"missing indentation for block scalar"),c.lineIndent<h){P===m?c.result+=r.repeat(`
|
|
11
|
+
`,S?1+w:w):P===f&&S&&(c.result+=`
|
|
12
|
+
`);break}x?T(E)?(R=!0,c.result+=r.repeat(`
|
|
13
|
+
`,S?1+w:w)):R?(R=!1,c.result+=r.repeat(`
|
|
14
|
+
`,w+1)):w===0?S&&(c.result+=" "):c.result+=r.repeat(`
|
|
15
|
+
`,w):c.result+=r.repeat(`
|
|
16
|
+
`,S?1+w:w),S=!0,N=!0,w=0;let I=c.position;for(;!A(E)&&E!==0;)E=c.input.charCodeAt(++c.position);ze(c,I,c.position,!1)}return!0}function Et(c,v){let x=c.tag,P=c.anchor,S=[],N=!1;if(c.firstTabInLine!==-1)return!1;c.anchor!==null&&$t(c,c.anchor,S);let h=c.input.charCodeAt(c.position);for(;h!==0&&(c.firstTabInLine!==-1&&(c.position=c.firstTabInLine,B(c,"tab characters must not be used in indentation")),!(h!==45||!M(c.input.charCodeAt(c.position+1))));){if(N=!0,c.position++,ye(c,!0,-1)&&c.lineIndent<=v){S.push(null),h=c.input.charCodeAt(c.position);continue}let w=c.line;if(Pt(c,v,u,!1,!0),S.push(c.result),ye(c,!0,-1),h=c.input.charCodeAt(c.position),(c.line===w||c.lineIndent>v)&&h!==0)B(c,"bad indentation of a sequence entry");else if(c.lineIndent<v)break}return N?(c.tag=x,c.anchor=P,c.kind="sequence",c.result=S,!0):!1}function Ti(c,v,x){let P,S,N,h,w=c.tag,R=c.anchor,k={},E=Object.create(null),I=null,C=null,V=null,j=!1,U=!1;if(c.firstTabInLine!==-1)return!1;c.anchor!==null&&$t(c,c.anchor,k);let z=c.input.charCodeAt(c.position);for(;z!==0;){!j&&c.firstTabInLine!==-1&&(c.position=c.firstTabInLine,B(c,"tab characters must not be used in indentation"));let re=c.input.charCodeAt(c.position+1),ge=c.line;if((z===63||z===58)&&M(re))z===63?(j&&(xt(c,k,E,I,C,null,S,N,h),I=C=V=null),U=!0,j=!0,P=!0):j?(j=!1,P=!0):B(c,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),c.position+=1,z=re;else{if(S=c.line,N=c.lineStart,h=c.position,!Pt(c,x,l,!1,!0))break;if(c.line===ge){for(z=c.input.charCodeAt(c.position);T(z);)z=c.input.charCodeAt(++c.position);if(z===58)z=c.input.charCodeAt(++c.position),M(z)||B(c,"a whitespace character is expected after the key-value separator within a block mapping"),j&&(xt(c,k,E,I,C,null,S,N,h),I=C=V=null),U=!0,j=!1,P=!1,I=c.tag,C=c.result;else if(U)B(c,"can not read an implicit mapping pair; a colon is missed");else return c.tag=w,c.anchor=R,!0}else if(U)B(c,"can not read a block mapping entry; a multiline key may not be an implicit key");else return c.tag=w,c.anchor=R,!0}if((c.line===ge||c.lineIndent>v)&&(j&&(S=c.line,N=c.lineStart,h=c.position),Pt(c,v,p,!0,P)&&(j?C=c.result:V=c.result),j||(xt(c,k,E,I,C,V,S,N,h),I=C=V=null),ye(c,!0,-1),z=c.input.charCodeAt(c.position)),(c.line===ge||c.lineIndent>v)&&z!==0)B(c,"bad indentation of a mapping entry");else if(c.lineIndent<v)break}return j&&xt(c,k,E,I,C,null,S,N,h),U&&(c.tag=w,c.anchor=R,c.kind="mapping",c.result=k),U}function Is(c){let v=!1,x=!1,P,S,N=c.input.charCodeAt(c.position);if(N!==33)return!1;c.tag!==null&&B(c,"duplication of a tag property"),N=c.input.charCodeAt(++c.position),N===60?(v=!0,N=c.input.charCodeAt(++c.position)):N===33?(x=!0,P="!!",N=c.input.charCodeAt(++c.position)):P="!";let h=c.position;if(v){do N=c.input.charCodeAt(++c.position);while(N!==0&&N!==62);c.position<c.length?(S=c.input.slice(h,c.position),N=c.input.charCodeAt(++c.position)):B(c,"unexpected end of the stream within a verbatim tag")}else{for(;N!==0&&!M(N);)N===33&&(x?B(c,"tag suffix cannot contain exclamation marks"):(P=c.input.slice(h-1,c.position+1),b.test(P)||B(c,"named tag handle cannot contain such characters"),x=!0,h=c.position+1)),N=c.input.charCodeAt(++c.position);S=c.input.slice(h,c.position),_.test(S)&&B(c,"tag suffix cannot contain flow indicator characters")}S&&!L.test(S)&&B(c,"tag name cannot contain such characters: "+S);try{S=decodeURIComponent(S)}catch{B(c,"tag name is malformed: "+S)}return v?c.tag=S:s.call(c.tagMap,P)?c.tag=c.tagMap[P]+S:P==="!"?c.tag="!"+S:P==="!!"?c.tag="tag:yaml.org,2002:"+S:B(c,'undeclared tag handle "'+P+'"'),!0}function Ai(c){let v=c.input.charCodeAt(c.position);if(v!==38)return!1;c.anchor!==null&&B(c,"duplication of an anchor property"),v=c.input.charCodeAt(++c.position);let x=c.position;for(;v!==0&&!M(v)&&!X(v);)v=c.input.charCodeAt(++c.position);return c.position===x&&B(c,"name of an anchor node must contain at least one character"),c.anchor=c.input.slice(x,c.position),!0}function Oi(c){let v=c.input.charCodeAt(c.position);if(v!==42)return!1;v=c.input.charCodeAt(++c.position);let x=c.position;for(;v!==0&&!M(v)&&!X(v);)v=c.input.charCodeAt(++c.position);c.position===x&&B(c,"name of an alias node must contain at least one character");let P=c.input.slice(x,c.position);return s.call(c.anchorMap,P)||B(c,'unidentified alias "'+P+'"'),c.result=c.anchorMap[P],ye(c,!0,-1),!0}function Rs(c,v,x,P){let S=dn(c);return Ps(c),xr(c,v),c.tag=null,c.anchor=null,c.kind=null,c.result=null,Ti(c,x,P)&&c.kind==="mapping"?(Qt(c),!0):(Cs(c),xr(c,S),!1)}function Pt(c,v,x,P,S){let N,h,w=1,R=!1,k=!1,E=null,I,C,V;c.depth>=c.maxDepth&&B(c,"nesting exceeded maxDepth ("+c.maxDepth+")"),c.depth+=1,c.listener!==null&&c.listener("open",c),c.tag=null,c.anchor=null,c.kind=null,c.result=null;let j=N=h=p===x||u===x;if(P&&ye(c,!0,-1)&&(R=!0,c.lineIndent>v?w=1:c.lineIndent===v?w=0:c.lineIndent<v&&(w=-1)),w===1)for(;;){let U=c.input.charCodeAt(c.position),z=dn(c);if(R&&(U===33&&c.tag!==null||U===38&&c.anchor!==null)||!Is(c)&&!Ai(c))break;E===null&&(E=z),ye(c,!0,-1)?(R=!0,h=j,c.lineIndent>v?w=1:c.lineIndent===v?w=0:c.lineIndent<v&&(w=-1)):h=!1}if(h&&(h=R||S),w===1||p===x)if(a===x||l===x?C=v:C=v+1,V=c.position-c.lineStart,w===1)if(h&&(Et(c,V)||Ti(c,V,C))||Ri(c,C))k=!0;else{let U=c.input.charCodeAt(c.position);E!==null&&j&&!h&&U!==124&&U!==62&&Rs(c,E,E.position-E.lineStart,C)||N&&Ni(c,C)||Ii(c,C)||hn(c,C)?k=!0:Oi(c)?(k=!0,(c.tag!==null||c.anchor!==null)&&B(c,"alias node should not have any properties")):Ci(c,C,a===x)&&(k=!0,c.tag===null&&(c.tag="?")),c.anchor!==null&&$t(c,c.anchor,c.result)}else w===0&&(k=h&&Et(c,V));if(c.tag===null)c.anchor!==null&&$t(c,c.anchor,c.result);else if(c.tag==="?"){c.result!==null&&c.kind!=="scalar"&&B(c,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+c.kind+'"');for(let U=0,z=c.implicitTypes.length;U<z;U+=1)if(I=c.implicitTypes[U],I.resolve(c.result)){c.result=I.construct(c.result),c.tag=I.tag,c.anchor!==null&&$t(c,c.anchor,c.result);break}}else if(c.tag!=="!"){if(s.call(c.typeMap[c.kind||"fallback"],c.tag))I=c.typeMap[c.kind||"fallback"][c.tag];else{I=null;let U=c.typeMap.multi[c.kind||"fallback"];for(let z=0,re=U.length;z<re;z+=1)if(c.tag.slice(0,U[z].tag.length)===U[z].tag){I=U[z];break}}I||B(c,"unknown tag !<"+c.tag+">"),c.result!==null&&I.kind!==c.kind&&B(c,"unacceptable node kind for !<"+c.tag+'> tag; it should be "'+I.kind+'", not "'+c.kind+'"'),I.resolve(c.result,c.tag)?(c.result=I.construct(c.result,c.tag),c.anchor!==null&&$t(c,c.anchor,c.result)):B(c,"cannot resolve a node with !<"+c.tag+"> explicit tag")}return c.listener!==null&&c.listener("close",c),c.depth-=1,c.tag!==null||c.anchor!==null||k}function Ns(c){let v=c.position,x=!1,P;for(c.version=null,c.checkLineBreaks=c.legacy,c.tagMap=Object.create(null),c.anchorMap=Object.create(null);(P=c.input.charCodeAt(c.position))!==0&&(ye(c,!0,-1),P=c.input.charCodeAt(c.position),!(c.lineIndent>0||P!==37));){x=!0,P=c.input.charCodeAt(++c.position);let S=c.position;for(;P!==0&&!M(P);)P=c.input.charCodeAt(++c.position);let N=c.input.slice(S,c.position),h=[];for(N.length<1&&B(c,"directive name must not be less than one character in length");P!==0;){for(;T(P);)P=c.input.charCodeAt(++c.position);if(P===35){do P=c.input.charCodeAt(++c.position);while(P!==0&&!A(P));break}if(A(P))break;for(S=c.position;P!==0&&!M(P);)P=c.input.charCodeAt(++c.position);h.push(c.input.slice(S,c.position))}P!==0&&kr(c),s.call(Pi,N)?Pi[N](c,N,h):$r(c,'unknown document directive "'+N+'"')}if(ye(c,!0,-1),c.lineIndent===0&&c.input.charCodeAt(c.position)===45&&c.input.charCodeAt(c.position+1)===45&&c.input.charCodeAt(c.position+2)===45?(c.position+=3,ye(c,!0,-1)):x&&B(c,"directives end mark is expected"),Pt(c,c.lineIndent-1,p,!1,!0),ye(c,!0,-1),c.checkLineBreaks&&y.test(c.input.slice(v,c.position))&&$r(c,"non-ASCII line breaks are interpreted as content"),c.documents.push(c.result),c.position===c.lineStart&&Er(c)){c.input.charCodeAt(c.position)===46&&(c.position+=3,ye(c,!0,-1));return}c.position<c.length-1&&B(c,"end of the stream or a document separator is expected")}function Mi(c,v){c=String(c),v=v||{},c.length!==0&&(c.charCodeAt(c.length-1)!==10&&c.charCodeAt(c.length-1)!==13&&(c+=`
|
|
17
|
+
`),c.charCodeAt(0)===65279&&(c=c.slice(1)));let x=new ae(c,v),P=c.indexOf("\0");for(P!==-1&&(x.position=P,B(x,"null byte is not allowed in input")),x.input+="\0";x.input.charCodeAt(x.position)===32;)x.lineIndent+=1,x.position+=1;for(;x.position<x.length-1;)Ns(x);return x.documents}function Li(c,v,x){v!==null&&typeof v=="object"&&typeof x>"u"&&(x=v,v=null);let P=Mi(c,x);if(typeof v!="function")return P;for(let S=0,N=P.length;S<N;S+=1)v(P[S])}function Ts(c,v){let x=Mi(c,v);if(x.length!==0){if(x.length===1)return x[0];throw new n("expected a single document in the stream, but found more")}}e.exports.loadAll=Li,e.exports.load=Ts})),iv=pe(((t,e)=>{var r=yn(),n=vn(),i=Os(),o=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,l=9,u=10,p=13,f=32,d=33,m=34,g=35,y=37,_=38,b=39,L=42,q=44,A=45,T=58,M=61,X=62,fe=63,Ie=64,$e=91,qe=93,Re=96,it=123,ot=124,St=125,ae={};ae[0]="\\0",ae[7]="\\a",ae[8]="\\b",ae[9]="\\t",ae[10]="\\n",ae[11]="\\v",ae[12]="\\f",ae[13]="\\r",ae[27]="\\e",ae[34]='\\"',ae[92]="\\\\",ae[133]="\\N",ae[160]="\\_",ae[8232]="\\L",ae[8233]="\\P";var Ei=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],B=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function $r(h,w){if(w===null)return{};let R={},k=Object.keys(w);for(let E=0,I=k.length;E<I;E+=1){let C=k[E],V=String(w[C]);C.slice(0,2)==="!!"&&(C="tag:yaml.org,2002:"+C.slice(2));let j=h.compiledTypeMap.fallback[C];j&&s.call(j.styleAliases,V)&&(V=j.styleAliases[V]),R[C]=V}return R}function $t(h){let w,R,k=h.toString(16).toUpperCase();if(h<=255)w="x",R=2;else if(h<=65535)w="u",R=4;else if(h<=4294967295)w="U",R=8;else throw new n("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+w+r.repeat("0",R-k.length)+k}var Ps=1,Qt=2;function Cs(h){this.schema=h.schema||i,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=r.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=$r(this.schema,h.styles||null),this.sortKeys=h.sortKeys||!1,this.lineWidth=h.lineWidth||80,this.noRefs=h.noRefs||!1,this.noCompatMode=h.noCompatMode||!1,this.condenseFlow=h.condenseFlow||!1,this.quotingType=h.quotingType==='"'?Qt:Ps,this.forceQuotes=h.forceQuotes||!1,this.replacer=typeof h.replacer=="function"?h.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function dn(h,w){let R=r.repeat(" ",w),k=0,E="",I=h.length;for(;k<I;){let C,V=h.indexOf(`
|
|
18
|
+
`,k);V===-1?(C=h.slice(k),k=I):(C=h.slice(k,V+1),k=V+1),C.length&&C!==`
|
|
19
|
+
`&&(E+=R),E+=C}return E}function xr(h,w){return`
|
|
20
|
+
`+r.repeat(" ",h.indent*w)}function Pi(h,w){for(let R=0,k=h.implicitTypes.length;R<k;R+=1)if(h.implicitTypes[R].resolve(w))return!0;return!1}function ze(h){return h===f||h===l}function Dt(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==a||h>=65536&&h<=1114111}function xt(h){return Dt(h)&&h!==a&&h!==p&&h!==u}function kr(h,w,R){let k=xt(h),E=k&&!ze(h);return(R?k:k&&h!==q&&h!==$e&&h!==qe&&h!==it&&h!==St)&&h!==g&&!(w===T&&!E)||xt(w)&&!ze(w)&&h===g||w===T&&E}function ye(h){return Dt(h)&&h!==a&&!ze(h)&&h!==A&&h!==fe&&h!==T&&h!==q&&h!==$e&&h!==qe&&h!==it&&h!==St&&h!==g&&h!==_&&h!==L&&h!==d&&h!==ot&&h!==M&&h!==X&&h!==b&&h!==m&&h!==y&&h!==Ie&&h!==Re}function Er(h){return!ze(h)&&h!==T}function kt(h,w){let R=h.charCodeAt(w),k;return R>=55296&&R<=56319&&w+1<h.length&&(k=h.charCodeAt(w+1),k>=56320&&k<=57343)?(R-55296)*1024+k-56320+65536:R}function Ci(h){return/^\n* /.test(h)}var Ii=1,hn=2,Ri=3,Ni=4,Et=5;function Ti(h,w,R,k,E,I,C,V){let j,U=0,z=null,re=!1,ge=!1,ku=k!==-1,mn=-1,gn=ye(kt(h,0))&&Er(kt(h,h.length-1));if(w||C)for(j=0;j<h.length;U>=65536?j+=2:j++){if(U=kt(h,j),!Dt(U))return Et;gn=gn&&kr(U,z,V),z=U}else{for(j=0;j<h.length;U>=65536?j+=2:j++){if(U=kt(h,j),U===u)re=!0,ku&&(ge=ge||j-mn-1>k&&h[mn+1]!==" ",mn=j);else if(!Dt(U))return Et;gn=gn&&kr(U,z,V),z=U}ge=ge||ku&&j-mn-1>k&&h[mn+1]!==" "}return!re&&!ge?gn&&!C&&!E(h)?Ii:I===Qt?Et:hn:R>9&&Ci(h)?Et:C?I===Qt?Et:hn:ge?Ni:Ri}function Is(h,w,R,k,E){h.dump=(function(){if(w.length===0)return h.quotingType===Qt?'""':"''";if(!h.noCompatMode&&(Ei.indexOf(w)!==-1||B.test(w)))return h.quotingType===Qt?'"'+w+'"':"'"+w+"'";let I=h.indent*Math.max(1,R),C=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-I),V=k||h.flowLevel>-1&&R>=h.flowLevel;function j(U){return Pi(h,U)}switch(Ti(w,V,h.indent,C,j,h.quotingType,h.forceQuotes&&!k,E)){case Ii:return w;case hn:return"'"+w.replace(/'/g,"''")+"'";case Ri:return"|"+Ai(w,h.indent)+Oi(dn(w,I));case Ni:return">"+Ai(w,h.indent)+Oi(dn(Rs(w,C),I));case Et:return'"'+Ns(w,C)+'"';default:throw new n("impossible error: invalid scalar style")}})()}function Ai(h,w){let R=Ci(h)?String(w):"",k=h[h.length-1]===`
|
|
21
|
+
`;return R+(k&&(h[h.length-2]===`
|
|
22
|
+
`||h===`
|
|
23
|
+
`)?"+":k?"":"-")+`
|
|
24
|
+
`}function Oi(h){return h[h.length-1]===`
|
|
25
|
+
`?h.slice(0,-1):h}function Rs(h,w){let R=/(\n+)([^\n]*)/g,k=(function(){let V=h.indexOf(`
|
|
26
|
+
`);return V=V!==-1?V:h.length,R.lastIndex=V,Pt(h.slice(0,V),w)})(),E=h[0]===`
|
|
27
|
+
`||h[0]===" ",I,C;for(;C=R.exec(h);){let V=C[1],j=C[2];I=j[0]===" ",k+=V+(!E&&!I&&j!==""?`
|
|
28
|
+
`:"")+Pt(j,w),E=I}return k}function Pt(h,w){if(h===""||h[0]===" ")return h;let R=/ [^ ]/g,k,E=0,I,C=0,V=0,j="";for(;k=R.exec(h);)V=k.index,V-E>w&&(I=C>E?C:V,j+=`
|
|
29
|
+
`+h.slice(E,I),E=I+1),C=V;return j+=`
|
|
30
|
+
`,h.length-E>w&&C>E?j+=h.slice(E,C)+`
|
|
31
|
+
`+h.slice(C+1):j+=h.slice(E),j.slice(1)}function Ns(h){let w="",R=0;for(let k=0;k<h.length;R>=65536?k+=2:k++){R=kt(h,k);let E=ae[R];!E&&Dt(R)?(w+=h[k],R>=65536&&(w+=h[k+1])):w+=E||$t(R)}return w}function Mi(h,w,R){let k="",E=h.tag;for(let I=0,C=R.length;I<C;I+=1){let V=R[I];h.replacer&&(V=h.replacer.call(R,String(I),V)),(x(h,w,V,!1,!1)||typeof V>"u"&&x(h,w,null,!1,!1))&&(k!==""&&(k+=","+(h.condenseFlow?"":" ")),k+=h.dump)}h.tag=E,h.dump="["+k+"]"}function Li(h,w,R,k){let E="",I=h.tag;for(let C=0,V=R.length;C<V;C+=1){let j=R[C];h.replacer&&(j=h.replacer.call(R,String(C),j)),(x(h,w+1,j,!0,!0,!1,!0)||typeof j>"u"&&x(h,w+1,null,!0,!0,!1,!0))&&((!k||E!=="")&&(E+=xr(h,w)),h.dump&&u===h.dump.charCodeAt(0)?E+="-":E+="- ",E+=h.dump)}h.tag=I,h.dump=E||"[]"}function Ts(h,w,R){let k="",E=h.tag,I=Object.keys(R);for(let C=0,V=I.length;C<V;C+=1){let j="";k!==""&&(j+=", "),h.condenseFlow&&(j+='"');let U=I[C],z=R[U];h.replacer&&(z=h.replacer.call(R,U,z)),x(h,w,U,!1,!1)&&(h.dump.length>1024&&(j+="? "),j+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),x(h,w,z,!1,!1)&&(j+=h.dump,k+=j))}h.tag=E,h.dump="{"+k+"}"}function c(h,w,R,k){let E="",I=h.tag,C=Object.keys(R);if(h.sortKeys===!0)C.sort();else if(typeof h.sortKeys=="function")C.sort(h.sortKeys);else if(h.sortKeys)throw new n("sortKeys must be a boolean or a function");for(let V=0,j=C.length;V<j;V+=1){let U="";(!k||E!=="")&&(U+=xr(h,w));let z=C[V],re=R[z];if(h.replacer&&(re=h.replacer.call(R,z,re)),!x(h,w+1,z,!0,!0,!0))continue;let ge=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;ge&&(h.dump&&u===h.dump.charCodeAt(0)?U+="?":U+="? "),U+=h.dump,ge&&(U+=xr(h,w)),x(h,w+1,re,!0,ge)&&(h.dump&&u===h.dump.charCodeAt(0)?U+=":":U+=": ",U+=h.dump,E+=U)}h.tag=I,h.dump=E||"{}"}function v(h,w,R){let k=R?h.explicitTypes:h.implicitTypes;for(let E=0,I=k.length;E<I;E+=1){let C=k[E];if((C.instanceOf||C.predicate)&&(!C.instanceOf||typeof w=="object"&&w instanceof C.instanceOf)&&(!C.predicate||C.predicate(w))){if(R?C.multi&&C.representName?h.tag=C.representName(w):h.tag=C.tag:h.tag="?",C.represent){let V=h.styleMap[C.tag]||C.defaultStyle,j;if(o.call(C.represent)==="[object Function]")j=C.represent(w,V);else if(s.call(C.represent,V))j=C.represent[V](w,V);else throw new n("!<"+C.tag+'> tag resolver accepts not "'+V+'" style');h.dump=j}return!0}}return!1}function x(h,w,R,k,E,I,C){h.tag=null,h.dump=R,v(h,R,!1)||v(h,R,!0);let V=o.call(h.dump),j=k;k&&(k=h.flowLevel<0||h.flowLevel>w);let U=V==="[object Object]"||V==="[object Array]",z,re;if(U&&(z=h.duplicates.indexOf(R),re=z!==-1),(h.tag!==null&&h.tag!=="?"||re||h.indent!==2&&w>0)&&(E=!1),re&&h.usedDuplicates[z])h.dump="*ref_"+z;else{if(U&&re&&!h.usedDuplicates[z]&&(h.usedDuplicates[z]=!0),V==="[object Object]")k&&Object.keys(h.dump).length!==0?(c(h,w,h.dump,E),re&&(h.dump="&ref_"+z+h.dump)):(Ts(h,w,h.dump),re&&(h.dump="&ref_"+z+" "+h.dump));else if(V==="[object Array]")k&&h.dump.length!==0?(h.noArrayIndent&&!C&&w>0?Li(h,w-1,h.dump,E):Li(h,w,h.dump,E),re&&(h.dump="&ref_"+z+h.dump)):(Mi(h,w,h.dump),re&&(h.dump="&ref_"+z+" "+h.dump));else if(V==="[object String]")h.tag!=="?"&&Is(h,h.dump,w,I,j);else{if(V==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new n("unacceptable kind of an object to dump "+V)}if(h.tag!==null&&h.tag!=="?"){let ge=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?ge="!"+ge:ge.slice(0,18)==="tag:yaml.org,2002:"?ge="!!"+ge.slice(18):ge="!<"+ge+">",h.dump=ge+" "+h.dump}}return!0}function P(h,w){let R=[],k=[];S(h,R,k);let E=k.length;for(let I=0;I<E;I+=1)w.duplicates.push(R[k[I]]);w.usedDuplicates=new Array(E)}function S(h,w,R){if(h!==null&&typeof h=="object"){let k=w.indexOf(h);if(k!==-1)R.indexOf(k)===-1&&R.push(k);else if(w.push(h),Array.isArray(h))for(let E=0,I=h.length;E<I;E+=1)S(h[E],w,R);else{let E=Object.keys(h);for(let I=0,C=E.length;I<C;I+=1)S(h[E[I]],w,R)}}}function N(h,w){w=w||{};let R=new Cs(w);R.noRefs||P(h,R);let k=h;return R.replacer&&(k=R.replacer.call({"":k},"",k)),x(R,0,k,!0,!0)?R.dump+`
|
|
32
|
+
`:""}e.exports.dump=N})),zu=tv(pe(((t,e)=>{var r=nv(),n=iv();function i(o,s){return function(){throw new Error("Function yaml."+o+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}e.exports.Type=Me(),e.exports.Schema=Cu(),e.exports.FAILSAFE_SCHEMA=Tu(),e.exports.JSON_SCHEMA=ju(),e.exports.CORE_SCHEMA=Vu(),e.exports.DEFAULT_SCHEMA=Os(),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=n.dump,e.exports.YAMLException=vn(),e.exports.types={binary:Fu(),float:Lu(),map:Nu(),null:Au(),pairs:Hu(),set:Uu(),timestamp:Du(),bool:Ou(),int:Mu(),merge:qu(),omap:Bu(),seq:Ru(),str:Iu()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:$P,Schema:xP,FAILSAFE_SCHEMA:kP,JSON_SCHEMA:EP,CORE_SCHEMA:PP,DEFAULT_SCHEMA:CP,load:IP,loadAll:RP,dump:NP,YAMLException:TP,types:AP,safeLoad:OP,safeLoadAll:MP,safeDump:LP}=zu.default,st=zu.default});import{access as DP,readFile as Wu}from"node:fs/promises";import{dirname as ov,relative as FP,resolve as be}from"node:path";async function qt(t){let e=be(t),r=await Wu(e,"utf-8"),n=st.load(r);return sv(e,n)}function sv(t,e){let r=xe(t);return{...e,openapi:be(r,e.openapi),bindings:be(r,e.bindings),microContractsConfig:be(r,e.microContractsConfig),viewsDir:be(r,e.viewsDir),generated:{contractDir:be(r,e.generated.contractDir),actions:be(r,e.generated.actions),bridge:be(r,e.generated.bridge),reactDir:be(r,e.generated.reactDir)},runtimeModule:e.runtimeModule?be(r,e.runtimeModule):e.componentsModule?be(r,e.componentsModule):void 0,themeModule:e.themeModule?be(r,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?be(r,e.design.tokens):void 0,theme:e.design.theme?be(r,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?be(r,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?be(r,e.extensions):void 0}}async function Gu(t){let e=await Wu(be(t),"utf-8");return st.load(e)}function xe(t){return ov(be(t))}function ji(t){let e=t.design?.tokens,r=t.design?.theme;if(!e)throw new Error("view-contracts.config.yaml must define design.tokens (project tokens file path).");if(!r)throw new Error("view-contracts.config.yaml must define design.theme (project theme file path).");return{tokensPath:e,themePath:r}}var Ct=J(()=>{"use strict";Ir()});import{readFileSync as av}from"node:fs";import{createRequire as lv}from"node:module";import{dirname as Ms,resolve as cv}from"node:path";import{fileURLToPath as uv}from"node:url";function ke(){if(Rr)return Rr;let t=lv(import.meta.url);try{return Rr=Ms(t.resolve("view-contracts/package.json")),Rr}catch{let e=Ms(uv(import.meta.url));for(;;){try{let n=cv(e,"package.json");if(JSON.parse(av(n,"utf8")).name==="view-contracts")return Rr=e,Rr}catch{}let r=Ms(e);if(r===e)break;e=r}throw new Error("view-contracts package root not found")}}var Rr,Ft=J(()=>{"use strict"});function Ku(t){return Di[t]?.properties??[]}function Ju(t,e){let r=Di[e];return r?r.properties.includes(t):!1}var Vi,Di,mt,qi,JP,It=J(()=>{"use strict";Vi={id:{type:"string",category:"identity",lowering:"attribute",description:"Stable identifier for tests and diff updates"},role:{type:"string",category:"identity",lowering:"attribute",enum:"role",description:"Accessibility semantics (not HTML tag names)"},label:{type:"string",category:"identity",lowering:"attribute",description:"Accessible name; required for IconButton"},visible:{type:"boolean",category:"state",lowering:"none",description:"Show or omit from render tree"},enabled:{type:"boolean",category:"state",lowering:"attribute"},selected:{type:"boolean",category:"state",lowering:"attribute"},checked:{type:"boolean",category:"state",lowering:"attribute"},readonly:{type:"boolean",category:"state",lowering:"attribute"},required:{type:"boolean",category:"state",lowering:"attribute"},width:{type:["string","number"],category:"size",lowering:"inline-css",enum:"widthSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},height:{type:["string","number"],category:"size",lowering:"inline-css",enum:"heightSize",notes:"string: wrap|fill; number: fixed px/dp/pt; flex ratio uses weight property"},minWidth:{type:"number",category:"size",lowering:"inline-css"},maxWidth:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},minHeight:{type:"number",category:"size",lowering:"inline-css"},maxHeight:{type:["string","number"],category:"size",lowering:"inline-css",notes:"number or fill"},aspectRatio:{type:"number",category:"size",lowering:"inline-css"},weight:{type:"number",category:"size",lowering:"inline-css",notes:"Flex ratio among Row/Column direct children; Spacer is the primary use case"},padding:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},gap:{type:["string","number"],category:"spacing",lowering:"inline-css"},align:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},justify:{type:"string",category:"alignment",lowering:"inline-css",enum:"justify"},selfAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"align"},contentAlign:{type:"string",category:"alignment",lowering:"inline-css",enum:"contentAlign"},axis:{type:"string",category:"direction",lowering:"inline-css",enum:"axis"},direction:{type:"string",category:"direction",lowering:"attribute",enum:"direction",description:"Text/layout direction; set at app or screen root, not per layout container"},scroll:{type:"string",category:"overflow",lowering:"inline-css",enum:"scroll"},background:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},foreground:{type:"string",category:"visual",lowering:"inline-css",notes:"color token"},border:{type:["string","object"],category:"visual",lowering:"inline-css",enum:"border",notes:"none|token|{width,color}"},separator:{type:"number",category:"visual",lowering:"inline-css",notes:"Row separator width in px/dp/pt (0=off)"},separatorColor:{type:"string",category:"visual",lowering:"inline-css",notes:"Row separator color token"},radius:{type:"string",category:"visual",lowering:"inline-css",notes:"radius token"},shadow:{type:"string",category:"visual",lowering:"inline-css",enum:"shadow"},opacity:{type:"number",category:"visual",lowering:"inline-css",notes:"0..1"},clip:{type:"string",category:"visual",lowering:"inline-css",enum:"clip"},textStyle:{type:"string",category:"text",lowering:"inline-css",notes:"typography token"},textAlign:{type:"string",category:"text",lowering:"inline-css",enum:"textAlign"},lineLimit:{type:["string","number"],category:"text",lowering:"inline-css",enum:"lineLimit"},textOverflow:{type:"string",category:"text",lowering:"inline-css",enum:"textOverflow"},fontWeight:{type:"string",category:"text",lowering:"inline-css",enum:"fontWeight"},size:{type:"number",category:"text",lowering:"inline-css",notes:"Font size shorthand (px/dp/pt)"},fit:{type:"string",category:"image",lowering:"inline-css",enum:"imageFit"},src:{type:"string",category:"image",lowering:"attribute",description:"Image source URL or asset reference"},alt:{type:"string",category:"image",lowering:"attribute",description:"Alternative text; not a source reference"},name:{type:"string",category:"image",lowering:"attribute",description:"Icon token or asset name in the renderer icon set"},onClick:{type:"action",category:"interaction",lowering:"none",description:"Action id, not arbitrary code"},onSubmit:{type:"action",category:"interaction",lowering:"none",description:"Form submit/validation action id"},onChange:{type:"action",category:"interaction",lowering:"none"},focusable:{type:"boolean",category:"interaction",lowering:"attribute"},autoFocus:{type:"boolean",category:"interaction",lowering:"attribute"},keyboardType:{type:"string",category:"interaction",lowering:"attribute",enum:"keyboardType"},value:{type:["string","number","boolean"],category:"data",lowering:"attribute"},binding:{type:"string",category:"data",lowering:"none",description:"ViewModel or form state field identifier"},placeholder:{type:"string",category:"data",lowering:"attribute"},options:{type:"array",category:"data",lowering:"none",notes:"array<{value,label}>"},error:{type:["string","null"],category:"validation",lowering:"none"},help:{type:["string","null"],category:"validation",lowering:"none"},variant:{type:"string",category:"visual",lowering:"class-name",notes:"design token variant"},theme:{type:"string",category:"visual",lowering:"class-name",notes:"active theme id for runtime theme switching"},display:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS display value (grid, flex, etc.)"},gridTemplateColumns:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS grid-template-columns"},flexDirection:{type:"string",category:"layout",lowering:"inline-css",notes:"CSS flex-direction"},alignItems:{type:"string",category:"alignment",lowering:"inline-css",notes:"CSS align-items"},margin:{type:["string","number"],category:"spacing",lowering:"inline-css",notes:"space token or per-side"},borderColor:{type:"string",category:"visual",lowering:"inline-css",notes:"border color token"},fontSize:{type:["string","number"],category:"text",lowering:"inline-css",notes:"CSS font-size"},flex:{type:"number",category:"size",lowering:"inline-css",description:"Flex grow ratio for proportional sizing in table columns/cells"},each:{type:"string",category:"data",lowering:"none",description:"Iterator variable name for data-bound row repetition"},source:{type:"string",category:"data",lowering:"none",description:"ViewModel array binding for data-driven elements"},headerVisible:{type:"boolean",category:"state",lowering:"attribute"}},Di={App:{description:"App root; holds theme/token/navigation context",tier:"core",category:"structure",notes:"Optional; not required for single-screen DSL",properties:["id","padding","direction","theme","variant"],children:{kind:"list",items:["Page"]}},Page:{description:"Screen root; viewport and safe-area boundary",tier:"core",category:"structure",properties:["id","visible","padding","direction","variant"],children:{kind:"list",items:["Column","Row","Stack","Box"]}},SafeArea:{description:"Insets for OS/browser safe areas",tier:"core",category:"structure",properties:["id","padding","variant"],children:{kind:"list",items:["Box","Column","Row"]}},Box:{description:"Single region; background, bounds, child placement",tier:"core",category:"layout",properties:["id","visible","width","height","minWidth","maxWidth","minHeight","maxHeight","padding","margin","gap","contentAlign","background","foreground","border","borderColor","radius","shadow","opacity","clip","selfAlign","display","gridTemplateColumns","flexDirection","variant"],children:{kind:"any"}},Row:{description:"Horizontal child layout",tier:"core",category:"layout",properties:["id","visible","gap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Column:{description:"Vertical child layout",tier:"core",category:"layout",properties:["id","visible","gap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Stack:{description:"Overlay children by z-order (not absolute positioning)",tier:"core",category:"layout",properties:["id","visible","gap","contentAlign","padding","width","height","background","variant"],children:{kind:"any"}},Spacer:{description:"Occupies remaining flex space",tier:"core",category:"layout",notes:"Direct child of Row/Column only",properties:["id","width","height","weight","variant"],children:{kind:"none"}},Divider:{description:"Horizontal or vertical separator",tier:"core",category:"layout",properties:["id","axis","variant"],children:{kind:"none"}},ScrollArea:{description:"Internal scroll boundary",tier:"core",category:"scroll",properties:["id","axis","scroll","width","height","minHeight","maxHeight","padding","variant"],children:{kind:"single"}},List:{description:"Homogeneous list of items",tier:"core",category:"scroll",properties:["id","gap","axis","role","visible","variant"],children:{kind:"list",items:["ListItem"]}},ListItem:{description:"One row/cell in a list",tier:"core",category:"scroll",properties:["id","selected","padding","gap","role","visible","variant"],children:{kind:"any"}},Text:{description:"Text display",tier:"core",category:"text",properties:["id","visible","textStyle","textAlign","lineLimit","textOverflow","fontWeight","fontSize","size","foreground","background","opacity","padding","radius","display","alignItems","role","variant"],children:{kind:"text"}},Link:{description:"Navigable text or region",tier:"optional",category:"text",properties:["id","visible","onClick","label","foreground","role","variant"],children:{kind:"text"}},Image:{description:"Image display",tier:"core",category:"media",properties:["id","visible","src","fit","alt","width","height","aspectRatio","radius","variant"],children:{kind:"none"}},Icon:{description:"Icon display; asset set referenced by name token at renderer",tier:"core",category:"media",properties:["id","visible","name","alt","foreground","opacity","variant"],children:{kind:"none"}},Button:{description:"Pressable action; label or children required (label is a11y name when both present)",tier:"core",category:"input",properties:["id","visible","enabled","onClick","label","foreground","background","radius","padding","shadow","border","borderColor","fontWeight","fontSize","variant","role"],children:{kind:"list",items:["Text","Icon","Row"]}},IconButton:{description:"Icon-primary button; label required for accessibility",tier:"optional",category:"input",properties:["id","visible","enabled","onClick","label","foreground","background","radius","padding","variant"],children:{kind:"list",items:["Icon"]}},TextInput:{description:"Single-line text input",tier:"core",category:"input",properties:["id","visible","enabled","readonly","required","value","binding","placeholder","onChange","error","help","keyboardType","focusable","autoFocus","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},TextArea:{description:"Multi-line text input",tier:"core",category:"input",properties:["id","visible","enabled","readonly","required","value","binding","placeholder","onChange","error","help","focusable","width","minHeight","label","foreground","background","radius","padding","border","borderColor","fontSize","variant"],children:{kind:"none"}},Select:{description:"Single selection",tier:"core",category:"input",properties:["id","visible","enabled","required","value","binding","options","onChange","error","help","width","label","foreground","background","radius","padding","border","borderColor","minHeight","fontSize","variant"],children:{kind:"none"}},Checkbox:{description:"Boolean or multi-select toggle",tier:"core",category:"input",properties:["id","visible","enabled","checked","required","binding","label","onChange","variant"],children:{kind:"none"}},Radio:{description:"Single choice in a group (use Row/Column to group; binding identifies group)",tier:"core",category:"input",notes:"RadioGroup is expressed via layout Group, not a separate element",properties:["id","visible","enabled","checked","binding","label","value","onChange","variant"],children:{kind:"none"}},Switch:{description:"On/off toggle",tier:"core",category:"input",properties:["id","visible","enabled","checked","binding","label","onChange","variant"],children:{kind:"none"}},Form:{description:"Input group submit/validation boundary",tier:"core",category:"form",properties:["id","visible","gap","onSubmit","variant"],children:{kind:"any"}},Field:{description:"label/help/error/input unit",tier:"core",category:"form",properties:["id","visible","label","help","error","required","gap","variant"],children:{kind:"any"}},Modal:{description:"Primary transient dialog",tier:"core",category:"overlay",notes:"Direct child of Page or App; role defaults to dialog at renderer",properties:["id","visible","role","autoFocus","variant"],children:{kind:"list",items:["Box","Column"]}},Drawer:{description:"Edge panel overlay",tier:"extension",category:"overlay",notes:"Placement limited to start/end/bottom at renderer",properties:["id","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Popover:{description:"Small anchored panel",tier:"extension",category:"overlay",properties:["id","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Tooltip:{description:"Supplementary description",tier:"extension",category:"overlay",properties:["id","visible","label","variant"],children:{kind:"text"}},Progress:{description:"Determinate progress",tier:"core",category:"feedback",properties:["id","visible","value","variant"],children:{kind:"none"}},Spinner:{description:"Indeterminate loading",tier:"core",category:"feedback",properties:["id","visible","variant"],children:{kind:"none"}},Table:{description:"Data table with header and repeated rows",tier:"core",category:"data",properties:["id","visible","source","gap","border","borderColor","separator","separatorColor","variant"],children:{kind:"list",items:["TableHeader","TableRow"]}},TableHeader:{description:"Table header row defining column labels",tier:"core",category:"data",properties:["height","border","borderColor","background","alignItems","variant"],children:{kind:"list",items:["TableColumn"]}},TableColumn:{description:"Header cell definition; children override label text",tier:"core",category:"data",properties:["label","width","flex","align","border","borderColor","padding","fontSize","fontWeight","foreground","variant"],children:{kind:"any"}},TableRow:{description:"Row template repeated for each source item",tier:"core",category:"data",properties:["each","height","border","borderColor","alignItems","variant"],children:{kind:"list",items:["TableCell"]}},TableCell:{description:"Data cell; children define cell content",tier:"core",category:"data",properties:["width","flex","align","border","borderColor","padding","fontSize","foreground","variant"],children:{kind:"any"}}},mt=new Set(Object.keys(Di)),qi=new Set(Object.entries(Vi).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),JP=new Set(Object.entries(Vi).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});import{readFile as fv}from"node:fs/promises";async function Fi(t){return st.load(await fv(t,"utf-8"))}function Yu(t,e,r){for(let n of t)if(!e.has(n))throw new Error(`${r}: unknown element "${n}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function Xu(t,e,r){for(let[n,i]of Object.entries(t))for(let o of e)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${r}: element "${n}" is missing required "${String(o)}"`)}var Ls=J(()=>{"use strict";Ir()});import{resolve as pv}from"node:path";function dv(t){Yu(Object.keys(t.elements),mt,Qu),Xu(t.elements,["tag"],Qu)}async function Vs(t){if(!t&&js)return js;let e=t??pv(ke(),"renderers/react/elements.yaml"),r=await Fi(e);return dv(r),t||(js=r),r}var Qu,js,Zu=J(()=>{"use strict";It();It();Ft();Ls();Qu="renderers/react/elements.yaml",js=null});function ef(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function tf(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t==="between"||t==="spaceBetween"?"space-between":t==="around"||t==="spaceAround"?"space-around":t==="spaceEvenly"?"space-evenly":t}var rf=J(()=>{"use strict"});function at(t){return`${t}px`}function Nr(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function Ds(t){let e={},r=t.width;typeof r=="number"?e.width=at(r):r==="fill"?e.width="100%":typeof r=="string"&&r!=="wrap"&&(e.width=r),typeof t.minWidth=="number"&&(e.minWidth=at(t.minWidth));let n=t.maxWidth;typeof n=="number"?e.maxWidth=at(n):n==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=at(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=at(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=at(o):o==="fill"&&(e.maxHeight="100%"),t.aspectRatio!==void 0&&(e.aspectRatio=String(t.aspectRatio));let s=t.weight;typeof s=="number"&&(e.flexGrow=s),typeof t.padding=="number"&&(e.padding=at(t.padding)),typeof t.margin=="number"&&(e.margin=at(t.margin)),typeof t.gap=="number"&&(e.gap=at(t.gap));let a=t.textAlign;typeof a=="string"&&(e.textAlign=a==="start"?"left":a==="end"?"right":a);let l=t.contentAlign;typeof l=="string"&&l in nf&&(e.placeItems=nf[l]),typeof t.overflow=="string"&&(e.overflow=t.overflow);let u=t.selfAlign;typeof u=="string"&&(e.alignSelf=u==="start"?"flex-start":u==="end"?"flex-end":u);let p=t.size;typeof p=="number"?e.fontSize=at(p):typeof p=="string"&&(e.fontSize=p);let f=typeof s=="string"?s:t.fontWeight;typeof f=="string"&&(e.fontWeight=f);let d=t.background;typeof d=="string"&&(e.background=Nr(d)??d);let m=t.foreground;typeof m=="string"&&(e.color=Nr(m)??m);let g=t.radius;typeof g=="number"?e.borderRadius=at(g):typeof g=="string"&&(e.borderRadius=Nr(g)??g);let y=t.shadow;y===!0?e.boxShadow="var(--ui-shadow)":y===!1?e.boxShadow="none":typeof y=="string"&&(e.boxShadow=hv[y]??Nr(y)??y);let _=t.border;typeof _=="string"&&(e.border=Nr(_)??_),typeof t.opacity=="number"&&(e.opacity=t.opacity);let b=t.clip;typeof b=="string"&&(e.overflow=b==="hidden"?"hidden":b);let L=t.align;if(typeof L=="string"){let M=ef(L);M&&(e.alignItems=M)}let q=t.justify;if(typeof q=="string"){let M=tf(q);M&&(e.justifyContent=M)}typeof t.display=="string"&&(e.display=t.display),typeof t.gridTemplateColumns=="string"&&(e.gridTemplateColumns=t.gridTemplateColumns),typeof t.flexDirection=="string"&&(e.flexDirection=t.flexDirection),typeof t.alignItems=="string"&&(e.alignItems=t.alignItems);let A=t.borderColor;typeof A=="string"&&(e.borderColor=Nr(A)??A);let T=t.flex;return typeof T=="number"&&(e.flex=T),e}function wn(t){let e=Object.entries(t);return e.length===0?"":`style={{ ${e.map(([n,i])=>typeof i=="number"?`${n}: ${i}`:`${n}: ${JSON.stringify(i)}`).join(", ")} }}`}var nf,hv,qs=J(()=>{"use strict";rf();nf={topStart:"start start",top:"center start",topEnd:"end start",start:"start center",center:"center center",end:"end center",bottomStart:"start end",bottom:"center end",bottomEnd:"end end"},hv={none:"none",sm:"var(--ui-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))",md:"var(--ui-shadow)",lg:"var(--ui-shadow-lg, 0 10px 15px rgba(0,0,0,0.1))"}});function Bi(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function mv(t,e){if(e!=null&&!(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&!(typeof e=="object"&&"kind"in e&&e.kind==="literal"))throw new Error(`Style property "${t}" must be a compile-time literal; ViewModel bindings are not allowed on layout/visual props`)}function gv(t){let e={};for(let[r,n]of Object.entries(t)){if(!qi.has(r))continue;mv(r,n);let i=Bi(t,r);i!==void 0&&(e[r]=i)}return e}function yv(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function vv(t){return t==="horizontal"?{overflowX:"auto",overflowY:"hidden"}:t==="both"?{overflowX:"auto",overflowY:"auto"}:t==="none"?{overflowX:"hidden",overflowY:"hidden"}:{overflowX:"hidden",overflowY:"auto"}}function of(t,e){let r=gv(e),n=Ds(r);if(n={...n,...yv(t)},t.tableCell){if("alignItems"in n){let i=String(n.alignItems);n.textAlign=i==="flex-end"?"right":i==="center"?"center":"left",delete n.alignItems}"width"in n&&!("flex"in n)&&(n.flexShrink=0,n.flexGrow=0)}if(t.scrollContainer){let i=Bi(e,"scroll"),o=Bi(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return n={...n,...vv(s)},wn(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=Bi(e,t.flexGrowProp);if(typeof i=="number")return n.flexGrow=i,wn(n);throw new Error(`"${t.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return wn(n)}var sf=J(()=>{"use strict";It();qs();qs()});function G(t){return" ".repeat(t)}function er(t,e="vm"){let r=t.scope??e;return t.path?`${r}.${t.path}`:r}function ff(t){return t.parts.map(e=>typeof e=="string"?e:`\${${er(e)}}`).join("")}function wv(t){return`\`${ff(t)}\``}function Hi(t,e=!1){let r=e?" as ActionDescriptor":"";if(!t.params||Object.keys(t.params).length===0)return`{ name: ${JSON.stringify(t.name)} }${r}`;let n=Object.entries(t.params).map(([i,o])=>`${i}: ${Ar(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${n} } }${r}`}function Bs(t,e,r=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
|
|
33
|
+
${t.map(n=>`${G(e+1)}${Bs(n,e+1,r)}`).join(`,
|
|
65
34
|
`)}
|
|
66
|
-
${
|
|
67
|
-
${Object.entries(n).map(([s
|
|
35
|
+
${G(e)}]`;if(typeof t=="object"&&t!==null){let n=t;return"kind"in n&&n.kind==="action"?Hi(n,r):`{
|
|
36
|
+
${Object.entries(n).map(([o,s])=>`${o}: ${Bs(s,e+1,r)}`).map(o=>`${G(e+1)}${o}`).join(`,
|
|
68
37
|
`)}
|
|
69
|
-
${
|
|
70
|
-
${t.map(n=>`${
|
|
38
|
+
${G(e)}}`}return"undefined"}function Ar(t,e,r=!1){if(t===null)return"null";if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return`[
|
|
39
|
+
${t.map(n=>`${G(e+1)}${Ar(n,e+1,r)}`).join(`,
|
|
71
40
|
`)}
|
|
72
|
-
${
|
|
73
|
-
`)}function
|
|
74
|
-
${
|
|
75
|
-
${
|
|
76
|
-
${
|
|
77
|
-
${
|
|
78
|
-
${
|
|
79
|
-
${
|
|
80
|
-
${
|
|
81
|
-
${
|
|
82
|
-
${
|
|
83
|
-
`);let n=
|
|
41
|
+
${G(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return er(t);if(t.kind==="action")return Hi(t,r);if(t.kind==="literal")return Bs(t.value,e,r);if(t.kind==="concat")return wv(t)}return"undefined"}function Tr(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function W(t,e){let r=t[e];if(r!=null)return Ar(r,0)}function bn(t,e,r){let n=of(e,r);n&&t.push(n)}function _v(t,e){let r=t.action??t[e==="onClick"?"onClick":"onSubmit"];if(!r||typeof r!="object"||!("kind"in r)||r.kind!=="action")return;let n=Hi(r,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${n}); }}`:`onClick={() => { void dispatchAction(${n}); }}`}function Fs(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function bv(t,e){let r=Tr(e,"variant");if(typeof r=="string")return` vc-${Fs(t)}--${r}`;let n=e.variant;if(n&&typeof n=="object"&&"kind"in n&&n.kind==="concat")return` vc-${Fs(t)}--${ff(n)}`;let i=W(e,"variant");if(i)return` vc-${Fs(t)}--\${${i}}`}function Sn(t,e,r){let n=e.className??"",i=bv(t,r);if(i)return typeof Tr(r,"variant")=="string"?`className="${n}${i}"`:`className={\`${n}${i}\`}`;if(e.wrapProp&&Tr(r,e.wrapProp)===!0)return`className="${n} vc-wrap"`;if(e.sizeClass&&r.size){let o=W(r,"size");return`className={\`${e.className} ${e.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${n}"`}function af(t,e,r){let n=Tr(e,"label"),i=Tr(e,"help"),o=Tr(e,"error"),s=W(e,"label"),a=W(e,"help"),l=W(e,"error"),u=[`${G(r)}<label className="vc-field">`];return typeof n=="string"?u.push(`${G(r+1)}<span className="vc-text vc-text--field-label">{${JSON.stringify(n)}}</span>`):s&&u.push(`${G(r+1)}{${s} ? <span className="vc-text vc-text--field-label">{${s}}</span> : null}`),u.push(`${G(r+1)}${t}`),typeof i=="string"?u.push(`${G(r+1)}<span className="vc-text vc-text--field-help">{${JSON.stringify(i)}}</span>`):a&&u.push(`${G(r+1)}{${a} ? <span className="vc-text vc-text--field-help">{${a}}</span> : null}`),typeof o=="string"?u.push(`${G(r+1)}<span className="vc-text vc-text--field-error">{${JSON.stringify(o)}}</span>`):l&&u.push(`${G(r+1)}{${l} ? <span className="vc-text vc-text--field-error">{${l}}</span> : null}`),u.push(`${G(r)}</label>`),u.join(`
|
|
42
|
+
`)}function Sv(t,e){let r=W(t,"name")??'""',n=W(t,"label")??'""',i=t.checked?`defaultChecked={${W(t,"checked")}}`:"",o=t.enabled?`disabled={${W(t,"enabled")} === false}`:"";return`${G(e)}<label className="vc-checkbox">
|
|
43
|
+
${G(e+1)}<input type="checkbox" name={${r}} ${i} ${o} />
|
|
44
|
+
${G(e+1)}<span>{${n}}</span>
|
|
45
|
+
${G(e)}</label>`}function $v(t,e){let r=W(t,"binding")??W(t,"name")??'""',n=W(t,"value")??'""',i=W(t,"label")??'""',o=t.checked?`defaultChecked={${W(t,"checked")}}`:"",s=t.enabled?`disabled={${W(t,"enabled")} === false}`:"";return`${G(e)}<label className="vc-radio">
|
|
46
|
+
${G(e+1)}<input type="radio" name={${r}} value={${n}} ${o} ${s} />
|
|
47
|
+
${G(e+1)}<span>{${i}}</span>
|
|
48
|
+
${G(e)}</label>`}function xv(t,e){let r=W(t,"binding")??W(t,"name")??'""',n=W(t,"label")??'""',i=t.checked?`defaultChecked={${W(t,"checked")}}`:"",o=t.enabled?`disabled={${W(t,"enabled")} === false}`:"";return`${G(e)}<label className="vc-switch">
|
|
49
|
+
${G(e+1)}<input type="checkbox" role="switch" name={${r}} ${i} ${o} />
|
|
50
|
+
${G(e+1)}<span>{${n}}</span>
|
|
51
|
+
${G(e)}</label>`}function kv(t,e,r){let n=t.props;if(n.alt!==void 0){let s=[Sn(t.name,e,n),`src={${W(n,"name")??'""'}}`,`alt={${W(n,"alt")??'""'}}`];return bn(s,e,n),n.id&&s.push(`id={${W(n,"id")}}`),`${G(r)}<img ${s.join(" ")} />`}let o=[Sn(t.name,e,n),"aria-hidden"];return bn(o,e,n),n.id&&o.push(`id={${W(n,"id")}}`),n.name&&o.push(`data-icon={${W(n,"name")}}`),`${G(r)}<span ${o.join(" ")} />`}function lf(t,e){let r=t.options;if(!r||typeof r!="object"||!("kind"in r))return"";if(r.kind==="literal"&&Array.isArray(r.value))return r.value.map(o=>`${G(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
|
|
52
|
+
`);let n=Ar(r,0);return`${G(e+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function cf(t,e,r,n){let i=[Sn(t,e,r)];return bn(i,e,r),e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${W(r,"id")}}`),r.role?i.push(`role={${W(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${W(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${W(r,"label")}}`):r.title&&i.push(`aria-label={${W(r,"title")}}`)),r.name&&i.push(`name={${W(r,"name")}}`),r.placeholder&&i.push(`placeholder={${W(r,"placeholder")}}`),e.inputType&&i.push(`type={${W(r,"type")??JSON.stringify(e.inputType)}}`),r.required&&i.push(`required={${W(r,"required")}}`),r.readonly&&i.push(`readOnly={${W(r,"readonly")}}`),r.enabled&&i.push(`disabled={${W(r,"enabled")} === false}`),e.tag==="img"&&r.src&&i.push(`src={${W(r,"src")}}`),e.tag==="img"&&r.alt&&i.push(`alt={${W(r,"alt")}}`),e.tag==="progress"&&r.value&&i.push(`value={${W(r,"value")}}`),r.rows&&i.push(`rows={${W(r,"rows")??"4"}}`),`${G(n)}<${e.tag} ${i.join(" ")} />`}function uf(t,e,r,n){let i=[];if(e.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${W(r,"id")}}`),r.role?i.push(`role={${W(r,"role")}}`):e.defaultRole&&i.push(`role="${e.defaultRole}"`),e.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${W(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${W(r,"label")}}`):r.title&&i.push(`aria-label={${W(r,"title")}}`)),e.actionEvent){let o=_v(r,e.actionEvent);o&&i.push(o)}return e.tag==="button"&&r.enabled&&i.push(`disabled={${W(r,"enabled")} === false}`),e.tag==="a"&&r.href&&i.push(`href={${W(r,"href")}}`),e.tag==="button"&&i.push(`type={${W(r,"type")??'"button"'}}`),i.push(Sn(t,e,r)),bn(i,e,r),`<${n} ${i.join(" ")}`}function Rt(t,e,r){if(e.visible===void 0)return t;let n=W(e,"visible");return`${G(r)}{${n} !== false ? (
|
|
84
53
|
${t}
|
|
85
|
-
${
|
|
86
|
-
`)}function
|
|
54
|
+
${G(r)}) : null}`}function Hs(t,e,r,n){if(t.length===0)return"";let i=n??"vm";return t.map(s=>{if(s.kind==="text"){let a=s.value;return a?`${G(e)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${G(e)}{${er(s,i)}}`:s.kind==="map"?Ev(s,e,r):s.kind==="fragment"?Hs(s.children,e,r,n):r(s,e,n)}).filter(Boolean).join(`
|
|
55
|
+
`)}function Ev(t,e,r){let n=t.item,i=r(t.body,e+1,n);if(t.key){let o=` key={${er(t.key,n)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${G(e)}{${er(t.source)}.map((${n}) => (
|
|
87
56
|
${i}
|
|
88
|
-
${
|
|
89
|
-
${
|
|
90
|
-
${
|
|
91
|
-
${
|
|
92
|
-
${
|
|
93
|
-
${
|
|
94
|
-
${
|
|
95
|
-
${
|
|
96
|
-
${
|
|
57
|
+
${G(e)}))}`}function Pv(t,e,r,n,i){let o=t.props,s=Hs(t.children,r+1,i,n);if(e.checkbox)return Rt(Sv(o,r),o,r);if(t.name==="Radio")return Rt($v(o,r),o,r);if(t.name==="Switch")return Rt(xv(o,r),o,r);if(t.name==="Icon")return Rt(kv(t,e,r),o,r);if(t.name==="Spinner"){let p=[Sn(t.name,e,o),'aria-busy="true"'];return bn(p,e,o),o.id&&p.push(`id={${W(o,"id")}}`),o.role?p.push(`role={${W(o,"role")}}`):e.defaultRole&&p.push(`role="${e.defaultRole}"`),Rt(`${G(r)}<div ${p.join(" ")} />`,o,r)}if(e.fieldContainer){let p=s||`${G(r+1)}<div />`;return Rt(af(p,o,r),o,r)}if(e.fieldWrap){let p=e.tag,f;if(e.optionsProp&&o[e.optionsProp]){let d=uf(t.name,e,o,p);f=`${G(r+1)}${d}>
|
|
58
|
+
${lf(o,r+2)}
|
|
59
|
+
${G(r+1)}</${p}>`}else f=cf(t.name,e,o,r+1);return Rt(af(f,o,r),o,r)}let a=e.tag;if(e.void)return Rt(cf(t.name,e,o,r),o,r);let l=uf(t.name,e,o,a),u;return!s&&e.optionsProp&&o[e.optionsProp]?u=`${G(r)}${l}>
|
|
60
|
+
${lf(o,r+1)}
|
|
61
|
+
${G(r)}</${a}>`:s?u=`${G(r)}${l}>
|
|
62
|
+
${s}
|
|
63
|
+
${G(r)}</${a}>`:u=`${G(r)}${l} />`,Rt(u,o,r)}function Cv(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${er(i,r)}}`:`${n}={${Ar(i,0)}}`).join(" ")}function Iv(t,e,r){let n=Cv(t.props,r),i=n?` ${n}`:"";return`${G(e)}<${t.name}${i} />`}function Rv(t,e){let r=e??"vm";return Object.entries(t).map(([n,i])=>n==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${n}={${Hi(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${er(i,r)}}`:n==="children"?"":`${n}={${Ar(i,0,n==="columns")}}`).join(" ")}function Nv(t,e,r,n){let i=Rv(t.props,r),o=i?` ${i}`:"",s=Hs(t.children,e+1,n,r);return s?`${G(e)}<${t.name}${o}>
|
|
64
|
+
${s}
|
|
65
|
+
${G(e)}</${t.name}>`:`${G(e)}<${t.name}${o} />`}function pf(t,e,r){return t in e.elements&&!r.includes(t)}function _n(t,e){if(t.kind==="viewRef"){e.add(t.name);return}if(t.kind==="component"){for(let r of t.children)_n(r,e);return}if(t.kind==="map"&&_n(t.body,e),t.kind==="fragment")for(let r of t.children)_n(r,e)}function Zt(t,e,r,n){if(t.kind==="component"){pf(t.name,e,r)||n.add(t.name);for(let i of t.children)Zt(i,e,r,n);return}if(t.kind==="map"&&Zt(t.body,e,r,n),t.kind==="fragment")for(let i of t.children)Zt(i,e,r,n)}function df(t,e){let r=(n,i,o)=>n.kind==="viewRef"?Iv(n,i,o):n.kind!=="component"?"":pf(n.name,t,e)?Pv(n,t.elements[n.name],i,o,r):Nv(n,i,o,r);return(n,i,o)=>r(n,i,o)}var hf=J(()=>{"use strict";sf()});var zs={};Cr(zs,{partialReactOutputPath:()=>Dv,renderReactComponent:()=>Us,renderReactFromIr:()=>jv,renderReactPreviewBundle:()=>Vv});import{resolve as Tv}from"node:path";function Av(t){if(t.isPartial)return t.exportName;let e=t.exportName.replace(/View$/,"")||t.exportName;return e.charAt(0).toUpperCase()+e.slice(1)}function Ov(t,e){if(t.kind!=="component")throw new Error(`View IR root must be a component node (${e})`);return t}function gf(t){if(!t)return[];let e=t.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return e?[...new Set(e)]:[]}function Mv(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`{ ${e[1].trim().split(/[,;]/).map(i=>i.split(":")[0].trim()).filter(Boolean).join(", ")} }: ${t.propsType}`:`props: ${t.propsType}`}function mf(t){return t.trimStart().startsWith("{")?`return (
|
|
97
66
|
<>${t}
|
|
98
67
|
</>
|
|
99
68
|
);`:`return (
|
|
100
69
|
${t}
|
|
101
|
-
);`}function
|
|
70
|
+
);`}function Lv(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function yf(t,e){let r=await Vs(e.elementMapPath),n=e.allowlistExtra??[],i=Av(t),o=Ov(t.root,t.source),a=df(r,n)(o,2),l=new Set;Zt(t.root,r,n,l);let u=[...l].sort(),p=new Set;_n(t.root,p);let f=[...p].sort(),d=e.previewImports,m=d?.dispatch??e.runtimeImportFrom,g=d?.contracts??e.contractsImportFrom,y=d?.extensions??e.extensionsImportFrom,_=new Set;if(t.isPartial)for(let T of gf(t.propsType))_.add(T);else _.add(t.viewModel);let b=["import type { ReactElement } from 'react';"];b.push(`import { dispatchAction } from '${m}';`);let L=[..._].sort(),q=L.length>0?`${L.join(", ")}, ActionDescriptor`:"ActionDescriptor";b.push(`import type { ${q} } from '${g}';`),u.length>0&&b.push(`import { ${u.join(", ")} } from '${y}';`);for(let T of f){if(e.inlineViewRefs)continue;let M=e.viewRefImportFrom?.get(T)??`./${T}.generated.js`;b.push(`import { ${T} } from '${M}';`)}let A=d?`/**
|
|
102
71
|
* Preview module \u2014 compiled live from ${t.source}
|
|
103
72
|
* Same lowering as generated/; not written to disk.
|
|
104
73
|
*/`:`/**
|
|
105
74
|
* Auto-generated React component from ${t.source}
|
|
106
75
|
* DO NOT EDIT \u2014 regenerate with: view-contracts render react
|
|
107
|
-
*/`;if(t.isPartial){let
|
|
108
|
-
${
|
|
76
|
+
*/`;if(t.isPartial){let T=Mv(t);return`${A}
|
|
77
|
+
${b.join(`
|
|
109
78
|
`)}
|
|
110
79
|
|
|
111
|
-
export function ${i}(${
|
|
112
|
-
${
|
|
80
|
+
export function ${i}(${T}): ReactElement {
|
|
81
|
+
${mf(a)}
|
|
113
82
|
}
|
|
114
|
-
`}return`${
|
|
115
|
-
${
|
|
83
|
+
`}return`${A}
|
|
84
|
+
${b.join(`
|
|
116
85
|
`)}
|
|
117
86
|
|
|
118
87
|
export function ${i}({ vm }: { vm: ${t.viewModel} }): ReactElement {
|
|
119
|
-
${
|
|
88
|
+
${mf(a)}
|
|
120
89
|
}
|
|
121
|
-
`}async function
|
|
90
|
+
`}async function Us(t,e){return yf(t,e)}async function jv(t,e,r){let{writeFile:n,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await yf(t,r);await i(o(e),{recursive:!0}),await n(e,s,"utf-8")}async function Vv(t,e,r){let n={...r,inlineViewRefs:!0},i=await Promise.all(e.map(A=>Us(A,n))),o=await Us(t,n),s=Lv,a=await Vs(r.elementMapPath),l=r.allowlistExtra??[],u=new Set;Zt(t.root,a,l,u);for(let A of e)Zt(A.root,a,l,u);let p=r.previewImports,f=p?.dispatch??r.runtimeImportFrom,d=p?.contracts??r.contractsImportFrom,m=p?.extensions??r.extensionsImportFrom,g=new Set([t.viewModel]);for(let A of e)for(let T of gf(A.propsType))g.add(T);let y=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${f}';`,`import type { ${[...g].sort().join(", ")}, ActionDescriptor } from '${d}';`],_=[...u].sort();_.length>0&&y.push(`import { ${_.join(", ")} } from '${m}';`);let b=p?`/**
|
|
122
91
|
* Preview module \u2014 compiled live from ${t.source}
|
|
123
92
|
* Same lowering as generated/; not written to disk.
|
|
124
|
-
*/`:"",
|
|
125
|
-
${
|
|
93
|
+
*/`:"",L=i.map(s),q=s(o);return`${b}
|
|
94
|
+
${y.join(`
|
|
126
95
|
`)}
|
|
127
96
|
|
|
128
|
-
${
|
|
97
|
+
${L.join(`
|
|
129
98
|
|
|
130
99
|
`)}
|
|
131
100
|
|
|
132
|
-
${
|
|
101
|
+
${q}`}function Dv(t,e){return Tv(t,"components",`${e.exportName}.generated.tsx`)}var Ws=J(()=>{"use strict";Zu();hf()});var Le=$(We=>{"use strict";We.__esModule=!0;We.extend=vf;We.indexOf=Uv;We.escapeExpression=zv;We.isEmpty=Wv;We.createFrame=Gv;We.blockParams=Kv;We.appendContextPath=Jv;var qv={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},Fv=/[&<>"'`=]/g,Bv=/[&<>"'`=]/;function Hv(t){return qv[t]}function vf(t){for(var e=1;e<arguments.length;e++)for(var r in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],r)&&(t[r]=arguments[e][r]);return t}var Ks=Object.prototype.toString;We.toString=Ks;var Gs=function(e){return typeof e=="function"};Gs(/x/)&&(We.isFunction=Gs=function(t){return typeof t=="function"&&Ks.call(t)==="[object Function]"});We.isFunction=Gs;var wf=Array.isArray||function(t){return t&&typeof t=="object"?Ks.call(t)==="[object Array]":!1};We.isArray=wf;function Uv(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function zv(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return Bv.test(t)?t.replace(Fv,Hv):t}function Wv(t){return!t&&t!==0?!0:!!(wf(t)&&t.length===0)}function Gv(t){var e=vf({},t);return e._parent=t,e}function Kv(t,e){return t.path=e,t}function Jv(t,e){return(t?t+".":"")+e}});var Ge=$((Ui,_f)=>{"use strict";Ui.__esModule=!0;var Js=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Ys(t,e){var r=e&&e.loc,n=void 0,i=void 0,o=void 0,s=void 0;r&&(n=r.start.line,i=r.end.line,o=r.start.column,s=r.end.column,t+=" - "+n+":"+o);for(var a=Error.prototype.constructor.call(this,t),l=0;l<Js.length;l++)this[Js[l]]=a[Js[l]];Error.captureStackTrace&&Error.captureStackTrace(this,Ys);try{r&&(this.lineNumber=n,this.endLineNumber=i,Object.defineProperty?(Object.defineProperty(this,"column",{value:o,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:s,enumerable:!0})):(this.column=o,this.endColumn=s))}catch{}}Ys.prototype=new Error;Ui.default=Ys;_f.exports=Ui.default});var Sf=$((zi,bf)=>{"use strict";zi.__esModule=!0;var Xs=Le();zi.default=function(t){t.registerHelper("blockHelperMissing",function(e,r){var n=r.inverse,i=r.fn;if(e===!0)return i(this);if(e===!1||e==null)return n(this);if(Xs.isArray(e))return e.length>0?(r.ids&&(r.ids=[r.name]),t.helpers.each(e,r)):n(this);if(r.data&&r.ids){var o=Xs.createFrame(r.data);o.contextPath=Xs.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(e,r)})};bf.exports=zi.default});var xf=$((Wi,$f)=>{"use strict";Wi.__esModule=!0;function Yv(t){return t&&t.__esModule?t:{default:t}}var $n=Le(),Xv=Ge(),Qv=Yv(Xv);Wi.default=function(t){t.registerHelper("each",function(e,r){if(!r)throw new Qv.default("Must pass iterator to #each");var n=r.fn,i=r.inverse,o=0,s="",a=void 0,l=void 0;r.data&&r.ids&&(l=$n.appendContextPath(r.data.contextPath,r.ids[0])+"."),$n.isFunction(e)&&(e=e.call(this)),r.data&&(a=$n.createFrame(r.data));function u(g,y,_){a&&(a.key=g,a.index=y,a.first=y===0,a.last=!!_,l&&(a.contextPath=l+g)),s=s+n(e[g],{data:a,blockParams:$n.blockParams([e[g],g],[l+g,null])})}if(e&&typeof e=="object")if($n.isArray(e))for(var p=e.length;o<p;o++)o in e&&u(o,o,o===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var f=[],d=e[Symbol.iterator](),m=d.next();!m.done;m=d.next())f.push(m.value);e=f;for(var p=e.length;o<p;o++)u(o,o,o===e.length-1)}else(function(){var g=void 0;Object.keys(e).forEach(function(y){g!==void 0&&u(g,o-1),g=y,o++}),g!==void 0&&u(g,o-1,!0)})();return o===0&&(s=i(this)),s})};$f.exports=Wi.default});var Ef=$((Gi,kf)=>{"use strict";Gi.__esModule=!0;function Zv(t){return t&&t.__esModule?t:{default:t}}var ew=Ge(),tw=Zv(ew);Gi.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new tw.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};kf.exports=Gi.default});var Rf=$((Ki,If)=>{"use strict";Ki.__esModule=!0;function rw(t){return t&&t.__esModule?t:{default:t}}var Pf=Le(),nw=Ge(),Cf=rw(nw);Ki.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new Cf.default("#if requires exactly one argument");return Pf.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||Pf.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new Cf.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};If.exports=Ki.default});var Tf=$((Ji,Nf)=>{"use strict";Ji.__esModule=!0;Ji.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),e[0]=i,t.log.apply(t,e)})};Nf.exports=Ji.default});var Of=$((Yi,Af)=>{"use strict";Yi.__esModule=!0;Yi.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};Af.exports=Yi.default});var Lf=$((Xi,Mf)=>{"use strict";Xi.__esModule=!0;function iw(t){return t&&t.__esModule?t:{default:t}}var xn=Le(),ow=Ge(),sw=iw(ow);Xi.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new sw.default("#with requires exactly one argument");xn.isFunction(e)&&(e=e.call(this));var n=r.fn;if(xn.isEmpty(e))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=xn.createFrame(r.data),i.contextPath=xn.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:i,blockParams:xn.blockParams([e],[i&&i.contextPath])})})};Mf.exports=Xi.default});var Qs=$(Qi=>{"use strict";Qi.__esModule=!0;Qi.registerDefaultHelpers=bw;Qi.moveHelperToHooks=Sw;function tr(t){return t&&t.__esModule?t:{default:t}}var aw=Sf(),lw=tr(aw),cw=xf(),uw=tr(cw),fw=Ef(),pw=tr(fw),dw=Rf(),hw=tr(dw),mw=Tf(),gw=tr(mw),yw=Of(),vw=tr(yw),ww=Lf(),_w=tr(ww);function bw(t){lw.default(t),uw.default(t),pw.default(t),hw.default(t),gw.default(t),vw.default(t),_w.default(t)}function Sw(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}});var Vf=$((Zi,jf)=>{"use strict";Zi.__esModule=!0;var $w=Le();Zi.default=function(t){t.registerDecorator("inline",function(e,r,n,i){var o=e;return r.partials||(r.partials={},o=function(s,a){var l=n.partials;n.partials=$w.extend({},l,r.partials);var u=e(s,a);return n.partials=l,u}),r.partials[i.args[0]]=i.fn,o})};jf.exports=Zi.default});var Df=$(Zs=>{"use strict";Zs.__esModule=!0;Zs.registerDefaultDecorators=Pw;function xw(t){return t&&t.__esModule?t:{default:t}}var kw=Vf(),Ew=xw(kw);function Pw(t){Ew.default(t)}});var ea=$((eo,qf)=>{"use strict";eo.__esModule=!0;var Cw=Le(),Or={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var r=Cw.indexOf(Or.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},log:function(e){if(e=Or.lookupLevel(e),typeof console<"u"&&Or.lookupLevel(Or.level)<=e){var r=Or.methodMap[e];console[r]||(r="log");for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];console[r].apply(console,i)}}};eo.default=Or;qf.exports=eo.default});var ta=$(kn=>{"use strict";kn.__esModule=!0;kn.createProtoAccessControl=Tw;kn.resultIsAllowed=Aw;kn.resetLoggedProperties=Mw;function Iw(t){return t&&t.__esModule?t:{default:t}}var Ff=Le(),Rw=ea(),Nw=Iw(Rw),to=Object.create(null);function Tw(t){var e=Object.create(null);e.__proto__=!1,Ff.extend(e,t.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,Ff.extend(r,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:t.allowProtoMethodsByDefault}}}function Aw(t,e,r){return Bf(typeof t=="function"?e.methods:e.properties,r)}function Bf(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(Ow(e),!1)}function Ow(t){to[t]!==!0&&(to[t]=!0,Nw.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
|
|
102
|
+
You can add a runtime option to disable the check or this warning:
|
|
103
|
+
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function Mw(){Object.keys(to).forEach(function(t){delete to[t]})}});var no=$(gt=>{"use strict";gt.__esModule=!0;gt.HandlebarsEnvironment=ia;function Hf(t){return t&&t.__esModule?t:{default:t}}var rr=Le(),Lw=Ge(),ra=Hf(Lw),jw=Qs(),Vw=Df(),Dw=ea(),ro=Hf(Dw),qw=ta(),Fw="4.7.9";gt.VERSION=Fw;var Bw=8;gt.COMPILER_REVISION=Bw;var Hw=7;gt.LAST_COMPATIBLE_COMPILER_REVISION=Hw;var Uw={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};gt.REVISION_CHANGES=Uw;var na="[object Object]";function ia(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},jw.registerDefaultHelpers(this),Vw.registerDefaultDecorators(this)}ia.prototype={constructor:ia,logger:ro.default,log:ro.default.log,registerHelper:function(e,r){if(rr.toString.call(e)===na){if(r)throw new ra.default("Arg not supported with multiple helpers");rr.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(rr.toString.call(e)===na)rr.extend(this.partials,e);else{if(typeof r>"u")throw new ra.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,r){if(rr.toString.call(e)===na){if(r)throw new ra.default("Arg not supported with multiple decorators");rr.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){qw.resetLoggedProperties()}};var zw=ro.default.log;gt.log=zw;gt.createFrame=rr.createFrame;gt.logger=ro.default});var zf=$((io,Uf)=>{"use strict";io.__esModule=!0;function oa(t){this.string=t}oa.prototype.toString=oa.prototype.toHTML=function(){return""+this.string};io.default=oa;Uf.exports=io.default});var Wf=$(sa=>{"use strict";sa.__esModule=!0;sa.wrapHelper=Ww;function Ww(t,e){if(typeof t!="function")return t;var r=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)};return r}});var Qf=$(Bt=>{"use strict";Bt.__esModule=!0;Bt.checkRevision=Qw;Bt.template=Zw;Bt.wrapProgram=oo;Bt.resolvePartial=e_;Bt.invokePartial=t_;Bt.noop=Yf;function Gw(t){return t&&t.__esModule?t:{default:t}}function Kw(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var Jw=Le(),Mr=Kw(Jw),Yw=Ge(),Nt=Gw(Yw),Tt=no(),Gf=Qs(),Xw=Wf(),Kf=ta();function Qw(t){var e=t&&t[0]||1,r=Tt.COMPILER_REVISION;if(!(e>=Tt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Tt.COMPILER_REVISION))if(e<Tt.LAST_COMPATIBLE_COMPILER_REVISION){var n=Tt.REVISION_CHANGES[r],i=Tt.REVISION_CHANGES[e];throw new Nt.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+i+").")}else throw new Nt.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}function Zw(t,e){if(!e)throw new Nt.default("No environment passed to template");if(!t||!t.main)throw new Nt.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function n(s,a,l){l.hash&&(a=Mr.extend({},a,l.hash),l.ids&&(l.ids[0]=!0)),s=e.VM.resolvePartial.call(this,s,a,l),l.hooks=this.hooks,l.protoAccessControl=this.protoAccessControl;var u=e.VM.invokePartial.call(this,s,a,l);if(u==null&&e.compile&&(l.partials[l.name]=e.compile(s,t.compilerOptions,e),u=l.partials[l.name](a,l)),u!=null){if(l.indent){for(var p=u.split(`
|
|
104
|
+
`),f=0,d=p.length;f<d&&!(!p[f]&&f+1===d);f++)p[f]=l.indent+p[f];u=p.join(`
|
|
105
|
+
`)}return u}else throw new Nt.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,l,u){if(!a||!(l in a))throw new Nt.default('"'+l+'" not defined in '+a,{loc:u});return i.lookupProperty(a,l)},lookupProperty:function(a,l){var u=a[l];if(u==null||Object.prototype.hasOwnProperty.call(a,l)||Kf.resultIsAllowed(u,i.protoAccessControl,l))return u},lookup:function(a,l){for(var u=a.length,p=0;p<u;p++){var f=a[p]&&i.lookupProperty(a[p],l);if(f!=null)return f}},lambda:function(a,l){return typeof a=="function"?a.call(l):a},escapeExpression:Mr.escapeExpression,invokePartial:n,fn:function(a){var l=t[a];return l.decorator=t[a+"_d"],l},programs:[],program:function(a,l,u,p,f){var d=this.programs[a],m=this.fn(a);return l||f||p||u?d=oo(this,a,m,l,u,p,f):d||(d=this.programs[a]=oo(this,a,m)),d},data:function(a,l){for(;a&&l--;)a=a._parent;return a},mergeIfNeeded:function(a,l){var u=a||l;return a&&l&&a!==l&&(u=Mr.extend({},l,a)),u},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function o(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=a.data;o._setup(a),!a.partial&&t.useData&&(l=r_(s,l));var u=void 0,p=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?u=s!=a.depths[0]?[s].concat(a.depths):a.depths:u=[s]);function f(d){return""+t.main(i,d,i.helpers,i.partials,l,p,u)}return f=Xf(t.main,f,i,a.depths||[],l,p),f(s,a)}return o.isTop=!0,o._setup=function(s){if(s.partial)i.protoAccessControl=s.protoAccessControl,i.helpers=s.helpers,i.partials=s.partials,i.decorators=s.decorators,i.hooks=s.hooks;else{var a={};Jf(a,e.helpers,i),Jf(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=Mr.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=Kf.createProtoAccessControl(s);var l=s.allowCallsToHelperMissing||r;Gf.moveHelperToHooks(i,"helperMissing",l),Gf.moveHelperToHooks(i,"blockHelperMissing",l)}},o._child=function(s,a,l,u){if(t.useBlockParams&&!l)throw new Nt.default("must pass block params");if(t.useDepths&&!u)throw new Nt.default("must pass parent depths");return oo(i,s,t[s],a,0,l,u)},o}function oo(t,e,r,n,i,o,s){function a(l){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=s;return s&&l!=s[0]&&!(l===t.nullContext&&s[0]===null)&&(p=[l].concat(s)),r(t,l,t.helpers,t.partials,u.data||n,o&&[u.blockParams].concat(o),p)}return a=Xf(r,a,t,s,n,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function e_(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=so(r.partials,t)):r.name==="@partial-block"?t=so(r.data,"partial-block"):t=so(r.partials,r.name),t}function t_(t,e,r){var n=so(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var i=void 0;if(r.fn&&r.fn!==Yf&&(function(){r.data=Tt.createFrame(r.data);var o=r.fn;i=r.data["partial-block"]=function(a){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=Tt.createFrame(l.data),l.data["partial-block"]=n,o(a,l)},o.partials&&(r.partials=Mr.extend({},r.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new Nt.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function Yf(){return""}function so(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function r_(t,e){return(!e||!("root"in e))&&(e=e?Tt.createFrame(e):{},e.root=t),e}function Xf(t,e,r,n,i,o){if(t.decorator){var s={};e=t.decorator(e,s,r,n&&n[0],i,o,n),Mr.extend(e,s)}return e}function Jf(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=n_(i,r)})}function n_(t,e){var r=e.lookupProperty;return Xw.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var aa=$((ao,Zf)=>{"use strict";ao.__esModule=!0;ao.default=function(t){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=e),t}};Zf.exports=ao.default});var ip=$((lo,np)=>{"use strict";lo.__esModule=!0;function ca(t){return t&&t.__esModule?t:{default:t}}function ua(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var i_=no(),ep=ua(i_),o_=zf(),s_=ca(o_),a_=Ge(),l_=ca(a_),c_=Le(),la=ua(c_),u_=Qf(),tp=ua(u_),f_=aa(),p_=ca(f_);function rp(){var t=new ep.HandlebarsEnvironment;return la.extend(t,ep),t.SafeString=s_.default,t.Exception=l_.default,t.Utils=la,t.escapeExpression=la.escapeExpression,t.VM=tp,t.template=function(e){return tp.template(e,t)},t}var En=rp();En.create=rp;p_.default(En);En.default=En;lo.default=En;np.exports=lo.default});var fa=$((co,sp)=>{"use strict";co.__esModule=!0;var op={helpers:{helperExpression:function(e){return e.type==="SubExpression"||(e.type==="MustacheStatement"||e.type==="BlockStatement")&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return e.parts.length===1&&!op.helpers.scopedId(e)&&!e.depth}}};co.default=op;sp.exports=co.default});var lp=$((uo,ap)=>{"use strict";uo.__esModule=!0;var d_=(function(){var t={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(i,o,s,a,l,u,p){var f=u.length-1;switch(l){case 1:return u[f-1];case 2:this.$=a.prepareProgram(u[f]);break;case 3:this.$=u[f];break;case 4:this.$=u[f];break;case 5:this.$=u[f];break;case 6:this.$=u[f];break;case 7:this.$=u[f];break;case 8:this.$=u[f];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(u[f]),strip:a.stripFlags(u[f],u[f]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:u[f],value:u[f],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(u[f-2],u[f-1],u[f],this._$);break;case 12:this.$={path:u[f-3],params:u[f-2],hash:u[f-1]};break;case 13:this.$=a.prepareBlock(u[f-3],u[f-2],u[f-1],u[f],!1,this._$);break;case 14:this.$=a.prepareBlock(u[f-3],u[f-2],u[f-1],u[f],!0,this._$);break;case 15:this.$={open:u[f-5],path:u[f-4],params:u[f-3],hash:u[f-2],blockParams:u[f-1],strip:a.stripFlags(u[f-5],u[f])};break;case 16:this.$={path:u[f-4],params:u[f-3],hash:u[f-2],blockParams:u[f-1],strip:a.stripFlags(u[f-5],u[f])};break;case 17:this.$={path:u[f-4],params:u[f-3],hash:u[f-2],blockParams:u[f-1],strip:a.stripFlags(u[f-5],u[f])};break;case 18:this.$={strip:a.stripFlags(u[f-1],u[f-1]),program:u[f]};break;case 19:var d=a.prepareBlock(u[f-2],u[f-1],u[f],u[f],!1,this._$),m=a.prepareProgram([d],u[f-1].loc);m.chained=!0,this.$={strip:u[f-2].strip,program:m,chain:!0};break;case 20:this.$=u[f];break;case 21:this.$={path:u[f-1],strip:a.stripFlags(u[f-2],u[f])};break;case 22:this.$=a.prepareMustache(u[f-3],u[f-2],u[f-1],u[f-4],a.stripFlags(u[f-4],u[f]),this._$);break;case 23:this.$=a.prepareMustache(u[f-3],u[f-2],u[f-1],u[f-4],a.stripFlags(u[f-4],u[f]),this._$);break;case 24:this.$={type:"PartialStatement",name:u[f-3],params:u[f-2],hash:u[f-1],indent:"",strip:a.stripFlags(u[f-4],u[f]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(u[f-2],u[f-1],u[f],this._$);break;case 26:this.$={path:u[f-3],params:u[f-2],hash:u[f-1],strip:a.stripFlags(u[f-4],u[f])};break;case 27:this.$=u[f];break;case 28:this.$=u[f];break;case 29:this.$={type:"SubExpression",path:u[f-3],params:u[f-2],hash:u[f-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:u[f],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(u[f-2]),value:u[f],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(u[f-1]);break;case 33:this.$=u[f];break;case 34:this.$=u[f];break;case 35:this.$={type:"StringLiteral",value:u[f],original:u[f],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(u[f]),original:Number(u[f]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:u[f]==="true",original:u[f]==="true",loc:a.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:a.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:a.locInfo(this._$)};break;case 40:this.$=u[f];break;case 41:this.$=u[f];break;case 42:this.$=a.preparePath(!0,u[f],this._$);break;case 43:this.$=a.preparePath(!1,u[f],this._$);break;case 44:u[f-2].push({part:a.id(u[f]),original:u[f],separator:u[f-1]}),this.$=u[f-2];break;case 45:this.$=[{part:a.id(u[f]),original:u[f]}];break;case 46:this.$=[];break;case 47:u[f-1].push(u[f]);break;case 48:this.$=[];break;case 49:u[f-1].push(u[f]);break;case 50:this.$=[];break;case 51:u[f-1].push(u[f]);break;case 58:this.$=[];break;case 59:u[f-1].push(u[f]);break;case 64:this.$=[];break;case 65:u[f-1].push(u[f]);break;case 70:this.$=[];break;case 71:u[f-1].push(u[f]);break;case 78:this.$=[];break;case 79:u[f-1].push(u[f]);break;case 82:this.$=[];break;case 83:u[f-1].push(u[f]);break;case 86:this.$=[];break;case 87:u[f-1].push(u[f]);break;case 90:this.$=[];break;case 91:u[f-1].push(u[f]);break;case 94:this.$=[];break;case 95:u[f-1].push(u[f]);break;case 98:this.$=[u[f]];break;case 99:u[f-1].push(u[f]);break;case 100:this.$=[u[f]];break;case 101:u[f-1].push(u[f]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(i,o){throw new Error(i)},parse:function(i){var o=this,s=[0],a=[null],l=[],u=this.table,p="",f=0,d=0,m=0,g=2,y=1;this.lexer.setInput(i),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var _=this.lexer.yylloc;l.push(_);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function L(ae){s.length=s.length-2*ae,a.length=a.length-ae,l.length=l.length-ae}function q(){var ae;return ae=o.lexer.lex()||1,typeof ae!="number"&&(ae=o.symbols_[ae]||ae),ae}for(var A,T,M,X,fe,Ie,$e={},qe,Re,it,ot;;){if(M=s[s.length-1],this.defaultActions[M]?X=this.defaultActions[M]:((A===null||typeof A>"u")&&(A=q()),X=u[M]&&u[M][A]),typeof X>"u"||!X.length||!X[0]){var St="";if(!m){ot=[];for(qe in u[M])this.terminals_[qe]&&qe>2&&ot.push("'"+this.terminals_[qe]+"'");this.lexer.showPosition?St="Parse error on line "+(f+1)+`:
|
|
106
|
+
`+this.lexer.showPosition()+`
|
|
107
|
+
Expecting `+ot.join(", ")+", got '"+(this.terminals_[A]||A)+"'":St="Parse error on line "+(f+1)+": Unexpected "+(A==1?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(St,{text:this.lexer.match,token:this.terminals_[A]||A,line:this.lexer.yylineno,loc:_,expected:ot})}}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+A);switch(X[0]){case 1:s.push(A),a.push(this.lexer.yytext),l.push(this.lexer.yylloc),s.push(X[1]),A=null,T?(A=T,T=null):(d=this.lexer.yyleng,p=this.lexer.yytext,f=this.lexer.yylineno,_=this.lexer.yylloc,m>0&&m--);break;case 2:if(Re=this.productions_[X[1]][1],$e.$=a[a.length-Re],$e._$={first_line:l[l.length-(Re||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(Re||1)].first_column,last_column:l[l.length-1].last_column},b&&($e._$.range=[l[l.length-(Re||1)].range[0],l[l.length-1].range[1]]),Ie=this.performAction.call($e,p,d,f,this.yy,X[1],a,l),typeof Ie<"u")return Ie;Re&&(s=s.slice(0,-1*Re*2),a=a.slice(0,-1*Re),l=l.slice(0,-1*Re)),s.push(this.productions_[X[1]][0]),a.push($e.$),l.push($e._$),it=u[s[s.length-2]][s[s.length-1]],s.push(it);break;case 3:return!0}}return!0}},e=(function(){var n={EOF:1,parseError:function(o,s){if(this.yy.parser)this.yy.parser.parseError(o,s);else throw new Error(o)},setInput:function(o){return this._input=o,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var s=o.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var s=o.length,a=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===l.length?this.yylloc.first_column:0)+l[l.length-a.length].length-a[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-s]),this},more:function(){return this._more=!0,this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),s=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
108
|
+
`+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,a,l,u,p;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),d=0;d<f.length&&(a=this._input.match(this.rules[f[d]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,l=d,!this.options.flex)));d++);return s?(p=s[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,f[l],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
109
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return typeof o<"u"?o:this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(o){this.begin(o)}};return n.options={},n.performAction=function(o,s,a,l){function u(f,d){return s.yytext=s.yytext.substring(f,s.yyleng-d+f)}var p=l;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(u(0,1),this.begin("emu")):this.begin("mu"),s.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(u(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(s.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return s.yytext=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=u(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return s.yytext=s.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();t.lexer=e;function r(){this.yy={}}return r.prototype=t,t.Parser=r,new r})();uo.default=d_;ap.exports=uo.default});var mo=$((ho,fp)=>{"use strict";ho.__esModule=!0;function h_(t){return t&&t.__esModule?t:{default:t}}var m_=Ge(),pa=h_(m_);function fo(){this.parents=[]}fo.prototype={constructor:fo,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!fo.prototype[n.type])throw new pa.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},acceptRequired:function(e,r){if(this.acceptKey(e,r),!e[r])throw new pa.default(e.type+" requires "+r)},acceptArray:function(e){for(var r=0,n=e.length;r<n;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,n--)},accept:function(e){if(e){if(!this[e.type])throw new pa.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:po,Decorator:po,BlockStatement:cp,DecoratorBlock:cp,PartialStatement:up,PartialBlockStatement:function(e){up.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:po,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,"value")}};function po(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function cp(t){po.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function up(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}ho.default=fo;fp.exports=ho.default});var dp=$((go,pp)=>{"use strict";go.__esModule=!0;function g_(t){return t&&t.__esModule?t:{default:t}}var y_=mo(),v_=g_(y_);function yt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}yt.prototype=new v_.default;yt.prototype.Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,i=0,o=n.length;i<o;i++){var s=n[i],a=this.accept(s);if(a){var l=da(n,i,r),u=ha(n,i,r),p=a.openStandalone&&l,f=a.closeStandalone&&u,d=a.inlineStandalone&&l&&u;a.close&&nr(n,i,!0),a.open&&Ht(n,i,!0),e&&d&&(nr(n,i),Ht(n,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&p&&(nr((s.program||s.inverse).body),Ht(n,i)),e&&f&&(nr(n,i),Ht((s.inverse||s.program).body))}}return t};yt.prototype.BlockStatement=yt.prototype.DecoratorBlock=yt.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,r=t.program&&t.inverse,n=r,i=r;if(r&&r.chained)for(n=r.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:ha(e.body),closeStandalone:da((n||e).body)};if(t.openStrip.close&&nr(e.body,null,!0),r){var s=t.inverseStrip;s.open&&Ht(e.body,null,!0),s.close&&nr(n.body,null,!0),t.closeStrip.open&&Ht(i.body,null,!0),!this.options.ignoreStandalone&&da(e.body)&&ha(n.body)&&(Ht(e.body),nr(n.body))}else t.closeStrip.open&&Ht(e.body,null,!0);return o};yt.prototype.Decorator=yt.prototype.MustacheStatement=function(t){return t.strip};yt.prototype.PartialStatement=yt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function da(t,e,r){e===void 0&&(e=t.length);var n=t[e-1],i=t[e-2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function ha(t,e,r){e===void 0&&(e=-1);var n=t[e+1],i=t[e+2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function nr(t,e,r){var n=t[e==null?0:e+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var i=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==i}}function Ht(t,e,r){var n=t[e==null?t.length-1:e-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var i=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==i,n.leftStripped}}go.default=yt;pp.exports=go.default});var hp=$(Xe=>{"use strict";Xe.__esModule=!0;Xe.SourceLocation=b_;Xe.id=S_;Xe.stripFlags=$_;Xe.stripComment=x_;Xe.preparePath=k_;Xe.prepareMustache=E_;Xe.prepareRawBlock=P_;Xe.prepareBlock=C_;Xe.prepareProgram=I_;Xe.preparePartialBlock=R_;function w_(t){return t&&t.__esModule?t:{default:t}}var __=Ge(),ma=w_(__);function ga(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new ma.default(t.path.original+" doesn't match "+e,r)}}function b_(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function S_(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function $_(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function x_(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function k_(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",i=[],o=0,s=0,a=e.length;s<a;s++){var l=e[s].part,u=e[s].original!==l;if(n+=(e[s].separator||"")+l,!u&&(l===".."||l==="."||l==="this")){if(i.length>0)throw new ma.default("Invalid path: "+n,{loc:r});l===".."&&o++}else i.push(l)}return{type:"PathExpression",data:t,depth:o,parts:i,original:n,loc:r}}function E_(t,e,r,n,i,o){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",l=/\*/.test(n);return{type:l?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:a,strip:i,loc:this.locInfo(o)}}function P_(t,e,r,n){ga(t,r),n=this.locInfo(n);var i={type:"Program",body:e,strip:{},loc:n};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function C_(t,e,r,n,i,o){n&&n.path&&ga(t,n);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,l=void 0;if(r){if(s)throw new ma.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),l=r.strip,a=r.program}return i&&(i=a,a=e,e=i),{type:s?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:a,openStrip:t.strip,inverseStrip:l,closeStrip:n&&n.strip,loc:this.locInfo(o)}}function I_(t,e){if(!e&&t.length){var r=t[0].loc,n=t[t.length-1].loc;r&&n&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function R_(t,e,r,n){return ga(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}});var gp=$(Cn=>{"use strict";Cn.__esModule=!0;Cn.parseWithoutProcessing=mp;Cn.parse=D_;function N_(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function wa(t){return t&&t.__esModule?t:{default:t}}var T_=lp(),ya=wa(T_),A_=dp(),O_=wa(A_),M_=hp(),L_=N_(M_),j_=Ge(),Pn=wa(j_),V_=Le();Cn.parser=ya.default;var yo={};V_.extend(yo,L_);function mp(t,e){if(t.type==="Program")return q_(t),t;ya.default.yy=yo,yo.locInfo=function(n){return new yo.SourceLocation(e&&e.srcName,n)};var r=ya.default.parse(t);return r}function D_(t,e){var r=mp(t,e),n=new O_.default(e);return n.accept(r)}function q_(t){va(t)}function va(t){if(t!=null){if(Array.isArray(t)){t.forEach(va);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!F_(t.depth))throw new Pn.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new Pn.default("Invalid AST: PathExpression.parts must be an array");for(var e=0;e<t.parts.length;e++)if(typeof t.parts[e]!="string")throw new Pn.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new Pn.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new Pn.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(r){r!=="loc"&&va(t[r])})}}}function F_(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var _p=$(Tn=>{"use strict";Tn.__esModule=!0;Tn.Compiler=_a;Tn.precompile=z_;Tn.compile=W_;function vp(t){return t&&t.__esModule?t:{default:t}}var B_=Ge(),Rn=vp(B_),Nn=Le(),H_=fa(),In=vp(H_),U_=[].slice;function _a(){}_a.prototype={compiler:_a,equals:function(e){var r=this.opcodes.length;if(e.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var i=this.opcodes[n],o=e.opcodes[n];if(i.opcode!==o.opcode||!wp(i.args,o.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,r){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=r,this.stringParams=r.stringParams,this.trackIds=r.trackIds,r.blockParams=r.blockParams||[],r.knownHelpers=Nn.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(e)},compileProgram:function(e){var r=new this.compiler,n=r.compile(e,this.options),i=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[i]=n,this.useDepths=this.useDepths||n.useDepths,i},accept:function(e){if(!this[e.type])throw new Rn.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var r=this[e.type](e);return this.sourceNode.shift(),r},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var r=e.body,n=r.length,i=0;i<n;i++)this.accept(r[i]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){yp(e);var r=e.program,n=e.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,r,n):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var r=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,r,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var r=e.program;r&&(r=this.compileProgram(e.program));var n=e.params;if(n.length>1)throw new Rn.default("Unsupported number of partial arguments: "+n.length,e);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=e.name.original,o=e.name.type==="SubExpression";o&&this.accept(e.name),this.setupFullMustacheParams(e,r,void 0,!0);var s=e.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",o,i,s),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){yp(e);var r=this.classifySexpr(e);r==="simple"?this.simpleSexpr(e):r==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,r,n){var i=e.path,o=i.parts[0],s=r!=null||n!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",r),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,s)},simpleSexpr:function(e){var r=e.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,r,n){var i=this.setupFullMustacheParams(e,r,n),o=e.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new Rn.default("You specified knownHelpersOnly, but used the unknown helper "+s,e);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",i.length,o.original,In.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],n=In.default.helpers.scopedId(e),i=!e.depth&&!n&&this.blockParamIndex(r);i?this.opcode("lookupBlockParam",i,e.parts):r?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,n):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var r=e.pairs,n=0,i=r.length;for(this.opcode("pushHash");n<i;n++)this.pushParam(r[n].value);for(;n--;)this.opcode("assignToHash",r[n].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:U_.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=In.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&In.default.helpers.helperExpression(e),o=!n&&(i||r);if(o&&!i){var s=e.path.parts[0],a=this.options;a.knownHelpers[s]?i=!0:a.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},pushParams:function(e){for(var r=0,n=e.length;r<n;r++)this.pushParam(e[r])},pushParam:function(e){var r=e.value!=null?e.value:e.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",r,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var n=void 0;if(e.parts&&!In.default.helpers.scopedId(e)&&!e.depth&&(n=this.blockParamIndex(e.parts[0])),n){var i=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else r=e.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,r)}this.accept(e)}},setupFullMustacheParams:function(e,r,n,i){var o=e.params;return this.pushParams(o),this.opcode("pushProgram",r),this.opcode("pushProgram",n),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(e){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],o=i&&Nn.indexOf(i,e);if(i&&o>=0)return[r,o]}}};function z_(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new Rn.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=r.parse(t,e),i=new r.Compiler().compile(n,e);return new r.JavaScriptCompiler().compile(i,e)}function W_(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new Rn.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Nn.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=void 0;function i(){var s=r.parse(t,e),a=new r.Compiler().compile(s,e),l=new r.JavaScriptCompiler().compile(a,e,void 0,!0);return r.template(l)}function o(s,a){return n||(n=i()),n.call(this,s,a)}return o._setup=function(s){return n||(n=i()),n._setup(s)},o._child=function(s,a,l,u){return n||(n=i()),n._child(s,a,l,u)},o}function wp(t,e){if(t===e)return!0;if(Nn.isArray(t)&&Nn.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!wp(t[r],e[r]))return!1;return!0}}function yp(t){if(!t.path.parts){var e=t.path;t.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}});var Sp=$(ba=>{var bp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ba.encode=function(t){if(0<=t&&t<bp.length)return bp[t];throw new TypeError("Must be between 0 and 63: "+t)};ba.decode=function(t){var e=65,r=90,n=97,i=122,o=48,s=57,a=43,l=47,u=26,p=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+u:o<=t&&t<=s?t-o+p:t==a?62:t==l?63:-1}});var xa=$($a=>{var $p=Sp(),Sa=5,xp=1<<Sa,kp=xp-1,Ep=xp;function G_(t){return t<0?(-t<<1)+1:(t<<1)+0}function K_(t){var e=(t&1)===1,r=t>>1;return e?-r:r}$a.encode=function(e){var r="",n,i=G_(e);do n=i&kp,i>>>=Sa,i>0&&(n|=Ep),r+=$p.encode(n);while(i>0);return r};$a.decode=function(e,r,n){var i=e.length,o=0,s=0,a,l;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(l=$p.decode(e.charCodeAt(r++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(l&Ep),l&=kp,o=o+(l<<s),s+=Sa}while(a);n.value=K_(o),n.rest=r}});var Vr=$(Ne=>{function J_(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Ne.getArg=J_;var Pp=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Y_=/^data:.+\,.+$/;function An(t){var e=t.match(Pp);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Ne.urlParse=An;function Lr(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}Ne.urlGenerate=Lr;function ka(t){var e=t,r=An(t);if(r){if(!r.path)return t;e=r.path}for(var n=Ne.isAbsolute(e),i=e.split(/\/+/),o,s=0,a=i.length-1;a>=0;a--)o=i[a],o==="."?i.splice(a,1):o===".."?s++:s>0&&(o===""?(i.splice(a+1,s),s=0):(i.splice(a,2),s--));return e=i.join("/"),e===""&&(e=n?"/":"."),r?(r.path=e,Lr(r)):e}Ne.normalize=ka;function Cp(t,e){t===""&&(t="."),e===""&&(e=".");var r=An(e),n=An(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Lr(r);if(r||e.match(Y_))return e;if(n&&!n.host&&!n.path)return n.host=e,Lr(n);var i=e.charAt(0)==="/"?e:ka(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Lr(n)):i}Ne.join=Cp;Ne.isAbsolute=function(t){return t.charAt(0)==="/"||Pp.test(t)};function X_(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}Ne.relative=X_;var Ip=(function(){var t=Object.create(null);return!("__proto__"in t)})();function Rp(t){return t}function Q_(t){return Np(t)?"$"+t:t}Ne.toSetString=Ip?Rp:Q_;function Z_(t){return Np(t)?t.slice(1):t}Ne.fromSetString=Ip?Rp:Z_;function Np(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function eb(t,e,r){var n=jr(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:jr(t.name,e.name)}Ne.compareByOriginalPositions=eb;function tb(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=jr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:jr(t.name,e.name)}Ne.compareByGeneratedPositionsDeflated=tb;function jr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function rb(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=jr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:jr(t.name,e.name)}Ne.compareByGeneratedPositionsInflated=rb;function nb(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Ne.parseSourceMapInput=nb;function ib(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=An(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=Cp(Lr(n),e)}return ka(e)}Ne.computeSourceURL=ib});var Ca=$(Tp=>{var Ea=Vr(),Pa=Object.prototype.hasOwnProperty,ir=typeof Map<"u";function At(){this._array=[],this._set=ir?new Map:Object.create(null)}At.fromArray=function(e,r){for(var n=new At,i=0,o=e.length;i<o;i++)n.add(e[i],r);return n};At.prototype.size=function(){return ir?this._set.size:Object.getOwnPropertyNames(this._set).length};At.prototype.add=function(e,r){var n=ir?e:Ea.toSetString(e),i=ir?this.has(e):Pa.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(e),i||(ir?this._set.set(e,o):this._set[n]=o)};At.prototype.has=function(e){if(ir)return this._set.has(e);var r=Ea.toSetString(e);return Pa.call(this._set,r)};At.prototype.indexOf=function(e){if(ir){var r=this._set.get(e);if(r>=0)return r}else{var n=Ea.toSetString(e);if(Pa.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};At.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};At.prototype.toArray=function(){return this._array.slice()};Tp.ArraySet=At});var Mp=$(Op=>{var Ap=Vr();function ob(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return n>r||n==r&&o>=i||Ap.compareByGeneratedPositionsInflated(t,e)<=0}function vo(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}vo.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};vo.prototype.add=function(e){ob(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};vo.prototype.toArray=function(){return this._sorted||(this._array.sort(Ap.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Op.MappingList=vo});var Ia=$(Lp=>{var On=xa(),_e=Vr(),wo=Ca().ArraySet,sb=Mp().MappingList;function Qe(t){t||(t={}),this._file=_e.getArg(t,"file",null),this._sourceRoot=_e.getArg(t,"sourceRoot",null),this._skipValidation=_e.getArg(t,"skipValidation",!1),this._sources=new wo,this._names=new wo,this._mappings=new sb,this._sourcesContents=null}Qe.prototype._version=3;Qe.fromSourceMap=function(e){var r=e.sourceRoot,n=new Qe({file:e.file,sourceRoot:r});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=_e.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),e.sources.forEach(function(i){var o=i;r!==null&&(o=_e.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=e.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};Qe.prototype.addMapping=function(e){var r=_e.getArg(e,"generated"),n=_e.getArg(e,"original",null),i=_e.getArg(e,"source",null),o=_e.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,n,i,o),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:o})};Qe.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=_e.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[_e.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[_e.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Qe.prototype.applySourceMap=function(e,r,n){var i=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var o=this._sourceRoot;o!=null&&(i=_e.relative(o,i));var s=new wo,a=new wo;this._mappings.unsortedForEach(function(l){if(l.source===i&&l.originalLine!=null){var u=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});u.source!=null&&(l.source=u.source,n!=null&&(l.source=_e.join(n,l.source)),o!=null&&(l.source=_e.relative(o,l.source)),l.originalLine=u.line,l.originalColumn=u.column,u.name!=null&&(l.name=u.name))}var p=l.source;p!=null&&!s.has(p)&&s.add(p);var f=l.name;f!=null&&!a.has(f)&&a.add(f)},this),this._sources=s,this._names=a,e.sources.forEach(function(l){var u=e.sourceContentFor(l);u!=null&&(n!=null&&(l=_e.join(n,l)),o!=null&&(l=_e.relative(o,l)),this.setSourceContent(l,u))},this)};Qe.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i}))}};Qe.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,o=0,s=0,a="",l,u,p,f,d=this._mappings.toArray(),m=0,g=d.length;m<g;m++){if(u=d[m],l="",u.generatedLine!==r)for(e=0;u.generatedLine!==r;)l+=";",r++;else if(m>0){if(!_e.compareByGeneratedPositionsInflated(u,d[m-1]))continue;l+=","}l+=On.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(f=this._sources.indexOf(u.source),l+=On.encode(f-s),s=f,l+=On.encode(u.originalLine-1-i),i=u.originalLine-1,l+=On.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(p=this._names.indexOf(u.name),l+=On.encode(p-o),o=p)),a+=l}return a};Qe.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=_e.relative(r,n));var i=_e.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Qe.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};Qe.prototype.toString=function(){return JSON.stringify(this.toJSON())};Lp.SourceMapGenerator=Qe});var jp=$(or=>{or.GREATEST_LOWER_BOUND=1;or.LEAST_UPPER_BOUND=2;function Ra(t,e,r,n,i,o){var s=Math.floor((e-t)/2)+t,a=i(r,n[s],!0);return a===0?s:a>0?e-s>1?Ra(s,e,r,n,i,o):o==or.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-t>1?Ra(t,s,r,n,i,o):o==or.LEAST_UPPER_BOUND?s:t<0?-1:t}or.search=function(e,r,n,i){if(r.length===0)return-1;var o=Ra(-1,r.length,e,r,n,i||or.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o}});var Dp=$(Vp=>{function Na(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function ab(t,e){return Math.round(t+Math.random()*(e-t))}function Ta(t,e,r,n){if(r<n){var i=ab(r,n),o=r-1;Na(t,i,n);for(var s=t[n],a=r;a<n;a++)e(t[a],s)<=0&&(o+=1,Na(t,o,a));Na(t,o+1,a);var l=o+1;Ta(t,e,r,l-1),Ta(t,e,l+1,n)}}Vp.quickSort=function(t,e){Ta(t,e,0,t.length-1)}});var Fp=$(_o=>{var F=Vr(),Aa=jp(),Dr=Ca().ArraySet,lb=xa(),Mn=Dp().quickSort;function de(t,e){var r=t;return typeof t=="string"&&(r=F.parseSourceMapInput(t)),r.sections!=null?new lt(r,e):new Ee(r,e)}de.fromSourceMap=function(t,e){return Ee.fromSourceMap(t,e)};de.prototype._version=3;de.prototype.__generatedMappings=null;Object.defineProperty(de.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});de.prototype.__originalMappings=null;Object.defineProperty(de.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});de.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};de.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};de.GENERATED_ORDER=1;de.ORIGINAL_ORDER=2;de.GREATEST_LOWER_BOUND=1;de.LEAST_UPPER_BOUND=2;de.prototype.eachMapping=function(e,r,n){var i=r||null,o=n||de.GENERATED_ORDER,s;switch(o){case de.GENERATED_ORDER:s=this._generatedMappings;break;case de.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(l){var u=l.source===null?null:this._sources.at(l.source);return u=F.computeSourceURL(a,u,this._sourceMapURL),{source:u,generatedLine:l.generatedLine,generatedColumn:l.generatedColumn,originalLine:l.originalLine,originalColumn:l.originalColumn,name:l.name===null?null:this._names.at(l.name)}},this).forEach(e,i)};de.prototype.allGeneratedPositionsFor=function(e){var r=F.getArg(e,"line"),n={source:F.getArg(e,"source"),originalLine:r,originalColumn:F.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,Aa.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(e.column===void 0)for(var a=s.originalLine;s&&s.originalLine===a;)i.push({line:F.getArg(s,"generatedLine",null),column:F.getArg(s,"generatedColumn",null),lastColumn:F.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var l=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==l;)i.push({line:F.getArg(s,"generatedLine",null),column:F.getArg(s,"generatedColumn",null),lastColumn:F.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};_o.SourceMapConsumer=de;function Ee(t,e){var r=t;typeof t=="string"&&(r=F.parseSourceMapInput(t));var n=F.getArg(r,"version"),i=F.getArg(r,"sources"),o=F.getArg(r,"names",[]),s=F.getArg(r,"sourceRoot",null),a=F.getArg(r,"sourcesContent",null),l=F.getArg(r,"mappings"),u=F.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=F.normalize(s)),i=i.map(String).map(F.normalize).map(function(p){return s&&F.isAbsolute(s)&&F.isAbsolute(p)?F.relative(s,p):p}),this._names=Dr.fromArray(o.map(String),!0),this._sources=Dr.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(p){return F.computeSourceURL(s,p,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=e,this.file=u}Ee.prototype=Object.create(de.prototype);Ee.prototype.consumer=de;Ee.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=F.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};Ee.fromSourceMap=function(e,r){var n=Object.create(Ee.prototype),i=n._names=Dr.fromArray(e._names.toArray(),!0),o=n._sources=Dr.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return F.computeSourceURL(n.sourceRoot,m,r)});for(var s=e._mappings.toArray().slice(),a=n.__generatedMappings=[],l=n.__originalMappings=[],u=0,p=s.length;u<p;u++){var f=s[u],d=new qp;d.generatedLine=f.generatedLine,d.generatedColumn=f.generatedColumn,f.source&&(d.source=o.indexOf(f.source),d.originalLine=f.originalLine,d.originalColumn=f.originalColumn,f.name&&(d.name=i.indexOf(f.name)),l.push(d)),a.push(d)}return Mn(n.__originalMappings,F.compareByOriginalPositions),n};Ee.prototype._version=3;Object.defineProperty(Ee.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function qp(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Ee.prototype._parseMappings=function(e,r){for(var n=1,i=0,o=0,s=0,a=0,l=0,u=e.length,p=0,f={},d={},m=[],g=[],y,_,b,L,q;p<u;)if(e.charAt(p)===";")n++,p++,i=0;else if(e.charAt(p)===",")p++;else{for(y=new qp,y.generatedLine=n,L=p;L<u&&!this._charIsMappingSeparator(e,L);L++);if(_=e.slice(p,L),b=f[_],b)p+=_.length;else{for(b=[];p<L;)lb.decode(e,p,d),q=d.value,p=d.rest,b.push(q);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");f[_]=b}y.generatedColumn=i+b[0],i=y.generatedColumn,b.length>1&&(y.source=a+b[1],a+=b[1],y.originalLine=o+b[2],o=y.originalLine,y.originalLine+=1,y.originalColumn=s+b[3],s=y.originalColumn,b.length>4&&(y.name=l+b[4],l+=b[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}Mn(g,F.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,Mn(m,F.compareByOriginalPositions),this.__originalMappings=m};Ee.prototype._findMapping=function(e,r,n,i,o,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return Aa.search(e,r,o,s)};Ee.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};Ee.prototype.originalPositionFor=function(e){var r={generatedLine:F.getArg(e,"line"),generatedColumn:F.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",F.compareByGeneratedPositionsDeflated,F.getArg(e,"bias",de.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=F.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=F.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=F.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:F.getArg(i,"originalLine",null),column:F.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Ee.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Ee.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i=e;this.sourceRoot!=null&&(i=F.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=F.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||o.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Ee.prototype.generatedPositionFor=function(e){var r=F.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:F.getArg(e,"line"),originalColumn:F.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,F.getArg(e,"bias",de.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:F.getArg(o,"generatedLine",null),column:F.getArg(o,"generatedColumn",null),lastColumn:F.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};_o.BasicSourceMapConsumer=Ee;function lt(t,e){var r=t;typeof t=="string"&&(r=F.parseSourceMapInput(t));var n=F.getArg(r,"version"),i=F.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Dr,this._names=new Dr;var o={line:-1,column:0};this._sections=i.map(function(s){if(s.url)throw new Error("Support for url field in sections not implemented.");var a=F.getArg(s,"offset"),l=F.getArg(a,"line"),u=F.getArg(a,"column");if(l<o.line||l===o.line&&u<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=a,{generatedOffset:{generatedLine:l+1,generatedColumn:u+1},consumer:new de(F.getArg(s,"map"),e)}})}lt.prototype=Object.create(de.prototype);lt.prototype.constructor=de;lt.prototype._version=3;Object.defineProperty(lt.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});lt.prototype.originalPositionFor=function(e){var r={generatedLine:F.getArg(e,"line"),generatedColumn:F.getArg(e,"column")},n=Aa.search(r,this._sections,function(o,s){var a=o.generatedLine-s.generatedOffset.generatedLine;return a||o.generatedColumn-s.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};lt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};lt.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],o=i.consumer.sourceContentFor(e,!0);if(o)return o}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};lt.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(F.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var o={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}};lt.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var a=o[s],l=i.consumer._sources.at(a.source);l=F.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var u=null;a.name&&(u=i.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var p={source:l,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}Mn(this.__generatedMappings,F.compareByGeneratedPositionsDeflated),Mn(this.__originalMappings,F.compareByOriginalPositions)};_o.IndexedSourceMapConsumer=lt});var Hp=$(Bp=>{var cb=Ia().SourceMapGenerator,bo=Vr(),ub=/(\r?\n)/,fb=10,qr="$$$isSourceNode$$$";function Ke(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[qr]=!0,n!=null&&this.add(n)}Ke.fromStringWithSourceMap=function(e,r,n){var i=new Ke,o=e.split(ub),s=0,a=function(){var d=g(),m=g()||"";return d+m;function g(){return s<o.length?o[s++]:void 0}},l=1,u=0,p=null;return r.eachMapping(function(d){if(p!==null)if(l<d.generatedLine)f(p,a()),l++,u=0;else{var m=o[s]||"",g=m.substr(0,d.generatedColumn-u);o[s]=m.substr(d.generatedColumn-u),u=d.generatedColumn,f(p,g),p=d;return}for(;l<d.generatedLine;)i.add(a()),l++;if(u<d.generatedColumn){var m=o[s]||"";i.add(m.substr(0,d.generatedColumn)),o[s]=m.substr(d.generatedColumn),u=d.generatedColumn}p=d},this),s<o.length&&(p&&f(p,a()),i.add(o.splice(s).join(""))),r.sources.forEach(function(d){var m=r.sourceContentFor(d);m!=null&&(n!=null&&(d=bo.join(n,d)),i.setSourceContent(d,m))}),i;function f(d,m){if(d===null||d.source===void 0)i.add(m);else{var g=n?bo.join(n,d.source):d.source;i.add(new Ke(d.originalLine,d.originalColumn,g,m,d.name))}}};Ke.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[qr]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Ke.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[qr]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Ke.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[qr]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};Ke.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};Ke.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[qr]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};Ke.prototype.setSourceContent=function(e,r){this.sourceContents[bo.toSetString(e)]=r};Ke.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][qr]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(bo.fromSetString(i[r]),this.sourceContents[i[r]])};Ke.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};Ke.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new cb(e),i=!1,o=null,s=null,a=null,l=null;return this.walk(function(u,p){r.code+=u,p.source!==null&&p.line!==null&&p.column!==null?((o!==p.source||s!==p.line||a!==p.column||l!==p.name)&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name}),o=p.source,s=p.line,a=p.column,l=p.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var f=0,d=u.length;f<d;f++)u.charCodeAt(f)===fb?(r.line++,r.column=0,f+1===d?(o=null,i=!1):i&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name})):r.column++}),this.walkSourceContents(function(u,p){n.setSourceContent(u,p)}),{code:r.code,map:n}};Bp.SourceNode=Ke});var Up=$(So=>{So.SourceMapGenerator=Ia().SourceMapGenerator;So.SourceMapConsumer=Fp().SourceMapConsumer;So.SourceNode=Hp().SourceNode});var Kp=$(($o,Gp)=>{"use strict";$o.__esModule=!0;var Ma=Le(),sr=void 0;try{(typeof define!="function"||!define.amd)&&(zp=Up(),sr=zp.SourceNode)}catch{}var zp;sr||(sr=function(t,e,r,n){this.src="",n&&this.add(n)},sr.prototype={add:function(e){Ma.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){Ma.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Oa(t,e,r){if(Ma.isArray(t)){for(var n=[],i=0,o=t.length;i<o;i++)n.push(e.wrap(t[i],r));return n}else if(typeof t=="boolean"||typeof t=="number")return t+"";return t}function Wp(t){this.srcFile=t,this.source=[]}Wp.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,r){this.source.unshift(this.wrap(e,r))},push:function(e,r){this.source.push(this.wrap(e,r))},merge:function(){var e=this.empty();return this.each(function(r){e.add([" ",r,`
|
|
110
|
+
`])}),e},each:function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},empty:function(){var e=this.currentLocation||{start:{}};return new sr(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof sr?e:(e=Oa(e,this,r),new sr(r.start.line,r.start.column,this.srcFile,e))},functionCall:function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var r=this,n=[];Object.keys(e).forEach(function(o){var s=Oa(e[o],r);s!=="undefined"&&n.push([r.quotedString(o),":",s])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var r=this.empty(),n=0,i=e.length;n<i;n++)n&&r.add(","),r.add(Oa(e[n],this));return r},generateArray:function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r}};$o.default=Wp;Gp.exports=$o.default});var Zp=$((xo,Qp)=>{"use strict";xo.__esModule=!0;function Xp(t){return t&&t.__esModule?t:{default:t}}var Jp=no(),pb=Ge(),La=Xp(pb),db=Le(),hb=Kp(),Yp=Xp(hb);function Fr(t){this.value=t}function Br(){}Br.prototype={nameLookup:function(e,r){return this.internalNameLookup(e,r)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=Jp.COMPILER_REVISION,r=Jp.REVISION_CHANGES[e];return[e,r]},appendToBuffer:function(e,r,n){return db.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,r,n,i){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,r),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var o=e.opcodes,s=void 0,a=void 0,l=void 0,u=void 0;for(l=0,u=o.length;l<u;l++)s=o[l],this.source.currentLocation=s.loc,a=a||s.loc,this[s.opcode].apply(this,s.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new La.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
|
|
111
|
+
`]),this.decorators.push("return fn;"),i?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
|
|
112
|
+
`),this.decorators.push(`}
|
|
113
|
+
`),this.decorators=this.decorators.merge()));var p=this.createFunctionContext(i);if(this.isChild)return p;var f={compiler:this.compilerInfo(),main:p};this.decorators&&(f.main_d=this.decorators,f.useDecorators=!0);var d=this.context,m=d.programs,g=d.decorators;for(l=0,u=m.length;l<u;l++)f[l]=m[l],g[l]&&(f[l+"_d"]=g[l],f.useDecorators=!0);return this.environment.usePartial&&(f.usePartial=!0),this.options.data&&(f.useData=!0),this.useDepths&&(f.useDepths=!0),this.useBlockParams&&(f.useBlockParams=!0),this.options.compat&&(f.compat=!0),i?f.compilerOptions=this.options:(f.compiler=JSON.stringify(f.compiler),this.source.currentLocation={start:{line:1,column:0}},f=this.objectLiteral(f),r.srcName?(f=f.toStringWithSourceMap({file:r.destName}),f.map=f.map&&f.map.toString()):f=f.toString()),f},preamble:function(){this.lastContext=0,this.source=new Yp.default(this.options.srcName),this.decorators=new Yp.default(this.options.srcName)},createFunctionContext:function(e){var r=this,n="",i=this.stackVars.concat(this.registers.list);i.length>0&&(n+=", "+i.join(", "));var o=0;Object.keys(this.aliases).forEach(function(l){var u=r.aliases[l];u.children&&u.referenceCount>1&&(n+=", alias"+ ++o+"="+l,u.children[0]="alias"+o)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var a=this.mergeSource(n);return e?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
|
|
114
|
+
`,a,"}"])},mergeSource:function(e){var r=this.environment.isSimple,n=!this.forceBuffer,i=void 0,o=void 0,s=void 0,a=void 0;return this.source.each(function(l){l.appendToBuffer?(s?l.prepend(" + "):s=l,a=l):(s&&(o?s.prepend("buffer += "):i=!0,a.add(";"),s=a=void 0),o=!0,r||(n=!1))}),n?s?(s.prepend("return "),a.add(";")):o||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),s?(s.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":`;
|
|
115
|
+
`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
|
|
116
|
+
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
117
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
118
|
+
return parent[propertyName];
|
|
119
|
+
}
|
|
120
|
+
return undefined
|
|
121
|
+
}
|
|
122
|
+
`.trim()},blockValue:function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",r),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,r,n,i){var o=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[o++])):this.pushContext(),this.resolvePath("context",e,o,r,n)},lookupBlockParam:function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},resolvePath:function(e,r,n,i,o){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(mb(this.options.strict&&o,this,r,n,e));return}for(var a=r.length,l=function(p){s.replaceStack(function(f){var d=s.nameLookup(f,r[p],e);return i?[" && ",d]:[" != null ? ",d," : ",f]})},u=n;u<a;u++)l(u)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,r,n){var i=this.popStack(),o=this.setupHelper(e,r),s=[];n&&s.push(o.name),s.push(i),this.options.strict||s.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(s,"||"),")"],l=this.source.functionCall(a,"call",o.callParams);this.push(l)},itemsSeparatedBy:function(e,r){var n=[];n.push(e[0]);for(var i=1;i<e.length;i++)n.push(r,e[i]);return n},invokeKnownHelper:function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,r),o=this.lastHelper=this.nameLookup("helpers",e,"helper"),s=["(","(helper = ",o," || ",n,")"];this.options.strict||(s[0]="(helper = ",s.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",s,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,r,n){var i=[],o=this.setupParams(r,1,i);e&&(r=this.popStack(),delete o.name),n&&(o.indent=JSON.stringify(n)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",e?i.unshift(r):i.unshift(this.nameLookup("partials",r,"partial")),this.options.compat&&(o.depths="depths"),o=this.objectLiteral(o),i.push(o),this.push(this.source.functionCall("container.invokePartial","",i))},assignToHash:function(e){var r=this.popStack(),n=void 0,i=void 0,o=void 0;this.trackIds&&(o=this.popStack()),this.stringParams&&(i=this.popStack(),n=this.popStack());var s=this.hash;n&&(s.contexts[e]=n),i&&(s.types[e]=i),o&&(s.ids[e]=o),s.values[e]=r},pushId:function(e,r,n){e==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):e==="PathExpression"?this.pushString(r):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:Br,compileChildren:function(e,r){for(var n=e.children,i=void 0,o=void 0,s=0,a=n.length;s<a;s++){i=n[s],o=new this.compiler;var l=this.matchExistingProgram(i);if(l==null){var u=this.context.programs.push("")-1;i.index=u,i.name="program"+u,this.context.programs[u]=o.compile(i,r,this.context,!this.precompile),this.context.decorators[u]=o.decorators,this.context.environments[u]=i,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=l.index,i.name="program"+l.index,this.useDepths=this.useDepths||l.useDepths,this.useBlockParams=this.useBlockParams||l.useBlockParams}},matchExistingProgram:function(e){for(var r=0,n=this.context.environments.length;r<n;r++){var i=this.context.environments[r];if(i&&i.equals(e))return i}},programExpression:function(e){var r=this.environment.children[e],n=[r.index,"data",r.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof Fr||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new Fr(e))},pushSource:function(e){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),e&&this.source.push(e)},replaceStack:function(e){var r=["("],n=void 0,i=void 0,o=void 0;if(!this.isInline())throw new La.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Fr)n=[s.value],r=["(",n],o=!0;else{i=!0;var a=this.incrStack();r=["((",this.push(a)," = ",s,")"],n=this.topStack()}var l=e.call(this,n);o||this.popStack(),i&&this.stackSlot--,this.push(r.concat(l,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var r=0,n=e.length;r<n;r++){var i=e[r];if(i instanceof Fr)this.compileStack.push(i);else{var o=this.incrStack();this.pushSource([o," = ",i,";"]),this.compileStack.push(o)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof Fr)return n.value;if(!r){if(!this.stackSlot)throw new La.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,r=e[e.length-1];return r instanceof Fr?r.value:r},contextName:function(e){return this.useDepths&&e?"depths["+e+"]":"depth"+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var r=this.aliases[e];return r?(r.referenceCount++,r):(r=this.aliases[e]=this.source.wrap(e),r.aliasable=!0,r.referenceCount=1,r)},setupHelper:function(e,r,n){var i=[],o=this.setupHelperArgs(r,e,i,n),s=this.nameLookup("helpers",r,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:i,paramsInit:o,name:s,callParams:[a].concat(i)}},setupParams:function(e,r,n){var i={},o=[],s=[],a=[],l=!n,u=void 0;l&&(n=[]),i.name=this.quotedString(e),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var p=this.popStack(),f=this.popStack();(f||p)&&(i.fn=f||"container.noop",i.inverse=p||"container.noop");for(var d=r;d--;)u=this.popStack(),n[d]=u,this.trackIds&&(a[d]=this.popStack()),this.stringParams&&(s[d]=this.popStack(),o[d]=this.popStack());return l&&(i.args=this.source.generateArray(n)),this.trackIds&&(i.ids=this.source.generateArray(a)),this.stringParams&&(i.types=this.source.generateArray(s),i.contexts=this.source.generateArray(o)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(e,r,n,i){var o=this.setupParams(e,r,n);return o.loc=JSON.stringify(this.source.currentLocation),o=this.objectLiteral(o),i?(this.useRegister("options"),n.push("options"),["options=",o]):n?(n.push(o),""):o}};(function(){for(var t="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),e=Br.RESERVED_WORDS={},r=0,n=t.length;r<n;r++)e[t[r]]=!0})();Br.isValidJavaScriptVariableName=function(t){return!Br.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function mb(t,e,r,n,i){var o=e.popStack(),s=r.length;t&&s--;for(var a=n;a<s;a++)o=e.nameLookup(o,r[a],i);return t?[e.aliasable("container.strict"),"(",o,", ",e.quotedString(r[s]),", ",JSON.stringify(e.source.currentLocation)," )"]:o}xo.default=Br;Qp.exports=xo.default});var rd=$((ko,td)=>{"use strict";ko.__esModule=!0;function Ln(t){return t&&t.__esModule?t:{default:t}}var gb=ip(),yb=Ln(gb),vb=fa(),wb=Ln(vb),ja=gp(),Va=_p(),_b=Zp(),bb=Ln(_b),Sb=mo(),$b=Ln(Sb),xb=aa(),kb=Ln(xb),Eb=yb.default.create;function ed(){var t=Eb();return t.compile=function(e,r){return Va.compile(e,r,t)},t.precompile=function(e,r){return Va.precompile(e,r,t)},t.AST=wb.default,t.Compiler=Va.Compiler,t.JavaScriptCompiler=bb.default,t.Parser=ja.parser,t.parse=ja.parse,t.parseWithoutProcessing=ja.parseWithoutProcessing,t}var Hr=ed();Hr.create=ed;kb.default(Hr);Hr.Visitor=$b.default;Hr.default=Hr;ko.default=Hr;td.exports=ko.default});var nd=$(Eo=>{"use strict";Eo.__esModule=!0;Eo.print=Rb;Eo.PrintVisitor=ve;function Pb(t){return t&&t.__esModule?t:{default:t}}var Cb=mo(),Ib=Pb(Cb);function Rb(t){return new ve().accept(t)}function ve(){this.padding=0}ve.prototype=new Ib.default;ve.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
|
|
123
|
+
`,e};ve.prototype.Program=function(t){var e="",r=t.body,n=void 0,i=void 0;if(t.blockParams){var o="BLOCK PARAMS: [";for(n=0,i=t.blockParams.length;n<i;n++)o+=" "+t.blockParams[n];o+=" ]",e+=this.pad(o)}for(n=0,i=r.length;n<i;n++)e+=this.accept(r[n]);return this.padding--,e};ve.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};ve.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};ve.prototype.BlockStatement=ve.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e};ve.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")};ve.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};ve.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};ve.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};ve.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,i=0,o=e.length;i<o;i++)r.push(this.accept(e[i]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};ve.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};ve.prototype.StringLiteral=function(t){return'"'+t.value+'"'};ve.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};ve.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};ve.prototype.UndefinedLiteral=function(){return"UNDEFINED"};ve.prototype.NullLiteral=function(){return"NULL"};ve.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,i=e.length;n<i;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};ve.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var ad=$((HC,sd)=>{var Po=rd().default,od=nd();Po.PrintVisitor=od.PrintVisitor;Po.print=od.print;sd.exports=Po;function id(t,e){var r=Pr("fs"),n=r.readFileSync(e,"utf8");t.exports=Po.compile(n)}typeof Pr<"u"&&Pr.extensions&&(Pr.extensions[".handlebars"]=id,Pr.extensions[".hbs"]=id)});import{readFile as Nb}from"node:fs/promises";import{resolve as Tb}from"node:path";async function ct(t,e,r){let n=Tb(t,e),i=ld.get(n);if(!i){let o=await Nb(n,"utf-8");i=cd.default.compile(o,{noEscape:!0}),ld.set(n,i)}return i(r)}var cd,ld,jn=J(()=>{"use strict";cd=Eu(ad(),1),ld=new Map});var Da=J(()=>{"use strict";qn()});import{readFile as ud,writeFile as Ab,mkdir as Ob,stat as Mb,rm as Lb,unlink as jb}from"node:fs/promises";import{resolve as Ot}from"node:path";async function fd(t){try{return await Mb(t),!0}catch{return!1}}async function qa(t){let e=Ot(t,"..");for(let r of[Ot(t,"runtime"),Ot(e,"components"),Ot(e,"runtime")])await fd(r)&&await Lb(r,{recursive:!0,force:!0});for(let r of["extensions.tsx","extensions.ts","contracts.ts"]){let n=Ot(t,r);await fd(n)&&await jb(n)}}function Vb(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function pd(t,e,r){let n=xe(t),i=e.generated.reactDir,o=Vn(r??(e.rendererTemplatesDir?Ot(n,e.rendererTemplatesDir):void 0)),s=Ur();await Ob(i,{recursive:!0}),await qa(i);let a=await ud(Ot(s,"types.ts"),"utf-8"),l=await ud(Ot(s,"style.ts"),"utf-8"),u=await ct(o,"dispatch.ts.hbs",{}),p=Vb(u),f=await ct(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:l.trim(),dispatchBody:p.trim()}),d=Ot(i,"runtime.ts");return await Ab(d,f,"utf-8"),{runtimePath:d}}var dd=J(()=>{"use strict";Ct();jn();Da()});var md={};Cr(md,{renderReactRuntime:()=>Wb});import{writeFile as hd,stat as Db,unlink as qb}from"node:fs/promises";import{relative as Fb,resolve as zr}from"node:path";async function Bb(t){try{return await Db(t),!0}catch{return!1}}async function Hb(t,e,r,n){let i=await Fn(r,t),o=await ct(Vn(n),"theme.css.hbs",{themeCss:i});await hd(e,o,"utf-8")}async function Ub(t){let e=zr(t,"..");for(let r of["theme.css","contracts.ts","view-bridge.generated.ts"]){let n=zr(e,r);await Bb(n)&&await qb(n)}}async function zb(t,e){let r=xe(t),n=e.generated.reactDir,i=zr(r,"src/components/extensions.tsx"),o=Fb(n,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=zr(n,"extensions.generated.ts");return await hd(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
|
|
124
|
+
export * from '${s}';
|
|
125
|
+
`,"utf-8"),a}async function Wb(t,e){let r=xe(t),n=e.rendererTemplatesDir?zr(r,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await Ub(i),await qa(i);let{runtimePath:o}=await pd(t,e,n),s=await zb(t,e),a=zr(i,"theme.css");await Hb(t,a,e,n),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var gd=J(()=>{"use strict";Ct();Co();jn();Da();dd()});function Gb(t,e){return t.entries.find(n=>n.path===e)?.value??""}function Kb(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(red: ${(n/255).toFixed(3)}, green: ${(i/255).toFixed(3)}, blue: ${(o/255).toFixed(3)})`}function ar(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function yd(t){return Kb(t)??(t?`Color(${JSON.stringify(t)})`:null)}function vd(t,e){let r=[];for(let[n,i]of Object.entries(t)){let o=Gb(e,i.ref);if(o)switch(n){case"background":case"foreground":{let s=yd(o);s&&r.push({property:n,swiftValue:s});break}case"padding":{let s=ar(o);if(s!==null)r.push({property:n,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let l=ar(a[0]),u=ar(a[1]);l!==null&&r.push({property:"paddingV",swiftValue:String(l)}),u!==null&&r.push({property:"paddingH",swiftValue:String(u)})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=ar(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"width":{if(o==="100%"||o==="fill")r.push({property:"widthFill",swiftValue:"true"});else{let s=ar(o);s!==null&&r.push({property:n,swiftValue:String(s)})}break}case"height":{if(o==="100%"||o==="fill")r.push({property:"heightFill",swiftValue:"true"});else{let s=ar(o);s!==null&&r.push({property:n,swiftValue:String(s)})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&r.push({property:"borderWidth",swiftValue:String(Number(s[1]))});break}case"borderColor":{let s=yd(o);s&&r.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=ar(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"fontWeight":{let s=Jb[o];s&&r.push({property:n,swiftValue:s});break}case"shadow":{r.push({property:n,swiftValue:o==="true"||o==="none"?"false":"true"});break}case"display":case"flexDirection":case"gridTemplateColumns":case"alignItems":case"justifyContent":case"typography":break;default:console.warn(`[view-contracts] SwiftUI theme: variant property "${n}" is not handled (value: "${o}"). Add a case to renderTheme.ts resolveVariantEntries().`);break}}return r}function _d(t,e){if(t.length===0)return`${e}VcVariantStyle()`;let n=[...t].sort((i,o)=>wd.indexOf(i.property)-wd.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${e}VcVariantStyle(${n})`}function Yb(t,e){return{...t,...e}}function bd(t,e){let r=[];r.push("/**"),r.push(" * Auto-generated SwiftUI theme \u2014 variant style dictionary."),r.push(" * Each entry is pre-merged: base theme defaults < variant overrides."),r.push(" * DO NOT EDIT \u2014 regenerate with: view-contracts build"),r.push(" */"),r.push("import SwiftUI"),r.push(""),r.push("struct VcVariantStyle {"),r.push(" var foreground: Color?"),r.push(" var background: Color?"),r.push(" var padding: CGFloat?"),r.push(" var paddingH: CGFloat?"),r.push(" var paddingV: CGFloat?"),r.push(" var widthFill: Bool?"),r.push(" var heightFill: Bool?"),r.push(" var radius: CGFloat?"),r.push(" var fontSize: CGFloat?"),r.push(" var fontWeight: Font.Weight?"),r.push(" var shadow: Bool?"),r.push(" var borderWidth: CGFloat?"),r.push(" var borderColor: Color?"),r.push(" var minHeight: CGFloat?"),r.push(" var maxWidth: CGFloat?"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" func applyVcStyle(_ s: VcVariantStyle) -> some View {"),r.push(" self"),r.push(" .ifSet(s.foreground) { $0.foregroundStyle($1) }"),r.push(" .ifSet(s.fontSize) { $0.font(.system(size: $1, weight: s.fontWeight ?? .regular)) }"),r.push(" .ifSet(s.padding) { $0.padding($1) }"),r.push(" .ifSet(s.paddingH) { $0.padding(.horizontal, $1) }"),r.push(" .ifSet(s.paddingV) { $0.padding(.vertical, $1) }"),r.push(" .vcFillFrame(widthFill: s.widthFill ?? false, heightFill: s.heightFill ?? false)"),r.push(" .ifSet(s.background) { $0.background($1) }"),r.push(" .ifSet(s.radius) { $0.clipShape(RoundedRectangle(cornerRadius: $1)) }"),r.push(" .ifSet(s.borderColor) { $0.overlay(RoundedRectangle(cornerRadius: s.radius ?? 0).stroke($1, lineWidth: s.borderWidth ?? 1)) }"),r.push(" .ifSet(s.shadow) { v, on in on ? AnyView(v.shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)) : AnyView(v) }"),r.push(" }"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" @ViewBuilder"),r.push(" func vcFillFrame(widthFill: Bool, heightFill: Bool) -> some View {"),r.push(" if widthFill && heightFill {"),r.push(" self.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"),r.push(" } else if widthFill {"),r.push(" self.frame(maxWidth: .infinity, alignment: .leading)"),r.push(" } else if heightFill {"),r.push(" self.frame(maxHeight: .infinity, alignment: .top)"),r.push(" } else {"),r.push(" self"),r.push(" }"),r.push(" }"),r.push("}"),r.push(""),r.push("extension View {"),r.push(" @ViewBuilder"),r.push(" func ifSet<T, V: View>(_ value: T?, _ transform: (Self, T) -> V) -> some View {"),r.push(" if let value { transform(self, value) } else { self }"),r.push(" }"),r.push("}"),r.push(""),r.push("enum VcTheme {"),r.push(" static let defaults: [String: VcVariantStyle] = [");for(let[n,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=vd(i,e);o.length!==0&&r.push(` ${JSON.stringify(n)}: ${_d(o,"").trim()},`)}r.push(" ]"),r.push(""),r.push(" static let variants: [String: [String: VcVariantStyle]] = [");for(let[n,i]of Object.entries(t.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=t.defaults[n]??{};r.push(` ${JSON.stringify(n)}: [`);for(let[a,l]of o){let u=Yb(s,l),p=vd(u,e),f=_d(p," ");r.push(` ${JSON.stringify(a)}: ${f.trim()},`)}r.push(" ],")}return r.push(" ]"),r.push(""),r.push(" static func resolve(_ element: String, variant: String) -> VcVariantStyle {"),r.push(" variants[element]?[variant] ?? defaults[element] ?? VcVariantStyle()"),r.push(" }"),r.push("}"),r.push(""),r.join(`
|
|
126
|
+
`)}var Jb,wd,Sd=J(()=>{"use strict";Jb={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};wd=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as Xb}from"node:path";function Zb(t){for(let[e,r]of Object.entries(t.elements)){let n=r.container!==void 0&&r.container!==null,i=r.leaf!==void 0&&r.leaf!==null;if(n===i)throw new Error(`${Qb}: element "${e}" must have exactly one of "container" or "leaf"`);(r.container==="vstack"||r.container==="hstack")&&r.spacingProp}}async function $d(t){if(!t&&Fa)return Fa;let e=t??Xb(ke(),"renderers/swiftui/elements.yaml"),r=await Fi(e);return Zb(r),t||(Fa=r),r}var Qb,Fa,xd=J(()=>{"use strict";Ft();Ls();Qb="renderers/swiftui/elements.yaml",Fa=null});function e0(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while merging visual props`);return r.value}function kd(t,e){let r={};for(let[n,i]of Object.entries(t))r[n]=e0(e,i.ref);return r}function t0(t){let e={};for(let[r,n]of Object.entries(t))n!=null&&(typeof n=="string"||typeof n=="number"||typeof n=="boolean")&&(e[r]=n);return e}function Io(t){let e=t.theme.defaults[t.elementName]??{},r=t.variantLiteral?t.theme.variants[t.elementName]?.[t.variantLiteral]??{}:{};return{...kd(e,t.tokens),...kd(r,t.tokens),...t0(t.instanceLiterals)}}var Ed=J(()=>{"use strict"});function Je(t){if(typeof t=="number")return t;if(typeof t=="boolean")return null;let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function Ba(t){let e=t.match(/^#([0-9a-fA-F]{6})$/);if(!e)return null;let r=e[1],n=parseInt(r.slice(0,2),16),i=parseInt(r.slice(2,4),16),o=parseInt(r.slice(4,6),16);return`Color(red: ${n/255}, green: ${i/255}, blue: ${o/255})`}function r0(t){let e=Je(t);if(e!==null)return{kind:"uniform",value:e};if(typeof t!="string")return null;let r=t.trim().split(/\s+/);if(r.length===2){let n=Je(r[0]),i=Je(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function n0(t){if(t===""||t===null||t===void 0)return null;let e=Je(t);return e!==null?`.font(.system(size: ${e}))`:typeof t=="string"&&!t.endsWith("px")?`.font(.system(size: ${JSON.stringify(t)}))`:null}function i0(t){return typeof t!="string"?null:{bold:".fontWeight(.bold)",semibold:".fontWeight(.semibold)",medium:".fontWeight(.medium)",regular:".fontWeight(.regular)",700:".fontWeight(.bold)",600:".fontWeight(.semibold)",500:".fontWeight(.medium)",400:".fontWeight(.regular)"}[t]??null}function Ha(t){let e=[],r=t.foreground;if(typeof r=="string"){let M=Ba(r);e.push(M?`.foregroundStyle(${M})`:`.foregroundStyle(Color(${JSON.stringify(r)}))`)}let n=t.size??t.fontSize;if(n!==void 0&&n!==""){let M=n0(n);M&&e.push(M)}let i=i0(t.fontWeight??t.weight??"");i&&e.push(i);let o=t.padding??"",s=r0(o);s&&(s.kind==="uniform"?e.push(`.padding(${s.value})`):(e.push(`.padding(.vertical, ${s.vertical})`),e.push(`.padding(.horizontal, ${s.horizontal})`)));let a=t.width,l=t.height,u=t.minHeight,p=t.maxWidth,f=t.maxHeight,d=t.margin,m=d==="0 auto",g=a==="100%"||a==="fill"||p==="fill",y=l==="100%"||l==="fill"||u==="100vh",_=p==="fill"?null:p!==void 0?Je(p):null;g&&y?_!==null?e.push(`.frame(maxWidth: ${_}, maxHeight: .infinity, alignment: .topLeading)`):e.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):g?_!==null?e.push(`.frame(maxWidth: ${_}, alignment: .leading)`):e.push(".frame(maxWidth: .infinity, alignment: .leading)"):y&&e.push(".frame(maxHeight: .infinity, alignment: .top)"),!y&&u==="100vh"&&e.push(".frame(maxHeight: .infinity, alignment: .top)");let b=t.background;if(typeof b=="string"&&b!=="transparent"){let M=Ba(b);e.push(M?`.background(${M})`:`.background(Color(${JSON.stringify(b)}))`)}let L=Je(t.radius??"");L!==null&&e.push(`.clipShape(RoundedRectangle(cornerRadius: ${L}))`),(t.shadow===!0||t.shadow==="true")&&e.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let q=t.border,A=t.borderColor;if(q||A){let M=Je(q??"1px")??1,X=typeof A=="string"?Ba(A)??"Color.gray":"Color.gray";e.push(`.overlay(RoundedRectangle(cornerRadius: ${L??0}).stroke(${X}, lineWidth: ${M}))`)}if(!g){if(typeof a=="number")e.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let M=Je(a);M!==null&&e.push(`.frame(width: ${M})`)}if(p!==void 0&&p!=="fill"){let M=Je(p);M!==null&&e.push(`.frame(maxWidth: ${M})`)}}if(!y){if(typeof l=="number")e.push(`.frame(height: ${l})`);else if(l!==void 0&&l!=="wrap"){let M=Je(l);M!==null&&e.push(`.frame(height: ${M})`)}if(u!==void 0&&u!=="100vh")if(typeof u=="number")e.push(`.frame(minHeight: ${u})`);else{let M=Je(u);M!==null&&e.push(`.frame(minHeight: ${M})`)}if(f!==void 0&&f!=="fill"){let M=Je(f);M!==null&&e.push(`.frame(maxHeight: ${M})`)}}if(m)e.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof d=="number")e.push(`.padding(${d})`);else if(d!==void 0){let M=Je(d);M!==null&&e.push(`.padding(${M})`)}let T=t.opacity;return typeof T=="number"&&T<1&&e.push(`.opacity(${T})`),e}function je(t,e,r){if(e.length===0)return t;let n=" ".repeat(r);return`${t}
|
|
127
|
+
${e.map(i=>`${n}${i}`).join(`
|
|
128
|
+
`)}`}var Pd=J(()=>{"use strict"});function D(t){return" ".repeat(t)}function Ro(t,e,r){let i=t.entries.find(p=>p.path===e)?.value??r,o=i.match(/^#([0-9a-fA-F]{6})$/);if(!o)return`Color(${JSON.stringify(i)})`;let s=o[1],a=parseInt(s.slice(0,2),16)/255,l=parseInt(s.slice(2,4),16)/255,u=parseInt(s.slice(4,6),16)/255;return`Color(red: ${a}, green: ${l}, blue: ${u})`}function Id(t,e,r,n,i){let o=`${D(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`;return t.map(a=>{if(a.kind==="map"){let u=a,p=u.item,f=r(u.body,e+2,p);f+=`
|
|
129
|
+
${o}`;let d=Ye(u.source,n,i);return`${D(e+2)}ForEach(${d}, id: \\.id) { ${p} in
|
|
130
|
+
${f}
|
|
131
|
+
${D(e+2)}}`}let l="";return a.kind==="text"?l=`${D(e+2)}Text(${JSON.stringify(a.value)})`:a.kind==="binding"?l=`${D(e+2)}Text(${Ye(a,n,i)})`:l=r(a,e+2,i),l?`${l}
|
|
132
|
+
${o}`:""}).filter(Boolean).join(`
|
|
133
|
+
`)}function ce(t,e){let r=t[e];if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="object"&&"kind"in r&&r.kind==="literal")return r.value}}function Rd(t){let e={};for(let[r,n]of Object.entries(t)){if(r==="variant"||r==="id"||!qi.has(r))continue;let i=ce(t,r);i!==void 0&&(e[r]=i)}return e}function Nd(t){let e=t.variant;return e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?!1:typeof e=="object"&&"kind"in e?e.kind==="literal"?!1:e.kind==="binding"||e.kind==="concat":!1}function o0(t,e,r){let n=t.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?Ye(n,e,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\\(${Ye(s,e,r)})`).join("")}"`:null}function s0(t,e,r,n){let i=r.map.elements[t],o=ce(e,"variant"),s=Rd(e);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],Nd(e)){let u=o0(e,r,n),p=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(t)}, variant: ${u}))`,f=Io({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s}),d=Ha(f),m=d.filter(y=>y.startsWith(".padding")),g=d.filter(y=>!y.startsWith(".padding"));return[...m,p,...g]}let l=Io({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return Ha(l)}function a0(t){return[]}function l0(t,e,r,n){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Ye(i,e,r);return`${D(n+1)}ForEach(${o}, id: \\.value) { option in
|
|
134
|
+
${D(n+2)}Button(option.label) {}
|
|
135
|
+
${D(n+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${D(n+1)}Button(${JSON.stringify(s.label)}) {}`).join(`
|
|
136
|
+
`):`${D(n+1)}Button("--") {}`}function c0(t,e,r){let n=t.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${Ye(n,e,r)}.first?.label ?? ""`;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="literal"&&Array.isArray(n.value)){let i=n.value;return JSON.stringify(i[0]?.label??"")}return'""'}function Ye(t,e,r){let n=t.scope??r??e.propsRoot??"vm";return t.path?`${n}.${t.path}`:n}function Cd(t,e,r){for(let n of t){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return Ye(n,e,r)}return null}function Td(t,e,r,n,i){return t.map(s=>s.kind==="map"?Bn(s,e,r,n):s.kind==="text"?`${D(e)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?`${D(e)}Text(${Ye(s,n,i)})`:r(s,e,i)).filter(Boolean).join(`
|
|
137
|
+
`)}function Bn(t,e,r,n){let i=t.item,o=r(t.body,e+2,i),s=Ye(t.source,n,i);return`${D(e)}ForEach(${s}, id: \\.id) { ${i} in
|
|
138
|
+
${o}
|
|
139
|
+
${D(e)}}`}function u0(t,e,r,n,i,o){let s=D(r);if(e.leaf==="text"){let a=Cd(t.children,i,n);if(!a)return`${s}Text("")`;let l=`${s}Text(${a})`,u=o.map(p=>`${s}${p}`);return[l,...u].join(`
|
|
140
|
+
`)}if(e.leaf==="button"){let a=ce(t.props,"label"),u=Cd(t.children,i,n)??(typeof a=="string"?JSON.stringify(a):'"Button"'),p=`${s}Button(${u}) {}`,f=o.map(d=>`${s}${d}`);return[p,...f].join(`
|
|
141
|
+
`)}if(e.leaf==="textfield"){let a=ce(t.props,"placeholder"),l=typeof a=="string"?JSON.stringify(a):'""',u=Ro(i.tokens,"ui.text-muted","#6b7280"),p=`${s}TextField("", text: .constant(""), prompt: Text(${l}).foregroundStyle(${u}))`,d=[...o,...a0(t.name)].map(m=>`${s}${m}`);return[p,...d].join(`
|
|
142
|
+
`)}if(e.leaf==="texteditor"){let a=ce(t.props,"placeholder"),l=typeof a=="string"?JSON.stringify(a):'""',u=Ro(i.tokens,"ui.text-muted","#6b7280"),f=o.find(_=>_.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",d=o.filter(_=>_.startsWith(".foregroundStyle(")||_.startsWith(".font(")||_.startsWith(".fontWeight(")),m=o.filter(_=>!_.startsWith(".foregroundStyle(")&&!_.startsWith(".font(")&&!_.startsWith(".fontWeight(")&&!_.startsWith(".frame(minHeight:")),g=d.map(_=>`${s} ${_}`),y=m.map(_=>`${s}${_}`);return[`${s}ZStack(alignment: .topLeading) {`,`${s} if true {`,`${s} Text(${l})`,`${s} .font(.system(size: 14))`,`${s} .foregroundStyle(${u})`,`${s} .padding(.top, 8)`,`${s} .padding(.horizontal, 4)`,`${s} .allowsHitTesting(false)`,`${s} }`,`${s} TextEditor(text: .constant(""))`,`${s} .scrollContentBackground(.hidden)`,...g,`${s}}`,`${s}.frame(minHeight: ${f})`,...y].join(`
|
|
143
|
+
`)}if(e.leaf==="picker"){let a=Ro(i.tokens,"ui.text","#111827"),l=Ro(i.tokens,"ui.text-muted","#6b7280"),u=l0(t.props,i,n,r),p=c0(t.props,i,n),f=o.filter(y=>!y.startsWith(".frame")),d=ce(t.props,"width"),m=typeof d=="number"?`${s}.frame(width: ${d})`:`${s}.frame(maxWidth: .infinity)`;return[`${s}Menu {`,u,`${s}} label: {`,`${s} HStack(spacing: 0) {`,`${s} Text(${p})`,`${s} .foregroundStyle(${a})`,`${s} .lineLimit(1)`,`${s} Spacer(minLength: 0)`,`${s} Image(systemName: "chevron.down")`,`${s} .font(.system(size: 12, weight: .semibold))`,`${s} .foregroundStyle(${l})`,`${s} }`,`${s} .padding(.vertical, 9)`,`${s} .padding(.leading, 12)`,`${s} .padding(.trailing, 12)`,...f.map(y=>`${s} ${y}`),`${s}}`,m,`${s}.frame(minHeight: 42)`,`${s}.frame(maxWidth: .infinity)`].join(`
|
|
144
|
+
`)}if(e.leaf==="spacer")return`${s}Spacer()`;if(e.leaf==="divider")return`${s}Divider()`;if(e.leaf==="image"){let a=ce(t.props,"src")??ce(t.props,"name"),u=`${s}Image(systemName: ${JSON.stringify(typeof a=="string"?a:"photo")})`,p=o.map(f=>`${s}${f}`);return[u,...p].join(`
|
|
145
|
+
`)}if(e.leaf==="progressview"){let a=`${s}ProgressView()`,l=o.map(u=>`${s}${u}`);return[a,...l].join(`
|
|
146
|
+
`)}if(e.leaf==="toggle"){let a=ce(t.props,"label")??"",l=`${s}Toggle(${JSON.stringify(a)}, isOn: .constant(false))`,u=o.map(p=>`${s}${p}`);return[l,...u].join(`
|
|
147
|
+
`)}return`${s}Text("/* unsupported leaf: ${t.name} */")`}function f0(t,e,r,n,i,o,s){let a=Td(t.children,r+2,i,o,n);if(e.container==="vstack"){let u=e.spacingProp?ce(t.props,e.spacingProp):void 0,p=typeof u=="number"?u:0,f=`${D(r+1)}VStack(alignment: .leading, spacing: ${p}) {
|
|
148
|
+
${a}
|
|
149
|
+
${D(r+1)}}`;return je(f,s,r+1)}if(e.container==="hstack"){let u=e.spacingProp?ce(t.props,e.spacingProp):void 0,p=typeof u=="number"?u:0,f=ce(t.props,"align"),d=ce(t.props,"height"),m=f==="center"||typeof d=="number"?".center":".top",g=ce(t.props,"justify"),y=ce(t.props,"flex"),_=ce(t.props,"wrap"),L=t.name==="TableHeader"||t.name==="TableRow"||g!==void 0||typeof y=="number",q=g==="end"?".trailing":g==="center"?".center":".leading",A=[];L&&A.push(`.frame(maxWidth: .infinity, alignment: ${q})`),typeof d=="number"&&A.push(`.frame(height: ${d})`);let T=a;if(g==="between"){let X=t.children.map(fe=>fe.kind==="map"?Bn(fe,r+2,i,o):fe.kind==="text"?`${D(r+2)}Text(${JSON.stringify(fe.value)})`:fe.kind==="binding"?`${D(r+2)}Text(${Ye(fe,o,n)})`:i(fe,r+2,n)).filter(Boolean);if(X.length>=2){let fe=X[0],Ie=X.slice(1);T=[fe,`${D(r+2)}Spacer()`,...Ie].join(`
|
|
150
|
+
`)}}else if(_===!0){T=t.children.map(fe=>{if(fe.kind==="map")return Bn(fe,r+2,i,o);if(fe.kind==="text")return`${D(r+2)}Text(${JSON.stringify(fe.value)})`;if(fe.kind==="binding")return`${D(r+2)}Text(${Ye(fe,o,n)})`;let Ie=i(fe,r+2,n);return Ie||""}).filter(Boolean).join(`
|
|
151
|
+
`);let X=`${D(r+1)}FlowLayout(spacing: ${p}) {
|
|
152
|
+
${T}
|
|
153
|
+
${D(r+1)}}`;return je(X,[...s,...A],r+1)}let M=`${D(r+1)}HStack(alignment: ${m}, spacing: ${p}) {
|
|
154
|
+
${T}
|
|
155
|
+
${D(r+1)}}`;return je(M,[...s,...A],r+1)}if(e.container==="group"){let u=a?`${D(r+1)}VStack(alignment: .leading, spacing: 0) {
|
|
156
|
+
${a}
|
|
157
|
+
${D(r+1)}}`:`${D(r+1)}VStack { EmptyView() }`;return je(u,s,r+1)}if(e.container==="navstack")return je(a,s,r+1);if(e.container==="scrollview"){let u=`${D(r+1)}ScrollView {
|
|
158
|
+
${a}
|
|
159
|
+
${D(r+1)}}`;return je(u,s,r+1)}if(e.container==="field"){let u=ce(t.props,"label"),p=ce(t.props,"gap"),f=typeof p=="number"?p:4,d=typeof u=="string"?`
|
|
160
|
+
${D(r+2)}Text(${JSON.stringify(u)})
|
|
161
|
+
${D(r+2)} .applyVcStyle(VcTheme.resolve("Text", variant: "field-label"))`:"",m=`${D(r+1)}VStack(alignment: .leading, spacing: ${f}) {${d}
|
|
162
|
+
${a}
|
|
163
|
+
${D(r+1)}}`;return je(m,s,r+1)}if(e.container==="tablestack"){let u=ce(t.props,"separator"),p=ce(t.props,"separatorColor"),f=typeof u=="number"&&u>0,d=t.children.map(y=>y.kind==="map"?Bn(y,r+2,i,o):i(y,r+2,n)).filter(Boolean),m;if(f){let _=Ua(t.name,t.props,o).separatorColor??p,b="Color.gray.opacity(0.2)";if(typeof _=="string"){let A=_.match(/^#([0-9a-fA-F]{6})$/);if(A){let T=parseInt(A[1].slice(0,2),16)/255,M=parseInt(A[1].slice(2,4),16)/255,X=parseInt(A[1].slice(4,6),16)/255;b=`Color(red: ${T}, green: ${M}, blue: ${X})`}}let L=u,q=L===1?`${D(r+2)}Divider().overlay(${b})`:`${D(r+2)}Rectangle().fill(${b}).frame(height: ${L})`;m=d.flatMap((A,T)=>T<d.length-1?[A,q]:[A])}else m=d;let g=`${D(r+1)}VStack(alignment: .leading, spacing: 0) {
|
|
164
|
+
${m.join(`
|
|
165
|
+
`)}
|
|
166
|
+
${D(r+1)}}`;return je(g,s,r+1)}if(e.container==="cellgroup"){let u=ce(t.props,"width"),p=ce(t.props,"flex"),f=ce(t.props,"align"),d=f==="end"?".trailing":f==="center"?".center":".leading",m=typeof p=="number",g=[...s,".lineLimit(1)"];typeof u=="number"?g.push(`.frame(width: ${u}, alignment: ${d})`):m&&g.push(`.frame(maxWidth: .infinity, alignment: ${d})`);let y=a?`${D(r+1)}Group {
|
|
167
|
+
${a}
|
|
168
|
+
${D(r+2)}.frame(maxWidth: .infinity, alignment: ${d})
|
|
169
|
+
${D(r+1)}}`:`${D(r+1)}Group { EmptyView() }`;return je(y,g,r+1)}let l=a?`${D(r+1)}Group {
|
|
170
|
+
${a}
|
|
171
|
+
${D(r+1)}}`:`${D(r+1)}Group { EmptyView() }`;return je(l,s,r+1)}function Ua(t,e,r){let n=ce(e,"variant"),i=Rd(e);return Io({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function p0(t){if(!t||typeof t!="string")return null;let e=t.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(e)return{kind:"equal-columns",count:Number(e[1])};let r=t.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(r)return{kind:"adaptive",minWidth:Number(r[1])};let n=t.trim().split(/\s+/);return n.length>=2?{kind:"fixed-columns",widths:n}:null}function d0(t,e,r,n,i,o){let s=s0(t.name,t.props,o,n);if(e.leaf)return u0(t,e,r,n,o,s);if(e.container==="group"&&!Nd(t.props)){let a=Ua(t.name,t.props,o),l=a.display,u=a.gridTemplateColumns,p=a.flexDirection;if(l==="grid"&&u){let f=p0(u);if(f?.kind==="adaptive")return h0(t,r,n,i,o,s,f.minWidth);if(f?.kind==="equal-columns")return m0(t,r,n,i,o,s,f.count);if(f?.kind==="fixed-columns")return y0(t,r,n,i,o,s,f.widths)}if(l==="flex"&&p==="row"){let f=Td(t.children,r+2,i,o,n),d=ce(t.props,"gap"),m=typeof d=="number"?d:typeof a.gap=="number"?a.gap:0,g=`${D(r+1)}HStack(alignment: .top, spacing: ${m}) {
|
|
172
|
+
${f}
|
|
173
|
+
${D(r+1)}}`;return je(g,s,r+1)}}if(e.container)return f0(t,e,r,n,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${t.name}`)}function h0(t,e,r,n,i,o,s){let a=ce(t.props,"gap"),l=typeof a=="number"?a:16,u=Id(t.children,e,n,i,r),p=`${D(e+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${l}) {
|
|
174
|
+
${u}
|
|
175
|
+
${D(e+1)}}
|
|
176
|
+
${D(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return je(p,o,e+1)}function m0(t,e,r,n,i,o,s){let a=ce(t.props,"gap"),l=typeof a=="number"?a:16,u=`Array(repeating: GridItem(.flexible(), spacing: ${l}), count: ${s})`,p=Id(t.children,e,n,i,r),f=`${D(e+1)}LazyVGrid(columns: ${u}, spacing: ${l}) {
|
|
177
|
+
${p}
|
|
178
|
+
${D(e+1)}}
|
|
179
|
+
${D(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return je(f,o,e+1)}function g0(t,e){if(t.kind!=="component")return null;let n=Ua(t.name,t.props,e).background;if(typeof n!="string"||n==="transparent")return null;let i=n.match(/^#([0-9a-fA-F]{6})$/);if(i){let o=parseInt(i[1].slice(0,2),16)/255,s=parseInt(i[1].slice(2,4),16)/255,a=parseInt(i[1].slice(4,6),16)/255;return`Color(red: ${o}, green: ${s}, blue: ${a})`}return`Color(${JSON.stringify(n)})`}function y0(t,e,r,n,i,o,s){let a=t.children,l=[];for(let f=0;f<a.length;f++){let d=a[f],m="";if(d.kind==="map"?m=Bn(d,e+2,n,i):d.kind==="text"?m=`${D(e+2)}Text(${JSON.stringify(d.value)})`:d.kind==="binding"?m=`${D(e+2)}Text(${Ye(d,i,r)})`:m=n(d,e+2,r),!m)continue;let g=s[f],y=g?.match(/^(\d+)px$/);if(y){m+=`
|
|
180
|
+
${D(e+2)}.frame(width: ${Number(y[1])}, alignment: .topLeading)`,m+=`
|
|
181
|
+
${D(e+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let _=g0(d,i);_&&(m+=`
|
|
182
|
+
${D(e+2)}.background(${_})`)}else g==="1fr"&&(m+=`
|
|
183
|
+
${D(e+3)}.frame(maxWidth: .infinity, alignment: .topLeading)`,m=`${D(e+2)}ScrollView {
|
|
184
|
+
${m}
|
|
185
|
+
${D(e+2)}}`,m+=`
|
|
186
|
+
${D(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`);l.push(m)}let u=l.join(`
|
|
187
|
+
`),p=`${D(e+1)}HStack(spacing: 0) {
|
|
188
|
+
${u}
|
|
189
|
+
${D(e+1)}}`;return je(p,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],e+1)}function v0(t,e,r,n){let i=Object.entries(t.props).map(([s,a])=>typeof a=="object"&&a!==null&&"kind"in a&&a.kind==="binding"?`${s}: ${Ye(a,n,r)}`:`${s}: ${JSON.stringify(a)}`),o=i.length>0?`(${i.join(", ")})`:"()";return`${D(e)}${t.name}${o}`}function w0(t){let e=(r,n,i)=>{if(r.kind==="viewRef")return v0(r,n,i,t);if(r.kind!=="component")return"";if(!t.map.elements[r.name])throw new Error(`Element "${r.name}" is not in SwiftUI element map (prototype subset)`);return d0(r,t.map.elements[r.name],n,i,e,t)};return e}function Ad(t,e,r=2){let n=w0(e);if(t.kind!=="component")throw new Error("SwiftUI lowering root must be a component node");return n(t,r)}var Od=J(()=>{"use strict";It();Ed();Pd()});var Ld={};Cr(Ld,{renderSwiftComponent:()=>No});function Md(t){let e=t.match(/^(\w+)\[\]$/);return e?`[${Md(e[1])}]`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Bool":t}function _0(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?`${e[1].trim().split(",").map(i=>{let o=i.indexOf(":"),s=o>=0?i.slice(0,o).trim():i.trim(),a=o>=0?i.slice(o+1).trim():"Any",l=Md(a);return` let ${s}: ${l}`}).join(`
|
|
190
|
+
`)}
|
|
191
|
+
`:` let props: ${t.propsType}
|
|
192
|
+
`}function b0(t){if(!t.propsType)return;let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].split(",")[0].split(":")[0].trim():void 0}async function No(t,e){let r=await $d(e.elementMapPath),n=e.allowlistExtra??[],i=t.isPartial?t.exportName:t.exportName.replace(/View$/,"")||t.exportName,o={map:r,theme:e.theme,tokens:e.tokens,allowlistExtra:n,propsRoot:b0(t)},s=Ad(t.root,o,4),a=_0(t),l=!t.isPartial&&t.viewModel?` let vm: ${t.viewModel}
|
|
193
|
+
`:"";return`/**
|
|
194
|
+
* Auto-generated SwiftUI view from ${t.source}
|
|
195
|
+
* DO NOT EDIT \u2014 prototype SwiftUI lowering (#21)
|
|
196
|
+
*/
|
|
197
|
+
import SwiftUI
|
|
198
|
+
|
|
199
|
+
struct ${i}: View {
|
|
200
|
+
${l}${a} var body: some View {
|
|
201
|
+
${s}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
`}var za=J(()=>{"use strict";xd();Od()});import{readFile as S0,stat as $0}from"node:fs/promises";import{resolve as jd}from"node:path";function Vd(){return"views/preview"}function x0(t){return`${t.charAt(0).toLowerCase()}${t.slice(1)}Mock`}function Wa(t,e,r){let n=xe(t),i=e.preview?.mocksDir??Vd();return jd(n,i,`${r}.mock.yaml`)}function k0(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function E0(t,e){if(!k0(t))throw new To(`${e} must be a YAML object (ViewModel fields at the root)`);return t}async function Ga(t){let e;try{e=await S0(t,"utf-8")}catch{throw new To(`Preview mock not found: ${t}`)}let r=st.load(e);return E0(r,t)}function P0(t,e){let r=x0(t);return`/** Auto-built from views/preview/${t}.mock.yaml \u2014 preview / example only */
|
|
133
205
|
export const ${r} = ${JSON.stringify(e,null,2)};
|
|
134
|
-
`}async function Qd(t,e,r){let n=M$(t,e,r),i=await D$(n);return L$(r,i)}function Zd(t){if(!t.startsWith(ln))return null;let e=t.slice(ln.length);return e.length>0?e:null}async function ef(t,e){let r=Ie(t),n=e.preview?.mocksDir??Xd();return Gd(r,n)}var ln,yi,tf=ne(()=>{"use strict";Ht();bt();ln="view-contracts:preview/mock/",yi=class extends Error{constructor(e){super(e),this.name="PreviewMockError"}}});bt();Yi();br();Ri();import{transform as F$}from"esbuild";import{resolve as yt}from"node:path";import{resolve as A$}from"node:path";import{readFile as pc}from"node:fs/promises";import{basename as pp,relative as mc,resolve as hc}from"node:path";ct();import{dirname as oc,resolve as sc}from"node:path";import A from"typescript";import{readFileSync as tp}from"node:fs";import{resolve as rp}from"node:path";import re from"typescript";function Gi(t,e){let r=new Map;for(let n of t.statements){if(!re.isImportDeclaration(n)||!n.importClause?.namedBindings||!re.isStringLiteral(n.moduleSpecifier)||!re.isNamedImports(n.importClause.namedBindings))continue;let i=n.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let s=rp(e,i);for(let a of n.importClause.namedBindings.elements)r.set(a.name.text,s)}return r}function np(t){if(re.isObjectBindingPattern(t.name)){let e=[];for(let r of t.name.elements)re.isBindingElement(r)&&re.isIdentifier(r.name)&&e.push(r.name.text);return e}return re.isIdentifier(t.name)?[t.name.text]:[]}function ip(t){if(!re.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!re.isBindingElement(e)||!re.isIdentifier(e.name)?null:e.name.text}function op(t){if(re.isParenthesizedExpression(t))return t.expression;if(re.isJsxElement(t)||re.isJsxSelfClosingElement(t)||re.isJsxFragment(t))return t;if(re.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let r=t.statements[e];if(re.isReturnStatement(r)&&r.expression)return re.isParenthesizedExpression(r.expression)?r.expression.expression:r.expression}return null}function nc(t){if(!re.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!re.isArrowFunction(e)&&!re.isFunctionExpression(e))return null;let r="__noop",n=[];if(e.parameters.length===1){let a=ip(e.parameters[0]);if(n=np(e.parameters[0]),a)r=a;else if(re.isIdentifier(e.parameters[0].name))r=e.parameters[0].name.text,n=[r];else return null}else if(e.parameters.length>1)return null;let i=op(e.body);if(!i)return null;let s;return t.typeArguments&&t.typeArguments.length===1&&(s=t.typeArguments[0].getText()),{paramName:r,jsxRoot:i,propNames:n,propsType:s}}function Xi(t,e){let r=null;function n(i){if(re.isVariableStatement(i))for(let s of i.declarationList.declarations){if(!re.isIdentifier(s.name)||s.name.text!==e||!s.initializer||!re.isCallExpression(s.initializer))continue;let a=nc(s.initializer);a&&(r=a)}if(re.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&re.isCallExpression(i.expression)){let s=nc(i.expression);s&&e==="default"&&(r=s)}re.forEachChild(i,n)}return n(t),r}function ic(t,e){let r=tp(t,"utf-8"),n=re.createSourceFile(t,r,re.ScriptTarget.Latest,!0,re.ScriptKind.TSX);return Xi(n,e)}function sp(t,e,r){if("tone"in e){let n=e.tone;delete e.tone,"variant"in e||(e.variant=n),r.warnings.push(`"tone" on <${t}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let n=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=n),r.warnings.push(`"textStyle" on <${t}> is deprecated; use variant instead (mapped automatically)`)}}function Qi(t){return t.join(".")}function Wt(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function eo(t){if(A.isIdentifier(t))return[t.text];if(A.isPropertyAccessExpression(t)){let e=eo(t.expression);return e?[...e,t.name.text]:null}return null}function ac(t,e){if(e.length===0)return t;let r=e.join(".");return{kind:"binding",path:t.path?`${t.path}.${r}`:r,scope:t.scope}}function Er(t,e){let r=eo(t);if(!r)return null;if(r[0]in e.propBindings)return ac(e.propBindings[r[0]],r.slice(1));if(r[0]===e.vmName)return{kind:"binding",path:Qi(r.slice(1))};let n=e.scopes[e.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:Qi(r.slice(1)),scope:n}:null}function ap(t,e){let r,n={};for(let i of t.properties){if(!A.isPropertyAssignment(i)||!A.isIdentifier(i.name))continue;let s=i.name.text;if(s==="name"&&A.isStringLiteral(i.initializer)){r=i.initializer.text;continue}if(s==="params"&&A.isObjectLiteralExpression(i.initializer))for(let a of i.initializer.properties){if(!A.isPropertyAssignment(a)||!A.isIdentifier(a.name))continue;let c=Nn(a.initializer,e);c!==null?n[a.name.text]=c:e.errors.push(`Unsupported action param expression for "${a.name.text}": ${Wt(a.initializer)}`)}}return r?Object.keys(n).length>0?{kind:"action",name:r,params:n}:{kind:"action",name:r}:null}function Nn(t,e){if(A.isStringLiteral(t)||A.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===A.SyntaxKind.TrueKeyword)return!0;if(t.kind===A.SyntaxKind.FalseKeyword)return!1;if(A.isNumericLiteral(t))return Number(t.text);if(t.kind===A.SyntaxKind.NullKeyword)return null;if(A.isTemplateExpression(t)){let n=[];t.head.text&&n.push(t.head.text);for(let i of t.templateSpans){let s=Er(i.expression,e);if(!s)return null;n.push(s),i.literal.text&&n.push(i.literal.text)}return{kind:"concat",parts:n}}let r=Er(t,e);if(r)return r;if(A.isObjectLiteralExpression(t)){let n=ap(t,e);if(n)return n;let i={};for(let s of t.properties){if(!A.isPropertyAssignment(s)||!A.isIdentifier(s.name))continue;let a=Nn(s.initializer,e);a!==null?i[s.name.text]=a:e.errors.push(`Unsupported object literal property "${s.name.text}": ${Wt(s.initializer)}`)}return{kind:"literal",value:i}}if(A.isArrayLiteralExpression(t)){let n=[];for(let i of t.elements){if(!A.isExpression(i))continue;let s=Nn(i,e);s!==null?n.push(s):e.errors.push(`Unsupported array element expression: ${Wt(i)}`)}return n}return null}function cp(t){return A.isIdentifier(t)?t.text:A.isPropertyAccessExpression(t)&&A.isIdentifier(t.name)?t.name.text:null}function cc(t){return t.getText()}function Zi(t,e){let r=[];for(let n of t){if(A.isJsxText(n)){let i=n.getText().trim();i&&r.push({kind:"text",value:i});continue}if(A.isJsxExpression(n)&&n.expression){let i=Er(n.expression,e);if(i){r.push(i);continue}let s=lc(n.expression,e);s?Array.isArray(s)?r.push(...s):r.push(s):e.errors.push(`Unsupported JSX child expression: ${Wt(n.expression)}`);continue}if(A.isJsxElement(n)||A.isJsxSelfClosingElement(n)){let i=Sr(n,e);i&&r.push(i)}}return r}function lp(t,e){if(t.length===0)return null;let r=t[0];return r in e.propBindings?ac(e.propBindings[r],t.slice(1)):r===e.vmName?{kind:"binding",path:Qi(t.slice(1))}:null}function lc(t,e){if(A.isParenthesizedExpression(t))return lc(t.expression,e);if(A.isCallExpression(t)&&A.isPropertyAccessExpression(t.expression)){let n=eo(t.expression.expression),i=t.expression.name.text;if(n&&i==="map"&&t.arguments.length>=1){let s=lp(n,e);if(!s)return null;let a=t.arguments[0];if(!A.isArrowFunction(a)&&!A.isFunctionExpression(a))return e.errors.push("map callback must be an arrow function"),null;let c=a.parameters;if(c.length!==1||!A.isIdentifier(c[0].name))return e.errors.push("map callback must have a single item parameter"),null;let l=c[0].name.text,f={...e,scopes:[...e.scopes,l]},p=null,u=A.isParenthesizedExpression(a.body)?a.body.expression:a.body;if(A.isBlock(a.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(A.isJsxElement(u)||A.isJsxSelfClosingElement(u)?p=Sr(u,f):A.isJsxFragment(u)&&(p=to(u,f)),!p)return null;let m;if(A.isJsxElement(u)||A.isJsxSelfClosingElement(u)){let h=A.isJsxElement(u)?u.openingElement.attributes:u.attributes;for(let y of h.properties)if(!(!A.isJsxAttribute(y)||cc(y.name)!=="key"||!y.initializer)&&A.isJsxExpression(y.initializer)&&y.initializer.expression){let v=Er(y.initializer.expression,f);v&&(m=v)}}return{kind:"map",source:s,item:l,key:m,body:p}}}if(A.isJsxElement(t)||A.isJsxSelfClosingElement(t))return Sr(t,e);let r=Er(t,e);return r||null}function to(t,e){return{kind:"fragment",children:Zi(t.children,e)}}function up(t,e,r){let n=r.viewImports.get(t);return n?ic(n,t)?{kind:"viewRef",name:t,sourcePath:n,props:e}:(r.errors.push(`View component "${t}" is imported but has no view() export`),null):null}function Sr(t,e){let r=A.isJsxElement(t)?t.openingElement:t,n=cp(r.tagName);if(!n)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let l of r.attributes.properties){if(!A.isJsxAttribute(l))continue;let f=cc(l.name);if(f!=="key"){if(!l.initializer){i[f]=!0;continue}if(A.isStringLiteral(l.initializer)){i[f]=l.initializer.text;continue}if(A.isJsxExpression(l.initializer)&&l.initializer.expression){let p=Nn(l.initializer.expression,e);p!==null?i[f]=p:e.errors.push(`Unsupported JSX prop expression for "${f}" on <${n}>: ${Wt(l.initializer.expression)}`)}}}if(!e.allowedComponents.has(n)){let l=up(n,i,e);return l||(e.errors.push(`Component "${n}" is not in the allowed registry`),null)}sp(n,i,e);let s=e;if(n==="Table"&&i.source){let l=typeof i.source=="object"&&"kind"in i.source&&i.source.kind==="binding"?i.source:void 0;l&&(s={...e,tableSource:l})}let a=typeof i.each=="string"?i.each:void 0;if(a){let l=e.tableSource;if(!l)return e.errors.push(`<${n} each="${a}"> requires an ancestor <Table source={...}>`),null;delete i.each;let f={...s,scopes:[...s.scopes,a]},p=A.isJsxElement(t)?Zi(t.children,f):[];return{kind:"map",source:l,item:a,body:{kind:"component",name:n,props:i,children:p}}}let c=A.isJsxElement(t)?Zi(t.children,s):[];return{kind:"component",name:n,props:i,children:c}}function dp(t){let e=null;function r(n){if(A.isCallExpression(n)&&A.isIdentifier(n.expression)&&n.expression.text==="screen"&&n.arguments.length===1&&(A.isArrowFunction(n.arguments[0])||A.isFunctionExpression(n.arguments[0]))){let i=n.arguments[0],s="unknown";if(n.typeArguments&&n.typeArguments.length===1){let c=n.typeArguments[0];A.isTypeReferenceNode(c)&&A.isIdentifier(c.typeName)&&(s=c.typeName.text)}let a=i.body;if(A.isParenthesizedExpression(a))(A.isJsxElement(a.expression)||A.isJsxSelfClosingElement(a.expression))&&(e={viewModel:s,jsxRoot:a.expression});else if(A.isJsxElement(a)||A.isJsxSelfClosingElement(a))e={viewModel:s,jsxRoot:a};else if(A.isBlock(a)&&a.statements.length===1){let c=a.statements[0];A.isReturnStatement(c)&&c.expression&&(A.isParenthesizedExpression(c.expression)?e={viewModel:s,jsxRoot:c.expression.expression}:e={viewModel:s,jsxRoot:c.expression})}}A.forEachChild(n,r)}return r(t),e}function uc(t,e,r,n={}){let i=new Set(et);for(let u of n.allowlistExtra??[])i.add(u);let s=sc(e),a=oc(s),c=A.createSourceFile(s,t,A.ScriptTarget.Latest,!0,A.ScriptKind.TSX),l={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Gi(c,a),allowedComponents:i},f=dp(c);if(!f)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let p=A.isJsxElement(f.jsxRoot)||A.isJsxSelfClosingElement(f.jsxRoot)?Sr(f.jsxRoot,l):A.isJsxFragment(f.jsxRoot)?to(f.jsxRoot,l):null;return p?{viewModel:f.viewModel,exportName:r,root:p,errors:l.errors,warnings:l.warnings}:(l.errors.push("screen() callback must return a single JSX root element"),{viewModel:f.viewModel,exportName:r,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings})}function fp(t,e){let r={...e.propBindings};for(let i of t.propNames)r[i]={kind:"binding",path:"",scope:i};let n={...e,vmName:t.paramName,propBindings:r,scopes:[]};return A.isJsxElement(t.jsxRoot)||A.isJsxSelfClosingElement(t.jsxRoot)?Sr(t.jsxRoot,n):A.isJsxFragment(t.jsxRoot)?to(t.jsxRoot,n):A.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):A.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${Wt(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${A.SyntaxKind[t.jsxRoot.kind]}`),null)}function dc(t,e,r,n={}){let i=new Set(et);for(let u of n.allowlistExtra??[])i.add(u);let s=sc(e),a=oc(s),c=A.createSourceFile(s,t,A.ScriptTarget.Latest,!0,A.ScriptKind.TSX),l=Xi(c,r),f={vmName:l?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Gi(c,a),allowedComponents:i};if(!l)return{exportName:r,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${r}" found in ${e}`],warnings:[]};let p=fp(l,f);return p?{exportName:r,propsType:l.propsType,propNames:l.propNames,root:p,errors:f.errors,warnings:f.warnings}:{exportName:r,propsType:l.propsType,propNames:l.propNames,root:{kind:"fragment",children:[]},errors:f.errors,warnings:f.warnings}}function ro(t){let e=[];function r(n){if(n.kind==="viewRef"){e.push(n);return}if(n.kind==="component"){for(let i of n.children)r(i);return}if(n.kind==="map"){r(n.body);return}if(n.kind==="fragment")for(let i of n.children)r(i)}return r(t),e}function fc(t){return`${t.sourcePath}:${t.name}`}ct();function no(t,e){let r=[],n=[],i=s=>{if(s.kind!=="viewRef"){if(s.kind==="component"){!et.has(s.name)&&!(s.name in e.extensions)&&r.push(`Extension component "${s.name}" is not registered in extensions.yaml`);for(let a of s.children)i(a);return}if(s.kind==="map"){i(s.body);return}if(s.kind==="fragment")for(let a of s.children)i(a)}};return i(t),{errors:r,warnings:n}}async function mp(t,e,r){let n=await pc(t,"utf-8"),i=dc(n,t,e,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
206
|
+
`}async function Dd(t,e,r){let n=Wa(t,e,r),i=await Ga(n);return P0(r,i)}function qd(t){if(!t.startsWith(Hn))return null;let e=t.slice(Hn.length);return e.length>0?e:null}async function Fd(t,e){let r=xe(t),n=e.preview?.mocksDir??Vd();return jd(r,n)}async function Bd(t){try{return await $0(t),!0}catch{return!1}}var Hn,To,Ka=J(()=>{"use strict";Ir();Ct();Hn="view-contracts:preview/mock/",To=class extends Error{constructor(e){super(e),this.name="PreviewMockError"}}});var Ud={};Cr(Ud,{renderSwiftUIRuntime:()=>R0});import{mkdir as C0,writeFile as lr}from"node:fs/promises";import{resolve as Mt}from"node:path";function Hd(){return Mt(ke(),"renderers/swiftui/templates")}async function R0(t,e,r,n,i){let o=Mt(e.generated.reactDir,"../swiftui");if(await C0(o,{recursive:!0}),n?await lr(Mt(o,"VcTheme.swift"),bd(n.theme,n.tokens),"utf-8"):await lr(Mt(o,"VcTheme.swift"),await ct(Hd(),"VcTheme.swift.hbs",{}),"utf-8"),await lr(Mt(o,"FlowLayout.swift"),I0,"utf-8"),i&&n){for(let s of i.partials)try{let a=await No(s,{theme:n.theme,tokens:n.tokens}),l=Mt(o,`${s.exportName}.generated.swift`);await lr(l,a,"utf-8"),console.log(` swiftui/${s.exportName} \u2192 ${l}`)}catch(a){console.warn(` swiftui/${s.exportName}: skipped (${a.message})`)}for(let s of r.views){let a=i.screens.get(s.screenName);if(a)try{let l=await No(a,{theme:n.theme,tokens:n.tokens}),u=Mt(o,`${s.screenName}.generated.swift`);await lr(u,l,"utf-8"),console.log(` swiftui/${s.screenName} \u2192 ${u}`)}catch(l){console.warn(` swiftui/${s.screenName}: skipped (${l.message})`)}}}for(let s of r.views)if(s.targets.includes("swiftui")){let a=Mt(o,`${s.screenName}.swift`);await lr(a,await ct(Hd(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of r.views){let a=Wa(t,e,s.screenName);if(await Bd(a))try{let l=await Ga(a),u=JSON.stringify(l,null,2)+`
|
|
207
|
+
`,p=Mt(o,`${s.screenName}.SampleData.json`);await lr(p,u,"utf-8"),console.log(` swiftui/${s.screenName}.SampleData.json \u2192 ${p}`)}catch(l){console.warn(` swiftui/${s.screenName}.SampleData.json: skipped (${l.message})`)}}}var I0,zd=J(()=>{"use strict";Ft();jn();Sd();za();Ka();I0=`import SwiftUI
|
|
208
|
+
|
|
209
|
+
/// CSS flex-wrap equivalent: wraps children to next line when horizontal space runs out.
|
|
210
|
+
struct FlowLayout: Layout {
|
|
211
|
+
var spacing: CGFloat = 8
|
|
212
|
+
|
|
213
|
+
func sizeThatFits(proposal: ProposedViewSize, subviews: Subviews, cache: inout ()) -> CGSize {
|
|
214
|
+
let containerWidth = proposal.width ?? .infinity
|
|
215
|
+
var x: CGFloat = 0
|
|
216
|
+
var y: CGFloat = 0
|
|
217
|
+
var rowHeight: CGFloat = 0
|
|
218
|
+
|
|
219
|
+
for subview in subviews {
|
|
220
|
+
let size = subview.sizeThatFits(.unspecified)
|
|
221
|
+
if x + size.width > containerWidth && x > 0 {
|
|
222
|
+
y += rowHeight + spacing
|
|
223
|
+
x = 0
|
|
224
|
+
rowHeight = 0
|
|
225
|
+
}
|
|
226
|
+
x += size.width + spacing
|
|
227
|
+
rowHeight = max(rowHeight, size.height)
|
|
228
|
+
}
|
|
229
|
+
return CGSize(width: containerWidth, height: y + rowHeight)
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout ()) {
|
|
233
|
+
var x = bounds.minX
|
|
234
|
+
var y = bounds.minY
|
|
235
|
+
var rowHeight: CGFloat = 0
|
|
236
|
+
|
|
237
|
+
for subview in subviews {
|
|
238
|
+
let size = subview.sizeThatFits(.unspecified)
|
|
239
|
+
if x + size.width > bounds.maxX && x > bounds.minX {
|
|
240
|
+
y += rowHeight + spacing
|
|
241
|
+
x = bounds.minX
|
|
242
|
+
rowHeight = 0
|
|
243
|
+
}
|
|
244
|
+
subview.place(at: CGPoint(x: x, y: y), proposal: ProposedViewSize(size))
|
|
245
|
+
x += size.width + spacing
|
|
246
|
+
rowHeight = max(rowHeight, size.height)
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
`});var Kd={};Cr(Kd,{renderComposeRuntime:()=>T0});import{mkdir as N0,writeFile as Wd}from"node:fs/promises";import{resolve as Ao}from"node:path";function Gd(){return Ao(ke(),"renderers/compose/templates")}async function T0(t,e){let r=Ao(t.generated.reactDir,"../compose");await N0(r,{recursive:!0}),await Wd(Ao(r,"VcTheme.kt"),await ct(Gd(),"VcTheme.kt.hbs",{packageName:"generated.compose"}),"utf-8");for(let n of e.views)if(n.targets.includes("compose")){let i=Ao(r,`${n.screenName}Screen.kt`);await Wd(i,await ct(Gd(),"Screen.kt.hbs",{screenName:n.screenName,packageName:"generated.compose"}),"utf-8"),console.log(` compose \u2192 ${i}`)}}var Jd=J(()=>{"use strict";Ft();jn()});var Yd={};Cr(Yd,{renderComposeRuntime:()=>V0,renderReactFromIr:()=>A0,renderReactPreviewBundle:()=>O0,renderReactRuntime:()=>M0,renderSwiftComponent:()=>j0,renderSwiftUIRuntime:()=>L0});async function A0(t,e,r){return(await Promise.resolve().then(()=>(Ws(),zs))).renderReactFromIr(t,e,r)}async function O0(t,e,r){return(await Promise.resolve().then(()=>(Ws(),zs))).renderReactPreviewBundle(t,e,r)}async function M0(t,e){return(await Promise.resolve().then(()=>(gd(),md))).renderReactRuntime(t,e)}async function L0(t,e,r,n,i){return(await Promise.resolve().then(()=>(zd(),Ud))).renderSwiftUIRuntime(t,e,r,n,i)}async function j0(t,e){return(await Promise.resolve().then(()=>(za(),Ld))).renderSwiftComponent(t,e)}async function V0(t,e){return(await Promise.resolve().then(()=>(Jd(),Kd))).renderComposeRuntime(t,e)}var Xd=J(()=>{"use strict"});import{resolve as Oo}from"node:path";function Qd(){return Ja||(Ja=Promise.resolve().then(()=>(Xd(),Yd))),Ja}function Vn(t){return t??Oo(ke(),"renderers/react/templates")}function Ur(){return Oo(ke(),"renderers/react/runtime")}function Dn(){return Oo(Ur(),"structural.css")}function D0(){return Oo(ke(),"renderers/react/elements.yaml")}function Ya(t){return t===D0()}var Ja,qn=J(()=>{"use strict";Ft()});import{readFile as q0}from"node:fs/promises";import{extname as F0,resolve as B0}from"node:path";async function Mo(t){let e=B0(t),r=await q0(e,"utf-8"),n=F0(e).toLowerCase();if(n===".json")return JSON.parse(r);if(n===".yaml"||n===".yml")return st.load(r);throw new Error(`Unsupported design file extension "${n}" (expected .yaml, .yml, or .json): ${e}`)}var Xa=J(()=>{"use strict";Ir()});var Lo,vt,Gr,jo,Se,Wr,cr=J(()=>{"use strict";Lo=["color","dimension","shadow","typography","layout"],vt=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},Gr=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],jo={background:["color"],foreground:["color"],radius:["dimension","layout"],padding:["dimension","layout"],shadow:["shadow"],typography:["typography"],display:["layout"],gridTemplateColumns:["layout"],minHeight:["dimension","layout"],maxWidth:["dimension","layout"],width:["dimension","layout"],height:["dimension","layout"],margin:["dimension","layout"],border:["layout"],borderColor:["color"],flexDirection:["layout"],fontWeight:["layout"],fontSize:["dimension","layout"],alignItems:["layout"],justifyContent:["layout"]},Se=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}},Wr=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function Kr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function U0(t){if(!Gr.includes(t))throw new Se(`Unknown variant property "${t}" (expected ${Gr.join(", ")})`);return t}function z0(t,e,r){if(typeof t!="string")throw new Se(`${e}.${r} must be a token reference string like "{ui.primary}"`);let n=t.match(H0);if(!n)throw new Se(`${e}.${r} must be a token reference like "{ui.primary}", got "${t}"`);return n[1]}function Zd(t,e){let r={};for(let[n,i]of Object.entries(e)){let o=U0(n),s=z0(i,t,n);r[o]={ref:s,accepts:[...jo[o]]}}return r}function W0(t){if(t===void 0)return{};if(!Kr(t))throw new Se('Theme "defaults" must be an object');let e={};for(let[r,n]of Object.entries(t)){if(!Kr(n))throw new Se(`Theme defaults for "${r}" must be an object`);e[r]=Zd(`defaults.${r}`,n)}return e}function Qa(t){if(!Kr(t))throw new Se("Theme document must be a YAML/JSON object");let e=t.variants;if(!Kr(e))throw new Se('Theme document must contain a "variants" object');let r={};for(let[n,i]of Object.entries(e)){if(!Kr(i))throw new Se(`Theme variants for "${n}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!Kr(a))throw new Se(`Theme variant "${n}.${s}" must be an object`);o[s]=Zd(`${n}.${s}`,a)}r[n]=o}return{defaults:W0(t.defaults),variants:r}}var H0,Za=J(()=>{"use strict";cr();H0=/^\{([^}]+)\}$/});function Un(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function K0(t){return`--${t.replace(/\./g,"-")}`}function J0(t,e){if(typeof t!="string"||!Lo.includes(t))throw new vt(`Token "${e}" has unsupported $type "${String(t)}" (expected ${Lo.join(", ")})`);return t}function eh(t,e,r){if(Un(t)){if("$type"in t&&"$value"in t){r.push({path:e,type:J0(t.$type,e),rawValue:t.$value});return}for(let[n,i]of Object.entries(t)){if(n.startsWith("$"))continue;let o=e?`${e}.${n}`:n;eh(i,o,r)}}}function Y0(t,e){if(typeof e=="string")return e;if(t==="typography"&&Un(e)){if(typeof e.fontFamily=="string")return e.fontFamily;let r=[e.fontWeight,e.fontStyle,e.fontSize,e.lineHeight,e.fontFamily].filter(n=>n!=null);if(r.length>0)return r.map(String).join(" ")}if(t==="shadow"&&Array.isArray(e))return e.map(r=>Un(r)?`${r.offsetX??0} ${r.offsetY??0} ${r.blur??0} ${r.color??"transparent"}`:String(r)).join(", ");if(t==="shadow"&&Un(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new vt(`Token value for "${t}" must be a string or supported object`)}function X0(t){return typeof t!="string"?null:t.match(G0)?.[1]??null}function th(t,e,r,n,i){let o=X0(e);if(!o){let l=r.get(t);if(!l)throw new vt(`Unknown token path "${t}"`);return{value:Y0(l.type,e)}}if(n.has(t))throw new vt(`Circular token reference detected at "${t}"`);let s=r.get(o);if(!s)throw new vt(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};n.add(t);let a=th(o,s.rawValue,r,n,i);return n.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function el(t){if(!Un(t))throw new vt("Token document must be a YAML/JSON object");let e=[];eh(t,"",e);let r=new Map(e.map(o=>[o.path,o])),n=new Map,i=[];for(let o of e){let{value:s,ref:a}=th(o.path,o.rawValue,r,new Set,n);n.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:K0(o.path),ref:a})}return{entries:i}}var G0,tl=J(()=>{"use strict";cr();G0=/^\{([^}]+)\}$/});function rl(t){let e=Ku(t),r=new Set;for(let n of e)Gr.includes(n)&&r.add(n);return r}var rh=J(()=>{"use strict";It();cr()});function Q0(t){return new Map(t.entries.map(e=>[e.path,e]))}function nh(t,e,r,n,i){for(let[o,s]of Object.entries(r)){let a=jo[o];if(!a)throw new Se(`Unknown variant property "${o}" on ${t}`);if(!n.has(o))throw new Se(`Property "${o}" is not allowed for ${e} in ${t}`);let l=i.get(s.ref);if(!l)throw new Se(`${t}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(l.type))throw new Se(`${t}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${l.type}`)}}function ih(t,e){let r=Q0(t);for(let[n,i]of Object.entries(e.defaults)){let o=rl(n);nh(`defaults.${n}`,n,i,o,r)}for(let[n,i]of Object.entries(e.variants)){let o=rl(n);for(let[s,a]of Object.entries(i))nh(`variants.${n}.${s}`,n,a,o,r)}}function nl(t,e){ih(t,e)}var il=J(()=>{"use strict";cr();rh()});function ol(t){let e=[":root {"];for(let r of t.entries)e.push(` ${r.cssVar}: ${r.value};`);return e.push("}"),e.join(`
|
|
251
|
+
`)}var oh=J(()=>{"use strict"});var Vo,sl=J(()=>{"use strict";Vo={background:"background-color",foreground:"color",radius:"border-radius",padding:"padding",shadow:"box-shadow",typography:"font",display:"display",gridTemplateColumns:"grid-template-columns",minHeight:"min-height",maxWidth:"max-width",width:"width",height:"height",margin:"margin",border:"border",borderColor:"border-color",flexDirection:"flex-direction",fontWeight:"font-weight",fontSize:"font-size",alignItems:"align-items",justifyContent:"justify-content"}});function Do(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function qo(t,e){let r=t.entries.find(n=>n.path===e);if(!r)throw new Error(`Token reference "${e}" not found while emitting theme CSS`);return r.cssVar}var al=J(()=>{"use strict"});function ll(t,e){let r=[];for(let[n,i]of Object.entries(e.defaults)){let o=Do(n),s=[];for(let[a,l]of Object.entries(i)){let u=Vo[a];if(!u){console.warn(`[view-contracts] CSS theme: variant property "${a}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let p=qo(t,l.ref);s.push(` ${u}: var(${p});`)}s.length!==0&&r.push(`.vc-${o} {
|
|
252
|
+
${s.join(`
|
|
253
|
+
`)}
|
|
254
|
+
}`)}return r.join(`
|
|
255
|
+
|
|
256
|
+
`)}var sh=J(()=>{"use strict";sl();al()});function cl(t,e){let r=[];for(let[n,i]of Object.entries(e.variants)){let o=Do(n);for(let[s,a]of Object.entries(i)){let l=[];for(let[u,p]of Object.entries(a)){let f=Vo[u];if(!f){console.warn(`[view-contracts] CSS theme: variant property "${u}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let d=qo(t,p.ref);l.push(` ${f}: var(${d});`)}l.length!==0&&r.push(`.vc-${o}--${s} {
|
|
257
|
+
${l.join(`
|
|
258
|
+
`)}
|
|
259
|
+
}`)}}return r.join(`
|
|
260
|
+
|
|
261
|
+
`)}var ah=J(()=>{"use strict";sl();al()});function lh(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function Z0(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function ch(t,e,r,n,i,o){let s=r.variants[t];if(!s){e!==void 0&&!lh(e)&&typeof e=="string"&&i.push(`${n}: <${t}> references variant "${e}" but no variants are defined for ${t} in theme.yaml`);return}if(e===void 0||lh(e)||typeof e!="string")return;(o?.mapMutedToDefault&&e==="muted"?"default":e)in s||i.push(`${n}: <${t}> references unknown variant "${e}" (not defined in theme.yaml)`)}function Fo(t,e,r,n){if(t.kind==="component"){let i=Z0(t.props);t.props.variant!==void 0?ch(t.name,t.props.variant,e,r,n):i!==void 0&&t.name in e.variants&&ch(t.name,i,e,r,n,{mapMutedToDefault:!0});for(let o of t.children)Fo(o,e,r,n);return}if(t.kind==="map"){Fo(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)Fo(i,e,r,n);return}t.kind}function ul(t,e){let r=[];for(let n of t)Fo(n.root,e,n.source,r);if(r.length>0)throw new Error(`View variant validation failed:
|
|
262
|
+
${r.map(n=>` - ${n}`).join(`
|
|
263
|
+
`)}`)}var uh=J(()=>{"use strict"});function fl(t,e){return[...new Set([...t.matchAll(e)].map(r=>r[0]))]}function fh(t,e,r){let n=e.slice(0,5).map(o=>` - ${t}: ${o}`).join(`
|
|
264
|
+
`),i=e.length>5?`
|
|
265
|
+
\u2026 and ${e.length-5} more`:"";return`${r}
|
|
266
|
+
${n}${i}`}function pl(t,e){let r=fl(t,e2);if(r.length!==0)throw new Wr(fh(e,r,".vc-* selectors are reserved for DSL output (theme.yaml variants + package structural CSS). Use project-owned class names (e.g. ext-*) in extension CSS."))}function dl(t,e){let r=fl(t,t2),n=fl(t,r2),i=[...r,...n];if(i.length!==0)throw new Wr(fh(e,i,".vc-* class names are reserved for DSL lowering output. Extension components must use project-owned class names (e.g. ext-*) in src/components/."))}var e2,t2,r2,hl=J(()=>{"use strict";cr();e2=/\.vc-[a-z][\w-]*/g,t2=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,r2=/\bextensionClassName\s*\(/g});import{readFile as ph,stat as n2}from"node:fs/promises";import{resolve as i2}from"node:path";async function dh(t){try{return await n2(t),!0}catch{return!1}}async function zn(t,e){let r=t.design?.extensionsCss;r&&await dh(r)&&pl(await ph(r,"utf-8"),r);let n=xe(e);for(let i of["extensions.tsx","extensions.ts"]){let o=i2(n,"src/components",i);await dh(o)&&dl(await ph(o,"utf-8"),o)}}var hh=J(()=>{"use strict";Ct();hl()});async function o2(t){let e=await Mo(t);return el(e)}async function s2(t){let e=await Mo(t);return Qa(e)}async function Bo(t,e){let r=await o2(t),n=await s2(e);return nl(r,n),{tokenIR:r,themeIR:n}}var ml=J(()=>{"use strict";Xa();Za();tl();il();oh();sh();ah();Xa();Za();tl();il();uh();hl();hh();Co();cr()});import{readFile as mh,stat as a2}from"node:fs/promises";async function l2(t){try{return await a2(t),!0}catch{return!1}}async function Fn(t,e){let r=xe(e),{tokensPath:n,themePath:i}=ji(t),{tokenIR:o,themeIR:s}=await Bo(n,i);await zn(t,e);let a=await mh(Dn(),"utf-8"),l=ll(o,s),u=cl(o,s),p=`${ol(o)}
|
|
267
|
+
|
|
268
|
+
${a.trim()}`;l&&(p+=`
|
|
269
|
+
|
|
270
|
+
${l}`),p+=`
|
|
271
|
+
|
|
272
|
+
${u}`;let f=t.design?.extensionsCss;return f&&await l2(f)&&(p+=`
|
|
273
|
+
|
|
274
|
+
${await mh(f,"utf-8")}`),p}var Co=J(()=>{"use strict";Ct();qn();ml()});var Xn=$(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.regexpCode=oe.getEsmExportName=oe.getProperty=oe.safeStringify=oe.stringify=oe.strConcat=oe.addCodeArg=oe.str=oe._=oe.nil=oe._Code=oe.Name=oe.IDENTIFIER=oe._CodeOrName=void 0;var Jn=class{};oe._CodeOrName=Jn;oe.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ur=class extends Jn{constructor(e){if(super(),!oe.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};oe.Name=ur;var Ze=class extends Jn{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof ur&&(r[n.str]=(r[n.str]||0)+1),r),{})}};oe._Code=Ze;oe.nil=new Ze("");function Th(t,...e){let r=[t[0]],n=0;for(;n<e.length;)kl(r,e[n]),r.push(t[++n]);return new Ze(r)}oe._=Th;var xl=new Ze("+");function Ah(t,...e){let r=[Yn(t[0])],n=0;for(;n<e.length;)r.push(xl),kl(r,e[n]),r.push(xl,Yn(t[++n]));return C2(r),new Ze(r)}oe.str=Ah;function kl(t,e){e instanceof Ze?t.push(...e._items):e instanceof ur?t.push(e):t.push(N2(e))}oe.addCodeArg=kl;function C2(t){let e=1;for(;e<t.length-1;){if(t[e]===xl){let r=I2(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function I2(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof ur||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof ur))return`"${t}${e.slice(1)}`}function R2(t,e){return e.emptyStr()?t:t.emptyStr()?e:Ah`${t}${e}`}oe.strConcat=R2;function N2(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Yn(Array.isArray(t)?t.join(","):t)}function T2(t){return new Ze(Yn(t))}oe.stringify=T2;function Yn(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}oe.safeStringify=Yn;function A2(t){return typeof t=="string"&&oe.IDENTIFIER.test(t)?new Ze(`.${t}`):Th`[${t}]`}oe.getProperty=A2;function O2(t){if(typeof t=="string"&&oe.IDENTIFIER.test(t))return new Ze(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}oe.getEsmExportName=O2;function M2(t){return new Ze(t.toString())}oe.regexpCode=M2});var Cl=$(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.ValueScope=Be.ValueScopeName=Be.Scope=Be.varKinds=Be.UsedValueState=void 0;var Fe=Xn(),El=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},zo;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(zo||(Be.UsedValueState=zo={}));Be.varKinds={const:new Fe.Name("const"),let:new Fe.Name("let"),var:new Fe.Name("var")};var Wo=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Fe.Name?e:this.name(e)}name(e){return new Fe.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Be.Scope=Wo;var Go=class extends Fe.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Fe._)`.${new Fe.Name(r)}[${n}]`}};Be.ValueScopeName=Go;var L2=(0,Fe._)`\n`,Pl=class extends Wo{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?L2:Fe.nil}}get(){return this._scope}name(e){return new Go(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,s=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[o];if(a){let p=a.get(s);if(p)return p}else a=this._values[o]=new Map;a.set(s,i);let l=this._scope[o]||(this._scope[o]=[]),u=l.length;return l[u]=r.ref,i.setValue(r,{property:o,itemIndex:u}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Fe._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let o=Fe.nil;for(let s in e){let a=e[s];if(!a)continue;let l=n[s]=n[s]||new Map;a.forEach(u=>{if(l.has(u))return;l.set(u,zo.Started);let p=r(u);if(p){let f=this.opts.es5?Be.varKinds.var:Be.varKinds.const;o=(0,Fe._)`${o}${f} ${u} = ${p};${this.opts._n}`}else if(p=i?.(u))o=(0,Fe._)`${o}${p}${this.opts._n}`;else throw new El(u);l.set(u,zo.Completed)})}return o}};Be.ValueScope=Pl});var Y=$(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.or=Z.and=Z.not=Z.CodeGen=Z.operators=Z.varKinds=Z.ValueScopeName=Z.ValueScope=Z.Scope=Z.Name=Z.regexpCode=Z.stringify=Z.getProperty=Z.nil=Z.strConcat=Z.str=Z._=void 0;var ne=Xn(),ut=Cl(),Ut=Xn();Object.defineProperty(Z,"_",{enumerable:!0,get:function(){return Ut._}});Object.defineProperty(Z,"str",{enumerable:!0,get:function(){return Ut.str}});Object.defineProperty(Z,"strConcat",{enumerable:!0,get:function(){return Ut.strConcat}});Object.defineProperty(Z,"nil",{enumerable:!0,get:function(){return Ut.nil}});Object.defineProperty(Z,"getProperty",{enumerable:!0,get:function(){return Ut.getProperty}});Object.defineProperty(Z,"stringify",{enumerable:!0,get:function(){return Ut.stringify}});Object.defineProperty(Z,"regexpCode",{enumerable:!0,get:function(){return Ut.regexpCode}});Object.defineProperty(Z,"Name",{enumerable:!0,get:function(){return Ut.Name}});var Xo=Cl();Object.defineProperty(Z,"Scope",{enumerable:!0,get:function(){return Xo.Scope}});Object.defineProperty(Z,"ValueScope",{enumerable:!0,get:function(){return Xo.ValueScope}});Object.defineProperty(Z,"ValueScopeName",{enumerable:!0,get:function(){return Xo.ValueScopeName}});Object.defineProperty(Z,"varKinds",{enumerable:!0,get:function(){return Xo.varKinds}});Z.operators={GT:new ne._Code(">"),GTE:new ne._Code(">="),LT:new ne._Code("<"),LTE:new ne._Code("<="),EQ:new ne._Code("==="),NEQ:new ne._Code("!=="),NOT:new ne._Code("!"),OR:new ne._Code("||"),AND:new ne._Code("&&"),ADD:new ne._Code("+")};var Lt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},Il=class extends Lt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?ut.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Xr(this.rhs,e,r)),this}get names(){return this.rhs instanceof ne._CodeOrName?this.rhs.names:{}}},Ko=class extends Lt{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof ne.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Xr(this.rhs,e,r),this}get names(){let e=this.lhs instanceof ne.Name?{}:{...this.lhs.names};return Yo(e,this.rhs)}},Rl=class extends Ko{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Nl=class extends Lt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Tl=class extends Lt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Al=class extends Lt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Ol=class extends Lt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Xr(this.code,e,r),this}get names(){return this.code instanceof ne._CodeOrName?this.code.names:{}}},Qn=class extends Lt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(e,r)||(j2(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>dr(e,r.names),{})}},jt=class extends Qn{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Ml=class extends Qn{},Yr=class extends jt{};Yr.kind="else";var fr=class t extends jt{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Yr(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Oh(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Xr(this.condition,e,r),this}get names(){let e=super.names;return Yo(e,this.condition),this.else&&dr(e,this.else.names),e}};fr.kind="if";var pr=class extends jt{};pr.kind="for";var Ll=class extends pr{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Xr(this.iteration,e,r),this}get names(){return dr(super.names,this.iteration.names)}},jl=class extends pr{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?ut.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=Yo(super.names,this.from);return Yo(e,this.to)}},Jo=class extends pr{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Xr(this.iterable,e,r),this}get names(){return dr(super.names,this.iterable.names)}},Zn=class extends jt{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Zn.kind="func";var ei=class extends Qn{render(e){return"return "+super.render(e)}};ei.kind="return";var Vl=class extends jt{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&dr(e,this.catch.names),this.finally&&dr(e,this.finally.names),e}},ti=class extends jt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};ti.kind="catch";var ri=class extends jt{render(e){return"finally"+super.render(e)}};ri.kind="finally";var Dl=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
275
|
+
`:""},this._extScope=e,this._scope=new ut.Scope({parent:e}),this._nodes=[new Ml]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new Il(e,o,n)),o}const(e,r,n){return this._def(ut.varKinds.const,e,r,n)}let(e,r,n){return this._def(ut.varKinds.let,e,r,n)}var(e,r,n){return this._def(ut.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new Ko(e,r,n))}add(e,r){return this._leafNode(new Rl(e,Z.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==ne.nil&&this._leafNode(new Ol(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,ne.addCodeArg)(r,i));return r.push("}"),new ne._Code(r)}if(e,r,n){if(this._blockNode(new fr(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new fr(e))}else(){return this._elseNode(new Yr)}endIf(){return this._endBlockNode(fr,Yr)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new Ll(e),r)}forRange(e,r,n,i,o=this.opts.es5?ut.varKinds.var:ut.varKinds.let){let s=this._scope.toName(e);return this._for(new jl(o,s,r,n),()=>i(s))}forOf(e,r,n,i=ut.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=r instanceof ne.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ne._)`${s}.length`,a=>{this.var(o,(0,ne._)`${s}[${a}]`),n(o)})}return this._for(new Jo("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?ut.varKinds.var:ut.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,ne._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new Jo("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(pr)}label(e){return this._leafNode(new Nl(e))}break(e){return this._leafNode(new Tl(e))}return(e){let r=new ei;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ei)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Vl;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new ti(o),r(o)}return n&&(this._currNode=i.finally=new ri,this.code(n)),this._endBlockNode(ti,ri)}throw(e){return this._leafNode(new Al(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=ne.nil,n,i){return this._blockNode(new Zn(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Zn)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof fr))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};Z.CodeGen=Dl;function dr(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Yo(t,e){return e instanceof ne._CodeOrName?dr(t,e.names):t}function Xr(t,e,r){if(t instanceof ne.Name)return n(t);if(!i(t))return t;return new ne._Code(t._items.reduce((o,s)=>(s instanceof ne.Name&&(s=n(s)),s instanceof ne._Code?o.push(...s._items):o.push(s),o),[]));function n(o){let s=r[o.str];return s===void 0||e[o.str]!==1?o:(delete e[o.str],s)}function i(o){return o instanceof ne._Code&&o._items.some(s=>s instanceof ne.Name&&e[s.str]===1&&r[s.str]!==void 0)}}function j2(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Oh(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,ne._)`!${ql(t)}`}Z.not=Oh;var V2=Mh(Z.operators.AND);function D2(...t){return t.reduce(V2)}Z.and=D2;var q2=Mh(Z.operators.OR);function F2(...t){return t.reduce(q2)}Z.or=F2;function Mh(t){return(e,r)=>e===ne.nil?r:r===ne.nil?e:(0,ne._)`${ql(e)} ${t} ${ql(r)}`}function ql(t){return t instanceof ne.Name?t:(0,ne._)`(${t})`}});var te=$(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.checkStrictMode=ee.getErrorPath=ee.Type=ee.useFunc=ee.setEvaluated=ee.evaluatedPropsToName=ee.mergeEvaluated=ee.eachItem=ee.unescapeJsonPointer=ee.escapeJsonPointer=ee.escapeFragment=ee.unescapeFragment=ee.schemaRefOrVal=ee.schemaHasRulesButRef=ee.schemaHasRules=ee.checkUnknownRules=ee.alwaysValidSchema=ee.toHash=void 0;var ue=Y(),B2=Xn();function H2(t){let e={};for(let r of t)e[r]=!0;return e}ee.toHash=H2;function U2(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Vh(t,e),!Dh(e,t.self.RULES.all))}ee.alwaysValidSchema=U2;function Vh(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let o in e)i[o]||Bh(t,`unknown keyword: "${o}"`)}ee.checkUnknownRules=Vh;function Dh(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}ee.schemaHasRules=Dh;function z2(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}ee.schemaHasRulesButRef=z2;function W2({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,ue._)`${r}`}return(0,ue._)`${t}${e}${(0,ue.getProperty)(n)}`}ee.schemaRefOrVal=W2;function G2(t){return qh(decodeURIComponent(t))}ee.unescapeFragment=G2;function K2(t){return encodeURIComponent(Bl(t))}ee.escapeFragment=K2;function Bl(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}ee.escapeJsonPointer=Bl;function qh(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}ee.unescapeJsonPointer=qh;function J2(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}ee.eachItem=J2;function Lh({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,s,a)=>{let l=s===void 0?o:s instanceof ue.Name?(o instanceof ue.Name?t(i,o,s):e(i,o,s),s):o instanceof ue.Name?(e(i,s,o),o):r(o,s);return a===ue.Name&&!(l instanceof ue.Name)?n(i,l):l}}ee.mergeEvaluated={props:Lh({mergeNames:(t,e,r)=>t.if((0,ue._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,ue._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,ue._)`${r} || {}`).code((0,ue._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,ue._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,ue._)`${r} || {}`),Hl(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Fh}),items:Lh({mergeNames:(t,e,r)=>t.if((0,ue._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,ue._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,ue._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,ue._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Fh(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,ue._)`{}`);return e!==void 0&&Hl(t,r,e),r}ee.evaluatedPropsToName=Fh;function Hl(t,e,r){Object.keys(r).forEach(n=>t.assign((0,ue._)`${e}${(0,ue.getProperty)(n)}`,!0))}ee.setEvaluated=Hl;var jh={};function Y2(t,e){return t.scopeValue("func",{ref:e,code:jh[e.code]||(jh[e.code]=new B2._Code(e.code))})}ee.useFunc=Y2;var Fl;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(Fl||(ee.Type=Fl={}));function X2(t,e,r){if(t instanceof ue.Name){let n=e===Fl.Num;return r?n?(0,ue._)`"[" + ${t} + "]"`:(0,ue._)`"['" + ${t} + "']"`:n?(0,ue._)`"/" + ${t}`:(0,ue._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,ue.getProperty)(t).toString():"/"+Bl(t)}ee.getErrorPath=X2;function Bh(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}ee.checkStrictMode=Bh});var et=$(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var Te=Y(),Q2={data:new Te.Name("data"),valCxt:new Te.Name("valCxt"),instancePath:new Te.Name("instancePath"),parentData:new Te.Name("parentData"),parentDataProperty:new Te.Name("parentDataProperty"),rootData:new Te.Name("rootData"),dynamicAnchors:new Te.Name("dynamicAnchors"),vErrors:new Te.Name("vErrors"),errors:new Te.Name("errors"),this:new Te.Name("this"),self:new Te.Name("self"),scope:new Te.Name("scope"),json:new Te.Name("json"),jsonPos:new Te.Name("jsonPos"),jsonLen:new Te.Name("jsonLen"),jsonPart:new Te.Name("jsonPart")};Ul.default=Q2});var ni=$(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.extendErrors=Ae.resetErrorsCount=Ae.reportExtraError=Ae.reportError=Ae.keyword$DataError=Ae.keywordError=void 0;var ie=Y(),Qo=te(),Ve=et();Ae.keywordError={message:({keyword:t})=>(0,ie.str)`must pass "${t}" keyword validation`};Ae.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ie.str)`"${t}" keyword must be ${e} ($data)`:(0,ie.str)`"${t}" keyword is invalid ($data)`};function Z2(t,e=Ae.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,l=zh(t,e,r);n??(s||a)?Hh(o,l):Uh(i,(0,ie._)`[${l}]`)}Ae.reportError=Z2;function e1(t,e=Ae.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:s}=n,a=zh(t,e,r);Hh(i,a),o||s||Uh(n,Ve.default.vErrors)}Ae.reportExtraError=e1;function t1(t,e){t.assign(Ve.default.errors,e),t.if((0,ie._)`${Ve.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ie._)`${Ve.default.vErrors}.length`,e),()=>t.assign(Ve.default.vErrors,null)))}Ae.resetErrorsCount=t1;function r1({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let s=t.name("err");t.forRange("i",i,Ve.default.errors,a=>{t.const(s,(0,ie._)`${Ve.default.vErrors}[${a}]`),t.if((0,ie._)`${s}.instancePath === undefined`,()=>t.assign((0,ie._)`${s}.instancePath`,(0,ie.strConcat)(Ve.default.instancePath,o.errorPath))),t.assign((0,ie._)`${s}.schemaPath`,(0,ie.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,ie._)`${s}.schema`,r),t.assign((0,ie._)`${s}.data`,n))})}Ae.extendErrors=r1;function Hh(t,e){let r=t.const("err",e);t.if((0,ie._)`${Ve.default.vErrors} === null`,()=>t.assign(Ve.default.vErrors,(0,ie._)`[${r}]`),(0,ie._)`${Ve.default.vErrors}.push(${r})`),t.code((0,ie._)`${Ve.default.errors}++`)}function Uh(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,ie._)`new ${t.ValidationError}(${e})`):(r.assign((0,ie._)`${n}.errors`,e),r.return(!1))}var hr={keyword:new ie.Name("keyword"),schemaPath:new ie.Name("schemaPath"),params:new ie.Name("params"),propertyName:new ie.Name("propertyName"),message:new ie.Name("message"),schema:new ie.Name("schema"),parentSchema:new ie.Name("parentSchema")};function zh(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,ie._)`{}`:n1(t,e,r)}function n1(t,e,r={}){let{gen:n,it:i}=t,o=[i1(i,r),o1(t,r)];return s1(t,e,o),n.object(...o)}function i1({errorPath:t},{instancePath:e}){let r=e?(0,ie.str)`${t}${(0,Qo.getErrorPath)(e,Qo.Type.Str)}`:t;return[Ve.default.instancePath,(0,ie.strConcat)(Ve.default.instancePath,r)]}function o1({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,ie.str)`${e}/${t}`;return r&&(i=(0,ie.str)`${i}${(0,Qo.getErrorPath)(r,Qo.Type.Str)}`),[hr.schemaPath,i]}function s1(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:l,propertyName:u,topSchemaRef:p,schemaPath:f}=a;n.push([hr.keyword,i],[hr.params,typeof e=="function"?e(t):e||(0,ie._)`{}`]),l.messages&&n.push([hr.message,typeof r=="function"?r(t):r]),l.verbose&&n.push([hr.schema,s],[hr.parentSchema,(0,ie._)`${p}${f}`],[Ve.default.data,o]),u&&n.push([hr.propertyName,u])}});var Gh=$(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.boolOrEmptySchema=Qr.topBoolOrEmptySchema=void 0;var a1=ni(),l1=Y(),c1=et(),u1={message:"boolean schema is false"};function f1(t){let{gen:e,schema:r,validateName:n}=t;r===!1?Wh(t,!1):typeof r=="object"&&r.$async===!0?e.return(c1.default.data):(e.assign((0,l1._)`${n}.errors`,null),e.return(!0))}Qr.topBoolOrEmptySchema=f1;function p1(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Wh(t)):r.var(e,!0)}Qr.boolOrEmptySchema=p1;function Wh(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,a1.reportError)(i,u1,void 0,e)}});var zl=$(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.getRules=Zr.isJSONType=void 0;var d1=["string","number","integer","boolean","null","object","array"],h1=new Set(d1);function m1(t){return typeof t=="string"&&h1.has(t)}Zr.isJSONType=m1;function g1(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Zr.getRules=g1});var Wl=$(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.shouldUseRule=zt.shouldUseGroup=zt.schemaHasRulesForType=void 0;function y1({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&Kh(t,n)}zt.schemaHasRulesForType=y1;function Kh(t,e){return e.rules.some(r=>Jh(t,r))}zt.shouldUseGroup=Kh;function Jh(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}zt.shouldUseRule=Jh});var ii=$(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.reportTypeError=Oe.checkDataTypes=Oe.checkDataType=Oe.coerceAndCheckDataType=Oe.getJSONTypes=Oe.getSchemaTypes=Oe.DataType=void 0;var v1=zl(),w1=Wl(),_1=ni(),Q=Y(),Yh=te(),en;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(en||(Oe.DataType=en={}));function b1(t){let e=Xh(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}Oe.getSchemaTypes=b1;function Xh(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(v1.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Oe.getJSONTypes=Xh;function S1(t,e){let{gen:r,data:n,opts:i}=t,o=$1(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,w1.schemaHasRulesForType)(t,e[0]));if(s){let a=Kl(e,n,i.strictNumbers,en.Wrong);r.if(a,()=>{o.length?x1(t,e,o):Jl(t)})}return s}Oe.coerceAndCheckDataType=S1;var Qh=new Set(["string","number","integer","boolean","null"]);function $1(t,e){return e?t.filter(r=>Qh.has(r)||e==="array"&&r==="array"):[]}function x1(t,e,r){let{gen:n,data:i,opts:o}=t,s=n.let("dataType",(0,Q._)`typeof ${i}`),a=n.let("coerced",(0,Q._)`undefined`);o.coerceTypes==="array"&&n.if((0,Q._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Q._)`${i}[0]`).assign(s,(0,Q._)`typeof ${i}`).if(Kl(e,i,o.strictNumbers),()=>n.assign(a,i))),n.if((0,Q._)`${a} !== undefined`);for(let u of r)(Qh.has(u)||u==="array"&&o.coerceTypes==="array")&&l(u);n.else(),Jl(t),n.endIf(),n.if((0,Q._)`${a} !== undefined`,()=>{n.assign(i,a),k1(t,a)});function l(u){switch(u){case"string":n.elseIf((0,Q._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,Q._)`"" + ${i}`).elseIf((0,Q._)`${i} === null`).assign(a,(0,Q._)`""`);return;case"number":n.elseIf((0,Q._)`${s} == "boolean" || ${i} === null
|
|
276
|
+
|| (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,Q._)`+${i}`);return;case"integer":n.elseIf((0,Q._)`${s} === "boolean" || ${i} === null
|
|
277
|
+
|| (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,Q._)`+${i}`);return;case"boolean":n.elseIf((0,Q._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,Q._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":n.elseIf((0,Q._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(a,null);return;case"array":n.elseIf((0,Q._)`${s} === "string" || ${s} === "number"
|
|
278
|
+
|| ${s} === "boolean" || ${i} === null`).assign(a,(0,Q._)`[${i}]`)}}}function k1({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,Q._)`${e} !== undefined`,()=>t.assign((0,Q._)`${e}[${r}]`,n))}function Gl(t,e,r,n=en.Correct){let i=n===en.Correct?Q.operators.EQ:Q.operators.NEQ,o;switch(t){case"null":return(0,Q._)`${e} ${i} null`;case"array":o=(0,Q._)`Array.isArray(${e})`;break;case"object":o=(0,Q._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s((0,Q._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return(0,Q._)`typeof ${e} ${i} ${t}`}return n===en.Correct?o:(0,Q.not)(o);function s(a=Q.nil){return(0,Q.and)((0,Q._)`typeof ${e} == "number"`,a,r?(0,Q._)`isFinite(${e})`:Q.nil)}}Oe.checkDataType=Gl;function Kl(t,e,r,n){if(t.length===1)return Gl(t[0],e,r,n);let i,o=(0,Yh.toHash)(t);if(o.array&&o.object){let s=(0,Q._)`typeof ${e} != "object"`;i=o.null?s:(0,Q._)`!${e} || ${s}`,delete o.null,delete o.array,delete o.object}else i=Q.nil;o.number&&delete o.integer;for(let s in o)i=(0,Q.and)(i,Gl(s,e,r,n));return i}Oe.checkDataTypes=Kl;var E1={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Q._)`{type: ${t}}`:(0,Q._)`{type: ${e}}`};function Jl(t){let e=P1(t);(0,_1.reportError)(e,E1)}Oe.reportTypeError=Jl;function P1(t){let{gen:e,data:r,schema:n}=t,i=(0,Yh.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var em=$(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.assignDefaults=void 0;var tn=Y(),C1=te();function I1(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)Zh(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>Zh(t,o,i.default))}Zo.assignDefaults=I1;function Zh(t,e,r){let{gen:n,compositeRule:i,data:o,opts:s}=t;if(r===void 0)return;let a=(0,tn._)`${o}${(0,tn.getProperty)(e)}`;if(i){(0,C1.checkStrictMode)(t,`default is ignored for: ${a}`);return}let l=(0,tn._)`${a} === undefined`;s.useDefaults==="empty"&&(l=(0,tn._)`${l} || ${a} === null || ${a} === ""`),n.if(l,(0,tn._)`${a} = ${(0,tn.stringify)(r)}`)}});var tt=$(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.validateUnion=le.validateArray=le.usePattern=le.callValidateCode=le.schemaProperties=le.allSchemaProperties=le.noPropertyInData=le.propertyInData=le.isOwnProperty=le.hasPropFunc=le.reportMissingProp=le.checkMissingProp=le.checkReportMissingProp=void 0;var he=Y(),Yl=te(),Wt=et(),R1=te();function N1(t,e){let{gen:r,data:n,it:i}=t;r.if(Ql(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,he._)`${e}`},!0),t.error()})}le.checkReportMissingProp=N1;function T1({gen:t,data:e,it:{opts:r}},n,i){return(0,he.or)(...n.map(o=>(0,he.and)(Ql(t,e,o,r.ownProperties),(0,he._)`${i} = ${o}`)))}le.checkMissingProp=T1;function A1(t,e){t.setParams({missingProperty:e},!0),t.error()}le.reportMissingProp=A1;function tm(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,he._)`Object.prototype.hasOwnProperty`})}le.hasPropFunc=tm;function Xl(t,e,r){return(0,he._)`${tm(t)}.call(${e}, ${r})`}le.isOwnProperty=Xl;function O1(t,e,r,n){let i=(0,he._)`${e}${(0,he.getProperty)(r)} !== undefined`;return n?(0,he._)`${i} && ${Xl(t,e,r)}`:i}le.propertyInData=O1;function Ql(t,e,r,n){let i=(0,he._)`${e}${(0,he.getProperty)(r)} === undefined`;return n?(0,he.or)(i,(0,he.not)(Xl(t,e,r))):i}le.noPropertyInData=Ql;function rm(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}le.allSchemaProperties=rm;function M1(t,e){return rm(e).filter(r=>!(0,Yl.alwaysValidSchema)(t,e[r]))}le.schemaProperties=M1;function L1({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,l,u){let p=u?(0,he._)`${t}, ${e}, ${n}${i}`:e,f=[[Wt.default.instancePath,(0,he.strConcat)(Wt.default.instancePath,o)],[Wt.default.parentData,s.parentData],[Wt.default.parentDataProperty,s.parentDataProperty],[Wt.default.rootData,Wt.default.rootData]];s.opts.dynamicRef&&f.push([Wt.default.dynamicAnchors,Wt.default.dynamicAnchors]);let d=(0,he._)`${p}, ${r.object(...f)}`;return l!==he.nil?(0,he._)`${a}.call(${l}, ${d})`:(0,he._)`${a}(${d})`}le.callValidateCode=L1;var j1=(0,he._)`new RegExp`;function V1({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(r,n);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,he._)`${i.code==="new RegExp"?j1:(0,R1.useFunc)(t,i)}(${r}, ${n})`})}le.usePattern=V1;function D1(t){let{gen:e,data:r,keyword:n,it:i}=t,o=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(o,!0),s(()=>e.break()),o;function s(a){let l=e.const("len",(0,he._)`${r}.length`);e.forRange("i",0,l,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:Yl.Type.Num},o),e.if((0,he.not)(o),a)})}}le.validateArray=D1;function q1(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(l=>(0,Yl.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((l,u)=>{let p=t.subschema({keyword:n,schemaProp:u,compositeRule:!0},a);e.assign(s,(0,he._)`${s} || ${a}`),t.mergeValidEvaluated(p,a)||e.if((0,he.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}le.validateUnion=q1});var om=$(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.validateKeywordUsage=wt.validSchemaType=wt.funcKeywordCode=wt.macroKeywordCode=void 0;var De=Y(),mr=et(),F1=tt(),B1=ni();function H1(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),l=im(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");t.subschema({schema:a,schemaPath:De.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}wt.macroKeywordCode=H1;function U1(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:l}=t;W1(l,e);let u=!a&&e.compile?e.compile.call(l.self,o,s,l):e.validate,p=im(n,i,u),f=n.let("valid");t.block$data(f,d),t.ok((r=e.valid)!==null&&r!==void 0?r:f);function d(){if(e.errors===!1)y(),e.modifying&&nm(t),_(()=>t.error());else{let b=e.async?m():g();e.modifying&&nm(t),_(()=>z1(t,b))}}function m(){let b=n.let("ruleErrs",null);return n.try(()=>y((0,De._)`await `),L=>n.assign(f,!1).if((0,De._)`${L} instanceof ${l.ValidationError}`,()=>n.assign(b,(0,De._)`${L}.errors`),()=>n.throw(L))),b}function g(){let b=(0,De._)`${p}.errors`;return n.assign(b,null),y(De.nil),b}function y(b=e.async?(0,De._)`await `:De.nil){let L=l.opts.passContext?mr.default.this:mr.default.self,q=!("compile"in e&&!a||e.schema===!1);n.assign(f,(0,De._)`${b}${(0,F1.callValidateCode)(t,p,L,q)}`,e.modifying)}function _(b){var L;n.if((0,De.not)((L=e.valid)!==null&&L!==void 0?L:f),b)}}wt.funcKeywordCode=U1;function nm(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,De._)`${n.parentData}[${n.parentDataProperty}]`))}function z1(t,e){let{gen:r}=t;r.if((0,De._)`Array.isArray(${e})`,()=>{r.assign(mr.default.vErrors,(0,De._)`${mr.default.vErrors} === null ? ${e} : ${mr.default.vErrors}.concat(${e})`).assign(mr.default.errors,(0,De._)`${mr.default.vErrors}.length`),(0,B1.extendErrors)(t)},()=>t.error())}function W1({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function im(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,De.stringify)(r)})}function G1(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}wt.validSchemaType=G1;function K1({schema:t,opts:e,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let s=i.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let l=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}wt.validateKeywordUsage=K1});var am=$(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.extendSubschemaMode=Gt.extendSubschemaData=Gt.getSubschema=void 0;var _t=Y(),sm=te();function J1(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:s}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return r===void 0?{schema:a,schemaPath:(0,_t._)`${t.schemaPath}${(0,_t.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,_t._)`${t.schemaPath}${(0,_t.getProperty)(e)}${(0,_t.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,sm.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Gt.getSubschema=J1;function Y1(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:s}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(r!==void 0){let{errorPath:u,dataPathArr:p,opts:f}=e,d=a.let("data",(0,_t._)`${e.data}${(0,_t.getProperty)(r)}`,!0);l(d),t.errorPath=(0,_t.str)`${u}${(0,sm.getErrorPath)(r,n,f.jsPropertySyntax)}`,t.parentDataProperty=(0,_t._)`${r}`,t.dataPathArr=[...p,t.parentDataProperty]}if(i!==void 0){let u=i instanceof _t.Name?i:a.let("data",i,!0);l(u),s!==void 0&&(t.propertyName=s)}o&&(t.dataTypes=o);function l(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u]}}Gt.extendSubschemaData=Y1;function X1(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}Gt.extendSubschemaMode=X1});var Zl=$((kN,lm)=>{"use strict";lm.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var s=o[i];if(!t(e[s],r[s]))return!1}return!0}return e!==e&&r!==r}});var um=$((EN,cm)=>{"use strict";var Kt=cm.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};es(e,n,i,t,"",t)};Kt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Kt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Kt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Kt.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function es(t,e,r,n,i,o,s,a,l,u){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,s,a,l,u);for(var p in n){var f=n[p];if(Array.isArray(f)){if(p in Kt.arrayKeywords)for(var d=0;d<f.length;d++)es(t,e,r,f[d],i+"/"+p+"/"+d,o,i,p,n,d)}else if(p in Kt.propsKeywords){if(f&&typeof f=="object")for(var m in f)es(t,e,r,f[m],i+"/"+p+"/"+Q1(m),o,i,p,n,m)}else(p in Kt.keywords||t.allKeys&&!(p in Kt.skipKeywords))&&es(t,e,r,f,i+"/"+p,o,i,p,n)}r(n,i,o,s,a,l,u)}}function Q1(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var oi=$(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.getSchemaRefs=He.resolveUrl=He.normalizeId=He._getFullPath=He.getFullPath=He.inlineRef=void 0;var Z1=te(),eS=Zl(),tS=um(),rS=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function nS(t,e=!0){return typeof t=="boolean"?!0:e===!0?!ec(t):e?fm(t)<=e:!1}He.inlineRef=nS;var iS=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ec(t){for(let e in t){if(iS.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(ec)||typeof r=="object"&&ec(r))return!0}return!1}function fm(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!rS.has(r)&&(typeof t[r]=="object"&&(0,Z1.eachItem)(t[r],n=>e+=fm(n)),e===1/0))return 1/0}return e}function pm(t,e="",r){r!==!1&&(e=rn(e));let n=t.parse(e);return dm(t,n)}He.getFullPath=pm;function dm(t,e){return t.serialize(e).split("#")[0]+"#"}He._getFullPath=dm;var oS=/#\/?$/;function rn(t){return t?t.replace(oS,""):""}He.normalizeId=rn;function sS(t,e,r){return r=rn(r),t.resolve(e,r)}He.resolveUrl=sS;var aS=/^[a-z_][-a-z0-9._]*$/i;function lS(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=rn(t[r]||e),o={"":i},s=pm(n,i,!1),a={},l=new Set;return tS(t,{allKeys:!0},(f,d,m,g)=>{if(g===void 0)return;let y=s+d,_=o[g];typeof f[r]=="string"&&(_=b.call(this,f[r])),L.call(this,f.$anchor),L.call(this,f.$dynamicAnchor),o[d]=_;function b(q){let A=this.opts.uriResolver.resolve;if(q=rn(_?A(_,q):q),l.has(q))throw p(q);l.add(q);let T=this.refs[q];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?u(f,T.schema,q):q!==rn(y)&&(q[0]==="#"?(u(f,a[q],q),a[q]=f):this.refs[q]=y),q}function L(q){if(typeof q=="string"){if(!aS.test(q))throw new Error(`invalid anchor "${q}"`);b.call(this,`#${q}`)}}}),a;function u(f,d,m){if(d!==void 0&&!eS(f,d))throw p(m)}function p(f){return new Error(`reference "${f}" resolves to more than one schema`)}}He.getSchemaRefs=lS});var li=$(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.getData=Jt.KeywordCxt=Jt.validateFunctionCode=void 0;var vm=Gh(),hm=ii(),rc=Wl(),ts=ii(),cS=em(),ai=om(),tc=am(),H=Y(),K=et(),uS=oi(),Vt=te(),si=ni();function fS(t){if(bm(t)&&(Sm(t),_m(t))){hS(t);return}wm(t,()=>(0,vm.topBoolOrEmptySchema)(t))}Jt.validateFunctionCode=fS;function wm({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,H._)`${K.default.data}, ${K.default.valCxt}`,n.$async,()=>{t.code((0,H._)`"use strict"; ${mm(r,i)}`),dS(t,i),t.code(o)}):t.func(e,(0,H._)`${K.default.data}, ${pS(i)}`,n.$async,()=>t.code(mm(r,i)).code(o))}function pS(t){return(0,H._)`{${K.default.instancePath}="", ${K.default.parentData}, ${K.default.parentDataProperty}, ${K.default.rootData}=${K.default.data}${t.dynamicRef?(0,H._)`, ${K.default.dynamicAnchors}={}`:H.nil}}={}`}function dS(t,e){t.if(K.default.valCxt,()=>{t.var(K.default.instancePath,(0,H._)`${K.default.valCxt}.${K.default.instancePath}`),t.var(K.default.parentData,(0,H._)`${K.default.valCxt}.${K.default.parentData}`),t.var(K.default.parentDataProperty,(0,H._)`${K.default.valCxt}.${K.default.parentDataProperty}`),t.var(K.default.rootData,(0,H._)`${K.default.valCxt}.${K.default.rootData}`),e.dynamicRef&&t.var(K.default.dynamicAnchors,(0,H._)`${K.default.valCxt}.${K.default.dynamicAnchors}`)},()=>{t.var(K.default.instancePath,(0,H._)`""`),t.var(K.default.parentData,(0,H._)`undefined`),t.var(K.default.parentDataProperty,(0,H._)`undefined`),t.var(K.default.rootData,K.default.data),e.dynamicRef&&t.var(K.default.dynamicAnchors,(0,H._)`{}`)})}function hS(t){let{schema:e,opts:r,gen:n}=t;wm(t,()=>{r.$comment&&e.$comment&&xm(t),wS(t),n.let(K.default.vErrors,null),n.let(K.default.errors,0),r.unevaluated&&mS(t),$m(t),SS(t)})}function mS(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,H._)`${r}.evaluated`),e.if((0,H._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,H._)`${t.evaluated}.props`,(0,H._)`undefined`)),e.if((0,H._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,H._)`${t.evaluated}.items`,(0,H._)`undefined`))}function mm(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,H._)`/*# sourceURL=${r} */`:H.nil}function gS(t,e){if(bm(t)&&(Sm(t),_m(t))){yS(t,e);return}(0,vm.boolOrEmptySchema)(t,e)}function _m({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function bm(t){return typeof t.schema!="boolean"}function yS(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&xm(t),_S(t),bS(t);let o=n.const("_errs",K.default.errors);$m(t,o),n.var(e,(0,H._)`${o} === ${K.default.errors}`)}function Sm(t){(0,Vt.checkUnknownRules)(t),vS(t)}function $m(t,e){if(t.opts.jtd)return gm(t,[],!1,e);let r=(0,hm.getSchemaTypes)(t.schema),n=(0,hm.coerceAndCheckDataType)(t,r);gm(t,r,!n,e)}function vS(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Vt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function wS(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Vt.checkStrictMode)(t,"default is ignored in the schema root")}function _S(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,uS.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function bS(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function xm({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,H._)`${K.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,H.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,H._)`${K.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function SS(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,H._)`${K.default.errors} === 0`,()=>e.return(K.default.data),()=>e.throw((0,H._)`new ${i}(${K.default.vErrors})`)):(e.assign((0,H._)`${n}.errors`,K.default.vErrors),o.unevaluated&&$S(t),e.return((0,H._)`${K.default.errors} === 0`))}function $S({gen:t,evaluated:e,props:r,items:n}){r instanceof H.Name&&t.assign((0,H._)`${e}.props`,r),n instanceof H.Name&&t.assign((0,H._)`${e}.items`,n)}function gm(t,e,r,n){let{gen:i,schema:o,data:s,allErrors:a,opts:l,self:u}=t,{RULES:p}=u;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,Vt.schemaHasRulesButRef)(o,p))){i.block(()=>Em(t,"$ref",p.all.$ref.definition));return}l.jtd||xS(t,e),i.block(()=>{for(let d of p.rules)f(d);f(p.post)});function f(d){(0,rc.shouldUseGroup)(o,d)&&(d.type?(i.if((0,ts.checkDataType)(d.type,s,l.strictNumbers)),ym(t,d),e.length===1&&e[0]===d.type&&r&&(i.else(),(0,ts.reportTypeError)(t)),i.endIf()):ym(t,d),a||i.if((0,H._)`${K.default.errors} === ${n||0}`))}}function ym(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,cS.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,rc.shouldUseRule)(n,o)&&Em(t,o.keyword,o.definition,e.type)})}function xS(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(kS(t,e),t.opts.allowUnionTypes||ES(t,e),PS(t,t.dataTypes))}function kS(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{km(t.dataTypes,r)||nc(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),IS(t,e)}}function ES(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&nc(t,"use allowUnionTypes to allow union type keyword")}function PS(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,rc.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>CS(e,s))&&nc(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function CS(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function km(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function IS(t,e){let r=[];for(let n of t.dataTypes)km(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function nc(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Vt.checkStrictMode)(t,e,t.opts.strictTypes)}var rs=class{constructor(e,r,n){if((0,ai.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Vt.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Pm(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,ai.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",K.default.errors))}result(e,r,n){this.failResult((0,H.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,H.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,H._)`${r} !== undefined && (${(0,H.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?si.reportExtraError:si.reportError)(this,this.def.error,r)}$dataError(){(0,si.reportError)(this,this.def.$dataError||si.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,si.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=H.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=H.nil,r=H.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:s}=this;n.if((0,H.or)((0,H._)`${i} === undefined`,r)),e!==H.nil&&n.assign(e,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==H.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,H.or)(s(),a());function s(){if(n.length){if(!(r instanceof H.Name))throw new Error("ajv implementation error");let l=Array.isArray(n)?n:[n];return(0,H._)`${(0,ts.checkDataTypes)(l,r,o.opts.strictNumbers,ts.DataType.Wrong)}`}return H.nil}function a(){if(i.validateSchema){let l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,H._)`!${l}(${r})`}return H.nil}}subschema(e,r){let n=(0,tc.getSubschema)(this.it,e);(0,tc.extendSubschemaData)(n,this.it,e),(0,tc.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return gS(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Vt.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Vt.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,H.Name)),!0}};Jt.KeywordCxt=rs;function Em(t,e,r,n){let i=new rs(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,ai.funcKeywordCode)(i,r):"macro"in r?(0,ai.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,ai.funcKeywordCode)(i,r)}var RS=/^\/(?:[^~]|~0|~1)*$/,NS=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Pm(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return K.default.rootData;if(t[0]==="/"){if(!RS.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=K.default.rootData}else{let u=NS.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let p=+u[1];if(i=u[2],i==="#"){if(p>=e)throw new Error(l("property/index",p));return n[e-p]}if(p>e)throw new Error(l("data",p));if(o=r[e-p],!i)return o}let s=o,a=i.split("/");for(let u of a)u&&(o=(0,H._)`${o}${(0,H.getProperty)((0,Vt.unescapeJsonPointer)(u))}`,s=(0,H._)`${s} && ${o}`);return s;function l(u,p){return`Cannot access ${u} ${p} levels up, current level is ${e}`}}Jt.getData=Pm});var ns=$(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var ic=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};oc.default=ic});var ci=$(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});var sc=oi(),ac=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,sc.resolveUrl)(e,r,n),this.missingSchema=(0,sc.normalizeId)((0,sc.getFullPath)(e,this.missingRef))}};lc.default=ac});var ui=$(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.resolveSchema=rt.getCompilingSchema=rt.resolveRef=rt.compileSchema=rt.SchemaEnv=void 0;var ft=Y(),TS=ns(),gr=et(),pt=oi(),Cm=te(),AS=li(),nn=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,pt.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};rt.SchemaEnv=nn;function uc(t){let e=Im.call(this,t);if(e)return e;let r=(0,pt.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new ft.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:TS.default,code:(0,ft._)`require("ajv/dist/runtime/validation_error").default`}));let l=s.scopeName("validate");t.validateName=l;let u={gen:s,allErrors:this.opts.allErrors,data:gr.default.data,parentData:gr.default.parentData,parentDataProperty:gr.default.parentDataProperty,dataNames:[gr.default.data],dataPathArr:[ft.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,ft.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:ft.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,ft._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),(0,AS.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let f=s.toString();p=`${s.scopeRefs(gr.default.scope)}return ${f}`,this.opts.code.process&&(p=this.opts.code.process(p,t));let m=new Function(`${gr.default.self}`,`${gr.default.scope}`,p)(this,this.scope.get());if(this.scope.value(l,{ref:m}),m.errors=null,m.schema=t.schema,m.schemaEnv=t,t.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:l,validateCode:f,scopeValues:s._values}),this.opts.unevaluated){let{props:g,items:y}=u;m.evaluated={props:g instanceof ft.Name?void 0:g,items:y instanceof ft.Name?void 0:y,dynamicProps:g instanceof ft.Name,dynamicItems:y instanceof ft.Name},m.source&&(m.source.evaluated=(0,ft.stringify)(m.evaluated))}return t.validate=m,t}catch(f){throw delete t.validate,delete t.validateName,p&&this.logger.error("Error compiling schema, function code:",p),f}finally{this._compilations.delete(t)}}rt.compileSchema=uc;function OS(t,e,r){var n;r=(0,pt.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=jS.call(this,t,r);if(o===void 0){let s=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;s&&(o=new nn({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=MS.call(this,o)}rt.resolveRef=OS;function MS(t){return(0,pt.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:uc.call(this,t)}function Im(t){for(let e of this._compilations)if(LS(e,t))return e}rt.getCompilingSchema=Im;function LS(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function jS(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||is.call(this,t,e)}function is(t,e){let r=this.opts.uriResolver.parse(e),n=(0,pt._getFullPath)(this.opts.uriResolver,r),i=(0,pt.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return cc.call(this,r,t);let o=(0,pt.normalizeId)(n),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=is.call(this,t,s);return typeof a?.schema!="object"?void 0:cc.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||uc.call(this,s),o===(0,pt.normalizeId)(e)){let{schema:a}=s,{schemaId:l}=this.opts,u=a[l];return u&&(i=(0,pt.resolveUrl)(this.opts.uriResolver,i,u)),new nn({schema:a,schemaId:l,root:t,baseId:i})}return cc.call(this,r,s)}}rt.resolveSchema=is;var VS=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function cc(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let l=r[(0,Cm.unescapeFragment)(a)];if(l===void 0)return;r=l;let u=typeof r=="object"&&r[this.opts.schemaId];!VS.has(a)&&u&&(e=(0,pt.resolveUrl)(this.opts.uriResolver,e,u))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,Cm.schemaHasRulesButRef)(r,this.RULES)){let a=(0,pt.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=is.call(this,n,a)}let{schemaId:s}=this.opts;if(o=o||new nn({schema:r,schemaId:s,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var Rm=$((TN,DS)=>{DS.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var dc=$((AN,Lm)=>{"use strict";var qS=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Tm=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),fc=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Am=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),FS=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function pc(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var BS=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Nm(t){return t.length=0,!0}function HS(t,e,r){if(t.length){let n=pc(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function US(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,s=!1,a=HS;for(let l=0;l<t.length;l++){let u=t[l];if(!(u==="["||u==="]"))if(u===":"){if(o===!0&&(s=!0),!a(i,n,r))break;if(++e>7){r.error=!0;break}l>0&&t[l-1]===":"&&(o=!0),n.push(":");continue}else if(u==="%"){if(!a(i,n,r))break;a=Nm}else{i.push(u);continue}}return i.length&&(a===Nm?r.zone=i.join(""):s?n.push(i.join("")):n.push(pc(i))),r.address=n.join(""),r}function Om(t){if(zS(t,":")<2)return{host:t,isIPV6:!1};let e=US(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function zS(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function WS(t){let e=t,r=[],n=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(i===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}var GS={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},KS=/[@/?#:]/g,JS=/[@/?#]/g;function Mm(t,e){let r=e?JS:KS;return r.lastIndex=0,t.replace(r,n=>GS[n])}function YS(t,e=!1){if(t.indexOf("%")===-1)return t;let r="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let i=t.slice(n+1,n+3);if(fc(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&Am(s)?r+=s:r+="%"+o,n+=2;continue}}r+=t[n]}return r}function XS(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(fc(n)){let i=n.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&Am(o)?e+=o:e+="%"+i,r+=2;continue}}FS(t[r])?e+=t[r]:e+=escape(t[r])}return e}function QS(t){let e="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let n=t.slice(r+1,r+3);if(fc(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function ZS(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!Tm(r)){let n=Om(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=Mm(r,!1)}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}Lm.exports={nonSimpleDomain:BS,recomposeAuthority:ZS,reescapeHostDelimiters:Mm,normalizePercentEncoding:YS,normalizePathEncoding:XS,escapePreservingEscapes:QS,removeDotSegments:WS,isIPv4:Tm,isUUID:qS,normalizeIPv6:Om,stringArrayToHexStripped:pc}});var Fm=$((ON,qm)=>{"use strict";var{isUUID:e$}=dc(),t$=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r$=["http","https","ws","wss","urn","urn:uuid"];function n$(t){return r$.indexOf(t)!==-1}function hc(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function jm(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Vm(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function i$(t){return t.secure=hc(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function o$(t){if((t.port===(hc(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function s$(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(t$);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let i=`${n}:${e.nid||t.nid}`,o=mc(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function a$(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),i=`${r}:${e.nid||n}`,o=mc(i);o&&(t=o.serialize(t,e));let s=t,a=t.nss;return s.path=`${n||e.nid}:${a}`,e.skipEscape=!0,s}function l$(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!e$(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function c$(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Dm={scheme:"http",domainHost:!0,parse:jm,serialize:Vm},u$={scheme:"https",domainHost:Dm.domainHost,parse:jm,serialize:Vm},os={scheme:"ws",domainHost:!0,parse:i$,serialize:o$},f$={scheme:"wss",domainHost:os.domainHost,parse:os.parse,serialize:os.serialize},p$={scheme:"urn",parse:s$,serialize:a$,skipNormalize:!0},d$={scheme:"urn:uuid",parse:l$,serialize:c$,skipNormalize:!0},ss={http:Dm,https:u$,ws:os,wss:f$,urn:p$,"urn:uuid":d$};Object.setPrototypeOf(ss,null);function mc(t){return t&&(ss[t]||ss[t.toLowerCase()])||void 0}qm.exports={wsIsSecure:hc,SCHEMES:ss,isValidSchemeName:n$,getSchemeHandler:mc}});var Gm=$((MN,as)=>{"use strict";var{normalizeIPv6:h$,removeDotSegments:fi,recomposeAuthority:m$,normalizePercentEncoding:g$,normalizePathEncoding:y$,escapePreservingEscapes:v$,reescapeHostDelimiters:w$,isIPv4:_$,nonSimpleDomain:b$}=dc(),{SCHEMES:S$,getSchemeHandler:Hm}=Fm();function $$(t,e){return typeof t=="string"?t=C$(t,e):typeof t=="object"&&(t=on(yr(t,e),e)),t}function x$(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=Um(on(t,n),on(e,n),n,!0);return n.skipEscape=!0,yr(i,n)}function Um(t,e,r,n){let i={};return n||(t=on(yr(t,r),r),e=on(yr(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=fi(e.path||""),i.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=fi(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=fi(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?i.path="/"+e.path:t.path?i.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:i.path=e.path,i.path=fi(i.path)),i.query=e.query):(i.path=t.path,e.query!==void 0?i.query=e.query:i.query=t.query),i.userinfo=t.userinfo,i.host=t.host,i.port=t.port),i.scheme=t.scheme),i.fragment=e.fragment,i}function k$(t,e,r){let n=Bm(t,r),i=Bm(e,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function yr(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),i=[],o=Hm(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=g$(r.path):(r.path=v$(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let s=m$(r);if(s!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(s),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!o||!o.absolutePath)&&(a=fi(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),i.push(a)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var E$=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function P$(t,e){if(e[2]!==void 0&&t.path&&t.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof t.port=="number"&&(t.port<0||t.port>65535))return"URI port is malformed."}function zm(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,o=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let s=t.match(E$);if(s){n.scheme=s[1],n.userinfo=s[3],n.host=s[4],n.port=parseInt(s[5],10),n.path=s[6]||"",n.query=s[7],n.fragment=s[8],isNaN(n.port)&&(n.port=s[5]);let a=P$(n,s);if(a!==void 0&&(n.error=n.error||a,i=!0),n.host)if(_$(n.host)===!1){let p=h$(n.host);n.host=p.host.toLowerCase(),o=p.isIPV6}else o=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let l=Hm(r.scheme||n.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&o===!1&&b$(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}if((!l||l&&!l.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=w$(unescape(n.host),o))),n.path&&(n.path=y$(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch{n.error=n.error||"URI malformed"}l&&l.parse&&l.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}}function on(t,e){return zm(t,e).parsed}function C$(t,e){return Wm(t,e).normalized}function Wm(t,e){let{parsed:r,malformedAuthorityOrPort:n}=zm(t,e);return{normalized:n?t:yr(r,e),malformedAuthorityOrPort:n}}function Bm(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=Wm(t,e);return n?void 0:r}if(typeof t=="object")return yr(t,e)}var gc={SCHEMES:S$,normalize:$$,resolve:x$,resolveComponent:Um,equal:k$,serialize:yr,parse:on};as.exports=gc;as.exports.default=gc;as.exports.fastUri=gc});var Jm=$(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var Km=Gm();Km.code='require("ajv/dist/runtime/uri").default';yc.default=Km});var ng=$(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.CodeGen=Pe.Name=Pe.nil=Pe.stringify=Pe.str=Pe._=Pe.KeywordCxt=void 0;var I$=li();Object.defineProperty(Pe,"KeywordCxt",{enumerable:!0,get:function(){return I$.KeywordCxt}});var sn=Y();Object.defineProperty(Pe,"_",{enumerable:!0,get:function(){return sn._}});Object.defineProperty(Pe,"str",{enumerable:!0,get:function(){return sn.str}});Object.defineProperty(Pe,"stringify",{enumerable:!0,get:function(){return sn.stringify}});Object.defineProperty(Pe,"nil",{enumerable:!0,get:function(){return sn.nil}});Object.defineProperty(Pe,"Name",{enumerable:!0,get:function(){return sn.Name}});Object.defineProperty(Pe,"CodeGen",{enumerable:!0,get:function(){return sn.CodeGen}});var R$=ns(),eg=ci(),N$=zl(),pi=ui(),T$=Y(),di=oi(),ls=ii(),wc=te(),Ym=Rm(),A$=Jm(),tg=(t,e)=>new RegExp(t,e);tg.code="new RegExp";var O$=["removeAdditional","useDefaults","coerceTypes"],M$=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),L$={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},j$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Xm=200;function V$(t){var e,r,n,i,o,s,a,l,u,p,f,d,m,g,y,_,b,L,q,A,T,M,X,fe,Ie;let $e=t.strict,qe=(e=t.code)===null||e===void 0?void 0:e.optimize,Re=qe===!0||qe===void 0?1:qe||0,it=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:tg,ot=(i=t.uriResolver)!==null&&i!==void 0?i:A$.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:$e)!==null&&s!==void 0?s:!0,strictNumbers:(l=(a=t.strictNumbers)!==null&&a!==void 0?a:$e)!==null&&l!==void 0?l:!0,strictTypes:(p=(u=t.strictTypes)!==null&&u!==void 0?u:$e)!==null&&p!==void 0?p:"log",strictTuples:(d=(f=t.strictTuples)!==null&&f!==void 0?f:$e)!==null&&d!==void 0?d:"log",strictRequired:(g=(m=t.strictRequired)!==null&&m!==void 0?m:$e)!==null&&g!==void 0?g:!1,code:t.code?{...t.code,optimize:Re,regExp:it}:{optimize:Re,regExp:it},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:Xm,loopEnum:(_=t.loopEnum)!==null&&_!==void 0?_:Xm,meta:(b=t.meta)!==null&&b!==void 0?b:!0,messages:(L=t.messages)!==null&&L!==void 0?L:!0,inlineRefs:(q=t.inlineRefs)!==null&&q!==void 0?q:!0,schemaId:(A=t.schemaId)!==null&&A!==void 0?A:"$id",addUsedSchema:(T=t.addUsedSchema)!==null&&T!==void 0?T:!0,validateSchema:(M=t.validateSchema)!==null&&M!==void 0?M:!0,validateFormats:(X=t.validateFormats)!==null&&X!==void 0?X:!0,unicodeRegExp:(fe=t.unicodeRegExp)!==null&&fe!==void 0?fe:!0,int32range:(Ie=t.int32range)!==null&&Ie!==void 0?Ie:!0,uriResolver:ot}}var hi=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...V$(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new T$.ValueScope({scope:{},prefixes:M$,es5:r,lines:n}),this.logger=U$(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,N$.getRules)(),Qm.call(this,L$,e,"NOT SUPPORTED"),Qm.call(this,j$,e,"DEPRECATED","warn"),this._metaOpts=B$.call(this),e.formats&&q$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&F$.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),D$.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=Ym;n==="id"&&(i={...Ym},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(p,f){await o.call(this,p.$schema);let d=this._addSchema(p,f);return d.validate||s.call(this,d)}async function o(p){p&&!this.getSchema(p)&&await i.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(f){if(!(f instanceof eg.default))throw f;return a.call(this,f),await l.call(this,f.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:f}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${f} cannot be resolved`)}async function l(p){let f=await u.call(this,p);this.refs[p]||await o.call(this,f.$schema),this.refs[p]||this.addSchema(f,p,r)}async function u(p){let f=this._loading[p];if(f)return f;try{return await(this._loading[p]=n(p))}finally{delete this._loading[p]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,n,i);return this}let o;if(typeof e=="object"){let{schemaId:s}=this.opts;if(o=e[s],o!==void 0&&typeof o!="string")throw new Error(`schema ${s} must be string`)}return r=(0,di.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let r;for(;typeof(r=Zm.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new pi.SchemaEnv({schema:{},schemaId:n});if(r=pi.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Zm.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,di.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W$.call(this,n,r),!r)return(0,wc.eachItem)(n,o=>vc.call(this,o)),this;K$.call(this,r);let i={...r,type:(0,ls.getJSONTypes)(r.type),schemaType:(0,ls.getJSONTypes)(r.schemaType)};return(0,wc.eachItem)(n,i.type.length===0?o=>vc.call(this,o,i):o=>i.type.forEach(s=>vc.call(this,o,i,s))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),s=e;for(let a of o)s=s[a];for(let a in n){let l=n[a];if(typeof l!="object")continue;let{$data:u}=l.definition,p=s[a];u&&p&&(s[a]=rg(p))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let l=this._cache.get(e);if(l!==void 0)return l;n=(0,di.normalizeId)(s||n);let u=di.getSchemaRefs.call(this,e,n);return l=new pi.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:n,localRefs:u}),this._cache.set(l.schema,l),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),i&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):pi.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{pi.compileSchema.call(this,e)}finally{this.opts=r}}};hi.ValidationError=R$.default;hi.MissingRefError=eg.default;Pe.default=hi;function Qm(t,e,r,n="error"){for(let i in t){let o=i;o in e&&this.logger[n](`${r}: option ${i}. ${t[o]}`)}}function Zm(t){return t=(0,di.normalizeId)(t),this.schemas[t]||this.refs[t]}function D$(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function q$(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function F$(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function B$(){let t={...this.opts};for(let e of O$)delete t[e];return t}var H$={log(){},warn(){},error(){}};function U$(t){if(t===!1)return H$;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var z$=/^[a-z_$][a-z0-9_$:-]*$/i;function W$(t,e){let{RULES:r}=this;if((0,wc.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!z$.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function vc(t,e,r){var n;let i=e?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,s=i?o.post:o.rules.find(({type:l})=>l===r);if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,ls.getJSONTypes)(e.type),schemaType:(0,ls.getJSONTypes)(e.schemaType)}};e.before?G$.call(this,s,a,e.before):s.rules.push(a),o.all[t]=a,(n=e.implements)===null||n===void 0||n.forEach(l=>this.addKeyword(l))}function G$(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function K$(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=rg(e)),t.validateSchema=this.compile(e,!0))}var J$={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function rg(t){return{anyOf:[t,J$]}}});var ig=$(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var Y$={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};_c.default=Y$});var fs=$(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.callRef=vr.getValidate=void 0;var X$=ci(),og=tt(),Ue=Y(),an=et(),sg=ui(),cs=te(),Q$={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:l}=n,{root:u}=o;if((r==="#"||r==="#/")&&i===u.baseId)return f();let p=sg.resolveRef.call(l,u,i,r);if(p===void 0)throw new X$.default(n.opts.uriResolver,i,r);if(p instanceof sg.SchemaEnv)return d(p);return m(p);function f(){if(o===u)return us(t,s,o,o.$async);let g=e.scopeValue("root",{ref:u});return us(t,(0,Ue._)`${g}.validate`,u,u.$async)}function d(g){let y=ag(t,g);us(t,y,g,g.$async)}function m(g){let y=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,Ue.stringify)(g)}:{ref:g}),_=e.name("valid"),b=t.subschema({schema:g,dataTypes:[],schemaPath:Ue.nil,topSchemaRef:y,errSchemaPath:r},_);t.mergeEvaluated(b),t.ok(_)}}};function ag(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Ue._)`${r.scopeValue("wrapper",{ref:e})}.validate`}vr.getValidate=ag;function us(t,e,r,n){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:l}=o,u=l.passContext?an.default.this:Ue.nil;n?p():f();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Ue._)`await ${(0,og.callValidateCode)(t,e,u)}`),m(e),s||i.assign(g,!0)},y=>{i.if((0,Ue._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),d(y),s||i.assign(g,!1)}),t.ok(g)}function f(){t.result((0,og.callValidateCode)(t,e,u),()=>m(e),()=>d(e))}function d(g){let y=(0,Ue._)`${g}.errors`;i.assign(an.default.vErrors,(0,Ue._)`${an.default.vErrors} === null ? ${y} : ${an.default.vErrors}.concat(${y})`),i.assign(an.default.errors,(0,Ue._)`${an.default.vErrors}.length`)}function m(g){var y;if(!o.opts.unevaluated)return;let _=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(o.props=cs.mergeEvaluated.props(i,_.props,o.props));else{let b=i.var("props",(0,Ue._)`${g}.evaluated.props`);o.props=cs.mergeEvaluated.props(i,b,o.props,Ue.Name)}if(o.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(o.items=cs.mergeEvaluated.items(i,_.items,o.items));else{let b=i.var("items",(0,Ue._)`${g}.evaluated.items`);o.items=cs.mergeEvaluated.items(i,b,o.items,Ue.Name)}}}vr.callRef=us;vr.default=Q$});var lg=$(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var Z$=ig(),ex=fs(),tx=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Z$.default,ex.default];bc.default=tx});var cg=$(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});var ps=Y(),Yt=ps.operators,ds={maximum:{okStr:"<=",ok:Yt.LTE,fail:Yt.GT},minimum:{okStr:">=",ok:Yt.GTE,fail:Yt.LT},exclusiveMaximum:{okStr:"<",ok:Yt.LT,fail:Yt.GTE},exclusiveMinimum:{okStr:">",ok:Yt.GT,fail:Yt.LTE}},rx={message:({keyword:t,schemaCode:e})=>(0,ps.str)`must be ${ds[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,ps._)`{comparison: ${ds[t].okStr}, limit: ${e}}`},nx={keyword:Object.keys(ds),type:"number",schemaType:"number",$data:!0,error:rx,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,ps._)`${r} ${ds[e].fail} ${n} || isNaN(${r})`)}};Sc.default=nx});var ug=$($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});var mi=Y(),ix={message:({schemaCode:t})=>(0,mi.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,mi._)`{multipleOf: ${t}}`},ox={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:ix,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,mi._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,mi._)`${s} !== parseInt(${s})`;t.fail$data((0,mi._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};$c.default=ox});var pg=$(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});function fg(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}xc.default=fg;fg.code='require("ajv/dist/runtime/ucs2length").default'});var dg=$(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});var wr=Y(),sx=te(),ax=pg(),lx={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,wr.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,wr._)`{limit: ${t}}`},cx={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:lx,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?wr.operators.GT:wr.operators.LT,s=i.opts.unicode===!1?(0,wr._)`${r}.length`:(0,wr._)`${(0,sx.useFunc)(t.gen,ax.default)}(${r})`;t.fail$data((0,wr._)`${s} ${o} ${n}`)}};kc.default=cx});var hg=$(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var ux=tt(),fx=te(),ln=Y(),px={message:({schemaCode:t})=>(0,ln.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,ln._)`{pattern: ${t}}`},dx={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:px,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(n){let{regExp:l}=s.opts.code,u=l.code==="new RegExp"?(0,ln._)`new RegExp`:(0,fx.useFunc)(e,l),p=e.let("valid");e.try(()=>e.assign(p,(0,ln._)`${u}(${o}, ${a}).test(${r})`),()=>e.assign(p,!1)),t.fail$data((0,ln._)`!${p}`)}else{let l=(0,ux.usePattern)(t,i);t.fail$data((0,ln._)`!${l}.test(${r})`)}}};Ec.default=dx});var mg=$(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var gi=Y(),hx={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,gi.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,gi._)`{limit: ${t}}`},mx={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:hx,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?gi.operators.GT:gi.operators.LT;t.fail$data((0,gi._)`Object.keys(${r}).length ${i} ${n}`)}};Pc.default=mx});var gg=$(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});var yi=tt(),vi=Y(),gx=te(),yx={message:({params:{missingProperty:t}})=>(0,vi.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,vi._)`{missingProperty: ${t}}`},vx={keyword:"required",type:"object",schemaType:"array",$data:!0,error:yx,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:s}=t,{opts:a}=s;if(!o&&r.length===0)return;let l=r.length>=a.loopRequired;if(s.allErrors?u():p(),a.strictRequired){let m=t.parentSchema.properties,{definedProperties:g}=t.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let _=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${y}" is not defined at "${_}" (strictRequired)`;(0,gx.checkStrictMode)(s,b,s.opts.strictRequired)}}function u(){if(l||o)t.block$data(vi.nil,f);else for(let m of r)(0,yi.checkReportMissingProp)(t,m)}function p(){let m=e.let("missing");if(l||o){let g=e.let("valid",!0);t.block$data(g,()=>d(m,g)),t.ok(g)}else e.if((0,yi.checkMissingProp)(t,r,m)),(0,yi.reportMissingProp)(t,m),e.else()}function f(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,yi.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function d(m,g){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(g,(0,yi.propertyInData)(e,i,m,a.ownProperties)),e.if((0,vi.not)(g),()=>{t.error(),e.break()})},vi.nil)}}};Cc.default=vx});var yg=$(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var wi=Y(),wx={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,wi.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,wi._)`{limit: ${t}}`},_x={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:wx,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?wi.operators.GT:wi.operators.LT;t.fail$data((0,wi._)`${r}.length ${i} ${n}`)}};Ic.default=_x});var hs=$(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var vg=Zl();vg.code='require("ajv/dist/runtime/equal").default';Rc.default=vg});var wg=$(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});var Nc=ii(),Ce=Y(),bx=te(),Sx=hs(),$x={message:({params:{i:t,j:e}})=>(0,Ce.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Ce._)`{i: ${t}, j: ${e}}`},xx={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:$x,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:s,it:a}=t;if(!n&&!i)return;let l=e.let("valid"),u=o.items?(0,Nc.getSchemaTypes)(o.items):[];t.block$data(l,p,(0,Ce._)`${s} === false`),t.ok(l);function p(){let g=e.let("i",(0,Ce._)`${r}.length`),y=e.let("j");t.setParams({i:g,j:y}),e.assign(l,!0),e.if((0,Ce._)`${g} > 1`,()=>(f()?d:m)(g,y))}function f(){return u.length>0&&!u.some(g=>g==="object"||g==="array")}function d(g,y){let _=e.name("item"),b=(0,Nc.checkDataTypes)(u,_,a.opts.strictNumbers,Nc.DataType.Wrong),L=e.const("indices",(0,Ce._)`{}`);e.for((0,Ce._)`;${g}--;`,()=>{e.let(_,(0,Ce._)`${r}[${g}]`),e.if(b,(0,Ce._)`continue`),u.length>1&&e.if((0,Ce._)`typeof ${_} == "string"`,(0,Ce._)`${_} += "_"`),e.if((0,Ce._)`typeof ${L}[${_}] == "number"`,()=>{e.assign(y,(0,Ce._)`${L}[${_}]`),t.error(),e.assign(l,!1).break()}).code((0,Ce._)`${L}[${_}] = ${g}`)})}function m(g,y){let _=(0,bx.useFunc)(e,Sx.default),b=e.name("outer");e.label(b).for((0,Ce._)`;${g}--;`,()=>e.for((0,Ce._)`${y} = ${g}; ${y}--;`,()=>e.if((0,Ce._)`${_}(${r}[${g}], ${r}[${y}])`,()=>{t.error(),e.assign(l,!1).break(b)})))}}};Tc.default=xx});var _g=$(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});var Ac=Y(),kx=te(),Ex=hs(),Px={message:"must be equal to constant",params:({schemaCode:t})=>(0,Ac._)`{allowedValue: ${t}}`},Cx={keyword:"const",$data:!0,error:Px,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,Ac._)`!${(0,kx.useFunc)(e,Ex.default)}(${r}, ${i})`):t.fail((0,Ac._)`${o} !== ${r}`)}};Oc.default=Cx});var bg=$(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var _i=Y(),Ix=te(),Rx=hs(),Nx={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,_i._)`{allowedValues: ${t}}`},Tx={keyword:"enum",schemaType:"array",$data:!0,error:Nx,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:s}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,l,u=()=>l??(l=(0,Ix.useFunc)(e,Rx.default)),p;if(a||n)p=e.let("valid"),t.block$data(p,f);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);p=(0,_i.or)(...i.map((g,y)=>d(m,y)))}t.pass(p);function f(){e.assign(p,!1),e.forOf("v",o,m=>e.if((0,_i._)`${u()}(${r}, ${m})`,()=>e.assign(p,!0).break()))}function d(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,_i._)`${u()}(${r}, ${m}[${g}])`:(0,_i._)`${r} === ${y}`}}};Mc.default=Tx});var Sg=$(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});var Ax=cg(),Ox=ug(),Mx=dg(),Lx=hg(),jx=mg(),Vx=gg(),Dx=yg(),qx=wg(),Fx=_g(),Bx=bg(),Hx=[Ax.default,Ox.default,Mx.default,Lx.default,jx.default,Vx.default,Dx.default,qx.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Fx.default,Bx.default];Lc.default=Hx});var Vc=$(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.validateAdditionalItems=void 0;var _r=Y(),jc=te(),Ux={message:({params:{len:t}})=>(0,_r.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,_r._)`{limit: ${t}}`},zx={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Ux,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,jc.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}$g(t,n)}};function $g(t,e){let{gen:r,schema:n,data:i,keyword:o,it:s}=t;s.items=!0;let a=r.const("len",(0,_r._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,_r._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,jc.alwaysValidSchema)(s,n)){let u=r.var("valid",(0,_r._)`${a} <= ${e.length}`);r.if((0,_r.not)(u),()=>l(u)),t.ok(u)}function l(u){r.forRange("i",e.length,a,p=>{t.subschema({keyword:o,dataProp:p,dataPropType:jc.Type.Num},u),s.allErrors||r.if((0,_r.not)(u),()=>r.break())})}}bi.validateAdditionalItems=$g;bi.default=zx});var Dc=$(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.validateTuple=void 0;var xg=Y(),ms=te(),Wx=tt(),Gx={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return kg(t,"additionalItems",e);r.items=!0,!(0,ms.alwaysValidSchema)(r,e)&&t.ok((0,Wx.validateArray)(t))}};function kg(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:s,it:a}=t;p(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=ms.mergeEvaluated.items(n,r.length,a.items));let l=n.name("valid"),u=n.const("len",(0,xg._)`${o}.length`);r.forEach((f,d)=>{(0,ms.alwaysValidSchema)(a,f)||(n.if((0,xg._)`${u} > ${d}`,()=>t.subschema({keyword:s,schemaProp:d,dataProp:d},l)),t.ok(l))});function p(f){let{opts:d,errSchemaPath:m}=a,g=r.length,y=g===f.minItems&&(g===f.maxItems||f[e]===!1);if(d.strictTuples&&!y){let _=`"${s}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,ms.checkStrictMode)(a,_,d.strictTuples)}}}Si.validateTuple=kg;Si.default=Gx});var Eg=$(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var Kx=Dc(),Jx={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Kx.validateTuple)(t,"items")};qc.default=Jx});var Cg=$(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var Pg=Y(),Yx=te(),Xx=tt(),Qx=Vc(),Zx={message:({params:{len:t}})=>(0,Pg.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Pg._)`{limit: ${t}}`},ek={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Zx,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,Yx.alwaysValidSchema)(n,e)&&(i?(0,Qx.validateAdditionalItems)(t,i):t.ok((0,Xx.validateArray)(t)))}};Fc.default=ek});var Ig=$(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var nt=Y(),gs=te(),tk={message:({params:{min:t,max:e}})=>e===void 0?(0,nt.str)`must contain at least ${t} valid item(s)`:(0,nt.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,nt._)`{minContains: ${t}}`:(0,nt._)`{minContains: ${t}, maxContains: ${e}}`},rk={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:tk,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,s,a,{minContains:l,maxContains:u}=n;o.opts.next?(s=l===void 0?1:l,a=u):s=1;let p=e.const("len",(0,nt._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,gs.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,gs.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,gs.alwaysValidSchema)(o,r)){let y=(0,nt._)`${p} >= ${s}`;a!==void 0&&(y=(0,nt._)`${y} && ${p} <= ${a}`),t.pass(y);return}o.items=!0;let f=e.name("valid");a===void 0&&s===1?m(f,()=>e.if(f,()=>e.break())):s===0?(e.let(f,!0),a!==void 0&&e.if((0,nt._)`${i}.length > 0`,d)):(e.let(f,!1),d()),t.result(f,()=>t.reset());function d(){let y=e.name("_valid"),_=e.let("count",0);m(y,()=>e.if(y,()=>g(_)))}function m(y,_){e.forRange("i",0,p,b=>{t.subschema({keyword:"contains",dataProp:b,dataPropType:gs.Type.Num,compositeRule:!0},y),_()})}function g(y){e.code((0,nt._)`${y}++`),a===void 0?e.if((0,nt._)`${y} >= ${s}`,()=>e.assign(f,!0).break()):(e.if((0,nt._)`${y} > ${a}`,()=>e.assign(f,!1).break()),s===1?e.assign(f,!0):e.if((0,nt._)`${y} >= ${s}`,()=>e.assign(f,!0)))}}};Bc.default=rk});var ys=$(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.validateSchemaDeps=bt.validatePropertyDeps=bt.error=void 0;var Hc=Y(),nk=te(),$i=tt();bt.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Hc.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Hc._)`{property: ${t},
|
|
279
|
+
missingProperty: ${n},
|
|
280
|
+
depsCount: ${e},
|
|
281
|
+
deps: ${r}}`};var ik={keyword:"dependencies",type:"object",schemaType:"object",error:bt.error,code(t){let[e,r]=ok(t);Rg(t,e),Ng(t,r)}};function ok({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function Rg(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let l=(0,$i.propertyInData)(r,n,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(l,()=>{for(let u of a)(0,$i.checkReportMissingProp)(t,u)}):(r.if((0,Hc._)`${l} && (${(0,$i.checkMissingProp)(t,a,o)})`),(0,$i.reportMissingProp)(t,o),r.else())}}bt.validatePropertyDeps=Rg;function Ng(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,s=r.name("valid");for(let a in e)(0,nk.alwaysValidSchema)(o,e[a])||(r.if((0,$i.propertyInData)(r,n,a,o.opts.ownProperties),()=>{let l=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(l,s)},()=>r.var(s,!0)),t.ok(s))}bt.validateSchemaDeps=Ng;bt.default=ik});var Ag=$(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var Tg=Y(),sk=te(),ak={message:"property name must be valid",params:({params:t})=>(0,Tg._)`{propertyName: ${t.propertyName}}`},lk={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:ak,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,sk.alwaysValidSchema)(i,r))return;let o=e.name("valid");e.forIn("key",n,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),e.if((0,Tg.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};Uc.default=lk});var Wc=$(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var vs=tt(),dt=Y(),ck=et(),ws=te(),uk={message:"must NOT have additional properties",params:({params:t})=>(0,dt._)`{additionalProperty: ${t.additionalProperty}}`},fk={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:uk,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:o,it:s}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,ws.alwaysValidSchema)(s,r))return;let u=(0,vs.allSchemaProperties)(n.properties),p=(0,vs.allSchemaProperties)(n.patternProperties);f(),t.ok((0,dt._)`${o} === ${ck.default.errors}`);function f(){e.forIn("key",i,_=>{!u.length&&!p.length?g(_):e.if(d(_),()=>g(_))})}function d(_){let b;if(u.length>8){let L=(0,ws.schemaRefOrVal)(s,n.properties,"properties");b=(0,vs.isOwnProperty)(e,L,_)}else u.length?b=(0,dt.or)(...u.map(L=>(0,dt._)`${_} === ${L}`)):b=dt.nil;return p.length&&(b=(0,dt.or)(b,...p.map(L=>(0,dt._)`${(0,vs.usePattern)(t,L)}.test(${_})`))),(0,dt.not)(b)}function m(_){e.code((0,dt._)`delete ${i}[${_}]`)}function g(_){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){m(_);return}if(r===!1){t.setParams({additionalProperty:_}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,ws.alwaysValidSchema)(s,r)){let b=e.name("valid");l.removeAdditional==="failing"?(y(_,b,!1),e.if((0,dt.not)(b),()=>{t.reset(),m(_)})):(y(_,b),a||e.if((0,dt.not)(b),()=>e.break()))}}function y(_,b,L){let q={keyword:"additionalProperties",dataProp:_,dataPropType:ws.Type.Str};L===!1&&Object.assign(q,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(q,b)}}};zc.default=fk});var Lg=$(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var pk=li(),Og=tt(),Gc=te(),Mg=Wc(),dk={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Mg.default.code(new pk.KeywordCxt(o,Mg.default,"additionalProperties"));let s=(0,Og.allSchemaProperties)(r);for(let f of s)o.definedProperties.add(f);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=Gc.mergeEvaluated.props(e,(0,Gc.toHash)(s),o.props));let a=s.filter(f=>!(0,Gc.alwaysValidSchema)(o,r[f]));if(a.length===0)return;let l=e.name("valid");for(let f of a)u(f)?p(f):(e.if((0,Og.propertyInData)(e,i,f,o.opts.ownProperties)),p(f),o.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(l);function u(f){return o.opts.useDefaults&&!o.compositeRule&&r[f].default!==void 0}function p(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},l)}}};Kc.default=dk});var qg=$(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var jg=tt(),_s=Y(),Vg=te(),Dg=te(),hk={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:o}=t,{opts:s}=o,a=(0,jg.allSchemaProperties)(r),l=a.filter(y=>(0,Vg.alwaysValidSchema)(o,r[y]));if(a.length===0||l.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&i.properties,p=e.name("valid");o.props!==!0&&!(o.props instanceof _s.Name)&&(o.props=(0,Dg.evaluatedPropsToName)(e,o.props));let{props:f}=o;d();function d(){for(let y of a)u&&m(y),o.allErrors?g(y):(e.var(p,!0),g(y),e.if(p))}function m(y){for(let _ in u)new RegExp(y).test(_)&&(0,Vg.checkStrictMode)(o,`property ${_} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){e.forIn("key",n,_=>{e.if((0,_s._)`${(0,jg.usePattern)(t,y)}.test(${_})`,()=>{let b=l.includes(y);b||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:_,dataPropType:Dg.Type.Str},p),o.opts.unevaluated&&f!==!0?e.assign((0,_s._)`${f}[${_}]`,!0):!b&&!o.allErrors&&e.if((0,_s.not)(p),()=>e.break())})})}}};Jc.default=hk});var Fg=$(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var mk=te(),gk={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,mk.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Yc.default=gk});var Bg=$(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var yk=tt(),vk={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:yk.validateUnion,error:{message:"must match a schema in anyOf"}};Xc.default=vk});var Hg=$(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});var bs=Y(),wk=te(),_k={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,bs._)`{passingSchemas: ${t.passing}}`},bk={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:_k,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,s=e.let("valid",!1),a=e.let("passing",null),l=e.name("_valid");t.setParams({passing:a}),e.block(u),t.result(s,()=>t.reset(),()=>t.error(!0));function u(){o.forEach((p,f)=>{let d;(0,wk.alwaysValidSchema)(i,p)?e.var(l,!0):d=t.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},l),f>0&&e.if((0,bs._)`${l} && ${s}`).assign(s,!1).assign(a,(0,bs._)`[${a}, ${f}]`).else(),e.if(l,()=>{e.assign(s,!0),e.assign(a,f),d&&t.mergeEvaluated(d,bs.Name)})})}}};Qc.default=bk});var Ug=$(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});var Sk=te(),$k={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((o,s)=>{if((0,Sk.alwaysValidSchema)(n,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};Zc.default=$k});var Gg=$(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});var Ss=Y(),Wg=te(),xk={message:({params:t})=>(0,Ss.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Ss._)`{failingKeyword: ${t.ifClause}}`},kk={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:xk,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Wg.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=zg(n,"then"),o=zg(n,"else");if(!i&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(l(),t.reset(),i&&o){let p=e.let("ifClause");t.setParams({ifClause:p}),e.if(a,u("then",p),u("else",p))}else i?e.if(a,u("then")):e.if((0,Ss.not)(a),u("else"));t.pass(s,()=>t.error(!0));function l(){let p=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(p)}function u(p,f){return()=>{let d=t.subschema({keyword:p},a);e.assign(s,a),t.mergeValidEvaluated(d,s),f?e.assign(f,(0,Ss._)`${p}`):t.setParams({ifClause:p})}}}};function zg(t,e){let r=t.schema[e];return r!==void 0&&!(0,Wg.alwaysValidSchema)(t,r)}eu.default=kk});var Kg=$(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});var Ek=te(),Pk={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,Ek.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};tu.default=Pk});var Jg=$(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});var Ck=Vc(),Ik=Eg(),Rk=Dc(),Nk=Cg(),Tk=Ig(),Ak=ys(),Ok=Ag(),Mk=Wc(),Lk=Lg(),jk=qg(),Vk=Fg(),Dk=Bg(),qk=Hg(),Fk=Ug(),Bk=Gg(),Hk=Kg();function Uk(t=!1){let e=[Vk.default,Dk.default,qk.default,Fk.default,Bk.default,Hk.default,Ok.default,Mk.default,Ak.default,Lk.default,jk.default];return t?e.push(Ik.default,Nk.default):e.push(Ck.default,Rk.default),e.push(Tk.default),e}ru.default=Uk});var iu=$(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.dynamicAnchor=void 0;var nu=Y(),zk=et(),Yg=ui(),Wk=fs(),Gk={keyword:"$dynamicAnchor",schemaType:"string",code:t=>Xg(t,t.schema)};function Xg(t,e){let{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,nu._)`${zk.default.dynamicAnchors}${(0,nu.getProperty)(e)}`,o=n.errSchemaPath==="#"?n.validateName:Kk(t);r.if((0,nu._)`!${i}`,()=>r.assign(i,o))}xi.dynamicAnchor=Xg;function Kk(t){let{schemaEnv:e,schema:r,self:n}=t.it,{root:i,baseId:o,localRefs:s,meta:a}=e.root,{schemaId:l}=n.opts,u=new Yg.SchemaEnv({schema:r,schemaId:l,root:i,baseId:o,localRefs:s,meta:a});return Yg.compileSchema.call(n,u),(0,Wk.getValidate)(t,u)}xi.default=Gk});var ou=$(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.dynamicRef=void 0;var Qg=Y(),Jk=et(),Zg=fs(),Yk={keyword:"$dynamicRef",schemaType:"string",code:t=>ey(t,t.schema)};function ey(t,e){let{gen:r,keyword:n,it:i}=t;if(e[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=e.slice(1);if(i.allErrors)s();else{let l=r.let("valid",!1);s(l),t.ok(l)}function s(l){if(i.schemaEnv.root.dynamicAnchors[o]){let u=r.let("_v",(0,Qg._)`${Jk.default.dynamicAnchors}${(0,Qg.getProperty)(o)}`);r.if(u,a(u,l),a(i.validateName,l))}else a(i.validateName,l)()}function a(l,u){return u?()=>r.block(()=>{(0,Zg.callRef)(t,l),r.let(u,!0)}):()=>(0,Zg.callRef)(t,l)}}ki.dynamicRef=ey;ki.default=Yk});var ty=$(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});var Xk=iu(),Qk=te(),Zk={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,Xk.dynamicAnchor)(t,""):(0,Qk.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};su.default=Zk});var ry=$(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});var eE=ou(),tE={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,eE.dynamicRef)(t,t.schema)};au.default=tE});var ny=$(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});var rE=iu(),nE=ou(),iE=ty(),oE=ry(),sE=[rE.default,nE.default,iE.default,oE.default];lu.default=sE});var oy=$(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});var iy=ys(),aE={keyword:"dependentRequired",type:"object",schemaType:"object",error:iy.error,code:t=>(0,iy.validatePropertyDeps)(t)};cu.default=aE});var sy=$(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});var lE=ys(),cE={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,lE.validateSchemaDeps)(t)};uu.default=cE});var ay=$(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});var uE=te(),fE={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,uE.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};fu.default=fE});var ly=$(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});var pE=oy(),dE=sy(),hE=ay(),mE=[pE.default,dE.default,hE.default];pu.default=mE});var uy=$(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});var Xt=Y(),cy=te(),gE=et(),yE={message:"must NOT have unevaluated properties",params:({params:t})=>(0,Xt._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},vE={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:yE,code(t){let{gen:e,schema:r,data:n,errsCount:i,it:o}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof Xt.Name?e.if((0,Xt._)`${a} !== true`,()=>e.forIn("key",n,f=>e.if(u(a,f),()=>l(f)))):a!==!0&&e.forIn("key",n,f=>a===void 0?l(f):e.if(p(a,f),()=>l(f))),o.props=!0,t.ok((0,Xt._)`${i} === ${gE.default.errors}`);function l(f){if(r===!1){t.setParams({unevaluatedProperty:f}),t.error(),s||e.break();return}if(!(0,cy.alwaysValidSchema)(o,r)){let d=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:f,dataPropType:cy.Type.Str},d),s||e.if((0,Xt.not)(d),()=>e.break())}}function u(f,d){return(0,Xt._)`!${f} || !${f}[${d}]`}function p(f,d){let m=[];for(let g in f)f[g]===!0&&m.push((0,Xt._)`${d} !== ${g}`);return(0,Xt.and)(...m)}}};du.default=vE});var py=$(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});var br=Y(),fy=te(),wE={message:({params:{len:t}})=>(0,br.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,br._)`{limit: ${t}}`},_E={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:wE,code(t){let{gen:e,schema:r,data:n,it:i}=t,o=i.items||0;if(o===!0)return;let s=e.const("len",(0,br._)`${n}.length`);if(r===!1)t.setParams({len:o}),t.fail((0,br._)`${s} > ${o}`);else if(typeof r=="object"&&!(0,fy.alwaysValidSchema)(i,r)){let l=e.var("valid",(0,br._)`${s} <= ${o}`);e.if((0,br.not)(l),()=>a(l,o)),t.ok(l)}i.items=!0;function a(l,u){e.forRange("i",u,s,p=>{t.subschema({keyword:"unevaluatedItems",dataProp:p,dataPropType:fy.Type.Num},l),i.allErrors||e.if((0,br.not)(l),()=>e.break())})}}};hu.default=_E});var dy=$(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});var bE=uy(),SE=py(),$E=[bE.default,SE.default];mu.default=$E});var hy=$(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});var we=Y(),xE={message:({schemaCode:t})=>(0,we.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,we._)`{format: ${t}}`},kE={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:xE,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:l,errSchemaPath:u,schemaEnv:p,self:f}=a;if(!l.validateFormats)return;i?d():m();function d(){let g=r.scopeValue("formats",{ref:f.formats,code:l.code.formats}),y=r.const("fDef",(0,we._)`${g}[${s}]`),_=r.let("fType"),b=r.let("format");r.if((0,we._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(_,(0,we._)`${y}.type || "string"`).assign(b,(0,we._)`${y}.validate`),()=>r.assign(_,(0,we._)`"string"`).assign(b,y)),t.fail$data((0,we.or)(L(),q()));function L(){return l.strictSchema===!1?we.nil:(0,we._)`${s} && !${b}`}function q(){let A=p.$async?(0,we._)`(${y}.async ? await ${b}(${n}) : ${b}(${n}))`:(0,we._)`${b}(${n})`,T=(0,we._)`(typeof ${b} == "function" ? ${A} : ${b}.test(${n}))`;return(0,we._)`${b} && ${b} !== true && ${_} === ${e} && !${T}`}}function m(){let g=f.formats[o];if(!g){L();return}if(g===!0)return;let[y,_,b]=q(g);y===e&&t.pass(A());function L(){if(l.strictSchema===!1){f.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function q(T){let M=T instanceof RegExp?(0,we.regexpCode)(T):l.code.formats?(0,we._)`${l.code.formats}${(0,we.getProperty)(o)}`:void 0,X=r.scopeValue("formats",{key:o,ref:T,code:M});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,we._)`${X}.validate`]:["string",T,X]}function A(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!p.$async)throw new Error("async format in sync schema");return(0,we._)`await ${b}(${n})`}return typeof _=="function"?(0,we._)`${b}(${n})`:(0,we._)`${b}.test(${n})`}}}};gu.default=kE});var my=$(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});var EE=hy(),PE=[EE.default];yu.default=PE});var gy=$(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.contentVocabulary=cn.metadataVocabulary=void 0;cn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];cn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var vy=$(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});var CE=lg(),IE=Sg(),RE=Jg(),NE=ny(),TE=ly(),AE=dy(),OE=my(),yy=gy(),ME=[NE.default,CE.default,IE.default,(0,RE.default)(!0),OE.default,yy.metadataVocabulary,yy.contentVocabulary,TE.default,AE.default];vu.default=ME});var _y=$($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});$s.DiscrError=void 0;var wy;(function(t){t.Tag="tag",t.Mapping="mapping"})(wy||($s.DiscrError=wy={}))});var Sy=$(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});var un=Y(),wu=_y(),by=ui(),LE=ci(),jE=te(),VE={message:({params:{discrError:t,tagName:e}})=>t===wu.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,un._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},DE={keyword:"discriminator",type:"object",schemaType:"object",error:VE,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:s}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let l=e.let("valid",!1),u=e.const("tag",(0,un._)`${r}${(0,un.getProperty)(a)}`);e.if((0,un._)`typeof ${u} == "string"`,()=>p(),()=>t.error(!1,{discrError:wu.DiscrError.Tag,tag:u,tagName:a})),t.ok(l);function p(){let m=d();e.if(!1);for(let g in m)e.elseIf((0,un._)`${u} === ${g}`),e.assign(l,f(m[g]));e.else(),t.error(!1,{discrError:wu.DiscrError.Mapping,tag:u,tagName:a}),e.endIf()}function f(m){let g=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:m},g);return t.mergeEvaluated(y,un.Name),g}function d(){var m;let g={},y=b(i),_=!0;for(let A=0;A<s.length;A++){let T=s[A];if(T?.$ref&&!(0,jE.schemaHasRulesButRef)(T,o.self.RULES)){let X=T.$ref;if(T=by.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,X),T instanceof by.SchemaEnv&&(T=T.schema),T===void 0)throw new LE.default(o.opts.uriResolver,o.baseId,X)}let M=(m=T?.properties)===null||m===void 0?void 0:m[a];if(typeof M!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);_=_&&(y||b(T)),L(M,A)}if(!_)throw new Error(`discriminator: "${a}" must be required`);return g;function b({required:A}){return Array.isArray(A)&&A.includes(a)}function L(A,T){if(A.const)q(A.const,T);else if(A.enum)for(let M of A.enum)q(M,T);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function q(A,T){if(typeof A!="string"||A in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[A]=T}}}};_u.default=DE});var $y=$((MT,qE)=>{qE.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var xy=$((LT,FE)=>{FE.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var ky=$((jT,BE)=>{BE.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var Ey=$((VT,HE)=>{HE.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var Py=$((DT,UE)=>{UE.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var Cy=$((qT,zE)=>{zE.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var Iy=$((FT,WE)=>{WE.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var Ry=$((BT,GE)=>{GE.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var Ny=$(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});var KE=$y(),JE=xy(),YE=ky(),XE=Ey(),QE=Py(),ZE=Cy(),eP=Iy(),tP=Ry(),rP=["/properties"];function nP(t){return[KE,JE,YE,XE,QE,e(this,ZE),eP,e(this,tP)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,rP):n}}bu.default=nP});var Ty=$((me,$u)=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.MissingRefError=me.ValidationError=me.CodeGen=me.Name=me.nil=me.stringify=me.str=me._=me.KeywordCxt=me.Ajv2020=void 0;var iP=ng(),oP=vy(),sP=Sy(),aP=Ny(),Su="https://json-schema.org/draft/2020-12/schema",fn=class extends iP.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),oP.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(sP.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(aP.default.call(this,e),this.refs["http://json-schema.org/schema"]=Su)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Su)?Su:void 0)}};me.Ajv2020=fn;$u.exports=me=fn;$u.exports.Ajv2020=fn;Object.defineProperty(me,"__esModule",{value:!0});me.default=fn;var lP=li();Object.defineProperty(me,"KeywordCxt",{enumerable:!0,get:function(){return lP.KeywordCxt}});var pn=Y();Object.defineProperty(me,"_",{enumerable:!0,get:function(){return pn._}});Object.defineProperty(me,"str",{enumerable:!0,get:function(){return pn.str}});Object.defineProperty(me,"stringify",{enumerable:!0,get:function(){return pn.stringify}});Object.defineProperty(me,"nil",{enumerable:!0,get:function(){return pn.nil}});Object.defineProperty(me,"Name",{enumerable:!0,get:function(){return pn.Name}});Object.defineProperty(me,"CodeGen",{enumerable:!0,get:function(){return pn.CodeGen}});var cP=ns();Object.defineProperty(me,"ValidationError",{enumerable:!0,get:function(){return cP.default}});var uP=ci();Object.defineProperty(me,"MissingRefError",{enumerable:!0,get:function(){return uP.default}})});Ct();Co();Ft();qn();import{transform as gP}from"esbuild";import{resolve as Sr}from"node:path";import{resolve as hP}from"node:path";import{readFile as Ph}from"node:fs/promises";import{basename as x2,relative as Ch,resolve as Ih}from"node:path";It();import{dirname as vh,resolve as wh}from"node:path";import O from"typescript";import{readFileSync as c2}from"node:fs";import{resolve as u2}from"node:path";import se from"typescript";function gl(t,e){let r=new Map;for(let n of t.statements){if(!se.isImportDeclaration(n)||!n.importClause?.namedBindings||!se.isStringLiteral(n.moduleSpecifier)||!se.isNamedImports(n.importClause.namedBindings))continue;let i=n.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=u2(e,i);for(let s of n.importClause.namedBindings.elements)r.set(s.name.text,o)}return r}function f2(t){if(se.isObjectBindingPattern(t.name)){let e=[];for(let r of t.name.elements)se.isBindingElement(r)&&se.isIdentifier(r.name)&&e.push(r.name.text);return e}return se.isIdentifier(t.name)?[t.name.text]:[]}function p2(t){if(!se.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!se.isBindingElement(e)||!se.isIdentifier(e.name)?null:e.name.text}function d2(t){if(se.isParenthesizedExpression(t))return t.expression;if(se.isJsxElement(t)||se.isJsxSelfClosingElement(t)||se.isJsxFragment(t))return t;if(se.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let r=t.statements[e];if(se.isReturnStatement(r)&&r.expression)return se.isParenthesizedExpression(r.expression)?r.expression.expression:r.expression}return null}function gh(t){if(!se.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!se.isArrowFunction(e)&&!se.isFunctionExpression(e))return null;let r="__noop",n=[];if(e.parameters.length===1){let s=p2(e.parameters[0]);if(n=f2(e.parameters[0]),s)r=s;else if(se.isIdentifier(e.parameters[0].name))r=e.parameters[0].name.text,n=[r];else return null}else if(e.parameters.length>1)return null;let i=d2(e.body);if(!i)return null;let o;return t.typeArguments&&t.typeArguments.length===1&&(o=t.typeArguments[0].getText()),{paramName:r,jsxRoot:i,propNames:n,propsType:o}}function yl(t,e){let r=null;function n(i){if(se.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!se.isIdentifier(o.name)||o.name.text!==e||!o.initializer||!se.isCallExpression(o.initializer))continue;let s=gh(o.initializer);s&&(r=s)}if(se.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&se.isCallExpression(i.expression)){let o=gh(i.expression);o&&e==="default"&&(r=o)}se.forEachChild(i,n)}return n(t),r}function yh(t,e){let r=c2(t,"utf-8"),n=se.createSourceFile(t,r,se.ScriptTarget.Latest,!0,se.ScriptKind.TSX);return yl(n,e)}function h2(t,e,r){if("tone"in e){let n=e.tone;delete e.tone,"variant"in e||(e.variant=n),r.warnings.push(`"tone" on <${t}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in e){let n=e.textStyle;delete e.textStyle,"variant"in e||(e.variant=n),r.warnings.push(`"textStyle" on <${t}> is deprecated; use variant instead (mapped automatically)`)}}function vl(t){return t.join(".")}function Jr(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function _l(t){if(O.isIdentifier(t))return[t.text];if(O.isPropertyAccessExpression(t)){let e=_l(t.expression);return e?[...e,t.name.text]:null}return null}function _h(t,e){if(e.length===0)return t;let r=e.join(".");return{kind:"binding",path:t.path?`${t.path}.${r}`:r,scope:t.scope}}function Wn(t,e){let r=_l(t);if(!r)return null;if(r[0]in e.propBindings)return _h(e.propBindings[r[0]],r.slice(1));if(r[0]===e.vmName)return{kind:"binding",path:vl(r.slice(1))};let n=e.scopes[e.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:vl(r.slice(1)),scope:n}:null}function m2(t,e){let r,n={};for(let i of t.properties){if(!O.isPropertyAssignment(i)||!O.isIdentifier(i.name))continue;let o=i.name.text;if(o==="name"&&O.isStringLiteral(i.initializer)){r=i.initializer.text;continue}if(o==="params"&&O.isObjectLiteralExpression(i.initializer))for(let s of i.initializer.properties){if(!O.isPropertyAssignment(s)||!O.isIdentifier(s.name))continue;let a=Ho(s.initializer,e);a!==null?n[s.name.text]=a:e.errors.push(`Unsupported action param expression for "${s.name.text}": ${Jr(s.initializer)}`)}}return r?Object.keys(n).length>0?{kind:"action",name:r,params:n}:{kind:"action",name:r}:null}function Ho(t,e){if(O.isStringLiteral(t)||O.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===O.SyntaxKind.TrueKeyword)return!0;if(t.kind===O.SyntaxKind.FalseKeyword)return!1;if(O.isNumericLiteral(t))return Number(t.text);if(t.kind===O.SyntaxKind.NullKeyword)return null;if(O.isTemplateExpression(t)){let n=[];t.head.text&&n.push(t.head.text);for(let i of t.templateSpans){let o=Wn(i.expression,e);if(!o)return null;n.push(o),i.literal.text&&n.push(i.literal.text)}return{kind:"concat",parts:n}}let r=Wn(t,e);if(r)return r;if(O.isObjectLiteralExpression(t)){let n=m2(t,e);if(n)return n;let i={};for(let o of t.properties){if(!O.isPropertyAssignment(o)||!O.isIdentifier(o.name))continue;let s=Ho(o.initializer,e);s!==null?i[o.name.text]=s:e.errors.push(`Unsupported object literal property "${o.name.text}": ${Jr(o.initializer)}`)}return{kind:"literal",value:i}}if(O.isArrayLiteralExpression(t)){let n=[];for(let i of t.elements){if(!O.isExpression(i))continue;let o=Ho(i,e);o!==null?n.push(o):e.errors.push(`Unsupported array element expression: ${Jr(i)}`)}return n}return null}function g2(t){return O.isIdentifier(t)?t.text:O.isPropertyAccessExpression(t)&&O.isIdentifier(t.name)?t.name.text:null}function bh(t){return t.getText()}function wl(t,e){let r=[];for(let n of t){if(O.isJsxText(n)){let i=n.getText().trim();i&&r.push({kind:"text",value:i});continue}if(O.isJsxExpression(n)&&n.expression){let i=Wn(n.expression,e);if(i){r.push(i);continue}let o=Sh(n.expression,e);o?Array.isArray(o)?r.push(...o):r.push(o):e.errors.push(`Unsupported JSX child expression: ${Jr(n.expression)}`);continue}if(O.isJsxElement(n)||O.isJsxSelfClosingElement(n)){let i=Gn(n,e);i&&r.push(i)}}return r}function y2(t,e){if(t.length===0)return null;let r=t[0];return r in e.propBindings?_h(e.propBindings[r],t.slice(1)):r===e.vmName?{kind:"binding",path:vl(t.slice(1))}:null}function Sh(t,e){if(O.isParenthesizedExpression(t))return Sh(t.expression,e);if(O.isCallExpression(t)&&O.isPropertyAccessExpression(t.expression)){let n=_l(t.expression.expression),i=t.expression.name.text;if(n&&i==="map"&&t.arguments.length>=1){let o=y2(n,e);if(!o)return null;let s=t.arguments[0];if(!O.isArrowFunction(s)&&!O.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!O.isIdentifier(a[0].name))return e.errors.push("map callback must have a single item parameter"),null;let l=a[0].name.text,u={...e,scopes:[...e.scopes,l]},p=null,f=O.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(O.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(O.isJsxElement(f)||O.isJsxSelfClosingElement(f)?p=Gn(f,u):O.isJsxFragment(f)&&(p=bl(f,u)),!p)return null;let d;if(O.isJsxElement(f)||O.isJsxSelfClosingElement(f)){let m=O.isJsxElement(f)?f.openingElement.attributes:f.attributes;for(let g of m.properties)if(!(!O.isJsxAttribute(g)||bh(g.name)!=="key"||!g.initializer)&&O.isJsxExpression(g.initializer)&&g.initializer.expression){let y=Wn(g.initializer.expression,u);y&&(d=y)}}return{kind:"map",source:o,item:l,key:d,body:p}}}if(O.isJsxElement(t)||O.isJsxSelfClosingElement(t))return Gn(t,e);let r=Wn(t,e);return r||null}function bl(t,e){return{kind:"fragment",children:wl(t.children,e)}}function v2(t,e,r){let n=r.viewImports.get(t);return n?yh(n,t)?{kind:"viewRef",name:t,sourcePath:n,props:e}:(r.errors.push(`View component "${t}" is imported but has no view() export`),null):null}function Gn(t,e){let r=O.isJsxElement(t)?t.openingElement:t,n=g2(r.tagName);if(!n)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let l of r.attributes.properties){if(!O.isJsxAttribute(l))continue;let u=bh(l.name);if(u!=="key"){if(!l.initializer){i[u]=!0;continue}if(O.isStringLiteral(l.initializer)){i[u]=l.initializer.text;continue}if(O.isJsxExpression(l.initializer)&&l.initializer.expression){let p=Ho(l.initializer.expression,e);p!==null?i[u]=p:e.errors.push(`Unsupported JSX prop expression for "${u}" on <${n}>: ${Jr(l.initializer.expression)}`)}}}if(!e.allowedComponents.has(n)){let l=v2(n,i,e);return l||(e.errors.push(`Component "${n}" is not in the allowed registry`),null)}h2(n,i,e);let o=e;if(n==="Table"&&i.source){let l=typeof i.source=="object"&&"kind"in i.source&&i.source.kind==="binding"?i.source:void 0;l&&(o={...e,tableSource:l})}let s=typeof i.each=="string"?i.each:void 0;if(s){let l=e.tableSource;if(!l)return e.errors.push(`<${n} each="${s}"> requires an ancestor <Table source={...}>`),null;delete i.each;let u={...o,scopes:[...o.scopes,s]},p=O.isJsxElement(t)?wl(t.children,u):[];return{kind:"map",source:l,item:s,body:{kind:"component",name:n,props:i,children:p}}}let a=O.isJsxElement(t)?wl(t.children,o):[];return{kind:"component",name:n,props:i,children:a}}function w2(t){let e=null;function r(n){if(O.isCallExpression(n)&&O.isIdentifier(n.expression)&&n.expression.text==="screen"&&n.arguments.length===1&&(O.isArrowFunction(n.arguments[0])||O.isFunctionExpression(n.arguments[0]))){let i=n.arguments[0],o="unknown";if(n.typeArguments&&n.typeArguments.length===1){let a=n.typeArguments[0];O.isTypeReferenceNode(a)&&O.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(O.isParenthesizedExpression(s))(O.isJsxElement(s.expression)||O.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(O.isJsxElement(s)||O.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(O.isBlock(s)&&s.statements.length===1){let a=s.statements[0];O.isReturnStatement(a)&&a.expression&&(O.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}O.forEachChild(n,r)}return r(t),e}function $h(t,e,r,n={}){let i=new Set(mt);for(let f of n.allowlistExtra??[])i.add(f);let o=wh(e),s=vh(o),a=O.createSourceFile(o,t,O.ScriptTarget.Latest,!0,O.ScriptKind.TSX),l={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:gl(a,s),allowedComponents:i},u=w2(a);if(!u)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let p=O.isJsxElement(u.jsxRoot)||O.isJsxSelfClosingElement(u.jsxRoot)?Gn(u.jsxRoot,l):O.isJsxFragment(u.jsxRoot)?bl(u.jsxRoot,l):null;return p?{viewModel:u.viewModel,exportName:r,root:p,errors:l.errors,warnings:l.warnings}:(l.errors.push("screen() callback must return a single JSX root element"),{viewModel:u.viewModel,exportName:r,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings})}function _2(t,e){let r={...e.propBindings};for(let i of t.propNames)r[i]={kind:"binding",path:"",scope:i};let n={...e,vmName:t.paramName,propBindings:r,scopes:[]};return O.isJsxElement(t.jsxRoot)||O.isJsxSelfClosingElement(t.jsxRoot)?Gn(t.jsxRoot,n):O.isJsxFragment(t.jsxRoot)?bl(t.jsxRoot,n):O.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):O.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${Jr(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${O.SyntaxKind[t.jsxRoot.kind]}`),null)}function xh(t,e,r,n={}){let i=new Set(mt);for(let f of n.allowlistExtra??[])i.add(f);let o=wh(e),s=vh(o),a=O.createSourceFile(o,t,O.ScriptTarget.Latest,!0,O.ScriptKind.TSX),l=yl(a,r),u={vmName:l?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:gl(a,s),allowedComponents:i};if(!l)return{exportName:r,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${r}" found in ${e}`],warnings:[]};let p=_2(l,u);return p?{exportName:r,propsType:l.propsType,propNames:l.propNames,root:p,errors:u.errors,warnings:u.warnings}:{exportName:r,propsType:l.propsType,propNames:l.propNames,root:{kind:"fragment",children:[]},errors:u.errors,warnings:u.warnings}}function Sl(t){let e=[];function r(n){if(n.kind==="viewRef"){e.push(n);return}if(n.kind==="component"){for(let i of n.children)r(i);return}if(n.kind==="map"){r(n.body);return}if(n.kind==="fragment")for(let i of n.children)r(i)}return r(t),e}function kh(t){return`${t.sourcePath}:${t.name}`}It();var b2=new Set(["swiftui","compose"]),S2=new Set(["action"]);function $2(t,e){return!mt.has(t)&&t in e.extensions}function $l(t){return t?` (${t})`:""}function Uo(t,e,r={}){let n=[],i=[],o=r.targets??[],s=o.some(l=>b2.has(l)),a=l=>{if(l.kind!=="viewRef"){if(l.kind==="component"){if(!mt.has(l.name)&&!(l.name in e.extensions))n.push(`Extension component "${l.name}" is not registered in extensions.yaml${$l(r.source)}`);else if($2(l.name,e)){let u=e.extensions[l.name];s&&u.renderer==="react-only"&&n.push(`Extension "${l.name}" is react-only but binding targets include native renderer(s): ${o.join(", ")}${$l(r.source)}`);for(let p of Object.keys(l.props))p in u.properties||S2.has(p)||n.push(`Extension "${l.name}" does not accept property "${p}"${$l(r.source)}`)}for(let u of l.children)a(u);return}if(l.kind==="map"){a(l.body);return}if(l.kind==="fragment")for(let u of l.children)a(u)}};return a(t),{errors:n,warnings:i}}function Eh(t,e,r,n,i){let o=[],s=[],a=Uo(t,r,{targets:n,source:i.screen});o.push(...a.errors),s.push(...a.warnings);for(let l=0;l<e.length;l++){let u=Uo(e[l],r,{targets:n,source:i.partials[l]});o.push(...u.errors),s.push(...u.warnings)}return{errors:o,warnings:s}}async function k2(t,e,r){let n=await Ph(t,"utf-8"),i=xh(n,t,e,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
|
|
282
|
+
${i.errors.map(o=>` - ${o}`).join(`
|
|
283
|
+
`)}`);if(r.extensionRegistry){let o=Uo(i.root,r.extensionRegistry,{targets:r.targets,source:t});if(o.errors.length>0)throw new Error(`Extension validation errors in ${t} (${e}):
|
|
284
|
+
${o.errors.map(s=>` - ${s}`).join(`
|
|
285
|
+
`)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:Ch(process.cwd(),Ih(t)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType}}async function E2(t,e){let r=new Map,n=Sl(t);for(;n.length>0;){let i=n.shift(),o=kh(i);if(r.has(o))continue;let s=await k2(i.sourcePath,i.name,e);r.set(o,s),n.push(...Sl(s.root))}return[...r.values()]}async function Rh(t,e={}){let r=await Ph(t.sourcePath,"utf-8"),n=t.exportName??x2(t.sourcePath,".view.tsx"),i=$h(r,t.sourcePath,n,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
|
|
286
|
+
${i.errors.map(a=>` - ${a}`).join(`
|
|
287
|
+
`)}`);let o={version:1,source:Ch(process.cwd(),Ih(t.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await E2(o.root,{...e,targets:t.targets??e.targets});if(e.extensionRegistry){let a=Eh(o.root,s.map(l=>l.root),e.extensionRegistry,t.targets??["react"],{screen:o.source,partials:s.map(l=>l.source)});if(a.errors.length>0)throw new Error(`Extension validation errors in ${t.sourcePath}:
|
|
288
|
+
${a.errors.map(l=>` - ${l}`).join(`
|
|
289
|
+
`)}`);i.warnings.push(...a.warnings)}for(let a of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${a}`);return{screen:o,partials:s}}Ct();ml();It();function P2(t){let e=Vi[t];return e?e.lowering==="inline-css"||e.lowering==="class-name":!1}function Kn(t,e,r,n){if(t.kind==="component"){let{name:i,props:o}=t;if(r.has(i)||!mt.has(i)){for(let s of t.children)Kn(s,e,r,n);return}for(let s of Object.keys(o))P2(s)&&(Ju(s,i)||n.push(`${e}: <${i}> does not accept property "${s}"`));for(let s of t.children)Kn(s,e,r,n);return}if(t.kind==="map"){Kn(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)Kn(i,e,r,n);return}}async function Nh(t,e=[]){let r=new Set(e),n=[];for(let i of t)Kn(i.root,i.source,r,n);if(n.length>0)throw new Error(`View property validation failed:
|
|
143
290
|
${n.map(i=>` - ${i}`).join(`
|
|
144
|
-
`)}`)}var
|
|
145
|
-
${l}`)}},configureServer(
|
|
146
|
-
${
|
|
291
|
+
`)}`)}var Ay=Eu(Ty(),1);Ir();Ft();import{readFile as Oy}from"node:fs/promises";import{resolve as My}from"node:path";var fP=Ay.default,pP=My(ke(),"spec/ui-dsl-extensions.meta.json"),xs;async function dP(){if(xs)return xs;let t=JSON.parse(await Oy(pP,"utf-8"));return xs=new fP({allErrors:!0,strict:!1}).compile(t),xs}async function Ly(t){if(!t)return{extensions:{}};let e=My(t),r=await Oy(e,"utf-8"),n=st.load(r),i=await dP();if(!i(n)){let o=i.errors?.map(s=>`${s.instancePath||"/"} ${s.message??""}`).join("; ")??"unknown";throw new Error(`Extension registry validation failed (${e}): ${o}`)}return n}qn();async function jy(t,e,r){return(await Qd()).renderReactPreviewBundle(t,e,r)}var xu="view-contracts:screen/",ks="view-contracts:theme.css";var ht={dispatch:"view-contracts:runtime/dispatch",style:"view-contracts:runtime/style",types:"view-contracts:runtime/types",styleHelpers:"view-contracts:runtime/style-helpers",contracts:"view-contracts:contracts",extensions:"view-contracts:extensions",mock:"view-contracts:preview/mock"};async function mP(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Ly(t.extensions),r=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:r}}async function Vy(t,e){let r=await qt(t),i=(await Gu(r.bindings)).views.find(g=>g.screenName===e);if(!i)throw new Error(`No view binding for screen "${e}"`);if(!i.targets.includes("react"))throw new Error(`Screen "${e}" is not a react target`);let{extensionRegistry:o,allowlistExtra:s}=await mP(r),a=xe(t),{screen:l,partials:u}=await Rh({sourcePath:hP(a,i.source),exportName:i.exportName,screenName:i.screenName},{allowlistExtra:s,extensionRegistry:o}),{tokensPath:p,themePath:f}=ji(r),{themeIR:d}=await Bo(p,f);await zn(r,t);let m=[l,...u];return await Nh(m,s),ul(m,d),jy(l,u,{runtimeImportFrom:ht.dispatch,extensionsImportFrom:ht.extensions,contractsImportFrom:ht.contracts,allowlistExtra:s,previewImports:ht})}Ct();Ka();import{resolve as Dy}from"node:path";var Fy="\0";function qy(t){return`${Fy}${t}`}function By(t){let e="";async function r(){let o=await qt(t.configPath);e=await Fd(t.configPath,o)}function n(o){return o.startsWith(e)&&o.endsWith(".mock.yaml")}function i(o,s){let a=o.moduleGraph.getModuleById(qy(`${Hn}${s}`));return a?(o.moduleGraph.invalidateModule(a),[a]):[]}return{name:"view-contracts-preview-mock",enforce:"pre",async buildStart(){await r()},resolveId(o){return o.startsWith(Hn)?qy(o):null},async load(o){let s=qd(o.slice(Fy.length));if(!s)return null;try{let a=await qt(t.configPath);return await Dd(t.configPath,a,s)}catch(a){let l=a instanceof Error?a.message:String(a);this.error(`Preview mock failed for ${s}:
|
|
292
|
+
${l}`)}},configureServer(o){r(),o.watcher.on("change",s=>{if(!n(s))return;let a=Dy(s).slice(e.length+1).replace(/\.mock\.yaml$/,"");i(o,a)})},handleHotUpdate({file:o,server:s}){if(!n(o))return;let a=Dy(o).slice(e.length+1).replace(/\.mock\.yaml$/,"");return i(s,a)}}}var yP="\0";function Es(t){return`${yP}${t}`}function vP(t){let e=Es(xu);if(!t.startsWith(e))return null;let r=t.slice(e.length);return r.endsWith(".tsx")?r.slice(0,-4):r}function wP(t){let e="",r="",n=[],i,o,s="";async function a(){let f=await qt(t.configPath);e=xe(t.configPath),r=f.viewsDir,n=[],f.design?.tokens&&n.push(f.design.tokens),f.design?.theme&&n.push(f.design.theme),o=f.design?.extensionsCss,i=f.extensions,s=Dn()}function l(f){let d=f.moduleGraph.getModuleById(Es(ks));return d?(f.moduleGraph.invalidateModule(d),[d]):[]}function u(f,d){let m=f.moduleGraph.getModulesByFile(d);if(m)for(let g of m)f.moduleGraph.invalidateModule(g);(d.endsWith(".view.tsx")||d.includes("/views/"))&&f.moduleGraph.invalidateAll()}function p(f){return n.some(d=>f===d)||f===s||o!==void 0&&f===o}return{name:"view-contracts-preview",enforce:"pre",async buildStart(){await a()},resolveId(f){return f===ks||f.startsWith(xu)?Es(f):null},async load(f){if(f===Es(ks)){let m=await qt(t.configPath);return await Fn(m,t.configPath)}let d=vP(f);if(d)try{let m=await Vy(t.configPath,d),{code:g}=await gP(m,{loader:"tsx",format:"esm",jsx:"automatic",jsxImportSource:"react",target:"es2022"});return g}catch(m){let g=m instanceof Error?m.message:String(m);this.error(`Preview compile failed for ${d}:
|
|
293
|
+
${g}`)}return null},configureServer(f){a(),f.watcher.on("change",d=>{p(d)&&l(f),(d.startsWith(r)||p(d)||i&&d===i||Ya(d))&&u(f,d)})},handleHotUpdate({file:f,server:d}){if(p(f))return u(d,f),l(d);if(f.startsWith(r)||i&&f===i||Ya(f))return u(d,f),[...d.moduleGraph.getModulesByFile(f)??[]]}}}function _P(t){let e=ke(),r=Ur();return[{find:"@view-contracts/core",replacement:Sr(e,"dist/dsl.js")},{find:ht.dispatch,replacement:Sr(r,"dispatch.ts")},{find:ht.style,replacement:Sr(r,"style.ts")},{find:ht.types,replacement:Sr(r,"types.ts")},{find:ht.styleHelpers,replacement:Sr(e,"dist/preview-style-helpers.js")},{find:ht.contracts,replacement:Sr(t,"contracts/view-models.ts")},{find:ht.extensions,replacement:Sr(t,"src/components/extensions.tsx")}]}function bP(t,e){return[t,e,ke()]}export{bP as previewFsAllowPaths,_P as previewRuntimeAliases,By as viewContractsPreviewMockPlugin,wP as viewContractsPreviewPlugin};
|
|
147
294
|
/*! Bundled license information:
|
|
148
295
|
|
|
149
296
|
js-yaml/dist/js-yaml.mjs:
|