view-contracts 0.5.2 → 0.5.4
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/README.md +19 -0
- package/cli-contract.yaml +1 -1
- package/dist/preview.mjs +138 -138
- package/dist/preview.mjs.map +3 -3
- package/dist/view-contracts.bundle.mjs +222 -222
- package/dist/view-contracts.bundle.mjs.map +3 -3
- package/docs/cli-reference.md +1 -1
- package/package.json +1 -1
- package/renderers/compose/lowering/lowerToCompose.ts +53 -11
- package/renderers/compose/lowering/modifiers.ts +10 -0
- package/renderers/compose/renderTheme.ts +26 -7
- package/renderers/react/lowering/lowerToJsx.ts +22 -10
package/dist/preview.mjs
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
var
|
|
1
|
+
var tw=Object.create;var oa=Object.defineProperty;var rw=Object.getOwnPropertyDescriptor;var nw=Object.getOwnPropertyNames;var iw=Object.getPrototypeOf,ow=Object.prototype.hasOwnProperty;var jr=(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 X=(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}},lr=(t,e)=>{for(var r in e)oa(t,r,{get:e[r],enumerable:!0})},sw=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of nw(e))!ow.call(t,i)&&i!==r&&oa(t,i,{get:()=>e[i],enumerable:!(n=rw(e,i))||n.enumerable});return t};var ip=(t,e,r)=>(r=t!=null?tw(iw(t)):{},sw(e||!t||!t.__esModule?oa(r,"default",{value:t,enumerable:!0}):r,t));var aw,op,lw,uw,cw,pw,me,fw,dw,Nn,Mn,hw,Fe,sp,ap,lp,up,cp,pp,fp,dp,hp,mp,gp,yp,vp,wp,bp,$p,xp,sa,mw,gw,_p,gI,yI,vI,wI,bI,$I,xI,_I,SI,kI,CI,EI,PI,II,ht,Dr=X(()=>{aw=Object.create,op=Object.defineProperty,lw=Object.getOwnPropertyDescriptor,uw=Object.getOwnPropertyNames,cw=Object.getPrototypeOf,pw=Object.prototype.hasOwnProperty,me=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),fw=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(var i=uw(e),o=0,s=i.length,a;o<s;o++)a=i[o],!pw.call(t,a)&&a!==r&&op(t,a,{get:(l=>e[l]).bind(null,a),enumerable:!(n=lw(e,a))||n.enumerable});return t},dw=(t,e,r)=>(r=t!=null?aw(cw(t)):{},fw(e||!t||!t.__esModule?op(r,"default",{value:t,enumerable:!0}):r,t)),Nn=me(((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 f=Object.keys(u);for(let p=0,d=f.length;p<d;p+=1){let m=f[p];l[m]=u[m]}}return l}function s(l,u){let f="";for(let p=0;p<u;p+=1)f+=l;return f}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})),Mn=me(((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+=`
|
|
2
2
|
|
|
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})),
|
|
4
|
-
`+m}let
|
|
5
|
-
`,m+=r.repeat("-",a.indent+g+3+
|
|
6
|
-
`;for(let
|
|
7
|
-
`}return m.replace(/\n$/,"")}e.exports=o})),Fe=me(((t,e)=>{var r=Mn(),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(f){l[String(f)]=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})),
|
|
8
|
-
\r`;function i(l){if(l===null)return!1;let u=0,f=l.length,p=n;for(let d=0;d<f;d++){let m=p.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,""),f=u.length,p=n,d=0,m=[];for(let y=0;y<f;y++)y%4===0&&y&&(m.push(d>>16&255),m.push(d>>8&255),m.push(d&255)),d=d<<6|p.indexOf(u.charAt(y));let g=f%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="",f=0,p=l.length,d=n;for(let g=0;g<p;g++)g%3===0&&g&&(u+=d[f>>18&63],u+=d[f>>12&63],u+=d[f>>6&63],u+=d[f&63]),f=(f<<8)+l[g];let m=p%3;return m===0?(u+=d[f>>18&63],u+=d[f>>12&63],u+=d[f>>6&63],u+=d[f&63]):m===2?(u+=d[f>>10&63],u+=d[f>>4&63],u+=d[f<<2&63],u+=d[64]):m===1&&(u+=d[f>>2&63],u+=d[f<<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})})),
|
|
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 $e(c){return c<=65535?String.fromCharCode(c):String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}function Ge(c,
|
|
10
|
-
`,
|
|
11
|
-
`,
|
|
12
|
-
`);break}S?
|
|
13
|
-
`,
|
|
14
|
-
`,$+1)):$===0?
|
|
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})),hw=me(((t,e)=>{var r=Nn();function n(s,a,l,u,f){let p="",d="",m=Math.floor(f/2)-1;return u-a>m&&(p=" ... ",a=u-m+p.length),l-u>m&&(d=" ...",l=u+m-d.length),{str:p+s.slice(a,l).replace(/\t/g,"\u2192")+d,pos:u-a+p.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],f=[],p,d=-1;for(;p=l.exec(s.buffer);)f.push(p.index),u.push(p.index+p[0].length),s.position<=p.index&&d<0&&(d=u.length-2);d<0&&(d=u.length-1);let m="",g=Math.min(s.line+a.linesAfter,f.length).toString().length,y=a.maxLength-(a.indent+g+3);for(let b=1;b<=a.linesBefore&&!(d-b<0);b++){let M=n(s.buffer,u[d-b],f[d-b],s.position-(u[d]-u[d-b]),y);m=r.repeat(" ",a.indent)+i((s.line-b+1).toString(),g)+" | "+M.str+`
|
|
4
|
+
`+m}let w=n(s.buffer,u[d],f[d],s.position,y);m+=r.repeat(" ",a.indent)+i((s.line+1).toString(),g)+" | "+w.str+`
|
|
5
|
+
`,m+=r.repeat("-",a.indent+g+3+w.pos)+`^
|
|
6
|
+
`;for(let b=1;b<=a.linesAfter&&!(d+b>=f.length);b++){let M=n(s.buffer,u[d+b],f[d+b],s.position-(u[d]-u[d+b]),y);m+=r.repeat(" ",a.indent)+i((s.line+b+1).toString(),g)+" | "+M.str+`
|
|
7
|
+
`}return m.replace(/\n$/,"")}e.exports=o})),Fe=me(((t,e)=>{var r=Mn(),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(f){l[String(f)]=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})),sp=me(((t,e)=>{var r=Mn(),n=Fe();function i(a,l){let u=[];return a[l].forEach(function(f){let p=u.length;u.forEach(function(d,m){d.tag===f.tag&&d.kind===f.kind&&d.multi===f.multi&&(p=m)}),u[p]=f}),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,f=arguments.length;u<f;u+=1)arguments[u].forEach(l);return a}function s(a){return this.extend(a)}s.prototype.extend=function(l){let u=[],f=[];if(l instanceof n)f.push(l);else if(Array.isArray(l))f=f.concat(l);else if(l&&(Array.isArray(l.implicit)||Array.isArray(l.explicit)))l.implicit&&(u=u.concat(l.implicit)),l.explicit&&(f=f.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.")}),f.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 p=Object.create(s.prototype);return p.implicit=(this.implicit||[]).concat(u),p.explicit=(this.explicit||[]).concat(f),p.compiledImplicit=i(p,"implicit"),p.compiledExplicit=i(p,"explicit"),p.compiledTypeMap=o(p.compiledImplicit,p.compiledExplicit),p},e.exports=s})),ap=me(((t,e)=>{e.exports=new(Fe())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})})),lp=me(((t,e)=>{e.exports=new(Fe())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})})),up=me(((t,e)=>{e.exports=new(Fe())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})})),cp=me(((t,e)=>{e.exports=new(sp())({explicit:[ap(),lp(),up()]})})),pp=me(((t,e)=>{var r=Fe();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"})})),fp=me(((t,e)=>{var r=Fe();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"})})),dp=me(((t,e)=>{var r=Nn(),n=Fe();function i(p){return p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102}function o(p){return p>=48&&p<=55}function s(p){return p>=48&&p<=57}function a(p){if(p===null)return!1;let d=p.length,m=0,g=!1;if(!d)return!1;let y=p[m];if((y==="-"||y==="+")&&(y=p[++m]),y==="0"){if(m+1===d)return!0;if(y=p[++m],y==="b"){for(m++;m<d;m++){if(y=p[m],y!=="0"&&y!=="1")return!1;g=!0}return g&&Number.isFinite(l(p))}if(y==="x"){for(m++;m<d;m++){if(!i(p.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(l(p))}if(y==="o"){for(m++;m<d;m++){if(!o(p.charCodeAt(m)))return!1;g=!0}return g&&Number.isFinite(l(p))}}for(;m<d;m++){if(!s(p.charCodeAt(m)))return!1;g=!0}return g?Number.isFinite(l(p)):!1}function l(p){let d=p,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(p){return l(p)}function f(p){return Object.prototype.toString.call(p)==="[object Number]"&&p%1===0&&!r.isNegativeZero(p)}e.exports=new n("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:u,predicate:f,represent:{binary:function(p){return p>=0?"0b"+p.toString(2):"-0b"+p.toString(2).slice(1)},octal:function(p){return p>=0?"0o"+p.toString(8):"-0o"+p.toString(8).slice(1)},decimal:function(p){return p.toString(10)},hexadecimal:function(p){return p>=0?"0x"+p.toString(16).toUpperCase():"-0x"+p.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})})),hp=me(((t,e)=>{var r=Nn(),n=Fe(),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(p){return p===null||!i.test(p)?!1:Number.isFinite(parseFloat(p,10))?!0:o.test(p)}function a(p){let d=p.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(p,d){if(isNaN(p))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===p)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===p)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(p))return"-0.0";let m=p.toString(10);return l.test(m)?m.replace("e",".e"):m}function f(p){return Object.prototype.toString.call(p)==="[object Number]"&&(p%1!==0||r.isNegativeZero(p))}e.exports=new n("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:f,represent:u,defaultStyle:"lowercase"})})),mp=me(((t,e)=>{e.exports=cp().extend({implicit:[pp(),fp(),dp(),hp()]})})),gp=me(((t,e)=>{e.exports=mp()})),yp=me(((t,e)=>{var r=Fe(),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,f=null,p=n.exec(l);if(p===null&&(p=i.exec(l)),p===null)throw new Error("Date resolve error");let d=+p[1],m=+p[2]-1,g=+p[3];if(!p[4])return new Date(Date.UTC(d,m,g));let y=+p[4],w=+p[5],b=+p[6];if(p[7]){for(u=p[7].slice(0,3);u.length<3;)u+="0";u=+u}if(p[9]){let k=+p[10],R=+(p[11]||0);f=(k*60+R)*6e4,p[9]==="-"&&(f=-f)}let M=new Date(Date.UTC(d,m,g,y,w,b,u));return f&&M.setTime(M.getTime()-f),M}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})})),vp=me(((t,e)=>{var r=Fe();function n(i){return i==="<<"||i===null}e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n})})),wp=me(((t,e)=>{var r=Fe(),n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
8
|
+
\r`;function i(l){if(l===null)return!1;let u=0,f=l.length,p=n;for(let d=0;d<f;d++){let m=p.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,""),f=u.length,p=n,d=0,m=[];for(let y=0;y<f;y++)y%4===0&&y&&(m.push(d>>16&255),m.push(d>>8&255),m.push(d&255)),d=d<<6|p.indexOf(u.charAt(y));let g=f%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="",f=0,p=l.length,d=n;for(let g=0;g<p;g++)g%3===0&&g&&(u+=d[f>>18&63],u+=d[f>>12&63],u+=d[f>>6&63],u+=d[f&63]),f=(f<<8)+l[g];let m=p%3;return m===0?(u+=d[f>>18&63],u+=d[f>>12&63],u+=d[f>>6&63],u+=d[f&63]):m===2?(u+=d[f>>10&63],u+=d[f>>4&63],u+=d[f<<2&63],u+=d[64]):m===1&&(u+=d[f>>2&63],u+=d[f<<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})})),bp=me(((t,e)=>{var r=Fe(),n=Object.prototype.hasOwnProperty,i=Object.prototype.toString;function o(a){if(a===null)return!0;let l=[],u=a;for(let f=0,p=u.length;f<p;f+=1){let d=u[f],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})})),$p=me(((t,e)=>{var r=Fe(),n=Object.prototype.toString;function i(s){if(s===null)return!0;let a=s,l=new Array(a.length);for(let u=0,f=a.length;u<f;u+=1){let p=a[u];if(n.call(p)!=="[object Object]")return!1;let d=Object.keys(p);if(d.length!==1)return!1;l[u]=[d[0],p[d[0]]]}return!0}function o(s){if(s===null)return[];let a=s,l=new Array(a.length);for(let u=0,f=a.length;u<f;u+=1){let p=a[u],d=Object.keys(p);l[u]=[d[0],p[d[0]]]}return l}e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:o})})),xp=me(((t,e)=>{var r=Fe(),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})})),sa=me(((t,e)=>{e.exports=gp().extend({implicit:[yp(),vp()],explicit:[wp(),bp(),$p(),xp()]})})),mw=me(((t,e)=>{var r=Nn(),n=Mn(),i=hw(),o=sa(),s=Object.prototype.hasOwnProperty,a=1,l=2,u=3,f=4,p=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]/,w=/[,\[\]{}]/,b=/^(?:!|!!|![0-9A-Za-z-]+!)$/,M=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function k(c){return Object.prototype.toString.call(c)}function R(c){return c===10||c===13}function T(c){return c===9||c===32}function V(c){return c===9||c===32||c===10||c===13}function z(c){return c===44||c===91||c===93||c===123||c===125}function ie(c){if(c>=48&&c<=57)return c-48;let v=c|32;return v>=97&&v<=102?v-97+10:-1}function we(c){return c===120?2:c===117?4:c===85?8:0}function be(c){return c>=48&&c<=57?c-48:-1}function Re(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 $e(c){return c<=65535?String.fromCharCode(c):String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}function Ge(c,v,S){v==="__proto__"?Object.defineProperty(c,v,{configurable:!0,enumerable:!0,writable:!0,value:S}):c[v]=S}var Je=new Array(256),Y=new Array(256);for(let c=0;c<256;c++)Je[c]=Re(c)?1:0,Y[c]=Re(c);function ue(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 Gi(c,v){let S={name:c.filename,buffer:c.input.slice(0,-1),position:c.position,line:c.line,column:c.position-c.lineStart};return S.snippet=i(S),new n(v,S)}function H(c,v){throw Gi(c,v)}function Mr(c,v){c.onWarning&&c.onWarning.call(null,Gi(c,v))}function Rt(c,v,S){let P=c.anchorMapTransactions;if(P.length!==0){let x=P[P.length-1];s.call(x,v)||(x[v]={existed:s.call(c.anchorMap,v),value:c.anchorMap[v]})}c.anchorMap[v]=S}function Zs(c){c.anchorMapTransactions.push(Object.create(null))}function ar(c){let v=c.anchorMapTransactions.pop(),S=c.anchorMapTransactions;if(S.length===0)return;let P=S[S.length-1],x=Object.keys(v);for(let O=0,h=x.length;O<h;O+=1){let $=x[O];s.call(P,$)||(P[$]=v[$])}}function ea(c){let v=c.anchorMapTransactions.pop(),S=Object.keys(v);for(let P=S.length-1;P>=0;P-=1){let x=v[S[P]];x.existed?c.anchorMap[S[P]]=x.value:delete c.anchorMap[S[P]]}}function In(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 Or(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 Ji={YAML:function(v,S,P){v.version!==null&&H(v,"duplication of %YAML directive"),P.length!==1&&H(v,"YAML directive accepts exactly one argument");let x=/^([0-9]+)\.([0-9]+)$/.exec(P[0]);x===null&&H(v,"ill-formed argument of the YAML directive");let O=parseInt(x[1],10),h=parseInt(x[2],10);O!==1&&H(v,"unacceptable YAML version of the document"),v.version=P[0],v.checkLineBreaks=h<2,h!==1&&h!==2&&Mr(v,"unsupported YAML version of the document")},TAG:function(v,S,P){let x;P.length!==2&&H(v,"TAG directive accepts exactly two arguments");let O=P[0];x=P[1],b.test(O)||H(v,"ill-formed tag handle (first argument) of the TAG directive"),s.call(v.tagMap,O)&&H(v,'there is a previously declared suffix for "'+O+'" tag handle'),M.test(x)||H(v,"ill-formed tag prefix (second argument) of the TAG directive");try{x=decodeURIComponent(x)}catch{H(v,"tag prefix is malformed: "+x)}v.tagMap[O]=x}};function et(c,v,S,P){if(v<S){let x=c.input.slice(v,S);if(P)for(let O=0,h=x.length;O<h;O+=1){let $=x.charCodeAt(O);$===9||$>=32&&$<=1114111||H(c,"expected valid JSON character")}else g.test(x)&&H(c,"the stream contains non-printable characters");c.result+=x}}function Jt(c,v,S,P){r.isObject(S)||H(c,"cannot merge mappings; the provided source object is unacceptable");let x=Object.keys(S);for(let O=0,h=x.length;O<h;O+=1){let $=x[O];s.call(v,$)||(Ge(v,$,S[$]),P[$]=!0)}}function Tt(c,v,S,P,x,O,h,$,N){if(Array.isArray(x)){x=Array.prototype.slice.call(x);for(let C=0,E=x.length;C<E;C+=1)Array.isArray(x[C])&&H(c,"nested arrays are not supported inside keys"),typeof x=="object"&&k(x[C])==="[object Object]"&&(x[C]="[object Object]")}if(typeof x=="object"&&k(x)==="[object Object]"&&(x="[object Object]"),x=String(x),v===null&&(v={}),P==="tag:yaml.org,2002:merge")if(Array.isArray(O)){O.length>c.maxMergeSeqLength&&H(c,"merge sequence length exceeded maxMergeSeqLength ("+c.maxMergeSeqLength+")");let C=new Set;for(let E=0,A=O.length;E<A;E+=1){let I=O[E];C.has(I)||(C.add(I),Jt(c,v,I,S))}}else Jt(c,v,O,S);else!c.json&&!s.call(S,x)&&s.call(v,x)&&(c.line=h||c.line,c.lineStart=$||c.lineStart,c.position=N||c.position,H(c,"duplicated mapping key")),Ge(v,x,O),delete S[x];return v}function Vr(c){let v=c.input.charCodeAt(c.position);v===10?c.position++:v===13?(c.position++,c.input.charCodeAt(c.position)===10&&c.position++):H(c,"a line break is expected"),c.line+=1,c.lineStart=c.position,c.firstTabInLine=-1}function _e(c,v,S){let P=0,x=c.input.charCodeAt(c.position);for(;x!==0;){for(;T(x);)x===9&&c.firstTabInLine===-1&&(c.firstTabInLine=c.position),x=c.input.charCodeAt(++c.position);if(v&&x===35)do x=c.input.charCodeAt(++c.position);while(x!==10&&x!==13&&x!==0);if(R(x))for(Vr(c),x=c.input.charCodeAt(c.position),P++,c.lineIndent=0;x===32;)c.lineIndent++,x=c.input.charCodeAt(++c.position);else break}return S!==-1&&P!==0&&c.lineIndent<S&&Mr(c,"deficient indentation"),P}function Lr(c){let v=c.position,S=c.input.charCodeAt(v);return!!((S===45||S===46)&&S===c.input.charCodeAt(v+1)&&S===c.input.charCodeAt(v+2)&&(v+=3,S=c.input.charCodeAt(v),S===0||V(S)))}function At(c,v){v===1?c.result+=" ":v>1&&(c.result+=r.repeat(`
|
|
10
|
+
`,v-1))}function Ki(c,v,S){let P,x,O,h,$,N,C=c.kind,E=c.result,A=c.input.charCodeAt(c.position);if(V(A)||z(A)||A===35||A===38||A===42||A===33||A===124||A===62||A===39||A===34||A===37||A===64||A===96)return!1;if(A===63||A===45){let I=c.input.charCodeAt(c.position+1);if(V(I)||S&&z(I))return!1}for(c.kind="scalar",c.result="",P=x=c.position,O=!1;A!==0;){if(A===58){let I=c.input.charCodeAt(c.position+1);if(V(I)||S&&z(I))break}else if(A===35){if(V(c.input.charCodeAt(c.position-1)))break}else{if(c.position===c.lineStart&&Lr(c)||S&&z(A))break;if(R(A))if(h=c.line,$=c.lineStart,N=c.lineIndent,_e(c,!1,-1),c.lineIndent>=v){O=!0,A=c.input.charCodeAt(c.position);continue}else{c.position=x,c.line=h,c.lineStart=$,c.lineIndent=N;break}}O&&(et(c,P,x,!1),At(c,c.line-h),P=x=c.position,O=!1),T(A)||(x=c.position+1),A=c.input.charCodeAt(++c.position)}return et(c,P,x,!1),c.result?!0:(c.kind=C,c.result=E,!1)}function Yi(c,v){let S,P,x=c.input.charCodeAt(c.position);if(x!==39)return!1;for(c.kind="scalar",c.result="",c.position++,S=P=c.position;(x=c.input.charCodeAt(c.position))!==0;)if(x===39)if(et(c,S,c.position,!0),x=c.input.charCodeAt(++c.position),x===39)S=c.position,c.position++,P=c.position;else return!0;else R(x)?(et(c,S,P,!0),At(c,_e(c,!1,v)),S=P=c.position):c.position===c.lineStart&&Lr(c)?H(c,"unexpected end of the document within a single quoted scalar"):(c.position++,T(x)||(P=c.position));H(c,"unexpected end of the stream within a single quoted scalar")}function Rn(c,v){let S,P,x,O=c.input.charCodeAt(c.position);if(O!==34)return!1;for(c.kind="scalar",c.result="",c.position++,S=P=c.position;(O=c.input.charCodeAt(c.position))!==0;){if(O===34)return et(c,S,c.position,!0),c.position++,!0;if(O===92){if(et(c,S,c.position,!0),O=c.input.charCodeAt(++c.position),R(O))_e(c,!1,v);else if(O<256&&Je[O])c.result+=Y[O],c.position++;else if((x=we(O))>0){let h=x,$=0;for(;h>0;h--)O=c.input.charCodeAt(++c.position),(x=ie(O))>=0?$=($<<4)+x:H(c,"expected hexadecimal character");c.result+=$e($),c.position++}else H(c,"unknown escape sequence");S=P=c.position}else R(O)?(et(c,S,P,!0),At(c,_e(c,!1,v)),S=P=c.position):c.position===c.lineStart&&Lr(c)?H(c,"unexpected end of the document within a double quoted scalar"):(c.position++,T(O)||(P=c.position))}H(c,"unexpected end of the stream within a double quoted scalar")}function Xi(c,v){let S=!0,P,x,O,h=c.tag,$,N=c.anchor,C,E,A,I,q=Object.create(null),D,G,J,oe=c.input.charCodeAt(c.position);if(oe===91)C=93,I=!1,$=[];else if(oe===123)C=125,I=!0,$={};else return!1;for(c.anchor!==null&&Rt(c,c.anchor,$),oe=c.input.charCodeAt(++c.position);oe!==0;){if(_e(c,!0,v),oe=c.input.charCodeAt(c.position),oe===C)return c.position++,c.tag=h,c.anchor=N,c.kind=I?"mapping":"sequence",c.result=$,!0;S?oe===44&&H(c,"expected the node content, but found ','"):H(c,"missed comma between flow collection entries"),G=D=J=null,E=A=!1,oe===63&&V(c.input.charCodeAt(c.position+1))&&(E=A=!0,c.position++,_e(c,!0,v)),P=c.line,x=c.lineStart,O=c.position,Mt(c,v,a,!1,!0),G=c.tag,D=c.result,_e(c,!0,v),oe=c.input.charCodeAt(c.position),(A||c.line===P)&&oe===58&&(E=!0,oe=c.input.charCodeAt(++c.position),_e(c,!0,v),Mt(c,v,a,!1,!0),J=c.result),I?Tt(c,$,q,G,D,J,P,x,O):E?$.push(Tt(c,null,q,G,D,J,P,x,O)):$.push(D),_e(c,!0,v),oe=c.input.charCodeAt(c.position),oe===44?(S=!0,oe=c.input.charCodeAt(++c.position)):S=!1}H(c,"unexpected end of the stream within a flow collection")}function Qi(c,v){let S,P=p,x=!1,O=!1,h=v,$=0,N=!1,C,E=c.input.charCodeAt(c.position);if(E===124)S=!1;else if(E===62)S=!0;else return!1;for(c.kind="scalar",c.result="";E!==0;)if(E=c.input.charCodeAt(++c.position),E===43||E===45)p===P?P=E===43?m:d:H(c,"repeat of a chomping mode identifier");else if((C=be(E))>=0)C===0?H(c,"bad explicit indentation width of a block scalar; it cannot be less than one"):O?H(c,"repeat of an indentation width identifier"):(h=v+C-1,O=!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(!R(E)&&E!==0)}for(;E!==0;){for(Vr(c),c.lineIndent=0,E=c.input.charCodeAt(c.position);(!O||c.lineIndent<h)&&E===32;)c.lineIndent++,E=c.input.charCodeAt(++c.position);if(!O&&c.lineIndent>h&&(h=c.lineIndent),R(E)){$++;continue}if(!O&&h===0&&H(c,"missing indentation for block scalar"),c.lineIndent<h){P===m?c.result+=r.repeat(`
|
|
11
|
+
`,x?1+$:$):P===p&&x&&(c.result+=`
|
|
12
|
+
`);break}S?T(E)?(N=!0,c.result+=r.repeat(`
|
|
13
|
+
`,x?1+$:$)):N?(N=!1,c.result+=r.repeat(`
|
|
14
|
+
`,$+1)):$===0?x&&(c.result+=" "):c.result+=r.repeat(`
|
|
15
15
|
`,$):c.result+=r.repeat(`
|
|
16
|
-
`,
|
|
17
|
-
`),c.charCodeAt(0)===65279&&(c=c.slice(1)));let S=new ue(c,
|
|
18
|
-
`,
|
|
16
|
+
`,x?1+$:$),x=!0,O=!0,$=0;let A=c.position;for(;!R(E)&&E!==0;)E=c.input.charCodeAt(++c.position);et(c,A,c.position,!1)}return!0}function Nt(c,v){let S=c.tag,P=c.anchor,x=[],O=!1;if(c.firstTabInLine!==-1)return!1;c.anchor!==null&&Rt(c,c.anchor,x);let h=c.input.charCodeAt(c.position);for(;h!==0&&(c.firstTabInLine!==-1&&(c.position=c.firstTabInLine,H(c,"tab characters must not be used in indentation")),!(h!==45||!V(c.input.charCodeAt(c.position+1))));){if(O=!0,c.position++,_e(c,!0,-1)&&c.lineIndent<=v){x.push(null),h=c.input.charCodeAt(c.position);continue}let $=c.line;if(Mt(c,v,u,!1,!0),x.push(c.result),_e(c,!0,-1),h=c.input.charCodeAt(c.position),(c.line===$||c.lineIndent>v)&&h!==0)H(c,"bad indentation of a sequence entry");else if(c.lineIndent<v)break}return O?(c.tag=S,c.anchor=P,c.kind="sequence",c.result=x,!0):!1}function Zi(c,v,S){let P,x,O,h,$=c.tag,N=c.anchor,C={},E=Object.create(null),A=null,I=null,q=null,D=!1,G=!1;if(c.firstTabInLine!==-1)return!1;c.anchor!==null&&Rt(c,c.anchor,C);let J=c.input.charCodeAt(c.position);for(;J!==0;){!D&&c.firstTabInLine!==-1&&(c.position=c.firstTabInLine,H(c,"tab characters must not be used in indentation"));let oe=c.input.charCodeAt(c.position+1),xe=c.line;if((J===63||J===58)&&V(oe))J===63?(D&&(Tt(c,C,E,A,I,null,x,O,h),A=I=q=null),G=!0,D=!0,P=!0):D?(D=!1,P=!0):H(c,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),c.position+=1,J=oe;else{if(x=c.line,O=c.lineStart,h=c.position,!Mt(c,S,l,!1,!0))break;if(c.line===xe){for(J=c.input.charCodeAt(c.position);T(J);)J=c.input.charCodeAt(++c.position);if(J===58)J=c.input.charCodeAt(++c.position),V(J)||H(c,"a whitespace character is expected after the key-value separator within a block mapping"),D&&(Tt(c,C,E,A,I,null,x,O,h),A=I=q=null),G=!0,D=!1,P=!1,A=c.tag,I=c.result;else if(G)H(c,"can not read an implicit mapping pair; a colon is missed");else return c.tag=$,c.anchor=N,!0}else if(G)H(c,"can not read a block mapping entry; a multiline key may not be an implicit key");else return c.tag=$,c.anchor=N,!0}if((c.line===xe||c.lineIndent>v)&&(D&&(x=c.line,O=c.lineStart,h=c.position),Mt(c,v,f,!0,P)&&(D?I=c.result:q=c.result),D||(Tt(c,C,E,A,I,q,x,O,h),A=I=q=null),_e(c,!0,-1),J=c.input.charCodeAt(c.position)),(c.line===xe||c.lineIndent>v)&&J!==0)H(c,"bad indentation of a mapping entry");else if(c.lineIndent<v)break}return D&&Tt(c,C,E,A,I,null,x,O,h),G&&(c.tag=$,c.anchor=N,c.kind="mapping",c.result=C),G}function ta(c){let v=!1,S=!1,P,x,O=c.input.charCodeAt(c.position);if(O!==33)return!1;c.tag!==null&&H(c,"duplication of a tag property"),O=c.input.charCodeAt(++c.position),O===60?(v=!0,O=c.input.charCodeAt(++c.position)):O===33?(S=!0,P="!!",O=c.input.charCodeAt(++c.position)):P="!";let h=c.position;if(v){do O=c.input.charCodeAt(++c.position);while(O!==0&&O!==62);c.position<c.length?(x=c.input.slice(h,c.position),O=c.input.charCodeAt(++c.position)):H(c,"unexpected end of the stream within a verbatim tag")}else{for(;O!==0&&!V(O);)O===33&&(S?H(c,"tag suffix cannot contain exclamation marks"):(P=c.input.slice(h-1,c.position+1),b.test(P)||H(c,"named tag handle cannot contain such characters"),S=!0,h=c.position+1)),O=c.input.charCodeAt(++c.position);x=c.input.slice(h,c.position),w.test(x)&&H(c,"tag suffix cannot contain flow indicator characters")}x&&!M.test(x)&&H(c,"tag name cannot contain such characters: "+x);try{x=decodeURIComponent(x)}catch{H(c,"tag name is malformed: "+x)}return v?c.tag=x:s.call(c.tagMap,P)?c.tag=c.tagMap[P]+x:P==="!"?c.tag="!"+x:P==="!!"?c.tag="tag:yaml.org,2002:"+x:H(c,'undeclared tag handle "'+P+'"'),!0}function eo(c){let v=c.input.charCodeAt(c.position);if(v!==38)return!1;c.anchor!==null&&H(c,"duplication of an anchor property"),v=c.input.charCodeAt(++c.position);let S=c.position;for(;v!==0&&!V(v)&&!z(v);)v=c.input.charCodeAt(++c.position);return c.position===S&&H(c,"name of an anchor node must contain at least one character"),c.anchor=c.input.slice(S,c.position),!0}function to(c){let v=c.input.charCodeAt(c.position);if(v!==42)return!1;v=c.input.charCodeAt(++c.position);let S=c.position;for(;v!==0&&!V(v)&&!z(v);)v=c.input.charCodeAt(++c.position);c.position===S&&H(c,"name of an alias node must contain at least one character");let P=c.input.slice(S,c.position);return s.call(c.anchorMap,P)||H(c,'unidentified alias "'+P+'"'),c.result=c.anchorMap[P],_e(c,!0,-1),!0}function ra(c,v,S,P){let x=In(c);return Zs(c),Or(c,v),c.tag=null,c.anchor=null,c.kind=null,c.result=null,Zi(c,S,P)&&c.kind==="mapping"?(ar(c),!0):(ea(c),Or(c,x),!1)}function Mt(c,v,S,P,x){let O,h,$=1,N=!1,C=!1,E=null,A,I,q;c.depth>=c.maxDepth&&H(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 D=O=h=f===S||u===S;if(P&&_e(c,!0,-1)&&(N=!0,c.lineIndent>v?$=1:c.lineIndent===v?$=0:c.lineIndent<v&&($=-1)),$===1)for(;;){let G=c.input.charCodeAt(c.position),J=In(c);if(N&&(G===33&&c.tag!==null||G===38&&c.anchor!==null)||!ta(c)&&!eo(c))break;E===null&&(E=J),_e(c,!0,-1)?(N=!0,h=D,c.lineIndent>v?$=1:c.lineIndent===v?$=0:c.lineIndent<v&&($=-1)):h=!1}if(h&&(h=N||x),$===1||f===S)if(a===S||l===S?I=v:I=v+1,q=c.position-c.lineStart,$===1)if(h&&(Nt(c,q)||Zi(c,q,I))||Xi(c,I))C=!0;else{let G=c.input.charCodeAt(c.position);E!==null&&D&&!h&&G!==124&&G!==62&&ra(c,E,E.position-E.lineStart,I)||O&&Qi(c,I)||Yi(c,I)||Rn(c,I)?C=!0:to(c)?(C=!0,(c.tag!==null||c.anchor!==null)&&H(c,"alias node should not have any properties")):Ki(c,I,a===S)&&(C=!0,c.tag===null&&(c.tag="?")),c.anchor!==null&&Rt(c,c.anchor,c.result)}else $===0&&(C=h&&Nt(c,q));if(c.tag===null)c.anchor!==null&&Rt(c,c.anchor,c.result);else if(c.tag==="?"){c.result!==null&&c.kind!=="scalar"&&H(c,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+c.kind+'"');for(let G=0,J=c.implicitTypes.length;G<J;G+=1)if(A=c.implicitTypes[G],A.resolve(c.result)){c.result=A.construct(c.result),c.tag=A.tag,c.anchor!==null&&Rt(c,c.anchor,c.result);break}}else if(c.tag!=="!"){if(s.call(c.typeMap[c.kind||"fallback"],c.tag))A=c.typeMap[c.kind||"fallback"][c.tag];else{A=null;let G=c.typeMap.multi[c.kind||"fallback"];for(let J=0,oe=G.length;J<oe;J+=1)if(c.tag.slice(0,G[J].tag.length)===G[J].tag){A=G[J];break}}A||H(c,"unknown tag !<"+c.tag+">"),c.result!==null&&A.kind!==c.kind&&H(c,"unacceptable node kind for !<"+c.tag+'> tag; it should be "'+A.kind+'", not "'+c.kind+'"'),A.resolve(c.result,c.tag)?(c.result=A.construct(c.result,c.tag),c.anchor!==null&&Rt(c,c.anchor,c.result)):H(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||C}function na(c){let v=c.position,S=!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&&(_e(c,!0,-1),P=c.input.charCodeAt(c.position),!(c.lineIndent>0||P!==37));){S=!0,P=c.input.charCodeAt(++c.position);let x=c.position;for(;P!==0&&!V(P);)P=c.input.charCodeAt(++c.position);let O=c.input.slice(x,c.position),h=[];for(O.length<1&&H(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&&!R(P));break}if(R(P))break;for(x=c.position;P!==0&&!V(P);)P=c.input.charCodeAt(++c.position);h.push(c.input.slice(x,c.position))}P!==0&&Vr(c),s.call(Ji,O)?Ji[O](c,O,h):Mr(c,'unknown document directive "'+O+'"')}if(_e(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,_e(c,!0,-1)):S&&H(c,"directives end mark is expected"),Mt(c,c.lineIndent-1,f,!1,!0),_e(c,!0,-1),c.checkLineBreaks&&y.test(c.input.slice(v,c.position))&&Mr(c,"non-ASCII line breaks are interpreted as content"),c.documents.push(c.result),c.position===c.lineStart&&Lr(c)){c.input.charCodeAt(c.position)===46&&(c.position+=3,_e(c,!0,-1));return}c.position<c.length-1&&H(c,"end of the stream or a document separator is expected")}function ro(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 S=new ue(c,v),P=c.indexOf("\0");for(P!==-1&&(S.position=P,H(S,"null byte is not allowed in input")),S.input+="\0";S.input.charCodeAt(S.position)===32;)S.lineIndent+=1,S.position+=1;for(;S.position<S.length-1;)na(S);return S.documents}function no(c,v,S){v!==null&&typeof v=="object"&&typeof S>"u"&&(S=v,v=null);let P=ro(c,S);if(typeof v!="function")return P;for(let x=0,O=P.length;x<O;x+=1)v(P[x])}function ia(c,v){let S=ro(c,v);if(S.length!==0){if(S.length===1)return S[0];throw new n("expected a single document in the stream, but found more")}}e.exports.loadAll=no,e.exports.load=ia})),gw=me(((t,e)=>{var r=Nn(),n=Mn(),i=sa(),o=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,l=9,u=10,f=13,p=32,d=33,m=34,g=35,y=37,w=38,b=39,M=42,k=44,R=45,T=58,V=61,z=62,ie=63,we=64,be=91,Re=93,$e=96,Ge=123,Je=124,Y=125,ue={};ue[0]="\\0",ue[7]="\\a",ue[8]="\\b",ue[9]="\\t",ue[10]="\\n",ue[11]="\\v",ue[12]="\\f",ue[13]="\\r",ue[27]="\\e",ue[34]='\\"',ue[92]="\\\\",ue[133]="\\N",ue[160]="\\_",ue[8232]="\\L",ue[8233]="\\P";var Gi=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],H=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Mr(h,$){if($===null)return{};let N={},C=Object.keys($);for(let E=0,A=C.length;E<A;E+=1){let I=C[E],q=String($[I]);I.slice(0,2)==="!!"&&(I="tag:yaml.org,2002:"+I.slice(2));let D=h.compiledTypeMap.fallback[I];D&&s.call(D.styleAliases,q)&&(q=D.styleAliases[q]),N[I]=q}return N}function Rt(h){let $,N,C=h.toString(16).toUpperCase();if(h<=255)$="x",N=2;else if(h<=65535)$="u",N=4;else if(h<=4294967295)$="U",N=8;else throw new n("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+$+r.repeat("0",N-C.length)+C}var Zs=1,ar=2;function ea(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=Mr(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==='"'?ar:Zs,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 In(h,$){let N=r.repeat(" ",$),C=0,E="",A=h.length;for(;C<A;){let I,q=h.indexOf(`
|
|
18
|
+
`,C);q===-1?(I=h.slice(C),C=A):(I=h.slice(C,q+1),C=q+1),I.length&&I!==`
|
|
19
19
|
`&&(E+=N),E+=I}return E}function Or(h,$){return`
|
|
20
|
-
`+r.repeat(" ",h.indent*$)}function
|
|
21
|
-
`;return N+(
|
|
20
|
+
`+r.repeat(" ",h.indent*$)}function Ji(h,$){for(let N=0,C=h.implicitTypes.length;N<C;N+=1)if(h.implicitTypes[N].resolve($))return!0;return!1}function et(h){return h===p||h===l}function Jt(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 Tt(h){return Jt(h)&&h!==a&&h!==f&&h!==u}function Vr(h,$,N){let C=Tt(h),E=C&&!et(h);return(N?C:C&&h!==k&&h!==be&&h!==Re&&h!==Ge&&h!==Y)&&h!==g&&!($===T&&!E)||Tt($)&&!et($)&&h===g||$===T&&E}function _e(h){return Jt(h)&&h!==a&&!et(h)&&h!==R&&h!==ie&&h!==T&&h!==k&&h!==be&&h!==Re&&h!==Ge&&h!==Y&&h!==g&&h!==w&&h!==M&&h!==d&&h!==Je&&h!==V&&h!==z&&h!==b&&h!==m&&h!==y&&h!==we&&h!==$e}function Lr(h){return!et(h)&&h!==T}function At(h,$){let N=h.charCodeAt($),C;return N>=55296&&N<=56319&&$+1<h.length&&(C=h.charCodeAt($+1),C>=56320&&C<=57343)?(N-55296)*1024+C-56320+65536:N}function Ki(h){return/^\n* /.test(h)}var Yi=1,Rn=2,Xi=3,Qi=4,Nt=5;function Zi(h,$,N,C,E,A,I,q){let D,G=0,J=null,oe=!1,xe=!1,np=C!==-1,Tn=-1,An=_e(At(h,0))&&Lr(At(h,h.length-1));if($||I)for(D=0;D<h.length;G>=65536?D+=2:D++){if(G=At(h,D),!Jt(G))return Nt;An=An&&Vr(G,J,q),J=G}else{for(D=0;D<h.length;G>=65536?D+=2:D++){if(G=At(h,D),G===u)oe=!0,np&&(xe=xe||D-Tn-1>C&&h[Tn+1]!==" ",Tn=D);else if(!Jt(G))return Nt;An=An&&Vr(G,J,q),J=G}xe=xe||np&&D-Tn-1>C&&h[Tn+1]!==" "}return!oe&&!xe?An&&!I&&!E(h)?Yi:A===ar?Nt:Rn:N>9&&Ki(h)?Nt:I?A===ar?Nt:Rn:xe?Qi:Xi}function ta(h,$,N,C,E){h.dump=(function(){if($.length===0)return h.quotingType===ar?'""':"''";if(!h.noCompatMode&&(Gi.indexOf($)!==-1||H.test($)))return h.quotingType===ar?'"'+$+'"':"'"+$+"'";let A=h.indent*Math.max(1,N),I=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-A),q=C||h.flowLevel>-1&&N>=h.flowLevel;function D(G){return Ji(h,G)}switch(Zi($,q,h.indent,I,D,h.quotingType,h.forceQuotes&&!C,E)){case Yi:return $;case Rn:return"'"+$.replace(/'/g,"''")+"'";case Xi:return"|"+eo($,h.indent)+to(In($,A));case Qi:return">"+eo($,h.indent)+to(In(ra($,I),A));case Nt:return'"'+na($,I)+'"';default:throw new n("impossible error: invalid scalar style")}})()}function eo(h,$){let N=Ki(h)?String($):"",C=h[h.length-1]===`
|
|
21
|
+
`;return N+(C&&(h[h.length-2]===`
|
|
22
22
|
`||h===`
|
|
23
|
-
`)?"+":
|
|
24
|
-
`}function
|
|
25
|
-
`?h.slice(0,-1):h}function
|
|
23
|
+
`)?"+":C?"":"-")+`
|
|
24
|
+
`}function to(h){return h[h.length-1]===`
|
|
25
|
+
`?h.slice(0,-1):h}function ra(h,$){let N=/(\n+)([^\n]*)/g,C=(function(){let q=h.indexOf(`
|
|
26
26
|
`);return q=q!==-1?q:h.length,N.lastIndex=q,Mt(h.slice(0,q),$)})(),E=h[0]===`
|
|
27
|
-
`||h[0]===" ",
|
|
28
|
-
`:"")+Mt(D,$),E=
|
|
29
|
-
`+h.slice(E,
|
|
27
|
+
`||h[0]===" ",A,I;for(;I=N.exec(h);){let q=I[1],D=I[2];A=D[0]===" ",C+=q+(!E&&!A&&D!==""?`
|
|
28
|
+
`:"")+Mt(D,$),E=A}return C}function Mt(h,$){if(h===""||h[0]===" ")return h;let N=/ [^ ]/g,C,E=0,A,I=0,q=0,D="";for(;C=N.exec(h);)q=C.index,q-E>$&&(A=I>E?I:q,D+=`
|
|
29
|
+
`+h.slice(E,A),E=A+1),I=q;return D+=`
|
|
30
30
|
`,h.length-E>$&&I>E?D+=h.slice(E,I)+`
|
|
31
|
-
`+h.slice(I+1):D+=h.slice(E),D.slice(1)}function
|
|
32
|
-
`:""}e.exports.dump=O})),_p=fw(me(((t,e)=>{var r=hw(),n=mw();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=Fe(),e.exports.Schema=op(),e.exports.FAILSAFE_SCHEMA=up(),e.exports.JSON_SCHEMA=hp(),e.exports.CORE_SCHEMA=mp(),e.exports.DEFAULT_SCHEMA=oa(),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=n.dump,e.exports.YAMLException=Mn(),e.exports.types={binary:vp(),float:dp(),map:lp(),null:cp(),pairs:bp(),set:$p(),timestamp:gp(),bool:pp(),int:fp(),merge:yp(),omap:wp(),seq:ap(),str:sp()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:fI,Schema:dI,FAILSAFE_SCHEMA:hI,JSON_SCHEMA:mI,CORE_SCHEMA:gI,DEFAULT_SCHEMA:yI,load:vI,loadAll:wI,dump:bI,YAMLException:$I,types:_I,safeLoad:xI,safeLoadAll:SI,safeDump:kI}=_p.default,ht=_p.default});import{access as PI,readFile as xp}from"node:fs/promises";import{dirname as gw,relative as RI,resolve as Pe}from"node:path";async function Jt(t){let e=Pe(t),r=await xp(e,"utf-8"),n=ht.load(r);return yw(e,n)}function yw(t,e){let r=Te(t);return{...e,openapi:Pe(r,e.openapi),bindings:Pe(r,e.bindings),microContractsConfig:Pe(r,e.microContractsConfig),viewsDir:Pe(r,e.viewsDir),generated:{contractDir:Pe(r,e.generated.contractDir),actions:Pe(r,e.generated.actions),bridge:Pe(r,e.generated.bridge),reactDir:Pe(r,e.generated.reactDir)},runtimeModule:e.runtimeModule?Pe(r,e.runtimeModule):e.componentsModule?Pe(r,e.componentsModule):void 0,themeModule:e.themeModule?Pe(r,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?Pe(r,e.design.tokens):void 0,theme:e.design.theme?Pe(r,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?Pe(r,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?Pe(r,e.extensions):void 0}}async function Sp(t){let e=await xp(Pe(t),"utf-8");return ht.load(e)}function Te(t){return gw(Pe(t))}function ro(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 Ot=X(()=>{"use strict";Dr()});import{readFileSync as vw}from"node:fs";import{createRequire as ww}from"node:module";import{dirname as sa,resolve as bw}from"node:path";import{fileURLToPath as $w}from"node:url";function Ee(){if(qr)return qr;let t=ww(import.meta.url);try{return qr=sa(t.resolve("view-contracts/package.json")),qr}catch{let e=sa($w(import.meta.url));for(;;){try{let n=bw(e,"package.json");if(JSON.parse(vw(n,"utf8")).name==="view-contracts")return qr=e,qr}catch{}let r=sa(e);if(r===e)break;e=r}throw new Error("view-contracts package root not found")}}var qr,Vt=X(()=>{"use strict"});function kp(t){return io[t]?.properties??[]}function Cp(t,e){let r=io[e];return r?r.properties.includes(t):!1}var no,io,st,Fr,jI,mt=X(()=>{"use strict";no={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"}},io={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"}}},st=new Set(Object.keys(io)),Fr=new Set(Object.entries(no).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),jI=new Set(Object.entries(no).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});import{readFile as _w}from"node:fs/promises";async function Br(t){return ht.load(await _w(t,"utf-8"))}function oo(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 Ep(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 so=X(()=>{"use strict";Dr()});import{resolve as xw}from"node:path";function Sw(t){oo(Object.keys(t.elements),st,Pp),Ep(t.elements,["tag"],Pp)}async function la(t){if(!t&&aa)return aa;let e=t??xw(Ee(),"renderers/react/elements.yaml"),r=await Br(e);return Sw(r),t||(aa=r),r}var Pp,aa,Ip=X(()=>{"use strict";mt();mt();Vt();so();Pp="renderers/react/elements.yaml",aa=null});function Rp(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function Tp(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 Ap=X(()=>{"use strict"});function gt(t){return`${t}px`}function Hr(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function ua(t){let e={},r=t.width;typeof r=="number"?e.width=gt(r):r==="fill"?e.width="100%":typeof r=="string"&&r!=="wrap"&&(e.width=r),typeof t.minWidth=="number"&&(e.minWidth=gt(t.minWidth));let n=t.maxWidth;typeof n=="number"?e.maxWidth=gt(n):n==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=gt(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=gt(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=gt(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=gt(t.padding)),typeof t.margin=="number"&&(e.margin=gt(t.margin)),typeof t.gap=="number"&&(e.gap=gt(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 Np&&(e.placeItems=Np[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 f=t.size;typeof f=="number"?e.fontSize=gt(f):typeof f=="string"&&(e.fontSize=f);let p=typeof s=="string"?s:t.fontWeight;typeof p=="string"&&(e.fontWeight=p);let d=t.background;typeof d=="string"&&(e.background=Hr(d)??d);let m=t.foreground;typeof m=="string"&&(e.color=Hr(m)??m);let g=t.radius;typeof g=="number"?e.borderRadius=gt(g):typeof g=="string"&&(e.borderRadius=Hr(g)??g);let y=t.shadow;y===!0?e.boxShadow="var(--ui-shadow)":y===!1?e.boxShadow="none":typeof y=="string"&&(e.boxShadow=kw[y]??Hr(y)??y);let b=t.border;typeof b=="string"&&(e.border=Hr(b)??b),typeof t.opacity=="number"&&(e.opacity=t.opacity);let v=t.clip;typeof v=="string"&&(e.overflow=v==="hidden"?"hidden":v);let M=t.align;if(typeof M=="string"){let V=Rp(M);V&&(e.alignItems=V)}let C=t.justify;if(typeof C=="string"){let V=Tp(C);V&&(e.justifyContent=V)}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 R=t.borderColor;typeof R=="string"&&(e.borderColor=Hr(R)??R);let A=t.flex;return typeof A=="number"&&(e.flex=A),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 Np,kw,ca=X(()=>{"use strict";Ap();Np={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"},kw={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 ao(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 Cw(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 Ew(t){let e={};for(let[r,n]of Object.entries(t)){if(!Fr.has(r))continue;Cw(r,n);let i=ao(t,r);i!==void 0&&(e[r]=i)}return e}function Pw(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function Iw(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 Mp(t,e){let r=Ew(e),n=ua(r);if(n={...n,...Pw(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=ao(e,"scroll"),o=ao(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return n={...n,...Iw(s)},On(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=ao(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 Op=X(()=>{"use strict";mt();ca();ca()});function K(t){return" ".repeat(t)}function cr(t,e="vm"){let r=t.scope??e;return t.path?`${r}.${t.path}`:r}function qp(t){return t.parts.map(e=>typeof e=="string"?e:`\${${cr(e)}}`).join("")}function Rw(t){return`\`${qp(t)}\``}function lo(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}: ${pr(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${n} } }${r}`}function fa(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=>`${K(e+1)}${
|
|
31
|
+
`+h.slice(I+1):D+=h.slice(E),D.slice(1)}function na(h){let $="",N=0;for(let C=0;C<h.length;N>=65536?C+=2:C++){N=At(h,C);let E=ue[N];!E&&Jt(N)?($+=h[C],N>=65536&&($+=h[C+1])):$+=E||Rt(N)}return $}function ro(h,$,N){let C="",E=h.tag;for(let A=0,I=N.length;A<I;A+=1){let q=N[A];h.replacer&&(q=h.replacer.call(N,String(A),q)),(S(h,$,q,!1,!1)||typeof q>"u"&&S(h,$,null,!1,!1))&&(C!==""&&(C+=","+(h.condenseFlow?"":" ")),C+=h.dump)}h.tag=E,h.dump="["+C+"]"}function no(h,$,N,C){let E="",A=h.tag;for(let I=0,q=N.length;I<q;I+=1){let D=N[I];h.replacer&&(D=h.replacer.call(N,String(I),D)),(S(h,$+1,D,!0,!0,!1,!0)||typeof D>"u"&&S(h,$+1,null,!0,!0,!1,!0))&&((!C||E!=="")&&(E+=Or(h,$)),h.dump&&u===h.dump.charCodeAt(0)?E+="-":E+="- ",E+=h.dump)}h.tag=A,h.dump=E||"[]"}function ia(h,$,N){let C="",E=h.tag,A=Object.keys(N);for(let I=0,q=A.length;I<q;I+=1){let D="";C!==""&&(D+=", "),h.condenseFlow&&(D+='"');let G=A[I],J=N[G];h.replacer&&(J=h.replacer.call(N,G,J)),S(h,$,G,!1,!1)&&(h.dump.length>1024&&(D+="? "),D+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),S(h,$,J,!1,!1)&&(D+=h.dump,C+=D))}h.tag=E,h.dump="{"+C+"}"}function c(h,$,N,C){let E="",A=h.tag,I=Object.keys(N);if(h.sortKeys===!0)I.sort();else if(typeof h.sortKeys=="function")I.sort(h.sortKeys);else if(h.sortKeys)throw new n("sortKeys must be a boolean or a function");for(let q=0,D=I.length;q<D;q+=1){let G="";(!C||E!=="")&&(G+=Or(h,$));let J=I[q],oe=N[J];if(h.replacer&&(oe=h.replacer.call(N,J,oe)),!S(h,$+1,J,!0,!0,!0))continue;let xe=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;xe&&(h.dump&&u===h.dump.charCodeAt(0)?G+="?":G+="? "),G+=h.dump,xe&&(G+=Or(h,$)),S(h,$+1,oe,!0,xe)&&(h.dump&&u===h.dump.charCodeAt(0)?G+=":":G+=": ",G+=h.dump,E+=G)}h.tag=A,h.dump=E||"{}"}function v(h,$,N){let C=N?h.explicitTypes:h.implicitTypes;for(let E=0,A=C.length;E<A;E+=1){let I=C[E];if((I.instanceOf||I.predicate)&&(!I.instanceOf||typeof $=="object"&&$ instanceof I.instanceOf)&&(!I.predicate||I.predicate($))){if(N?I.multi&&I.representName?h.tag=I.representName($):h.tag=I.tag:h.tag="?",I.represent){let q=h.styleMap[I.tag]||I.defaultStyle,D;if(o.call(I.represent)==="[object Function]")D=I.represent($,q);else if(s.call(I.represent,q))D=I.represent[q]($,q);else throw new n("!<"+I.tag+'> tag resolver accepts not "'+q+'" style');h.dump=D}return!0}}return!1}function S(h,$,N,C,E,A,I){h.tag=null,h.dump=N,v(h,N,!1)||v(h,N,!0);let q=o.call(h.dump),D=C;C&&(C=h.flowLevel<0||h.flowLevel>$);let G=q==="[object Object]"||q==="[object Array]",J,oe;if(G&&(J=h.duplicates.indexOf(N),oe=J!==-1),(h.tag!==null&&h.tag!=="?"||oe||h.indent!==2&&$>0)&&(E=!1),oe&&h.usedDuplicates[J])h.dump="*ref_"+J;else{if(G&&oe&&!h.usedDuplicates[J]&&(h.usedDuplicates[J]=!0),q==="[object Object]")C&&Object.keys(h.dump).length!==0?(c(h,$,h.dump,E),oe&&(h.dump="&ref_"+J+h.dump)):(ia(h,$,h.dump),oe&&(h.dump="&ref_"+J+" "+h.dump));else if(q==="[object Array]")C&&h.dump.length!==0?(h.noArrayIndent&&!I&&$>0?no(h,$-1,h.dump,E):no(h,$,h.dump,E),oe&&(h.dump="&ref_"+J+h.dump)):(ro(h,$,h.dump),oe&&(h.dump="&ref_"+J+" "+h.dump));else if(q==="[object String]")h.tag!=="?"&&ta(h,h.dump,$,A,D);else{if(q==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new n("unacceptable kind of an object to dump "+q)}if(h.tag!==null&&h.tag!=="?"){let xe=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?xe="!"+xe:xe.slice(0,18)==="tag:yaml.org,2002:"?xe="!!"+xe.slice(18):xe="!<"+xe+">",h.dump=xe+" "+h.dump}}return!0}function P(h,$){let N=[],C=[];x(h,N,C);let E=C.length;for(let A=0;A<E;A+=1)$.duplicates.push(N[C[A]]);$.usedDuplicates=new Array(E)}function x(h,$,N){if(h!==null&&typeof h=="object"){let C=$.indexOf(h);if(C!==-1)N.indexOf(C)===-1&&N.push(C);else if($.push(h),Array.isArray(h))for(let E=0,A=h.length;E<A;E+=1)x(h[E],$,N);else{let E=Object.keys(h);for(let A=0,I=E.length;A<I;A+=1)x(h[E[A]],$,N)}}}function O(h,$){$=$||{};let N=new ea($);N.noRefs||P(h,N);let C=h;return N.replacer&&(C=N.replacer.call({"":C},"",C)),S(N,0,C,!0,!0)?N.dump+`
|
|
32
|
+
`:""}e.exports.dump=O})),_p=dw(me(((t,e)=>{var r=mw(),n=gw();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=Fe(),e.exports.Schema=sp(),e.exports.FAILSAFE_SCHEMA=cp(),e.exports.JSON_SCHEMA=mp(),e.exports.CORE_SCHEMA=gp(),e.exports.DEFAULT_SCHEMA=sa(),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.dump=n.dump,e.exports.YAMLException=Mn(),e.exports.types={binary:wp(),float:hp(),map:up(),null:pp(),pairs:$p(),set:xp(),timestamp:yp(),bool:fp(),int:dp(),merge:vp(),omap:bp(),seq:lp(),str:ap()},e.exports.safeLoad=i("safeLoad","load"),e.exports.safeLoadAll=i("safeLoadAll","loadAll"),e.exports.safeDump=i("safeDump","dump")}))(),1),{Type:gI,Schema:yI,FAILSAFE_SCHEMA:vI,JSON_SCHEMA:wI,CORE_SCHEMA:bI,DEFAULT_SCHEMA:$I,load:xI,loadAll:_I,dump:SI,YAMLException:kI,types:CI,safeLoad:EI,safeLoadAll:PI,safeDump:II}=_p.default,ht=_p.default});import{access as AI,readFile as Sp}from"node:fs/promises";import{dirname as yw,relative as MI,resolve as Pe}from"node:path";async function Kt(t){let e=Pe(t),r=await Sp(e,"utf-8"),n=ht.load(r);return vw(e,n)}function vw(t,e){let r=Te(t);return{...e,openapi:Pe(r,e.openapi),bindings:Pe(r,e.bindings),microContractsConfig:Pe(r,e.microContractsConfig),viewsDir:Pe(r,e.viewsDir),generated:{contractDir:Pe(r,e.generated.contractDir),actions:Pe(r,e.generated.actions),bridge:Pe(r,e.generated.bridge),reactDir:Pe(r,e.generated.reactDir)},runtimeModule:e.runtimeModule?Pe(r,e.runtimeModule):e.componentsModule?Pe(r,e.componentsModule):void 0,themeModule:e.themeModule?Pe(r,e.themeModule):void 0,design:e.design?{tokens:e.design.tokens?Pe(r,e.design.tokens):void 0,theme:e.design.theme?Pe(r,e.design.theme):void 0,extensionsCss:e.design.extensionsCss?Pe(r,e.design.extensionsCss):void 0}:void 0,extensions:e.extensions?Pe(r,e.extensions):void 0}}async function kp(t){let e=await Sp(Pe(t),"utf-8");return ht.load(e)}function Te(t){return yw(Pe(t))}function io(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 Ot=X(()=>{"use strict";Dr()});import{readFileSync as ww}from"node:fs";import{createRequire as bw}from"node:module";import{dirname as aa,resolve as $w}from"node:path";import{fileURLToPath as xw}from"node:url";function Ee(){if(qr)return qr;let t=bw(import.meta.url);try{return qr=aa(t.resolve("view-contracts/package.json")),qr}catch{let e=aa(xw(import.meta.url));for(;;){try{let n=$w(e,"package.json");if(JSON.parse(ww(n,"utf8")).name==="view-contracts")return qr=e,qr}catch{}let r=aa(e);if(r===e)break;e=r}throw new Error("view-contracts package root not found")}}var qr,Vt=X(()=>{"use strict"});function Cp(t){return so[t]?.properties??[]}function Ep(t,e){let r=so[e];return r?r.properties.includes(t):!1}var oo,so,st,Fr,BI,mt=X(()=>{"use strict";oo={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:"identity",lowering:"attribute",description:"Form field name (for FormData) or icon token 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"},inputType:{type:"string",category:"interaction",lowering:"attribute",enum:"inputType",description:"HTML input type variant (text, password, email, url, tel)"},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"}},so={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","name","value","binding","placeholder","onChange","error","help","keyboardType","inputType","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","name","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","name","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"}}},st=new Set(Object.keys(so)),Fr=new Set(Object.entries(oo).filter(([,t])=>t.lowering==="inline-css").map(([t])=>t)),BI=new Set(Object.entries(oo).filter(([,t])=>t.lowering==="class-name").map(([t])=>t))});import{readFile as _w}from"node:fs/promises";async function Br(t){return ht.load(await _w(t,"utf-8"))}function ao(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 Pp(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 lo=X(()=>{"use strict";Dr()});import{resolve as Sw}from"node:path";function kw(t){ao(Object.keys(t.elements),st,Ip),Pp(t.elements,["tag"],Ip)}async function ua(t){if(!t&&la)return la;let e=t??Sw(Ee(),"renderers/react/elements.yaml"),r=await Br(e);return kw(r),t||(la=r),r}var Ip,la,Rp=X(()=>{"use strict";mt();mt();Vt();lo();Ip="renderers/react/elements.yaml",la=null});function Tp(t){if(t)return t==="start"?"flex-start":t==="end"?"flex-end":t}function Ap(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 Np=X(()=>{"use strict"});function gt(t){return`${t}px`}function Hr(t){let e=t.match(/^\{([^}]+)\}$/);if(e)return`var(--${e[1].replace(/\./g,"-")})`}function ca(t){let e={},r=t.width;typeof r=="number"?e.width=gt(r):r==="fill"?e.width="100%":typeof r=="string"&&r!=="wrap"&&(e.width=r),typeof t.minWidth=="number"&&(e.minWidth=gt(t.minWidth));let n=t.maxWidth;typeof n=="number"?e.maxWidth=gt(n):n==="fill"&&(e.maxWidth="100%");let i=t.height;typeof i=="number"?e.height=gt(i):i==="fill"?e.height="100%":typeof i=="string"&&i!=="wrap"&&(e.height=i),typeof t.minHeight=="number"&&(e.minHeight=gt(t.minHeight));let o=t.maxHeight;typeof o=="number"?e.maxHeight=gt(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=gt(t.padding)),typeof t.margin=="number"&&(e.margin=gt(t.margin)),typeof t.gap=="number"&&(e.gap=gt(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 Mp&&(e.placeItems=Mp[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 f=t.size;typeof f=="number"?e.fontSize=gt(f):typeof f=="string"&&(e.fontSize=f);let p=typeof s=="string"?s:t.fontWeight;typeof p=="string"&&(e.fontWeight=p);let d=t.background;typeof d=="string"&&(e.background=Hr(d)??d);let m=t.foreground;typeof m=="string"&&(e.color=Hr(m)??m);let g=t.radius;typeof g=="number"?e.borderRadius=gt(g):typeof g=="string"&&(e.borderRadius=Hr(g)??g);let y=t.shadow;y===!0?e.boxShadow="var(--ui-shadow)":y===!1?e.boxShadow="none":typeof y=="string"&&(e.boxShadow=Cw[y]??Hr(y)??y);let w=t.border;typeof w=="string"&&(e.border=Hr(w)??w),typeof t.opacity=="number"&&(e.opacity=t.opacity);let b=t.clip;typeof b=="string"&&(e.overflow=b==="hidden"?"hidden":b);let M=t.align;if(typeof M=="string"){let V=Tp(M);V&&(e.alignItems=V)}let k=t.justify;if(typeof k=="string"){let V=Ap(k);V&&(e.justifyContent=V)}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 R=t.borderColor;typeof R=="string"&&(e.borderColor=Hr(R)??R);let T=t.flex;return typeof T=="number"&&(e.flex=T),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 Mp,Cw,pa=X(()=>{"use strict";Np();Mp={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"},Cw={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 uo(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 Ew(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 Pw(t){let e={};for(let[r,n]of Object.entries(t)){if(!Fr.has(r))continue;Ew(r,n);let i=uo(t,r);i!==void 0&&(e[r]=i)}return e}function Iw(t){return t.flex?{display:"flex",flexDirection:t.flex==="column"?"column":"row"}:{}}function Rw(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 Op(t,e){let r=Pw(e),n=ca(r);if(n={...n,...Iw(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=uo(e,"scroll"),o=uo(e,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return n={...n,...Rw(s)},On(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(t.flexGrowProp&&e[t.flexGrowProp]){let i=uo(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 Vp=X(()=>{"use strict";mt();pa();pa()});function K(t){return" ".repeat(t)}function cr(t,e="vm"){let r=t.scope??e;return t.path?`${r}.${t.path}`:r}function Fp(t){return t.parts.map(e=>typeof e=="string"?e:`\${${cr(e)}}`).join("")}function Tw(t){return`\`${Fp(t)}\``}function co(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}: ${pr(o,0)}`).join(", ");return`{ name: ${JSON.stringify(t.name)}, params: { ${n} } }${r}`}function da(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=>`${K(e+1)}${da(n,e+1,r)}`).join(`,
|
|
34
34
|
`)}
|
|
35
|
-
${K(e)}]`;if(typeof t=="object"&&t!==null){let n=t;return"kind"in n&&n.kind==="action"?
|
|
36
|
-
${Object.entries(n).map(([o,s])=>`${o}: ${
|
|
35
|
+
${K(e)}]`;if(typeof t=="object"&&t!==null){let n=t;return"kind"in n&&n.kind==="action"?co(n,r):`{
|
|
36
|
+
${Object.entries(n).map(([o,s])=>`${o}: ${da(s,e+1,r)}`).map(o=>`${K(e+1)}${o}`).join(`,
|
|
37
37
|
`)}
|
|
38
38
|
${K(e)}}`}return"undefined"}function pr(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
39
|
${t.map(n=>`${K(e+1)}${pr(n,e+1,r)}`).join(`,
|
|
40
40
|
`)}
|
|
41
|
-
${K(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return cr(t);if(t.kind==="action")return
|
|
42
|
-
`)}function
|
|
43
|
-
${K(e+1)}<input type="checkbox" name={${r}} ${i} ${o} />
|
|
41
|
+
${K(e)}]`;if(typeof t=="object"&&t!==null&&"kind"in t){if(t.kind==="binding")return cr(t);if(t.kind==="action")return co(t,r);if(t.kind==="literal")return da(t.value,e,r);if(t.kind==="concat")return Tw(t)}return"undefined"}function Wr(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 pr(r,0)}function Ln(t,e,r){let n=Op(e,r);n&&t.push(n)}function Aw(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=co(r,!0);return e==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${n}); }}`:`onClick={() => { void dispatchAction(${n}); }}`}function Dn(t,e="e.target.value"){let r=t.onChange;if(!r||typeof r!="object"||!("kind"in r)||r.kind!=="action")return;let n=r;if(!n.params||Object.keys(n.params).length===0)return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(n.name)}, params: { value: ${e} } } as ActionDescriptor); }}`;let i=Object.entries(n.params).map(([o,s])=>`${o}: ${pr(s,0)}`).join(", ");return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(n.name)}, params: { ${i}, value: ${e} } } as ActionDescriptor); }}`}function fa(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Nw(t,e){let r=Wr(e,"variant");if(typeof r=="string")return` vc-${fa(t)}--${r}`;let n=e.variant;if(n&&typeof n=="object"&&"kind"in n&&n.kind==="concat")return` vc-${fa(t)}--${Fp(n)}`;let i=W(e,"variant");if(i)return` vc-${fa(t)}--\${${i}}`}function jn(t,e,r){let n=e.className??"",i=Nw(t,r);if(i)return typeof Wr(r,"variant")=="string"?`className="${n}${i}"`:`className={\`${n}${i}\`}`;if(e.wrapProp&&Wr(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 Lp(t,e,r){let n=Wr(e,"label"),i=Wr(e,"help"),o=Wr(e,"error"),s=W(e,"label"),a=W(e,"help"),l=W(e,"error"),u=[`${K(r)}<label className="vc-field">`];return typeof n=="string"?u.push(`${K(r+1)}<span className="vc-text vc-text--field-label">{${JSON.stringify(n)}}</span>`):s&&u.push(`${K(r+1)}{${s} ? <span className="vc-text vc-text--field-label">{${s}}</span> : null}`),u.push(`${K(r+1)}${t}`),typeof i=="string"?u.push(`${K(r+1)}<span className="vc-text vc-text--field-help">{${JSON.stringify(i)}}</span>`):a&&u.push(`${K(r+1)}{${a} ? <span className="vc-text vc-text--field-help">{${a}}</span> : null}`),typeof o=="string"?u.push(`${K(r+1)}<span className="vc-text vc-text--field-error">{${JSON.stringify(o)}}</span>`):l&&u.push(`${K(r+1)}{${l} ? <span className="vc-text vc-text--field-error">{${l}}</span> : null}`),u.push(`${K(r)}</label>`),u.join(`
|
|
42
|
+
`)}function Mw(t,e){let r=W(t,"name")??'""',n=W(t,"label")??'""',i=t.enabled?`disabled={${W(t,"enabled")} === false}`:"",o=Dn(t,"e.target.checked")??"",s=t.checked?o?`checked={${W(t,"checked")}}`:`defaultChecked={${W(t,"checked")}}`:"";return`${K(e)}<label className="vc-checkbox">
|
|
43
|
+
${K(e+1)}<input type="checkbox" name={${r}} ${s} ${i} ${o} />
|
|
44
44
|
${K(e+1)}<span>{${n}}</span>
|
|
45
|
-
${K(e)}</label>`}function
|
|
46
|
-
${K(e+1)}<input type="radio" name={${r}} value={${n}} ${o} ${s} />
|
|
45
|
+
${K(e)}</label>`}function Ow(t,e){let r=W(t,"binding")??W(t,"name")??'""',n=W(t,"value")??'""',i=W(t,"label")??'""',o=t.enabled?`disabled={${W(t,"enabled")} === false}`:"",s=Dn(t,"e.target.value")??"",a=t.checked?s?`checked={${W(t,"checked")}}`:`defaultChecked={${W(t,"checked")}}`:"";return`${K(e)}<label className="vc-radio">
|
|
46
|
+
${K(e+1)}<input type="radio" name={${r}} value={${n}} ${a} ${o} ${s} />
|
|
47
47
|
${K(e+1)}<span>{${i}}</span>
|
|
48
|
-
${K(e)}</label>`}function
|
|
49
|
-
${K(e+1)}<input type="checkbox" role="switch" name={${r}} ${i} ${o} />
|
|
48
|
+
${K(e)}</label>`}function Vw(t,e){let r=W(t,"binding")??W(t,"name")??'""',n=W(t,"label")??'""',i=t.enabled?`disabled={${W(t,"enabled")} === false}`:"",o=Dn(t,"e.target.checked")??"",s=t.checked?o?`checked={${W(t,"checked")}}`:`defaultChecked={${W(t,"checked")}}`:"";return`${K(e)}<label className="vc-switch">
|
|
49
|
+
${K(e+1)}<input type="checkbox" role="switch" name={${r}} ${s} ${i} ${o} />
|
|
50
50
|
${K(e+1)}<span>{${n}}</span>
|
|
51
|
-
${K(e)}</label>`}function
|
|
52
|
-
`);let n=pr(r,0);return`${K(e+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function
|
|
51
|
+
${K(e)}</label>`}function Lw(t,e,r){let n=t.props;if(n.alt!==void 0){let s=[jn(t.name,e,n),`src={${W(n,"name")??'""'}}`,`alt={${W(n,"alt")??'""'}}`];return Ln(s,e,n),n.id&&s.push(`id={${W(n,"id")}}`),`${K(r)}<img ${s.join(" ")} />`}let o=[jn(t.name,e,n),"aria-hidden"];return Ln(o,e,n),n.id&&o.push(`id={${W(n,"id")}}`),n.name&&o.push(`data-icon={${W(n,"name")}}`),`${K(r)}<span ${o.join(" ")} />`}function jp(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=>`${K(e+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
|
|
52
|
+
`);let n=pr(r,0);return`${K(e+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function Dp(t,e,r,n){let i=[jn(t,e,r)];Ln(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,"inputType")??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"}}`);let o=Dn(r);return o?(r.value&&e.tag!=="progress"&&i.push(`value={${W(r,"value")}}`),i.push(o)):r.value&&e.tag!=="progress"&&i.push(`defaultValue={${W(r,"value")}}`),`${K(n)}<${e.tag} ${i.join(" ")} />`}function qp(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=Aw(r,e.actionEvent);o&&i.push(o)}if(r.name&&i.push(`name={${W(r,"name")}}`),e.tag==="select"||e.tag==="textarea"||e.tag==="input"){r.required&&i.push(`required={${W(r,"required")}}`),r.enabled&&i.push(`disabled={${W(r,"enabled")} === false}`);let o=Dn(r);o?(r.value&&i.push(`value={${W(r,"value")}}`),i.push(o)):r.value&&i.push(`defaultValue={${W(r,"value")}}`)}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(jn(t,e,r)),Ln(i,e,r),`<${n} ${i.join(" ")}`}function Lt(t,e,r){if(e.visible===void 0)return t;let n=W(e,"visible");return`${K(r)}{${n} !== false ? (
|
|
53
53
|
${t}
|
|
54
|
-
${K(r)}) : null}`}function
|
|
55
|
-
`)}function
|
|
54
|
+
${K(r)}) : null}`}function ha(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?`${K(e)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${K(e)}{${cr(s,i)}}`:s.kind==="map"?jw(s,e,r):s.kind==="fragment"?ha(s.children,e,r,n):r(s,e,n)}).filter(Boolean).join(`
|
|
55
|
+
`)}function jw(t,e,r){let n=t.item,i=r(t.body,e+1,n);if(t.key){let o=` key={${cr(t.key,n)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${K(e)}{${cr(t.source)}.map((${n}) => (
|
|
56
56
|
${i}
|
|
57
|
-
${K(e)}))}`}function
|
|
58
|
-
${
|
|
59
|
-
${K(r+1)}</${f}>`}else p=
|
|
60
|
-
${
|
|
57
|
+
${K(e)}))}`}function Dw(t,e,r,n,i){let o=t.props,s=ha(t.children,r+1,i,n);if(e.checkbox)return Lt(Mw(o,r),o,r);if(t.name==="Radio")return Lt(Ow(o,r),o,r);if(t.name==="Switch")return Lt(Vw(o,r),o,r);if(t.name==="Icon")return Lt(Lw(t,e,r),o,r);if(t.name==="Spinner"){let f=[jn(t.name,e,o),'aria-busy="true"'];return Ln(f,e,o),o.id&&f.push(`id={${W(o,"id")}}`),o.role?f.push(`role={${W(o,"role")}}`):e.defaultRole&&f.push(`role="${e.defaultRole}"`),Lt(`${K(r)}<div ${f.join(" ")} />`,o,r)}if(e.fieldContainer){let f=s||`${K(r+1)}<div />`;return Lt(Lp(f,o,r),o,r)}if(e.fieldWrap){let f=e.tag,p;if(e.optionsProp&&o[e.optionsProp]){let d=qp(t.name,e,o,f);p=`${K(r+1)}${d}>
|
|
58
|
+
${jp(o,r+2)}
|
|
59
|
+
${K(r+1)}</${f}>`}else p=Dp(t.name,e,o,r+1);return Lt(Lp(p,o,r),o,r)}let a=e.tag;if(e.void)return Lt(Dp(t.name,e,o,r),o,r);let l=qp(t.name,e,o,a),u;return!s&&e.optionsProp&&o[e.optionsProp]?u=`${K(r)}${l}>
|
|
60
|
+
${jp(o,r+1)}
|
|
61
61
|
${K(r)}</${a}>`:s?u=`${K(r)}${l}>
|
|
62
62
|
${s}
|
|
63
|
-
${K(r)}</${a}>`:u=`${K(r)}${l} />`,Lt(u,o,r)}function
|
|
63
|
+
${K(r)}</${a}>`:u=`${K(r)}${l} />`,Lt(u,o,r)}function qw(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}={${cr(i,r)}}`:`${n}={${pr(i,0)}}`).join(" ")}function Fw(t,e,r){let n=qw(t.props,r),i=n?` ${n}`:"";return`${K(e)}<${t.name}${i} />`}function Bw(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}={${co(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${cr(i,r)}}`:n==="children"?"":`${n}={${pr(i,0,n==="columns")}}`).join(" ")}function Hw(t,e,r,n){let i=Bw(t.props,r),o=i?` ${i}`:"",s=ha(t.children,e+1,n,r);return s?`${K(e)}<${t.name}${o}>
|
|
64
64
|
${s}
|
|
65
|
-
${K(e)}</${t.name}>`:`${K(e)}<${t.name}${o} />`}function Bp(t,e,r){return t in e.elements&&!r.includes(t)}function Vn(t,e){if(t.kind==="viewRef"){e.add(t.name);return}if(t.kind==="component"){for(let r of t.children)Vn(r,e);return}if(t.kind==="map"&&Vn(t.body,e),t.kind==="fragment")for(let r of t.children)Vn(r,e)}function ur(t,e,r,n){if(t.kind==="component"){Bp(t.name,e,r)||n.add(t.name);for(let i of t.children)ur(i,e,r,n);return}if(t.kind==="map"&&ur(t.body,e,r,n),t.kind==="fragment")for(let i of t.children)ur(i,e,r,n)}function Hp(t,e){let r=(n,i,o)=>n.kind==="viewRef"?
|
|
65
|
+
${K(e)}</${t.name}>`:`${K(e)}<${t.name}${o} />`}function Bp(t,e,r){return t in e.elements&&!r.includes(t)}function Vn(t,e){if(t.kind==="viewRef"){e.add(t.name);return}if(t.kind==="component"){for(let r of t.children)Vn(r,e);return}if(t.kind==="map"&&Vn(t.body,e),t.kind==="fragment")for(let r of t.children)Vn(r,e)}function ur(t,e,r,n){if(t.kind==="component"){Bp(t.name,e,r)||n.add(t.name);for(let i of t.children)ur(i,e,r,n);return}if(t.kind==="map"&&ur(t.body,e,r,n),t.kind==="fragment")for(let i of t.children)ur(i,e,r,n)}function Hp(t,e){let r=(n,i,o)=>n.kind==="viewRef"?Fw(n,i,o):n.kind!=="component"?"":Bp(n.name,t,e)?Dw(n,t.elements[n.name],i,o,r):Hw(n,i,o,r);return(n,i,o)=>r(n,i,o)}var Wp=X(()=>{"use strict";Vp()});var ga={};lr(ga,{partialReactOutputPath:()=>Xw,renderReactComponent:()=>ma,renderReactFromIr:()=>Kw,renderReactPreviewBundle:()=>Yw});import{resolve as Ww}from"node:path";function zw(t){if(t.isPartial)return t.exportName;let e=t.exportName.replace(/View$/,"")||t.exportName;return e.charAt(0).toUpperCase()+e.slice(1)}function Uw(t,e){if(t.kind!=="component")throw new Error(`View IR root must be a component node (${e})`);return t}function Up(t){if(!t)return[];let e=t.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return e?[...new Set(e)]:[]}function Gw(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 zp(t){return t.trimStart().startsWith("{")?`return (
|
|
66
66
|
<>${t}
|
|
67
67
|
</>
|
|
68
68
|
);`:`return (
|
|
69
69
|
${t}
|
|
70
|
-
);`}function
|
|
70
|
+
);`}function Jw(t){let e=t.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return e=e.replace(/^import\s[^\n]+\n/gm,""),e.trimStart()}async function Gp(t,e){let r=await ua(e.elementMapPath),n=e.allowlistExtra??[],i=zw(t),o=Uw(t.root,t.source),a=Hp(r,n)(o,2),l=new Set;ur(t.root,r,n,l);let u=[...l].sort(),f=new Set;Vn(t.root,f);let p=[...f].sort(),d=e.previewImports,m=d?.dispatch??e.runtimeImportFrom,g=d?.contracts??e.contractsImportFrom,y=d?.extensions??e.extensionsImportFrom,w=new Set;if(t.isPartial)for(let T of Up(t.propsType))w.add(T);else w.add(t.viewModel);let b=["import type { ReactElement } from 'react';"];b.push(`import { dispatchAction } from '${m}';`);let M=[...w].sort(),k=M.length>0?`${M.join(", ")}, ActionDescriptor`:"ActionDescriptor";b.push(`import type { ${k} } from '${g}';`),u.length>0&&b.push(`import { ${u.join(", ")} } from '${y}';`);for(let T of p){if(e.inlineViewRefs)continue;let V=e.viewRefImportFrom?.get(T)??`./${T}.generated.js`;b.push(`import { ${T} } from '${V}';`)}let R=d?`/**
|
|
71
71
|
* Preview module \u2014 compiled live from ${t.source}
|
|
72
72
|
* Same lowering as generated/; not written to disk.
|
|
73
73
|
*/`:`/**
|
|
74
74
|
* Auto-generated React component from ${t.source}
|
|
75
75
|
* DO NOT EDIT \u2014 regenerate with: view-contracts render react
|
|
76
|
-
*/`;if(t.isPartial){let
|
|
77
|
-
${
|
|
76
|
+
*/`;if(t.isPartial){let T=Gw(t);return`${R}
|
|
77
|
+
${b.join(`
|
|
78
78
|
`)}
|
|
79
79
|
|
|
80
|
-
export function ${i}(${
|
|
80
|
+
export function ${i}(${T}): ReactElement {
|
|
81
81
|
${zp(a)}
|
|
82
82
|
}
|
|
83
83
|
`}return`${R}
|
|
84
|
-
${
|
|
84
|
+
${b.join(`
|
|
85
85
|
`)}
|
|
86
86
|
|
|
87
87
|
export function ${i}({ vm }: { vm: ${t.viewModel} }): ReactElement {
|
|
88
88
|
${zp(a)}
|
|
89
89
|
}
|
|
90
|
-
`}async function
|
|
90
|
+
`}async function ma(t,e){return Gp(t,e)}async function Kw(t,e,r){let{writeFile:n,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await Gp(t,r);await i(o(e),{recursive:!0}),await n(e,s,"utf-8")}async function Yw(t,e,r){let n={...r,inlineViewRefs:!0},i=await Promise.all(e.map(R=>ma(R,n))),o=await ma(t,n),s=Jw,a=await ua(r.elementMapPath),l=r.allowlistExtra??[],u=new Set;ur(t.root,a,l,u);for(let R of e)ur(R.root,a,l,u);let f=r.previewImports,p=f?.dispatch??r.runtimeImportFrom,d=f?.contracts??r.contractsImportFrom,m=f?.extensions??r.extensionsImportFrom,g=new Set([t.viewModel]);for(let R of e)for(let T of Up(R.propsType))g.add(T);let y=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${p}';`,`import type { ${[...g].sort().join(", ")}, ActionDescriptor } from '${d}';`],w=[...u].sort();w.length>0&&y.push(`import { ${w.join(", ")} } from '${m}';`);let b=f?`/**
|
|
91
91
|
* Preview module \u2014 compiled live from ${t.source}
|
|
92
92
|
* Same lowering as generated/; not written to disk.
|
|
93
|
-
*/`:"",M=i.map(s),
|
|
93
|
+
*/`:"",M=i.map(s),k=s(o);return`${b}
|
|
94
94
|
${y.join(`
|
|
95
95
|
`)}
|
|
96
96
|
|
|
@@ -98,16 +98,16 @@ ${M.join(`
|
|
|
98
98
|
|
|
99
99
|
`)}
|
|
100
100
|
|
|
101
|
-
${
|
|
101
|
+
${k}`}function Xw(t,e){return Ww(t,"components",`${e.exportName}.generated.tsx`)}var ya=X(()=>{"use strict";Rp();Wp()});var Be=_(tt=>{"use strict";tt.__esModule=!0;tt.extend=Jp;tt.indexOf=rb;tt.escapeExpression=nb;tt.isEmpty=ib;tt.createFrame=ob;tt.blockParams=sb;tt.appendContextPath=ab;var Qw={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},Zw=/[&<>"'`=]/g,eb=/[&<>"'`=]/;function tb(t){return Qw[t]}function Jp(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 wa=Object.prototype.toString;tt.toString=wa;var va=function(e){return typeof e=="function"};va(/x/)&&(tt.isFunction=va=function(t){return typeof t=="function"&&wa.call(t)==="[object Function]"});tt.isFunction=va;var Kp=Array.isArray||function(t){return t&&typeof t=="object"?wa.call(t)==="[object Array]":!1};tt.isArray=Kp;function rb(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function nb(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return eb.test(t)?t.replace(Zw,tb):t}function ib(t){return!t&&t!==0?!0:!!(Kp(t)&&t.length===0)}function ob(t){var e=Jp({},t);return e._parent=t,e}function sb(t,e){return t.path=e,t}function ab(t,e){return(t?t+".":"")+e}});var rt=_((po,Yp)=>{"use strict";po.__esModule=!0;var ba=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function $a(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<ba.length;l++)this[ba[l]]=a[ba[l]];Error.captureStackTrace&&Error.captureStackTrace(this,$a);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{}}$a.prototype=new Error;po.default=$a;Yp.exports=po.default});var Qp=_((fo,Xp)=>{"use strict";fo.__esModule=!0;var xa=Be();fo.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(xa.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=xa.createFrame(r.data);o.contextPath=xa.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(e,r)})};Xp.exports=fo.default});var ef=_((ho,Zp)=>{"use strict";ho.__esModule=!0;function lb(t){return t&&t.__esModule?t:{default:t}}var qn=Be(),ub=rt(),cb=lb(ub);ho.default=function(t){t.registerHelper("each",function(e,r){if(!r)throw new cb.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=qn.appendContextPath(r.data.contextPath,r.ids[0])+"."),qn.isFunction(e)&&(e=e.call(this)),r.data&&(a=qn.createFrame(r.data));function u(g,y,w){a&&(a.key=g,a.index=y,a.first=y===0,a.last=!!w,l&&(a.contextPath=l+g)),s=s+n(e[g],{data:a,blockParams:qn.blockParams([e[g],g],[l+g,null])})}if(e&&typeof e=="object")if(qn.isArray(e))for(var f=e.length;o<f;o++)o in e&&u(o,o,o===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var p=[],d=e[Symbol.iterator](),m=d.next();!m.done;m=d.next())p.push(m.value);e=p;for(var f=e.length;o<f;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})};Zp.exports=ho.default});var rf=_((mo,tf)=>{"use strict";mo.__esModule=!0;function pb(t){return t&&t.__esModule?t:{default:t}}var fb=rt(),db=pb(fb);mo.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new db.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};tf.exports=mo.default});var af=_((go,sf)=>{"use strict";go.__esModule=!0;function hb(t){return t&&t.__esModule?t:{default:t}}var nf=Be(),mb=rt(),of=hb(mb);go.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new of.default("#if requires exactly one argument");return nf.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||nf.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new of.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};sf.exports=go.default});var uf=_((yo,lf)=>{"use strict";yo.__esModule=!0;yo.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)})};lf.exports=yo.default});var pf=_((vo,cf)=>{"use strict";vo.__esModule=!0;vo.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};cf.exports=vo.default});var df=_((wo,ff)=>{"use strict";wo.__esModule=!0;function gb(t){return t&&t.__esModule?t:{default:t}}var Fn=Be(),yb=rt(),vb=gb(yb);wo.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new vb.default("#with requires exactly one argument");Fn.isFunction(e)&&(e=e.call(this));var n=r.fn;if(Fn.isEmpty(e))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=Fn.createFrame(r.data),i.contextPath=Fn.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:i,blockParams:Fn.blockParams([e],[i&&i.contextPath])})})};ff.exports=wo.default});var _a=_(bo=>{"use strict";bo.__esModule=!0;bo.registerDefaultHelpers=Nb;bo.moveHelperToHooks=Mb;function fr(t){return t&&t.__esModule?t:{default:t}}var wb=Qp(),bb=fr(wb),$b=ef(),xb=fr($b),_b=rf(),Sb=fr(_b),kb=af(),Cb=fr(kb),Eb=uf(),Pb=fr(Eb),Ib=pf(),Rb=fr(Ib),Tb=df(),Ab=fr(Tb);function Nb(t){bb.default(t),xb.default(t),Sb.default(t),Cb.default(t),Pb.default(t),Rb.default(t),Ab.default(t)}function Mb(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}});var mf=_(($o,hf)=>{"use strict";$o.__esModule=!0;var Ob=Be();$o.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=Ob.extend({},l,r.partials);var u=e(s,a);return n.partials=l,u}),r.partials[i.args[0]]=i.fn,o})};hf.exports=$o.default});var gf=_(Sa=>{"use strict";Sa.__esModule=!0;Sa.registerDefaultDecorators=Db;function Vb(t){return t&&t.__esModule?t:{default:t}}var Lb=mf(),jb=Vb(Lb);function Db(t){jb.default(t)}});var ka=_((xo,yf)=>{"use strict";xo.__esModule=!0;var qb=Be(),zr={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var r=qb.indexOf(zr.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},log:function(e){if(e=zr.lookupLevel(e),typeof console<"u"&&zr.lookupLevel(zr.level)<=e){var r=zr.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)}}};xo.default=zr;yf.exports=xo.default});var Ca=_(Bn=>{"use strict";Bn.__esModule=!0;Bn.createProtoAccessControl=Wb;Bn.resultIsAllowed=zb;Bn.resetLoggedProperties=Gb;function Fb(t){return t&&t.__esModule?t:{default:t}}var vf=Be(),Bb=ka(),Hb=Fb(Bb),_o=Object.create(null);function Wb(t){var e=Object.create(null);e.__proto__=!1,vf.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,vf.extend(r,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:t.allowProtoMethodsByDefault}}}function zb(t,e,r){return wf(typeof t=="function"?e.methods:e.properties,r)}function wf(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(Ub(e),!1)}function Ub(t){_o[t]!==!0&&(_o[t]=!0,Hb.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
|
|
102
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
|
|
103
|
+
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function Gb(){Object.keys(_o).forEach(function(t){delete _o[t]})}});var ko=_(St=>{"use strict";St.__esModule=!0;St.HandlebarsEnvironment=Ia;function bf(t){return t&&t.__esModule?t:{default:t}}var dr=Be(),Jb=rt(),Ea=bf(Jb),Kb=_a(),Yb=gf(),Xb=ka(),So=bf(Xb),Qb=Ca(),Zb="4.7.9";St.VERSION=Zb;var e0=8;St.COMPILER_REVISION=e0;var t0=7;St.LAST_COMPATIBLE_COMPILER_REVISION=t0;var r0={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"};St.REVISION_CHANGES=r0;var Pa="[object Object]";function Ia(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},Kb.registerDefaultHelpers(this),Yb.registerDefaultDecorators(this)}Ia.prototype={constructor:Ia,logger:So.default,log:So.default.log,registerHelper:function(e,r){if(dr.toString.call(e)===Pa){if(r)throw new Ea.default("Arg not supported with multiple helpers");dr.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(dr.toString.call(e)===Pa)dr.extend(this.partials,e);else{if(typeof r>"u")throw new Ea.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(dr.toString.call(e)===Pa){if(r)throw new Ea.default("Arg not supported with multiple decorators");dr.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){Qb.resetLoggedProperties()}};var n0=So.default.log;St.log=n0;St.createFrame=dr.createFrame;St.logger=So.default});var xf=_((Co,$f)=>{"use strict";Co.__esModule=!0;function Ra(t){this.string=t}Ra.prototype.toString=Ra.prototype.toHTML=function(){return""+this.string};Co.default=Ra;$f.exports=Co.default});var _f=_(Ta=>{"use strict";Ta.__esModule=!0;Ta.wrapHelper=i0;function i0(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 If=_(Yt=>{"use strict";Yt.__esModule=!0;Yt.checkRevision=c0;Yt.template=p0;Yt.wrapProgram=Eo;Yt.resolvePartial=f0;Yt.invokePartial=d0;Yt.noop=Ef;function o0(t){return t&&t.__esModule?t:{default:t}}function s0(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 a0=Be(),Ur=s0(a0),l0=rt(),jt=o0(l0),Dt=ko(),Sf=_a(),u0=_f(),kf=Ca();function c0(t){var e=t&&t[0]||1,r=Dt.COMPILER_REVISION;if(!(e>=Dt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Dt.COMPILER_REVISION))if(e<Dt.LAST_COMPATIBLE_COMPILER_REVISION){var n=Dt.REVISION_CHANGES[r],i=Dt.REVISION_CHANGES[e];throw new jt.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 jt.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 p0(t,e){if(!e)throw new jt.default("No environment passed to template");if(!t||!t.main)throw new jt.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=Ur.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 f=u.split(`
|
|
104
104
|
`),p=0,d=f.length;p<d&&!(!f[p]&&p+1===d);p++)f[p]=l.indent+f[p];u=f.join(`
|
|
105
|
-
`)}return u}else throw new jt.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 jt.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,f=0;f<u;f++){var p=a[f]&&i.lookupProperty(a[f],l);if(p!=null)return p}},lambda:function(a,l){return typeof a=="function"?a.call(l):a},escapeExpression:Ur.escapeExpression,invokePartial:n,fn:function(a){var l=t[a];return l.decorator=t[a+"_d"],l},programs:[],program:function(a,l,u,f,p){var d=this.programs[a],m=this.fn(a);return l||p||f||u?d=ko(this,a,m,l,u,f,p):d||(d=this.programs[a]=ko(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=Ur.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=d0(s,l));var u=void 0,f=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?u=s!=a.depths[0]?[s].concat(a.depths):a.depths:u=[s]);function p(d){return""+t.main(i,d,i.helpers,i.partials,l,f,u)}return p=Pf(t.main,p,i,a.depths||[],l,f),p(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={};Cf(a,e.helpers,i),Cf(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=Ur.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=kf.createProtoAccessControl(s);var l=s.allowCallsToHelperMissing||r;Sf.moveHelperToHooks(i,"helperMissing",l),Sf.moveHelperToHooks(i,"blockHelperMissing",l)}},o._child=function(s,a,l,u){if(t.useBlockParams&&!l)throw new jt.default("must pass block params");if(t.useDepths&&!u)throw new jt.default("must pass parent depths");return ko(i,s,t[s],a,0,l,u)},o}function ko(t,e,r,n,i,o,s){function a(l){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],f=s;return s&&l!=s[0]&&!(l===t.nullContext&&s[0]===null)&&(f=[l].concat(s)),r(t,l,t.helpers,t.partials,u.data||n,o&&[u.blockParams].concat(o),f)}return a=Pf(r,a,t,s,n,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function p0(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=Co(r.partials,t)):r.name==="@partial-block"?t=Co(r.data,"partial-block"):t=Co(r.partials,r.name),t}function f0(t,e,r){var n=Co(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!==Ef&&(function(){r.data=Dt.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=Dt.createFrame(l.data),l.data["partial-block"]=n,o(a,l)},o.partials&&(r.partials=Ur.extend({},r.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new jt.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function Ef(){return""}function Co(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function d0(t,e){return(!e||!("root"in e))&&(e=e?Dt.createFrame(e):{},e.root=t),e}function Pf(t,e,r,n,i,o){if(t.decorator){var s={};e=t.decorator(e,s,r,n&&n[0],i,o,n),Ur.extend(e,s)}return e}function Cf(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=h0(i,r)})}function h0(t,e){var r=e.lookupProperty;return l0.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var Ta=x((Eo,Rf)=>{"use strict";Eo.__esModule=!0;Eo.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}};Rf.exports=Eo.default});var Of=x((Po,Mf)=>{"use strict";Po.__esModule=!0;function Na(t){return t&&t.__esModule?t:{default:t}}function Ma(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 m0=xo(),Tf=Ma(m0),g0=_f(),y0=Na(g0),v0=rt(),w0=Na(v0),b0=Be(),Aa=Ma(b0),$0=If(),Af=Ma($0),_0=Ta(),x0=Na(_0);function Nf(){var t=new Tf.HandlebarsEnvironment;return Aa.extend(t,Tf),t.SafeString=y0.default,t.Exception=w0.default,t.Utils=Aa,t.escapeExpression=Aa.escapeExpression,t.VM=Af,t.template=function(e){return Af.template(e,t)},t}var Bn=Nf();Bn.create=Nf;x0.default(Bn);Bn.default=Bn;Po.default=Bn;Mf.exports=Po.default});var Oa=x((Io,Lf)=>{"use strict";Io.__esModule=!0;var Vf={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&&!Vf.helpers.scopedId(e)&&!e.depth}}};Io.default=Vf;Lf.exports=Io.default});var Df=x((Ro,jf)=>{"use strict";Ro.__esModule=!0;var S0=(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,f){var p=u.length-1;switch(l){case 1:return u[p-1];case 2:this.$=a.prepareProgram(u[p]);break;case 3:this.$=u[p];break;case 4:this.$=u[p];break;case 5:this.$=u[p];break;case 6:this.$=u[p];break;case 7:this.$=u[p];break;case 8:this.$=u[p];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(u[p]),strip:a.stripFlags(u[p],u[p]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:u[p],value:u[p],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(u[p-2],u[p-1],u[p],this._$);break;case 12:this.$={path:u[p-3],params:u[p-2],hash:u[p-1]};break;case 13:this.$=a.prepareBlock(u[p-3],u[p-2],u[p-1],u[p],!1,this._$);break;case 14:this.$=a.prepareBlock(u[p-3],u[p-2],u[p-1],u[p],!0,this._$);break;case 15:this.$={open:u[p-5],path:u[p-4],params:u[p-3],hash:u[p-2],blockParams:u[p-1],strip:a.stripFlags(u[p-5],u[p])};break;case 16:this.$={path:u[p-4],params:u[p-3],hash:u[p-2],blockParams:u[p-1],strip:a.stripFlags(u[p-5],u[p])};break;case 17:this.$={path:u[p-4],params:u[p-3],hash:u[p-2],blockParams:u[p-1],strip:a.stripFlags(u[p-5],u[p])};break;case 18:this.$={strip:a.stripFlags(u[p-1],u[p-1]),program:u[p]};break;case 19:var d=a.prepareBlock(u[p-2],u[p-1],u[p],u[p],!1,this._$),m=a.prepareProgram([d],u[p-1].loc);m.chained=!0,this.$={strip:u[p-2].strip,program:m,chain:!0};break;case 20:this.$=u[p];break;case 21:this.$={path:u[p-1],strip:a.stripFlags(u[p-2],u[p])};break;case 22:this.$=a.prepareMustache(u[p-3],u[p-2],u[p-1],u[p-4],a.stripFlags(u[p-4],u[p]),this._$);break;case 23:this.$=a.prepareMustache(u[p-3],u[p-2],u[p-1],u[p-4],a.stripFlags(u[p-4],u[p]),this._$);break;case 24:this.$={type:"PartialStatement",name:u[p-3],params:u[p-2],hash:u[p-1],indent:"",strip:a.stripFlags(u[p-4],u[p]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(u[p-2],u[p-1],u[p],this._$);break;case 26:this.$={path:u[p-3],params:u[p-2],hash:u[p-1],strip:a.stripFlags(u[p-4],u[p])};break;case 27:this.$=u[p];break;case 28:this.$=u[p];break;case 29:this.$={type:"SubExpression",path:u[p-3],params:u[p-2],hash:u[p-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:u[p],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(u[p-2]),value:u[p],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(u[p-1]);break;case 33:this.$=u[p];break;case 34:this.$=u[p];break;case 35:this.$={type:"StringLiteral",value:u[p],original:u[p],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(u[p]),original:Number(u[p]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:u[p]==="true",original:u[p]==="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[p];break;case 41:this.$=u[p];break;case 42:this.$=a.preparePath(!0,u[p],this._$);break;case 43:this.$=a.preparePath(!1,u[p],this._$);break;case 44:u[p-2].push({part:a.id(u[p]),original:u[p],separator:u[p-1]}),this.$=u[p-2];break;case 45:this.$=[{part:a.id(u[p]),original:u[p]}];break;case 46:this.$=[];break;case 47:u[p-1].push(u[p]);break;case 48:this.$=[];break;case 49:u[p-1].push(u[p]);break;case 50:this.$=[];break;case 51:u[p-1].push(u[p]);break;case 58:this.$=[];break;case 59:u[p-1].push(u[p]);break;case 64:this.$=[];break;case 65:u[p-1].push(u[p]);break;case 70:this.$=[];break;case 71:u[p-1].push(u[p]);break;case 78:this.$=[];break;case 79:u[p-1].push(u[p]);break;case 82:this.$=[];break;case 83:u[p-1].push(u[p]);break;case 86:this.$=[];break;case 87:u[p-1].push(u[p]);break;case 90:this.$=[];break;case 91:u[p-1].push(u[p]);break;case 94:this.$=[];break;case 95:u[p-1].push(u[p]);break;case 98:this.$=[u[p]];break;case 99:u[p-1].push(u[p]);break;case 100:this.$=[u[p]];break;case 101:u[p-1].push(u[p]);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,f="",p=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 b=this.lexer.yylloc;l.push(b);var v=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function M(ue){s.length=s.length-2*ue,a.length=a.length-ue,l.length=l.length-ue}function C(){var ue;return ue=o.lexer.lex()||1,typeof ue!="number"&&(ue=o.symbols_[ue]||ue),ue}for(var R,A,V,W,ie,we,be={},Re,$e,Ge,Je;;){if(V=s[s.length-1],this.defaultActions[V]?W=this.defaultActions[V]:((R===null||typeof R>"u")&&(R=C()),W=u[V]&&u[V][R]),typeof W>"u"||!W.length||!W[0]){var Y="";if(!m){Je=[];for(Re in u[V])this.terminals_[Re]&&Re>2&&Je.push("'"+this.terminals_[Re]+"'");this.lexer.showPosition?Y="Parse error on line "+(p+1)+`:
|
|
105
|
+
`)}return u}else throw new jt.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 jt.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,f=0;f<u;f++){var p=a[f]&&i.lookupProperty(a[f],l);if(p!=null)return p}},lambda:function(a,l){return typeof a=="function"?a.call(l):a},escapeExpression:Ur.escapeExpression,invokePartial:n,fn:function(a){var l=t[a];return l.decorator=t[a+"_d"],l},programs:[],program:function(a,l,u,f,p){var d=this.programs[a],m=this.fn(a);return l||p||f||u?d=Eo(this,a,m,l,u,f,p):d||(d=this.programs[a]=Eo(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=Ur.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=h0(s,l));var u=void 0,f=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?u=s!=a.depths[0]?[s].concat(a.depths):a.depths:u=[s]);function p(d){return""+t.main(i,d,i.helpers,i.partials,l,f,u)}return p=Pf(t.main,p,i,a.depths||[],l,f),p(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={};Cf(a,e.helpers,i),Cf(a,s.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=Ur.extend({},e.decorators,s.decorators)),i.hooks={},i.protoAccessControl=kf.createProtoAccessControl(s);var l=s.allowCallsToHelperMissing||r;Sf.moveHelperToHooks(i,"helperMissing",l),Sf.moveHelperToHooks(i,"blockHelperMissing",l)}},o._child=function(s,a,l,u){if(t.useBlockParams&&!l)throw new jt.default("must pass block params");if(t.useDepths&&!u)throw new jt.default("must pass parent depths");return Eo(i,s,t[s],a,0,l,u)},o}function Eo(t,e,r,n,i,o,s){function a(l){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],f=s;return s&&l!=s[0]&&!(l===t.nullContext&&s[0]===null)&&(f=[l].concat(s)),r(t,l,t.helpers,t.partials,u.data||n,o&&[u.blockParams].concat(o),f)}return a=Pf(r,a,t,s,n,o),a.program=e,a.depth=s?s.length:0,a.blockParams=i||0,a}function f0(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=Po(r.partials,t)):r.name==="@partial-block"?t=Po(r.data,"partial-block"):t=Po(r.partials,r.name),t}function d0(t,e,r){var n=Po(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!==Ef&&(function(){r.data=Dt.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=Dt.createFrame(l.data),l.data["partial-block"]=n,o(a,l)},o.partials&&(r.partials=Ur.extend({},r.partials,o.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new jt.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function Ef(){return""}function Po(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function h0(t,e){return(!e||!("root"in e))&&(e=e?Dt.createFrame(e):{},e.root=t),e}function Pf(t,e,r,n,i,o){if(t.decorator){var s={};e=t.decorator(e,s,r,n&&n[0],i,o,n),Ur.extend(e,s)}return e}function Cf(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=m0(i,r)})}function m0(t,e){var r=e.lookupProperty;return u0.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var Aa=_((Io,Rf)=>{"use strict";Io.__esModule=!0;Io.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}};Rf.exports=Io.default});var Of=_((Ro,Mf)=>{"use strict";Ro.__esModule=!0;function Ma(t){return t&&t.__esModule?t:{default:t}}function Oa(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 g0=ko(),Tf=Oa(g0),y0=xf(),v0=Ma(y0),w0=rt(),b0=Ma(w0),$0=Be(),Na=Oa($0),x0=If(),Af=Oa(x0),_0=Aa(),S0=Ma(_0);function Nf(){var t=new Tf.HandlebarsEnvironment;return Na.extend(t,Tf),t.SafeString=v0.default,t.Exception=b0.default,t.Utils=Na,t.escapeExpression=Na.escapeExpression,t.VM=Af,t.template=function(e){return Af.template(e,t)},t}var Hn=Nf();Hn.create=Nf;S0.default(Hn);Hn.default=Hn;Ro.default=Hn;Mf.exports=Ro.default});var Va=_((To,Lf)=>{"use strict";To.__esModule=!0;var Vf={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&&!Vf.helpers.scopedId(e)&&!e.depth}}};To.default=Vf;Lf.exports=To.default});var Df=_((Ao,jf)=>{"use strict";Ao.__esModule=!0;var k0=(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,f){var p=u.length-1;switch(l){case 1:return u[p-1];case 2:this.$=a.prepareProgram(u[p]);break;case 3:this.$=u[p];break;case 4:this.$=u[p];break;case 5:this.$=u[p];break;case 6:this.$=u[p];break;case 7:this.$=u[p];break;case 8:this.$=u[p];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(u[p]),strip:a.stripFlags(u[p],u[p]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:u[p],value:u[p],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(u[p-2],u[p-1],u[p],this._$);break;case 12:this.$={path:u[p-3],params:u[p-2],hash:u[p-1]};break;case 13:this.$=a.prepareBlock(u[p-3],u[p-2],u[p-1],u[p],!1,this._$);break;case 14:this.$=a.prepareBlock(u[p-3],u[p-2],u[p-1],u[p],!0,this._$);break;case 15:this.$={open:u[p-5],path:u[p-4],params:u[p-3],hash:u[p-2],blockParams:u[p-1],strip:a.stripFlags(u[p-5],u[p])};break;case 16:this.$={path:u[p-4],params:u[p-3],hash:u[p-2],blockParams:u[p-1],strip:a.stripFlags(u[p-5],u[p])};break;case 17:this.$={path:u[p-4],params:u[p-3],hash:u[p-2],blockParams:u[p-1],strip:a.stripFlags(u[p-5],u[p])};break;case 18:this.$={strip:a.stripFlags(u[p-1],u[p-1]),program:u[p]};break;case 19:var d=a.prepareBlock(u[p-2],u[p-1],u[p],u[p],!1,this._$),m=a.prepareProgram([d],u[p-1].loc);m.chained=!0,this.$={strip:u[p-2].strip,program:m,chain:!0};break;case 20:this.$=u[p];break;case 21:this.$={path:u[p-1],strip:a.stripFlags(u[p-2],u[p])};break;case 22:this.$=a.prepareMustache(u[p-3],u[p-2],u[p-1],u[p-4],a.stripFlags(u[p-4],u[p]),this._$);break;case 23:this.$=a.prepareMustache(u[p-3],u[p-2],u[p-1],u[p-4],a.stripFlags(u[p-4],u[p]),this._$);break;case 24:this.$={type:"PartialStatement",name:u[p-3],params:u[p-2],hash:u[p-1],indent:"",strip:a.stripFlags(u[p-4],u[p]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(u[p-2],u[p-1],u[p],this._$);break;case 26:this.$={path:u[p-3],params:u[p-2],hash:u[p-1],strip:a.stripFlags(u[p-4],u[p])};break;case 27:this.$=u[p];break;case 28:this.$=u[p];break;case 29:this.$={type:"SubExpression",path:u[p-3],params:u[p-2],hash:u[p-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:u[p],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(u[p-2]),value:u[p],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(u[p-1]);break;case 33:this.$=u[p];break;case 34:this.$=u[p];break;case 35:this.$={type:"StringLiteral",value:u[p],original:u[p],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(u[p]),original:Number(u[p]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:u[p]==="true",original:u[p]==="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[p];break;case 41:this.$=u[p];break;case 42:this.$=a.preparePath(!0,u[p],this._$);break;case 43:this.$=a.preparePath(!1,u[p],this._$);break;case 44:u[p-2].push({part:a.id(u[p]),original:u[p],separator:u[p-1]}),this.$=u[p-2];break;case 45:this.$=[{part:a.id(u[p]),original:u[p]}];break;case 46:this.$=[];break;case 47:u[p-1].push(u[p]);break;case 48:this.$=[];break;case 49:u[p-1].push(u[p]);break;case 50:this.$=[];break;case 51:u[p-1].push(u[p]);break;case 58:this.$=[];break;case 59:u[p-1].push(u[p]);break;case 64:this.$=[];break;case 65:u[p-1].push(u[p]);break;case 70:this.$=[];break;case 71:u[p-1].push(u[p]);break;case 78:this.$=[];break;case 79:u[p-1].push(u[p]);break;case 82:this.$=[];break;case 83:u[p-1].push(u[p]);break;case 86:this.$=[];break;case 87:u[p-1].push(u[p]);break;case 90:this.$=[];break;case 91:u[p-1].push(u[p]);break;case 94:this.$=[];break;case 95:u[p-1].push(u[p]);break;case 98:this.$=[u[p]];break;case 99:u[p-1].push(u[p]);break;case 100:this.$=[u[p]];break;case 101:u[p-1].push(u[p]);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,f="",p=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 w=this.lexer.yylloc;l.push(w);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function M(ue){s.length=s.length-2*ue,a.length=a.length-ue,l.length=l.length-ue}function k(){var ue;return ue=o.lexer.lex()||1,typeof ue!="number"&&(ue=o.symbols_[ue]||ue),ue}for(var R,T,V,z,ie,we,be={},Re,$e,Ge,Je;;){if(V=s[s.length-1],this.defaultActions[V]?z=this.defaultActions[V]:((R===null||typeof R>"u")&&(R=k()),z=u[V]&&u[V][R]),typeof z>"u"||!z.length||!z[0]){var Y="";if(!m){Je=[];for(Re in u[V])this.terminals_[Re]&&Re>2&&Je.push("'"+this.terminals_[Re]+"'");this.lexer.showPosition?Y="Parse error on line "+(p+1)+`:
|
|
106
106
|
`+this.lexer.showPosition()+`
|
|
107
|
-
Expecting `+Je.join(", ")+", got '"+(this.terminals_[R]||R)+"'":Y="Parse error on line "+(p+1)+": Unexpected "+(R==1?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(Y,{text:this.lexer.match,token:this.terminals_[R]||R,line:this.lexer.yylineno,loc:
|
|
107
|
+
Expecting `+Je.join(", ")+", got '"+(this.terminals_[R]||R)+"'":Y="Parse error on line "+(p+1)+": Unexpected "+(R==1?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(Y,{text:this.lexer.match,token:this.terminals_[R]||R,line:this.lexer.yylineno,loc:w,expected:Je})}}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+R);switch(z[0]){case 1:s.push(R),a.push(this.lexer.yytext),l.push(this.lexer.yylloc),s.push(z[1]),R=null,T?(R=T,T=null):(d=this.lexer.yyleng,f=this.lexer.yytext,p=this.lexer.yylineno,w=this.lexer.yylloc,m>0&&m--);break;case 2:if($e=this.productions_[z[1]][1],be.$=a[a.length-$e],be._$={first_line:l[l.length-($e||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-($e||1)].first_column,last_column:l[l.length-1].last_column},b&&(be._$.range=[l[l.length-($e||1)].range[0],l[l.length-1].range[1]]),we=this.performAction.call(be,f,d,p,this.yy,z[1],a,l),typeof we<"u")return we;$e&&(s=s.slice(0,-1*$e*2),a=a.slice(0,-1*$e),l=l.slice(0,-1*$e)),s.push(this.productions_[z[1]][0]),a.push(be.$),l.push(be._$),Ge=u[s[s.length-2]][s[s.length-1]],s.push(Ge);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
108
|
`+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,a,l,u,f;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),d=0;d<p.length&&(a=this._input.match(this.rules[p[d]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,l=d,!this.options.flex)));d++);return s?(f=s[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.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,p[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(p,d){return s.yytext=s.yytext.substring(p,s.yyleng-d+p)}var f=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})();Ro.default=S0;jf.exports=Ro.default});var Mo=x((No,Bf)=>{"use strict";No.__esModule=!0;function k0(t){return t&&t.__esModule?t:{default:t}}var C0=rt(),Va=k0(C0);function To(){this.parents=[]}To.prototype={constructor:To,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!To.prototype[n.type])throw new Va.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 Va.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 Va.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:Ao,Decorator:Ao,BlockStatement:qf,DecoratorBlock:qf,PartialStatement:Ff,PartialBlockStatement:function(e){Ff.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Ao,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 Ao(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function qf(t){Ao.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function Ff(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}No.default=To;Bf.exports=No.default});var Wf=x((Oo,Hf)=>{"use strict";Oo.__esModule=!0;function E0(t){return t&&t.__esModule?t:{default:t}}var P0=Mo(),I0=E0(P0);function kt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}kt.prototype=new I0.default;kt.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=La(n,i,r),u=ja(n,i,r),f=a.openStandalone&&l,p=a.closeStandalone&&u,d=a.inlineStandalone&&l&&u;a.close&&hr(n,i,!0),a.open&&Yt(n,i,!0),e&&d&&(hr(n,i),Yt(n,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&f&&(hr((s.program||s.inverse).body),Yt(n,i)),e&&p&&(hr(n,i),Yt((s.inverse||s.program).body))}}return t};kt.prototype.BlockStatement=kt.prototype.DecoratorBlock=kt.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:ja(e.body),closeStandalone:La((n||e).body)};if(t.openStrip.close&&hr(e.body,null,!0),r){var s=t.inverseStrip;s.open&&Yt(e.body,null,!0),s.close&&hr(n.body,null,!0),t.closeStrip.open&&Yt(i.body,null,!0),!this.options.ignoreStandalone&&La(e.body)&&ja(n.body)&&(Yt(e.body),hr(n.body))}else t.closeStrip.open&&Yt(e.body,null,!0);return o};kt.prototype.Decorator=kt.prototype.MustacheStatement=function(t){return t.strip};kt.prototype.PartialStatement=kt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function La(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 ja(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 hr(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 Yt(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}}Oo.default=kt;Hf.exports=Oo.default});var zf=x(at=>{"use strict";at.__esModule=!0;at.SourceLocation=A0;at.id=N0;at.stripFlags=M0;at.stripComment=O0;at.preparePath=V0;at.prepareMustache=L0;at.prepareRawBlock=j0;at.prepareBlock=D0;at.prepareProgram=q0;at.preparePartialBlock=F0;function R0(t){return t&&t.__esModule?t:{default:t}}var T0=rt(),Da=R0(T0);function qa(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new Da.default(t.path.original+" doesn't match "+e,r)}}function A0(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 N0(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function M0(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function O0(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function V0(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 Da.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 L0(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 j0(t,e,r,n){qa(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 D0(t,e,r,n,i,o){n&&n.path&&qa(t,n);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,l=void 0;if(r){if(s)throw new Da.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 q0(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 F0(t,e,r,n){return qa(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 Gf=x(Wn=>{"use strict";Wn.__esModule=!0;Wn.parseWithoutProcessing=Uf;Wn.parse=Y0;function B0(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 Ha(t){return t&&t.__esModule?t:{default:t}}var H0=Df(),Fa=Ha(H0),W0=Wf(),z0=Ha(W0),U0=zf(),G0=B0(U0),J0=rt(),Hn=Ha(J0),K0=Be();Wn.parser=Fa.default;var Vo={};K0.extend(Vo,G0);function Uf(t,e){if(t.type==="Program")return X0(t),t;Fa.default.yy=Vo,Vo.locInfo=function(n){return new Vo.SourceLocation(e&&e.srcName,n)};var r=Fa.default.parse(t);return r}function Y0(t,e){var r=Uf(t,e),n=new z0.default(e);return n.accept(r)}function X0(t){Ba(t)}function Ba(t){if(t!=null){if(Array.isArray(t)){t.forEach(Ba);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!Q0(t.depth))throw new Hn.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new Hn.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 Hn.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new Hn.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new Hn.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(r){r!=="loc"&&Ba(t[r])})}}}function Q0(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var Xf=x(Jn=>{"use strict";Jn.__esModule=!0;Jn.Compiler=Wa;Jn.precompile=r$;Jn.compile=n$;function Kf(t){return t&&t.__esModule?t:{default:t}}var Z0=rt(),Un=Kf(Z0),Gn=Be(),e$=Oa(),zn=Kf(e$),t$=[].slice;function Wa(){}Wa.prototype={compiler:Wa,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||!Yf(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=Gn.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 Un.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){Jf(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 Un.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){Jf(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 Un.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,zn.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],n=zn.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:t$.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=zn.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&zn.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&&!zn.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&&Gn.indexOf(i,e);if(i&&o>=0)return[r,o]}}};function r$(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new Un.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 n$(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new Un.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Gn.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 Yf(t,e){if(t===e)return!0;if(Gn.isArray(t)&&Gn.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!Yf(t[r],e[r]))return!1;return!0}}function Jf(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 Zf=x(za=>{var Qf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");za.encode=function(t){if(0<=t&&t<Qf.length)return Qf[t];throw new TypeError("Must be between 0 and 63: "+t)};za.decode=function(t){var e=65,r=90,n=97,i=122,o=48,s=57,a=43,l=47,u=26,f=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+u:o<=t&&t<=s?t-o+f:t==a?62:t==l?63:-1}});var Ja=x(Ga=>{var ed=Zf(),Ua=5,td=1<<Ua,rd=td-1,nd=td;function i$(t){return t<0?(-t<<1)+1:(t<<1)+0}function o$(t){var e=(t&1)===1,r=t>>1;return e?-r:r}Ga.encode=function(e){var r="",n,i=i$(e);do n=i&rd,i>>>=Ua,i>0&&(n|=nd),r+=ed.encode(n);while(i>0);return r};Ga.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=ed.decode(e.charCodeAt(r++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(l&nd),l&=rd,o=o+(l<<s),s+=Ua}while(a);n.value=o$(o),n.rest=r}});var Kr=x(Ve=>{function s$(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Ve.getArg=s$;var id=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,a$=/^data:.+\,.+$/;function Kn(t){var e=t.match(id);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Ve.urlParse=Kn;function Gr(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}Ve.urlGenerate=Gr;function Ka(t){var e=t,r=Kn(t);if(r){if(!r.path)return t;e=r.path}for(var n=Ve.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,Gr(r)):e}Ve.normalize=Ka;function od(t,e){t===""&&(t="."),e===""&&(e=".");var r=Kn(e),n=Kn(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Gr(r);if(r||e.match(a$))return e;if(n&&!n.host&&!n.path)return n.host=e,Gr(n);var i=e.charAt(0)==="/"?e:Ka(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Gr(n)):i}Ve.join=od;Ve.isAbsolute=function(t){return t.charAt(0)==="/"||id.test(t)};function l$(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)}Ve.relative=l$;var sd=(function(){var t=Object.create(null);return!("__proto__"in t)})();function ad(t){return t}function u$(t){return ld(t)?"$"+t:t}Ve.toSetString=sd?ad:u$;function c$(t){return ld(t)?t.slice(1):t}Ve.fromSetString=sd?ad:c$;function ld(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 p$(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)}Ve.compareByOriginalPositions=p$;function f$(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)}Ve.compareByGeneratedPositionsDeflated=f$;function Jr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function d$(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)}Ve.compareByGeneratedPositionsInflated=d$;function h$(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Ve.parseSourceMapInput=h$;function m$(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=Kn(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=od(Gr(n),e)}return Ka(e)}Ve.computeSourceURL=m$});var Qa=x(ud=>{var Ya=Kr(),Xa=Object.prototype.hasOwnProperty,mr=typeof Map<"u";function qt(){this._array=[],this._set=mr?new Map:Object.create(null)}qt.fromArray=function(e,r){for(var n=new qt,i=0,o=e.length;i<o;i++)n.add(e[i],r);return n};qt.prototype.size=function(){return mr?this._set.size:Object.getOwnPropertyNames(this._set).length};qt.prototype.add=function(e,r){var n=mr?e:Ya.toSetString(e),i=mr?this.has(e):Xa.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(e),i||(mr?this._set.set(e,o):this._set[n]=o)};qt.prototype.has=function(e){if(mr)return this._set.has(e);var r=Ya.toSetString(e);return Xa.call(this._set,r)};qt.prototype.indexOf=function(e){if(mr){var r=this._set.get(e);if(r>=0)return r}else{var n=Ya.toSetString(e);if(Xa.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};qt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};qt.prototype.toArray=function(){return this._array.slice()};ud.ArraySet=qt});var fd=x(pd=>{var cd=Kr();function g$(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return n>r||n==r&&o>=i||cd.compareByGeneratedPositionsInflated(t,e)<=0}function Lo(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Lo.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Lo.prototype.add=function(e){g$(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Lo.prototype.toArray=function(){return this._sorted||(this._array.sort(cd.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};pd.MappingList=Lo});var Za=x(dd=>{var Yn=Ja(),Ce=Kr(),jo=Qa().ArraySet,y$=fd().MappingList;function lt(t){t||(t={}),this._file=Ce.getArg(t,"file",null),this._sourceRoot=Ce.getArg(t,"sourceRoot",null),this._skipValidation=Ce.getArg(t,"skipValidation",!1),this._sources=new jo,this._names=new jo,this._mappings=new y$,this._sourcesContents=null}lt.prototype._version=3;lt.fromSourceMap=function(e){var r=e.sourceRoot,n=new lt({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=Ce.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=Ce.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=e.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};lt.prototype.addMapping=function(e){var r=Ce.getArg(e,"generated"),n=Ce.getArg(e,"original",null),i=Ce.getArg(e,"source",null),o=Ce.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})};lt.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=Ce.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Ce.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Ce.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};lt.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=Ce.relative(o,i));var s=new jo,a=new jo;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=Ce.join(n,l.source)),o!=null&&(l.source=Ce.relative(o,l.source)),l.originalLine=u.line,l.originalColumn=u.column,u.name!=null&&(l.name=u.name))}var f=l.source;f!=null&&!s.has(f)&&s.add(f);var p=l.name;p!=null&&!a.has(p)&&a.add(p)},this),this._sources=s,this._names=a,e.sources.forEach(function(l){var u=e.sourceContentFor(l);u!=null&&(n!=null&&(l=Ce.join(n,l)),o!=null&&(l=Ce.relative(o,l)),this.setSourceContent(l,u))},this)};lt.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}))}};lt.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,o=0,s=0,a="",l,u,f,p,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(!Ce.compareByGeneratedPositionsInflated(u,d[m-1]))continue;l+=","}l+=Yn.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(p=this._sources.indexOf(u.source),l+=Yn.encode(p-s),s=p,l+=Yn.encode(u.originalLine-1-i),i=u.originalLine-1,l+=Yn.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(f=this._names.indexOf(u.name),l+=Yn.encode(f-o),o=f)),a+=l}return a};lt.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Ce.relative(r,n));var i=Ce.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};lt.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};lt.prototype.toString=function(){return JSON.stringify(this.toJSON())};dd.SourceMapGenerator=lt});var hd=x(gr=>{gr.GREATEST_LOWER_BOUND=1;gr.LEAST_UPPER_BOUND=2;function el(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?el(s,e,r,n,i,o):o==gr.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-t>1?el(t,s,r,n,i,o):o==gr.LEAST_UPPER_BOUND?s:t<0?-1:t}gr.search=function(e,r,n,i){if(r.length===0)return-1;var o=el(-1,r.length,e,r,n,i||gr.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o}});var gd=x(md=>{function tl(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v$(t,e){return Math.round(t+Math.random()*(e-t))}function rl(t,e,r,n){if(r<n){var i=v$(r,n),o=r-1;tl(t,i,n);for(var s=t[n],a=r;a<n;a++)e(t[a],s)<=0&&(o+=1,tl(t,o,a));tl(t,o+1,a);var l=o+1;rl(t,e,r,l-1),rl(t,e,l+1,n)}}md.quickSort=function(t,e){rl(t,e,0,t.length-1)}});var vd=x(Do=>{var B=Kr(),nl=hd(),Yr=Qa().ArraySet,w$=Ja(),Xn=gd().quickSort;function ge(t,e){var r=t;return typeof t=="string"&&(r=B.parseSourceMapInput(t)),r.sections!=null?new yt(r,e):new Ae(r,e)}ge.fromSourceMap=function(t,e){return Ae.fromSourceMap(t,e)};ge.prototype._version=3;ge.prototype.__generatedMappings=null;Object.defineProperty(ge.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});ge.prototype.__originalMappings=null;Object.defineProperty(ge.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});ge.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};ge.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};ge.GENERATED_ORDER=1;ge.ORIGINAL_ORDER=2;ge.GREATEST_LOWER_BOUND=1;ge.LEAST_UPPER_BOUND=2;ge.prototype.eachMapping=function(e,r,n){var i=r||null,o=n||ge.GENERATED_ORDER,s;switch(o){case ge.GENERATED_ORDER:s=this._generatedMappings;break;case ge.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=B.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)};ge.prototype.allGeneratedPositionsFor=function(e){var r=B.getArg(e,"line"),n={source:B.getArg(e,"source"),originalLine:r,originalColumn:B.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",B.compareByOriginalPositions,nl.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:B.getArg(s,"generatedLine",null),column:B.getArg(s,"generatedColumn",null),lastColumn:B.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var l=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==l;)i.push({line:B.getArg(s,"generatedLine",null),column:B.getArg(s,"generatedColumn",null),lastColumn:B.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};Do.SourceMapConsumer=ge;function Ae(t,e){var r=t;typeof t=="string"&&(r=B.parseSourceMapInput(t));var n=B.getArg(r,"version"),i=B.getArg(r,"sources"),o=B.getArg(r,"names",[]),s=B.getArg(r,"sourceRoot",null),a=B.getArg(r,"sourcesContent",null),l=B.getArg(r,"mappings"),u=B.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=B.normalize(s)),i=i.map(String).map(B.normalize).map(function(f){return s&&B.isAbsolute(s)&&B.isAbsolute(f)?B.relative(s,f):f}),this._names=Yr.fromArray(o.map(String),!0),this._sources=Yr.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return B.computeSourceURL(s,f,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=e,this.file=u}Ae.prototype=Object.create(ge.prototype);Ae.prototype.consumer=ge;Ae.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=B.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};Ae.fromSourceMap=function(e,r){var n=Object.create(Ae.prototype),i=n._names=Yr.fromArray(e._names.toArray(),!0),o=n._sources=Yr.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 B.computeSourceURL(n.sourceRoot,m,r)});for(var s=e._mappings.toArray().slice(),a=n.__generatedMappings=[],l=n.__originalMappings=[],u=0,f=s.length;u<f;u++){var p=s[u],d=new yd;d.generatedLine=p.generatedLine,d.generatedColumn=p.generatedColumn,p.source&&(d.source=o.indexOf(p.source),d.originalLine=p.originalLine,d.originalColumn=p.originalColumn,p.name&&(d.name=i.indexOf(p.name)),l.push(d)),a.push(d)}return Xn(n.__originalMappings,B.compareByOriginalPositions),n};Ae.prototype._version=3;Object.defineProperty(Ae.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function yd(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Ae.prototype._parseMappings=function(e,r){for(var n=1,i=0,o=0,s=0,a=0,l=0,u=e.length,f=0,p={},d={},m=[],g=[],y,b,v,M,C;f<u;)if(e.charAt(f)===";")n++,f++,i=0;else if(e.charAt(f)===",")f++;else{for(y=new yd,y.generatedLine=n,M=f;M<u&&!this._charIsMappingSeparator(e,M);M++);if(b=e.slice(f,M),v=p[b],v)f+=b.length;else{for(v=[];f<M;)w$.decode(e,f,d),C=d.value,f=d.rest,v.push(C);if(v.length===2)throw new Error("Found a source, but no line and column");if(v.length===3)throw new Error("Found a source and line, but no column");p[b]=v}y.generatedColumn=i+v[0],i=y.generatedColumn,v.length>1&&(y.source=a+v[1],a+=v[1],y.originalLine=o+v[2],o=y.originalLine,y.originalLine+=1,y.originalColumn=s+v[3],s=y.originalColumn,v.length>4&&(y.name=l+v[4],l+=v[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}Xn(g,B.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,Xn(m,B.compareByOriginalPositions),this.__originalMappings=m};Ae.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 nl.search(e,r,o,s)};Ae.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}};Ae.prototype.originalPositionFor=function(e){var r={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",B.compareByGeneratedPositionsDeflated,B.getArg(e,"bias",ge.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=B.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=B.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=B.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:B.getArg(i,"originalLine",null),column:B.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Ae.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Ae.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=B.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=B.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.')};Ae.prototype.generatedPositionFor=function(e){var r=B.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:B.getArg(e,"line"),originalColumn:B.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",B.compareByOriginalPositions,B.getArg(e,"bias",ge.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:B.getArg(o,"generatedLine",null),column:B.getArg(o,"generatedColumn",null),lastColumn:B.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Do.BasicSourceMapConsumer=Ae;function yt(t,e){var r=t;typeof t=="string"&&(r=B.parseSourceMapInput(t));var n=B.getArg(r,"version"),i=B.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Yr,this._names=new Yr;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=B.getArg(s,"offset"),l=B.getArg(a,"line"),u=B.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 ge(B.getArg(s,"map"),e)}})}yt.prototype=Object.create(ge.prototype);yt.prototype.constructor=ge;yt.prototype._version=3;Object.defineProperty(yt.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}});yt.prototype.originalPositionFor=function(e){var r={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},n=nl.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}};yt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};yt.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.')};yt.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(B.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}};yt.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=B.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 f={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(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}Xn(this.__generatedMappings,B.compareByGeneratedPositionsDeflated),Xn(this.__originalMappings,B.compareByOriginalPositions)};Do.IndexedSourceMapConsumer=yt});var bd=x(wd=>{var b$=Za().SourceMapGenerator,qo=Kr(),$$=/(\r?\n)/,_$=10,Xr="$$$isSourceNode$$$";function nt(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[Xr]=!0,n!=null&&this.add(n)}nt.fromStringWithSourceMap=function(e,r,n){var i=new nt,o=e.split($$),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,f=null;return r.eachMapping(function(d){if(f!==null)if(l<d.generatedLine)p(f,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,p(f,g),f=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}f=d},this),s<o.length&&(f&&p(f,a()),i.add(o.splice(s).join(""))),r.sources.forEach(function(d){var m=r.sourceContentFor(d);m!=null&&(n!=null&&(d=qo.join(n,d)),i.setSourceContent(d,m))}),i;function p(d,m){if(d===null||d.source===void 0)i.add(m);else{var g=n?qo.join(n,d.source):d.source;i.add(new nt(d.originalLine,d.originalColumn,g,m,d.name))}}};nt.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[Xr]||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};nt.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[Xr]||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};nt.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[Xr]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};nt.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};nt.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[Xr]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};nt.prototype.setSourceContent=function(e,r){this.sourceContents[qo.toSetString(e)]=r};nt.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Xr]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(qo.fromSetString(i[r]),this.sourceContents[i[r]])};nt.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};nt.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new b$(e),i=!1,o=null,s=null,a=null,l=null;return this.walk(function(u,f){r.code+=u,f.source!==null&&f.line!==null&&f.column!==null?((o!==f.source||s!==f.line||a!==f.column||l!==f.name)&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name}),o=f.source,s=f.line,a=f.column,l=f.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var p=0,d=u.length;p<d;p++)u.charCodeAt(p)===_$?(r.line++,r.column=0,p+1===d?(o=null,i=!1):i&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name})):r.column++}),this.walkSourceContents(function(u,f){n.setSourceContent(u,f)}),{code:r.code,map:n}};wd.SourceNode=nt});var $d=x(Fo=>{Fo.SourceMapGenerator=Za().SourceMapGenerator;Fo.SourceMapConsumer=vd().SourceMapConsumer;Fo.SourceNode=bd().SourceNode});var kd=x((Bo,Sd)=>{"use strict";Bo.__esModule=!0;var ol=Be(),yr=void 0;try{(typeof define!="function"||!define.amd)&&(_d=$d(),yr=_d.SourceNode)}catch{}var _d;yr||(yr=function(t,e,r,n){this.src="",n&&this.add(n)},yr.prototype={add:function(e){ol.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){ol.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function il(t,e,r){if(ol.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 xd(t){this.srcFile=t,this.source=[]}xd.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 yr(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 yr?e:(e=
|
|
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(p,d){return s.yytext=s.yytext.substring(p,s.yyleng-d+p)}var f=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})();Ao.default=k0;jf.exports=Ao.default});var Vo=_((Oo,Bf)=>{"use strict";Oo.__esModule=!0;function C0(t){return t&&t.__esModule?t:{default:t}}var E0=rt(),La=C0(E0);function No(){this.parents=[]}No.prototype={constructor:No,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!No.prototype[n.type])throw new La.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 La.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 La.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:Mo,Decorator:Mo,BlockStatement:qf,DecoratorBlock:qf,PartialStatement:Ff,PartialBlockStatement:function(e){Ff.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Mo,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 Mo(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function qf(t){Mo.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function Ff(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}Oo.default=No;Bf.exports=Oo.default});var Wf=_((Lo,Hf)=>{"use strict";Lo.__esModule=!0;function P0(t){return t&&t.__esModule?t:{default:t}}var I0=Vo(),R0=P0(I0);function kt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}kt.prototype=new R0.default;kt.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=ja(n,i,r),u=Da(n,i,r),f=a.openStandalone&&l,p=a.closeStandalone&&u,d=a.inlineStandalone&&l&&u;a.close&&hr(n,i,!0),a.open&&Xt(n,i,!0),e&&d&&(hr(n,i),Xt(n,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),e&&f&&(hr((s.program||s.inverse).body),Xt(n,i)),e&&p&&(hr(n,i),Xt((s.inverse||s.program).body))}}return t};kt.prototype.BlockStatement=kt.prototype.DecoratorBlock=kt.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:Da(e.body),closeStandalone:ja((n||e).body)};if(t.openStrip.close&&hr(e.body,null,!0),r){var s=t.inverseStrip;s.open&&Xt(e.body,null,!0),s.close&&hr(n.body,null,!0),t.closeStrip.open&&Xt(i.body,null,!0),!this.options.ignoreStandalone&&ja(e.body)&&Da(n.body)&&(Xt(e.body),hr(n.body))}else t.closeStrip.open&&Xt(e.body,null,!0);return o};kt.prototype.Decorator=kt.prototype.MustacheStatement=function(t){return t.strip};kt.prototype.PartialStatement=kt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function ja(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 Da(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 hr(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 Xt(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}}Lo.default=kt;Hf.exports=Lo.default});var zf=_(at=>{"use strict";at.__esModule=!0;at.SourceLocation=N0;at.id=M0;at.stripFlags=O0;at.stripComment=V0;at.preparePath=L0;at.prepareMustache=j0;at.prepareRawBlock=D0;at.prepareBlock=q0;at.prepareProgram=F0;at.preparePartialBlock=B0;function T0(t){return t&&t.__esModule?t:{default:t}}var A0=rt(),qa=T0(A0);function Fa(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new qa.default(t.path.original+" doesn't match "+e,r)}}function N0(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 M0(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function O0(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function V0(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function L0(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 qa.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 j0(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 D0(t,e,r,n){Fa(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 q0(t,e,r,n,i,o){n&&n.path&&Fa(t,n);var s=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,l=void 0;if(r){if(s)throw new qa.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 F0(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 B0(t,e,r,n){return Fa(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 Gf=_(zn=>{"use strict";zn.__esModule=!0;zn.parseWithoutProcessing=Uf;zn.parse=X0;function H0(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 W0=Df(),Ba=Wa(W0),z0=Wf(),U0=Wa(z0),G0=zf(),J0=H0(G0),K0=rt(),Wn=Wa(K0),Y0=Be();zn.parser=Ba.default;var jo={};Y0.extend(jo,J0);function Uf(t,e){if(t.type==="Program")return Q0(t),t;Ba.default.yy=jo,jo.locInfo=function(n){return new jo.SourceLocation(e&&e.srcName,n)};var r=Ba.default.parse(t);return r}function X0(t,e){var r=Uf(t,e),n=new U0.default(e);return n.accept(r)}function Q0(t){Ha(t)}function Ha(t){if(t!=null){if(Array.isArray(t)){t.forEach(Ha);return}if(typeof t=="object"){if(t.type==="PathExpression"){if(!Z0(t.depth))throw new Wn.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(t.parts))throw new Wn.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 Wn.default("Invalid AST: PathExpression.parts must only contain strings")}else if(t.type==="NumberLiteral"){if(typeof t.value!="number"||!isFinite(t.value))throw new Wn.default("Invalid AST: NumberLiteral.value must be a number")}else if(t.type==="BooleanLiteral"&&typeof t.value!="boolean")throw new Wn.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(t).forEach(function(r){r!=="loc"&&Ha(t[r])})}}}function Z0(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}});var Xf=_(Kn=>{"use strict";Kn.__esModule=!0;Kn.Compiler=za;Kn.precompile=n$;Kn.compile=i$;function Kf(t){return t&&t.__esModule?t:{default:t}}var e$=rt(),Gn=Kf(e$),Jn=Be(),t$=Va(),Un=Kf(t$),r$=[].slice;function za(){}za.prototype={compiler:za,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||!Yf(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=Jn.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 Gn.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){Jf(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 Gn.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){Jf(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 Gn.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,Un.default.helpers.simpleId(o))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],n=Un.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:r$.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=Un.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&Un.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&&!Un.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&&Jn.indexOf(i,e);if(i&&o>=0)return[r,o]}}};function n$(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new Gn.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 i$(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new Gn.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Jn.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 Yf(t,e){if(t===e)return!0;if(Jn.isArray(t)&&Jn.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!Yf(t[r],e[r]))return!1;return!0}}function Jf(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 Zf=_(Ua=>{var Qf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Ua.encode=function(t){if(0<=t&&t<Qf.length)return Qf[t];throw new TypeError("Must be between 0 and 63: "+t)};Ua.decode=function(t){var e=65,r=90,n=97,i=122,o=48,s=57,a=43,l=47,u=26,f=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+u:o<=t&&t<=s?t-o+f:t==a?62:t==l?63:-1}});var Ka=_(Ja=>{var ed=Zf(),Ga=5,td=1<<Ga,rd=td-1,nd=td;function o$(t){return t<0?(-t<<1)+1:(t<<1)+0}function s$(t){var e=(t&1)===1,r=t>>1;return e?-r:r}Ja.encode=function(e){var r="",n,i=o$(e);do n=i&rd,i>>>=Ga,i>0&&(n|=nd),r+=ed.encode(n);while(i>0);return r};Ja.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=ed.decode(e.charCodeAt(r++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(l&nd),l&=rd,o=o+(l<<s),s+=Ga}while(a);n.value=s$(o),n.rest=r}});var Kr=_(Ve=>{function a$(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Ve.getArg=a$;var id=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,l$=/^data:.+\,.+$/;function Yn(t){var e=t.match(id);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Ve.urlParse=Yn;function Gr(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}Ve.urlGenerate=Gr;function Ya(t){var e=t,r=Yn(t);if(r){if(!r.path)return t;e=r.path}for(var n=Ve.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,Gr(r)):e}Ve.normalize=Ya;function od(t,e){t===""&&(t="."),e===""&&(e=".");var r=Yn(e),n=Yn(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Gr(r);if(r||e.match(l$))return e;if(n&&!n.host&&!n.path)return n.host=e,Gr(n);var i=e.charAt(0)==="/"?e:Ya(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Gr(n)):i}Ve.join=od;Ve.isAbsolute=function(t){return t.charAt(0)==="/"||id.test(t)};function u$(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)}Ve.relative=u$;var sd=(function(){var t=Object.create(null);return!("__proto__"in t)})();function ad(t){return t}function c$(t){return ld(t)?"$"+t:t}Ve.toSetString=sd?ad:c$;function p$(t){return ld(t)?t.slice(1):t}Ve.fromSetString=sd?ad:p$;function ld(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 f$(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)}Ve.compareByOriginalPositions=f$;function d$(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)}Ve.compareByGeneratedPositionsDeflated=d$;function Jr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function h$(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)}Ve.compareByGeneratedPositionsInflated=h$;function m$(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Ve.parseSourceMapInput=m$;function g$(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=Yn(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=od(Gr(n),e)}return Ya(e)}Ve.computeSourceURL=g$});var Za=_(ud=>{var Xa=Kr(),Qa=Object.prototype.hasOwnProperty,mr=typeof Map<"u";function qt(){this._array=[],this._set=mr?new Map:Object.create(null)}qt.fromArray=function(e,r){for(var n=new qt,i=0,o=e.length;i<o;i++)n.add(e[i],r);return n};qt.prototype.size=function(){return mr?this._set.size:Object.getOwnPropertyNames(this._set).length};qt.prototype.add=function(e,r){var n=mr?e:Xa.toSetString(e),i=mr?this.has(e):Qa.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(e),i||(mr?this._set.set(e,o):this._set[n]=o)};qt.prototype.has=function(e){if(mr)return this._set.has(e);var r=Xa.toSetString(e);return Qa.call(this._set,r)};qt.prototype.indexOf=function(e){if(mr){var r=this._set.get(e);if(r>=0)return r}else{var n=Xa.toSetString(e);if(Qa.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};qt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};qt.prototype.toArray=function(){return this._array.slice()};ud.ArraySet=qt});var fd=_(pd=>{var cd=Kr();function y$(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,o=e.generatedColumn;return n>r||n==r&&o>=i||cd.compareByGeneratedPositionsInflated(t,e)<=0}function Do(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Do.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Do.prototype.add=function(e){y$(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Do.prototype.toArray=function(){return this._sorted||(this._array.sort(cd.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};pd.MappingList=Do});var el=_(dd=>{var Xn=Ka(),Ce=Kr(),qo=Za().ArraySet,v$=fd().MappingList;function lt(t){t||(t={}),this._file=Ce.getArg(t,"file",null),this._sourceRoot=Ce.getArg(t,"sourceRoot",null),this._skipValidation=Ce.getArg(t,"skipValidation",!1),this._sources=new qo,this._names=new qo,this._mappings=new v$,this._sourcesContents=null}lt.prototype._version=3;lt.fromSourceMap=function(e){var r=e.sourceRoot,n=new lt({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=Ce.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=Ce.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=e.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};lt.prototype.addMapping=function(e){var r=Ce.getArg(e,"generated"),n=Ce.getArg(e,"original",null),i=Ce.getArg(e,"source",null),o=Ce.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})};lt.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=Ce.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Ce.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Ce.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};lt.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=Ce.relative(o,i));var s=new qo,a=new qo;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=Ce.join(n,l.source)),o!=null&&(l.source=Ce.relative(o,l.source)),l.originalLine=u.line,l.originalColumn=u.column,u.name!=null&&(l.name=u.name))}var f=l.source;f!=null&&!s.has(f)&&s.add(f);var p=l.name;p!=null&&!a.has(p)&&a.add(p)},this),this._sources=s,this._names=a,e.sources.forEach(function(l){var u=e.sourceContentFor(l);u!=null&&(n!=null&&(l=Ce.join(n,l)),o!=null&&(l=Ce.relative(o,l)),this.setSourceContent(l,u))},this)};lt.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}))}};lt.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,o=0,s=0,a="",l,u,f,p,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(!Ce.compareByGeneratedPositionsInflated(u,d[m-1]))continue;l+=","}l+=Xn.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(p=this._sources.indexOf(u.source),l+=Xn.encode(p-s),s=p,l+=Xn.encode(u.originalLine-1-i),i=u.originalLine-1,l+=Xn.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(f=this._names.indexOf(u.name),l+=Xn.encode(f-o),o=f)),a+=l}return a};lt.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Ce.relative(r,n));var i=Ce.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};lt.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};lt.prototype.toString=function(){return JSON.stringify(this.toJSON())};dd.SourceMapGenerator=lt});var hd=_(gr=>{gr.GREATEST_LOWER_BOUND=1;gr.LEAST_UPPER_BOUND=2;function tl(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?tl(s,e,r,n,i,o):o==gr.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-t>1?tl(t,s,r,n,i,o):o==gr.LEAST_UPPER_BOUND?s:t<0?-1:t}gr.search=function(e,r,n,i){if(r.length===0)return-1;var o=tl(-1,r.length,e,r,n,i||gr.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o}});var gd=_(md=>{function rl(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function w$(t,e){return Math.round(t+Math.random()*(e-t))}function nl(t,e,r,n){if(r<n){var i=w$(r,n),o=r-1;rl(t,i,n);for(var s=t[n],a=r;a<n;a++)e(t[a],s)<=0&&(o+=1,rl(t,o,a));rl(t,o+1,a);var l=o+1;nl(t,e,r,l-1),nl(t,e,l+1,n)}}md.quickSort=function(t,e){nl(t,e,0,t.length-1)}});var vd=_(Fo=>{var B=Kr(),il=hd(),Yr=Za().ArraySet,b$=Ka(),Qn=gd().quickSort;function ge(t,e){var r=t;return typeof t=="string"&&(r=B.parseSourceMapInput(t)),r.sections!=null?new yt(r,e):new Ae(r,e)}ge.fromSourceMap=function(t,e){return Ae.fromSourceMap(t,e)};ge.prototype._version=3;ge.prototype.__generatedMappings=null;Object.defineProperty(ge.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});ge.prototype.__originalMappings=null;Object.defineProperty(ge.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});ge.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};ge.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};ge.GENERATED_ORDER=1;ge.ORIGINAL_ORDER=2;ge.GREATEST_LOWER_BOUND=1;ge.LEAST_UPPER_BOUND=2;ge.prototype.eachMapping=function(e,r,n){var i=r||null,o=n||ge.GENERATED_ORDER,s;switch(o){case ge.GENERATED_ORDER:s=this._generatedMappings;break;case ge.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=B.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)};ge.prototype.allGeneratedPositionsFor=function(e){var r=B.getArg(e,"line"),n={source:B.getArg(e,"source"),originalLine:r,originalColumn:B.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",B.compareByOriginalPositions,il.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:B.getArg(s,"generatedLine",null),column:B.getArg(s,"generatedColumn",null),lastColumn:B.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var l=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==l;)i.push({line:B.getArg(s,"generatedLine",null),column:B.getArg(s,"generatedColumn",null),lastColumn:B.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};Fo.SourceMapConsumer=ge;function Ae(t,e){var r=t;typeof t=="string"&&(r=B.parseSourceMapInput(t));var n=B.getArg(r,"version"),i=B.getArg(r,"sources"),o=B.getArg(r,"names",[]),s=B.getArg(r,"sourceRoot",null),a=B.getArg(r,"sourcesContent",null),l=B.getArg(r,"mappings"),u=B.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=B.normalize(s)),i=i.map(String).map(B.normalize).map(function(f){return s&&B.isAbsolute(s)&&B.isAbsolute(f)?B.relative(s,f):f}),this._names=Yr.fromArray(o.map(String),!0),this._sources=Yr.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return B.computeSourceURL(s,f,e)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=e,this.file=u}Ae.prototype=Object.create(ge.prototype);Ae.prototype.consumer=ge;Ae.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=B.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};Ae.fromSourceMap=function(e,r){var n=Object.create(Ae.prototype),i=n._names=Yr.fromArray(e._names.toArray(),!0),o=n._sources=Yr.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 B.computeSourceURL(n.sourceRoot,m,r)});for(var s=e._mappings.toArray().slice(),a=n.__generatedMappings=[],l=n.__originalMappings=[],u=0,f=s.length;u<f;u++){var p=s[u],d=new yd;d.generatedLine=p.generatedLine,d.generatedColumn=p.generatedColumn,p.source&&(d.source=o.indexOf(p.source),d.originalLine=p.originalLine,d.originalColumn=p.originalColumn,p.name&&(d.name=i.indexOf(p.name)),l.push(d)),a.push(d)}return Qn(n.__originalMappings,B.compareByOriginalPositions),n};Ae.prototype._version=3;Object.defineProperty(Ae.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function yd(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Ae.prototype._parseMappings=function(e,r){for(var n=1,i=0,o=0,s=0,a=0,l=0,u=e.length,f=0,p={},d={},m=[],g=[],y,w,b,M,k;f<u;)if(e.charAt(f)===";")n++,f++,i=0;else if(e.charAt(f)===",")f++;else{for(y=new yd,y.generatedLine=n,M=f;M<u&&!this._charIsMappingSeparator(e,M);M++);if(w=e.slice(f,M),b=p[w],b)f+=w.length;else{for(b=[];f<M;)b$.decode(e,f,d),k=d.value,f=d.rest,b.push(k);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");p[w]=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)}Qn(g,B.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,Qn(m,B.compareByOriginalPositions),this.__originalMappings=m};Ae.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 il.search(e,r,o,s)};Ae.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}};Ae.prototype.originalPositionFor=function(e){var r={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",B.compareByGeneratedPositionsDeflated,B.getArg(e,"bias",ge.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=B.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=B.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=B.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:B.getArg(i,"originalLine",null),column:B.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Ae.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};Ae.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=B.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=B.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.')};Ae.prototype.generatedPositionFor=function(e){var r=B.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:B.getArg(e,"line"),originalColumn:B.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",B.compareByOriginalPositions,B.getArg(e,"bias",ge.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:B.getArg(o,"generatedLine",null),column:B.getArg(o,"generatedColumn",null),lastColumn:B.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Fo.BasicSourceMapConsumer=Ae;function yt(t,e){var r=t;typeof t=="string"&&(r=B.parseSourceMapInput(t));var n=B.getArg(r,"version"),i=B.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Yr,this._names=new Yr;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=B.getArg(s,"offset"),l=B.getArg(a,"line"),u=B.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 ge(B.getArg(s,"map"),e)}})}yt.prototype=Object.create(ge.prototype);yt.prototype.constructor=ge;yt.prototype._version=3;Object.defineProperty(yt.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}});yt.prototype.originalPositionFor=function(e){var r={generatedLine:B.getArg(e,"line"),generatedColumn:B.getArg(e,"column")},n=il.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}};yt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};yt.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.')};yt.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(B.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}};yt.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=B.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 f={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(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}Qn(this.__generatedMappings,B.compareByGeneratedPositionsDeflated),Qn(this.__originalMappings,B.compareByOriginalPositions)};Fo.IndexedSourceMapConsumer=yt});var bd=_(wd=>{var $$=el().SourceMapGenerator,Bo=Kr(),x$=/(\r?\n)/,_$=10,Xr="$$$isSourceNode$$$";function nt(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[Xr]=!0,n!=null&&this.add(n)}nt.fromStringWithSourceMap=function(e,r,n){var i=new nt,o=e.split(x$),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,f=null;return r.eachMapping(function(d){if(f!==null)if(l<d.generatedLine)p(f,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,p(f,g),f=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}f=d},this),s<o.length&&(f&&p(f,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 p(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 nt(d.originalLine,d.originalColumn,g,m,d.name))}}};nt.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[Xr]||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};nt.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[Xr]||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};nt.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[Xr]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};nt.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};nt.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[Xr]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};nt.prototype.setSourceContent=function(e,r){this.sourceContents[Bo.toSetString(e)]=r};nt.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Xr]&&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]])};nt.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};nt.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new $$(e),i=!1,o=null,s=null,a=null,l=null;return this.walk(function(u,f){r.code+=u,f.source!==null&&f.line!==null&&f.column!==null?((o!==f.source||s!==f.line||a!==f.column||l!==f.name)&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name}),o=f.source,s=f.line,a=f.column,l=f.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var p=0,d=u.length;p<d;p++)u.charCodeAt(p)===_$?(r.line++,r.column=0,p+1===d?(o=null,i=!1):i&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name})):r.column++}),this.walkSourceContents(function(u,f){n.setSourceContent(u,f)}),{code:r.code,map:n}};wd.SourceNode=nt});var $d=_(Ho=>{Ho.SourceMapGenerator=el().SourceMapGenerator;Ho.SourceMapConsumer=vd().SourceMapConsumer;Ho.SourceNode=bd().SourceNode});var kd=_((Wo,Sd)=>{"use strict";Wo.__esModule=!0;var sl=Be(),yr=void 0;try{(typeof define!="function"||!define.amd)&&(xd=$d(),yr=xd.SourceNode)}catch{}var xd;yr||(yr=function(t,e,r,n){this.src="",n&&this.add(n)},yr.prototype={add:function(e){sl.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){sl.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function ol(t,e,r){if(sl.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 _d(t){this.srcFile=t,this.source=[]}_d.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 yr(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 yr?e:(e=ol(e,this,r),new yr(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=ol(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(ol(e[n],this));return r},generateArray:function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r}};Wo.default=_d;Sd.exports=Wo.default});var Rd=_((zo,Id)=>{"use strict";zo.__esModule=!0;function Pd(t){return t&&t.__esModule?t:{default:t}}var Cd=ko(),S$=rt(),al=Pd(S$),k$=Be(),C$=kd(),Ed=Pd(C$);function Qr(t){this.value=t}function Zr(){}Zr.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=Cd.COMPILER_REVISION,r=Cd.REVISION_CHANGES[e];return[e,r]},appendToBuffer:function(e,r,n){return k$.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 al.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
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
112
|
`),this.decorators.push(`}
|
|
113
113
|
`),this.decorators=this.decorators.merge()));var f=this.createFunctionContext(i);if(this.isChild)return f;var p={compiler:this.compilerInfo(),main:f};this.decorators&&(p.main_d=this.decorators,p.useDecorators=!0);var d=this.context,m=d.programs,g=d.decorators;for(l=0,u=m.length;l<u;l++)p[l]=m[l],g[l]&&(p[l+"_d"]=g[l],p.useDecorators=!0);return this.environment.usePartial&&(p.usePartial=!0),this.options.data&&(p.useData=!0),this.useDepths&&(p.useDepths=!0),this.useBlockParams&&(p.useBlockParams=!0),this.options.compat&&(p.compat=!0),i?p.compilerOptions=this.options:(p.compiler=JSON.stringify(p.compiler),this.source.currentLocation={start:{line:1,column:0}},p=this.objectLiteral(p),r.srcName?(p=p.toStringWithSourceMap({file:r.destName}),p.map=p.map&&p.map.toString()):p=p.toString()),p},preamble:function(){this.lastContext=0,this.source=new Ed.default(this.options.srcName),this.decorators=new Ed.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(","),`) {
|
|
@@ -119,39 +119,39 @@ Expecting `+Je.join(", ")+", got '"+(this.terminals_[R]||R)+"'":Y="Parse error o
|
|
|
119
119
|
}
|
|
120
120
|
return undefined
|
|
121
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(C$(this.options.strict&&o,this,r,n,e));return}for(var a=r.length,l=function(f){s.replaceStack(function(p){var d=s.nameLookup(p,r[f],e);return i?[" && ",d]:[" != null ? ",d," : ",p]})},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:Zr,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 Qr||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new Qr(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 sl.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Qr)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 Qr)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 Qr)return n.value;if(!r){if(!this.stackSlot)throw new sl.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 Qr?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 f=this.popStack(),p=this.popStack();(p||f)&&(i.fn=p||"container.noop",i.inverse=f||"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=Zr.RESERVED_WORDS={},r=0,n=t.length;r<n;r++)e[t[r]]=!0})();Zr.isValidJavaScriptVariableName=function(t){return!Zr.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function C$(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}Ho.default=Zr;Id.exports=Ho.default});var Nd=x((Wo,Ad)=>{"use strict";Wo.__esModule=!0;function Qn(t){return t&&t.__esModule?t:{default:t}}var E$=Of(),P$=Qn(E$),I$=Oa(),R$=Qn(I$),al=Gf(),ll=Xf(),T$=Rd(),A$=Qn(T$),N$=Mo(),M$=Qn(N$),O$=Ta(),V$=Qn(O$),L$=P$.default.create;function Td(){var t=L$();return t.compile=function(e,r){return ll.compile(e,r,t)},t.precompile=function(e,r){return ll.precompile(e,r,t)},t.AST=R$.default,t.Compiler=ll.Compiler,t.JavaScriptCompiler=A$.default,t.Parser=al.parser,t.parse=al.parse,t.parseWithoutProcessing=al.parseWithoutProcessing,t}var en=Td();en.create=Td;V$.default(en);en.Visitor=M$.default;en.default=en;Wo.default=en;Ad.exports=Wo.default});var Md=x(zo=>{"use strict";zo.__esModule=!0;zo.print=F$;zo.PrintVisitor=Se;function j$(t){return t&&t.__esModule?t:{default:t}}var D$=Mo(),q$=j$(D$);function F$(t){return new Se().accept(t)}function Se(){this.padding=0}Se.prototype=new q$.default;Se.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
|
|
123
|
-
`,e};Se.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};Se.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};Se.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};Se.prototype.BlockStatement=Se.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};Se.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+" }}")};Se.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+" }}")};Se.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};Se.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};Se.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};Se.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};Se.prototype.StringLiteral=function(t){return'"'+t.value+'"'};Se.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};Se.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};Se.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Se.prototype.NullLiteral=function(){return"NULL"};Se.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(", ")+"}"};Se.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var jd=
|
|
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(E$(this.options.strict&&o,this,r,n,e));return}for(var a=r.length,l=function(f){s.replaceStack(function(p){var d=s.nameLookup(p,r[f],e);return i?[" && ",d]:[" != null ? ",d," : ",p]})},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:Zr,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 Qr||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new Qr(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 al.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Qr)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 Qr)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 Qr)return n.value;if(!r){if(!this.stackSlot)throw new al.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 Qr?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 f=this.popStack(),p=this.popStack();(p||f)&&(i.fn=p||"container.noop",i.inverse=f||"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=Zr.RESERVED_WORDS={},r=0,n=t.length;r<n;r++)e[t[r]]=!0})();Zr.isValidJavaScriptVariableName=function(t){return!Zr.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function E$(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}zo.default=Zr;Id.exports=zo.default});var Nd=_((Uo,Ad)=>{"use strict";Uo.__esModule=!0;function Zn(t){return t&&t.__esModule?t:{default:t}}var P$=Of(),I$=Zn(P$),R$=Va(),T$=Zn(R$),ll=Gf(),ul=Xf(),A$=Rd(),N$=Zn(A$),M$=Vo(),O$=Zn(M$),V$=Aa(),L$=Zn(V$),j$=I$.default.create;function Td(){var t=j$();return t.compile=function(e,r){return ul.compile(e,r,t)},t.precompile=function(e,r){return ul.precompile(e,r,t)},t.AST=T$.default,t.Compiler=ul.Compiler,t.JavaScriptCompiler=N$.default,t.Parser=ll.parser,t.parse=ll.parse,t.parseWithoutProcessing=ll.parseWithoutProcessing,t}var en=Td();en.create=Td;L$.default(en);en.Visitor=O$.default;en.default=en;Uo.default=en;Ad.exports=Uo.default});var Md=_(Go=>{"use strict";Go.__esModule=!0;Go.print=B$;Go.PrintVisitor=Se;function D$(t){return t&&t.__esModule?t:{default:t}}var q$=Vo(),F$=D$(q$);function B$(t){return new Se().accept(t)}function Se(){this.padding=0}Se.prototype=new F$.default;Se.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
|
|
123
|
+
`,e};Se.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};Se.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};Se.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};Se.prototype.BlockStatement=Se.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};Se.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+" }}")};Se.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+" }}")};Se.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};Se.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};Se.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};Se.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};Se.prototype.StringLiteral=function(t){return'"'+t.value+'"'};Se.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};Se.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};Se.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Se.prototype.NullLiteral=function(){return"NULL"};Se.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(", ")+"}"};Se.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var jd=_((VR,Ld)=>{var Jo=Nd().default,Vd=Md();Jo.PrintVisitor=Vd.PrintVisitor;Jo.print=Vd.print;Ld.exports=Jo;function Od(t,e){var r=jr("fs"),n=r.readFileSync(e,"utf8");t.exports=Jo.compile(n)}typeof jr<"u"&&jr.extensions&&(jr.extensions[".handlebars"]=Od,jr.extensions[".hbs"]=Od)});import{readFile as H$}from"node:fs/promises";import{resolve as W$}from"node:path";async function vt(t,e,r){let n=W$(t,e),i=Dd.get(n);if(!i){let o=await H$(n,"utf-8");i=qd.default.compile(o,{noEscape:!0}),Dd.set(n,i)}return i(r)}var qd,Dd,ei=X(()=>{"use strict";qd=ip(jd(),1),Dd=new Map});var cl=X(()=>{"use strict";ni()});import{readFile as Fd,writeFile as z$,mkdir as U$,stat as G$,rm as J$,unlink as K$}from"node:fs/promises";import{resolve as Ft}from"node:path";async function Bd(t){try{return await G$(t),!0}catch{return!1}}async function pl(t){let e=Ft(t,"..");for(let r of[Ft(t,"runtime"),Ft(e,"components"),Ft(e,"runtime")])await Bd(r)&&await J$(r,{recursive:!0,force:!0});for(let r of["extensions.tsx","extensions.ts","contracts.ts"]){let n=Ft(t,r);await Bd(n)&&await K$(n)}}function Y$(t){return t.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function Hd(t,e,r){let n=Te(t),i=e.generated.reactDir,o=ti(r??(e.rendererTemplatesDir?Ft(n,e.rendererTemplatesDir):void 0)),s=tn();await U$(i,{recursive:!0}),await pl(i);let a=await Fd(Ft(s,"types.ts"),"utf-8"),l=await Fd(Ft(s,"style.ts"),"utf-8"),u=await vt(o,"dispatch.ts.hbs",{}),f=Y$(u),p=await vt(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:l.trim(),dispatchBody:f.trim()}),d=Ft(i,"runtime.ts");return await z$(d,p,"utf-8"),{runtimePath:d}}var Wd=X(()=>{"use strict";Ot();ei();cl()});var Ud={};lr(Ud,{renderReactRuntime:()=>ix});import{writeFile as zd,stat as X$,unlink as Q$}from"node:fs/promises";import{relative as Z$,resolve as rn}from"node:path";async function ex(t){try{return await X$(t),!0}catch{return!1}}async function tx(t,e,r,n){let i=await ii(r,t),o=await vt(ti(n),"theme.css.hbs",{themeCss:i});await zd(e,o,"utf-8")}async function rx(t){let e=rn(t,"..");for(let r of["theme.css","contracts.ts","view-bridge.generated.ts"]){let n=rn(e,r);await ex(n)&&await Q$(n)}}async function nx(t,e){let r=Te(t),n=e.generated.reactDir,i=rn(r,"src/components/extensions.tsx"),o=Z$(n,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=rn(n,"extensions.generated.ts");return await zd(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
|
|
124
124
|
export * from '${s}';
|
|
125
|
-
`,"utf-8"),a}async function
|
|
126
|
-
`)}var
|
|
125
|
+
`,"utf-8"),a}async function ix(t,e){let r=Te(t),n=e.rendererTemplatesDir?rn(r,e.rendererTemplatesDir):void 0,i=e.generated.reactDir;await rx(i),await pl(i);let{runtimePath:o}=await Hd(t,e,n),s=await nx(t,e),a=rn(i,"theme.css");await tx(t,a,e,n),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var Gd=X(()=>{"use strict";Ot();Ko();ei();cl();Wd()});function ox(t,e){return t.entries.find(n=>n.path===e)?.value??""}function sx(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 vr(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function Jd(t){return sx(t)??(t?`Color(${JSON.stringify(t)})`:null)}function Kd(t,e){let r=[];for(let[n,i]of Object.entries(t)){let o=ox(e,i.ref);if(o)switch(n){case"background":case"foreground":{let s=Jd(o);s&&r.push({property:n,swiftValue:s});break}case"padding":{let s=vr(o);if(s!==null)r.push({property:n,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let l=vr(a[0]),u=vr(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=vr(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=vr(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=vr(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=Jd(o);s&&r.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=vr(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"fontWeight":{let s=ax[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 Xd(t,e){if(t.length===0)return`${e}VcVariantStyle()`;let n=[...t].sort((i,o)=>Yd.indexOf(i.property)-Yd.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${e}VcVariantStyle(${n})`}function lx(t,e){return{...t,...e}}function Qd(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=Kd(i,e);o.length!==0&&r.push(` ${JSON.stringify(n)}: ${Xd(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=lx(s,l),f=Kd(u,e),p=Xd(f," ");r.push(` ${JSON.stringify(a)}: ${p.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 ax,Yd,Zd=X(()=>{"use strict";ax={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};Yd=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as ux}from"node:path";function px(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(`${cx}: element "${e}" must have exactly one of "container" or "leaf"`);(r.container==="vstack"||r.container==="hstack")&&r.spacingProp}}async function eh(t){if(!t&&fl)return fl;let e=t??ux(Ee(),"renderers/swiftui/elements.yaml"),r=await Br(e);return px(r),t||(fl=r),r}var cx,fl,th=X(()=>{"use strict";Vt();lo();cx="renderers/swiftui/elements.yaml",fl=null});function fx(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 rh(t,e){let r={};for(let[n,i]of Object.entries(t))r[n]=fx(e,i.ref);return r}function dx(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 Bt(t){let e=t.theme.defaults[t.elementName]??{},r=t.variantLiteral?t.theme.variants[t.elementName]?.[t.variantLiteral]??{}:{};return{...rh(e,t.tokens),...rh(r,t.tokens),...dx(t.instanceLiterals)}}var dl=X(()=>{"use strict"});function it(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 hl(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 hx(t){let e=it(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=it(r[0]),i=it(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function mx(t){if(t===""||t===null||t===void 0)return null;let e=it(t);return e!==null?`.font(.system(size: ${e}))`:typeof t=="string"&&!t.endsWith("px")?`.font(.system(size: ${JSON.stringify(t)}))`:null}function gx(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 ml(t){let e=[],r=t.foreground;if(typeof r=="string"){let V=hl(r);e.push(V?`.foregroundStyle(${V})`:`.foregroundStyle(Color(${JSON.stringify(r)}))`)}let n=t.size??t.fontSize;if(n!==void 0&&n!==""){let V=mx(n);V&&e.push(V)}let i=gx(t.fontWeight??t.weight??"");i&&e.push(i);let o=t.padding??"",s=hx(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,f=t.maxWidth,p=t.maxHeight,d=t.margin,m=d==="0 auto",g=a==="100%"||a==="fill"||f==="fill",y=l==="100%"||l==="fill"||u==="100vh",w=f==="fill"?null:f!==void 0?it(f):null;g&&y?w!==null?e.push(`.frame(maxWidth: ${w}, maxHeight: .infinity, alignment: .topLeading)`):e.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):g?w!==null?e.push(`.frame(maxWidth: ${w}, 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 V=hl(b);e.push(V?`.background(${V})`:`.background(Color(${JSON.stringify(b)}))`)}let M=it(t.radius??"");M!==null&&e.push(`.clipShape(RoundedRectangle(cornerRadius: ${M}))`),(t.shadow===!0||t.shadow==="true")&&e.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let k=t.border,R=t.borderColor;if(k||R){let V=it(k??"1px")??1,z=typeof R=="string"?hl(R)??"Color.gray":"Color.gray";e.push(`.overlay(RoundedRectangle(cornerRadius: ${M??0}).stroke(${z}, lineWidth: ${V}))`)}if(!g){if(typeof a=="number")e.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let V=it(a);V!==null&&e.push(`.frame(width: ${V})`)}if(f!==void 0&&f!=="fill"){let V=it(f);V!==null&&e.push(`.frame(maxWidth: ${V})`)}}if(!y){if(typeof l=="number")e.push(`.frame(height: ${l})`);else if(l!==void 0&&l!=="wrap"){let V=it(l);V!==null&&e.push(`.frame(height: ${V})`)}if(u!==void 0&&u!=="100vh")if(typeof u=="number")e.push(`.frame(minHeight: ${u})`);else{let V=it(u);V!==null&&e.push(`.frame(minHeight: ${V})`)}if(p!==void 0&&p!=="fill"){let V=it(p);V!==null&&e.push(`.frame(maxHeight: ${V})`)}}if(m)e.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof d=="number")e.push(`.padding(${d})`);else if(d!==void 0){let V=it(d);V!==null&&e.push(`.padding(${V})`)}let T=t.opacity;return typeof T=="number"&&T<1&&e.push(`.opacity(${T})`),e}function He(t,e,r){if(e.length===0)return t;let n=" ".repeat(r);return`${t}
|
|
127
127
|
${e.map(i=>`${n}${i}`).join(`
|
|
128
|
-
`)}`}var nh=X(()=>{"use strict"});function F(t){return" ".repeat(t)}function
|
|
128
|
+
`)}`}var nh=X(()=>{"use strict"});function F(t){return" ".repeat(t)}function Yo(t,e,r){let i=t.entries.find(f=>f.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 sh(t,e,r,n,i){let o=`${F(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`;return t.map(a=>{if(a.kind==="map"){let u=a,f=u.item,p=r(u.body,e+2,f);p+=`
|
|
129
129
|
${o}`;let d=Ke(u.source,n,i);return`${F(e+2)}ForEach(${d}, id: \\.id) { ${f} in
|
|
130
130
|
${p}
|
|
131
131
|
${F(e+2)}}`}let l="";return a.kind==="text"?l=`${F(e+2)}Text(${JSON.stringify(a.value)})`:a.kind==="binding"?l=`${F(e+2)}Text(${Ke(a,n,i)})`:l=r(a,e+2,i),l?`${l}
|
|
132
132
|
${o}`:""}).filter(Boolean).join(`
|
|
133
|
-
`)}function de(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 ah(t){let e={};for(let[r,n]of Object.entries(t)){if(r==="variant"||r==="id"||!Fr.has(r))continue;let i=de(t,r);i!==void 0&&(e[r]=i)}return e}function lh(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
|
|
133
|
+
`)}function de(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 ah(t){let e={};for(let[r,n]of Object.entries(t)){if(r==="variant"||r==="id"||!Fr.has(r))continue;let i=de(t,r);i!==void 0&&(e[r]=i)}return e}function lh(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 yx(t,e,r){let n=t.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?Ke(n,e,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\\(${Ke(s,e,r)})`).join("")}"`:null}function vx(t,e,r,n){let i=r.map.elements[t],o=de(e,"variant"),s=ah(e);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],lh(e)){let u=yx(e,r,n),f=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(t)}, variant: ${u}))`,p=Bt({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s}),d=ml(p),m=d.filter(y=>y.startsWith(".padding")),g=d.filter(y=>!y.startsWith(".padding"));return[...m,f,...g]}let l=Bt({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return ml(l)}function wx(t){return[]}function bx(t,e,r,n){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Ke(i,e,r);return`${F(n+1)}ForEach(${o}, id: \\.value) { option in
|
|
134
134
|
${F(n+2)}Button(option.label) {}
|
|
135
135
|
${F(n+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${F(n+1)}Button(${JSON.stringify(s.label)}) {}`).join(`
|
|
136
|
-
`):`${F(n+1)}Button("--") {}`}function
|
|
137
|
-
`)}function
|
|
136
|
+
`):`${F(n+1)}Button("--") {}`}function $x(t,e,r){let n=t.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${Ke(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 Ke(t,e,r){let n=t.scope??r??e.propsRoot??"vm";return t.path?`${n}.${t.path}`:n}function ih(t,e,r){let n=r??e.propsRoot??"vm",i=t.value,o=t.onChange,s=o!==void 0&&typeof o=="object"&&o!==null&&"kind"in o&&o.kind==="action",a;return i&&typeof i=="object"&&"kind"in i&&i.kind==="binding"?a=Ke(i,e,r):typeof i=="string"?a=JSON.stringify(i):a='""',{valueExpr:a,hasOnChange:s}}function oh(t,e,r){for(let n of t){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return Ke(n,e,r)}return null}function uh(t,e,r,n,i){return t.map(s=>s.kind==="map"?oi(s,e,r,n):s.kind==="text"?`${F(e)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?`${F(e)}Text(${Ke(s,n,i)})`:r(s,e,i)).filter(Boolean).join(`
|
|
137
|
+
`)}function oi(t,e,r,n){let i=t.item,o=r(t.body,e+2,i),s=Ke(t.source,n,i);return`${F(e)}ForEach(${s}, id: \\.id) { ${i} in
|
|
138
138
|
${o}
|
|
139
|
-
${F(e)}}`}function
|
|
139
|
+
${F(e)}}`}function xx(t,e,r,n,i,o){let s=F(r);if(e.leaf==="text"){let a=oh(t.children,i,n);if(!a)return`${s}Text("")`;let l=`${s}Text(${a})`,u=o.map(f=>`${s}${f}`);return[l,...u].join(`
|
|
140
140
|
`)}if(e.leaf==="button"){let a=de(t.props,"label"),u=oh(t.children,i,n)??(typeof a=="string"?JSON.stringify(a):'"Button"'),f=`${s}Button(${u}) {}`,p=o.map(d=>`${s}${d}`);return[f,...p].join(`
|
|
141
|
-
`)}if(e.leaf==="textfield"){let a=de(t.props,"placeholder"),l=typeof a=="string"?JSON.stringify(a):'""',u=
|
|
142
|
-
`)}if(e.leaf==="texteditor"){let a=de(t.props,"placeholder"),l=typeof a=="string"?JSON.stringify(a):'""',u=
|
|
143
|
-
`)}if(e.leaf==="picker"){let a=
|
|
141
|
+
`)}if(e.leaf==="textfield"){let a=de(t.props,"placeholder"),l=typeof a=="string"?JSON.stringify(a):'""',u=Yo(i.tokens,"ui.text-muted","#6b7280"),{valueExpr:f,hasOnChange:p}=ih(t.props,i,n),d=p?`.init(get: { ${f} }, set: { _ in })`:`.constant(${f})`,m=`${s}TextField("", text: ${d}, prompt: Text(${l}).foregroundStyle(${u}))`,y=[...o,...wx(t.name)].map(w=>`${s}${w}`);return[m,...y].join(`
|
|
142
|
+
`)}if(e.leaf==="texteditor"){let a=de(t.props,"placeholder"),l=typeof a=="string"?JSON.stringify(a):'""',u=Yo(i.tokens,"ui.text-muted","#6b7280"),p=o.find(k=>k.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",{valueExpr:d,hasOnChange:m}=ih(t.props,i,n),g=m?`.init(get: { ${d} }, set: { _ in })`:`.constant(${d})`,y=o.filter(k=>k.startsWith(".foregroundStyle(")||k.startsWith(".font(")||k.startsWith(".fontWeight(")),w=o.filter(k=>!k.startsWith(".foregroundStyle(")&&!k.startsWith(".font(")&&!k.startsWith(".fontWeight(")&&!k.startsWith(".frame(minHeight:")),b=y.map(k=>`${s} ${k}`),M=w.map(k=>`${s}${k}`);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: ${g})`,`${s} .scrollContentBackground(.hidden)`,...b,`${s}}`,`${s}.frame(minHeight: ${p})`,...M].join(`
|
|
143
|
+
`)}if(e.leaf==="picker"){let a=Yo(i.tokens,"ui.text","#111827"),l=Yo(i.tokens,"ui.text-muted","#6b7280"),u=bx(t.props,i,n,r),f=$x(t.props,i,n),p=o.filter(y=>!y.startsWith(".frame")),d=de(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(${f})`,`${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)`,...p.map(y=>`${s} ${y}`),`${s}}`,m,`${s}.frame(minHeight: 42)`,`${s}.frame(maxWidth: .infinity)`].join(`
|
|
144
144
|
`)}if(e.leaf==="spacer")return`${s}Spacer()`;if(e.leaf==="divider")return`${s}Divider()`;if(e.leaf==="image"){let a=de(t.props,"src")??de(t.props,"name"),u=`${s}Image(systemName: ${JSON.stringify(typeof a=="string"?a:"photo")})`,f=o.map(p=>`${s}${p}`);return[u,...f].join(`
|
|
145
145
|
`)}if(e.leaf==="progressview"){let a=`${s}ProgressView()`,l=o.map(u=>`${s}${u}`);return[a,...l].join(`
|
|
146
146
|
`)}if(e.leaf==="toggle"){let a=de(t.props,"label")??"",l=`${s}Toggle(${JSON.stringify(a)}, isOn: .constant(false))`,u=o.map(f=>`${s}${f}`);return[l,...u].join(`
|
|
147
|
-
`)}return`${s}Text("/* unsupported leaf: ${t.name} */")`}function
|
|
147
|
+
`)}return`${s}Text("/* unsupported leaf: ${t.name} */")`}function _x(t,e,r,n,i,o,s){let a=uh(t.children,r+2,i,o,n);if(e.container==="vstack"){let u=e.spacingProp?de(t.props,e.spacingProp):void 0,f=typeof u=="number"?u:0,p=`${F(r+1)}VStack(alignment: .leading, spacing: ${f}) {
|
|
148
148
|
${a}
|
|
149
|
-
${F(r+1)}}`;return He(p,s,r+1)}if(e.container==="hstack"){let u=e.spacingProp?de(t.props,e.spacingProp):void 0,f=typeof u=="number"?u:0,p=de(t.props,"align"),d=de(t.props,"height"),m=p==="center"||typeof d=="number"?".center":".top",g=de(t.props,"justify"),y=de(t.props,"flex"),
|
|
150
|
-
`)}}else if(
|
|
151
|
-
`);let
|
|
152
|
-
${
|
|
153
|
-
${F(r+1)}}`;return He(
|
|
154
|
-
${
|
|
149
|
+
${F(r+1)}}`;return He(p,s,r+1)}if(e.container==="hstack"){let u=e.spacingProp?de(t.props,e.spacingProp):void 0,f=typeof u=="number"?u:0,p=de(t.props,"align"),d=de(t.props,"height"),m=p==="center"||typeof d=="number"?".center":".top",g=de(t.props,"justify"),y=de(t.props,"flex"),w=de(t.props,"wrap"),M=t.name==="TableHeader"||t.name==="TableRow"||g!==void 0||typeof y=="number",k=g==="end"?".trailing":g==="center"?".center":".leading",R=[];M&&R.push(`.frame(maxWidth: .infinity, alignment: ${k})`),typeof d=="number"&&R.push(`.frame(height: ${d})`);let T=a;if(g==="between"){let z=t.children.map(ie=>ie.kind==="map"?oi(ie,r+2,i,o):ie.kind==="text"?`${F(r+2)}Text(${JSON.stringify(ie.value)})`:ie.kind==="binding"?`${F(r+2)}Text(${Ke(ie,o,n)})`:i(ie,r+2,n)).filter(Boolean);if(z.length>=2){let ie=z[0],we=z.slice(1);T=[ie,`${F(r+2)}Spacer()`,...we].join(`
|
|
150
|
+
`)}}else if(w===!0){T=t.children.map(ie=>{if(ie.kind==="map")return oi(ie,r+2,i,o);if(ie.kind==="text")return`${F(r+2)}Text(${JSON.stringify(ie.value)})`;if(ie.kind==="binding")return`${F(r+2)}Text(${Ke(ie,o,n)})`;let we=i(ie,r+2,n);return we||""}).filter(Boolean).join(`
|
|
151
|
+
`);let z=`${F(r+1)}FlowLayout(spacing: ${f}) {
|
|
152
|
+
${T}
|
|
153
|
+
${F(r+1)}}`;return He(z,[...s,...R],r+1)}let V=`${F(r+1)}HStack(alignment: ${m}, spacing: ${f}) {
|
|
154
|
+
${T}
|
|
155
155
|
${F(r+1)}}`;return He(V,[...s,...R],r+1)}if(e.container==="group"){let u=a?`${F(r+1)}VStack(alignment: .leading, spacing: 0) {
|
|
156
156
|
${a}
|
|
157
157
|
${F(r+1)}}`:`${F(r+1)}VStack { EmptyView() }`;return He(u,s,r+1)}if(e.container==="navstack")return He(a,s,r+1);if(e.container==="scrollview"){let u=`${F(r+1)}ScrollView {
|
|
@@ -160,7 +160,7 @@ ${F(r+1)}}`;return He(u,s,r+1)}if(e.container==="field"){let u=de(t.props,"label
|
|
|
160
160
|
${F(r+2)}Text(${JSON.stringify(u)})
|
|
161
161
|
${F(r+2)} .applyVcStyle(VcTheme.resolve("Text", variant: "field-label"))`:"",m=`${F(r+1)}VStack(alignment: .leading, spacing: ${p}) {${d}
|
|
162
162
|
${a}
|
|
163
|
-
${F(r+1)}}`;return He(m,s,r+1)}if(e.container==="tablestack"){let u=de(t.props,"separator"),f=de(t.props,"separatorColor"),p=typeof u=="number"&&u>0,d=t.children.map(y=>y.kind==="map"?
|
|
163
|
+
${F(r+1)}}`;return He(m,s,r+1)}if(e.container==="tablestack"){let u=de(t.props,"separator"),f=de(t.props,"separatorColor"),p=typeof u=="number"&&u>0,d=t.children.map(y=>y.kind==="map"?oi(y,r+2,i,o):i(y,r+2,n)).filter(Boolean),m;if(p){let w=gl(t.name,t.props,o).separatorColor??f,b="Color.gray.opacity(0.2)";if(typeof w=="string"){let R=w.match(/^#([0-9a-fA-F]{6})$/);if(R){let T=parseInt(R[1].slice(0,2),16)/255,V=parseInt(R[1].slice(2,4),16)/255,z=parseInt(R[1].slice(4,6),16)/255;b=`Color(red: ${T}, green: ${V}, blue: ${z})`}}let M=u,k=M===1?`${F(r+2)}Divider().overlay(${b})`:`${F(r+2)}Rectangle().fill(${b}).frame(height: ${M})`;m=d.flatMap((R,T)=>T<d.length-1?[R,k]:[R])}else m=d;let g=`${F(r+1)}VStack(alignment: .leading, spacing: 0) {
|
|
164
164
|
${m.join(`
|
|
165
165
|
`)}
|
|
166
166
|
${F(r+1)}}`;return He(g,s,r+1)}if(e.container==="cellgroup"){let u=de(t.props,"width"),f=de(t.props,"flex"),p=de(t.props,"align"),d=p==="end"?".trailing":p==="center"?".center":".leading",m=typeof f=="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?`${F(r+1)}Group {
|
|
@@ -168,28 +168,28 @@ ${a}
|
|
|
168
168
|
${F(r+2)}.frame(maxWidth: .infinity, alignment: ${d})
|
|
169
169
|
${F(r+1)}}`:`${F(r+1)}Group { EmptyView() }`;return He(y,g,r+1)}let l=a?`${F(r+1)}Group {
|
|
170
170
|
${a}
|
|
171
|
-
${F(r+1)}}`:`${F(r+1)}Group { EmptyView() }`;return He(l,s,r+1)}function
|
|
171
|
+
${F(r+1)}}`:`${F(r+1)}Group { EmptyView() }`;return He(l,s,r+1)}function gl(t,e,r){let n=de(e,"variant"),i=ah(e);return Bt({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function Sx(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 kx(t,e,r,n,i,o){let s=vx(t.name,t.props,o,n);if(e.leaf)return xx(t,e,r,n,o,s);if(e.container==="group"&&!lh(t.props)){let a=gl(t.name,t.props,o),l=a.display,u=a.gridTemplateColumns,f=a.flexDirection;if(l==="grid"&&u){let p=Sx(u);if(p?.kind==="adaptive")return Cx(t,r,n,i,o,s,p.minWidth);if(p?.kind==="equal-columns")return Ex(t,r,n,i,o,s,p.count);if(p?.kind==="fixed-columns")return Ix(t,r,n,i,o,s,p.widths)}if(l==="flex"&&f==="row"){let p=uh(t.children,r+2,i,o,n),d=de(t.props,"gap"),m=typeof d=="number"?d:typeof a.gap=="number"?a.gap:0,g=`${F(r+1)}HStack(alignment: .top, spacing: ${m}) {
|
|
172
172
|
${p}
|
|
173
|
-
${F(r+1)}}`;return He(g,s,r+1)}}if(e.container)return
|
|
173
|
+
${F(r+1)}}`;return He(g,s,r+1)}}if(e.container)return _x(t,e,r,n,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${t.name}`)}function Cx(t,e,r,n,i,o,s){let a=de(t.props,"gap"),l=typeof a=="number"?a:16,u=sh(t.children,e,n,i,r),f=`${F(e+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${l}) {
|
|
174
174
|
${u}
|
|
175
175
|
${F(e+1)}}
|
|
176
|
-
${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return He(f,o,e+1)}function
|
|
176
|
+
${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return He(f,o,e+1)}function Ex(t,e,r,n,i,o,s){let a=de(t.props,"gap"),l=typeof a=="number"?a:16,u=`Array(repeating: GridItem(.flexible(), spacing: ${l}), count: ${s})`,f=sh(t.children,e,n,i,r),p=`${F(e+1)}LazyVGrid(columns: ${u}, spacing: ${l}) {
|
|
177
177
|
${f}
|
|
178
178
|
${F(e+1)}}
|
|
179
|
-
${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return He(p,o,e+1)}function
|
|
179
|
+
${F(e+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return He(p,o,e+1)}function Px(t,e){if(t.kind!=="component")return null;let n=gl(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 Ix(t,e,r,n,i,o,s){let a=t.children,l=[];for(let p=0;p<a.length;p++){let d=a[p],m="";if(d.kind==="map"?m=oi(d,e+2,n,i):d.kind==="text"?m=`${F(e+2)}Text(${JSON.stringify(d.value)})`:d.kind==="binding"?m=`${F(e+2)}Text(${Ke(d,i,r)})`:m=n(d,e+2,r),!m)continue;let g=s[p],y=g?.match(/^(\d+)px$/);if(y){m+=`
|
|
180
180
|
${F(e+2)}.frame(width: ${Number(y[1])}, alignment: .topLeading)`,m+=`
|
|
181
|
-
${F(e+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let
|
|
182
|
-
${F(e+2)}.background(${
|
|
181
|
+
${F(e+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let w=Px(d,i);w&&(m+=`
|
|
182
|
+
${F(e+2)}.background(${w})`)}else g==="1fr"&&(m+=`
|
|
183
183
|
${F(e+3)}.frame(maxWidth: .infinity, alignment: .topLeading)`,m=`${F(e+2)}ScrollView {
|
|
184
184
|
${m}
|
|
185
185
|
${F(e+2)}}`,m+=`
|
|
186
186
|
${F(e+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`);l.push(m)}let u=l.join(`
|
|
187
187
|
`),f=`${F(e+1)}HStack(spacing: 0) {
|
|
188
188
|
${u}
|
|
189
|
-
${F(e+1)}}`;return He(f,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],e+1)}function
|
|
189
|
+
${F(e+1)}}`;return He(f,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],e+1)}function Rx(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}: ${Ke(a,n,r)}`:`${s}: ${JSON.stringify(a)}`),o=i.length>0?`(${i.join(", ")})`:"()";return`${F(e)}${t.name}${o}`}function Tx(t){let e=(r,n,i)=>{if(r.kind==="viewRef")return Rx(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 kx(r,t.map.elements[r.name],n,i,e,t)};return e}function ch(t,e,r=2){let n=Tx(e);if(t.kind!=="component")throw new Error("SwiftUI lowering root must be a component node");return n(t,r)}var ph=X(()=>{"use strict";mt();dl();nh()});var dh={};lr(dh,{renderSwiftComponent:()=>Xo});function fh(t){let e=t.match(/^(\w+)\[\]$/);return e?`[${fh(e[1])}]`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Bool":t}function Ax(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=fh(a);return` let ${s}: ${l}`}).join(`
|
|
190
190
|
`)}
|
|
191
191
|
`:` let props: ${t.propsType}
|
|
192
|
-
`}function
|
|
192
|
+
`}function Nx(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 Xo(t,e){let r=await eh(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:Nx(t)},s=ch(t.root,o,4),a=Ax(t),l=!t.isPartial&&t.viewModel?` let vm: ${t.viewModel}
|
|
193
193
|
`:"";return`/**
|
|
194
194
|
* Auto-generated SwiftUI view from ${t.source}
|
|
195
195
|
* DO NOT EDIT \u2014 prototype SwiftUI lowering (#21)
|
|
@@ -201,10 +201,10 @@ ${l}${a} var body: some View {
|
|
|
201
201
|
${s}
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
`}var
|
|
204
|
+
`}var yl=X(()=>{"use strict";th();ph()});import{readFile as Mx,stat as Ox}from"node:fs/promises";import{resolve as hh}from"node:path";function mh(){return"views/preview"}function Vx(t){return`${t.charAt(0).toLowerCase()}${t.slice(1)}Mock`}function ai(t,e,r){let n=Te(t),i=e.preview?.mocksDir??mh();return hh(n,i,`${r}.mock.yaml`)}function Lx(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function jx(t,e){if(!Lx(t))throw new Qo(`${e} must be a YAML object (ViewModel fields at the root)`);return t}async function li(t){let e;try{e=await Mx(t,"utf-8")}catch{throw new Qo(`Preview mock not found: ${t}`)}let r=ht.load(e);return jx(r,t)}function Dx(t,e){let r=Vx(t);return`/** Auto-built from views/preview/${t}.mock.yaml \u2014 preview / example only */
|
|
205
205
|
export const ${r} = ${JSON.stringify(e,null,2)};
|
|
206
|
-
`}async function gh(t,e,r){let n=
|
|
207
|
-
`,f=
|
|
206
|
+
`}async function gh(t,e,r){let n=ai(t,e,r),i=await li(n);return Dx(r,i)}function yh(t){if(!t.startsWith(si))return null;let e=t.slice(si.length);return e.length>0?e:null}async function vh(t,e){let r=Te(t),n=e.preview?.mocksDir??mh();return hh(r,n)}async function Zo(t){try{return await Ox(t),!0}catch{return!1}}var si,Qo,es=X(()=>{"use strict";Dr();Ot();si="view-contracts:preview/mock/",Qo=class extends Error{constructor(e){super(e),this.name="PreviewMockError"}}});var bh={};lr(bh,{renderSwiftUIRuntime:()=>Bx});import{mkdir as qx,writeFile as wr}from"node:fs/promises";import{resolve as Ht}from"node:path";function wh(){return Ht(Ee(),"renderers/swiftui/templates")}async function Bx(t,e,r,n,i){let o=Ht(e.generated.reactDir,"../swiftui");if(await qx(o,{recursive:!0}),n?await wr(Ht(o,"VcTheme.swift"),Qd(n.theme,n.tokens),"utf-8"):await wr(Ht(o,"VcTheme.swift"),await vt(wh(),"VcTheme.swift.hbs",{}),"utf-8"),await wr(Ht(o,"FlowLayout.swift"),Fx,"utf-8"),i&&n){for(let s of i.partials)try{let a=await Xo(s,{theme:n.theme,tokens:n.tokens}),l=Ht(o,`${s.exportName}.generated.swift`);await wr(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 Xo(a,{theme:n.theme,tokens:n.tokens}),u=Ht(o,`${s.screenName}.generated.swift`);await wr(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=Ht(o,`${s.screenName}.swift`);await wr(a,await vt(wh(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of r.views){let a=ai(t,e,s.screenName);if(await Zo(a))try{let l=await li(a),u=JSON.stringify(l,null,2)+`
|
|
207
|
+
`,f=Ht(o,`${s.screenName}.SampleData.json`);await wr(f,u,"utf-8"),console.log(` swiftui/${s.screenName}.SampleData.json \u2192 ${f}`)}catch(l){console.warn(` swiftui/${s.screenName}.SampleData.json: skipped (${l.message})`)}}}var Fx,$h=X(()=>{"use strict";Vt();ei();Zd();yl();es();Fx=`import SwiftUI
|
|
208
208
|
|
|
209
209
|
/// CSS flex-wrap equivalent: wraps children to next line when horizontal space runs out.
|
|
210
210
|
struct FlowLayout: Layout {
|
|
@@ -247,32 +247,32 @@ struct FlowLayout: Layout {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
`});import{resolve as B_}from"node:path";function H_(t){oo(Object.keys(t.elements),st,_h);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(`${_h}: element "${e}" must have exactly one of "container" or "leaf"`)}}async function xh(t){if(!t&&yl)return yl;let e=t??B_(Ee(),"renderers/compose/elements.yaml"),r=await Br(e);return H_(r),t||(yl=r),r}var _h,yl,Sh=X(()=>{"use strict";mt();Vt();so();_h="renderers/compose/elements.yaml",yl=null});function We(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 W_(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(${n}, ${i}, ${o})`}function z_(t){let e=t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!e)return null;let r=Number(e[1])/255,n=Number(e[2])/255,i=Number(e[3])/255,o=Number(e[4]);return`Color(${r}f, ${n}f, ${i}f, ${o}f)`}function nn(t){return t==="transparent"?"Color.Transparent":W_(t)??z_(t)??null}function U_(t){let e=We(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=We(r[0]),i=We(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function G_(t){return typeof t!="string"?null:{bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",700:"FontWeight.Bold",600:"FontWeight.SemiBold",500:"FontWeight.Medium",400:"FontWeight.Normal"}[t]??null}function J_(t){return typeof t!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[t]??null}function K_(t){return typeof t!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[t]??null}function kh(t){return{topStart:"Alignment.TopStart",top:"Alignment.TopCenter",topEnd:"Alignment.TopEnd",start:"Alignment.CenterStart",center:"Alignment.Center",end:"Alignment.CenterEnd",bottomStart:"Alignment.BottomStart",bottom:"Alignment.BottomCenter",bottomEnd:"Alignment.BottomEnd"}[t]??"Alignment.TopStart"}function vl(t,e={}){let r=[],n=e.isLeaf??!1,i=t.foreground;if(typeof i=="string"){let Y=nn(i);Y&&r.push(n?`@textStyle(color = ${Y})`:`@contentColor(${Y})`)}let o=t.size??t.fontSize;if(o!==void 0&&o!==""){let Y=typeof o=="number"?o:We(o);Y!==null&&r.push(n?`@textStyle(fontSize = ${Y}.sp)`:`@inheritTextStyle(fontSize = ${Y}.sp)`)}let s=G_(t.fontWeight??t.weight??"");s&&r.push(n?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=t.width,l=t.height,u=t.minWidth,f=t.minHeight,p=t.maxWidth,d=t.maxHeight,m=t.margin,g=m==="0 auto",y=a==="100%"||a==="fill"||p==="fill",b=l==="100%"||l==="fill"||f==="100vh",v=p==="fill"?null:p!==void 0?We(p):null,M=!1;y&&b?(v!==null?r.push(`.widthIn(max = ${v}.dp).fillMaxHeight()`):r.push(".fillMaxWidth().fillMaxHeight()"),M=!0):y?v!==null?r.push(`.widthIn(max = ${v}.dp)`):r.push(".fillMaxWidth()"):b&&(r.push(".fillMaxHeight()"),M=!0),!M&&f==="100vh"&&r.push(".fillMaxHeight()");let C=We(t.radius??"");(t.shadow===!0||t.shadow==="true")&&r.push(`.shadow(elevation = 4.dp, shape = RoundedCornerShape(${C??0}.dp), clip = false, ambientColor = Color.Black.copy(alpha = 0.08f), spotColor = Color.Black.copy(alpha = 0.08f))`);let R=t.background;if(typeof R=="string"&&R!=="transparent"){let Y=nn(R);Y&&Y!=="Color.Transparent"&&r.push(`.background(${Y}, RoundedCornerShape(${C??0}.dp))`)}t.clip!=="none"&&C!==null&&r.push(`.clip(RoundedCornerShape(${C}.dp))`);let V=t.border,W=t.borderColor;if(V||W){let Y=We(V??"1px")??1,ue=typeof W=="string"?nn(W)??"Color.Gray":"Color.Gray";r.push(`.border(${Y}.dp, ${ue}, RoundedCornerShape(${C??0}.dp))`)}if(!y){if(typeof a=="number")r.push(`.width(${a}.dp)`);else if(a!==void 0&&a!=="wrap"){let Y=We(a);Y!==null&&r.push(`.width(${Y}.dp)`)}if(typeof u=="number")r.push(`.widthIn(min = ${u}.dp)`);else if(u!==void 0){let Y=We(u);Y!==null&&r.push(`.widthIn(min = ${Y}.dp)`)}if(p!==void 0&&p!=="fill"){let Y=We(p);Y!==null&&r.push(`.widthIn(max = ${Y}.dp)`)}}if(!b){if(typeof l=="number")r.push(`.height(${l}.dp)`);else if(l!==void 0&&l!=="wrap"){let Y=We(l);Y!==null&&r.push(`.height(${Y}.dp)`)}if(f!==void 0&&f!=="100vh")if(typeof f=="number")r.push(`.heightIn(min = ${f}.dp)`);else{let Y=We(f);Y!==null&&r.push(`.heightIn(min = ${Y}.dp)`)}if(d!==void 0&&d!=="fill"){let Y=We(d);Y!==null&&r.push(`.heightIn(max = ${Y}.dp)`)}}typeof t.aspectRatio=="number"&&r.push(`.aspectRatio(${t.aspectRatio}f)`),typeof t.weight=="number"&&r.push(`.weight(${t.weight}f)`);let ie=t.padding??"",we=U_(ie);if(we&&(we.kind==="uniform"?r.push(`.padding(${we.value}.dp)`):r.push(`.padding(horizontal = ${we.horizontal}.dp, vertical = ${we.vertical}.dp)`)),g)r.push("@wrapContentCenter()");else if(typeof m=="number")r.push(`.padding(${m}.dp)`);else if(m!==void 0&&typeof m=="string"){let Y=We(m);Y!==null&&r.push(`.padding(${Y}.dp)`)}let be=t.opacity;typeof be=="number"&&be<1&&r.push(`.alpha(${be}f)`);let Re=J_(t.textAlign??"");Re&&r.push(`@textAlign(${Re})`);let $e=t.lineLimit;if($e!==void 0&&$e!=="none"&&$e!==""){let Y=typeof $e=="number"?$e:We($e);Y!==null&&r.push(`@textMaxLines(${Y})`)}let Ge=t.textOverflow;Ge==="ellipsis"?r.push("@textOverflow(TextOverflow.Ellipsis)"):Ge==="clip"&&r.push("@textOverflow(TextOverflow.Clip)");let Je=K_(t.selfAlign??"");return Je&&r.push(`.align(${Je})`),r}function Zo(t){return t.filter(e=>!e.includes(".width(")&&!e.includes(".widthIn(")&&!e.includes(".height(")&&!e.includes(".heightIn(")&&!e.includes(".weight(")&&e!==".fillMaxWidth()"&&e!==".fillMaxHeight()"&&!e.startsWith(".fillMaxWidth().")&&!e.endsWith(".fillMaxWidth()")&&!e.includes(".fillMaxHeight()"))}function Ch(t){return t.filter(e=>!e.includes(".background("))}function es(t){return t.filter(e=>!e.includes(".padding("))}function Eh(t){return t.filter(e=>!e.includes(".clip(RoundedCornerShape("))}function on(t){return t.filter(e=>e.includes(".padding("))}function Ph(t){let r=t.find(n=>n.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return r?Number(r[1]):null}function Ih(t){if(t.length===0)return null;let e=t[0],r=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = (\d+)\.dp\)/);if(r)return`PaddingValues(horizontal = ${r[1]}.dp, vertical = ${r[2]}.dp)`;let n=e.match(/\.padding\((\d+)\.dp\)/);return n?`PaddingValues(${n[1]}.dp)`:null}function Rh(t){return t.some(e=>e.startsWith("@runtimeStyle(")||e.includes(".background("))}function Th(t){return t.some(e=>e.includes(".fillMaxHeight()"))}function ot(t){let e=new Set,r=[];for(let n of t)e.has(n)||(e.add(n),r.push(n));return r}function Ne(t,e){return e.length===0?t:e.filter(r=>!Y_.some(n=>r.startsWith(n)||r===n)).map(r=>r.startsWith("@runtimeStyle(")?`.applyVcStyle(${r.replace(/^@runtimeStyle\(/,"").replace(/\)$/,"")})`:r).reduce((r,n)=>`${r}${n}`,t)}function li(t){let e=t.filter(n=>n.startsWith("@textStyle(")).map(n=>n.replace(/^@textStyle\(/,"").replace(/\)$/,"")),r=t.find(n=>n.startsWith("@textAlign("));if(r){let n=r.replace(/^@textAlign\(/,"").replace(/\)$/,"");e.push(`textAlign = ${n}`)}return e}function Ah(t){let e=t.find(i=>i.startsWith("@textMaxLines("));if(!e)return null;let r=e.replace(/^@textMaxLines\(/,"").replace(/\)$/,""),n=Number(r);return Number.isFinite(n)?n:null}function Nh(t){let e=t.find(r=>r.startsWith("@textOverflow("));return e?e.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function Mh(t){return t.includes("@textFillMaxWidth()")}function Oh(t){let e=t.find(r=>r.startsWith("@contentColor("));return e?e.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function Vh(t){return t.filter(e=>e.startsWith("@inheritTextStyle(")).map(e=>e.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function ts(t){return t.includes("@wrapContentCenter()")}function Lh(t){return t.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var Y_,jh=X(()=>{"use strict";Y_=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function L(t){return" ".repeat(t)}function pe(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 Hh(t){let e={};for(let[r,n]of Object.entries(t)){if(r==="variant"||r==="id"||!Fr.has(r))continue;let i=pe(t,r);i!==void 0&&(e[r]=i)}return e}function Wh(t,e,r){let n=t.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?Le(n,e,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\${${Le(s,e,r)}}`).join("")}"`:null}function ns(t){let e=t.variant;return!e||typeof e!="object"||!("kind"in e)?!1:e.kind==="binding"||e.kind==="concat"}function X_(t,e,r,n){let i=r.map.elements[t],o=pe(e,"variant"),s=Hh(e);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if(ns(e)){let u=Wh(e,r,n),f=Xt({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s});return[...vl(f,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(t)}, variant = ${u}))`]}let l=Xt({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return t==="Box"&&o==="card"&&delete l.height,vl(l,{isLeaf:a})}function sn(t,e,r){let n=pe(e,"variant"),i=Hh(e);return Xt({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function Sl(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 Q_(t,e){if(t.kind!=="component")return null;let n=sn(t.name,t.props,e).background;return typeof n!="string"||n==="transparent"?null:nn(n)??`Color(${JSON.stringify(n)})`}function Dh(t,e,r,n){let o=sn(t,e,r)[n];return typeof o!="string"?n==="background"?"Color.Transparent":"Color.Unspecified":n==="background"&&(o==="transparent"||!o)?"Color.Transparent":nn(o)??"Color.Unspecified"}function Z_(t){return t==="end"?"TextAlign.End":t==="center"?"TextAlign.Center":"TextAlign.Start"}function ex(t){return t==="end"?"Alignment.CenterEnd":t==="center"?"Alignment.Center":"Alignment.CenterStart"}function zh(t,e,r,n,i,o,s){let a=pe(t.props,"gap"),l=typeof a=="number"?`${a}.dp`:"16.dp",u=Ne("Modifier.fillMaxWidth()",ot(o));if(t.children.length===1&&t.children[0].kind==="map"){let p=t.children[0],d=p.item,m=Le(p.source,i,r),g=n(p.body,e+3,d);return[`${L(e)}Row(modifier = ${u}, horizontalArrangement = Arrangement.spacedBy(${l}), verticalAlignment = Alignment.Top) {`,`${L(e+1)}for (${d} in ${m}) {`,`${L(e+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,g,`${L(e+2)}}`,`${L(e+1)}}`,`${L(e)}}`].join(`
|
|
250
|
+
`});import{resolve as Hx}from"node:path";function Wx(t){ao(Object.keys(t.elements),st,xh);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(`${xh}: element "${e}" must have exactly one of "container" or "leaf"`)}}async function _h(t){if(!t&&vl)return vl;let e=t??Hx(Ee(),"renderers/compose/elements.yaml"),r=await Br(e);return Wx(r),t||(vl=r),r}var xh,vl,Sh=X(()=>{"use strict";mt();Vt();lo();xh="renderers/compose/elements.yaml",vl=null});function We(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 zx(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(${n}, ${i}, ${o})`}function Ux(t){let e=t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!e)return null;let r=Number(e[1])/255,n=Number(e[2])/255,i=Number(e[3])/255,o=Number(e[4]);return`Color(${r}f, ${n}f, ${i}f, ${o}f)`}function nn(t){return t==="transparent"?"Color.Transparent":zx(t)??Ux(t)??null}function Gx(t){let e=We(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=We(r[0]),i=We(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function Jx(t){return typeof t!="string"?null:{bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",700:"FontWeight.Bold",600:"FontWeight.SemiBold",500:"FontWeight.Medium",400:"FontWeight.Normal"}[t]??null}function Kx(t){return typeof t!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[t]??null}function Yx(t){return typeof t!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[t]??null}function kh(t,e){return t==="between"||t==="spaceBetween"?"Arrangement.SpaceBetween":t==="around"||t==="spaceAround"?"Arrangement.SpaceAround":t==="spaceEvenly"?"Arrangement.SpaceEvenly":t==="end"?"Arrangement.End":t==="center"?"Arrangement.Center":`Arrangement.spacedBy(${e})`}function Ch(t){return{topStart:"Alignment.TopStart",top:"Alignment.TopCenter",topEnd:"Alignment.TopEnd",start:"Alignment.CenterStart",center:"Alignment.Center",end:"Alignment.CenterEnd",bottomStart:"Alignment.BottomStart",bottom:"Alignment.BottomCenter",bottomEnd:"Alignment.BottomEnd"}[t]??"Alignment.TopStart"}function wl(t,e={}){let r=[],n=e.isLeaf??!1,i=t.foreground;if(typeof i=="string"){let Y=nn(i);Y&&r.push(n?`@textStyle(color = ${Y})`:`@contentColor(${Y})`)}let o=t.size??t.fontSize;if(o!==void 0&&o!==""){let Y=typeof o=="number"?o:We(o);Y!==null&&r.push(n?`@textStyle(fontSize = ${Y}.sp)`:`@inheritTextStyle(fontSize = ${Y}.sp)`)}let s=Jx(t.fontWeight??t.weight??"");s&&r.push(n?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=t.width,l=t.height,u=t.minWidth,f=t.minHeight,p=t.maxWidth,d=t.maxHeight,m=t.margin,g=m==="0 auto",y=a==="100%"||a==="fill"||p==="fill",w=l==="100%"||l==="fill"||f==="100vh",b=p==="fill"?null:p!==void 0?We(p):null,M=!1;y&&w?(b!==null?r.push(`.widthIn(max = ${b}.dp).fillMaxHeight()`):r.push(".fillMaxWidth().fillMaxHeight()"),M=!0):y?b!==null?r.push(`.widthIn(max = ${b}.dp)`):r.push(".fillMaxWidth()"):w&&(r.push(".fillMaxHeight()"),M=!0),!M&&f==="100vh"&&r.push(".fillMaxHeight()");let k=We(t.radius??"");(t.shadow===!0||t.shadow==="true")&&r.push(`.shadow(elevation = 4.dp, shape = RoundedCornerShape(${k??0}.dp), clip = false, ambientColor = Color.Black.copy(alpha = 0.08f), spotColor = Color.Black.copy(alpha = 0.08f))`);let R=t.background;if(typeof R=="string"&&R!=="transparent"){let Y=nn(R);Y&&Y!=="Color.Transparent"&&r.push(`.background(${Y}, RoundedCornerShape(${k??0}.dp))`)}t.clip!=="none"&&k!==null&&r.push(`.clip(RoundedCornerShape(${k}.dp))`);let V=t.border,z=t.borderColor;if(V||z){let Y=We(V??"1px")??1,ue=typeof z=="string"?nn(z)??"Color.Gray":"Color.Gray";r.push(`.border(${Y}.dp, ${ue}, RoundedCornerShape(${k??0}.dp))`)}if(!y){if(typeof a=="number")r.push(`.width(${a}.dp)`);else if(a!==void 0&&a!=="wrap"){let Y=We(a);Y!==null&&r.push(`.width(${Y}.dp)`)}if(typeof u=="number")r.push(`.widthIn(min = ${u}.dp)`);else if(u!==void 0){let Y=We(u);Y!==null&&r.push(`.widthIn(min = ${Y}.dp)`)}if(p!==void 0&&p!=="fill"){let Y=We(p);Y!==null&&r.push(`.widthIn(max = ${Y}.dp)`)}}if(!w){if(typeof l=="number")r.push(`.height(${l}.dp)`);else if(l!==void 0&&l!=="wrap"){let Y=We(l);Y!==null&&r.push(`.height(${Y}.dp)`)}if(f!==void 0&&f!=="100vh")if(typeof f=="number")r.push(`.heightIn(min = ${f}.dp)`);else{let Y=We(f);Y!==null&&r.push(`.heightIn(min = ${Y}.dp)`)}if(d!==void 0&&d!=="fill"){let Y=We(d);Y!==null&&r.push(`.heightIn(max = ${Y}.dp)`)}}typeof t.aspectRatio=="number"&&r.push(`.aspectRatio(${t.aspectRatio}f)`),typeof t.weight=="number"&&r.push(`.weight(${t.weight}f)`);let ie=t.padding??"",we=Gx(ie);if(we&&(we.kind==="uniform"?r.push(`.padding(${we.value}.dp)`):r.push(`.padding(horizontal = ${we.horizontal}.dp, vertical = ${we.vertical}.dp)`)),g)r.push("@wrapContentCenter()");else if(typeof m=="number")r.push(`.padding(${m}.dp)`);else if(m!==void 0&&typeof m=="string"){let Y=We(m);Y!==null&&r.push(`.padding(${Y}.dp)`)}let be=t.opacity;typeof be=="number"&&be<1&&r.push(`.alpha(${be}f)`);let Re=Kx(t.textAlign??"");Re&&r.push(`@textAlign(${Re})`);let $e=t.lineLimit;if($e!==void 0&&$e!=="none"&&$e!==""){let Y=typeof $e=="number"?$e:We($e);Y!==null&&r.push(`@textMaxLines(${Y})`)}let Ge=t.textOverflow;Ge==="ellipsis"?r.push("@textOverflow(TextOverflow.Ellipsis)"):Ge==="clip"&&r.push("@textOverflow(TextOverflow.Clip)");let Je=Yx(t.selfAlign??"");return Je&&r.push(`.align(${Je})`),r}function ts(t){return t.filter(e=>!e.includes(".width(")&&!e.includes(".widthIn(")&&!e.includes(".height(")&&!e.includes(".heightIn(")&&!e.includes(".weight(")&&e!==".fillMaxWidth()"&&e!==".fillMaxHeight()"&&!e.startsWith(".fillMaxWidth().")&&!e.endsWith(".fillMaxWidth()")&&!e.includes(".fillMaxHeight()"))}function Eh(t){return t.filter(e=>!e.includes(".background("))}function rs(t){return t.filter(e=>!e.includes(".padding("))}function Ph(t){return t.filter(e=>!e.includes(".clip(RoundedCornerShape("))}function on(t){return t.filter(e=>e.includes(".padding("))}function Ih(t){let r=t.find(n=>n.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return r?Number(r[1]):null}function Rh(t){if(t.length===0)return null;let e=t[0],r=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = (\d+)\.dp\)/);if(r)return`PaddingValues(horizontal = ${r[1]}.dp, vertical = ${r[2]}.dp)`;let n=e.match(/\.padding\((\d+)\.dp\)/);return n?`PaddingValues(${n[1]}.dp)`:null}function Th(t){return t.some(e=>e.startsWith("@runtimeStyle(")||e.includes(".background("))}function Ah(t){return t.some(e=>e.includes(".fillMaxHeight()"))}function ot(t){let e=new Set,r=[];for(let n of t)e.has(n)||(e.add(n),r.push(n));return r}function Ne(t,e){return e.length===0?t:e.filter(r=>!Xx.some(n=>r.startsWith(n)||r===n)).map(r=>r.startsWith("@runtimeStyle(")?`.applyVcStyle(${r.replace(/^@runtimeStyle\(/,"").replace(/\)$/,"")})`:r).reduce((r,n)=>`${r}${n}`,t)}function ui(t){let e=t.filter(n=>n.startsWith("@textStyle(")).map(n=>n.replace(/^@textStyle\(/,"").replace(/\)$/,"")),r=t.find(n=>n.startsWith("@textAlign("));if(r){let n=r.replace(/^@textAlign\(/,"").replace(/\)$/,"");e.push(`textAlign = ${n}`)}return e}function Nh(t){let e=t.find(i=>i.startsWith("@textMaxLines("));if(!e)return null;let r=e.replace(/^@textMaxLines\(/,"").replace(/\)$/,""),n=Number(r);return Number.isFinite(n)?n:null}function Mh(t){let e=t.find(r=>r.startsWith("@textOverflow("));return e?e.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function Oh(t){return t.includes("@textFillMaxWidth()")}function Vh(t){let e=t.find(r=>r.startsWith("@contentColor("));return e?e.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function Lh(t){return t.filter(e=>e.startsWith("@inheritTextStyle(")).map(e=>e.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function ns(t){return t.includes("@wrapContentCenter()")}function jh(t){return t.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var Xx,Dh=X(()=>{"use strict";Xx=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function L(t){return" ".repeat(t)}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 Wh(t){let e={};for(let[r,n]of Object.entries(t)){if(r==="variant"||r==="id"||!Fr.has(r))continue;let i=ce(t,r);i!==void 0&&(e[r]=i)}return e}function zh(t,e,r){let n=t.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?Le(n,e,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\${${Le(s,e,r)}}`).join("")}"`:null}function ci(t){let e=t.variant;return!e||typeof e!="object"||!("kind"in e)?!1:e.kind==="binding"||e.kind==="concat"}function Qx(t,e,r,n){let i=r.map.elements[t],o=ce(e,"variant"),s=Wh(e);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if(ci(e)){let u=zh(e,r,n),f=Bt({elementName:t,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s});return[...wl(f,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(t)}, variant = ${u}))`]}let l=Bt({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return t==="Box"&&o==="card"&&delete l.height,wl(l,{isLeaf:a})}function sn(t,e,r){let n=ce(e,"variant"),i=Wh(e);return Bt({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function kl(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 Zx(t,e){if(t.kind!=="component")return null;let n=sn(t.name,t.props,e).background;return typeof n!="string"||n==="transparent"?null:nn(n)??`Color(${JSON.stringify(n)})`}function qh(t,e,r,n){let o=sn(t,e,r)[n];return typeof o!="string"?n==="background"?"Color.Transparent":"Color.Unspecified":n==="background"&&(o==="transparent"||!o)?"Color.Transparent":nn(o)??"Color.Unspecified"}function e_(t){return t==="end"?"TextAlign.End":t==="center"?"TextAlign.Center":"TextAlign.Start"}function t_(t){return t==="end"?"Alignment.CenterEnd":t==="center"?"Alignment.Center":"Alignment.CenterStart"}function Uh(t,e,r,n,i,o,s){let a=ce(t.props,"gap"),l=typeof a=="number"?`${a}.dp`:"16.dp",u=Ne("Modifier.fillMaxWidth()",ot(o));if(t.children.length===1&&t.children[0].kind==="map"){let p=t.children[0],d=p.item,m=Le(p.source,i,r),g=n(p.body,e+3,d);return[`${L(e)}Row(modifier = ${u}, horizontalArrangement = Arrangement.spacedBy(${l}), verticalAlignment = Alignment.Top) {`,`${L(e+1)}for (${d} in ${m}) {`,`${L(e+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,g,`${L(e+2)}}`,`${L(e+1)}}`,`${L(e)}}`].join(`
|
|
251
251
|
`)}let f=t.children.map(p=>{let d="";return p.kind==="map"?d=Qt(p,e+2,n,i,"none"):p.kind==="text"?d=`${L(e+2)}Text(text = ${JSON.stringify(p.value)})`:p.kind==="binding"?d=`${L(e+2)}Text(text = ${Le(p,i,r)})`:d=n(p,e+2,r),d?`${L(e+1)}Box(modifier = Modifier.weight(1f).fillMaxSize(), propagateMinConstraints = true, contentAlignment = Alignment.TopStart) {
|
|
252
252
|
${d}
|
|
253
253
|
${L(e+1)}}`:""}).filter(Boolean);return[`${L(e)}Row(modifier = ${u}.height(IntrinsicSize.Min), horizontalArrangement = Arrangement.spacedBy(${l}), verticalAlignment = Alignment.Top) {`,f.join(`
|
|
254
254
|
`),`${L(e)}}`].join(`
|
|
255
|
-
`)}function
|
|
255
|
+
`)}function r_(t,e,r,n,i){return t.map(s=>{if(s.kind==="map")return Qt(s,e,r,n,"lazyGrid");let a="";return s.kind==="text"?a=`${L(e+1)}Text(text = ${JSON.stringify(s.value)}, modifier = Modifier.fillMaxWidth())`:s.kind==="binding"?a=`${L(e+1)}Text(text = ${Le(s,n,i)}, modifier = Modifier.fillMaxWidth())`:a=r(s,e+1,i),a?s.kind!=="text"&&s.kind!=="binding"?`${L(e)}item {
|
|
256
256
|
${L(e+1)}Box(modifier = Modifier.fillMaxWidth()) {
|
|
257
257
|
${a}
|
|
258
258
|
${L(e+1)}}
|
|
259
259
|
${L(e)}}`:`${L(e)}item {
|
|
260
260
|
${a}
|
|
261
261
|
${L(e)}}`:""}).filter(Boolean).join(`
|
|
262
|
-
`)}function
|
|
263
|
-
`))}else if(m==="1fr"){let y=i.inVerticalScroll;i.inVerticalScroll=!0;let
|
|
262
|
+
`)}function n_(t,e,r,n,i,o){let s=Ne("Modifier.fillMaxWidth()",ot(o)),a=sn(t.name,t.props,i),l=kl(a.gridTemplateColumns),u=l?.kind==="fixed-columns"?l.widths:[],f=[];for(let p=0;p<t.children.length;p++){let d=t.children[p],m=u[p],g=m?.match(/^(\d+)px$/);if(g){let y="";if(d.kind==="map"?y=Qt(d,e+2,n,i,"none"):d.kind==="text"?y=`${L(e+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?y=`${L(e+2)}Text(text = ${Le(d,i,r)})`:y=n(d,e+2,r),!y)continue;let w=Zx(d,i),b=w?`.background(${w})`:"";f.push([`${L(e+1)}Box(modifier = Modifier.width(${Number(g[1])}.dp).fillMaxHeight()${b}) {`,y,`${L(e+1)}}`].join(`
|
|
263
|
+
`))}else if(m==="1fr"){let y=i.inVerticalScroll;i.inVerticalScroll=!0;let w="";if(d.kind==="map"?w=Qt(d,e+2,n,i,"none"):d.kind==="text"?w=`${L(e+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?w=`${L(e+2)}Text(text = ${Le(d,i,r)})`:w=n(d,e+2,r),i.inVerticalScroll=y,!w)continue;f.push([`${L(e+1)}Box(modifier = Modifier.weight(1f).fillMaxHeight(), contentAlignment = Alignment.TopStart) {`,`${L(e+2)}Column(modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {`,w,`${L(e+2)}}`,`${L(e+1)}}`].join(`
|
|
264
264
|
`))}else{let y="";if(d.kind==="map"?y=Qt(d,e+2,n,i,"none"):d.kind==="text"?y=`${L(e+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?y=`${L(e+2)}Text(text = ${Le(d,i,r)})`:y=n(d,e+2,r),!y)continue;f.push(y)}}return[`${L(e)}Row(modifier = ${s}, horizontalArrangement = Arrangement.spacedBy(0.dp)) {`,f.join(`
|
|
265
265
|
`),`${L(e)}}`].join(`
|
|
266
|
-
`)}function Le(t,e,r){let n=t.scope??r??e.propsRoot??"vm";return t.path?`${n}.${t.path}`:n}function
|
|
267
|
-
`)}function
|
|
268
|
-
`)}function
|
|
266
|
+
`)}function Le(t,e,r){let n=t.scope??r??e.propsRoot??"vm";return t.path?`${n}.${t.path}`:n}function Fh(t,e){let r=t.value;if(!r)return'""';if(typeof r=="string")return JSON.stringify(r);if(typeof r=="object"&&r!==null&&"kind"in r&&r.kind==="binding"){let n=r,i=n.scope??e??"vm";return n.path?`${i}.${n.path}`:i}return'""'}function is(t,e,r){let n=Vh(e),i=Lh(e);if(!n&&i.length===0)return t;let o=[];return n&&o.push(`LocalContentColor provides ${n}`),i.length>0&&o.push(`LocalTextStyle provides LocalTextStyle.current.merge(TextStyle(${i.join(", ")}))`),[`${L(r)}CompositionLocalProvider(${o.join(", ")}) {`,t,`${L(r)}}`].join(`
|
|
267
|
+
`)}function i_(t){return t.map(e=>{let r=e.match(/\.padding\(horizontal = (\d+)\.dp, vertical = \d+\.dp\)/);if(r)return`.padding(horizontal = ${r[1]}.dp)`;let n=e.match(/\.padding\((\d+)\.dp\)/);return n?`.padding(horizontal = ${n[1]}.dp)`:e})}function xl(){return["@textMaxLines(1)","@textOverflow(TextOverflow.Ellipsis)","@textFillMaxWidth()"]}function o_(t,e){return e.cellTextBehavior?[...t,...xl()]:t}function bl(t,e){return[`${L(e)}Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.TopCenter) {`,t,`${L(e)}}`].join(`
|
|
268
|
+
`)}function Bh(t,e,r,n=""){let i=on(e),o=rs(e),s=Ne("Modifier",o),a=i.length>0&&Th(o)?Ne("Modifier",i):null,l=is(r,e,t+1);return a&&(l=[`${L(t+1)}Box(modifier = ${a}) {`,l,`${L(t+1)}}`].join(`
|
|
269
269
|
`)),[`${L(t)}Box(modifier = ${s}${n}) {`,l,`${L(t)}}`].join(`
|
|
270
|
-
`)}function
|
|
271
|
-
`)}return[`${t}Box(modifier = ${
|
|
272
|
-
`)}let
|
|
270
|
+
`)}function s_(t,e,r){let i=Bt({elementName:t,theme:r.theme,tokens:r.tokens,variantLiteral:e,instanceLiterals:{}}).display;return typeof i=="string"&&i.includes("inline")}function a_(t,e,r){if(e.cellTextBehavior)return!0;let n=ce(t,"variant");if(typeof n=="string")return s_("Text",n,e);if(ci(t)){let i=t.variant;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="concat"){let s=i.parts[0];if(s==="badge-"||typeof s=="string"&&s.startsWith("badge-"))return!0}}return!1}function _l(t,e,r,n,i,o){let s=on(r),a=jh(Ne("Modifier",r)),l=ot(r.filter(k=>!k.startsWith("@textStyle(")&&!k.startsWith("@runtimeStyle(")&&!k.includes(".padding(")&&!k.startsWith("@textMaxLines(")&&!k.startsWith("@textOverflow(")&&!k.startsWith("@textAlign(")&&k!=="@textFillMaxWidth()")),u=Oh(r)?"Modifier.fillMaxWidth()":"Modifier",f=ui(r),p=null;a?p=f.length>0?`LocalTextStyle.current.merge(${a}.asTextStyle()).merge(TextStyle(${f.join(", ")}))`:`${a}.asTextStyle()`:f.length>0&&(p=`LocalTextStyle.current.merge(TextStyle(${f.join(", ")}))`);let d=p?`, style = ${p}`:"",m=Nh(r),g=m!==null?`, maxLines = ${m}`:"",y=Mh(r),w=y?`, overflow = ${y}`:"",b=`${t} Text(text = ${e}${g}${w}${d})`;if(a){let T=`${(i?a_(i,n,o):n.cellTextBehavior===!0)?"Modifier":"Modifier.fillMaxWidth()"}.applyVcStyle(${a})`;if(s.length>0){let V=Ne(u,[...l,...s]);return[`${t}Box(modifier = ${V}) {`,`${t} Box(modifier = ${T}) {`,b,`${t} }`,`${t}}`].join(`
|
|
271
|
+
`)}return[`${t}Box(modifier = ${T}) {`,b,`${t}}`].join(`
|
|
272
|
+
`)}let M=Ne(u,[...l,...s]);return`${t}Text(text = ${e}, modifier = ${M}${g}${w}${d})`}function l_(t,e,r){let n=t.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${Le(n,e,r)}.firstOrNull()?.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 u_(t,e,r,n){let i=t.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Le(i,e,r);return`${L(n+1)}for (option in ${o}) {
|
|
273
273
|
${L(n+2)}DropdownMenuItem(text = { Text(text = option.label) }, onClick = { expanded = false })
|
|
274
274
|
${L(n+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${L(n+1)}DropdownMenuItem(text = { Text(text = ${JSON.stringify(s.label)}) }, onClick = { expanded = false })`).join(`
|
|
275
|
-
`):`${L(n+1)}DropdownMenuItem(text = { Text(text = "--") }, onClick = { expanded = false })`}function
|
|
275
|
+
`):`${L(n+1)}DropdownMenuItem(text = { Text(text = "--") }, onClick = { expanded = false })`}function $l(t){let r=t.entries.find(o=>o.path==="ui.text-muted")?.value??"#6b7280",n=r.match(/^#([0-9a-fA-F]{6})$/);if(!n)return`Color(${JSON.stringify(r)})`;let i=n[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function Hh(t){let r=t.entries.find(o=>o.path==="ui.text")?.value??"#111827",n=r.match(/^#([0-9a-fA-F]{6})$/);if(!n)return`Color(${JSON.stringify(r)})`;let i=n[1];return`Color(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)})`}function Gh(t,e,r){for(let n of t){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return Le(n,e,r)}return null}function Sl(t,e,r,n,i,o=n.listScope??"none"){return t.map(a=>a.kind==="map"?Qt(a,e,r,n,o):a.kind==="text"?`${L(e)}Text(text = ${JSON.stringify(a.value)})`:a.kind==="binding"?`${L(e)}Text(text = ${Le(a,n,i)})`:r(a,e,i)).filter(Boolean).join(`
|
|
276
276
|
`)}function Qt(t,e,r,n,i="none"){let o=Le(t.source,n),s=t.item,a=r(t.body,e+2,s);return i==="lazyGrid"?`${L(e)}gridItems(${o}, key = { it.id }) { ${s} ->
|
|
277
277
|
${L(e+1)}Box(modifier = Modifier.fillMaxWidth()) {
|
|
278
278
|
${a}
|
|
@@ -281,25 +281,25 @@ ${L(e)}}`:i==="lazyColumn"?`${L(e)}lazyItems(${o}, key = { it.id }) { ${s} ->
|
|
|
281
281
|
${a}
|
|
282
282
|
${L(e)}}`:`${L(e)}for (${s} in ${o}) {
|
|
283
283
|
${a}
|
|
284
|
-
${L(e)}}`}function
|
|
285
|
-
`)}function
|
|
286
|
-
`)}if(e.leaf==="texteditor"){let l=
|
|
287
|
-
`)}if(e.leaf==="picker"){let l=
|
|
288
|
-
`)}if(e.leaf==="spacer")return`${s}Spacer(modifier = ${a})`;if(e.leaf==="divider")return`${s}
|
|
289
|
-
`)}return`${s}Text(text = "/* unsupported leaf: ${t.name} */")`}function
|
|
290
|
-
`);return
|
|
284
|
+
${L(e)}}`}function c_(t,e,r,n){let i=Object.entries(t.props).map(([o,s])=>typeof s=="object"&&s!==null&&"kind"in s&&s.kind==="binding"?`${o} = ${Le(s,n,r)}`:`${o} = ${JSON.stringify(s)}`);return`${L(e)}${t.name}(${i.join(", ")})`}function p_(t,e,r,n,i){let o=L(e),s=ce(t.props,"label"),l=Gh(t.children,n,r)??(typeof s=="string"?JSON.stringify(s):'"Button"'),u=qh(t.name,t.props,n,"background"),f=qh(t.name,t.props,n,"foreground");if(ci(t.props)){let V=`VcTheme.resolve("Button", variant = ${zh(t.props,n,r)})`;u=`${V}.background ?: Color.Transparent`,f=`${V}.foreground ?: Color.Unspecified`}let p=ot(Eh(Ph(rs(i)))),d=n.cellTextBehavior?[...p.filter(T=>T!==".fillMaxWidth()"),".wrapContentWidth()"]:p,m=Ne("Modifier",d),g=Ih(i),y=Rh(on(i)),w=g!==null?`, shape = RoundedCornerShape(${g}.dp)`:"",b=y?`, contentPadding = ${y}`:"",M=ui(i),k=M.length>0?`, style = TextStyle(${M.join(", ")})`:"",R=n.cellTextBehavior?", maxLines = 1, overflow = TextOverflow.Ellipsis":"";return[`${o}VcButton(onClick = {}, modifier = ${m}, containerColor = ${u}, contentColor = ${f}${w}${b}) {`,`${o} Text(text = ${l}${k}${R})`,`${o}}`].join(`
|
|
285
|
+
`)}function f_(t,e,r,n,i,o){let s=L(r),a=Ne("Modifier",o);if(e.leaf==="text"){let l=Gh(t.children,i,n)??'""';return _l(s,l,o,i,t.props,n)}if(e.leaf==="button")return p_(t,r,n,i,o);if(e.leaf==="textfield"){let l=ce(t.props,"placeholder"),u=typeof l=="string"?JSON.stringify(l):'""',f=Hh(i.tokens),p=$l(i.tokens),d=ot(o),m=Ne("Modifier",d),g=ui(o),y=g.length>0?`${s} textStyle = TextStyle(${g.join(", ")}),`:`${s} textStyle = TextStyle(color = ${f}, fontSize = 14.sp),`,w=Fh(t.props,n);return[`${s}BasicTextField(`,`${s} value = ${w},`,`${s} onValueChange = {},`,`${s} modifier = ${m},`,y,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.CenterStart) {`,`${s} if (${w}.isEmpty()) {`,`${s} Text(text = ${u}, style = TextStyle(color = ${p}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s})`].join(`
|
|
286
|
+
`)}if(e.leaf==="texteditor"){let l=ce(t.props,"placeholder"),u=typeof l=="string"?JSON.stringify(l):'""',f=$l(i.tokens),d=o.find(k=>k.includes("heightIn(min ="))?.match(/heightIn\(min = (\d+)\.dp\)/)?.[1]??"72",m=o.filter(k=>k.startsWith("@textStyle(")),g=ot(o.filter(k=>!k.startsWith("@textStyle(")&&!k.includes("heightIn(min ="))),y=Ne("Modifier",ot(g)),w=ui(m),b=w.length>0?`, textStyle = TextStyle(${w.join(", ")})`:"",M=Fh(t.props,n);return[`${s}Box(modifier = ${y}.heightIn(min = ${d}.dp)) {`,`${s} BasicTextField(`,`${s} value = ${M},`,`${s} onValueChange = {},`,`${s} modifier = Modifier.fillMaxWidth()${b},`,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth()) {`,`${s} if (${M}.isEmpty()) {`,`${s} Text(text = ${u}, modifier = Modifier.align(Alignment.TopStart).padding(top = 8.dp, start = 4.dp), style = TextStyle(color = ${f}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s} )`,`${s}}`].join(`
|
|
287
|
+
`)}if(e.leaf==="picker"){let l=ce(t.props,"width"),u=typeof l=="number"?l:null,f=u!==null?`.width(${u}.dp)`:"",p=ts(ot(o)),d=Ne(`Modifier${f}`,p),m=l_(t.props,i,n),g=Hh(i.tokens),y=$l(i.tokens),w=u_(t.props,i,n,r);return[`${s}Box(modifier = ${d}.heightIn(min = 42.dp)) {`,`${s} var expanded by remember { mutableStateOf(false) }`,`${s} TextButton(onClick = { expanded = true }, modifier = Modifier.fillMaxWidth(), contentPadding = PaddingValues(horizontal = 12.dp, vertical = 9.dp)) {`,`${s} Text(text = ${m}, style = TextStyle(color = ${g}), maxLines = 1, modifier = Modifier.weight(1f))`,`${s} Icon(Icons.Default.ArrowDropDown, contentDescription = null, tint = ${y})`,`${s} }`,`${s} DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {`,w,`${s} }`,`${s}}`].join(`
|
|
288
|
+
`)}if(e.leaf==="spacer")return`${s}Spacer(modifier = ${a})`;if(e.leaf==="divider"){let u=ce(t.props,"axis")==="vertical"?"VerticalDivider":"HorizontalDivider";return`${s}${u}(modifier = ${a})`}if(e.leaf==="image"){let l=ce(t.props,"src")??ce(t.props,"name"),u=typeof l=="string"?JSON.stringify(l):'"image"';return`${s}Icon(imageVector = Icons.Default.Image, contentDescription = ${u}, modifier = ${a})`}if(e.leaf==="progressview")return`${s}CircularProgressIndicator(modifier = ${a})`;if(e.leaf==="toggle"){let l=ce(t.props,"label"),u=typeof l=="string"?JSON.stringify(l):'""';return[`${s}Row(modifier = ${a}, verticalAlignment = Alignment.CenterVertically) {`,`${s} Switch(checked = false, onCheckedChange = {})`,`${s} Text(text = ${u})`,`${s}}`].join(`
|
|
289
|
+
`)}return`${s}Text(text = "/* unsupported leaf: ${t.name} */")`}function d_(t,e,r,n,i,o,s){let a=Sl(t.children,r+1,i,o,n),l=Ne("Modifier",s);if(e.container==="vstack"){let f=e.spacingProp?ce(t.props,e.spacingProp):void 0,p=typeof f=="number"?`${f}.dp`:"0.dp",d=[`${L(r)}Column(modifier = ${l}, verticalArrangement = Arrangement.spacedBy(${p})) {`,is(a,s,r+1),`${L(r)}}`].join(`
|
|
290
|
+
`);return ns(s)?bl(d,r):d}if(e.container==="hstack"){let f=e.spacingProp?ce(t.props,e.spacingProp):void 0,p=typeof f=="number"?`${f}.dp`:"0.dp",d=ce(t.props,"justify"),m=ce(t.props,"wrap"),g=kh(d,p),y=ce(t.props,"align"),w=ce(t.props,"alignItems"),b=ce(t.props,"height"),M=w==="center"||y==="center"||typeof b=="number"?"Alignment.CenterVertically":w==="end"?"Alignment.Bottom":"Alignment.Top",k=t.name==="TableHeader"||t.name==="TableRow",R=ce(t.props,"flex"),T=k||d!==void 0||typeof R=="number",V=[];T&&V.push(".fillMaxWidth()"),typeof b=="number"&&V.push(k&&t.name==="TableHeader"?`.heightIn(min = ${b}.dp)`:`.height(${b}.dp)`);let z=k&&typeof b=="number"?ts(s):s,ie=Ne("Modifier",ot([...z,...V])),we=o.inTableHeader;t.name==="TableHeader"&&(o.inTableHeader=!0);let be=is(Sl(t.children,r+1,i,o,n),s,r+1);return t.name==="TableHeader"&&(o.inTableHeader=we),m===!0&&d!=="between"&&d!=="spaceBetween"?[`${L(r)}FlowRow(modifier = ${ie}, horizontalArrangement = Arrangement.spacedBy(${p}), verticalArrangement = Arrangement.spacedBy(${p})) {`,be,`${L(r)}}`].join(`
|
|
291
291
|
`):[`${L(r)}Row(modifier = ${ie}, horizontalArrangement = ${g}, verticalAlignment = ${M}) {`,be,`${L(r)}}`].join(`
|
|
292
|
-
`)}if(e.container==="group"||e.container==="navstack"){let f=
|
|
293
|
-
`)}let d=
|
|
294
|
-
`);return o.inVerticalScroll=f,p}if(e.container==="field"){let f=
|
|
292
|
+
`)}if(e.container==="group"||e.container==="navstack"){let f=ci(t.props)?void 0:sn(t.name,t.props,o),p=f?.display==="grid"?kl(f.gridTemplateColumns):null;if(p?.kind==="equal-columns")return Uh(t,r,n,i,o,s,p.count);if(p?.kind==="adaptive"){let w=ce(t.props,"gap"),b=typeof w=="number"?`${w}.dp`:"16.dp";return[`${L(r)}LazyVerticalGrid(columns = GridCells.Adaptive(minSize = ${p.minWidth}.dp), modifier = ${l}.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(${b}), verticalArrangement = Arrangement.spacedBy(${b})) {`,r_(t.children,r+1,i,o,n),`${L(r)}}`].join(`
|
|
293
|
+
`)}let d=ce(t.props,"contentAlign"),m=Ah(s)?", contentAlignment = Alignment.TopStart":"",g=typeof d=="string"?`, contentAlignment = ${Ch(d)}`:m,y=Bh(r,s,a,g);return ns(s)?bl(y,r):y}if(e.container==="scrollview"){let f=o.inVerticalScroll;o.inVerticalScroll=!0;let p=[`${L(r)}Column(modifier = ${l}.verticalScroll(rememberScrollState())) {`,a,`${L(r)}}`].join(`
|
|
294
|
+
`);return o.inVerticalScroll=f,p}if(e.container==="field"){let f=ce(t.props,"label"),p=ce(t.props,"gap"),d=typeof p=="number"?`${p}.dp`:"4.dp",m=typeof f=="string"?`${L(r+1)}Text(text = ${JSON.stringify(f)}, modifier = Modifier.applyVcStyle(VcTheme.resolve("Text", variant = "field-label")), style = VcTheme.resolve("Text", variant = "field-label").asTextStyle())
|
|
295
295
|
`:"";return[`${L(r)}Column(modifier = ${l}, verticalArrangement = Arrangement.spacedBy(${d})) {`,`${m}${a}`,`${L(r)}}`].join(`
|
|
296
|
-
`)}if(e.container==="tablestack"){let f=
|
|
297
|
-
`)}return
|
|
296
|
+
`)}if(e.container==="tablestack"){let f=ce(t.props,"separator"),p=ce(t.props,"separatorColor"),d=typeof f=="number"&&f>0||f===void 0,g=sn(t.name,t.props,o).separatorColor??p,y="Color.Gray.copy(alpha = 0.2f)";if(d&&typeof g=="string"){let k=g.match(/^#([0-9a-fA-F]{6})$/);k&&(y=`Color(${parseInt(k[1].slice(0,2),16)}, ${parseInt(k[1].slice(2,4),16)}, ${parseInt(k[1].slice(4,6),16)})`)}let w=`${L(r+1)}HorizontalDivider(modifier = Modifier, color = ${y})`,b=t.children.map(k=>{if(k.kind==="map"&&d){let R=k,T=Le(R.source,o),V=R.item,z=i(R.body,r+3,V);return[`${L(r+1)}for (${V} in ${T}) {`,`${L(r+2)}${w.trim()}`,z,`${L(r+1)}}`].join(`
|
|
297
|
+
`)}return k.kind==="map"?Qt(k,r+1,i,o,"none"):i(k,r+1,n)}).filter(Boolean),M;return M=b,[`${L(r)}Column(modifier = ${l}) {`,M.join(`
|
|
298
298
|
`),`${L(r)}}`].join(`
|
|
299
|
-
`)}if(e.container==="cellgroup"){let f=
|
|
300
|
-
`);return o.cellTextBehavior=
|
|
301
|
-
`)}let u=
|
|
302
|
-
`)}}if(e.container)return
|
|
299
|
+
`)}if(e.container==="cellgroup"){let f=ce(t.props,"width"),p=ce(t.props,"flex"),d=ce(t.props,"align"),m=e_(d),g=t_(d),y=typeof p=="number",w=ts(s),b=o.inTableHeader?i_(on(w)):on(w),M=w.filter(z=>z.startsWith("@contentColor(")||z.startsWith("@inheritTextStyle(")),k=[];typeof f=="number"?k.push(`.width(${f}.dp)`):y&&k.push(".weight(1f).fillMaxWidth()");let R=Ne("Modifier",ot([...k,...rs(w)])),T=o.cellTextBehavior;o.cellTextBehavior=!0;let V=t.children.map(z=>z.kind==="map"?Qt(z,r+1,i,o,"none"):z.kind==="text"?_l(L(r+1),JSON.stringify(z.value),ot([...xl(),`@textAlign(${m})`,...b,...M.map(ie=>ie)]),o,void 0,n):z.kind==="binding"?_l(L(r+1),Le(z,o,n),ot([...xl(),`@textAlign(${m})`,...b,...M.map(ie=>ie)]),o,void 0,n):i(z,r+1,n)).filter(Boolean).join(`
|
|
300
|
+
`);return o.cellTextBehavior=T,[`${L(r)}Box(modifier = ${R}, contentAlignment = ${g}) {`,is(V,M,r+1),`${L(r)}}`].join(`
|
|
301
|
+
`)}let u=Bh(r,s,a);return ns(s)?bl(u,r):u}function h_(t,e,r,n,i,o){let s=o_(Qx(t.name,t.props,o,n),o);if(e.leaf)return f_(t,e,r,n,o,s);if(e.container==="group"&&!ci(t.props)){let a=sn(t.name,t.props,o),l=a.gridTemplateColumns,u=a.flexDirection;if(a.display==="grid"&&l){let f=kl(l);if(f?.kind==="equal-columns")return Uh(t,r,n,i,o,s,f.count);if(f?.kind==="fixed-columns")return n_(t,r,n,i,o,s)}if(a.display==="flex"&&u==="row"){let f=ce(t.props,"gap"),p=typeof f=="number"?`${f}.dp`:typeof a.gap=="number"?`${a.gap}.dp`:"0.dp",d=Ne("Modifier",s),m=Sl(t.children,r+2,i,o,n);return[`${L(r)}Row(modifier = ${d}, horizontalArrangement = Arrangement.spacedBy(${p}), verticalAlignment = Alignment.Top) {`,m,`${L(r)}}`].join(`
|
|
302
|
+
`)}}if(e.container)return d_(t,e,r,n,i,o,s);throw new Error(`Unsupported Compose element config for ${t.name}`)}function m_(t){let e=(r,n,i)=>{if(r.kind==="viewRef")return c_(r,n,i,t);if(r.kind!=="component")return"";if(!t.map.elements[r.name])throw new Error(`Element "${r.name}" is not in Compose element map`);return h_(r,t.map.elements[r.name],n,i,e,t)};return e}function Jh(t,e,r=2){let n=m_(e);if(t.kind!=="component")throw new Error("Compose lowering root must be a component node");return n(t,r)}var Kh=X(()=>{"use strict";mt();dl();Dh()});var Xh={};lr(Xh,{renderComposeComponent:()=>os});function Yh(t){let e=t.match(/^(\w+)\[\]$/);return e?`List<${Yh(e[1])}>`:t==="string"?"String":t==="number"?"Double":t==="boolean"?"Boolean":t}function g_(t){if(!t.propsType)return"";let e=t.propsType.match(/^\{\s*([^}]+)\s*\}$/);return e?e[1].trim().split(",").map(n=>{let i=n.indexOf(":"),o=i>=0?n.slice(0,i).trim():n.trim(),s=i>=0?n.slice(i+1).trim():"Any",a=Yh(s);return`${o}: ${a}`}).join(", "):`props: ${t.propsType}`}function y_(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 os(t,e){let r=await _h(e.elementMapPath),n=e.allowlistExtra??[],i=t.isPartial?t.exportName:`${t.exportName.replace(/View$/,"")||t.exportName}Screen`,o={map:r,theme:e.theme,tokens:e.tokens,allowlistExtra:n,propsRoot:y_(t)},s=Jh(t.root,o,2),a=t.isPartial?g_(t):t.viewModel?`vm: ${t.viewModel}`:"";return`/**
|
|
303
303
|
* Auto-generated Compose view from ${t.source}
|
|
304
304
|
* DO NOT EDIT \u2014 generated by view-contracts.
|
|
305
305
|
*/
|
|
@@ -349,8 +349,8 @@ import generated.compose.asTextStyle
|
|
|
349
349
|
fun ${i}(${a}) {
|
|
350
350
|
${s}
|
|
351
351
|
}
|
|
352
|
-
`}var
|
|
353
|
-
`)}var
|
|
352
|
+
`}var Cl=X(()=>{"use strict";Sh();Kh()});function v_(t,e){return t.entries.find(n=>n.path===e)?.value??""}function w_(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(${n}, ${i}, ${o})`}function b_(t){let e=t.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!e)return null;let r=Number(e[1])/255,n=Number(e[2])/255,i=Number(e[3])/255,o=Number(e[4]);return`Color(${r}f, ${n}f, ${i}f, ${o}f)`}function Qh(t){return t==="transparent"?"Color.Transparent":w_(t)??b_(t)??null}function an(t){let e=t.match(/^([\d.]+)px$/);return e?Number(e[1]):null}function Zh(t,e){let r=[];for(let[n,i]of Object.entries(t)){let o=v_(e,i.ref);if(o)switch(n){case"background":case"foreground":{let s=Qh(o);s&&r.push({property:n,kotlinValue:s});break}case"padding":{let s=an(o);if(s!==null)r.push({property:n,kotlinValue:`${s}.dp`});else{let a=o.trim().split(/\s+/);if(a.length===2){let l=an(a[0]),u=an(a[1]);l!==null&&r.push({property:"paddingV",kotlinValue:`${l}.dp`}),u!==null&&r.push({property:"paddingH",kotlinValue:`${u}.dp`})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=an(o);if(s!==null){let a=n==="fontSize"?`${s}.sp`:`${s}.dp`;r.push({property:n,kotlinValue:a})}break}case"width":{if(o==="100%"||o==="fill")r.push({property:"widthFill",kotlinValue:"true"});else{let s=an(o);s!==null&&r.push({property:n,kotlinValue:`${s}.dp`})}break}case"height":{if(o==="100%"||o==="fill")r.push({property:"heightFill",kotlinValue:"true"});else{let s=an(o);s!==null&&r.push({property:n,kotlinValue:`${s}.dp`})}break}case"border":{let s=o.match(/^([\d.]+)px/);s&&r.push({property:"borderWidth",kotlinValue:`${Number(s[1])}.dp`});break}case"borderColor":{let s=Qh(o);s&&r.push({property:"borderColor",kotlinValue:s});break}case"fontWeight":{let s=$_[o];s&&r.push({property:n,kotlinValue:s});break}case"shadow":{r.push({property:n,kotlinValue:o==="none"?"false":"true"});break}case"display":{o.includes("inline")&&r.push({property:"shrinkWrap",kotlinValue:"true"});break}default:break}}return r}function x_(t){return t.some(e=>e.property==="shrinkWrap")?t.filter(e=>e.property!=="widthFill"):t}function tm(t){let e=x_(t);return e.length===0?"VcVariantStyle()":`VcVariantStyle(${[...e].sort((n,i)=>em.indexOf(n.property)-em.indexOf(i.property)).map(n=>`${n.property} = ${n.kotlinValue}`).join(", ")})`}function __(t,e){return{...t,...e}}function rm(t,e){let r=[];r.push("/** Auto-generated Compose theme \u2014 variant style dictionary. */"),r.push("package generated.compose"),r.push(""),r.push("import androidx.compose.foundation.background"),r.push("import androidx.compose.foundation.border"),r.push("import androidx.compose.foundation.layout.Arrangement"),r.push("import androidx.compose.foundation.layout.Row"),r.push("import androidx.compose.foundation.layout.RowScope"),r.push("import androidx.compose.foundation.layout.fillMaxHeight"),r.push("import androidx.compose.foundation.layout.fillMaxWidth"),r.push("import androidx.compose.foundation.layout.heightIn"),r.push("import androidx.compose.foundation.layout.widthIn"),r.push("import androidx.compose.foundation.layout.PaddingValues"),r.push("import androidx.compose.foundation.layout.padding"),r.push("import androidx.compose.foundation.shape.RoundedCornerShape"),r.push("import androidx.compose.ui.graphics.Shape"),r.push("import androidx.compose.material3.LocalContentColor"),r.push("import androidx.compose.material3.Surface"),r.push("import androidx.compose.runtime.Composable"),r.push("import androidx.compose.ui.Alignment"),r.push("import androidx.compose.ui.Modifier"),r.push("import androidx.compose.ui.draw.clip"),r.push("import androidx.compose.ui.draw.shadow"),r.push("import androidx.compose.ui.graphics.Color"),r.push("import androidx.compose.ui.text.TextStyle"),r.push("import androidx.compose.ui.text.font.FontWeight"),r.push("import androidx.compose.ui.unit.Dp"),r.push("import androidx.compose.ui.unit.TextUnit"),r.push("import androidx.compose.ui.unit.dp"),r.push("import androidx.compose.ui.unit.sp"),r.push(""),r.push("data class VcVariantStyle("),r.push(" val foreground: Color? = null,"),r.push(" val background: Color? = null,"),r.push(" val padding: Dp? = null,"),r.push(" val paddingH: Dp? = null,"),r.push(" val paddingV: Dp? = null,"),r.push(" val widthFill: Boolean? = null,"),r.push(" val heightFill: Boolean? = null,"),r.push(" val shrinkWrap: Boolean? = null,"),r.push(" val radius: Dp? = null,"),r.push(" val fontSize: TextUnit? = null,"),r.push(" val fontWeight: FontWeight? = null,"),r.push(" val shadow: Boolean? = null,"),r.push(" val borderWidth: Dp? = null,"),r.push(" val borderColor: Color? = null,"),r.push(" val minHeight: Dp? = null,"),r.push(" val maxWidth: Dp? = null,"),r.push(")"),r.push(""),r.push("fun VcVariantStyle.asTextStyle(): TextStyle {"),r.push(" var style = TextStyle()"),r.push(" foreground?.let { style = style.copy(color = it) }"),r.push(" fontSize?.let { style = style.copy(fontSize = it) }"),r.push(" fontWeight?.let { style = style.copy(fontWeight = it) }"),r.push(" return style"),r.push("}"),r.push(""),r.push("private fun vcSoftShadowModifier(radius: Dp): Modifier ="),r.push(" Modifier.shadow("),r.push(" elevation = 4.dp,"),r.push(" shape = RoundedCornerShape(radius),"),r.push(" clip = false,"),r.push(" ambientColor = Color.Black.copy(alpha = 0.08f),"),r.push(" spotColor = Color.Black.copy(alpha = 0.08f),"),r.push(" )"),r.push(""),r.push("fun Modifier.applyVcStyle(style: VcVariantStyle): Modifier {"),r.push(" var out = this"),r.push(" if (style.widthFill == true && style.shrinkWrap != true) out = out.fillMaxWidth()"),r.push(" if (style.heightFill == true) out = out.fillMaxHeight()"),r.push(" if (style.shadow == true) out = out.then(vcSoftShadowModifier(style.radius ?: 0.dp))"),r.push(" style.background?.let { out = out.background(it, RoundedCornerShape(style.radius ?: 0.dp)) }"),r.push(" style.radius?.let { out = out.clip(RoundedCornerShape(it)) }"),r.push(" if (style.borderColor != null) out = out.border(style.borderWidth ?: 1.dp, style.borderColor, RoundedCornerShape(style.radius ?: 0.dp))"),r.push(" style.minHeight?.let { out = out.heightIn(min = it) }"),r.push(" style.maxWidth?.let { out = out.widthIn(max = it) }"),r.push(" style.padding?.let { out = out.padding(it) }"),r.push(" style.paddingH?.let { out = out.padding(horizontal = it) }"),r.push(" style.paddingV?.let { out = out.padding(vertical = it) }"),r.push(" return out"),r.push("}"),r.push(""),r.push("@Composable"),r.push("fun VcButton("),r.push(" onClick: () -> Unit,"),r.push(" modifier: Modifier = Modifier,"),r.push(" containerColor: Color = Color.Transparent,"),r.push(" contentColor: Color = Color.Unspecified,"),r.push(" shape: Shape = RoundedCornerShape(0.dp),"),r.push(" contentPadding: PaddingValues = PaddingValues(0.dp),"),r.push(" enabled: Boolean = true,"),r.push(" content: @Composable RowScope.() -> Unit,"),r.push(") {"),r.push(" val resolvedContentColor = if (contentColor == Color.Unspecified) LocalContentColor.current else contentColor"),r.push(" Surface("),r.push(" onClick = onClick,"),r.push(" modifier = modifier,"),r.push(" enabled = enabled,"),r.push(" shape = shape,"),r.push(" color = containerColor,"),r.push(" contentColor = resolvedContentColor,"),r.push(" shadowElevation = 0.dp,"),r.push(" tonalElevation = 0.dp,"),r.push(" ) {"),r.push(" Row("),r.push(" modifier = Modifier.padding(contentPadding),"),r.push(" horizontalArrangement = Arrangement.Center,"),r.push(" verticalAlignment = Alignment.CenterVertically,"),r.push(" content = content,"),r.push(" )"),r.push(" }"),r.push("}"),r.push(""),r.push("object VcTheme {"),r.push(" val defaults: Map<String, VcVariantStyle> = mapOf(");for(let[n,i]of Object.entries(t.defaults)){if(Object.keys(i).length===0)continue;let o=Zh(i,e);o.length!==0&&r.push(` ${JSON.stringify(n)} to ${tm(o)},`)}r.push(" )"),r.push(""),r.push(" val variants: Map<String, Map<String, VcVariantStyle>> = mapOf(");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)} to mapOf(`);for(let[a,l]of o){let u=__(s,l),f=Zh(u,e);n==="Box"&&a==="card"&&(f=f.filter(p=>p.property!=="heightFill")),r.push(` ${JSON.stringify(a)} to ${tm(f)},`)}r.push(" ),")}return r.push(" )"),r.push(""),r.push(" fun resolve(element: String, variant: String): VcVariantStyle ="),r.push(" variants[element]?.get(variant) ?: defaults[element] ?: VcVariantStyle()"),r.push("}"),r.push(""),r.join(`
|
|
353
|
+
`)}var $_,em,nm=X(()=>{"use strict";$_={bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",600:"FontWeight.SemiBold",700:"FontWeight.Bold",500:"FontWeight.Medium",400:"FontWeight.Normal"};em=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","shrinkWrap","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});var sm={};lr(sm,{renderComposeRuntime:()=>S_});import{mkdir as im,writeFile as ln}from"node:fs/promises";import{resolve as Wt}from"node:path";function om(){return Wt(Ee(),"renderers/compose/templates")}async function S_(t,e,r,n,i){let o=Wt(e.generated.reactDir,"../compose"),s=Wt(o,"components");if(await im(o,{recursive:!0}),await im(s,{recursive:!0}),n?await ln(Wt(o,"VcTheme.kt"),rm(n.theme,n.tokens),"utf-8"):await ln(Wt(o,"VcTheme.kt"),await vt(om(),"VcTheme.kt.hbs",{packageName:"generated.compose"}),"utf-8"),await ln(Wt(o,"Dispatch.kt"),`package generated.compose
|
|
354
354
|
|
|
355
355
|
/**
|
|
356
356
|
* Dispatch stub for generated Compose screens.
|
|
@@ -359,51 +359,51 @@ ${s}
|
|
|
359
359
|
suspend fun dispatch(action: String, payload: Map<String, Any?> = emptyMap()) {
|
|
360
360
|
// TODO: implement app-specific dispatcher bridge.
|
|
361
361
|
}
|
|
362
|
-
`,"utf-8"),i&&n)for(let a of i.partials)try{let l=await
|
|
363
|
-
`,p=
|
|
364
|
-
`)}var
|
|
362
|
+
`,"utf-8"),i&&n)for(let a of i.partials)try{let l=await os(a,{theme:n.theme,tokens:n.tokens}),u=Wt(s,`${a.exportName}.kt`);await ln(u,l.replace("package generated.compose","package generated.compose.components"),"utf-8"),console.log(` compose/${a.exportName} \u2192 ${u}`)}catch(l){console.warn(` compose/${a.exportName}: skipped (${l.message})`)}for(let a of r.views)if(a.targets.includes("compose")){let l=Wt(o,`${a.screenName}Screen.kt`),u=await vt(om(),"Screen.kt.hbs",{screenName:a.screenName,packageName:"generated.compose",componentName:a.exportName});if(i&&n){let f=i.screens.get(a.screenName);f&&(u=await os(f,{theme:n.theme,tokens:n.tokens}))}await ln(l,u,"utf-8"),console.log(` compose/${a.screenName} \u2192 ${l}`)}for(let a of r.views){if(!a.targets.includes("compose"))continue;let l=ai(t,e,a.screenName);if(await Zo(l))try{let u=await li(l),f=JSON.stringify(u,null,2)+`
|
|
363
|
+
`,p=Wt(o,`${a.screenName}.SampleData.json`);await ln(p,f,"utf-8"),console.log(` compose/${a.screenName}.SampleData.json \u2192 ${p}`)}catch(u){console.warn(` compose/${a.screenName}.SampleData.json: skipped (${u.message})`)}}}var am=X(()=>{"use strict";Vt();ei();nm();Cl();es()});var lm={};lr(lm,{renderComposeComponent:()=>R_,renderComposeRuntime:()=>T_,renderReactFromIr:()=>k_,renderReactPreviewBundle:()=>C_,renderReactRuntime:()=>E_,renderSwiftComponent:()=>I_,renderSwiftUIRuntime:()=>P_});async function k_(t,e,r){return(await Promise.resolve().then(()=>(ya(),ga))).renderReactFromIr(t,e,r)}async function C_(t,e,r){return(await Promise.resolve().then(()=>(ya(),ga))).renderReactPreviewBundle(t,e,r)}async function E_(t,e){return(await Promise.resolve().then(()=>(Gd(),Ud))).renderReactRuntime(t,e)}async function P_(t,e,r,n,i){return(await Promise.resolve().then(()=>($h(),bh))).renderSwiftUIRuntime(t,e,r,n,i)}async function I_(t,e){return(await Promise.resolve().then(()=>(yl(),dh))).renderSwiftComponent(t,e)}async function R_(t,e){return(await Promise.resolve().then(()=>(Cl(),Xh))).renderComposeComponent(t,e)}async function T_(t,e,r,n,i){return(await Promise.resolve().then(()=>(am(),sm))).renderComposeRuntime(t,e,r,n,i)}var um=X(()=>{"use strict"});import{resolve as ss}from"node:path";function cm(){return El||(El=Promise.resolve().then(()=>(um(),lm))),El}function ti(t){return t??ss(Ee(),"renderers/react/templates")}function tn(){return ss(Ee(),"renderers/react/runtime")}function ri(){return ss(tn(),"structural.css")}function A_(){return ss(Ee(),"renderers/react/elements.yaml")}function Pl(t){return t===A_()}var El,ni=X(()=>{"use strict";Vt()});import{readFile as N_}from"node:fs/promises";import{extname as M_,resolve as O_}from"node:path";async function as(t){let e=O_(t),r=await N_(e,"utf-8"),n=M_(e).toLowerCase();if(n===".json")return JSON.parse(r);if(n===".yaml"||n===".yml")return ht.load(r);throw new Error(`Unsupported design file extension "${n}" (expected .yaml, .yml, or .json): ${e}`)}var Il=X(()=>{"use strict";Dr()});var ls,Ct,cn,us,Ie,un,br=X(()=>{"use strict";ls=["color","dimension","shadow","typography","layout"],Ct=class extends Error{constructor(e){super(e),this.name="DesignTokenError"}},cn=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],us={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"]},Ie=class extends Error{constructor(e){super(e),this.name="DesignThemeError"}},un=class extends Error{constructor(e){super(e),this.name="DesignConstraintError"}}});function pn(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function L_(t){if(!cn.includes(t))throw new Ie(`Unknown variant property "${t}" (expected ${cn.join(", ")})`);return t}function j_(t,e,r){if(typeof t!="string")throw new Ie(`${e}.${r} must be a token reference string like "{ui.primary}"`);let n=t.match(V_);if(!n)throw new Ie(`${e}.${r} must be a token reference like "{ui.primary}", got "${t}"`);return n[1]}function pm(t,e){let r={};for(let[n,i]of Object.entries(e)){let o=L_(n),s=j_(i,t,n);r[o]={ref:s,accepts:[...us[o]]}}return r}function D_(t){if(t===void 0)return{};if(!pn(t))throw new Ie('Theme "defaults" must be an object');let e={};for(let[r,n]of Object.entries(t)){if(!pn(n))throw new Ie(`Theme defaults for "${r}" must be an object`);e[r]=pm(`defaults.${r}`,n)}return e}function Rl(t){if(!pn(t))throw new Ie("Theme document must be a YAML/JSON object");let e=t.variants;if(!pn(e))throw new Ie('Theme document must contain a "variants" object');let r={};for(let[n,i]of Object.entries(e)){if(!pn(i))throw new Ie(`Theme variants for "${n}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!pn(a))throw new Ie(`Theme variant "${n}.${s}" must be an object`);o[s]=pm(`${n}.${s}`,a)}r[n]=o}return{defaults:D_(t.defaults),variants:r}}var V_,Tl=X(()=>{"use strict";br();V_=/^\{([^}]+)\}$/});function pi(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function F_(t){return`--${t.replace(/\./g,"-")}`}function B_(t,e){if(typeof t!="string"||!ls.includes(t))throw new Ct(`Token "${e}" has unsupported $type "${String(t)}" (expected ${ls.join(", ")})`);return t}function fm(t,e,r){if(pi(t)){if("$type"in t&&"$value"in t){r.push({path:e,type:B_(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;fm(i,o,r)}}}function H_(t,e){if(typeof e=="string")return e;if(t==="typography"&&pi(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=>pi(r)?`${r.offsetX??0} ${r.offsetY??0} ${r.blur??0} ${r.color??"transparent"}`:String(r)).join(", ");if(t==="shadow"&&pi(e))return`${e.offsetX??0} ${e.offsetY??0} ${e.blur??0} ${e.color??"transparent"}`;throw new Ct(`Token value for "${t}" must be a string or supported object`)}function W_(t){return typeof t!="string"?null:t.match(q_)?.[1]??null}function dm(t,e,r,n,i){let o=W_(e);if(!o){let l=r.get(t);if(!l)throw new Ct(`Unknown token path "${t}"`);return{value:H_(l.type,e)}}if(n.has(t))throw new Ct(`Circular token reference detected at "${t}"`);let s=r.get(o);if(!s)throw new Ct(`Token "${t}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};n.add(t);let a=dm(o,s.rawValue,r,n,i);return n.delete(t),i.set(o,a.value),{value:a.value,ref:o}}function Al(t){if(!pi(t))throw new Ct("Token document must be a YAML/JSON object");let e=[];fm(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}=dm(o.path,o.rawValue,r,new Set,n);n.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:F_(o.path),ref:a})}return{entries:i}}var q_,Nl=X(()=>{"use strict";br();q_=/^\{([^}]+)\}$/});function Ml(t){let e=Cp(t),r=new Set;for(let n of e)cn.includes(n)&&r.add(n);return r}var hm=X(()=>{"use strict";mt();br()});function z_(t){return new Map(t.entries.map(e=>[e.path,e]))}function mm(t,e,r,n,i){for(let[o,s]of Object.entries(r)){let a=us[o];if(!a)throw new Ie(`Unknown variant property "${o}" on ${t}`);if(!n.has(o))throw new Ie(`Property "${o}" is not allowed for ${e} in ${t}`);let l=i.get(s.ref);if(!l)throw new Ie(`${t}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(l.type))throw new Ie(`${t}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${l.type}`)}}function gm(t,e){let r=z_(t);for(let[n,i]of Object.entries(e.defaults)){let o=Ml(n);mm(`defaults.${n}`,n,i,o,r)}for(let[n,i]of Object.entries(e.variants)){let o=Ml(n);for(let[s,a]of Object.entries(i))mm(`variants.${n}.${s}`,n,a,o,r)}}function Ol(t,e){gm(t,e)}var Vl=X(()=>{"use strict";br();hm()});function Ll(t){let e=[":root {"];for(let r of t.entries)e.push(` ${r.cssVar}: ${r.value};`);return e.push("}"),e.join(`
|
|
364
|
+
`)}var ym=X(()=>{"use strict"});var cs,jl=X(()=>{"use strict";cs={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 ps(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function fs(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 Dl=X(()=>{"use strict"});function ql(t,e){let r=[];for(let[n,i]of Object.entries(e.defaults)){let o=ps(n),s=[];for(let[a,l]of Object.entries(i)){let u=cs[a];if(!u){console.warn(`[view-contracts] CSS theme: variant property "${a}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let f=fs(t,l.ref);s.push(` ${u}: var(${f});`)}s.length!==0&&r.push(`.vc-${o} {
|
|
365
365
|
${s.join(`
|
|
366
366
|
`)}
|
|
367
367
|
}`)}return r.join(`
|
|
368
368
|
|
|
369
|
-
`)}var
|
|
369
|
+
`)}var vm=X(()=>{"use strict";jl();Dl()});function Fl(t,e){let r=[];for(let[n,i]of Object.entries(e.variants)){let o=ps(n);for(let[s,a]of Object.entries(i)){let l=[];for(let[u,f]of Object.entries(a)){let p=cs[u];if(!p){console.warn(`[view-contracts] CSS theme: variant property "${u}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let d=fs(t,f.ref);l.push(` ${p}: var(${d});`)}l.length!==0&&r.push(`.vc-${o}--${s} {
|
|
370
370
|
${l.join(`
|
|
371
371
|
`)}
|
|
372
372
|
}`)}}return r.join(`
|
|
373
373
|
|
|
374
|
-
`)}var
|
|
374
|
+
`)}var wm=X(()=>{"use strict";jl();Dl()});function bm(t){return typeof t=="object"&&t!==null&&"kind"in t&&t.kind==="binding"}function U_(t){if(t.variant!==void 0)return t.variant;if(t.tone!==void 0)return t.tone}function $m(t,e,r,n,i,o){let s=r.variants[t];if(!s){e!==void 0&&!bm(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||bm(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 ds(t,e,r,n){if(t.kind==="component"){let i=U_(t.props);t.props.variant!==void 0?$m(t.name,t.props.variant,e,r,n):i!==void 0&&t.name in e.variants&&$m(t.name,i,e,r,n,{mapMutedToDefault:!0});for(let o of t.children)ds(o,e,r,n);return}if(t.kind==="map"){ds(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)ds(i,e,r,n);return}t.kind}function Bl(t,e){let r=[];for(let n of t)ds(n.root,e,n.source,r);if(r.length>0)throw new Error(`View variant validation failed:
|
|
375
375
|
${r.map(n=>` - ${n}`).join(`
|
|
376
|
-
`)}`)}var
|
|
376
|
+
`)}`)}var xm=X(()=>{"use strict"});function Hl(t,e){return[...new Set([...t.matchAll(e)].map(r=>r[0]))]}function _m(t,e,r){let n=e.slice(0,5).map(o=>` - ${t}: ${o}`).join(`
|
|
377
377
|
`),i=e.length>5?`
|
|
378
378
|
\u2026 and ${e.length-5} more`:"";return`${r}
|
|
379
|
-
${n}${i}`}function
|
|
379
|
+
${n}${i}`}function Wl(t,e){let r=Hl(t,G_);if(r.length!==0)throw new un(_m(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 zl(t,e){let r=Hl(t,J_),n=Hl(t,K_),i=[...r,...n];if(i.length!==0)throw new un(_m(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 G_,J_,K_,Ul=X(()=>{"use strict";br();G_=/\.vc-[a-z][\w-]*/g,J_=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,K_=/\bextensionClassName\s*\(/g});import{readFile as Sm,stat as Y_}from"node:fs/promises";import{resolve as X_}from"node:path";async function km(t){try{return await Y_(t),!0}catch{return!1}}async function fi(t,e){let r=t.design?.extensionsCss;r&&await km(r)&&Wl(await Sm(r,"utf-8"),r);let n=Te(e);for(let i of["extensions.tsx","extensions.ts"]){let o=X_(n,"src/components",i);await km(o)&&zl(await Sm(o,"utf-8"),o)}}var Cm=X(()=>{"use strict";Ot();Ul()});async function Q_(t){let e=await as(t);return Al(e)}async function Z_(t){let e=await as(t);return Rl(e)}async function hs(t,e){let r=await Q_(t),n=await Z_(e);return Ol(r,n),{tokenIR:r,themeIR:n}}var Gl=X(()=>{"use strict";Il();Tl();Nl();Vl();ym();vm();wm();Il();Tl();Nl();Vl();xm();Ul();Cm();Ko();br()});import{readFile as Em,stat as e2}from"node:fs/promises";async function t2(t){try{return await e2(t),!0}catch{return!1}}async function ii(t,e){let r=Te(e),{tokensPath:n,themePath:i}=io(t),{tokenIR:o,themeIR:s}=await hs(n,i);await fi(t,e);let a=await Em(ri(),"utf-8"),l=ql(o,s),u=Fl(o,s),f=`${Ll(o)}
|
|
380
380
|
|
|
381
381
|
${a.trim()}`;l&&(f+=`
|
|
382
382
|
|
|
383
383
|
${l}`),f+=`
|
|
384
384
|
|
|
385
|
-
${u}`;let p=t.design?.extensionsCss;return p&&await
|
|
385
|
+
${u}`;let p=t.design?.extensionsCss;return p&&await t2(p)&&(f+=`
|
|
386
386
|
|
|
387
|
-
${await Cm(p,"utf-8")}`),f}var Go=X(()=>{"use strict";Ot();ri();Ul()});var gi=x(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.regexpCode=le.getEsmExportName=le.getProperty=le.safeStringify=le.stringify=le.strConcat=le.addCodeArg=le.str=le._=le.nil=le._Code=le.Name=le.IDENTIFIER=le._CodeOrName=void 0;var hi=class{};le._CodeOrName=hi;le.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var $r=class extends hi{constructor(e){if(super(),!le.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}}};le.Name=$r;var ut=class extends hi{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 $r&&(r[n.str]=(r[n.str]||0)+1),r),{})}};le._Code=ut;le.nil=new ut("");function Hm(t,...e){let r=[t[0]],n=0;for(;n<e.length;)ru(r,e[n]),r.push(t[++n]);return new ut(r)}le._=Hm;var tu=new ut("+");function Wm(t,...e){let r=[mi(t[0])],n=0;for(;n<e.length;)r.push(tu),ru(r,e[n]),r.push(tu,mi(t[++n]));return y2(r),new ut(r)}le.str=Wm;function ru(t,e){e instanceof ut?t.push(...e._items):e instanceof $r?t.push(e):t.push(b2(e))}le.addCodeArg=ru;function y2(t){let e=1;for(;e<t.length-1;){if(t[e]===tu){let r=v2(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function v2(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof $r||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 $r))return`"${t}${e.slice(1)}`}function w2(t,e){return e.emptyStr()?t:t.emptyStr()?e:Wm`${t}${e}`}le.strConcat=w2;function b2(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:mi(Array.isArray(t)?t.join(","):t)}function $2(t){return new ut(mi(t))}le.stringify=$2;function mi(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}le.safeStringify=mi;function _2(t){return typeof t=="string"&&le.IDENTIFIER.test(t)?new ut(`.${t}`):Hm`[${t}]`}le.getProperty=_2;function x2(t){if(typeof t=="string"&&le.IDENTIFIER.test(t))return new ut(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}le.getEsmExportName=x2;function S2(t){return new ut(t.toString())}le.regexpCode=S2});var ou=x(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.ValueScope=Xe.ValueScopeName=Xe.Scope=Xe.varKinds=Xe.UsedValueState=void 0;var Ye=gi(),nu=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},gs;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(gs||(Xe.UsedValueState=gs={}));Xe.varKinds={const:new Ye.Name("const"),let:new Ye.Name("let"),var:new Ye.Name("var")};var ys=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Ye.Name?e:this.name(e)}name(e){return new Ye.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}}};Xe.Scope=ys;var vs=class extends Ye.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Ye._)`.${new Ye.Name(r)}[${n}]`}};Xe.ValueScopeName=vs;var k2=(0,Ye._)`\n`,iu=class extends ys{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?k2:Ye.nil}}get(){return this._scope}name(e){return new vs(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 f=a.get(s);if(f)return f}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,Ye._)`${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=Ye.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,gs.Started);let f=r(u);if(f){let p=this.opts.es5?Xe.varKinds.var:Xe.varKinds.const;o=(0,Ye._)`${o}${p} ${u} = ${f};${this.opts._n}`}else if(f=i?.(u))o=(0,Ye._)`${o}${f}${this.opts._n}`;else throw new nu(u);l.set(u,gs.Completed)})}return o}};Xe.ValueScope=iu});var Z=x(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.or=te.and=te.not=te.CodeGen=te.operators=te.varKinds=te.ValueScopeName=te.ValueScope=te.Scope=te.Name=te.regexpCode=te.stringify=te.getProperty=te.nil=te.strConcat=te.str=te._=void 0;var se=gi(),wt=ou(),Zt=gi();Object.defineProperty(te,"_",{enumerable:!0,get:function(){return Zt._}});Object.defineProperty(te,"str",{enumerable:!0,get:function(){return Zt.str}});Object.defineProperty(te,"strConcat",{enumerable:!0,get:function(){return Zt.strConcat}});Object.defineProperty(te,"nil",{enumerable:!0,get:function(){return Zt.nil}});Object.defineProperty(te,"getProperty",{enumerable:!0,get:function(){return Zt.getProperty}});Object.defineProperty(te,"stringify",{enumerable:!0,get:function(){return Zt.stringify}});Object.defineProperty(te,"regexpCode",{enumerable:!0,get:function(){return Zt.regexpCode}});Object.defineProperty(te,"Name",{enumerable:!0,get:function(){return Zt.Name}});var _s=ou();Object.defineProperty(te,"Scope",{enumerable:!0,get:function(){return _s.Scope}});Object.defineProperty(te,"ValueScope",{enumerable:!0,get:function(){return _s.ValueScope}});Object.defineProperty(te,"ValueScopeName",{enumerable:!0,get:function(){return _s.ValueScopeName}});Object.defineProperty(te,"varKinds",{enumerable:!0,get:function(){return _s.varKinds}});te.operators={GT:new se._Code(">"),GTE:new se._Code(">="),LT:new se._Code("<"),LTE:new se._Code("<="),EQ:new se._Code("==="),NEQ:new se._Code("!=="),NOT:new se._Code("!"),OR:new se._Code("||"),AND:new se._Code("&&"),ADD:new se._Code("+")};var Wt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},su=class extends Wt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?wt.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=hn(this.rhs,e,r)),this}get names(){return this.rhs instanceof se._CodeOrName?this.rhs.names:{}}},ws=class extends Wt{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 se.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=hn(this.rhs,e,r),this}get names(){let e=this.lhs instanceof se.Name?{}:{...this.lhs.names};return $s(e,this.rhs)}},au=class extends ws{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},lu=class extends Wt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},uu=class extends Wt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},cu=class extends Wt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},pu=class extends Wt{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=hn(this.code,e,r),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},yi=class extends Wt{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)||(C2(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Sr(e,r.names),{})}},zt=class extends yi{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},fu=class extends yi{},dn=class extends zt{};dn.kind="else";var _r=class t extends zt{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 dn(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(zm(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=hn(this.condition,e,r),this}get names(){let e=super.names;return $s(e,this.condition),this.else&&Sr(e,this.else.names),e}};_r.kind="if";var xr=class extends zt{};xr.kind="for";var du=class extends xr{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=hn(this.iteration,e,r),this}get names(){return Sr(super.names,this.iteration.names)}},hu=class extends xr{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?wt.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=$s(super.names,this.from);return $s(e,this.to)}},bs=class extends xr{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=hn(this.iterable,e,r),this}get names(){return Sr(super.names,this.iterable.names)}},vi=class extends zt{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)}};vi.kind="func";var wi=class extends yi{render(e){return"return "+super.render(e)}};wi.kind="return";var mu=class extends zt{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&&Sr(e,this.catch.names),this.finally&&Sr(e,this.finally.names),e}},bi=class extends zt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};bi.kind="catch";var $i=class extends zt{render(e){return"finally"+super.render(e)}};$i.kind="finally";var gu=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
388
|
-
`:""},this._extScope=e,this._scope=new wt.Scope({parent:e}),this._nodes=[new fu]}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 su(e,o,n)),o}const(e,r,n){return this._def(wt.varKinds.const,e,r,n)}let(e,r,n){return this._def(wt.varKinds.let,e,r,n)}var(e,r,n){return this._def(wt.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new ws(e,r,n))}add(e,r){return this._leafNode(new au(e,te.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==se.nil&&this._leafNode(new pu(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,se.addCodeArg)(r,i));return r.push("}"),new se._Code(r)}if(e,r,n){if(this._blockNode(new _r(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 _r(e))}else(){return this._elseNode(new dn)}endIf(){return this._endBlockNode(_r,dn)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new du(e),r)}forRange(e,r,n,i,o=this.opts.es5?wt.varKinds.var:wt.varKinds.let){let s=this._scope.toName(e);return this._for(new hu(o,s,r,n),()=>i(s))}forOf(e,r,n,i=wt.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=r instanceof se.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,se._)`${s}.length`,a=>{this.var(o,(0,se._)`${s}[${a}]`),n(o)})}return this._for(new bs("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?wt.varKinds.var:wt.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,se._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new bs("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(xr)}label(e){return this._leafNode(new lu(e))}break(e){return this._leafNode(new uu(e))}return(e){let r=new wi;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(wi)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new mu;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new bi(o),r(o)}return n&&(this._currNode=i.finally=new $i,this.code(n)),this._endBlockNode(bi,$i)}throw(e){return this._leafNode(new cu(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=se.nil,n,i){return this._blockNode(new vi(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(vi)}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 _r))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}};te.CodeGen=gu;function Sr(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function $s(t,e){return e instanceof se._CodeOrName?Sr(t,e.names):t}function hn(t,e,r){if(t instanceof se.Name)return n(t);if(!i(t))return t;return new se._Code(t._items.reduce((o,s)=>(s instanceof se.Name&&(s=n(s)),s instanceof se._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 se._Code&&o._items.some(s=>s instanceof se.Name&&e[s.str]===1&&r[s.str]!==void 0)}}function C2(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function zm(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,se._)`!${yu(t)}`}te.not=zm;var E2=Um(te.operators.AND);function P2(...t){return t.reduce(E2)}te.and=P2;var I2=Um(te.operators.OR);function R2(...t){return t.reduce(I2)}te.or=R2;function Um(t){return(e,r)=>e===se.nil?r:r===se.nil?e:(0,se._)`${yu(e)} ${t} ${yu(r)}`}function yu(t){return t instanceof se.Name?t:(0,se._)`(${t})`}});var ne=x(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.checkStrictMode=re.getErrorPath=re.Type=re.useFunc=re.setEvaluated=re.evaluatedPropsToName=re.mergeEvaluated=re.eachItem=re.unescapeJsonPointer=re.escapeJsonPointer=re.escapeFragment=re.unescapeFragment=re.schemaRefOrVal=re.schemaHasRulesButRef=re.schemaHasRules=re.checkUnknownRules=re.alwaysValidSchema=re.toHash=void 0;var he=Z(),T2=gi();function A2(t){let e={};for(let r of t)e[r]=!0;return e}re.toHash=A2;function N2(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Km(t,e),!Ym(e,t.self.RULES.all))}re.alwaysValidSchema=N2;function Km(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]||Zm(t,`unknown keyword: "${o}"`)}re.checkUnknownRules=Km;function Ym(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}re.schemaHasRules=Ym;function M2(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}re.schemaHasRulesButRef=M2;function O2({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,he._)`${r}`}return(0,he._)`${t}${e}${(0,he.getProperty)(n)}`}re.schemaRefOrVal=O2;function V2(t){return Xm(decodeURIComponent(t))}re.unescapeFragment=V2;function L2(t){return encodeURIComponent(wu(t))}re.escapeFragment=L2;function wu(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}re.escapeJsonPointer=wu;function Xm(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}re.unescapeJsonPointer=Xm;function j2(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}re.eachItem=j2;function Gm({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,s,a)=>{let l=s===void 0?o:s instanceof he.Name?(o instanceof he.Name?t(i,o,s):e(i,o,s),s):o instanceof he.Name?(e(i,s,o),o):r(o,s);return a===he.Name&&!(l instanceof he.Name)?n(i,l):l}}re.mergeEvaluated={props:Gm({mergeNames:(t,e,r)=>t.if((0,he._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,he._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,he._)`${r} || {}`).code((0,he._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,he._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,he._)`${r} || {}`),bu(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Qm}),items:Gm({mergeNames:(t,e,r)=>t.if((0,he._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,he._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,he._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,he._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Qm(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,he._)`{}`);return e!==void 0&&bu(t,r,e),r}re.evaluatedPropsToName=Qm;function bu(t,e,r){Object.keys(r).forEach(n=>t.assign((0,he._)`${e}${(0,he.getProperty)(n)}`,!0))}re.setEvaluated=bu;var Jm={};function D2(t,e){return t.scopeValue("func",{ref:e,code:Jm[e.code]||(Jm[e.code]=new T2._Code(e.code))})}re.useFunc=D2;var vu;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(vu||(re.Type=vu={}));function q2(t,e,r){if(t instanceof he.Name){let n=e===vu.Num;return r?n?(0,he._)`"[" + ${t} + "]"`:(0,he._)`"['" + ${t} + "']"`:n?(0,he._)`"/" + ${t}`:(0,he._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,he.getProperty)(t).toString():"/"+wu(t)}re.getErrorPath=q2;function Zm(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}re.checkStrictMode=Zm});var ct=x($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});var je=Z(),F2={data:new je.Name("data"),valCxt:new je.Name("valCxt"),instancePath:new je.Name("instancePath"),parentData:new je.Name("parentData"),parentDataProperty:new je.Name("parentDataProperty"),rootData:new je.Name("rootData"),dynamicAnchors:new je.Name("dynamicAnchors"),vErrors:new je.Name("vErrors"),errors:new je.Name("errors"),this:new je.Name("this"),self:new je.Name("self"),scope:new je.Name("scope"),json:new je.Name("json"),jsonPos:new je.Name("jsonPos"),jsonLen:new je.Name("jsonLen"),jsonPart:new je.Name("jsonPart")};$u.default=F2});var _i=x(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.extendErrors=De.resetErrorsCount=De.reportExtraError=De.reportError=De.keyword$DataError=De.keywordError=void 0;var ae=Z(),xs=ne(),ze=ct();De.keywordError={message:({keyword:t})=>(0,ae.str)`must pass "${t}" keyword validation`};De.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ae.str)`"${t}" keyword must be ${e} ($data)`:(0,ae.str)`"${t}" keyword is invalid ($data)`};function B2(t,e=De.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,l=rg(t,e,r);n??(s||a)?eg(o,l):tg(i,(0,ae._)`[${l}]`)}De.reportError=B2;function H2(t,e=De.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:s}=n,a=rg(t,e,r);eg(i,a),o||s||tg(n,ze.default.vErrors)}De.reportExtraError=H2;function W2(t,e){t.assign(ze.default.errors,e),t.if((0,ae._)`${ze.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ae._)`${ze.default.vErrors}.length`,e),()=>t.assign(ze.default.vErrors,null)))}De.resetErrorsCount=W2;function z2({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,ze.default.errors,a=>{t.const(s,(0,ae._)`${ze.default.vErrors}[${a}]`),t.if((0,ae._)`${s}.instancePath === undefined`,()=>t.assign((0,ae._)`${s}.instancePath`,(0,ae.strConcat)(ze.default.instancePath,o.errorPath))),t.assign((0,ae._)`${s}.schemaPath`,(0,ae.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,ae._)`${s}.schema`,r),t.assign((0,ae._)`${s}.data`,n))})}De.extendErrors=z2;function eg(t,e){let r=t.const("err",e);t.if((0,ae._)`${ze.default.vErrors} === null`,()=>t.assign(ze.default.vErrors,(0,ae._)`[${r}]`),(0,ae._)`${ze.default.vErrors}.push(${r})`),t.code((0,ae._)`${ze.default.errors}++`)}function tg(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,ae._)`new ${t.ValidationError}(${e})`):(r.assign((0,ae._)`${n}.errors`,e),r.return(!1))}var kr={keyword:new ae.Name("keyword"),schemaPath:new ae.Name("schemaPath"),params:new ae.Name("params"),propertyName:new ae.Name("propertyName"),message:new ae.Name("message"),schema:new ae.Name("schema"),parentSchema:new ae.Name("parentSchema")};function rg(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,ae._)`{}`:U2(t,e,r)}function U2(t,e,r={}){let{gen:n,it:i}=t,o=[G2(i,r),J2(t,r)];return K2(t,e,o),n.object(...o)}function G2({errorPath:t},{instancePath:e}){let r=e?(0,ae.str)`${t}${(0,xs.getErrorPath)(e,xs.Type.Str)}`:t;return[ze.default.instancePath,(0,ae.strConcat)(ze.default.instancePath,r)]}function J2({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,ae.str)`${e}/${t}`;return r&&(i=(0,ae.str)`${i}${(0,xs.getErrorPath)(r,xs.Type.Str)}`),[kr.schemaPath,i]}function K2(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:l,propertyName:u,topSchemaRef:f,schemaPath:p}=a;n.push([kr.keyword,i],[kr.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),l.messages&&n.push([kr.message,typeof r=="function"?r(t):r]),l.verbose&&n.push([kr.schema,s],[kr.parentSchema,(0,ae._)`${f}${p}`],[ze.default.data,o]),u&&n.push([kr.propertyName,u])}});var ig=x(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.boolOrEmptySchema=mn.topBoolOrEmptySchema=void 0;var Y2=_i(),X2=Z(),Q2=ct(),Z2={message:"boolean schema is false"};function e1(t){let{gen:e,schema:r,validateName:n}=t;r===!1?ng(t,!1):typeof r=="object"&&r.$async===!0?e.return(Q2.default.data):(e.assign((0,X2._)`${n}.errors`,null),e.return(!0))}mn.topBoolOrEmptySchema=e1;function t1(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),ng(t)):r.var(e,!0)}mn.boolOrEmptySchema=t1;function ng(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,Y2.reportError)(i,Z2,void 0,e)}});var _u=x(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.getRules=gn.isJSONType=void 0;var r1=["string","number","integer","boolean","null","object","array"],n1=new Set(r1);function i1(t){return typeof t=="string"&&n1.has(t)}gn.isJSONType=i1;function o1(){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:{}}}gn.getRules=o1});var xu=x(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.shouldUseRule=er.shouldUseGroup=er.schemaHasRulesForType=void 0;function s1({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&og(t,n)}er.schemaHasRulesForType=s1;function og(t,e){return e.rules.some(r=>sg(t,r))}er.shouldUseGroup=og;function sg(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))}er.shouldUseRule=sg});var xi=x(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.reportTypeError=qe.checkDataTypes=qe.checkDataType=qe.coerceAndCheckDataType=qe.getJSONTypes=qe.getSchemaTypes=qe.DataType=void 0;var a1=_u(),l1=xu(),u1=_i(),ee=Z(),ag=ne(),yn;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(yn||(qe.DataType=yn={}));function c1(t){let e=lg(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}qe.getSchemaTypes=c1;function lg(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(a1.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}qe.getJSONTypes=lg;function p1(t,e){let{gen:r,data:n,opts:i}=t,o=f1(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,l1.schemaHasRulesForType)(t,e[0]));if(s){let a=ku(e,n,i.strictNumbers,yn.Wrong);r.if(a,()=>{o.length?d1(t,e,o):Cu(t)})}return s}qe.coerceAndCheckDataType=p1;var ug=new Set(["string","number","integer","boolean","null"]);function f1(t,e){return e?t.filter(r=>ug.has(r)||e==="array"&&r==="array"):[]}function d1(t,e,r){let{gen:n,data:i,opts:o}=t,s=n.let("dataType",(0,ee._)`typeof ${i}`),a=n.let("coerced",(0,ee._)`undefined`);o.coerceTypes==="array"&&n.if((0,ee._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,ee._)`${i}[0]`).assign(s,(0,ee._)`typeof ${i}`).if(ku(e,i,o.strictNumbers),()=>n.assign(a,i))),n.if((0,ee._)`${a} !== undefined`);for(let u of r)(ug.has(u)||u==="array"&&o.coerceTypes==="array")&&l(u);n.else(),Cu(t),n.endIf(),n.if((0,ee._)`${a} !== undefined`,()=>{n.assign(i,a),h1(t,a)});function l(u){switch(u){case"string":n.elseIf((0,ee._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ee._)`"" + ${i}`).elseIf((0,ee._)`${i} === null`).assign(a,(0,ee._)`""`);return;case"number":n.elseIf((0,ee._)`${s} == "boolean" || ${i} === null
|
|
387
|
+
${await Em(p,"utf-8")}`),f}var Ko=X(()=>{"use strict";Ot();ni();Gl()});var vi=_(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.regexpCode=le.getEsmExportName=le.getProperty=le.safeStringify=le.stringify=le.strConcat=le.addCodeArg=le.str=le._=le.nil=le._Code=le.Name=le.IDENTIFIER=le._CodeOrName=void 0;var gi=class{};le._CodeOrName=gi;le.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var $r=class extends gi{constructor(e){if(super(),!le.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}}};le.Name=$r;var ut=class extends gi{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 $r&&(r[n.str]=(r[n.str]||0)+1),r),{})}};le._Code=ut;le.nil=new ut("");function Wm(t,...e){let r=[t[0]],n=0;for(;n<e.length;)nu(r,e[n]),r.push(t[++n]);return new ut(r)}le._=Wm;var ru=new ut("+");function zm(t,...e){let r=[yi(t[0])],n=0;for(;n<e.length;)r.push(ru),nu(r,e[n]),r.push(ru,yi(t[++n]));return $2(r),new ut(r)}le.str=zm;function nu(t,e){e instanceof ut?t.push(...e._items):e instanceof $r?t.push(e):t.push(S2(e))}le.addCodeArg=nu;function $2(t){let e=1;for(;e<t.length-1;){if(t[e]===ru){let r=x2(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function x2(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof $r||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 $r))return`"${t}${e.slice(1)}`}function _2(t,e){return e.emptyStr()?t:t.emptyStr()?e:zm`${t}${e}`}le.strConcat=_2;function S2(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:yi(Array.isArray(t)?t.join(","):t)}function k2(t){return new ut(yi(t))}le.stringify=k2;function yi(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}le.safeStringify=yi;function C2(t){return typeof t=="string"&&le.IDENTIFIER.test(t)?new ut(`.${t}`):Wm`[${t}]`}le.getProperty=C2;function E2(t){if(typeof t=="string"&&le.IDENTIFIER.test(t))return new ut(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}le.getEsmExportName=E2;function P2(t){return new ut(t.toString())}le.regexpCode=P2});var su=_(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.ValueScope=Xe.ValueScopeName=Xe.Scope=Xe.varKinds=Xe.UsedValueState=void 0;var Ye=vi(),iu=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},ys;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(ys||(Xe.UsedValueState=ys={}));Xe.varKinds={const:new Ye.Name("const"),let:new Ye.Name("let"),var:new Ye.Name("var")};var vs=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Ye.Name?e:this.name(e)}name(e){return new Ye.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}}};Xe.Scope=vs;var ws=class extends Ye.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Ye._)`.${new Ye.Name(r)}[${n}]`}};Xe.ValueScopeName=ws;var I2=(0,Ye._)`\n`,ou=class extends vs{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?I2:Ye.nil}}get(){return this._scope}name(e){return new ws(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 f=a.get(s);if(f)return f}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,Ye._)`${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=Ye.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,ys.Started);let f=r(u);if(f){let p=this.opts.es5?Xe.varKinds.var:Xe.varKinds.const;o=(0,Ye._)`${o}${p} ${u} = ${f};${this.opts._n}`}else if(f=i?.(u))o=(0,Ye._)`${o}${f}${this.opts._n}`;else throw new iu(u);l.set(u,ys.Completed)})}return o}};Xe.ValueScope=ou});var Z=_(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.or=te.and=te.not=te.CodeGen=te.operators=te.varKinds=te.ValueScopeName=te.ValueScope=te.Scope=te.Name=te.regexpCode=te.stringify=te.getProperty=te.nil=te.strConcat=te.str=te._=void 0;var se=vi(),wt=su(),Zt=vi();Object.defineProperty(te,"_",{enumerable:!0,get:function(){return Zt._}});Object.defineProperty(te,"str",{enumerable:!0,get:function(){return Zt.str}});Object.defineProperty(te,"strConcat",{enumerable:!0,get:function(){return Zt.strConcat}});Object.defineProperty(te,"nil",{enumerable:!0,get:function(){return Zt.nil}});Object.defineProperty(te,"getProperty",{enumerable:!0,get:function(){return Zt.getProperty}});Object.defineProperty(te,"stringify",{enumerable:!0,get:function(){return Zt.stringify}});Object.defineProperty(te,"regexpCode",{enumerable:!0,get:function(){return Zt.regexpCode}});Object.defineProperty(te,"Name",{enumerable:!0,get:function(){return Zt.Name}});var _s=su();Object.defineProperty(te,"Scope",{enumerable:!0,get:function(){return _s.Scope}});Object.defineProperty(te,"ValueScope",{enumerable:!0,get:function(){return _s.ValueScope}});Object.defineProperty(te,"ValueScopeName",{enumerable:!0,get:function(){return _s.ValueScopeName}});Object.defineProperty(te,"varKinds",{enumerable:!0,get:function(){return _s.varKinds}});te.operators={GT:new se._Code(">"),GTE:new se._Code(">="),LT:new se._Code("<"),LTE:new se._Code("<="),EQ:new se._Code("==="),NEQ:new se._Code("!=="),NOT:new se._Code("!"),OR:new se._Code("||"),AND:new se._Code("&&"),ADD:new se._Code("+")};var zt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},au=class extends zt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?wt.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=hn(this.rhs,e,r)),this}get names(){return this.rhs instanceof se._CodeOrName?this.rhs.names:{}}},bs=class extends zt{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 se.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=hn(this.rhs,e,r),this}get names(){let e=this.lhs instanceof se.Name?{}:{...this.lhs.names};return xs(e,this.rhs)}},lu=class extends bs{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},uu=class extends zt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},cu=class extends zt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},pu=class extends zt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},fu=class extends zt{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=hn(this.code,e,r),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},wi=class extends zt{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)||(R2(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Sr(e,r.names),{})}},Ut=class extends wi{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},du=class extends wi{},dn=class extends Ut{};dn.kind="else";var xr=class t extends Ut{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 dn(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Um(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=hn(this.condition,e,r),this}get names(){let e=super.names;return xs(e,this.condition),this.else&&Sr(e,this.else.names),e}};xr.kind="if";var _r=class extends Ut{};_r.kind="for";var hu=class extends _r{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=hn(this.iteration,e,r),this}get names(){return Sr(super.names,this.iteration.names)}},mu=class extends _r{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?wt.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=xs(super.names,this.from);return xs(e,this.to)}},$s=class extends _r{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=hn(this.iterable,e,r),this}get names(){return Sr(super.names,this.iterable.names)}},bi=class extends Ut{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)}};bi.kind="func";var $i=class extends wi{render(e){return"return "+super.render(e)}};$i.kind="return";var gu=class extends Ut{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&&Sr(e,this.catch.names),this.finally&&Sr(e,this.finally.names),e}},xi=class extends Ut{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};xi.kind="catch";var _i=class extends Ut{render(e){return"finally"+super.render(e)}};_i.kind="finally";var yu=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
388
|
+
`:""},this._extScope=e,this._scope=new wt.Scope({parent:e}),this._nodes=[new du]}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 au(e,o,n)),o}const(e,r,n){return this._def(wt.varKinds.const,e,r,n)}let(e,r,n){return this._def(wt.varKinds.let,e,r,n)}var(e,r,n){return this._def(wt.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new bs(e,r,n))}add(e,r){return this._leafNode(new lu(e,te.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==se.nil&&this._leafNode(new fu(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,se.addCodeArg)(r,i));return r.push("}"),new se._Code(r)}if(e,r,n){if(this._blockNode(new xr(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 xr(e))}else(){return this._elseNode(new dn)}endIf(){return this._endBlockNode(xr,dn)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new hu(e),r)}forRange(e,r,n,i,o=this.opts.es5?wt.varKinds.var:wt.varKinds.let){let s=this._scope.toName(e);return this._for(new mu(o,s,r,n),()=>i(s))}forOf(e,r,n,i=wt.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=r instanceof se.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,se._)`${s}.length`,a=>{this.var(o,(0,se._)`${s}[${a}]`),n(o)})}return this._for(new $s("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?wt.varKinds.var:wt.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,se._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new $s("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(_r)}label(e){return this._leafNode(new uu(e))}break(e){return this._leafNode(new cu(e))}return(e){let r=new $i;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($i)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new gu;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new xi(o),r(o)}return n&&(this._currNode=i.finally=new _i,this.code(n)),this._endBlockNode(xi,_i)}throw(e){return this._leafNode(new pu(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=se.nil,n,i){return this._blockNode(new bi(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(bi)}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 xr))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}};te.CodeGen=yu;function Sr(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function xs(t,e){return e instanceof se._CodeOrName?Sr(t,e.names):t}function hn(t,e,r){if(t instanceof se.Name)return n(t);if(!i(t))return t;return new se._Code(t._items.reduce((o,s)=>(s instanceof se.Name&&(s=n(s)),s instanceof se._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 se._Code&&o._items.some(s=>s instanceof se.Name&&e[s.str]===1&&r[s.str]!==void 0)}}function R2(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Um(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,se._)`!${vu(t)}`}te.not=Um;var T2=Gm(te.operators.AND);function A2(...t){return t.reduce(T2)}te.and=A2;var N2=Gm(te.operators.OR);function M2(...t){return t.reduce(N2)}te.or=M2;function Gm(t){return(e,r)=>e===se.nil?r:r===se.nil?e:(0,se._)`${vu(e)} ${t} ${vu(r)}`}function vu(t){return t instanceof se.Name?t:(0,se._)`(${t})`}});var ne=_(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.checkStrictMode=re.getErrorPath=re.Type=re.useFunc=re.setEvaluated=re.evaluatedPropsToName=re.mergeEvaluated=re.eachItem=re.unescapeJsonPointer=re.escapeJsonPointer=re.escapeFragment=re.unescapeFragment=re.schemaRefOrVal=re.schemaHasRulesButRef=re.schemaHasRules=re.checkUnknownRules=re.alwaysValidSchema=re.toHash=void 0;var he=Z(),O2=vi();function V2(t){let e={};for(let r of t)e[r]=!0;return e}re.toHash=V2;function L2(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Ym(t,e),!Xm(e,t.self.RULES.all))}re.alwaysValidSchema=L2;function Ym(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]||eg(t,`unknown keyword: "${o}"`)}re.checkUnknownRules=Ym;function Xm(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}re.schemaHasRules=Xm;function j2(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}re.schemaHasRulesButRef=j2;function D2({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,he._)`${r}`}return(0,he._)`${t}${e}${(0,he.getProperty)(n)}`}re.schemaRefOrVal=D2;function q2(t){return Qm(decodeURIComponent(t))}re.unescapeFragment=q2;function F2(t){return encodeURIComponent(bu(t))}re.escapeFragment=F2;function bu(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}re.escapeJsonPointer=bu;function Qm(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}re.unescapeJsonPointer=Qm;function B2(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}re.eachItem=B2;function Jm({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,s,a)=>{let l=s===void 0?o:s instanceof he.Name?(o instanceof he.Name?t(i,o,s):e(i,o,s),s):o instanceof he.Name?(e(i,s,o),o):r(o,s);return a===he.Name&&!(l instanceof he.Name)?n(i,l):l}}re.mergeEvaluated={props:Jm({mergeNames:(t,e,r)=>t.if((0,he._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,he._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,he._)`${r} || {}`).code((0,he._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,he._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,he._)`${r} || {}`),$u(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Zm}),items:Jm({mergeNames:(t,e,r)=>t.if((0,he._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,he._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,he._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,he._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Zm(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,he._)`{}`);return e!==void 0&&$u(t,r,e),r}re.evaluatedPropsToName=Zm;function $u(t,e,r){Object.keys(r).forEach(n=>t.assign((0,he._)`${e}${(0,he.getProperty)(n)}`,!0))}re.setEvaluated=$u;var Km={};function H2(t,e){return t.scopeValue("func",{ref:e,code:Km[e.code]||(Km[e.code]=new O2._Code(e.code))})}re.useFunc=H2;var wu;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(wu||(re.Type=wu={}));function W2(t,e,r){if(t instanceof he.Name){let n=e===wu.Num;return r?n?(0,he._)`"[" + ${t} + "]"`:(0,he._)`"['" + ${t} + "']"`:n?(0,he._)`"/" + ${t}`:(0,he._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,he.getProperty)(t).toString():"/"+bu(t)}re.getErrorPath=W2;function eg(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}re.checkStrictMode=eg});var ct=_(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});var je=Z(),z2={data:new je.Name("data"),valCxt:new je.Name("valCxt"),instancePath:new je.Name("instancePath"),parentData:new je.Name("parentData"),parentDataProperty:new je.Name("parentDataProperty"),rootData:new je.Name("rootData"),dynamicAnchors:new je.Name("dynamicAnchors"),vErrors:new je.Name("vErrors"),errors:new je.Name("errors"),this:new je.Name("this"),self:new je.Name("self"),scope:new je.Name("scope"),json:new je.Name("json"),jsonPos:new je.Name("jsonPos"),jsonLen:new je.Name("jsonLen"),jsonPart:new je.Name("jsonPart")};xu.default=z2});var Si=_(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.extendErrors=De.resetErrorsCount=De.reportExtraError=De.reportError=De.keyword$DataError=De.keywordError=void 0;var ae=Z(),Ss=ne(),ze=ct();De.keywordError={message:({keyword:t})=>(0,ae.str)`must pass "${t}" keyword validation`};De.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ae.str)`"${t}" keyword must be ${e} ($data)`:(0,ae.str)`"${t}" keyword is invalid ($data)`};function U2(t,e=De.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:s,allErrors:a}=i,l=ng(t,e,r);n??(s||a)?tg(o,l):rg(i,(0,ae._)`[${l}]`)}De.reportError=U2;function G2(t,e=De.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:s}=n,a=ng(t,e,r);tg(i,a),o||s||rg(n,ze.default.vErrors)}De.reportExtraError=G2;function J2(t,e){t.assign(ze.default.errors,e),t.if((0,ae._)`${ze.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ae._)`${ze.default.vErrors}.length`,e),()=>t.assign(ze.default.vErrors,null)))}De.resetErrorsCount=J2;function K2({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,ze.default.errors,a=>{t.const(s,(0,ae._)`${ze.default.vErrors}[${a}]`),t.if((0,ae._)`${s}.instancePath === undefined`,()=>t.assign((0,ae._)`${s}.instancePath`,(0,ae.strConcat)(ze.default.instancePath,o.errorPath))),t.assign((0,ae._)`${s}.schemaPath`,(0,ae.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,ae._)`${s}.schema`,r),t.assign((0,ae._)`${s}.data`,n))})}De.extendErrors=K2;function tg(t,e){let r=t.const("err",e);t.if((0,ae._)`${ze.default.vErrors} === null`,()=>t.assign(ze.default.vErrors,(0,ae._)`[${r}]`),(0,ae._)`${ze.default.vErrors}.push(${r})`),t.code((0,ae._)`${ze.default.errors}++`)}function rg(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,ae._)`new ${t.ValidationError}(${e})`):(r.assign((0,ae._)`${n}.errors`,e),r.return(!1))}var kr={keyword:new ae.Name("keyword"),schemaPath:new ae.Name("schemaPath"),params:new ae.Name("params"),propertyName:new ae.Name("propertyName"),message:new ae.Name("message"),schema:new ae.Name("schema"),parentSchema:new ae.Name("parentSchema")};function ng(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,ae._)`{}`:Y2(t,e,r)}function Y2(t,e,r={}){let{gen:n,it:i}=t,o=[X2(i,r),Q2(t,r)];return Z2(t,e,o),n.object(...o)}function X2({errorPath:t},{instancePath:e}){let r=e?(0,ae.str)`${t}${(0,Ss.getErrorPath)(e,Ss.Type.Str)}`:t;return[ze.default.instancePath,(0,ae.strConcat)(ze.default.instancePath,r)]}function Q2({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,ae.str)`${e}/${t}`;return r&&(i=(0,ae.str)`${i}${(0,Ss.getErrorPath)(r,Ss.Type.Str)}`),[kr.schemaPath,i]}function Z2(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=t,{opts:l,propertyName:u,topSchemaRef:f,schemaPath:p}=a;n.push([kr.keyword,i],[kr.params,typeof e=="function"?e(t):e||(0,ae._)`{}`]),l.messages&&n.push([kr.message,typeof r=="function"?r(t):r]),l.verbose&&n.push([kr.schema,s],[kr.parentSchema,(0,ae._)`${f}${p}`],[ze.default.data,o]),u&&n.push([kr.propertyName,u])}});var og=_(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.boolOrEmptySchema=mn.topBoolOrEmptySchema=void 0;var e1=Si(),t1=Z(),r1=ct(),n1={message:"boolean schema is false"};function i1(t){let{gen:e,schema:r,validateName:n}=t;r===!1?ig(t,!1):typeof r=="object"&&r.$async===!0?e.return(r1.default.data):(e.assign((0,t1._)`${n}.errors`,null),e.return(!0))}mn.topBoolOrEmptySchema=i1;function o1(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),ig(t)):r.var(e,!0)}mn.boolOrEmptySchema=o1;function ig(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,e1.reportError)(i,n1,void 0,e)}});var _u=_(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.getRules=gn.isJSONType=void 0;var s1=["string","number","integer","boolean","null","object","array"],a1=new Set(s1);function l1(t){return typeof t=="string"&&a1.has(t)}gn.isJSONType=l1;function u1(){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:{}}}gn.getRules=u1});var Su=_(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.shouldUseRule=er.shouldUseGroup=er.schemaHasRulesForType=void 0;function c1({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&sg(t,n)}er.schemaHasRulesForType=c1;function sg(t,e){return e.rules.some(r=>ag(t,r))}er.shouldUseGroup=sg;function ag(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))}er.shouldUseRule=ag});var ki=_(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.reportTypeError=qe.checkDataTypes=qe.checkDataType=qe.coerceAndCheckDataType=qe.getJSONTypes=qe.getSchemaTypes=qe.DataType=void 0;var p1=_u(),f1=Su(),d1=Si(),ee=Z(),lg=ne(),yn;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(yn||(qe.DataType=yn={}));function h1(t){let e=ug(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}qe.getSchemaTypes=h1;function ug(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(p1.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}qe.getJSONTypes=ug;function m1(t,e){let{gen:r,data:n,opts:i}=t,o=g1(e,i.coerceTypes),s=e.length>0&&!(o.length===0&&e.length===1&&(0,f1.schemaHasRulesForType)(t,e[0]));if(s){let a=Cu(e,n,i.strictNumbers,yn.Wrong);r.if(a,()=>{o.length?y1(t,e,o):Eu(t)})}return s}qe.coerceAndCheckDataType=m1;var cg=new Set(["string","number","integer","boolean","null"]);function g1(t,e){return e?t.filter(r=>cg.has(r)||e==="array"&&r==="array"):[]}function y1(t,e,r){let{gen:n,data:i,opts:o}=t,s=n.let("dataType",(0,ee._)`typeof ${i}`),a=n.let("coerced",(0,ee._)`undefined`);o.coerceTypes==="array"&&n.if((0,ee._)`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,ee._)`${i}[0]`).assign(s,(0,ee._)`typeof ${i}`).if(Cu(e,i,o.strictNumbers),()=>n.assign(a,i))),n.if((0,ee._)`${a} !== undefined`);for(let u of r)(cg.has(u)||u==="array"&&o.coerceTypes==="array")&&l(u);n.else(),Eu(t),n.endIf(),n.if((0,ee._)`${a} !== undefined`,()=>{n.assign(i,a),v1(t,a)});function l(u){switch(u){case"string":n.elseIf((0,ee._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ee._)`"" + ${i}`).elseIf((0,ee._)`${i} === null`).assign(a,(0,ee._)`""`);return;case"number":n.elseIf((0,ee._)`${s} == "boolean" || ${i} === null
|
|
389
389
|
|| (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,ee._)`+${i}`);return;case"integer":n.elseIf((0,ee._)`${s} === "boolean" || ${i} === null
|
|
390
390
|
|| (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,ee._)`+${i}`);return;case"boolean":n.elseIf((0,ee._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,ee._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":n.elseIf((0,ee._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(a,null);return;case"array":n.elseIf((0,ee._)`${s} === "string" || ${s} === "number"
|
|
391
|
-
|| ${s} === "boolean" || ${i} === null`).assign(a,(0,ee._)`[${i}]`)}}}function h1({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,ee._)`${e} !== undefined`,()=>t.assign((0,ee._)`${e}[${r}]`,n))}function Su(t,e,r,n=yn.Correct){let i=n===yn.Correct?ee.operators.EQ:ee.operators.NEQ,o;switch(t){case"null":return(0,ee._)`${e} ${i} null`;case"array":o=(0,ee._)`Array.isArray(${e})`;break;case"object":o=(0,ee._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s((0,ee._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return(0,ee._)`typeof ${e} ${i} ${t}`}return n===yn.Correct?o:(0,ee.not)(o);function s(a=ee.nil){return(0,ee.and)((0,ee._)`typeof ${e} == "number"`,a,r?(0,ee._)`isFinite(${e})`:ee.nil)}}qe.checkDataType=Su;function ku(t,e,r,n){if(t.length===1)return Su(t[0],e,r,n);let i,o=(0,ag.toHash)(t);if(o.array&&o.object){let s=(0,ee._)`typeof ${e} != "object"`;i=o.null?s:(0,ee._)`!${e} || ${s}`,delete o.null,delete o.array,delete o.object}else i=ee.nil;o.number&&delete o.integer;for(let s in o)i=(0,ee.and)(i,Su(s,e,r,n));return i}qe.checkDataTypes=ku;var m1={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ee._)`{type: ${t}}`:(0,ee._)`{type: ${e}}`};function Cu(t){let e=g1(t);(0,u1.reportError)(e,m1)}qe.reportTypeError=Cu;function g1(t){let{gen:e,data:r,schema:n}=t,i=(0,ag.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var pg=x(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});Ss.assignDefaults=void 0;var vn=Z(),y1=ne();function v1(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)cg(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>cg(t,o,i.default))}Ss.assignDefaults=v1;function cg(t,e,r){let{gen:n,compositeRule:i,data:o,opts:s}=t;if(r===void 0)return;let a=(0,vn._)`${o}${(0,vn.getProperty)(e)}`;if(i){(0,y1.checkStrictMode)(t,`default is ignored for: ${a}`);return}let l=(0,vn._)`${a} === undefined`;s.useDefaults==="empty"&&(l=(0,vn._)`${l} || ${a} === null || ${a} === ""`),n.if(l,(0,vn._)`${a} = ${(0,vn.stringify)(r)}`)}});var pt=x(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.validateUnion=fe.validateArray=fe.usePattern=fe.callValidateCode=fe.schemaProperties=fe.allSchemaProperties=fe.noPropertyInData=fe.propertyInData=fe.isOwnProperty=fe.hasPropFunc=fe.reportMissingProp=fe.checkMissingProp=fe.checkReportMissingProp=void 0;var ye=Z(),Eu=ne(),tr=ct(),w1=ne();function b1(t,e){let{gen:r,data:n,it:i}=t;r.if(Iu(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ye._)`${e}`},!0),t.error()})}fe.checkReportMissingProp=b1;function $1({gen:t,data:e,it:{opts:r}},n,i){return(0,ye.or)(...n.map(o=>(0,ye.and)(Iu(t,e,o,r.ownProperties),(0,ye._)`${i} = ${o}`)))}fe.checkMissingProp=$1;function _1(t,e){t.setParams({missingProperty:e},!0),t.error()}fe.reportMissingProp=_1;function fg(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ye._)`Object.prototype.hasOwnProperty`})}fe.hasPropFunc=fg;function Pu(t,e,r){return(0,ye._)`${fg(t)}.call(${e}, ${r})`}fe.isOwnProperty=Pu;function x1(t,e,r,n){let i=(0,ye._)`${e}${(0,ye.getProperty)(r)} !== undefined`;return n?(0,ye._)`${i} && ${Pu(t,e,r)}`:i}fe.propertyInData=x1;function Iu(t,e,r,n){let i=(0,ye._)`${e}${(0,ye.getProperty)(r)} === undefined`;return n?(0,ye.or)(i,(0,ye.not)(Pu(t,e,r))):i}fe.noPropertyInData=Iu;function dg(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}fe.allSchemaProperties=dg;function S1(t,e){return dg(e).filter(r=>!(0,Eu.alwaysValidSchema)(t,e[r]))}fe.schemaProperties=S1;function k1({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,l,u){let f=u?(0,ye._)`${t}, ${e}, ${n}${i}`:e,p=[[tr.default.instancePath,(0,ye.strConcat)(tr.default.instancePath,o)],[tr.default.parentData,s.parentData],[tr.default.parentDataProperty,s.parentDataProperty],[tr.default.rootData,tr.default.rootData]];s.opts.dynamicRef&&p.push([tr.default.dynamicAnchors,tr.default.dynamicAnchors]);let d=(0,ye._)`${f}, ${r.object(...p)}`;return l!==ye.nil?(0,ye._)`${a}.call(${l}, ${d})`:(0,ye._)`${a}(${d})`}fe.callValidateCode=k1;var C1=(0,ye._)`new RegExp`;function E1({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,ye._)`${i.code==="new RegExp"?C1:(0,w1.useFunc)(t,i)}(${r}, ${n})`})}fe.usePattern=E1;function P1(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,ye._)`${r}.length`);e.forRange("i",0,l,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:Eu.Type.Num},o),e.if((0,ye.not)(o),a)})}}fe.validateArray=P1;function I1(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,Eu.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((l,u)=>{let f=t.subschema({keyword:n,schemaProp:u,compositeRule:!0},a);e.assign(s,(0,ye._)`${s} || ${a}`),t.mergeValidEvaluated(f,a)||e.if((0,ye.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}fe.validateUnion=I1});var gg=x(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.validateKeywordUsage=Et.validSchemaType=Et.funcKeywordCode=Et.macroKeywordCode=void 0;var Ue=Z(),Cr=ct(),R1=pt(),T1=_i();function A1(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),l=mg(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");t.subschema({schema:a,schemaPath:Ue.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}Et.macroKeywordCode=A1;function N1(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:l}=t;O1(l,e);let u=!a&&e.compile?e.compile.call(l.self,o,s,l):e.validate,f=mg(n,i,u),p=n.let("valid");t.block$data(p,d),t.ok((r=e.valid)!==null&&r!==void 0?r:p);function d(){if(e.errors===!1)y(),e.modifying&&hg(t),b(()=>t.error());else{let v=e.async?m():g();e.modifying&&hg(t),b(()=>M1(t,v))}}function m(){let v=n.let("ruleErrs",null);return n.try(()=>y((0,Ue._)`await `),M=>n.assign(p,!1).if((0,Ue._)`${M} instanceof ${l.ValidationError}`,()=>n.assign(v,(0,Ue._)`${M}.errors`),()=>n.throw(M))),v}function g(){let v=(0,Ue._)`${f}.errors`;return n.assign(v,null),y(Ue.nil),v}function y(v=e.async?(0,Ue._)`await `:Ue.nil){let M=l.opts.passContext?Cr.default.this:Cr.default.self,C=!("compile"in e&&!a||e.schema===!1);n.assign(p,(0,Ue._)`${v}${(0,R1.callValidateCode)(t,f,M,C)}`,e.modifying)}function b(v){var M;n.if((0,Ue.not)((M=e.valid)!==null&&M!==void 0?M:p),v)}}Et.funcKeywordCode=N1;function hg(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,Ue._)`${n.parentData}[${n.parentDataProperty}]`))}function M1(t,e){let{gen:r}=t;r.if((0,Ue._)`Array.isArray(${e})`,()=>{r.assign(Cr.default.vErrors,(0,Ue._)`${Cr.default.vErrors} === null ? ${e} : ${Cr.default.vErrors}.concat(${e})`).assign(Cr.default.errors,(0,Ue._)`${Cr.default.vErrors}.length`),(0,T1.extendErrors)(t)},()=>t.error())}function O1({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function mg(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,Ue.stringify)(r)})}function V1(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")}Et.validSchemaType=V1;function L1({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)}}Et.validateKeywordUsage=L1});var vg=x(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.extendSubschemaMode=rr.extendSubschemaData=rr.getSubschema=void 0;var Pt=Z(),yg=ne();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,Pt._)`${t.schemaPath}${(0,Pt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,Pt._)`${t.schemaPath}${(0,Pt.getProperty)(e)}${(0,Pt.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,yg.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')}rr.getSubschema=j1;function D1(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:f,opts:p}=e,d=a.let("data",(0,Pt._)`${e.data}${(0,Pt.getProperty)(r)}`,!0);l(d),t.errorPath=(0,Pt.str)`${u}${(0,yg.getErrorPath)(r,n,p.jsPropertySyntax)}`,t.parentDataProperty=(0,Pt._)`${r}`,t.dataPathArr=[...f,t.parentDataProperty]}if(i!==void 0){let u=i instanceof Pt.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]}}rr.extendSubschemaData=D1;function q1(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}rr.extendSubschemaMode=q1});var Ru=x((RN,wg)=>{"use strict";wg.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 $g=x((TN,bg)=>{"use strict";var nr=bg.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(){};ks(e,n,i,t,"",t)};nr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};nr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};nr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};nr.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 ks(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 f in n){var p=n[f];if(Array.isArray(p)){if(f in nr.arrayKeywords)for(var d=0;d<p.length;d++)ks(t,e,r,p[d],i+"/"+f+"/"+d,o,i,f,n,d)}else if(f in nr.propsKeywords){if(p&&typeof p=="object")for(var m in p)ks(t,e,r,p[m],i+"/"+f+"/"+F1(m),o,i,f,n,m)}else(f in nr.keywords||t.allKeys&&!(f in nr.skipKeywords))&&ks(t,e,r,p,i+"/"+f,o,i,f,n)}r(n,i,o,s,a,l,u)}}function F1(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Si=x(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.getSchemaRefs=Qe.resolveUrl=Qe.normalizeId=Qe._getFullPath=Qe.getFullPath=Qe.inlineRef=void 0;var B1=ne(),H1=Ru(),W1=$g(),z1=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function U1(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Tu(t):e?_g(t)<=e:!1}Qe.inlineRef=U1;var G1=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Tu(t){for(let e in t){if(G1.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Tu)||typeof r=="object"&&Tu(r))return!0}return!1}function _g(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!z1.has(r)&&(typeof t[r]=="object"&&(0,B1.eachItem)(t[r],n=>e+=_g(n)),e===1/0))return 1/0}return e}function xg(t,e="",r){r!==!1&&(e=wn(e));let n=t.parse(e);return Sg(t,n)}Qe.getFullPath=xg;function Sg(t,e){return t.serialize(e).split("#")[0]+"#"}Qe._getFullPath=Sg;var J1=/#\/?$/;function wn(t){return t?t.replace(J1,""):""}Qe.normalizeId=wn;function K1(t,e,r){return r=wn(r),t.resolve(e,r)}Qe.resolveUrl=K1;var Y1=/^[a-z_][-a-z0-9._]*$/i;function X1(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=wn(t[r]||e),o={"":i},s=xg(n,i,!1),a={},l=new Set;return W1(t,{allKeys:!0},(p,d,m,g)=>{if(g===void 0)return;let y=s+d,b=o[g];typeof p[r]=="string"&&(b=v.call(this,p[r])),M.call(this,p.$anchor),M.call(this,p.$dynamicAnchor),o[d]=b;function v(C){let R=this.opts.uriResolver.resolve;if(C=wn(b?R(b,C):C),l.has(C))throw f(C);l.add(C);let A=this.refs[C];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?u(p,A.schema,C):C!==wn(y)&&(C[0]==="#"?(u(p,a[C],C),a[C]=p):this.refs[C]=y),C}function M(C){if(typeof C=="string"){if(!Y1.test(C))throw new Error(`invalid anchor "${C}"`);v.call(this,`#${C}`)}}}),a;function u(p,d,m){if(d!==void 0&&!H1(p,d))throw f(m)}function f(p){return new Error(`reference "${p}" resolves to more than one schema`)}}Qe.getSchemaRefs=X1});var Ei=x(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.getData=ir.KeywordCxt=ir.validateFunctionCode=void 0;var Ig=ig(),kg=xi(),Nu=xu(),Cs=xi(),Q1=pg(),Ci=gg(),Au=vg(),z=Z(),Q=ct(),Z1=Si(),Ut=ne(),ki=_i();function eS(t){if(Ag(t)&&(Ng(t),Tg(t))){nS(t);return}Rg(t,()=>(0,Ig.topBoolOrEmptySchema)(t))}ir.validateFunctionCode=eS;function Rg({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,z._)`${Q.default.data}, ${Q.default.valCxt}`,n.$async,()=>{t.code((0,z._)`"use strict"; ${Cg(r,i)}`),rS(t,i),t.code(o)}):t.func(e,(0,z._)`${Q.default.data}, ${tS(i)}`,n.$async,()=>t.code(Cg(r,i)).code(o))}function tS(t){return(0,z._)`{${Q.default.instancePath}="", ${Q.default.parentData}, ${Q.default.parentDataProperty}, ${Q.default.rootData}=${Q.default.data}${t.dynamicRef?(0,z._)`, ${Q.default.dynamicAnchors}={}`:z.nil}}={}`}function rS(t,e){t.if(Q.default.valCxt,()=>{t.var(Q.default.instancePath,(0,z._)`${Q.default.valCxt}.${Q.default.instancePath}`),t.var(Q.default.parentData,(0,z._)`${Q.default.valCxt}.${Q.default.parentData}`),t.var(Q.default.parentDataProperty,(0,z._)`${Q.default.valCxt}.${Q.default.parentDataProperty}`),t.var(Q.default.rootData,(0,z._)`${Q.default.valCxt}.${Q.default.rootData}`),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,z._)`${Q.default.valCxt}.${Q.default.dynamicAnchors}`)},()=>{t.var(Q.default.instancePath,(0,z._)`""`),t.var(Q.default.parentData,(0,z._)`undefined`),t.var(Q.default.parentDataProperty,(0,z._)`undefined`),t.var(Q.default.rootData,Q.default.data),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,z._)`{}`)})}function nS(t){let{schema:e,opts:r,gen:n}=t;Rg(t,()=>{r.$comment&&e.$comment&&Og(t),lS(t),n.let(Q.default.vErrors,null),n.let(Q.default.errors,0),r.unevaluated&&iS(t),Mg(t),pS(t)})}function iS(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,z._)`${r}.evaluated`),e.if((0,z._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,z._)`${t.evaluated}.props`,(0,z._)`undefined`)),e.if((0,z._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,z._)`${t.evaluated}.items`,(0,z._)`undefined`))}function Cg(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,z._)`/*# sourceURL=${r} */`:z.nil}function oS(t,e){if(Ag(t)&&(Ng(t),Tg(t))){sS(t,e);return}(0,Ig.boolOrEmptySchema)(t,e)}function Tg({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 Ag(t){return typeof t.schema!="boolean"}function sS(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&Og(t),uS(t),cS(t);let o=n.const("_errs",Q.default.errors);Mg(t,o),n.var(e,(0,z._)`${o} === ${Q.default.errors}`)}function Ng(t){(0,Ut.checkUnknownRules)(t),aS(t)}function Mg(t,e){if(t.opts.jtd)return Eg(t,[],!1,e);let r=(0,kg.getSchemaTypes)(t.schema),n=(0,kg.coerceAndCheckDataType)(t,r);Eg(t,r,!n,e)}function aS(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Ut.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function lS(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ut.checkStrictMode)(t,"default is ignored in the schema root")}function uS(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Z1.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function cS(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Og({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,z._)`${Q.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,z.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,z._)`${Q.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function pS(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,z._)`${Q.default.errors} === 0`,()=>e.return(Q.default.data),()=>e.throw((0,z._)`new ${i}(${Q.default.vErrors})`)):(e.assign((0,z._)`${n}.errors`,Q.default.vErrors),o.unevaluated&&fS(t),e.return((0,z._)`${Q.default.errors} === 0`))}function fS({gen:t,evaluated:e,props:r,items:n}){r instanceof z.Name&&t.assign((0,z._)`${e}.props`,r),n instanceof z.Name&&t.assign((0,z._)`${e}.items`,n)}function Eg(t,e,r,n){let{gen:i,schema:o,data:s,allErrors:a,opts:l,self:u}=t,{RULES:f}=u;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,Ut.schemaHasRulesButRef)(o,f))){i.block(()=>Lg(t,"$ref",f.all.$ref.definition));return}l.jtd||dS(t,e),i.block(()=>{for(let d of f.rules)p(d);p(f.post)});function p(d){(0,Nu.shouldUseGroup)(o,d)&&(d.type?(i.if((0,Cs.checkDataType)(d.type,s,l.strictNumbers)),Pg(t,d),e.length===1&&e[0]===d.type&&r&&(i.else(),(0,Cs.reportTypeError)(t)),i.endIf()):Pg(t,d),a||i.if((0,z._)`${Q.default.errors} === ${n||0}`))}}function Pg(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,Q1.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,Nu.shouldUseRule)(n,o)&&Lg(t,o.keyword,o.definition,e.type)})}function dS(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(hS(t,e),t.opts.allowUnionTypes||mS(t,e),gS(t,t.dataTypes))}function hS(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Vg(t.dataTypes,r)||Mu(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),vS(t,e)}}function mS(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Mu(t,"use allowUnionTypes to allow union type keyword")}function gS(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Nu.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>yS(e,s))&&Mu(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function yS(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Vg(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function vS(t,e){let r=[];for(let n of t.dataTypes)Vg(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Mu(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Ut.checkStrictMode)(t,e,t.opts.strictTypes)}var Es=class{constructor(e,r,n){if((0,Ci.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,Ut.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",jg(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Ci.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",Q.default.errors))}result(e,r,n){this.failResult((0,z.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,z.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,z._)`${r} !== undefined && (${(0,z.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?ki.reportExtraError:ki.reportError)(this,this.def.error,r)}$dataError(){(0,ki.reportError)(this,this.def.$dataError||ki.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,ki.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=z.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=z.nil,r=z.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:s}=this;n.if((0,z.or)((0,z._)`${i} === undefined`,r)),e!==z.nil&&n.assign(e,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==z.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,z.or)(s(),a());function s(){if(n.length){if(!(r instanceof z.Name))throw new Error("ajv implementation error");let l=Array.isArray(n)?n:[n];return(0,z._)`${(0,Cs.checkDataTypes)(l,r,o.opts.strictNumbers,Cs.DataType.Wrong)}`}return z.nil}function a(){if(i.validateSchema){let l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,z._)`!${l}(${r})`}return z.nil}}subschema(e,r){let n=(0,Au.getSubschema)(this.it,e);(0,Au.extendSubschemaData)(n,this.it,e),(0,Au.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return oS(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Ut.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Ut.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,z.Name)),!0}};ir.KeywordCxt=Es;function Lg(t,e,r,n){let i=new Es(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Ci.funcKeywordCode)(i,r):"macro"in r?(0,Ci.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Ci.funcKeywordCode)(i,r)}var wS=/^\/(?:[^~]|~0|~1)*$/,bS=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function jg(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return Q.default.rootData;if(t[0]==="/"){if(!wS.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=Q.default.rootData}else{let u=bS.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let f=+u[1];if(i=u[2],i==="#"){if(f>=e)throw new Error(l("property/index",f));return n[e-f]}if(f>e)throw new Error(l("data",f));if(o=r[e-f],!i)return o}let s=o,a=i.split("/");for(let u of a)u&&(o=(0,z._)`${o}${(0,z.getProperty)((0,Ut.unescapeJsonPointer)(u))}`,s=(0,z._)`${s} && ${o}`);return s;function l(u,f){return`Cannot access ${u} ${f} levels up, current level is ${e}`}}ir.getData=jg});var Ps=x(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});var Ou=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Vu.default=Ou});var Pi=x(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});var Lu=Si(),ju=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Lu.resolveUrl)(e,r,n),this.missingSchema=(0,Lu.normalizeId)((0,Lu.getFullPath)(e,this.missingRef))}};Du.default=ju});var Ii=x(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.resolveSchema=ft.getCompilingSchema=ft.resolveRef=ft.compileSchema=ft.SchemaEnv=void 0;var bt=Z(),$S=Ps(),Er=ct(),$t=Si(),Dg=ne(),_S=Ei(),bn=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,$t.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};ft.SchemaEnv=bn;function Fu(t){let e=qg.call(this,t);if(e)return e;let r=(0,$t.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new bt.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:$S.default,code:(0,bt._)`require("ajv/dist/runtime/validation_error").default`}));let l=s.scopeName("validate");t.validateName=l;let u={gen:s,allErrors:this.opts.allErrors,data:Er.default.data,parentData:Er.default.parentData,parentDataProperty:Er.default.parentDataProperty,dataNames:[Er.default.data],dataPathArr:[bt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,bt.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:bt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,bt._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(t),(0,_S.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let p=s.toString();f=`${s.scopeRefs(Er.default.scope)}return ${p}`,this.opts.code.process&&(f=this.opts.code.process(f,t));let m=new Function(`${Er.default.self}`,`${Er.default.scope}`,f)(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:p,scopeValues:s._values}),this.opts.unevaluated){let{props:g,items:y}=u;m.evaluated={props:g instanceof bt.Name?void 0:g,items:y instanceof bt.Name?void 0:y,dynamicProps:g instanceof bt.Name,dynamicItems:y instanceof bt.Name},m.source&&(m.source.evaluated=(0,bt.stringify)(m.evaluated))}return t.validate=m,t}catch(p){throw delete t.validate,delete t.validateName,f&&this.logger.error("Error compiling schema, function code:",f),p}finally{this._compilations.delete(t)}}ft.compileSchema=Fu;function xS(t,e,r){var n;r=(0,$t.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=CS.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 bn({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=SS.call(this,o)}ft.resolveRef=xS;function SS(t){return(0,$t.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Fu.call(this,t)}function qg(t){for(let e of this._compilations)if(kS(e,t))return e}ft.getCompilingSchema=qg;function kS(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function CS(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,$t._getFullPath)(this.opts.uriResolver,r),i=(0,$t.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return qu.call(this,r,t);let o=(0,$t.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:qu.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||Fu.call(this,s),o===(0,$t.normalizeId)(e)){let{schema:a}=s,{schemaId:l}=this.opts,u=a[l];return u&&(i=(0,$t.resolveUrl)(this.opts.uriResolver,i,u)),new bn({schema:a,schemaId:l,root:t,baseId:i})}return qu.call(this,r,s)}}ft.resolveSchema=Is;var ES=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function qu(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,Dg.unescapeFragment)(a)];if(l===void 0)return;r=l;let u=typeof r=="object"&&r[this.opts.schemaId];!ES.has(a)&&u&&(e=(0,$t.resolveUrl)(this.opts.uriResolver,e,u))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,Dg.schemaHasRulesButRef)(r,this.RULES)){let a=(0,$t.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=Is.call(this,n,a)}let{schemaId:s}=this.opts;if(o=o||new bn({schema:r,schemaId:s,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var Fg=x((LN,PS)=>{PS.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 Wu=x((jN,Gg)=>{"use strict";var IS=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Hg=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),Bu=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Wg=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),RS=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Hu(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 TS=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Bg(t){return t.length=0,!0}function AS(t,e,r){if(t.length){let n=Hu(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function NS(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,s=!1,a=AS;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=Bg}else{i.push(u);continue}}return i.length&&(a===Bg?r.zone=i.join(""):s?n.push(i.join("")):n.push(Hu(i))),r.address=n.join(""),r}function zg(t){if(MS(t,":")<2)return{host:t,isIPV6:!1};let e=NS(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 MS(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function OS(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 VS={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},LS=/[@/?#:]/g,jS=/[@/?#]/g;function Ug(t,e){let r=e?jS:LS;return r.lastIndex=0,t.replace(r,n=>VS[n])}function DS(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(Bu(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&Wg(s)?r+=s:r+="%"+o,n+=2;continue}}r+=t[n]}return r}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(Bu(n)){let i=n.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&Wg(o)?e+=o:e+="%"+i,r+=2;continue}}RS(t[r])?e+=t[r]:e+=escape(t[r])}return e}function FS(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(Bu(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function BS(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!Hg(r)){let n=zg(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=Ug(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}Gg.exports={nonSimpleDomain:TS,recomposeAuthority:BS,reescapeHostDelimiters:Ug,normalizePercentEncoding:DS,normalizePathEncoding:qS,escapePreservingEscapes:FS,removeDotSegments:OS,isIPv4:Hg,isUUID:IS,normalizeIPv6:zg,stringArrayToHexStripped:Hu}});var Qg=x((DN,Xg)=>{"use strict";var{isUUID:HS}=Wu(),WS=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,zS=["http","https","ws","wss","urn","urn:uuid"];function US(t){return zS.indexOf(t)!==-1}function zu(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 Jg(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Kg(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 GS(t){return t.secure=zu(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function JS(t){if((t.port===(zu(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 KS(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(WS);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=Uu(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function YS(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=Uu(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 XS(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!HS(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function QS(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Yg={scheme:"http",domainHost:!0,parse:Jg,serialize:Kg},ZS={scheme:"https",domainHost:Yg.domainHost,parse:Jg,serialize:Kg},Rs={scheme:"ws",domainHost:!0,parse:GS,serialize:JS},ek={scheme:"wss",domainHost:Rs.domainHost,parse:Rs.parse,serialize:Rs.serialize},tk={scheme:"urn",parse:KS,serialize:YS,skipNormalize:!0},rk={scheme:"urn:uuid",parse:XS,serialize:QS,skipNormalize:!0},Ts={http:Yg,https:ZS,ws:Rs,wss:ek,urn:tk,"urn:uuid":rk};Object.setPrototypeOf(Ts,null);function Uu(t){return t&&(Ts[t]||Ts[t.toLowerCase()])||void 0}Xg.exports={wsIsSecure:zu,SCHEMES:Ts,isValidSchemeName:US,getSchemeHandler:Uu}});var iy=x((qN,As)=>{"use strict";var{normalizeIPv6:nk,removeDotSegments:Ri,recomposeAuthority:ik,normalizePercentEncoding:ok,normalizePathEncoding:sk,escapePreservingEscapes:ak,reescapeHostDelimiters:lk,isIPv4:uk,nonSimpleDomain:ck}=Wu(),{SCHEMES:pk,getSchemeHandler:ey}=Qg();function fk(t,e){return typeof t=="string"?t=yk(t,e):typeof t=="object"&&(t=$n(Pr(t,e),e)),t}function dk(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=ty($n(t,n),$n(e,n),n,!0);return n.skipEscape=!0,Pr(i,n)}function ty(t,e,r,n){let i={};return n||(t=$n(Pr(t,r),r),e=$n(Pr(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=Ri(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=Ri(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=Ri(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=Ri(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 hk(t,e,r){let n=Zg(t,r),i=Zg(e,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function Pr(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=ey(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=ok(r.path):(r.path=ak(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let s=ik(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=Ri(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 mk=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function gk(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 ry(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(mk);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=gk(n,s);if(a!==void 0&&(n.error=n.error||a,i=!0),n.host)if(uk(n.host)===!1){let f=nk(n.host);n.host=f.host.toLowerCase(),o=f.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=ey(r.scheme||n.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&o===!1&&ck(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=lk(unescape(n.host),o))),n.path&&(n.path=sk(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 $n(t,e){return ry(t,e).parsed}function yk(t,e){return ny(t,e).normalized}function ny(t,e){let{parsed:r,malformedAuthorityOrPort:n}=ry(t,e);return{normalized:n?t:Pr(r,e),malformedAuthorityOrPort:n}}function Zg(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=ny(t,e);return n?void 0:r}if(typeof t=="object")return Pr(t,e)}var Gu={SCHEMES:pk,normalize:fk,resolve:dk,resolveComponent:ty,equal:hk,serialize:Pr,parse:$n};As.exports=Gu;As.exports.default=Gu;As.exports.fastUri=Gu});var sy=x(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});var oy=iy();oy.code='require("ajv/dist/runtime/uri").default';Ju.default=oy});var hy=x(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.CodeGen=Me.Name=Me.nil=Me.stringify=Me.str=Me._=Me.KeywordCxt=void 0;var vk=Ei();Object.defineProperty(Me,"KeywordCxt",{enumerable:!0,get:function(){return vk.KeywordCxt}});var _n=Z();Object.defineProperty(Me,"_",{enumerable:!0,get:function(){return _n._}});Object.defineProperty(Me,"str",{enumerable:!0,get:function(){return _n.str}});Object.defineProperty(Me,"stringify",{enumerable:!0,get:function(){return _n.stringify}});Object.defineProperty(Me,"nil",{enumerable:!0,get:function(){return _n.nil}});Object.defineProperty(Me,"Name",{enumerable:!0,get:function(){return _n.Name}});Object.defineProperty(Me,"CodeGen",{enumerable:!0,get:function(){return _n.CodeGen}});var wk=Ps(),py=Pi(),bk=_u(),Ti=Ii(),$k=Z(),Ai=Si(),Ns=xi(),Yu=ne(),ay=Fg(),_k=sy(),fy=(t,e)=>new RegExp(t,e);fy.code="new RegExp";var xk=["removeAdditional","useDefaults","coerceTypes"],Sk=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),kk={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."},Ck={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ly=200;function Ek(t){var e,r,n,i,o,s,a,l,u,f,p,d,m,g,y,b,v,M,C,R,A,V,W,ie,we;let be=t.strict,Re=(e=t.code)===null||e===void 0?void 0:e.optimize,$e=Re===!0||Re===void 0?1:Re||0,Ge=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:fy,Je=(i=t.uriResolver)!==null&&i!==void 0?i:_k.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:be)!==null&&s!==void 0?s:!0,strictNumbers:(l=(a=t.strictNumbers)!==null&&a!==void 0?a:be)!==null&&l!==void 0?l:!0,strictTypes:(f=(u=t.strictTypes)!==null&&u!==void 0?u:be)!==null&&f!==void 0?f:"log",strictTuples:(d=(p=t.strictTuples)!==null&&p!==void 0?p:be)!==null&&d!==void 0?d:"log",strictRequired:(g=(m=t.strictRequired)!==null&&m!==void 0?m:be)!==null&&g!==void 0?g:!1,code:t.code?{...t.code,optimize:$e,regExp:Ge}:{optimize:$e,regExp:Ge},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:ly,loopEnum:(b=t.loopEnum)!==null&&b!==void 0?b:ly,meta:(v=t.meta)!==null&&v!==void 0?v:!0,messages:(M=t.messages)!==null&&M!==void 0?M:!0,inlineRefs:(C=t.inlineRefs)!==null&&C!==void 0?C:!0,schemaId:(R=t.schemaId)!==null&&R!==void 0?R:"$id",addUsedSchema:(A=t.addUsedSchema)!==null&&A!==void 0?A:!0,validateSchema:(V=t.validateSchema)!==null&&V!==void 0?V:!0,validateFormats:(W=t.validateFormats)!==null&&W!==void 0?W:!0,unicodeRegExp:(ie=t.unicodeRegExp)!==null&&ie!==void 0?ie:!0,int32range:(we=t.int32range)!==null&&we!==void 0?we:!0,uriResolver:Je}}var Ni=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,...Ek(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new $k.ValueScope({scope:{},prefixes:Sk,es5:r,lines:n}),this.logger=Nk(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,bk.getRules)(),uy.call(this,kk,e,"NOT SUPPORTED"),uy.call(this,Ck,e,"DEPRECATED","warn"),this._metaOpts=Tk.call(this),e.formats&&Ik.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Rk.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Pk.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=ay;n==="id"&&(i={...ay},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(f,p){await o.call(this,f.$schema);let d=this._addSchema(f,p);return d.validate||s.call(this,d)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function s(f){try{return this._compileSchemaEnv(f)}catch(p){if(!(p instanceof py.default))throw p;return a.call(this,p),await l.call(this,p.missingSchema),s.call(this,f)}}function a({missingSchema:f,missingRef:p}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${p} cannot be resolved`)}async function l(f){let p=await u.call(this,f);this.refs[f]||await o.call(this,p.$schema),this.refs[f]||this.addSchema(p,f,r)}async function u(f){let p=this._loading[f];if(p)return p;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}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,Ai.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=cy.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Ti.SchemaEnv({schema:{},schemaId:n});if(r=Ti.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=cy.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,Ai.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(Ok.call(this,n,r),!r)return(0,Yu.eachItem)(n,o=>Ku.call(this,o)),this;Lk.call(this,r);let i={...r,type:(0,Ns.getJSONTypes)(r.type),schemaType:(0,Ns.getJSONTypes)(r.schemaType)};return(0,Yu.eachItem)(n,i.type.length===0?o=>Ku.call(this,o,i):o=>i.type.forEach(s=>Ku.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,f=s[a];u&&f&&(s[a]=dy(f))}}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,Ai.normalizeId)(s||n);let u=Ai.getSchemaRefs.call(this,e,n);return l=new Ti.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):Ti.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{Ti.compileSchema.call(this,e)}finally{this.opts=r}}};Ni.ValidationError=wk.default;Ni.MissingRefError=py.default;Me.default=Ni;function uy(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 cy(t){return t=(0,Ai.normalizeId)(t),this.schemas[t]||this.refs[t]}function Pk(){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 Ik(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Rk(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 Tk(){let t={...this.opts};for(let e of xk)delete t[e];return t}var Ak={log(){},warn(){},error(){}};function Nk(t){if(t===!1)return Ak;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 Mk=/^[a-z_$][a-z0-9_$:-]*$/i;function Ok(t,e){let{RULES:r}=this;if((0,Yu.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Mk.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 Ku(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,Ns.getJSONTypes)(e.type),schemaType:(0,Ns.getJSONTypes)(e.schemaType)}};e.before?Vk.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 Vk(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 Lk(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=dy(e)),t.validateSchema=this.compile(e,!0))}var jk={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function dy(t){return{anyOf:[t,jk]}}});var my=x(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});var Dk={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Xu.default=Dk});var Vs=x(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.callRef=Ir.getValidate=void 0;var qk=Pi(),gy=pt(),Ze=Z(),xn=ct(),yy=Ii(),Ms=ne(),Fk={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 p();let f=yy.resolveRef.call(l,u,i,r);if(f===void 0)throw new qk.default(n.opts.uriResolver,i,r);if(f instanceof yy.SchemaEnv)return d(f);return m(f);function p(){if(o===u)return Os(t,s,o,o.$async);let g=e.scopeValue("root",{ref:u});return Os(t,(0,Ze._)`${g}.validate`,u,u.$async)}function d(g){let y=vy(t,g);Os(t,y,g,g.$async)}function m(g){let y=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,Ze.stringify)(g)}:{ref:g}),b=e.name("valid"),v=t.subschema({schema:g,dataTypes:[],schemaPath:Ze.nil,topSchemaRef:y,errSchemaPath:r},b);t.mergeEvaluated(v),t.ok(b)}}};function vy(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Ze._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Ir.getValidate=vy;function Os(t,e,r,n){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:l}=o,u=l.passContext?xn.default.this:Ze.nil;n?f():p();function f(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Ze._)`await ${(0,gy.callValidateCode)(t,e,u)}`),m(e),s||i.assign(g,!0)},y=>{i.if((0,Ze._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),d(y),s||i.assign(g,!1)}),t.ok(g)}function p(){t.result((0,gy.callValidateCode)(t,e,u),()=>m(e),()=>d(e))}function d(g){let y=(0,Ze._)`${g}.errors`;i.assign(xn.default.vErrors,(0,Ze._)`${xn.default.vErrors} === null ? ${y} : ${xn.default.vErrors}.concat(${y})`),i.assign(xn.default.errors,(0,Ze._)`${xn.default.vErrors}.length`)}function m(g){var y;if(!o.opts.unevaluated)return;let b=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(o.props=Ms.mergeEvaluated.props(i,b.props,o.props));else{let v=i.var("props",(0,Ze._)`${g}.evaluated.props`);o.props=Ms.mergeEvaluated.props(i,v,o.props,Ze.Name)}if(o.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(o.items=Ms.mergeEvaluated.items(i,b.items,o.items));else{let v=i.var("items",(0,Ze._)`${g}.evaluated.items`);o.items=Ms.mergeEvaluated.items(i,v,o.items,Ze.Name)}}}Ir.callRef=Os;Ir.default=Fk});var wy=x(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});var Bk=my(),Hk=Vs(),Wk=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Bk.default,Hk.default];Qu.default=Wk});var by=x(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});var Ls=Z(),or=Ls.operators,js={maximum:{okStr:"<=",ok:or.LTE,fail:or.GT},minimum:{okStr:">=",ok:or.GTE,fail:or.LT},exclusiveMaximum:{okStr:"<",ok:or.LT,fail:or.GTE},exclusiveMinimum:{okStr:">",ok:or.GT,fail:or.LTE}},zk={message:({keyword:t,schemaCode:e})=>(0,Ls.str)`must be ${js[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Ls._)`{comparison: ${js[t].okStr}, limit: ${e}}`},Uk={keyword:Object.keys(js),type:"number",schemaType:"number",$data:!0,error:zk,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Ls._)`${r} ${js[e].fail} ${n} || isNaN(${r})`)}};Zu.default=Uk});var $y=x(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var Mi=Z(),Gk={message:({schemaCode:t})=>(0,Mi.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Mi._)`{multipleOf: ${t}}`},Jk={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Gk,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}))`)}};ec.default=Jk});var xy=x(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});function _y(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}tc.default=_y;_y.code='require("ajv/dist/runtime/ucs2length").default'});var Sy=x(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});var Rr=Z(),Kk=ne(),Yk=xy(),Xk={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Rr.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Rr._)`{limit: ${t}}`},Qk={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Xk,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?Rr.operators.GT:Rr.operators.LT,s=i.opts.unicode===!1?(0,Rr._)`${r}.length`:(0,Rr._)`${(0,Kk.useFunc)(t.gen,Yk.default)}(${r})`;t.fail$data((0,Rr._)`${s} ${o} ${n}`)}};rc.default=Qk});var ky=x(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var Zk=pt(),eC=ne(),Sn=Z(),tC={message:({schemaCode:t})=>(0,Sn.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Sn._)`{pattern: ${t}}`},rC={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:tC,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,Sn._)`new RegExp`:(0,eC.useFunc)(e,l),f=e.let("valid");e.try(()=>e.assign(f,(0,Sn._)`${u}(${o}, ${a}).test(${r})`),()=>e.assign(f,!1)),t.fail$data((0,Sn._)`!${f}`)}else{let l=(0,Zk.usePattern)(t,i);t.fail$data((0,Sn._)`!${l}.test(${r})`)}}};nc.default=rC});var Cy=x(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var Oi=Z(),nC={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Oi.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Oi._)`{limit: ${t}}`},iC={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:nC,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?Oi.operators.GT:Oi.operators.LT;t.fail$data((0,Oi._)`Object.keys(${r}).length ${i} ${n}`)}};ic.default=iC});var Ey=x(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var Vi=pt(),Li=Z(),oC=ne(),sC={message:({params:{missingProperty:t}})=>(0,Li.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Li._)`{missingProperty: ${t}}`},aC={keyword:"required",type:"object",schemaType:"array",$data:!0,error:sC,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():f(),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 b=s.schemaEnv.baseId+s.errSchemaPath,v=`required property "${y}" is not defined at "${b}" (strictRequired)`;(0,oC.checkStrictMode)(s,v,s.opts.strictRequired)}}function u(){if(l||o)t.block$data(Li.nil,p);else for(let m of r)(0,Vi.checkReportMissingProp)(t,m)}function f(){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,Vi.checkMissingProp)(t,r,m)),(0,Vi.reportMissingProp)(t,m),e.else()}function p(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,Vi.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function d(m,g){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(g,(0,Vi.propertyInData)(e,i,m,a.ownProperties)),e.if((0,Li.not)(g),()=>{t.error(),e.break()})},Li.nil)}}};oc.default=aC});var Py=x(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var ji=Z(),lC={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,ji.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,ji._)`{limit: ${t}}`},uC={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:lC,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?ji.operators.GT:ji.operators.LT;t.fail$data((0,ji._)`${r}.length ${i} ${n}`)}};sc.default=uC});var Ds=x(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var Iy=Ru();Iy.code='require("ajv/dist/runtime/equal").default';ac.default=Iy});var Ry=x(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var lc=xi(),Oe=Z(),cC=ne(),pC=Ds(),fC={message:({params:{i:t,j:e}})=>(0,Oe.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Oe._)`{i: ${t}, j: ${e}}`},dC={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:fC,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,lc.getSchemaTypes)(o.items):[];t.block$data(l,f,(0,Oe._)`${s} === false`),t.ok(l);function f(){let g=e.let("i",(0,Oe._)`${r}.length`),y=e.let("j");t.setParams({i:g,j:y}),e.assign(l,!0),e.if((0,Oe._)`${g} > 1`,()=>(p()?d:m)(g,y))}function p(){return u.length>0&&!u.some(g=>g==="object"||g==="array")}function d(g,y){let b=e.name("item"),v=(0,lc.checkDataTypes)(u,b,a.opts.strictNumbers,lc.DataType.Wrong),M=e.const("indices",(0,Oe._)`{}`);e.for((0,Oe._)`;${g}--;`,()=>{e.let(b,(0,Oe._)`${r}[${g}]`),e.if(v,(0,Oe._)`continue`),u.length>1&&e.if((0,Oe._)`typeof ${b} == "string"`,(0,Oe._)`${b} += "_"`),e.if((0,Oe._)`typeof ${M}[${b}] == "number"`,()=>{e.assign(y,(0,Oe._)`${M}[${b}]`),t.error(),e.assign(l,!1).break()}).code((0,Oe._)`${M}[${b}] = ${g}`)})}function m(g,y){let b=(0,cC.useFunc)(e,pC.default),v=e.name("outer");e.label(v).for((0,Oe._)`;${g}--;`,()=>e.for((0,Oe._)`${y} = ${g}; ${y}--;`,()=>e.if((0,Oe._)`${b}(${r}[${g}], ${r}[${y}])`,()=>{t.error(),e.assign(l,!1).break(v)})))}}};uc.default=dC});var Ty=x(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});var cc=Z(),hC=ne(),mC=Ds(),gC={message:"must be equal to constant",params:({schemaCode:t})=>(0,cc._)`{allowedValue: ${t}}`},yC={keyword:"const",$data:!0,error:gC,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,cc._)`!${(0,hC.useFunc)(e,mC.default)}(${r}, ${i})`):t.fail((0,cc._)`${o} !== ${r}`)}};pc.default=yC});var Ay=x(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});var Di=Z(),vC=ne(),wC=Ds(),bC={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Di._)`{allowedValues: ${t}}`},$C={keyword:"enum",schemaType:"array",$data:!0,error:bC,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,vC.useFunc)(e,wC.default)),f;if(a||n)f=e.let("valid"),t.block$data(f,p);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);f=(0,Di.or)(...i.map((g,y)=>d(m,y)))}t.pass(f);function p(){e.assign(f,!1),e.forOf("v",o,m=>e.if((0,Di._)`${u()}(${r}, ${m})`,()=>e.assign(f,!0).break()))}function d(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,Di._)`${u()}(${r}, ${m}[${g}])`:(0,Di._)`${r} === ${y}`}}};fc.default=$C});var Ny=x(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var _C=by(),xC=$y(),SC=Sy(),kC=ky(),CC=Cy(),EC=Ey(),PC=Py(),IC=Ry(),RC=Ty(),TC=Ay(),AC=[_C.default,xC.default,SC.default,kC.default,CC.default,EC.default,PC.default,IC.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},RC.default,TC.default];dc.default=AC});var mc=x(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.validateAdditionalItems=void 0;var Tr=Z(),hc=ne(),NC={message:({params:{len:t}})=>(0,Tr.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Tr._)`{limit: ${t}}`},MC={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:NC,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,hc.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}My(t,n)}};function My(t,e){let{gen:r,schema:n,data:i,keyword:o,it:s}=t;s.items=!0;let a=r.const("len",(0,Tr._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Tr._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,hc.alwaysValidSchema)(s,n)){let u=r.var("valid",(0,Tr._)`${a} <= ${e.length}`);r.if((0,Tr.not)(u),()=>l(u)),t.ok(u)}function l(u){r.forRange("i",e.length,a,f=>{t.subschema({keyword:o,dataProp:f,dataPropType:hc.Type.Num},u),s.allErrors||r.if((0,Tr.not)(u),()=>r.break())})}}qi.validateAdditionalItems=My;qi.default=MC});var gc=x(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.validateTuple=void 0;var Oy=Z(),qs=ne(),OC=pt(),VC={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return Vy(t,"additionalItems",e);r.items=!0,!(0,qs.alwaysValidSchema)(r,e)&&t.ok((0,OC.validateArray)(t))}};function Vy(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:s,it:a}=t;f(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=qs.mergeEvaluated.items(n,r.length,a.items));let l=n.name("valid"),u=n.const("len",(0,Oy._)`${o}.length`);r.forEach((p,d)=>{(0,qs.alwaysValidSchema)(a,p)||(n.if((0,Oy._)`${u} > ${d}`,()=>t.subschema({keyword:s,schemaProp:d,dataProp:d},l)),t.ok(l))});function f(p){let{opts:d,errSchemaPath:m}=a,g=r.length,y=g===p.minItems&&(g===p.maxItems||p[e]===!1);if(d.strictTuples&&!y){let b=`"${s}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,qs.checkStrictMode)(a,b,d.strictTuples)}}}Fi.validateTuple=Vy;Fi.default=VC});var Ly=x(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var LC=gc(),jC={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,LC.validateTuple)(t,"items")};yc.default=jC});var Dy=x(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var jy=Z(),DC=ne(),qC=pt(),FC=mc(),BC={message:({params:{len:t}})=>(0,jy.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,jy._)`{limit: ${t}}`},HC={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:BC,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,DC.alwaysValidSchema)(n,e)&&(i?(0,FC.validateAdditionalItems)(t,i):t.ok((0,qC.validateArray)(t)))}};vc.default=HC});var qy=x(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var dt=Z(),Fs=ne(),WC={message:({params:{min:t,max:e}})=>e===void 0?(0,dt.str)`must contain at least ${t} valid item(s)`:(0,dt.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,dt._)`{minContains: ${t}}`:(0,dt._)`{minContains: ${t}, maxContains: ${e}}`},zC={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:WC,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 f=e.const("len",(0,dt._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,Fs.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Fs.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Fs.alwaysValidSchema)(o,r)){let y=(0,dt._)`${f} >= ${s}`;a!==void 0&&(y=(0,dt._)`${y} && ${f} <= ${a}`),t.pass(y);return}o.items=!0;let p=e.name("valid");a===void 0&&s===1?m(p,()=>e.if(p,()=>e.break())):s===0?(e.let(p,!0),a!==void 0&&e.if((0,dt._)`${i}.length > 0`,d)):(e.let(p,!1),d()),t.result(p,()=>t.reset());function d(){let y=e.name("_valid"),b=e.let("count",0);m(y,()=>e.if(y,()=>g(b)))}function m(y,b){e.forRange("i",0,f,v=>{t.subschema({keyword:"contains",dataProp:v,dataPropType:Fs.Type.Num,compositeRule:!0},y),b()})}function g(y){e.code((0,dt._)`${y}++`),a===void 0?e.if((0,dt._)`${y} >= ${s}`,()=>e.assign(p,!0).break()):(e.if((0,dt._)`${y} > ${a}`,()=>e.assign(p,!1).break()),s===1?e.assign(p,!0):e.if((0,dt._)`${y} >= ${s}`,()=>e.assign(p,!0)))}}};wc.default=zC});var Bs=x(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.validateSchemaDeps=It.validatePropertyDeps=It.error=void 0;var bc=Z(),UC=ne(),Bi=pt();It.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,bc.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,bc._)`{property: ${t},
|
|
391
|
+
|| ${s} === "boolean" || ${i} === null`).assign(a,(0,ee._)`[${i}]`)}}}function v1({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,ee._)`${e} !== undefined`,()=>t.assign((0,ee._)`${e}[${r}]`,n))}function ku(t,e,r,n=yn.Correct){let i=n===yn.Correct?ee.operators.EQ:ee.operators.NEQ,o;switch(t){case"null":return(0,ee._)`${e} ${i} null`;case"array":o=(0,ee._)`Array.isArray(${e})`;break;case"object":o=(0,ee._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=s((0,ee._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=s();break;default:return(0,ee._)`typeof ${e} ${i} ${t}`}return n===yn.Correct?o:(0,ee.not)(o);function s(a=ee.nil){return(0,ee.and)((0,ee._)`typeof ${e} == "number"`,a,r?(0,ee._)`isFinite(${e})`:ee.nil)}}qe.checkDataType=ku;function Cu(t,e,r,n){if(t.length===1)return ku(t[0],e,r,n);let i,o=(0,lg.toHash)(t);if(o.array&&o.object){let s=(0,ee._)`typeof ${e} != "object"`;i=o.null?s:(0,ee._)`!${e} || ${s}`,delete o.null,delete o.array,delete o.object}else i=ee.nil;o.number&&delete o.integer;for(let s in o)i=(0,ee.and)(i,ku(s,e,r,n));return i}qe.checkDataTypes=Cu;var w1={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ee._)`{type: ${t}}`:(0,ee._)`{type: ${e}}`};function Eu(t){let e=b1(t);(0,d1.reportError)(e,w1)}qe.reportTypeError=Eu;function b1(t){let{gen:e,data:r,schema:n}=t,i=(0,lg.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var fg=_(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});ks.assignDefaults=void 0;var vn=Z(),$1=ne();function x1(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)pg(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>pg(t,o,i.default))}ks.assignDefaults=x1;function pg(t,e,r){let{gen:n,compositeRule:i,data:o,opts:s}=t;if(r===void 0)return;let a=(0,vn._)`${o}${(0,vn.getProperty)(e)}`;if(i){(0,$1.checkStrictMode)(t,`default is ignored for: ${a}`);return}let l=(0,vn._)`${a} === undefined`;s.useDefaults==="empty"&&(l=(0,vn._)`${l} || ${a} === null || ${a} === ""`),n.if(l,(0,vn._)`${a} = ${(0,vn.stringify)(r)}`)}});var pt=_(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.validateUnion=fe.validateArray=fe.usePattern=fe.callValidateCode=fe.schemaProperties=fe.allSchemaProperties=fe.noPropertyInData=fe.propertyInData=fe.isOwnProperty=fe.hasPropFunc=fe.reportMissingProp=fe.checkMissingProp=fe.checkReportMissingProp=void 0;var ye=Z(),Pu=ne(),tr=ct(),_1=ne();function S1(t,e){let{gen:r,data:n,it:i}=t;r.if(Ru(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ye._)`${e}`},!0),t.error()})}fe.checkReportMissingProp=S1;function k1({gen:t,data:e,it:{opts:r}},n,i){return(0,ye.or)(...n.map(o=>(0,ye.and)(Ru(t,e,o,r.ownProperties),(0,ye._)`${i} = ${o}`)))}fe.checkMissingProp=k1;function C1(t,e){t.setParams({missingProperty:e},!0),t.error()}fe.reportMissingProp=C1;function dg(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ye._)`Object.prototype.hasOwnProperty`})}fe.hasPropFunc=dg;function Iu(t,e,r){return(0,ye._)`${dg(t)}.call(${e}, ${r})`}fe.isOwnProperty=Iu;function E1(t,e,r,n){let i=(0,ye._)`${e}${(0,ye.getProperty)(r)} !== undefined`;return n?(0,ye._)`${i} && ${Iu(t,e,r)}`:i}fe.propertyInData=E1;function Ru(t,e,r,n){let i=(0,ye._)`${e}${(0,ye.getProperty)(r)} === undefined`;return n?(0,ye.or)(i,(0,ye.not)(Iu(t,e,r))):i}fe.noPropertyInData=Ru;function hg(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}fe.allSchemaProperties=hg;function P1(t,e){return hg(e).filter(r=>!(0,Pu.alwaysValidSchema)(t,e[r]))}fe.schemaProperties=P1;function I1({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,l,u){let f=u?(0,ye._)`${t}, ${e}, ${n}${i}`:e,p=[[tr.default.instancePath,(0,ye.strConcat)(tr.default.instancePath,o)],[tr.default.parentData,s.parentData],[tr.default.parentDataProperty,s.parentDataProperty],[tr.default.rootData,tr.default.rootData]];s.opts.dynamicRef&&p.push([tr.default.dynamicAnchors,tr.default.dynamicAnchors]);let d=(0,ye._)`${f}, ${r.object(...p)}`;return l!==ye.nil?(0,ye._)`${a}.call(${l}, ${d})`:(0,ye._)`${a}(${d})`}fe.callValidateCode=I1;var R1=(0,ye._)`new RegExp`;function T1({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,ye._)`${i.code==="new RegExp"?R1:(0,_1.useFunc)(t,i)}(${r}, ${n})`})}fe.usePattern=T1;function A1(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,ye._)`${r}.length`);e.forRange("i",0,l,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:Pu.Type.Num},o),e.if((0,ye.not)(o),a)})}}fe.validateArray=A1;function N1(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,Pu.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>r.forEach((l,u)=>{let f=t.subschema({keyword:n,schemaProp:u,compositeRule:!0},a);e.assign(s,(0,ye._)`${s} || ${a}`),t.mergeValidEvaluated(f,a)||e.if((0,ye.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}fe.validateUnion=N1});var yg=_(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.validateKeywordUsage=Et.validSchemaType=Et.funcKeywordCode=Et.macroKeywordCode=void 0;var Ue=Z(),Cr=ct(),M1=pt(),O1=Si();function V1(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=t,a=e.macro.call(s.self,i,o,s),l=gg(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");t.subschema({schema:a,schemaPath:Ue.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}Et.macroKeywordCode=V1;function L1(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:l}=t;D1(l,e);let u=!a&&e.compile?e.compile.call(l.self,o,s,l):e.validate,f=gg(n,i,u),p=n.let("valid");t.block$data(p,d),t.ok((r=e.valid)!==null&&r!==void 0?r:p);function d(){if(e.errors===!1)y(),e.modifying&&mg(t),w(()=>t.error());else{let b=e.async?m():g();e.modifying&&mg(t),w(()=>j1(t,b))}}function m(){let b=n.let("ruleErrs",null);return n.try(()=>y((0,Ue._)`await `),M=>n.assign(p,!1).if((0,Ue._)`${M} instanceof ${l.ValidationError}`,()=>n.assign(b,(0,Ue._)`${M}.errors`),()=>n.throw(M))),b}function g(){let b=(0,Ue._)`${f}.errors`;return n.assign(b,null),y(Ue.nil),b}function y(b=e.async?(0,Ue._)`await `:Ue.nil){let M=l.opts.passContext?Cr.default.this:Cr.default.self,k=!("compile"in e&&!a||e.schema===!1);n.assign(p,(0,Ue._)`${b}${(0,M1.callValidateCode)(t,f,M,k)}`,e.modifying)}function w(b){var M;n.if((0,Ue.not)((M=e.valid)!==null&&M!==void 0?M:p),b)}}Et.funcKeywordCode=L1;function mg(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,Ue._)`${n.parentData}[${n.parentDataProperty}]`))}function j1(t,e){let{gen:r}=t;r.if((0,Ue._)`Array.isArray(${e})`,()=>{r.assign(Cr.default.vErrors,(0,Ue._)`${Cr.default.vErrors} === null ? ${e} : ${Cr.default.vErrors}.concat(${e})`).assign(Cr.default.errors,(0,Ue._)`${Cr.default.vErrors}.length`),(0,O1.extendErrors)(t)},()=>t.error())}function D1({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function gg(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,Ue.stringify)(r)})}function q1(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")}Et.validSchemaType=q1;function F1({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)}}Et.validateKeywordUsage=F1});var wg=_(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.extendSubschemaMode=rr.extendSubschemaData=rr.getSubschema=void 0;var Pt=Z(),vg=ne();function B1(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,Pt._)`${t.schemaPath}${(0,Pt.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0,Pt._)`${t.schemaPath}${(0,Pt.getProperty)(e)}${(0,Pt.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,vg.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')}rr.getSubschema=B1;function H1(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:f,opts:p}=e,d=a.let("data",(0,Pt._)`${e.data}${(0,Pt.getProperty)(r)}`,!0);l(d),t.errorPath=(0,Pt.str)`${u}${(0,vg.getErrorPath)(r,n,p.jsPropertySyntax)}`,t.parentDataProperty=(0,Pt._)`${r}`,t.dataPathArr=[...f,t.parentDataProperty]}if(i!==void 0){let u=i instanceof Pt.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]}}rr.extendSubschemaData=H1;function W1(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}rr.extendSubschemaMode=W1});var Tu=_((MN,bg)=>{"use strict";bg.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 xg=_((ON,$g)=>{"use strict";var nr=$g.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(){};Cs(e,n,i,t,"",t)};nr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};nr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};nr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};nr.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 Cs(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 f in n){var p=n[f];if(Array.isArray(p)){if(f in nr.arrayKeywords)for(var d=0;d<p.length;d++)Cs(t,e,r,p[d],i+"/"+f+"/"+d,o,i,f,n,d)}else if(f in nr.propsKeywords){if(p&&typeof p=="object")for(var m in p)Cs(t,e,r,p[m],i+"/"+f+"/"+z1(m),o,i,f,n,m)}else(f in nr.keywords||t.allKeys&&!(f in nr.skipKeywords))&&Cs(t,e,r,p,i+"/"+f,o,i,f,n)}r(n,i,o,s,a,l,u)}}function z1(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ci=_(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.getSchemaRefs=Qe.resolveUrl=Qe.normalizeId=Qe._getFullPath=Qe.getFullPath=Qe.inlineRef=void 0;var U1=ne(),G1=Tu(),J1=xg(),K1=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Y1(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Au(t):e?_g(t)<=e:!1}Qe.inlineRef=Y1;var X1=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Au(t){for(let e in t){if(X1.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Au)||typeof r=="object"&&Au(r))return!0}return!1}function _g(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!K1.has(r)&&(typeof t[r]=="object"&&(0,U1.eachItem)(t[r],n=>e+=_g(n)),e===1/0))return 1/0}return e}function Sg(t,e="",r){r!==!1&&(e=wn(e));let n=t.parse(e);return kg(t,n)}Qe.getFullPath=Sg;function kg(t,e){return t.serialize(e).split("#")[0]+"#"}Qe._getFullPath=kg;var Q1=/#\/?$/;function wn(t){return t?t.replace(Q1,""):""}Qe.normalizeId=wn;function Z1(t,e,r){return r=wn(r),t.resolve(e,r)}Qe.resolveUrl=Z1;var eS=/^[a-z_][-a-z0-9._]*$/i;function tS(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=wn(t[r]||e),o={"":i},s=Sg(n,i,!1),a={},l=new Set;return J1(t,{allKeys:!0},(p,d,m,g)=>{if(g===void 0)return;let y=s+d,w=o[g];typeof p[r]=="string"&&(w=b.call(this,p[r])),M.call(this,p.$anchor),M.call(this,p.$dynamicAnchor),o[d]=w;function b(k){let R=this.opts.uriResolver.resolve;if(k=wn(w?R(w,k):k),l.has(k))throw f(k);l.add(k);let T=this.refs[k];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?u(p,T.schema,k):k!==wn(y)&&(k[0]==="#"?(u(p,a[k],k),a[k]=p):this.refs[k]=y),k}function M(k){if(typeof k=="string"){if(!eS.test(k))throw new Error(`invalid anchor "${k}"`);b.call(this,`#${k}`)}}}),a;function u(p,d,m){if(d!==void 0&&!G1(p,d))throw f(m)}function f(p){return new Error(`reference "${p}" resolves to more than one schema`)}}Qe.getSchemaRefs=tS});var Ii=_(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.getData=ir.KeywordCxt=ir.validateFunctionCode=void 0;var Rg=og(),Cg=ki(),Mu=Su(),Es=ki(),rS=fg(),Pi=yg(),Nu=wg(),U=Z(),Q=ct(),nS=Ci(),Gt=ne(),Ei=Si();function iS(t){if(Ng(t)&&(Mg(t),Ag(t))){aS(t);return}Tg(t,()=>(0,Rg.topBoolOrEmptySchema)(t))}ir.validateFunctionCode=iS;function Tg({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,U._)`${Q.default.data}, ${Q.default.valCxt}`,n.$async,()=>{t.code((0,U._)`"use strict"; ${Eg(r,i)}`),sS(t,i),t.code(o)}):t.func(e,(0,U._)`${Q.default.data}, ${oS(i)}`,n.$async,()=>t.code(Eg(r,i)).code(o))}function oS(t){return(0,U._)`{${Q.default.instancePath}="", ${Q.default.parentData}, ${Q.default.parentDataProperty}, ${Q.default.rootData}=${Q.default.data}${t.dynamicRef?(0,U._)`, ${Q.default.dynamicAnchors}={}`:U.nil}}={}`}function sS(t,e){t.if(Q.default.valCxt,()=>{t.var(Q.default.instancePath,(0,U._)`${Q.default.valCxt}.${Q.default.instancePath}`),t.var(Q.default.parentData,(0,U._)`${Q.default.valCxt}.${Q.default.parentData}`),t.var(Q.default.parentDataProperty,(0,U._)`${Q.default.valCxt}.${Q.default.parentDataProperty}`),t.var(Q.default.rootData,(0,U._)`${Q.default.valCxt}.${Q.default.rootData}`),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,U._)`${Q.default.valCxt}.${Q.default.dynamicAnchors}`)},()=>{t.var(Q.default.instancePath,(0,U._)`""`),t.var(Q.default.parentData,(0,U._)`undefined`),t.var(Q.default.parentDataProperty,(0,U._)`undefined`),t.var(Q.default.rootData,Q.default.data),e.dynamicRef&&t.var(Q.default.dynamicAnchors,(0,U._)`{}`)})}function aS(t){let{schema:e,opts:r,gen:n}=t;Tg(t,()=>{r.$comment&&e.$comment&&Vg(t),fS(t),n.let(Q.default.vErrors,null),n.let(Q.default.errors,0),r.unevaluated&&lS(t),Og(t),mS(t)})}function lS(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,U._)`${r}.evaluated`),e.if((0,U._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,U._)`${t.evaluated}.props`,(0,U._)`undefined`)),e.if((0,U._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,U._)`${t.evaluated}.items`,(0,U._)`undefined`))}function Eg(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,U._)`/*# sourceURL=${r} */`:U.nil}function uS(t,e){if(Ng(t)&&(Mg(t),Ag(t))){cS(t,e);return}(0,Rg.boolOrEmptySchema)(t,e)}function Ag({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 Ng(t){return typeof t.schema!="boolean"}function cS(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&Vg(t),dS(t),hS(t);let o=n.const("_errs",Q.default.errors);Og(t,o),n.var(e,(0,U._)`${o} === ${Q.default.errors}`)}function Mg(t){(0,Gt.checkUnknownRules)(t),pS(t)}function Og(t,e){if(t.opts.jtd)return Pg(t,[],!1,e);let r=(0,Cg.getSchemaTypes)(t.schema),n=(0,Cg.coerceAndCheckDataType)(t,r);Pg(t,r,!n,e)}function pS(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Gt.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function fS(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Gt.checkStrictMode)(t,"default is ignored in the schema root")}function dS(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,nS.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function hS(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Vg({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,U._)`${Q.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,U.str)`${n}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,U._)`${Q.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function mS(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,U._)`${Q.default.errors} === 0`,()=>e.return(Q.default.data),()=>e.throw((0,U._)`new ${i}(${Q.default.vErrors})`)):(e.assign((0,U._)`${n}.errors`,Q.default.vErrors),o.unevaluated&&gS(t),e.return((0,U._)`${Q.default.errors} === 0`))}function gS({gen:t,evaluated:e,props:r,items:n}){r instanceof U.Name&&t.assign((0,U._)`${e}.props`,r),n instanceof U.Name&&t.assign((0,U._)`${e}.items`,n)}function Pg(t,e,r,n){let{gen:i,schema:o,data:s,allErrors:a,opts:l,self:u}=t,{RULES:f}=u;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,Gt.schemaHasRulesButRef)(o,f))){i.block(()=>jg(t,"$ref",f.all.$ref.definition));return}l.jtd||yS(t,e),i.block(()=>{for(let d of f.rules)p(d);p(f.post)});function p(d){(0,Mu.shouldUseGroup)(o,d)&&(d.type?(i.if((0,Es.checkDataType)(d.type,s,l.strictNumbers)),Ig(t,d),e.length===1&&e[0]===d.type&&r&&(i.else(),(0,Es.reportTypeError)(t)),i.endIf()):Ig(t,d),a||i.if((0,U._)`${Q.default.errors} === ${n||0}`))}}function Ig(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,rS.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,Mu.shouldUseRule)(n,o)&&jg(t,o.keyword,o.definition,e.type)})}function yS(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(vS(t,e),t.opts.allowUnionTypes||wS(t,e),bS(t,t.dataTypes))}function vS(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Lg(t.dataTypes,r)||Ou(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),xS(t,e)}}function wS(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Ou(t,"use allowUnionTypes to allow union type keyword")}function bS(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Mu.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>$S(e,s))&&Ou(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function $S(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Lg(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function xS(t,e){let r=[];for(let n of t.dataTypes)Lg(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Ou(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Gt.checkStrictMode)(t,e,t.opts.strictTypes)}var Ps=class{constructor(e,r,n){if((0,Pi.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,Gt.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",Dg(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Pi.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",Q.default.errors))}result(e,r,n){this.failResult((0,U.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,U.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,U._)`${r} !== undefined && (${(0,U.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?Ei.reportExtraError:Ei.reportError)(this,this.def.error,r)}$dataError(){(0,Ei.reportError)(this,this.def.$dataError||Ei.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ei.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=U.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=U.nil,r=U.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:s}=this;n.if((0,U.or)((0,U._)`${i} === undefined`,r)),e!==U.nil&&n.assign(e,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==U.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,U.or)(s(),a());function s(){if(n.length){if(!(r instanceof U.Name))throw new Error("ajv implementation error");let l=Array.isArray(n)?n:[n];return(0,U._)`${(0,Es.checkDataTypes)(l,r,o.opts.strictNumbers,Es.DataType.Wrong)}`}return U.nil}function a(){if(i.validateSchema){let l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,U._)`!${l}(${r})`}return U.nil}}subschema(e,r){let n=(0,Nu.getSubschema)(this.it,e);(0,Nu.extendSubschemaData)(n,this.it,e),(0,Nu.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return uS(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Gt.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Gt.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,U.Name)),!0}};ir.KeywordCxt=Ps;function jg(t,e,r,n){let i=new Ps(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Pi.funcKeywordCode)(i,r):"macro"in r?(0,Pi.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Pi.funcKeywordCode)(i,r)}var _S=/^\/(?:[^~]|~0|~1)*$/,SS=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Dg(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return Q.default.rootData;if(t[0]==="/"){if(!_S.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=Q.default.rootData}else{let u=SS.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let f=+u[1];if(i=u[2],i==="#"){if(f>=e)throw new Error(l("property/index",f));return n[e-f]}if(f>e)throw new Error(l("data",f));if(o=r[e-f],!i)return o}let s=o,a=i.split("/");for(let u of a)u&&(o=(0,U._)`${o}${(0,U.getProperty)((0,Gt.unescapeJsonPointer)(u))}`,s=(0,U._)`${s} && ${o}`);return s;function l(u,f){return`Cannot access ${u} ${f} levels up, current level is ${e}`}}ir.getData=Dg});var Is=_(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});var Vu=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Lu.default=Vu});var Ri=_(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});var ju=Ci(),Du=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,ju.resolveUrl)(e,r,n),this.missingSchema=(0,ju.normalizeId)((0,ju.getFullPath)(e,this.missingRef))}};qu.default=Du});var Ti=_(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.resolveSchema=ft.getCompilingSchema=ft.resolveRef=ft.compileSchema=ft.SchemaEnv=void 0;var bt=Z(),kS=Is(),Er=ct(),$t=Ci(),qg=ne(),CS=Ii(),bn=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,$t.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};ft.SchemaEnv=bn;function Bu(t){let e=Fg.call(this,t);if(e)return e;let r=(0,$t.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new bt.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),a;t.$async&&(a=s.scopeValue("Error",{ref:kS.default,code:(0,bt._)`require("ajv/dist/runtime/validation_error").default`}));let l=s.scopeName("validate");t.validateName=l;let u={gen:s,allErrors:this.opts.allErrors,data:Er.default.data,parentData:Er.default.parentData,parentDataProperty:Er.default.parentDataProperty,dataNames:[Er.default.data],dataPathArr:[bt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,bt.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:bt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,bt._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(t),(0,CS.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let p=s.toString();f=`${s.scopeRefs(Er.default.scope)}return ${p}`,this.opts.code.process&&(f=this.opts.code.process(f,t));let m=new Function(`${Er.default.self}`,`${Er.default.scope}`,f)(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:p,scopeValues:s._values}),this.opts.unevaluated){let{props:g,items:y}=u;m.evaluated={props:g instanceof bt.Name?void 0:g,items:y instanceof bt.Name?void 0:y,dynamicProps:g instanceof bt.Name,dynamicItems:y instanceof bt.Name},m.source&&(m.source.evaluated=(0,bt.stringify)(m.evaluated))}return t.validate=m,t}catch(p){throw delete t.validate,delete t.validateName,f&&this.logger.error("Error compiling schema, function code:",f),p}finally{this._compilations.delete(t)}}ft.compileSchema=Bu;function ES(t,e,r){var n;r=(0,$t.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=RS.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 bn({schema:s,schemaId:a,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=PS.call(this,o)}ft.resolveRef=ES;function PS(t){return(0,$t.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Bu.call(this,t)}function Fg(t){for(let e of this._compilations)if(IS(e,t))return e}ft.getCompilingSchema=Fg;function IS(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function RS(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Rs.call(this,t,e)}function Rs(t,e){let r=this.opts.uriResolver.parse(e),n=(0,$t._getFullPath)(this.opts.uriResolver,r),i=(0,$t.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return Fu.call(this,r,t);let o=(0,$t.normalizeId)(n),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=Rs.call(this,t,s);return typeof a?.schema!="object"?void 0:Fu.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||Bu.call(this,s),o===(0,$t.normalizeId)(e)){let{schema:a}=s,{schemaId:l}=this.opts,u=a[l];return u&&(i=(0,$t.resolveUrl)(this.opts.uriResolver,i,u)),new bn({schema:a,schemaId:l,root:t,baseId:i})}return Fu.call(this,r,s)}}ft.resolveSchema=Rs;var TS=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Fu(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,qg.unescapeFragment)(a)];if(l===void 0)return;r=l;let u=typeof r=="object"&&r[this.opts.schemaId];!TS.has(a)&&u&&(e=(0,$t.resolveUrl)(this.opts.uriResolver,e,u))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,qg.schemaHasRulesButRef)(r,this.RULES)){let a=(0,$t.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=Rs.call(this,n,a)}let{schemaId:s}=this.opts;if(o=o||new bn({schema:r,schemaId:s,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var Bg=_((FN,AS)=>{AS.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 zu=_((BN,Jg)=>{"use strict";var NS=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Wg=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),Hu=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),zg=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),MS=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Wu(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 OS=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Hg(t){return t.length=0,!0}function VS(t,e,r){if(t.length){let n=Wu(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function LS(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,s=!1,a=VS;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=Hg}else{i.push(u);continue}}return i.length&&(a===Hg?r.zone=i.join(""):s?n.push(i.join("")):n.push(Wu(i))),r.address=n.join(""),r}function Ug(t){if(jS(t,":")<2)return{host:t,isIPV6:!1};let e=LS(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 jS(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function DS(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 qS={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},FS=/[@/?#:]/g,BS=/[@/?#]/g;function Gg(t,e){let r=e?BS:FS;return r.lastIndex=0,t.replace(r,n=>qS[n])}function HS(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(Hu(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));e&&zg(s)?r+=s:r+="%"+o,n+=2;continue}}r+=t[n]}return r}function WS(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(Hu(n)){let i=n.toUpperCase(),o=String.fromCharCode(parseInt(i,16));o!=="."&&zg(o)?e+=o:e+="%"+i,r+=2;continue}}MS(t[r])?e+=t[r]:e+=escape(t[r])}return e}function zS(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(Hu(n)){e+="%"+n.toUpperCase(),r+=2;continue}}e+=escape(t[r])}return e}function US(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!Wg(r)){let n=Ug(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=Gg(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}Jg.exports={nonSimpleDomain:OS,recomposeAuthority:US,reescapeHostDelimiters:Gg,normalizePercentEncoding:HS,normalizePathEncoding:WS,escapePreservingEscapes:zS,removeDotSegments:DS,isIPv4:Wg,isUUID:NS,normalizeIPv6:Ug,stringArrayToHexStripped:Wu}});var Zg=_((HN,Qg)=>{"use strict";var{isUUID:GS}=zu(),JS=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,KS=["http","https","ws","wss","urn","urn:uuid"];function YS(t){return KS.indexOf(t)!==-1}function Uu(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 Kg(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Yg(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 XS(t){return t.secure=Uu(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function QS(t){if((t.port===(Uu(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 ZS(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(JS);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=Gu(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function ek(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=Gu(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 tk(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!GS(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function rk(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Xg={scheme:"http",domainHost:!0,parse:Kg,serialize:Yg},nk={scheme:"https",domainHost:Xg.domainHost,parse:Kg,serialize:Yg},Ts={scheme:"ws",domainHost:!0,parse:XS,serialize:QS},ik={scheme:"wss",domainHost:Ts.domainHost,parse:Ts.parse,serialize:Ts.serialize},ok={scheme:"urn",parse:ZS,serialize:ek,skipNormalize:!0},sk={scheme:"urn:uuid",parse:tk,serialize:rk,skipNormalize:!0},As={http:Xg,https:nk,ws:Ts,wss:ik,urn:ok,"urn:uuid":sk};Object.setPrototypeOf(As,null);function Gu(t){return t&&(As[t]||As[t.toLowerCase()])||void 0}Qg.exports={wsIsSecure:Uu,SCHEMES:As,isValidSchemeName:YS,getSchemeHandler:Gu}});var oy=_((WN,Ns)=>{"use strict";var{normalizeIPv6:ak,removeDotSegments:Ai,recomposeAuthority:lk,normalizePercentEncoding:uk,normalizePathEncoding:ck,escapePreservingEscapes:pk,reescapeHostDelimiters:fk,isIPv4:dk,nonSimpleDomain:hk}=zu(),{SCHEMES:mk,getSchemeHandler:ty}=Zg();function gk(t,e){return typeof t=="string"?t=$k(t,e):typeof t=="object"&&(t=$n(Pr(t,e),e)),t}function yk(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=ry($n(t,n),$n(e,n),n,!0);return n.skipEscape=!0,Pr(i,n)}function ry(t,e,r,n){let i={};return n||(t=$n(Pr(t,r),r),e=$n(Pr(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=Ai(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=Ai(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=Ai(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=Ai(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 vk(t,e,r){let n=ey(t,r),i=ey(e,r);return n!==void 0&&i!==void 0&&n.toLowerCase()===i.toLowerCase()}function Pr(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=ty(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=uk(r.path):(r.path=pk(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let s=lk(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=Ai(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 wk=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function bk(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 ny(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(wk);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=bk(n,s);if(a!==void 0&&(n.error=n.error||a,i=!0),n.host)if(dk(n.host)===!1){let f=ak(n.host);n.host=f.host.toLowerCase(),o=f.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=ty(r.scheme||n.scheme);if(!r.unicodeSupport&&(!l||!l.unicodeSupport)&&n.host&&(r.domainHost||l&&l.domainHost)&&o===!1&&hk(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=fk(unescape(n.host),o))),n.path&&(n.path=ck(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 $n(t,e){return ny(t,e).parsed}function $k(t,e){return iy(t,e).normalized}function iy(t,e){let{parsed:r,malformedAuthorityOrPort:n}=ny(t,e);return{normalized:n?t:Pr(r,e),malformedAuthorityOrPort:n}}function ey(t,e){if(typeof t=="string"){let{normalized:r,malformedAuthorityOrPort:n}=iy(t,e);return n?void 0:r}if(typeof t=="object")return Pr(t,e)}var Ju={SCHEMES:mk,normalize:gk,resolve:yk,resolveComponent:ry,equal:vk,serialize:Pr,parse:$n};Ns.exports=Ju;Ns.exports.default=Ju;Ns.exports.fastUri=Ju});var ay=_(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});var sy=oy();sy.code='require("ajv/dist/runtime/uri").default';Ku.default=sy});var my=_(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.CodeGen=Me.Name=Me.nil=Me.stringify=Me.str=Me._=Me.KeywordCxt=void 0;var xk=Ii();Object.defineProperty(Me,"KeywordCxt",{enumerable:!0,get:function(){return xk.KeywordCxt}});var xn=Z();Object.defineProperty(Me,"_",{enumerable:!0,get:function(){return xn._}});Object.defineProperty(Me,"str",{enumerable:!0,get:function(){return xn.str}});Object.defineProperty(Me,"stringify",{enumerable:!0,get:function(){return xn.stringify}});Object.defineProperty(Me,"nil",{enumerable:!0,get:function(){return xn.nil}});Object.defineProperty(Me,"Name",{enumerable:!0,get:function(){return xn.Name}});Object.defineProperty(Me,"CodeGen",{enumerable:!0,get:function(){return xn.CodeGen}});var _k=Is(),fy=Ri(),Sk=_u(),Ni=Ti(),kk=Z(),Mi=Ci(),Ms=ki(),Xu=ne(),ly=Bg(),Ck=ay(),dy=(t,e)=>new RegExp(t,e);dy.code="new RegExp";var Ek=["removeAdditional","useDefaults","coerceTypes"],Pk=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Ik={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."},Rk={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},uy=200;function Tk(t){var e,r,n,i,o,s,a,l,u,f,p,d,m,g,y,w,b,M,k,R,T,V,z,ie,we;let be=t.strict,Re=(e=t.code)===null||e===void 0?void 0:e.optimize,$e=Re===!0||Re===void 0?1:Re||0,Ge=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:dy,Je=(i=t.uriResolver)!==null&&i!==void 0?i:Ck.default;return{strictSchema:(s=(o=t.strictSchema)!==null&&o!==void 0?o:be)!==null&&s!==void 0?s:!0,strictNumbers:(l=(a=t.strictNumbers)!==null&&a!==void 0?a:be)!==null&&l!==void 0?l:!0,strictTypes:(f=(u=t.strictTypes)!==null&&u!==void 0?u:be)!==null&&f!==void 0?f:"log",strictTuples:(d=(p=t.strictTuples)!==null&&p!==void 0?p:be)!==null&&d!==void 0?d:"log",strictRequired:(g=(m=t.strictRequired)!==null&&m!==void 0?m:be)!==null&&g!==void 0?g:!1,code:t.code?{...t.code,optimize:$e,regExp:Ge}:{optimize:$e,regExp:Ge},loopRequired:(y=t.loopRequired)!==null&&y!==void 0?y:uy,loopEnum:(w=t.loopEnum)!==null&&w!==void 0?w:uy,meta:(b=t.meta)!==null&&b!==void 0?b:!0,messages:(M=t.messages)!==null&&M!==void 0?M:!0,inlineRefs:(k=t.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(R=t.schemaId)!==null&&R!==void 0?R:"$id",addUsedSchema:(T=t.addUsedSchema)!==null&&T!==void 0?T:!0,validateSchema:(V=t.validateSchema)!==null&&V!==void 0?V:!0,validateFormats:(z=t.validateFormats)!==null&&z!==void 0?z:!0,unicodeRegExp:(ie=t.unicodeRegExp)!==null&&ie!==void 0?ie:!0,int32range:(we=t.int32range)!==null&&we!==void 0?we:!0,uriResolver:Je}}var Oi=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,...Tk(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new kk.ValueScope({scope:{},prefixes:Pk,es5:r,lines:n}),this.logger=Lk(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Sk.getRules)(),cy.call(this,Ik,e,"NOT SUPPORTED"),cy.call(this,Rk,e,"DEPRECATED","warn"),this._metaOpts=Ok.call(this),e.formats&&Nk.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Mk.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Ak.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=ly;n==="id"&&(i={...ly},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(f,p){await o.call(this,f.$schema);let d=this._addSchema(f,p);return d.validate||s.call(this,d)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function s(f){try{return this._compileSchemaEnv(f)}catch(p){if(!(p instanceof fy.default))throw p;return a.call(this,p),await l.call(this,p.missingSchema),s.call(this,f)}}function a({missingSchema:f,missingRef:p}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${p} cannot be resolved`)}async function l(f){let p=await u.call(this,f);this.refs[f]||await o.call(this,p.$schema),this.refs[f]||this.addSchema(p,f,r)}async function u(f){let p=this._loading[f];if(p)return p;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}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,Mi.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=py.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Ni.SchemaEnv({schema:{},schemaId:n});if(r=Ni.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=py.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,Mi.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(Dk.call(this,n,r),!r)return(0,Xu.eachItem)(n,o=>Yu.call(this,o)),this;Fk.call(this,r);let i={...r,type:(0,Ms.getJSONTypes)(r.type),schemaType:(0,Ms.getJSONTypes)(r.schemaType)};return(0,Xu.eachItem)(n,i.type.length===0?o=>Yu.call(this,o,i):o=>i.type.forEach(s=>Yu.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,f=s[a];u&&f&&(s[a]=hy(f))}}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,Mi.normalizeId)(s||n);let u=Mi.getSchemaRefs.call(this,e,n);return l=new Ni.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):Ni.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{Ni.compileSchema.call(this,e)}finally{this.opts=r}}};Oi.ValidationError=_k.default;Oi.MissingRefError=fy.default;Me.default=Oi;function cy(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 py(t){return t=(0,Mi.normalizeId)(t),this.schemas[t]||this.refs[t]}function Ak(){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 Nk(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Mk(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 Ok(){let t={...this.opts};for(let e of Ek)delete t[e];return t}var Vk={log(){},warn(){},error(){}};function Lk(t){if(t===!1)return Vk;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 jk=/^[a-z_$][a-z0-9_$:-]*$/i;function Dk(t,e){let{RULES:r}=this;if((0,Xu.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!jk.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 Yu(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,Ms.getJSONTypes)(e.type),schemaType:(0,Ms.getJSONTypes)(e.schemaType)}};e.before?qk.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 qk(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 Fk(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=hy(e)),t.validateSchema=this.compile(e,!0))}var Bk={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function hy(t){return{anyOf:[t,Bk]}}});var gy=_(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});var Hk={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Qu.default=Hk});var Ls=_(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.callRef=Ir.getValidate=void 0;var Wk=Ri(),yy=pt(),Ze=Z(),_n=ct(),vy=Ti(),Os=ne(),zk={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 p();let f=vy.resolveRef.call(l,u,i,r);if(f===void 0)throw new Wk.default(n.opts.uriResolver,i,r);if(f instanceof vy.SchemaEnv)return d(f);return m(f);function p(){if(o===u)return Vs(t,s,o,o.$async);let g=e.scopeValue("root",{ref:u});return Vs(t,(0,Ze._)`${g}.validate`,u,u.$async)}function d(g){let y=wy(t,g);Vs(t,y,g,g.$async)}function m(g){let y=e.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,Ze.stringify)(g)}:{ref:g}),w=e.name("valid"),b=t.subschema({schema:g,dataTypes:[],schemaPath:Ze.nil,topSchemaRef:y,errSchemaPath:r},w);t.mergeEvaluated(b),t.ok(w)}}};function wy(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Ze._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Ir.getValidate=wy;function Vs(t,e,r,n){let{gen:i,it:o}=t,{allErrors:s,schemaEnv:a,opts:l}=o,u=l.passContext?_n.default.this:Ze.nil;n?f():p();function f(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Ze._)`await ${(0,yy.callValidateCode)(t,e,u)}`),m(e),s||i.assign(g,!0)},y=>{i.if((0,Ze._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),d(y),s||i.assign(g,!1)}),t.ok(g)}function p(){t.result((0,yy.callValidateCode)(t,e,u),()=>m(e),()=>d(e))}function d(g){let y=(0,Ze._)`${g}.errors`;i.assign(_n.default.vErrors,(0,Ze._)`${_n.default.vErrors} === null ? ${y} : ${_n.default.vErrors}.concat(${y})`),i.assign(_n.default.errors,(0,Ze._)`${_n.default.vErrors}.length`)}function m(g){var y;if(!o.opts.unevaluated)return;let w=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(o.props=Os.mergeEvaluated.props(i,w.props,o.props));else{let b=i.var("props",(0,Ze._)`${g}.evaluated.props`);o.props=Os.mergeEvaluated.props(i,b,o.props,Ze.Name)}if(o.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(o.items=Os.mergeEvaluated.items(i,w.items,o.items));else{let b=i.var("items",(0,Ze._)`${g}.evaluated.items`);o.items=Os.mergeEvaluated.items(i,b,o.items,Ze.Name)}}}Ir.callRef=Vs;Ir.default=zk});var by=_(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});var Uk=gy(),Gk=Ls(),Jk=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Uk.default,Gk.default];Zu.default=Jk});var $y=_(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var js=Z(),or=js.operators,Ds={maximum:{okStr:"<=",ok:or.LTE,fail:or.GT},minimum:{okStr:">=",ok:or.GTE,fail:or.LT},exclusiveMaximum:{okStr:"<",ok:or.LT,fail:or.GTE},exclusiveMinimum:{okStr:">",ok:or.GT,fail:or.LTE}},Kk={message:({keyword:t,schemaCode:e})=>(0,js.str)`must be ${Ds[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,js._)`{comparison: ${Ds[t].okStr}, limit: ${e}}`},Yk={keyword:Object.keys(Ds),type:"number",schemaType:"number",$data:!0,error:Kk,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,js._)`${r} ${Ds[e].fail} ${n} || isNaN(${r})`)}};ec.default=Yk});var xy=_(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var Vi=Z(),Xk={message:({schemaCode:t})=>(0,Vi.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Vi._)`{multipleOf: ${t}}`},Qk={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Xk,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,s=e.let("res"),a=o?(0,Vi._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,Vi._)`${s} !== parseInt(${s})`;t.fail$data((0,Vi._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};tc.default=Qk});var Sy=_(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});function _y(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}rc.default=_y;_y.code='require("ajv/dist/runtime/ucs2length").default'});var ky=_(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var Rr=Z(),Zk=ne(),eC=Sy(),tC={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Rr.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Rr._)`{limit: ${t}}`},rC={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:tC,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?Rr.operators.GT:Rr.operators.LT,s=i.opts.unicode===!1?(0,Rr._)`${r}.length`:(0,Rr._)`${(0,Zk.useFunc)(t.gen,eC.default)}(${r})`;t.fail$data((0,Rr._)`${s} ${o} ${n}`)}};nc.default=rC});var Cy=_(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var nC=pt(),iC=ne(),Sn=Z(),oC={message:({schemaCode:t})=>(0,Sn.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Sn._)`{pattern: ${t}}`},sC={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:oC,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,Sn._)`new RegExp`:(0,iC.useFunc)(e,l),f=e.let("valid");e.try(()=>e.assign(f,(0,Sn._)`${u}(${o}, ${a}).test(${r})`),()=>e.assign(f,!1)),t.fail$data((0,Sn._)`!${f}`)}else{let l=(0,nC.usePattern)(t,i);t.fail$data((0,Sn._)`!${l}.test(${r})`)}}};ic.default=sC});var Ey=_(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});var Li=Z(),aC={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Li.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Li._)`{limit: ${t}}`},lC={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:aC,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?Li.operators.GT:Li.operators.LT;t.fail$data((0,Li._)`Object.keys(${r}).length ${i} ${n}`)}};oc.default=lC});var Py=_(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var ji=pt(),Di=Z(),uC=ne(),cC={message:({params:{missingProperty:t}})=>(0,Di.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Di._)`{missingProperty: ${t}}`},pC={keyword:"required",type:"object",schemaType:"array",$data:!0,error:cC,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():f(),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 w=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${y}" is not defined at "${w}" (strictRequired)`;(0,uC.checkStrictMode)(s,b,s.opts.strictRequired)}}function u(){if(l||o)t.block$data(Di.nil,p);else for(let m of r)(0,ji.checkReportMissingProp)(t,m)}function f(){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,ji.checkMissingProp)(t,r,m)),(0,ji.reportMissingProp)(t,m),e.else()}function p(){e.forOf("prop",n,m=>{t.setParams({missingProperty:m}),e.if((0,ji.noPropertyInData)(e,i,m,a.ownProperties),()=>t.error())})}function d(m,g){t.setParams({missingProperty:m}),e.forOf(m,n,()=>{e.assign(g,(0,ji.propertyInData)(e,i,m,a.ownProperties)),e.if((0,Di.not)(g),()=>{t.error(),e.break()})},Di.nil)}}};sc.default=pC});var Iy=_(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var qi=Z(),fC={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,qi.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,qi._)`{limit: ${t}}`},dC={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:fC,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?qi.operators.GT:qi.operators.LT;t.fail$data((0,qi._)`${r}.length ${i} ${n}`)}};ac.default=dC});var qs=_(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});var Ry=Tu();Ry.code='require("ajv/dist/runtime/equal").default';lc.default=Ry});var Ty=_(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var uc=ki(),Oe=Z(),hC=ne(),mC=qs(),gC={message:({params:{i:t,j:e}})=>(0,Oe.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Oe._)`{i: ${t}, j: ${e}}`},yC={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:gC,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,uc.getSchemaTypes)(o.items):[];t.block$data(l,f,(0,Oe._)`${s} === false`),t.ok(l);function f(){let g=e.let("i",(0,Oe._)`${r}.length`),y=e.let("j");t.setParams({i:g,j:y}),e.assign(l,!0),e.if((0,Oe._)`${g} > 1`,()=>(p()?d:m)(g,y))}function p(){return u.length>0&&!u.some(g=>g==="object"||g==="array")}function d(g,y){let w=e.name("item"),b=(0,uc.checkDataTypes)(u,w,a.opts.strictNumbers,uc.DataType.Wrong),M=e.const("indices",(0,Oe._)`{}`);e.for((0,Oe._)`;${g}--;`,()=>{e.let(w,(0,Oe._)`${r}[${g}]`),e.if(b,(0,Oe._)`continue`),u.length>1&&e.if((0,Oe._)`typeof ${w} == "string"`,(0,Oe._)`${w} += "_"`),e.if((0,Oe._)`typeof ${M}[${w}] == "number"`,()=>{e.assign(y,(0,Oe._)`${M}[${w}]`),t.error(),e.assign(l,!1).break()}).code((0,Oe._)`${M}[${w}] = ${g}`)})}function m(g,y){let w=(0,hC.useFunc)(e,mC.default),b=e.name("outer");e.label(b).for((0,Oe._)`;${g}--;`,()=>e.for((0,Oe._)`${y} = ${g}; ${y}--;`,()=>e.if((0,Oe._)`${w}(${r}[${g}], ${r}[${y}])`,()=>{t.error(),e.assign(l,!1).break(b)})))}}};cc.default=yC});var Ay=_(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});var pc=Z(),vC=ne(),wC=qs(),bC={message:"must be equal to constant",params:({schemaCode:t})=>(0,pc._)`{allowedValue: ${t}}`},$C={keyword:"const",$data:!0,error:bC,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,pc._)`!${(0,vC.useFunc)(e,wC.default)}(${r}, ${i})`):t.fail((0,pc._)`${o} !== ${r}`)}};fc.default=$C});var Ny=_(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var Fi=Z(),xC=ne(),_C=qs(),SC={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Fi._)`{allowedValues: ${t}}`},kC={keyword:"enum",schemaType:"array",$data:!0,error:SC,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,xC.useFunc)(e,_C.default)),f;if(a||n)f=e.let("valid"),t.block$data(f,p);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=e.const("vSchema",o);f=(0,Fi.or)(...i.map((g,y)=>d(m,y)))}t.pass(f);function p(){e.assign(f,!1),e.forOf("v",o,m=>e.if((0,Fi._)`${u()}(${r}, ${m})`,()=>e.assign(f,!0).break()))}function d(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,Fi._)`${u()}(${r}, ${m}[${g}])`:(0,Fi._)`${r} === ${y}`}}};dc.default=kC});var My=_(hc=>{"use strict";Object.defineProperty(hc,"__esModule",{value:!0});var CC=$y(),EC=xy(),PC=ky(),IC=Cy(),RC=Ey(),TC=Py(),AC=Iy(),NC=Ty(),MC=Ay(),OC=Ny(),VC=[CC.default,EC.default,PC.default,IC.default,RC.default,TC.default,AC.default,NC.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},MC.default,OC.default];hc.default=VC});var gc=_(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.validateAdditionalItems=void 0;var Tr=Z(),mc=ne(),LC={message:({params:{len:t}})=>(0,Tr.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Tr._)`{limit: ${t}}`},jC={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:LC,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,mc.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Oy(t,n)}};function Oy(t,e){let{gen:r,schema:n,data:i,keyword:o,it:s}=t;s.items=!0;let a=r.const("len",(0,Tr._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Tr._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,mc.alwaysValidSchema)(s,n)){let u=r.var("valid",(0,Tr._)`${a} <= ${e.length}`);r.if((0,Tr.not)(u),()=>l(u)),t.ok(u)}function l(u){r.forRange("i",e.length,a,f=>{t.subschema({keyword:o,dataProp:f,dataPropType:mc.Type.Num},u),s.allErrors||r.if((0,Tr.not)(u),()=>r.break())})}}Bi.validateAdditionalItems=Oy;Bi.default=jC});var yc=_(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.validateTuple=void 0;var Vy=Z(),Fs=ne(),DC=pt(),qC={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return Ly(t,"additionalItems",e);r.items=!0,!(0,Fs.alwaysValidSchema)(r,e)&&t.ok((0,DC.validateArray)(t))}};function Ly(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:s,it:a}=t;f(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Fs.mergeEvaluated.items(n,r.length,a.items));let l=n.name("valid"),u=n.const("len",(0,Vy._)`${o}.length`);r.forEach((p,d)=>{(0,Fs.alwaysValidSchema)(a,p)||(n.if((0,Vy._)`${u} > ${d}`,()=>t.subschema({keyword:s,schemaProp:d,dataProp:d},l)),t.ok(l))});function f(p){let{opts:d,errSchemaPath:m}=a,g=r.length,y=g===p.minItems&&(g===p.maxItems||p[e]===!1);if(d.strictTuples&&!y){let w=`"${s}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Fs.checkStrictMode)(a,w,d.strictTuples)}}}Hi.validateTuple=Ly;Hi.default=qC});var jy=_(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});var FC=yc(),BC={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,FC.validateTuple)(t,"items")};vc.default=BC});var qy=_(wc=>{"use strict";Object.defineProperty(wc,"__esModule",{value:!0});var Dy=Z(),HC=ne(),WC=pt(),zC=gc(),UC={message:({params:{len:t}})=>(0,Dy.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Dy._)`{limit: ${t}}`},GC={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:UC,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,HC.alwaysValidSchema)(n,e)&&(i?(0,zC.validateAdditionalItems)(t,i):t.ok((0,WC.validateArray)(t)))}};wc.default=GC});var Fy=_(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var dt=Z(),Bs=ne(),JC={message:({params:{min:t,max:e}})=>e===void 0?(0,dt.str)`must contain at least ${t} valid item(s)`:(0,dt.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,dt._)`{minContains: ${t}}`:(0,dt._)`{minContains: ${t}, maxContains: ${e}}`},KC={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:JC,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 f=e.const("len",(0,dt._)`${i}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,Bs.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Bs.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Bs.alwaysValidSchema)(o,r)){let y=(0,dt._)`${f} >= ${s}`;a!==void 0&&(y=(0,dt._)`${y} && ${f} <= ${a}`),t.pass(y);return}o.items=!0;let p=e.name("valid");a===void 0&&s===1?m(p,()=>e.if(p,()=>e.break())):s===0?(e.let(p,!0),a!==void 0&&e.if((0,dt._)`${i}.length > 0`,d)):(e.let(p,!1),d()),t.result(p,()=>t.reset());function d(){let y=e.name("_valid"),w=e.let("count",0);m(y,()=>e.if(y,()=>g(w)))}function m(y,w){e.forRange("i",0,f,b=>{t.subschema({keyword:"contains",dataProp:b,dataPropType:Bs.Type.Num,compositeRule:!0},y),w()})}function g(y){e.code((0,dt._)`${y}++`),a===void 0?e.if((0,dt._)`${y} >= ${s}`,()=>e.assign(p,!0).break()):(e.if((0,dt._)`${y} > ${a}`,()=>e.assign(p,!1).break()),s===1?e.assign(p,!0):e.if((0,dt._)`${y} >= ${s}`,()=>e.assign(p,!0)))}}};bc.default=KC});var Hs=_(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.validateSchemaDeps=It.validatePropertyDeps=It.error=void 0;var $c=Z(),YC=ne(),Wi=pt();It.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,$c.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,$c._)`{property: ${t},
|
|
392
392
|
missingProperty: ${n},
|
|
393
393
|
depsCount: ${e},
|
|
394
|
-
deps: ${r}}`};var GC={keyword:"dependencies",type:"object",schemaType:"object",error:It.error,code(t){let[e,r]=JC(t);Fy(t,e),By(t,r)}};function JC({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 Fy(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,Bi.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,Bi.checkReportMissingProp)(t,u)}):(r.if((0,bc._)`${l} && (${(0,Bi.checkMissingProp)(t,a,o)})`),(0,Bi.reportMissingProp)(t,o),r.else())}}It.validatePropertyDeps=Fy;function By(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,s=r.name("valid");for(let a in e)(0,UC.alwaysValidSchema)(o,e[a])||(r.if((0,Bi.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))}It.validateSchemaDeps=By;It.default=GC});var Wy=x($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});var Hy=Z(),KC=ne(),YC={message:"property name must be valid",params:({params:t})=>(0,Hy._)`{propertyName: ${t.propertyName}}`},XC={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:YC,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,KC.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,Hy.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};$c.default=XC});var xc=x(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var Hs=pt(),_t=Z(),QC=ct(),Ws=ne(),ZC={message:"must NOT have additional properties",params:({params:t})=>(0,_t._)`{additionalProperty: ${t.additionalProperty}}`},eE={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:ZC,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,Hs.allSchemaProperties)(n.properties),f=(0,Hs.allSchemaProperties)(n.patternProperties);p(),t.ok((0,_t._)`${o} === ${QC.default.errors}`);function p(){e.forIn("key",i,b=>{!u.length&&!f.length?g(b):e.if(d(b),()=>g(b))})}function d(b){let v;if(u.length>8){let M=(0,Ws.schemaRefOrVal)(s,n.properties,"properties");v=(0,Hs.isOwnProperty)(e,M,b)}else u.length?v=(0,_t.or)(...u.map(M=>(0,_t._)`${b} === ${M}`)):v=_t.nil;return f.length&&(v=(0,_t.or)(v,...f.map(M=>(0,_t._)`${(0,Hs.usePattern)(t,M)}.test(${b})`))),(0,_t.not)(v)}function m(b){e.code((0,_t._)`delete ${i}[${b}]`)}function g(b){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){m(b);return}if(r===!1){t.setParams({additionalProperty:b}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,Ws.alwaysValidSchema)(s,r)){let v=e.name("valid");l.removeAdditional==="failing"?(y(b,v,!1),e.if((0,_t.not)(v),()=>{t.reset(),m(b)})):(y(b,v),a||e.if((0,_t.not)(v),()=>e.break()))}}function y(b,v,M){let C={keyword:"additionalProperties",dataProp:b,dataPropType:Ws.Type.Str};M===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(C,v)}}};_c.default=eE});var Gy=x(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});var tE=Ei(),zy=pt(),Sc=ne(),Uy=xc(),rE={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&&Uy.default.code(new tE.KeywordCxt(o,Uy.default,"additionalProperties"));let s=(0,zy.allSchemaProperties)(r);for(let p of s)o.definedProperties.add(p);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=Sc.mergeEvaluated.props(e,(0,Sc.toHash)(s),o.props));let a=s.filter(p=>!(0,Sc.alwaysValidSchema)(o,r[p]));if(a.length===0)return;let l=e.name("valid");for(let p of a)u(p)?f(p):(e.if((0,zy.propertyInData)(e,i,p,o.opts.ownProperties)),f(p),o.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(l);function u(p){return o.opts.useDefaults&&!o.compositeRule&&r[p].default!==void 0}function f(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},l)}}};kc.default=rE});var Xy=x(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});var Jy=pt(),zs=Z(),Ky=ne(),Yy=ne(),nE={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,Jy.allSchemaProperties)(r),l=a.filter(y=>(0,Ky.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,f=e.name("valid");o.props!==!0&&!(o.props instanceof zs.Name)&&(o.props=(0,Yy.evaluatedPropsToName)(e,o.props));let{props:p}=o;d();function d(){for(let y of a)u&&m(y),o.allErrors?g(y):(e.var(f,!0),g(y),e.if(f))}function m(y){for(let b in u)new RegExp(y).test(b)&&(0,Ky.checkStrictMode)(o,`property ${b} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){e.forIn("key",n,b=>{e.if((0,zs._)`${(0,Jy.usePattern)(t,y)}.test(${b})`,()=>{let v=l.includes(y);v||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:b,dataPropType:Yy.Type.Str},f),o.opts.unevaluated&&p!==!0?e.assign((0,zs._)`${p}[${b}]`,!0):!v&&!o.allErrors&&e.if((0,zs.not)(f),()=>e.break())})})}}};Cc.default=nE});var Qy=x(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var iE=ne(),oE={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,iE.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"}};Ec.default=oE});var Zy=x(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var sE=pt(),aE={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:sE.validateUnion,error:{message:"must match a schema in anyOf"}};Pc.default=aE});var ev=x(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var Us=Z(),lE=ne(),uE={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Us._)`{passingSchemas: ${t.passing}}`},cE={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:uE,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((f,p)=>{let d;(0,lE.alwaysValidSchema)(i,f)?e.var(l,!0):d=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},l),p>0&&e.if((0,Us._)`${l} && ${s}`).assign(s,!1).assign(a,(0,Us._)`[${a}, ${p}]`).else(),e.if(l,()=>{e.assign(s,!0),e.assign(a,p),d&&t.mergeEvaluated(d,Us.Name)})})}}};Ic.default=cE});var tv=x(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var pE=ne(),fE={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,pE.alwaysValidSchema)(n,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};Rc.default=fE});var iv=x(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});var Gs=Z(),nv=ne(),dE={message:({params:t})=>(0,Gs.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Gs._)`{failingKeyword: ${t.ifClause}}`},hE={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:dE,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,nv.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=rv(n,"then"),o=rv(n,"else");if(!i&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(l(),t.reset(),i&&o){let f=e.let("ifClause");t.setParams({ifClause:f}),e.if(a,u("then",f),u("else",f))}else i?e.if(a,u("then")):e.if((0,Gs.not)(a),u("else"));t.pass(s,()=>t.error(!0));function l(){let f=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(f)}function u(f,p){return()=>{let d=t.subschema({keyword:f},a);e.assign(s,a),t.mergeValidEvaluated(d,s),p?e.assign(p,(0,Gs._)`${f}`):t.setParams({ifClause:f})}}}};function rv(t,e){let r=t.schema[e];return r!==void 0&&!(0,nv.alwaysValidSchema)(t,r)}Tc.default=hE});var ov=x(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var mE=ne(),gE={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,mE.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Ac.default=gE});var sv=x(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var yE=mc(),vE=Ly(),wE=gc(),bE=Dy(),$E=qy(),_E=Bs(),xE=Wy(),SE=xc(),kE=Gy(),CE=Xy(),EE=Qy(),PE=Zy(),IE=ev(),RE=tv(),TE=iv(),AE=ov();function NE(t=!1){let e=[EE.default,PE.default,IE.default,RE.default,TE.default,AE.default,xE.default,SE.default,_E.default,kE.default,CE.default];return t?e.push(vE.default,bE.default):e.push(yE.default,wE.default),e.push($E.default),e}Nc.default=NE});var Oc=x(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.dynamicAnchor=void 0;var Mc=Z(),ME=ct(),av=Ii(),OE=Vs(),VE={keyword:"$dynamicAnchor",schemaType:"string",code:t=>lv(t,t.schema)};function lv(t,e){let{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,Mc._)`${ME.default.dynamicAnchors}${(0,Mc.getProperty)(e)}`,o=n.errSchemaPath==="#"?n.validateName:LE(t);r.if((0,Mc._)`!${i}`,()=>r.assign(i,o))}Hi.dynamicAnchor=lv;function LE(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 av.SchemaEnv({schema:r,schemaId:l,root:i,baseId:o,localRefs:s,meta:a});return av.compileSchema.call(n,u),(0,OE.getValidate)(t,u)}Hi.default=VE});var Vc=x(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.dynamicRef=void 0;var uv=Z(),jE=ct(),cv=Vs(),DE={keyword:"$dynamicRef",schemaType:"string",code:t=>pv(t,t.schema)};function pv(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,uv._)`${jE.default.dynamicAnchors}${(0,uv.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,cv.callRef)(t,l),r.let(u,!0)}):()=>(0,cv.callRef)(t,l)}}Wi.dynamicRef=pv;Wi.default=DE});var fv=x(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});var qE=Oc(),FE=ne(),BE={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,qE.dynamicAnchor)(t,""):(0,FE.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};Lc.default=BE});var dv=x(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});var HE=Vc(),WE={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,HE.dynamicRef)(t,t.schema)};jc.default=WE});var hv=x(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var zE=Oc(),UE=Vc(),GE=fv(),JE=dv(),KE=[zE.default,UE.default,GE.default,JE.default];Dc.default=KE});var gv=x(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var mv=Bs(),YE={keyword:"dependentRequired",type:"object",schemaType:"object",error:mv.error,code:t=>(0,mv.validatePropertyDeps)(t)};qc.default=YE});var yv=x(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var XE=Bs(),QE={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,XE.validateSchemaDeps)(t)};Fc.default=QE});var vv=x(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var ZE=ne(),eP={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,ZE.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};Bc.default=eP});var wv=x(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var tP=gv(),rP=yv(),nP=vv(),iP=[tP.default,rP.default,nP.default];Hc.default=iP});var $v=x(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var sr=Z(),bv=ne(),oP=ct(),sP={message:"must NOT have unevaluated properties",params:({params:t})=>(0,sr._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},aP={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:sP,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 sr.Name?e.if((0,sr._)`${a} !== true`,()=>e.forIn("key",n,p=>e.if(u(a,p),()=>l(p)))):a!==!0&&e.forIn("key",n,p=>a===void 0?l(p):e.if(f(a,p),()=>l(p))),o.props=!0,t.ok((0,sr._)`${i} === ${oP.default.errors}`);function l(p){if(r===!1){t.setParams({unevaluatedProperty:p}),t.error(),s||e.break();return}if(!(0,bv.alwaysValidSchema)(o,r)){let d=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:p,dataPropType:bv.Type.Str},d),s||e.if((0,sr.not)(d),()=>e.break())}}function u(p,d){return(0,sr._)`!${p} || !${p}[${d}]`}function f(p,d){let m=[];for(let g in p)p[g]===!0&&m.push((0,sr._)`${d} !== ${g}`);return(0,sr.and)(...m)}}};Wc.default=aP});var xv=x(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var Ar=Z(),_v=ne(),lP={message:({params:{len:t}})=>(0,Ar.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Ar._)`{limit: ${t}}`},uP={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:lP,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,Ar._)`${n}.length`);if(r===!1)t.setParams({len:o}),t.fail((0,Ar._)`${s} > ${o}`);else if(typeof r=="object"&&!(0,_v.alwaysValidSchema)(i,r)){let l=e.var("valid",(0,Ar._)`${s} <= ${o}`);e.if((0,Ar.not)(l),()=>a(l,o)),t.ok(l)}i.items=!0;function a(l,u){e.forRange("i",u,s,f=>{t.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:_v.Type.Num},l),i.allErrors||e.if((0,Ar.not)(l),()=>e.break())})}}};zc.default=uP});var Sv=x(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var cP=$v(),pP=xv(),fP=[cP.default,pP.default];Uc.default=fP});var kv=x(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});var ke=Z(),dP={message:({schemaCode:t})=>(0,ke.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,ke._)`{format: ${t}}`},hP={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:dP,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:l,errSchemaPath:u,schemaEnv:f,self:p}=a;if(!l.validateFormats)return;i?d():m();function d(){let g=r.scopeValue("formats",{ref:p.formats,code:l.code.formats}),y=r.const("fDef",(0,ke._)`${g}[${s}]`),b=r.let("fType"),v=r.let("format");r.if((0,ke._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(b,(0,ke._)`${y}.type || "string"`).assign(v,(0,ke._)`${y}.validate`),()=>r.assign(b,(0,ke._)`"string"`).assign(v,y)),t.fail$data((0,ke.or)(M(),C()));function M(){return l.strictSchema===!1?ke.nil:(0,ke._)`${s} && !${v}`}function C(){let R=f.$async?(0,ke._)`(${y}.async ? await ${v}(${n}) : ${v}(${n}))`:(0,ke._)`${v}(${n})`,A=(0,ke._)`(typeof ${v} == "function" ? ${R} : ${v}.test(${n}))`;return(0,ke._)`${v} && ${v} !== true && ${b} === ${e} && !${A}`}}function m(){let g=p.formats[o];if(!g){M();return}if(g===!0)return;let[y,b,v]=C(g);y===e&&t.pass(R());function M(){if(l.strictSchema===!1){p.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function C(A){let V=A instanceof RegExp?(0,ke.regexpCode)(A):l.code.formats?(0,ke._)`${l.code.formats}${(0,ke.getProperty)(o)}`:void 0,W=r.scopeValue("formats",{key:o,ref:A,code:V});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,ke._)`${W}.validate`]:["string",A,W]}function R(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,ke._)`await ${v}(${n})`}return typeof b=="function"?(0,ke._)`${v}(${n})`:(0,ke._)`${v}.test(${n})`}}}};Gc.default=hP});var Cv=x(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var mP=kv(),gP=[mP.default];Jc.default=gP});var Ev=x(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.contentVocabulary=kn.metadataVocabulary=void 0;kn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];kn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Iv=x(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var yP=wy(),vP=Ny(),wP=sv(),bP=hv(),$P=wv(),_P=Sv(),xP=Cv(),Pv=Ev(),SP=[bP.default,yP.default,vP.default,(0,wP.default)(!0),xP.default,Pv.metadataVocabulary,Pv.contentVocabulary,$P.default,_P.default];Kc.default=SP});var Tv=x(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Js.DiscrError=void 0;var Rv;(function(t){t.Tag="tag",t.Mapping="mapping"})(Rv||(Js.DiscrError=Rv={}))});var Nv=x(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var Cn=Z(),Yc=Tv(),Av=Ii(),kP=Pi(),CP=ne(),EP={message:({params:{discrError:t,tagName:e}})=>t===Yc.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Cn._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},PP={keyword:"discriminator",type:"object",schemaType:"object",error:EP,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,Cn._)`${r}${(0,Cn.getProperty)(a)}`);e.if((0,Cn._)`typeof ${u} == "string"`,()=>f(),()=>t.error(!1,{discrError:Yc.DiscrError.Tag,tag:u,tagName:a})),t.ok(l);function f(){let m=d();e.if(!1);for(let g in m)e.elseIf((0,Cn._)`${u} === ${g}`),e.assign(l,p(m[g]));e.else(),t.error(!1,{discrError:Yc.DiscrError.Mapping,tag:u,tagName:a}),e.endIf()}function p(m){let g=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:m},g);return t.mergeEvaluated(y,Cn.Name),g}function d(){var m;let g={},y=v(i),b=!0;for(let R=0;R<s.length;R++){let A=s[R];if(A?.$ref&&!(0,CP.schemaHasRulesButRef)(A,o.self.RULES)){let W=A.$ref;if(A=Av.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,W),A instanceof Av.SchemaEnv&&(A=A.schema),A===void 0)throw new kP.default(o.opts.uriResolver,o.baseId,W)}let V=(m=A?.properties)===null||m===void 0?void 0:m[a];if(typeof V!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);b=b&&(y||v(A)),M(V,R)}if(!b)throw new Error(`discriminator: "${a}" must be required`);return g;function v({required:R}){return Array.isArray(R)&&R.includes(a)}function M(R,A){if(R.const)C(R.const,A);else if(R.enum)for(let V of R.enum)C(V,A);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function C(R,A){if(typeof R!="string"||R in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[R]=A}}}};Xc.default=PP});var Mv=x((qM,IP)=>{IP.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 Ov=x((FM,RP)=>{RP.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 Vv=x((BM,TP)=>{TP.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 Lv=x((HM,AP)=>{AP.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 jv=x((WM,NP)=>{NP.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 Dv=x((zM,MP)=>{MP.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 qv=x((UM,OP)=>{OP.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 Fv=x((GM,VP)=>{VP.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 Bv=x(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});var LP=Mv(),jP=Ov(),DP=Vv(),qP=Lv(),FP=jv(),BP=Dv(),HP=qv(),WP=Fv(),zP=["/properties"];function UP(t){return[LP,jP,DP,qP,FP,e(this,BP),HP,e(this,WP)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,zP):n}}Qc.default=UP});var Hv=x((ve,ep)=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.MissingRefError=ve.ValidationError=ve.CodeGen=ve.Name=ve.nil=ve.stringify=ve.str=ve._=ve.KeywordCxt=ve.Ajv2020=void 0;var GP=hy(),JP=Iv(),KP=Nv(),YP=Bv(),Zc="https://json-schema.org/draft/2020-12/schema",En=class extends GP.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),JP.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(KP.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(YP.default.call(this,e),this.refs["http://json-schema.org/schema"]=Zc)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Zc)?Zc:void 0)}};ve.Ajv2020=En;ep.exports=ve=En;ep.exports.Ajv2020=En;Object.defineProperty(ve,"__esModule",{value:!0});ve.default=En;var XP=Ei();Object.defineProperty(ve,"KeywordCxt",{enumerable:!0,get:function(){return XP.KeywordCxt}});var Pn=Z();Object.defineProperty(ve,"_",{enumerable:!0,get:function(){return Pn._}});Object.defineProperty(ve,"str",{enumerable:!0,get:function(){return Pn.str}});Object.defineProperty(ve,"stringify",{enumerable:!0,get:function(){return Pn.stringify}});Object.defineProperty(ve,"nil",{enumerable:!0,get:function(){return Pn.nil}});Object.defineProperty(ve,"Name",{enumerable:!0,get:function(){return Pn.Name}});Object.defineProperty(ve,"CodeGen",{enumerable:!0,get:function(){return Pn.CodeGen}});var QP=Ps();Object.defineProperty(ve,"ValidationError",{enumerable:!0,get:function(){return QP.default}});var ZP=Pi();Object.defineProperty(ve,"MissingRefError",{enumerable:!0,get:function(){return ZP.default}})});Ot();Go();Vt();ri();import{transform as oI}from"esbuild";import{resolve as Nr}from"node:path";import{resolve as nI}from"node:path";import{readFile as jm}from"node:fs/promises";import{basename as d2,relative as Dm,resolve as qm}from"node:path";mt();import{dirname as Im,resolve as Rm}from"node:path";import j from"typescript";import{readFileSync as Qx}from"node:fs";import{resolve as Zx}from"node:path";import ce from"typescript";function Gl(t,e){let r=new Map;for(let n of t.statements){if(!ce.isImportDeclaration(n)||!n.importClause?.namedBindings||!ce.isStringLiteral(n.moduleSpecifier)||!ce.isNamedImports(n.importClause.namedBindings))continue;let i=n.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=Zx(e,i);for(let s of n.importClause.namedBindings.elements)r.set(s.name.text,o)}return r}function e2(t){if(ce.isObjectBindingPattern(t.name)){let e=[];for(let r of t.name.elements)ce.isBindingElement(r)&&ce.isIdentifier(r.name)&&e.push(r.name.text);return e}return ce.isIdentifier(t.name)?[t.name.text]:[]}function t2(t){if(!ce.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!ce.isBindingElement(e)||!ce.isIdentifier(e.name)?null:e.name.text}function r2(t){if(ce.isParenthesizedExpression(t))return t.expression;if(ce.isJsxElement(t)||ce.isJsxSelfClosingElement(t)||ce.isJsxFragment(t))return t;if(ce.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let r=t.statements[e];if(ce.isReturnStatement(r)&&r.expression)return ce.isParenthesizedExpression(r.expression)?r.expression.expression:r.expression}return null}function Em(t){if(!ce.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!ce.isArrowFunction(e)&&!ce.isFunctionExpression(e))return null;let r="__noop",n=[];if(e.parameters.length===1){let s=t2(e.parameters[0]);if(n=e2(e.parameters[0]),s)r=s;else if(ce.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=r2(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 Jl(t,e){let r=null;function n(i){if(ce.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!ce.isIdentifier(o.name)||o.name.text!==e||!o.initializer||!ce.isCallExpression(o.initializer))continue;let s=Em(o.initializer);s&&(r=s)}if(ce.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&ce.isCallExpression(i.expression)){let o=Em(i.expression);o&&e==="default"&&(r=o)}ce.forEachChild(i,n)}return n(t),r}function Pm(t,e){let r=Qx(t,"utf-8"),n=ce.createSourceFile(t,r,ce.ScriptTarget.Latest,!0,ce.ScriptKind.TSX);return Jl(n,e)}function n2(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 Kl(t){return t.join(".")}function fn(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function Xl(t){if(j.isIdentifier(t))return[t.text];if(j.isPropertyAccessExpression(t)){let e=Xl(t.expression);return e?[...e,t.name.text]:null}return null}function Tm(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 pi(t,e){let r=Xl(t);if(!r)return null;if(r[0]in e.propBindings)return Tm(e.propBindings[r[0]],r.slice(1));if(r[0]===e.vmName)return{kind:"binding",path:Kl(r.slice(1))};let n=e.scopes[e.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:Kl(r.slice(1)),scope:n}:null}function i2(t,e){let r,n={};for(let i of t.properties){if(!j.isPropertyAssignment(i)||!j.isIdentifier(i.name))continue;let o=i.name.text;if(o==="name"&&j.isStringLiteral(i.initializer)){r=i.initializer.text;continue}if(o==="params"&&j.isObjectLiteralExpression(i.initializer))for(let s of i.initializer.properties){if(!j.isPropertyAssignment(s)||!j.isIdentifier(s.name))continue;let a=hs(s.initializer,e);a!==null?n[s.name.text]=a:e.errors.push(`Unsupported action param expression for "${s.name.text}": ${fn(s.initializer)}`)}}return r?Object.keys(n).length>0?{kind:"action",name:r,params:n}:{kind:"action",name:r}:null}function hs(t,e){if(j.isStringLiteral(t)||j.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===j.SyntaxKind.TrueKeyword)return!0;if(t.kind===j.SyntaxKind.FalseKeyword)return!1;if(j.isNumericLiteral(t))return Number(t.text);if(t.kind===j.SyntaxKind.NullKeyword)return null;if(j.isTemplateExpression(t)){let n=[];t.head.text&&n.push(t.head.text);for(let i of t.templateSpans){let o=pi(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=pi(t,e);if(r)return r;if(j.isObjectLiteralExpression(t)){let n=i2(t,e);if(n)return n;let i={};for(let o of t.properties){if(!j.isPropertyAssignment(o)||!j.isIdentifier(o.name))continue;let s=hs(o.initializer,e);s!==null?i[o.name.text]=s:e.errors.push(`Unsupported object literal property "${o.name.text}": ${fn(o.initializer)}`)}return{kind:"literal",value:i}}if(j.isArrayLiteralExpression(t)){let n=[];for(let i of t.elements){if(!j.isExpression(i))continue;let o=hs(i,e);o!==null?n.push(o):e.errors.push(`Unsupported array element expression: ${fn(i)}`)}return n}return null}function o2(t){return j.isIdentifier(t)?t.text:j.isPropertyAccessExpression(t)&&j.isIdentifier(t.name)?t.name.text:null}function Am(t){return t.getText()}function Yl(t,e){let r=[];for(let n of t){if(j.isJsxText(n)){let i=n.getText().trim();i&&r.push({kind:"text",value:i});continue}if(j.isJsxExpression(n)&&n.expression){let i=pi(n.expression,e);if(i){r.push(i);continue}let o=Nm(n.expression,e);o?Array.isArray(o)?r.push(...o):r.push(o):e.errors.push(`Unsupported JSX child expression: ${fn(n.expression)}`);continue}if(j.isJsxElement(n)||j.isJsxSelfClosingElement(n)){let i=fi(n,e);i&&r.push(i)}}return r}function s2(t,e){if(t.length===0)return null;let r=t[0];return r in e.propBindings?Tm(e.propBindings[r],t.slice(1)):r===e.vmName?{kind:"binding",path:Kl(t.slice(1))}:null}function Nm(t,e){if(j.isParenthesizedExpression(t))return Nm(t.expression,e);if(j.isCallExpression(t)&&j.isPropertyAccessExpression(t.expression)){let n=Xl(t.expression.expression),i=t.expression.name.text;if(n&&i==="map"&&t.arguments.length>=1){let o=s2(n,e);if(!o)return null;let s=t.arguments[0];if(!j.isArrowFunction(s)&&!j.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!j.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]},f=null,p=j.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(j.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(j.isJsxElement(p)||j.isJsxSelfClosingElement(p)?f=fi(p,u):j.isJsxFragment(p)&&(f=Ql(p,u)),!f)return null;let d;if(j.isJsxElement(p)||j.isJsxSelfClosingElement(p)){let m=j.isJsxElement(p)?p.openingElement.attributes:p.attributes;for(let g of m.properties)if(!(!j.isJsxAttribute(g)||Am(g.name)!=="key"||!g.initializer)&&j.isJsxExpression(g.initializer)&&g.initializer.expression){let y=pi(g.initializer.expression,u);y&&(d=y)}}return{kind:"map",source:o,item:l,key:d,body:f}}}if(j.isJsxElement(t)||j.isJsxSelfClosingElement(t))return fi(t,e);let r=pi(t,e);return r||null}function Ql(t,e){return{kind:"fragment",children:Yl(t.children,e)}}function a2(t,e,r){let n=r.viewImports.get(t);return n?Pm(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 fi(t,e){let r=j.isJsxElement(t)?t.openingElement:t,n=o2(r.tagName);if(!n)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let l of r.attributes.properties){if(!j.isJsxAttribute(l))continue;let u=Am(l.name);if(u!=="key"){if(!l.initializer){i[u]=!0;continue}if(j.isStringLiteral(l.initializer)){i[u]=l.initializer.text;continue}if(j.isJsxExpression(l.initializer)&&l.initializer.expression){let f=hs(l.initializer.expression,e);f!==null?i[u]=f:e.errors.push(`Unsupported JSX prop expression for "${u}" on <${n}>: ${fn(l.initializer.expression)}`)}}}if(!e.allowedComponents.has(n)){let l=a2(n,i,e);return l||(e.errors.push(`Component "${n}" is not in the allowed registry`),null)}n2(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]},f=j.isJsxElement(t)?Yl(t.children,u):[];return{kind:"map",source:l,item:s,body:{kind:"component",name:n,props:i,children:f}}}let a=j.isJsxElement(t)?Yl(t.children,o):[];return{kind:"component",name:n,props:i,children:a}}function l2(t){let e=null;function r(n){if(j.isCallExpression(n)&&j.isIdentifier(n.expression)&&n.expression.text==="screen"&&n.arguments.length===1&&(j.isArrowFunction(n.arguments[0])||j.isFunctionExpression(n.arguments[0]))){let i=n.arguments[0],o="unknown";if(n.typeArguments&&n.typeArguments.length===1){let a=n.typeArguments[0];j.isTypeReferenceNode(a)&&j.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(j.isParenthesizedExpression(s))(j.isJsxElement(s.expression)||j.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(j.isJsxElement(s)||j.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(j.isBlock(s)&&s.statements.length===1){let a=s.statements[0];j.isReturnStatement(a)&&a.expression&&(j.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}j.forEachChild(n,r)}return r(t),e}function Mm(t,e,r,n={}){let i=new Set(st);for(let p of n.allowlistExtra??[])i.add(p);let o=Rm(e),s=Im(o),a=j.createSourceFile(o,t,j.ScriptTarget.Latest,!0,j.ScriptKind.TSX),l={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Gl(a,s),allowedComponents:i},u=l2(a);if(!u)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let f=j.isJsxElement(u.jsxRoot)||j.isJsxSelfClosingElement(u.jsxRoot)?fi(u.jsxRoot,l):j.isJsxFragment(u.jsxRoot)?Ql(u.jsxRoot,l):null;return f?{viewModel:u.viewModel,exportName:r,root:f,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 u2(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 j.isJsxElement(t.jsxRoot)||j.isJsxSelfClosingElement(t.jsxRoot)?fi(t.jsxRoot,n):j.isJsxFragment(t.jsxRoot)?Ql(t.jsxRoot,n):j.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):j.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${fn(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${j.SyntaxKind[t.jsxRoot.kind]}`),null)}function Om(t,e,r,n={}){let i=new Set(st);for(let p of n.allowlistExtra??[])i.add(p);let o=Rm(e),s=Im(o),a=j.createSourceFile(o,t,j.ScriptTarget.Latest,!0,j.ScriptKind.TSX),l=Jl(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 f=u2(l,u);return f?{exportName:r,propsType:l.propsType,propNames:l.propNames,root:f,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 Zl(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 Vm(t){return`${t.sourcePath}:${t.name}`}mt();var c2=new Set(["swiftui","compose"]),p2=new Set(["action"]);function f2(t,e){return!st.has(t)&&t in e.extensions}function eu(t){return t?` (${t})`:""}function ms(t,e,r={}){let n=[],i=[],o=r.targets??[],s=o.some(l=>c2.has(l)),a=l=>{if(l.kind!=="viewRef"){if(l.kind==="component"){if(!st.has(l.name)&&!(l.name in e.extensions))n.push(`Extension component "${l.name}" is not registered in extensions.yaml${eu(r.source)}`);else if(f2(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(", ")}${eu(r.source)}`);for(let f of Object.keys(l.props))f in u.properties||p2.has(f)||n.push(`Extension "${l.name}" does not accept property "${f}"${eu(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 Lm(t,e,r,n,i){let o=[],s=[],a=ms(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=ms(e[l],r,{targets:n,source:i.partials[l]});o.push(...u.errors),s.push(...u.warnings)}return{errors:o,warnings:s}}async function h2(t,e,r){let n=await jm(t,"utf-8"),i=Om(n,t,e,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
|
|
394
|
+
deps: ${r}}`};var XC={keyword:"dependencies",type:"object",schemaType:"object",error:It.error,code(t){let[e,r]=QC(t);By(t,e),Hy(t,r)}};function QC({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 By(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,Wi.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,Wi.checkReportMissingProp)(t,u)}):(r.if((0,$c._)`${l} && (${(0,Wi.checkMissingProp)(t,a,o)})`),(0,Wi.reportMissingProp)(t,o),r.else())}}It.validatePropertyDeps=By;function Hy(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,s=r.name("valid");for(let a in e)(0,YC.alwaysValidSchema)(o,e[a])||(r.if((0,Wi.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))}It.validateSchemaDeps=Hy;It.default=XC});var zy=_(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});var Wy=Z(),ZC=ne(),eE={message:"property name must be valid",params:({params:t})=>(0,Wy._)`{propertyName: ${t.propertyName}}`},tE={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:eE,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,ZC.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,Wy.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};xc.default=tE});var Sc=_(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});var Ws=pt(),xt=Z(),rE=ct(),zs=ne(),nE={message:"must NOT have additional properties",params:({params:t})=>(0,xt._)`{additionalProperty: ${t.additionalProperty}}`},iE={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:nE,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,zs.alwaysValidSchema)(s,r))return;let u=(0,Ws.allSchemaProperties)(n.properties),f=(0,Ws.allSchemaProperties)(n.patternProperties);p(),t.ok((0,xt._)`${o} === ${rE.default.errors}`);function p(){e.forIn("key",i,w=>{!u.length&&!f.length?g(w):e.if(d(w),()=>g(w))})}function d(w){let b;if(u.length>8){let M=(0,zs.schemaRefOrVal)(s,n.properties,"properties");b=(0,Ws.isOwnProperty)(e,M,w)}else u.length?b=(0,xt.or)(...u.map(M=>(0,xt._)`${w} === ${M}`)):b=xt.nil;return f.length&&(b=(0,xt.or)(b,...f.map(M=>(0,xt._)`${(0,Ws.usePattern)(t,M)}.test(${w})`))),(0,xt.not)(b)}function m(w){e.code((0,xt._)`delete ${i}[${w}]`)}function g(w){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){m(w);return}if(r===!1){t.setParams({additionalProperty:w}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0,zs.alwaysValidSchema)(s,r)){let b=e.name("valid");l.removeAdditional==="failing"?(y(w,b,!1),e.if((0,xt.not)(b),()=>{t.reset(),m(w)})):(y(w,b),a||e.if((0,xt.not)(b),()=>e.break()))}}function y(w,b,M){let k={keyword:"additionalProperties",dataProp:w,dataPropType:zs.Type.Str};M===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(k,b)}}};_c.default=iE});var Jy=_(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});var oE=Ii(),Uy=pt(),kc=ne(),Gy=Sc(),sE={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&&Gy.default.code(new oE.KeywordCxt(o,Gy.default,"additionalProperties"));let s=(0,Uy.allSchemaProperties)(r);for(let p of s)o.definedProperties.add(p);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=kc.mergeEvaluated.props(e,(0,kc.toHash)(s),o.props));let a=s.filter(p=>!(0,kc.alwaysValidSchema)(o,r[p]));if(a.length===0)return;let l=e.name("valid");for(let p of a)u(p)?f(p):(e.if((0,Uy.propertyInData)(e,i,p,o.opts.ownProperties)),f(p),o.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(l);function u(p){return o.opts.useDefaults&&!o.compositeRule&&r[p].default!==void 0}function f(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},l)}}};Cc.default=sE});var Qy=_(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var Ky=pt(),Us=Z(),Yy=ne(),Xy=ne(),aE={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,Ky.allSchemaProperties)(r),l=a.filter(y=>(0,Yy.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,f=e.name("valid");o.props!==!0&&!(o.props instanceof Us.Name)&&(o.props=(0,Xy.evaluatedPropsToName)(e,o.props));let{props:p}=o;d();function d(){for(let y of a)u&&m(y),o.allErrors?g(y):(e.var(f,!0),g(y),e.if(f))}function m(y){for(let w in u)new RegExp(y).test(w)&&(0,Yy.checkStrictMode)(o,`property ${w} matches pattern ${y} (use allowMatchingProperties)`)}function g(y){e.forIn("key",n,w=>{e.if((0,Us._)`${(0,Ky.usePattern)(t,y)}.test(${w})`,()=>{let b=l.includes(y);b||t.subschema({keyword:"patternProperties",schemaProp:y,dataProp:w,dataPropType:Xy.Type.Str},f),o.opts.unevaluated&&p!==!0?e.assign((0,Us._)`${p}[${w}]`,!0):!b&&!o.allErrors&&e.if((0,Us.not)(f),()=>e.break())})})}}};Ec.default=aE});var Zy=_(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var lE=ne(),uE={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,lE.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"}};Pc.default=uE});var ev=_(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});var cE=pt(),pE={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:cE.validateUnion,error:{message:"must match a schema in anyOf"}};Ic.default=pE});var tv=_(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var Gs=Z(),fE=ne(),dE={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Gs._)`{passingSchemas: ${t.passing}}`},hE={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:dE,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((f,p)=>{let d;(0,fE.alwaysValidSchema)(i,f)?e.var(l,!0):d=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},l),p>0&&e.if((0,Gs._)`${l} && ${s}`).assign(s,!1).assign(a,(0,Gs._)`[${a}, ${p}]`).else(),e.if(l,()=>{e.assign(s,!0),e.assign(a,p),d&&t.mergeEvaluated(d,Gs.Name)})})}}};Rc.default=hE});var rv=_(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});var mE=ne(),gE={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,mE.alwaysValidSchema)(n,o))return;let a=t.subschema({keyword:"allOf",schemaProp:s},i);t.ok(i),t.mergeEvaluated(a)})}};Tc.default=gE});var ov=_(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});var Js=Z(),iv=ne(),yE={message:({params:t})=>(0,Js.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Js._)`{failingKeyword: ${t.ifClause}}`},vE={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:yE,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,iv.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=nv(n,"then"),o=nv(n,"else");if(!i&&!o)return;let s=e.let("valid",!0),a=e.name("_valid");if(l(),t.reset(),i&&o){let f=e.let("ifClause");t.setParams({ifClause:f}),e.if(a,u("then",f),u("else",f))}else i?e.if(a,u("then")):e.if((0,Js.not)(a),u("else"));t.pass(s,()=>t.error(!0));function l(){let f=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(f)}function u(f,p){return()=>{let d=t.subschema({keyword:f},a);e.assign(s,a),t.mergeValidEvaluated(d,s),p?e.assign(p,(0,Js._)`${f}`):t.setParams({ifClause:f})}}}};function nv(t,e){let r=t.schema[e];return r!==void 0&&!(0,iv.alwaysValidSchema)(t,r)}Ac.default=vE});var sv=_(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var wE=ne(),bE={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,wE.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Nc.default=bE});var av=_(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});var $E=gc(),xE=jy(),_E=yc(),SE=qy(),kE=Fy(),CE=Hs(),EE=zy(),PE=Sc(),IE=Jy(),RE=Qy(),TE=Zy(),AE=ev(),NE=tv(),ME=rv(),OE=ov(),VE=sv();function LE(t=!1){let e=[TE.default,AE.default,NE.default,ME.default,OE.default,VE.default,EE.default,PE.default,CE.default,IE.default,RE.default];return t?e.push(xE.default,SE.default):e.push($E.default,_E.default),e.push(kE.default),e}Mc.default=LE});var Vc=_(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.dynamicAnchor=void 0;var Oc=Z(),jE=ct(),lv=Ti(),DE=Ls(),qE={keyword:"$dynamicAnchor",schemaType:"string",code:t=>uv(t,t.schema)};function uv(t,e){let{gen:r,it:n}=t;n.schemaEnv.root.dynamicAnchors[e]=!0;let i=(0,Oc._)`${jE.default.dynamicAnchors}${(0,Oc.getProperty)(e)}`,o=n.errSchemaPath==="#"?n.validateName:FE(t);r.if((0,Oc._)`!${i}`,()=>r.assign(i,o))}zi.dynamicAnchor=uv;function FE(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 lv.SchemaEnv({schema:r,schemaId:l,root:i,baseId:o,localRefs:s,meta:a});return lv.compileSchema.call(n,u),(0,DE.getValidate)(t,u)}zi.default=qE});var Lc=_(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.dynamicRef=void 0;var cv=Z(),BE=ct(),pv=Ls(),HE={keyword:"$dynamicRef",schemaType:"string",code:t=>fv(t,t.schema)};function fv(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,cv._)`${BE.default.dynamicAnchors}${(0,cv.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,pv.callRef)(t,l),r.let(u,!0)}):()=>(0,pv.callRef)(t,l)}}Ui.dynamicRef=fv;Ui.default=HE});var dv=_(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});var WE=Vc(),zE=ne(),UE={keyword:"$recursiveAnchor",schemaType:"boolean",code(t){t.schema?(0,WE.dynamicAnchor)(t,""):(0,zE.checkStrictMode)(t.it,"$recursiveAnchor: false is ignored")}};jc.default=UE});var hv=_(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var GE=Lc(),JE={keyword:"$recursiveRef",schemaType:"string",code:t=>(0,GE.dynamicRef)(t,t.schema)};Dc.default=JE});var mv=_(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});var KE=Vc(),YE=Lc(),XE=dv(),QE=hv(),ZE=[KE.default,YE.default,XE.default,QE.default];qc.default=ZE});var yv=_(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var gv=Hs(),eP={keyword:"dependentRequired",type:"object",schemaType:"object",error:gv.error,code:t=>(0,gv.validatePropertyDeps)(t)};Fc.default=eP});var vv=_(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var tP=Hs(),rP={keyword:"dependentSchemas",type:"object",schemaType:"object",code:t=>(0,tP.validateSchemaDeps)(t)};Bc.default=rP});var wv=_(Hc=>{"use strict";Object.defineProperty(Hc,"__esModule",{value:!0});var nP=ne(),iP={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:t,parentSchema:e,it:r}){e.contains===void 0&&(0,nP.checkStrictMode)(r,`"${t}" without "contains" is ignored`)}};Hc.default=iP});var bv=_(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});var oP=yv(),sP=vv(),aP=wv(),lP=[oP.default,sP.default,aP.default];Wc.default=lP});var xv=_(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});var sr=Z(),$v=ne(),uP=ct(),cP={message:"must NOT have unevaluated properties",params:({params:t})=>(0,sr._)`{unevaluatedProperty: ${t.unevaluatedProperty}}`},pP={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:cP,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 sr.Name?e.if((0,sr._)`${a} !== true`,()=>e.forIn("key",n,p=>e.if(u(a,p),()=>l(p)))):a!==!0&&e.forIn("key",n,p=>a===void 0?l(p):e.if(f(a,p),()=>l(p))),o.props=!0,t.ok((0,sr._)`${i} === ${uP.default.errors}`);function l(p){if(r===!1){t.setParams({unevaluatedProperty:p}),t.error(),s||e.break();return}if(!(0,$v.alwaysValidSchema)(o,r)){let d=e.name("valid");t.subschema({keyword:"unevaluatedProperties",dataProp:p,dataPropType:$v.Type.Str},d),s||e.if((0,sr.not)(d),()=>e.break())}}function u(p,d){return(0,sr._)`!${p} || !${p}[${d}]`}function f(p,d){let m=[];for(let g in p)p[g]===!0&&m.push((0,sr._)`${d} !== ${g}`);return(0,sr.and)(...m)}}};zc.default=pP});var Sv=_(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});var Ar=Z(),_v=ne(),fP={message:({params:{len:t}})=>(0,Ar.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Ar._)`{limit: ${t}}`},dP={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:fP,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,Ar._)`${n}.length`);if(r===!1)t.setParams({len:o}),t.fail((0,Ar._)`${s} > ${o}`);else if(typeof r=="object"&&!(0,_v.alwaysValidSchema)(i,r)){let l=e.var("valid",(0,Ar._)`${s} <= ${o}`);e.if((0,Ar.not)(l),()=>a(l,o)),t.ok(l)}i.items=!0;function a(l,u){e.forRange("i",u,s,f=>{t.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:_v.Type.Num},l),i.allErrors||e.if((0,Ar.not)(l),()=>e.break())})}}};Uc.default=dP});var kv=_(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});var hP=xv(),mP=Sv(),gP=[hP.default,mP.default];Gc.default=gP});var Cv=_(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});var ke=Z(),yP={message:({schemaCode:t})=>(0,ke.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,ke._)`{format: ${t}}`},vP={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:yP,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:s,it:a}=t,{opts:l,errSchemaPath:u,schemaEnv:f,self:p}=a;if(!l.validateFormats)return;i?d():m();function d(){let g=r.scopeValue("formats",{ref:p.formats,code:l.code.formats}),y=r.const("fDef",(0,ke._)`${g}[${s}]`),w=r.let("fType"),b=r.let("format");r.if((0,ke._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(w,(0,ke._)`${y}.type || "string"`).assign(b,(0,ke._)`${y}.validate`),()=>r.assign(w,(0,ke._)`"string"`).assign(b,y)),t.fail$data((0,ke.or)(M(),k()));function M(){return l.strictSchema===!1?ke.nil:(0,ke._)`${s} && !${b}`}function k(){let R=f.$async?(0,ke._)`(${y}.async ? await ${b}(${n}) : ${b}(${n}))`:(0,ke._)`${b}(${n})`,T=(0,ke._)`(typeof ${b} == "function" ? ${R} : ${b}.test(${n}))`;return(0,ke._)`${b} && ${b} !== true && ${w} === ${e} && !${T}`}}function m(){let g=p.formats[o];if(!g){M();return}if(g===!0)return;let[y,w,b]=k(g);y===e&&t.pass(R());function M(){if(l.strictSchema===!1){p.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function k(T){let V=T instanceof RegExp?(0,ke.regexpCode)(T):l.code.formats?(0,ke._)`${l.code.formats}${(0,ke.getProperty)(o)}`:void 0,z=r.scopeValue("formats",{key:o,ref:T,code:V});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,ke._)`${z}.validate`]:["string",T,z]}function R(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,ke._)`await ${b}(${n})`}return typeof w=="function"?(0,ke._)`${b}(${n})`:(0,ke._)`${b}.test(${n})`}}}};Jc.default=vP});var Ev=_(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});var wP=Cv(),bP=[wP.default];Kc.default=bP});var Pv=_(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.contentVocabulary=kn.metadataVocabulary=void 0;kn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];kn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Rv=_(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});var $P=by(),xP=My(),_P=av(),SP=mv(),kP=bv(),CP=kv(),EP=Ev(),Iv=Pv(),PP=[SP.default,$P.default,xP.default,(0,_P.default)(!0),EP.default,Iv.metadataVocabulary,Iv.contentVocabulary,kP.default,CP.default];Yc.default=PP});var Av=_(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.DiscrError=void 0;var Tv;(function(t){t.Tag="tag",t.Mapping="mapping"})(Tv||(Ks.DiscrError=Tv={}))});var Mv=_(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});var Cn=Z(),Xc=Av(),Nv=Ti(),IP=Ri(),RP=ne(),TP={message:({params:{discrError:t,tagName:e}})=>t===Xc.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Cn._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},AP={keyword:"discriminator",type:"object",schemaType:"object",error:TP,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,Cn._)`${r}${(0,Cn.getProperty)(a)}`);e.if((0,Cn._)`typeof ${u} == "string"`,()=>f(),()=>t.error(!1,{discrError:Xc.DiscrError.Tag,tag:u,tagName:a})),t.ok(l);function f(){let m=d();e.if(!1);for(let g in m)e.elseIf((0,Cn._)`${u} === ${g}`),e.assign(l,p(m[g]));e.else(),t.error(!1,{discrError:Xc.DiscrError.Mapping,tag:u,tagName:a}),e.endIf()}function p(m){let g=e.name("valid"),y=t.subschema({keyword:"oneOf",schemaProp:m},g);return t.mergeEvaluated(y,Cn.Name),g}function d(){var m;let g={},y=b(i),w=!0;for(let R=0;R<s.length;R++){let T=s[R];if(T?.$ref&&!(0,RP.schemaHasRulesButRef)(T,o.self.RULES)){let z=T.$ref;if(T=Nv.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,z),T instanceof Nv.SchemaEnv&&(T=T.schema),T===void 0)throw new IP.default(o.opts.uriResolver,o.baseId,z)}let V=(m=T?.properties)===null||m===void 0?void 0:m[a];if(typeof V!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);w=w&&(y||b(T)),M(V,R)}if(!w)throw new Error(`discriminator: "${a}" must be required`);return g;function b({required:R}){return Array.isArray(R)&&R.includes(a)}function M(R,T){if(R.const)k(R.const,T);else if(R.enum)for(let V of R.enum)k(V,T);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(R,T){if(typeof R!="string"||R in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[R]=T}}}};Qc.default=AP});var Ov=_((WM,NP)=>{NP.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 Vv=_((zM,MP)=>{MP.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 Lv=_((UM,OP)=>{OP.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 jv=_((GM,VP)=>{VP.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 Dv=_((JM,LP)=>{LP.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 qv=_((KM,jP)=>{jP.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 Fv=_((YM,DP)=>{DP.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 Bv=_((XM,qP)=>{qP.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 Hv=_(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});var FP=Ov(),BP=Vv(),HP=Lv(),WP=jv(),zP=Dv(),UP=qv(),GP=Fv(),JP=Bv(),KP=["/properties"];function YP(t){return[FP,BP,HP,WP,zP,e(this,UP),GP,e(this,JP)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function e(r,n){return t?r.$dataMetaSchema(n,KP):n}}Zc.default=YP});var Wv=_((ve,tp)=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.MissingRefError=ve.ValidationError=ve.CodeGen=ve.Name=ve.nil=ve.stringify=ve.str=ve._=ve.KeywordCxt=ve.Ajv2020=void 0;var XP=my(),QP=Rv(),ZP=Mv(),eI=Hv(),ep="https://json-schema.org/draft/2020-12/schema",En=class extends XP.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),QP.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(ZP.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:r}=this.opts;r&&(eI.default.call(this,e),this.refs["http://json-schema.org/schema"]=ep)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(ep)?ep:void 0)}};ve.Ajv2020=En;tp.exports=ve=En;tp.exports.Ajv2020=En;Object.defineProperty(ve,"__esModule",{value:!0});ve.default=En;var tI=Ii();Object.defineProperty(ve,"KeywordCxt",{enumerable:!0,get:function(){return tI.KeywordCxt}});var Pn=Z();Object.defineProperty(ve,"_",{enumerable:!0,get:function(){return Pn._}});Object.defineProperty(ve,"str",{enumerable:!0,get:function(){return Pn.str}});Object.defineProperty(ve,"stringify",{enumerable:!0,get:function(){return Pn.stringify}});Object.defineProperty(ve,"nil",{enumerable:!0,get:function(){return Pn.nil}});Object.defineProperty(ve,"Name",{enumerable:!0,get:function(){return Pn.Name}});Object.defineProperty(ve,"CodeGen",{enumerable:!0,get:function(){return Pn.CodeGen}});var rI=Is();Object.defineProperty(ve,"ValidationError",{enumerable:!0,get:function(){return rI.default}});var nI=Ri();Object.defineProperty(ve,"MissingRefError",{enumerable:!0,get:function(){return nI.default}})});Ot();Ko();Vt();ni();import{transform as uI}from"esbuild";import{resolve as Nr}from"node:path";import{resolve as aI}from"node:path";import{readFile as Dm}from"node:fs/promises";import{basename as y2,relative as qm,resolve as Fm}from"node:path";mt();import{dirname as Rm,resolve as Tm}from"node:path";import j from"typescript";import{readFileSync as r2}from"node:fs";import{resolve as n2}from"node:path";import pe from"typescript";function Jl(t,e){let r=new Map;for(let n of t.statements){if(!pe.isImportDeclaration(n)||!n.importClause?.namedBindings||!pe.isStringLiteral(n.moduleSpecifier)||!pe.isNamedImports(n.importClause.namedBindings))continue;let i=n.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=n2(e,i);for(let s of n.importClause.namedBindings.elements)r.set(s.name.text,o)}return r}function i2(t){if(pe.isObjectBindingPattern(t.name)){let e=[];for(let r of t.name.elements)pe.isBindingElement(r)&&pe.isIdentifier(r.name)&&e.push(r.name.text);return e}return pe.isIdentifier(t.name)?[t.name.text]:[]}function o2(t){if(!pe.isObjectBindingPattern(t.name)||t.name.elements.length===0)return null;let e=t.name.elements[0];return!pe.isBindingElement(e)||!pe.isIdentifier(e.name)?null:e.name.text}function s2(t){if(pe.isParenthesizedExpression(t))return t.expression;if(pe.isJsxElement(t)||pe.isJsxSelfClosingElement(t)||pe.isJsxFragment(t))return t;if(pe.isBlock(t))for(let e=t.statements.length-1;e>=0;e--){let r=t.statements[e];if(pe.isReturnStatement(r)&&r.expression)return pe.isParenthesizedExpression(r.expression)?r.expression.expression:r.expression}return null}function Pm(t){if(!pe.isIdentifier(t.expression)||t.expression.text!=="view"||t.arguments.length!==1)return null;let e=t.arguments[0];if(!pe.isArrowFunction(e)&&!pe.isFunctionExpression(e))return null;let r="__noop",n=[];if(e.parameters.length===1){let s=o2(e.parameters[0]);if(n=i2(e.parameters[0]),s)r=s;else if(pe.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=s2(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 Kl(t,e){let r=null;function n(i){if(pe.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!pe.isIdentifier(o.name)||o.name.text!==e||!o.initializer||!pe.isCallExpression(o.initializer))continue;let s=Pm(o.initializer);s&&(r=s)}if(pe.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&pe.isCallExpression(i.expression)){let o=Pm(i.expression);o&&e==="default"&&(r=o)}pe.forEachChild(i,n)}return n(t),r}function Im(t,e){let r=r2(t,"utf-8"),n=pe.createSourceFile(t,r,pe.ScriptTarget.Latest,!0,pe.ScriptKind.TSX);return Kl(n,e)}function a2(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 Yl(t){return t.join(".")}function fn(t){let e=t.getText().replace(/\s+/g," ").trim();return e.length>100?`${e.slice(0,97)}...`:e}function Ql(t){if(j.isIdentifier(t))return[t.text];if(j.isPropertyAccessExpression(t)){let e=Ql(t.expression);return e?[...e,t.name.text]:null}return null}function Am(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 di(t,e){let r=Ql(t);if(!r)return null;if(r[0]in e.propBindings)return Am(e.propBindings[r[0]],r.slice(1));if(r[0]===e.vmName)return{kind:"binding",path:Yl(r.slice(1))};let n=e.scopes[e.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:Yl(r.slice(1)),scope:n}:null}function l2(t,e){let r,n={};for(let i of t.properties){if(!j.isPropertyAssignment(i)||!j.isIdentifier(i.name))continue;let o=i.name.text;if(o==="name"&&j.isStringLiteral(i.initializer)){r=i.initializer.text;continue}if(o==="params"&&j.isObjectLiteralExpression(i.initializer))for(let s of i.initializer.properties){if(!j.isPropertyAssignment(s)||!j.isIdentifier(s.name))continue;let a=ms(s.initializer,e);a!==null?n[s.name.text]=a:e.errors.push(`Unsupported action param expression for "${s.name.text}": ${fn(s.initializer)}`)}}return r?Object.keys(n).length>0?{kind:"action",name:r,params:n}:{kind:"action",name:r}:null}function ms(t,e){if(j.isStringLiteral(t)||j.isNoSubstitutionTemplateLiteral(t))return t.text;if(t.kind===j.SyntaxKind.TrueKeyword)return!0;if(t.kind===j.SyntaxKind.FalseKeyword)return!1;if(j.isNumericLiteral(t))return Number(t.text);if(t.kind===j.SyntaxKind.NullKeyword)return null;if(j.isTemplateExpression(t)){let n=[];t.head.text&&n.push(t.head.text);for(let i of t.templateSpans){let o=di(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=di(t,e);if(r)return r;if(j.isObjectLiteralExpression(t)){let n=l2(t,e);if(n)return n;let i={};for(let o of t.properties){if(!j.isPropertyAssignment(o)||!j.isIdentifier(o.name))continue;let s=ms(o.initializer,e);s!==null?i[o.name.text]=s:e.errors.push(`Unsupported object literal property "${o.name.text}": ${fn(o.initializer)}`)}return{kind:"literal",value:i}}if(j.isArrayLiteralExpression(t)){let n=[];for(let i of t.elements){if(!j.isExpression(i))continue;let o=ms(i,e);o!==null?n.push(o):e.errors.push(`Unsupported array element expression: ${fn(i)}`)}return n}return null}function u2(t){return j.isIdentifier(t)?t.text:j.isPropertyAccessExpression(t)&&j.isIdentifier(t.name)?t.name.text:null}function Nm(t){return t.getText()}function Xl(t,e){let r=[];for(let n of t){if(j.isJsxText(n)){let i=n.getText().trim();i&&r.push({kind:"text",value:i});continue}if(j.isJsxExpression(n)&&n.expression){let i=di(n.expression,e);if(i){r.push(i);continue}let o=Mm(n.expression,e);o?Array.isArray(o)?r.push(...o):r.push(o):e.errors.push(`Unsupported JSX child expression: ${fn(n.expression)}`);continue}if(j.isJsxElement(n)||j.isJsxSelfClosingElement(n)){let i=hi(n,e);i&&r.push(i)}}return r}function c2(t,e){if(t.length===0)return null;let r=t[0];return r in e.propBindings?Am(e.propBindings[r],t.slice(1)):r===e.vmName?{kind:"binding",path:Yl(t.slice(1))}:null}function Mm(t,e){if(j.isParenthesizedExpression(t))return Mm(t.expression,e);if(j.isCallExpression(t)&&j.isPropertyAccessExpression(t.expression)){let n=Ql(t.expression.expression),i=t.expression.name.text;if(n&&i==="map"&&t.arguments.length>=1){let o=c2(n,e);if(!o)return null;let s=t.arguments[0];if(!j.isArrowFunction(s)&&!j.isFunctionExpression(s))return e.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!j.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]},f=null,p=j.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(j.isBlock(s.body))return e.errors.push("map callback body must be a JSX expression, not a block"),null;if(j.isJsxElement(p)||j.isJsxSelfClosingElement(p)?f=hi(p,u):j.isJsxFragment(p)&&(f=Zl(p,u)),!f)return null;let d;if(j.isJsxElement(p)||j.isJsxSelfClosingElement(p)){let m=j.isJsxElement(p)?p.openingElement.attributes:p.attributes;for(let g of m.properties)if(!(!j.isJsxAttribute(g)||Nm(g.name)!=="key"||!g.initializer)&&j.isJsxExpression(g.initializer)&&g.initializer.expression){let y=di(g.initializer.expression,u);y&&(d=y)}}return{kind:"map",source:o,item:l,key:d,body:f}}}if(j.isJsxElement(t)||j.isJsxSelfClosingElement(t))return hi(t,e);let r=di(t,e);return r||null}function Zl(t,e){return{kind:"fragment",children:Xl(t.children,e)}}function p2(t,e,r){let n=r.viewImports.get(t);return n?Im(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 hi(t,e){let r=j.isJsxElement(t)?t.openingElement:t,n=u2(r.tagName);if(!n)return e.errors.push("Unsupported JSX tag expression"),null;let i={};for(let l of r.attributes.properties){if(!j.isJsxAttribute(l))continue;let u=Nm(l.name);if(u!=="key"){if(!l.initializer){i[u]=!0;continue}if(j.isStringLiteral(l.initializer)){i[u]=l.initializer.text;continue}if(j.isJsxExpression(l.initializer)&&l.initializer.expression){let f=ms(l.initializer.expression,e);f!==null?i[u]=f:e.errors.push(`Unsupported JSX prop expression for "${u}" on <${n}>: ${fn(l.initializer.expression)}`)}}}if(!e.allowedComponents.has(n)){let l=p2(n,i,e);return l||(e.errors.push(`Component "${n}" is not in the allowed registry`),null)}a2(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]},f=j.isJsxElement(t)?Xl(t.children,u):[];return{kind:"map",source:l,item:s,body:{kind:"component",name:n,props:i,children:f}}}let a=j.isJsxElement(t)?Xl(t.children,o):[];return{kind:"component",name:n,props:i,children:a}}function f2(t){let e=null;function r(n){if(j.isCallExpression(n)&&j.isIdentifier(n.expression)&&n.expression.text==="screen"&&n.arguments.length===1&&(j.isArrowFunction(n.arguments[0])||j.isFunctionExpression(n.arguments[0]))){let i=n.arguments[0],o="unknown";if(n.typeArguments&&n.typeArguments.length===1){let a=n.typeArguments[0];j.isTypeReferenceNode(a)&&j.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(j.isParenthesizedExpression(s))(j.isJsxElement(s.expression)||j.isJsxSelfClosingElement(s.expression))&&(e={viewModel:o,jsxRoot:s.expression});else if(j.isJsxElement(s)||j.isJsxSelfClosingElement(s))e={viewModel:o,jsxRoot:s};else if(j.isBlock(s)&&s.statements.length===1){let a=s.statements[0];j.isReturnStatement(a)&&a.expression&&(j.isParenthesizedExpression(a.expression)?e={viewModel:o,jsxRoot:a.expression.expression}:e={viewModel:o,jsxRoot:a.expression})}}j.forEachChild(n,r)}return r(t),e}function Om(t,e,r,n={}){let i=new Set(st);for(let p of n.allowlistExtra??[])i.add(p);let o=Tm(e),s=Rm(o),a=j.createSourceFile(o,t,j.ScriptTarget.Latest,!0,j.ScriptKind.TSX),l={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Jl(a,s),allowedComponents:i},u=f2(a);if(!u)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let f=j.isJsxElement(u.jsxRoot)||j.isJsxSelfClosingElement(u.jsxRoot)?hi(u.jsxRoot,l):j.isJsxFragment(u.jsxRoot)?Zl(u.jsxRoot,l):null;return f?{viewModel:u.viewModel,exportName:r,root:f,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 d2(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 j.isJsxElement(t.jsxRoot)||j.isJsxSelfClosingElement(t.jsxRoot)?hi(t.jsxRoot,n):j.isJsxFragment(t.jsxRoot)?Zl(t.jsxRoot,n):j.isConditionalExpression(t.jsxRoot)?(e.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):j.isExpression(t.jsxRoot)?(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${fn(t.jsxRoot)}`),null):(e.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${j.SyntaxKind[t.jsxRoot.kind]}`),null)}function Vm(t,e,r,n={}){let i=new Set(st);for(let p of n.allowlistExtra??[])i.add(p);let o=Tm(e),s=Rm(o),a=j.createSourceFile(o,t,j.ScriptTarget.Latest,!0,j.ScriptKind.TSX),l=Kl(a,r),u={vmName:l?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Jl(a,s),allowedComponents:i};if(!l)return{exportName:r,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${r}" found in ${e}`],warnings:[]};let f=d2(l,u);return f?{exportName:r,propsType:l.propsType,propNames:l.propNames,root:f,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 eu(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 Lm(t){return`${t.sourcePath}:${t.name}`}mt();var h2=new Set(["swiftui","compose"]),m2=new Set(["action"]);function g2(t,e){return!st.has(t)&&t in e.extensions}function tu(t){return t?` (${t})`:""}function gs(t,e,r={}){let n=[],i=[],o=r.targets??[],s=o.some(l=>h2.has(l)),a=l=>{if(l.kind!=="viewRef"){if(l.kind==="component"){if(!st.has(l.name)&&!(l.name in e.extensions))n.push(`Extension component "${l.name}" is not registered in extensions.yaml${tu(r.source)}`);else if(g2(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(", ")}${tu(r.source)}`);for(let f of Object.keys(l.props))f in u.properties||m2.has(f)||n.push(`Extension "${l.name}" does not accept property "${f}"${tu(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 jm(t,e,r,n,i){let o=[],s=[],a=gs(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=gs(e[l],r,{targets:n,source:i.partials[l]});o.push(...u.errors),s.push(...u.warnings)}return{errors:o,warnings:s}}async function v2(t,e,r){let n=await Dm(t,"utf-8"),i=Vm(n,t,e,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t} (${e}):
|
|
395
395
|
${i.errors.map(o=>` - ${o}`).join(`
|
|
396
|
-
`)}`);if(r.extensionRegistry){let o=
|
|
396
|
+
`)}`);if(r.extensionRegistry){let o=gs(i.root,r.extensionRegistry,{targets:r.targets,source:t});if(o.errors.length>0)throw new Error(`Extension validation errors in ${t} (${e}):
|
|
397
397
|
${o.errors.map(s=>` - ${s}`).join(`
|
|
398
|
-
`)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:
|
|
398
|
+
`)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${t} (${e}): ${o}`);return{version:1,source:qm(process.cwd(),Fm(t)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType}}async function w2(t,e){let r=new Map,n=eu(t);for(;n.length>0;){let i=n.shift(),o=Lm(i);if(r.has(o))continue;let s=await v2(i.sourcePath,i.name,e);r.set(o,s),n.push(...eu(s.root))}return[...r.values()]}async function Bm(t,e={}){let r=await Dm(t.sourcePath,"utf-8"),n=t.exportName??y2(t.sourcePath,".view.tsx"),i=Om(r,t.sourcePath,n,{allowlistExtra:e.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${t.sourcePath}:
|
|
399
399
|
${i.errors.map(a=>` - ${a}`).join(`
|
|
400
|
-
`)}`);let o={version:1,source:
|
|
400
|
+
`)}`);let o={version:1,source:qm(process.cwd(),Fm(t.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await w2(o.root,{...e,targets:t.targets??e.targets});if(e.extensionRegistry){let a=jm(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}:
|
|
401
401
|
${a.errors.map(l=>` - ${l}`).join(`
|
|
402
|
-
`)}`);i.warnings.push(...a.warnings)}for(let a of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${a}`);return{screen:o,partials:s}}Ot();
|
|
402
|
+
`)}`);i.warnings.push(...a.warnings)}for(let a of i.warnings)console.warn(`Warning in ${t.sourcePath}: ${a}`);return{screen:o,partials:s}}Ot();Gl();mt();function b2(t){let e=oo[t];return e?e.lowering==="inline-css"||e.lowering==="class-name":!1}function mi(t,e,r,n){if(t.kind==="component"){let{name:i,props:o}=t;if(r.has(i)||!st.has(i)){for(let s of t.children)mi(s,e,r,n);return}for(let s of Object.keys(o))b2(s)&&(Ep(s,i)||n.push(`${e}: <${i}> does not accept property "${s}"`));for(let s of t.children)mi(s,e,r,n);return}if(t.kind==="map"){mi(t.body,e,r,n);return}if(t.kind==="fragment"){for(let i of t.children)mi(i,e,r,n);return}}async function Hm(t,e=[]){let r=new Set(e),n=[];for(let i of t)mi(i.root,i.source,r,n);if(n.length>0)throw new Error(`View property validation failed:
|
|
403
403
|
${n.map(i=>` - ${i}`).join(`
|
|
404
|
-
`)}`)}var
|
|
405
|
-
${l}`)}},configureServer(o){r(),o.watcher.on("change",s=>{if(!n(s))return;let a=
|
|
406
|
-
${g}`)}return null},configureServer(p){a(),p.watcher.on("change",d=>{f(d)&&l(p),(d.startsWith(r)||f(d)||i&&d===i||
|
|
404
|
+
`)}`)}var zv=ip(Wv(),1);Dr();Vt();import{readFile as Uv}from"node:fs/promises";import{resolve as Gv}from"node:path";var iI=zv.default,oI=Gv(Ee(),"spec/ui-dsl-extensions.meta.json"),Ys;async function sI(){if(Ys)return Ys;let t=JSON.parse(await Uv(oI,"utf-8"));return Ys=new iI({allErrors:!0,strict:!1}).compile(t),Ys}async function Jv(t){if(!t)return{extensions:{}};let e=Gv(t),r=await Uv(e,"utf-8"),n=ht.load(r),i=await sI();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}ni();async function Kv(t,e,r){return(await cm()).renderReactPreviewBundle(t,e,r)}var rp="view-contracts:screen/",Xs="view-contracts:theme.css";var _t={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 lI(t){if(!t.extensions)return{allowlistExtra:t.allowlistExtra??[]};let e=await Jv(t.extensions),r=[...new Set([...t.allowlistExtra??[],...Object.keys(e.extensions)])];return{extensionRegistry:e,allowlistExtra:r}}async function Yv(t,e){let r=await Kt(t),i=(await kp(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 lI(r),a=Te(t),{screen:l,partials:u}=await Bm({sourcePath:aI(a,i.source),exportName:i.exportName,screenName:i.screenName},{allowlistExtra:s,extensionRegistry:o}),{tokensPath:f,themePath:p}=io(r),{themeIR:d}=await hs(f,p);await fi(r,t);let m=[l,...u];return await Hm(m,s),Bl(m,d),Kv(l,u,{runtimeImportFrom:_t.dispatch,extensionsImportFrom:_t.extensions,contractsImportFrom:_t.contracts,allowlistExtra:s,previewImports:_t})}Ot();es();import{resolve as Xv}from"node:path";var Zv="\0";function Qv(t){return`${Zv}${t}`}function ew(t){let e="";async function r(){let o=await Kt(t.configPath);e=await vh(t.configPath,o)}function n(o){return o.startsWith(e)&&o.endsWith(".mock.yaml")}function i(o,s){let a=o.moduleGraph.getModuleById(Qv(`${si}${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(si)?Qv(o):null},async load(o){let s=yh(o.slice(Zv.length));if(!s)return null;try{let a=await Kt(t.configPath);return await gh(t.configPath,a,s)}catch(a){let l=a instanceof Error?a.message:String(a);this.error(`Preview mock failed for ${s}:
|
|
405
|
+
${l}`)}},configureServer(o){r(),o.watcher.on("change",s=>{if(!n(s))return;let a=Xv(s).slice(e.length+1).replace(/\.mock\.yaml$/,"");i(o,a)})},handleHotUpdate({file:o,server:s}){if(!n(o))return;let a=Xv(o).slice(e.length+1).replace(/\.mock\.yaml$/,"");return i(s,a)}}}var cI="\0";function Qs(t){return`${cI}${t}`}function pI(t){let e=Qs(rp);if(!t.startsWith(e))return null;let r=t.slice(e.length);return r.endsWith(".tsx")?r.slice(0,-4):r}function fI(t){let e="",r="",n=[],i,o,s="";async function a(){let p=await Kt(t.configPath);e=Te(t.configPath),r=p.viewsDir,n=[],p.design?.tokens&&n.push(p.design.tokens),p.design?.theme&&n.push(p.design.theme),o=p.design?.extensionsCss,i=p.extensions,s=ri()}function l(p){let d=p.moduleGraph.getModuleById(Qs(Xs));return d?(p.moduleGraph.invalidateModule(d),[d]):[]}function u(p,d){let m=p.moduleGraph.getModulesByFile(d);if(m)for(let g of m)p.moduleGraph.invalidateModule(g);(d.endsWith(".view.tsx")||d.includes("/views/"))&&p.moduleGraph.invalidateAll()}function f(p){return n.some(d=>p===d)||p===s||o!==void 0&&p===o}return{name:"view-contracts-preview",enforce:"pre",async buildStart(){await a()},resolveId(p){return p===Xs||p.startsWith(rp)?Qs(p):null},async load(p){if(p===Qs(Xs)){let m=await Kt(t.configPath);return await ii(m,t.configPath)}let d=pI(p);if(d)try{let m=await Yv(t.configPath,d),{code:g}=await uI(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}:
|
|
406
|
+
${g}`)}return null},configureServer(p){a(),p.watcher.on("change",d=>{f(d)&&l(p),(d.startsWith(r)||f(d)||i&&d===i||Pl(d))&&u(p,d)})},handleHotUpdate({file:p,server:d}){if(f(p))return u(d,p),l(d);if(p.startsWith(r)||i&&p===i||Pl(p))return u(d,p),[...d.moduleGraph.getModulesByFile(p)??[]]}}}function dI(t){let e=Ee(),r=tn();return[{find:"@view-contracts/core",replacement:Nr(e,"dist/dsl.js")},{find:_t.dispatch,replacement:Nr(r,"dispatch.ts")},{find:_t.style,replacement:Nr(r,"style.ts")},{find:_t.types,replacement:Nr(r,"types.ts")},{find:_t.styleHelpers,replacement:Nr(e,"dist/preview-style-helpers.js")},{find:_t.contracts,replacement:Nr(t,"contracts/view-models.ts")},{find:_t.extensions,replacement:Nr(t,"src/components/extensions.tsx")}]}function hI(t,e){return[t,e,Ee()]}export{hI as previewFsAllowPaths,dI as previewRuntimeAliases,ew as viewContractsPreviewMockPlugin,fI as viewContractsPreviewPlugin};
|
|
407
407
|
/*! Bundled license information:
|
|
408
408
|
|
|
409
409
|
js-yaml/dist/js-yaml.mjs:
|