view-contracts 0.5.12 → 0.5.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/preview.mjs CHANGED
@@ -1,96 +1,96 @@
1
- var Sb=Object.create;var va=Object.defineProperty;var kb=Object.getOwnPropertyDescriptor;var Cb=Object.getOwnPropertyNames;var Eb=Object.getPrototypeOf,Pb=Object.prototype.hasOwnProperty;var Wr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var K=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},pr=(e,t)=>{for(var r in t)va(e,r,{get:t[r],enumerable:!0})},Ib=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Cb(t))!Pb.call(e,i)&&i!==r&&va(e,i,{get:()=>t[i],enumerable:!(n=kb(t,i))||n.enumerable});return e};var Jf=(e,t,r)=>(r=e!=null?Sb(Eb(e)):{},Ib(t||!e||!e.__esModule?va(r,"default",{value:e,enumerable:!0}):r,e));function Rb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qn(){if(Kf)return Qt;Kf=1;function e(s){return typeof s>"u"||s===null}function t(s){return typeof s=="object"&&s!==null}function r(s){return Array.isArray(s)?s:e(s)?[]:[s]}function n(s,a){if(a){let c=Object.keys(a);for(let l=0,p=c.length;l<p;l+=1){let f=c[l];s[f]=a[f]}}return s}function i(s,a){let c="";for(let l=0;l<a;l+=1)c+=s;return c}function o(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return Qt.isNothing=e,Qt.isObject=t,Qt.toArray=r,Qt.repeat=i,Qt.isNegativeZero=o,Qt.extend=n,Qt}function Bn(){if(Yf)return wa;Yf=1;function e(r,n){let i="",o=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(i+='in "'+r.mark.name+'" '),i+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!n&&r.mark.snippet&&(i+=`
1
+ var Fb=Object.create;var xa=Object.defineProperty;var qb=Object.getOwnPropertyDescriptor;var Bb=Object.getOwnPropertyNames;var Hb=Object.getPrototypeOf,Wb=Object.prototype.hasOwnProperty;var Kr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var K=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var S=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},gr=(e,t)=>{for(var r in t)xa(e,r,{get:t[r],enumerable:!0})},Ub=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Bb(t))!Wb.call(e,i)&&i!==r&&xa(e,i,{get:()=>t[i],enumerable:!(n=qb(t,i))||n.enumerable});return e};var np=(e,t,r)=>(r=e!=null?Fb(Hb(e)):{},Ub(t||!e||!e.__esModule?xa(r,"default",{value:e,enumerable:!0}):r,e));function zb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Gn(){if(ip)return er;ip=1;function e(s){return typeof s>"u"||s===null}function t(s){return typeof s=="object"&&s!==null}function r(s){return Array.isArray(s)?s:e(s)?[]:[s]}function n(s,a){if(a){let c=Object.keys(a);for(let l=0,p=c.length;l<p;l+=1){let f=c[l];s[f]=a[f]}}return s}function i(s,a){let c="";for(let l=0;l<a;l+=1)c+=s;return c}function o(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return er.isNothing=e,er.isObject=t,er.toArray=r,er.repeat=i,er.isNegativeZero=o,er.extend=n,er}function Jn(){if(op)return _a;op=1;function e(r,n){let i="",o=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(i+='in "'+r.mark.name+'" '),i+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!n&&r.mark.snippet&&(i+=`
2
2
 
3
- `+r.mark.snippet),o+" "+i):o}function t(r,n){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=n,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(n){return this.name+": "+e(this,n)},wa=t,wa}function Tb(){if(Xf)return ba;Xf=1;let e=qn();function t(i,o,s,a,c){let l="",p="",f=Math.floor(c/2)-1;return a-o>f&&(l=" ... ",o=a-f+l.length),s-a>f&&(p=" ...",s=a+f-p.length),{str:l+i.slice(o,s).replace(/\t/g,"\u2192")+p,pos:a-o+l.length}}function r(i,o){return e.repeat(" ",o-i.length)+i}function n(i,o){if(o=Object.create(o||null),!i.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);let s=/\r?\n|\r|\0/g,a=[0],c=[],l,p=-1;for(;l=s.exec(i.buffer);)c.push(l.index),a.push(l.index+l[0].length),i.position<=l.index&&p<0&&(p=a.length-2);p<0&&(p=a.length-1);let f="",h=Math.min(i.line+o.linesAfter,c.length).toString().length,m=o.maxLength-(o.indent+h+3);for(let g=1;g<=o.linesBefore&&!(p-g<0);g++){let v=t(i.buffer,a[p-g],c[p-g],i.position-(a[p]-a[p-g]),m);f=e.repeat(" ",o.indent)+r((i.line-g+1).toString(),h)+" | "+v.str+`
4
- `+f}let y=t(i.buffer,a[p],c[p],i.position,m);f+=e.repeat(" ",o.indent)+r((i.line+1).toString(),h)+" | "+y.str+`
5
- `,f+=e.repeat("-",o.indent+h+3+y.pos)+`^
6
- `;for(let g=1;g<=o.linesAfter&&!(p+g>=c.length);g++){let v=t(i.buffer,a[p+g],c[p+g],i.position-(a[p]-a[p+g]),m);f+=e.repeat(" ",o.indent)+r((i.line+g+1).toString(),h)+" | "+v.str+`
7
- `}return f.replace(/\n$/,"")}return ba=n,ba}function Fe(){if(Qf)return $a;Qf=1;let e=Bn(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function n(o){let s={};return o!==null&&Object.keys(o).forEach(function(a){o[a].forEach(function(c){s[String(c)]=a})}),s}function i(o,s){if(s=s||{},Object.keys(s).forEach(function(a){if(t.indexOf(a)===-1)throw new e('Unknown option "'+a+'" is met in definition of "'+o+'" YAML type.')}),this.options=s,this.tag=o,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(a){return a},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=n(s.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return $a=i,$a}function bp(){if(Zf)return xa;Zf=1;let e=Bn(),t=Fe();function r(o,s){let a=[];return o[s].forEach(function(c){let l=a.length;a.forEach(function(p,f){p.tag===c.tag&&p.kind===c.kind&&p.multi===c.multi&&(l=f)}),a[l]=c}),a}function n(){let o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function s(a){a.multi?(o.multi[a.kind].push(a),o.multi.fallback.push(a)):o[a.kind][a.tag]=o.fallback[a.tag]=a}for(let a=0,c=arguments.length;a<c;a+=1)arguments[a].forEach(s);return o}function i(o){return this.extend(o)}return i.prototype.extend=function(s){let a=[],c=[];if(s instanceof t)c.push(s);else if(Array.isArray(s))c=c.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit)))s.implicit&&(a=a.concat(s.implicit)),s.explicit&&(c=c.concat(s.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(p){if(!(p instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(p.loadKind&&p.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(p.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),c.forEach(function(p){if(!(p instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let l=Object.create(i.prototype);return l.implicit=(this.implicit||[]).concat(a),l.explicit=(this.explicit||[]).concat(c),l.compiledImplicit=r(l,"implicit"),l.compiledExplicit=r(l,"explicit"),l.compiledTypeMap=n(l.compiledImplicit,l.compiledExplicit),l},xa=i,xa}function $p(){if(ep)return _a;ep=1;let e=Fe();return _a=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),_a}function xp(){if(tp)return Sa;tp=1;let e=Fe();return Sa=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),Sa}function _p(){if(rp)return ka;rp=1;let e=Fe();return ka=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),ka}function Sp(){if(np)return Ca;np=1;let e=bp();return Ca=new e({explicit:[$p(),xp(),_p()]}),Ca}function kp(){if(ip)return Ea;ip=1;let e=Fe();function t(i){if(i===null)return!0;let o=i.length;return o===1&&i==="~"||o===4&&(i==="null"||i==="Null"||i==="NULL")}function r(){return null}function n(i){return i===null}return Ea=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:n,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),Ea}function Cp(){if(op)return Pa;op=1;let e=Fe();function t(i){if(i===null)return!1;let o=i.length;return o===4&&(i==="true"||i==="True"||i==="TRUE")||o===5&&(i==="false"||i==="False"||i==="FALSE")}function r(i){return i==="true"||i==="True"||i==="TRUE"}function n(i){return Object.prototype.toString.call(i)==="[object Boolean]"}return Pa=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:n,represent:{lowercase:function(i){return i?"true":"false"},uppercase:function(i){return i?"TRUE":"FALSE"},camelcase:function(i){return i?"True":"False"}},defaultStyle:"lowercase"}),Pa}function Ep(){if(sp)return Ia;sp=1;let e=qn(),t=Fe();function r(l){return l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102}function n(l){return l>=48&&l<=55}function i(l){return l>=48&&l<=57}function o(l){if(l===null)return!1;let p=l.length,f=0,h=!1;if(!p)return!1;let m=l[f];if((m==="-"||m==="+")&&(m=l[++f]),m==="0"){if(f+1===p)return!0;if(m=l[++f],m==="b"){for(f++;f<p;f++){if(m=l[f],m!=="0"&&m!=="1")return!1;h=!0}return h&&isFinite(s(l))}if(m==="x"){for(f++;f<p;f++){if(!r(l.charCodeAt(f)))return!1;h=!0}return h&&isFinite(s(l))}if(m==="o"){for(f++;f<p;f++){if(!n(l.charCodeAt(f)))return!1;h=!0}return h&&isFinite(s(l))}}for(;f<p;f++){if(!i(l.charCodeAt(f)))return!1;h=!0}return h?isFinite(s(l)):!1}function s(l){let p=l,f=1,h=p[0];if((h==="-"||h==="+")&&(h==="-"&&(f=-1),p=p.slice(1),h=p[0]),p==="0")return 0;if(h==="0"){if(p[1]==="b")return f*parseInt(p.slice(2),2);if(p[1]==="x")return f*parseInt(p.slice(2),16);if(p[1]==="o")return f*parseInt(p.slice(2),8)}return f*parseInt(p,10)}function a(l){return s(l)}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&l%1===0&&!e.isNegativeZero(l)}return Ia=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:a,predicate:c,represent:{binary:function(l){return l>=0?"0b"+l.toString(2):"-0b"+l.toString(2).slice(1)},octal:function(l){return l>=0?"0o"+l.toString(8):"-0o"+l.toString(8).slice(1)},decimal:function(l){return l.toString(10)},hexadecimal:function(l){return l>=0?"0x"+l.toString(16).toUpperCase():"-0x"+l.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ia}function Pp(){if(ap)return Ra;ap=1;let e=qn(),t=Fe(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),n=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function i(l){return l===null||!r.test(l)?!1:isFinite(parseFloat(l,10))?!0:n.test(l)}function o(l){let p=l.toLowerCase(),f=p[0]==="-"?-1:1;return"+-".indexOf(p[0])>=0&&(p=p.slice(1)),p===".inf"?f===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:p===".nan"?NaN:f*parseFloat(p,10)}let s=/^[-+]?[0-9]+e/;function a(l,p){if(isNaN(l))switch(p){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===l)switch(p){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===l)switch(p){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(l))return"-0.0";let f=l.toString(10);return s.test(f)?f.replace("e",".e"):f}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&(l%1!==0||e.isNegativeZero(l))}return Ra=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:o,predicate:c,represent:a,defaultStyle:"lowercase"}),Ra}function Ip(){return lp||(lp=1,Ta=Sp().extend({implicit:[kp(),Cp(),Ep(),Pp()]})),Ta}function Rp(){return cp||(cp=1,Aa=Ip()),Aa}function Tp(){if(up)return Na;up=1;let e=Fe(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=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 n(s){return s===null?!1:t.exec(s)!==null||r.exec(s)!==null}function i(s){let a=0,c=null,l=t.exec(s);if(l===null&&(l=r.exec(s)),l===null)throw new Error("Date resolve error");let p=+l[1],f=+l[2]-1,h=+l[3];if(!l[4])return new Date(Date.UTC(p,f,h));let m=+l[4],y=+l[5],g=+l[6];if(l[7]){for(a=l[7].slice(0,3);a.length<3;)a+="0";a=+a}if(l[9]){let $=+l[10],I=+(l[11]||0);c=($*60+I)*6e4,l[9]==="-"&&(c=-c)}let v=new Date(Date.UTC(p,f,h,m,y,g,a));return c&&v.setTime(v.getTime()-c),v}function o(s){return s.toISOString()}return Na=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n,construct:i,instanceOf:Date,represent:o}),Na}function Ap(){if(fp)return Ma;fp=1;let e=Fe();function t(r){return r==="<<"||r===null}return Ma=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),Ma}function Np(){if(pp)return Oa;pp=1;let e=Fe(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
8
- \r`;function r(s){if(s===null)return!1;let a=0,c=s.length,l=t;for(let p=0;p<c;p++){let f=l.indexOf(s.charAt(p));if(!(f>64)){if(f<0)return!1;a+=6}}return a%8===0}function n(s){let a=s.replace(/[\r\n=]/g,""),c=a.length,l=t,p=0,f=[];for(let m=0;m<c;m++)m%4===0&&m&&(f.push(p>>16&255),f.push(p>>8&255),f.push(p&255)),p=p<<6|l.indexOf(a.charAt(m));let h=c%4*6;return h===0?(f.push(p>>16&255),f.push(p>>8&255),f.push(p&255)):h===18?(f.push(p>>10&255),f.push(p>>2&255)):h===12&&f.push(p>>4&255),new Uint8Array(f)}function i(s){let a="",c=0,l=s.length,p=t;for(let h=0;h<l;h++)h%3===0&&h&&(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]),c=(c<<8)+s[h];let f=l%3;return f===0?(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]):f===2?(a+=p[c>>10&63],a+=p[c>>4&63],a+=p[c<<2&63],a+=p[64]):f===1&&(a+=p[c>>2&63],a+=p[c<<4&63],a+=p[64],a+=p[64]),a}function o(s){return Object.prototype.toString.call(s)==="[object Uint8Array]"}return Oa=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:n,predicate:o,represent:i}),Oa}function Mp(){if(dp)return Va;dp=1;let e=Fe(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(o){if(o===null)return!0;let s={},a=o;for(let c=0,l=a.length;c<l;c+=1){let p=a[c],f=!1;if(r.call(p)!=="[object Object]")return!1;let h;for(h in p)if(t.call(p,h))if(!f)f=!0;else return!1;if(!f||t.call(s,h))return!1;Object.defineProperty(s,h,{value:!0})}return!0}function i(o){return o!==null?o:[]}return Va=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:n,construct:i}),Va}function Op(){if(hp)return La;hp=1;let e=Fe(),t=Object.prototype.toString;function r(i){if(i===null)return!0;let o=i,s=new Array(o.length);for(let a=0,c=o.length;a<c;a+=1){let l=o[a];if(t.call(l)!=="[object Object]")return!1;let p=Object.keys(l);if(p.length!==1)return!1;s[a]=[p[0],l[p[0]]]}return!0}function n(i){if(i===null)return[];let o=i,s=new Array(o.length);for(let a=0,c=o.length;a<c;a+=1){let l=o[a],p=Object.keys(l);s[a]=[p[0],l[p[0]]]}return s}return La=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:n}),La}function Vp(){if(mp)return ja;mp=1;let e=Fe(),t=Object.prototype.hasOwnProperty;function r(i){if(i===null)return!0;let o=i;for(let s in o)if(t.call(o,s)&&o[s]!==null)return!1;return!0}function n(i){return i!==null?i:{}}return ja=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:n}),ja}function qa(){return gp||(gp=1,Da=Rp().extend({implicit:[Tp(),Ap()],explicit:[Np(),Mp(),Op(),Vp()]})),Da}function Ab(){if(yp)return mo;yp=1;let e=qn(),t=Bn(),r=Tb(),n=qa(),i=Object.prototype.hasOwnProperty,o=1,s=2,a=3,c=4,l=1,p=2,f=3,h=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/[\x85\u2028\u2029]/,y=/[,\[\]{}]/,g=/^(?:!|!!|![0-9A-Za-z-]+!)$/,v=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function $(u){return Object.prototype.toString.call(u)}function I(u){return u===10||u===13}function _(u){return u===9||u===32}function R(u){return u===9||u===32||u===10||u===13}function N(u){return u===44||u===91||u===93||u===123||u===125}function j(u){if(u>=48&&u<=57)return u-48;let w=u|32;return w>=97&&w<=102?w-97+10:-1}function U(u){return u===120?2:u===117?4:u===85?8:0}function oe(u){return u>=48&&u<=57?u-48:-1}function me(u){switch(u){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 be(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function Pe(u,w,E){w==="__proto__"?Object.defineProperty(u,w,{configurable:!0,enumerable:!0,writable:!0,value:E}):u[w]=E}let we=new Array(256),ze=new Array(256);for(let u=0;u<256;u++)we[u]=me(u)?1:0,ze[u]=me(u);function fe(u,w){this.input=u,this.filename=w.filename||null,this.schema=w.schema||n,this.onWarning=w.onWarning||null,this.legacy=w.legacy||!1,this.json=w.json||!1,this.listener=w.listener||null,this.maxDepth=typeof w.maxDepth=="number"?w.maxDepth:100,this.maxTotalMergeKeys=typeof w.maxTotalMergeKeys=="number"?w.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=u.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function Y(u,w){let E={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return E.snippet=r(E),new t(w,E)}function D(u,w){throw Y(u,w)}function qr(u,w){u.onWarning&&u.onWarning.call(null,Y(u,w))}function At(u,w,E){let P=u.anchorMapTransactions;if(P.length!==0){let k=P[P.length-1];i.call(k,w)||(k[w]={existed:i.call(u.anchorMap,w),value:u.anchorMap[w]})}u.anchorMap[w]=E}function pa(u){u.anchorMapTransactions.push(Object.create(null))}function fr(u){let w=u.anchorMapTransactions.pop(),E=u.anchorMapTransactions;if(E.length===0)return;let P=E[E.length-1],k=Object.keys(w);for(let d=0,b=k.length;d<b;d+=1){let x=k[d];i.call(P,x)||(P[x]=w[x])}}function da(u){let w=u.anchorMapTransactions.pop(),E=Object.keys(w);for(let P=E.length-1;P>=0;P-=1){let k=w[E[P]];k.existed?u.anchorMap[E[P]]=k.value:delete u.anchorMap[E[P]]}}function Mn(u){return{position:u.position,line:u.line,lineStart:u.lineStart,lineIndent:u.lineIndent,firstTabInLine:u.firstTabInLine,tag:u.tag,anchor:u.anchor,kind:u.kind,result:u.result}}function Br(u,w){u.position=w.position,u.line=w.line,u.lineStart=w.lineStart,u.lineIndent=w.lineIndent,u.firstTabInLine=w.firstTabInLine,u.tag=w.tag,u.anchor=w.anchor,u.kind=w.kind,u.result=w.result}let oo={YAML:function(w,E,P){w.version!==null&&D(w,"duplication of %YAML directive"),P.length!==1&&D(w,"YAML directive accepts exactly one argument");let k=/^([0-9]+)\.([0-9]+)$/.exec(P[0]);k===null&&D(w,"ill-formed argument of the YAML directive");let d=parseInt(k[1],10),b=parseInt(k[2],10);d!==1&&D(w,"unacceptable YAML version of the document"),w.version=P[0],w.checkLineBreaks=b<2,b!==1&&b!==2&&qr(w,"unsupported YAML version of the document")},TAG:function(w,E,P){let k;P.length!==2&&D(w,"TAG directive accepts exactly two arguments");let d=P[0];k=P[1],g.test(d)||D(w,"ill-formed tag handle (first argument) of the TAG directive"),i.call(w.tagMap,d)&&D(w,'there is a previously declared suffix for "'+d+'" tag handle'),v.test(k)||D(w,"ill-formed tag prefix (second argument) of the TAG directive");try{k=decodeURIComponent(k)}catch{D(w,"tag prefix is malformed: "+k)}w.tagMap[d]=k}};function Qe(u,w,E,P){if(w<E){let k=u.input.slice(w,E);if(P)for(let d=0,b=k.length;d<b;d+=1){let x=k.charCodeAt(d);x===9||x>=32&&x<=1114111||D(u,"expected valid JSON character")}else h.test(k)&&D(u,"the stream contains non-printable characters");u.result+=k}}function Jt(u){u.totalMergeKeys++,u.maxTotalMergeKeys!==-1&&u.totalMergeKeys>u.maxTotalMergeKeys&&D(u,"merge keys exceeded maxTotalMergeKeys ("+u.maxTotalMergeKeys+")")}function On(u,w,E,P){e.isObject(E)||D(u,"cannot merge mappings; the provided source object is unacceptable"),Jt(u);let k=Object.keys(E);for(let d=0,b=k.length;d<b;d+=1){let x=k[d];Jt(u),i.call(w,x)||(Pe(w,x,E[x]),P[x]=!0)}}function Nt(u,w,E,P,k,d,b,x,T){if(Array.isArray(k)){k=Array.prototype.slice.call(k);for(let A=0,M=k.length;A<M;A+=1)Array.isArray(k[A])&&D(u,"nested arrays are not supported inside keys"),typeof k=="object"&&$(k[A])==="[object Object]"&&(k[A]="[object Object]")}if(typeof k=="object"&&$(k)==="[object Object]"&&(k="[object Object]"),k=String(k),w===null&&(w={}),P==="tag:yaml.org,2002:merge")if(Array.isArray(d)){d.length>100&&D(u,"abnormal merge sequence size");for(let A=0,M=d.length;A<M;A+=1)On(u,w,d[A],E)}else On(u,w,d,E);else!u.json&&!i.call(E,k)&&i.call(w,k)&&(u.line=b||u.line,u.lineStart=x||u.lineStart,u.position=T||u.position,D(u,"duplicated mapping key")),Pe(w,k,d),delete E[k];return w}function Vn(u){let w=u.input.charCodeAt(u.position);w===10?u.position++:w===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):D(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function $e(u,w,E){let P=0,k=u.input.charCodeAt(u.position);for(;k!==0;){for(;_(k);)k===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),k=u.input.charCodeAt(++u.position);if(w&&k===35)do k=u.input.charCodeAt(++u.position);while(k!==10&&k!==13&&k!==0);if(I(k))for(Vn(u),k=u.input.charCodeAt(u.position),P++,u.lineIndent=0;k===32;)u.lineIndent++,k=u.input.charCodeAt(++u.position);else break}return E!==-1&&P!==0&&u.lineIndent<E&&qr(u,"deficient indentation"),P}function St(u){let w=u.position,E=u.input.charCodeAt(w);return!!((E===45||E===46)&&E===u.input.charCodeAt(w+1)&&E===u.input.charCodeAt(w+2)&&(w+=3,E=u.input.charCodeAt(w),E===0||R(E)))}function Hr(u,w){w===1?u.result+=" ":w>1&&(u.result+=e.repeat(`
10
- `,w-1))}function so(u,w,E){let P,k,d,b,x,T,A=u.kind,M=u.result,C=u.input.charCodeAt(u.position);if(R(C)||N(C)||C===35||C===38||C===42||C===33||C===124||C===62||C===39||C===34||C===37||C===64||C===96)return!1;if(C===63||C===45){let O=u.input.charCodeAt(u.position+1);if(R(O)||E&&N(O))return!1}for(u.kind="scalar",u.result="",P=k=u.position,d=!1;C!==0;){if(C===58){let O=u.input.charCodeAt(u.position+1);if(R(O)||E&&N(O))break}else if(C===35){let O=u.input.charCodeAt(u.position-1);if(R(O))break}else{if(u.position===u.lineStart&&St(u)||E&&N(C))break;if(I(C))if(b=u.line,x=u.lineStart,T=u.lineIndent,$e(u,!1,-1),u.lineIndent>=w){d=!0,C=u.input.charCodeAt(u.position);continue}else{u.position=k,u.line=b,u.lineStart=x,u.lineIndent=T;break}}d&&(Qe(u,P,k,!1),Hr(u,u.line-b),P=k=u.position,d=!1),_(C)||(k=u.position+1),C=u.input.charCodeAt(++u.position)}return Qe(u,P,k,!1),u.result?!0:(u.kind=A,u.result=M,!1)}function Ln(u,w){let E,P,k=u.input.charCodeAt(u.position);if(k!==39)return!1;for(u.kind="scalar",u.result="",u.position++,E=P=u.position;(k=u.input.charCodeAt(u.position))!==0;)if(k===39)if(Qe(u,E,u.position,!0),k=u.input.charCodeAt(++u.position),k===39)E=u.position,u.position++,P=u.position;else return!0;else I(k)?(Qe(u,E,P,!0),Hr(u,$e(u,!1,w)),E=P=u.position):u.position===u.lineStart&&St(u)?D(u,"unexpected end of the document within a single quoted scalar"):(u.position++,_(k)||(P=u.position));D(u,"unexpected end of the stream within a single quoted scalar")}function ao(u,w){let E,P,k,d=u.input.charCodeAt(u.position);if(d!==34)return!1;for(u.kind="scalar",u.result="",u.position++,E=P=u.position;(d=u.input.charCodeAt(u.position))!==0;){if(d===34)return Qe(u,E,u.position,!0),u.position++,!0;if(d===92){if(Qe(u,E,u.position,!0),d=u.input.charCodeAt(++u.position),I(d))$e(u,!1,w);else if(d<256&&we[d])u.result+=ze[d],u.position++;else if((k=U(d))>0){let b=k,x=0;for(;b>0;b--)d=u.input.charCodeAt(++u.position),(k=j(d))>=0?x=(x<<4)+k:D(u,"expected hexadecimal character");u.result+=be(x),u.position++}else D(u,"unknown escape sequence");E=P=u.position}else I(d)?(Qe(u,E,P,!0),Hr(u,$e(u,!1,w)),E=P=u.position):u.position===u.lineStart&&St(u)?D(u,"unexpected end of the document within a double quoted scalar"):(u.position++,_(d)||(P=u.position))}D(u,"unexpected end of the stream within a double quoted scalar")}function lo(u,w){let E=!0,P,k,d,b=u.tag,x,T=u.anchor,A,M,C,O,q=Object.create(null),z,J,Q,te=u.input.charCodeAt(u.position);if(te===91)A=93,O=!1,x=[];else if(te===123)A=125,O=!0,x={};else return!1;for(u.anchor!==null&&At(u,u.anchor,x),te=u.input.charCodeAt(++u.position);te!==0;){if($e(u,!0,w),te=u.input.charCodeAt(u.position),te===A)return u.position++,u.tag=b,u.anchor=T,u.kind=O?"mapping":"sequence",u.result=x,!0;if(E?te===44&&D(u,"expected the node content, but found ','"):D(u,"missed comma between flow collection entries"),J=z=Q=null,M=C=!1,te===63){let Xt=u.input.charCodeAt(u.position+1);R(Xt)&&(M=C=!0,u.position++,$e(u,!0,w))}P=u.line,k=u.lineStart,d=u.position,Yt(u,w,o,!1,!0),J=u.tag,z=u.result,$e(u,!0,w),te=u.input.charCodeAt(u.position),(C||u.line===P)&&te===58&&(M=!0,te=u.input.charCodeAt(++u.position),$e(u,!0,w),Yt(u,w,o,!1,!0),Q=u.result),O?Nt(u,x,q,J,z,Q,P,k,d):M?x.push(Nt(u,null,q,J,z,Q,P,k,d)):x.push(z),$e(u,!0,w),te=u.input.charCodeAt(u.position),te===44?(E=!0,te=u.input.charCodeAt(++u.position)):E=!1}D(u,"unexpected end of the stream within a flow collection")}function Kt(u,w){let E,P=l,k=!1,d=!1,b=w,x=0,T=!1,A,M=u.input.charCodeAt(u.position);if(M===124)E=!1;else if(M===62)E=!0;else return!1;for(u.kind="scalar",u.result="";M!==0;)if(M=u.input.charCodeAt(++u.position),M===43||M===45)l===P?P=M===43?f:p:D(u,"repeat of a chomping mode identifier");else if((A=oe(M))>=0)A===0?D(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):d?D(u,"repeat of an indentation width identifier"):(b=w+A-1,d=!0);else break;if(_(M)){do M=u.input.charCodeAt(++u.position);while(_(M));if(M===35)do M=u.input.charCodeAt(++u.position);while(!I(M)&&M!==0)}for(;M!==0;){for(Vn(u),u.lineIndent=0,M=u.input.charCodeAt(u.position);(!d||u.lineIndent<b)&&M===32;)u.lineIndent++,M=u.input.charCodeAt(++u.position);if(!d&&u.lineIndent>b&&(b=u.lineIndent),I(M)){x++;continue}if(!d&&b===0&&D(u,"missing indentation for block scalar"),u.lineIndent<b){P===f?u.result+=e.repeat(`
3
+ `+r.mark.snippet),o+" "+i):o}function t(r,n){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=n,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(n){return this.name+": "+e(this,n)},_a=t,_a}function Gb(){if(sp)return Sa;sp=1;let e=Gn();function t(i,o,s,a,c){let l="",p="",f=Math.floor(c/2)-1;return a-o>f&&(l=" ... ",o=a-f+l.length),s-a>f&&(p=" ...",s=a+f-p.length),{str:l+i.slice(o,s).replace(/\t/g,"\u2192")+p,pos:a-o+l.length}}function r(i,o){return e.repeat(" ",o-i.length)+i}function n(i,o){if(o=Object.create(o||null),!i.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);let s=/\r?\n|\r|\0/g,a=[0],c=[],l,p=-1;for(;l=s.exec(i.buffer);)c.push(l.index),a.push(l.index+l[0].length),i.position<=l.index&&p<0&&(p=a.length-2);p<0&&(p=a.length-1);let f="",d=Math.min(i.line+o.linesAfter,c.length).toString().length,m=o.maxLength-(o.indent+d+3);for(let g=1;g<=o.linesBefore&&!(p-g<0);g++){let v=t(i.buffer,a[p-g],c[p-g],i.position-(a[p]-a[p-g]),m);f=e.repeat(" ",o.indent)+r((i.line-g+1).toString(),d)+" | "+v.str+`
4
+ `+f}let y=t(i.buffer,a[p],c[p],i.position,m);f+=e.repeat(" ",o.indent)+r((i.line+1).toString(),d)+" | "+y.str+`
5
+ `,f+=e.repeat("-",o.indent+d+3+y.pos)+`^
6
+ `;for(let g=1;g<=o.linesAfter&&!(p+g>=c.length);g++){let v=t(i.buffer,a[p+g],c[p+g],i.position-(a[p]-a[p+g]),m);f+=e.repeat(" ",o.indent)+r((i.line+g+1).toString(),d)+" | "+v.str+`
7
+ `}return f.replace(/\n$/,"")}return Sa=n,Sa}function qe(){if(ap)return ka;ap=1;let e=Jn(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function n(o){let s={};return o!==null&&Object.keys(o).forEach(function(a){o[a].forEach(function(c){s[String(c)]=a})}),s}function i(o,s){if(s=s||{},Object.keys(s).forEach(function(a){if(t.indexOf(a)===-1)throw new e('Unknown option "'+a+'" is met in definition of "'+o+'" YAML type.')}),this.options=s,this.tag=o,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(a){return a},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=n(s.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return ka=i,ka}function Ip(){if(lp)return Ca;lp=1;let e=Jn(),t=qe();function r(o,s){let a=[];return o[s].forEach(function(c){let l=a.length;a.forEach(function(p,f){p.tag===c.tag&&p.kind===c.kind&&p.multi===c.multi&&(l=f)}),a[l]=c}),a}function n(){let o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function s(a){a.multi?(o.multi[a.kind].push(a),o.multi.fallback.push(a)):o[a.kind][a.tag]=o.fallback[a.tag]=a}for(let a=0,c=arguments.length;a<c;a+=1)arguments[a].forEach(s);return o}function i(o){return this.extend(o)}return i.prototype.extend=function(s){let a=[],c=[];if(s instanceof t)c.push(s);else if(Array.isArray(s))c=c.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit)))s.implicit&&(a=a.concat(s.implicit)),s.explicit&&(c=c.concat(s.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(p){if(!(p instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(p.loadKind&&p.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(p.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),c.forEach(function(p){if(!(p instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let l=Object.create(i.prototype);return l.implicit=(this.implicit||[]).concat(a),l.explicit=(this.explicit||[]).concat(c),l.compiledImplicit=r(l,"implicit"),l.compiledExplicit=r(l,"explicit"),l.compiledTypeMap=n(l.compiledImplicit,l.compiledExplicit),l},Ca=i,Ca}function Rp(){if(cp)return Ea;cp=1;let e=qe();return Ea=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),Ea}function Tp(){if(up)return Pa;up=1;let e=qe();return Pa=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),Pa}function Ap(){if(fp)return Ia;fp=1;let e=qe();return Ia=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Ia}function Np(){if(pp)return Ra;pp=1;let e=Ip();return Ra=new e({explicit:[Rp(),Tp(),Ap()]}),Ra}function Op(){if(dp)return Ta;dp=1;let e=qe();function t(i){if(i===null)return!0;let o=i.length;return o===1&&i==="~"||o===4&&(i==="null"||i==="Null"||i==="NULL")}function r(){return null}function n(i){return i===null}return Ta=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:n,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),Ta}function Mp(){if(hp)return Aa;hp=1;let e=qe();function t(i){if(i===null)return!1;let o=i.length;return o===4&&(i==="true"||i==="True"||i==="TRUE")||o===5&&(i==="false"||i==="False"||i==="FALSE")}function r(i){return i==="true"||i==="True"||i==="TRUE"}function n(i){return Object.prototype.toString.call(i)==="[object Boolean]"}return Aa=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:n,represent:{lowercase:function(i){return i?"true":"false"},uppercase:function(i){return i?"TRUE":"FALSE"},camelcase:function(i){return i?"True":"False"}},defaultStyle:"lowercase"}),Aa}function Vp(){if(mp)return Na;mp=1;let e=Gn(),t=qe();function r(l){return l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102}function n(l){return l>=48&&l<=55}function i(l){return l>=48&&l<=57}function o(l){if(l===null)return!1;let p=l.length,f=0,d=!1;if(!p)return!1;let m=l[f];if((m==="-"||m==="+")&&(m=l[++f]),m==="0"){if(f+1===p)return!0;if(m=l[++f],m==="b"){for(f++;f<p;f++){if(m=l[f],m!=="0"&&m!=="1")return!1;d=!0}return d&&isFinite(s(l))}if(m==="x"){for(f++;f<p;f++){if(!r(l.charCodeAt(f)))return!1;d=!0}return d&&isFinite(s(l))}if(m==="o"){for(f++;f<p;f++){if(!n(l.charCodeAt(f)))return!1;d=!0}return d&&isFinite(s(l))}}for(;f<p;f++){if(!i(l.charCodeAt(f)))return!1;d=!0}return d?isFinite(s(l)):!1}function s(l){let p=l,f=1,d=p[0];if((d==="-"||d==="+")&&(d==="-"&&(f=-1),p=p.slice(1),d=p[0]),p==="0")return 0;if(d==="0"){if(p[1]==="b")return f*parseInt(p.slice(2),2);if(p[1]==="x")return f*parseInt(p.slice(2),16);if(p[1]==="o")return f*parseInt(p.slice(2),8)}return f*parseInt(p,10)}function a(l){return s(l)}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&l%1===0&&!e.isNegativeZero(l)}return Na=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:a,predicate:c,represent:{binary:function(l){return l>=0?"0b"+l.toString(2):"-0b"+l.toString(2).slice(1)},octal:function(l){return l>=0?"0o"+l.toString(8):"-0o"+l.toString(8).slice(1)},decimal:function(l){return l.toString(10)},hexadecimal:function(l){return l>=0?"0x"+l.toString(16).toUpperCase():"-0x"+l.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Na}function Lp(){if(gp)return Oa;gp=1;let e=Gn(),t=qe(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),n=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function i(l){return l===null||!r.test(l)?!1:isFinite(parseFloat(l,10))?!0:n.test(l)}function o(l){let p=l.toLowerCase(),f=p[0]==="-"?-1:1;return"+-".indexOf(p[0])>=0&&(p=p.slice(1)),p===".inf"?f===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:p===".nan"?NaN:f*parseFloat(p,10)}let s=/^[-+]?[0-9]+e/;function a(l,p){if(isNaN(l))switch(p){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===l)switch(p){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===l)switch(p){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(l))return"-0.0";let f=l.toString(10);return s.test(f)?f.replace("e",".e"):f}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&(l%1!==0||e.isNegativeZero(l))}return Oa=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:o,predicate:c,represent:a,defaultStyle:"lowercase"}),Oa}function jp(){return yp||(yp=1,Ma=Np().extend({implicit:[Op(),Mp(),Vp(),Lp()]})),Ma}function Dp(){return vp||(vp=1,Va=jp()),Va}function Fp(){if(wp)return La;wp=1;let e=qe(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=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 n(s){return s===null?!1:t.exec(s)!==null||r.exec(s)!==null}function i(s){let a=0,c=null,l=t.exec(s);if(l===null&&(l=r.exec(s)),l===null)throw new Error("Date resolve error");let p=+l[1],f=+l[2]-1,d=+l[3];if(!l[4])return new Date(Date.UTC(p,f,d));let m=+l[4],y=+l[5],g=+l[6];if(l[7]){for(a=l[7].slice(0,3);a.length<3;)a+="0";a=+a}if(l[9]){let b=+l[10],I=+(l[11]||0);c=(b*60+I)*6e4,l[9]==="-"&&(c=-c)}let v=new Date(Date.UTC(p,f,d,m,y,g,a));return c&&v.setTime(v.getTime()-c),v}function o(s){return s.toISOString()}return La=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n,construct:i,instanceOf:Date,represent:o}),La}function qp(){if(bp)return ja;bp=1;let e=qe();function t(r){return r==="<<"||r===null}return ja=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),ja}function Bp(){if($p)return Da;$p=1;let e=qe(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
8
+ \r`;function r(s){if(s===null)return!1;let a=0,c=s.length,l=t;for(let p=0;p<c;p++){let f=l.indexOf(s.charAt(p));if(!(f>64)){if(f<0)return!1;a+=6}}return a%8===0}function n(s){let a=s.replace(/[\r\n=]/g,""),c=a.length,l=t,p=0,f=[];for(let m=0;m<c;m++)m%4===0&&m&&(f.push(p>>16&255),f.push(p>>8&255),f.push(p&255)),p=p<<6|l.indexOf(a.charAt(m));let d=c%4*6;return d===0?(f.push(p>>16&255),f.push(p>>8&255),f.push(p&255)):d===18?(f.push(p>>10&255),f.push(p>>2&255)):d===12&&f.push(p>>4&255),new Uint8Array(f)}function i(s){let a="",c=0,l=s.length,p=t;for(let d=0;d<l;d++)d%3===0&&d&&(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]),c=(c<<8)+s[d];let f=l%3;return f===0?(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]):f===2?(a+=p[c>>10&63],a+=p[c>>4&63],a+=p[c<<2&63],a+=p[64]):f===1&&(a+=p[c>>2&63],a+=p[c<<4&63],a+=p[64],a+=p[64]),a}function o(s){return Object.prototype.toString.call(s)==="[object Uint8Array]"}return Da=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:n,predicate:o,represent:i}),Da}function Hp(){if(xp)return Fa;xp=1;let e=qe(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(o){if(o===null)return!0;let s={},a=o;for(let c=0,l=a.length;c<l;c+=1){let p=a[c],f=!1;if(r.call(p)!=="[object Object]")return!1;let d;for(d in p)if(t.call(p,d))if(!f)f=!0;else return!1;if(!f||t.call(s,d))return!1;Object.defineProperty(s,d,{value:!0})}return!0}function i(o){return o!==null?o:[]}return Fa=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:n,construct:i}),Fa}function Wp(){if(_p)return qa;_p=1;let e=qe(),t=Object.prototype.toString;function r(i){if(i===null)return!0;let o=i,s=new Array(o.length);for(let a=0,c=o.length;a<c;a+=1){let l=o[a];if(t.call(l)!=="[object Object]")return!1;let p=Object.keys(l);if(p.length!==1)return!1;s[a]=[p[0],l[p[0]]]}return!0}function n(i){if(i===null)return[];let o=i,s=new Array(o.length);for(let a=0,c=o.length;a<c;a+=1){let l=o[a],p=Object.keys(l);s[a]=[p[0],l[p[0]]]}return s}return qa=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:n}),qa}function Up(){if(Sp)return Ba;Sp=1;let e=qe(),t=Object.prototype.hasOwnProperty;function r(i){if(i===null)return!0;let o=i;for(let s in o)if(t.call(o,s)&&o[s]!==null)return!1;return!0}function n(i){return i!==null?i:{}}return Ba=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:n}),Ba}function Ua(){return kp||(kp=1,Ha=Dp().extend({implicit:[Fp(),qp()],explicit:[Bp(),Hp(),Wp(),Up()]})),Ha}function Jb(){if(Cp)return mo;Cp=1;let e=Gn(),t=Jn(),r=Gb(),n=Ua(),i=Object.prototype.hasOwnProperty,o=1,s=2,a=3,c=4,l=1,p=2,f=3,d=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/[\x85\u2028\u2029]/,y=/[,\[\]{}]/,g=/^(?:!|!!|![0-9A-Za-z-]+!)$/,v=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function b(u){return Object.prototype.toString.call(u)}function I(u){return u===10||u===13}function _(u){return u===9||u===32}function R(u){return u===9||u===32||u===10||u===13}function N(u){return u===44||u===91||u===93||u===123||u===125}function j(u){if(u>=48&&u<=57)return u-48;let w=u|32;return w>=97&&w<=102?w-97+10:-1}function U(u){return u===120?2:u===117?4:u===85?8:0}function oe(u){return u>=48&&u<=57?u-48:-1}function me(u){switch(u){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 be(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function Pe(u,w,E){w==="__proto__"?Object.defineProperty(u,w,{configurable:!0,enumerable:!0,writable:!0,value:E}):u[w]=E}let we=new Array(256),ze=new Array(256);for(let u=0;u<256;u++)we[u]=me(u)?1:0,ze[u]=me(u);function fe(u,w){this.input=u,this.filename=w.filename||null,this.schema=w.schema||n,this.onWarning=w.onWarning||null,this.legacy=w.legacy||!1,this.json=w.json||!1,this.listener=w.listener||null,this.maxDepth=typeof w.maxDepth=="number"?w.maxDepth:100,this.maxTotalMergeKeys=typeof w.maxTotalMergeKeys=="number"?w.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=u.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function Y(u,w){let E={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return E.snippet=r(E),new t(w,E)}function D(u,w){throw Y(u,w)}function zr(u,w){u.onWarning&&u.onWarning.call(null,Y(u,w))}function Nt(u,w,E){let P=u.anchorMapTransactions;if(P.length!==0){let k=P[P.length-1];i.call(k,w)||(k[w]={existed:i.call(u.anchorMap,w),value:u.anchorMap[w]})}u.anchorMap[w]=E}function ga(u){u.anchorMapTransactions.push(Object.create(null))}function mr(u){let w=u.anchorMapTransactions.pop(),E=u.anchorMapTransactions;if(E.length===0)return;let P=E[E.length-1],k=Object.keys(w);for(let h=0,$=k.length;h<$;h+=1){let x=k[h];i.call(P,x)||(P[x]=w[x])}}function ya(u){let w=u.anchorMapTransactions.pop(),E=Object.keys(w);for(let P=E.length-1;P>=0;P-=1){let k=w[E[P]];k.existed?u.anchorMap[E[P]]=k.value:delete u.anchorMap[E[P]]}}function Fn(u){return{position:u.position,line:u.line,lineStart:u.lineStart,lineIndent:u.lineIndent,firstTabInLine:u.firstTabInLine,tag:u.tag,anchor:u.anchor,kind:u.kind,result:u.result}}function Gr(u,w){u.position=w.position,u.line=w.line,u.lineStart=w.lineStart,u.lineIndent=w.lineIndent,u.firstTabInLine=w.firstTabInLine,u.tag=w.tag,u.anchor=w.anchor,u.kind=w.kind,u.result=w.result}let oo={YAML:function(w,E,P){w.version!==null&&D(w,"duplication of %YAML directive"),P.length!==1&&D(w,"YAML directive accepts exactly one argument");let k=/^([0-9]+)\.([0-9]+)$/.exec(P[0]);k===null&&D(w,"ill-formed argument of the YAML directive");let h=parseInt(k[1],10),$=parseInt(k[2],10);h!==1&&D(w,"unacceptable YAML version of the document"),w.version=P[0],w.checkLineBreaks=$<2,$!==1&&$!==2&&zr(w,"unsupported YAML version of the document")},TAG:function(w,E,P){let k;P.length!==2&&D(w,"TAG directive accepts exactly two arguments");let h=P[0];k=P[1],g.test(h)||D(w,"ill-formed tag handle (first argument) of the TAG directive"),i.call(w.tagMap,h)&&D(w,'there is a previously declared suffix for "'+h+'" tag handle'),v.test(k)||D(w,"ill-formed tag prefix (second argument) of the TAG directive");try{k=decodeURIComponent(k)}catch{D(w,"tag prefix is malformed: "+k)}w.tagMap[h]=k}};function Qe(u,w,E,P){if(w<E){let k=u.input.slice(w,E);if(P)for(let h=0,$=k.length;h<$;h+=1){let x=k.charCodeAt(h);x===9||x>=32&&x<=1114111||D(u,"expected valid JSON character")}else d.test(k)&&D(u,"the stream contains non-printable characters");u.result+=k}}function Yt(u){u.totalMergeKeys++,u.maxTotalMergeKeys!==-1&&u.totalMergeKeys>u.maxTotalMergeKeys&&D(u,"merge keys exceeded maxTotalMergeKeys ("+u.maxTotalMergeKeys+")")}function qn(u,w,E,P){e.isObject(E)||D(u,"cannot merge mappings; the provided source object is unacceptable"),Yt(u);let k=Object.keys(E);for(let h=0,$=k.length;h<$;h+=1){let x=k[h];Yt(u),i.call(w,x)||(Pe(w,x,E[x]),P[x]=!0)}}function Ot(u,w,E,P,k,h,$,x,T){if(Array.isArray(k)){k=Array.prototype.slice.call(k);for(let A=0,O=k.length;A<O;A+=1)Array.isArray(k[A])&&D(u,"nested arrays are not supported inside keys"),typeof k=="object"&&b(k[A])==="[object Object]"&&(k[A]="[object Object]")}if(typeof k=="object"&&b(k)==="[object Object]"&&(k="[object Object]"),k=String(k),w===null&&(w={}),P==="tag:yaml.org,2002:merge")if(Array.isArray(h)){h.length>100&&D(u,"abnormal merge sequence size");for(let A=0,O=h.length;A<O;A+=1)qn(u,w,h[A],E)}else qn(u,w,h,E);else!u.json&&!i.call(E,k)&&i.call(w,k)&&(u.line=$||u.line,u.lineStart=x||u.lineStart,u.position=T||u.position,D(u,"duplicated mapping key")),Pe(w,k,h),delete E[k];return w}function Bn(u){let w=u.input.charCodeAt(u.position);w===10?u.position++:w===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):D(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function $e(u,w,E){let P=0,k=u.input.charCodeAt(u.position);for(;k!==0;){for(;_(k);)k===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),k=u.input.charCodeAt(++u.position);if(w&&k===35)do k=u.input.charCodeAt(++u.position);while(k!==10&&k!==13&&k!==0);if(I(k))for(Bn(u),k=u.input.charCodeAt(u.position),P++,u.lineIndent=0;k===32;)u.lineIndent++,k=u.input.charCodeAt(++u.position);else break}return E!==-1&&P!==0&&u.lineIndent<E&&zr(u,"deficient indentation"),P}function kt(u){let w=u.position,E=u.input.charCodeAt(w);return!!((E===45||E===46)&&E===u.input.charCodeAt(w+1)&&E===u.input.charCodeAt(w+2)&&(w+=3,E=u.input.charCodeAt(w),E===0||R(E)))}function Jr(u,w){w===1?u.result+=" ":w>1&&(u.result+=e.repeat(`
10
+ `,w-1))}function so(u,w,E){let P,k,h,$,x,T,A=u.kind,O=u.result,C=u.input.charCodeAt(u.position);if(R(C)||N(C)||C===35||C===38||C===42||C===33||C===124||C===62||C===39||C===34||C===37||C===64||C===96)return!1;if(C===63||C===45){let M=u.input.charCodeAt(u.position+1);if(R(M)||E&&N(M))return!1}for(u.kind="scalar",u.result="",P=k=u.position,h=!1;C!==0;){if(C===58){let M=u.input.charCodeAt(u.position+1);if(R(M)||E&&N(M))break}else if(C===35){let M=u.input.charCodeAt(u.position-1);if(R(M))break}else{if(u.position===u.lineStart&&kt(u)||E&&N(C))break;if(I(C))if($=u.line,x=u.lineStart,T=u.lineIndent,$e(u,!1,-1),u.lineIndent>=w){h=!0,C=u.input.charCodeAt(u.position);continue}else{u.position=k,u.line=$,u.lineStart=x,u.lineIndent=T;break}}h&&(Qe(u,P,k,!1),Jr(u,u.line-$),P=k=u.position,h=!1),_(C)||(k=u.position+1),C=u.input.charCodeAt(++u.position)}return Qe(u,P,k,!1),u.result?!0:(u.kind=A,u.result=O,!1)}function Hn(u,w){let E,P,k=u.input.charCodeAt(u.position);if(k!==39)return!1;for(u.kind="scalar",u.result="",u.position++,E=P=u.position;(k=u.input.charCodeAt(u.position))!==0;)if(k===39)if(Qe(u,E,u.position,!0),k=u.input.charCodeAt(++u.position),k===39)E=u.position,u.position++,P=u.position;else return!0;else I(k)?(Qe(u,E,P,!0),Jr(u,$e(u,!1,w)),E=P=u.position):u.position===u.lineStart&&kt(u)?D(u,"unexpected end of the document within a single quoted scalar"):(u.position++,_(k)||(P=u.position));D(u,"unexpected end of the stream within a single quoted scalar")}function ao(u,w){let E,P,k,h=u.input.charCodeAt(u.position);if(h!==34)return!1;for(u.kind="scalar",u.result="",u.position++,E=P=u.position;(h=u.input.charCodeAt(u.position))!==0;){if(h===34)return Qe(u,E,u.position,!0),u.position++,!0;if(h===92){if(Qe(u,E,u.position,!0),h=u.input.charCodeAt(++u.position),I(h))$e(u,!1,w);else if(h<256&&we[h])u.result+=ze[h],u.position++;else if((k=U(h))>0){let $=k,x=0;for(;$>0;$--)h=u.input.charCodeAt(++u.position),(k=j(h))>=0?x=(x<<4)+k:D(u,"expected hexadecimal character");u.result+=be(x),u.position++}else D(u,"unknown escape sequence");E=P=u.position}else I(h)?(Qe(u,E,P,!0),Jr(u,$e(u,!1,w)),E=P=u.position):u.position===u.lineStart&&kt(u)?D(u,"unexpected end of the document within a double quoted scalar"):(u.position++,_(h)||(P=u.position))}D(u,"unexpected end of the stream within a double quoted scalar")}function lo(u,w){let E=!0,P,k,h,$=u.tag,x,T=u.anchor,A,O,C,M,q=Object.create(null),z,J,Q,te=u.input.charCodeAt(u.position);if(te===91)A=93,M=!1,x=[];else if(te===123)A=125,M=!0,x={};else return!1;for(u.anchor!==null&&Nt(u,u.anchor,x),te=u.input.charCodeAt(++u.position);te!==0;){if($e(u,!0,w),te=u.input.charCodeAt(u.position),te===A)return u.position++,u.tag=$,u.anchor=T,u.kind=M?"mapping":"sequence",u.result=x,!0;if(E?te===44&&D(u,"expected the node content, but found ','"):D(u,"missed comma between flow collection entries"),J=z=Q=null,O=C=!1,te===63){let Zt=u.input.charCodeAt(u.position+1);R(Zt)&&(O=C=!0,u.position++,$e(u,!0,w))}P=u.line,k=u.lineStart,h=u.position,Qt(u,w,o,!1,!0),J=u.tag,z=u.result,$e(u,!0,w),te=u.input.charCodeAt(u.position),(C||u.line===P)&&te===58&&(O=!0,te=u.input.charCodeAt(++u.position),$e(u,!0,w),Qt(u,w,o,!1,!0),Q=u.result),M?Ot(u,x,q,J,z,Q,P,k,h):O?x.push(Ot(u,null,q,J,z,Q,P,k,h)):x.push(z),$e(u,!0,w),te=u.input.charCodeAt(u.position),te===44?(E=!0,te=u.input.charCodeAt(++u.position)):E=!1}D(u,"unexpected end of the stream within a flow collection")}function Xt(u,w){let E,P=l,k=!1,h=!1,$=w,x=0,T=!1,A,O=u.input.charCodeAt(u.position);if(O===124)E=!1;else if(O===62)E=!0;else return!1;for(u.kind="scalar",u.result="";O!==0;)if(O=u.input.charCodeAt(++u.position),O===43||O===45)l===P?P=O===43?f:p:D(u,"repeat of a chomping mode identifier");else if((A=oe(O))>=0)A===0?D(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):h?D(u,"repeat of an indentation width identifier"):($=w+A-1,h=!0);else break;if(_(O)){do O=u.input.charCodeAt(++u.position);while(_(O));if(O===35)do O=u.input.charCodeAt(++u.position);while(!I(O)&&O!==0)}for(;O!==0;){for(Bn(u),u.lineIndent=0,O=u.input.charCodeAt(u.position);(!h||u.lineIndent<$)&&O===32;)u.lineIndent++,O=u.input.charCodeAt(++u.position);if(!h&&u.lineIndent>$&&($=u.lineIndent),I(O)){x++;continue}if(!h&&$===0&&D(u,"missing indentation for block scalar"),u.lineIndent<$){P===f?u.result+=e.repeat(`
11
11
  `,k?1+x:x):P===l&&k&&(u.result+=`
12
- `);break}E?_(M)?(T=!0,u.result+=e.repeat(`
12
+ `);break}E?_(O)?(T=!0,u.result+=e.repeat(`
13
13
  `,k?1+x:x)):T?(T=!1,u.result+=e.repeat(`
14
14
  `,x+1)):x===0?k&&(u.result+=" "):u.result+=e.repeat(`
15
15
  `,x):u.result+=e.repeat(`
16
- `,k?1+x:x),k=!0,d=!0,x=0;let C=u.position;for(;!I(M)&&M!==0;)M=u.input.charCodeAt(++u.position);Qe(u,C,u.position,!1)}return!0}function co(u,w){let E=u.tag,P=u.anchor,k=[],d=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&At(u,u.anchor,k);let b=u.input.charCodeAt(u.position);for(;b!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation")),b===45);){let x=u.input.charCodeAt(u.position+1);if(!R(x))break;if(d=!0,u.position++,$e(u,!0,-1)&&u.lineIndent<=w){k.push(null),b=u.input.charCodeAt(u.position);continue}let T=u.line;if(Yt(u,w,a,!1,!0),k.push(u.result),$e(u,!0,-1),b=u.input.charCodeAt(u.position),(u.line===T||u.lineIndent>w)&&b!==0)D(u,"bad indentation of a sequence entry");else if(u.lineIndent<w)break}return d?(u.tag=E,u.anchor=P,u.kind="sequence",u.result=k,!0):!1}function uo(u,w,E){let P,k,d,b,x=u.tag,T=u.anchor,A={},M=Object.create(null),C=null,O=null,q=null,z=!1,J=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&At(u,u.anchor,A);let Q=u.input.charCodeAt(u.position);for(;Q!==0;){!z&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation"));let te=u.input.charCodeAt(u.position+1),Xt=u.line;if((Q===63||Q===58)&&R(te))Q===63?(z&&(Nt(u,A,M,C,O,null,k,d,b),C=O=q=null),J=!0,z=!0,P=!0):z?(z=!1,P=!0):D(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,Q=te;else{if(k=u.line,d=u.lineStart,b=u.position,!Yt(u,E,s,!1,!0))break;if(u.line===Xt){for(Q=u.input.charCodeAt(u.position);_(Q);)Q=u.input.charCodeAt(++u.position);if(Q===58)Q=u.input.charCodeAt(++u.position),R(Q)||D(u,"a whitespace character is expected after the key-value separator within a block mapping"),z&&(Nt(u,A,M,C,O,null,k,d,b),C=O=q=null),J=!0,z=!1,P=!1,C=u.tag,O=u.result;else if(J)D(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=x,u.anchor=T,!0}else if(J)D(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=x,u.anchor=T,!0}if((u.line===Xt||u.lineIndent>w)&&(z&&(k=u.line,d=u.lineStart,b=u.position),Yt(u,w,c,!0,P)&&(z?O=u.result:q=u.result),z||(Nt(u,A,M,C,O,q,k,d,b),C=O=q=null),$e(u,!0,-1),Q=u.input.charCodeAt(u.position)),(u.line===Xt||u.lineIndent>w)&&Q!==0)D(u,"bad indentation of a mapping entry");else if(u.lineIndent<w)break}return z&&Nt(u,A,M,C,O,null,k,d,b),J&&(u.tag=x,u.anchor=T,u.kind="mapping",u.result=A),J}function fo(u){let w=!1,E=!1,P,k,d=u.input.charCodeAt(u.position);if(d!==33)return!1;u.tag!==null&&D(u,"duplication of a tag property"),d=u.input.charCodeAt(++u.position),d===60?(w=!0,d=u.input.charCodeAt(++u.position)):d===33?(E=!0,P="!!",d=u.input.charCodeAt(++u.position)):P="!";let b=u.position;if(w){do d=u.input.charCodeAt(++u.position);while(d!==0&&d!==62);u.position<u.length?(k=u.input.slice(b,u.position),d=u.input.charCodeAt(++u.position)):D(u,"unexpected end of the stream within a verbatim tag")}else{for(;d!==0&&!R(d);)d===33&&(E?D(u,"tag suffix cannot contain exclamation marks"):(P=u.input.slice(b-1,u.position+1),g.test(P)||D(u,"named tag handle cannot contain such characters"),E=!0,b=u.position+1)),d=u.input.charCodeAt(++u.position);k=u.input.slice(b,u.position),y.test(k)&&D(u,"tag suffix cannot contain flow indicator characters")}k&&!v.test(k)&&D(u,"tag name cannot contain such characters: "+k);try{k=decodeURIComponent(k)}catch{D(u,"tag name is malformed: "+k)}return w?u.tag=k:i.call(u.tagMap,P)?u.tag=u.tagMap[P]+k:P==="!"?u.tag="!"+k:P==="!!"?u.tag="tag:yaml.org,2002:"+k:D(u,'undeclared tag handle "'+P+'"'),!0}function po(u){let w=u.input.charCodeAt(u.position);if(w!==38)return!1;u.anchor!==null&&D(u,"duplication of an anchor property"),w=u.input.charCodeAt(++u.position);let E=u.position;for(;w!==0&&!R(w)&&!N(w);)w=u.input.charCodeAt(++u.position);return u.position===E&&D(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(E,u.position),!0}function ha(u){let w=u.input.charCodeAt(u.position);if(w!==42)return!1;w=u.input.charCodeAt(++u.position);let E=u.position;for(;w!==0&&!R(w)&&!N(w);)w=u.input.charCodeAt(++u.position);u.position===E&&D(u,"name of an alias node must contain at least one character");let P=u.input.slice(E,u.position);return i.call(u.anchorMap,P)||D(u,'unidentified alias "'+P+'"'),u.result=u.anchorMap[P],$e(u,!0,-1),!0}function ho(u,w,E,P){let k=Mn(u);return pa(u),Br(u,w),u.tag=null,u.anchor=null,u.kind=null,u.result=null,uo(u,E,P)&&u.kind==="mapping"?(fr(u),!0):(da(u),Br(u,k),!1)}function Yt(u,w,E,P,k){let d,b,x=1,T=!1,A=!1,M=null,C,O,q;u.depth>=u.maxDepth&&D(u,"nesting exceeded maxDepth ("+u.maxDepth+")"),u.depth+=1,u.listener!==null&&u.listener("open",u),u.tag=null,u.anchor=null,u.kind=null,u.result=null;let z=d=b=c===E||a===E;if(P&&$e(u,!0,-1)&&(T=!0,u.lineIndent>w?x=1:u.lineIndent===w?x=0:u.lineIndent<w&&(x=-1)),x===1)for(;;){let J=u.input.charCodeAt(u.position),Q=Mn(u);if(T&&(J===33&&u.tag!==null||J===38&&u.anchor!==null)||!fo(u)&&!po(u))break;M===null&&(M=Q),$e(u,!0,-1)?(T=!0,b=z,u.lineIndent>w?x=1:u.lineIndent===w?x=0:u.lineIndent<w&&(x=-1)):b=!1}if(b&&(b=T||k),x===1||c===E)if(o===E||s===E?O=w:O=w+1,q=u.position-u.lineStart,x===1)if(b&&(co(u,q)||uo(u,q,O))||lo(u,O))A=!0;else{let J=u.input.charCodeAt(u.position);M!==null&&z&&!b&&J!==124&&J!==62&&ho(u,M,M.position-M.lineStart,O)||d&&Kt(u,O)||Ln(u,O)||ao(u,O)?A=!0:ha(u)?(A=!0,(u.tag!==null||u.anchor!==null)&&D(u,"alias node should not have any properties")):so(u,O,o===E)&&(A=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&At(u,u.anchor,u.result)}else x===0&&(A=b&&co(u,q));if(u.tag===null)u.anchor!==null&&At(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&D(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let J=0,Q=u.implicitTypes.length;J<Q;J+=1)if(C=u.implicitTypes[J],C.resolve(u.result)){u.result=C.construct(u.result),u.tag=C.tag,u.anchor!==null&&At(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(i.call(u.typeMap[u.kind||"fallback"],u.tag))C=u.typeMap[u.kind||"fallback"][u.tag];else{C=null;let J=u.typeMap.multi[u.kind||"fallback"];for(let Q=0,te=J.length;Q<te;Q+=1)if(u.tag.slice(0,J[Q].tag.length)===J[Q].tag){C=J[Q];break}}C||D(u,"unknown tag !<"+u.tag+">"),u.result!==null&&C.kind!==u.kind&&D(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+C.kind+'", not "'+u.kind+'"'),C.resolve(u.result,u.tag)?(u.result=C.construct(u.result,u.tag),u.anchor!==null&&At(u,u.anchor,u.result)):D(u,"cannot resolve a node with !<"+u.tag+"> explicit tag")}return u.listener!==null&&u.listener("close",u),u.depth-=1,u.tag!==null||u.anchor!==null||A}function ma(u){let w=u.position,E=!1,P;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(P=u.input.charCodeAt(u.position))!==0&&($e(u,!0,-1),P=u.input.charCodeAt(u.position),!(u.lineIndent>0||P!==37));){E=!0,P=u.input.charCodeAt(++u.position);let k=u.position;for(;P!==0&&!R(P);)P=u.input.charCodeAt(++u.position);let d=u.input.slice(k,u.position),b=[];for(d.length<1&&D(u,"directive name must not be less than one character in length");P!==0;){for(;_(P);)P=u.input.charCodeAt(++u.position);if(P===35){do P=u.input.charCodeAt(++u.position);while(P!==0&&!I(P));break}if(I(P))break;for(k=u.position;P!==0&&!R(P);)P=u.input.charCodeAt(++u.position);b.push(u.input.slice(k,u.position))}P!==0&&Vn(u),i.call(oo,d)?oo[d](u,d,b):qr(u,'unknown document directive "'+d+'"')}if($e(u,!0,-1),u.lineIndent===0&&u.input.charCodeAt(u.position)===45&&u.input.charCodeAt(u.position+1)===45&&u.input.charCodeAt(u.position+2)===45?(u.position+=3,$e(u,!0,-1)):E&&D(u,"directives end mark is expected"),Yt(u,u.lineIndent-1,c,!1,!0),$e(u,!0,-1),u.checkLineBreaks&&m.test(u.input.slice(w,u.position))&&qr(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&St(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,$e(u,!0,-1));return}u.position<u.length-1&&D(u,"end of the stream or a document separator is expected")}function jn(u,w){u=String(u),w=w||{},u.length!==0&&(u.charCodeAt(u.length-1)!==10&&u.charCodeAt(u.length-1)!==13&&(u+=`
17
- `),u.charCodeAt(0)===65279&&(u=u.slice(1)));let E=new fe(u,w),P=u.indexOf("\0");for(P!==-1&&(E.position=P,D(E,"null byte is not allowed in input")),E.input+="\0";E.input.charCodeAt(E.position)===32;)E.lineIndent+=1,E.position+=1;for(;E.position<E.length-1;)ma(E);return E.documents}function ga(u,w,E){w!==null&&typeof w=="object"&&typeof E>"u"&&(E=w,w=null);let P=jn(u,E);if(typeof w!="function")return P;for(let k=0,d=P.length;k<d;k+=1)w(P[k])}function ya(u,w){let E=jn(u,w);if(E.length!==0){if(E.length===1)return E[0];throw new t("expected a single document in the stream, but found more")}}return mo.loadAll=ga,mo.load=ya,mo}function Nb(){if(vp)return Fa;vp=1;let e=qn(),t=Bn(),r=qa(),n=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=65279,s=9,a=10,c=13,l=32,p=33,f=34,h=35,m=37,y=38,g=39,v=42,$=44,I=45,_=58,R=61,N=62,j=63,U=64,oe=91,me=93,be=96,Pe=123,we=124,ze=125,fe={};fe[0]="\\0",fe[7]="\\a",fe[8]="\\b",fe[9]="\\t",fe[10]="\\n",fe[11]="\\v",fe[12]="\\f",fe[13]="\\r",fe[27]="\\e",fe[34]='\\"',fe[92]="\\\\",fe[133]="\\N",fe[160]="\\_",fe[8232]="\\L",fe[8233]="\\P";let Y=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],D=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function qr(d,b){if(b===null)return{};let x={},T=Object.keys(b);for(let A=0,M=T.length;A<M;A+=1){let C=T[A],O=String(b[C]);C.slice(0,2)==="!!"&&(C="tag:yaml.org,2002:"+C.slice(2));let q=d.compiledTypeMap.fallback[C];q&&i.call(q.styleAliases,O)&&(O=q.styleAliases[O]),x[C]=O}return x}function At(d){let b,x,T=d.toString(16).toUpperCase();if(d<=255)b="x",x=2;else if(d<=65535)b="u",x=4;else if(d<=4294967295)b="U",x=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+b+e.repeat("0",x-T.length)+T}let pa=1,fr=2;function da(d){this.schema=d.schema||r,this.indent=Math.max(1,d.indent||2),this.noArrayIndent=d.noArrayIndent||!1,this.skipInvalid=d.skipInvalid||!1,this.flowLevel=e.isNothing(d.flowLevel)?-1:d.flowLevel,this.styleMap=qr(this.schema,d.styles||null),this.sortKeys=d.sortKeys||!1,this.lineWidth=d.lineWidth||80,this.noRefs=d.noRefs||!1,this.noCompatMode=d.noCompatMode||!1,this.condenseFlow=d.condenseFlow||!1,this.quotingType=d.quotingType==='"'?fr:pa,this.forceQuotes=d.forceQuotes||!1,this.replacer=typeof d.replacer=="function"?d.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Mn(d,b){let x=e.repeat(" ",b),T=0,A="",M=d.length;for(;T<M;){let C,O=d.indexOf(`
18
- `,T);O===-1?(C=d.slice(T),T=M):(C=d.slice(T,O+1),T=O+1),C.length&&C!==`
19
- `&&(A+=x),A+=C}return A}function Br(d,b){return`
20
- `+e.repeat(" ",d.indent*b)}function oo(d,b){for(let x=0,T=d.implicitTypes.length;x<T;x+=1)if(d.implicitTypes[x].resolve(b))return!0;return!1}function Qe(d){return d===l||d===s}function Jt(d){return d>=32&&d<=126||d>=161&&d<=55295&&d!==8232&&d!==8233||d>=57344&&d<=65533&&d!==o||d>=65536&&d<=1114111}function On(d){return Jt(d)&&d!==o&&d!==c&&d!==a}function Nt(d,b,x){let T=On(d),A=T&&!Qe(d);return(x?T:T&&d!==$&&d!==oe&&d!==me&&d!==Pe&&d!==ze)&&d!==h&&!(b===_&&!A)||On(b)&&!Qe(b)&&d===h||b===_&&A}function Vn(d){return Jt(d)&&d!==o&&!Qe(d)&&d!==I&&d!==j&&d!==_&&d!==$&&d!==oe&&d!==me&&d!==Pe&&d!==ze&&d!==h&&d!==y&&d!==v&&d!==p&&d!==we&&d!==R&&d!==N&&d!==g&&d!==f&&d!==m&&d!==U&&d!==be}function $e(d){return!Qe(d)&&d!==_}function St(d,b){let x=d.charCodeAt(b),T;return x>=55296&&x<=56319&&b+1<d.length&&(T=d.charCodeAt(b+1),T>=56320&&T<=57343)?(x-55296)*1024+T-56320+65536:x}function Hr(d){return/^\n* /.test(d)}let so=1,Ln=2,ao=3,lo=4,Kt=5;function co(d,b,x,T,A,M,C,O){let q,z=0,J=null,Q=!1,te=!1,Xt=T!==-1,Dn=-1,Fn=Vn(St(d,0))&&$e(St(d,d.length-1));if(b||C)for(q=0;q<d.length;z>=65536?q+=2:q++){if(z=St(d,q),!Jt(z))return Kt;Fn=Fn&&Nt(z,J,O),J=z}else{for(q=0;q<d.length;z>=65536?q+=2:q++){if(z=St(d,q),z===a)Q=!0,Xt&&(te=te||q-Dn-1>T&&d[Dn+1]!==" ",Dn=q);else if(!Jt(z))return Kt;Fn=Fn&&Nt(z,J,O),J=z}te=te||Xt&&q-Dn-1>T&&d[Dn+1]!==" "}return!Q&&!te?Fn&&!C&&!A(d)?so:M===fr?Kt:Ln:x>9&&Hr(d)?Kt:C?M===fr?Kt:Ln:te?lo:ao}function uo(d,b,x,T,A){d.dump=(function(){if(b.length===0)return d.quotingType===fr?'""':"''";if(!d.noCompatMode&&(Y.indexOf(b)!==-1||D.test(b)))return d.quotingType===fr?'"'+b+'"':"'"+b+"'";let M=d.indent*Math.max(1,x),C=d.lineWidth===-1?-1:Math.max(Math.min(d.lineWidth,40),d.lineWidth-M),O=T||d.flowLevel>-1&&x>=d.flowLevel;function q(z){return oo(d,z)}switch(co(b,O,d.indent,C,q,d.quotingType,d.forceQuotes&&!T,A)){case so:return b;case Ln:return"'"+b.replace(/'/g,"''")+"'";case ao:return"|"+fo(b,d.indent)+po(Mn(b,M));case lo:return">"+fo(b,d.indent)+po(Mn(ha(b,C),M));case Kt:return'"'+Yt(b)+'"';default:throw new t("impossible error: invalid scalar style")}})()}function fo(d,b){let x=Hr(d)?String(b):"",T=d[d.length-1]===`
21
- `,M=T&&(d[d.length-2]===`
22
- `||d===`
23
- `)?"+":T?"":"-";return x+M+`
24
- `}function po(d){return d[d.length-1]===`
25
- `?d.slice(0,-1):d}function ha(d,b){let x=/(\n+)([^\n]*)/g,T=(function(){let O=d.indexOf(`
26
- `);return O=O!==-1?O:d.length,x.lastIndex=O,ho(d.slice(0,O),b)})(),A=d[0]===`
27
- `||d[0]===" ",M,C;for(;C=x.exec(d);){let O=C[1],q=C[2];M=q[0]===" ",T+=O+(!A&&!M&&q!==""?`
28
- `:"")+ho(q,b),A=M}return T}function ho(d,b){if(d===""||d[0]===" ")return d;let x=/ [^ ]/g,T,A=0,M,C=0,O=0,q="";for(;T=x.exec(d);)O=T.index,O-A>b&&(M=C>A?C:O,q+=`
29
- `+d.slice(A,M),A=M+1),C=O;return q+=`
30
- `,d.length-A>b&&C>A?q+=d.slice(A,C)+`
31
- `+d.slice(C+1):q+=d.slice(A),q.slice(1)}function Yt(d){let b="",x=0;for(let T=0;T<d.length;x>=65536?T+=2:T++){x=St(d,T);let A=fe[x];!A&&Jt(x)?(b+=d[T],x>=65536&&(b+=d[T+1])):b+=A||At(x)}return b}function ma(d,b,x){let T="",A=d.tag;for(let M=0,C=x.length;M<C;M+=1){let O=x[M];d.replacer&&(O=d.replacer.call(x,String(M),O)),(w(d,b,O,!1,!1)||typeof O>"u"&&w(d,b,null,!1,!1))&&(T!==""&&(T+=","+(d.condenseFlow?"":" ")),T+=d.dump)}d.tag=A,d.dump="["+T+"]"}function jn(d,b,x,T){let A="",M=d.tag;for(let C=0,O=x.length;C<O;C+=1){let q=x[C];d.replacer&&(q=d.replacer.call(x,String(C),q)),(w(d,b+1,q,!0,!0,!1,!0)||typeof q>"u"&&w(d,b+1,null,!0,!0,!1,!0))&&((!T||A!=="")&&(A+=Br(d,b)),d.dump&&a===d.dump.charCodeAt(0)?A+="-":A+="- ",A+=d.dump)}d.tag=M,d.dump=A||"[]"}function ga(d,b,x){let T="",A=d.tag,M=Object.keys(x);for(let C=0,O=M.length;C<O;C+=1){let q="";T!==""&&(q+=", "),d.condenseFlow&&(q+='"');let z=M[C],J=x[z];d.replacer&&(J=d.replacer.call(x,z,J)),w(d,b,z,!1,!1)&&(d.dump.length>1024&&(q+="? "),q+=d.dump+(d.condenseFlow?'"':"")+":"+(d.condenseFlow?"":" "),w(d,b,J,!1,!1)&&(q+=d.dump,T+=q))}d.tag=A,d.dump="{"+T+"}"}function ya(d,b,x,T){let A="",M=d.tag,C=Object.keys(x);if(d.sortKeys===!0)C.sort();else if(typeof d.sortKeys=="function")C.sort(d.sortKeys);else if(d.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let O=0,q=C.length;O<q;O+=1){let z="";(!T||A!=="")&&(z+=Br(d,b));let J=C[O],Q=x[J];if(d.replacer&&(Q=d.replacer.call(x,J,Q)),!w(d,b+1,J,!0,!0,!0))continue;let te=d.tag!==null&&d.tag!=="?"||d.dump&&d.dump.length>1024;te&&(d.dump&&a===d.dump.charCodeAt(0)?z+="?":z+="? "),z+=d.dump,te&&(z+=Br(d,b)),w(d,b+1,Q,!0,te)&&(d.dump&&a===d.dump.charCodeAt(0)?z+=":":z+=": ",z+=d.dump,A+=z)}d.tag=M,d.dump=A||"{}"}function u(d,b,x){let T=x?d.explicitTypes:d.implicitTypes;for(let A=0,M=T.length;A<M;A+=1){let C=T[A];if((C.instanceOf||C.predicate)&&(!C.instanceOf||typeof b=="object"&&b instanceof C.instanceOf)&&(!C.predicate||C.predicate(b))){if(x?C.multi&&C.representName?d.tag=C.representName(b):d.tag=C.tag:d.tag="?",C.represent){let O=d.styleMap[C.tag]||C.defaultStyle,q;if(n.call(C.represent)==="[object Function]")q=C.represent(b,O);else if(i.call(C.represent,O))q=C.represent[O](b,O);else throw new t("!<"+C.tag+'> tag resolver accepts not "'+O+'" style');d.dump=q}return!0}}return!1}function w(d,b,x,T,A,M,C){d.tag=null,d.dump=x,u(d,x,!1)||u(d,x,!0);let O=n.call(d.dump),q=T;T&&(T=d.flowLevel<0||d.flowLevel>b);let z=O==="[object Object]"||O==="[object Array]",J,Q;if(z&&(J=d.duplicates.indexOf(x),Q=J!==-1),(d.tag!==null&&d.tag!=="?"||Q||d.indent!==2&&b>0)&&(A=!1),Q&&d.usedDuplicates[J])d.dump="*ref_"+J;else{if(z&&Q&&!d.usedDuplicates[J]&&(d.usedDuplicates[J]=!0),O==="[object Object]")T&&Object.keys(d.dump).length!==0?(ya(d,b,d.dump,A),Q&&(d.dump="&ref_"+J+d.dump)):(ga(d,b,d.dump),Q&&(d.dump="&ref_"+J+" "+d.dump));else if(O==="[object Array]")T&&d.dump.length!==0?(d.noArrayIndent&&!C&&b>0?jn(d,b-1,d.dump,A):jn(d,b,d.dump,A),Q&&(d.dump="&ref_"+J+d.dump)):(ma(d,b,d.dump),Q&&(d.dump="&ref_"+J+" "+d.dump));else if(O==="[object String]")d.tag!=="?"&&uo(d,d.dump,b,M,q);else{if(O==="[object Undefined]")return!1;if(d.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+O)}if(d.tag!==null&&d.tag!=="?"){let te=encodeURI(d.tag[0]==="!"?d.tag.slice(1):d.tag).replace(/!/g,"%21");d.tag[0]==="!"?te="!"+te:te.slice(0,18)==="tag:yaml.org,2002:"?te="!!"+te.slice(18):te="!<"+te+">",d.dump=te+" "+d.dump}}return!0}function E(d,b){let x=[],T=[];P(d,x,T);let A=T.length;for(let M=0;M<A;M+=1)b.duplicates.push(x[T[M]]);b.usedDuplicates=new Array(A)}function P(d,b,x){if(d!==null&&typeof d=="object"){let T=b.indexOf(d);if(T!==-1)x.indexOf(T)===-1&&x.push(T);else if(b.push(d),Array.isArray(d))for(let A=0,M=d.length;A<M;A+=1)P(d[A],b,x);else{let A=Object.keys(d);for(let M=0,C=A.length;M<C;M+=1)P(d[A[M]],b,x)}}}function k(d,b){b=b||{};let x=new da(b);x.noRefs||E(d,x);let T=d;return x.replacer&&(T=x.replacer.call({"":T},"",T)),w(x,0,T,!0,!0)?x.dump+`
32
- `:""}return Fa.dump=k,Fa}function Mb(){if(wp)return Me;wp=1;let e=Ab(),t=Nb();function r(n,i){return function(){throw new Error("Function yaml."+n+" is removed in js-yaml 4. Use yaml."+i+" instead, which is now safe by default.")}}return Me.Type=Fe(),Me.Schema=bp(),Me.FAILSAFE_SCHEMA=Sp(),Me.JSON_SCHEMA=Ip(),Me.CORE_SCHEMA=Rp(),Me.DEFAULT_SCHEMA=qa(),Me.load=e.load,Me.loadAll=e.loadAll,Me.dump=t.dump,Me.YAMLException=Bn(),Me.types={binary:Np(),float:Pp(),map:_p(),null:kp(),pairs:Op(),set:Vp(),timestamp:Tp(),bool:Cp(),int:Ep(),merge:Ap(),omap:Mp(),seq:xp(),str:$p()},Me.safeLoad=r("safeLoad","load"),Me.safeLoadAll=r("safeLoadAll","loadAll"),Me.safeDump=r("safeDump","dump"),Me}var Me,mo,Qt,Kf,wa,Yf,ba,Xf,$a,Qf,xa,Zf,_a,ep,Sa,tp,ka,rp,Ca,np,Ea,ip,Pa,op,Ia,sp,Ra,ap,Ta,lp,Aa,cp,Na,up,Ma,fp,Oa,pp,Va,dp,La,hp,ja,mp,Da,gp,yp,Fa,vp,wp,Ob,it,WR,UR,zR,GR,JR,KR,YR,XR,QR,ZR,eT,tT,rT,nT,Ur=K(()=>{Me={},mo={},Qt={};Fa={};Ob=Mb(),it=Rb(Ob),{Type:WR,Schema:UR,FAILSAFE_SCHEMA:zR,JSON_SCHEMA:GR,CORE_SCHEMA:JR,DEFAULT_SCHEMA:KR,load:YR,loadAll:XR,dump:QR,YAMLException:ZR,types:eT,safeLoad:tT,safeLoadAll:rT,safeDump:nT}=it});import{access as sT,readFile as Lp}from"node:fs/promises";import{dirname as Vb,relative as lT,resolve as Ce}from"node:path";async function Zt(e){let t=Ce(e),r=await Lp(t,"utf-8"),n=it.load(r);return Lb(t,n)}function Lb(e,t){let r=Ie(e);return{...t,openapi:Ce(r,t.openapi),bindings:Ce(r,t.bindings),microContractsConfig:Ce(r,t.microContractsConfig),viewsDir:Ce(r,t.viewsDir),generated:{contractDir:Ce(r,t.generated.contractDir),actions:Ce(r,t.generated.actions),bridge:Ce(r,t.generated.bridge),reactDir:Ce(r,t.generated.reactDir)},runtimeModule:t.runtimeModule?Ce(r,t.runtimeModule):t.componentsModule?Ce(r,t.componentsModule):void 0,themeModule:t.themeModule?Ce(r,t.themeModule):void 0,design:t.design?{tokens:t.design.tokens?Ce(r,t.design.tokens):void 0,theme:t.design.theme?Ce(r,t.design.theme):void 0,extensionsCss:t.design.extensionsCss?Ce(r,t.design.extensionsCss):void 0}:void 0,extensions:t.extensions?Ce(r,t.extensions):void 0}}async function jp(e){let t=await Lp(Ce(e),"utf-8");return it.load(t)}function Ie(e){return Vb(Ce(e))}function go(e){let t=e.design?.tokens,r=e.design?.theme;if(!t)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:t,themePath:r}}var Mt=K(()=>{"use strict";Ur()});import{readFileSync as jb}from"node:fs";import{createRequire as Db}from"node:module";import{dirname as Ba,resolve as Fb}from"node:path";import{fileURLToPath as qb}from"node:url";function Se(){if(zr)return zr;let e=Db(import.meta.url);try{return zr=Ba(e.resolve("view-contracts/package.json")),zr}catch{let t=Ba(qb(import.meta.url));for(;;){try{let n=Fb(t,"package.json");if(JSON.parse(jb(n,"utf8")).name==="view-contracts")return zr=t,zr}catch{}let r=Ba(t);if(r===t)break;t=r}throw new Error("view-contracts package root not found")}}var zr,Ot=K(()=>{"use strict"});function Dp(e){return yo[e]?.properties??[]}function Fp(e,t){let r=yo[t];return r?r.properties.includes(e):!1}var Hn,yo,ot,Gr,gT,mt=K(()=>{"use strict";Hn={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"},action:{type:"action",category:"interaction",lowering:"none",description:"Action descriptor { name, params? }; the element's click/submit action (takes precedence over onClick/onSubmit)"},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"}},yo={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","action","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","action","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","action","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","action","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"}}},ot=new Set(Object.keys(yo)),Gr=new Set(Object.entries(Hn).filter(([,e])=>e.lowering==="inline-css").map(([e])=>e)),gT=new Set(Object.entries(Hn).filter(([,e])=>e.lowering==="class-name").map(([e])=>e))});import{readFile as Bb}from"node:fs/promises";async function Jr(e){return it.load(await Bb(e,"utf-8"))}function vo(e,t,r){for(let n of e)if(!t.has(n))throw new Error(`${r}: unknown element "${n}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function qp(e,t,r){for(let[n,i]of Object.entries(e))for(let o of t)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${r}: element "${n}" is missing required "${String(o)}"`)}var wo=K(()=>{"use strict";Ur()});import{resolve as Hb}from"node:path";function Wb(e){vo(Object.keys(e.elements),ot,Bp),qp(e.elements,["tag"],Bp)}async function Wa(e){if(!e&&Ha)return Ha;let t=e??Hb(Se(),"renderers/react/elements.yaml"),r=await Jr(t);return Wb(r),e||(Ha=r),r}var Bp,Ha,Hp=K(()=>{"use strict";mt();mt();Ot();wo();Bp="renderers/react/elements.yaml",Ha=null});function Wp(e){if(e)return e==="start"?"flex-start":e==="end"?"flex-end":e}function Up(e){if(e)return e==="start"?"flex-start":e==="end"?"flex-end":e==="between"||e==="spaceBetween"?"space-between":e==="around"||e==="spaceAround"?"space-around":e==="spaceEvenly"?"space-evenly":e}var zp=K(()=>{"use strict"});function gt(e){return`${e}px`}function Kr(e){let t=e.match(/^\{([^}]+)\}$/);if(t)return`var(--${t[1].replace(/\./g,"-")})`}function Ua(e){let t={},r=e.width;typeof r=="number"?t.width=gt(r):r==="fill"?t.width="100%":typeof r=="string"&&r!=="wrap"&&(t.width=r),typeof e.minWidth=="number"&&(t.minWidth=gt(e.minWidth));let n=e.maxWidth;typeof n=="number"?t.maxWidth=gt(n):n==="fill"&&(t.maxWidth="100%");let i=e.height;typeof i=="number"?t.height=gt(i):i==="fill"?t.height="100%":typeof i=="string"&&i!=="wrap"&&(t.height=i),typeof e.minHeight=="number"&&(t.minHeight=gt(e.minHeight));let o=e.maxHeight;typeof o=="number"?t.maxHeight=gt(o):o==="fill"&&(t.maxHeight="100%"),e.aspectRatio!==void 0&&(t.aspectRatio=String(e.aspectRatio));let s=e.weight;typeof s=="number"&&(t.flexGrow=s),typeof e.padding=="number"&&(t.padding=gt(e.padding)),typeof e.margin=="number"&&(t.margin=gt(e.margin)),typeof e.gap=="number"&&(t.gap=gt(e.gap));let a=e.textAlign;typeof a=="string"&&(t.textAlign=a==="start"?"left":a==="end"?"right":a);let c=e.contentAlign;typeof c=="string"&&c in Gp&&(t.placeItems=Gp[c]),typeof e.overflow=="string"&&(t.overflow=e.overflow);let l=e.selfAlign;typeof l=="string"&&(t.alignSelf=l==="start"?"flex-start":l==="end"?"flex-end":l);let p=e.size;typeof p=="number"?t.fontSize=gt(p):typeof p=="string"&&(t.fontSize=p);let f=typeof s=="string"?s:e.fontWeight;typeof f=="string"&&(t.fontWeight=f);let h=e.background;typeof h=="string"&&(t.background=Kr(h)??h);let m=e.foreground;typeof m=="string"&&(t.color=Kr(m)??m);let y=e.radius;typeof y=="number"?t.borderRadius=gt(y):typeof y=="string"&&(t.borderRadius=Kr(y)??y);let g=e.shadow;g===!0?t.boxShadow="var(--ui-shadow)":g===!1?t.boxShadow="none":typeof g=="string"&&(t.boxShadow=Ub[g]??Kr(g)??g);let v=e.border;typeof v=="string"&&(t.border=Kr(v)??v),typeof e.opacity=="number"&&(t.opacity=e.opacity);let $=e.clip;typeof $=="string"&&(t.overflow=$==="hidden"?"hidden":$);let I=e.align;if(typeof I=="string"){let j=Wp(I);j&&(t.alignItems=j)}let _=e.justify;if(typeof _=="string"){let j=Up(_);j&&(t.justifyContent=j)}typeof e.display=="string"&&(t.display=e.display),typeof e.gridTemplateColumns=="string"&&(t.gridTemplateColumns=e.gridTemplateColumns),typeof e.flexDirection=="string"&&(t.flexDirection=e.flexDirection),typeof e.alignItems=="string"&&(t.alignItems=e.alignItems);let R=e.borderColor;typeof R=="string"&&(t.borderColor=Kr(R)??R);let N=e.flex;return typeof N=="number"&&(t.flex=N),t}function Wn(e){let t=Object.entries(e);return t.length===0?"":`style={{ ${t.map(([n,i])=>typeof i=="number"?`${n}: ${i}`:`${n}: ${JSON.stringify(i)}`).join(", ")} }}`}var Gp,Ub,za=K(()=>{"use strict";zp();Gp={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"},Ub={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 bo(e,t){let r=e[t];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 zb(e,t){if(t!=null&&!(typeof t=="string"||typeof t=="number"||typeof t=="boolean")&&!(typeof t=="object"&&"kind"in t&&t.kind==="literal"))throw new Error(`Style property "${e}" must be a compile-time literal; ViewModel bindings are not allowed on layout/visual props`)}function Gb(e){let t={};for(let[r,n]of Object.entries(e)){if(!Gr.has(r))continue;zb(r,n);let i=bo(e,r);i!==void 0&&(t[r]=i)}return t}function Jb(e){return e.flex?{display:"flex",flexDirection:e.flex==="column"?"column":"row"}:{}}function Kb(e){return e==="horizontal"?{overflowX:"auto",overflowY:"hidden"}:e==="both"?{overflowX:"auto",overflowY:"auto"}:e==="none"?{overflowX:"hidden",overflowY:"hidden"}:{overflowX:"hidden",overflowY:"auto"}}function Jp(e,t){let r=Gb(t),n=Ua(r);if(n={...n,...Jb(e)},e.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(e.scrollContainer){let i=bo(t,"scroll"),o=bo(t,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return n={...n,...Kb(s)},Wn(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(e.flexGrowProp&&t[e.flexGrowProp]){let i=bo(t,e.flexGrowProp);if(typeof i=="number")return n.flexGrow=i,Wn(n);throw new Error(`"${e.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return Wn(n)}var Kp=K(()=>{"use strict";mt();za();za()});function G(e){return" ".repeat(e)}function hr(e,t="vm"){let r=e.scope??t;return e.path?`${r}.${e.path}`:r}function ed(e){return e.parts.map(t=>typeof t=="string"?t:`\${${hr(t)}}`).join("")}function Yb(e){return`\`${ed(e)}\``}function $o(e,t=!1){let r=t?" as ActionDescriptor":"";if(!e.params||Object.keys(e.params).length===0)return`{ name: ${JSON.stringify(e.name)} }${r}`;let n=Object.entries(e.params).map(([i,o])=>`${i}: ${mr(o,0)}`).join(", ");return`{ name: ${JSON.stringify(e.name)}, params: { ${n} } }${r}`}function Ja(e,t,r=!1){if(e===null)return"null";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return`[
33
- ${e.map(n=>`${G(t+1)}${Ja(n,t+1,r)}`).join(`,
16
+ `,k?1+x:x),k=!0,h=!0,x=0;let C=u.position;for(;!I(O)&&O!==0;)O=u.input.charCodeAt(++u.position);Qe(u,C,u.position,!1)}return!0}function co(u,w){let E=u.tag,P=u.anchor,k=[],h=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Nt(u,u.anchor,k);let $=u.input.charCodeAt(u.position);for(;$!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation")),$===45);){let x=u.input.charCodeAt(u.position+1);if(!R(x))break;if(h=!0,u.position++,$e(u,!0,-1)&&u.lineIndent<=w){k.push(null),$=u.input.charCodeAt(u.position);continue}let T=u.line;if(Qt(u,w,a,!1,!0),k.push(u.result),$e(u,!0,-1),$=u.input.charCodeAt(u.position),(u.line===T||u.lineIndent>w)&&$!==0)D(u,"bad indentation of a sequence entry");else if(u.lineIndent<w)break}return h?(u.tag=E,u.anchor=P,u.kind="sequence",u.result=k,!0):!1}function uo(u,w,E){let P,k,h,$,x=u.tag,T=u.anchor,A={},O=Object.create(null),C=null,M=null,q=null,z=!1,J=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Nt(u,u.anchor,A);let Q=u.input.charCodeAt(u.position);for(;Q!==0;){!z&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,D(u,"tab characters must not be used in indentation"));let te=u.input.charCodeAt(u.position+1),Zt=u.line;if((Q===63||Q===58)&&R(te))Q===63?(z&&(Ot(u,A,O,C,M,null,k,h,$),C=M=q=null),J=!0,z=!0,P=!0):z?(z=!1,P=!0):D(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,Q=te;else{if(k=u.line,h=u.lineStart,$=u.position,!Qt(u,E,s,!1,!0))break;if(u.line===Zt){for(Q=u.input.charCodeAt(u.position);_(Q);)Q=u.input.charCodeAt(++u.position);if(Q===58)Q=u.input.charCodeAt(++u.position),R(Q)||D(u,"a whitespace character is expected after the key-value separator within a block mapping"),z&&(Ot(u,A,O,C,M,null,k,h,$),C=M=q=null),J=!0,z=!1,P=!1,C=u.tag,M=u.result;else if(J)D(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=x,u.anchor=T,!0}else if(J)D(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=x,u.anchor=T,!0}if((u.line===Zt||u.lineIndent>w)&&(z&&(k=u.line,h=u.lineStart,$=u.position),Qt(u,w,c,!0,P)&&(z?M=u.result:q=u.result),z||(Ot(u,A,O,C,M,q,k,h,$),C=M=q=null),$e(u,!0,-1),Q=u.input.charCodeAt(u.position)),(u.line===Zt||u.lineIndent>w)&&Q!==0)D(u,"bad indentation of a mapping entry");else if(u.lineIndent<w)break}return z&&Ot(u,A,O,C,M,null,k,h,$),J&&(u.tag=x,u.anchor=T,u.kind="mapping",u.result=A),J}function fo(u){let w=!1,E=!1,P,k,h=u.input.charCodeAt(u.position);if(h!==33)return!1;u.tag!==null&&D(u,"duplication of a tag property"),h=u.input.charCodeAt(++u.position),h===60?(w=!0,h=u.input.charCodeAt(++u.position)):h===33?(E=!0,P="!!",h=u.input.charCodeAt(++u.position)):P="!";let $=u.position;if(w){do h=u.input.charCodeAt(++u.position);while(h!==0&&h!==62);u.position<u.length?(k=u.input.slice($,u.position),h=u.input.charCodeAt(++u.position)):D(u,"unexpected end of the stream within a verbatim tag")}else{for(;h!==0&&!R(h);)h===33&&(E?D(u,"tag suffix cannot contain exclamation marks"):(P=u.input.slice($-1,u.position+1),g.test(P)||D(u,"named tag handle cannot contain such characters"),E=!0,$=u.position+1)),h=u.input.charCodeAt(++u.position);k=u.input.slice($,u.position),y.test(k)&&D(u,"tag suffix cannot contain flow indicator characters")}k&&!v.test(k)&&D(u,"tag name cannot contain such characters: "+k);try{k=decodeURIComponent(k)}catch{D(u,"tag name is malformed: "+k)}return w?u.tag=k:i.call(u.tagMap,P)?u.tag=u.tagMap[P]+k:P==="!"?u.tag="!"+k:P==="!!"?u.tag="tag:yaml.org,2002:"+k:D(u,'undeclared tag handle "'+P+'"'),!0}function po(u){let w=u.input.charCodeAt(u.position);if(w!==38)return!1;u.anchor!==null&&D(u,"duplication of an anchor property"),w=u.input.charCodeAt(++u.position);let E=u.position;for(;w!==0&&!R(w)&&!N(w);)w=u.input.charCodeAt(++u.position);return u.position===E&&D(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(E,u.position),!0}function va(u){let w=u.input.charCodeAt(u.position);if(w!==42)return!1;w=u.input.charCodeAt(++u.position);let E=u.position;for(;w!==0&&!R(w)&&!N(w);)w=u.input.charCodeAt(++u.position);u.position===E&&D(u,"name of an alias node must contain at least one character");let P=u.input.slice(E,u.position);return i.call(u.anchorMap,P)||D(u,'unidentified alias "'+P+'"'),u.result=u.anchorMap[P],$e(u,!0,-1),!0}function ho(u,w,E,P){let k=Fn(u);return ga(u),Gr(u,w),u.tag=null,u.anchor=null,u.kind=null,u.result=null,uo(u,E,P)&&u.kind==="mapping"?(mr(u),!0):(ya(u),Gr(u,k),!1)}function Qt(u,w,E,P,k){let h,$,x=1,T=!1,A=!1,O=null,C,M,q;u.depth>=u.maxDepth&&D(u,"nesting exceeded maxDepth ("+u.maxDepth+")"),u.depth+=1,u.listener!==null&&u.listener("open",u),u.tag=null,u.anchor=null,u.kind=null,u.result=null;let z=h=$=c===E||a===E;if(P&&$e(u,!0,-1)&&(T=!0,u.lineIndent>w?x=1:u.lineIndent===w?x=0:u.lineIndent<w&&(x=-1)),x===1)for(;;){let J=u.input.charCodeAt(u.position),Q=Fn(u);if(T&&(J===33&&u.tag!==null||J===38&&u.anchor!==null)||!fo(u)&&!po(u))break;O===null&&(O=Q),$e(u,!0,-1)?(T=!0,$=z,u.lineIndent>w?x=1:u.lineIndent===w?x=0:u.lineIndent<w&&(x=-1)):$=!1}if($&&($=T||k),x===1||c===E)if(o===E||s===E?M=w:M=w+1,q=u.position-u.lineStart,x===1)if($&&(co(u,q)||uo(u,q,M))||lo(u,M))A=!0;else{let J=u.input.charCodeAt(u.position);O!==null&&z&&!$&&J!==124&&J!==62&&ho(u,O,O.position-O.lineStart,M)||h&&Xt(u,M)||Hn(u,M)||ao(u,M)?A=!0:va(u)?(A=!0,(u.tag!==null||u.anchor!==null)&&D(u,"alias node should not have any properties")):so(u,M,o===E)&&(A=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&Nt(u,u.anchor,u.result)}else x===0&&(A=$&&co(u,q));if(u.tag===null)u.anchor!==null&&Nt(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&D(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let J=0,Q=u.implicitTypes.length;J<Q;J+=1)if(C=u.implicitTypes[J],C.resolve(u.result)){u.result=C.construct(u.result),u.tag=C.tag,u.anchor!==null&&Nt(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(i.call(u.typeMap[u.kind||"fallback"],u.tag))C=u.typeMap[u.kind||"fallback"][u.tag];else{C=null;let J=u.typeMap.multi[u.kind||"fallback"];for(let Q=0,te=J.length;Q<te;Q+=1)if(u.tag.slice(0,J[Q].tag.length)===J[Q].tag){C=J[Q];break}}C||D(u,"unknown tag !<"+u.tag+">"),u.result!==null&&C.kind!==u.kind&&D(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+C.kind+'", not "'+u.kind+'"'),C.resolve(u.result,u.tag)?(u.result=C.construct(u.result,u.tag),u.anchor!==null&&Nt(u,u.anchor,u.result)):D(u,"cannot resolve a node with !<"+u.tag+"> explicit tag")}return u.listener!==null&&u.listener("close",u),u.depth-=1,u.tag!==null||u.anchor!==null||A}function wa(u){let w=u.position,E=!1,P;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(P=u.input.charCodeAt(u.position))!==0&&($e(u,!0,-1),P=u.input.charCodeAt(u.position),!(u.lineIndent>0||P!==37));){E=!0,P=u.input.charCodeAt(++u.position);let k=u.position;for(;P!==0&&!R(P);)P=u.input.charCodeAt(++u.position);let h=u.input.slice(k,u.position),$=[];for(h.length<1&&D(u,"directive name must not be less than one character in length");P!==0;){for(;_(P);)P=u.input.charCodeAt(++u.position);if(P===35){do P=u.input.charCodeAt(++u.position);while(P!==0&&!I(P));break}if(I(P))break;for(k=u.position;P!==0&&!R(P);)P=u.input.charCodeAt(++u.position);$.push(u.input.slice(k,u.position))}P!==0&&Bn(u),i.call(oo,h)?oo[h](u,h,$):zr(u,'unknown document directive "'+h+'"')}if($e(u,!0,-1),u.lineIndent===0&&u.input.charCodeAt(u.position)===45&&u.input.charCodeAt(u.position+1)===45&&u.input.charCodeAt(u.position+2)===45?(u.position+=3,$e(u,!0,-1)):E&&D(u,"directives end mark is expected"),Qt(u,u.lineIndent-1,c,!1,!0),$e(u,!0,-1),u.checkLineBreaks&&m.test(u.input.slice(w,u.position))&&zr(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&kt(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,$e(u,!0,-1));return}u.position<u.length-1&&D(u,"end of the stream or a document separator is expected")}function Wn(u,w){u=String(u),w=w||{},u.length!==0&&(u.charCodeAt(u.length-1)!==10&&u.charCodeAt(u.length-1)!==13&&(u+=`
17
+ `),u.charCodeAt(0)===65279&&(u=u.slice(1)));let E=new fe(u,w),P=u.indexOf("\0");for(P!==-1&&(E.position=P,D(E,"null byte is not allowed in input")),E.input+="\0";E.input.charCodeAt(E.position)===32;)E.lineIndent+=1,E.position+=1;for(;E.position<E.length-1;)wa(E);return E.documents}function ba(u,w,E){w!==null&&typeof w=="object"&&typeof E>"u"&&(E=w,w=null);let P=Wn(u,E);if(typeof w!="function")return P;for(let k=0,h=P.length;k<h;k+=1)w(P[k])}function $a(u,w){let E=Wn(u,w);if(E.length!==0){if(E.length===1)return E[0];throw new t("expected a single document in the stream, but found more")}}return mo.loadAll=ba,mo.load=$a,mo}function Kb(){if(Ep)return Wa;Ep=1;let e=Gn(),t=Jn(),r=Ua(),n=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=65279,s=9,a=10,c=13,l=32,p=33,f=34,d=35,m=37,y=38,g=39,v=42,b=44,I=45,_=58,R=61,N=62,j=63,U=64,oe=91,me=93,be=96,Pe=123,we=124,ze=125,fe={};fe[0]="\\0",fe[7]="\\a",fe[8]="\\b",fe[9]="\\t",fe[10]="\\n",fe[11]="\\v",fe[12]="\\f",fe[13]="\\r",fe[27]="\\e",fe[34]='\\"',fe[92]="\\\\",fe[133]="\\N",fe[160]="\\_",fe[8232]="\\L",fe[8233]="\\P";let Y=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],D=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function zr(h,$){if($===null)return{};let x={},T=Object.keys($);for(let A=0,O=T.length;A<O;A+=1){let C=T[A],M=String($[C]);C.slice(0,2)==="!!"&&(C="tag:yaml.org,2002:"+C.slice(2));let q=h.compiledTypeMap.fallback[C];q&&i.call(q.styleAliases,M)&&(M=q.styleAliases[M]),x[C]=M}return x}function Nt(h){let $,x,T=h.toString(16).toUpperCase();if(h<=255)$="x",x=2;else if(h<=65535)$="u",x=4;else if(h<=4294967295)$="U",x=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+$+e.repeat("0",x-T.length)+T}let ga=1,mr=2;function ya(h){this.schema=h.schema||r,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=e.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=zr(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==='"'?mr:ga,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 Fn(h,$){let x=e.repeat(" ",$),T=0,A="",O=h.length;for(;T<O;){let C,M=h.indexOf(`
18
+ `,T);M===-1?(C=h.slice(T),T=O):(C=h.slice(T,M+1),T=M+1),C.length&&C!==`
19
+ `&&(A+=x),A+=C}return A}function Gr(h,$){return`
20
+ `+e.repeat(" ",h.indent*$)}function oo(h,$){for(let x=0,T=h.implicitTypes.length;x<T;x+=1)if(h.implicitTypes[x].resolve($))return!0;return!1}function Qe(h){return h===l||h===s}function Yt(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==o||h>=65536&&h<=1114111}function qn(h){return Yt(h)&&h!==o&&h!==c&&h!==a}function Ot(h,$,x){let T=qn(h),A=T&&!Qe(h);return(x?T:T&&h!==b&&h!==oe&&h!==me&&h!==Pe&&h!==ze)&&h!==d&&!($===_&&!A)||qn($)&&!Qe($)&&h===d||$===_&&A}function Bn(h){return Yt(h)&&h!==o&&!Qe(h)&&h!==I&&h!==j&&h!==_&&h!==b&&h!==oe&&h!==me&&h!==Pe&&h!==ze&&h!==d&&h!==y&&h!==v&&h!==p&&h!==we&&h!==R&&h!==N&&h!==g&&h!==f&&h!==m&&h!==U&&h!==be}function $e(h){return!Qe(h)&&h!==_}function kt(h,$){let x=h.charCodeAt($),T;return x>=55296&&x<=56319&&$+1<h.length&&(T=h.charCodeAt($+1),T>=56320&&T<=57343)?(x-55296)*1024+T-56320+65536:x}function Jr(h){return/^\n* /.test(h)}let so=1,Hn=2,ao=3,lo=4,Xt=5;function co(h,$,x,T,A,O,C,M){let q,z=0,J=null,Q=!1,te=!1,Zt=T!==-1,Un=-1,zn=Bn(kt(h,0))&&$e(kt(h,h.length-1));if($||C)for(q=0;q<h.length;z>=65536?q+=2:q++){if(z=kt(h,q),!Yt(z))return Xt;zn=zn&&Ot(z,J,M),J=z}else{for(q=0;q<h.length;z>=65536?q+=2:q++){if(z=kt(h,q),z===a)Q=!0,Zt&&(te=te||q-Un-1>T&&h[Un+1]!==" ",Un=q);else if(!Yt(z))return Xt;zn=zn&&Ot(z,J,M),J=z}te=te||Zt&&q-Un-1>T&&h[Un+1]!==" "}return!Q&&!te?zn&&!C&&!A(h)?so:O===mr?Xt:Hn:x>9&&Jr(h)?Xt:C?O===mr?Xt:Hn:te?lo:ao}function uo(h,$,x,T,A){h.dump=(function(){if($.length===0)return h.quotingType===mr?'""':"''";if(!h.noCompatMode&&(Y.indexOf($)!==-1||D.test($)))return h.quotingType===mr?'"'+$+'"':"'"+$+"'";let O=h.indent*Math.max(1,x),C=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-O),M=T||h.flowLevel>-1&&x>=h.flowLevel;function q(z){return oo(h,z)}switch(co($,M,h.indent,C,q,h.quotingType,h.forceQuotes&&!T,A)){case so:return $;case Hn:return"'"+$.replace(/'/g,"''")+"'";case ao:return"|"+fo($,h.indent)+po(Fn($,O));case lo:return">"+fo($,h.indent)+po(Fn(va($,C),O));case Xt:return'"'+Qt($)+'"';default:throw new t("impossible error: invalid scalar style")}})()}function fo(h,$){let x=Jr(h)?String($):"",T=h[h.length-1]===`
21
+ `,O=T&&(h[h.length-2]===`
22
+ `||h===`
23
+ `)?"+":T?"":"-";return x+O+`
24
+ `}function po(h){return h[h.length-1]===`
25
+ `?h.slice(0,-1):h}function va(h,$){let x=/(\n+)([^\n]*)/g,T=(function(){let M=h.indexOf(`
26
+ `);return M=M!==-1?M:h.length,x.lastIndex=M,ho(h.slice(0,M),$)})(),A=h[0]===`
27
+ `||h[0]===" ",O,C;for(;C=x.exec(h);){let M=C[1],q=C[2];O=q[0]===" ",T+=M+(!A&&!O&&q!==""?`
28
+ `:"")+ho(q,$),A=O}return T}function ho(h,$){if(h===""||h[0]===" ")return h;let x=/ [^ ]/g,T,A=0,O,C=0,M=0,q="";for(;T=x.exec(h);)M=T.index,M-A>$&&(O=C>A?C:M,q+=`
29
+ `+h.slice(A,O),A=O+1),C=M;return q+=`
30
+ `,h.length-A>$&&C>A?q+=h.slice(A,C)+`
31
+ `+h.slice(C+1):q+=h.slice(A),q.slice(1)}function Qt(h){let $="",x=0;for(let T=0;T<h.length;x>=65536?T+=2:T++){x=kt(h,T);let A=fe[x];!A&&Yt(x)?($+=h[T],x>=65536&&($+=h[T+1])):$+=A||Nt(x)}return $}function wa(h,$,x){let T="",A=h.tag;for(let O=0,C=x.length;O<C;O+=1){let M=x[O];h.replacer&&(M=h.replacer.call(x,String(O),M)),(w(h,$,M,!1,!1)||typeof M>"u"&&w(h,$,null,!1,!1))&&(T!==""&&(T+=","+(h.condenseFlow?"":" ")),T+=h.dump)}h.tag=A,h.dump="["+T+"]"}function Wn(h,$,x,T){let A="",O=h.tag;for(let C=0,M=x.length;C<M;C+=1){let q=x[C];h.replacer&&(q=h.replacer.call(x,String(C),q)),(w(h,$+1,q,!0,!0,!1,!0)||typeof q>"u"&&w(h,$+1,null,!0,!0,!1,!0))&&((!T||A!=="")&&(A+=Gr(h,$)),h.dump&&a===h.dump.charCodeAt(0)?A+="-":A+="- ",A+=h.dump)}h.tag=O,h.dump=A||"[]"}function ba(h,$,x){let T="",A=h.tag,O=Object.keys(x);for(let C=0,M=O.length;C<M;C+=1){let q="";T!==""&&(q+=", "),h.condenseFlow&&(q+='"');let z=O[C],J=x[z];h.replacer&&(J=h.replacer.call(x,z,J)),w(h,$,z,!1,!1)&&(h.dump.length>1024&&(q+="? "),q+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),w(h,$,J,!1,!1)&&(q+=h.dump,T+=q))}h.tag=A,h.dump="{"+T+"}"}function $a(h,$,x,T){let A="",O=h.tag,C=Object.keys(x);if(h.sortKeys===!0)C.sort();else if(typeof h.sortKeys=="function")C.sort(h.sortKeys);else if(h.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let M=0,q=C.length;M<q;M+=1){let z="";(!T||A!=="")&&(z+=Gr(h,$));let J=C[M],Q=x[J];if(h.replacer&&(Q=h.replacer.call(x,J,Q)),!w(h,$+1,J,!0,!0,!0))continue;let te=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;te&&(h.dump&&a===h.dump.charCodeAt(0)?z+="?":z+="? "),z+=h.dump,te&&(z+=Gr(h,$)),w(h,$+1,Q,!0,te)&&(h.dump&&a===h.dump.charCodeAt(0)?z+=":":z+=": ",z+=h.dump,A+=z)}h.tag=O,h.dump=A||"{}"}function u(h,$,x){let T=x?h.explicitTypes:h.implicitTypes;for(let A=0,O=T.length;A<O;A+=1){let C=T[A];if((C.instanceOf||C.predicate)&&(!C.instanceOf||typeof $=="object"&&$ instanceof C.instanceOf)&&(!C.predicate||C.predicate($))){if(x?C.multi&&C.representName?h.tag=C.representName($):h.tag=C.tag:h.tag="?",C.represent){let M=h.styleMap[C.tag]||C.defaultStyle,q;if(n.call(C.represent)==="[object Function]")q=C.represent($,M);else if(i.call(C.represent,M))q=C.represent[M]($,M);else throw new t("!<"+C.tag+'> tag resolver accepts not "'+M+'" style');h.dump=q}return!0}}return!1}function w(h,$,x,T,A,O,C){h.tag=null,h.dump=x,u(h,x,!1)||u(h,x,!0);let M=n.call(h.dump),q=T;T&&(T=h.flowLevel<0||h.flowLevel>$);let z=M==="[object Object]"||M==="[object Array]",J,Q;if(z&&(J=h.duplicates.indexOf(x),Q=J!==-1),(h.tag!==null&&h.tag!=="?"||Q||h.indent!==2&&$>0)&&(A=!1),Q&&h.usedDuplicates[J])h.dump="*ref_"+J;else{if(z&&Q&&!h.usedDuplicates[J]&&(h.usedDuplicates[J]=!0),M==="[object Object]")T&&Object.keys(h.dump).length!==0?($a(h,$,h.dump,A),Q&&(h.dump="&ref_"+J+h.dump)):(ba(h,$,h.dump),Q&&(h.dump="&ref_"+J+" "+h.dump));else if(M==="[object Array]")T&&h.dump.length!==0?(h.noArrayIndent&&!C&&$>0?Wn(h,$-1,h.dump,A):Wn(h,$,h.dump,A),Q&&(h.dump="&ref_"+J+h.dump)):(wa(h,$,h.dump),Q&&(h.dump="&ref_"+J+" "+h.dump));else if(M==="[object String]")h.tag!=="?"&&uo(h,h.dump,$,O,q);else{if(M==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+M)}if(h.tag!==null&&h.tag!=="?"){let te=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?te="!"+te:te.slice(0,18)==="tag:yaml.org,2002:"?te="!!"+te.slice(18):te="!<"+te+">",h.dump=te+" "+h.dump}}return!0}function E(h,$){let x=[],T=[];P(h,x,T);let A=T.length;for(let O=0;O<A;O+=1)$.duplicates.push(x[T[O]]);$.usedDuplicates=new Array(A)}function P(h,$,x){if(h!==null&&typeof h=="object"){let T=$.indexOf(h);if(T!==-1)x.indexOf(T)===-1&&x.push(T);else if($.push(h),Array.isArray(h))for(let A=0,O=h.length;A<O;A+=1)P(h[A],$,x);else{let A=Object.keys(h);for(let O=0,C=A.length;O<C;O+=1)P(h[A[O]],$,x)}}}function k(h,$){$=$||{};let x=new ya($);x.noRefs||E(h,x);let T=h;return x.replacer&&(T=x.replacer.call({"":T},"",T)),w(x,0,T,!0,!0)?x.dump+`
32
+ `:""}return Wa.dump=k,Wa}function Yb(){if(Pp)return Oe;Pp=1;let e=Jb(),t=Kb();function r(n,i){return function(){throw new Error("Function yaml."+n+" is removed in js-yaml 4. Use yaml."+i+" instead, which is now safe by default.")}}return Oe.Type=qe(),Oe.Schema=Ip(),Oe.FAILSAFE_SCHEMA=Np(),Oe.JSON_SCHEMA=jp(),Oe.CORE_SCHEMA=Dp(),Oe.DEFAULT_SCHEMA=Ua(),Oe.load=e.load,Oe.loadAll=e.loadAll,Oe.dump=t.dump,Oe.YAMLException=Jn(),Oe.types={binary:Bp(),float:Lp(),map:Ap(),null:Op(),pairs:Wp(),set:Up(),timestamp:Fp(),bool:Mp(),int:Vp(),merge:qp(),omap:Hp(),seq:Tp(),str:Rp()},Oe.safeLoad=r("safeLoad","load"),Oe.safeLoadAll=r("safeLoadAll","loadAll"),Oe.safeDump=r("safeDump","dump"),Oe}var Oe,mo,er,ip,_a,op,Sa,sp,ka,ap,Ca,lp,Ea,cp,Pa,up,Ia,fp,Ra,pp,Ta,dp,Aa,hp,Na,mp,Oa,gp,Ma,yp,Va,vp,La,wp,ja,bp,Da,$p,Fa,xp,qa,_p,Ba,Sp,Ha,kp,Cp,Wa,Ep,Pp,Xb,nt,gT,yT,vT,wT,bT,$T,xT,_T,ST,kT,CT,ET,PT,IT,Yr=K(()=>{Oe={},mo={},er={};Wa={};Xb=Yb(),nt=zb(Xb),{Type:gT,Schema:yT,FAILSAFE_SCHEMA:vT,JSON_SCHEMA:wT,CORE_SCHEMA:bT,DEFAULT_SCHEMA:$T,load:xT,loadAll:_T,dump:ST,YAMLException:kT,types:CT,safeLoad:ET,safeLoadAll:PT,safeDump:IT}=nt});import{access as AT,readFile as zp}from"node:fs/promises";import{dirname as Qb,resolve as Ce}from"node:path";async function tr(e){let t=Ce(e),r=await zp(t,"utf-8"),n=nt.load(r);return Zb(t,n)}function Zb(e,t){let r=Ie(e);return{...t,openapi:Ce(r,t.openapi),bindings:Ce(r,t.bindings),microContractsConfig:Ce(r,t.microContractsConfig),viewsDir:Ce(r,t.viewsDir),generated:{contractDir:Ce(r,t.generated.contractDir),actions:Ce(r,t.generated.actions),bridge:Ce(r,t.generated.bridge),reactDir:Ce(r,t.generated.reactDir)},runtimeModule:t.runtimeModule?Ce(r,t.runtimeModule):t.componentsModule?Ce(r,t.componentsModule):void 0,themeModule:t.themeModule?Ce(r,t.themeModule):void 0,design:t.design?{tokens:t.design.tokens?Ce(r,t.design.tokens):void 0,theme:t.design.theme?Ce(r,t.design.theme):void 0,extensionsCss:t.design.extensionsCss?Ce(r,t.design.extensionsCss):void 0}:void 0,extensions:t.extensions?Ce(r,t.extensions):void 0}}async function Gp(e){let t=await zp(Ce(e),"utf-8");return nt.load(t)}function Ie(e){return Qb(Ce(e))}function go(e){let t=e.design?.tokens,r=e.design?.theme;if(!t)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:t,themePath:r}}var Mt=K(()=>{"use strict";Yr()});import{readFileSync as e0}from"node:fs";import{createRequire as t0}from"node:module";import{dirname as za,resolve as r0}from"node:path";import{fileURLToPath as n0}from"node:url";function Se(){if(Xr)return Xr;let e=t0(import.meta.url);try{return Xr=za(e.resolve("view-contracts/package.json")),Xr}catch{let t=za(n0(import.meta.url));for(;;){try{let n=r0(t,"package.json");if(JSON.parse(e0(n,"utf8")).name==="view-contracts")return Xr=t,Xr}catch{}let r=za(t);if(r===t)break;t=r}throw new Error("view-contracts package root not found")}}var Xr,Vt=K(()=>{"use strict"});function Jp(e){return vo[e]?.properties??[]}function Kp(e,t){let r=vo[t];return r?r.properties.includes(e):!1}var yo,vo,it,Qr,qT,mt=K(()=>{"use strict";yo={id:{type:"string",category:"identity",lowering:"attribute",description:"Stable identifier for tests and diff updates"},data:{type:"object",category:"identity",lowering:"attribute",description:"Custom data attributes { key: value }; web only (data-<kebab-key>), not rendered on native"},title:{type:"string",category:"identity",lowering:"attribute",description:"Screen title; accessible name of the page"},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"},action:{type:"action",category:"interaction",lowering:"none",description:"Action descriptor { name, params? }; the element's click/submit action (takes precedence over onClick/onSubmit)"},href:{type:"string",category:"interaction",lowering:"attribute",description:"Navigation target URL"},type:{type:"string",category:"interaction",lowering:"attribute",enum:"buttonType",description:"Button behavior inside a Form; default button"},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"},rows:{type:"number",category:"size",lowering:"attribute",description:"Visible text lines"},wrap:{type:"boolean",category:"layout",lowering:"none",description:"Wrap children onto new lines when they overflow"},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"}},vo={App:{description:"App root; holds theme/token/navigation context",tier:"core",category:"structure",notes:"Optional; not required for single-screen DSL",properties:["id","data","visible","padding","direction","theme","variant"],children:{kind:"list",items:["Page"]}},Page:{description:"Screen root; viewport and safe-area boundary",tier:"core",category:"structure",properties:["id","title","data","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","data","visible","padding","variant"],children:{kind:"list",items:["Box","Column","Row"]}},Box:{description:"Single region; background, bounds, child placement",tier:"core",category:"layout",properties:["id","data","visible","role","label","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","data","visible","role","label","gap","wrap","align","justify","padding","width","height","minWidth","maxWidth","minHeight","maxHeight","variant"],children:{kind:"any"}},Column:{description:"Vertical child layout",tier:"core",category:"layout",properties:["id","data","visible","role","label","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","data","visible","role","label","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","data","visible","width","height","weight","variant"],children:{kind:"none"}},Divider:{description:"Horizontal or vertical separator",tier:"core",category:"layout",properties:["id","data","visible","axis","variant"],children:{kind:"none"}},ScrollArea:{description:"Internal scroll boundary",tier:"core",category:"scroll",properties:["id","data","visible","axis","scroll","width","height","minHeight","maxHeight","padding","variant"],children:{kind:"single"}},List:{description:"Homogeneous list of items",tier:"core",category:"scroll",properties:["id","data","gap","axis","role","visible","variant"],children:{kind:"list",items:["ListItem"]}},ListItem:{description:"One row/cell in a list",tier:"core",category:"scroll",properties:["id","data","selected","padding","gap","role","visible","variant"],children:{kind:"any"}},Text:{description:"Text display",tier:"core",category:"text",properties:["id","data","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","data","visible","action","onClick","href","label","foreground","role","variant"],children:{kind:"text"}},Image:{description:"Image display",tier:"core",category:"media",properties:["id","data","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","data","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","data","visible","enabled","action","onClick","type","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","data","visible","enabled","action","onClick","type","label","foreground","background","radius","padding","variant"],children:{kind:"list",items:["Icon"]}},TextInput:{description:"Single-line text input",tier:"core",category:"input",properties:["id","data","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","data","visible","enabled","readonly","required","name","value","binding","placeholder","onChange","error","help","focusable","width","minHeight","rows","label","foreground","background","radius","padding","border","borderColor","fontSize","variant"],children:{kind:"none"}},Select:{description:"Single selection",tier:"core",category:"input",properties:["id","data","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","data","visible","enabled","checked","required","binding","name","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","data","visible","enabled","checked","binding","name","label","value","onChange","variant"],children:{kind:"none"}},Switch:{description:"On/off toggle",tier:"core",category:"input",properties:["id","data","visible","enabled","checked","binding","name","label","onChange","variant"],children:{kind:"none"}},Form:{description:"Input group submit/validation boundary",tier:"core",category:"form",properties:["id","data","visible","role","label","gap","action","onSubmit","variant"],children:{kind:"any"}},Field:{description:"label/help/error/input unit",tier:"core",category:"form",properties:["id","data","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","data","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","data","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Popover:{description:"Small anchored panel",tier:"extension",category:"overlay",properties:["id","data","visible","variant"],children:{kind:"list",items:["Box","Column"]}},Tooltip:{description:"Supplementary description",tier:"extension",category:"overlay",properties:["id","data","visible","label","variant"],children:{kind:"text"}},Progress:{description:"Determinate progress",tier:"core",category:"feedback",properties:["id","data","visible","value","variant"],children:{kind:"none"}},Spinner:{description:"Indeterminate loading",tier:"core",category:"feedback",properties:["id","data","visible","role","variant"],children:{kind:"none"}},Table:{description:"Data table with header and repeated rows",tier:"core",category:"data",properties:["id","data","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:["id","data","visible","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:["id","data","visible","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:["id","data","visible","each","height","border","borderColor","alignItems","variant"],children:{kind:"list",items:["TableCell"]}},TableCell:{description:"Data cell; children define cell content",tier:"core",category:"data",properties:["id","data","visible","width","flex","align","border","borderColor","padding","fontSize","foreground","variant"],children:{kind:"any"}}},it=new Set(Object.keys(vo)),Qr=new Set(Object.entries(yo).filter(([,e])=>e.lowering==="inline-css").map(([e])=>e)),qT=new Set(Object.entries(yo).filter(([,e])=>e.lowering==="class-name").map(([e])=>e))});import{readFile as i0}from"node:fs/promises";async function Zr(e){return nt.load(await i0(e,"utf-8"))}function wo(e,t,r){for(let n of e)if(!t.has(n))throw new Error(`${r}: unknown element "${n}" \u2014 not in spec/ui-dsl.schema.json vocabulary`)}function Yp(e,t,r){for(let[n,i]of Object.entries(e))for(let o of t)if(i[o]===void 0||i[o]===null||i[o]==="")throw new Error(`${r}: element "${n}" is missing required "${String(o)}"`)}var bo=K(()=>{"use strict";Yr()});import{resolve as o0}from"node:path";function s0(e){wo(Object.keys(e.elements),it,Xp),Yp(e.elements,["tag"],Xp)}async function Ja(e){if(!e&&Ga)return Ga;let t=e??o0(Se(),"renderers/react/elements.yaml"),r=await Zr(t);return s0(r),e||(Ga=r),r}var Xp,Ga,Qp=K(()=>{"use strict";mt();mt();Vt();bo();Xp="renderers/react/elements.yaml",Ga=null});function Zp(e){if(e)return e==="start"?"flex-start":e==="end"?"flex-end":e}function ed(e){if(e)return e==="start"?"flex-start":e==="end"?"flex-end":e==="between"||e==="spaceBetween"?"space-between":e==="around"||e==="spaceAround"?"space-around":e==="spaceEvenly"?"space-evenly":e}var td=K(()=>{"use strict"});function gt(e){return`${e}px`}function en(e){let t=e.match(/^\{([^}]+)\}$/);if(t)return`var(--${t[1].replace(/\./g,"-")})`}function Ka(e){let t={},r=e.width;typeof r=="number"?t.width=gt(r):r==="fill"?t.width="100%":typeof r=="string"&&r!=="wrap"&&(t.width=r),typeof e.minWidth=="number"&&(t.minWidth=gt(e.minWidth));let n=e.maxWidth;typeof n=="number"?t.maxWidth=gt(n):n==="fill"&&(t.maxWidth="100%");let i=e.height;typeof i=="number"?t.height=gt(i):i==="fill"?t.height="100%":typeof i=="string"&&i!=="wrap"&&(t.height=i),typeof e.minHeight=="number"&&(t.minHeight=gt(e.minHeight));let o=e.maxHeight;typeof o=="number"?t.maxHeight=gt(o):o==="fill"&&(t.maxHeight="100%"),e.aspectRatio!==void 0&&(t.aspectRatio=String(e.aspectRatio));let s=e.weight;typeof s=="number"&&(t.flexGrow=s),typeof e.padding=="number"&&(t.padding=gt(e.padding)),typeof e.margin=="number"&&(t.margin=gt(e.margin)),typeof e.gap=="number"&&(t.gap=gt(e.gap));let a=e.textAlign;typeof a=="string"&&(t.textAlign=a==="start"?"left":a==="end"?"right":a);let c=e.contentAlign;typeof c=="string"&&c in rd&&(t.placeItems=rd[c]),typeof e.overflow=="string"&&(t.overflow=e.overflow);let l=e.selfAlign;typeof l=="string"&&(t.alignSelf=l==="start"?"flex-start":l==="end"?"flex-end":l);let p=e.size;typeof p=="number"?t.fontSize=gt(p):typeof p=="string"&&(t.fontSize=p);let f=typeof s=="string"?s:e.fontWeight;typeof f=="string"&&(t.fontWeight=f);let d=e.background;typeof d=="string"&&(t.background=en(d)??d);let m=e.foreground;typeof m=="string"&&(t.color=en(m)??m);let y=e.radius;typeof y=="number"?t.borderRadius=gt(y):typeof y=="string"&&(t.borderRadius=en(y)??y);let g=e.shadow;g===!0?t.boxShadow="var(--ui-shadow)":g===!1?t.boxShadow="none":typeof g=="string"&&(t.boxShadow=a0[g]??en(g)??g);let v=e.border;typeof v=="string"&&(t.border=en(v)??v),typeof e.opacity=="number"&&(t.opacity=e.opacity);let b=e.clip;typeof b=="string"&&(t.overflow=b==="hidden"?"hidden":b);let I=e.align;if(typeof I=="string"){let j=Zp(I);j&&(t.alignItems=j)}let _=e.justify;if(typeof _=="string"){let j=ed(_);j&&(t.justifyContent=j)}typeof e.display=="string"&&(t.display=e.display),typeof e.gridTemplateColumns=="string"&&(t.gridTemplateColumns=e.gridTemplateColumns),typeof e.flexDirection=="string"&&(t.flexDirection=e.flexDirection),typeof e.alignItems=="string"&&(t.alignItems=e.alignItems);let R=e.borderColor;typeof R=="string"&&(t.borderColor=en(R)??R);let N=e.flex;return typeof N=="number"&&(t.flex=N),t}function Kn(e){let t=Object.entries(e);return t.length===0?"":`style={{ ${t.map(([n,i])=>typeof i=="number"?`${n}: ${i}`:`${n}: ${JSON.stringify(i)}`).join(", ")} }}`}var rd,a0,Ya=K(()=>{"use strict";td();rd={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"},a0={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 $o(e,t){let r=e[t];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 l0(e,t){if(t!=null&&!(typeof t=="string"||typeof t=="number"||typeof t=="boolean")&&!(typeof t=="object"&&"kind"in t&&t.kind==="literal"))throw new Error(`Style property "${e}" must be a compile-time literal; ViewModel bindings are not allowed on layout/visual props`)}function c0(e){let t={};for(let[r,n]of Object.entries(e)){if(!Qr.has(r))continue;l0(r,n);let i=$o(e,r);i!==void 0&&(t[r]=i)}return t}function u0(e){return e.flex?{display:"flex",flexDirection:e.flex==="column"?"column":"row"}:{}}function f0(e){return e==="horizontal"?{overflowX:"auto",overflowY:"hidden"}:e==="both"?{overflowX:"auto",overflowY:"auto"}:e==="none"?{overflowX:"hidden",overflowY:"hidden"}:{overflowX:"hidden",overflowY:"auto"}}function nd(e,t){let r=c0(t),n=Ka(r);if(n={...n,...u0(e)},e.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(e.scrollContainer){let i=$o(t,"scroll"),o=$o(t,"axis"),s=typeof i=="string"?i:typeof o=="string"?o==="horizontal"?"horizontal":"vertical":void 0;if(s)return n={...n,...f0(s)},Kn(n);throw new Error("ScrollArea scroll/axis must be compile-time literals")}if(e.flexGrowProp&&t[e.flexGrowProp]){let i=$o(t,e.flexGrowProp);if(typeof i=="number")return n.flexGrow=i,Kn(n);throw new Error(`"${e.flexGrowProp}" on <Spacer> must be a compile-time literal`)}return Kn(n)}var id=K(()=>{"use strict";mt();Ya();Ya()});function od(e){return`data-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`}var sd=K(()=>{"use strict"});function G(e){return" ".repeat(e)}function wr(e,t="vm"){let r=e.scope??t;return e.path?`${r}.${e.path}`:r}function fd(e){return e.parts.map(t=>typeof t=="string"?t:`\${${wr(t)}}`).join("")}function p0(e){return`\`${fd(e)}\``}function xo(e,t=!1){let r=t?" as ActionDescriptor":"";if(!e.params||Object.keys(e.params).length===0)return`{ name: ${JSON.stringify(e.name)} }${r}`;let n=Object.entries(e.params).map(([i,o])=>`${i}: ${rr(o,0)}`).join(", ");return`{ name: ${JSON.stringify(e.name)}, params: { ${n} } }${r}`}function Qa(e,t,r=!1){if(e===null)return"null";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return`[
33
+ ${e.map(n=>`${G(t+1)}${Qa(n,t+1,r)}`).join(`,
34
34
  `)}
35
- ${G(t)}]`;if(typeof e=="object"&&e!==null){let n=e;return"kind"in n&&n.kind==="action"?$o(n,r):`{
36
- ${Object.entries(n).map(([o,s])=>`${o}: ${Ja(s,t+1,r)}`).map(o=>`${G(t+1)}${o}`).join(`,
35
+ ${G(t)}]`;if(typeof e=="object"&&e!==null){let n=e;return"kind"in n&&n.kind==="action"?xo(n,r):`{
36
+ ${Object.entries(n).map(([o,s])=>`${o}: ${Qa(s,t+1,r)}`).map(o=>`${G(t+1)}${o}`).join(`,
37
37
  `)}
38
- ${G(t)}}`}return"undefined"}function mr(e,t,r=!1){if(e===null)return"null";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return`[
39
- ${e.map(n=>`${G(t+1)}${mr(n,t+1,r)}`).join(`,
38
+ ${G(t)}}`}return"undefined"}function rr(e,t,r=!1){if(e===null)return"null";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return`[
39
+ ${e.map(n=>`${G(t+1)}${rr(n,t+1,r)}`).join(`,
40
40
  `)}
41
- ${G(t)}]`;if(typeof e=="object"&&e!==null&&"kind"in e){if(e.kind==="binding")return hr(e);if(e.kind==="action")return $o(e,r);if(e.kind==="literal")return Ja(e.value,t,r);if(e.kind==="concat")return Yb(e)}return"undefined"}function Yr(e,t){let r=e[t];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 H(e,t){let r=e[t];if(r!=null)return mr(r,0)}function zn(e,t,r){let n=Jp(t,r);n&&e.push(n)}function Xb(e,t){let r=e.action??e[t==="onClick"?"onClick":"onSubmit"];if(!r||typeof r!="object"||!("kind"in r)||r.kind!=="action")return;let n=$o(r,!0);return t==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${n}); }}`:`onClick={() => { void dispatchAction(${n}); }}`}function Jn(e,t="e.target.value"){let r=e.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: ${t} } } as ActionDescriptor); }}`;let i=Object.entries(n.params).map(([o,s])=>`${o}: ${mr(s,0)}`).join(", ");return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(n.name)}, params: { ${i}, value: ${t} } } as ActionDescriptor); }}`}function Ga(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Qb(e,t){let r=Yr(t,"variant");if(typeof r=="string")return` vc-${Ga(e)}--${r}`;let n=t.variant;if(n&&typeof n=="object"&&"kind"in n&&n.kind==="concat")return` vc-${Ga(e)}--${ed(n)}`;let i=H(t,"variant");if(i)return` vc-${Ga(e)}--\${${i}}`}function Gn(e,t,r){let n=t.className??"",i=Qb(e,r);if(i)return typeof Yr(r,"variant")=="string"?`className="${n}${i}"`:`className={\`${n}${i}\`}`;if(t.wrapProp&&Yr(r,t.wrapProp)===!0)return`className="${n} vc-wrap"`;if(t.sizeClass&&r.size){let o=H(r,"size");return`className={\`${t.className} ${t.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${n}"`}function Yp(e,t,r){let n=Yr(t,"label"),i=Yr(t,"help"),o=Yr(t,"error"),s=H(t,"label"),a=H(t,"help"),c=H(t,"error"),l=[`${G(r)}<label className="vc-field">`];return typeof n=="string"?l.push(`${G(r+1)}<span className="vc-text vc-text--field-label">{${JSON.stringify(n)}}</span>`):s&&l.push(`${G(r+1)}{${s} ? <span className="vc-text vc-text--field-label">{${s}}</span> : null}`),l.push(`${G(r+1)}${e}`),typeof i=="string"?l.push(`${G(r+1)}<span className="vc-text vc-text--field-help">{${JSON.stringify(i)}}</span>`):a&&l.push(`${G(r+1)}{${a} ? <span className="vc-text vc-text--field-help">{${a}}</span> : null}`),typeof o=="string"?l.push(`${G(r+1)}<span className="vc-text vc-text--field-error">{${JSON.stringify(o)}}</span>`):c&&l.push(`${G(r+1)}{${c} ? <span className="vc-text vc-text--field-error">{${c}}</span> : null}`),l.push(`${G(r)}</label>`),l.join(`
42
- `)}function Zb(e,t){let r=H(e,"name")??'""',n=H(e,"label")??'""',i=e.enabled?`disabled={${H(e,"enabled")} === false}`:"",o=Jn(e,"e.target.checked")??"",s=e.checked?o?`checked={${H(e,"checked")}}`:`defaultChecked={${H(e,"checked")}}`:"";return`${G(t)}<label className="vc-checkbox">
43
- ${G(t+1)}<input type="checkbox" name={${r}} ${s} ${i} ${o} />
41
+ ${G(t)}]`;if(typeof e=="object"&&e!==null&&"kind"in e){if(e.kind==="binding")return wr(e);if(e.kind==="action")return xo(e,r);if(e.kind==="literal")return Qa(e.value,t,r);if(e.kind==="concat")return p0(e)}return"undefined"}function yr(e,t){let r=e[t];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 H(e,t){let r=e[t];if(r!=null)return rr(r,0)}function jt(e,t,r=[]){let n=t.data;return typeof n!="object"||n===null||!("kind"in n)||n.kind!=="literal"?[]:Object.entries(n.value).map(([i,o])=>{let s=od(i);if(r.includes(s))throw new Error(`<${e}> data key "${i}" duplicates the ${s} attribute this element renders`);return`${s}={${rr(o,0)}}`})}function Za(e,t,r){if(e[t]===void 0||e[t]===null)return;let n=yr(e,t);return n!==void 0?n?`${r}="true"`:void 0:`${r}={${H(e,t)} ? true : undefined}`}function Xn(e,t,r){let n=nd(t,r);n&&e.push(n)}function d0(e,t){let r=e.action??e[t==="onClick"?"onClick":"onSubmit"];if(!r||typeof r!="object"||!("kind"in r)||r.kind!=="action")return;let n=xo(r,!0);return t==="onSubmit"?`onSubmit={(e) => { e.preventDefault(); void dispatchAction(${n}); }}`:`onClick={() => { void dispatchAction(${n}); }}`}function Zn(e,t="e.target.value"){let r=e.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: ${t} } } as ActionDescriptor); }}`;let i=Object.entries(n.params).map(([o,s])=>`${o}: ${rr(s,0)}`).join(", ");return`onChange={(e) => { void dispatchAction({ name: ${JSON.stringify(n.name)}, params: { ${i}, value: ${t} } } as ActionDescriptor); }}`}function Xa(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function h0(e,t){let r=yr(t,"variant");if(typeof r=="string")return` vc-${Xa(e)}--${r}`;let n=t.variant;if(n&&typeof n=="object"&&"kind"in n&&n.kind==="concat")return` vc-${Xa(e)}--${fd(n)}`;let i=H(t,"variant");if(i)return` vc-${Xa(e)}--\${${i}}`}function Qn(e,t,r){let n=t.className??"",i=h0(e,r);if(i)return typeof yr(r,"variant")=="string"?`className="${n}${i}"`:`className={\`${n}${i}\`}`;if(t.wrapProp&&yr(r,t.wrapProp)===!0)return`className="${n} vc-wrap"`;if(t.sizeClass&&r.size){let o=H(r,"size");return`className={\`${t.className} ${t.sizeClass}-\${${o} ?? 'md'}\`}`}return`className="${n}"`}function ad(e,t,r,n=[]){let i=yr(t,"label"),o=yr(t,"help"),s=yr(t,"error"),a=H(t,"label"),c=H(t,"help"),l=H(t,"error"),p=[`${G(r)}<label ${['className="vc-field"',...n].join(" ")}>`];return typeof i=="string"?p.push(`${G(r+1)}<span className="vc-text vc-text--field-label">{${JSON.stringify(i)}}</span>`):a&&p.push(`${G(r+1)}{${a} ? <span className="vc-text vc-text--field-label">{${a}}</span> : null}`),p.push(`${G(r+1)}${e}`),typeof o=="string"?p.push(`${G(r+1)}<span className="vc-text vc-text--field-help">{${JSON.stringify(o)}}</span>`):c&&p.push(`${G(r+1)}{${c} ? <span className="vc-text vc-text--field-help">{${c}}</span> : null}`),typeof s=="string"?p.push(`${G(r+1)}<span className="vc-text vc-text--field-error">{${JSON.stringify(s)}}</span>`):l&&p.push(`${G(r+1)}{${l} ? <span className="vc-text vc-text--field-error">{${l}}</span> : null}`),p.push(`${G(r)}</label>`),p.join(`
42
+ `)}function m0(e,t){let r=H(e,"binding")??H(e,"name")??'""',n=H(e,"label")??'""',i=e.enabled?`disabled={${H(e,"enabled")} === false}`:"",o=Zn(e,"e.target.checked")??"",s=e.checked?o?`checked={${H(e,"checked")}}`:`defaultChecked={${H(e,"checked")}}`:"";return`${G(t)}<label className="vc-checkbox">
43
+ ${G(t+1)}<input type="checkbox" name={${r}} ${[s,i,o,...jt("Checkbox",e)].join(" ")} />
44
44
  ${G(t+1)}<span>{${n}}</span>
45
- ${G(t)}</label>`}function e0(e,t){let r=H(e,"binding")??H(e,"name")??'""',n=H(e,"value")??'""',i=H(e,"label")??'""',o=e.enabled?`disabled={${H(e,"enabled")} === false}`:"",s=Jn(e,"e.target.value")??"",a=e.checked?s?`checked={${H(e,"checked")}}`:`defaultChecked={${H(e,"checked")}}`:"";return`${G(t)}<label className="vc-radio">
46
- ${G(t+1)}<input type="radio" name={${r}} value={${n}} ${a} ${o} ${s} />
45
+ ${G(t)}</label>`}function g0(e,t){let r=H(e,"binding")??H(e,"name")??'""',n=H(e,"value")??'""',i=H(e,"label")??'""',o=e.enabled?`disabled={${H(e,"enabled")} === false}`:"",s=Zn(e,"e.target.value")??"",a=e.checked?s?`checked={${H(e,"checked")}}`:`defaultChecked={${H(e,"checked")}}`:"";return`${G(t)}<label className="vc-radio">
46
+ ${G(t+1)}<input type="radio" name={${r}} value={${n}} ${[a,o,s,...jt("Radio",e)].join(" ")} />
47
47
  ${G(t+1)}<span>{${i}}</span>
48
- ${G(t)}</label>`}function t0(e,t){let r=H(e,"binding")??H(e,"name")??'""',n=H(e,"label")??'""',i=e.enabled?`disabled={${H(e,"enabled")} === false}`:"",o=Jn(e,"e.target.checked")??"",s=e.checked?o?`checked={${H(e,"checked")}}`:`defaultChecked={${H(e,"checked")}}`:"";return`${G(t)}<label className="vc-switch">
49
- ${G(t+1)}<input type="checkbox" role="switch" name={${r}} ${s} ${i} ${o} />
48
+ ${G(t)}</label>`}function y0(e,t){let r=H(e,"binding")??H(e,"name")??'""',n=H(e,"label")??'""',i=e.enabled?`disabled={${H(e,"enabled")} === false}`:"",o=Zn(e,"e.target.checked")??"",s=e.checked?o?`checked={${H(e,"checked")}}`:`defaultChecked={${H(e,"checked")}}`:"";return`${G(t)}<label className="vc-switch">
49
+ ${G(t+1)}<input type="checkbox" role="switch" name={${r}} ${[s,i,o,...jt("Switch",e)].join(" ")} />
50
50
  ${G(t+1)}<span>{${n}}</span>
51
- ${G(t)}</label>`}function r0(e,t,r){let n=e.props;if(n.alt!==void 0){let s=[Gn(e.name,t,n),`src={${H(n,"name")??'""'}}`,`alt={${H(n,"alt")??'""'}}`];return zn(s,t,n),n.id&&s.push(`id={${H(n,"id")}}`),`${G(r)}<img ${s.join(" ")} />`}let o=[Gn(e.name,t,n),"aria-hidden"];return zn(o,t,n),n.id&&o.push(`id={${H(n,"id")}}`),n.name&&o.push(`data-icon={${H(n,"name")}}`),`${G(r)}<span ${o.join(" ")} />`}function Xp(e,t){let r=e.options;if(!r||typeof r!="object"||!("kind"in r))return"";if(r.kind==="literal"&&Array.isArray(r.value))return r.value.map(o=>`${G(t+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
52
- `);let n=mr(r,0);return`${G(t+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function Qp(e,t,r,n){let i=[Gn(e,t,r)];zn(i,t,r),t.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${H(r,"id")}}`),r.role?i.push(`role={${H(r,"role")}}`):t.defaultRole&&i.push(`role="${t.defaultRole}"`),t.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${H(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${H(r,"label")}}`):r.title&&i.push(`aria-label={${H(r,"title")}}`)),r.name&&i.push(`name={${H(r,"name")}}`),r.placeholder&&i.push(`placeholder={${H(r,"placeholder")}}`),t.inputType&&i.push(`type={${H(r,"inputType")??JSON.stringify(t.inputType)}}`),r.required&&i.push(`required={${H(r,"required")}}`),r.readonly&&i.push(`readOnly={${H(r,"readonly")}}`),r.enabled&&i.push(`disabled={${H(r,"enabled")} === false}`),t.tag==="img"&&r.src&&i.push(`src={${H(r,"src")}}`),t.tag==="img"&&r.alt&&i.push(`alt={${H(r,"alt")}}`),t.tag==="progress"&&r.value&&i.push(`value={${H(r,"value")}}`),r.rows&&i.push(`rows={${H(r,"rows")??"4"}}`);let o=Jn(r);return o?(r.value&&t.tag!=="progress"&&i.push(`value={${H(r,"value")}}`),i.push(o)):r.value&&t.tag!=="progress"&&i.push(`defaultValue={${H(r,"value")}}`),`${G(n)}<${t.tag} ${i.join(" ")} />`}function Zp(e,t,r,n){let i=[];if(t.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${H(r,"id")}}`),r.role?i.push(`role={${H(r,"role")}}`):t.defaultRole&&i.push(`role="${t.defaultRole}"`),t.ariaLabel&&(r.ariaLabel?i.push(`aria-label={${H(r,"ariaLabel")}}`):r.label?i.push(`aria-label={${H(r,"label")}}`):r.title&&i.push(`aria-label={${H(r,"title")}}`)),t.actionEvent){let o=Xb(r,t.actionEvent);o&&i.push(o)}if(r.name&&i.push(`name={${H(r,"name")}}`),t.tag==="select"||t.tag==="textarea"||t.tag==="input"){r.required&&i.push(`required={${H(r,"required")}}`),r.enabled&&i.push(`disabled={${H(r,"enabled")} === false}`);let o=Jn(r);o?(r.value&&i.push(`value={${H(r,"value")}}`),i.push(o)):r.value&&i.push(`defaultValue={${H(r,"value")}}`)}return t.tag==="button"&&r.enabled&&i.push(`disabled={${H(r,"enabled")} === false}`),t.tag==="a"&&r.href&&i.push(`href={${H(r,"href")}}`),t.tag==="button"&&i.push(`type={${H(r,"type")??'"button"'}}`),i.push(Gn(e,t,r)),zn(i,t,r),`<${n} ${i.join(" ")}`}function Vt(e,t,r){if(t.visible===void 0)return e;let n=H(t,"visible");return`${G(r)}{${n} !== false ? (
51
+ ${G(t)}</label>`}function v0(e,t,r){let n=e.props;if(n.alt!==void 0){let s=[Qn(e.name,t,n),`src={${H(n,"name")??'""'}}`,`alt={${H(n,"alt")??'""'}}`];return Xn(s,t,n),n.id&&s.push(`id={${H(n,"id")}}`),s.push(...jt(e.name,n)),`${G(r)}<img ${s.join(" ")} />`}let o=[Qn(e.name,t,n),"aria-hidden"];return Xn(o,t,n),n.id&&o.push(`id={${H(n,"id")}}`),o.push(...jt(e.name,n,n.name?["data-icon"]:[])),n.name&&o.push(`data-icon={${H(n,"name")}}`),`${G(r)}<span ${o.join(" ")} />`}function ld(e,t){let r=e.options;if(!r||typeof r!="object"||!("kind"in r))return"";if(r.kind==="literal"&&Array.isArray(r.value))return r.value.map(o=>`${G(t+1)}<option key={${JSON.stringify(o.value)}} value={${JSON.stringify(o.value)}}>{${JSON.stringify(o.label)}}</option>`).join(`
52
+ `);let n=rr(r,0);return`${G(t+1)}{${n}.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}`}function cd(e,t,r,n){let i=[Qn(e,t,r)];Xn(i,t,r),t.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${H(r,"id")}}`),i.push(...jt(e,r)),r.role?i.push(`role={${H(r,"role")}}`):t.defaultRole&&i.push(`role="${t.defaultRole}"`),t.ariaLabel&&(r.label?i.push(`aria-label={${H(r,"label")}}`):r.title&&i.push(`aria-label={${H(r,"title")}}`));let o=Za(r,"error","aria-invalid");o&&i.push(o),r.name&&i.push(`name={${H(r,"name")}}`),r.placeholder&&i.push(`placeholder={${H(r,"placeholder")}}`),t.inputType&&i.push(`type={${H(r,"inputType")??JSON.stringify(t.inputType)}}`),r.required&&i.push(`required={${H(r,"required")}}`),r.readonly&&i.push(`readOnly={${H(r,"readonly")}}`),r.enabled&&i.push(`disabled={${H(r,"enabled")} === false}`),t.tag==="img"&&r.src&&i.push(`src={${H(r,"src")}}`),t.tag==="img"&&r.alt&&i.push(`alt={${H(r,"alt")}}`),t.tag==="progress"&&r.value&&i.push(`value={${H(r,"value")}}`),r.rows&&i.push(`rows={${H(r,"rows")??"4"}}`);let s=Zn(r);return s?(r.value&&t.tag!=="progress"&&i.push(`value={${H(r,"value")}}`),i.push(s)):r.value&&t.tag!=="progress"&&i.push(`defaultValue={${H(r,"value")}}`),`${G(n)}<${t.tag} ${i.join(" ")} />`}function ud(e,t,r,n){let i=[];if(t.ariaHidden&&i.push("aria-hidden"),r.id&&i.push(`id={${H(r,"id")}}`),i.push(...jt(e,r)),r.role?i.push(`role={${H(r,"role")}}`):t.defaultRole&&i.push(`role="${t.defaultRole}"`),t.ariaLabel&&(r.label?i.push(`aria-label={${H(r,"label")}}`):r.title&&i.push(`aria-label={${H(r,"title")}}`)),t.actionEvent){let s=d0(r,t.actionEvent);s&&i.push(s)}let o=Za(r,"selected","aria-current");if(o&&i.push(o),r.name&&i.push(`name={${H(r,"name")}}`),t.tag==="select"||t.tag==="textarea"||t.tag==="input"){let s=Za(r,"error","aria-invalid");s&&i.push(s),r.required&&i.push(`required={${H(r,"required")}}`),r.enabled&&i.push(`disabled={${H(r,"enabled")} === false}`);let a=Zn(r);a?(r.value&&i.push(`value={${H(r,"value")}}`),i.push(a)):r.value&&i.push(`defaultValue={${H(r,"value")}}`)}return t.tag==="button"&&r.enabled&&i.push(`disabled={${H(r,"enabled")} === false}`),t.tag==="a"&&r.href&&i.push(`href={${H(r,"href")}}`),t.tag==="button"&&i.push(`type={${H(r,"type")??'"button"'}}`),i.push(Qn(e,t,r)),Xn(i,t,r),`<${n} ${i.join(" ")}`}function Lt(e,t,r){if(t.visible===void 0)return e;let n=H(t,"visible");return`${G(r)}{${n} !== false ? (
53
53
  ${e}
54
- ${G(r)}) : null}`}function Ka(e,t,r,n){if(e.length===0)return"";let i=n??"vm";return e.map(s=>{if(s.kind==="text"){let a=s.value;return a?`${G(t)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${G(t)}{${hr(s,i)}}`:s.kind==="map"?n0(s,t,r):s.kind==="fragment"?Ka(s.children,t,r,n):r(s,t,n)}).filter(Boolean).join(`
55
- `)}function n0(e,t,r){let n=e.item,i=r(e.body,t+1,n);if(e.key){let o=` key={${hr(e.key,n)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${G(t)}{${hr(e.source)}.map((${n}) => (
54
+ ${G(r)}) : null}`}function el(e,t,r,n){if(e.length===0)return"";let i=n??"vm";return e.map(s=>{if(s.kind==="text"){let a=s.value;return a?`${G(t)}{${JSON.stringify(a)}}`:""}return s.kind==="binding"?`${G(t)}{${wr(s,i)}}`:s.kind==="map"?w0(s,t,r):s.kind==="fragment"?el(s.children,t,r,n):r(s,t,n)}).filter(Boolean).join(`
55
+ `)}function w0(e,t,r){let n=e.item,i=r(e.body,t+1,n);if(e.key){let o=` key={${wr(e.key,n)}}`;i=i.replace(/^( +)<(\w+)/,`$1<$2${o}`)}return`${G(t)}{${wr(e.source)}.map((${n}) => (
56
56
  ${i}
57
- ${G(t)}))}`}function i0(e,t,r,n,i){let o=e.props,s=Ka(e.children,r+1,i,n);if(t.checkbox)return Vt(Zb(o,r),o,r);if(e.name==="Radio")return Vt(e0(o,r),o,r);if(e.name==="Switch")return Vt(t0(o,r),o,r);if(e.name==="Icon")return Vt(r0(e,t,r),o,r);if(e.name==="Spinner"){let p=[Gn(e.name,t,o),'aria-busy="true"'];return zn(p,t,o),o.id&&p.push(`id={${H(o,"id")}}`),o.role?p.push(`role={${H(o,"role")}}`):t.defaultRole&&p.push(`role="${t.defaultRole}"`),Vt(`${G(r)}<div ${p.join(" ")} />`,o,r)}if(t.fieldContainer){let p=s||`${G(r+1)}<div />`;return Vt(Yp(p,o,r),o,r)}if(t.fieldWrap){let p=t.tag,f;if(t.optionsProp&&o[t.optionsProp]){let h=Zp(e.name,t,o,p);f=`${G(r+1)}${h}>
58
- ${Xp(o,r+2)}
59
- ${G(r+1)}</${p}>`}else f=Qp(e.name,t,o,r+1);return Vt(Yp(f,o,r),o,r)}let a=t.tag;if(t.void)return Vt(Qp(e.name,t,o,r),o,r);let c=Zp(e.name,t,o,a),l;return!s&&t.optionsProp&&o[t.optionsProp]?l=`${G(r)}${c}>
60
- ${Xp(o,r+1)}
57
+ ${G(t)}))}`}function b0(e,t,r,n,i){let o=e.props,s=el(e.children,r+1,i,n);if(t.checkbox)return Lt(m0(o,r),o,r);if(e.name==="Radio")return Lt(g0(o,r),o,r);if(e.name==="Switch")return Lt(y0(o,r),o,r);if(e.name==="Icon")return Lt(v0(e,t,r),o,r);if(e.name==="Spinner"){let p=[Qn(e.name,t,o),'aria-busy="true"'];return Xn(p,t,o),o.id&&p.push(`id={${H(o,"id")}}`),p.push(...jt(e.name,o)),o.role?p.push(`role={${H(o,"role")}}`):t.defaultRole&&p.push(`role="${t.defaultRole}"`),Lt(`${G(r)}<div ${p.join(" ")} />`,o,r)}if(t.fieldContainer){let p=s||`${G(r+1)}<div />`;return Lt(ad(p,o,r,jt(e.name,o)),o,r)}if(t.fieldWrap){let p=t.tag,f;if(t.optionsProp&&o[t.optionsProp]){let d=ud(e.name,t,o,p);f=`${G(r+1)}${d}>
58
+ ${ld(o,r+2)}
59
+ ${G(r+1)}</${p}>`}else f=cd(e.name,t,o,r+1);return Lt(ad(f,o,r),o,r)}let a=t.tag;if(t.void)return Lt(cd(e.name,t,o,r),o,r);let c=ud(e.name,t,o,a),l;return!s&&t.optionsProp&&o[t.optionsProp]?l=`${G(r)}${c}>
60
+ ${ld(o,r+1)}
61
61
  ${G(r)}</${a}>`:s?l=`${G(r)}${c}>
62
62
  ${s}
63
- ${G(r)}</${a}>`:l=`${G(r)}${c} />`,Vt(l,o,r)}function o0(e,t){let r=t??"vm";return Object.entries(e).map(([n,i])=>typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${hr(i,r)}}`:`${n}={${mr(i,0)}}`).join(" ")}function s0(e,t,r){let n=o0(e.props,r),i=n?` ${n}`:"";return`${G(t)}<${e.name}${i} />`}function a0(e,t){let r=t??"vm";return Object.entries(e).map(([n,i])=>n==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${n}={${$o(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${hr(i,r)}}`:n==="children"?"":`${n}={${mr(i,0,n==="columns")}}`).join(" ")}function l0(e,t,r,n){let i=a0(e.props,r),o=i?` ${i}`:"",s=Ka(e.children,t+1,n,r);return s?`${G(t)}<${e.name}${o}>
63
+ ${G(r)}</${a}>`:l=`${G(r)}${c} />`,Lt(l,o,r)}function $0(e,t){let r=t??"vm";return Object.entries(e).map(([n,i])=>typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${wr(i,r)}}`:`${n}={${rr(i,0)}}`).join(" ")}function x0(e,t,r){let n=$0(e.props,r),i=n?` ${n}`:"";return`${G(t)}<${e.name}${i} />`}function _0(e,t){let r=t??"vm";return Object.entries(e).map(([n,i])=>n==="action"&&typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="action"?`${n}={${xo(i,!0)}}`:typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"?`${n}={${wr(i,r)}}`:n==="children"?"":`${n}={${rr(i,0,n==="columns")}}`).join(" ")}function S0(e,t,r,n){let i=_0(e.props,r),o=i?` ${i}`:"",s=el(e.children,t+1,n,r);return s?`${G(t)}<${e.name}${o}>
64
64
  ${s}
65
- ${G(t)}</${e.name}>`:`${G(t)}<${e.name}${o} />`}function td(e,t,r){return e in t.elements&&!r.includes(e)}function Un(e,t){if(e.kind==="viewRef"){t.add(e.name);return}if(e.kind==="component"){for(let r of e.children)Un(r,t);return}if(e.kind==="map"&&Un(e.body,t),e.kind==="fragment")for(let r of e.children)Un(r,t)}function dr(e,t,r,n){if(e.kind==="component"){td(e.name,t,r)||n.add(e.name);for(let i of e.children)dr(i,t,r,n);return}if(e.kind==="map"&&dr(e.body,t,r,n),e.kind==="fragment")for(let i of e.children)dr(i,t,r,n)}function rd(e,t){let r=(n,i,o)=>n.kind==="viewRef"?s0(n,i,o):n.kind!=="component"?"":td(n.name,e,t)?i0(n,e.elements[n.name],i,o,r):l0(n,i,o,r);return(n,i,o)=>r(n,i,o)}var nd=K(()=>{"use strict";Kp()});var Xa={};pr(Xa,{partialReactOutputPath:()=>g0,renderReactComponent:()=>Ya,renderReactFromIr:()=>h0,renderReactPreviewBundle:()=>m0});import{resolve as c0}from"node:path";function u0(e){if(e.isPartial)return e.exportName;let t=e.exportName.replace(/View$/,"")||e.exportName;return t.charAt(0).toUpperCase()+t.slice(1)}function f0(e,t){if(e.kind!=="component")throw new Error(`View IR root must be a component node (${t})`);return e}function od(e){if(!e)return[];let t=e.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return t?[...new Set(t)]:[]}function p0(e){return e.propsType?e.propDecls?`{ ${e.propDecls.map(t=>t.name).join(", ")} }: ${e.propsType}`:`props: ${e.propsType}`:""}function id(e){return e.trimStart().startsWith("{")?`return (
65
+ ${G(t)}</${e.name}>`:`${G(t)}<${e.name}${o} />`}function pd(e,t,r){return e in t.elements&&!r.includes(e)}function Yn(e,t){if(e.kind==="viewRef"){t.add(e.name);return}if(e.kind==="component"){for(let r of e.children)Yn(r,t);return}if(e.kind==="map"&&Yn(e.body,t),e.kind==="fragment")for(let r of e.children)Yn(r,t)}function vr(e,t,r,n){if(e.kind==="component"){pd(e.name,t,r)||n.add(e.name);for(let i of e.children)vr(i,t,r,n);return}if(e.kind==="map"&&vr(e.body,t,r,n),e.kind==="fragment")for(let i of e.children)vr(i,t,r,n)}function dd(e,t){let r=(n,i,o)=>n.kind==="viewRef"?x0(n,i,o):n.kind!=="component"?"":pd(n.name,e,t)?b0(n,e.elements[n.name],i,o,r):S0(n,i,o,r);return(n,i,o)=>r(n,i,o)}var hd=K(()=>{"use strict";id();sd()});var rl={};gr(rl,{partialReactOutputPath:()=>A0,renderReactComponent:()=>tl,renderReactFromIr:()=>R0,renderReactPreviewBundle:()=>T0});import{resolve as k0}from"node:path";function C0(e){if(e.isPartial)return e.exportName;let t=e.exportName.replace(/View$/,"")||e.exportName;return t.charAt(0).toUpperCase()+t.slice(1)}function E0(e,t){if(e.kind!=="component")throw new Error(`View IR root must be a component node (${t})`);return e}function gd(e){if(!e)return[];let t=e.match(/\b[A-Z][A-Za-z0-9]*ViewModel\b/g);return t?[...new Set(t)]:[]}function P0(e){return e.propsType?e.propDecls?`{ ${e.propDecls.map(t=>t.name).join(", ")} }: ${e.propsType}`:`props: ${e.propsType}`:""}function md(e){return e.trimStart().startsWith("{")?`return (
66
66
  <>${e}
67
67
  </>
68
68
  );`:`return (
69
69
  ${e}
70
- );`}function d0(e){let t=e.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return t=t.replace(/^import\s[^\n]+\n/gm,""),t.trimStart()}async function sd(e,t){let r=await Wa(t.elementMapPath),n=t.allowlistExtra??[],i=u0(e),o=f0(e.root,e.source),a=rd(r,n)(o,2),c=new Set;dr(e.root,r,n,c);let l=[...c].sort(),p=new Set;Un(e.root,p);let f=[...p].sort(),h=t.previewImports,m=h?.dispatch??t.runtimeImportFrom,y=h?.contracts??t.contractsImportFrom,g=h?.extensions??t.extensionsImportFrom,v=new Set;if(e.isPartial)for(let N of od(e.propsType))v.add(N);else v.add(e.viewModel);let $=["import type { ReactElement } from 'react';"];$.push(`import { dispatchAction } from '${m}';`);let I=[...v].sort(),_=I.length>0?`${I.join(", ")}, ActionDescriptor`:"ActionDescriptor";$.push(`import type { ${_} } from '${y}';`),l.length>0&&$.push(`import { ${l.join(", ")} } from '${g}';`);for(let N of f){if(t.inlineViewRefs)continue;let j=t.viewRefImportFrom?.get(N)??`./${N}.generated.js`;$.push(`import { ${N} } from '${j}';`)}let R=h?`/**
70
+ );`}function I0(e){let t=e.replace(/^\/\*\*[\s\S]*?\*\/\s*/,"");return t=t.replace(/^import\s[^\n]+\n/gm,""),t.trimStart()}async function yd(e,t){let r=await Ja(t.elementMapPath),n=t.allowlistExtra??[],i=C0(e),o=E0(e.root,e.source),a=dd(r,n)(o,2),c=new Set;vr(e.root,r,n,c);let l=[...c].sort(),p=new Set;Yn(e.root,p);let f=[...p].sort(),d=t.previewImports,m=d?.dispatch??t.runtimeImportFrom,y=d?.contracts??t.contractsImportFrom,g=d?.extensions??t.extensionsImportFrom,v=new Set;if(e.isPartial)for(let N of gd(e.propsType))v.add(N);else v.add(e.viewModel);let b=["import type { ReactElement } from 'react';"];b.push(`import { dispatchAction } from '${m}';`);let I=[...v].sort(),_=I.length>0?`${I.join(", ")}, ActionDescriptor`:"ActionDescriptor";b.push(`import type { ${_} } from '${y}';`),l.length>0&&b.push(`import { ${l.join(", ")} } from '${g}';`);for(let N of f){if(t.inlineViewRefs)continue;let j=t.viewRefImportFrom?.get(N)??`./${N}.generated.js`;b.push(`import { ${N} } from '${j}';`)}let R=d?`/**
71
71
  * Preview module \u2014 compiled live from ${e.source}
72
72
  * Same lowering as generated/; not written to disk.
73
73
  */`:`/**
74
74
  * Auto-generated React component from ${e.source}
75
75
  * DO NOT EDIT \u2014 regenerate with: view-contracts render react
76
- */`;if(e.isPartial){let N=p0(e);return`${R}
77
- ${$.join(`
76
+ */`;if(e.isPartial){let N=P0(e);return`${R}
77
+ ${b.join(`
78
78
  `)}
79
79
 
80
80
  export function ${i}(${N}): ReactElement {
81
- ${id(a)}
81
+ ${md(a)}
82
82
  }
83
83
  `}return`${R}
84
- ${$.join(`
84
+ ${b.join(`
85
85
  `)}
86
86
 
87
87
  export function ${i}({ vm }: { vm: ${e.viewModel} }): ReactElement {
88
- ${id(a)}
88
+ ${md(a)}
89
89
  }
90
- `}async function Ya(e,t){return sd(e,t)}async function h0(e,t,r){let{writeFile:n,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await sd(e,r);await i(o(t),{recursive:!0}),await n(t,s,"utf-8")}async function m0(e,t,r){let n={...r,inlineViewRefs:!0},i=await Promise.all(t.map(R=>Ya(R,n))),o=await Ya(e,n),s=d0,a=await Wa(r.elementMapPath),c=r.allowlistExtra??[],l=new Set;dr(e.root,a,c,l);for(let R of t)dr(R.root,a,c,l);let p=r.previewImports,f=p?.dispatch??r.runtimeImportFrom,h=p?.contracts??r.contractsImportFrom,m=p?.extensions??r.extensionsImportFrom,y=new Set([e.viewModel]);for(let R of t)for(let N of od(R.propsType))y.add(N);let g=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${f}';`,`import type { ${[...y].sort().join(", ")}, ActionDescriptor } from '${h}';`],v=[...l].sort();v.length>0&&g.push(`import { ${v.join(", ")} } from '${m}';`);let $=p?`/**
90
+ `}async function tl(e,t){return yd(e,t)}async function R0(e,t,r){let{writeFile:n,mkdir:i}=await import("node:fs/promises"),{dirname:o}=await import("node:path"),s=await yd(e,r);await i(o(t),{recursive:!0}),await n(t,s,"utf-8")}async function T0(e,t,r){let n={...r,inlineViewRefs:!0},i=await Promise.all(t.map(R=>tl(R,n))),o=await tl(e,n),s=I0,a=await Ja(r.elementMapPath),c=r.allowlistExtra??[],l=new Set;vr(e.root,a,c,l);for(let R of t)vr(R.root,a,c,l);let p=r.previewImports,f=p?.dispatch??r.runtimeImportFrom,d=p?.contracts??r.contractsImportFrom,m=p?.extensions??r.extensionsImportFrom,y=new Set([e.viewModel]);for(let R of t)for(let N of gd(R.propsType))y.add(N);let g=["import type { ReactElement } from 'react';",`import { dispatchAction } from '${f}';`,`import type { ${[...y].sort().join(", ")}, ActionDescriptor } from '${d}';`],v=[...l].sort();v.length>0&&g.push(`import { ${v.join(", ")} } from '${m}';`);let b=p?`/**
91
91
  * Preview module \u2014 compiled live from ${e.source}
92
92
  * Same lowering as generated/; not written to disk.
93
- */`:"",I=i.map(s),_=s(o);return`${$}
93
+ */`:"",I=i.map(s),_=s(o);return`${b}
94
94
  ${g.join(`
95
95
  `)}
96
96
 
@@ -98,19 +98,19 @@ ${I.join(`
98
98
 
99
99
  `)}
100
100
 
101
- ${_}`}function g0(e,t){return c0(e,"components",`${t.exportName}.generated.tsx`)}var Qa=K(()=>{"use strict";Hp();nd()});var qe=S(Ze=>{"use strict";Ze.__esModule=!0;Ze.extend=ad;Ze.indexOf=$0;Ze.escapeExpression=x0;Ze.isEmpty=_0;Ze.createFrame=S0;Ze.blockParams=k0;Ze.appendContextPath=C0;var y0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},v0=/[&<>"'`=]/g,w0=/[&<>"'`=]/;function b0(e){return y0[e]}function ad(e){for(var t=1;t<arguments.length;t++)for(var r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&(e[r]=arguments[t][r]);return e}var el=Object.prototype.toString;Ze.toString=el;var Za=function(t){return typeof t=="function"};Za(/x/)&&(Ze.isFunction=Za=function(e){return typeof e=="function"&&el.call(e)==="[object Function]"});Ze.isFunction=Za;var ld=Array.isArray||function(e){return e&&typeof e=="object"?el.call(e)==="[object Array]":!1};Ze.isArray=ld;function $0(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function x0(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return w0.test(e)?e.replace(v0,b0):e}function _0(e){return!e&&e!==0?!0:!!(ld(e)&&e.length===0)}function S0(e){var t=ad({},e);return t._parent=e,t}function k0(e,t){return e.path=t,e}function C0(e,t){return(e?e+".":"")+t}});var et=S((xo,cd)=>{"use strict";xo.__esModule=!0;var tl=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function rl(e,t){var r=t&&t.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,e+=" - "+n+":"+o);for(var a=Error.prototype.constructor.call(this,e),c=0;c<tl.length;c++)this[tl[c]]=a[tl[c]];Error.captureStackTrace&&Error.captureStackTrace(this,rl);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{}}rl.prototype=new Error;xo.default=rl;cd.exports=xo.default});var fd=S((_o,ud)=>{"use strict";_o.__esModule=!0;var nl=qe();_o.default=function(e){e.registerHelper("blockHelperMissing",function(t,r){var n=r.inverse,i=r.fn;if(t===!0)return i(this);if(t===!1||t==null)return n(this);if(nl.isArray(t))return t.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(t,r)):n(this);if(r.data&&r.ids){var o=nl.createFrame(r.data);o.contextPath=nl.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(t,r)})};ud.exports=_o.default});var dd=S((So,pd)=>{"use strict";So.__esModule=!0;function E0(e){return e&&e.__esModule?e:{default:e}}var Kn=qe(),P0=et(),I0=E0(P0);So.default=function(e){e.registerHelper("each",function(t,r){if(!r)throw new I0.default("Must pass iterator to #each");var n=r.fn,i=r.inverse,o=0,s="",a=void 0,c=void 0;r.data&&r.ids&&(c=Kn.appendContextPath(r.data.contextPath,r.ids[0])+"."),Kn.isFunction(t)&&(t=t.call(this)),r.data&&(a=Kn.createFrame(r.data));function l(y,g,v){a&&(a.key=y,a.index=g,a.first=g===0,a.last=!!v,c&&(a.contextPath=c+y)),s=s+n(t[y],{data:a,blockParams:Kn.blockParams([t[y],y],[c+y,null])})}if(t&&typeof t=="object")if(Kn.isArray(t))for(var p=t.length;o<p;o++)o in t&&l(o,o,o===t.length-1);else if(typeof Symbol=="function"&&t[Symbol.iterator]){for(var f=[],h=t[Symbol.iterator](),m=h.next();!m.done;m=h.next())f.push(m.value);t=f;for(var p=t.length;o<p;o++)l(o,o,o===t.length-1)}else(function(){var y=void 0;Object.keys(t).forEach(function(g){y!==void 0&&l(y,o-1),y=g,o++}),y!==void 0&&l(y,o-1,!0)})();return o===0&&(s=i(this)),s})};pd.exports=So.default});var md=S((ko,hd)=>{"use strict";ko.__esModule=!0;function R0(e){return e&&e.__esModule?e:{default:e}}var T0=et(),A0=R0(T0);ko.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new A0.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};hd.exports=ko.default});var wd=S((Co,vd)=>{"use strict";Co.__esModule=!0;function N0(e){return e&&e.__esModule?e:{default:e}}var gd=qe(),M0=et(),yd=N0(M0);Co.default=function(e){e.registerHelper("if",function(t,r){if(arguments.length!=2)throw new yd.default("#if requires exactly one argument");return gd.isFunction(t)&&(t=t.call(this)),!r.hash.includeZero&&!t||gd.isEmpty(t)?r.inverse(this):r.fn(this)}),e.registerHelper("unless",function(t,r){if(arguments.length!=2)throw new yd.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};vd.exports=Co.default});var $d=S((Eo,bd)=>{"use strict";Eo.__esModule=!0;Eo.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)t.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),t[0]=i,e.log.apply(e,t)})};bd.exports=Eo.default});var _d=S((Po,xd)=>{"use strict";Po.__esModule=!0;Po.default=function(e){e.registerHelper("lookup",function(t,r,n){return t&&n.lookupProperty(t,r)})};xd.exports=Po.default});var kd=S((Io,Sd)=>{"use strict";Io.__esModule=!0;function O0(e){return e&&e.__esModule?e:{default:e}}var Yn=qe(),V0=et(),L0=O0(V0);Io.default=function(e){e.registerHelper("with",function(t,r){if(arguments.length!=2)throw new L0.default("#with requires exactly one argument");Yn.isFunction(t)&&(t=t.call(this));var n=r.fn;if(Yn.isEmpty(t))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=Yn.createFrame(r.data),i.contextPath=Yn.appendContextPath(r.data.contextPath,r.ids[0])),n(t,{data:i,blockParams:Yn.blockParams([t],[i&&i.contextPath])})})};Sd.exports=Io.default});var il=S(Ro=>{"use strict";Ro.__esModule=!0;Ro.registerDefaultHelpers=Q0;Ro.moveHelperToHooks=Z0;function gr(e){return e&&e.__esModule?e:{default:e}}var j0=fd(),D0=gr(j0),F0=dd(),q0=gr(F0),B0=md(),H0=gr(B0),W0=wd(),U0=gr(W0),z0=$d(),G0=gr(z0),J0=_d(),K0=gr(J0),Y0=kd(),X0=gr(Y0);function Q0(e){D0.default(e),q0.default(e),H0.default(e),U0.default(e),G0.default(e),K0.default(e),X0.default(e)}function Z0(e,t,r){e.helpers[t]&&(e.hooks[t]=e.helpers[t],r||(e.helpers[t]=void 0))}});var Ed=S((To,Cd)=>{"use strict";To.__esModule=!0;var e$=qe();To.default=function(e){e.registerDecorator("inline",function(t,r,n,i){var o=t;return r.partials||(r.partials={},o=function(s,a){var c=n.partials;n.partials=e$.extend({},c,r.partials);var l=t(s,a);return n.partials=c,l}),r.partials[i.args[0]]=i.fn,o})};Cd.exports=To.default});var Pd=S(ol=>{"use strict";ol.__esModule=!0;ol.registerDefaultDecorators=i$;function t$(e){return e&&e.__esModule?e:{default:e}}var r$=Ed(),n$=t$(r$);function i$(e){n$.default(e)}});var sl=S((Ao,Id)=>{"use strict";Ao.__esModule=!0;var o$=qe(),Xr={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if(typeof t=="string"){var r=o$.indexOf(Xr.methodMap,t.toLowerCase());r>=0?t=r:t=parseInt(t,10)}return t},log:function(t){if(t=Xr.lookupLevel(t),typeof console<"u"&&Xr.lookupLevel(Xr.level)<=t){var r=Xr.methodMap[t];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)}}};Ao.default=Xr;Id.exports=Ao.default});var al=S(Xn=>{"use strict";Xn.__esModule=!0;Xn.createProtoAccessControl=c$;Xn.resultIsAllowed=u$;Xn.resetLoggedProperties=p$;function s$(e){return e&&e.__esModule?e:{default:e}}var Rd=qe(),a$=sl(),l$=s$(a$),No=Object.create(null);function c$(e){var t=Object.create(null);t.__proto__=!1,Rd.extend(t,e.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,Rd.extend(r,e.allowedProtoMethods),{properties:{whitelist:t,defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:e.allowProtoMethodsByDefault}}}function u$(e,t,r){return Td(typeof e=="function"?t.methods:t.properties,r)}function Td(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(f$(t),!1)}function f$(e){No[e]!==!0&&(No[e]=!0,l$.default.log("error",'Handlebars: Access has been denied to resolve the property "'+e+`" because it is not an "own property" of its parent.
101
+ ${_}`}function A0(e,t){return k0(e,"components",`${t.exportName}.generated.tsx`)}var nl=K(()=>{"use strict";Qp();hd()});var Me=S(Ze=>{"use strict";Ze.__esModule=!0;Ze.extend=vd;Ze.indexOf=L0;Ze.escapeExpression=j0;Ze.isEmpty=D0;Ze.createFrame=F0;Ze.blockParams=q0;Ze.appendContextPath=B0;var N0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},O0=/[&<>"'`=]/g,M0=/[&<>"'`=]/;function V0(e){return N0[e]}function vd(e){for(var t=1;t<arguments.length;t++)for(var r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&(e[r]=arguments[t][r]);return e}var ol=Object.prototype.toString;Ze.toString=ol;var il=function(t){return typeof t=="function"};il(/x/)&&(Ze.isFunction=il=function(e){return typeof e=="function"&&ol.call(e)==="[object Function]"});Ze.isFunction=il;var wd=Array.isArray||function(e){return e&&typeof e=="object"?ol.call(e)==="[object Array]":!1};Ze.isArray=wd;function L0(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function j0(e){if(typeof e!="string"){if(e&&typeof e.toHTML=="function")return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return M0.test(e)?e.replace(O0,V0):e}function D0(e){return!e&&e!==0?!0:!!(wd(e)&&e.length===0)}function F0(e){var t=vd({},e);return t._parent=e,t}function q0(e,t){return e.path=t,e}function B0(e,t){return(e?e+".":"")+t}});var ot=S((_o,bd)=>{"use strict";_o.__esModule=!0;var sl=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function al(e,t){var r=t&&t.loc,n=void 0,i=void 0,o=void 0,s=void 0;r&&r.start&&(n=r.start.line,o=r.start.column,r.end&&(i=r.end.line,s=r.end.column),e+=" - "+n+":"+o);for(var a=Error.prototype.constructor.call(this,e),c=0;c<sl.length;c++)this[sl[c]]=a[sl[c]];Error.captureStackTrace&&Error.captureStackTrace(this,al);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{}}al.prototype=new Error;_o.default=al;bd.exports=_o.default});var xd=S((So,$d)=>{"use strict";So.__esModule=!0;var ll=Me();So.default=function(e){e.registerHelper("blockHelperMissing",function(t,r){var n=r.inverse,i=r.fn;if(t===!0)return i(this);if(t===!1||t==null)return n(this);if(ll.isArray(t))return t.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(t,r)):n(this);if(r.data&&r.ids){var o=ll.createFrame(r.data);o.contextPath=ll.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(t,r)})};$d.exports=So.default});var Sd=S((ko,_d)=>{"use strict";ko.__esModule=!0;function H0(e){return e&&e.__esModule?e:{default:e}}var tn=Me(),W0=ot(),U0=H0(W0);function z0(e){try{var t=e.return;tn.isFunction(t)&&t.call(e)}catch{}}ko.default=function(e){e.registerHelper("each",function(t,r){if(!r)throw new U0.default("Must pass iterator to #each");var n=r.fn,i=r.inverse,o=0,s="",a=void 0,c=void 0;r.data&&r.ids&&(c=tn.appendContextPath(r.data.contextPath,r.ids[0])+"."),tn.isFunction(t)&&(t=t.call(this)),r.data&&(a=tn.createFrame(r.data));function l(y,g,v,b){a&&(a.key=y,a.index=g,a.first=g===0,a.last=!!v,c&&(a.contextPath=c+y)),s=s+n(b,{data:a,blockParams:tn.blockParams([b,y],[c+y,null])})}if(t&&typeof t=="object")if(tn.isArray(t))for(var p=t.length;o<p;o++)o in t&&l(o,o,o===t.length-1,t[o]);else if(typeof Symbol=="function"&&t[Symbol.iterator])for(var f=t[Symbol.iterator](),d=f.next();!d.done;){var m=f.next();try{l(o,o,m.done,d.value)}catch(y){throw m.done||z0(f),y}d=m,o++}else(function(){var y=void 0;Object.keys(t).forEach(function(g){y!==void 0&&l(y,o-1,!1,t[y]),y=g,o++}),y!==void 0&&l(y,o-1,!0,t[y])})();return o===0&&(s=i(this)),s})};_d.exports=ko.default});var Cd=S((Co,kd)=>{"use strict";Co.__esModule=!0;function G0(e){return e&&e.__esModule?e:{default:e}}var J0=ot(),K0=G0(J0);Co.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new K0.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};kd.exports=Co.default});var Rd=S((Eo,Id)=>{"use strict";Eo.__esModule=!0;function Y0(e){return e&&e.__esModule?e:{default:e}}var Ed=Me(),X0=ot(),Pd=Y0(X0);Eo.default=function(e){e.registerHelper("if",function(t,r){if(arguments.length!=2)throw new Pd.default("#if requires exactly one argument");return Ed.isFunction(t)&&(t=t.call(this)),!r.hash.includeZero&&!t||Ed.isEmpty(t)?r.inverse(this):r.fn(this)}),e.registerHelper("unless",function(t,r){if(arguments.length!=2)throw new Pd.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};Id.exports=Eo.default});var Ad=S((Po,Td)=>{"use strict";Po.__esModule=!0;Po.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)t.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),t[0]=i,e.log.apply(e,t)})};Td.exports=Po.default});var Od=S((Io,Nd)=>{"use strict";Io.__esModule=!0;Io.default=function(e){e.registerHelper("lookup",function(t,r,n){return t&&n.lookupProperty(t,r)})};Nd.exports=Io.default});var Vd=S((Ro,Md)=>{"use strict";Ro.__esModule=!0;function Q0(e){return e&&e.__esModule?e:{default:e}}var ei=Me(),Z0=ot(),e$=Q0(Z0);Ro.default=function(e){e.registerHelper("with",function(t,r){if(arguments.length!=2)throw new e$.default("#with requires exactly one argument");ei.isFunction(t)&&(t=t.call(this));var n=r.fn;if(ei.isEmpty(t))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=ei.createFrame(r.data),i.contextPath=ei.appendContextPath(r.data.contextPath,r.ids[0])),n(t,{data:i,blockParams:ei.blockParams([t],[i&&i.contextPath])})})};Md.exports=Ro.default});var cl=S(To=>{"use strict";To.__esModule=!0;To.registerDefaultHelpers=m$;To.moveHelperToHooks=g$;function br(e){return e&&e.__esModule?e:{default:e}}var t$=xd(),r$=br(t$),n$=Sd(),i$=br(n$),o$=Cd(),s$=br(o$),a$=Rd(),l$=br(a$),c$=Ad(),u$=br(c$),f$=Od(),p$=br(f$),d$=Vd(),h$=br(d$);function m$(e){r$.default(e),i$.default(e),s$.default(e),l$.default(e),u$.default(e),p$.default(e),h$.default(e)}function g$(e,t,r){e.helpers[t]&&(e.hooks[t]=e.helpers[t],r||(e.helpers[t]=void 0))}});var jd=S((Ao,Ld)=>{"use strict";Ao.__esModule=!0;var y$=Me();Ao.default=function(e){e.registerDecorator("inline",function(t,r,n,i){var o=t;return r.partials||(r.partials={},o=function(s,a){var c=n.partials;n.partials=y$.extend({},c,r.partials);var l=t(s,a);return n.partials=c,l}),r.partials[i.args[0]]=i.fn,o})};Ld.exports=Ao.default});var Dd=S(ul=>{"use strict";ul.__esModule=!0;ul.registerDefaultDecorators=$$;function v$(e){return e&&e.__esModule?e:{default:e}}var w$=jd(),b$=v$(w$);function $$(e){b$.default(e)}});var fl=S((No,Fd)=>{"use strict";No.__esModule=!0;var x$=Me(),rn={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if(typeof t=="string"){var r=x$.indexOf(rn.methodMap,t.toLowerCase());r>=0?t=r:t=parseInt(t,10)}return t},log:function(t){if(t=rn.lookupLevel(t),typeof console<"u"&&rn.lookupLevel(rn.level)<=t){var r=rn.methodMap[t];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)}}};No.default=rn;Fd.exports=No.default});var pl=S(nn=>{"use strict";nn.__esModule=!0;nn.createProtoAccessControl=C$;nn.resultIsAllowed=E$;nn.isPrototypeConstructor=P$;nn.resetLoggedProperties=R$;function _$(e){return e&&e.__esModule?e:{default:e}}var qd=Me(),S$=fl(),k$=_$(S$),Oo=Object.create(null);function C$(e){var t=Object.create(null);t.__proto__=!1,qd.extend(t,e.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,qd.extend(r,e.allowedProtoMethods),{properties:{whitelist:t,defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:e.allowProtoMethodsByDefault}}}function E$(e,t,r){return Bd(typeof e=="function"?t.methods:t.properties,r)}function P$(e,t,r){return t==="constructor"&&typeof r=="function"&&e===r.prototype}function Bd(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(I$(t),!1)}function I$(e){Oo[e]!==!0&&(Oo[e]=!0,k$.default.log("error",'Handlebars: Access has been denied to resolve the property "'+e+`" 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 p$(){Object.keys(No).forEach(function(e){delete No[e]})}});var Oo=S(kt=>{"use strict";kt.__esModule=!0;kt.HandlebarsEnvironment=ul;function Ad(e){return e&&e.__esModule?e:{default:e}}var yr=qe(),d$=et(),ll=Ad(d$),h$=il(),m$=Pd(),g$=sl(),Mo=Ad(g$),y$=al(),v$="4.7.9";kt.VERSION=v$;var w$=8;kt.COMPILER_REVISION=w$;var b$=7;kt.LAST_COMPATIBLE_COMPILER_REVISION=b$;var $$={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"};kt.REVISION_CHANGES=$$;var cl="[object Object]";function ul(e,t,r){this.helpers=e||{},this.partials=t||{},this.decorators=r||{},h$.registerDefaultHelpers(this),m$.registerDefaultDecorators(this)}ul.prototype={constructor:ul,logger:Mo.default,log:Mo.default.log,registerHelper:function(t,r){if(yr.toString.call(t)===cl){if(r)throw new ll.default("Arg not supported with multiple helpers");yr.extend(this.helpers,t)}else this.helpers[t]=r},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,r){if(yr.toString.call(t)===cl)yr.extend(this.partials,t);else{if(typeof r>"u")throw new ll.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=r}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,r){if(yr.toString.call(t)===cl){if(r)throw new ll.default("Arg not supported with multiple decorators");yr.extend(this.decorators,t)}else this.decorators[t]=r},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){y$.resetLoggedProperties()}};var x$=Mo.default.log;kt.log=x$;kt.createFrame=yr.createFrame;kt.logger=Mo.default});var Md=S((Vo,Nd)=>{"use strict";Vo.__esModule=!0;function fl(e){this.string=e}fl.prototype.toString=fl.prototype.toHTML=function(){return""+this.string};Vo.default=fl;Nd.exports=Vo.default});var Od=S(pl=>{"use strict";pl.__esModule=!0;pl.wrapHelper=_$;function _$(e,t){if(typeof e!="function")return e;var r=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=t(i),e.apply(this,arguments)};return r}});var qd=S(er=>{"use strict";er.__esModule=!0;er.checkRevision=I$;er.template=R$;er.wrapProgram=Lo;er.resolvePartial=T$;er.invokePartial=A$;er.noop=Dd;function S$(e){return e&&e.__esModule?e:{default:e}}function k$(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var C$=qe(),Qr=k$(C$),E$=et(),Lt=S$(E$),jt=Oo(),Vd=il(),P$=Od(),Ld=al();function I$(e){var t=e&&e[0]||1,r=jt.COMPILER_REVISION;if(!(t>=jt.LAST_COMPATIBLE_COMPILER_REVISION&&t<=jt.COMPILER_REVISION))if(t<jt.LAST_COMPATIBLE_COMPILER_REVISION){var n=jt.REVISION_CHANGES[r],i=jt.REVISION_CHANGES[t];throw new Lt.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 Lt.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}function R$(e,t){if(!t)throw new Lt.default("No environment passed to template");if(!e||!e.main)throw new Lt.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var r=e.compiler&&e.compiler[0]===7;function n(s,a,c){c.hash&&(a=Qr.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),s=t.VM.resolvePartial.call(this,s,a,c),c.hooks=this.hooks,c.protoAccessControl=this.protoAccessControl;var l=t.VM.invokePartial.call(this,s,a,c);if(l==null&&t.compile&&(c.partials[c.name]=t.compile(s,e.compilerOptions,t),l=c.partials[c.name](a,c)),l!=null){if(c.indent){for(var p=l.split(`
104
- `),f=0,h=p.length;f<h&&!(!p[f]&&f+1===h);f++)p[f]=c.indent+p[f];l=p.join(`
105
- `)}return l}else throw new Lt.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,c,l){if(!a||!(c in a))throw new Lt.default('"'+c+'" not defined in '+a,{loc:l});return i.lookupProperty(a,c)},lookupProperty:function(a,c){var l=a[c];if(l==null||Object.prototype.hasOwnProperty.call(a,c)||Ld.resultIsAllowed(l,i.protoAccessControl,c))return l},lookup:function(a,c){for(var l=a.length,p=0;p<l;p++){var f=a[p]&&i.lookupProperty(a[p],c);if(f!=null)return f}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:Qr.escapeExpression,invokePartial:n,fn:function(a){var c=e[a];return c.decorator=e[a+"_d"],c},programs:[],program:function(a,c,l,p,f){var h=this.programs[a],m=this.fn(a);return c||f||p||l?h=Lo(this,a,m,c,l,p,f):h||(h=this.programs[a]=Lo(this,a,m)),h},data:function(a,c){for(;a&&c--;)a=a._parent;return a},mergeIfNeeded:function(a,c){var l=a||c;return a&&c&&a!==c&&(l=Qr.extend({},c,a)),l},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function o(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=a.data;o._setup(a),!a.partial&&e.useData&&(c=N$(s,c));var l=void 0,p=e.useBlockParams?[]:void 0;e.useDepths&&(a.depths?l=s!=a.depths[0]?[s].concat(a.depths):a.depths:l=[s]);function f(h){return""+e.main(i,h,i.helpers,i.partials,c,p,l)}return f=Fd(e.main,f,i,a.depths||[],c,p),f(s,a)}return o.isTop=!0,o._setup=function(s){if(s.partial)i.protoAccessControl=s.protoAccessControl,i.helpers=s.helpers,i.partials=s.partials,i.decorators=s.decorators,i.hooks=s.hooks;else{var a={};jd(a,t.helpers,i),jd(a,s.helpers,i),i.helpers=a,e.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,t.partials)),(e.usePartial||e.useDecorators)&&(i.decorators=Qr.extend({},t.decorators,s.decorators)),i.hooks={},i.protoAccessControl=Ld.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||r;Vd.moveHelperToHooks(i,"helperMissing",c),Vd.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(s,a,c,l){if(e.useBlockParams&&!c)throw new Lt.default("must pass block params");if(e.useDepths&&!l)throw new Lt.default("must pass parent depths");return Lo(i,s,e[s],a,0,c,l)},o}function Lo(e,t,r,n,i,o,s){function a(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=s;return s&&c!=s[0]&&!(c===e.nullContext&&s[0]===null)&&(p=[c].concat(s)),r(e,c,e.helpers,e.partials,l.data||n,o&&[l.blockParams].concat(o),p)}return a=Fd(r,a,e,s,n,o),a.program=t,a.depth=s?s.length:0,a.blockParams=i||0,a}function T$(e,t,r){return e?!e.call&&!r.name&&(r.name=e,e=jo(r.partials,e)):r.name==="@partial-block"?e=jo(r.data,"partial-block"):e=jo(r.partials,r.name),e}function A$(e,t,r){var n=jo(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!==Dd&&(function(){r.data=jt.createFrame(r.data);var o=r.fn;i=r.data["partial-block"]=function(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=jt.createFrame(c.data),c.data["partial-block"]=n,o(a,c)},o.partials&&(r.partials=Qr.extend({},r.partials,o.partials))})(),e===void 0&&i&&(e=i),e===void 0)throw new Lt.default("The partial "+r.name+" could not be found");if(e instanceof Function)return e(t,r)}function Dd(){return""}function jo(e,t){if(e&&Object.prototype.hasOwnProperty.call(e,t))return e[t]}function N$(e,t){return(!t||!("root"in t))&&(t=t?jt.createFrame(t):{},t.root=e),t}function Fd(e,t,r,n,i,o){if(e.decorator){var s={};t=e.decorator(t,s,r,n&&n[0],i,o,n),Qr.extend(t,s)}return t}function jd(e,t,r){t&&Object.keys(t).forEach(function(n){var i=t[n];e[n]=M$(i,r)})}function M$(e,t){var r=t.lookupProperty;return P$.wrapHelper(e,function(n){return n.lookupProperty=r,n})}});var dl=S((Do,Bd)=>{"use strict";Do.__esModule=!0;Do.default=function(e){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var t=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=t),e}};Bd.exports=Do.default});var Gd=S((Fo,zd)=>{"use strict";Fo.__esModule=!0;function ml(e){return e&&e.__esModule?e:{default:e}}function gl(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var O$=Oo(),Hd=gl(O$),V$=Md(),L$=ml(V$),j$=et(),D$=ml(j$),F$=qe(),hl=gl(F$),q$=qd(),Wd=gl(q$),B$=dl(),H$=ml(B$);function Ud(){var e=new Hd.HandlebarsEnvironment;return hl.extend(e,Hd),e.SafeString=L$.default,e.Exception=D$.default,e.Utils=hl,e.escapeExpression=hl.escapeExpression,e.VM=Wd,e.template=function(t){return Wd.template(t,e)},e}var Qn=Ud();Qn.create=Ud;H$.default(Qn);Qn.default=Qn;Fo.default=Qn;zd.exports=Fo.default});var yl=S((qo,Kd)=>{"use strict";qo.__esModule=!0;var Jd={helpers:{helperExpression:function(t){return t.type==="SubExpression"||(t.type==="MustacheStatement"||t.type==="BlockStatement")&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return t.parts.length===1&&!Jd.helpers.scopedId(t)&&!t.depth}}};qo.default=Jd;Kd.exports=qo.default});var Xd=S((Bo,Yd)=>{"use strict";Bo.__esModule=!0;var W$=(function(){var e={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,c,l,p){var f=l.length-1;switch(c){case 1:return l[f-1];case 2:this.$=a.prepareProgram(l[f]);break;case 3:this.$=l[f];break;case 4:this.$=l[f];break;case 5:this.$=l[f];break;case 6:this.$=l[f];break;case 7:this.$=l[f];break;case 8:this.$=l[f];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(l[f]),strip:a.stripFlags(l[f],l[f]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[f],value:l[f],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(l[f-2],l[f-1],l[f],this._$);break;case 12:this.$={path:l[f-3],params:l[f-2],hash:l[f-1]};break;case 13:this.$=a.prepareBlock(l[f-3],l[f-2],l[f-1],l[f],!1,this._$);break;case 14:this.$=a.prepareBlock(l[f-3],l[f-2],l[f-1],l[f],!0,this._$);break;case 15:this.$={open:l[f-5],path:l[f-4],params:l[f-3],hash:l[f-2],blockParams:l[f-1],strip:a.stripFlags(l[f-5],l[f])};break;case 16:this.$={path:l[f-4],params:l[f-3],hash:l[f-2],blockParams:l[f-1],strip:a.stripFlags(l[f-5],l[f])};break;case 17:this.$={path:l[f-4],params:l[f-3],hash:l[f-2],blockParams:l[f-1],strip:a.stripFlags(l[f-5],l[f])};break;case 18:this.$={strip:a.stripFlags(l[f-1],l[f-1]),program:l[f]};break;case 19:var h=a.prepareBlock(l[f-2],l[f-1],l[f],l[f],!1,this._$),m=a.prepareProgram([h],l[f-1].loc);m.chained=!0,this.$={strip:l[f-2].strip,program:m,chain:!0};break;case 20:this.$=l[f];break;case 21:this.$={path:l[f-1],strip:a.stripFlags(l[f-2],l[f])};break;case 22:this.$=a.prepareMustache(l[f-3],l[f-2],l[f-1],l[f-4],a.stripFlags(l[f-4],l[f]),this._$);break;case 23:this.$=a.prepareMustache(l[f-3],l[f-2],l[f-1],l[f-4],a.stripFlags(l[f-4],l[f]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[f-3],params:l[f-2],hash:l[f-1],indent:"",strip:a.stripFlags(l[f-4],l[f]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(l[f-2],l[f-1],l[f],this._$);break;case 26:this.$={path:l[f-3],params:l[f-2],hash:l[f-1],strip:a.stripFlags(l[f-4],l[f])};break;case 27:this.$=l[f];break;case 28:this.$=l[f];break;case 29:this.$={type:"SubExpression",path:l[f-3],params:l[f-2],hash:l[f-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[f],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(l[f-2]),value:l[f],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(l[f-1]);break;case 33:this.$=l[f];break;case 34:this.$=l[f];break;case 35:this.$={type:"StringLiteral",value:l[f],original:l[f],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[f]),original:Number(l[f]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[f]==="true",original:l[f]==="true",loc:a.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:a.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:a.locInfo(this._$)};break;case 40:this.$=l[f];break;case 41:this.$=l[f];break;case 42:this.$=a.preparePath(!0,l[f],this._$);break;case 43:this.$=a.preparePath(!1,l[f],this._$);break;case 44:l[f-2].push({part:a.id(l[f]),original:l[f],separator:l[f-1]}),this.$=l[f-2];break;case 45:this.$=[{part:a.id(l[f]),original:l[f]}];break;case 46:this.$=[];break;case 47:l[f-1].push(l[f]);break;case 48:this.$=[];break;case 49:l[f-1].push(l[f]);break;case 50:this.$=[];break;case 51:l[f-1].push(l[f]);break;case 58:this.$=[];break;case 59:l[f-1].push(l[f]);break;case 64:this.$=[];break;case 65:l[f-1].push(l[f]);break;case 70:this.$=[];break;case 71:l[f-1].push(l[f]);break;case 78:this.$=[];break;case 79:l[f-1].push(l[f]);break;case 82:this.$=[];break;case 83:l[f-1].push(l[f]);break;case 86:this.$=[];break;case 87:l[f-1].push(l[f]);break;case 90:this.$=[];break;case 91:l[f-1].push(l[f]);break;case 94:this.$=[];break;case 95:l[f-1].push(l[f]);break;case 98:this.$=[l[f]];break;case 99:l[f-1].push(l[f]);break;case 100:this.$=[l[f]];break;case 101:l[f-1].push(l[f]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(i,o){throw new Error(i)},parse:function(i){var o=this,s=[0],a=[null],c=[],l=this.table,p="",f=0,h=0,m=0,y=2,g=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 v=this.lexer.yylloc;c.push(v);var $=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function I(D){s.length=s.length-2*D,a.length=a.length-D,c.length=c.length-D}function _(){var D;return D=o.lexer.lex()||1,typeof D!="number"&&(D=o.symbols_[D]||D),D}for(var R,N,j,U,oe,me,be={},Pe,we,ze,fe;;){if(j=s[s.length-1],this.defaultActions[j]?U=this.defaultActions[j]:((R===null||typeof R>"u")&&(R=_()),U=l[j]&&l[j][R]),typeof U>"u"||!U.length||!U[0]){var Y="";if(!m){fe=[];for(Pe in l[j])this.terminals_[Pe]&&Pe>2&&fe.push("'"+this.terminals_[Pe]+"'");this.lexer.showPosition?Y="Parse error on line "+(f+1)+`:
103
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function R$(){Object.keys(Oo).forEach(function(e){delete Oo[e]})}});var Vo=S(Ct=>{"use strict";Ct.__esModule=!0;Ct.HandlebarsEnvironment=ml;function Hd(e){return e&&e.__esModule?e:{default:e}}var $r=Me(),T$=ot(),dl=Hd(T$),A$=cl(),N$=Dd(),O$=fl(),Mo=Hd(O$),M$=pl(),V$="4.7.10";Ct.VERSION=V$;var L$=8;Ct.COMPILER_REVISION=L$;var j$=7;Ct.LAST_COMPATIBLE_COMPILER_REVISION=j$;var D$={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"};Ct.REVISION_CHANGES=D$;var hl="[object Object]";function ml(e,t,r){this.helpers=e||{},this.partials=t||{},this.decorators=r||{},A$.registerDefaultHelpers(this),N$.registerDefaultDecorators(this)}ml.prototype={constructor:ml,logger:Mo.default,log:Mo.default.log,registerHelper:function(t,r){if($r.toString.call(t)===hl){if(r)throw new dl.default("Arg not supported with multiple helpers");$r.extend(this.helpers,t)}else this.helpers[t]=r},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,r){if($r.toString.call(t)===hl)$r.extend(this.partials,t);else{if(typeof r>"u")throw new dl.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=r}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,r){if($r.toString.call(t)===hl){if(r)throw new dl.default("Arg not supported with multiple decorators");$r.extend(this.decorators,t)}else this.decorators[t]=r},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){M$.resetLoggedProperties()}};var F$=Mo.default.log;Ct.log=F$;Ct.createFrame=$r.createFrame;Ct.logger=Mo.default});var Ud=S((Lo,Wd)=>{"use strict";Lo.__esModule=!0;function gl(e){this.string=e}gl.prototype.toString=gl.prototype.toHTML=function(){return""+this.string};Lo.default=gl;Wd.exports=Lo.default});var zd=S(yl=>{"use strict";yl.__esModule=!0;yl.wrapHelper=q$;function q$(e,t){if(typeof e!="function")return e;var r=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=t(i),e.apply(this,arguments)};return r}});var Xd=S(nr=>{"use strict";nr.__esModule=!0;nr.checkRevision=G$;nr.template=J$;nr.wrapProgram=jo;nr.resolvePartial=K$;nr.invokePartial=Y$;nr.noop=Kd;function B$(e){return e&&e.__esModule?e:{default:e}}function H$(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var W$=Me(),xr=H$(W$),U$=ot(),yt=B$(U$),Dt=Vo(),Gd=cl(),z$=zd(),vl=pl();function G$(e){var t=e&&e[0]||1,r=Dt.COMPILER_REVISION;if(!(t>=Dt.LAST_COMPATIBLE_COMPILER_REVISION&&t<=Dt.COMPILER_REVISION))if(t<Dt.LAST_COMPATIBLE_COMPILER_REVISION){var n=Dt.REVISION_CHANGES[r],i=Dt.REVISION_CHANGES[t];throw new yt.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 yt.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}function J$(e,t){if(!t)throw new yt.default("No environment passed to template");if(!e||!e.main)throw new yt.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var r=e.compiler&&e.compiler[0]===7;function n(s,a,c){c.hash&&(a=xr.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),s=t.VM.resolvePartial.call(this,s,a,c),c.hooks=this.hooks,c.protoAccessControl=this.protoAccessControl;var l=t.VM.invokePartial.call(this,s,a,c);if(l==null&&xr.isFunction(s))throw new yt.default("The partial "+c.name+" returned no output: partials must return a string");if(l==null&&t.compile){if(typeof s!="string")throw new yt.default("The partial "+c.name+" could not be compiled: partials must be strings or functions returning strings");c.partials[c.name]=t.compile(s,e.compilerOptions,t),l=c.partials[c.name](a,c)}if(l!=null){if(c.indent){for(var p=l.split(`
104
+ `),f=0,d=p.length;f<d&&!(!p[f]&&f+1===d);f++)p[f]=c.indent+p[f];l=p.join(`
105
+ `)}return l}else throw new yt.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,c,l){if(!a||!(c in a))throw new yt.default('"'+c+'" not defined in '+a,{loc:l});return i.lookupProperty(a,c)},lookupProperty:function(a,c){var l=a[c];if(l==null||Object.prototype.hasOwnProperty.call(a,c)&&!vl.isPrototypeConstructor(a,c,l)||vl.resultIsAllowed(l,i.protoAccessControl,c))return l},lookup:function(a,c){for(var l=a.length,p=0;p<l;p++){var f=a[p]&&i.lookupProperty(a[p],c);if(f!=null)return f}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:xr.escapeExpression,invokePartial:n,fn:function(a){var c=e[a];return c.decorator=e[a+"_d"],c},programs:[],program:function(a,c,l,p,f){var d=this.programs[a],m=this.fn(a);return c||f||p||l?d=jo(this,a,m,c,l,p,f):d||(d=this.programs[a]=jo(this,a,m)),d},data:function(a,c){for(;a&&c--;)a=a._parent;return a},mergeIfNeeded:function(a,c){var l=a||c;return a&&c&&a!==c&&(l=xr.extend({},c,a)),l},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function o(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=a.data;o._setup(a),!a.partial&&e.useData&&(c=X$(s,c));var l=void 0,p=e.useBlockParams?[]:void 0;e.useDepths&&(a.depths?l=s!=a.depths[0]?[s].concat(a.depths):a.depths:l=[s]);function f(d){return""+e.main(i,d,i.helpers,i.partials,c,p,l)}return f=Yd(e.main,f,i,a.depths||[],c,p),f(s,a)}return o.isTop=!0,o._setup=function(s){if(s.partial)i.protoAccessControl=s.protoAccessControl,i.helpers=s.helpers,i.partials=s.partials,i.decorators=s.decorators,i.hooks=s.hooks;else{var a={};Jd(a,t.helpers,i),Jd(a,s.helpers,i),i.helpers=a,e.usePartial&&(i.partials=i.mergeIfNeeded(s.partials,t.partials)),(e.usePartial||e.useDecorators)&&(i.decorators=xr.extend({},t.decorators,s.decorators)),i.hooks={},i.protoAccessControl=vl.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||r;Gd.moveHelperToHooks(i,"helperMissing",c),Gd.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(s,a,c,l){if(e.useBlockParams&&!c)throw new yt.default("must pass block params");if(e.useDepths&&!l)throw new yt.default("must pass parent depths");return jo(i,s,e[s],a,0,c,l)},o}function jo(e,t,r,n,i,o,s){function a(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=s;return s&&c!=s[0]&&!(c===e.nullContext&&s[0]===null)&&(p=[c].concat(s)),r(e,c,e.helpers,e.partials,l.data||n,o&&[l.blockParams].concat(o),p)}return a=Yd(r,a,e,s,n,o),a.program=t,a.depth=s?s.length:0,a.blockParams=i||0,a}function K$(e,t,r){return e?typeof e!="function"&&!r.name&&(r.name=e,e=Do(r.partials,e)):r.name==="@partial-block"?e=Do(r.data,"partial-block"):e=Do(r.partials,r.name),e}function Y$(e,t,r){var n=Do(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!==Kd&&(function(){r.data=Dt.createFrame(r.data);var o=r.fn;i=r.data["partial-block"]=function(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=Dt.createFrame(c.data),c.data["partial-block"]=n,o(a,c)},o.partials&&(r.partials=xr.extend({},r.partials,o.partials))})(),e===void 0&&i&&(e=i),e===void 0)throw new yt.default("The partial "+r.name+" could not be found");if(e instanceof Function)return e(t,r)}function Kd(){return""}function Do(e,t){if(e&&Object.prototype.hasOwnProperty.call(e,t))return e[t]}function X$(e,t){return(!t||!("root"in t))&&(t=t?Dt.createFrame(t):{},t.root=e),t}function Yd(e,t,r,n,i,o){if(e.decorator){var s={};t=e.decorator(t,s,r,n&&n[0],i,o,n),xr.extend(t,s)}return t}function Jd(e,t,r){t&&Object.keys(t).forEach(function(n){var i=t[n];e[n]=Q$(i,r)})}function Q$(e,t){var r=t.lookupProperty;return z$.wrapHelper(e,function(n){return n.lookupProperty=r,n})}});var wl=S((Fo,Qd)=>{"use strict";Fo.__esModule=!0;Fo.default=function(e){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var t=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=t),e}};Qd.exports=Fo.default});var nh=S((qo,rh)=>{"use strict";qo.__esModule=!0;function $l(e){return e&&e.__esModule?e:{default:e}}function xl(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var Z$=Vo(),Zd=xl(Z$),e1=Ud(),t1=$l(e1),r1=ot(),n1=$l(r1),i1=Me(),bl=xl(i1),o1=Xd(),eh=xl(o1),s1=wl(),a1=$l(s1);function th(){var e=new Zd.HandlebarsEnvironment;return bl.extend(e,Zd),e.SafeString=t1.default,e.Exception=n1.default,e.Utils=bl,e.escapeExpression=bl.escapeExpression,e.VM=eh,e.template=function(t){return eh.template(t,e)},e}var ti=th();ti.create=th;a1.default(ti);ti.default=ti;qo.default=ti;rh.exports=qo.default});var _l=S((Bo,oh)=>{"use strict";Bo.__esModule=!0;var ih={helpers:{helperExpression:function(t){return t.type==="SubExpression"||(t.type==="MustacheStatement"||t.type==="BlockStatement")&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return t.parts.length===1&&!ih.helpers.scopedId(t)&&!t.depth}}};Bo.default=ih;oh.exports=Bo.default});var ah=S((Ho,sh)=>{"use strict";Ho.__esModule=!0;var l1=(function(){var e={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,c,l,p){var f=l.length-1;switch(c){case 1:return l[f-1];case 2:this.$=a.prepareProgram(l[f]);break;case 3:this.$=l[f];break;case 4:this.$=l[f];break;case 5:this.$=l[f];break;case 6:this.$=l[f];break;case 7:this.$=l[f];break;case 8:this.$=l[f];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(l[f]),strip:a.stripFlags(l[f],l[f]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[f],value:l[f],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(l[f-2],l[f-1],l[f],this._$);break;case 12:this.$={path:l[f-3],params:l[f-2],hash:l[f-1]};break;case 13:this.$=a.prepareBlock(l[f-3],l[f-2],l[f-1],l[f],!1,this._$);break;case 14:this.$=a.prepareBlock(l[f-3],l[f-2],l[f-1],l[f],!0,this._$);break;case 15:this.$={open:l[f-5],path:l[f-4],params:l[f-3],hash:l[f-2],blockParams:l[f-1],strip:a.stripFlags(l[f-5],l[f])};break;case 16:this.$={path:l[f-4],params:l[f-3],hash:l[f-2],blockParams:l[f-1],strip:a.stripFlags(l[f-5],l[f])};break;case 17:this.$={path:l[f-4],params:l[f-3],hash:l[f-2],blockParams:l[f-1],strip:a.stripFlags(l[f-5],l[f])};break;case 18:this.$={strip:a.stripFlags(l[f-1],l[f-1]),program:l[f]};break;case 19:var d=a.prepareBlock(l[f-2],l[f-1],l[f],l[f],!1,this._$),m=a.prepareProgram([d],l[f-1].loc);m.chained=!0,this.$={strip:l[f-2].strip,program:m,chain:!0};break;case 20:this.$=l[f];break;case 21:this.$={path:l[f-1],strip:a.stripFlags(l[f-2],l[f])};break;case 22:this.$=a.prepareMustache(l[f-3],l[f-2],l[f-1],l[f-4],a.stripFlags(l[f-4],l[f]),this._$);break;case 23:this.$=a.prepareMustache(l[f-3],l[f-2],l[f-1],l[f-4],a.stripFlags(l[f-4],l[f]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[f-3],params:l[f-2],hash:l[f-1],indent:"",strip:a.stripFlags(l[f-4],l[f]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(l[f-2],l[f-1],l[f],this._$);break;case 26:this.$={path:l[f-3],params:l[f-2],hash:l[f-1],strip:a.stripFlags(l[f-4],l[f])};break;case 27:this.$=l[f];break;case 28:this.$=l[f];break;case 29:this.$={type:"SubExpression",path:l[f-3],params:l[f-2],hash:l[f-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[f],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(l[f-2]),value:l[f],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(l[f-1]);break;case 33:this.$=l[f];break;case 34:this.$=l[f];break;case 35:this.$={type:"StringLiteral",value:l[f],original:l[f],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[f]),original:Number(l[f]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[f]==="true",original:l[f]==="true",loc:a.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:a.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:a.locInfo(this._$)};break;case 40:this.$=l[f];break;case 41:this.$=l[f];break;case 42:this.$=a.preparePath(!0,l[f],this._$);break;case 43:this.$=a.preparePath(!1,l[f],this._$);break;case 44:l[f-2].push({part:a.id(l[f]),original:l[f],separator:l[f-1]}),this.$=l[f-2];break;case 45:this.$=[{part:a.id(l[f]),original:l[f]}];break;case 46:this.$=[];break;case 47:l[f-1].push(l[f]);break;case 48:this.$=[];break;case 49:l[f-1].push(l[f]);break;case 50:this.$=[];break;case 51:l[f-1].push(l[f]);break;case 58:this.$=[];break;case 59:l[f-1].push(l[f]);break;case 64:this.$=[];break;case 65:l[f-1].push(l[f]);break;case 70:this.$=[];break;case 71:l[f-1].push(l[f]);break;case 78:this.$=[];break;case 79:l[f-1].push(l[f]);break;case 82:this.$=[];break;case 83:l[f-1].push(l[f]);break;case 86:this.$=[];break;case 87:l[f-1].push(l[f]);break;case 90:this.$=[];break;case 91:l[f-1].push(l[f]);break;case 94:this.$=[];break;case 95:l[f-1].push(l[f]);break;case 98:this.$=[l[f]];break;case 99:l[f-1].push(l[f]);break;case 100:this.$=[l[f]];break;case 101:l[f-1].push(l[f]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(i,o){throw new Error(i)},parse:function(i){var o=this,s=[0],a=[null],c=[],l=this.table,p="",f=0,d=0,m=0,y=2,g=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 v=this.lexer.yylloc;c.push(v);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function I(D){s.length=s.length-2*D,a.length=a.length-D,c.length=c.length-D}function _(){var D;return D=o.lexer.lex()||1,typeof D!="number"&&(D=o.symbols_[D]||D),D}for(var R,N,j,U,oe,me,be={},Pe,we,ze,fe;;){if(j=s[s.length-1],this.defaultActions[j]?U=this.defaultActions[j]:((R===null||typeof R>"u")&&(R=_()),U=l[j]&&l[j][R]),typeof U>"u"||!U.length||!U[0]){var Y="";if(!m){fe=[];for(Pe in l[j])this.terminals_[Pe]&&Pe>2&&fe.push("'"+this.terminals_[Pe]+"'");this.lexer.showPosition?Y="Parse error on line "+(f+1)+`:
106
106
  `+this.lexer.showPosition()+`
107
- Expecting `+fe.join(", ")+", got '"+(this.terminals_[R]||R)+"'":Y="Parse error on line "+(f+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:v,expected:fe})}}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+R);switch(U[0]){case 1:s.push(R),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),s.push(U[1]),R=null,N?(R=N,N=null):(h=this.lexer.yyleng,p=this.lexer.yytext,f=this.lexer.yylineno,v=this.lexer.yylloc,m>0&&m--);break;case 2:if(we=this.productions_[U[1]][1],be.$=a[a.length-we],be._$={first_line:c[c.length-(we||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(we||1)].first_column,last_column:c[c.length-1].last_column},$&&(be._$.range=[c[c.length-(we||1)].range[0],c[c.length-1].range[1]]),me=this.performAction.call(be,p,h,f,this.yy,U[1],a,c),typeof me<"u")return me;we&&(s=s.slice(0,-1*we*2),a=a.slice(0,-1*we),c=c.slice(0,-1*we)),s.push(this.productions_[U[1]][0]),a.push(be.$),c.push(be._$),ze=l[s[s.length-2]][s[s.length-1]],s.push(ze);break;case 3:return!0}}return!0}},t=(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 c=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 l=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===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-s]),this},more:function(){return this._more=!0,this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),s=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
108
- `+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,a,c,l,p;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),h=0;h<f.length&&(a=this._input.match(this.rules[f[h]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,c=h,!this.options.flex)));h++);return s?(p=s[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,f[c],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,c){function l(f,h){return s.yytext=s.yytext.substring(f,s.yyleng-h+f)}var p=c;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(l(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:(l(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=l(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=l(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})();e.lexer=t;function r(){this.yy={}}return r.prototype=e,e.Parser=r,new r})();Bo.default=W$;Yd.exports=Bo.default});var zo=S((Uo,eh)=>{"use strict";Uo.__esModule=!0;function U$(e){return e&&e.__esModule?e:{default:e}}var z$=et(),vl=U$(z$);function Ho(){this.parents=[]}Ho.prototype={constructor:Ho,mutating:!1,acceptKey:function(t,r){var n=this.accept(t[r]);if(this.mutating){if(n&&!Ho.prototype[n.type])throw new vl.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+t.type);t[r]=n}},acceptRequired:function(t,r){if(this.acceptKey(t,r),!t[r])throw new vl.default(t.type+" requires "+r)},acceptArray:function(t){for(var r=0,n=t.length;r<n;r++)this.acceptKey(t,r),t[r]||(t.splice(r,1),r--,n--)},accept:function(t){if(t){if(!this[t.type])throw new vl.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var r=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return t}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:Wo,Decorator:Wo,BlockStatement:Qd,DecoratorBlock:Qd,PartialStatement:Zd,PartialBlockStatement:function(t){Zd.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Wo,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}};function Wo(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function Qd(e){Wo.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function Zd(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}Uo.default=Ho;eh.exports=Uo.default});var rh=S((Go,th)=>{"use strict";Go.__esModule=!0;function G$(e){return e&&e.__esModule?e:{default:e}}var J$=zo(),K$=G$(J$);function Ct(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}Ct.prototype=new K$.default;Ct.prototype.Program=function(e){var t=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=e.body,i=0,o=n.length;i<o;i++){var s=n[i],a=this.accept(s);if(a){var c=wl(n,i,r),l=bl(n,i,r),p=a.openStandalone&&c,f=a.closeStandalone&&l,h=a.inlineStandalone&&c&&l;a.close&&vr(n,i,!0),a.open&&tr(n,i,!0),t&&h&&(vr(n,i),tr(n,i)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),t&&p&&(vr((s.program||s.inverse).body),tr(n,i)),t&&f&&(vr(n,i),tr((s.inverse||s.program).body))}}return e};Ct.prototype.BlockStatement=Ct.prototype.DecoratorBlock=Ct.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,r=e.program&&e.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:e.openStrip.open,close:e.closeStrip.close,openStandalone:bl(t.body),closeStandalone:wl((n||t).body)};if(e.openStrip.close&&vr(t.body,null,!0),r){var s=e.inverseStrip;s.open&&tr(t.body,null,!0),s.close&&vr(n.body,null,!0),e.closeStrip.open&&tr(i.body,null,!0),!this.options.ignoreStandalone&&wl(t.body)&&bl(n.body)&&(tr(t.body),vr(n.body))}else e.closeStrip.open&&tr(t.body,null,!0);return o};Ct.prototype.Decorator=Ct.prototype.MustacheStatement=function(e){return e.strip};Ct.prototype.PartialStatement=Ct.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function wl(e,t,r){t===void 0&&(t=e.length);var n=e[t-1],i=e[t-2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function bl(e,t,r){t===void 0&&(t=-1);var n=e[t+1],i=e[t+2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function vr(e,t,r){var n=e[t==null?0:t+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 tr(e,t,r){var n=e[t==null?e.length-1:t-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var i=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==i,n.leftStripped}}Go.default=Ct;th.exports=Go.default});var nh=S(st=>{"use strict";st.__esModule=!0;st.SourceLocation=Q$;st.id=Z$;st.stripFlags=e1;st.stripComment=t1;st.preparePath=r1;st.prepareMustache=n1;st.prepareRawBlock=i1;st.prepareBlock=o1;st.prepareProgram=s1;st.preparePartialBlock=a1;function Y$(e){return e&&e.__esModule?e:{default:e}}var X$=et(),$l=Y$(X$);function xl(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new $l.default(e.path.original+" doesn't match "+t,r)}}function Q$(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}function Z$(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}function e1(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}function t1(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function r1(e,t,r){r=this.locInfo(r);for(var n=e?"@":"",i=[],o=0,s=0,a=t.length;s<a;s++){var c=t[s].part,l=t[s].original!==c;if(n+=(t[s].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new $l.default("Invalid path: "+n,{loc:r});c===".."&&o++}else i.push(c)}return{type:"PathExpression",data:e,depth:o,parts:i,original:n,loc:r}}function n1(e,t,r,n,i,o){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:e,params:t,hash:r,escaped:a,strip:i,loc:this.locInfo(o)}}function i1(e,t,r,n){xl(e,r),n=this.locInfo(n);var i={type:"Program",body:t,strip:{},loc:n};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function o1(e,t,r,n,i,o){n&&n.path&&xl(e,n);var s=/\*/.test(e.open);t.blockParams=e.blockParams;var a=void 0,c=void 0;if(r){if(s)throw new $l.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,a=r.program}return i&&(i=a,a=t,t=i),{type:s?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:a,openStrip:e.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(o)}}function s1(e,t){if(!t&&e.length){var r=e[0].loc,n=e[e.length-1].loc;r&&n&&(t={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:e,strip:{},loc:t}}function a1(e,t,r,n){return xl(e,r),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}});var oh=S(ei=>{"use strict";ei.__esModule=!0;ei.parseWithoutProcessing=ih;ei.parse=g1;function l1(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function kl(e){return e&&e.__esModule?e:{default:e}}var c1=Xd(),_l=kl(c1),u1=rh(),f1=kl(u1),p1=nh(),d1=l1(p1),h1=et(),Zn=kl(h1),m1=qe();ei.parser=_l.default;var Jo={};m1.extend(Jo,d1);function ih(e,t){if(e.type==="Program")return y1(e),e;_l.default.yy=Jo,Jo.locInfo=function(n){return new Jo.SourceLocation(t&&t.srcName,n)};var r=_l.default.parse(e);return r}function g1(e,t){var r=ih(e,t),n=new f1.default(t);return n.accept(r)}function y1(e){Sl(e)}function Sl(e){if(e!=null){if(Array.isArray(e)){e.forEach(Sl);return}if(typeof e=="object"){if(e.type==="PathExpression"){if(!v1(e.depth))throw new Zn.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(e.parts))throw new Zn.default("Invalid AST: PathExpression.parts must be an array");for(var t=0;t<e.parts.length;t++)if(typeof e.parts[t]!="string")throw new Zn.default("Invalid AST: PathExpression.parts must only contain strings")}else if(e.type==="NumberLiteral"){if(typeof e.value!="number"||!isFinite(e.value))throw new Zn.default("Invalid AST: NumberLiteral.value must be a number")}else if(e.type==="BooleanLiteral"&&typeof e.value!="boolean")throw new Zn.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(e).forEach(function(r){r!=="loc"&&Sl(e[r])})}}}function v1(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}});var ch=S(ii=>{"use strict";ii.__esModule=!0;ii.Compiler=Cl;ii.precompile=x1;ii.compile=_1;function ah(e){return e&&e.__esModule?e:{default:e}}var w1=et(),ri=ah(w1),ni=qe(),b1=yl(),ti=ah(b1),$1=[].slice;function Cl(){}Cl.prototype={compiler:Cl,equals:function(t){var r=this.opcodes.length;if(t.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var i=this.opcodes[n],o=t.opcodes[n];if(i.opcode!==o.opcode||!lh(i.args,o.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(t.children[n]))return!1;return!0},guid:0,compile:function(t,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=ni.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(t)},compileProgram:function(t){var r=new this.compiler,n=r.compile(t,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(t){if(!this[t.type])throw new ri.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var r=this[t.type](t);return this.sourceNode.shift(),r},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var r=t.body,n=r.length,i=0;i<n;i++)this.accept(r[i]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){sh(t);var r=t.program,n=t.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var i=this.classifySexpr(t);i==="helper"?this.helperSexpr(t,r,n):i==="simple"?(this.simpleSexpr(t),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var r=t.program&&this.compileProgram(t.program),n=this.setupFullMustacheParams(t,r,void 0),i=t.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},PartialStatement:function(t){this.usePartial=!0;var r=t.program;r&&(r=this.compileProgram(t.program));var n=t.params;if(n.length>1)throw new ri.default("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=t.name.original,o=t.name.type==="SubExpression";o&&this.accept(t.name),this.setupFullMustacheParams(t,r,void 0,!0);var s=t.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",o,i,s),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){sh(t);var r=this.classifySexpr(t);r==="simple"?this.simpleSexpr(t):r==="helper"?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,r,n){var i=t.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(t){var r=t.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,r,n){var i=this.setupFullMustacheParams(t,r,n),o=t.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new ri.default("You specified knownHelpersOnly, but used the unknown helper "+s,t);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",i.length,o.original,ti.default.helpers.simpleId(o))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var r=t.parts[0],n=ti.default.helpers.scopedId(t),i=!t.depth&&!n&&this.blockParamIndex(r);i?this.opcode("lookupBlockParam",i,t.parts):r?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var r=t.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(t){this.opcodes.push({opcode:t,args:$1.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var r=ti.default.helpers.simpleId(t.path),n=r&&!!this.blockParamIndex(t.path.parts[0]),i=!n&&ti.default.helpers.helperExpression(t),o=!n&&(i||r);if(o&&!i){var s=t.path.parts[0],a=this.options;a.knownHelpers[s]?i=!0:a.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},pushParams:function(t){for(var r=0,n=t.length;r<n;r++)this.pushParam(t[r])},pushParam:function(t){var r=t.value!=null?t.value:t.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",r,t.type),t.type==="SubExpression"&&this.accept(t);else{if(this.trackIds){var n=void 0;if(t.parts&&!ti.default.helpers.scopedId(t)&&!t.depth&&(n=this.blockParamIndex(t.parts[0])),n){var i=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else r=t.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,r)}this.accept(t)}},setupFullMustacheParams:function(t,r,n,i){var o=t.params;return this.pushParams(o),this.opcode("pushProgram",r),this.opcode("pushProgram",n),t.hash?this.accept(t.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(t){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],o=i&&ni.indexOf(i,t);if(i&&o>=0)return[r,o]}}};function x1(e,t,r){if(e==null||typeof e!="string"&&e.type!=="Program")throw new ri.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);t=t||{},"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=r.parse(e,t),i=new r.Compiler().compile(n,t);return new r.JavaScriptCompiler().compile(i,t)}function _1(e,t,r){if(t===void 0&&(t={}),e==null||typeof e!="string"&&e.type!=="Program")throw new ri.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=ni.extend({},t),"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=void 0;function i(){var s=r.parse(e,t),a=new r.Compiler().compile(s,t),c=new r.JavaScriptCompiler().compile(a,t,void 0,!0);return r.template(c)}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,c,l){return n||(n=i()),n._child(s,a,c,l)},o}function lh(e,t){if(e===t)return!0;if(ni.isArray(e)&&ni.isArray(t)&&e.length===t.length){for(var r=0;r<e.length;r++)if(!lh(e[r],t[r]))return!1;return!0}}function sh(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}});var fh=S(El=>{var uh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");El.encode=function(e){if(0<=e&&e<uh.length)return uh[e];throw new TypeError("Must be between 0 and 63: "+e)};El.decode=function(e){var t=65,r=90,n=97,i=122,o=48,s=57,a=43,c=47,l=26,p=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+l:o<=e&&e<=s?e-o+p:e==a?62:e==c?63:-1}});var Rl=S(Il=>{var ph=fh(),Pl=5,dh=1<<Pl,hh=dh-1,mh=dh;function S1(e){return e<0?(-e<<1)+1:(e<<1)+0}function k1(e){var t=(e&1)===1,r=e>>1;return t?-r:r}Il.encode=function(t){var r="",n,i=S1(t);do n=i&hh,i>>>=Pl,i>0&&(n|=mh),r+=ph.encode(n);while(i>0);return r};Il.decode=function(t,r,n){var i=t.length,o=0,s=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=ph.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));a=!!(c&mh),c&=hh,o=o+(c<<s),s+=Pl}while(a);n.value=k1(o),n.rest=r}});var tn=S(Oe=>{function C1(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}Oe.getArg=C1;var gh=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,E1=/^data:.+\,.+$/;function oi(e){var t=e.match(gh);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}Oe.urlParse=oi;function Zr(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}Oe.urlGenerate=Zr;function Tl(e){var t=e,r=oi(e);if(r){if(!r.path)return e;t=r.path}for(var n=Oe.isAbsolute(t),i=t.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 t=i.join("/"),t===""&&(t=n?"/":"."),r?(r.path=t,Zr(r)):t}Oe.normalize=Tl;function yh(e,t){e===""&&(e="."),t===""&&(t=".");var r=oi(t),n=oi(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Zr(r);if(r||t.match(E1))return t;if(n&&!n.host&&!n.path)return n.host=t,Zr(n);var i=t.charAt(0)==="/"?t:Tl(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,Zr(n)):i}Oe.join=yh;Oe.isAbsolute=function(e){return e.charAt(0)==="/"||gh.test(e)};function P1(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}Oe.relative=P1;var vh=(function(){var e=Object.create(null);return!("__proto__"in e)})();function wh(e){return e}function I1(e){return bh(e)?"$"+e:e}Oe.toSetString=vh?wh:I1;function R1(e){return bh(e)?e.slice(1):e}Oe.fromSetString=vh?wh:R1;function bh(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function T1(e,t,r){var n=en(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:en(e.name,t.name)}Oe.compareByOriginalPositions=T1;function A1(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=en(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:en(e.name,t.name)}Oe.compareByGeneratedPositionsDeflated=A1;function en(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function N1(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=en(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:en(e.name,t.name)}Oe.compareByGeneratedPositionsInflated=N1;function M1(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}Oe.parseSourceMapInput=M1;function O1(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=oi(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))}t=yh(Zr(n),t)}return Tl(t)}Oe.computeSourceURL=O1});var Ml=S($h=>{var Al=tn(),Nl=Object.prototype.hasOwnProperty,wr=typeof Map<"u";function Dt(){this._array=[],this._set=wr?new Map:Object.create(null)}Dt.fromArray=function(t,r){for(var n=new Dt,i=0,o=t.length;i<o;i++)n.add(t[i],r);return n};Dt.prototype.size=function(){return wr?this._set.size:Object.getOwnPropertyNames(this._set).length};Dt.prototype.add=function(t,r){var n=wr?t:Al.toSetString(t),i=wr?this.has(t):Nl.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(t),i||(wr?this._set.set(t,o):this._set[n]=o)};Dt.prototype.has=function(t){if(wr)return this._set.has(t);var r=Al.toSetString(t);return Nl.call(this._set,r)};Dt.prototype.indexOf=function(t){if(wr){var r=this._set.get(t);if(r>=0)return r}else{var n=Al.toSetString(t);if(Nl.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};Dt.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};Dt.prototype.toArray=function(){return this._array.slice()};$h.ArraySet=Dt});var Sh=S(_h=>{var xh=tn();function V1(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return n>r||n==r&&o>=i||xh.compareByGeneratedPositionsInflated(e,t)<=0}function Ko(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Ko.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};Ko.prototype.add=function(t){V1(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};Ko.prototype.toArray=function(){return this._sorted||(this._array.sort(xh.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};_h.MappingList=Ko});var Ol=S(kh=>{var si=Rl(),ke=tn(),Yo=Ml().ArraySet,L1=Sh().MappingList;function at(e){e||(e={}),this._file=ke.getArg(e,"file",null),this._sourceRoot=ke.getArg(e,"sourceRoot",null),this._skipValidation=ke.getArg(e,"skipValidation",!1),this._sources=new Yo,this._names=new Yo,this._mappings=new L1,this._sourcesContents=null}at.prototype._version=3;at.fromSourceMap=function(t){var r=t.sourceRoot,n=new at({file:t.file,sourceRoot:r});return t.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=ke.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),t.sources.forEach(function(i){var o=i;r!==null&&(o=ke.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=t.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};at.prototype.addMapping=function(t){var r=ke.getArg(t,"generated"),n=ke.getArg(t,"original",null),i=ke.getArg(t,"source",null),o=ke.getArg(t,"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})};at.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=ke.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ke.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[ke.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};at.prototype.applySourceMap=function(t,r,n){var i=r;if(r==null){if(t.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=t.file}var o=this._sourceRoot;o!=null&&(i=ke.relative(o,i));var s=new Yo,a=new Yo;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var l=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,n!=null&&(c.source=ke.join(n,c.source)),o!=null&&(c.source=ke.relative(o,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var p=c.source;p!=null&&!s.has(p)&&s.add(p);var f=c.name;f!=null&&!a.has(f)&&a.add(f)},this),this._sources=s,this._names=a,t.sources.forEach(function(c){var l=t.sourceContentFor(c);l!=null&&(n!=null&&(c=ke.join(n,c)),o!=null&&(c=ke.relative(o,c)),this.setSourceContent(c,l))},this)};at.prototype._validateMapping=function(t,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(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!i)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i}))}};at.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,i=0,o=0,s=0,a="",c,l,p,f,h=this._mappings.toArray(),m=0,y=h.length;m<y;m++){if(l=h[m],c="",l.generatedLine!==r)for(t=0;l.generatedLine!==r;)c+=";",r++;else if(m>0){if(!ke.compareByGeneratedPositionsInflated(l,h[m-1]))continue;c+=","}c+=si.encode(l.generatedColumn-t),t=l.generatedColumn,l.source!=null&&(f=this._sources.indexOf(l.source),c+=si.encode(f-s),s=f,c+=si.encode(l.originalLine-1-i),i=l.originalLine-1,c+=si.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(p=this._names.indexOf(l.name),c+=si.encode(p-o),o=p)),a+=c}return a};at.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=ke.relative(r,n));var i=ke.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};at.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};at.prototype.toString=function(){return JSON.stringify(this.toJSON())};kh.SourceMapGenerator=at});var Ch=S(br=>{br.GREATEST_LOWER_BOUND=1;br.LEAST_UPPER_BOUND=2;function Vl(e,t,r,n,i,o){var s=Math.floor((t-e)/2)+e,a=i(r,n[s],!0);return a===0?s:a>0?t-s>1?Vl(s,t,r,n,i,o):o==br.LEAST_UPPER_BOUND?t<n.length?t:-1:s:s-e>1?Vl(e,s,r,n,i,o):o==br.LEAST_UPPER_BOUND?s:e<0?-1:e}br.search=function(t,r,n,i){if(r.length===0)return-1;var o=Vl(-1,r.length,t,r,n,i||br.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o}});var Ph=S(Eh=>{function Ll(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function j1(e,t){return Math.round(e+Math.random()*(t-e))}function jl(e,t,r,n){if(r<n){var i=j1(r,n),o=r-1;Ll(e,i,n);for(var s=e[n],a=r;a<n;a++)t(e[a],s)<=0&&(o+=1,Ll(e,o,a));Ll(e,o+1,a);var c=o+1;jl(e,t,r,c-1),jl(e,t,c+1,n)}}Eh.quickSort=function(e,t){jl(e,t,0,e.length-1)}});var Rh=S(Xo=>{var B=tn(),Dl=Ch(),rn=Ml().ArraySet,D1=Rl(),ai=Ph().quickSort;function ge(e,t){var r=e;return typeof e=="string"&&(r=B.parseSourceMapInput(e)),r.sections!=null?new yt(r,t):new Re(r,t)}ge.fromSourceMap=function(e,t){return Re.fromSourceMap(e,t)};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(t,r){var n=t.charAt(r);return n===";"||n===","};ge.prototype._parseMappings=function(t,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(t,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(c){var l=c.source===null?null:this._sources.at(c.source);return l=B.computeSourceURL(a,l,this._sourceMapURL),{source:l,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(t,i)};ge.prototype.allGeneratedPositionsFor=function(t){var r=B.getArg(t,"line"),n={source:B.getArg(t,"source"),originalLine:r,originalColumn:B.getArg(t,"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,Dl.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(t.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 c=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==c;)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};Xo.SourceMapConsumer=ge;function Re(e,t){var r=e;typeof e=="string"&&(r=B.parseSourceMapInput(e));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),c=B.getArg(r,"mappings"),l=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(p){return s&&B.isAbsolute(s)&&B.isAbsolute(p)?B.relative(s,p):p}),this._names=rn.fromArray(o.map(String),!0),this._sources=rn.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(p){return B.computeSourceURL(s,p,t)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=t,this.file=l}Re.prototype=Object.create(ge.prototype);Re.prototype.consumer=ge;Re.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=B.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};Re.fromSourceMap=function(t,r){var n=Object.create(Re.prototype),i=n._names=rn.fromArray(t._names.toArray(),!0),o=n._sources=rn.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return B.computeSourceURL(n.sourceRoot,m,r)});for(var s=t._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],l=0,p=s.length;l<p;l++){var f=s[l],h=new Ih;h.generatedLine=f.generatedLine,h.generatedColumn=f.generatedColumn,f.source&&(h.source=o.indexOf(f.source),h.originalLine=f.originalLine,h.originalColumn=f.originalColumn,f.name&&(h.name=i.indexOf(f.name)),c.push(h)),a.push(h)}return ai(n.__originalMappings,B.compareByOriginalPositions),n};Re.prototype._version=3;Object.defineProperty(Re.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Ih(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Re.prototype._parseMappings=function(t,r){for(var n=1,i=0,o=0,s=0,a=0,c=0,l=t.length,p=0,f={},h={},m=[],y=[],g,v,$,I,_;p<l;)if(t.charAt(p)===";")n++,p++,i=0;else if(t.charAt(p)===",")p++;else{for(g=new Ih,g.generatedLine=n,I=p;I<l&&!this._charIsMappingSeparator(t,I);I++);if(v=t.slice(p,I),$=f[v],$)p+=v.length;else{for($=[];p<I;)D1.decode(t,p,h),_=h.value,p=h.rest,$.push(_);if($.length===2)throw new Error("Found a source, but no line and column");if($.length===3)throw new Error("Found a source and line, but no column");f[v]=$}g.generatedColumn=i+$[0],i=g.generatedColumn,$.length>1&&(g.source=a+$[1],a+=$[1],g.originalLine=o+$[2],o=g.originalLine,g.originalLine+=1,g.originalColumn=s+$[3],s=g.originalColumn,$.length>4&&(g.name=c+$[4],c+=$[4])),y.push(g),typeof g.originalLine=="number"&&m.push(g)}ai(y,B.compareByGeneratedPositionsDeflated),this.__generatedMappings=y,ai(m,B.compareByOriginalPositions),this.__originalMappings=m};Re.prototype._findMapping=function(t,r,n,i,o,s){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[i]);return Dl.search(t,r,o,s)};Re.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};Re.prototype.originalPositionFor=function(t){var r={generatedLine:B.getArg(t,"line"),generatedColumn:B.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",B.compareByGeneratedPositionsDeflated,B.getArg(t,"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}};Re.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};Re.prototype.sourceContentFor=function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var i=t;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.')};Re.prototype.generatedPositionFor=function(t){var r=B.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:B.getArg(t,"line"),originalColumn:B.getArg(t,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",B.compareByOriginalPositions,B.getArg(t,"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}};Xo.BasicSourceMapConsumer=Re;function yt(e,t){var r=e;typeof e=="string"&&(r=B.parseSourceMapInput(e));var n=B.getArg(r,"version"),i=B.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new rn,this._names=new rn;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"),c=B.getArg(a,"line"),l=B.getArg(a,"column");if(c<o.line||c===o.line&&l<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=a,{generatedOffset:{generatedLine:c+1,generatedColumn:l+1},consumer:new ge(B.getArg(s,"map"),t)}})}yt.prototype=Object.create(ge.prototype);yt.prototype.constructor=ge;yt.prototype._version=3;Object.defineProperty(yt.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});yt.prototype.originalPositionFor=function(t){var r={generatedLine:B.getArg(t,"line"),generatedColumn:B.getArg(t,"column")},n=Dl.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:t.bias}):{source:null,line:null,column:null,name:null}};yt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};yt.prototype.sourceContentFor=function(t,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],o=i.consumer.sourceContentFor(t,!0);if(o)return o}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')};yt.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(B.getArg(t,"source"))!==-1){var i=n.consumer.generatedPositionFor(t);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(t,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],c=i.consumer._sources.at(a.source);c=B.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var l=null;a.name&&(l=i.consumer._names.at(a.name),this._names.add(l),l=this._names.indexOf(l));var p={source:c,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:l};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}ai(this.__generatedMappings,B.compareByGeneratedPositionsDeflated),ai(this.__originalMappings,B.compareByOriginalPositions)};Xo.IndexedSourceMapConsumer=yt});var Ah=S(Th=>{var F1=Ol().SourceMapGenerator,Qo=tn(),q1=/(\r?\n)/,B1=10,nn="$$$isSourceNode$$$";function tt(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=i??null,this[nn]=!0,n!=null&&this.add(n)}tt.fromStringWithSourceMap=function(t,r,n){var i=new tt,o=t.split(q1),s=0,a=function(){var h=y(),m=y()||"";return h+m;function y(){return s<o.length?o[s++]:void 0}},c=1,l=0,p=null;return r.eachMapping(function(h){if(p!==null)if(c<h.generatedLine)f(p,a()),c++,l=0;else{var m=o[s]||"",y=m.substr(0,h.generatedColumn-l);o[s]=m.substr(h.generatedColumn-l),l=h.generatedColumn,f(p,y),p=h;return}for(;c<h.generatedLine;)i.add(a()),c++;if(l<h.generatedColumn){var m=o[s]||"";i.add(m.substr(0,h.generatedColumn)),o[s]=m.substr(h.generatedColumn),l=h.generatedColumn}p=h},this),s<o.length&&(p&&f(p,a()),i.add(o.splice(s).join(""))),r.sources.forEach(function(h){var m=r.sourceContentFor(h);m!=null&&(n!=null&&(h=Qo.join(n,h)),i.setSourceContent(h,m))}),i;function f(h,m){if(h===null||h.source===void 0)i.add(m);else{var y=n?Qo.join(n,h.source):h.source;i.add(new tt(h.originalLine,h.originalColumn,y,m,h.name))}}};tt.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[nn]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};tt.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[nn]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};tt.prototype.walk=function(t){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[nn]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})};tt.prototype.join=function(t){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(t);r.push(this.children[n]),this.children=r}return this};tt.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[nn]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this};tt.prototype.setSourceContent=function(t,r){this.sourceContents[Qo.toSetString(t)]=r};tt.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][nn]&&this.children[r].walkSourceContents(t);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)t(Qo.fromSetString(i[r]),this.sourceContents[i[r]])};tt.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t};tt.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new F1(t),i=!1,o=null,s=null,a=null,c=null;return this.walk(function(l,p){r.code+=l,p.source!==null&&p.line!==null&&p.column!==null?((o!==p.source||s!==p.line||a!==p.column||c!==p.name)&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name}),o=p.source,s=p.line,a=p.column,c=p.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var f=0,h=l.length;f<h;f++)l.charCodeAt(f)===B1?(r.line++,r.column=0,f+1===h?(o=null,i=!1):i&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name})):r.column++}),this.walkSourceContents(function(l,p){n.setSourceContent(l,p)}),{code:r.code,map:n}};Th.SourceNode=tt});var Nh=S(Zo=>{Zo.SourceMapGenerator=Ol().SourceMapGenerator;Zo.SourceMapConsumer=Rh().SourceMapConsumer;Zo.SourceNode=Ah().SourceNode});var Lh=S((es,Vh)=>{"use strict";es.__esModule=!0;var ql=qe(),$r=void 0;try{(typeof define!="function"||!define.amd)&&(Mh=Nh(),$r=Mh.SourceNode)}catch{}var Mh;$r||($r=function(e,t,r,n){this.src="",n&&this.add(n)},$r.prototype={add:function(t){ql.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){ql.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Fl(e,t,r){if(ql.isArray(e)){for(var n=[],i=0,o=e.length;i<o;i++)n.push(t.wrap(e[i],r));return n}else if(typeof e=="boolean"||typeof e=="number")return e+"";return e}function Oh(e){this.srcFile=e,this.source=[]}Oh.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,r){this.source.unshift(this.wrap(t,r))},push:function(t,r){this.source.push(this.wrap(t,r))},merge:function(){var t=this.empty();return this.each(function(r){t.add([" ",r,`
110
- `])}),t},each:function(t){for(var r=0,n=this.source.length;r<n;r++)t(this.source[r])},empty:function(){var t=this.currentLocation||{start:{}};return new $r(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return t instanceof $r?t:(t=Fl(t,this,r),new $r(r.start.line,r.start.column,this.srcFile,t))},functionCall:function(t,r,n){return n=this.generateList(n),this.wrap([t,r?"."+r+"(":"(",n,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var r=this,n=[];Object.keys(t).forEach(function(o){var s=Fl(t[o],r);s!=="undefined"&&n.push([r.quotedString(o),":",s])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},generateList:function(t){for(var r=this.empty(),n=0,i=t.length;n<i;n++)n&&r.add(","),r.add(Fl(t[n],this));return r},generateArray:function(t){var r=this.generateList(t);return r.prepend("["),r.add("]"),r}};es.default=Oh;Vh.exports=es.default});var Bh=S((ts,qh)=>{"use strict";ts.__esModule=!0;function Fh(e){return e&&e.__esModule?e:{default:e}}var jh=Oo(),H1=et(),Bl=Fh(H1),W1=qe(),U1=Lh(),Dh=Fh(U1);function on(e){this.value=e}function sn(){}sn.prototype={nameLookup:function(t,r){return this.internalNameLookup(t,r)},depthedLookup:function(t){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(t),")"]},compilerInfo:function(){var t=jh.COMPILER_REVISION,r=jh.REVISION_CHANGES[t];return[t,r]},appendToBuffer:function(t,r,n){return W1.isArray(t)||(t=[t]),t=this.source.wrap(t,r),this.environment.isSimple?["return ",t,";"]:n?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(t,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",t,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(t,r,n,i){this.environment=t,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(t,r),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var o=t.opcodes,s=void 0,a=void 0,c=void 0,l=void 0;for(c=0,l=o.length;c<l;c++)s=o[c],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 Bl.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(),`;
107
+ Expecting `+fe.join(", ")+", got '"+(this.terminals_[R]||R)+"'":Y="Parse error on line "+(f+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:v,expected:fe})}}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+R);switch(U[0]){case 1:s.push(R),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),s.push(U[1]),R=null,N?(R=N,N=null):(d=this.lexer.yyleng,p=this.lexer.yytext,f=this.lexer.yylineno,v=this.lexer.yylloc,m>0&&m--);break;case 2:if(we=this.productions_[U[1]][1],be.$=a[a.length-we],be._$={first_line:c[c.length-(we||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(we||1)].first_column,last_column:c[c.length-1].last_column},b&&(be._$.range=[c[c.length-(we||1)].range[0],c[c.length-1].range[1]]),me=this.performAction.call(be,p,d,f,this.yy,U[1],a,c),typeof me<"u")return me;we&&(s=s.slice(0,-1*we*2),a=a.slice(0,-1*we),c=c.slice(0,-1*we)),s.push(this.productions_[U[1]][0]),a.push(be.$),c.push(be._$),ze=l[s[s.length-2]][s[s.length-1]],s.push(ze);break;case 3:return!0}}return!0}},t=(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 c=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 l=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===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-s]),this},more:function(){return this._more=!0,this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),s=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
108
+ `+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,a,c,l,p;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),d=0;d<f.length&&(a=this._input.match(this.rules[f[d]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,c=d,!this.options.flex)));d++);return s?(p=s[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,f[c],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,c){function l(f,d){return s.yytext=s.yytext.substring(f,s.yyleng-d+f)}var p=c;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(l(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:(l(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=l(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=l(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})();e.lexer=t;function r(){this.yy={}}return r.prototype=e,e.Parser=r,new r})();Ho.default=l1;sh.exports=Ho.default});var kl=S(Sl=>{"use strict";Sl.__esModule=!0;var c1=["Program","BlockStatement","DecoratorBlock","PartialStatement","PartialBlockStatement","Decorator","MustacheStatement","ContentStatement","CommentStatement","SubExpression","PathExpression","StringLiteral","NumberLiteral","BooleanLiteral","UndefinedLiteral","NullLiteral","Hash","HashPair"];Sl.NODE_TYPES=c1});var Go=S((zo,fh)=>{"use strict";zo.__esModule=!0;function u1(e){return e&&e.__esModule?e:{default:e}}var f1=ot(),Cl=u1(f1),p1=Me(),d1=kl();function Uo(){this.parents=[]}function lh(e,t){return p1.indexOf(d1.NODE_TYPES,t)!==-1||!(t in Uo.prototype)&&typeof e[t]=="function"}Uo.prototype={constructor:Uo,mutating:!1,acceptKey:function(t,r){var n=this.accept(t[r]);if(this.mutating){if(n&&!lh(this,n.type))throw new Cl.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+t.type);t[r]=n}},acceptRequired:function(t,r){if(this.acceptKey(t,r),!t[r])throw new Cl.default(t.type+" requires "+r)},acceptArray:function(t){for(var r=0,n=t.length;r<n;r++)this.acceptKey(t,r),t[r]||(t.splice(r,1),r--,n--)},accept:function(t){if(t){if(!lh(this,t.type)||!this[t.type])throw new Cl.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var r=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return t}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:Wo,Decorator:Wo,BlockStatement:ch,DecoratorBlock:ch,PartialStatement:uh,PartialBlockStatement:function(t){uh.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Wo,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}};function Wo(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function ch(e){Wo.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function uh(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}zo.default=Uo;fh.exports=zo.default});var dh=S((Jo,ph)=>{"use strict";Jo.__esModule=!0;function h1(e){return e&&e.__esModule?e:{default:e}}var m1=Go(),g1=h1(m1);function Et(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}Et.prototype=new g1.default;Et.prototype.Program=function(e){var t=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=e.body,i=0,o=n.length;i<o;i++){var s=n[i],a=this.accept(s);if(a){var c=El(n,i,r),l=Pl(n,i,r),p=a.openStandalone&&c,f=a.closeStandalone&&l,d=a.inlineStandalone&&c&&l;a.close&&_r(n,i,!0),a.open&&ir(n,i,!0),t&&d&&(_r(n,i),ir(n,i)&&s.type==="PartialStatement"&&(s.indent=/(?:^|[^ \t])([ \t]+)$/.exec(n[i-1].original)[1])),t&&p&&(_r((s.program||s.inverse).body),ir(n,i)),t&&f&&(_r(n,i),ir((s.inverse||s.program).body))}}return e};Et.prototype.BlockStatement=Et.prototype.DecoratorBlock=Et.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,r=e.program&&e.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:e.openStrip.open,close:e.closeStrip.close,openStandalone:Pl(t.body),closeStandalone:El((n||t).body)};if(e.openStrip.close&&_r(t.body,null,!0),r){var s=e.inverseStrip;s.open&&ir(t.body,null,!0),s.close&&_r(n.body,null,!0),e.closeStrip.open&&ir(i.body,null,!0),!this.options.ignoreStandalone&&El(t.body)&&Pl(n.body)&&(ir(t.body),_r(n.body))}else e.closeStrip.open&&ir(t.body,null,!0);return o};Et.prototype.Decorator=Et.prototype.MustacheStatement=function(e){return e.strip};Et.prototype.PartialStatement=Et.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function El(e,t,r){t===void 0&&(t=e.length);var n=e[t-1],i=e[t-2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/(?:^|\S)[^\S\n]*\n\s*$/:/^\s*$|(?:^|\S)[^\S\n]*\n\s*$/).test(n.original)}function Pl(e,t,r){t===void 0&&(t=-1);var n=e[t+1],i=e[t+2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function _r(e,t,r){var n=e[t==null?0:t+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 ir(e,t,r){var n=e[t==null?e.length-1:t-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var i=n.value;return n.value=n.value.replace(r?/(^|\S)\s+$/:/(^|[^ \t])[ \t]+$/,"$1"),n.leftStripped=n.value!==i,n.leftStripped}}Jo.default=Et;ph.exports=Jo.default});var hh=S(st=>{"use strict";st.__esModule=!0;st.SourceLocation=w1;st.id=b1;st.stripFlags=$1;st.stripComment=x1;st.preparePath=_1;st.prepareMustache=S1;st.prepareRawBlock=k1;st.prepareBlock=C1;st.prepareProgram=E1;st.preparePartialBlock=P1;function y1(e){return e&&e.__esModule?e:{default:e}}var v1=ot(),Il=y1(v1);function Rl(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new Il.default(e.path.original+" doesn't match "+t,r)}}function w1(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}function b1(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}function $1(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}function x1(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function _1(e,t,r){r=this.locInfo(r);for(var n=e?"@":"",i=[],o=0,s=0,a=t.length;s<a;s++){var c=t[s].part,l=t[s].original!==c;if(n+=(t[s].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new Il.default("Invalid path: "+n,{loc:r});c===".."&&o++}else i.push(c)}return{type:"PathExpression",data:e,depth:o,parts:i,original:n,loc:r}}function S1(e,t,r,n,i,o){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:e,params:t,hash:r,escaped:a,strip:i,loc:this.locInfo(o)}}function k1(e,t,r,n){Rl(e,r),n=this.locInfo(n);var i={type:"Program",body:t,strip:{},loc:n};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function C1(e,t,r,n,i,o){n&&n.path&&Rl(e,n);var s=/\*/.test(e.open);t.blockParams=e.blockParams;var a=void 0,c=void 0;if(r){if(s)throw new Il.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,a=r.program}return i&&(i=a,a=t,t=i),{type:s?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:a,openStrip:e.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(o)}}function E1(e,t){if(!t&&e.length){var r=e[0].loc,n=e[e.length-1].loc;r&&n&&(t={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:e,strip:{},loc:t}}function P1(e,t,r,n){return Rl(e,r),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}});var yh=S(ri=>{"use strict";ri.__esModule=!0;ri.parseWithoutProcessing=gh;ri.parse=V1;function I1(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function mh(e){return e&&e.__esModule?e:{default:e}}var R1=ah(),Tl=mh(R1),T1=dh(),A1=mh(T1),N1=hh(),O1=I1(N1),M1=Me();ri.parser=Tl.default;var Ko={};M1.extend(Ko,O1);function gh(e,t){if(e.type==="Program")return e;Tl.default.yy=Ko,Ko.locInfo=function(n){return new Ko.SourceLocation(t&&t.srcName,n)};var r=Tl.default.parse(e);return r}function V1(e,t){var r=gh(e,t),n=new A1.default(t);return n.accept(r)}});var xh=S(ii=>{"use strict";ii.__esModule=!0;ii.Compiler=Ol;ii.precompile=q1;ii.compile=B1;function wh(e){return e&&e.__esModule?e:{default:e}}var L1=ot(),on=wh(L1),or=Me(),j1=_l(),ni=wh(j1),D1=kl(),F1=[].slice;function Ol(){}Ol.prototype={compiler:Ol,equals:function(t){var r=this.opcodes.length;if(t.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var i=this.opcodes[n],o=t.opcodes[n];if(i.opcode!==o.opcode||!$h(i.args,o.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(t.children[n]))return!1;return!0},guid:0,compile:function(t,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=or.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(t)},compileProgram:function(t){var r=new this.compiler,n=r.compile(t,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(t){if(or.indexOf(D1.NODE_TYPES,t.type)===-1||!this[t.type])throw new on.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var r=this[t.type](t);return this.sourceNode.shift(),r},Program:function(t){H1(t),this.options.blockParams.unshift(t.blockParams);for(var r=t.body,n=r.length,i=0;i<n;i++)this.accept(r[i]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){vh(t);var r=t.program,n=t.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var i=this.classifySexpr(t);i==="helper"?this.helperSexpr(t,r,n):i==="simple"?(this.simpleSexpr(t),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var r=t.program&&this.compileProgram(t.program),n=this.setupFullMustacheParams(t,r,void 0),i=t.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},PartialStatement:function(t){this.usePartial=!0;var r=t.program;r&&(r=this.compileProgram(t.program));var n=t.params;if(n.length>1)throw new on.default("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=t.name.original,o=t.name.type==="SubExpression";o&&this.accept(t.name),this.setupFullMustacheParams(t,r,void 0,!0);var s=t.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",o,i,s),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){if(t.value!=null&&typeof t.value!="string")throw Ft(t,"value must be a string");t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){vh(t);var r=this.classifySexpr(t);r==="simple"?this.simpleSexpr(t):r==="helper"?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,r,n){var i=t.path,o=i.parts[0],s=r!=null||n!=null;this.opcode("getContext",Al(i)),this.opcode("pushProgram",r),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,s)},simpleSexpr:function(t){var r=t.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,r,n){var i=this.setupFullMustacheParams(t,r,n),o=t.path,s=o.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new on.default("You specified knownHelpersOnly, but used the unknown helper "+s,t);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",i.length,o.original,ni.default.helpers.simpleId(o))}},PathExpression:function(t){var r=Al(t),n=Nl(t);this.addDepth(r),this.opcode("getContext",r);var i=n[0],o=ni.default.helpers.scopedId(t),s=!r&&!o&&this.blockParamIndex(i);s?this.opcode("lookupBlockParam",s,n):i?t.data?(this.options.data=!0,this.opcode("lookupData",r,n,t.strict)):this.opcode("lookupOnContext",n,t.falsy,t.strict,o):this.opcode("pushContext")},StringLiteral:function(t){Yo(t),this.opcode("pushString",t.value)},NumberLiteral:function(t){Yo(t),this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){Yo(t),this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var r=t.pairs,n=0,i=void 0;if(!or.isArray(r))throw Ft(t,"pairs must be an array");i=r.length;for(var o=0;o<i;o++)if(!r[o]||typeof r[o].key!="string")throw Ft(t,"pair keys must be strings");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(t){this.opcodes.push({opcode:t,args:F1.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){Nl(t.path);var r=ni.default.helpers.simpleId(t.path),n=r&&!!this.blockParamIndex(t.path.parts[0]),i=!n&&ni.default.helpers.helperExpression(t),o=!n&&(i||r);if(o&&!i){var s=t.path.parts[0],a=this.options;a.knownHelpers[s]?i=!0:a.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},pushParams:function(t){for(var r=0,n=t.length;r<n;r++)this.pushParam(t[r])},pushParam:function(t){Yo(t);var r=t.value!=null?t.value:t.original||"",n=Al(t);if(this.stringParams)typeof r!="number"&&typeof r!="boolean"&&(r=String(r)),r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),n&&this.addDepth(n),this.opcode("getContext",n),this.opcode("pushStringParam",r,t.type),t.type==="SubExpression"&&this.accept(t);else{if(this.trackIds){var i=void 0;if(t.parts&&!ni.default.helpers.scopedId(t)&&!n&&(i=this.blockParamIndex(Nl(t)[0])),i){var o=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",i,o)}else r=t.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,r)}this.accept(t)}},setupFullMustacheParams:function(t,r,n,i){var o=t.params;return this.pushParams(o),this.opcode("pushProgram",r),this.opcode("pushProgram",n),t.hash?this.accept(t.hash):this.opcode("emptyHash",i),o},blockParamIndex:function(t){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],o=i&&or.indexOf(i,t);if(i&&o>=0)return[r,o]}}};function q1(e,t,r){if(e==null||typeof e!="string"&&e.type!=="Program")throw new on.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);t=t||{},"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=r.parse(e,t),i=new r.Compiler().compile(n,t);return new r.JavaScriptCompiler().compile(i,t)}function B1(e,t,r){if(t===void 0&&(t={}),e==null||typeof e!="string"&&e.type!=="Program")throw new on.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=or.extend({},t),"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=void 0;function i(){var s=r.parse(e,t),a=new r.Compiler().compile(s,t),c=new r.JavaScriptCompiler().compile(a,t,void 0,!0);return r.template(c)}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,c,l){return n||(n=i()),n._child(s,a,c,l)},o}function Ft(e,t){return new on.default("Invalid AST: "+e.type+" "+t,e)}function Al(e){var t=e.depth;if(t==null)return 0;if(typeof t!="number"||!isFinite(t)||Math.floor(t)!==t||t<0)throw Ft(e,"depth must be a non-negative integer");return t}function Yo(e){var t=e.value;if(e.type==="StringLiteral"&&typeof t!="string")throw Ft(e,"value must be a string");if(e.type==="NumberLiteral"&&typeof t!="number")throw Ft(e,"value must be a number");if(e.type==="BooleanLiteral"&&typeof t!="boolean")throw Ft(e,"value must be a boolean")}function bh(e,t,r){if(!or.isArray(t))throw Ft(e,r+" must be an array");for(var n=0;n<t.length;n++)if(typeof t[n]!="string")throw Ft(e,r+" must only contain strings");return t}function Nl(e){return bh(e,e.parts,"parts")}function H1(e){e.blockParams!=null&&bh(e,e.blockParams,"blockParams")}function $h(e,t){if(e===t)return!0;if(or.isArray(e)&&or.isArray(t)&&e.length===t.length){for(var r=0;r<e.length;r++)if(!$h(e[r],t[r]))return!1;return!0}}function vh(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}});var Sh=S(Ml=>{var _h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Ml.encode=function(e){if(0<=e&&e<_h.length)return _h[e];throw new TypeError("Must be between 0 and 63: "+e)};Ml.decode=function(e){var t=65,r=90,n=97,i=122,o=48,s=57,a=43,c=47,l=26,p=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+l:o<=e&&e<=s?e-o+p:e==a?62:e==c?63:-1}});var jl=S(Ll=>{var kh=Sh(),Vl=5,Ch=1<<Vl,Eh=Ch-1,Ph=Ch;function W1(e){return e<0?(-e<<1)+1:(e<<1)+0}function U1(e){var t=(e&1)===1,r=e>>1;return t?-r:r}Ll.encode=function(t){var r="",n,i=W1(t);do n=i&Eh,i>>>=Vl,i>0&&(n|=Ph),r+=kh.encode(n);while(i>0);return r};Ll.decode=function(t,r,n){var i=t.length,o=0,s=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=kh.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));a=!!(c&Ph),c&=Eh,o=o+(c<<s),s+=Vl}while(a);n.value=U1(o),n.rest=r}});var ln=S(Ve=>{function z1(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}Ve.getArg=z1;var Ih=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,G1=/^data:.+\,.+$/;function oi(e){var t=e.match(Ih);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}Ve.urlParse=oi;function sn(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}Ve.urlGenerate=sn;function Dl(e){var t=e,r=oi(e);if(r){if(!r.path)return e;t=r.path}for(var n=Ve.isAbsolute(t),i=t.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 t=i.join("/"),t===""&&(t=n?"/":"."),r?(r.path=t,sn(r)):t}Ve.normalize=Dl;function Rh(e,t){e===""&&(e="."),t===""&&(t=".");var r=oi(t),n=oi(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),sn(r);if(r||t.match(G1))return t;if(n&&!n.host&&!n.path)return n.host=t,sn(n);var i=t.charAt(0)==="/"?t:Dl(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,sn(n)):i}Ve.join=Rh;Ve.isAbsolute=function(e){return e.charAt(0)==="/"||Ih.test(e)};function J1(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}Ve.relative=J1;var Th=(function(){var e=Object.create(null);return!("__proto__"in e)})();function Ah(e){return e}function K1(e){return Nh(e)?"$"+e:e}Ve.toSetString=Th?Ah:K1;function Y1(e){return Nh(e)?e.slice(1):e}Ve.fromSetString=Th?Ah:Y1;function Nh(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function X1(e,t,r){var n=an(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:an(e.name,t.name)}Ve.compareByOriginalPositions=X1;function Q1(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=an(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:an(e.name,t.name)}Ve.compareByGeneratedPositionsDeflated=Q1;function an(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function Z1(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=an(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:an(e.name,t.name)}Ve.compareByGeneratedPositionsInflated=Z1;function e2(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}Ve.parseSourceMapInput=e2;function t2(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=oi(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))}t=Rh(sn(n),t)}return Dl(t)}Ve.computeSourceURL=t2});var Bl=S(Oh=>{var Fl=ln(),ql=Object.prototype.hasOwnProperty,Sr=typeof Map<"u";function qt(){this._array=[],this._set=Sr?new Map:Object.create(null)}qt.fromArray=function(t,r){for(var n=new qt,i=0,o=t.length;i<o;i++)n.add(t[i],r);return n};qt.prototype.size=function(){return Sr?this._set.size:Object.getOwnPropertyNames(this._set).length};qt.prototype.add=function(t,r){var n=Sr?t:Fl.toSetString(t),i=Sr?this.has(t):ql.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(t),i||(Sr?this._set.set(t,o):this._set[n]=o)};qt.prototype.has=function(t){if(Sr)return this._set.has(t);var r=Fl.toSetString(t);return ql.call(this._set,r)};qt.prototype.indexOf=function(t){if(Sr){var r=this._set.get(t);if(r>=0)return r}else{var n=Fl.toSetString(t);if(ql.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};qt.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};qt.prototype.toArray=function(){return this._array.slice()};Oh.ArraySet=qt});var Lh=S(Vh=>{var Mh=ln();function r2(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return n>r||n==r&&o>=i||Mh.compareByGeneratedPositionsInflated(e,t)<=0}function Xo(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Xo.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};Xo.prototype.add=function(t){r2(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};Xo.prototype.toArray=function(){return this._sorted||(this._array.sort(Mh.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Vh.MappingList=Xo});var Hl=S(jh=>{var si=jl(),ke=ln(),Qo=Bl().ArraySet,n2=Lh().MappingList;function at(e){e||(e={}),this._file=ke.getArg(e,"file",null),this._sourceRoot=ke.getArg(e,"sourceRoot",null),this._skipValidation=ke.getArg(e,"skipValidation",!1),this._sources=new Qo,this._names=new Qo,this._mappings=new n2,this._sourcesContents=null}at.prototype._version=3;at.fromSourceMap=function(t){var r=t.sourceRoot,n=new at({file:t.file,sourceRoot:r});return t.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=ke.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),t.sources.forEach(function(i){var o=i;r!==null&&(o=ke.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=t.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};at.prototype.addMapping=function(t){var r=ke.getArg(t,"generated"),n=ke.getArg(t,"original",null),i=ke.getArg(t,"source",null),o=ke.getArg(t,"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})};at.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=ke.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ke.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[ke.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};at.prototype.applySourceMap=function(t,r,n){var i=r;if(r==null){if(t.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=t.file}var o=this._sourceRoot;o!=null&&(i=ke.relative(o,i));var s=new Qo,a=new Qo;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var l=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,n!=null&&(c.source=ke.join(n,c.source)),o!=null&&(c.source=ke.relative(o,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var p=c.source;p!=null&&!s.has(p)&&s.add(p);var f=c.name;f!=null&&!a.has(f)&&a.add(f)},this),this._sources=s,this._names=a,t.sources.forEach(function(c){var l=t.sourceContentFor(c);l!=null&&(n!=null&&(c=ke.join(n,c)),o!=null&&(c=ke.relative(o,c)),this.setSourceContent(c,l))},this)};at.prototype._validateMapping=function(t,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(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!i)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i}))}};at.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,i=0,o=0,s=0,a="",c,l,p,f,d=this._mappings.toArray(),m=0,y=d.length;m<y;m++){if(l=d[m],c="",l.generatedLine!==r)for(t=0;l.generatedLine!==r;)c+=";",r++;else if(m>0){if(!ke.compareByGeneratedPositionsInflated(l,d[m-1]))continue;c+=","}c+=si.encode(l.generatedColumn-t),t=l.generatedColumn,l.source!=null&&(f=this._sources.indexOf(l.source),c+=si.encode(f-s),s=f,c+=si.encode(l.originalLine-1-i),i=l.originalLine-1,c+=si.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(p=this._names.indexOf(l.name),c+=si.encode(p-o),o=p)),a+=c}return a};at.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=ke.relative(r,n));var i=ke.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};at.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};at.prototype.toString=function(){return JSON.stringify(this.toJSON())};jh.SourceMapGenerator=at});var Dh=S(kr=>{kr.GREATEST_LOWER_BOUND=1;kr.LEAST_UPPER_BOUND=2;function Wl(e,t,r,n,i,o){var s=Math.floor((t-e)/2)+e,a=i(r,n[s],!0);return a===0?s:a>0?t-s>1?Wl(s,t,r,n,i,o):o==kr.LEAST_UPPER_BOUND?t<n.length?t:-1:s:s-e>1?Wl(e,s,r,n,i,o):o==kr.LEAST_UPPER_BOUND?s:e<0?-1:e}kr.search=function(t,r,n,i){if(r.length===0)return-1;var o=Wl(-1,r.length,t,r,n,i||kr.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o}});var qh=S(Fh=>{function Ul(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i2(e,t){return Math.round(e+Math.random()*(t-e))}function zl(e,t,r,n){if(r<n){var i=i2(r,n),o=r-1;Ul(e,i,n);for(var s=e[n],a=r;a<n;a++)t(e[a],s)<=0&&(o+=1,Ul(e,o,a));Ul(e,o+1,a);var c=o+1;zl(e,t,r,c-1),zl(e,t,c+1,n)}}Fh.quickSort=function(e,t){zl(e,t,0,e.length-1)}});var Hh=S(Zo=>{var B=ln(),Gl=Dh(),cn=Bl().ArraySet,o2=jl(),ai=qh().quickSort;function ge(e,t){var r=e;return typeof e=="string"&&(r=B.parseSourceMapInput(e)),r.sections!=null?new vt(r,t):new Re(r,t)}ge.fromSourceMap=function(e,t){return Re.fromSourceMap(e,t)};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(t,r){var n=t.charAt(r);return n===";"||n===","};ge.prototype._parseMappings=function(t,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(t,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(c){var l=c.source===null?null:this._sources.at(c.source);return l=B.computeSourceURL(a,l,this._sourceMapURL),{source:l,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(t,i)};ge.prototype.allGeneratedPositionsFor=function(t){var r=B.getArg(t,"line"),n={source:B.getArg(t,"source"),originalLine:r,originalColumn:B.getArg(t,"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,Gl.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(t.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 c=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==c;)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};Zo.SourceMapConsumer=ge;function Re(e,t){var r=e;typeof e=="string"&&(r=B.parseSourceMapInput(e));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),c=B.getArg(r,"mappings"),l=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(p){return s&&B.isAbsolute(s)&&B.isAbsolute(p)?B.relative(s,p):p}),this._names=cn.fromArray(o.map(String),!0),this._sources=cn.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(p){return B.computeSourceURL(s,p,t)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=t,this.file=l}Re.prototype=Object.create(ge.prototype);Re.prototype.consumer=ge;Re.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=B.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};Re.fromSourceMap=function(t,r){var n=Object.create(Re.prototype),i=n._names=cn.fromArray(t._names.toArray(),!0),o=n._sources=cn.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return B.computeSourceURL(n.sourceRoot,m,r)});for(var s=t._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],l=0,p=s.length;l<p;l++){var f=s[l],d=new Bh;d.generatedLine=f.generatedLine,d.generatedColumn=f.generatedColumn,f.source&&(d.source=o.indexOf(f.source),d.originalLine=f.originalLine,d.originalColumn=f.originalColumn,f.name&&(d.name=i.indexOf(f.name)),c.push(d)),a.push(d)}return ai(n.__originalMappings,B.compareByOriginalPositions),n};Re.prototype._version=3;Object.defineProperty(Re.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Bh(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Re.prototype._parseMappings=function(t,r){for(var n=1,i=0,o=0,s=0,a=0,c=0,l=t.length,p=0,f={},d={},m=[],y=[],g,v,b,I,_;p<l;)if(t.charAt(p)===";")n++,p++,i=0;else if(t.charAt(p)===",")p++;else{for(g=new Bh,g.generatedLine=n,I=p;I<l&&!this._charIsMappingSeparator(t,I);I++);if(v=t.slice(p,I),b=f[v],b)p+=v.length;else{for(b=[];p<I;)o2.decode(t,p,d),_=d.value,p=d.rest,b.push(_);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");f[v]=b}g.generatedColumn=i+b[0],i=g.generatedColumn,b.length>1&&(g.source=a+b[1],a+=b[1],g.originalLine=o+b[2],o=g.originalLine,g.originalLine+=1,g.originalColumn=s+b[3],s=g.originalColumn,b.length>4&&(g.name=c+b[4],c+=b[4])),y.push(g),typeof g.originalLine=="number"&&m.push(g)}ai(y,B.compareByGeneratedPositionsDeflated),this.__generatedMappings=y,ai(m,B.compareByOriginalPositions),this.__originalMappings=m};Re.prototype._findMapping=function(t,r,n,i,o,s){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[i]);return Gl.search(t,r,o,s)};Re.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};Re.prototype.originalPositionFor=function(t){var r={generatedLine:B.getArg(t,"line"),generatedColumn:B.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",B.compareByGeneratedPositionsDeflated,B.getArg(t,"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}};Re.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};Re.prototype.sourceContentFor=function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var i=t;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.')};Re.prototype.generatedPositionFor=function(t){var r=B.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:B.getArg(t,"line"),originalColumn:B.getArg(t,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",B.compareByOriginalPositions,B.getArg(t,"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}};Zo.BasicSourceMapConsumer=Re;function vt(e,t){var r=e;typeof e=="string"&&(r=B.parseSourceMapInput(e));var n=B.getArg(r,"version"),i=B.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new cn,this._names=new cn;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"),c=B.getArg(a,"line"),l=B.getArg(a,"column");if(c<o.line||c===o.line&&l<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=a,{generatedOffset:{generatedLine:c+1,generatedColumn:l+1},consumer:new ge(B.getArg(s,"map"),t)}})}vt.prototype=Object.create(ge.prototype);vt.prototype.constructor=ge;vt.prototype._version=3;Object.defineProperty(vt.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});vt.prototype.originalPositionFor=function(t){var r={generatedLine:B.getArg(t,"line"),generatedColumn:B.getArg(t,"column")},n=Gl.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:t.bias}):{source:null,line:null,column:null,name:null}};vt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};vt.prototype.sourceContentFor=function(t,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],o=i.consumer.sourceContentFor(t,!0);if(o)return o}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')};vt.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(B.getArg(t,"source"))!==-1){var i=n.consumer.generatedPositionFor(t);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}};vt.prototype._parseMappings=function(t,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],c=i.consumer._sources.at(a.source);c=B.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var l=null;a.name&&(l=i.consumer._names.at(a.name),this._names.add(l),l=this._names.indexOf(l));var p={source:c,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:l};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}ai(this.__generatedMappings,B.compareByGeneratedPositionsDeflated),ai(this.__originalMappings,B.compareByOriginalPositions)};Zo.IndexedSourceMapConsumer=vt});var Uh=S(Wh=>{var s2=Hl().SourceMapGenerator,es=ln(),a2=/(\r?\n)/,l2=10,un="$$$isSourceNode$$$";function et(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=i??null,this[un]=!0,n!=null&&this.add(n)}et.fromStringWithSourceMap=function(t,r,n){var i=new et,o=t.split(a2),s=0,a=function(){var d=y(),m=y()||"";return d+m;function y(){return s<o.length?o[s++]:void 0}},c=1,l=0,p=null;return r.eachMapping(function(d){if(p!==null)if(c<d.generatedLine)f(p,a()),c++,l=0;else{var m=o[s]||"",y=m.substr(0,d.generatedColumn-l);o[s]=m.substr(d.generatedColumn-l),l=d.generatedColumn,f(p,y),p=d;return}for(;c<d.generatedLine;)i.add(a()),c++;if(l<d.generatedColumn){var m=o[s]||"";i.add(m.substr(0,d.generatedColumn)),o[s]=m.substr(d.generatedColumn),l=d.generatedColumn}p=d},this),s<o.length&&(p&&f(p,a()),i.add(o.splice(s).join(""))),r.sources.forEach(function(d){var m=r.sourceContentFor(d);m!=null&&(n!=null&&(d=es.join(n,d)),i.setSourceContent(d,m))}),i;function f(d,m){if(d===null||d.source===void 0)i.add(m);else{var y=n?es.join(n,d.source):d.source;i.add(new et(d.originalLine,d.originalColumn,y,m,d.name))}}};et.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[un]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};et.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[un]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};et.prototype.walk=function(t){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[un]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})};et.prototype.join=function(t){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(t);r.push(this.children[n]),this.children=r}return this};et.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[un]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this};et.prototype.setSourceContent=function(t,r){this.sourceContents[es.toSetString(t)]=r};et.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][un]&&this.children[r].walkSourceContents(t);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)t(es.fromSetString(i[r]),this.sourceContents[i[r]])};et.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t};et.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new s2(t),i=!1,o=null,s=null,a=null,c=null;return this.walk(function(l,p){r.code+=l,p.source!==null&&p.line!==null&&p.column!==null?((o!==p.source||s!==p.line||a!==p.column||c!==p.name)&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name}),o=p.source,s=p.line,a=p.column,c=p.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var f=0,d=l.length;f<d;f++)l.charCodeAt(f)===l2?(r.line++,r.column=0,f+1===d?(o=null,i=!1):i&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name})):r.column++}),this.walkSourceContents(function(l,p){n.setSourceContent(l,p)}),{code:r.code,map:n}};Wh.SourceNode=et});var zh=S(ts=>{ts.SourceMapGenerator=Hl().SourceMapGenerator;ts.SourceMapConsumer=Hh().SourceMapConsumer;ts.SourceNode=Uh().SourceNode});var Yh=S(rs=>{"use strict";rs.__esModule=!0;rs.safeJsonLiteral=Jh;var Kl=Me(),c2=/[\x00-\x1f\\"\u2028\u2029<\ud800-\udfff]/,u2=/<(?=!--|\/?script)/gi;function f2(e){return e.replace(u2,"\\u003C")}function p2(e){return"\\u"+e.charCodeAt(0).toString(16)}function Jh(e){return f2(JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/[\ud800-\udfff]/g,p2))}var Cr=void 0;try{(typeof define!="function"||!define.amd)&&(Gh=zh(),Cr=Gh.SourceNode)}catch{}var Gh;Cr||(Cr=function(e,t,r,n){this.src="",n&&this.add(n)},Cr.prototype={add:function(t){Kl.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){Kl.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Jl(e,t,r){if(Kl.isArray(e)){for(var n=[],i=0,o=e.length;i<o;i++)n.push(t.wrap(e[i],r));return n}else if(typeof e=="boolean"||typeof e=="number")return e+"";return e}function Kh(e){this.srcFile=e,this.source=[]}Kh.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,r){this.source.unshift(this.wrap(t,r))},push:function(t,r){this.source.push(this.wrap(t,r))},merge:function(){var t=this.empty();return this.each(function(r){t.add([" ",r,`
110
+ `])}),t},each:function(t){for(var r=0,n=this.source.length;r<n;r++)t(this.source[r])},empty:function(){var t=this.currentLocation||{start:{}};return new Cr(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return t instanceof Cr?t:(t=Jl(t,this,r),new Cr(r.start.line,r.start.column,this.srcFile,t))},functionCall:function(t,r,n){return n=this.generateList(n),this.wrap([t,r?"."+r+"(":"(",n,")"])},quotedString:function(t){return t=t+"",c2.test(t)?Jh(t):'"'+t+'"'},objectLiteral:function(t){var r=this,n=[];Object.keys(t).forEach(function(o){var s=Jl(t[o],r);s!=="undefined"&&n.push([r.quotedString(o),":",s])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},generateList:function(t){for(var r=this.empty(),n=0,i=t.length;n<i;n++)n&&r.add(","),r.add(Jl(t[n],this));return r},generateArray:function(t){var r=this.generateList(t);return r.prepend("["),r.add("]"),r}};rs.default=Kh});var nm=S((ns,rm)=>{"use strict";ns.__esModule=!0;function Zh(e){return e&&e.__esModule?e:{default:e}}var Xh=Vo(),d2=ot(),Yl=Zh(d2),h2=Me(),em=Yh(),Qh=Zh(em);function fn(e){this.value=e}function pn(){}pn.prototype={nameLookup:function(t,r){return this.internalNameLookup(t,r)},depthedLookup:function(t){return[this.aliasable("container.lookup"),"(depths, ",this.quotedString(t),")"]},compilerInfo:function(){var t=Xh.COMPILER_REVISION,r=Xh.REVISION_CHANGES[t];return[t,r]},appendToBuffer:function(t,r,n){return h2.isArray(t)||(t=[t]),t=this.source.wrap(t,r),this.environment.isSimple?["return ",t,";"]:n?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(t,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",t,",",this.quotedString(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(t,r,n,i){this.environment=t,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(t,r),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var o=t.opcodes,s=void 0,a=void 0,c=void 0,l=void 0;for(c=0,l=o.length;c<l;c++)s=o[c],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 Yl.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
- `),this.decorators=this.decorators.merge()));var p=this.createFunctionContext(i);if(this.isChild)return p;var f={compiler:this.compilerInfo(),main:p};this.decorators&&(f.main_d=this.decorators,f.useDecorators=!0);var h=this.context,m=h.programs,y=h.decorators;for(c=0,l=m.length;c<l;c++)f[c]=m[c],y[c]&&(f[c+"_d"]=y[c],f.useDecorators=!0);return this.environment.usePartial&&(f.usePartial=!0),this.options.data&&(f.useData=!0),this.useDepths&&(f.useDepths=!0),this.useBlockParams&&(f.useBlockParams=!0),this.options.compat&&(f.compat=!0),i?f.compilerOptions=this.options:(f.compiler=JSON.stringify(f.compiler),this.source.currentLocation={start:{line:1,column:0}},f=this.objectLiteral(f),r.srcName?(f=f.toStringWithSourceMap({file:r.destName}),f.map=f.map&&f.map.toString()):f=f.toString()),f},preamble:function(){this.lastContext=0,this.source=new Dh.default(this.options.srcName),this.decorators=new Dh.default(this.options.srcName)},createFunctionContext:function(t){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(c){var l=r.aliases[c];l.children&&l.referenceCount>1&&(n+=", alias"+ ++o+"="+c,l.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 t?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
113
+ `),this.decorators=this.decorators.merge()));var p=this.createFunctionContext(i);if(this.isChild)return p;var f={compiler:this.compilerInfo(),main:p};this.decorators&&(f.main_d=this.decorators,f.useDecorators=!0);var d=this.context,m=d.programs,y=d.decorators;for(c=0,l=m.length;c<l;c++)f[c]=m[c],y[c]&&(f[c+"_d"]=y[c],f.useDecorators=!0);return this.environment.usePartial&&(f.usePartial=!0),this.options.data&&(f.useData=!0),this.useDepths&&(f.useDepths=!0),this.useBlockParams&&(f.useBlockParams=!0),this.options.compat&&(f.compat=!0),i?f.compilerOptions=this.options:(f.compiler=JSON.stringify(f.compiler),this.source.currentLocation={start:{line:1,column:0}},f=this.objectLiteral(f),r.srcName?(f=f.toStringWithSourceMap({file:r.destName}),f.map=f.map&&f.map.toString()):f=f.toString()),f},preamble:function(){this.lastContext=0,this.source=new Qh.default(this.options.srcName),this.decorators=new Qh.default(this.options.srcName)},createFunctionContext:function(t){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(c){var l=r.aliases[c];l.children&&l.referenceCount>1&&(n+=", alias"+ ++o+"="+c,l.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 t?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
114
114
  `,a,"}"])},mergeSource:function(t){var r=this.environment.isSimple,n=!this.forceBuffer,i=void 0,o=void 0,s=void 0,a=void 0;return this.source.each(function(c){c.appendToBuffer?(s?c.prepend(" + "):s=c,a=c):(s&&(o?s.prepend("buffer += "):i=!0,a.add(";"),s=a=void 0),o=!0,r||(n=!1))}),n?s?(s.prepend("return "),a.add(";")):o||this.source.push('return "";'):(t+=", buffer = "+(i?"":this.initializeBuffer()),s?(s.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(i?"":`;
115
115
  `)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
116
116
  lookupProperty = container.lookupProperty || function(parent, propertyName) {
@@ -119,40 +119,40 @@ Expecting `+fe.join(", ")+", got '"+(this.terminals_[R]||R)+"'":Y="Parse error o
119
119
  }
120
120
  return undefined
121
121
  }
122
- `.trim()},blockValue:function(t){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(t,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var t=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(t,"call",r),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,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(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,r,n,i){var o=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(t[o++])):this.pushContext(),this.resolvePath("context",t,o,r,n)},lookupBlockParam:function(t,r){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(t,r,n){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},resolvePath:function(t,r,n,i,o){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(z1(this.options.strict&&o,this,r,n,t));return}for(var a=r.length,c=function(p){s.replaceStack(function(f){var h=s.nameLookup(f,r[p],t);return i?[" && ",h]:[" != null ? ",h," : ",f]})},l=n;l<a;l++)c(l)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof t=="string"?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){t!=null?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,t);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(t,r,n){var i=this.popStack(),o=this.setupHelper(t,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,"||"),")"],c=this.source.functionCall(a,"call",o.callParams);this.push(c)},itemsSeparatedBy:function(t,r){var n=[];n.push(t[0]);for(var i=1;i<t.length;i++)n.push(r,t[i]);return n},invokeKnownHelper:function(t,r){var n=this.setupHelper(t,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(t,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,t,r),o=this.lastHelper=this.nameLookup("helpers",t,"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(t,r,n){var i=[],o=this.setupParams(r,1,i);t&&(r=this.popStack(),delete o.name),n&&(o.indent=JSON.stringify(n)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",t?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(t){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[t]=n),i&&(s.types[t]=i),o&&(s.ids[t]=o),s.values[t]=r},pushId:function(t,r,n){t==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):t==="PathExpression"?this.pushString(r):t==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:sn,compileChildren:function(t,r){for(var n=t.children,i=void 0,o=void 0,s=0,a=n.length;s<a;s++){i=n[s],o=new this.compiler;var c=this.matchExistingProgram(i);if(c==null){var l=this.context.programs.push("")-1;i.index=l,i.name="program"+l,this.context.programs[l]=o.compile(i,r,this.context,!this.precompile),this.context.decorators[l]=o.decorators,this.context.environments[l]=i,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=c.index,i.name="program"+c.index,this.useDepths=this.useDepths||c.useDepths,this.useBlockParams=this.useBlockParams||c.useBlockParams}},matchExistingProgram:function(t){for(var r=0,n=this.context.environments.length;r<n;r++){var i=this.context.environments[r];if(i&&i.equals(t))return i}},programExpression:function(t){var r=this.environment.children[t],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(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof on||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new on(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var r=["("],n=void 0,i=void 0,o=void 0;if(!this.isInline())throw new Bl.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof on)n=[s.value],r=["(",n],o=!0;else{i=!0;var a=this.incrStack();r=["((",this.push(a)," = ",s,")"],n=this.topStack()}var c=t.call(this,n);o||this.popStack(),i&&this.stackSlot--,this.push(r.concat(c,")"))},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 t=this.inlineStack;this.inlineStack=[];for(var r=0,n=t.length;r<n;r++){var i=t[r];if(i instanceof on)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(t){var r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!t&&n instanceof on)return n.value;if(!r){if(!this.stackSlot)throw new Bl.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,r=t[t.length-1];return r instanceof on?r.value:r},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var r=this.aliases[t];return r?(r.referenceCount++,r):(r=this.aliases[t]=this.source.wrap(t),r.aliasable=!0,r.referenceCount=1,r)},setupHelper:function(t,r,n){var i=[],o=this.setupHelperArgs(r,t,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(t,r,n){var i={},o=[],s=[],a=[],c=!n,l=void 0;c&&(n=[]),i.name=this.quotedString(t),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var p=this.popStack(),f=this.popStack();(f||p)&&(i.fn=f||"container.noop",i.inverse=p||"container.noop");for(var h=r;h--;)l=this.popStack(),n[h]=l,this.trackIds&&(a[h]=this.popStack()),this.stringParams&&(s[h]=this.popStack(),o[h]=this.popStack());return c&&(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(t,r,n,i){var o=this.setupParams(t,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 e="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(" "),t=sn.RESERVED_WORDS={},r=0,n=e.length;r<n;r++)t[e[r]]=!0})();sn.isValidJavaScriptVariableName=function(e){return!sn.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function z1(e,t,r,n,i){var o=t.popStack(),s=r.length;e&&s--;for(var a=n;a<s;a++)o=t.nameLookup(o,r[a],i);return e?[t.aliasable("container.strict"),"(",o,", ",t.quotedString(r[s]),", ",JSON.stringify(t.source.currentLocation)," )"]:o}ts.default=sn;qh.exports=ts.default});var Uh=S((rs,Wh)=>{"use strict";rs.__esModule=!0;function li(e){return e&&e.__esModule?e:{default:e}}var G1=Gd(),J1=li(G1),K1=yl(),Y1=li(K1),Hl=oh(),Wl=ch(),X1=Bh(),Q1=li(X1),Z1=zo(),e2=li(Z1),t2=dl(),r2=li(t2),n2=J1.default.create;function Hh(){var e=n2();return e.compile=function(t,r){return Wl.compile(t,r,e)},e.precompile=function(t,r){return Wl.precompile(t,r,e)},e.AST=Y1.default,e.Compiler=Wl.Compiler,e.JavaScriptCompiler=Q1.default,e.Parser=Hl.parser,e.parse=Hl.parse,e.parseWithoutProcessing=Hl.parseWithoutProcessing,e}var an=Hh();an.create=Hh;r2.default(an);an.Visitor=e2.default;an.default=an;rs.default=an;Wh.exports=rs.default});var zh=S(ns=>{"use strict";ns.__esModule=!0;ns.print=a2;ns.PrintVisitor=xe;function i2(e){return e&&e.__esModule?e:{default:e}}var o2=zo(),s2=i2(o2);function a2(e){return new xe().accept(e)}function xe(){this.padding=0}xe.prototype=new s2.default;xe.prototype.pad=function(e){for(var t="",r=0,n=this.padding;r<n;r++)t+=" ";return t+=e+`
123
- `,t};xe.prototype.Program=function(e){var t="",r=e.body,n=void 0,i=void 0;if(e.blockParams){var o="BLOCK PARAMS: [";for(n=0,i=e.blockParams.length;n<i;n++)o+=" "+e.blockParams[n];o+=" ]",t+=this.pad(o)}for(n=0,i=r.length;n<i;n++)t+=this.accept(r[n]);return this.padding--,t};xe.prototype.MustacheStatement=function(e){return this.pad("{{ "+this.SubExpression(e)+" }}")};xe.prototype.Decorator=function(e){return this.pad("{{ DIRECTIVE "+this.SubExpression(e)+" }}")};xe.prototype.BlockStatement=xe.prototype.DecoratorBlock=function(e){var t="";return t+=this.pad((e.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,t+=this.pad(this.SubExpression(e)),e.program&&(t+=this.pad("PROGRAM:"),this.padding++,t+=this.accept(e.program),this.padding--),e.inverse&&(e.program&&this.padding++,t+=this.pad("{{^}}"),this.padding++,t+=this.accept(e.inverse),this.padding--,e.program&&this.padding--),this.padding--,t};xe.prototype.PartialStatement=function(e){var t="PARTIAL:"+e.name.original;return e.params[0]&&(t+=" "+this.accept(e.params[0])),e.hash&&(t+=" "+this.accept(e.hash)),this.pad("{{> "+t+" }}")};xe.prototype.PartialBlockStatement=function(e){var t="PARTIAL BLOCK:"+e.name.original;return e.params[0]&&(t+=" "+this.accept(e.params[0])),e.hash&&(t+=" "+this.accept(e.hash)),t+=" "+this.pad("PROGRAM:"),this.padding++,t+=this.accept(e.program),this.padding--,this.pad("{{> "+t+" }}")};xe.prototype.ContentStatement=function(e){return this.pad("CONTENT[ '"+e.value+"' ]")};xe.prototype.CommentStatement=function(e){return this.pad("{{! '"+e.value+"' }}")};xe.prototype.SubExpression=function(e){for(var t=e.params,r=[],n=void 0,i=0,o=t.length;i<o;i++)r.push(this.accept(t[i]));return t="["+r.join(", ")+"]",n=e.hash?" "+this.accept(e.hash):"",this.accept(e.path)+" "+t+n};xe.prototype.PathExpression=function(e){var t=e.parts.join("/");return(e.data?"@":"")+"PATH:"+t};xe.prototype.StringLiteral=function(e){return'"'+e.value+'"'};xe.prototype.NumberLiteral=function(e){return"NUMBER{"+e.value+"}"};xe.prototype.BooleanLiteral=function(e){return"BOOLEAN{"+e.value+"}"};xe.prototype.UndefinedLiteral=function(){return"UNDEFINED"};xe.prototype.NullLiteral=function(){return"NULL"};xe.prototype.Hash=function(e){for(var t=e.pairs,r=[],n=0,i=t.length;n<i;n++)r.push(this.accept(t[n]));return"HASH{"+r.join(", ")+"}"};xe.prototype.HashPair=function(e){return e.key+"="+this.accept(e.value)}});var Yh=S((uA,Kh)=>{var is=Uh().default,Jh=zh();is.PrintVisitor=Jh.PrintVisitor;is.print=Jh.print;Kh.exports=is;function Gh(e,t){var r=Wr("fs"),n=r.readFileSync(t,"utf8");e.exports=is.compile(n)}typeof Wr<"u"&&Wr.extensions&&(Wr.extensions[".handlebars"]=Gh,Wr.extensions[".hbs"]=Gh)});import{readFile as l2}from"node:fs/promises";import{resolve as c2}from"node:path";async function vt(e,t,r){let n=c2(e,t),i=Xh.get(n);if(!i){let o=await l2(n,"utf-8");i=Qh.default.compile(o,{noEscape:!0}),Xh.set(n,i)}return i(r)}var Qh,Xh,ci=K(()=>{"use strict";Qh=Jf(Yh(),1),Xh=new Map});var Ul=K(()=>{"use strict";pi()});import{readFile as Zh,writeFile as u2,mkdir as f2,stat as p2,rm as d2,unlink as h2}from"node:fs/promises";import{resolve as Ft}from"node:path";async function em(e){try{return await p2(e),!0}catch{return!1}}async function zl(e){let t=Ft(e,"..");for(let r of[Ft(e,"runtime"),Ft(t,"components"),Ft(t,"runtime")])await em(r)&&await d2(r,{recursive:!0,force:!0});for(let r of["extensions.tsx","extensions.ts","contracts.ts"]){let n=Ft(e,r);await em(n)&&await h2(n)}}function m2(e){return e.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function tm(e,t,r){let n=Ie(e),i=t.generated.reactDir,o=ui(r??(t.rendererTemplatesDir?Ft(n,t.rendererTemplatesDir):void 0)),s=ln();await f2(i,{recursive:!0}),await zl(i);let a=await Zh(Ft(s,"types.ts"),"utf-8"),c=await Zh(Ft(s,"style.ts"),"utf-8"),l=await vt(o,"dispatch.ts.hbs",{}),p=m2(l),f=await vt(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:c.trim(),dispatchBody:p.trim()}),h=Ft(i,"runtime.ts");return await u2(h,f,"utf-8"),{runtimePath:h}}var rm=K(()=>{"use strict";Mt();ci();Ul()});var im={};pr(im,{renderReactRuntime:()=>_2});import{writeFile as nm,stat as g2,unlink as y2}from"node:fs/promises";import{relative as v2,resolve as cn}from"node:path";async function w2(e){try{return await g2(e),!0}catch{return!1}}async function b2(e,t,r,n){let i=await di(r,e),o=await vt(ui(n),"theme.css.hbs",{themeCss:i});await nm(t,o,"utf-8")}async function $2(e){let t=cn(e,"..");for(let r of["theme.css","contracts.ts","view-bridge.generated.ts"]){let n=cn(t,r);await w2(n)&&await y2(n)}}async function x2(e,t){let r=Ie(e),n=t.generated.reactDir,i=cn(r,"src/components/extensions.tsx"),o=v2(n,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=cn(n,"extensions.generated.ts");return await nm(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
122
+ `.trim()},blockValue:function(t){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(t,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var t=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(t,"call",r),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,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(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,r,n,i){var o=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(t[o++])):this.pushContext(),this.resolvePath("context",t,o,r,n)},lookupBlockParam:function(t,r){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(t,r,n){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},resolvePath:function(t,r,n,i,o){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(m2(this.options.strict&&o,this,r,n,t));return}for(var a=r.length,c=function(p){s.replaceStack(function(f){var d=s.nameLookup(f,r[p],t);return i?[" && ",d]:[" != null ? ",d," : ",f]})},l=n;l<a;l++)c(l)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof t=="string"?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){t!=null?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,t);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(t,r,n){var i=this.popStack(),o=this.setupHelper(t,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,"||"),")"],c=this.source.functionCall(a,"call",o.callParams);this.push(c)},itemsSeparatedBy:function(t,r){var n=[];n.push(t[0]);for(var i=1;i<t.length;i++)n.push(r,t[i]);return n},invokeKnownHelper:function(t,r){var n=this.setupHelper(t,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(t,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,t,r),o=this.lastHelper=this.nameLookup("helpers",t,"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(t,r,n){var i=[],o=this.setupParams(r,1,i);t&&(r=this.popStack(),delete o.name),n&&(o.indent=this.quotedString(n)),o.helpers="helpers",o.partials="partials",o.decorators="container.decorators",t?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(t){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[t]=n),i&&(s.types[t]=i),o&&(s.ids[t]=o),s.values[t]=r},pushId:function(t,r,n){t==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+this.quotedString("."+n):"")):t==="PathExpression"?this.pushString(r):t==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:pn,compileChildren:function(t,r){for(var n=t.children,i=void 0,o=void 0,s=0,a=n.length;s<a;s++){i=n[s],o=new this.compiler;var c=this.matchExistingProgram(i);if(c==null){var l=this.context.programs.push("")-1;i.index=l,i.name="program"+l,this.context.programs[l]=o.compile(i,r,this.context,!this.precompile),this.context.decorators[l]=o.decorators,this.context.environments[l]=i,this.useDepths=this.useDepths||o.useDepths,this.useBlockParams=this.useBlockParams||o.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=c.index,i.name="program"+c.index,this.useDepths=this.useDepths||c.useDepths,this.useBlockParams=this.useBlockParams||c.useBlockParams}},matchExistingProgram:function(t){for(var r=0,n=this.context.environments.length;r<n;r++){var i=this.context.environments[r];if(i&&i.equals(t))return i}},programExpression:function(t){var r=this.environment.children[t],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(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof fn||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new fn(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var r=["("],n=void 0,i=void 0,o=void 0;if(!this.isInline())throw new Yl.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof fn)n=[s.value],r=["(",n],o=!0;else{i=!0;var a=this.incrStack();r=["((",this.push(a)," = ",s,")"],n=this.topStack()}var c=t.call(this,n);o||this.popStack(),i&&this.stackSlot--,this.push(r.concat(c,")"))},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 t=this.inlineStack;this.inlineStack=[];for(var r=0,n=t.length;r<n;r++){var i=t[r];if(i instanceof fn)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(t){var r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!t&&n instanceof fn)return n.value;if(!r){if(!this.stackSlot)throw new Yl.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,r=t[t.length-1];return r instanceof fn?r.value:r},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var r=this.aliases[t];return r?(r.referenceCount++,r):(r=this.aliases[t]=this.source.wrap(t),r.aliasable=!0,r.referenceCount=1,r)},setupHelper:function(t,r,n){var i=[],o=this.setupHelperArgs(r,t,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(t,r,n){var i={},o=[],s=[],a=[],c=!n,l=void 0;c&&(n=[]),i.name=this.quotedString(t),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var p=this.popStack(),f=this.popStack();(f||p)&&(i.fn=f||"container.noop",i.inverse=p||"container.noop");for(var d=r;d--;)l=this.popStack(),n[d]=l,this.trackIds&&(a[d]=this.popStack()),this.stringParams&&(s[d]=this.popStack(),o[d]=this.popStack());return c&&(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(t,r,n,i){var o=this.setupParams(t,r,n);return o.loc=tm(this),o=this.objectLiteral(o),i?(this.useRegister("options"),n.push("options"),["options=",o]):n?(n.push(o),""):o}};(function(){for(var e="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(" "),t=pn.RESERVED_WORDS={},r=0,n=e.length;r<n;r++)t[e[r]]=!0})();pn.isValidJavaScriptVariableName=function(e){return!pn.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function tm(e){var t=e.source.currentLocation;return t?em.safeJsonLiteral(t):"undefined"}function m2(e,t,r,n,i){var o=t.popStack(),s=r.length;e&&s--;for(var a=n;a<s;a++)o=t.nameLookup(o,r[a],i);return e?[t.aliasable("container.strict"),"(",o,", ",t.quotedString(r[s]),", ",tm(t)," )"]:o}ns.default=pn;rm.exports=ns.default});var sm=S((is,om)=>{"use strict";is.__esModule=!0;function li(e){return e&&e.__esModule?e:{default:e}}var g2=nh(),y2=li(g2),v2=_l(),w2=li(v2),Xl=yh(),Ql=xh(),b2=nm(),$2=li(b2),x2=Go(),_2=li(x2),S2=wl(),k2=li(S2),C2=y2.default.create;function im(){var e=C2();return e.compile=function(t,r){return Ql.compile(t,r,e)},e.precompile=function(t,r){return Ql.precompile(t,r,e)},e.AST=w2.default,e.Compiler=Ql.Compiler,e.JavaScriptCompiler=$2.default,e.Parser=Xl.parser,e.parse=Xl.parse,e.parseWithoutProcessing=Xl.parseWithoutProcessing,e}var dn=im();dn.create=im;k2.default(dn);dn.Visitor=_2.default;dn.default=dn;is.default=dn;om.exports=is.default});var am=S(os=>{"use strict";os.__esModule=!0;os.print=R2;os.PrintVisitor=xe;function E2(e){return e&&e.__esModule?e:{default:e}}var P2=Go(),I2=E2(P2);function R2(e){return new xe().accept(e)}function xe(){this.padding=0}xe.prototype=new I2.default;xe.prototype.pad=function(e){for(var t="",r=0,n=this.padding;r<n;r++)t+=" ";return t+=e+`
123
+ `,t};xe.prototype.Program=function(e){var t="",r=e.body,n=void 0,i=void 0;if(e.blockParams){var o="BLOCK PARAMS: [";for(n=0,i=e.blockParams.length;n<i;n++)o+=" "+e.blockParams[n];o+=" ]",t+=this.pad(o)}for(n=0,i=r.length;n<i;n++)t+=this.accept(r[n]);return this.padding--,t};xe.prototype.MustacheStatement=function(e){return this.pad("{{ "+this.SubExpression(e)+" }}")};xe.prototype.Decorator=function(e){return this.pad("{{ DIRECTIVE "+this.SubExpression(e)+" }}")};xe.prototype.BlockStatement=xe.prototype.DecoratorBlock=function(e){var t="";return t+=this.pad((e.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,t+=this.pad(this.SubExpression(e)),e.program&&(t+=this.pad("PROGRAM:"),this.padding++,t+=this.accept(e.program),this.padding--),e.inverse&&(e.program&&this.padding++,t+=this.pad("{{^}}"),this.padding++,t+=this.accept(e.inverse),this.padding--,e.program&&this.padding--),this.padding--,t};xe.prototype.PartialStatement=function(e){var t="PARTIAL:"+e.name.original;return e.params[0]&&(t+=" "+this.accept(e.params[0])),e.hash&&(t+=" "+this.accept(e.hash)),this.pad("{{> "+t+" }}")};xe.prototype.PartialBlockStatement=function(e){var t="PARTIAL BLOCK:"+e.name.original;return e.params[0]&&(t+=" "+this.accept(e.params[0])),e.hash&&(t+=" "+this.accept(e.hash)),t+=" "+this.pad("PROGRAM:"),this.padding++,t+=this.accept(e.program),this.padding--,this.pad("{{> "+t+" }}")};xe.prototype.ContentStatement=function(e){return this.pad("CONTENT[ '"+e.value+"' ]")};xe.prototype.CommentStatement=function(e){return this.pad("{{! '"+e.value+"' }}")};xe.prototype.SubExpression=function(e){for(var t=e.params,r=[],n=void 0,i=0,o=t.length;i<o;i++)r.push(this.accept(t[i]));return t="["+r.join(", ")+"]",n=e.hash?" "+this.accept(e.hash):"",this.accept(e.path)+" "+t+n};xe.prototype.PathExpression=function(e){var t=e.parts.join("/");return(e.data?"@":"")+"PATH:"+t};xe.prototype.StringLiteral=function(e){return'"'+e.value+'"'};xe.prototype.NumberLiteral=function(e){return"NUMBER{"+e.value+"}"};xe.prototype.BooleanLiteral=function(e){return"BOOLEAN{"+e.value+"}"};xe.prototype.UndefinedLiteral=function(){return"UNDEFINED"};xe.prototype.NullLiteral=function(){return"NULL"};xe.prototype.Hash=function(e){for(var t=e.pairs,r=[],n=0,i=t.length;n<i;n++)r.push(this.accept(t[n]));return"HASH{"+r.join(", ")+"}"};xe.prototype.HashPair=function(e){return e.key+"="+this.accept(e.value)}});var fm=S((DA,um)=>{var ss=sm().default,cm=am();ss.PrintVisitor=cm.PrintVisitor;ss.print=cm.print;um.exports=ss;function lm(e,t){var r=Kr("fs"),n=r.readFileSync(t,"utf8");e.exports=ss.compile(n)}typeof Kr<"u"&&Kr.extensions&&(Kr.extensions[".handlebars"]=lm,Kr.extensions[".hbs"]=lm)});import{readFile as T2}from"node:fs/promises";import{resolve as A2}from"node:path";async function wt(e,t,r){let n=A2(e,t),i=pm.get(n);if(!i){let o=await T2(n,"utf-8");i=dm.default.compile(o,{noEscape:!0}),pm.set(n,i)}return i(r)}var dm,pm,ci=K(()=>{"use strict";dm=np(fm(),1),pm=new Map});var Zl=K(()=>{"use strict";pi()});import{readFile as hm,writeFile as N2,mkdir as O2,stat as M2,rm as V2,unlink as L2}from"node:fs/promises";import{resolve as Bt}from"node:path";async function mm(e){try{return await M2(e),!0}catch{return!1}}async function ec(e){let t=Bt(e,"..");for(let r of[Bt(e,"runtime"),Bt(t,"components"),Bt(t,"runtime")])await mm(r)&&await V2(r,{recursive:!0,force:!0});for(let r of["extensions.tsx","extensions.ts","contracts.ts"]){let n=Bt(e,r);await mm(n)&&await L2(n)}}function j2(e){return e.replace(/^import type \{ DispatchableAction \} from [^;]+;\n/gm,"")}async function gm(e,t,r){let n=Ie(e),i=t.generated.reactDir,o=ui(r??(t.rendererTemplatesDir?Bt(n,t.rendererTemplatesDir):void 0)),s=hn();await O2(i,{recursive:!0}),await ec(i);let a=await hm(Bt(s,"types.ts"),"utf-8"),c=await hm(Bt(s,"style.ts"),"utf-8"),l=await wt(o,"dispatch.ts.hbs",{}),p=j2(l),f=await wt(o,"runtime.ts.hbs",{typesBody:a.trim(),styleBody:c.trim(),dispatchBody:p.trim()}),d=Bt(i,"runtime.ts");return await N2(d,f,"utf-8"),{runtimePath:d}}var ym=K(()=>{"use strict";Mt();ci();Zl()});var wm={};gr(wm,{renderReactRuntime:()=>z2});import{writeFile as vm,stat as D2,unlink as F2}from"node:fs/promises";import{relative as q2,resolve as mn}from"node:path";async function B2(e){try{return await D2(e),!0}catch{return!1}}async function H2(e,t,r,n){let i=await di(r,e),o=await wt(ui(n),"theme.css.hbs",{themeCss:i});await vm(t,o,"utf-8")}async function W2(e){let t=mn(e,"..");for(let r of["theme.css","contracts.ts","view-bridge.generated.ts"]){let n=mn(t,r);await B2(n)&&await F2(n)}}async function U2(e,t){let r=Ie(e),n=t.generated.reactDir,i=mn(r,"src/components/extensions.tsx"),o=q2(n,i).replace(/\\/g,"/");o.startsWith(".")||(o=`./${o}`);let s=o.replace(/\.tsx?$/,".js"),a=mn(n,"extensions.generated.ts");return await vm(a,`/** Auto-generated extension re-export \u2014 DO NOT EDIT */
124
124
  export * from '${s}';
125
- `,"utf-8"),a}async function _2(e,t){let r=Ie(e),n=t.rendererTemplatesDir?cn(r,t.rendererTemplatesDir):void 0,i=t.generated.reactDir;await $2(i),await zl(i);let{runtimePath:o}=await tm(e,t,n),s=await x2(e,t),a=cn(i,"theme.css");await b2(e,a,t,n),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var om=K(()=>{"use strict";Mt();os();ci();Ul();rm()});function S2(e,t){return e.entries.find(n=>n.path===t)?.value??""}function k2(e){let t=e.match(/^#([0-9a-fA-F]{6})$/);if(!t)return null;let r=t[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 xr(e){let t=e.match(/^([\d.]+)px$/);return t?Number(t[1]):null}function sm(e){return k2(e)??(e?`Color(${JSON.stringify(e)})`:null)}function am(e,t){let r=[];for(let[n,i]of Object.entries(e)){let o=S2(t,i.ref);if(o)switch(n){case"background":case"foreground":{let s=sm(o);s&&r.push({property:n,swiftValue:s});break}case"padding":{let s=xr(o);if(s!==null)r.push({property:n,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=xr(a[0]),l=xr(a[1]);c!==null&&r.push({property:"paddingV",swiftValue:String(c)}),l!==null&&r.push({property:"paddingH",swiftValue:String(l)})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=xr(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=xr(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=xr(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=sm(o);s&&r.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=xr(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"fontWeight":{let s=C2[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 cm(e,t){if(e.length===0)return`${t}VcVariantStyle()`;let n=[...e].sort((i,o)=>lm.indexOf(i.property)-lm.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${t}VcVariantStyle(${n})`}function E2(e,t){return{...e,...t}}function um(e,t){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(e.defaults)){if(Object.keys(i).length===0)continue;let o=am(i,t);o.length!==0&&r.push(` ${JSON.stringify(n)}: ${cm(o,"").trim()},`)}r.push(" ]"),r.push(""),r.push(" static let variants: [String: [String: VcVariantStyle]] = [");for(let[n,i]of Object.entries(e.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=e.defaults[n]??{};r.push(` ${JSON.stringify(n)}: [`);for(let[a,c]of o){let l=E2(s,c),p=am(l,t),f=cm(p," ");r.push(` ${JSON.stringify(a)}: ${f.trim()},`)}r.push(" ],")}return r.push(" ]"),r.push(""),r.push(" static func resolve(_ element: String, variant: String) -> VcVariantStyle {"),r.push(" variants[element]?[variant] ?? defaults[element] ?? VcVariantStyle()"),r.push(" }"),r.push("}"),r.push(""),r.join(`
126
- `)}var C2,lm,fm=K(()=>{"use strict";C2={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};lm=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as P2}from"node:path";function R2(e){for(let[t,r]of Object.entries(e.elements)){let n=r.container!==void 0&&r.container!==null,i=r.leaf!==void 0&&r.leaf!==null;if(n===i)throw new Error(`${I2}: element "${t}" must have exactly one of "container" or "leaf"`);(r.container==="vstack"||r.container==="hstack")&&r.spacingProp}}async function pm(e){if(!e&&Gl)return Gl;let t=e??P2(Se(),"renderers/swiftui/elements.yaml"),r=await Jr(t);return R2(r),e||(Gl=r),r}var I2,Gl,dm=K(()=>{"use strict";Ot();wo();I2="renderers/swiftui/elements.yaml",Gl=null});function T2(e,t){let r=e.entries.find(n=>n.path===t);if(!r)throw new Error(`Token reference "${t}" not found while merging visual props`);return r.value}function hm(e,t){let r={};for(let[n,i]of Object.entries(e))r[n]=T2(t,i.ref);return r}function A2(e){let t={};for(let[r,n]of Object.entries(e))n!=null&&(typeof n=="string"||typeof n=="number"||typeof n=="boolean")&&(t[r]=n);return t}function qt(e){let t=e.theme.defaults[e.elementName]??{},r=e.variantLiteral?e.theme.variants[e.elementName]?.[e.variantLiteral]??{}:{};return{...hm(t,e.tokens),...hm(r,e.tokens),...A2(e.instanceLiterals)}}var Jl=K(()=>{"use strict"});function _r(e){let t=new Set,r=n=>{if(Array.isArray(n)){for(let i of n)r(i);return}if(!(typeof n!="object"||n===null)){if(n.kind==="binding"){n.scope&&t.add(n.scope);return}if(n.kind==="concat")for(let i of n.parts)typeof i!="string"&&r(i)}};for(let n of e)r(n);return t}function ss(e,t){t&&e.emittedScopes?.add(t)}function Kl(e,t,r){let n=e.emittedScopes,i=new Set;e.emittedScopes=i;let o=t.filter(a=>e.optionalProps?.delete(a)),s=r();for(let a of o)e.optionalProps.add(a);return e.emittedScopes=n,{code:s,emitted:i}}function Sr(e,t,r,n){let i=[...t].filter(c=>e.optionalProps?.has(c));if(i.length===0)return r();let o=Kl(e,[],r),s=i.filter(c=>o.emitted.has(c));if(s.length===0||!o.code)return o.code;let a=Kl(e,s,r).code;return n(s,a)}function Bt(e,t,r){return Kl(e,t,r).code}function as(e,t){return e.split(`
125
+ `,"utf-8"),a}async function z2(e,t){let r=Ie(e),n=t.rendererTemplatesDir?mn(r,t.rendererTemplatesDir):void 0,i=t.generated.reactDir;await W2(i),await ec(i);let{runtimePath:o}=await gm(e,t,n),s=await U2(e,t),a=mn(i,"theme.css");await H2(e,a,t,n),console.log(` react/runtime \u2192 ${o}`),console.log(` react/extensions \u2192 ${s}`),console.log(` react/theme \u2192 ${a}`)}var bm=K(()=>{"use strict";Mt();as();ci();Zl();ym()});function G2(e,t){return e.entries.find(n=>n.path===t)?.value??""}function J2(e){let t=e.match(/^#([0-9a-fA-F]{6})$/);if(!t)return null;let r=t[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 Er(e){let t=e.match(/^([\d.]+)px$/);return t?Number(t[1]):null}function $m(e){return J2(e)??(e?`Color(${JSON.stringify(e)})`:null)}function xm(e,t){let r=[];for(let[n,i]of Object.entries(e)){let o=G2(t,i.ref);if(o)switch(n){case"background":case"foreground":{let s=$m(o);s&&r.push({property:n,swiftValue:s});break}case"padding":{let s=Er(o);if(s!==null)r.push({property:n,swiftValue:String(s)});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=Er(a[0]),l=Er(a[1]);c!==null&&r.push({property:"paddingV",swiftValue:String(c)}),l!==null&&r.push({property:"paddingH",swiftValue:String(l)})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=Er(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=Er(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=Er(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=$m(o);s&&r.push({property:"borderColor",swiftValue:s});break}case"margin":{let s=Er(o);s!==null&&r.push({property:n,swiftValue:String(s)});break}case"fontWeight":{let s=K2[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 Sm(e,t){if(e.length===0)return`${t}VcVariantStyle()`;let n=[...e].sort((i,o)=>_m.indexOf(i.property)-_m.indexOf(o.property)).map(i=>`${i.property}: ${i.swiftValue}`).join(", ");return`${t}VcVariantStyle(${n})`}function Y2(e,t){return{...e,...t}}function km(e,t){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(e.defaults)){if(Object.keys(i).length===0)continue;let o=xm(i,t);o.length!==0&&r.push(` ${JSON.stringify(n)}: ${Sm(o,"").trim()},`)}r.push(" ]"),r.push(""),r.push(" static let variants: [String: [String: VcVariantStyle]] = [");for(let[n,i]of Object.entries(e.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=e.defaults[n]??{};r.push(` ${JSON.stringify(n)}: [`);for(let[a,c]of o){let l=Y2(s,c),p=xm(l,t),f=Sm(p," ");r.push(` ${JSON.stringify(a)}: ${f.trim()},`)}r.push(" ],")}return r.push(" ]"),r.push(""),r.push(" static func resolve(_ element: String, variant: String) -> VcVariantStyle {"),r.push(" variants[element]?[variant] ?? defaults[element] ?? VcVariantStyle()"),r.push(" }"),r.push("}"),r.push(""),r.join(`
126
+ `)}var K2,_m,Cm=K(()=>{"use strict";K2={bold:".bold",semibold:".semibold",medium:".medium",regular:".regular",600:".semibold",700:".bold",500:".medium",400:".regular"};_m=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});import{resolve as X2}from"node:path";function Z2(e){for(let[t,r]of Object.entries(e.elements)){let n=r.container!==void 0&&r.container!==null,i=r.leaf!==void 0&&r.leaf!==null;if(n===i)throw new Error(`${Q2}: element "${t}" must have exactly one of "container" or "leaf"`);(r.container==="vstack"||r.container==="hstack")&&r.spacingProp}}async function Em(e){if(!e&&tc)return tc;let t=e??X2(Se(),"renderers/swiftui/elements.yaml"),r=await Zr(t);return Z2(r),e||(tc=r),r}var Q2,tc,Pm=K(()=>{"use strict";Vt();bo();Q2="renderers/swiftui/elements.yaml",tc=null});function ex(e,t){let r=e.entries.find(n=>n.path===t);if(!r)throw new Error(`Token reference "${t}" not found while merging visual props`);return r.value}function Im(e,t){let r={};for(let[n,i]of Object.entries(e))r[n]=ex(t,i.ref);return r}function tx(e){let t={};for(let[r,n]of Object.entries(e))n!=null&&(typeof n=="string"||typeof n=="number"||typeof n=="boolean")&&(t[r]=n);return t}function Ht(e){let t=e.theme.defaults[e.elementName]??{},r=e.variantLiteral?e.theme.variants[e.elementName]?.[e.variantLiteral]??{}:{};return{...Im(t,e.tokens),...Im(r,e.tokens),...tx(e.instanceLiterals)}}var rc=K(()=>{"use strict"});function Pr(e){let t=new Set,r=n=>{if(Array.isArray(n)){for(let i of n)r(i);return}if(!(typeof n!="object"||n===null)){if(n.kind==="binding"){n.scope&&t.add(n.scope);return}if(n.kind==="concat")for(let i of n.parts)typeof i!="string"&&r(i)}};for(let n of e)r(n);return t}function ls(e,t){t&&e.emittedScopes?.add(t)}function nc(e,t,r){let n=e.emittedScopes,i=new Set;e.emittedScopes=i;let o=t.filter(a=>e.optionalProps?.delete(a)),s=r();for(let a of o)e.optionalProps.add(a);return e.emittedScopes=n,{code:s,emitted:i}}function Ir(e,t,r,n){let i=[...t].filter(c=>e.optionalProps?.has(c));if(i.length===0)return r();let o=nc(e,[],r),s=i.filter(c=>o.emitted.has(c));if(s.length===0||!o.code)return o.code;let a=nc(e,s,r).code;return n(s,a)}function Wt(e,t,r){return nc(e,t,r).code}function cs(e,t){return e.split(`
127
127
  `).map(r=>r&&`${t}${r}`).join(`
128
- `)}var Yl=K(()=>{"use strict"});function rt(e){if(typeof e=="number")return e;if(typeof e=="boolean")return null;let t=e.match(/^([\d.]+)px$/);return t?Number(t[1]):null}function Xl(e){let t=e.match(/^#([0-9a-fA-F]{6})$/);if(!t)return null;let r=t[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 N2(e){let t=rt(e);if(t!==null)return{kind:"uniform",value:t};if(typeof e!="string")return null;let r=e.trim().split(/\s+/);if(r.length===2){let n=rt(r[0]),i=rt(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function M2(e){if(e===""||e===null||e===void 0)return null;let t=rt(e);return t!==null?`.font(.system(size: ${t}))`:typeof e=="string"&&!e.endsWith("px")?`.font(.system(size: ${JSON.stringify(e)}))`:null}function O2(e){return typeof e!="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)"}[e]??null}function Ql(e){let t=[],r=e.foreground;if(typeof r=="string"){let j=Xl(r);t.push(j?`.foregroundStyle(${j})`:`.foregroundStyle(Color(${JSON.stringify(r)}))`)}let n=e.size??e.fontSize;if(n!==void 0&&n!==""){let j=M2(n);j&&t.push(j)}let i=O2(e.fontWeight??e.weight??"");i&&t.push(i);let o=e.padding??"",s=N2(o);s&&(s.kind==="uniform"?t.push(`.padding(${s.value})`):(t.push(`.padding(.vertical, ${s.vertical})`),t.push(`.padding(.horizontal, ${s.horizontal})`)));let a=e.width,c=e.height,l=e.minHeight,p=e.maxWidth,f=e.maxHeight,h=e.margin,m=h==="0 auto",y=a==="100%"||a==="fill"||p==="fill",g=c==="100%"||c==="fill"||l==="100vh",v=p==="fill"?null:p!==void 0?rt(p):null;y&&g?v!==null?t.push(`.frame(maxWidth: ${v}, maxHeight: .infinity, alignment: .topLeading)`):t.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):y?v!==null?t.push(`.frame(maxWidth: ${v}, alignment: .leading)`):t.push(".frame(maxWidth: .infinity, alignment: .leading)"):g&&t.push(".frame(maxHeight: .infinity, alignment: .top)"),!g&&l==="100vh"&&t.push(".frame(maxHeight: .infinity, alignment: .top)");let $=e.background;if(typeof $=="string"&&$!=="transparent"){let j=Xl($);t.push(j?`.background(${j})`:`.background(Color(${JSON.stringify($)}))`)}let I=rt(e.radius??"");I!==null&&t.push(`.clipShape(RoundedRectangle(cornerRadius: ${I}))`),(e.shadow===!0||e.shadow==="true")&&t.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let _=e.border,R=e.borderColor;if(_||R){let j=rt(_??"1px")??1,U=typeof R=="string"?Xl(R)??"Color.gray":"Color.gray";t.push(`.overlay(RoundedRectangle(cornerRadius: ${I??0}).stroke(${U}, lineWidth: ${j}))`)}if(!y){if(typeof a=="number")t.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let j=rt(a);j!==null&&t.push(`.frame(width: ${j})`)}if(p!==void 0&&p!=="fill"){let j=rt(p);j!==null&&t.push(`.frame(maxWidth: ${j})`)}}if(!g){if(typeof c=="number")t.push(`.frame(height: ${c})`);else if(c!==void 0&&c!=="wrap"){let j=rt(c);j!==null&&t.push(`.frame(height: ${j})`)}if(l!==void 0&&l!=="100vh")if(typeof l=="number")t.push(`.frame(minHeight: ${l})`);else{let j=rt(l);j!==null&&t.push(`.frame(minHeight: ${j})`)}if(f!==void 0&&f!=="fill"){let j=rt(f);j!==null&&t.push(`.frame(maxHeight: ${j})`)}}if(m)t.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof h=="number")t.push(`.padding(${h})`);else if(h!==void 0){let j=rt(h);j!==null&&t.push(`.padding(${j})`)}let N=e.opacity;return typeof N=="number"&&N<1&&t.push(`.opacity(${N})`),t}function Be(e,t,r){if(t.length===0)return e;let n=" ".repeat(r);return`${e}
128
+ `)}var ic=K(()=>{"use strict"});function tt(e){if(typeof e=="number")return e;if(typeof e=="boolean")return null;let t=e.match(/^([\d.]+)px$/);return t?Number(t[1]):null}function oc(e){let t=e.match(/^#([0-9a-fA-F]{6})$/);if(!t)return null;let r=t[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 rx(e){let t=tt(e);if(t!==null)return{kind:"uniform",value:t};if(typeof e!="string")return null;let r=e.trim().split(/\s+/);if(r.length===2){let n=tt(r[0]),i=tt(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function nx(e){if(e===""||e===null||e===void 0)return null;let t=tt(e);return t!==null?`.font(.system(size: ${t}))`:typeof e=="string"&&!e.endsWith("px")?`.font(.system(size: ${JSON.stringify(e)}))`:null}function ix(e){return typeof e!="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)"}[e]??null}function sc(e){let t=[],r=e.foreground;if(typeof r=="string"){let j=oc(r);t.push(j?`.foregroundStyle(${j})`:`.foregroundStyle(Color(${JSON.stringify(r)}))`)}let n=e.size??e.fontSize;if(n!==void 0&&n!==""){let j=nx(n);j&&t.push(j)}let i=ix(e.fontWeight??e.weight??"");i&&t.push(i);let o=e.padding??"",s=rx(o);s&&(s.kind==="uniform"?t.push(`.padding(${s.value})`):(t.push(`.padding(.vertical, ${s.vertical})`),t.push(`.padding(.horizontal, ${s.horizontal})`)));let a=e.width,c=e.height,l=e.minHeight,p=e.maxWidth,f=e.maxHeight,d=e.margin,m=d==="0 auto",y=a==="100%"||a==="fill"||p==="fill",g=c==="100%"||c==="fill"||l==="100vh",v=p==="fill"?null:p!==void 0?tt(p):null;y&&g?v!==null?t.push(`.frame(maxWidth: ${v}, maxHeight: .infinity, alignment: .topLeading)`):t.push(".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"):y?v!==null?t.push(`.frame(maxWidth: ${v}, alignment: .leading)`):t.push(".frame(maxWidth: .infinity, alignment: .leading)"):g&&t.push(".frame(maxHeight: .infinity, alignment: .top)"),!g&&l==="100vh"&&t.push(".frame(maxHeight: .infinity, alignment: .top)");let b=e.background;if(typeof b=="string"&&b!=="transparent"){let j=oc(b);t.push(j?`.background(${j})`:`.background(Color(${JSON.stringify(b)}))`)}let I=tt(e.radius??"");I!==null&&t.push(`.clipShape(RoundedRectangle(cornerRadius: ${I}))`),(e.shadow===!0||e.shadow==="true")&&t.push(".shadow(color: Color.black.opacity(0.08), radius: 4, x: 0, y: 2)");let _=e.border,R=e.borderColor;if(_||R){let j=tt(_??"1px")??1,U=typeof R=="string"?oc(R)??"Color.gray":"Color.gray";t.push(`.overlay(RoundedRectangle(cornerRadius: ${I??0}).stroke(${U}, lineWidth: ${j}))`)}if(!y){if(typeof a=="number")t.push(`.frame(width: ${a})`);else if(a!==void 0&&a!=="wrap"){let j=tt(a);j!==null&&t.push(`.frame(width: ${j})`)}if(p!==void 0&&p!=="fill"){let j=tt(p);j!==null&&t.push(`.frame(maxWidth: ${j})`)}}if(!g){if(typeof c=="number")t.push(`.frame(height: ${c})`);else if(c!==void 0&&c!=="wrap"){let j=tt(c);j!==null&&t.push(`.frame(height: ${j})`)}if(l!==void 0&&l!=="100vh")if(typeof l=="number")t.push(`.frame(minHeight: ${l})`);else{let j=tt(l);j!==null&&t.push(`.frame(minHeight: ${j})`)}if(f!==void 0&&f!=="fill"){let j=tt(f);j!==null&&t.push(`.frame(maxHeight: ${j})`)}}if(m)t.push(".frame(maxWidth: .infinity, alignment: .center)");else if(typeof d=="number")t.push(`.padding(${d})`);else if(d!==void 0){let j=tt(d);j!==null&&t.push(`.padding(${j})`)}let N=e.opacity;return typeof N=="number"&&N<1&&t.push(`.opacity(${N})`),t}function Be(e,t,r){if(t.length===0)return e;let n=" ".repeat(r);return`${e}
129
129
  ${t.map(i=>`${n}${i}`).join(`
130
- `)}`}var mm=K(()=>{"use strict"});function F(e){return" ".repeat(e)}function ls(e,t,r){let i=e.entries.find(p=>p.path===t)?.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,c=parseInt(s.slice(2,4),16)/255,l=parseInt(s.slice(4,6),16)/255;return`Color(red: ${a}, green: ${c}, blue: ${l})`}function vm(e,t,r,n,i){let o=`${F(t+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`;return e.map(a=>{if(a.kind==="map"){let l=a,p=l.item,f=Bt(n,[p],()=>r(l.body,t+2,p));f+=`
131
- ${o}`;let h=Et(l.source,n,i);return`${F(t+2)}ForEach(${h}, id: \\.id) { ${p} in
130
+ `)}`}var Rm=K(()=>{"use strict"});function F(e){return" ".repeat(e)}function us(e,t,r){let i=e.entries.find(p=>p.path===t)?.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,c=parseInt(s.slice(2,4),16)/255,l=parseInt(s.slice(4,6),16)/255;return`Color(red: ${a}, green: ${c}, blue: ${l})`}function Nm(e,t,r,n,i){let o=`${F(t+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`;return e.map(a=>{if(a.kind==="map"){let l=a,p=l.item,f=Wt(n,[p],()=>r(l.body,t+2,p));f+=`
131
+ ${o}`;let d=Pt(l.source,n,i);return`${F(t+2)}ForEach(${d}, id: \\.id) { ${p} in
132
132
  ${f}
133
133
  ${F(t+2)}}`}let c="";return a.kind==="text"?c=`${F(t+2)}Text(${JSON.stringify(a.value)})`:a.kind==="binding"?c=mi(a,t+2,n,i):c=r(a,t+2,i),c?`${c}
134
134
  ${o}`:""}).filter(Boolean).join(`
135
- `)}function de(e,t){let r=e[t];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 wm(e){let t={};for(let[r,n]of Object.entries(e)){if(r==="variant"||r==="id"||!Gr.has(r))continue;let i=de(e,r);i!==void 0&&(t[r]=i)}return t}function bm(e){let t=e.variant;return t==null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"?!1:typeof t=="object"&&"kind"in t?t.kind==="literal"?!1:t.kind==="binding"||t.kind==="concat":!1}function V2(e,t,r){let n=e.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?Et(n,t,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\\(${Et(s,t,r)})`).join("")}"`:null}function L2(e,t,r,n){let i=r.map.elements[e],o=de(t,"variant"),s=wm(t);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],bm(t)){let l=V2(t,r,n),p=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(e)}, variant: ${l}))`,f=qt({elementName:e,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s}),h=Ql(f),m=h.filter(g=>g.startsWith(".padding")),y=h.filter(g=>!g.startsWith(".padding"));return[...m,p,...y]}let c=qt({elementName:e,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return Ql(c)}function j2(e){return[]}function D2(e,t,r,n){let i=e.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Et(i,t,r);return`${F(n+1)}ForEach(${o}, id: \\.value) { option in
135
+ `)}function de(e,t){let r=e[t];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 Om(e){let t={};for(let[r,n]of Object.entries(e)){if(r==="variant"||r==="id"||!Qr.has(r))continue;let i=de(e,r);i!==void 0&&(t[r]=i)}return t}function Mm(e){let t=e.variant;return t==null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"?!1:typeof t=="object"&&"kind"in t?t.kind==="literal"?!1:t.kind==="binding"||t.kind==="concat":!1}function ox(e,t,r){let n=e.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?Pt(n,t,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\\(${Pt(s,t,r)})`).join("")}"`:null}function sx(e,t,r,n){let i=r.map.elements[e],o=de(t,"variant"),s=Om(t);if(i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp],Mm(t)){let l=ox(t,r,n),p=`.applyVcStyle(VcTheme.resolve(${JSON.stringify(e)}, variant: ${l}))`,f=Ht({elementName:e,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s}),d=sc(f),m=d.filter(g=>g.startsWith(".padding")),y=d.filter(g=>!g.startsWith(".padding"));return[...m,p,...y]}let c=Ht({elementName:e,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return sc(c)}function ax(e){return[]}function lx(e,t,r,n){let i=e.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=Pt(i,t,r);return`${F(n+1)}ForEach(${o}, id: \\.value) { option in
136
136
  ${F(n+2)}Button(option.label) {}
137
137
  ${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(`
138
- `):`${F(n+1)}Button("--") {}`}function F2(e,t,r){let n=e.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${Et(n,t,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 Et(e,t,r){ss(t,e.scope);let n=e.scope??r??t.propsRoot??"vm";return e.path?`${n}.${e.path}`:n}function $m(e){return(t,r)=>{let n=t.map(i=>`let ${i}`).join(", ");return`${F(e)}Group {
138
+ `):`${F(n+1)}Button("--") {}`}function cx(e,t,r){let n=e.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${Pt(n,t,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 Pt(e,t,r){ls(t,e.scope);let n=e.scope??r??t.propsRoot??"vm";return e.path?`${n}.${e.path}`:n}function Vm(e){return(t,r)=>{let n=t.map(i=>`let ${i}`).join(", ");return`${F(e)}Group {
139
139
  ${F(e+1)}if ${n} {
140
- ${as(r,F(2))}
140
+ ${cs(r,F(2))}
141
141
  ${F(e+1)}}
142
- ${F(e)}}`}}function mi(e,t,r,n){return Sr(r,_r([e]),()=>`${F(t)}Text(${Et(e,r,n)})`,$m(t))}function gm(e,t,r){let n=r??t.propsRoot??"vm",i=e.value,o=e.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=Et(i,t,r):typeof i=="string"?a=JSON.stringify(i):a='""',{valueExpr:a,hasOnChange:s}}function ym(e,t,r){for(let n of e){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return Et(n,t,r)}return null}function xm(e,t,r,n,i){return e.map(s=>s.kind==="map"?hi(s,t,r,n):s.kind==="text"?`${F(t)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?mi(s,t,n,i):r(s,t,i)).filter(Boolean).join(`
143
- `)}function hi(e,t,r,n){let i=e.item,o=Bt(n,[i],()=>r(e.body,t+2,i)),s=Et(e.source,n,i);return`${F(t)}ForEach(${s}, id: \\.id) { ${i} in
142
+ ${F(e)}}`}}function mi(e,t,r,n){return Ir(r,Pr([e]),()=>`${F(t)}Text(${Pt(e,r,n)})`,Vm(t))}function Tm(e,t,r){let n=r??t.propsRoot??"vm",i=e.value,o=e.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=Pt(i,t,r):typeof i=="string"?a=JSON.stringify(i):a='""',{valueExpr:a,hasOnChange:s}}function Am(e,t,r){for(let n of e){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return Pt(n,t,r)}return null}function Lm(e,t,r,n,i){return e.map(s=>s.kind==="map"?hi(s,t,r,n):s.kind==="text"?`${F(t)}Text(${JSON.stringify(s.value)})`:s.kind==="binding"?mi(s,t,n,i):r(s,t,i)).filter(Boolean).join(`
143
+ `)}function hi(e,t,r,n){let i=e.item,o=Wt(n,[i],()=>r(e.body,t+2,i)),s=Pt(e.source,n,i);return`${F(t)}ForEach(${s}, id: \\.id) { ${i} in
144
144
  ${o}
145
- ${F(t)}}`}function q2(e,t,r,n,i,o){let s=F(r);if(t.leaf==="text"){let a=ym(e.children,i,n);if(!a)return`${s}Text("")`;let c=`${s}Text(${a})`,l=o.map(p=>`${s}${p}`);return[c,...l].join(`
146
- `)}if(t.leaf==="button"){let a=de(e.props,"label"),l=ym(e.children,i,n)??(typeof a=="string"?JSON.stringify(a):'"Button"'),p=`${s}Button(${l}) {}`,f=o.map(h=>`${s}${h}`);return[p,...f].join(`
147
- `)}if(t.leaf==="textfield"){let a=de(e.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=ls(i.tokens,"ui.text-muted","#6b7280"),{valueExpr:p,hasOnChange:f}=gm(e.props,i,n),h=f?`.init(get: { ${p} }, set: { _ in })`:`.constant(${p})`,m=`${s}TextField("", text: ${h}, prompt: Text(${c}).foregroundStyle(${l}))`,g=[...o,...j2(e.name)].map(v=>`${s}${v}`);return[m,...g].join(`
148
- `)}if(t.leaf==="texteditor"){let a=de(e.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=ls(i.tokens,"ui.text-muted","#6b7280"),f=o.find(_=>_.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",{valueExpr:h,hasOnChange:m}=gm(e.props,i,n),y=m?`.init(get: { ${h} }, set: { _ in })`:`.constant(${h})`,g=o.filter(_=>_.startsWith(".foregroundStyle(")||_.startsWith(".font(")||_.startsWith(".fontWeight(")),v=o.filter(_=>!_.startsWith(".foregroundStyle(")&&!_.startsWith(".font(")&&!_.startsWith(".fontWeight(")&&!_.startsWith(".frame(minHeight:")),$=g.map(_=>`${s} ${_}`),I=v.map(_=>`${s}${_}`);return[`${s}ZStack(alignment: .topLeading) {`,`${s} if true {`,`${s} Text(${c})`,`${s} .font(.system(size: 14))`,`${s} .foregroundStyle(${l})`,`${s} .padding(.top, 8)`,`${s} .padding(.horizontal, 4)`,`${s} .allowsHitTesting(false)`,`${s} }`,`${s} TextEditor(text: ${y})`,`${s} .scrollContentBackground(.hidden)`,...$,`${s}}`,`${s}.frame(minHeight: ${f})`,...I].join(`
149
- `)}if(t.leaf==="picker"){let a=ls(i.tokens,"ui.text","#111827"),c=ls(i.tokens,"ui.text-muted","#6b7280"),l=D2(e.props,i,n,r),p=F2(e.props,i,n),f=o.filter(g=>!g.startsWith(".frame")),h=de(e.props,"width"),m=typeof h=="number"?`${s}.frame(width: ${h})`:`${s}.frame(maxWidth: .infinity)`;return[`${s}Menu {`,l,`${s}} label: {`,`${s} HStack(spacing: 0) {`,`${s} Text(${p})`,`${s} .foregroundStyle(${a})`,`${s} .lineLimit(1)`,`${s} Spacer(minLength: 0)`,`${s} Image(systemName: "chevron.down")`,`${s} .font(.system(size: 12, weight: .semibold))`,`${s} .foregroundStyle(${c})`,`${s} }`,`${s} .padding(.vertical, 9)`,`${s} .padding(.leading, 12)`,`${s} .padding(.trailing, 12)`,...f.map(g=>`${s} ${g}`),`${s}}`,m,`${s}.frame(minHeight: 42)`,`${s}.frame(maxWidth: .infinity)`].join(`
145
+ ${F(t)}}`}function ux(e,t,r,n,i,o){let s=F(r);if(t.leaf==="text"){let a=Am(e.children,i,n);if(!a)return`${s}Text("")`;let c=`${s}Text(${a})`,l=o.map(p=>`${s}${p}`);return[c,...l].join(`
146
+ `)}if(t.leaf==="button"){let a=de(e.props,"label"),l=Am(e.children,i,n)??(typeof a=="string"?JSON.stringify(a):'"Button"'),p=`${s}Button(${l}) {}`,f=o.map(d=>`${s}${d}`);return[p,...f].join(`
147
+ `)}if(t.leaf==="textfield"){let a=de(e.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=us(i.tokens,"ui.text-muted","#6b7280"),{valueExpr:p,hasOnChange:f}=Tm(e.props,i,n),d=f?`.init(get: { ${p} }, set: { _ in })`:`.constant(${p})`,m=`${s}TextField("", text: ${d}, prompt: Text(${c}).foregroundStyle(${l}))`,g=[...o,...ax(e.name)].map(v=>`${s}${v}`);return[m,...g].join(`
148
+ `)}if(t.leaf==="texteditor"){let a=de(e.props,"placeholder"),c=typeof a=="string"?JSON.stringify(a):'""',l=us(i.tokens,"ui.text-muted","#6b7280"),f=o.find(_=>_.startsWith(".frame(minHeight:"))?.match(/minHeight: (\d+)/)?.[1]??"72",{valueExpr:d,hasOnChange:m}=Tm(e.props,i,n),y=m?`.init(get: { ${d} }, set: { _ in })`:`.constant(${d})`,g=o.filter(_=>_.startsWith(".foregroundStyle(")||_.startsWith(".font(")||_.startsWith(".fontWeight(")),v=o.filter(_=>!_.startsWith(".foregroundStyle(")&&!_.startsWith(".font(")&&!_.startsWith(".fontWeight(")&&!_.startsWith(".frame(minHeight:")),b=g.map(_=>`${s} ${_}`),I=v.map(_=>`${s}${_}`);return[`${s}ZStack(alignment: .topLeading) {`,`${s} if true {`,`${s} Text(${c})`,`${s} .font(.system(size: 14))`,`${s} .foregroundStyle(${l})`,`${s} .padding(.top, 8)`,`${s} .padding(.horizontal, 4)`,`${s} .allowsHitTesting(false)`,`${s} }`,`${s} TextEditor(text: ${y})`,`${s} .scrollContentBackground(.hidden)`,...b,`${s}}`,`${s}.frame(minHeight: ${f})`,...I].join(`
149
+ `)}if(t.leaf==="picker"){let a=us(i.tokens,"ui.text","#111827"),c=us(i.tokens,"ui.text-muted","#6b7280"),l=lx(e.props,i,n,r),p=cx(e.props,i,n),f=o.filter(g=>!g.startsWith(".frame")),d=de(e.props,"width"),m=typeof d=="number"?`${s}.frame(width: ${d})`:`${s}.frame(maxWidth: .infinity)`;return[`${s}Menu {`,l,`${s}} label: {`,`${s} HStack(spacing: 0) {`,`${s} Text(${p})`,`${s} .foregroundStyle(${a})`,`${s} .lineLimit(1)`,`${s} Spacer(minLength: 0)`,`${s} Image(systemName: "chevron.down")`,`${s} .font(.system(size: 12, weight: .semibold))`,`${s} .foregroundStyle(${c})`,`${s} }`,`${s} .padding(.vertical, 9)`,`${s} .padding(.leading, 12)`,`${s} .padding(.trailing, 12)`,...f.map(g=>`${s} ${g}`),`${s}}`,m,`${s}.frame(minHeight: 42)`,`${s}.frame(maxWidth: .infinity)`].join(`
150
150
  `)}if(t.leaf==="spacer")return`${s}Spacer()`;if(t.leaf==="divider")return`${s}Divider()`;if(t.leaf==="image"){let a=de(e.props,"src")??de(e.props,"name"),l=`${s}Image(systemName: ${JSON.stringify(typeof a=="string"?a:"photo")})`,p=o.map(f=>`${s}${f}`);return[l,...p].join(`
151
151
  `)}if(t.leaf==="progressview"){let a=`${s}ProgressView()`,c=o.map(l=>`${s}${l}`);return[a,...c].join(`
152
152
  `)}if(t.leaf==="toggle"){let a=de(e.props,"label")??"",c=`${s}Toggle(${JSON.stringify(a)}, isOn: .constant(false))`,l=o.map(p=>`${s}${p}`);return[c,...l].join(`
153
- `)}return`${s}Text("/* unsupported leaf: ${e.name} */")`}function B2(e,t,r,n,i,o,s){let a=xm(e.children,r+2,i,o,n);if(t.container==="vstack"){let l=t.spacingProp?de(e.props,t.spacingProp):void 0,p=typeof l=="number"?l:0,f=`${F(r+1)}VStack(alignment: .leading, spacing: ${p}) {
153
+ `)}return`${s}Text("/* unsupported leaf: ${e.name} */")`}function fx(e,t,r,n,i,o,s){let a=Lm(e.children,r+2,i,o,n);if(t.container==="vstack"){let l=t.spacingProp?de(e.props,t.spacingProp):void 0,p=typeof l=="number"?l:0,f=`${F(r+1)}VStack(alignment: .leading, spacing: ${p}) {
154
154
  ${a}
155
- ${F(r+1)}}`;return Be(f,s,r+1)}if(t.container==="hstack"){let l=t.spacingProp?de(e.props,t.spacingProp):void 0,p=typeof l=="number"?l:0,f=de(e.props,"align"),h=de(e.props,"height"),m=f==="center"||typeof h=="number"?".center":".top",y=de(e.props,"justify"),g=de(e.props,"flex"),v=de(e.props,"wrap"),I=e.name==="TableHeader"||e.name==="TableRow"||y!==void 0||typeof g=="number",_=y==="end"?".trailing":y==="center"?".center":".leading",R=[];I&&R.push(`.frame(maxWidth: .infinity, alignment: ${_})`),typeof h=="number"&&R.push(`.frame(height: ${h})`);let N=a;if(y==="between"){let U=e.children.map(oe=>oe.kind==="map"?hi(oe,r+2,i,o):oe.kind==="text"?`${F(r+2)}Text(${JSON.stringify(oe.value)})`:oe.kind==="binding"?mi(oe,r+2,o,n):i(oe,r+2,n)).filter(Boolean);if(U.length>=2){let oe=U[0],me=U.slice(1);N=[oe,`${F(r+2)}Spacer()`,...me].join(`
155
+ ${F(r+1)}}`;return Be(f,s,r+1)}if(t.container==="hstack"){let l=t.spacingProp?de(e.props,t.spacingProp):void 0,p=typeof l=="number"?l:0,f=de(e.props,"align"),d=de(e.props,"height"),m=f==="center"||typeof d=="number"?".center":".top",y=de(e.props,"justify"),g=de(e.props,"flex"),v=de(e.props,"wrap"),I=e.name==="TableHeader"||e.name==="TableRow"||y!==void 0||typeof g=="number",_=y==="end"?".trailing":y==="center"?".center":".leading",R=[];I&&R.push(`.frame(maxWidth: .infinity, alignment: ${_})`),typeof d=="number"&&R.push(`.frame(height: ${d})`);let N=a;if(y==="between"){let U=e.children.map(oe=>oe.kind==="map"?hi(oe,r+2,i,o):oe.kind==="text"?`${F(r+2)}Text(${JSON.stringify(oe.value)})`:oe.kind==="binding"?mi(oe,r+2,o,n):i(oe,r+2,n)).filter(Boolean);if(U.length>=2){let oe=U[0],me=U.slice(1);N=[oe,`${F(r+2)}Spacer()`,...me].join(`
156
156
  `)}}else if(v===!0){N=e.children.map(oe=>{if(oe.kind==="map")return hi(oe,r+2,i,o);if(oe.kind==="text")return`${F(r+2)}Text(${JSON.stringify(oe.value)})`;if(oe.kind==="binding")return mi(oe,r+2,o,n);let me=i(oe,r+2,n);return me||""}).filter(Boolean).join(`
157
157
  `);let U=`${F(r+1)}FlowLayout(spacing: ${p}) {
158
158
  ${N}
@@ -162,29 +162,29 @@ ${F(r+1)}}`;return Be(j,[...s,...R],r+1)}if(t.container==="group"){let l=a?`${F(
162
162
  ${a}
163
163
  ${F(r+1)}}`:`${F(r+1)}VStack { EmptyView() }`;return Be(l,s,r+1)}if(t.container==="navstack")return Be(a,s,r+1);if(t.container==="scrollview"){let l=`${F(r+1)}ScrollView {
164
164
  ${a}
165
- ${F(r+1)}}`;return Be(l,s,r+1)}if(t.container==="field"){let l=de(e.props,"label"),p=de(e.props,"gap"),f=typeof p=="number"?p:4,h=typeof l=="string"?`
165
+ ${F(r+1)}}`;return Be(l,s,r+1)}if(t.container==="field"){let l=de(e.props,"label"),p=de(e.props,"gap"),f=typeof p=="number"?p:4,d=typeof l=="string"?`
166
166
  ${F(r+2)}Text(${JSON.stringify(l)})
167
- ${F(r+2)} .applyVcStyle(VcTheme.resolve("Text", variant: "field-label"))`:"",m=`${F(r+1)}VStack(alignment: .leading, spacing: ${f}) {${h}
167
+ ${F(r+2)} .applyVcStyle(VcTheme.resolve("Text", variant: "field-label"))`:"",m=`${F(r+1)}VStack(alignment: .leading, spacing: ${f}) {${d}
168
168
  ${a}
169
- ${F(r+1)}}`;return Be(m,s,r+1)}if(t.container==="tablestack"){let l=de(e.props,"separator"),p=de(e.props,"separatorColor"),f=typeof l=="number"&&l>0,h=e.children.map(g=>g.kind==="map"?hi(g,r+2,i,o):i(g,r+2,n)).filter(Boolean),m;if(f){let v=Zl(e.name,e.props,o).separatorColor??p,$="Color.gray.opacity(0.2)";if(typeof v=="string"){let R=v.match(/^#([0-9a-fA-F]{6})$/);if(R){let N=parseInt(R[1].slice(0,2),16)/255,j=parseInt(R[1].slice(2,4),16)/255,U=parseInt(R[1].slice(4,6),16)/255;$=`Color(red: ${N}, green: ${j}, blue: ${U})`}}let I=l,_=I===1?`${F(r+2)}Divider().overlay(${$})`:`${F(r+2)}Rectangle().fill(${$}).frame(height: ${I})`;m=h.flatMap((R,N)=>N<h.length-1?[R,_]:[R])}else m=h;let y=`${F(r+1)}VStack(alignment: .leading, spacing: 0) {
169
+ ${F(r+1)}}`;return Be(m,s,r+1)}if(t.container==="tablestack"){let l=de(e.props,"separator"),p=de(e.props,"separatorColor"),f=typeof l=="number"&&l>0,d=e.children.map(g=>g.kind==="map"?hi(g,r+2,i,o):i(g,r+2,n)).filter(Boolean),m;if(f){let v=ac(e.name,e.props,o).separatorColor??p,b="Color.gray.opacity(0.2)";if(typeof v=="string"){let R=v.match(/^#([0-9a-fA-F]{6})$/);if(R){let N=parseInt(R[1].slice(0,2),16)/255,j=parseInt(R[1].slice(2,4),16)/255,U=parseInt(R[1].slice(4,6),16)/255;b=`Color(red: ${N}, green: ${j}, blue: ${U})`}}let I=l,_=I===1?`${F(r+2)}Divider().overlay(${b})`:`${F(r+2)}Rectangle().fill(${b}).frame(height: ${I})`;m=d.flatMap((R,N)=>N<d.length-1?[R,_]:[R])}else m=d;let y=`${F(r+1)}VStack(alignment: .leading, spacing: 0) {
170
170
  ${m.join(`
171
171
  `)}
172
- ${F(r+1)}}`;return Be(y,s,r+1)}if(t.container==="cellgroup"){let l=de(e.props,"width"),p=de(e.props,"flex"),f=de(e.props,"align"),h=f==="end"?".trailing":f==="center"?".center":".leading",m=typeof p=="number",y=[...s,".lineLimit(1)"];typeof l=="number"?y.push(`.frame(width: ${l}, alignment: ${h})`):m&&y.push(`.frame(maxWidth: .infinity, alignment: ${h})`);let g=a?`${F(r+1)}Group {
172
+ ${F(r+1)}}`;return Be(y,s,r+1)}if(t.container==="cellgroup"){let l=de(e.props,"width"),p=de(e.props,"flex"),f=de(e.props,"align"),d=f==="end"?".trailing":f==="center"?".center":".leading",m=typeof p=="number",y=[...s,".lineLimit(1)"];typeof l=="number"?y.push(`.frame(width: ${l}, alignment: ${d})`):m&&y.push(`.frame(maxWidth: .infinity, alignment: ${d})`);let g=a?`${F(r+1)}Group {
173
173
  ${a}
174
- ${F(r+2)}.frame(maxWidth: .infinity, alignment: ${h})
174
+ ${F(r+2)}.frame(maxWidth: .infinity, alignment: ${d})
175
175
  ${F(r+1)}}`:`${F(r+1)}Group { EmptyView() }`;return Be(g,y,r+1)}let c=a?`${F(r+1)}Group {
176
176
  ${a}
177
- ${F(r+1)}}`:`${F(r+1)}Group { EmptyView() }`;return Be(c,s,r+1)}function Zl(e,t,r){let n=de(t,"variant"),i=wm(t);return qt({elementName:e,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function H2(e){if(!e||typeof e!="string")return null;let t=e.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(t)return{kind:"equal-columns",count:Number(t[1])};let r=e.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(r)return{kind:"adaptive",minWidth:Number(r[1])};let n=e.trim().split(/\s+/);return n.length>=2?{kind:"fixed-columns",widths:n}:null}function W2(e,t,r,n,i,o){let s=L2(e.name,e.props,o,n);if(t.leaf)return q2(e,t,r,n,o,s);if(t.container==="group"&&!bm(e.props)){let a=Zl(e.name,e.props,o),c=a.display,l=a.gridTemplateColumns,p=a.flexDirection;if(c==="grid"&&l){let f=H2(l);if(f?.kind==="adaptive")return U2(e,r,n,i,o,s,f.minWidth);if(f?.kind==="equal-columns")return z2(e,r,n,i,o,s,f.count);if(f?.kind==="fixed-columns")return J2(e,r,n,i,o,s,f.widths)}if(c==="flex"&&p==="row"){let f=xm(e.children,r+2,i,o,n),h=de(e.props,"gap"),m=typeof h=="number"?h:typeof a.gap=="number"?a.gap:0,y=`${F(r+1)}HStack(alignment: .top, spacing: ${m}) {
177
+ ${F(r+1)}}`:`${F(r+1)}Group { EmptyView() }`;return Be(c,s,r+1)}function ac(e,t,r){let n=de(t,"variant"),i=Om(t);return Ht({elementName:e,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function px(e){if(!e||typeof e!="string")return null;let t=e.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(t)return{kind:"equal-columns",count:Number(t[1])};let r=e.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(r)return{kind:"adaptive",minWidth:Number(r[1])};let n=e.trim().split(/\s+/);return n.length>=2?{kind:"fixed-columns",widths:n}:null}function dx(e,t,r,n,i,o){let s=sx(e.name,e.props,o,n);if(t.leaf)return ux(e,t,r,n,o,s);if(t.container==="group"&&!Mm(e.props)){let a=ac(e.name,e.props,o),c=a.display,l=a.gridTemplateColumns,p=a.flexDirection;if(c==="grid"&&l){let f=px(l);if(f?.kind==="adaptive")return hx(e,r,n,i,o,s,f.minWidth);if(f?.kind==="equal-columns")return mx(e,r,n,i,o,s,f.count);if(f?.kind==="fixed-columns")return yx(e,r,n,i,o,s,f.widths)}if(c==="flex"&&p==="row"){let f=Lm(e.children,r+2,i,o,n),d=de(e.props,"gap"),m=typeof d=="number"?d:typeof a.gap=="number"?a.gap:0,y=`${F(r+1)}HStack(alignment: .top, spacing: ${m}) {
178
178
  ${f}
179
- ${F(r+1)}}`;return Be(y,s,r+1)}}if(t.container)return B2(e,t,r,n,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${e.name}`)}function U2(e,t,r,n,i,o,s){let a=de(e.props,"gap"),c=typeof a=="number"?a:16,l=vm(e.children,t,n,i,r),p=`${F(t+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${c}) {
179
+ ${F(r+1)}}`;return Be(y,s,r+1)}}if(t.container)return fx(e,t,r,n,i,o,s);throw new Error(`Unsupported SwiftUI element config for ${e.name}`)}function hx(e,t,r,n,i,o,s){let a=de(e.props,"gap"),c=typeof a=="number"?a:16,l=Nm(e.children,t,n,i,r),p=`${F(t+1)}LazyVGrid(columns: [GridItem(.adaptive(minimum: ${s}))], spacing: ${c}) {
180
180
  ${l}
181
181
  ${F(t+1)}}
182
- ${F(t+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return Be(p,o,t+1)}function z2(e,t,r,n,i,o,s){let a=de(e.props,"gap"),c=typeof a=="number"?a:16,l=`Array(repeating: GridItem(.flexible(), spacing: ${c}), count: ${s})`,p=vm(e.children,t,n,i,r),f=`${F(t+1)}LazyVGrid(columns: ${l}, spacing: ${c}) {
182
+ ${F(t+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return Be(p,o,t+1)}function mx(e,t,r,n,i,o,s){let a=de(e.props,"gap"),c=typeof a=="number"?a:16,l=`Array(repeating: GridItem(.flexible(), spacing: ${c}), count: ${s})`,p=Nm(e.children,t,n,i,r),f=`${F(t+1)}LazyVGrid(columns: ${l}, spacing: ${c}) {
183
183
  ${p}
184
184
  ${F(t+1)}}
185
- ${F(t+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return Be(f,o,t+1)}function G2(e,t){if(e.kind!=="component")return null;let n=Zl(e.name,e.props,t).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 J2(e,t,r,n,i,o,s){let a=e.children,c=[];for(let f=0;f<a.length;f++){let h=a[f],m="";if(h.kind==="map"?m=hi(h,t+2,n,i):h.kind==="text"?m=`${F(t+2)}Text(${JSON.stringify(h.value)})`:h.kind==="binding"?m=mi(h,t+2,i,r):m=n(h,t+2,r),!m)continue;let y=s[f],g=y?.match(/^(\d+)px$/);if(g){m+=`
185
+ ${F(t+1)}.frame(maxWidth: .infinity, alignment: .topLeading)`;return Be(f,o,t+1)}function gx(e,t){if(e.kind!=="component")return null;let n=ac(e.name,e.props,t).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 yx(e,t,r,n,i,o,s){let a=e.children,c=[];for(let f=0;f<a.length;f++){let d=a[f],m="";if(d.kind==="map"?m=hi(d,t+2,n,i):d.kind==="text"?m=`${F(t+2)}Text(${JSON.stringify(d.value)})`:d.kind==="binding"?m=mi(d,t+2,i,r):m=n(d,t+2,r),!m)continue;let y=s[f],g=y?.match(/^(\d+)px$/);if(g){m+=`
186
186
  ${F(t+2)}.frame(width: ${Number(g[1])}, alignment: .topLeading)`,m+=`
187
- ${F(t+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let v=G2(h,i);v&&(m+=`
187
+ ${F(t+2)}.frame(maxHeight: .infinity, alignment: .topLeading)`;let v=gx(d,i);v&&(m+=`
188
188
  ${F(t+2)}.background(${v})`)}else y==="1fr"&&(m+=`
189
189
  ${F(t+3)}.frame(maxWidth: .infinity, alignment: .topLeading)`,m=`${F(t+2)}ScrollView {
190
190
  ${m}
@@ -192,10 +192,10 @@ ${F(t+2)}}`,m+=`
192
192
  ${F(t+2)}.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)`);c.push(m)}let l=c.join(`
193
193
  `),p=`${F(t+1)}HStack(spacing: 0) {
194
194
  ${l}
195
- ${F(t+1)}}`;return Be(p,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],t+1)}function K2(e,t,r,n){let o=`(${Bt(n,[],()=>Object.entries(e.props).map(([s,a])=>typeof a=="object"&&a!==null&&"kind"in a&&a.kind==="binding"?`${s}: ${Et(a,n,r)}`:`${s}: ${JSON.stringify(a)}`).join(", "))})`;return`${F(t)}${e.name}${o}`}function Y2(e){let t=(r,n,i)=>{if(r.kind==="viewRef")return K2(r,n,i,e);if(r.kind!=="component")return"";let o=e.map.elements[r.name];if(!o)throw new Error(`Element "${r.name}" is not in SwiftUI element map (prototype subset)`);let s=o.leaf?r.children.filter(c=>c.kind==="binding"):[],a=_r([...Object.values(r.props),...s]);return Sr(e,a,()=>W2(r,o,n,i,t,e),$m(n))};return t}function _m(e,t,r=2){let n=Y2(t);if(e.kind!=="component")throw new Error("SwiftUI lowering root must be a component node");return n(e,r)}var Sm=K(()=>{"use strict";mt();Jl();Yl();mm()});var Cm={};pr(Cm,{renderSwiftComponent:()=>cs});function km(e){let t=e.match(/^(\w+)\[\]$/);return t?`[${km(t[1])}]`:e==="string"?"String":e==="number"?"Double":e==="boolean"?"Bool":e}function X2(e){return e.propsType?e.propDecls?`${e.propDecls.map(r=>{let n=km(r.type);return r.optional?` var ${r.name}: ${n}? = nil`:` let ${r.name}: ${n}`}).join(`
195
+ ${F(t+1)}}`;return Be(p,[...o,".frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)"],t+1)}function vx(e,t,r,n){let o=`(${Wt(n,[],()=>Object.entries(e.props).map(([s,a])=>typeof a=="object"&&a!==null&&"kind"in a&&a.kind==="binding"?`${s}: ${Pt(a,n,r)}`:`${s}: ${JSON.stringify(a)}`).join(", "))})`;return`${F(t)}${e.name}${o}`}function wx(e){let t=(r,n,i)=>{if(r.kind==="viewRef")return vx(r,n,i,e);if(r.kind!=="component")return"";let o=e.map.elements[r.name];if(!o)throw new Error(`Element "${r.name}" is not in SwiftUI element map (prototype subset)`);let s=o.leaf?r.children.filter(c=>c.kind==="binding"):[],a=Pr([...Object.values(r.props),...s]);return Ir(e,a,()=>dx(r,o,n,i,t,e),Vm(n))};return t}function jm(e,t,r=2){let n=wx(t);if(e.kind!=="component")throw new Error("SwiftUI lowering root must be a component node");return n(e,r)}var Dm=K(()=>{"use strict";mt();rc();ic();Rm()});var qm={};gr(qm,{renderSwiftComponent:()=>fs});function Fm(e){let t=e.match(/^(\w+)\[\]$/);return t?`[${Fm(t[1])}]`:e==="string"?"String":e==="number"?"Double":e==="boolean"?"Bool":e}function bx(e){return e.propsType?e.propDecls?`${e.propDecls.map(r=>{let n=Fm(r.type);return r.optional?` var ${r.name}: ${n}? = nil`:` let ${r.name}: ${n}`}).join(`
196
196
  `)}
197
197
  `:` let props: ${e.propsType}
198
- `:""}async function cs(e,t){let r=await pm(t.elementMapPath),n=t.allowlistExtra??[],i=e.isPartial?e.exportName:e.exportName.replace(/View$/,"")||e.exportName,o={map:r,theme:t.theme,tokens:t.tokens,allowlistExtra:n,propsRoot:e.propDecls?.[0]?.name,optionalProps:new Set(e.propDecls?.filter(p=>p.optional).map(p=>p.name))},s=_m(e.root,o,4),a=X2(e),c=!e.isPartial&&e.viewModel?` let vm: ${e.viewModel}
198
+ `:""}async function fs(e,t){let r=await Em(t.elementMapPath),n=t.allowlistExtra??[],i=e.isPartial?e.exportName:e.exportName.replace(/View$/,"")||e.exportName,o={map:r,theme:t.theme,tokens:t.tokens,allowlistExtra:n,propsRoot:e.propDecls?.[0]?.name,optionalProps:new Set(e.propDecls?.filter(p=>p.optional).map(p=>p.name))},s=jm(e.root,o,4),a=bx(e),c=!e.isPartial&&e.viewModel?` let vm: ${e.viewModel}
199
199
  `:"";return`/**
200
200
  * Auto-generated SwiftUI view from ${e.source}
201
201
  * DO NOT EDIT \u2014 prototype SwiftUI lowering (#21)
@@ -207,10 +207,10 @@ ${c}${a} var body: some View {
207
207
  ${s}
208
208
  }
209
209
  }
210
- `}var ec=K(()=>{"use strict";dm();Sm()});import{readFile as Q2,stat as Z2}from"node:fs/promises";import{resolve as Em}from"node:path";function Pm(){return"views/preview"}function ex(e){return`${e.charAt(0).toLowerCase()}${e.slice(1)}Mock`}function yi(e,t,r){let n=Ie(e),i=t.preview?.mocksDir??Pm();return Em(n,i,`${r}.mock.yaml`)}function tx(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function rx(e,t){if(!tx(e))throw new us(`${t} must be a YAML object (ViewModel fields at the root)`);return e}async function vi(e){let t;try{t=await Q2(e,"utf-8")}catch{throw new us(`Preview mock not found: ${e}`)}let r=it.load(t);return rx(r,e)}function nx(e,t){let r=ex(e);return`/** Auto-built from views/preview/${e}.mock.yaml \u2014 preview / example only */
210
+ `}var lc=K(()=>{"use strict";Pm();Dm()});import{readFile as $x,stat as xx}from"node:fs/promises";import{resolve as Bm}from"node:path";function Hm(){return"views/preview"}function _x(e){return`${e.charAt(0).toLowerCase()}${e.slice(1)}Mock`}function yi(e,t,r){let n=Ie(e),i=t.preview?.mocksDir??Hm();return Bm(n,i,`${r}.mock.yaml`)}function Sx(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function kx(e,t){if(!Sx(e))throw new ps(`${t} must be a YAML object (ViewModel fields at the root)`);return e}async function vi(e){let t;try{t=await $x(e,"utf-8")}catch{throw new ps(`Preview mock not found: ${e}`)}let r=nt.load(t);return kx(r,e)}function Cx(e,t){let r=_x(e);return`/** Auto-built from views/preview/${e}.mock.yaml \u2014 preview / example only */
211
211
  export const ${r} = ${JSON.stringify(t,null,2)};
212
- `}async function Im(e,t,r){let n=yi(e,t,r),i=await vi(n);return nx(r,i)}function Rm(e){if(!e.startsWith(gi))return null;let t=e.slice(gi.length);return t.length>0?t:null}async function Tm(e,t){let r=Ie(e),n=t.preview?.mocksDir??Pm();return Em(r,n)}async function fs(e){try{return await Z2(e),!0}catch{return!1}}var gi,us,ps=K(()=>{"use strict";Ur();Mt();gi="view-contracts:preview/mock/",us=class extends Error{constructor(t){super(t),this.name="PreviewMockError"}}});var Nm={};pr(Nm,{renderSwiftUIRuntime:()=>sx});import{mkdir as ix,writeFile as kr}from"node:fs/promises";import{resolve as Ht}from"node:path";function Am(){return Ht(Se(),"renderers/swiftui/templates")}async function sx(e,t,r,n,i){let o=Ht(t.generated.reactDir,"../swiftui");if(await ix(o,{recursive:!0}),n?await kr(Ht(o,"VcTheme.swift"),um(n.theme,n.tokens),"utf-8"):await kr(Ht(o,"VcTheme.swift"),await vt(Am(),"VcTheme.swift.hbs",{}),"utf-8"),await kr(Ht(o,"FlowLayout.swift"),ox,"utf-8"),i&&n){for(let s of i.partials)try{let a=await cs(s,{theme:n.theme,tokens:n.tokens}),c=Ht(o,`${s.exportName}.generated.swift`);await kr(c,a,"utf-8"),console.log(` swiftui/${s.exportName} \u2192 ${c}`)}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 c=await cs(a,{theme:n.theme,tokens:n.tokens}),l=Ht(o,`${s.screenName}.generated.swift`);await kr(l,c,"utf-8"),console.log(` swiftui/${s.screenName} \u2192 ${l}`)}catch(c){console.warn(` swiftui/${s.screenName}: skipped (${c.message})`)}}}for(let s of r.views)if(s.targets.includes("swiftui")){let a=Ht(o,`${s.screenName}.swift`);await kr(a,await vt(Am(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of r.views){let a=yi(e,t,s.screenName);if(await fs(a))try{let c=await vi(a),l=JSON.stringify(c,null,2)+`
213
- `,p=Ht(o,`${s.screenName}.SampleData.json`);await kr(p,l,"utf-8"),console.log(` swiftui/${s.screenName}.SampleData.json \u2192 ${p}`)}catch(c){console.warn(` swiftui/${s.screenName}.SampleData.json: skipped (${c.message})`)}}}var ox,Mm=K(()=>{"use strict";Ot();ci();fm();ec();ps();ox=`import SwiftUI
212
+ `}async function Wm(e,t,r){let n=yi(e,t,r),i=await vi(n);return Cx(r,i)}function Um(e){if(!e.startsWith(gi))return null;let t=e.slice(gi.length);return t.length>0?t:null}async function zm(e,t){let r=Ie(e),n=t.preview?.mocksDir??Hm();return Bm(r,n)}async function ds(e){try{return await xx(e),!0}catch{return!1}}var gi,ps,hs=K(()=>{"use strict";Yr();Mt();gi="view-contracts:preview/mock/",ps=class extends Error{constructor(t){super(t),this.name="PreviewMockError"}}});var Jm={};gr(Jm,{renderSwiftUIRuntime:()=>Ix});import{mkdir as Ex,writeFile as Rr}from"node:fs/promises";import{resolve as Ut}from"node:path";function Gm(){return Ut(Se(),"renderers/swiftui/templates")}async function Ix(e,t,r,n,i){let o=Ut(t.generated.reactDir,"../swiftui");if(await Ex(o,{recursive:!0}),n?await Rr(Ut(o,"VcTheme.swift"),km(n.theme,n.tokens),"utf-8"):await Rr(Ut(o,"VcTheme.swift"),await wt(Gm(),"VcTheme.swift.hbs",{}),"utf-8"),await Rr(Ut(o,"FlowLayout.swift"),Px,"utf-8"),i&&n){for(let s of i.partials)try{let a=await fs(s,{theme:n.theme,tokens:n.tokens}),c=Ut(o,`${s.exportName}.generated.swift`);await Rr(c,a,"utf-8"),console.log(` swiftui/${s.exportName} \u2192 ${c}`)}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 c=await fs(a,{theme:n.theme,tokens:n.tokens}),l=Ut(o,`${s.screenName}.generated.swift`);await Rr(l,c,"utf-8"),console.log(` swiftui/${s.screenName} \u2192 ${l}`)}catch(c){console.warn(` swiftui/${s.screenName}: skipped (${c.message})`)}}}for(let s of r.views)if(s.targets.includes("swiftui")){let a=Ut(o,`${s.screenName}.swift`);await Rr(a,await wt(Gm(),"Screen.swift.hbs",{screenName:s.screenName}),"utf-8")}for(let s of r.views){let a=yi(e,t,s.screenName);if(await ds(a))try{let c=await vi(a),l=JSON.stringify(c,null,2)+`
213
+ `,p=Ut(o,`${s.screenName}.SampleData.json`);await Rr(p,l,"utf-8"),console.log(` swiftui/${s.screenName}.SampleData.json \u2192 ${p}`)}catch(c){console.warn(` swiftui/${s.screenName}.SampleData.json: skipped (${c.message})`)}}}var Px,Km=K(()=>{"use strict";Vt();ci();Cm();lc();hs();Px=`import SwiftUI
214
214
 
215
215
  /// CSS flex-wrap equivalent: wraps children to next line when horizontal space runs out.
216
216
  struct FlowLayout: Layout {
@@ -253,35 +253,35 @@ struct FlowLayout: Layout {
253
253
  }
254
254
  }
255
255
  }
256
- `});import{resolve as ax}from"node:path";function lx(e){vo(Object.keys(e.elements),ot,Om);for(let[t,r]of Object.entries(e.elements)){let n=r.container!==void 0&&r.container!==null,i=r.leaf!==void 0&&r.leaf!==null;if(n===i)throw new Error(`${Om}: element "${t}" must have exactly one of "container" or "leaf"`)}}async function Vm(e){if(!e&&tc)return tc;let t=e??ax(Se(),"renderers/compose/elements.yaml"),r=await Jr(t);return lx(r),e||(tc=r),r}var Om,tc,Lm=K(()=>{"use strict";mt();Ot();wo();Om="renderers/compose/elements.yaml",tc=null});function He(e){if(typeof e=="number")return e;if(typeof e=="boolean")return null;let t=e.match(/^([\d.]+)px$/);return t?Number(t[1]):null}function cx(e){let t=e.match(/^#([0-9a-fA-F]{6})$/);if(!t)return null;let r=t[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(e){let t=e.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!t)return null;let r=Number(t[1])/255,n=Number(t[2])/255,i=Number(t[3])/255,o=Number(t[4]);return`Color(${r}f, ${n}f, ${i}f, ${o}f)`}function un(e){return e==="transparent"?"Color.Transparent":cx(e)??ux(e)??null}function fx(e){let t=He(e);if(t!==null)return{kind:"uniform",value:t};if(typeof e!="string")return null;let r=e.trim().split(/\s+/);if(r.length===2){let n=He(r[0]),i=He(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function px(e){return typeof e!="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"}[e]??null}function dx(e){return typeof e!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[e]??null}function hx(e){return typeof e!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[e]??null}function jm(e,t){return e==="between"||e==="spaceBetween"?"Arrangement.SpaceBetween":e==="around"||e==="spaceAround"?"Arrangement.SpaceAround":e==="spaceEvenly"?"Arrangement.SpaceEvenly":e==="end"?"Arrangement.End":e==="center"?"Arrangement.Center":`Arrangement.spacedBy(${t})`}function Dm(e){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"}[e]??"Alignment.TopStart"}function rc(e,t={}){let r=[],n=t.isLeaf??!1,i=e.foreground;if(typeof i=="string"){let Y=un(i);Y&&r.push(n?`@textStyle(color = ${Y})`:`@contentColor(${Y})`)}let o=e.size??e.fontSize;if(o!==void 0&&o!==""){let Y=typeof o=="number"?o:He(o);Y!==null&&r.push(n?`@textStyle(fontSize = ${Y}.sp)`:`@inheritTextStyle(fontSize = ${Y}.sp)`)}let s=px(e.fontWeight??e.weight??"");s&&r.push(n?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=e.width,c=e.height,l=e.minWidth,p=e.minHeight,f=e.maxWidth,h=e.maxHeight,m=e.margin,y=m==="0 auto",g=a==="100%"||a==="fill"||f==="fill",v=c==="100%"||c==="fill"||p==="100vh",$=f==="fill"?null:f!==void 0?He(f):null,I=!1;g&&v?($!==null?r.push(`.widthIn(max = ${$}.dp).fillMaxHeight()`):r.push(".fillMaxWidth().fillMaxHeight()"),I=!0):g?$!==null?r.push(`.widthIn(max = ${$}.dp)`):r.push(".fillMaxWidth()"):v&&(r.push(".fillMaxHeight()"),I=!0),!I&&p==="100vh"&&r.push(".fillMaxHeight()");let _=He(e.radius??"");(e.shadow===!0||e.shadow==="true")&&r.push(`.shadow(elevation = 4.dp, shape = RoundedCornerShape(${_??0}.dp), clip = false, ambientColor = Color.Black.copy(alpha = 0.08f), spotColor = Color.Black.copy(alpha = 0.08f))`);let R=e.background;if(typeof R=="string"&&R!=="transparent"){let Y=un(R);Y&&Y!=="Color.Transparent"&&r.push(`.background(${Y}, RoundedCornerShape(${_??0}.dp))`)}e.clip!=="none"&&_!==null&&r.push(`.clip(RoundedCornerShape(${_}.dp))`);let j=e.border,U=e.borderColor;if(j||U){let Y=He(j??"1px")??1,D=typeof U=="string"?un(U)??"Color.Gray":"Color.Gray";r.push(`.border(${Y}.dp, ${D}, RoundedCornerShape(${_??0}.dp))`)}if(!g){if(typeof a=="number")r.push(`.width(${a}.dp)`);else if(a!==void 0&&a!=="wrap"){let Y=He(a);Y!==null&&r.push(`.width(${Y}.dp)`)}if(typeof l=="number")r.push(`.widthIn(min = ${l}.dp)`);else if(l!==void 0){let Y=He(l);Y!==null&&r.push(`.widthIn(min = ${Y}.dp)`)}if(f!==void 0&&f!=="fill"){let Y=He(f);Y!==null&&r.push(`.widthIn(max = ${Y}.dp)`)}}if(!v){if(typeof c=="number")r.push(`.height(${c}.dp)`);else if(c!==void 0&&c!=="wrap"){let Y=He(c);Y!==null&&r.push(`.height(${Y}.dp)`)}if(p!==void 0&&p!=="100vh")if(typeof p=="number")r.push(`.heightIn(min = ${p}.dp)`);else{let Y=He(p);Y!==null&&r.push(`.heightIn(min = ${Y}.dp)`)}if(h!==void 0&&h!=="fill"){let Y=He(h);Y!==null&&r.push(`.heightIn(max = ${Y}.dp)`)}}typeof e.aspectRatio=="number"&&r.push(`.aspectRatio(${e.aspectRatio}f)`),typeof e.weight=="number"&&r.push(`.weight(${e.weight}f)`);let oe=e.padding??"",me=fx(oe);if(me&&(me.kind==="uniform"?r.push(`.padding(${me.value}.dp)`):r.push(`.padding(horizontal = ${me.horizontal}.dp, vertical = ${me.vertical}.dp)`)),y)r.push("@wrapContentCenter()");else if(typeof m=="number")r.push(`.padding(${m}.dp)`);else if(m!==void 0&&typeof m=="string"){let Y=He(m);Y!==null&&r.push(`.padding(${Y}.dp)`)}let be=e.opacity;typeof be=="number"&&be<1&&r.push(`.alpha(${be}f)`);let Pe=dx(e.textAlign??"");Pe&&r.push(`@textAlign(${Pe})`);let we=e.lineLimit;if(we!==void 0&&we!=="none"&&we!==""){let Y=typeof we=="number"?we:He(we);Y!==null&&r.push(`@textMaxLines(${Y})`)}let ze=e.textOverflow;ze==="ellipsis"?r.push("@textOverflow(TextOverflow.Ellipsis)"):ze==="clip"&&r.push("@textOverflow(TextOverflow.Clip)");let fe=hx(e.selfAlign??"");return fe&&r.push(`.align(${fe})`),r}function ds(e){return e.filter(t=>!t.includes(".width(")&&!t.includes(".widthIn(")&&!t.includes(".height(")&&!t.includes(".heightIn(")&&!t.includes(".weight(")&&t!==".fillMaxWidth()"&&t!==".fillMaxHeight()"&&!t.startsWith(".fillMaxWidth().")&&!t.endsWith(".fillMaxWidth()")&&!t.includes(".fillMaxHeight()"))}function Fm(e){return e.filter(t=>!t.includes(".background("))}function hs(e){return e.filter(t=>!t.includes(".padding("))}function qm(e){return e.filter(t=>!t.includes(".clip(RoundedCornerShape("))}function fn(e){return e.filter(t=>t.includes(".padding("))}function Bm(e){let r=e.find(n=>n.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return r?Number(r[1]):null}function Hm(e){if(e.length===0)return null;let t=e[0],r=t.match(/\.padding\(horizontal = (\d+)\.dp, vertical = (\d+)\.dp\)/);if(r)return`PaddingValues(horizontal = ${r[1]}.dp, vertical = ${r[2]}.dp)`;let n=t.match(/\.padding\((\d+)\.dp\)/);return n?`PaddingValues(${n[1]}.dp)`:null}function Wm(e){return e.some(t=>t.startsWith("@runtimeStyle(")||t.includes(".background("))}function Um(e){return e.some(t=>t.includes(".fillMaxHeight()"))}function nt(e){let t=new Set,r=[];for(let n of e)t.has(n)||(t.add(n),r.push(n));return r}function Te(e,t){return t.length===0?e:t.filter(r=>!mx.some(n=>r.startsWith(n)||r===n)).map(r=>r.startsWith("@runtimeStyle(")?`.applyVcStyle(${r.replace(/^@runtimeStyle\(/,"").replace(/\)$/,"")})`:r).reduce((r,n)=>`${r}${n}`,e)}function wi(e){let t=e.filter(n=>n.startsWith("@textStyle(")).map(n=>n.replace(/^@textStyle\(/,"").replace(/\)$/,"")),r=e.find(n=>n.startsWith("@textAlign("));if(r){let n=r.replace(/^@textAlign\(/,"").replace(/\)$/,"");t.push(`textAlign = ${n}`)}return t}function zm(e){let t=e.find(i=>i.startsWith("@textMaxLines("));if(!t)return null;let r=t.replace(/^@textMaxLines\(/,"").replace(/\)$/,""),n=Number(r);return Number.isFinite(n)?n:null}function Gm(e){let t=e.find(r=>r.startsWith("@textOverflow("));return t?t.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function Jm(e){return e.includes("@textFillMaxWidth()")}function Km(e){let t=e.find(r=>r.startsWith("@contentColor("));return t?t.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function Ym(e){return e.filter(t=>t.startsWith("@inheritTextStyle(")).map(t=>t.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function ms(e){return e.includes("@wrapContentCenter()")}function Xm(e){return e.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var mx,Qm=K(()=>{"use strict";mx=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function V(e){return" ".repeat(e)}function ce(e,t){let r=e[t];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 ng(e){let t={};for(let[r,n]of Object.entries(e)){if(r==="variant"||r==="id"||!Gr.has(r))continue;let i=ce(e,r);i!==void 0&&(t[r]=i)}return t}function ig(e,t,r){let n=e.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?lt(n,t,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\${${lt(s,t,r)}}`).join("")}"`:null}function bi(e){let t=e.variant;return!t||typeof t!="object"||!("kind"in t)?!1:t.kind==="binding"||t.kind==="concat"}function gx(e,t,r,n){let i=r.map.elements[e],o=ce(t,"variant"),s=ng(t);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if(bi(t)){let l=ig(t,r,n),p=qt({elementName:e,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s});return[...rc(p,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(e)}, variant = ${l}))`]}let c=qt({elementName:e,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return e==="Box"&&o==="card"&&delete c.height,rc(c,{isLeaf:a})}function dn(e,t,r){let n=ce(t,"variant"),i=ng(t);return qt({elementName:e,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function lc(e){if(!e||typeof e!="string")return null;let t=e.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(t)return{kind:"equal-columns",count:Number(t[1])};let r=e.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(r)return{kind:"adaptive",minWidth:Number(r[1])};let n=e.trim().split(/\s+/);return n.length>=2?{kind:"fixed-columns",widths:n}:null}function yx(e,t){if(e.kind!=="component")return null;let n=dn(e.name,e.props,t).background;return typeof n!="string"||n==="transparent"?null:un(n)??`Color(${JSON.stringify(n)})`}function Zm(e,t,r,n){let o=dn(e,t,r)[n];return typeof o!="string"?n==="background"?"Color.Transparent":"Color.Unspecified":n==="background"&&(o==="transparent"||!o)?"Color.Transparent":un(o)??"Color.Unspecified"}function vx(e){return e==="end"?"TextAlign.End":e==="center"?"TextAlign.Center":"TextAlign.Start"}function wx(e){return e==="end"?"Alignment.CenterEnd":e==="center"?"Alignment.Center":"Alignment.CenterStart"}function og(e,t,r,n,i,o,s){let a=ce(e.props,"gap"),c=typeof a=="number"?`${a}.dp`:"16.dp",l=Te("Modifier.fillMaxWidth()",nt(o));if(e.children.length===1&&e.children[0].kind==="map"){let f=e.children[0],h=f.item,m=lt(f.source,i,r),y=Bt(i,[h],()=>n(f.body,t+3,h));return[`${V(t)}Row(modifier = ${l}, horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,`${V(t+1)}for (${h} in ${m}) {`,`${V(t+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,y,`${V(t+2)}}`,`${V(t+1)}}`,`${V(t)}}`].join(`
257
- `)}let p=e.children.map(f=>{let h="";return f.kind==="map"?h=rr(f,t+2,n,i,"none"):f.kind==="text"?h=`${V(t+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?h=pn(f,t+2,i,r):h=n(f,t+2,r),h?`${V(t+1)}Box(modifier = Modifier.weight(1f).fillMaxSize(), propagateMinConstraints = true, contentAlignment = Alignment.TopStart) {
258
- ${h}
256
+ `});import{resolve as Rx}from"node:path";function Tx(e){wo(Object.keys(e.elements),it,Ym);for(let[t,r]of Object.entries(e.elements)){let n=r.container!==void 0&&r.container!==null,i=r.leaf!==void 0&&r.leaf!==null;if(n===i)throw new Error(`${Ym}: element "${t}" must have exactly one of "container" or "leaf"`)}}async function Xm(e){if(!e&&cc)return cc;let t=e??Rx(Se(),"renderers/compose/elements.yaml"),r=await Zr(t);return Tx(r),e||(cc=r),r}var Ym,cc,Qm=K(()=>{"use strict";mt();Vt();bo();Ym="renderers/compose/elements.yaml",cc=null});function He(e){if(typeof e=="number")return e;if(typeof e=="boolean")return null;let t=e.match(/^([\d.]+)px$/);return t?Number(t[1]):null}function Ax(e){let t=e.match(/^#([0-9a-fA-F]{6})$/);if(!t)return null;let r=t[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 Nx(e){let t=e.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!t)return null;let r=Number(t[1])/255,n=Number(t[2])/255,i=Number(t[3])/255,o=Number(t[4]);return`Color(${r}f, ${n}f, ${i}f, ${o}f)`}function gn(e){return e==="transparent"?"Color.Transparent":Ax(e)??Nx(e)??null}function Ox(e){let t=He(e);if(t!==null)return{kind:"uniform",value:t};if(typeof e!="string")return null;let r=e.trim().split(/\s+/);if(r.length===2){let n=He(r[0]),i=He(r[1]);if(n!==null&&i!==null)return{kind:"shorthand",vertical:n,horizontal:i}}return null}function Mx(e){return typeof e!="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"}[e]??null}function Vx(e){return typeof e!="string"?null:{start:"TextAlign.Start",center:"TextAlign.Center",end:"TextAlign.End"}[e]??null}function Lx(e){return typeof e!="string"?null:{start:"Alignment.Start",center:"Alignment.CenterVertically",end:"Alignment.Bottom",stretch:"Alignment.CenterVertically"}[e]??null}function Zm(e,t){return e==="between"||e==="spaceBetween"?"Arrangement.SpaceBetween":e==="around"||e==="spaceAround"?"Arrangement.SpaceAround":e==="spaceEvenly"?"Arrangement.SpaceEvenly":e==="end"?"Arrangement.End":e==="center"?"Arrangement.Center":`Arrangement.spacedBy(${t})`}function eg(e){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"}[e]??"Alignment.TopStart"}function uc(e,t={}){let r=[],n=t.isLeaf??!1,i=e.foreground;if(typeof i=="string"){let Y=gn(i);Y&&r.push(n?`@textStyle(color = ${Y})`:`@contentColor(${Y})`)}let o=e.size??e.fontSize;if(o!==void 0&&o!==""){let Y=typeof o=="number"?o:He(o);Y!==null&&r.push(n?`@textStyle(fontSize = ${Y}.sp)`:`@inheritTextStyle(fontSize = ${Y}.sp)`)}let s=Mx(e.fontWeight??e.weight??"");s&&r.push(n?`@textStyle(fontWeight = ${s})`:`@inheritTextStyle(fontWeight = ${s})`);let a=e.width,c=e.height,l=e.minWidth,p=e.minHeight,f=e.maxWidth,d=e.maxHeight,m=e.margin,y=m==="0 auto",g=a==="100%"||a==="fill"||f==="fill",v=c==="100%"||c==="fill"||p==="100vh",b=f==="fill"?null:f!==void 0?He(f):null,I=!1;g&&v?(b!==null?r.push(`.widthIn(max = ${b}.dp).fillMaxHeight()`):r.push(".fillMaxWidth().fillMaxHeight()"),I=!0):g?b!==null?r.push(`.widthIn(max = ${b}.dp)`):r.push(".fillMaxWidth()"):v&&(r.push(".fillMaxHeight()"),I=!0),!I&&p==="100vh"&&r.push(".fillMaxHeight()");let _=He(e.radius??"");(e.shadow===!0||e.shadow==="true")&&r.push(`.shadow(elevation = 4.dp, shape = RoundedCornerShape(${_??0}.dp), clip = false, ambientColor = Color.Black.copy(alpha = 0.08f), spotColor = Color.Black.copy(alpha = 0.08f))`);let R=e.background;if(typeof R=="string"&&R!=="transparent"){let Y=gn(R);Y&&Y!=="Color.Transparent"&&r.push(`.background(${Y}, RoundedCornerShape(${_??0}.dp))`)}e.clip!=="none"&&_!==null&&r.push(`.clip(RoundedCornerShape(${_}.dp))`);let j=e.border,U=e.borderColor;if(j||U){let Y=He(j??"1px")??1,D=typeof U=="string"?gn(U)??"Color.Gray":"Color.Gray";r.push(`.border(${Y}.dp, ${D}, RoundedCornerShape(${_??0}.dp))`)}if(!g){if(typeof a=="number")r.push(`.width(${a}.dp)`);else if(a!==void 0&&a!=="wrap"){let Y=He(a);Y!==null&&r.push(`.width(${Y}.dp)`)}if(typeof l=="number")r.push(`.widthIn(min = ${l}.dp)`);else if(l!==void 0){let Y=He(l);Y!==null&&r.push(`.widthIn(min = ${Y}.dp)`)}if(f!==void 0&&f!=="fill"){let Y=He(f);Y!==null&&r.push(`.widthIn(max = ${Y}.dp)`)}}if(!v){if(typeof c=="number")r.push(`.height(${c}.dp)`);else if(c!==void 0&&c!=="wrap"){let Y=He(c);Y!==null&&r.push(`.height(${Y}.dp)`)}if(p!==void 0&&p!=="100vh")if(typeof p=="number")r.push(`.heightIn(min = ${p}.dp)`);else{let Y=He(p);Y!==null&&r.push(`.heightIn(min = ${Y}.dp)`)}if(d!==void 0&&d!=="fill"){let Y=He(d);Y!==null&&r.push(`.heightIn(max = ${Y}.dp)`)}}typeof e.aspectRatio=="number"&&r.push(`.aspectRatio(${e.aspectRatio}f)`),typeof e.weight=="number"&&r.push(`.weight(${e.weight}f)`);let oe=e.padding??"",me=Ox(oe);if(me&&(me.kind==="uniform"?r.push(`.padding(${me.value}.dp)`):r.push(`.padding(horizontal = ${me.horizontal}.dp, vertical = ${me.vertical}.dp)`)),y)r.push("@wrapContentCenter()");else if(typeof m=="number")r.push(`.padding(${m}.dp)`);else if(m!==void 0&&typeof m=="string"){let Y=He(m);Y!==null&&r.push(`.padding(${Y}.dp)`)}let be=e.opacity;typeof be=="number"&&be<1&&r.push(`.alpha(${be}f)`);let Pe=Vx(e.textAlign??"");Pe&&r.push(`@textAlign(${Pe})`);let we=e.lineLimit;if(we!==void 0&&we!=="none"&&we!==""){let Y=typeof we=="number"?we:He(we);Y!==null&&r.push(`@textMaxLines(${Y})`)}let ze=e.textOverflow;ze==="ellipsis"?r.push("@textOverflow(TextOverflow.Ellipsis)"):ze==="clip"&&r.push("@textOverflow(TextOverflow.Clip)");let fe=Lx(e.selfAlign??"");return fe&&r.push(`.align(${fe})`),r}function ms(e){return e.filter(t=>!t.includes(".width(")&&!t.includes(".widthIn(")&&!t.includes(".height(")&&!t.includes(".heightIn(")&&!t.includes(".weight(")&&t!==".fillMaxWidth()"&&t!==".fillMaxHeight()"&&!t.startsWith(".fillMaxWidth().")&&!t.endsWith(".fillMaxWidth()")&&!t.includes(".fillMaxHeight()"))}function tg(e){return e.filter(t=>!t.includes(".background("))}function gs(e){return e.filter(t=>!t.includes(".padding("))}function rg(e){return e.filter(t=>!t.includes(".clip(RoundedCornerShape("))}function yn(e){return e.filter(t=>t.includes(".padding("))}function ng(e){let r=e.find(n=>n.includes(".clip(RoundedCornerShape("))?.match(/RoundedCornerShape\((\d+)\.dp\)/);return r?Number(r[1]):null}function ig(e){if(e.length===0)return null;let t=e[0],r=t.match(/\.padding\(horizontal = (\d+)\.dp, vertical = (\d+)\.dp\)/);if(r)return`PaddingValues(horizontal = ${r[1]}.dp, vertical = ${r[2]}.dp)`;let n=t.match(/\.padding\((\d+)\.dp\)/);return n?`PaddingValues(${n[1]}.dp)`:null}function og(e){return e.some(t=>t.startsWith("@runtimeStyle(")||t.includes(".background("))}function sg(e){return e.some(t=>t.includes(".fillMaxHeight()"))}function rt(e){let t=new Set,r=[];for(let n of e)t.has(n)||(t.add(n),r.push(n));return r}function Te(e,t){return t.length===0?e:t.filter(r=>!jx.some(n=>r.startsWith(n)||r===n)).map(r=>r.startsWith("@runtimeStyle(")?`.applyVcStyle(${r.replace(/^@runtimeStyle\(/,"").replace(/\)$/,"")})`:r).reduce((r,n)=>`${r}${n}`,e)}function wi(e){let t=e.filter(n=>n.startsWith("@textStyle(")).map(n=>n.replace(/^@textStyle\(/,"").replace(/\)$/,"")),r=e.find(n=>n.startsWith("@textAlign("));if(r){let n=r.replace(/^@textAlign\(/,"").replace(/\)$/,"");t.push(`textAlign = ${n}`)}return t}function ag(e){let t=e.find(i=>i.startsWith("@textMaxLines("));if(!t)return null;let r=t.replace(/^@textMaxLines\(/,"").replace(/\)$/,""),n=Number(r);return Number.isFinite(n)?n:null}function lg(e){let t=e.find(r=>r.startsWith("@textOverflow("));return t?t.replace(/^@textOverflow\(/,"").replace(/\)$/,""):null}function cg(e){return e.includes("@textFillMaxWidth()")}function ug(e){let t=e.find(r=>r.startsWith("@contentColor("));return t?t.replace(/^@contentColor\(/,"").replace(/\)$/,""):null}function fg(e){return e.filter(t=>t.startsWith("@inheritTextStyle(")).map(t=>t.replace(/^@inheritTextStyle\(/,"").replace(/\)$/,""))}function ys(e){return e.includes("@wrapContentCenter()")}function pg(e){return e.match(/\.applyVcStyle\((VcTheme\.resolve\([^)]+\))\)/)?.[1]??null}var jx,dg=K(()=>{"use strict";jx=["@textStyle(","@contentColor(","@inheritTextStyle(","@wrapContentCenter()","@textMaxLines(","@textOverflow(","@textAlign(","@textFillMaxWidth()"]});function V(e){return" ".repeat(e)}function ce(e,t){let r=e[t];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 vg(e){let t={};for(let[r,n]of Object.entries(e)){if(r==="variant"||r==="id"||!Qr.has(r))continue;let i=ce(e,r);i!==void 0&&(t[r]=i)}return t}function wg(e,t,r){let n=e.variant;return!n||typeof n!="object"||!("kind"in n)?null:n.kind==="binding"?lt(n,t,r):n.kind==="concat"?`"${n.parts.map(s=>typeof s=="string"?s:`\${${lt(s,t,r)}}`).join("")}"`:null}function bi(e){let t=e.variant;return!t||typeof t!="object"||!("kind"in t)?!1:t.kind==="binding"||t.kind==="concat"}function Dx(e,t,r,n){let i=r.map.elements[e],o=ce(t,"variant"),s=vg(t);i?.spacingProp&&i.spacingProp in s&&delete s[i.spacingProp];let a=!!i?.leaf;if(bi(t)){let l=wg(t,r,n),p=Ht({elementName:e,theme:{defaults:{},variants:{}},tokens:r.tokens,instanceLiterals:s});return[...uc(p,{isLeaf:a}),`@runtimeStyle(VcTheme.resolve(${JSON.stringify(e)}, variant = ${l}))`]}let c=Ht({elementName:e,theme:r.theme,tokens:r.tokens,variantLiteral:typeof o=="string"?o:void 0,instanceLiterals:s});return e==="Box"&&o==="card"&&delete c.height,uc(c,{isLeaf:a})}function wn(e,t,r){let n=ce(t,"variant"),i=vg(t);return Ht({elementName:e,theme:r.theme,tokens:r.tokens,variantLiteral:typeof n=="string"?n:void 0,instanceLiterals:i})}function gc(e){if(!e||typeof e!="string")return null;let t=e.match(/repeat\((\d+),\s*minmax\(0,\s*1fr\)\)/);if(t)return{kind:"equal-columns",count:Number(t[1])};let r=e.match(/repeat\(auto-fit,\s*minmax\((\d+)px/);if(r)return{kind:"adaptive",minWidth:Number(r[1])};let n=e.trim().split(/\s+/);return n.length>=2?{kind:"fixed-columns",widths:n}:null}function Fx(e,t){if(e.kind!=="component")return null;let n=wn(e.name,e.props,t).background;return typeof n!="string"||n==="transparent"?null:gn(n)??`Color(${JSON.stringify(n)})`}function hg(e,t,r,n){let o=wn(e,t,r)[n];return typeof o!="string"?n==="background"?"Color.Transparent":"Color.Unspecified":n==="background"&&(o==="transparent"||!o)?"Color.Transparent":gn(o)??"Color.Unspecified"}function qx(e){return e==="end"?"TextAlign.End":e==="center"?"TextAlign.Center":"TextAlign.Start"}function Bx(e){return e==="end"?"Alignment.CenterEnd":e==="center"?"Alignment.Center":"Alignment.CenterStart"}function bg(e,t,r,n,i,o,s){let a=ce(e.props,"gap"),c=typeof a=="number"?`${a}.dp`:"16.dp",l=Te("Modifier.fillMaxWidth()",rt(o));if(e.children.length===1&&e.children[0].kind==="map"){let f=e.children[0],d=f.item,m=lt(f.source,i,r),y=Wt(i,[d],()=>n(f.body,t+3,d));return[`${V(t)}Row(modifier = ${l}, horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,`${V(t+1)}for (${d} in ${m}) {`,`${V(t+2)}Box(modifier = Modifier.weight(1f).fillMaxWidth(), contentAlignment = Alignment.TopStart) {`,y,`${V(t+2)}}`,`${V(t+1)}}`,`${V(t)}}`].join(`
257
+ `)}let p=e.children.map(f=>{let d="";return f.kind==="map"?d=sr(f,t+2,n,i,"none"):f.kind==="text"?d=`${V(t+2)}Text(text = ${JSON.stringify(f.value)})`:f.kind==="binding"?d=vn(f,t+2,i,r):d=n(f,t+2,r),d?`${V(t+1)}Box(modifier = Modifier.weight(1f).fillMaxSize(), propagateMinConstraints = true, contentAlignment = Alignment.TopStart) {
258
+ ${d}
259
259
  ${V(t+1)}}`:""}).filter(Boolean);return[`${V(t)}Row(modifier = ${l}.height(IntrinsicSize.Min), horizontalArrangement = Arrangement.spacedBy(${c}), verticalAlignment = Alignment.Top) {`,p.join(`
260
260
  `),`${V(t)}}`].join(`
261
- `)}function bx(e,t,r,n,i){return e.map(s=>{if(s.kind==="map")return rr(s,t,r,n,"lazyGrid");let a="";return s.kind==="text"?a=`${V(t+1)}Text(text = ${JSON.stringify(s.value)}, modifier = Modifier.fillMaxWidth())`:s.kind==="binding"?a=pn(s,t+1,n,i,", modifier = Modifier.fillMaxWidth()"):a=r(s,t+1,i),a?s.kind!=="text"&&s.kind!=="binding"?`${V(t)}item {
261
+ `)}function Hx(e,t,r,n,i){return e.map(s=>{if(s.kind==="map")return sr(s,t,r,n,"lazyGrid");let a="";return s.kind==="text"?a=`${V(t+1)}Text(text = ${JSON.stringify(s.value)}, modifier = Modifier.fillMaxWidth())`:s.kind==="binding"?a=vn(s,t+1,n,i,", modifier = Modifier.fillMaxWidth()"):a=r(s,t+1,i),a?s.kind!=="text"&&s.kind!=="binding"?`${V(t)}item {
262
262
  ${V(t+1)}Box(modifier = Modifier.fillMaxWidth()) {
263
263
  ${a}
264
264
  ${V(t+1)}}
265
265
  ${V(t)}}`:`${V(t)}item {
266
266
  ${a}
267
267
  ${V(t)}}`:""}).filter(Boolean).join(`
268
- `)}function $x(e,t,r,n,i,o){let s=Te("Modifier.fillMaxWidth()",nt(o)),a=dn(e.name,e.props,i),c=lc(a.gridTemplateColumns),l=c?.kind==="fixed-columns"?c.widths:[],p=[];for(let f=0;f<e.children.length;f++){let h=e.children[f],m=l[f],y=m?.match(/^(\d+)px$/);if(y){let g="";if(h.kind==="map"?g=rr(h,t+2,n,i,"none"):h.kind==="text"?g=`${V(t+2)}Text(text = ${JSON.stringify(h.value)})`:h.kind==="binding"?g=pn(h,t+2,i,r):g=n(h,t+2,r),!g)continue;let v=yx(h,i),$=v?`.background(${v})`:"";p.push([`${V(t+1)}Box(modifier = Modifier.width(${Number(y[1])}.dp).fillMaxHeight()${$}) {`,g,`${V(t+1)}}`].join(`
269
- `))}else if(m==="1fr"){let g=i.inVerticalScroll;i.inVerticalScroll=!0;let v="";if(h.kind==="map"?v=rr(h,t+2,n,i,"none"):h.kind==="text"?v=`${V(t+2)}Text(text = ${JSON.stringify(h.value)})`:h.kind==="binding"?v=pn(h,t+2,i,r):v=n(h,t+2,r),i.inVerticalScroll=g,!v)continue;p.push([`${V(t+1)}Box(modifier = Modifier.weight(1f).fillMaxHeight(), contentAlignment = Alignment.TopStart) {`,`${V(t+2)}Column(modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {`,v,`${V(t+2)}}`,`${V(t+1)}}`].join(`
270
- `))}else{let g="";if(h.kind==="map"?g=rr(h,t+2,n,i,"none"):h.kind==="text"?g=`${V(t+2)}Text(text = ${JSON.stringify(h.value)})`:h.kind==="binding"?g=pn(h,t+2,i,r):g=n(h,t+2,r),!g)continue;p.push(g)}}return[`${V(t)}Row(modifier = ${s}, horizontalArrangement = Arrangement.spacedBy(0.dp)) {`,p.join(`
268
+ `)}function Wx(e,t,r,n,i,o){let s=Te("Modifier.fillMaxWidth()",rt(o)),a=wn(e.name,e.props,i),c=gc(a.gridTemplateColumns),l=c?.kind==="fixed-columns"?c.widths:[],p=[];for(let f=0;f<e.children.length;f++){let d=e.children[f],m=l[f],y=m?.match(/^(\d+)px$/);if(y){let g="";if(d.kind==="map"?g=sr(d,t+2,n,i,"none"):d.kind==="text"?g=`${V(t+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?g=vn(d,t+2,i,r):g=n(d,t+2,r),!g)continue;let v=Fx(d,i),b=v?`.background(${v})`:"";p.push([`${V(t+1)}Box(modifier = Modifier.width(${Number(y[1])}.dp).fillMaxHeight()${b}) {`,g,`${V(t+1)}}`].join(`
269
+ `))}else if(m==="1fr"){let g=i.inVerticalScroll;i.inVerticalScroll=!0;let v="";if(d.kind==="map"?v=sr(d,t+2,n,i,"none"):d.kind==="text"?v=`${V(t+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?v=vn(d,t+2,i,r):v=n(d,t+2,r),i.inVerticalScroll=g,!v)continue;p.push([`${V(t+1)}Box(modifier = Modifier.weight(1f).fillMaxHeight(), contentAlignment = Alignment.TopStart) {`,`${V(t+2)}Column(modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState())) {`,v,`${V(t+2)}}`,`${V(t+1)}}`].join(`
270
+ `))}else{let g="";if(d.kind==="map"?g=sr(d,t+2,n,i,"none"):d.kind==="text"?g=`${V(t+2)}Text(text = ${JSON.stringify(d.value)})`:d.kind==="binding"?g=vn(d,t+2,i,r):g=n(d,t+2,r),!g)continue;p.push(g)}}return[`${V(t)}Row(modifier = ${s}, horizontalArrangement = Arrangement.spacedBy(0.dp)) {`,p.join(`
271
271
  `),`${V(t)}}`].join(`
272
- `)}function lt(e,t,r){ss(t,e.scope);let n=e.scope??r??t.propsRoot??"vm";return e.path?`${n}.${e.path}`:n}function cc(e){return(t,r)=>{let n=t.map(i=>`${i} != null`).join(" && ");return`${V(e)}if (${n}) {
273
- ${as(r,V(1))}
274
- ${V(e)}}`}}function pn(e,t,r,n,i=""){return Sr(r,_r([e]),()=>`${V(t)}Text(text = ${lt(e,r,n)}${i})`,cc(t))}function eg(e,t,r){let n=e.value;return n?typeof n=="string"?JSON.stringify(n):typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding"?lt(n,t,r):'""':'""'}function gs(e,t,r){let n=Km(t),i=Ym(t);if(!n&&i.length===0)return e;let o=[];return n&&o.push(`LocalContentColor provides ${n}`),i.length>0&&o.push(`LocalTextStyle provides LocalTextStyle.current.merge(TextStyle(${i.join(", ")}))`),[`${V(r)}CompositionLocalProvider(${o.join(", ")}) {`,e,`${V(r)}}`].join(`
275
- `)}function xx(e){return e.map(t=>{let r=t.match(/\.padding\(horizontal = (\d+)\.dp, vertical = \d+\.dp\)/);if(r)return`.padding(horizontal = ${r[1]}.dp)`;let n=t.match(/\.padding\((\d+)\.dp\)/);return n?`.padding(horizontal = ${n[1]}.dp)`:t})}function oc(){return["@textMaxLines(1)","@textOverflow(TextOverflow.Ellipsis)","@textFillMaxWidth()"]}function _x(e,t){return t.cellTextBehavior?[...e,...oc()]:e}function nc(e,t){return[`${V(t)}Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.TopCenter) {`,e,`${V(t)}}`].join(`
276
- `)}function tg(e,t,r,n=""){let i=fn(t),o=hs(t),s=Te("Modifier",o),a=i.length>0&&Wm(o)?Te("Modifier",i):null,c=gs(r,t,e+1);return a&&(c=[`${V(e+1)}Box(modifier = ${a}) {`,c,`${V(e+1)}}`].join(`
272
+ `)}function lt(e,t,r){ls(t,e.scope);let n=e.scope??r??t.propsRoot??"vm";return e.path?`${n}.${e.path}`:n}function yc(e){return(t,r)=>{let n=t.map(i=>`${i} != null`).join(" && ");return`${V(e)}if (${n}) {
273
+ ${cs(r,V(1))}
274
+ ${V(e)}}`}}function vn(e,t,r,n,i=""){return Ir(r,Pr([e]),()=>`${V(t)}Text(text = ${lt(e,r,n)}${i})`,yc(t))}function mg(e,t,r){let n=e.value;return n?typeof n=="string"?JSON.stringify(n):typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding"?lt(n,t,r):'""':'""'}function vs(e,t,r){let n=ug(t),i=fg(t);if(!n&&i.length===0)return e;let o=[];return n&&o.push(`LocalContentColor provides ${n}`),i.length>0&&o.push(`LocalTextStyle provides LocalTextStyle.current.merge(TextStyle(${i.join(", ")}))`),[`${V(r)}CompositionLocalProvider(${o.join(", ")}) {`,e,`${V(r)}}`].join(`
275
+ `)}function Ux(e){return e.map(t=>{let r=t.match(/\.padding\(horizontal = (\d+)\.dp, vertical = \d+\.dp\)/);if(r)return`.padding(horizontal = ${r[1]}.dp)`;let n=t.match(/\.padding\((\d+)\.dp\)/);return n?`.padding(horizontal = ${n[1]}.dp)`:t})}function dc(){return["@textMaxLines(1)","@textOverflow(TextOverflow.Ellipsis)","@textFillMaxWidth()"]}function zx(e,t){return t.cellTextBehavior?[...e,...dc()]:e}function fc(e,t){return[`${V(t)}Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.TopCenter) {`,e,`${V(t)}}`].join(`
276
+ `)}function gg(e,t,r,n=""){let i=yn(t),o=gs(t),s=Te("Modifier",o),a=i.length>0&&og(o)?Te("Modifier",i):null,c=vs(r,t,e+1);return a&&(c=[`${V(e+1)}Box(modifier = ${a}) {`,c,`${V(e+1)}}`].join(`
277
277
  `)),[`${V(e)}Box(modifier = ${s}${n}) {`,c,`${V(e)}}`].join(`
278
- `)}function Sx(e,t,r){let i=qt({elementName:e,theme:r.theme,tokens:r.tokens,variantLiteral:t,instanceLiterals:{}}).display;return typeof i=="string"&&i.includes("inline")}function kx(e,t,r){if(t.cellTextBehavior)return!0;let n=ce(e,"variant");if(typeof n=="string")return Sx("Text",n,t);if(bi(e)){let i=e.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 sc(e,t,r,n,i,o){let s=fn(r),a=Xm(Te("Modifier",r)),c=nt(r.filter(_=>!_.startsWith("@textStyle(")&&!_.startsWith("@runtimeStyle(")&&!_.includes(".padding(")&&!_.startsWith("@textMaxLines(")&&!_.startsWith("@textOverflow(")&&!_.startsWith("@textAlign(")&&_!=="@textFillMaxWidth()")),l=Jm(r)?"Modifier.fillMaxWidth()":"Modifier",p=wi(r),f=null;a?f=p.length>0?`LocalTextStyle.current.merge(${a}.asTextStyle()).merge(TextStyle(${p.join(", ")}))`:`${a}.asTextStyle()`:p.length>0&&(f=`LocalTextStyle.current.merge(TextStyle(${p.join(", ")}))`);let h=f?`, style = ${f}`:"",m=zm(r),y=m!==null?`, maxLines = ${m}`:"",g=Gm(r),v=g?`, overflow = ${g}`:"",$=`${e} Text(text = ${t}${y}${v}${h})`;if(a){let N=`${(i?kx(i,n,o):n.cellTextBehavior===!0)?"Modifier":"Modifier.fillMaxWidth()"}.applyVcStyle(${a})`;if(s.length>0){let j=Te(l,[...c,...s]);return[`${e}Box(modifier = ${j}) {`,`${e} Box(modifier = ${N}) {`,$,`${e} }`,`${e}}`].join(`
279
- `)}return[`${e}Box(modifier = ${N}) {`,$,`${e}}`].join(`
280
- `)}let I=Te(l,[...c,...s]);return`${e}Text(text = ${t}, modifier = ${I}${y}${v}${h})`}function Cx(e,t,r){let n=e.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${lt(n,t,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 Ex(e,t,r,n){let i=e.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=lt(i,t,r);return`${V(n+1)}for (option in ${o}) {
278
+ `)}function Gx(e,t,r){let i=Ht({elementName:e,theme:r.theme,tokens:r.tokens,variantLiteral:t,instanceLiterals:{}}).display;return typeof i=="string"&&i.includes("inline")}function Jx(e,t,r){if(t.cellTextBehavior)return!0;let n=ce(e,"variant");if(typeof n=="string")return Gx("Text",n,t);if(bi(e)){let i=e.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 hc(e,t,r,n,i,o){let s=yn(r),a=pg(Te("Modifier",r)),c=rt(r.filter(_=>!_.startsWith("@textStyle(")&&!_.startsWith("@runtimeStyle(")&&!_.includes(".padding(")&&!_.startsWith("@textMaxLines(")&&!_.startsWith("@textOverflow(")&&!_.startsWith("@textAlign(")&&_!=="@textFillMaxWidth()")),l=cg(r)?"Modifier.fillMaxWidth()":"Modifier",p=wi(r),f=null;a?f=p.length>0?`LocalTextStyle.current.merge(${a}.asTextStyle()).merge(TextStyle(${p.join(", ")}))`:`${a}.asTextStyle()`:p.length>0&&(f=`LocalTextStyle.current.merge(TextStyle(${p.join(", ")}))`);let d=f?`, style = ${f}`:"",m=ag(r),y=m!==null?`, maxLines = ${m}`:"",g=lg(r),v=g?`, overflow = ${g}`:"",b=`${e} Text(text = ${t}${y}${v}${d})`;if(a){let N=`${(i?Jx(i,n,o):n.cellTextBehavior===!0)?"Modifier":"Modifier.fillMaxWidth()"}.applyVcStyle(${a})`;if(s.length>0){let j=Te(l,[...c,...s]);return[`${e}Box(modifier = ${j}) {`,`${e} Box(modifier = ${N}) {`,b,`${e} }`,`${e}}`].join(`
279
+ `)}return[`${e}Box(modifier = ${N}) {`,b,`${e}}`].join(`
280
+ `)}let I=Te(l,[...c,...s]);return`${e}Text(text = ${t}, modifier = ${I}${y}${v}${d})`}function Kx(e,t,r){let n=e.options;if(typeof n=="object"&&n!==null&&"kind"in n&&n.kind==="binding")return`${lt(n,t,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 Yx(e,t,r,n){let i=e.options;if(typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="binding"){let o=lt(i,t,r);return`${V(n+1)}for (option in ${o}) {
281
281
  ${V(n+2)}DropdownMenuItem(text = { Text(text = option.label) }, onClick = { expanded = false })
282
282
  ${V(n+1)}}`}return typeof i=="object"&&i!==null&&"kind"in i&&i.kind==="literal"&&Array.isArray(i.value)?i.value.map(s=>`${V(n+1)}DropdownMenuItem(text = { Text(text = ${JSON.stringify(s.label)}) }, onClick = { expanded = false })`).join(`
283
- `):`${V(n+1)}DropdownMenuItem(text = { Text(text = "--") }, onClick = { expanded = false })`}function ic(e){let r=e.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 rg(e){let r=e.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 sg(e,t,r){for(let n of e){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return lt(n,t,r)}return null}function ac(e,t,r,n,i,o=n.listScope??"none"){return e.map(a=>a.kind==="map"?rr(a,t,r,n,o):a.kind==="text"?`${V(t)}Text(text = ${JSON.stringify(a.value)})`:a.kind==="binding"?pn(a,t,n,i):r(a,t,i)).filter(Boolean).join(`
284
- `)}function rr(e,t,r,n,i="none"){let o=lt(e.source,n),s=e.item,a=Bt(n,[s],()=>r(e.body,t+2,s));return i==="lazyGrid"?`${V(t)}gridItems(${o}, key = { it.id }) { ${s} ->
283
+ `):`${V(n+1)}DropdownMenuItem(text = { Text(text = "--") }, onClick = { expanded = false })`}function pc(e){let r=e.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 yg(e){let r=e.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 $g(e,t,r){for(let n of e){if(n.kind==="text")return JSON.stringify(n.value);if(n.kind==="binding")return lt(n,t,r)}return null}function mc(e,t,r,n,i,o=n.listScope??"none"){return e.map(a=>a.kind==="map"?sr(a,t,r,n,o):a.kind==="text"?`${V(t)}Text(text = ${JSON.stringify(a.value)})`:a.kind==="binding"?vn(a,t,n,i):r(a,t,i)).filter(Boolean).join(`
284
+ `)}function sr(e,t,r,n,i="none"){let o=lt(e.source,n),s=e.item,a=Wt(n,[s],()=>r(e.body,t+2,s));return i==="lazyGrid"?`${V(t)}gridItems(${o}, key = { it.id }) { ${s} ->
285
285
  ${V(t+1)}Box(modifier = Modifier.fillMaxWidth()) {
286
286
  ${a}
287
287
  ${V(t+1)}}
@@ -289,25 +289,25 @@ ${V(t)}}`:i==="lazyColumn"?`${V(t)}lazyItems(${o}, key = { it.id }) { ${s} ->
289
289
  ${a}
290
290
  ${V(t)}}`:`${V(t)}for (${s} in ${o}) {
291
291
  ${a}
292
- ${V(t)}}`}function Px(e,t,r,n){let i=Bt(n,[],()=>Object.entries(e.props).map(([o,s])=>typeof s=="object"&&s!==null&&"kind"in s&&s.kind==="binding"?`${o} = ${lt(s,n,r)}`:`${o} = ${JSON.stringify(s)}`).join(", "));return`${V(t)}${e.name}(${i})`}function Ix(e,t,r,n,i){let o=V(t),s=ce(e.props,"label"),c=sg(e.children,n,r)??(typeof s=="string"?JSON.stringify(s):'"Button"'),l=Zm(e.name,e.props,n,"background"),p=Zm(e.name,e.props,n,"foreground");if(bi(e.props)){let j=`VcTheme.resolve("Button", variant = ${ig(e.props,n,r)})`;l=`${j}.background ?: Color.Transparent`,p=`${j}.foreground ?: Color.Unspecified`}let f=nt(Fm(qm(hs(i)))),h=n.cellTextBehavior?[...f.filter(N=>N!==".fillMaxWidth()"),".wrapContentWidth()"]:f,m=Te("Modifier",h),y=Bm(i),g=Hm(fn(i)),v=y!==null?`, shape = RoundedCornerShape(${y}.dp)`:"",$=g?`, contentPadding = ${g}`:"",I=wi(i),_=I.length>0?`, style = TextStyle(${I.join(", ")})`:"",R=n.cellTextBehavior?", maxLines = 1, overflow = TextOverflow.Ellipsis":"";return[`${o}VcButton(onClick = {}, modifier = ${m}, containerColor = ${l}, contentColor = ${p}${v}${$}) {`,`${o} Text(text = ${c}${_}${R})`,`${o}}`].join(`
293
- `)}function Rx(e,t,r,n,i,o){let s=V(r),a=Te("Modifier",o);if(t.leaf==="text"){let c=sg(e.children,i,n)??'""';return sc(s,c,o,i,e.props,n)}if(t.leaf==="button")return Ix(e,r,n,i,o);if(t.leaf==="textfield"){let c=ce(e.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',p=rg(i.tokens),f=ic(i.tokens),h=nt(o),m=Te("Modifier",h),y=wi(o),g=y.length>0?`${s} textStyle = TextStyle(${y.join(", ")}),`:`${s} textStyle = TextStyle(color = ${p}, fontSize = 14.sp),`,v=eg(e.props,i,n);return[`${s}BasicTextField(`,`${s} value = ${v},`,`${s} onValueChange = {},`,`${s} modifier = ${m},`,g,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.CenterStart) {`,`${s} if (${v}.isEmpty()) {`,`${s} Text(text = ${l}, style = TextStyle(color = ${f}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s})`].join(`
294
- `)}if(t.leaf==="texteditor"){let c=ce(e.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',p=ic(i.tokens),h=o.find(_=>_.includes("heightIn(min ="))?.match(/heightIn\(min = (\d+)\.dp\)/)?.[1]??"72",m=o.filter(_=>_.startsWith("@textStyle(")),y=nt(o.filter(_=>!_.startsWith("@textStyle(")&&!_.includes("heightIn(min ="))),g=Te("Modifier",nt(y)),v=wi(m),$=v.length>0?`, textStyle = TextStyle(${v.join(", ")})`:"",I=eg(e.props,i,n);return[`${s}Box(modifier = ${g}.heightIn(min = ${h}.dp)) {`,`${s} BasicTextField(`,`${s} value = ${I},`,`${s} onValueChange = {},`,`${s} modifier = Modifier.fillMaxWidth()${$},`,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth()) {`,`${s} if (${I}.isEmpty()) {`,`${s} Text(text = ${l}, modifier = Modifier.align(Alignment.TopStart).padding(top = 8.dp, start = 4.dp), style = TextStyle(color = ${p}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s} )`,`${s}}`].join(`
295
- `)}if(t.leaf==="picker"){let c=ce(e.props,"width"),l=typeof c=="number"?c:null,p=l!==null?`.width(${l}.dp)`:"",f=ds(nt(o)),h=Te(`Modifier${p}`,f),m=Cx(e.props,i,n),y=rg(i.tokens),g=ic(i.tokens),v=Ex(e.props,i,n,r);return[`${s}Box(modifier = ${h}.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 = ${y}), maxLines = 1, modifier = Modifier.weight(1f))`,`${s} Icon(Icons.Default.ArrowDropDown, contentDescription = null, tint = ${g})`,`${s} }`,`${s} DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {`,v,`${s} }`,`${s}}`].join(`
292
+ ${V(t)}}`}function Xx(e,t,r,n){let i=Wt(n,[],()=>Object.entries(e.props).map(([o,s])=>typeof s=="object"&&s!==null&&"kind"in s&&s.kind==="binding"?`${o} = ${lt(s,n,r)}`:`${o} = ${JSON.stringify(s)}`).join(", "));return`${V(t)}${e.name}(${i})`}function Qx(e,t,r,n,i){let o=V(t),s=ce(e.props,"label"),c=$g(e.children,n,r)??(typeof s=="string"?JSON.stringify(s):'"Button"'),l=hg(e.name,e.props,n,"background"),p=hg(e.name,e.props,n,"foreground");if(bi(e.props)){let j=`VcTheme.resolve("Button", variant = ${wg(e.props,n,r)})`;l=`${j}.background ?: Color.Transparent`,p=`${j}.foreground ?: Color.Unspecified`}let f=rt(tg(rg(gs(i)))),d=n.cellTextBehavior?[...f.filter(N=>N!==".fillMaxWidth()"),".wrapContentWidth()"]:f,m=Te("Modifier",d),y=ng(i),g=ig(yn(i)),v=y!==null?`, shape = RoundedCornerShape(${y}.dp)`:"",b=g?`, contentPadding = ${g}`:"",I=wi(i),_=I.length>0?`, style = TextStyle(${I.join(", ")})`:"",R=n.cellTextBehavior?", maxLines = 1, overflow = TextOverflow.Ellipsis":"";return[`${o}VcButton(onClick = {}, modifier = ${m}, containerColor = ${l}, contentColor = ${p}${v}${b}) {`,`${o} Text(text = ${c}${_}${R})`,`${o}}`].join(`
293
+ `)}function Zx(e,t,r,n,i,o){let s=V(r),a=Te("Modifier",o);if(t.leaf==="text"){let c=$g(e.children,i,n)??'""';return hc(s,c,o,i,e.props,n)}if(t.leaf==="button")return Qx(e,r,n,i,o);if(t.leaf==="textfield"){let c=ce(e.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',p=yg(i.tokens),f=pc(i.tokens),d=rt(o),m=Te("Modifier",d),y=wi(o),g=y.length>0?`${s} textStyle = TextStyle(${y.join(", ")}),`:`${s} textStyle = TextStyle(color = ${p}, fontSize = 14.sp),`,v=mg(e.props,i,n);return[`${s}BasicTextField(`,`${s} value = ${v},`,`${s} onValueChange = {},`,`${s} modifier = ${m},`,g,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.CenterStart) {`,`${s} if (${v}.isEmpty()) {`,`${s} Text(text = ${l}, style = TextStyle(color = ${f}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s})`].join(`
294
+ `)}if(t.leaf==="texteditor"){let c=ce(e.props,"placeholder"),l=typeof c=="string"?JSON.stringify(c):'""',p=pc(i.tokens),d=o.find(_=>_.includes("heightIn(min ="))?.match(/heightIn\(min = (\d+)\.dp\)/)?.[1]??"72",m=o.filter(_=>_.startsWith("@textStyle(")),y=rt(o.filter(_=>!_.startsWith("@textStyle(")&&!_.includes("heightIn(min ="))),g=Te("Modifier",rt(y)),v=wi(m),b=v.length>0?`, textStyle = TextStyle(${v.join(", ")})`:"",I=mg(e.props,i,n);return[`${s}Box(modifier = ${g}.heightIn(min = ${d}.dp)) {`,`${s} BasicTextField(`,`${s} value = ${I},`,`${s} onValueChange = {},`,`${s} modifier = Modifier.fillMaxWidth()${b},`,`${s} decorationBox = { innerTextField ->`,`${s} Box(modifier = Modifier.fillMaxWidth()) {`,`${s} if (${I}.isEmpty()) {`,`${s} Text(text = ${l}, modifier = Modifier.align(Alignment.TopStart).padding(top = 8.dp, start = 4.dp), style = TextStyle(color = ${p}, fontSize = 14.sp))`,`${s} }`,`${s} innerTextField()`,`${s} }`,`${s} },`,`${s} )`,`${s}}`].join(`
295
+ `)}if(t.leaf==="picker"){let c=ce(e.props,"width"),l=typeof c=="number"?c:null,p=l!==null?`.width(${l}.dp)`:"",f=ms(rt(o)),d=Te(`Modifier${p}`,f),m=Kx(e.props,i,n),y=yg(i.tokens),g=pc(i.tokens),v=Yx(e.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 = ${y}), maxLines = 1, modifier = Modifier.weight(1f))`,`${s} Icon(Icons.Default.ArrowDropDown, contentDescription = null, tint = ${g})`,`${s} }`,`${s} DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {`,v,`${s} }`,`${s}}`].join(`
296
296
  `)}if(t.leaf==="spacer")return`${s}Spacer(modifier = ${a})`;if(t.leaf==="divider"){let l=ce(e.props,"axis")==="vertical"?"VerticalDivider":"HorizontalDivider";return`${s}${l}(modifier = ${a})`}if(t.leaf==="image"){let c=ce(e.props,"src")??ce(e.props,"name"),l=typeof c=="string"?JSON.stringify(c):'"image"';return`${s}Icon(imageVector = Icons.Default.Image, contentDescription = ${l}, modifier = ${a})`}if(t.leaf==="progressview")return`${s}CircularProgressIndicator(modifier = ${a})`;if(t.leaf==="toggle"){let c=ce(e.props,"label"),l=typeof c=="string"?JSON.stringify(c):'""';return[`${s}Row(modifier = ${a}, verticalAlignment = Alignment.CenterVertically) {`,`${s} Switch(checked = false, onCheckedChange = {})`,`${s} Text(text = ${l})`,`${s}}`].join(`
297
- `)}return`${s}Text(text = "/* unsupported leaf: ${e.name} */")`}function Tx(e,t,r,n,i,o,s){let a=ac(e.children,r+1,i,o,n),c=Te("Modifier",s);if(t.container==="vstack"){let p=t.spacingProp?ce(e.props,t.spacingProp):void 0,f=typeof p=="number"?`${p}.dp`:"0.dp",h=[`${V(r)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${f})) {`,gs(a,s,r+1),`${V(r)}}`].join(`
298
- `);return ms(s)?nc(h,r):h}if(t.container==="hstack"){let p=t.spacingProp?ce(e.props,t.spacingProp):void 0,f=typeof p=="number"?`${p}.dp`:"0.dp",h=ce(e.props,"justify"),m=ce(e.props,"wrap"),y=jm(h,f),g=ce(e.props,"align"),v=ce(e.props,"alignItems"),$=ce(e.props,"height"),I=v==="center"||g==="center"||typeof $=="number"?"Alignment.CenterVertically":v==="end"?"Alignment.Bottom":"Alignment.Top",_=e.name==="TableHeader"||e.name==="TableRow",R=ce(e.props,"flex"),N=_||h!==void 0||typeof R=="number",j=[];N&&j.push(".fillMaxWidth()"),typeof $=="number"&&j.push(_&&e.name==="TableHeader"?`.heightIn(min = ${$}.dp)`:`.height(${$}.dp)`);let U=_&&typeof $=="number"?ds(s):s,oe=Te("Modifier",nt([...U,...j])),me=o.inTableHeader;e.name==="TableHeader"&&(o.inTableHeader=!0);let be=gs(ac(e.children,r+1,i,o,n),s,r+1);return e.name==="TableHeader"&&(o.inTableHeader=me),m===!0&&h!=="between"&&h!=="spaceBetween"?[`${V(r)}FlowRow(modifier = ${oe}, horizontalArrangement = Arrangement.spacedBy(${f}), verticalArrangement = Arrangement.spacedBy(${f})) {`,be,`${V(r)}}`].join(`
297
+ `)}return`${s}Text(text = "/* unsupported leaf: ${e.name} */")`}function e_(e,t,r,n,i,o,s){let a=mc(e.children,r+1,i,o,n),c=Te("Modifier",s);if(t.container==="vstack"){let p=t.spacingProp?ce(e.props,t.spacingProp):void 0,f=typeof p=="number"?`${p}.dp`:"0.dp",d=[`${V(r)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${f})) {`,vs(a,s,r+1),`${V(r)}}`].join(`
298
+ `);return ys(s)?fc(d,r):d}if(t.container==="hstack"){let p=t.spacingProp?ce(e.props,t.spacingProp):void 0,f=typeof p=="number"?`${p}.dp`:"0.dp",d=ce(e.props,"justify"),m=ce(e.props,"wrap"),y=Zm(d,f),g=ce(e.props,"align"),v=ce(e.props,"alignItems"),b=ce(e.props,"height"),I=v==="center"||g==="center"||typeof b=="number"?"Alignment.CenterVertically":v==="end"?"Alignment.Bottom":"Alignment.Top",_=e.name==="TableHeader"||e.name==="TableRow",R=ce(e.props,"flex"),N=_||d!==void 0||typeof R=="number",j=[];N&&j.push(".fillMaxWidth()"),typeof b=="number"&&j.push(_&&e.name==="TableHeader"?`.heightIn(min = ${b}.dp)`:`.height(${b}.dp)`);let U=_&&typeof b=="number"?ms(s):s,oe=Te("Modifier",rt([...U,...j])),me=o.inTableHeader;e.name==="TableHeader"&&(o.inTableHeader=!0);let be=vs(mc(e.children,r+1,i,o,n),s,r+1);return e.name==="TableHeader"&&(o.inTableHeader=me),m===!0&&d!=="between"&&d!=="spaceBetween"?[`${V(r)}FlowRow(modifier = ${oe}, horizontalArrangement = Arrangement.spacedBy(${f}), verticalArrangement = Arrangement.spacedBy(${f})) {`,be,`${V(r)}}`].join(`
299
299
  `):[`${V(r)}Row(modifier = ${oe}, horizontalArrangement = ${y}, verticalAlignment = ${I}) {`,be,`${V(r)}}`].join(`
300
- `)}if(t.container==="group"||t.container==="navstack"){let p=bi(e.props)?void 0:dn(e.name,e.props,o),f=p?.display==="grid"?lc(p.gridTemplateColumns):null;if(f?.kind==="equal-columns")return og(e,r,n,i,o,s,f.count);if(f?.kind==="adaptive"){let v=ce(e.props,"gap"),$=typeof v=="number"?`${v}.dp`:"16.dp";return[`${V(r)}LazyVerticalGrid(columns = GridCells.Adaptive(minSize = ${f.minWidth}.dp), modifier = ${c}.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(${$}), verticalArrangement = Arrangement.spacedBy(${$})) {`,bx(e.children,r+1,i,o,n),`${V(r)}}`].join(`
301
- `)}let h=ce(e.props,"contentAlign"),m=Um(s)?", contentAlignment = Alignment.TopStart":"",y=typeof h=="string"?`, contentAlignment = ${Dm(h)}`:m,g=tg(r,s,a,y);return ms(s)?nc(g,r):g}if(t.container==="scrollview"){let p=o.inVerticalScroll;o.inVerticalScroll=!0;let f=[`${V(r)}Column(modifier = ${c}.verticalScroll(rememberScrollState())) {`,a,`${V(r)}}`].join(`
302
- `);return o.inVerticalScroll=p,f}if(t.container==="field"){let p=ce(e.props,"label"),f=ce(e.props,"gap"),h=typeof f=="number"?`${f}.dp`:"4.dp",m=typeof p=="string"?`${V(r+1)}Text(text = ${JSON.stringify(p)}, modifier = Modifier.applyVcStyle(VcTheme.resolve("Text", variant = "field-label")), style = VcTheme.resolve("Text", variant = "field-label").asTextStyle())
303
- `:"";return[`${V(r)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${h})) {`,`${m}${a}`,`${V(r)}}`].join(`
304
- `)}if(t.container==="tablestack"){let p=ce(e.props,"separator"),f=ce(e.props,"separatorColor"),h=typeof p=="number"&&p>0||p===void 0,y=dn(e.name,e.props,o).separatorColor??f,g="Color.Gray.copy(alpha = 0.2f)";if(h&&typeof y=="string"){let _=y.match(/^#([0-9a-fA-F]{6})$/);_&&(g=`Color(${parseInt(_[1].slice(0,2),16)}, ${parseInt(_[1].slice(2,4),16)}, ${parseInt(_[1].slice(4,6),16)})`)}let v=`${V(r+1)}HorizontalDivider(modifier = Modifier, color = ${g})`,$=e.children.map(_=>{if(_.kind==="map"&&h){let R=_,N=lt(R.source,o),j=R.item,U=Bt(o,[j],()=>i(R.body,r+3,j));return[`${V(r+1)}for (${j} in ${N}) {`,`${V(r+2)}${v.trim()}`,U,`${V(r+1)}}`].join(`
305
- `)}return _.kind==="map"?rr(_,r+1,i,o,"none"):i(_,r+1,n)}).filter(Boolean),I;return I=$,[`${V(r)}Column(modifier = ${c}) {`,I.join(`
300
+ `)}if(t.container==="group"||t.container==="navstack"){let p=bi(e.props)?void 0:wn(e.name,e.props,o),f=p?.display==="grid"?gc(p.gridTemplateColumns):null;if(f?.kind==="equal-columns")return bg(e,r,n,i,o,s,f.count);if(f?.kind==="adaptive"){let v=ce(e.props,"gap"),b=typeof v=="number"?`${v}.dp`:"16.dp";return[`${V(r)}LazyVerticalGrid(columns = GridCells.Adaptive(minSize = ${f.minWidth}.dp), modifier = ${c}.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(${b}), verticalArrangement = Arrangement.spacedBy(${b})) {`,Hx(e.children,r+1,i,o,n),`${V(r)}}`].join(`
301
+ `)}let d=ce(e.props,"contentAlign"),m=sg(s)?", contentAlignment = Alignment.TopStart":"",y=typeof d=="string"?`, contentAlignment = ${eg(d)}`:m,g=gg(r,s,a,y);return ys(s)?fc(g,r):g}if(t.container==="scrollview"){let p=o.inVerticalScroll;o.inVerticalScroll=!0;let f=[`${V(r)}Column(modifier = ${c}.verticalScroll(rememberScrollState())) {`,a,`${V(r)}}`].join(`
302
+ `);return o.inVerticalScroll=p,f}if(t.container==="field"){let p=ce(e.props,"label"),f=ce(e.props,"gap"),d=typeof f=="number"?`${f}.dp`:"4.dp",m=typeof p=="string"?`${V(r+1)}Text(text = ${JSON.stringify(p)}, modifier = Modifier.applyVcStyle(VcTheme.resolve("Text", variant = "field-label")), style = VcTheme.resolve("Text", variant = "field-label").asTextStyle())
303
+ `:"";return[`${V(r)}Column(modifier = ${c}, verticalArrangement = Arrangement.spacedBy(${d})) {`,`${m}${a}`,`${V(r)}}`].join(`
304
+ `)}if(t.container==="tablestack"){let p=ce(e.props,"separator"),f=ce(e.props,"separatorColor"),d=typeof p=="number"&&p>0||p===void 0,y=wn(e.name,e.props,o).separatorColor??f,g="Color.Gray.copy(alpha = 0.2f)";if(d&&typeof y=="string"){let _=y.match(/^#([0-9a-fA-F]{6})$/);_&&(g=`Color(${parseInt(_[1].slice(0,2),16)}, ${parseInt(_[1].slice(2,4),16)}, ${parseInt(_[1].slice(4,6),16)})`)}let v=`${V(r+1)}HorizontalDivider(modifier = Modifier, color = ${g})`,b=e.children.map(_=>{if(_.kind==="map"&&d){let R=_,N=lt(R.source,o),j=R.item,U=Wt(o,[j],()=>i(R.body,r+3,j));return[`${V(r+1)}for (${j} in ${N}) {`,`${V(r+2)}${v.trim()}`,U,`${V(r+1)}}`].join(`
305
+ `)}return _.kind==="map"?sr(_,r+1,i,o,"none"):i(_,r+1,n)}).filter(Boolean),I;return I=b,[`${V(r)}Column(modifier = ${c}) {`,I.join(`
306
306
  `),`${V(r)}}`].join(`
307
- `)}if(t.container==="cellgroup"){let p=ce(e.props,"width"),f=ce(e.props,"flex"),h=ce(e.props,"align"),m=vx(h),y=wx(h),g=typeof f=="number",v=ds(s),$=o.inTableHeader?xx(fn(v)):fn(v),I=v.filter(U=>U.startsWith("@contentColor(")||U.startsWith("@inheritTextStyle(")),_=[];typeof p=="number"?_.push(`.width(${p}.dp)`):g&&_.push(".weight(1f).fillMaxWidth()");let R=Te("Modifier",nt([..._,...hs(v)])),N=o.cellTextBehavior;o.cellTextBehavior=!0;let j=e.children.map(U=>U.kind==="map"?rr(U,r+1,i,o,"none"):U.kind==="text"?sc(V(r+1),JSON.stringify(U.value),nt([...oc(),`@textAlign(${m})`,...$,...I.map(oe=>oe)]),o,void 0,n):U.kind==="binding"?Sr(o,_r([U]),()=>sc(V(r+1),lt(U,o,n),nt([...oc(),`@textAlign(${m})`,...$,...I.map(oe=>oe)]),o,void 0,n),cc(r+1)):i(U,r+1,n)).filter(Boolean).join(`
308
- `);return o.cellTextBehavior=N,[`${V(r)}Box(modifier = ${R}, contentAlignment = ${y}) {`,gs(j,I,r+1),`${V(r)}}`].join(`
309
- `)}let l=tg(r,s,a);return ms(s)?nc(l,r):l}function Ax(e,t,r,n,i,o){let s=_x(gx(e.name,e.props,o,n),o);if(t.leaf)return Rx(e,t,r,n,o,s);if(t.container==="group"&&!bi(e.props)){let a=dn(e.name,e.props,o),c=a.gridTemplateColumns,l=a.flexDirection;if(a.display==="grid"&&c){let p=lc(c);if(p?.kind==="equal-columns")return og(e,r,n,i,o,s,p.count);if(p?.kind==="fixed-columns")return $x(e,r,n,i,o,s)}if(a.display==="flex"&&l==="row"){let p=ce(e.props,"gap"),f=typeof p=="number"?`${p}.dp`:typeof a.gap=="number"?`${a.gap}.dp`:"0.dp",h=Te("Modifier",s),m=ac(e.children,r+2,i,o,n);return[`${V(r)}Row(modifier = ${h}, horizontalArrangement = Arrangement.spacedBy(${f}), verticalAlignment = Alignment.Top) {`,m,`${V(r)}}`].join(`
310
- `)}}if(t.container)return Tx(e,t,r,n,i,o,s);throw new Error(`Unsupported Compose element config for ${e.name}`)}function Nx(e){let t=(r,n,i)=>{if(r.kind==="viewRef")return Px(r,n,i,e);if(r.kind!=="component")return"";let o=e.map.elements[r.name];if(!o)throw new Error(`Element "${r.name}" is not in Compose element map`);let s=o.leaf?r.children.filter(c=>c.kind==="binding"):[],a=_r([...Object.values(r.props),...s]);return Sr(e,a,()=>Ax(r,o,n,i,t,e),cc(n))};return t}function ag(e,t,r=2){let n=Nx(t);if(e.kind!=="component")throw new Error("Compose lowering root must be a component node");return n(e,r)}var lg=K(()=>{"use strict";mt();Jl();Yl();Qm()});var ug={};pr(ug,{renderComposeComponent:()=>ys});function cg(e){let t=e.match(/^(\w+)\[\]$/);return t?`List<${cg(t[1])}>`:e==="string"?"String":e==="number"?"Double":e==="boolean"?"Boolean":e}function Mx(e){return e.propsType?e.propDecls?e.propDecls.map(t=>{let r=cg(t.type);return t.optional?`${t.name}: ${r}? = null`:`${t.name}: ${r}`}).join(", "):`props: ${e.propsType}`:""}async function ys(e,t){let r=await Vm(t.elementMapPath),n=t.allowlistExtra??[],i=e.isPartial?e.exportName:`${e.exportName.replace(/View$/,"")||e.exportName}Screen`,o={map:r,theme:t.theme,tokens:t.tokens,allowlistExtra:n,propsRoot:e.propDecls?.[0]?.name,optionalProps:new Set(e.propDecls?.filter(l=>l.optional).map(l=>l.name))},s=ag(e.root,o,2),a=e.isPartial?Mx(e):e.viewModel?`vm: ${e.viewModel}`:"";return`/**
307
+ `)}if(t.container==="cellgroup"){let p=ce(e.props,"width"),f=ce(e.props,"flex"),d=ce(e.props,"align"),m=qx(d),y=Bx(d),g=typeof f=="number",v=ms(s),b=o.inTableHeader?Ux(yn(v)):yn(v),I=v.filter(U=>U.startsWith("@contentColor(")||U.startsWith("@inheritTextStyle(")),_=[];typeof p=="number"?_.push(`.width(${p}.dp)`):g&&_.push(".weight(1f).fillMaxWidth()");let R=Te("Modifier",rt([..._,...gs(v)])),N=o.cellTextBehavior;o.cellTextBehavior=!0;let j=e.children.map(U=>U.kind==="map"?sr(U,r+1,i,o,"none"):U.kind==="text"?hc(V(r+1),JSON.stringify(U.value),rt([...dc(),`@textAlign(${m})`,...b,...I.map(oe=>oe)]),o,void 0,n):U.kind==="binding"?Ir(o,Pr([U]),()=>hc(V(r+1),lt(U,o,n),rt([...dc(),`@textAlign(${m})`,...b,...I.map(oe=>oe)]),o,void 0,n),yc(r+1)):i(U,r+1,n)).filter(Boolean).join(`
308
+ `);return o.cellTextBehavior=N,[`${V(r)}Box(modifier = ${R}, contentAlignment = ${y}) {`,vs(j,I,r+1),`${V(r)}}`].join(`
309
+ `)}let l=gg(r,s,a);return ys(s)?fc(l,r):l}function t_(e,t,r,n,i,o){let s=zx(Dx(e.name,e.props,o,n),o);if(t.leaf)return Zx(e,t,r,n,o,s);if(t.container==="group"&&!bi(e.props)){let a=wn(e.name,e.props,o),c=a.gridTemplateColumns,l=a.flexDirection;if(a.display==="grid"&&c){let p=gc(c);if(p?.kind==="equal-columns")return bg(e,r,n,i,o,s,p.count);if(p?.kind==="fixed-columns")return Wx(e,r,n,i,o,s)}if(a.display==="flex"&&l==="row"){let p=ce(e.props,"gap"),f=typeof p=="number"?`${p}.dp`:typeof a.gap=="number"?`${a.gap}.dp`:"0.dp",d=Te("Modifier",s),m=mc(e.children,r+2,i,o,n);return[`${V(r)}Row(modifier = ${d}, horizontalArrangement = Arrangement.spacedBy(${f}), verticalAlignment = Alignment.Top) {`,m,`${V(r)}}`].join(`
310
+ `)}}if(t.container)return e_(e,t,r,n,i,o,s);throw new Error(`Unsupported Compose element config for ${e.name}`)}function r_(e){let t=(r,n,i)=>{if(r.kind==="viewRef")return Xx(r,n,i,e);if(r.kind!=="component")return"";let o=e.map.elements[r.name];if(!o)throw new Error(`Element "${r.name}" is not in Compose element map`);let s=o.leaf?r.children.filter(c=>c.kind==="binding"):[],a=Pr([...Object.values(r.props),...s]);return Ir(e,a,()=>t_(r,o,n,i,t,e),yc(n))};return t}function xg(e,t,r=2){let n=r_(t);if(e.kind!=="component")throw new Error("Compose lowering root must be a component node");return n(e,r)}var _g=K(()=>{"use strict";mt();rc();ic();dg()});var kg={};gr(kg,{renderComposeComponent:()=>ws});function Sg(e){let t=e.match(/^(\w+)\[\]$/);return t?`List<${Sg(t[1])}>`:e==="string"?"String":e==="number"?"Double":e==="boolean"?"Boolean":e}function n_(e){return e.propsType?e.propDecls?e.propDecls.map(t=>{let r=Sg(t.type);return t.optional?`${t.name}: ${r}? = null`:`${t.name}: ${r}`}).join(", "):`props: ${e.propsType}`:""}async function ws(e,t){let r=await Xm(t.elementMapPath),n=t.allowlistExtra??[],i=e.isPartial?e.exportName:`${e.exportName.replace(/View$/,"")||e.exportName}Screen`,o={map:r,theme:t.theme,tokens:t.tokens,allowlistExtra:n,propsRoot:e.propDecls?.[0]?.name,optionalProps:new Set(e.propDecls?.filter(l=>l.optional).map(l=>l.name))},s=xg(e.root,o,2),a=e.isPartial?n_(e):e.viewModel?`vm: ${e.viewModel}`:"";return`/**
311
311
  * Auto-generated Compose view from ${e.source}
312
312
  * DO NOT EDIT \u2014 generated by view-contracts.
313
313
  */
@@ -357,8 +357,8 @@ import generated.compose.asTextStyle
357
357
  fun ${i}(${a}) {
358
358
  ${s}
359
359
  }
360
- `}var uc=K(()=>{"use strict";Lm();lg()});function Ox(e,t){return e.entries.find(n=>n.path===t)?.value??""}function Vx(e){let t=e.match(/^#([0-9a-fA-F]{6})$/);if(!t)return null;let r=t[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 Lx(e){let t=e.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!t)return null;let r=Number(t[1])/255,n=Number(t[2])/255,i=Number(t[3])/255,o=Number(t[4]);return`Color(${r}f, ${n}f, ${i}f, ${o}f)`}function fg(e){return e==="transparent"?"Color.Transparent":Vx(e)??Lx(e)??null}function hn(e){let t=e.match(/^([\d.]+)px$/);return t?Number(t[1]):null}function pg(e,t){let r=[];for(let[n,i]of Object.entries(e)){let o=Ox(t,i.ref);if(o)switch(n){case"background":case"foreground":{let s=fg(o);s&&r.push({property:n,kotlinValue:s});break}case"padding":{let s=hn(o);if(s!==null)r.push({property:n,kotlinValue:`${s}.dp`});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=hn(a[0]),l=hn(a[1]);c!==null&&r.push({property:"paddingV",kotlinValue:`${c}.dp`}),l!==null&&r.push({property:"paddingH",kotlinValue:`${l}.dp`})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=hn(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=hn(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=hn(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=fg(o);s&&r.push({property:"borderColor",kotlinValue:s});break}case"fontWeight":{let s=jx[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 Dx(e){return e.some(t=>t.property==="shrinkWrap")?e.filter(t=>t.property!=="widthFill"):e}function hg(e){let t=Dx(e);return t.length===0?"VcVariantStyle()":`VcVariantStyle(${[...t].sort((n,i)=>dg.indexOf(n.property)-dg.indexOf(i.property)).map(n=>`${n.property} = ${n.kotlinValue}`).join(", ")})`}function Fx(e,t){return{...e,...t}}function mg(e,t){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(e.defaults)){if(Object.keys(i).length===0)continue;let o=pg(i,t);o.length!==0&&r.push(` ${JSON.stringify(n)} to ${hg(o)},`)}r.push(" )"),r.push(""),r.push(" val variants: Map<String, Map<String, VcVariantStyle>> = mapOf(");for(let[n,i]of Object.entries(e.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=e.defaults[n]??{};r.push(` ${JSON.stringify(n)} to mapOf(`);for(let[a,c]of o){let l=Fx(s,c),p=pg(l,t);n==="Box"&&a==="card"&&(p=p.filter(f=>f.property!=="heightFill")),r.push(` ${JSON.stringify(a)} to ${hg(p)},`)}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(`
361
- `)}var jx,dg,gg=K(()=>{"use strict";jx={bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",600:"FontWeight.SemiBold",700:"FontWeight.Bold",500:"FontWeight.Medium",400:"FontWeight.Normal"};dg=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","shrinkWrap","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});var wg={};pr(wg,{renderComposeRuntime:()=>qx});import{mkdir as yg,writeFile as mn}from"node:fs/promises";import{resolve as Wt}from"node:path";function vg(){return Wt(Se(),"renderers/compose/templates")}async function qx(e,t,r,n,i){let o=Wt(t.generated.reactDir,"../compose"),s=Wt(o,"components");if(await yg(o,{recursive:!0}),await yg(s,{recursive:!0}),n?await mn(Wt(o,"VcTheme.kt"),mg(n.theme,n.tokens),"utf-8"):await mn(Wt(o,"VcTheme.kt"),await vt(vg(),"VcTheme.kt.hbs",{packageName:"generated.compose"}),"utf-8"),await mn(Wt(o,"Dispatch.kt"),`package generated.compose
360
+ `}var vc=K(()=>{"use strict";Qm();_g()});function i_(e,t){return e.entries.find(n=>n.path===t)?.value??""}function o_(e){let t=e.match(/^#([0-9a-fA-F]{6})$/);if(!t)return null;let r=t[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 s_(e){let t=e.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/);if(!t)return null;let r=Number(t[1])/255,n=Number(t[2])/255,i=Number(t[3])/255,o=Number(t[4]);return`Color(${r}f, ${n}f, ${i}f, ${o}f)`}function Cg(e){return e==="transparent"?"Color.Transparent":o_(e)??s_(e)??null}function bn(e){let t=e.match(/^([\d.]+)px$/);return t?Number(t[1]):null}function Eg(e,t){let r=[];for(let[n,i]of Object.entries(e)){let o=i_(t,i.ref);if(o)switch(n){case"background":case"foreground":{let s=Cg(o);s&&r.push({property:n,kotlinValue:s});break}case"padding":{let s=bn(o);if(s!==null)r.push({property:n,kotlinValue:`${s}.dp`});else{let a=o.trim().split(/\s+/);if(a.length===2){let c=bn(a[0]),l=bn(a[1]);c!==null&&r.push({property:"paddingV",kotlinValue:`${c}.dp`}),l!==null&&r.push({property:"paddingH",kotlinValue:`${l}.dp`})}}break}case"radius":case"fontSize":case"minHeight":case"maxWidth":{let s=bn(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=bn(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=bn(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=Cg(o);s&&r.push({property:"borderColor",kotlinValue:s});break}case"fontWeight":{let s=a_[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 l_(e){return e.some(t=>t.property==="shrinkWrap")?e.filter(t=>t.property!=="widthFill"):e}function Ig(e){let t=l_(e);return t.length===0?"VcVariantStyle()":`VcVariantStyle(${[...t].sort((n,i)=>Pg.indexOf(n.property)-Pg.indexOf(i.property)).map(n=>`${n.property} = ${n.kotlinValue}`).join(", ")})`}function c_(e,t){return{...e,...t}}function Rg(e,t){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(e.defaults)){if(Object.keys(i).length===0)continue;let o=Eg(i,t);o.length!==0&&r.push(` ${JSON.stringify(n)} to ${Ig(o)},`)}r.push(" )"),r.push(""),r.push(" val variants: Map<String, Map<String, VcVariantStyle>> = mapOf(");for(let[n,i]of Object.entries(e.variants)){let o=Object.entries(i);if(o.length===0)continue;let s=e.defaults[n]??{};r.push(` ${JSON.stringify(n)} to mapOf(`);for(let[a,c]of o){let l=c_(s,c),p=Eg(l,t);n==="Box"&&a==="card"&&(p=p.filter(f=>f.property!=="heightFill")),r.push(` ${JSON.stringify(a)} to ${Ig(p)},`)}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(`
361
+ `)}var a_,Pg,Tg=K(()=>{"use strict";a_={bold:"FontWeight.Bold",semibold:"FontWeight.SemiBold",medium:"FontWeight.Medium",regular:"FontWeight.Normal",600:"FontWeight.SemiBold",700:"FontWeight.Bold",500:"FontWeight.Medium",400:"FontWeight.Normal"};Pg=["foreground","background","padding","paddingH","paddingV","widthFill","heightFill","shrinkWrap","radius","fontSize","fontWeight","shadow","borderWidth","borderColor","minHeight","maxWidth"]});var Og={};gr(Og,{renderComposeRuntime:()=>u_});import{mkdir as Ag,writeFile as $n}from"node:fs/promises";import{resolve as zt}from"node:path";function Ng(){return zt(Se(),"renderers/compose/templates")}async function u_(e,t,r,n,i){let o=zt(t.generated.reactDir,"../compose"),s=zt(o,"components");if(await Ag(o,{recursive:!0}),await Ag(s,{recursive:!0}),n?await $n(zt(o,"VcTheme.kt"),Rg(n.theme,n.tokens),"utf-8"):await $n(zt(o,"VcTheme.kt"),await wt(Ng(),"VcTheme.kt.hbs",{packageName:"generated.compose"}),"utf-8"),await $n(zt(o,"Dispatch.kt"),`package generated.compose
362
362
 
363
363
  /**
364
364
  * Dispatch stub for generated Compose screens.
@@ -367,49 +367,49 @@ ${s}
367
367
  suspend fun dispatch(action: String, payload: Map<String, Any?> = emptyMap()) {
368
368
  // TODO: implement app-specific dispatcher bridge.
369
369
  }
370
- `,"utf-8"),i&&n)for(let a of i.partials)try{let c=await ys(a,{theme:n.theme,tokens:n.tokens}),l=Wt(s,`${a.exportName}.kt`);await mn(l,c.replace("package generated.compose","package generated.compose.components"),"utf-8"),console.log(` compose/${a.exportName} \u2192 ${l}`)}catch(c){console.warn(` compose/${a.exportName}: skipped (${c.message})`)}for(let a of r.views)if(a.targets.includes("compose")){let c=Wt(o,`${a.screenName}Screen.kt`),l=await vt(vg(),"Screen.kt.hbs",{screenName:a.screenName,packageName:"generated.compose",componentName:a.exportName});if(i&&n){let p=i.screens.get(a.screenName);p&&(l=await ys(p,{theme:n.theme,tokens:n.tokens}))}await mn(c,l,"utf-8"),console.log(` compose/${a.screenName} \u2192 ${c}`)}for(let a of r.views){if(!a.targets.includes("compose"))continue;let c=yi(e,t,a.screenName);if(await fs(c))try{let l=await vi(c),p=JSON.stringify(l,null,2)+`
371
- `,f=Wt(o,`${a.screenName}.SampleData.json`);await mn(f,p,"utf-8"),console.log(` compose/${a.screenName}.SampleData.json \u2192 ${f}`)}catch(l){console.warn(` compose/${a.screenName}.SampleData.json: skipped (${l.message})`)}}}var bg=K(()=>{"use strict";Ot();ci();gg();uc();ps()});var $g={};pr($g,{renderComposeComponent:()=>Gx,renderComposeRuntime:()=>Jx,renderReactFromIr:()=>Bx,renderReactPreviewBundle:()=>Hx,renderReactRuntime:()=>Wx,renderSwiftComponent:()=>zx,renderSwiftUIRuntime:()=>Ux});async function Bx(e,t,r){return(await Promise.resolve().then(()=>(Qa(),Xa))).renderReactFromIr(e,t,r)}async function Hx(e,t,r){return(await Promise.resolve().then(()=>(Qa(),Xa))).renderReactPreviewBundle(e,t,r)}async function Wx(e,t){return(await Promise.resolve().then(()=>(om(),im))).renderReactRuntime(e,t)}async function Ux(e,t,r,n,i){return(await Promise.resolve().then(()=>(Mm(),Nm))).renderSwiftUIRuntime(e,t,r,n,i)}async function zx(e,t){return(await Promise.resolve().then(()=>(ec(),Cm))).renderSwiftComponent(e,t)}async function Gx(e,t){return(await Promise.resolve().then(()=>(uc(),ug))).renderComposeComponent(e,t)}async function Jx(e,t,r,n,i){return(await Promise.resolve().then(()=>(bg(),wg))).renderComposeRuntime(e,t,r,n,i)}var xg=K(()=>{"use strict"});import{resolve as $i}from"node:path";function _g(){return fc||(fc=Promise.resolve().then(()=>(xg(),$g))),fc}function ui(e){return e??$i(Se(),"renderers/react/templates")}function ln(){return $i(Se(),"renderers/react/runtime")}function Sg(){return $i(Se(),"renderers/react/preview/components.ts")}function fi(){return $i(ln(),"structural.css")}function Kx(){return $i(Se(),"renderers/react/elements.yaml")}function pc(e){return e===Kx()}var fc,pi=K(()=>{"use strict";Ot()});import{readFile as Yx}from"node:fs/promises";import{extname as Xx,resolve as Qx}from"node:path";async function vs(e){let t=Qx(e),r=await Yx(t,"utf-8"),n=Xx(t).toLowerCase();if(n===".json")return JSON.parse(r);if(n===".yaml"||n===".yml")return it.load(r);throw new Error(`Unsupported design file extension "${n}" (expected .yaml, .yml, or .json): ${t}`)}var dc=K(()=>{"use strict";Ur()});var ws,Pt,yn,bs,Ee,gn,Cr=K(()=>{"use strict";ws=["color","dimension","shadow","typography","layout"],Pt=class extends Error{constructor(t){super(t),this.name="DesignTokenError"}},yn=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],bs={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"]},Ee=class extends Error{constructor(t){super(t),this.name="DesignThemeError"}},gn=class extends Error{constructor(t){super(t),this.name="DesignConstraintError"}}});function vn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function e_(e){if(!yn.includes(e))throw new Ee(`Unknown variant property "${e}" (expected ${yn.join(", ")})`);return e}function t_(e,t,r){if(typeof e!="string")throw new Ee(`${t}.${r} must be a token reference string like "{ui.primary}"`);let n=e.match(Zx);if(!n)throw new Ee(`${t}.${r} must be a token reference like "{ui.primary}", got "${e}"`);return n[1]}function kg(e,t){let r={};for(let[n,i]of Object.entries(t)){let o=e_(n),s=t_(i,e,n);r[o]={ref:s,accepts:[...bs[o]]}}return r}function r_(e){if(e===void 0)return{};if(!vn(e))throw new Ee('Theme "defaults" must be an object');let t={};for(let[r,n]of Object.entries(e)){if(!vn(n))throw new Ee(`Theme defaults for "${r}" must be an object`);t[r]=kg(`defaults.${r}`,n)}return t}function hc(e){if(!vn(e))throw new Ee("Theme document must be a YAML/JSON object");let t=e.variants;if(!vn(t))throw new Ee('Theme document must contain a "variants" object');let r={};for(let[n,i]of Object.entries(t)){if(!vn(i))throw new Ee(`Theme variants for "${n}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!vn(a))throw new Ee(`Theme variant "${n}.${s}" must be an object`);o[s]=kg(`${n}.${s}`,a)}r[n]=o}return{defaults:r_(e.defaults),variants:r}}var Zx,mc=K(()=>{"use strict";Cr();Zx=/^\{([^}]+)\}$/});function xi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function i_(e){return`--${e.replace(/\./g,"-")}`}function o_(e,t){if(typeof e!="string"||!ws.includes(e))throw new Pt(`Token "${t}" has unsupported $type "${String(e)}" (expected ${ws.join(", ")})`);return e}function Cg(e,t,r){if(xi(e)){if("$type"in e&&"$value"in e){r.push({path:t,type:o_(e.$type,t),rawValue:e.$value});return}for(let[n,i]of Object.entries(e)){if(n.startsWith("$"))continue;let o=t?`${t}.${n}`:n;Cg(i,o,r)}}}function s_(e,t){if(typeof t=="string")return t;if(e==="typography"&&xi(t)){if(typeof t.fontFamily=="string")return t.fontFamily;let r=[t.fontWeight,t.fontStyle,t.fontSize,t.lineHeight,t.fontFamily].filter(n=>n!=null);if(r.length>0)return r.map(String).join(" ")}if(e==="shadow"&&Array.isArray(t))return t.map(r=>xi(r)?`${r.offsetX??0} ${r.offsetY??0} ${r.blur??0} ${r.color??"transparent"}`:String(r)).join(", ");if(e==="shadow"&&xi(t))return`${t.offsetX??0} ${t.offsetY??0} ${t.blur??0} ${t.color??"transparent"}`;throw new Pt(`Token value for "${e}" must be a string or supported object`)}function a_(e){return typeof e!="string"?null:e.match(n_)?.[1]??null}function Eg(e,t,r,n,i){let o=a_(t);if(!o){let c=r.get(e);if(!c)throw new Pt(`Unknown token path "${e}"`);return{value:s_(c.type,t)}}if(n.has(e))throw new Pt(`Circular token reference detected at "${e}"`);let s=r.get(o);if(!s)throw new Pt(`Token "${e}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};n.add(e);let a=Eg(o,s.rawValue,r,n,i);return n.delete(e),i.set(o,a.value),{value:a.value,ref:o}}function gc(e){if(!xi(e))throw new Pt("Token document must be a YAML/JSON object");let t=[];Cg(e,"",t);let r=new Map(t.map(o=>[o.path,o])),n=new Map,i=[];for(let o of t){let{value:s,ref:a}=Eg(o.path,o.rawValue,r,new Set,n);n.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:i_(o.path),ref:a})}return{entries:i}}var n_,yc=K(()=>{"use strict";Cr();n_=/^\{([^}]+)\}$/});function vc(e){let t=Dp(e),r=new Set;for(let n of t)yn.includes(n)&&r.add(n);return r}var Pg=K(()=>{"use strict";mt();Cr()});function l_(e){return new Map(e.entries.map(t=>[t.path,t]))}function Ig(e,t,r,n,i){for(let[o,s]of Object.entries(r)){let a=bs[o];if(!a)throw new Ee(`Unknown variant property "${o}" on ${e}`);if(!n.has(o))throw new Ee(`Property "${o}" is not allowed for ${t} in ${e}`);let c=i.get(s.ref);if(!c)throw new Ee(`${e}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(c.type))throw new Ee(`${e}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${c.type}`)}}function Rg(e,t){let r=l_(e);for(let[n,i]of Object.entries(t.defaults)){let o=vc(n);Ig(`defaults.${n}`,n,i,o,r)}for(let[n,i]of Object.entries(t.variants)){let o=vc(n);for(let[s,a]of Object.entries(i))Ig(`variants.${n}.${s}`,n,a,o,r)}}function wc(e,t){Rg(e,t)}var bc=K(()=>{"use strict";Cr();Pg()});function $c(e){let t=[":root {"];for(let r of e.entries)t.push(` ${r.cssVar}: ${r.value};`);return t.push("}"),t.join(`
372
- `)}var Tg=K(()=>{"use strict"});var $s,xc=K(()=>{"use strict";$s={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 xs(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function _s(e,t){let r=e.entries.find(n=>n.path===t);if(!r)throw new Error(`Token reference "${t}" not found while emitting theme CSS`);return r.cssVar}var _c=K(()=>{"use strict"});function Sc(e,t){let r=[];for(let[n,i]of Object.entries(t.defaults)){let o=xs(n),s=[];for(let[a,c]of Object.entries(i)){let l=$s[a];if(!l){console.warn(`[view-contracts] CSS theme: variant property "${a}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let p=_s(e,c.ref);s.push(` ${l}: var(${p});`)}s.length!==0&&r.push(`.vc-${o} {
370
+ `,"utf-8"),i&&n)for(let a of i.partials)try{let c=await ws(a,{theme:n.theme,tokens:n.tokens}),l=zt(s,`${a.exportName}.kt`);await $n(l,c.replace("package generated.compose","package generated.compose.components"),"utf-8"),console.log(` compose/${a.exportName} \u2192 ${l}`)}catch(c){console.warn(` compose/${a.exportName}: skipped (${c.message})`)}for(let a of r.views)if(a.targets.includes("compose")){let c=zt(o,`${a.screenName}Screen.kt`),l=await wt(Ng(),"Screen.kt.hbs",{screenName:a.screenName,packageName:"generated.compose",componentName:a.exportName});if(i&&n){let p=i.screens.get(a.screenName);p&&(l=await ws(p,{theme:n.theme,tokens:n.tokens}))}await $n(c,l,"utf-8"),console.log(` compose/${a.screenName} \u2192 ${c}`)}for(let a of r.views){if(!a.targets.includes("compose"))continue;let c=yi(e,t,a.screenName);if(await ds(c))try{let l=await vi(c),p=JSON.stringify(l,null,2)+`
371
+ `,f=zt(o,`${a.screenName}.SampleData.json`);await $n(f,p,"utf-8"),console.log(` compose/${a.screenName}.SampleData.json \u2192 ${f}`)}catch(l){console.warn(` compose/${a.screenName}.SampleData.json: skipped (${l.message})`)}}}var Mg=K(()=>{"use strict";Vt();ci();Tg();vc();hs()});var Vg={};gr(Vg,{renderComposeComponent:()=>g_,renderComposeRuntime:()=>y_,renderReactFromIr:()=>f_,renderReactPreviewBundle:()=>p_,renderReactRuntime:()=>d_,renderSwiftComponent:()=>m_,renderSwiftUIRuntime:()=>h_});async function f_(e,t,r){return(await Promise.resolve().then(()=>(nl(),rl))).renderReactFromIr(e,t,r)}async function p_(e,t,r){return(await Promise.resolve().then(()=>(nl(),rl))).renderReactPreviewBundle(e,t,r)}async function d_(e,t){return(await Promise.resolve().then(()=>(bm(),wm))).renderReactRuntime(e,t)}async function h_(e,t,r,n,i){return(await Promise.resolve().then(()=>(Km(),Jm))).renderSwiftUIRuntime(e,t,r,n,i)}async function m_(e,t){return(await Promise.resolve().then(()=>(lc(),qm))).renderSwiftComponent(e,t)}async function g_(e,t){return(await Promise.resolve().then(()=>(vc(),kg))).renderComposeComponent(e,t)}async function y_(e,t,r,n,i){return(await Promise.resolve().then(()=>(Mg(),Og))).renderComposeRuntime(e,t,r,n,i)}var Lg=K(()=>{"use strict"});import{resolve as $i}from"node:path";function jg(){return wc||(wc=Promise.resolve().then(()=>(Lg(),Vg))),wc}function ui(e){return e??$i(Se(),"renderers/react/templates")}function hn(){return $i(Se(),"renderers/react/runtime")}function Dg(){return $i(Se(),"renderers/react/preview/components.ts")}function fi(){return $i(hn(),"structural.css")}function v_(){return $i(Se(),"renderers/react/elements.yaml")}function bc(e){return e===v_()}var wc,pi=K(()=>{"use strict";Vt()});import{readFile as w_}from"node:fs/promises";import{extname as b_,resolve as $_}from"node:path";async function bs(e){let t=$_(e),r=await w_(t,"utf-8"),n=b_(t).toLowerCase();if(n===".json")return JSON.parse(r);if(n===".yaml"||n===".yml")return nt.load(r);throw new Error(`Unsupported design file extension "${n}" (expected .yaml, .yml, or .json): ${t}`)}var $c=K(()=>{"use strict";Yr()});var $s,It,_n,xs,Ee,xn,Tr=K(()=>{"use strict";$s=["color","dimension","shadow","typography","layout"],It=class extends Error{constructor(t){super(t),this.name="DesignTokenError"}},_n=["background","foreground","radius","padding","shadow","typography","display","gridTemplateColumns","minHeight","maxWidth","width","height","margin","border","borderColor","flexDirection","fontWeight","fontSize","alignItems","justifyContent"],xs={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"]},Ee=class extends Error{constructor(t){super(t),this.name="DesignThemeError"}},xn=class extends Error{constructor(t){super(t),this.name="DesignConstraintError"}}});function Sn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function __(e){if(!_n.includes(e))throw new Ee(`Unknown variant property "${e}" (expected ${_n.join(", ")})`);return e}function S_(e,t,r){if(typeof e!="string")throw new Ee(`${t}.${r} must be a token reference string like "{ui.primary}"`);let n=e.match(x_);if(!n)throw new Ee(`${t}.${r} must be a token reference like "{ui.primary}", got "${e}"`);return n[1]}function Fg(e,t){let r={};for(let[n,i]of Object.entries(t)){let o=__(n),s=S_(i,e,n);r[o]={ref:s,accepts:[...xs[o]]}}return r}function k_(e){if(e===void 0)return{};if(!Sn(e))throw new Ee('Theme "defaults" must be an object');let t={};for(let[r,n]of Object.entries(e)){if(!Sn(n))throw new Ee(`Theme defaults for "${r}" must be an object`);t[r]=Fg(`defaults.${r}`,n)}return t}function xc(e){if(!Sn(e))throw new Ee("Theme document must be a YAML/JSON object");let t=e.variants;if(!Sn(t))throw new Ee('Theme document must contain a "variants" object');let r={};for(let[n,i]of Object.entries(t)){if(!Sn(i))throw new Ee(`Theme variants for "${n}" must be an object`);let o={};for(let[s,a]of Object.entries(i)){if(!Sn(a))throw new Ee(`Theme variant "${n}.${s}" must be an object`);o[s]=Fg(`${n}.${s}`,a)}r[n]=o}return{defaults:k_(e.defaults),variants:r}}var x_,_c=K(()=>{"use strict";Tr();x_=/^\{([^}]+)\}$/});function xi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function E_(e){return`--${e.replace(/\./g,"-")}`}function P_(e,t){if(typeof e!="string"||!$s.includes(e))throw new It(`Token "${t}" has unsupported $type "${String(e)}" (expected ${$s.join(", ")})`);return e}function qg(e,t,r){if(xi(e)){if("$type"in e&&"$value"in e){r.push({path:t,type:P_(e.$type,t),rawValue:e.$value});return}for(let[n,i]of Object.entries(e)){if(n.startsWith("$"))continue;let o=t?`${t}.${n}`:n;qg(i,o,r)}}}function I_(e,t){if(typeof t=="string")return t;if(e==="typography"&&xi(t)){if(typeof t.fontFamily=="string")return t.fontFamily;let r=[t.fontWeight,t.fontStyle,t.fontSize,t.lineHeight,t.fontFamily].filter(n=>n!=null);if(r.length>0)return r.map(String).join(" ")}if(e==="shadow"&&Array.isArray(t))return t.map(r=>xi(r)?`${r.offsetX??0} ${r.offsetY??0} ${r.blur??0} ${r.color??"transparent"}`:String(r)).join(", ");if(e==="shadow"&&xi(t))return`${t.offsetX??0} ${t.offsetY??0} ${t.blur??0} ${t.color??"transparent"}`;throw new It(`Token value for "${e}" must be a string or supported object`)}function R_(e){return typeof e!="string"?null:e.match(C_)?.[1]??null}function Bg(e,t,r,n,i){let o=R_(t);if(!o){let c=r.get(e);if(!c)throw new It(`Unknown token path "${e}"`);return{value:I_(c.type,t)}}if(n.has(e))throw new It(`Circular token reference detected at "${e}"`);let s=r.get(o);if(!s)throw new It(`Token "${e}" references unknown token "{${o}}"`);if(i.has(o))return{value:i.get(o),ref:o};n.add(e);let a=Bg(o,s.rawValue,r,n,i);return n.delete(e),i.set(o,a.value),{value:a.value,ref:o}}function Sc(e){if(!xi(e))throw new It("Token document must be a YAML/JSON object");let t=[];qg(e,"",t);let r=new Map(t.map(o=>[o.path,o])),n=new Map,i=[];for(let o of t){let{value:s,ref:a}=Bg(o.path,o.rawValue,r,new Set,n);n.set(o.path,s),i.push({path:o.path,type:o.type,value:s,cssVar:E_(o.path),ref:a})}return{entries:i}}var C_,kc=K(()=>{"use strict";Tr();C_=/^\{([^}]+)\}$/});function Cc(e){let t=Jp(e),r=new Set;for(let n of t)_n.includes(n)&&r.add(n);return r}var Hg=K(()=>{"use strict";mt();Tr()});function T_(e){return new Map(e.entries.map(t=>[t.path,t]))}function Wg(e,t,r,n,i){for(let[o,s]of Object.entries(r)){let a=xs[o];if(!a)throw new Ee(`Unknown variant property "${o}" on ${e}`);if(!n.has(o))throw new Ee(`Property "${o}" is not allowed for ${t} in ${e}`);let c=i.get(s.ref);if(!c)throw new Ee(`${e}.${o} references unknown token "{${s.ref}}"`);if(!a.includes(c.type))throw new Ee(`${e}.${o} requires a ${a.join(" or ")} token, but "{${s.ref}}" is ${c.type}`)}}function Ug(e,t){let r=T_(e);for(let[n,i]of Object.entries(t.defaults)){let o=Cc(n);Wg(`defaults.${n}`,n,i,o,r)}for(let[n,i]of Object.entries(t.variants)){let o=Cc(n);for(let[s,a]of Object.entries(i))Wg(`variants.${n}.${s}`,n,a,o,r)}}function Ec(e,t){Ug(e,t)}var Pc=K(()=>{"use strict";Tr();Hg()});function Ic(e){let t=[":root {"];for(let r of e.entries)t.push(` ${r.cssVar}: ${r.value};`);return t.push("}"),t.join(`
372
+ `)}var zg=K(()=>{"use strict"});var _s,Rc=K(()=>{"use strict";_s={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 Ss(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ks(e,t){let r=e.entries.find(n=>n.path===t);if(!r)throw new Error(`Token reference "${t}" not found while emitting theme CSS`);return r.cssVar}var Tc=K(()=>{"use strict"});function Ac(e,t){let r=[];for(let[n,i]of Object.entries(t.defaults)){let o=Ss(n),s=[];for(let[a,c]of Object.entries(i)){let l=_s[a];if(!l){console.warn(`[view-contracts] CSS theme: variant property "${a}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let p=ks(e,c.ref);s.push(` ${l}: var(${p});`)}s.length!==0&&r.push(`.vc-${o} {
373
373
  ${s.join(`
374
374
  `)}
375
375
  }`)}return r.join(`
376
376
 
377
- `)}var Ag=K(()=>{"use strict";xc();_c()});function kc(e,t){let r=[];for(let[n,i]of Object.entries(t.variants)){let o=xs(n);for(let[s,a]of Object.entries(i)){let c=[];for(let[l,p]of Object.entries(a)){let f=$s[l];if(!f){console.warn(`[view-contracts] CSS theme: variant property "${l}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let h=_s(e,p.ref);c.push(` ${f}: var(${h});`)}c.length!==0&&r.push(`.vc-${o}--${s} {
377
+ `)}var Gg=K(()=>{"use strict";Rc();Tc()});function Nc(e,t){let r=[];for(let[n,i]of Object.entries(t.variants)){let o=Ss(n);for(let[s,a]of Object.entries(i)){let c=[];for(let[l,p]of Object.entries(a)){let f=_s[l];if(!f){console.warn(`[view-contracts] CSS theme: variant property "${l}" has no CSS mapping. Add it to cssPropertyMap.ts.`);continue}let d=ks(e,p.ref);c.push(` ${f}: var(${d});`)}c.length!==0&&r.push(`.vc-${o}--${s} {
378
378
  ${c.join(`
379
379
  `)}
380
380
  }`)}}return r.join(`
381
381
 
382
- `)}var Ng=K(()=>{"use strict";xc();_c()});function Mg(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="binding"}function c_(e){if(e.variant!==void 0)return e.variant;if(e.tone!==void 0)return e.tone}function Og(e,t,r,n,i,o){let s=r.variants[e];if(!s){t!==void 0&&!Mg(t)&&typeof t=="string"&&i.push(`${n}: <${e}> references variant "${t}" but no variants are defined for ${e} in theme.yaml`);return}if(t===void 0||Mg(t)||typeof t!="string")return;(o?.mapMutedToDefault&&t==="muted"?"default":t)in s||i.push(`${n}: <${e}> references unknown variant "${t}" (not defined in theme.yaml)`)}function Ss(e,t,r,n){if(e.kind==="component"){let i=c_(e.props);e.props.variant!==void 0?Og(e.name,e.props.variant,t,r,n):i!==void 0&&e.name in t.variants&&Og(e.name,i,t,r,n,{mapMutedToDefault:!0});for(let o of e.children)Ss(o,t,r,n);return}if(e.kind==="map"){Ss(e.body,t,r,n);return}if(e.kind==="fragment"){for(let i of e.children)Ss(i,t,r,n);return}e.kind}function Cc(e,t){let r=[];for(let n of e)Ss(n.root,t,n.source,r);if(r.length>0)throw new Error(`View variant validation failed:
382
+ `)}var Jg=K(()=>{"use strict";Rc();Tc()});function Kg(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="binding"}function A_(e){if(e.variant!==void 0)return e.variant;if(e.tone!==void 0)return e.tone}function Yg(e,t,r,n,i,o){let s=r.variants[e];if(!s){t!==void 0&&!Kg(t)&&typeof t=="string"&&i.push(`${n}: <${e}> references variant "${t}" but no variants are defined for ${e} in theme.yaml`);return}if(t===void 0||Kg(t)||typeof t!="string")return;(o?.mapMutedToDefault&&t==="muted"?"default":t)in s||i.push(`${n}: <${e}> references unknown variant "${t}" (not defined in theme.yaml)`)}function Cs(e,t,r,n){if(e.kind==="component"){let i=A_(e.props);e.props.variant!==void 0?Yg(e.name,e.props.variant,t,r,n):i!==void 0&&e.name in t.variants&&Yg(e.name,i,t,r,n,{mapMutedToDefault:!0});for(let o of e.children)Cs(o,t,r,n);return}if(e.kind==="map"){Cs(e.body,t,r,n);return}if(e.kind==="fragment"){for(let i of e.children)Cs(i,t,r,n);return}e.kind}function Oc(e,t){let r=[];for(let n of e)Cs(n.root,t,n.source,r);if(r.length>0)throw new Error(`View variant validation failed:
383
383
  ${r.map(n=>` - ${n}`).join(`
384
- `)}`)}var Vg=K(()=>{"use strict"});function Ec(e,t){return[...new Set([...e.matchAll(t)].map(r=>r[0]))]}function Lg(e,t,r){let n=t.slice(0,5).map(o=>` - ${e}: ${o}`).join(`
384
+ `)}`)}var Xg=K(()=>{"use strict"});function Mc(e,t){return[...new Set([...e.matchAll(t)].map(r=>r[0]))]}function Qg(e,t,r){let n=t.slice(0,5).map(o=>` - ${e}: ${o}`).join(`
385
385
  `),i=t.length>5?`
386
386
  \u2026 and ${t.length-5} more`:"";return`${r}
387
- ${n}${i}`}function Pc(e,t){let r=Ec(e,u_);if(r.length!==0)throw new gn(Lg(t,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 Ic(e,t){let r=Ec(e,f_),n=Ec(e,p_),i=[...r,...n];if(i.length!==0)throw new gn(Lg(t,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 u_,f_,p_,Rc=K(()=>{"use strict";Cr();u_=/\.vc-[a-z][\w-]*/g,f_=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,p_=/\bextensionClassName\s*\(/g});import{readFile as jg,stat as d_}from"node:fs/promises";import{resolve as h_}from"node:path";async function Dg(e){try{return await d_(e),!0}catch{return!1}}async function _i(e,t){let r=e.design?.extensionsCss;r&&await Dg(r)&&Pc(await jg(r,"utf-8"),r);let n=Ie(t);for(let i of["extensions.tsx","extensions.ts"]){let o=h_(n,"src/components",i);await Dg(o)&&Ic(await jg(o,"utf-8"),o)}}var Fg=K(()=>{"use strict";Mt();Rc()});async function m_(e){let t=await vs(e);return gc(t)}async function g_(e){let t=await vs(e);return hc(t)}async function ks(e,t){let r=await m_(e),n=await g_(t);return wc(r,n),{tokenIR:r,themeIR:n}}var Tc=K(()=>{"use strict";dc();mc();yc();bc();Tg();Ag();Ng();dc();mc();yc();bc();Vg();Rc();Fg();os();Cr()});import{readFile as qg,stat as y_}from"node:fs/promises";async function v_(e){try{return await y_(e),!0}catch{return!1}}async function di(e,t){let r=Ie(t),{tokensPath:n,themePath:i}=go(e),{tokenIR:o,themeIR:s}=await ks(n,i);await _i(e,t);let a=await qg(fi(),"utf-8"),c=Sc(o,s),l=kc(o,s),p=`${$c(o)}
387
+ ${n}${i}`}function Vc(e,t){let r=Mc(e,N_);if(r.length!==0)throw new xn(Qg(t,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 Lc(e,t){let r=Mc(e,O_),n=Mc(e,M_),i=[...r,...n];if(i.length!==0)throw new xn(Qg(t,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 N_,O_,M_,jc=K(()=>{"use strict";Tr();N_=/\.vc-[a-z][\w-]*/g,O_=/(?:className\s*=\s*(?:"vc-[^"]*"|'vc-[^']*'|\{`[^`]*\bvc-[^`]*`\}|\{"vc-[^"]*"\}|\{'vc-[^']*'\})|["'`]vc-[a-z][\w-]*["'`])/g,M_=/\bextensionClassName\s*\(/g});import{readFile as Zg,stat as V_}from"node:fs/promises";import{resolve as L_}from"node:path";async function ey(e){try{return await V_(e),!0}catch{return!1}}async function _i(e,t){let r=e.design?.extensionsCss;r&&await ey(r)&&Vc(await Zg(r,"utf-8"),r);let n=Ie(t);for(let i of["extensions.tsx","extensions.ts"]){let o=L_(n,"src/components",i);await ey(o)&&Lc(await Zg(o,"utf-8"),o)}}var ty=K(()=>{"use strict";Mt();jc()});async function j_(e){let t=await bs(e);return Sc(t)}async function D_(e){let t=await bs(e);return xc(t)}async function Es(e,t){let r=await j_(e),n=await D_(t);return Ec(r,n),{tokenIR:r,themeIR:n}}var Dc=K(()=>{"use strict";$c();_c();kc();Pc();zg();Gg();Jg();$c();_c();kc();Pc();Xg();jc();ty();as();Tr()});import{readFile as ry,stat as F_}from"node:fs/promises";async function q_(e){try{return await F_(e),!0}catch{return!1}}async function di(e,t){let r=Ie(t),{tokensPath:n,themePath:i}=go(e),{tokenIR:o,themeIR:s}=await Es(n,i);await _i(e,t);let a=await ry(fi(),"utf-8"),c=Ac(o,s),l=Nc(o,s),p=`${Ic(o)}
388
388
 
389
389
  ${a.trim()}`;c&&(p+=`
390
390
 
391
391
  ${c}`),p+=`
392
392
 
393
- ${l}`;let f=e.design?.extensionsCss;return f&&await v_(f)&&(p+=`
393
+ ${l}`;let f=e.design?.extensionsCss;return f&&await q_(f)&&(p+=`
394
394
 
395
- ${await qg(f,"utf-8")}`),p}var os=K(()=>{"use strict";Mt();pi();Tc()});var Ii=S(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 Ei=class{};le._CodeOrName=Ei;le.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Er=class extends Ei{constructor(t){if(super(),!le.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};le.Name=Er;var ut=class extends Ei{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof Er&&(r[n.str]=(r[n.str]||0)+1),r),{})}};le._Code=ut;le.nil=new ut("");function iy(e,...t){let r=[e[0]],n=0;for(;n<t.length;)Bc(r,t[n]),r.push(e[++n]);return new ut(r)}le._=iy;var qc=new ut("+");function oy(e,...t){let r=[Pi(e[0])],n=0;for(;n<t.length;)r.push(qc),Bc(r,t[n]),r.push(qc,Pi(e[++n]));return q_(r),new ut(r)}le.str=oy;function Bc(e,t){t instanceof ut?e.push(...t._items):t instanceof Er?e.push(t):e.push(W_(t))}le.addCodeArg=Bc;function q_(e){let t=1;for(;t<e.length-1;){if(e[t]===qc){let r=B_(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function B_(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Er||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Er))return`"${e}${t.slice(1)}`}function H_(e,t){return t.emptyStr()?e:e.emptyStr()?t:oy`${e}${t}`}le.strConcat=H_;function W_(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Pi(Array.isArray(e)?e.join(","):e)}function U_(e){return new ut(Pi(e))}le.stringify=U_;function Pi(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}le.safeStringify=Pi;function z_(e){return typeof e=="string"&&le.IDENTIFIER.test(e)?new ut(`.${e}`):iy`[${e}]`}le.getProperty=z_;function G_(e){if(typeof e=="string"&&le.IDENTIFIER.test(e))return new ut(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}le.getEsmExportName=G_;function J_(e){return new ut(e.toString())}le.regexpCode=J_});var Uc=S(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.ValueScope=Je.ValueScopeName=Je.Scope=Je.varKinds=Je.UsedValueState=void 0;var Ge=Ii(),Hc=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Ps;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Ps||(Je.UsedValueState=Ps={}));Je.varKinds={const:new Ge.Name("const"),let:new Ge.Name("let"),var:new Ge.Name("var")};var Is=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Ge.Name?t:this.name(t)}name(t){return new Ge.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Je.Scope=Is;var Rs=class extends Ge.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Ge._)`.${new Ge.Name(r)}[${n}]`}};Je.ValueScopeName=Rs;var K_=(0,Ge._)`\n`,Wc=class extends Is{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?K_:Ge.nil}}get(){return this._scope}name(t){return new Rs(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:o}=i,s=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[o];if(a){let p=a.get(s);if(p)return p}else a=this._values[o]=new Map;a.set(s,i);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=r.ref,i.setValue(r,{property:o,itemIndex:l}),i}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Ge._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(t,r,n={},i){let o=Ge.nil;for(let s in t){let a=t[s];if(!a)continue;let c=n[s]=n[s]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,Ps.Started);let p=r(l);if(p){let f=this.opts.es5?Je.varKinds.var:Je.varKinds.const;o=(0,Ge._)`${o}${f} ${l} = ${p};${this.opts._n}`}else if(p=i?.(l))o=(0,Ge._)`${o}${p}${this.opts._n}`;else throw new Hc(l);c.set(l,Ps.Completed)})}return o}};Je.ValueScope=Wc});var Z=S(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.or=re.and=re.not=re.CodeGen=re.operators=re.varKinds=re.ValueScopeName=re.ValueScope=re.Scope=re.Name=re.regexpCode=re.stringify=re.getProperty=re.nil=re.strConcat=re.str=re._=void 0;var se=Ii(),wt=Uc(),nr=Ii();Object.defineProperty(re,"_",{enumerable:!0,get:function(){return nr._}});Object.defineProperty(re,"str",{enumerable:!0,get:function(){return nr.str}});Object.defineProperty(re,"strConcat",{enumerable:!0,get:function(){return nr.strConcat}});Object.defineProperty(re,"nil",{enumerable:!0,get:function(){return nr.nil}});Object.defineProperty(re,"getProperty",{enumerable:!0,get:function(){return nr.getProperty}});Object.defineProperty(re,"stringify",{enumerable:!0,get:function(){return nr.stringify}});Object.defineProperty(re,"regexpCode",{enumerable:!0,get:function(){return nr.regexpCode}});Object.defineProperty(re,"Name",{enumerable:!0,get:function(){return nr.Name}});var Ms=Uc();Object.defineProperty(re,"Scope",{enumerable:!0,get:function(){return Ms.Scope}});Object.defineProperty(re,"ValueScope",{enumerable:!0,get:function(){return Ms.ValueScope}});Object.defineProperty(re,"ValueScopeName",{enumerable:!0,get:function(){return Ms.ValueScopeName}});Object.defineProperty(re,"varKinds",{enumerable:!0,get:function(){return Ms.varKinds}});re.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 Ut=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},zc=class extends Ut{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?wt.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=bn(this.rhs,t,r)),this}get names(){return this.rhs instanceof se._CodeOrName?this.rhs.names:{}}},Ts=class extends Ut{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof se.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=bn(this.rhs,t,r),this}get names(){let t=this.lhs instanceof se.Name?{}:{...this.lhs.names};return Ns(t,this.rhs)}},Gc=class extends Ts{constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Jc=class extends Ut{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Kc=class extends Ut{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Yc=class extends Ut{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Xc=class extends Ut{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=bn(this.code,t,r),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},Ri=class extends Ut{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(t,r)||(Y_(t,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Rr(t,r.names),{})}},zt=class extends Ri{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Qc=class extends Ri{},wn=class extends zt{};wn.kind="else";var Pr=class e extends zt{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new wn(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(sy(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=bn(this.condition,t,r),this}get names(){let t=super.names;return Ns(t,this.condition),this.else&&Rr(t,this.else.names),t}};Pr.kind="if";var Ir=class extends zt{};Ir.kind="for";var Zc=class extends Ir{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=bn(this.iteration,t,r),this}get names(){return Rr(super.names,this.iteration.names)}},eu=class extends Ir{constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?wt.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(t)}get names(){let t=Ns(super.names,this.from);return Ns(t,this.to)}},As=class extends Ir{constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=bn(this.iterable,t,r),this}get names(){return Rr(super.names,this.iterable.names)}},Ti=class extends zt{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Ti.kind="func";var Ai=class extends Ri{render(t){return"return "+super.render(t)}};Ai.kind="return";var tu=class extends zt{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Rr(t,this.catch.names),this.finally&&Rr(t,this.finally.names),t}},Ni=class extends zt{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Ni.kind="catch";var Mi=class extends zt{render(t){return"finally"+super.render(t)}};Mi.kind="finally";var ru=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
396
- `:""},this._extScope=t,this._scope=new wt.Scope({parent:t}),this._nodes=[new Qc]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new zc(t,o,n)),o}const(t,r,n){return this._def(wt.varKinds.const,t,r,n)}let(t,r,n){return this._def(wt.varKinds.let,t,r,n)}var(t,r,n){return this._def(wt.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new Ts(t,r,n))}add(t,r){return this._leafNode(new Gc(t,re.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==se.nil&&this._leafNode(new Xc(t)),this}object(...t){let r=["{"];for(let[n,i]of t)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(t,r,n){if(this._blockNode(new Pr(t)),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(t){return this._elseNode(new Pr(t))}else(){return this._elseNode(new wn)}endIf(){return this._endBlockNode(Pr,wn)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Zc(t),r)}forRange(t,r,n,i,o=this.opts.es5?wt.varKinds.var:wt.varKinds.let){let s=this._scope.toName(t);return this._for(new eu(o,s,r,n),()=>i(s))}forOf(t,r,n,i=wt.varKinds.const){let o=this._scope.toName(t);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 As("of",i,o,r),()=>n(o))}forIn(t,r,n,i=this.opts.es5?wt.varKinds.var:wt.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,se._)`Object.keys(${r})`,n);let o=this._scope.toName(t);return this._for(new As("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(Ir)}label(t){return this._leafNode(new Jc(t))}break(t){return this._leafNode(new Kc(t))}return(t){let r=new Ai;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ai)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new tu;if(this._blockNode(i),this.code(t),r){let o=this.name("e");this._currNode=i.catch=new Ni(o),r(o)}return n&&(this._currNode=i.finally=new Mi,this.code(n)),this._endBlockNode(Ni,Mi)}throw(t){return this._leafNode(new Yc(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){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||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=se.nil,n,i){return this._blockNode(new Ti(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Ti)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Pr))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};re.CodeGen=ru;function Rr(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Ns(e,t){return t instanceof se._CodeOrName?Rr(e,t.names):e}function bn(e,t,r){if(e instanceof se.Name)return n(e);if(!i(e))return e;return new se._Code(e._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||t[o.str]!==1?o:(delete t[o.str],s)}function i(o){return o instanceof se._Code&&o._items.some(s=>s instanceof se.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function Y_(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function sy(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,se._)`!${nu(e)}`}re.not=sy;var X_=ay(re.operators.AND);function Q_(...e){return e.reduce(X_)}re.and=Q_;var Z_=ay(re.operators.OR);function eS(...e){return e.reduce(Z_)}re.or=eS;function ay(e){return(t,r)=>t===se.nil?r:r===se.nil?t:(0,se._)`${nu(t)} ${e} ${nu(r)}`}function nu(e){return e instanceof se.Name?e:(0,se._)`(${e})`}});var ie=S(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.checkStrictMode=ne.getErrorPath=ne.Type=ne.useFunc=ne.setEvaluated=ne.evaluatedPropsToName=ne.mergeEvaluated=ne.eachItem=ne.unescapeJsonPointer=ne.escapeJsonPointer=ne.escapeFragment=ne.unescapeFragment=ne.schemaRefOrVal=ne.schemaHasRulesButRef=ne.schemaHasRules=ne.checkUnknownRules=ne.alwaysValidSchema=ne.toHash=void 0;var he=Z(),tS=Ii();function rS(e){let t={};for(let r of e)t[r]=!0;return t}ne.toHash=rS;function nS(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(uy(e,t),!fy(t,e.self.RULES.all))}ne.alwaysValidSchema=nS;function uy(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let o in t)i[o]||hy(e,`unknown keyword: "${o}"`)}ne.checkUnknownRules=uy;function fy(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}ne.schemaHasRules=fy;function iS(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}ne.schemaHasRulesButRef=iS;function oS({topSchemaRef:e,schemaPath:t},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._)`${e}${t}${(0,he.getProperty)(n)}`}ne.schemaRefOrVal=oS;function sS(e){return py(decodeURIComponent(e))}ne.unescapeFragment=sS;function aS(e){return encodeURIComponent(ou(e))}ne.escapeFragment=aS;function ou(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ne.escapeJsonPointer=ou;function py(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ne.unescapeJsonPointer=py;function lS(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}ne.eachItem=lS;function ly({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,o,s,a)=>{let c=s===void 0?o:s instanceof he.Name?(o instanceof he.Name?e(i,o,s):t(i,o,s),s):o instanceof he.Name?(t(i,s,o),o):r(o,s);return a===he.Name&&!(c instanceof he.Name)?n(i,c):c}}ne.mergeEvaluated={props:ly({mergeNames:(e,t,r)=>e.if((0,he._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,he._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,he._)`${r} || {}`).code((0,he._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,he._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,he._)`${r} || {}`),su(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:dy}),items:ly({mergeNames:(e,t,r)=>e.if((0,he._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,he._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,he._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,he._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function dy(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,he._)`{}`);return t!==void 0&&su(e,r,t),r}ne.evaluatedPropsToName=dy;function su(e,t,r){Object.keys(r).forEach(n=>e.assign((0,he._)`${t}${(0,he.getProperty)(n)}`,!0))}ne.setEvaluated=su;var cy={};function cS(e,t){return e.scopeValue("func",{ref:t,code:cy[t.code]||(cy[t.code]=new tS._Code(t.code))})}ne.useFunc=cS;var iu;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(iu||(ne.Type=iu={}));function uS(e,t,r){if(e instanceof he.Name){let n=t===iu.Num;return r?n?(0,he._)`"[" + ${e} + "]"`:(0,he._)`"['" + ${e} + "']"`:n?(0,he._)`"/" + ${e}`:(0,he._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,he.getProperty)(e).toString():"/"+ou(e)}ne.getErrorPath=uS;function hy(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}ne.checkStrictMode=hy});var ft=S(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});var Ve=Z(),fS={data:new Ve.Name("data"),valCxt:new Ve.Name("valCxt"),instancePath:new Ve.Name("instancePath"),parentData:new Ve.Name("parentData"),parentDataProperty:new Ve.Name("parentDataProperty"),rootData:new Ve.Name("rootData"),dynamicAnchors:new Ve.Name("dynamicAnchors"),vErrors:new Ve.Name("vErrors"),errors:new Ve.Name("errors"),this:new Ve.Name("this"),self:new Ve.Name("self"),scope:new Ve.Name("scope"),json:new Ve.Name("json"),jsonPos:new Ve.Name("jsonPos"),jsonLen:new Ve.Name("jsonLen"),jsonPart:new Ve.Name("jsonPart")};au.default=fS});var Oi=S(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.extendErrors=Le.resetErrorsCount=Le.reportExtraError=Le.reportError=Le.keyword$DataError=Le.keywordError=void 0;var ae=Z(),Os=ie(),We=ft();Le.keywordError={message:({keyword:e})=>(0,ae.str)`must pass "${e}" keyword validation`};Le.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,ae.str)`"${e}" keyword must be ${t} ($data)`:(0,ae.str)`"${e}" keyword is invalid ($data)`};function pS(e,t=Le.keywordError,r,n){let{it:i}=e,{gen:o,compositeRule:s,allErrors:a}=i,c=yy(e,t,r);n??(s||a)?my(o,c):gy(i,(0,ae._)`[${c}]`)}Le.reportError=pS;function dS(e,t=Le.keywordError,r){let{it:n}=e,{gen:i,compositeRule:o,allErrors:s}=n,a=yy(e,t,r);my(i,a),o||s||gy(n,We.default.vErrors)}Le.reportExtraError=dS;function hS(e,t){e.assign(We.default.errors,t),e.if((0,ae._)`${We.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,ae._)`${We.default.vErrors}.length`,t),()=>e.assign(We.default.vErrors,null)))}Le.resetErrorsCount=hS;function mS({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let s=e.name("err");e.forRange("i",i,We.default.errors,a=>{e.const(s,(0,ae._)`${We.default.vErrors}[${a}]`),e.if((0,ae._)`${s}.instancePath === undefined`,()=>e.assign((0,ae._)`${s}.instancePath`,(0,ae.strConcat)(We.default.instancePath,o.errorPath))),e.assign((0,ae._)`${s}.schemaPath`,(0,ae.str)`${o.errSchemaPath}/${t}`),o.opts.verbose&&(e.assign((0,ae._)`${s}.schema`,r),e.assign((0,ae._)`${s}.data`,n))})}Le.extendErrors=mS;function my(e,t){let r=e.const("err",t);e.if((0,ae._)`${We.default.vErrors} === null`,()=>e.assign(We.default.vErrors,(0,ae._)`[${r}]`),(0,ae._)`${We.default.vErrors}.push(${r})`),e.code((0,ae._)`${We.default.errors}++`)}function gy(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,ae._)`new ${e.ValidationError}(${t})`):(r.assign((0,ae._)`${n}.errors`,t),r.return(!1))}var Tr={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 yy(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,ae._)`{}`:gS(e,t,r)}function gS(e,t,r={}){let{gen:n,it:i}=e,o=[yS(i,r),vS(e,r)];return wS(e,t,o),n.object(...o)}function yS({errorPath:e},{instancePath:t}){let r=t?(0,ae.str)`${e}${(0,Os.getErrorPath)(t,Os.Type.Str)}`:e;return[We.default.instancePath,(0,ae.strConcat)(We.default.instancePath,r)]}function vS({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,ae.str)`${t}/${e}`;return r&&(i=(0,ae.str)`${i}${(0,Os.getErrorPath)(r,Os.Type.Str)}`),[Tr.schemaPath,i]}function wS(e,{params:t,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=e,{opts:c,propertyName:l,topSchemaRef:p,schemaPath:f}=a;n.push([Tr.keyword,i],[Tr.params,typeof t=="function"?t(e):t||(0,ae._)`{}`]),c.messages&&n.push([Tr.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([Tr.schema,s],[Tr.parentSchema,(0,ae._)`${p}${f}`],[We.default.data,o]),l&&n.push([Tr.propertyName,l])}});var wy=S($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.boolOrEmptySchema=$n.topBoolOrEmptySchema=void 0;var bS=Oi(),$S=Z(),xS=ft(),_S={message:"boolean schema is false"};function SS(e){let{gen:t,schema:r,validateName:n}=e;r===!1?vy(e,!1):typeof r=="object"&&r.$async===!0?t.return(xS.default.data):(t.assign((0,$S._)`${n}.errors`,null),t.return(!0))}$n.topBoolOrEmptySchema=SS;function kS(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),vy(e)):r.var(t,!0)}$n.boolOrEmptySchema=kS;function vy(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,bS.reportError)(i,_S,void 0,t)}});var lu=S(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.getRules=xn.isJSONType=void 0;var CS=["string","number","integer","boolean","null","object","array"],ES=new Set(CS);function PS(e){return typeof e=="string"&&ES.has(e)}xn.isJSONType=PS;function IS(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}xn.getRules=IS});var cu=S(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.shouldUseRule=ir.shouldUseGroup=ir.schemaHasRulesForType=void 0;function RS({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&by(e,n)}ir.schemaHasRulesForType=RS;function by(e,t){return t.rules.some(r=>$y(e,r))}ir.shouldUseGroup=by;function $y(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}ir.shouldUseRule=$y});var Vi=S(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.reportTypeError=je.checkDataTypes=je.checkDataType=je.coerceAndCheckDataType=je.getJSONTypes=je.getSchemaTypes=je.DataType=void 0;var TS=lu(),AS=cu(),NS=Oi(),ee=Z(),xy=ie(),_n;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(_n||(je.DataType=_n={}));function MS(e){let t=_y(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}je.getSchemaTypes=MS;function _y(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(TS.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}je.getJSONTypes=_y;function OS(e,t){let{gen:r,data:n,opts:i}=e,o=VS(t,i.coerceTypes),s=t.length>0&&!(o.length===0&&t.length===1&&(0,AS.schemaHasRulesForType)(e,t[0]));if(s){let a=fu(t,n,i.strictNumbers,_n.Wrong);r.if(a,()=>{o.length?LS(e,t,o):pu(e)})}return s}je.coerceAndCheckDataType=OS;var Sy=new Set(["string","number","integer","boolean","null"]);function VS(e,t){return t?e.filter(r=>Sy.has(r)||t==="array"&&r==="array"):[]}function LS(e,t,r){let{gen:n,data:i,opts:o}=e,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(fu(t,i,o.strictNumbers),()=>n.assign(a,i))),n.if((0,ee._)`${a} !== undefined`);for(let l of r)(Sy.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),pu(e),n.endIf(),n.if((0,ee._)`${a} !== undefined`,()=>{n.assign(i,a),jS(e,a)});function c(l){switch(l){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
395
+ ${await ry(f,"utf-8")}`),p}var as=K(()=>{"use strict";Mt();pi();Dc()});var Ii=S(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 Ei=class{};le._CodeOrName=Ei;le.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ar=class extends Ei{constructor(t){if(super(),!le.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};le.Name=Ar;var ut=class extends Ei{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof Ar&&(r[n.str]=(r[n.str]||0)+1),r),{})}};le._Code=ut;le.nil=new ut("");function vy(e,...t){let r=[e[0]],n=0;for(;n<t.length;)Xc(r,t[n]),r.push(e[++n]);return new ut(r)}le._=vy;var Yc=new ut("+");function wy(e,...t){let r=[Pi(e[0])],n=0;for(;n<t.length;)r.push(Yc),Xc(r,t[n]),r.push(Yc,Pi(e[++n]));return fS(r),new ut(r)}le.str=wy;function Xc(e,t){t instanceof ut?e.push(...t._items):t instanceof Ar?e.push(t):e.push(hS(t))}le.addCodeArg=Xc;function fS(e){let t=1;for(;t<e.length-1;){if(e[t]===Yc){let r=pS(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function pS(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Ar||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Ar))return`"${e}${t.slice(1)}`}function dS(e,t){return t.emptyStr()?e:e.emptyStr()?t:wy`${e}${t}`}le.strConcat=dS;function hS(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Pi(Array.isArray(e)?e.join(","):e)}function mS(e){return new ut(Pi(e))}le.stringify=mS;function Pi(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}le.safeStringify=Pi;function gS(e){return typeof e=="string"&&le.IDENTIFIER.test(e)?new ut(`.${e}`):vy`[${e}]`}le.getProperty=gS;function yS(e){if(typeof e=="string"&&le.IDENTIFIER.test(e))return new ut(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}le.getEsmExportName=yS;function vS(e){return new ut(e.toString())}le.regexpCode=vS});var eu=S(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.ValueScope=Je.ValueScopeName=Je.Scope=Je.varKinds=Je.UsedValueState=void 0;var Ge=Ii(),Qc=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Rs;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Rs||(Je.UsedValueState=Rs={}));Je.varKinds={const:new Ge.Name("const"),let:new Ge.Name("let"),var:new Ge.Name("var")};var Ts=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Ge.Name?t:this.name(t)}name(t){return new Ge.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Je.Scope=Ts;var As=class extends Ge.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,Ge._)`.${new Ge.Name(r)}[${n}]`}};Je.ValueScopeName=As;var wS=(0,Ge._)`\n`,Zc=class extends Ts{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?wS:Ge.nil}}get(){return this._scope}name(t){return new As(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:o}=i,s=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[o];if(a){let p=a.get(s);if(p)return p}else a=this._values[o]=new Map;a.set(s,i);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=r.ref,i.setValue(r,{property:o,itemIndex:l}),i}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Ge._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(t,r,n={},i){let o=Ge.nil;for(let s in t){let a=t[s];if(!a)continue;let c=n[s]=n[s]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,Rs.Started);let p=r(l);if(p){let f=this.opts.es5?Je.varKinds.var:Je.varKinds.const;o=(0,Ge._)`${o}${f} ${l} = ${p};${this.opts._n}`}else if(p=i?.(l))o=(0,Ge._)`${o}${p}${this.opts._n}`;else throw new Qc(l);c.set(l,Rs.Completed)})}return o}};Je.ValueScope=Zc});var Z=S(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.or=re.and=re.not=re.CodeGen=re.operators=re.varKinds=re.ValueScopeName=re.ValueScope=re.Scope=re.Name=re.regexpCode=re.stringify=re.getProperty=re.nil=re.strConcat=re.str=re._=void 0;var se=Ii(),bt=eu(),ar=Ii();Object.defineProperty(re,"_",{enumerable:!0,get:function(){return ar._}});Object.defineProperty(re,"str",{enumerable:!0,get:function(){return ar.str}});Object.defineProperty(re,"strConcat",{enumerable:!0,get:function(){return ar.strConcat}});Object.defineProperty(re,"nil",{enumerable:!0,get:function(){return ar.nil}});Object.defineProperty(re,"getProperty",{enumerable:!0,get:function(){return ar.getProperty}});Object.defineProperty(re,"stringify",{enumerable:!0,get:function(){return ar.stringify}});Object.defineProperty(re,"regexpCode",{enumerable:!0,get:function(){return ar.regexpCode}});Object.defineProperty(re,"Name",{enumerable:!0,get:function(){return ar.Name}});var Vs=eu();Object.defineProperty(re,"Scope",{enumerable:!0,get:function(){return Vs.Scope}});Object.defineProperty(re,"ValueScope",{enumerable:!0,get:function(){return Vs.ValueScope}});Object.defineProperty(re,"ValueScopeName",{enumerable:!0,get:function(){return Vs.ValueScopeName}});Object.defineProperty(re,"varKinds",{enumerable:!0,get:function(){return Vs.varKinds}});re.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 Gt=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},tu=class extends Gt{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?bt.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Cn(this.rhs,t,r)),this}get names(){return this.rhs instanceof se._CodeOrName?this.rhs.names:{}}},Ns=class extends Gt{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof se.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Cn(this.rhs,t,r),this}get names(){let t=this.lhs instanceof se.Name?{}:{...this.lhs.names};return Ms(t,this.rhs)}},ru=class extends Ns{constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},nu=class extends Gt{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},iu=class extends Gt{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},ou=class extends Gt{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},su=class extends Gt{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Cn(this.code,t,r),this}get names(){return this.code instanceof se._CodeOrName?this.code.names:{}}},Ri=class extends Gt{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(t,r)||(bS(t,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Mr(t,r.names),{})}},Jt=class extends Ri{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},au=class extends Ri{},kn=class extends Jt{};kn.kind="else";var Nr=class e extends Jt{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new kn(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(by(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Cn(this.condition,t,r),this}get names(){let t=super.names;return Ms(t,this.condition),this.else&&Mr(t,this.else.names),t}};Nr.kind="if";var Or=class extends Jt{};Or.kind="for";var lu=class extends Or{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Cn(this.iteration,t,r),this}get names(){return Mr(super.names,this.iteration.names)}},cu=class extends Or{constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?bt.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(t)}get names(){let t=Ms(super.names,this.from);return Ms(t,this.to)}},Os=class extends Or{constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Cn(this.iterable,t,r),this}get names(){return Mr(super.names,this.iterable.names)}},Ti=class extends Jt{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Ti.kind="func";var Ai=class extends Ri{render(t){return"return "+super.render(t)}};Ai.kind="return";var uu=class extends Jt{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Mr(t,this.catch.names),this.finally&&Mr(t,this.finally.names),t}},Ni=class extends Jt{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Ni.kind="catch";var Oi=class extends Jt{render(t){return"finally"+super.render(t)}};Oi.kind="finally";var fu=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
396
+ `:""},this._extScope=t,this._scope=new bt.Scope({parent:t}),this._nodes=[new au]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new tu(t,o,n)),o}const(t,r,n){return this._def(bt.varKinds.const,t,r,n)}let(t,r,n){return this._def(bt.varKinds.let,t,r,n)}var(t,r,n){return this._def(bt.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new Ns(t,r,n))}add(t,r){return this._leafNode(new ru(t,re.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==se.nil&&this._leafNode(new su(t)),this}object(...t){let r=["{"];for(let[n,i]of t)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(t,r,n){if(this._blockNode(new Nr(t)),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(t){return this._elseNode(new Nr(t))}else(){return this._elseNode(new kn)}endIf(){return this._endBlockNode(Nr,kn)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new lu(t),r)}forRange(t,r,n,i,o=this.opts.es5?bt.varKinds.var:bt.varKinds.let){let s=this._scope.toName(t);return this._for(new cu(o,s,r,n),()=>i(s))}forOf(t,r,n,i=bt.varKinds.const){let o=this._scope.toName(t);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 Os("of",i,o,r),()=>n(o))}forIn(t,r,n,i=this.opts.es5?bt.varKinds.var:bt.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,se._)`Object.keys(${r})`,n);let o=this._scope.toName(t);return this._for(new Os("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(Or)}label(t){return this._leafNode(new nu(t))}break(t){return this._leafNode(new iu(t))}return(t){let r=new Ai;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ai)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new uu;if(this._blockNode(i),this.code(t),r){let o=this.name("e");this._currNode=i.catch=new Ni(o),r(o)}return n&&(this._currNode=i.finally=new Oi,this.code(n)),this._endBlockNode(Ni,Oi)}throw(t){return this._leafNode(new ou(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){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||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=se.nil,n,i){return this._blockNode(new Ti(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Ti)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Nr))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};re.CodeGen=fu;function Mr(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Ms(e,t){return t instanceof se._CodeOrName?Mr(e,t.names):e}function Cn(e,t,r){if(e instanceof se.Name)return n(e);if(!i(e))return e;return new se._Code(e._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||t[o.str]!==1?o:(delete t[o.str],s)}function i(o){return o instanceof se._Code&&o._items.some(s=>s instanceof se.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function bS(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function by(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,se._)`!${pu(e)}`}re.not=by;var $S=$y(re.operators.AND);function xS(...e){return e.reduce($S)}re.and=xS;var _S=$y(re.operators.OR);function SS(...e){return e.reduce(_S)}re.or=SS;function $y(e){return(t,r)=>t===se.nil?r:r===se.nil?t:(0,se._)`${pu(t)} ${e} ${pu(r)}`}function pu(e){return e instanceof se.Name?e:(0,se._)`(${e})`}});var ie=S(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.checkStrictMode=ne.getErrorPath=ne.Type=ne.useFunc=ne.setEvaluated=ne.evaluatedPropsToName=ne.mergeEvaluated=ne.eachItem=ne.unescapeJsonPointer=ne.escapeJsonPointer=ne.escapeFragment=ne.unescapeFragment=ne.schemaRefOrVal=ne.schemaHasRulesButRef=ne.schemaHasRules=ne.checkUnknownRules=ne.alwaysValidSchema=ne.toHash=void 0;var he=Z(),kS=Ii();function CS(e){let t={};for(let r of e)t[r]=!0;return t}ne.toHash=CS;function ES(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Sy(e,t),!ky(t,e.self.RULES.all))}ne.alwaysValidSchema=ES;function Sy(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let o in t)i[o]||Py(e,`unknown keyword: "${o}"`)}ne.checkUnknownRules=Sy;function ky(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}ne.schemaHasRules=ky;function PS(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}ne.schemaHasRulesButRef=PS;function IS({topSchemaRef:e,schemaPath:t},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._)`${e}${t}${(0,he.getProperty)(n)}`}ne.schemaRefOrVal=IS;function RS(e){return Cy(decodeURIComponent(e))}ne.unescapeFragment=RS;function TS(e){return encodeURIComponent(hu(e))}ne.escapeFragment=TS;function hu(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ne.escapeJsonPointer=hu;function Cy(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ne.unescapeJsonPointer=Cy;function AS(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}ne.eachItem=AS;function xy({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,o,s,a)=>{let c=s===void 0?o:s instanceof he.Name?(o instanceof he.Name?e(i,o,s):t(i,o,s),s):o instanceof he.Name?(t(i,s,o),o):r(o,s);return a===he.Name&&!(c instanceof he.Name)?n(i,c):c}}ne.mergeEvaluated={props:xy({mergeNames:(e,t,r)=>e.if((0,he._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,he._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,he._)`${r} || {}`).code((0,he._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,he._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,he._)`${r} || {}`),mu(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Ey}),items:xy({mergeNames:(e,t,r)=>e.if((0,he._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,he._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,he._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,he._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Ey(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,he._)`{}`);return t!==void 0&&mu(e,r,t),r}ne.evaluatedPropsToName=Ey;function mu(e,t,r){Object.keys(r).forEach(n=>e.assign((0,he._)`${t}${(0,he.getProperty)(n)}`,!0))}ne.setEvaluated=mu;var _y={};function NS(e,t){return e.scopeValue("func",{ref:t,code:_y[t.code]||(_y[t.code]=new kS._Code(t.code))})}ne.useFunc=NS;var du;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(du||(ne.Type=du={}));function OS(e,t,r){if(e instanceof he.Name){let n=t===du.Num;return r?n?(0,he._)`"[" + ${e} + "]"`:(0,he._)`"['" + ${e} + "']"`:n?(0,he._)`"/" + ${e}`:(0,he._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,he.getProperty)(e).toString():"/"+hu(e)}ne.getErrorPath=OS;function Py(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}ne.checkStrictMode=Py});var ft=S(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});var Le=Z(),MS={data:new Le.Name("data"),valCxt:new Le.Name("valCxt"),instancePath:new Le.Name("instancePath"),parentData:new Le.Name("parentData"),parentDataProperty:new Le.Name("parentDataProperty"),rootData:new Le.Name("rootData"),dynamicAnchors:new Le.Name("dynamicAnchors"),vErrors:new Le.Name("vErrors"),errors:new Le.Name("errors"),this:new Le.Name("this"),self:new Le.Name("self"),scope:new Le.Name("scope"),json:new Le.Name("json"),jsonPos:new Le.Name("jsonPos"),jsonLen:new Le.Name("jsonLen"),jsonPart:new Le.Name("jsonPart")};gu.default=MS});var Mi=S(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.extendErrors=je.resetErrorsCount=je.reportExtraError=je.reportError=je.keyword$DataError=je.keywordError=void 0;var ae=Z(),Ls=ie(),We=ft();je.keywordError={message:({keyword:e})=>(0,ae.str)`must pass "${e}" keyword validation`};je.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,ae.str)`"${e}" keyword must be ${t} ($data)`:(0,ae.str)`"${e}" keyword is invalid ($data)`};function VS(e,t=je.keywordError,r,n){let{it:i}=e,{gen:o,compositeRule:s,allErrors:a}=i,c=Ty(e,t,r);n??(s||a)?Iy(o,c):Ry(i,(0,ae._)`[${c}]`)}je.reportError=VS;function LS(e,t=je.keywordError,r){let{it:n}=e,{gen:i,compositeRule:o,allErrors:s}=n,a=Ty(e,t,r);Iy(i,a),o||s||Ry(n,We.default.vErrors)}je.reportExtraError=LS;function jS(e,t){e.assign(We.default.errors,t),e.if((0,ae._)`${We.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,ae._)`${We.default.vErrors}.length`,t),()=>e.assign(We.default.vErrors,null)))}je.resetErrorsCount=jS;function DS({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let s=e.name("err");e.forRange("i",i,We.default.errors,a=>{e.const(s,(0,ae._)`${We.default.vErrors}[${a}]`),e.if((0,ae._)`${s}.instancePath === undefined`,()=>e.assign((0,ae._)`${s}.instancePath`,(0,ae.strConcat)(We.default.instancePath,o.errorPath))),e.assign((0,ae._)`${s}.schemaPath`,(0,ae.str)`${o.errSchemaPath}/${t}`),o.opts.verbose&&(e.assign((0,ae._)`${s}.schema`,r),e.assign((0,ae._)`${s}.data`,n))})}je.extendErrors=DS;function Iy(e,t){let r=e.const("err",t);e.if((0,ae._)`${We.default.vErrors} === null`,()=>e.assign(We.default.vErrors,(0,ae._)`[${r}]`),(0,ae._)`${We.default.vErrors}.push(${r})`),e.code((0,ae._)`${We.default.errors}++`)}function Ry(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,ae._)`new ${e.ValidationError}(${t})`):(r.assign((0,ae._)`${n}.errors`,t),r.return(!1))}var Vr={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 Ty(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,ae._)`{}`:FS(e,t,r)}function FS(e,t,r={}){let{gen:n,it:i}=e,o=[qS(i,r),BS(e,r)];return HS(e,t,o),n.object(...o)}function qS({errorPath:e},{instancePath:t}){let r=t?(0,ae.str)`${e}${(0,Ls.getErrorPath)(t,Ls.Type.Str)}`:e;return[We.default.instancePath,(0,ae.strConcat)(We.default.instancePath,r)]}function BS({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,ae.str)`${t}/${e}`;return r&&(i=(0,ae.str)`${i}${(0,Ls.getErrorPath)(r,Ls.Type.Str)}`),[Vr.schemaPath,i]}function HS(e,{params:t,message:r},n){let{keyword:i,data:o,schemaValue:s,it:a}=e,{opts:c,propertyName:l,topSchemaRef:p,schemaPath:f}=a;n.push([Vr.keyword,i],[Vr.params,typeof t=="function"?t(e):t||(0,ae._)`{}`]),c.messages&&n.push([Vr.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([Vr.schema,s],[Vr.parentSchema,(0,ae._)`${p}${f}`],[We.default.data,o]),l&&n.push([Vr.propertyName,l])}});var Ny=S(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.boolOrEmptySchema=En.topBoolOrEmptySchema=void 0;var WS=Mi(),US=Z(),zS=ft(),GS={message:"boolean schema is false"};function JS(e){let{gen:t,schema:r,validateName:n}=e;r===!1?Ay(e,!1):typeof r=="object"&&r.$async===!0?t.return(zS.default.data):(t.assign((0,US._)`${n}.errors`,null),t.return(!0))}En.topBoolOrEmptySchema=JS;function KS(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),Ay(e)):r.var(t,!0)}En.boolOrEmptySchema=KS;function Ay(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,WS.reportError)(i,GS,void 0,t)}});var yu=S(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.getRules=Pn.isJSONType=void 0;var YS=["string","number","integer","boolean","null","object","array"],XS=new Set(YS);function QS(e){return typeof e=="string"&&XS.has(e)}Pn.isJSONType=QS;function ZS(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Pn.getRules=ZS});var vu=S(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.shouldUseRule=lr.shouldUseGroup=lr.schemaHasRulesForType=void 0;function ek({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&Oy(e,n)}lr.schemaHasRulesForType=ek;function Oy(e,t){return t.rules.some(r=>My(e,r))}lr.shouldUseGroup=Oy;function My(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}lr.shouldUseRule=My});var Vi=S(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.reportTypeError=De.checkDataTypes=De.checkDataType=De.coerceAndCheckDataType=De.getJSONTypes=De.getSchemaTypes=De.DataType=void 0;var tk=yu(),rk=vu(),nk=Mi(),ee=Z(),Vy=ie(),In;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(In||(De.DataType=In={}));function ik(e){let t=Ly(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}De.getSchemaTypes=ik;function Ly(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(tk.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}De.getJSONTypes=Ly;function ok(e,t){let{gen:r,data:n,opts:i}=e,o=sk(t,i.coerceTypes),s=t.length>0&&!(o.length===0&&t.length===1&&(0,rk.schemaHasRulesForType)(e,t[0]));if(s){let a=bu(t,n,i.strictNumbers,In.Wrong);r.if(a,()=>{o.length?ak(e,t,o):$u(e)})}return s}De.coerceAndCheckDataType=ok;var jy=new Set(["string","number","integer","boolean","null"]);function sk(e,t){return t?e.filter(r=>jy.has(r)||t==="array"&&r==="array"):[]}function ak(e,t,r){let{gen:n,data:i,opts:o}=e,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(bu(t,i,o.strictNumbers),()=>n.assign(a,i))),n.if((0,ee._)`${a} !== undefined`);for(let l of r)(jy.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),$u(e),n.endIf(),n.if((0,ee._)`${a} !== undefined`,()=>{n.assign(i,a),lk(e,a)});function c(l){switch(l){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
397
397
  || (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,ee._)`+${i}`);return;case"integer":n.elseIf((0,ee._)`${s} === "boolean" || ${i} === null
398
398
  || (${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"
399
- || ${s} === "boolean" || ${i} === null`).assign(a,(0,ee._)`[${i}]`)}}}function jS({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,ee._)`${t} !== undefined`,()=>e.assign((0,ee._)`${t}[${r}]`,n))}function uu(e,t,r,n=_n.Correct){let i=n===_n.Correct?ee.operators.EQ:ee.operators.NEQ,o;switch(e){case"null":return(0,ee._)`${t} ${i} null`;case"array":o=(0,ee._)`Array.isArray(${t})`;break;case"object":o=(0,ee._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=s((0,ee._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=s();break;default:return(0,ee._)`typeof ${t} ${i} ${e}`}return n===_n.Correct?o:(0,ee.not)(o);function s(a=ee.nil){return(0,ee.and)((0,ee._)`typeof ${t} == "number"`,a,r?(0,ee._)`isFinite(${t})`:ee.nil)}}je.checkDataType=uu;function fu(e,t,r,n){if(e.length===1)return uu(e[0],t,r,n);let i,o=(0,xy.toHash)(e);if(o.array&&o.object){let s=(0,ee._)`typeof ${t} != "object"`;i=o.null?s:(0,ee._)`!${t} || ${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,uu(s,t,r,n));return i}je.checkDataTypes=fu;var DS={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,ee._)`{type: ${e}}`:(0,ee._)`{type: ${t}}`};function pu(e){let t=FS(e);(0,NS.reportError)(t,DS)}je.reportTypeError=pu;function FS(e){let{gen:t,data:r,schema:n}=e,i=(0,xy.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}});var Cy=S(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});Vs.assignDefaults=void 0;var Sn=Z(),qS=ie();function BS(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)ky(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>ky(e,o,i.default))}Vs.assignDefaults=BS;function ky(e,t,r){let{gen:n,compositeRule:i,data:o,opts:s}=e;if(r===void 0)return;let a=(0,Sn._)`${o}${(0,Sn.getProperty)(t)}`;if(i){(0,qS.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,Sn._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,Sn._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,Sn._)`${a} = ${(0,Sn.stringify)(r)}`)}});var pt=S(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.validateUnion=pe.validateArray=pe.usePattern=pe.callValidateCode=pe.schemaProperties=pe.allSchemaProperties=pe.noPropertyInData=pe.propertyInData=pe.isOwnProperty=pe.hasPropFunc=pe.reportMissingProp=pe.checkMissingProp=pe.checkReportMissingProp=void 0;var ye=Z(),du=ie(),or=ft(),HS=ie();function WS(e,t){let{gen:r,data:n,it:i}=e;r.if(mu(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,ye._)`${t}`},!0),e.error()})}pe.checkReportMissingProp=WS;function US({gen:e,data:t,it:{opts:r}},n,i){return(0,ye.or)(...n.map(o=>(0,ye.and)(mu(e,t,o,r.ownProperties),(0,ye._)`${i} = ${o}`)))}pe.checkMissingProp=US;function zS(e,t){e.setParams({missingProperty:t},!0),e.error()}pe.reportMissingProp=zS;function Ey(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ye._)`Object.prototype.hasOwnProperty`})}pe.hasPropFunc=Ey;function hu(e,t,r){return(0,ye._)`${Ey(e)}.call(${t}, ${r})`}pe.isOwnProperty=hu;function GS(e,t,r,n){let i=(0,ye._)`${t}${(0,ye.getProperty)(r)} !== undefined`;return n?(0,ye._)`${i} && ${hu(e,t,r)}`:i}pe.propertyInData=GS;function mu(e,t,r,n){let i=(0,ye._)`${t}${(0,ye.getProperty)(r)} === undefined`;return n?(0,ye.or)(i,(0,ye.not)(hu(e,t,r))):i}pe.noPropertyInData=mu;function Py(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}pe.allSchemaProperties=Py;function JS(e,t){return Py(t).filter(r=>!(0,du.alwaysValidSchema)(e,t[r]))}pe.schemaProperties=JS;function KS({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,c,l){let p=l?(0,ye._)`${e}, ${t}, ${n}${i}`:t,f=[[or.default.instancePath,(0,ye.strConcat)(or.default.instancePath,o)],[or.default.parentData,s.parentData],[or.default.parentDataProperty,s.parentDataProperty],[or.default.rootData,or.default.rootData]];s.opts.dynamicRef&&f.push([or.default.dynamicAnchors,or.default.dynamicAnchors]);let h=(0,ye._)`${p}, ${r.object(...f)}`;return c!==ye.nil?(0,ye._)`${a}.call(${c}, ${h})`:(0,ye._)`${a}(${h})`}pe.callValidateCode=KS;var YS=(0,ye._)`new RegExp`;function XS({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,ye._)`${i.code==="new RegExp"?YS:(0,HS.useFunc)(e,i)}(${r}, ${n})`})}pe.usePattern=XS;function QS(e){let{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){let a=t.let("valid",!0);return s(()=>t.assign(a,!1)),a}return t.var(o,!0),s(()=>t.break()),o;function s(a){let c=t.const("len",(0,ye._)`${r}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:du.Type.Num},o),t.if((0,ye.not)(o),a)})}}pe.validateArray=QS;function ZS(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,du.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let s=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let p=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},a);t.assign(s,(0,ye._)`${s} || ${a}`),e.mergeValidEvaluated(p,a)||t.if((0,ye.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}pe.validateUnion=ZS});var Ty=S(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.validateKeywordUsage=It.validSchemaType=It.funcKeywordCode=It.macroKeywordCode=void 0;var Ue=Z(),Ar=ft(),ek=pt(),tk=Oi();function rk(e,t){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=e,a=t.macro.call(s.self,i,o,s),c=Ry(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=r.name("valid");e.subschema({schema:a,schemaPath:Ue.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}It.macroKeywordCode=rk;function nk(e,t){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:c}=e;ok(c,t);let l=!a&&t.compile?t.compile.call(c.self,o,s,c):t.validate,p=Ry(n,i,l),f=n.let("valid");e.block$data(f,h),e.ok((r=t.valid)!==null&&r!==void 0?r:f);function h(){if(t.errors===!1)g(),t.modifying&&Iy(e),v(()=>e.error());else{let $=t.async?m():y();t.modifying&&Iy(e),v(()=>ik(e,$))}}function m(){let $=n.let("ruleErrs",null);return n.try(()=>g((0,Ue._)`await `),I=>n.assign(f,!1).if((0,Ue._)`${I} instanceof ${c.ValidationError}`,()=>n.assign($,(0,Ue._)`${I}.errors`),()=>n.throw(I))),$}function y(){let $=(0,Ue._)`${p}.errors`;return n.assign($,null),g(Ue.nil),$}function g($=t.async?(0,Ue._)`await `:Ue.nil){let I=c.opts.passContext?Ar.default.this:Ar.default.self,_=!("compile"in t&&!a||t.schema===!1);n.assign(f,(0,Ue._)`${$}${(0,ek.callValidateCode)(e,p,I,_)}`,t.modifying)}function v($){var I;n.if((0,Ue.not)((I=t.valid)!==null&&I!==void 0?I:f),$)}}It.funcKeywordCode=nk;function Iy(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Ue._)`${n.parentData}[${n.parentDataProperty}]`))}function ik(e,t){let{gen:r}=e;r.if((0,Ue._)`Array.isArray(${t})`,()=>{r.assign(Ar.default.vErrors,(0,Ue._)`${Ar.default.vErrors} === null ? ${t} : ${Ar.default.vErrors}.concat(${t})`).assign(Ar.default.errors,(0,Ue._)`${Ar.default.vErrors}.length`),(0,tk.extendErrors)(e)},()=>e.error())}function ok({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Ry(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Ue.stringify)(r)})}function sk(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}It.validSchemaType=sk;function ak({schema:e,opts:t,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(e,a)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}It.validateKeywordUsage=ak});var Ny=S(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.extendSubschemaMode=sr.extendSubschemaData=sr.getSubschema=void 0;var Rt=Z(),Ay=ie();function lk(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:s}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,Rt._)`${e.schemaPath}${(0,Rt.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,Rt._)`${e.schemaPath}${(0,Rt.getProperty)(t)}${(0,Rt.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Ay.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')}sr.getSubschema=lk;function ck(e,t,{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}=t;if(r!==void 0){let{errorPath:l,dataPathArr:p,opts:f}=t,h=a.let("data",(0,Rt._)`${t.data}${(0,Rt.getProperty)(r)}`,!0);c(h),e.errorPath=(0,Rt.str)`${l}${(0,Ay.getErrorPath)(r,n,f.jsPropertySyntax)}`,e.parentDataProperty=(0,Rt._)`${r}`,e.dataPathArr=[...p,e.parentDataProperty]}if(i!==void 0){let l=i instanceof Rt.Name?i:a.let("data",i,!0);c(l),s!==void 0&&(e.propertyName=s)}o&&(e.dataTypes=o);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}sr.extendSubschemaData=ck;function uk(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}sr.extendSubschemaMode=uk});var gu=S((mO,My)=>{"use strict";My.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),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(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var Vy=S((gO,Oy)=>{"use strict";var ar=Oy.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};Ls(t,n,i,e,"",e)};ar.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ar.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ar.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ar.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 Ls(e,t,r,n,i,o,s,a,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,o,s,a,c,l);for(var p in n){var f=n[p];if(Array.isArray(f)){if(p in ar.arrayKeywords)for(var h=0;h<f.length;h++)Ls(e,t,r,f[h],i+"/"+p+"/"+h,o,i,p,n,h)}else if(p in ar.propsKeywords){if(f&&typeof f=="object")for(var m in f)Ls(e,t,r,f[m],i+"/"+p+"/"+fk(m),o,i,p,n,m)}else(p in ar.keywords||e.allKeys&&!(p in ar.skipKeywords))&&Ls(e,t,r,f,i+"/"+p,o,i,p,n)}r(n,i,o,s,a,c,l)}}function fk(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Li=S(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.getSchemaRefs=Ke.resolveUrl=Ke.normalizeId=Ke._getFullPath=Ke.getFullPath=Ke.inlineRef=void 0;var pk=ie(),dk=gu(),hk=Vy(),mk=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function gk(e,t=!0){return typeof e=="boolean"?!0:t===!0?!yu(e):t?Ly(e)<=t:!1}Ke.inlineRef=gk;var yk=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function yu(e){for(let t in e){if(yk.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(yu)||typeof r=="object"&&yu(r))return!0}return!1}function Ly(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!mk.has(r)&&(typeof e[r]=="object"&&(0,pk.eachItem)(e[r],n=>t+=Ly(n)),t===1/0))return 1/0}return t}function jy(e,t="",r){r!==!1&&(t=kn(t));let n=e.parse(t);return Dy(e,n)}Ke.getFullPath=jy;function Dy(e,t){return e.serialize(t).split("#")[0]+"#"}Ke._getFullPath=Dy;var vk=/#\/?$/;function kn(e){return e?e.replace(vk,""):""}Ke.normalizeId=kn;function wk(e,t,r){return r=kn(r),e.resolve(t,r)}Ke.resolveUrl=wk;var bk=/^[a-z_][-a-z0-9._]*$/i;function $k(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=kn(e[r]||t),o={"":i},s=jy(n,i,!1),a={},c=new Set;return hk(e,{allKeys:!0},(f,h,m,y)=>{if(y===void 0)return;let g=s+h,v=o[y];typeof f[r]=="string"&&(v=$.call(this,f[r])),I.call(this,f.$anchor),I.call(this,f.$dynamicAnchor),o[h]=v;function $(_){let R=this.opts.uriResolver.resolve;if(_=kn(v?R(v,_):_),c.has(_))throw p(_);c.add(_);let N=this.refs[_];return typeof N=="string"&&(N=this.refs[N]),typeof N=="object"?l(f,N.schema,_):_!==kn(g)&&(_[0]==="#"?(l(f,a[_],_),a[_]=f):this.refs[_]=g),_}function I(_){if(typeof _=="string"){if(!bk.test(_))throw new Error(`invalid anchor "${_}"`);$.call(this,`#${_}`)}}}),a;function l(f,h,m){if(h!==void 0&&!dk(f,h))throw p(m)}function p(f){return new Error(`reference "${f}" resolves to more than one schema`)}}Ke.getSchemaRefs=$k});var Fi=S(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.getData=lr.KeywordCxt=lr.validateFunctionCode=void 0;var Wy=wy(),Fy=Vi(),wu=cu(),js=Vi(),xk=Cy(),Di=Ty(),vu=Ny(),W=Z(),X=ft(),_k=Li(),Gt=ie(),ji=Oi();function Sk(e){if(Gy(e)&&(Jy(e),zy(e))){Ek(e);return}Uy(e,()=>(0,Wy.topBoolOrEmptySchema)(e))}lr.validateFunctionCode=Sk;function Uy({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,W._)`${X.default.data}, ${X.default.valCxt}`,n.$async,()=>{e.code((0,W._)`"use strict"; ${qy(r,i)}`),Ck(e,i),e.code(o)}):e.func(t,(0,W._)`${X.default.data}, ${kk(i)}`,n.$async,()=>e.code(qy(r,i)).code(o))}function kk(e){return(0,W._)`{${X.default.instancePath}="", ${X.default.parentData}, ${X.default.parentDataProperty}, ${X.default.rootData}=${X.default.data}${e.dynamicRef?(0,W._)`, ${X.default.dynamicAnchors}={}`:W.nil}}={}`}function Ck(e,t){e.if(X.default.valCxt,()=>{e.var(X.default.instancePath,(0,W._)`${X.default.valCxt}.${X.default.instancePath}`),e.var(X.default.parentData,(0,W._)`${X.default.valCxt}.${X.default.parentData}`),e.var(X.default.parentDataProperty,(0,W._)`${X.default.valCxt}.${X.default.parentDataProperty}`),e.var(X.default.rootData,(0,W._)`${X.default.valCxt}.${X.default.rootData}`),t.dynamicRef&&e.var(X.default.dynamicAnchors,(0,W._)`${X.default.valCxt}.${X.default.dynamicAnchors}`)},()=>{e.var(X.default.instancePath,(0,W._)`""`),e.var(X.default.parentData,(0,W._)`undefined`),e.var(X.default.parentDataProperty,(0,W._)`undefined`),e.var(X.default.rootData,X.default.data),t.dynamicRef&&e.var(X.default.dynamicAnchors,(0,W._)`{}`)})}function Ek(e){let{schema:t,opts:r,gen:n}=e;Uy(e,()=>{r.$comment&&t.$comment&&Yy(e),Ak(e),n.let(X.default.vErrors,null),n.let(X.default.errors,0),r.unevaluated&&Pk(e),Ky(e),Ok(e)})}function Pk(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,W._)`${r}.evaluated`),t.if((0,W._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,W._)`${e.evaluated}.props`,(0,W._)`undefined`)),t.if((0,W._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,W._)`${e.evaluated}.items`,(0,W._)`undefined`))}function qy(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,W._)`/*# sourceURL=${r} */`:W.nil}function Ik(e,t){if(Gy(e)&&(Jy(e),zy(e))){Rk(e,t);return}(0,Wy.boolOrEmptySchema)(e,t)}function zy({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function Gy(e){return typeof e.schema!="boolean"}function Rk(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&Yy(e),Nk(e),Mk(e);let o=n.const("_errs",X.default.errors);Ky(e,o),n.var(t,(0,W._)`${o} === ${X.default.errors}`)}function Jy(e){(0,Gt.checkUnknownRules)(e),Tk(e)}function Ky(e,t){if(e.opts.jtd)return By(e,[],!1,t);let r=(0,Fy.getSchemaTypes)(e.schema),n=(0,Fy.coerceAndCheckDataType)(e,r);By(e,r,!n,t)}function Tk(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Gt.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Ak(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Gt.checkStrictMode)(e,"default is ignored in the schema root")}function Nk(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,_k.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function Mk(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Yy({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)e.code((0,W._)`${X.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,W.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,W._)`${X.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function Ok(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,W._)`${X.default.errors} === 0`,()=>t.return(X.default.data),()=>t.throw((0,W._)`new ${i}(${X.default.vErrors})`)):(t.assign((0,W._)`${n}.errors`,X.default.vErrors),o.unevaluated&&Vk(e),t.return((0,W._)`${X.default.errors} === 0`))}function Vk({gen:e,evaluated:t,props:r,items:n}){r instanceof W.Name&&e.assign((0,W._)`${t}.props`,r),n instanceof W.Name&&e.assign((0,W._)`${t}.items`,n)}function By(e,t,r,n){let{gen:i,schema:o,data:s,allErrors:a,opts:c,self:l}=e,{RULES:p}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Gt.schemaHasRulesButRef)(o,p))){i.block(()=>Qy(e,"$ref",p.all.$ref.definition));return}c.jtd||Lk(e,t),i.block(()=>{for(let h of p.rules)f(h);f(p.post)});function f(h){(0,wu.shouldUseGroup)(o,h)&&(h.type?(i.if((0,js.checkDataType)(h.type,s,c.strictNumbers)),Hy(e,h),t.length===1&&t[0]===h.type&&r&&(i.else(),(0,js.reportTypeError)(e)),i.endIf()):Hy(e,h),a||i.if((0,W._)`${X.default.errors} === ${n||0}`))}}function Hy(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,xk.assignDefaults)(e,t.type),r.block(()=>{for(let o of t.rules)(0,wu.shouldUseRule)(n,o)&&Qy(e,o.keyword,o.definition,t.type)})}function Lk(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(jk(e,t),e.opts.allowUnionTypes||Dk(e,t),Fk(e,e.dataTypes))}function jk(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Xy(e.dataTypes,r)||bu(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),Bk(e,t)}}function Dk(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&bu(e,"use allowUnionTypes to allow union type keyword")}function Fk(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,wu.shouldUseRule)(e.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>qk(t,s))&&bu(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function qk(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Xy(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function Bk(e,t){let r=[];for(let n of e.dataTypes)Xy(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function bu(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Gt.checkStrictMode)(e,t,e.opts.strictTypes)}var Ds=class{constructor(t,r,n){if((0,Di.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Gt.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Zy(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Di.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=t.gen.const("_errs",X.default.errors))}result(t,r,n){this.failResult((0,W.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,W.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,W._)`${r} !== undefined && (${(0,W.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?ji.reportExtraError:ji.reportError)(this,this.def.error,r)}$dataError(){(0,ji.reportError)(this,this.def.$dataError||ji.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,ji.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=W.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=W.nil,r=W.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:s}=this;n.if((0,W.or)((0,W._)`${i} === undefined`,r)),t!==W.nil&&n.assign(t,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==W.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,W.or)(s(),a());function s(){if(n.length){if(!(r instanceof W.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,W._)`${(0,js.checkDataTypes)(c,r,o.opts.strictNumbers,js.DataType.Wrong)}`}return W.nil}function a(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,W._)`!${c}(${r})`}return W.nil}}subschema(t,r){let n=(0,vu.getSubschema)(this.it,t);(0,vu.extendSubschemaData)(n,this.it,t),(0,vu.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return Ik(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Gt.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Gt.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,W.Name)),!0}};lr.KeywordCxt=Ds;function Qy(e,t,r,n){let i=new Ds(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Di.funcKeywordCode)(i,r):"macro"in r?(0,Di.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Di.funcKeywordCode)(i,r)}var Hk=/^\/(?:[^~]|~0|~1)*$/,Wk=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Zy(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return X.default.rootData;if(e[0]==="/"){if(!Hk.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=X.default.rootData}else{let l=Wk.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let p=+l[1];if(i=l[2],i==="#"){if(p>=t)throw new Error(c("property/index",p));return n[t-p]}if(p>t)throw new Error(c("data",p));if(o=r[t-p],!i)return o}let s=o,a=i.split("/");for(let l of a)l&&(o=(0,W._)`${o}${(0,W.getProperty)((0,Gt.unescapeJsonPointer)(l))}`,s=(0,W._)`${s} && ${o}`);return s;function c(l,p){return`Cannot access ${l} ${p} levels up, current level is ${t}`}}lr.getData=Zy});var Fs=S(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});var $u=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};xu.default=$u});var qi=S(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});var _u=Li(),Su=class extends Error{constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,_u.resolveUrl)(t,r,n),this.missingSchema=(0,_u.normalizeId)((0,_u.getFullPath)(t,this.missingRef))}};ku.default=Su});var Bi=S(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.resolveSchema=dt.getCompilingSchema=dt.resolveRef=dt.compileSchema=dt.SchemaEnv=void 0;var bt=Z(),Uk=Fs(),Nr=ft(),$t=Li(),ev=ie(),zk=Fi(),Cn=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,$t.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};dt.SchemaEnv=Cn;function Eu(e){let t=tv.call(this,e);if(t)return t;let r=(0,$t.getFullPath)(this.opts.uriResolver,e.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;e.$async&&(a=s.scopeValue("Error",{ref:Uk.default,code:(0,bt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:Nr.default.data,parentData:Nr.default.parentData,parentDataProperty:Nr.default.parentDataProperty,dataNames:[Nr.default.data],dataPathArr:[bt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,bt.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:bt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,bt._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(e),(0,zk.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let f=s.toString();p=`${s.scopeRefs(Nr.default.scope)}return ${f}`,this.opts.code.process&&(p=this.opts.code.process(p,e));let m=new Function(`${Nr.default.self}`,`${Nr.default.scope}`,p)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:f,scopeValues:s._values}),this.opts.unevaluated){let{props:y,items:g}=l;m.evaluated={props:y instanceof bt.Name?void 0:y,items:g instanceof bt.Name?void 0:g,dynamicProps:y instanceof bt.Name,dynamicItems:g instanceof bt.Name},m.source&&(m.source.evaluated=(0,bt.stringify)(m.evaluated))}return e.validate=m,e}catch(f){throw delete e.validate,delete e.validateName,p&&this.logger.error("Error compiling schema, function code:",p),f}finally{this._compilations.delete(e)}}dt.compileSchema=Eu;function Gk(e,t,r){var n;r=(0,$t.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=Yk.call(this,e,r);if(o===void 0){let s=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;s&&(o=new Cn({schema:s,schemaId:a,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=Jk.call(this,o)}dt.resolveRef=Gk;function Jk(e){return(0,$t.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Eu.call(this,e)}function tv(e){for(let t of this._compilations)if(Kk(t,e))return t}dt.getCompilingSchema=tv;function Kk(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Yk(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||qs.call(this,e,t)}function qs(e,t){let r=this.opts.uriResolver.parse(t),n=(0,$t._getFullPath)(this.opts.uriResolver,r),i=(0,$t.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return Cu.call(this,r,e);let o=(0,$t.normalizeId)(n),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=qs.call(this,e,s);return typeof a?.schema!="object"?void 0:Cu.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||Eu.call(this,s),o===(0,$t.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];return l&&(i=(0,$t.resolveUrl)(this.opts.uriResolver,i,l)),new Cn({schema:a,schemaId:c,root:e,baseId:i})}return Cu.call(this,r,s)}}dt.resolveSchema=qs;var Xk=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Cu(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,ev.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!Xk.has(a)&&l&&(t=(0,$t.resolveUrl)(this.opts.uriResolver,t,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,ev.schemaHasRulesButRef)(r,this.RULES)){let a=(0,$t.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=qs.call(this,n,a)}let{schemaId:s}=this.opts;if(o=o||new Cn({schema:r,schemaId:s,root:n,baseId:t}),o.schema!==o.root.schema)return o}});var rv=S((xO,Qk)=>{Qk.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 Nu=S((_O,cv)=>{"use strict";var Zk=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Iu=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),eC=RegExp.prototype.test.bind(/^\d*$/u),Mr=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Ru=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),iv=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),Tu=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),tC=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),Ye=new Array(256);{let e="0123456789ABCDEF";for(let t=0;t<256;t++)Ye[t]="%"+e[t>>4]+e[t&15]}function De(e){return e<2048?Ye[192|e>>6]+Ye[128|e&63]:e<65536?Ye[224|e>>12]+Ye[128|e>>6&63]+Ye[128|e&63]:Ye[240|e>>18]+Ye[128|e>>12&63]+Ye[128|e>>6&63]+Ye[128|e&63]}function rC(e){let t="",r=0,n=0;for(n=0;n<e.length;n++)if(r=e[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var nC=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),iC=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),oC=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),sC=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function aC(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++)if(!oC(e[t])){if(e[t]==="%"&&t+2<e.length&&Mr(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function nv(e){let t=-1,r=0,n=-1,i=0;for(let a=0;a<e.length;a++)e[a]==="0"?(n===-1&&(n=a),i++,i>r&&(r=i,t=n)):(n=-1,i=0);if(r<2)return e.join(":");let o=e.slice(0,t).join(":"),s=e.slice(t+r).join(":");return o+"::"+s}function lC(e){let t=e.indexOf("::");if(t!==-1&&e.indexOf("::",t+1)!==-1)return;let r=t===-1?e.split(":"):e.slice(0,t).split(":"),n=t===-1?[]:e.slice(t+2).split(":");t!==-1&&(r.length===1&&r[0]===""&&(r.length=0),n.length===1&&n[0]===""&&(n.length=0));let i=r.concat(n),o=0;for(let a=0;a<i.length;a++){let c=i[a];if(c==="")return;if(c.indexOf(".")!==-1){if(a!==i.length-1||t!==-1&&n.length===0||!Iu(c))return;o+=2;continue}if(!nC(c))return;i[a]=parseInt(c,16).toString(16),o++}if(t===-1)return o!==8?void 0:nv(i);if(o>=8)return;let s=i.slice(0,r.length);for(let a=o;a<8;a++)s.push("0");for(let a=r.length;a<i.length;a++)s.push(i[a]);return nv(s)}function Pu(e){let t=e[0]==="["&&e[e.length-1]==="]";if((e[0]==="["||e[e.length-1]==="]")&&!t)return{host:e,isIPV6:!1,error:!0};let n=t?e.slice(1,-1):e;if(t&&iC(n))return n=n.toLowerCase(),{host:`[${n}]`,escapedHost:n,isIPV6:!1,isIPVFuture:!0};if(cC(n,":")<2)return{host:e,isIPV6:!1,error:t};let i="",o=n.indexOf("%");if(o!==-1){let a=n.slice(o,o+3).toLowerCase()==="%25"?3:1;if(i=n.slice(o+a),!aC(i))return{host:e,isIPV6:!1,error:!0};n=n.slice(0,o)}let s=lC(n);return s===void 0?{host:e,isIPV6:!1,error:!0}:{host:s+(i?"%"+i:""),escapedHost:s+(i?"%25"+i:""),isIPV6:!0}}function cC(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}function uC(e){let t=e,r=[],n=-1,i=0;for(;i=t.length;){if(i===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(i===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(i===3&&t==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),r.length!==0&&r.pop();continue}}if((n=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")}var fC={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},pC=/[@/?#:]/g,dC=/[@/?#]/g;function ov(e,t){let r=t?dC:pC;return r.lastIndex=0,e.replace(r,n=>fC[n])}function sv(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let n=0;n<e.length;n++){if(e[n]==="%"&&n+2<e.length){let i=e.slice(n+1,n+3);if(Mr(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));t&&Ru(s)?r+=s:r+="%"+o,n+=2;continue}}r+=e[n]}return r}function hC(e){let t="";for(let r=0;r<e.length;r++){let n=e[r];if(n==="%"&&r+2<e.length){let i=e.slice(r+1,r+3);if(Mr(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));s!=="."&&Ru(s)?t+=s:t+="%"+o,r+=2;continue}}if(iv(n))t+=n;else{let i=e.charCodeAt(r);if(i<128)t+=lv(i)?n:Ye[i];else if(i<55296||i>57343)t+=De(i);else if(i<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);o>=56320&&o<=57343?(t+=De(65536+(i-55296<<10)+(o-56320)),r++):t+=De(65533)}else t+=De(65533)}}return t}function mC(e,t=!1){let r="",n=t&&e[0]!=="/";for(let i=0;i<e.length;i++){let o=e[i];if(o==="%"&&i+2<e.length){let s=e.slice(i+1,i+3);if(Mr(s)){r+="%"+s.toUpperCase(),i+=2;continue}}if(o==="/"&&(n=!1),iv(o)&&(o!==":"||!n))r+=o;else{let s=e.charCodeAt(i);if(s<128)r+=Ye[s];else if(s<55296||s>57343)r+=De(s);else if(s<=56319&&i+1<e.length){let a=e.charCodeAt(i+1);a>=56320&&a<=57343?(r+=De(65536+(s-55296<<10)+(a-56320)),i++):r+=De(65533)}else r+=De(65533)}}return r}function Au(e,t){let r="";for(let n=0;n<e.length;n++){let i=e[n];if(i==="%"&&n+2<e.length){let o=e.slice(n+1,n+3);if(Mr(o)){r+="%"+o.toUpperCase(),n+=2;continue}}if(t(i))r+=i;else{let o=e.charCodeAt(n);if(o<128)r+=Ye[o];else if(o<55296||o>57343)r+=De(o);else if(o<=56319&&n+1<e.length){let s=e.charCodeAt(n+1);s>=56320&&s<=57343?(r+=De(65536+(o-55296<<10)+(s-56320)),n++):r+=De(65533)}else r+=De(65533)}}return r}function av(e){return Au(e,tC)}function gC(e){return Au(e,Tu)}function yC(e){return Au(e,Tu)}function lv(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function vC(e){let t="";for(let r=0;r<e.length;r++){let n=e[r];if(n==="%"&&r+2<e.length){let i=e.slice(r+1,r+3);if(Mr(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));Ru(s)?t+=s:t+="%"+o,r+=2;continue}}if(Tu(n))t+=n;else{let i=e.charCodeAt(r);if(i<128)t+=lv(i)?n:Ye[i];else if(i<55296||i>57343)t+=De(i);else if(i<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);o>=56320&&o<=57343?(t+=De(65536+(i-55296<<10)+(o-56320)),r++):t+=De(65533)}else t+=De(65533)}}return t}function wC(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(Mr(n)){t+="%"+n.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}function bC(e){let t=[];if(e.userinfo!==void 0&&(t.push(av(e.userinfo)),t.push("@")),e.host!==void 0){let r=e.host;if(!Iu(r)){let n=Pu(r);n.isIPV6!==!0&&n.isIPVFuture!==!0&&(r=sv(r,!0),n=Pu(r)),n.isIPV6===!0||n.isIPVFuture===!0?r=`[${n.escapedHost}]`:r=ov(r,!1)}t.push(r)}if(typeof e.port=="number"||typeof e.port=="string"){let r=String(e.port);if(!eC(r))throw new TypeError("URI port is malformed.");t.push(":"),t.push(r)}return t.length?t.join(""):void 0}cv.exports={nonSimpleDomain:sC,recomposeAuthority:bC,reescapeHostDelimiters:ov,normalizePercentEncoding:sv,normalizePathEncoding:hC,serializePathEncoding:mC,normalizeQueryFragmentEncoding:vC,encodeUserinfo:av,encodeQuery:gC,encodeFragment:yC,escapePreservingEscapes:wC,removeDotSegments:uC,isIPv4:Iu,isUUID:Zk,normalizeIPv6:Pu,stringArrayToHexStripped:rC}});var hv=S((SO,dv)=>{"use strict";var{isUUID:$C}=Nu(),xC=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,_C=["http","https","ws","wss","urn","urn:uuid"];function SC(e){return _C.indexOf(e)!==-1}function Mu(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function uv(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function fv(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function kC(e){return e.secure=Mu(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function CC(e){if((e.port===(Mu(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let t=e.resourceName.indexOf("?"),r=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=r&&r!=="/"?r:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function EC(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(xC);if(r&&r[0]===e.path){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let i=`${n}:${t.nid||e.nid}`,o=Ou(i);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function PC(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i=`${r}:${t.nid||n}`,o=Ou(i);o&&(e=o.serialize(e,t));let s=e,a=e.nss;return s.path=`${n||t.nid}:${a}`,t.skipEscape=!0,s}function IC(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!$C(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function RC(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var pv={scheme:"http",domainHost:!0,parse:uv,serialize:fv},TC={scheme:"https",domainHost:pv.domainHost,parse:uv,serialize:fv},Bs={scheme:"ws",domainHost:!0,parse:kC,serialize:CC},AC={scheme:"wss",domainHost:Bs.domainHost,parse:Bs.parse,serialize:Bs.serialize},NC={scheme:"urn",parse:EC,serialize:PC,skipNormalize:!0},MC={scheme:"urn:uuid",parse:IC,serialize:RC,skipNormalize:!0},Hs={http:pv,https:TC,ws:Bs,wss:AC,urn:NC,"urn:uuid":MC};Object.setPrototypeOf(Hs,null);function Ou(e){return e&&(Hs[e]||Hs[e.toLowerCase()])||void 0}dv.exports={wsIsSecure:Mu,SCHEMES:Hs,isValidSchemeName:SC,getSchemeHandler:Ou}});var Pv=S((kO,zs)=>{"use strict";var{normalizeIPv6:wv,removeDotSegments:Wi,recomposeAuthority:OC,normalizePercentEncoding:bv,normalizePathEncoding:VC,serializePathEncoding:mv,normalizeQueryFragmentEncoding:gv,encodeQuery:LC,encodeFragment:jC,reescapeHostDelimiters:DC,isIPv4:$v,nonSimpleDomain:FC}=Nu(),{SCHEMES:xv,getSchemeHandler:Vu}=hv(),_v=/^[A-Za-z][A-Za-z0-9+.-]*$/u,Sv="URI scheme is malformed.";function yv(e){let t=unescape(String(e));if(!_v.test(t))throw new TypeError(Sv);return t}function qC(e,t){return typeof e=="string"?e=KC(e,t):typeof e=="object"&&(e=Us(Or(e,t),t)),e}function BC(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:i,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:a,malformedHost:c,malformedScheme:l}=Ws(e,n),{parsed:p,malformedAuthorityOrPort:f,malformedPercentEncoding:h,malformedSchemeSpecific:m,malformedHost:y,malformedScheme:g}=Ws(t,n);if(o||f||s||h||a||m||c||y||l||g)throw new Error(i.error||p.error||"URI is malformed.");let v=kv(i,p,n,!0),$=Vu(r&&r.scheme||v.scheme),I=v.host,_=I!==void 0&&I!==""&&($v(I)||wv(I).isIPV6);Cv(v,r||{},$,_);let R=I&&I.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(I);if(v.error&&!R)throw new Error(v.error);return n.skipEscape=!0,Or(v,n)}function kv(e,t,r,n){let i={};return n||(e=Us(Or(e,r),r),t=Us(Or(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=Wi(t.path||""),i.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=Wi(t.path||""),i.query=t.query):(t.path?(t.path[0]==="/"?i.path=Wi(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?i.path="/"+t.path:e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path,i.path=Wi(i.path)),i.query=t.query):(i.path=e.path,t.query!==void 0?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function HC(e,t,r){let n=vv(e,r),i=vv(t,r);return n!==void 0&&i!==void 0&&n===i}function Or(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),i=[];r.scheme&&(r.scheme=yv(r.scheme));let o=Vu(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n);let s=r.userinfo!==void 0||r.host!==void 0||r.port!==void 0,a=!n.skipEscape&&r.scheme===void 0&&!s;r.path!==void 0&&(n.skipEscape?r.path=bv(r.path):r.path=mv(r.path,a)),n.reference!=="suffix"&&r.scheme&&(r.scheme=yv(r.scheme),i.push(r.scheme,":"));let c=OC(r);if(c!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(c),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let l=r.path;!n.absolutePath&&(!o||!o.absolutePath)&&(l=Wi(l)),a&&(l=mv(l,!0)),c===void 0&&l[0]==="/"&&l[1]==="/"&&(l="/%2F"+l.slice(2)),i.push(l)}return r.query!==void 0&&i.push("?",LC(r.query)),r.fragment!==void 0&&i.push("#",jC(r.fragment)),i.join("")}var WC=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,UC=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,zC=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function GC(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port=="number"&&(e.port<0||e.port>65535))return"URI port is malformed."}function Hi(e){if(e===void 0)return!1;let t=e.indexOf("%");for(;t!==-1;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function Lu(e){return e[0]==="["&&e[e.length-1]==="]"}function JC(e){let t=e[4];return Hi(e[3])||t!==void 0&&!Lu(t)&&Hi(t)||Hi(e[6])||Hi(e[7])||Hi(e[8])}function Cv(e,t,r,n){if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&!Lu(e.host)&&(t.domainHost||r&&r.domainHost)&&n===!1&&FC(e.host))try{e.host=new URL("http://"+e.host).hostname}catch(i){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+i,!0}return!1}function Ws(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,o=!1,s=!1,a=!1,c=!1,l=!1,p=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let f=e.match(UC);f!==null&&f[1].indexOf("\\")!==-1&&(n.error="URI authority must not contain a literal backslash.",i=!0);let h=e.match(zC);if(h!==null){let y=h[1],g=y.replace(/[\t\n\r]/g,"");g.length>=2&&(g.slice(0,2)!=="//"?(n.error=n.error||"URI authority must not contain a literal backslash.",i=!0):y.length!==g.length&&(n.error=n.error||"URI authority introducer must not contain whitespace.",i=!0))}let m=e.match(WC);if(m){if(n.scheme=m[1],n.userinfo=m[3],n.host=m[4],n.port=parseInt(m[5],10),n.path=m[6]||"",n.query=m[7],n.fragment=m[8],n.scheme!==void 0){let v=unescape(n.scheme);_v.test(v)?n.scheme=v.toLowerCase():(n.error=n.error||Sv,l=!0)}o=JC(m),o&&(n.error=n.error||"URI contains malformed percent-encoding."),isNaN(n.port)&&(n.port=m[5]);let y=GC(n,m);if(y!==void 0&&(n.error=n.error||y,i=!0),n.host)if($v(n.host)===!1){let $=Lu(n.host),I=n.host.indexOf("[")!==-1||n.host.indexOf("]")!==-1,_=wv(n.host);p=_.isIPV6||_.isIPVFuture===!0,c=I&&(!$||_.error===!0),n.host=p?_.host:_.host.toLowerCase(),c&&(n.error=n.error||"URI host is malformed.",i=!0)}else p=!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 g=Vu(r.scheme||n.scheme);if(c||(a=Cv(n,r,g,p)),!g||g&&!g.skipNormalize){if(e.indexOf("%")!==-1&&n.host!==void 0&&!c){let v=p?n.host:bv(n.host,!0);n.host=DC(v,p)}n.path&&(n.path=VC(n.path)),n.query&&(n.query=gv(n.query)),n.fragment&&(n.fragment=gv(n.fragment))}g&&g.parse&&(g.parse(n,r),g===xv.urn&&n.nid===void 0&&(s=!0))}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:l}}function Us(e,t){return Ws(e,t).parsed}function KC(e,t){return Ev(e,t).normalized}function Ev(e,t){let{parsed:r,malformedAuthorityOrPort:n,malformedPercentEncoding:i,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}=Ws(e,t);return{normalized:n||i||o||s||a?e:Or(r,t),malformedAuthorityOrPort:n,malformedPercentEncoding:i,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}}function vv(e,t){if(typeof e!="string"&&typeof e!="object")return;let r;try{r=typeof e=="string"?e:Or(e,t)}catch{return}let{normalized:n,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:c}=Ev(r,t);return i||o||s||a||c?void 0:n}var ju={SCHEMES:xv,normalize:qC,resolve:BC,resolveComponent:kv,equal:HC,serialize:Or,parse:Us};zs.exports=ju;zs.exports.default=ju;zs.exports.fastUri=ju});var Rv=S(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});var Iv=Pv();Iv.code='require("ajv/dist/runtime/uri").default';Du.default=Iv});var jv=S(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.CodeGen=Ae.Name=Ae.nil=Ae.stringify=Ae.str=Ae._=Ae.KeywordCxt=void 0;var YC=Fi();Object.defineProperty(Ae,"KeywordCxt",{enumerable:!0,get:function(){return YC.KeywordCxt}});var En=Z();Object.defineProperty(Ae,"_",{enumerable:!0,get:function(){return En._}});Object.defineProperty(Ae,"str",{enumerable:!0,get:function(){return En.str}});Object.defineProperty(Ae,"stringify",{enumerable:!0,get:function(){return En.stringify}});Object.defineProperty(Ae,"nil",{enumerable:!0,get:function(){return En.nil}});Object.defineProperty(Ae,"Name",{enumerable:!0,get:function(){return En.Name}});Object.defineProperty(Ae,"CodeGen",{enumerable:!0,get:function(){return En.CodeGen}});var XC=Fs(),Ov=qi(),QC=lu(),Ui=Bi(),ZC=Z(),zi=Li(),Gs=Vi(),qu=ie(),Tv=rv(),eE=Rv(),Vv=(e,t)=>new RegExp(e,t);Vv.code="new RegExp";var tE=["removeAdditional","useDefaults","coerceTypes"],rE=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),nE={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."},iE={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Av=200;function oE(e){var t,r,n,i,o,s,a,c,l,p,f,h,m,y,g,v,$,I,_,R,N,j,U,oe,me;let be=e.strict,Pe=(t=e.code)===null||t===void 0?void 0:t.optimize,we=Pe===!0||Pe===void 0?1:Pe||0,ze=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Vv,fe=(i=e.uriResolver)!==null&&i!==void 0?i:eE.default;return{strictSchema:(s=(o=e.strictSchema)!==null&&o!==void 0?o:be)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:be)!==null&&c!==void 0?c:!0,strictTypes:(p=(l=e.strictTypes)!==null&&l!==void 0?l:be)!==null&&p!==void 0?p:"log",strictTuples:(h=(f=e.strictTuples)!==null&&f!==void 0?f:be)!==null&&h!==void 0?h:"log",strictRequired:(y=(m=e.strictRequired)!==null&&m!==void 0?m:be)!==null&&y!==void 0?y:!1,code:e.code?{...e.code,optimize:we,regExp:ze}:{optimize:we,regExp:ze},loopRequired:(g=e.loopRequired)!==null&&g!==void 0?g:Av,loopEnum:(v=e.loopEnum)!==null&&v!==void 0?v:Av,meta:($=e.meta)!==null&&$!==void 0?$:!0,messages:(I=e.messages)!==null&&I!==void 0?I:!0,inlineRefs:(_=e.inlineRefs)!==null&&_!==void 0?_:!0,schemaId:(R=e.schemaId)!==null&&R!==void 0?R:"$id",addUsedSchema:(N=e.addUsedSchema)!==null&&N!==void 0?N:!0,validateSchema:(j=e.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(U=e.validateFormats)!==null&&U!==void 0?U:!0,unicodeRegExp:(oe=e.unicodeRegExp)!==null&&oe!==void 0?oe:!0,int32range:(me=e.int32range)!==null&&me!==void 0?me:!0,uriResolver:fe}}var Gi=class{constructor(t={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...oE(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new ZC.ValueScope({scope:{},prefixes:rE,es5:r,lines:n}),this.logger=fE(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,QC.getRules)(),Nv.call(this,nE,t,"NOT SUPPORTED"),Nv.call(this,iE,t,"DEPRECATED","warn"),this._metaOpts=cE.call(this),t.formats&&aE.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&lE.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),sE.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=Tv;n==="id"&&(i={...Tv},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,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,t,r);async function i(p,f){await o.call(this,p.$schema);let h=this._addSchema(p,f);return h.validate||s.call(this,h)}async function o(p){p&&!this.getSchema(p)&&await i.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(f){if(!(f instanceof Ov.default))throw f;return a.call(this,f),await c.call(this,f.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:f}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${f} cannot be resolved`)}async function c(p){let f=await l.call(this,p);this.refs[p]||await o.call(this,f.$schema),this.refs[p]||this.addSchema(f,p,r)}async function l(p){let f=this._loading[p];if(f)return f;try{return await(this._loading[p]=n(p))}finally{delete this._loading[p]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let s of t)this.addSchema(s,void 0,n,i);return this}let o;if(typeof t=="object"){let{schemaId:s}=this.opts;if(o=t[s],o!==void 0&&typeof o!="string")throw new Error(`schema ${s} must be string`)}return r=(0,zi.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$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,t);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(t){let r;for(;typeof(r=Mv.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Ui.SchemaEnv({schema:{},schemaId:n});if(r=Ui.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Mv.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,zi.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,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(dE.call(this,n,r),!r)return(0,qu.eachItem)(n,o=>Fu.call(this,o)),this;mE.call(this,r);let i={...r,type:(0,Gs.getJSONTypes)(r.type),schemaType:(0,Gs.getJSONTypes)(r.schemaType)};return(0,qu.eachItem)(n,i.type.length===0?o=>Fu.call(this,o,i):o=>i.type.forEach(s=>Fu.call(this,o,i,s))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let o=i.split("/").slice(1),s=t;for(let a of o)s=s[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:l}=c.definition,p=s[a];l&&p&&(s[a]=Lv(p))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof t=="object")s=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,zi.normalizeId)(s||n);let l=zi.getSchemaRefs.call(this,t,n);return c=new Ui.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Ui.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Ui.compileSchema.call(this,t)}finally{this.opts=r}}};Gi.ValidationError=XC.default;Gi.MissingRefError=Ov.default;Ae.default=Gi;function Nv(e,t,r,n="error"){for(let i in e){let o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}function Mv(e){return e=(0,zi.normalizeId)(e),this.schemas[e]||this.refs[e]}function sE(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function aE(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function lE(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function cE(){let e={...this.opts};for(let t of tE)delete e[t];return e}var uE={log(){},warn(){},error(){}};function fE(e){if(e===!1)return uE;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var pE=/^[a-z_$][a-z0-9_$:-]*$/i;function dE(e,t){let{RULES:r}=this;if((0,qu.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!pE.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function Fu(e,t,r){var n;let i=t?.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:c})=>c===r);if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,Gs.getJSONTypes)(t.type),schemaType:(0,Gs.getJSONTypes)(t.schemaType)}};t.before?hE.call(this,s,a,t.before):s.rules.push(a),o.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function hE(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function mE(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Lv(t)),e.validateSchema=this.compile(t,!0))}var gE={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Lv(e){return{anyOf:[e,gE]}}});var Dv=S(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});var yE={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Bu.default=yE});var Ys=S(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.callRef=Vr.getValidate=void 0;var vE=qi(),Fv=pt(),Xe=Z(),Pn=ft(),qv=Bi(),Js=ie(),wE={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return f();let p=qv.resolveRef.call(c,l,i,r);if(p===void 0)throw new vE.default(n.opts.uriResolver,i,r);if(p instanceof qv.SchemaEnv)return h(p);return m(p);function f(){if(o===l)return Ks(e,s,o,o.$async);let y=t.scopeValue("root",{ref:l});return Ks(e,(0,Xe._)`${y}.validate`,l,l.$async)}function h(y){let g=Bv(e,y);Ks(e,g,y,y.$async)}function m(y){let g=t.scopeValue("schema",a.code.source===!0?{ref:y,code:(0,Xe.stringify)(y)}:{ref:y}),v=t.name("valid"),$=e.subschema({schema:y,dataTypes:[],schemaPath:Xe.nil,topSchemaRef:g,errSchemaPath:r},v);e.mergeEvaluated($),e.ok(v)}}};function Bv(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Xe._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Vr.getValidate=Bv;function Ks(e,t,r,n){let{gen:i,it:o}=e,{allErrors:s,schemaEnv:a,opts:c}=o,l=c.passContext?Pn.default.this:Xe.nil;n?p():f();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let y=i.let("valid");i.try(()=>{i.code((0,Xe._)`await ${(0,Fv.callValidateCode)(e,t,l)}`),m(t),s||i.assign(y,!0)},g=>{i.if((0,Xe._)`!(${g} instanceof ${o.ValidationError})`,()=>i.throw(g)),h(g),s||i.assign(y,!1)}),e.ok(y)}function f(){e.result((0,Fv.callValidateCode)(e,t,l),()=>m(t),()=>h(t))}function h(y){let g=(0,Xe._)`${y}.errors`;i.assign(Pn.default.vErrors,(0,Xe._)`${Pn.default.vErrors} === null ? ${g} : ${Pn.default.vErrors}.concat(${g})`),i.assign(Pn.default.errors,(0,Xe._)`${Pn.default.vErrors}.length`)}function m(y){var g;if(!o.opts.unevaluated)return;let v=(g=r?.validate)===null||g===void 0?void 0:g.evaluated;if(o.props!==!0)if(v&&!v.dynamicProps)v.props!==void 0&&(o.props=Js.mergeEvaluated.props(i,v.props,o.props));else{let $=i.var("props",(0,Xe._)`${y}.evaluated.props`);o.props=Js.mergeEvaluated.props(i,$,o.props,Xe.Name)}if(o.items!==!0)if(v&&!v.dynamicItems)v.items!==void 0&&(o.items=Js.mergeEvaluated.items(i,v.items,o.items));else{let $=i.var("items",(0,Xe._)`${y}.evaluated.items`);o.items=Js.mergeEvaluated.items(i,$,o.items,Xe.Name)}}}Vr.callRef=Ks;Vr.default=wE});var Hv=S(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var bE=Dv(),$E=Ys(),xE=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",bE.default,$E.default];Hu.default=xE});var Wv=S(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});var Xs=Z(),cr=Xs.operators,Qs={maximum:{okStr:"<=",ok:cr.LTE,fail:cr.GT},minimum:{okStr:">=",ok:cr.GTE,fail:cr.LT},exclusiveMaximum:{okStr:"<",ok:cr.LT,fail:cr.GTE},exclusiveMinimum:{okStr:">",ok:cr.GT,fail:cr.LTE}},_E={message:({keyword:e,schemaCode:t})=>(0,Xs.str)`must be ${Qs[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Xs._)`{comparison: ${Qs[e].okStr}, limit: ${t}}`},SE={keyword:Object.keys(Qs),type:"number",schemaType:"number",$data:!0,error:_E,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,Xs._)`${r} ${Qs[t].fail} ${n} || isNaN(${r})`)}};Wu.default=SE});var Uv=S(Uu=>{"use strict";Object.defineProperty(Uu,"__esModule",{value:!0});var Ji=Z(),kE={message:({schemaCode:e})=>(0,Ji.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Ji._)`{multipleOf: ${e}}`},CE={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:kE,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,s=t.let("res"),a=o?(0,Ji._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,Ji._)`${s} !== parseInt(${s})`;e.fail$data((0,Ji._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};Uu.default=CE});var Gv=S(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});function zv(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}zu.default=zv;zv.code='require("ajv/dist/runtime/ucs2length").default'});var Jv=S(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var Lr=Z(),EE=ie(),PE=Gv(),IE={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Lr.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Lr._)`{limit: ${e}}`},RE={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:IE,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?Lr.operators.GT:Lr.operators.LT,s=i.opts.unicode===!1?(0,Lr._)`${r}.length`:(0,Lr._)`${(0,EE.useFunc)(e.gen,PE.default)}(${r})`;e.fail$data((0,Lr._)`${s} ${o} ${n}`)}};Gu.default=RE});var Kv=S(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});var TE=pt(),AE=ie(),In=Z(),NE={message:({schemaCode:e})=>(0,In.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,In._)`{pattern: ${e}}`},ME={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:NE,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:s}=e,a=s.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?(0,In._)`new RegExp`:(0,AE.useFunc)(t,c),p=t.let("valid");t.try(()=>t.assign(p,(0,In._)`${l}(${o}, ${a}).test(${r})`),()=>t.assign(p,!1)),e.fail$data((0,In._)`!${p}`)}else{let c=(0,TE.usePattern)(e,i);e.fail$data((0,In._)`!${c}.test(${r})`)}}};Ju.default=ME});var Yv=S(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});var Ki=Z(),OE={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Ki.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Ki._)`{limit: ${e}}`},VE={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:OE,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Ki.operators.GT:Ki.operators.LT;e.fail$data((0,Ki._)`Object.keys(${r}).length ${i} ${n}`)}};Ku.default=VE});var Xv=S(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});var Yi=pt(),Xi=Z(),LE=ie(),jE={message:({params:{missingProperty:e}})=>(0,Xi.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Xi._)`{missingProperty: ${e}}`},DE={keyword:"required",type:"object",schemaType:"array",$data:!0,error:jE,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:s}=e,{opts:a}=s;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?l():p(),a.strictRequired){let m=e.parentSchema.properties,{definedProperties:y}=e.it;for(let g of r)if(m?.[g]===void 0&&!y.has(g)){let v=s.schemaEnv.baseId+s.errSchemaPath,$=`required property "${g}" is not defined at "${v}" (strictRequired)`;(0,LE.checkStrictMode)(s,$,s.opts.strictRequired)}}function l(){if(c||o)e.block$data(Xi.nil,f);else for(let m of r)(0,Yi.checkReportMissingProp)(e,m)}function p(){let m=t.let("missing");if(c||o){let y=t.let("valid",!0);e.block$data(y,()=>h(m,y)),e.ok(y)}else t.if((0,Yi.checkMissingProp)(e,r,m)),(0,Yi.reportMissingProp)(e,m),t.else()}function f(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m}),t.if((0,Yi.noPropertyInData)(t,i,m,a.ownProperties),()=>e.error())})}function h(m,y){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(y,(0,Yi.propertyInData)(t,i,m,a.ownProperties)),t.if((0,Xi.not)(y),()=>{e.error(),t.break()})},Xi.nil)}}};Yu.default=DE});var Qv=S(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});var Qi=Z(),FE={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,Qi.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Qi._)`{limit: ${e}}`},qE={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:FE,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?Qi.operators.GT:Qi.operators.LT;e.fail$data((0,Qi._)`${r}.length ${i} ${n}`)}};Xu.default=qE});var Zs=S(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});var Zv=gu();Zv.code='require("ajv/dist/runtime/equal").default';Qu.default=Zv});var ew=S(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});var Zu=Vi(),Ne=Z(),BE=ie(),HE=Zs(),WE={message:({params:{i:e,j:t}})=>(0,Ne.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Ne._)`{i: ${e}, j: ${t}}`},UE={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:WE,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:s,it:a}=e;if(!n&&!i)return;let c=t.let("valid"),l=o.items?(0,Zu.getSchemaTypes)(o.items):[];e.block$data(c,p,(0,Ne._)`${s} === false`),e.ok(c);function p(){let y=t.let("i",(0,Ne._)`${r}.length`),g=t.let("j");e.setParams({i:y,j:g}),t.assign(c,!0),t.if((0,Ne._)`${y} > 1`,()=>(f()?h:m)(y,g))}function f(){return l.length>0&&!l.some(y=>y==="object"||y==="array")}function h(y,g){let v=t.name("item"),$=(0,Zu.checkDataTypes)(l,v,a.opts.strictNumbers,Zu.DataType.Wrong),I=t.const("indices",(0,Ne._)`{}`);t.for((0,Ne._)`;${y}--;`,()=>{t.let(v,(0,Ne._)`${r}[${y}]`),t.if($,(0,Ne._)`continue`),l.length>1&&t.if((0,Ne._)`typeof ${v} == "string"`,(0,Ne._)`${v} += "_"`),t.if((0,Ne._)`typeof ${I}[${v}] == "number"`,()=>{t.assign(g,(0,Ne._)`${I}[${v}]`),e.error(),t.assign(c,!1).break()}).code((0,Ne._)`${I}[${v}] = ${y}`)})}function m(y,g){let v=(0,BE.useFunc)(t,HE.default),$=t.name("outer");t.label($).for((0,Ne._)`;${y}--;`,()=>t.for((0,Ne._)`${g} = ${y}; ${g}--;`,()=>t.if((0,Ne._)`${v}(${r}[${y}], ${r}[${g}])`,()=>{e.error(),t.assign(c,!1).break($)})))}}};ef.default=UE});var tw=S(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var tf=Z(),zE=ie(),GE=Zs(),JE={message:"must be equal to constant",params:({schemaCode:e})=>(0,tf._)`{allowedValue: ${e}}`},KE={keyword:"const",$data:!0,error:JE,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,tf._)`!${(0,zE.useFunc)(t,GE.default)}(${r}, ${i})`):e.fail((0,tf._)`${o} !== ${r}`)}};rf.default=KE});var rw=S(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});var Zi=Z(),YE=ie(),XE=Zs(),QE={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Zi._)`{allowedValues: ${e}}`},ZE={keyword:"enum",schemaType:"array",$data:!0,error:QE,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:s}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,c,l=()=>c??(c=(0,YE.useFunc)(t,XE.default)),p;if(a||n)p=t.let("valid"),e.block$data(p,f);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=t.const("vSchema",o);p=(0,Zi.or)(...i.map((y,g)=>h(m,g)))}e.pass(p);function f(){t.assign(p,!1),t.forOf("v",o,m=>t.if((0,Zi._)`${l()}(${r}, ${m})`,()=>t.assign(p,!0).break()))}function h(m,y){let g=i[y];return typeof g=="object"&&g!==null?(0,Zi._)`${l()}(${r}, ${m}[${y}])`:(0,Zi._)`${r} === ${g}`}}};nf.default=ZE});var nw=S(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});var eP=Wv(),tP=Uv(),rP=Jv(),nP=Kv(),iP=Yv(),oP=Xv(),sP=Qv(),aP=ew(),lP=tw(),cP=rw(),uP=[eP.default,tP.default,rP.default,nP.default,iP.default,oP.default,sP.default,aP.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},lP.default,cP.default];of.default=uP});var af=S(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.validateAdditionalItems=void 0;var jr=Z(),sf=ie(),fP={message:({params:{len:e}})=>(0,jr.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,jr._)`{limit: ${e}}`},pP={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:fP,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,sf.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}iw(e,n)}};function iw(e,t){let{gen:r,schema:n,data:i,keyword:o,it:s}=e;s.items=!0;let a=r.const("len",(0,jr._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,jr._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,sf.alwaysValidSchema)(s,n)){let l=r.var("valid",(0,jr._)`${a} <= ${t.length}`);r.if((0,jr.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,a,p=>{e.subschema({keyword:o,dataProp:p,dataPropType:sf.Type.Num},l),s.allErrors||r.if((0,jr.not)(l),()=>r.break())})}}eo.validateAdditionalItems=iw;eo.default=pP});var lf=S(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.validateTuple=void 0;var ow=Z(),ea=ie(),dP=pt(),hP={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return sw(e,"additionalItems",t);r.items=!0,!(0,ea.alwaysValidSchema)(r,t)&&e.ok((0,dP.validateArray)(e))}};function sw(e,t,r=e.schema){let{gen:n,parentSchema:i,data:o,keyword:s,it:a}=e;p(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=ea.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),l=n.const("len",(0,ow._)`${o}.length`);r.forEach((f,h)=>{(0,ea.alwaysValidSchema)(a,f)||(n.if((0,ow._)`${l} > ${h}`,()=>e.subschema({keyword:s,schemaProp:h,dataProp:h},c)),e.ok(c))});function p(f){let{opts:h,errSchemaPath:m}=a,y=r.length,g=y===f.minItems&&(y===f.maxItems||f[t]===!1);if(h.strictTuples&&!g){let v=`"${s}" is ${y}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,ea.checkStrictMode)(a,v,h.strictTuples)}}}to.validateTuple=sw;to.default=hP});var aw=S(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});var mP=lf(),gP={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,mP.validateTuple)(e,"items")};cf.default=gP});var cw=S(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var lw=Z(),yP=ie(),vP=pt(),wP=af(),bP={message:({params:{len:e}})=>(0,lw.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,lw._)`{limit: ${e}}`},$P={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:bP,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,yP.alwaysValidSchema)(n,t)&&(i?(0,wP.validateAdditionalItems)(e,i):e.ok((0,vP.validateArray)(e)))}};uf.default=$P});var uw=S(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});var ht=Z(),ta=ie(),xP={message:({params:{min:e,max:t}})=>t===void 0?(0,ht.str)`must contain at least ${e} valid item(s)`:(0,ht.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,ht._)`{minContains: ${e}}`:(0,ht._)`{minContains: ${e}, maxContains: ${t}}`},_P={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:xP,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e,s,a,{minContains:c,maxContains:l}=n;o.opts.next?(s=c===void 0?1:c,a=l):s=1;let p=t.const("len",(0,ht._)`${i}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,ta.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,ta.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,ta.alwaysValidSchema)(o,r)){let g=(0,ht._)`${p} >= ${s}`;a!==void 0&&(g=(0,ht._)`${g} && ${p} <= ${a}`),e.pass(g);return}o.items=!0;let f=t.name("valid");a===void 0&&s===1?m(f,()=>t.if(f,()=>t.break())):s===0?(t.let(f,!0),a!==void 0&&t.if((0,ht._)`${i}.length > 0`,h)):(t.let(f,!1),h()),e.result(f,()=>e.reset());function h(){let g=t.name("_valid"),v=t.let("count",0);m(g,()=>t.if(g,()=>y(v)))}function m(g,v){t.forRange("i",0,p,$=>{e.subschema({keyword:"contains",dataProp:$,dataPropType:ta.Type.Num,compositeRule:!0},g),v()})}function y(g){t.code((0,ht._)`${g}++`),a===void 0?t.if((0,ht._)`${g} >= ${s}`,()=>t.assign(f,!0).break()):(t.if((0,ht._)`${g} > ${a}`,()=>t.assign(f,!1).break()),s===1?t.assign(f,!0):t.if((0,ht._)`${g} >= ${s}`,()=>t.assign(f,!0)))}}};ff.default=_P});var ra=S(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.validateSchemaDeps=Tt.validatePropertyDeps=Tt.error=void 0;var pf=Z(),SP=ie(),ro=pt();Tt.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,pf.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,pf._)`{property: ${e},
399
+ || ${s} === "boolean" || ${i} === null`).assign(a,(0,ee._)`[${i}]`)}}}function lk({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,ee._)`${t} !== undefined`,()=>e.assign((0,ee._)`${t}[${r}]`,n))}function wu(e,t,r,n=In.Correct){let i=n===In.Correct?ee.operators.EQ:ee.operators.NEQ,o;switch(e){case"null":return(0,ee._)`${t} ${i} null`;case"array":o=(0,ee._)`Array.isArray(${t})`;break;case"object":o=(0,ee._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=s((0,ee._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=s();break;default:return(0,ee._)`typeof ${t} ${i} ${e}`}return n===In.Correct?o:(0,ee.not)(o);function s(a=ee.nil){return(0,ee.and)((0,ee._)`typeof ${t} == "number"`,a,r?(0,ee._)`isFinite(${t})`:ee.nil)}}De.checkDataType=wu;function bu(e,t,r,n){if(e.length===1)return wu(e[0],t,r,n);let i,o=(0,Vy.toHash)(e);if(o.array&&o.object){let s=(0,ee._)`typeof ${t} != "object"`;i=o.null?s:(0,ee._)`!${t} || ${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,wu(s,t,r,n));return i}De.checkDataTypes=bu;var ck={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,ee._)`{type: ${e}}`:(0,ee._)`{type: ${t}}`};function $u(e){let t=uk(e);(0,nk.reportError)(t,ck)}De.reportTypeError=$u;function uk(e){let{gen:t,data:r,schema:n}=e,i=(0,Vy.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}});var Fy=S(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.assignDefaults=void 0;var Rn=Z(),fk=ie();function pk(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)Dy(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>Dy(e,o,i.default))}js.assignDefaults=pk;function Dy(e,t,r){let{gen:n,compositeRule:i,data:o,opts:s}=e;if(r===void 0)return;let a=(0,Rn._)`${o}${(0,Rn.getProperty)(t)}`;if(i){(0,fk.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,Rn._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,Rn._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,Rn._)`${a} = ${(0,Rn.stringify)(r)}`)}});var pt=S(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.validateUnion=pe.validateArray=pe.usePattern=pe.callValidateCode=pe.schemaProperties=pe.allSchemaProperties=pe.noPropertyInData=pe.propertyInData=pe.isOwnProperty=pe.hasPropFunc=pe.reportMissingProp=pe.checkMissingProp=pe.checkReportMissingProp=void 0;var ye=Z(),xu=ie(),cr=ft(),dk=ie();function hk(e,t){let{gen:r,data:n,it:i}=e;r.if(Su(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,ye._)`${t}`},!0),e.error()})}pe.checkReportMissingProp=hk;function mk({gen:e,data:t,it:{opts:r}},n,i){return(0,ye.or)(...n.map(o=>(0,ye.and)(Su(e,t,o,r.ownProperties),(0,ye._)`${i} = ${o}`)))}pe.checkMissingProp=mk;function gk(e,t){e.setParams({missingProperty:t},!0),e.error()}pe.reportMissingProp=gk;function qy(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ye._)`Object.prototype.hasOwnProperty`})}pe.hasPropFunc=qy;function _u(e,t,r){return(0,ye._)`${qy(e)}.call(${t}, ${r})`}pe.isOwnProperty=_u;function yk(e,t,r,n){let i=(0,ye._)`${t}${(0,ye.getProperty)(r)} !== undefined`;return n?(0,ye._)`${i} && ${_u(e,t,r)}`:i}pe.propertyInData=yk;function Su(e,t,r,n){let i=(0,ye._)`${t}${(0,ye.getProperty)(r)} === undefined`;return n?(0,ye.or)(i,(0,ye.not)(_u(e,t,r))):i}pe.noPropertyInData=Su;function By(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}pe.allSchemaProperties=By;function vk(e,t){return By(t).filter(r=>!(0,xu.alwaysValidSchema)(e,t[r]))}pe.schemaProperties=vk;function wk({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:s},a,c,l){let p=l?(0,ye._)`${e}, ${t}, ${n}${i}`:t,f=[[cr.default.instancePath,(0,ye.strConcat)(cr.default.instancePath,o)],[cr.default.parentData,s.parentData],[cr.default.parentDataProperty,s.parentDataProperty],[cr.default.rootData,cr.default.rootData]];s.opts.dynamicRef&&f.push([cr.default.dynamicAnchors,cr.default.dynamicAnchors]);let d=(0,ye._)`${p}, ${r.object(...f)}`;return c!==ye.nil?(0,ye._)`${a}.call(${c}, ${d})`:(0,ye._)`${a}(${d})`}pe.callValidateCode=wk;var bk=(0,ye._)`new RegExp`;function $k({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,ye._)`${i.code==="new RegExp"?bk:(0,dk.useFunc)(e,i)}(${r}, ${n})`})}pe.usePattern=$k;function xk(e){let{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){let a=t.let("valid",!0);return s(()=>t.assign(a,!1)),a}return t.var(o,!0),s(()=>t.break()),o;function s(a){let c=t.const("len",(0,ye._)`${r}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:xu.Type.Num},o),t.if((0,ye.not)(o),a)})}}pe.validateArray=xk;function _k(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,xu.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let s=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let p=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},a);t.assign(s,(0,ye._)`${s} || ${a}`),e.mergeValidEvaluated(p,a)||t.if((0,ye.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}pe.validateUnion=_k});var Uy=S(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.validateKeywordUsage=Rt.validSchemaType=Rt.funcKeywordCode=Rt.macroKeywordCode=void 0;var Ue=Z(),Lr=ft(),Sk=pt(),kk=Mi();function Ck(e,t){let{gen:r,keyword:n,schema:i,parentSchema:o,it:s}=e,a=t.macro.call(s.self,i,o,s),c=Wy(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=r.name("valid");e.subschema({schema:a,schemaPath:Ue.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}Rt.macroKeywordCode=Ck;function Ek(e,t){var r;let{gen:n,keyword:i,schema:o,parentSchema:s,$data:a,it:c}=e;Ik(c,t);let l=!a&&t.compile?t.compile.call(c.self,o,s,c):t.validate,p=Wy(n,i,l),f=n.let("valid");e.block$data(f,d),e.ok((r=t.valid)!==null&&r!==void 0?r:f);function d(){if(t.errors===!1)g(),t.modifying&&Hy(e),v(()=>e.error());else{let b=t.async?m():y();t.modifying&&Hy(e),v(()=>Pk(e,b))}}function m(){let b=n.let("ruleErrs",null);return n.try(()=>g((0,Ue._)`await `),I=>n.assign(f,!1).if((0,Ue._)`${I} instanceof ${c.ValidationError}`,()=>n.assign(b,(0,Ue._)`${I}.errors`),()=>n.throw(I))),b}function y(){let b=(0,Ue._)`${p}.errors`;return n.assign(b,null),g(Ue.nil),b}function g(b=t.async?(0,Ue._)`await `:Ue.nil){let I=c.opts.passContext?Lr.default.this:Lr.default.self,_=!("compile"in t&&!a||t.schema===!1);n.assign(f,(0,Ue._)`${b}${(0,Sk.callValidateCode)(e,p,I,_)}`,t.modifying)}function v(b){var I;n.if((0,Ue.not)((I=t.valid)!==null&&I!==void 0?I:f),b)}}Rt.funcKeywordCode=Ek;function Hy(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Ue._)`${n.parentData}[${n.parentDataProperty}]`))}function Pk(e,t){let{gen:r}=e;r.if((0,Ue._)`Array.isArray(${t})`,()=>{r.assign(Lr.default.vErrors,(0,Ue._)`${Lr.default.vErrors} === null ? ${t} : ${Lr.default.vErrors}.concat(${t})`).assign(Lr.default.errors,(0,Ue._)`${Lr.default.vErrors}.length`),(0,kk.extendErrors)(e)},()=>e.error())}function Ik({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Wy(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Ue.stringify)(r)})}function Rk(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Rt.validSchemaType=Rk;function Tk({schema:e,opts:t,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(e,a)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}Rt.validateKeywordUsage=Tk});var Gy=S(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.extendSubschemaMode=ur.extendSubschemaData=ur.getSubschema=void 0;var Tt=Z(),zy=ie();function Ak(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:s}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,Tt._)`${e.schemaPath}${(0,Tt.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,Tt._)`${e.schemaPath}${(0,Tt.getProperty)(t)}${(0,Tt.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,zy.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')}ur.getSubschema=Ak;function Nk(e,t,{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}=t;if(r!==void 0){let{errorPath:l,dataPathArr:p,opts:f}=t,d=a.let("data",(0,Tt._)`${t.data}${(0,Tt.getProperty)(r)}`,!0);c(d),e.errorPath=(0,Tt.str)`${l}${(0,zy.getErrorPath)(r,n,f.jsPropertySyntax)}`,e.parentDataProperty=(0,Tt._)`${r}`,e.dataPathArr=[...p,e.parentDataProperty]}if(i!==void 0){let l=i instanceof Tt.Name?i:a.let("data",i,!0);c(l),s!==void 0&&(e.propertyName=s)}o&&(e.dataTypes=o);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}ur.extendSubschemaData=Nk;function Ok(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}ur.extendSubschemaMode=Ok});var ku=S((HM,Jy)=>{"use strict";Jy.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),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(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var Yy=S((WM,Ky)=>{"use strict";var fr=Ky.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};Ds(t,n,i,e,"",e)};fr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};fr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};fr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};fr.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 Ds(e,t,r,n,i,o,s,a,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,o,s,a,c,l);for(var p in n){var f=n[p];if(Array.isArray(f)){if(p in fr.arrayKeywords)for(var d=0;d<f.length;d++)Ds(e,t,r,f[d],i+"/"+p+"/"+d,o,i,p,n,d)}else if(p in fr.propsKeywords){if(f&&typeof f=="object")for(var m in f)Ds(e,t,r,f[m],i+"/"+p+"/"+Mk(m),o,i,p,n,m)}else(p in fr.keywords||e.allKeys&&!(p in fr.skipKeywords))&&Ds(e,t,r,f,i+"/"+p,o,i,p,n)}r(n,i,o,s,a,c,l)}}function Mk(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Li=S(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.getSchemaRefs=Ke.resolveUrl=Ke.normalizeId=Ke._getFullPath=Ke.getFullPath=Ke.inlineRef=void 0;var Vk=ie(),Lk=ku(),jk=Yy(),Dk=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Fk(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Cu(e):t?Xy(e)<=t:!1}Ke.inlineRef=Fk;var qk=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Cu(e){for(let t in e){if(qk.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Cu)||typeof r=="object"&&Cu(r))return!0}return!1}function Xy(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!Dk.has(r)&&(typeof e[r]=="object"&&(0,Vk.eachItem)(e[r],n=>t+=Xy(n)),t===1/0))return 1/0}return t}function Qy(e,t="",r){r!==!1&&(t=Tn(t));let n=e.parse(t);return Zy(e,n)}Ke.getFullPath=Qy;function Zy(e,t){return e.serialize(t).split("#")[0]+"#"}Ke._getFullPath=Zy;var Bk=/#\/?$/;function Tn(e){return e?e.replace(Bk,""):""}Ke.normalizeId=Tn;function Hk(e,t,r){return r=Tn(r),e.resolve(t,r)}Ke.resolveUrl=Hk;var Wk=/^[a-z_][-a-z0-9._]*$/i;function Uk(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Tn(e[r]||t),o={"":i},s=Qy(n,i,!1),a={},c=new Set;return jk(e,{allKeys:!0},(f,d,m,y)=>{if(y===void 0)return;let g=s+d,v=o[y];typeof f[r]=="string"&&(v=b.call(this,f[r])),I.call(this,f.$anchor),I.call(this,f.$dynamicAnchor),o[d]=v;function b(_){let R=this.opts.uriResolver.resolve;if(_=Tn(v?R(v,_):_),c.has(_))throw p(_);c.add(_);let N=this.refs[_];return typeof N=="string"&&(N=this.refs[N]),typeof N=="object"?l(f,N.schema,_):_!==Tn(g)&&(_[0]==="#"?(l(f,a[_],_),a[_]=f):this.refs[_]=g),_}function I(_){if(typeof _=="string"){if(!Wk.test(_))throw new Error(`invalid anchor "${_}"`);b.call(this,`#${_}`)}}}),a;function l(f,d,m){if(d!==void 0&&!Lk(f,d))throw p(m)}function p(f){return new Error(`reference "${f}" resolves to more than one schema`)}}Ke.getSchemaRefs=Uk});var Fi=S(pr=>{"use strict";Object.defineProperty(pr,"__esModule",{value:!0});pr.getData=pr.KeywordCxt=pr.validateFunctionCode=void 0;var iv=Ny(),ev=Vi(),Pu=vu(),Fs=Vi(),zk=Fy(),Di=Uy(),Eu=Gy(),W=Z(),X=ft(),Gk=Li(),Kt=ie(),ji=Mi();function Jk(e){if(av(e)&&(lv(e),sv(e))){Xk(e);return}ov(e,()=>(0,iv.topBoolOrEmptySchema)(e))}pr.validateFunctionCode=Jk;function ov({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,W._)`${X.default.data}, ${X.default.valCxt}`,n.$async,()=>{e.code((0,W._)`"use strict"; ${tv(r,i)}`),Yk(e,i),e.code(o)}):e.func(t,(0,W._)`${X.default.data}, ${Kk(i)}`,n.$async,()=>e.code(tv(r,i)).code(o))}function Kk(e){return(0,W._)`{${X.default.instancePath}="", ${X.default.parentData}, ${X.default.parentDataProperty}, ${X.default.rootData}=${X.default.data}${e.dynamicRef?(0,W._)`, ${X.default.dynamicAnchors}={}`:W.nil}}={}`}function Yk(e,t){e.if(X.default.valCxt,()=>{e.var(X.default.instancePath,(0,W._)`${X.default.valCxt}.${X.default.instancePath}`),e.var(X.default.parentData,(0,W._)`${X.default.valCxt}.${X.default.parentData}`),e.var(X.default.parentDataProperty,(0,W._)`${X.default.valCxt}.${X.default.parentDataProperty}`),e.var(X.default.rootData,(0,W._)`${X.default.valCxt}.${X.default.rootData}`),t.dynamicRef&&e.var(X.default.dynamicAnchors,(0,W._)`${X.default.valCxt}.${X.default.dynamicAnchors}`)},()=>{e.var(X.default.instancePath,(0,W._)`""`),e.var(X.default.parentData,(0,W._)`undefined`),e.var(X.default.parentDataProperty,(0,W._)`undefined`),e.var(X.default.rootData,X.default.data),t.dynamicRef&&e.var(X.default.dynamicAnchors,(0,W._)`{}`)})}function Xk(e){let{schema:t,opts:r,gen:n}=e;ov(e,()=>{r.$comment&&t.$comment&&uv(e),rC(e),n.let(X.default.vErrors,null),n.let(X.default.errors,0),r.unevaluated&&Qk(e),cv(e),oC(e)})}function Qk(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,W._)`${r}.evaluated`),t.if((0,W._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,W._)`${e.evaluated}.props`,(0,W._)`undefined`)),t.if((0,W._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,W._)`${e.evaluated}.items`,(0,W._)`undefined`))}function tv(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,W._)`/*# sourceURL=${r} */`:W.nil}function Zk(e,t){if(av(e)&&(lv(e),sv(e))){eC(e,t);return}(0,iv.boolOrEmptySchema)(e,t)}function sv({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function av(e){return typeof e.schema!="boolean"}function eC(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&uv(e),nC(e),iC(e);let o=n.const("_errs",X.default.errors);cv(e,o),n.var(t,(0,W._)`${o} === ${X.default.errors}`)}function lv(e){(0,Kt.checkUnknownRules)(e),tC(e)}function cv(e,t){if(e.opts.jtd)return rv(e,[],!1,t);let r=(0,ev.getSchemaTypes)(e.schema),n=(0,ev.coerceAndCheckDataType)(e,r);rv(e,r,!n,t)}function tC(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Kt.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function rC(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Kt.checkStrictMode)(e,"default is ignored in the schema root")}function nC(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,Gk.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function iC(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function uv({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)e.code((0,W._)`${X.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let s=(0,W.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,W._)`${X.default.self}.opts.$comment(${o}, ${s}, ${a}.schema)`)}}function oC(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,W._)`${X.default.errors} === 0`,()=>t.return(X.default.data),()=>t.throw((0,W._)`new ${i}(${X.default.vErrors})`)):(t.assign((0,W._)`${n}.errors`,X.default.vErrors),o.unevaluated&&sC(e),t.return((0,W._)`${X.default.errors} === 0`))}function sC({gen:e,evaluated:t,props:r,items:n}){r instanceof W.Name&&e.assign((0,W._)`${t}.props`,r),n instanceof W.Name&&e.assign((0,W._)`${t}.items`,n)}function rv(e,t,r,n){let{gen:i,schema:o,data:s,allErrors:a,opts:c,self:l}=e,{RULES:p}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Kt.schemaHasRulesButRef)(o,p))){i.block(()=>pv(e,"$ref",p.all.$ref.definition));return}c.jtd||aC(e,t),i.block(()=>{for(let d of p.rules)f(d);f(p.post)});function f(d){(0,Pu.shouldUseGroup)(o,d)&&(d.type?(i.if((0,Fs.checkDataType)(d.type,s,c.strictNumbers)),nv(e,d),t.length===1&&t[0]===d.type&&r&&(i.else(),(0,Fs.reportTypeError)(e)),i.endIf()):nv(e,d),a||i.if((0,W._)`${X.default.errors} === ${n||0}`))}}function nv(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,zk.assignDefaults)(e,t.type),r.block(()=>{for(let o of t.rules)(0,Pu.shouldUseRule)(n,o)&&pv(e,o.keyword,o.definition,t.type)})}function aC(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(lC(e,t),e.opts.allowUnionTypes||cC(e,t),uC(e,e.dataTypes))}function lC(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{fv(e.dataTypes,r)||Iu(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),pC(e,t)}}function cC(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Iu(e,"use allowUnionTypes to allow union type keyword")}function uC(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Pu.shouldUseRule)(e.schema,i)){let{type:o}=i.definition;o.length&&!o.some(s=>fC(t,s))&&Iu(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function fC(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function fv(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function pC(e,t){let r=[];for(let n of e.dataTypes)fv(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Iu(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Kt.checkStrictMode)(e,t,e.opts.strictTypes)}var qs=class{constructor(t,r,n){if((0,Di.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Kt.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",dv(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Di.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=t.gen.const("_errs",X.default.errors))}result(t,r,n){this.failResult((0,W.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,W.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,W._)`${r} !== undefined && (${(0,W.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?ji.reportExtraError:ji.reportError)(this,this.def.error,r)}$dataError(){(0,ji.reportError)(this,this.def.$dataError||ji.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,ji.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=W.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=W.nil,r=W.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:s}=this;n.if((0,W.or)((0,W._)`${i} === undefined`,r)),t!==W.nil&&n.assign(t,!0),(o.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==W.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,W.or)(s(),a());function s(){if(n.length){if(!(r instanceof W.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,W._)`${(0,Fs.checkDataTypes)(c,r,o.opts.strictNumbers,Fs.DataType.Wrong)}`}return W.nil}function a(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,W._)`!${c}(${r})`}return W.nil}}subschema(t,r){let n=(0,Eu.getSubschema)(this.it,t);(0,Eu.extendSubschemaData)(n,this.it,t),(0,Eu.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return Zk(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Kt.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Kt.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,W.Name)),!0}};pr.KeywordCxt=qs;function pv(e,t,r,n){let i=new qs(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Di.funcKeywordCode)(i,r):"macro"in r?(0,Di.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Di.funcKeywordCode)(i,r)}var dC=/^\/(?:[^~]|~0|~1)*$/,hC=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function dv(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return X.default.rootData;if(e[0]==="/"){if(!dC.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=X.default.rootData}else{let l=hC.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let p=+l[1];if(i=l[2],i==="#"){if(p>=t)throw new Error(c("property/index",p));return n[t-p]}if(p>t)throw new Error(c("data",p));if(o=r[t-p],!i)return o}let s=o,a=i.split("/");for(let l of a)l&&(o=(0,W._)`${o}${(0,W.getProperty)((0,Kt.unescapeJsonPointer)(l))}`,s=(0,W._)`${s} && ${o}`);return s;function c(l,p){return`Cannot access ${l} ${p} levels up, current level is ${t}`}}pr.getData=dv});var Bs=S(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});var Ru=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Tu.default=Ru});var qi=S(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});var Au=Li(),Nu=class extends Error{constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Au.resolveUrl)(t,r,n),this.missingSchema=(0,Au.normalizeId)((0,Au.getFullPath)(t,this.missingRef))}};Ou.default=Nu});var Bi=S(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.resolveSchema=dt.getCompilingSchema=dt.resolveRef=dt.compileSchema=dt.SchemaEnv=void 0;var $t=Z(),mC=Bs(),jr=ft(),xt=Li(),hv=ie(),gC=Fi(),An=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,xt.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};dt.SchemaEnv=An;function Vu(e){let t=mv.call(this,e);if(t)return t;let r=(0,xt.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,s=new $t.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),a;e.$async&&(a=s.scopeValue("Error",{ref:mC.default,code:(0,$t._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:jr.default.data,parentData:jr.default.parentData,parentDataProperty:jr.default.parentDataProperty,dataNames:[jr.default.data],dataPathArr:[$t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,$t.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:$t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,$t._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(e),(0,gC.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let f=s.toString();p=`${s.scopeRefs(jr.default.scope)}return ${f}`,this.opts.code.process&&(p=this.opts.code.process(p,e));let m=new Function(`${jr.default.self}`,`${jr.default.scope}`,p)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:f,scopeValues:s._values}),this.opts.unevaluated){let{props:y,items:g}=l;m.evaluated={props:y instanceof $t.Name?void 0:y,items:g instanceof $t.Name?void 0:g,dynamicProps:y instanceof $t.Name,dynamicItems:g instanceof $t.Name},m.source&&(m.source.evaluated=(0,$t.stringify)(m.evaluated))}return e.validate=m,e}catch(f){throw delete e.validate,delete e.validateName,p&&this.logger.error("Error compiling schema, function code:",p),f}finally{this._compilations.delete(e)}}dt.compileSchema=Vu;function yC(e,t,r){var n;r=(0,xt.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=bC.call(this,e,r);if(o===void 0){let s=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;s&&(o=new An({schema:s,schemaId:a,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=vC.call(this,o)}dt.resolveRef=yC;function vC(e){return(0,xt.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Vu.call(this,e)}function mv(e){for(let t of this._compilations)if(wC(t,e))return t}dt.getCompilingSchema=mv;function wC(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function bC(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Hs.call(this,e,t)}function Hs(e,t){let r=this.opts.uriResolver.parse(t),n=(0,xt._getFullPath)(this.opts.uriResolver,r),i=(0,xt.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return Mu.call(this,r,e);let o=(0,xt.normalizeId)(n),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){let a=Hs.call(this,e,s);return typeof a?.schema!="object"?void 0:Mu.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||Vu.call(this,s),o===(0,xt.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];return l&&(i=(0,xt.resolveUrl)(this.opts.uriResolver,i,l)),new An({schema:a,schemaId:c,root:e,baseId:i})}return Mu.call(this,r,s)}}dt.resolveSchema=Hs;var $C=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Mu(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,hv.unescapeFragment)(a)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!$C.has(a)&&l&&(t=(0,xt.resolveUrl)(this.opts.uriResolver,t,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,hv.schemaHasRulesButRef)(r,this.RULES)){let a=(0,xt.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=Hs.call(this,n,a)}let{schemaId:s}=this.opts;if(o=o||new An({schema:r,schemaId:s,root:n,baseId:t}),o.schema!==o.root.schema)return o}});var gv=S((YM,xC)=>{xC.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 Bu=S((XM,Sv)=>{"use strict";var _C=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),ju=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),SC=RegExp.prototype.test.bind(/^\d*$/u),Dr=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Du=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),vv=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),Fu=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),kC=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),Ye=new Array(256);{let e="0123456789ABCDEF";for(let t=0;t<256;t++)Ye[t]="%"+e[t>>4]+e[t&15]}function Fe(e){return e<2048?Ye[192|e>>6]+Ye[128|e&63]:e<65536?Ye[224|e>>12]+Ye[128|e>>6&63]+Ye[128|e&63]:Ye[240|e>>18]+Ye[128|e>>12&63]+Ye[128|e>>6&63]+Ye[128|e&63]}function CC(e){let t="",r=0,n=0;for(n=0;n<e.length;n++)if(r=e[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var EC=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),PC=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),IC=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),RC=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function TC(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++)if(!IC(e[t])){if(e[t]==="%"&&t+2<e.length&&Dr(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function yv(e){let t=-1,r=0,n=-1,i=0;for(let a=0;a<e.length;a++)e[a]==="0"?(n===-1&&(n=a),i++,i>r&&(r=i,t=n)):(n=-1,i=0);if(r<2)return e.join(":");let o=e.slice(0,t).join(":"),s=e.slice(t+r).join(":");return o+"::"+s}function AC(e){let t=e.indexOf("::");if(t!==-1&&e.indexOf("::",t+1)!==-1)return;let r=t===-1?e.split(":"):e.slice(0,t).split(":"),n=t===-1?[]:e.slice(t+2).split(":");t!==-1&&(r.length===1&&r[0]===""&&(r.length=0),n.length===1&&n[0]===""&&(n.length=0));let i=r.concat(n),o=0;for(let a=0;a<i.length;a++){let c=i[a];if(c==="")return;if(c.indexOf(".")!==-1){if(a!==i.length-1||t!==-1&&n.length===0||!ju(c))return;o+=2;continue}if(!EC(c))return;i[a]=parseInt(c,16).toString(16),o++}if(t===-1)return o!==8?void 0:yv(i);if(o>=8)return;let s=i.slice(0,r.length);for(let a=o;a<8;a++)s.push("0");for(let a=r.length;a<i.length;a++)s.push(i[a]);return yv(s)}function Lu(e){let t=e[0]==="["&&e[e.length-1]==="]";if((e[0]==="["||e[e.length-1]==="]")&&!t)return{host:e,isIPV6:!1,error:!0};let n=t?e.slice(1,-1):e;if(t&&PC(n))return n=n.toLowerCase(),{host:`[${n}]`,escapedHost:n,isIPV6:!1,isIPVFuture:!0};if(NC(n,":")<2)return{host:e,isIPV6:!1,error:t};let i="",o=n.indexOf("%");if(o!==-1){let a=n.slice(o,o+3).toLowerCase()==="%25"?3:1;if(i=n.slice(o+a),!TC(i))return{host:e,isIPV6:!1,error:!0};n=n.slice(0,o)}let s=AC(n);return s===void 0?{host:e,isIPV6:!1,error:!0}:{host:s+(i?"%"+i:""),escapedHost:s+(i?"%25"+i:""),isIPV6:!0}}function NC(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}function wv(e){let t=e,r=[],n=-1,i=0;for(;i=t.length;){if(i===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(i===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(i===3&&t==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),r.length!==0&&r.pop();continue}}if((n=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")}function OC(e){if(e===""||e[0]==="/")return wv(e);let t=e.split("/"),r=t.length-1,n=[],i=!1;for(let o=0;o<=r;o++){let s=t[o];s==="."||s===".."?(s===".."&&(n.length!==0&&n[n.length-1]!==".."?n.pop():n.push("..")),i=o===r):n.push(s)}return i&&n[n.length-1]!==".."&&n.push(""),(n.length===0||n[0]===""||n[0].includes(":"))&&n.unshift("."),n.join("/")}var MC={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},VC=/[@/?#:]/g,LC=/[@/?#]/g;function bv(e,t){let r=t?LC:VC;return r.lastIndex=0,e.replace(r,n=>MC[n])}function $v(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let n=0;n<e.length;n++){if(e[n]==="%"&&n+2<e.length){let i=e.slice(n+1,n+3);if(Dr(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));t&&Du(s)?r+=s:r+="%"+o,n+=2;continue}}r+=e[n]}return r}function jC(e){let t="";for(let r=0;r<e.length;r++){let n=e[r];if(n==="%"&&r+2<e.length){let i=e.slice(r+1,r+3);if(Dr(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));s!=="."&&Du(s)?t+=s:t+="%"+o,r+=2;continue}}if(vv(n))t+=n;else{let i=e.charCodeAt(r);if(i<128)t+=_v(i)?n:Ye[i];else if(i<55296||i>57343)t+=Fe(i);else if(i<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);o>=56320&&o<=57343?(t+=Fe(65536+(i-55296<<10)+(o-56320)),r++):t+=Fe(65533)}else t+=Fe(65533)}}return t}function DC(e,t=!1){let r="",n=t&&e[0]!=="/";for(let i=0;i<e.length;i++){let o=e[i];if(o==="%"&&i+2<e.length){let s=e.slice(i+1,i+3);if(Dr(s)){r+="%"+s.toUpperCase(),i+=2;continue}}if(o==="/"&&(n=!1),vv(o)&&(o!==":"||!n))r+=o;else{let s=e.charCodeAt(i);if(s<128)r+=Ye[s];else if(s<55296||s>57343)r+=Fe(s);else if(s<=56319&&i+1<e.length){let a=e.charCodeAt(i+1);a>=56320&&a<=57343?(r+=Fe(65536+(s-55296<<10)+(a-56320)),i++):r+=Fe(65533)}else r+=Fe(65533)}}return r}function qu(e,t){let r="";for(let n=0;n<e.length;n++){let i=e[n];if(i==="%"&&n+2<e.length){let o=e.slice(n+1,n+3);if(Dr(o)){r+="%"+o.toUpperCase(),n+=2;continue}}if(t(i))r+=i;else{let o=e.charCodeAt(n);if(o<128)r+=Ye[o];else if(o<55296||o>57343)r+=Fe(o);else if(o<=56319&&n+1<e.length){let s=e.charCodeAt(n+1);s>=56320&&s<=57343?(r+=Fe(65536+(o-55296<<10)+(s-56320)),n++):r+=Fe(65533)}else r+=Fe(65533)}}return r}function xv(e){return qu(e,kC)}function FC(e){return qu(e,Fu)}function qC(e){return qu(e,Fu)}function _v(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function BC(e){let t="";for(let r=0;r<e.length;r++){let n=e[r];if(n==="%"&&r+2<e.length){let i=e.slice(r+1,r+3);if(Dr(i)){let o=i.toUpperCase(),s=String.fromCharCode(parseInt(o,16));Du(s)?t+=s:t+="%"+o,r+=2;continue}}if(Fu(n))t+=n;else{let i=e.charCodeAt(r);if(i<128)t+=_v(i)?n:Ye[i];else if(i<55296||i>57343)t+=Fe(i);else if(i<=56319&&r+1<e.length){let o=e.charCodeAt(r+1);o>=56320&&o<=57343?(t+=Fe(65536+(i-55296<<10)+(o-56320)),r++):t+=Fe(65533)}else t+=Fe(65533)}}return t}function HC(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){let n=e.slice(r+1,r+3);if(Dr(n)){t+="%"+n.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}function WC(e){let t=[];if(e.userinfo!==void 0&&(t.push(xv(e.userinfo)),t.push("@")),e.host!==void 0){let r=e.host;if(!ju(r)){let n=Lu(r);n.isIPV6!==!0&&n.isIPVFuture!==!0&&(r=$v(r,!0),n=Lu(r)),n.isIPV6===!0||n.isIPVFuture===!0?r=`[${n.escapedHost}]`:r=bv(r,!1)}t.push(r)}if(typeof e.port=="number"||typeof e.port=="string"){let r=String(e.port);if(!SC(r))throw new TypeError("URI port is malformed.");t.push(":"),t.push(r)}return t.length?t.join(""):void 0}Sv.exports={nonSimpleDomain:RC,recomposeAuthority:WC,reescapeHostDelimiters:bv,normalizePercentEncoding:$v,normalizePathEncoding:jC,serializePathEncoding:DC,normalizeQueryFragmentEncoding:BC,encodeUserinfo:xv,encodeQuery:FC,encodeFragment:qC,escapePreservingEscapes:HC,removeDotSegments:wv,removeDotSegmentsRelative:OC,isIPv4:ju,isUUID:_C,normalizeIPv6:Lu,stringArrayToHexStripped:CC}});var Iv=S((QM,Pv)=>{"use strict";var{isUUID:UC}=Bu(),zC=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,GC=["http","https","ws","wss","urn","urn:uuid"];function JC(e){return GC.indexOf(e)!==-1}function Hu(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function kv(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function Cv(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function KC(e){return e.secure=Hu(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function YC(e){if((e.port===(Hu(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let t=e.resourceName.indexOf("?"),r=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=r&&r!=="/"?r:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function XC(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(zC);if(r&&r[0]===e.path){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let i=`${n}:${t.nid||e.nid}`,o=Wu(i);e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function QC(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),i=`${r}:${t.nid||n}`,o=Wu(i);o&&(e=o.serialize(e,t));let s=e,a=e.nss;return s.path=`${n||t.nid}:${a}`,t.skipEscape=!0,s}function ZC(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!UC(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function eE(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var Ev={scheme:"http",domainHost:!0,parse:kv,serialize:Cv},tE={scheme:"https",domainHost:Ev.domainHost,parse:kv,serialize:Cv},Ws={scheme:"ws",domainHost:!0,parse:KC,serialize:YC},rE={scheme:"wss",domainHost:Ws.domainHost,parse:Ws.parse,serialize:Ws.serialize},nE={scheme:"urn",parse:XC,serialize:QC,skipNormalize:!0},iE={scheme:"urn:uuid",parse:ZC,serialize:eE,skipNormalize:!0},Us={http:Ev,https:tE,ws:Ws,wss:rE,urn:nE,"urn:uuid":iE};Object.setPrototypeOf(Us,null);function Wu(e){return e&&(Us[e]||Us[e.toLowerCase()])||void 0}Pv.exports={wsIsSecure:Hu,SCHEMES:Us,isValidSchemeName:JC,getSchemeHandler:Wu}});var Wv=S((ZM,Ys)=>{"use strict";var{normalizeIPv6:Ov,removeDotSegments:Wi,removeDotSegmentsRelative:Mv,recomposeAuthority:oE,normalizePercentEncoding:Uu,normalizePathEncoding:sE,serializePathEncoding:Rv,normalizeQueryFragmentEncoding:Tv,encodeQuery:aE,encodeFragment:lE,reescapeHostDelimiters:cE,isIPv4:Vv,nonSimpleDomain:uE}=Bu(),{SCHEMES:Lv,getSchemeHandler:zu}=Iv(),jv=/^[A-Za-z][A-Za-z0-9+.-]*$/u,Dv="URI scheme is malformed.",zs="URI host is malformed.",fE=/[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;function Av(e){let t=String(e);if(!jv.test(t))throw new TypeError(Dv);return t}function pE(e,t){return typeof e=="string"?e=$E(e,t):typeof e=="object"&&(e=Js(Fr(e,t),t)),e}function dE(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},{parsed:i,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:a,malformedHost:c,malformedScheme:l}=Gs(e,n),{parsed:p,malformedAuthorityOrPort:f,malformedPercentEncoding:d,malformedSchemeSpecific:m,malformedHost:y,malformedScheme:g}=Gs(t,n);if(o||f||s||d||a||m||c||y||l||g)throw new Error(i.error||p.error||"URI is malformed.");let v=Fv(i,p,n,!0),b=zu(r&&r.scheme||v.scheme),I=v.host,_=I!==void 0&&I!==""&&(Vv(I)||Ov(I).isIPV6);if(Bv(v,r||{},b,_))throw new Error(zs);qv(v,r||{},b,_);let R=I&&I.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(I);if(v.error&&!R)throw new Error(v.error);return n.skipEscape=!0,Fr(v,n)}function Fv(e,t,r,n){let i={};if(n||(e=Js(Fr(e,r),r),t=Js(Fr(t,r),r)),r=r||{},!r.tolerant&&t.scheme)i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=Wi(t.path||""),i.query=t.query;else{if(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=Wi(t.path||""),i.query=t.query;else{if(!t.path)i.path=e.path,t.query!==void 0?i.query=t.query:i.query=e.query;else{if(t.path[0]==="/")i.path=Wi(t.path);else{let o=e.userinfo!==void 0||e.host!==void 0||e.port!==void 0;o&&!e.path?i.path="/"+t.path:e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path,i.path=e.scheme===void 0&&!o&&i.path[0]!=="/"?Mv(i.path):Wi(i.path)}i.query=t.query}i.userinfo=e.userinfo,i.host=e.host,i.port=e.port}i.scheme=e.scheme}return i.fragment=t.fragment,i}function hE(e,t,r){let n=Nv(e,r),i=Nv(t,r);return n!==void 0&&i!==void 0&&n===i}function Fr(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),i=[];r.scheme&&(r.scheme=Av(r.scheme));let o=zu(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n);let s=r.userinfo!==void 0||r.host!==void 0||r.port!==void 0,a=(r.scheme===void 0||n.reference==="suffix")&&!s,c=!n.skipEscape&&a;r.path!==void 0&&(n.skipEscape?r.path=Uu(r.path):r.path=Rv(r.path,c)),n.reference!=="suffix"&&r.scheme&&(r.scheme=Av(r.scheme),i.push(r.scheme,":"));let l=oE(r);if(l!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(l),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let p=r.path;!n.absolutePath&&(!o||!o.absolutePath)&&(p=a&&p[0]!=="/"?Mv(p):Wi(p)),a&&(p=Rv(p,!0)),l===void 0&&p[0]==="/"&&p[1]==="/"&&(p="/%2F"+p.slice(2)),i.push(p)}return r.query!==void 0&&i.push("?",aE(r.query)),r.fragment!==void 0&&i.push("#",lE(r.fragment)),i.join("")}var mE=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,gE=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,yE=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function vE(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port=="number"&&(e.port<0||e.port>65535))return"URI port is malformed."}function Hi(e){if(e===void 0)return!1;let t=e.indexOf("%");for(;t!==-1;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf("%",t+3)}return!1}function Ks(e){return e[0]==="["&&e[e.length-1]==="]"}function wE(e){let t=e[4];return Hi(e[3])||t!==void 0&&!Ks(t)&&Hi(t)||Hi(e[6])||Hi(e[7])||Hi(e[8])}function qv(e,t,r,n){if(Bv(e,t,r,n))return e.error=e.error||zs,!0;if(!t.unicodeSupport&&(!r||!r.unicodeSupport)&&e.host&&!Ks(e.host)&&(t.domainHost||r&&r.domainHost)&&n===!1&&uE(e.host)){let i;try{i=new URL("http://"+e.host)}catch(o){return e.error=e.error||"Host's domain name can not be converted to ASCII: "+o,!0}if(!bE(i))return e.error=e.error||zs,!0;e.host=i.hostname}return!1}function Bv(e,t,r,n){return!!(e.host&&n===!1&&!Ks(e.host)&&(t.domainHost||r&&r.domainHost)&&fE.test(e.host))}function bE(e){return e.username===""&&e.password===""&&e.port===""&&e.pathname==="/"&&e.search===""&&e.hash===""&&e.hostname!==""}function Gs(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,o=!1,s=!1,a=!1,c=!1,l=!1,p=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let f=e.match(gE);f!==null&&f[1].indexOf("\\")!==-1&&(n.error="URI authority must not contain a literal backslash.",i=!0);let d=e.match(yE);if(d!==null){let y=d[1],g=y.replace(/[\t\n\r]/g,"");g.length>=2&&(g.slice(0,2)!=="//"?(n.error=n.error||"URI authority must not contain a literal backslash.",i=!0):y.length!==g.length&&(n.error=n.error||"URI authority introducer must not contain whitespace.",i=!0))}let m=e.match(mE);if(m){n.scheme=m[1],n.userinfo=m[3],n.host=m[4],n.port=parseInt(m[5],10),n.path=m[6]||"",n.query=m[7],n.fragment=m[8],n.scheme!==void 0&&(jv.test(n.scheme)?n.scheme=n.scheme.toLowerCase():(n.error=n.error||Dv,l=!0)),o=wE(m),o&&(n.error=n.error||"URI contains malformed percent-encoding."),isNaN(n.port)&&(n.port=m[5]);let y=vE(n,m);if(y!==void 0&&(n.error=n.error||y,i=!0),n.host)if(Vv(n.host)===!1){let b=Ks(n.host),I=n.host.indexOf("[")!==-1||n.host.indexOf("]")!==-1,_=Ov(n.host);p=_.isIPV6||_.isIPVFuture===!0,c=I&&(!b||_.error===!0),n.host=p?_.host:_.host.toLowerCase(),c&&(n.error=n.error||zs,i=!0)}else p=!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 g=zu(r.scheme||n.scheme);if(c||(a=qv(n,r,g,p)),e.indexOf("%")!==-1&&n.host!==void 0&&!c){let v=p?n.host:Uu(n.host,!0);p||(v=Uu(v.toLowerCase())),n.host=p||r.scheme!=="null"?cE(v,p):v}(!g||g&&!g.skipNormalize)&&(n.path&&(n.path=sE(n.path)),n.query&&(n.query=Tv(n.query)),n.fragment&&(n.fragment=Tv(n.fragment))),g&&g.parse&&(g.parse(n,r),g===Lv.urn&&n.nid===void 0&&(s=!0))}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:l}}function Js(e,t){return Gs(e,t).parsed}function $E(e,t){return Hv(e,t).normalized}function Hv(e,t){let{parsed:r,malformedAuthorityOrPort:n,malformedPercentEncoding:i,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}=Gs(e,t);return{normalized:n||i||o||s||a?e:Fr(r,t),malformedAuthorityOrPort:n,malformedPercentEncoding:i,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:a}}function Nv(e,t){if(typeof e!="string"&&typeof e!="object")return;let r;try{r=typeof e=="string"?e:Fr(e,t)}catch{return}let{normalized:n,malformedAuthorityOrPort:i,malformedPercentEncoding:o,malformedSchemeSpecific:s,malformedHost:a,malformedScheme:c}=Hv(r,t);return i||o||s||a||c?void 0:n}var Gu={SCHEMES:Lv,normalize:pE,resolve:dE,resolveComponent:Fv,equal:hE,serialize:Fr,parse:Js};Ys.exports=Gu;Ys.exports.default=Gu;Ys.exports.fastUri=Gu});var zv=S(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});var Uv=Wv();Uv.code='require("ajv/dist/runtime/uri").default';Ju.default=Uv});var ew=S(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.CodeGen=Ae.Name=Ae.nil=Ae.stringify=Ae.str=Ae._=Ae.KeywordCxt=void 0;var xE=Fi();Object.defineProperty(Ae,"KeywordCxt",{enumerable:!0,get:function(){return xE.KeywordCxt}});var Nn=Z();Object.defineProperty(Ae,"_",{enumerable:!0,get:function(){return Nn._}});Object.defineProperty(Ae,"str",{enumerable:!0,get:function(){return Nn.str}});Object.defineProperty(Ae,"stringify",{enumerable:!0,get:function(){return Nn.stringify}});Object.defineProperty(Ae,"nil",{enumerable:!0,get:function(){return Nn.nil}});Object.defineProperty(Ae,"Name",{enumerable:!0,get:function(){return Nn.Name}});Object.defineProperty(Ae,"CodeGen",{enumerable:!0,get:function(){return Nn.CodeGen}});var _E=Bs(),Xv=qi(),SE=yu(),Ui=Bi(),kE=Z(),zi=Li(),Xs=Vi(),Yu=ie(),Gv=gv(),CE=zv(),Qv=(e,t)=>new RegExp(e,t);Qv.code="new RegExp";var EE=["removeAdditional","useDefaults","coerceTypes"],PE=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),IE={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."},RE={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Jv=200;function TE(e){var t,r,n,i,o,s,a,c,l,p,f,d,m,y,g,v,b,I,_,R,N,j,U,oe,me;let be=e.strict,Pe=(t=e.code)===null||t===void 0?void 0:t.optimize,we=Pe===!0||Pe===void 0?1:Pe||0,ze=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Qv,fe=(i=e.uriResolver)!==null&&i!==void 0?i:CE.default;return{strictSchema:(s=(o=e.strictSchema)!==null&&o!==void 0?o:be)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:be)!==null&&c!==void 0?c:!0,strictTypes:(p=(l=e.strictTypes)!==null&&l!==void 0?l:be)!==null&&p!==void 0?p:"log",strictTuples:(d=(f=e.strictTuples)!==null&&f!==void 0?f:be)!==null&&d!==void 0?d:"log",strictRequired:(y=(m=e.strictRequired)!==null&&m!==void 0?m:be)!==null&&y!==void 0?y:!1,code:e.code?{...e.code,optimize:we,regExp:ze}:{optimize:we,regExp:ze},loopRequired:(g=e.loopRequired)!==null&&g!==void 0?g:Jv,loopEnum:(v=e.loopEnum)!==null&&v!==void 0?v:Jv,meta:(b=e.meta)!==null&&b!==void 0?b:!0,messages:(I=e.messages)!==null&&I!==void 0?I:!0,inlineRefs:(_=e.inlineRefs)!==null&&_!==void 0?_:!0,schemaId:(R=e.schemaId)!==null&&R!==void 0?R:"$id",addUsedSchema:(N=e.addUsedSchema)!==null&&N!==void 0?N:!0,validateSchema:(j=e.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(U=e.validateFormats)!==null&&U!==void 0?U:!0,unicodeRegExp:(oe=e.unicodeRegExp)!==null&&oe!==void 0?oe:!0,int32range:(me=e.int32range)!==null&&me!==void 0?me:!0,uriResolver:fe}}var Gi=class{constructor(t={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...TE(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new kE.ValueScope({scope:{},prefixes:PE,es5:r,lines:n}),this.logger=LE(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,SE.getRules)(),Kv.call(this,IE,t,"NOT SUPPORTED"),Kv.call(this,RE,t,"DEPRECATED","warn"),this._metaOpts=ME.call(this),t.formats&&NE.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&OE.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),AE.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=Gv;n==="id"&&(i={...Gv},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,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,t,r);async function i(p,f){await o.call(this,p.$schema);let d=this._addSchema(p,f);return d.validate||s.call(this,d)}async function o(p){p&&!this.getSchema(p)&&await i.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(f){if(!(f instanceof Xv.default))throw f;return a.call(this,f),await c.call(this,f.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:f}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${f} cannot be resolved`)}async function c(p){let f=await l.call(this,p);this.refs[p]||await o.call(this,f.$schema),this.refs[p]||this.addSchema(f,p,r)}async function l(p){let f=this._loading[p];if(f)return f;try{return await(this._loading[p]=n(p))}finally{delete this._loading[p]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let s of t)this.addSchema(s,void 0,n,i);return this}let o;if(typeof t=="object"){let{schemaId:s}=this.opts;if(o=t[s],o!==void 0&&typeof o!="string")throw new Error(`schema ${s} must be string`)}return r=(0,zi.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$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,t);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(t){let r;for(;typeof(r=Yv.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Ui.SchemaEnv({schema:{},schemaId:n});if(r=Ui.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Yv.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,zi.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,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(DE.call(this,n,r),!r)return(0,Yu.eachItem)(n,o=>Ku.call(this,o)),this;qE.call(this,r);let i={...r,type:(0,Xs.getJSONTypes)(r.type),schemaType:(0,Xs.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(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let o=i.split("/").slice(1),s=t;for(let a of o)s=s[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:l}=c.definition,p=s[a];l&&p&&(s[a]=Zv(p))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof t=="object")s=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,zi.normalizeId)(s||n);let l=zi.getSchemaRefs.call(this,t,n);return c=new Ui.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Ui.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Ui.compileSchema.call(this,t)}finally{this.opts=r}}};Gi.ValidationError=_E.default;Gi.MissingRefError=Xv.default;Ae.default=Gi;function Kv(e,t,r,n="error"){for(let i in e){let o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}function Yv(e){return e=(0,zi.normalizeId)(e),this.schemas[e]||this.refs[e]}function AE(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function NE(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function OE(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function ME(){let e={...this.opts};for(let t of EE)delete e[t];return e}var VE={log(){},warn(){},error(){}};function LE(e){if(e===!1)return VE;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var jE=/^[a-z_$][a-z0-9_$:-]*$/i;function DE(e,t){let{RULES:r}=this;if((0,Yu.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!jE.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function Ku(e,t,r){var n;let i=t?.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:c})=>c===r);if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,Xs.getJSONTypes)(t.type),schemaType:(0,Xs.getJSONTypes)(t.schemaType)}};t.before?FE.call(this,s,a,t.before):s.rules.push(a),o.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function FE(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function qE(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Zv(t)),e.validateSchema=this.compile(t,!0))}var BE={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Zv(e){return{anyOf:[e,BE]}}});var tw=S(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});var HE={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Xu.default=HE});var ea=S(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.callRef=qr.getValidate=void 0;var WE=qi(),rw=pt(),Xe=Z(),On=ft(),nw=Bi(),Qs=ie(),UE={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:s,opts:a,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return f();let p=nw.resolveRef.call(c,l,i,r);if(p===void 0)throw new WE.default(n.opts.uriResolver,i,r);if(p instanceof nw.SchemaEnv)return d(p);return m(p);function f(){if(o===l)return Zs(e,s,o,o.$async);let y=t.scopeValue("root",{ref:l});return Zs(e,(0,Xe._)`${y}.validate`,l,l.$async)}function d(y){let g=iw(e,y);Zs(e,g,y,y.$async)}function m(y){let g=t.scopeValue("schema",a.code.source===!0?{ref:y,code:(0,Xe.stringify)(y)}:{ref:y}),v=t.name("valid"),b=e.subschema({schema:y,dataTypes:[],schemaPath:Xe.nil,topSchemaRef:g,errSchemaPath:r},v);e.mergeEvaluated(b),e.ok(v)}}};function iw(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Xe._)`${r.scopeValue("wrapper",{ref:t})}.validate`}qr.getValidate=iw;function Zs(e,t,r,n){let{gen:i,it:o}=e,{allErrors:s,schemaEnv:a,opts:c}=o,l=c.passContext?On.default.this:Xe.nil;n?p():f();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let y=i.let("valid");i.try(()=>{i.code((0,Xe._)`await ${(0,rw.callValidateCode)(e,t,l)}`),m(t),s||i.assign(y,!0)},g=>{i.if((0,Xe._)`!(${g} instanceof ${o.ValidationError})`,()=>i.throw(g)),d(g),s||i.assign(y,!1)}),e.ok(y)}function f(){e.result((0,rw.callValidateCode)(e,t,l),()=>m(t),()=>d(t))}function d(y){let g=(0,Xe._)`${y}.errors`;i.assign(On.default.vErrors,(0,Xe._)`${On.default.vErrors} === null ? ${g} : ${On.default.vErrors}.concat(${g})`),i.assign(On.default.errors,(0,Xe._)`${On.default.vErrors}.length`)}function m(y){var g;if(!o.opts.unevaluated)return;let v=(g=r?.validate)===null||g===void 0?void 0:g.evaluated;if(o.props!==!0)if(v&&!v.dynamicProps)v.props!==void 0&&(o.props=Qs.mergeEvaluated.props(i,v.props,o.props));else{let b=i.var("props",(0,Xe._)`${y}.evaluated.props`);o.props=Qs.mergeEvaluated.props(i,b,o.props,Xe.Name)}if(o.items!==!0)if(v&&!v.dynamicItems)v.items!==void 0&&(o.items=Qs.mergeEvaluated.items(i,v.items,o.items));else{let b=i.var("items",(0,Xe._)`${y}.evaluated.items`);o.items=Qs.mergeEvaluated.items(i,b,o.items,Xe.Name)}}}qr.callRef=Zs;qr.default=UE});var ow=S(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});var zE=tw(),GE=ea(),JE=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",zE.default,GE.default];Qu.default=JE});var sw=S(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});var ta=Z(),dr=ta.operators,ra={maximum:{okStr:"<=",ok:dr.LTE,fail:dr.GT},minimum:{okStr:">=",ok:dr.GTE,fail:dr.LT},exclusiveMaximum:{okStr:"<",ok:dr.LT,fail:dr.GTE},exclusiveMinimum:{okStr:">",ok:dr.GT,fail:dr.LTE}},KE={message:({keyword:e,schemaCode:t})=>(0,ta.str)`must be ${ra[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,ta._)`{comparison: ${ra[e].okStr}, limit: ${t}}`},YE={keyword:Object.keys(ra),type:"number",schemaType:"number",$data:!0,error:KE,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,ta._)`${r} ${ra[t].fail} ${n} || isNaN(${r})`)}};Zu.default=YE});var aw=S(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});var Ji=Z(),XE={message:({schemaCode:e})=>(0,Ji.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Ji._)`{multipleOf: ${e}}`},QE={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:XE,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,s=t.let("res"),a=o?(0,Ji._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,Ji._)`${s} !== parseInt(${s})`;e.fail$data((0,Ji._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};ef.default=QE});var cw=S(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});function lw(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}tf.default=lw;lw.code='require("ajv/dist/runtime/ucs2length").default'});var uw=S(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var Br=Z(),ZE=ie(),eP=cw(),tP={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Br.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Br._)`{limit: ${e}}`},rP={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:tP,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?Br.operators.GT:Br.operators.LT,s=i.opts.unicode===!1?(0,Br._)`${r}.length`:(0,Br._)`${(0,ZE.useFunc)(e.gen,eP.default)}(${r})`;e.fail$data((0,Br._)`${s} ${o} ${n}`)}};rf.default=rP});var fw=S(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});var nP=pt(),iP=ie(),Mn=Z(),oP={message:({schemaCode:e})=>(0,Mn.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Mn._)`{pattern: ${e}}`},sP={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:oP,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:s}=e,a=s.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?(0,Mn._)`new RegExp`:(0,iP.useFunc)(t,c),p=t.let("valid");t.try(()=>t.assign(p,(0,Mn._)`${l}(${o}, ${a}).test(${r})`),()=>t.assign(p,!1)),e.fail$data((0,Mn._)`!${p}`)}else{let c=(0,nP.usePattern)(e,i);e.fail$data((0,Mn._)`!${c}.test(${r})`)}}};nf.default=sP});var pw=S(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});var Ki=Z(),aP={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Ki.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Ki._)`{limit: ${e}}`},lP={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:aP,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?Ki.operators.GT:Ki.operators.LT;e.fail$data((0,Ki._)`Object.keys(${r}).length ${i} ${n}`)}};of.default=lP});var dw=S(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});var Yi=pt(),Xi=Z(),cP=ie(),uP={message:({params:{missingProperty:e}})=>(0,Xi.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Xi._)`{missingProperty: ${e}}`},fP={keyword:"required",type:"object",schemaType:"array",$data:!0,error:uP,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:s}=e,{opts:a}=s;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?l():p(),a.strictRequired){let m=e.parentSchema.properties,{definedProperties:y}=e.it;for(let g of r)if(m?.[g]===void 0&&!y.has(g)){let v=s.schemaEnv.baseId+s.errSchemaPath,b=`required property "${g}" is not defined at "${v}" (strictRequired)`;(0,cP.checkStrictMode)(s,b,s.opts.strictRequired)}}function l(){if(c||o)e.block$data(Xi.nil,f);else for(let m of r)(0,Yi.checkReportMissingProp)(e,m)}function p(){let m=t.let("missing");if(c||o){let y=t.let("valid",!0);e.block$data(y,()=>d(m,y)),e.ok(y)}else t.if((0,Yi.checkMissingProp)(e,r,m)),(0,Yi.reportMissingProp)(e,m),t.else()}function f(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m}),t.if((0,Yi.noPropertyInData)(t,i,m,a.ownProperties),()=>e.error())})}function d(m,y){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(y,(0,Yi.propertyInData)(t,i,m,a.ownProperties)),t.if((0,Xi.not)(y),()=>{e.error(),t.break()})},Xi.nil)}}};sf.default=fP});var hw=S(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});var Qi=Z(),pP={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,Qi.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Qi._)`{limit: ${e}}`},dP={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:pP,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?Qi.operators.GT:Qi.operators.LT;e.fail$data((0,Qi._)`${r}.length ${i} ${n}`)}};af.default=dP});var na=S(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});var mw=ku();mw.code='require("ajv/dist/runtime/equal").default';lf.default=mw});var gw=S(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});var cf=Vi(),Ne=Z(),hP=ie(),mP=na(),gP={message:({params:{i:e,j:t}})=>(0,Ne.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Ne._)`{i: ${e}, j: ${t}}`},yP={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:gP,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:s,it:a}=e;if(!n&&!i)return;let c=t.let("valid"),l=o.items?(0,cf.getSchemaTypes)(o.items):[];e.block$data(c,p,(0,Ne._)`${s} === false`),e.ok(c);function p(){let y=t.let("i",(0,Ne._)`${r}.length`),g=t.let("j");e.setParams({i:y,j:g}),t.assign(c,!0),t.if((0,Ne._)`${y} > 1`,()=>(f()?d:m)(y,g))}function f(){return l.length>0&&!l.some(y=>y==="object"||y==="array")}function d(y,g){let v=t.name("item"),b=(0,cf.checkDataTypes)(l,v,a.opts.strictNumbers,cf.DataType.Wrong),I=t.const("indices",(0,Ne._)`{}`);t.for((0,Ne._)`;${y}--;`,()=>{t.let(v,(0,Ne._)`${r}[${y}]`),t.if(b,(0,Ne._)`continue`),l.length>1&&t.if((0,Ne._)`typeof ${v} == "string"`,(0,Ne._)`${v} += "_"`),t.if((0,Ne._)`typeof ${I}[${v}] == "number"`,()=>{t.assign(g,(0,Ne._)`${I}[${v}]`),e.error(),t.assign(c,!1).break()}).code((0,Ne._)`${I}[${v}] = ${y}`)})}function m(y,g){let v=(0,hP.useFunc)(t,mP.default),b=t.name("outer");t.label(b).for((0,Ne._)`;${y}--;`,()=>t.for((0,Ne._)`${g} = ${y}; ${g}--;`,()=>t.if((0,Ne._)`${v}(${r}[${y}], ${r}[${g}])`,()=>{e.error(),t.assign(c,!1).break(b)})))}}};uf.default=yP});var yw=S(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});var ff=Z(),vP=ie(),wP=na(),bP={message:"must be equal to constant",params:({schemaCode:e})=>(0,ff._)`{allowedValue: ${e}}`},$P={keyword:"const",$data:!0,error:bP,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,ff._)`!${(0,vP.useFunc)(t,wP.default)}(${r}, ${i})`):e.fail((0,ff._)`${o} !== ${r}`)}};pf.default=$P});var vw=S(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});var Zi=Z(),xP=ie(),_P=na(),SP={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Zi._)`{allowedValues: ${e}}`},kP={keyword:"enum",schemaType:"array",$data:!0,error:SP,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:s}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let a=i.length>=s.opts.loopEnum,c,l=()=>c??(c=(0,xP.useFunc)(t,_P.default)),p;if(a||n)p=t.let("valid"),e.block$data(p,f);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=t.const("vSchema",o);p=(0,Zi.or)(...i.map((y,g)=>d(m,g)))}e.pass(p);function f(){t.assign(p,!1),t.forOf("v",o,m=>t.if((0,Zi._)`${l()}(${r}, ${m})`,()=>t.assign(p,!0).break()))}function d(m,y){let g=i[y];return typeof g=="object"&&g!==null?(0,Zi._)`${l()}(${r}, ${m}[${y}])`:(0,Zi._)`${r} === ${g}`}}};df.default=kP});var ww=S(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});var CP=sw(),EP=aw(),PP=uw(),IP=fw(),RP=pw(),TP=dw(),AP=hw(),NP=gw(),OP=yw(),MP=vw(),VP=[CP.default,EP.default,PP.default,IP.default,RP.default,TP.default,AP.default,NP.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},OP.default,MP.default];hf.default=VP});var gf=S(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.validateAdditionalItems=void 0;var Hr=Z(),mf=ie(),LP={message:({params:{len:e}})=>(0,Hr.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Hr._)`{limit: ${e}}`},jP={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:LP,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,mf.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}bw(e,n)}};function bw(e,t){let{gen:r,schema:n,data:i,keyword:o,it:s}=e;s.items=!0;let a=r.const("len",(0,Hr._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Hr._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,mf.alwaysValidSchema)(s,n)){let l=r.var("valid",(0,Hr._)`${a} <= ${t.length}`);r.if((0,Hr.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,a,p=>{e.subschema({keyword:o,dataProp:p,dataPropType:mf.Type.Num},l),s.allErrors||r.if((0,Hr.not)(l),()=>r.break())})}}eo.validateAdditionalItems=bw;eo.default=jP});var yf=S(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.validateTuple=void 0;var $w=Z(),ia=ie(),DP=pt(),FP={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return xw(e,"additionalItems",t);r.items=!0,!(0,ia.alwaysValidSchema)(r,t)&&e.ok((0,DP.validateArray)(e))}};function xw(e,t,r=e.schema){let{gen:n,parentSchema:i,data:o,keyword:s,it:a}=e;p(i),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=ia.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),l=n.const("len",(0,$w._)`${o}.length`);r.forEach((f,d)=>{(0,ia.alwaysValidSchema)(a,f)||(n.if((0,$w._)`${l} > ${d}`,()=>e.subschema({keyword:s,schemaProp:d,dataProp:d},c)),e.ok(c))});function p(f){let{opts:d,errSchemaPath:m}=a,y=r.length,g=y===f.minItems&&(y===f.maxItems||f[t]===!1);if(d.strictTuples&&!g){let v=`"${s}" is ${y}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,ia.checkStrictMode)(a,v,d.strictTuples)}}}to.validateTuple=xw;to.default=FP});var _w=S(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});var qP=yf(),BP={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,qP.validateTuple)(e,"items")};vf.default=BP});var kw=S(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var Sw=Z(),HP=ie(),WP=pt(),UP=gf(),zP={message:({params:{len:e}})=>(0,Sw.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Sw._)`{limit: ${e}}`},GP={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:zP,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,HP.alwaysValidSchema)(n,t)&&(i?(0,UP.validateAdditionalItems)(e,i):e.ok((0,WP.validateArray)(e)))}};wf.default=GP});var Cw=S(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});var ht=Z(),oa=ie(),JP={message:({params:{min:e,max:t}})=>t===void 0?(0,ht.str)`must contain at least ${e} valid item(s)`:(0,ht.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,ht._)`{minContains: ${e}}`:(0,ht._)`{minContains: ${e}, maxContains: ${t}}`},KP={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:JP,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e,s,a,{minContains:c,maxContains:l}=n;o.opts.next?(s=c===void 0?1:c,a=l):s=1;let p=t.const("len",(0,ht._)`${i}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,oa.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,oa.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,oa.alwaysValidSchema)(o,r)){let g=(0,ht._)`${p} >= ${s}`;a!==void 0&&(g=(0,ht._)`${g} && ${p} <= ${a}`),e.pass(g);return}o.items=!0;let f=t.name("valid");a===void 0&&s===1?m(f,()=>t.if(f,()=>t.break())):s===0?(t.let(f,!0),a!==void 0&&t.if((0,ht._)`${i}.length > 0`,d)):(t.let(f,!1),d()),e.result(f,()=>e.reset());function d(){let g=t.name("_valid"),v=t.let("count",0);m(g,()=>t.if(g,()=>y(v)))}function m(g,v){t.forRange("i",0,p,b=>{e.subschema({keyword:"contains",dataProp:b,dataPropType:oa.Type.Num,compositeRule:!0},g),v()})}function y(g){t.code((0,ht._)`${g}++`),a===void 0?t.if((0,ht._)`${g} >= ${s}`,()=>t.assign(f,!0).break()):(t.if((0,ht._)`${g} > ${a}`,()=>t.assign(f,!1).break()),s===1?t.assign(f,!0):t.if((0,ht._)`${g} >= ${s}`,()=>t.assign(f,!0)))}}};bf.default=KP});var sa=S(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.validateSchemaDeps=At.validatePropertyDeps=At.error=void 0;var $f=Z(),YP=ie(),ro=pt();At.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,$f.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,$f._)`{property: ${e},
400
400
  missingProperty: ${n},
401
401
  depsCount: ${t},
402
- deps: ${r}}`};var kP={keyword:"dependencies",type:"object",schemaType:"object",error:Tt.error,code(e){let[t,r]=CP(e);fw(e,t),pw(e,r)}};function CP({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}function fw(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let s in t){let a=t[s];if(a.length===0)continue;let c=(0,ro.propertyInData)(r,n,s,i.opts.ownProperties);e.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of a)(0,ro.checkReportMissingProp)(e,l)}):(r.if((0,pf._)`${c} && (${(0,ro.checkMissingProp)(e,a,o)})`),(0,ro.reportMissingProp)(e,o),r.else())}}Tt.validatePropertyDeps=fw;function pw(e,t=e.schema){let{gen:r,data:n,keyword:i,it:o}=e,s=r.name("valid");for(let a in t)(0,SP.alwaysValidSchema)(o,t[a])||(r.if((0,ro.propertyInData)(r,n,a,o.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:a},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s))}Tt.validateSchemaDeps=pw;Tt.default=kP});var hw=S(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});var dw=Z(),EP=ie(),PP={message:"property name must be valid",params:({params:e})=>(0,dw._)`{propertyName: ${e.propertyName}}`},IP={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:PP,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,EP.alwaysValidSchema)(i,r))return;let o=t.name("valid");t.forIn("key",n,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),t.if((0,dw.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};df.default=IP});var mf=S(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});var na=pt(),xt=Z(),RP=ft(),ia=ie(),TP={message:"must NOT have additional properties",params:({params:e})=>(0,xt._)`{additionalProperty: ${e.additionalProperty}}`},AP={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:TP,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:s}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,ia.alwaysValidSchema)(s,r))return;let l=(0,na.allSchemaProperties)(n.properties),p=(0,na.allSchemaProperties)(n.patternProperties);f(),e.ok((0,xt._)`${o} === ${RP.default.errors}`);function f(){t.forIn("key",i,v=>{!l.length&&!p.length?y(v):t.if(h(v),()=>y(v))})}function h(v){let $;if(l.length>8){let I=(0,ia.schemaRefOrVal)(s,n.properties,"properties");$=(0,na.isOwnProperty)(t,I,v)}else l.length?$=(0,xt.or)(...l.map(I=>(0,xt._)`${v} === ${I}`)):$=xt.nil;return p.length&&($=(0,xt.or)($,...p.map(I=>(0,xt._)`${(0,na.usePattern)(e,I)}.test(${v})`))),(0,xt.not)($)}function m(v){t.code((0,xt._)`delete ${i}[${v}]`)}function y(v){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(v);return}if(r===!1){e.setParams({additionalProperty:v}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,ia.alwaysValidSchema)(s,r)){let $=t.name("valid");c.removeAdditional==="failing"?(g(v,$,!1),t.if((0,xt.not)($),()=>{e.reset(),m(v)})):(g(v,$),a||t.if((0,xt.not)($),()=>t.break()))}}function g(v,$,I){let _={keyword:"additionalProperties",dataProp:v,dataPropType:ia.Type.Str};I===!1&&Object.assign(_,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(_,$)}}};hf.default=AP});var yw=S(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});var NP=Fi(),mw=pt(),gf=ie(),gw=mf(),MP={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&gw.default.code(new NP.KeywordCxt(o,gw.default,"additionalProperties"));let s=(0,mw.allSchemaProperties)(r);for(let f of s)o.definedProperties.add(f);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=gf.mergeEvaluated.props(t,(0,gf.toHash)(s),o.props));let a=s.filter(f=>!(0,gf.alwaysValidSchema)(o,r[f]));if(a.length===0)return;let c=t.name("valid");for(let f of a)l(f)?p(f):(t.if((0,mw.propertyInData)(t,i,f,o.opts.ownProperties)),p(f),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(f),e.ok(c);function l(f){return o.opts.useDefaults&&!o.compositeRule&&r[f].default!==void 0}function p(f){e.subschema({keyword:"properties",schemaProp:f,dataProp:f},c)}}};yf.default=MP});var $w=S(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});var vw=pt(),oa=Z(),ww=ie(),bw=ie(),OP={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:s}=o,a=(0,vw.allSchemaProperties)(r),c=a.filter(g=>(0,ww.alwaysValidSchema)(o,r[g]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let l=s.strictSchema&&!s.allowMatchingProperties&&i.properties,p=t.name("valid");o.props!==!0&&!(o.props instanceof oa.Name)&&(o.props=(0,bw.evaluatedPropsToName)(t,o.props));let{props:f}=o;h();function h(){for(let g of a)l&&m(g),o.allErrors?y(g):(t.var(p,!0),y(g),t.if(p))}function m(g){for(let v in l)new RegExp(g).test(v)&&(0,ww.checkStrictMode)(o,`property ${v} matches pattern ${g} (use allowMatchingProperties)`)}function y(g){t.forIn("key",n,v=>{t.if((0,oa._)`${(0,vw.usePattern)(e,g)}.test(${v})`,()=>{let $=c.includes(g);$||e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:v,dataPropType:bw.Type.Str},p),o.opts.unevaluated&&f!==!0?t.assign((0,oa._)`${f}[${v}]`,!0):!$&&!o.allErrors&&t.if((0,oa.not)(p),()=>t.break())})})}}};vf.default=OP});var xw=S(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var VP=ie(),LP={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,VP.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};wf.default=LP});var _w=S(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});var jP=pt(),DP={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:jP.validateUnion,error:{message:"must match a schema in anyOf"}};bf.default=DP});var Sw=S($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});var sa=Z(),FP=ie(),qP={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,sa._)`{passingSchemas: ${e.passing}}`},BP={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:qP,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,s=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(l),e.result(s,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((p,f)=>{let h;(0,FP.alwaysValidSchema)(i,p)?t.var(c,!0):h=e.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},c),f>0&&t.if((0,sa._)`${c} && ${s}`).assign(s,!1).assign(a,(0,sa._)`[${a}, ${f}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(a,f),h&&e.mergeEvaluated(h,sa.Name)})})}}};$f.default=BP});var kw=S(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});var HP=ie(),WP={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((o,s)=>{if((0,HP.alwaysValidSchema)(n,o))return;let a=e.subschema({keyword:"allOf",schemaProp:s},i);e.ok(i),e.mergeEvaluated(a)})}};xf.default=WP});var Pw=S(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var aa=Z(),Ew=ie(),UP={message:({params:e})=>(0,aa.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,aa._)`{failingKeyword: ${e.ifClause}}`},zP={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:UP,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,Ew.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=Cw(n,"then"),o=Cw(n,"else");if(!i&&!o)return;let s=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),i&&o){let p=t.let("ifClause");e.setParams({ifClause:p}),t.if(a,l("then",p),l("else",p))}else i?t.if(a,l("then")):t.if((0,aa.not)(a),l("else"));e.pass(s,()=>e.error(!0));function c(){let p=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(p)}function l(p,f){return()=>{let h=e.subschema({keyword:p},a);t.assign(s,a),e.mergeValidEvaluated(h,s),f?t.assign(f,(0,aa._)`${p}`):e.setParams({ifClause:p})}}}};function Cw(e,t){let r=e.schema[t];return r!==void 0&&!(0,Ew.alwaysValidSchema)(e,r)}_f.default=zP});var Iw=S(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});var GP=ie(),JP={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,GP.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Sf.default=JP});var Rw=S(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});var KP=af(),YP=aw(),XP=lf(),QP=cw(),ZP=uw(),eI=ra(),tI=hw(),rI=mf(),nI=yw(),iI=$w(),oI=xw(),sI=_w(),aI=Sw(),lI=kw(),cI=Pw(),uI=Iw();function fI(e=!1){let t=[oI.default,sI.default,aI.default,lI.default,cI.default,uI.default,tI.default,rI.default,eI.default,nI.default,iI.default];return e?t.push(YP.default,QP.default):t.push(KP.default,XP.default),t.push(ZP.default),t}kf.default=fI});var Ef=S(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.dynamicAnchor=void 0;var Cf=Z(),pI=ft(),Tw=Bi(),dI=Ys(),hI={keyword:"$dynamicAnchor",schemaType:"string",code:e=>Aw(e,e.schema)};function Aw(e,t){let{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;let i=(0,Cf._)`${pI.default.dynamicAnchors}${(0,Cf.getProperty)(t)}`,o=n.errSchemaPath==="#"?n.validateName:mI(e);r.if((0,Cf._)`!${i}`,()=>r.assign(i,o))}no.dynamicAnchor=Aw;function mI(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:o,localRefs:s,meta:a}=t.root,{schemaId:c}=n.opts,l=new Tw.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:s,meta:a});return Tw.compileSchema.call(n,l),(0,dI.getValidate)(e,l)}no.default=hI});var Pf=S(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.dynamicRef=void 0;var Nw=Z(),gI=ft(),Mw=Ys(),yI={keyword:"$dynamicRef",schemaType:"string",code:e=>Ow(e,e.schema)};function Ow(e,t){let{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=t.slice(1);if(i.allErrors)s();else{let c=r.let("valid",!1);s(c),e.ok(c)}function s(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,Nw._)`${gI.default.dynamicAnchors}${(0,Nw.getProperty)(o)}`);r.if(l,a(l,c),a(i.validateName,c))}else a(i.validateName,c)()}function a(c,l){return l?()=>r.block(()=>{(0,Mw.callRef)(e,c),r.let(l,!0)}):()=>(0,Mw.callRef)(e,c)}}io.dynamicRef=Ow;io.default=yI});var Vw=S(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});var vI=Ef(),wI=ie(),bI={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,vI.dynamicAnchor)(e,""):(0,wI.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};If.default=bI});var Lw=S(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});var $I=Pf(),xI={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,$I.dynamicRef)(e,e.schema)};Rf.default=xI});var jw=S(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});var _I=Ef(),SI=Pf(),kI=Vw(),CI=Lw(),EI=[_I.default,SI.default,kI.default,CI.default];Tf.default=EI});var Fw=S(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});var Dw=ra(),PI={keyword:"dependentRequired",type:"object",schemaType:"object",error:Dw.error,code:e=>(0,Dw.validatePropertyDeps)(e)};Af.default=PI});var qw=S(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});var II=ra(),RI={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,II.validateSchemaDeps)(e)};Nf.default=RI});var Bw=S(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});var TI=ie(),AI={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){t.contains===void 0&&(0,TI.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};Mf.default=AI});var Hw=S(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});var NI=Fw(),MI=qw(),OI=Bw(),VI=[NI.default,MI.default,OI.default];Of.default=VI});var Uw=S(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});var ur=Z(),Ww=ie(),LI=ft(),jI={message:"must NOT have unevaluated properties",params:({params:e})=>(0,ur._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},DI={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:jI,code(e){let{gen:t,schema:r,data:n,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof ur.Name?t.if((0,ur._)`${a} !== true`,()=>t.forIn("key",n,f=>t.if(l(a,f),()=>c(f)))):a!==!0&&t.forIn("key",n,f=>a===void 0?c(f):t.if(p(a,f),()=>c(f))),o.props=!0,e.ok((0,ur._)`${i} === ${LI.default.errors}`);function c(f){if(r===!1){e.setParams({unevaluatedProperty:f}),e.error(),s||t.break();return}if(!(0,Ww.alwaysValidSchema)(o,r)){let h=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:f,dataPropType:Ww.Type.Str},h),s||t.if((0,ur.not)(h),()=>t.break())}}function l(f,h){return(0,ur._)`!${f} || !${f}[${h}]`}function p(f,h){let m=[];for(let y in f)f[y]===!0&&m.push((0,ur._)`${h} !== ${y}`);return(0,ur.and)(...m)}}};Vf.default=DI});var Gw=S(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});var Dr=Z(),zw=ie(),FI={message:({params:{len:e}})=>(0,Dr.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Dr._)`{limit: ${e}}`},qI={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:FI,code(e){let{gen:t,schema:r,data:n,it:i}=e,o=i.items||0;if(o===!0)return;let s=t.const("len",(0,Dr._)`${n}.length`);if(r===!1)e.setParams({len:o}),e.fail((0,Dr._)`${s} > ${o}`);else if(typeof r=="object"&&!(0,zw.alwaysValidSchema)(i,r)){let c=t.var("valid",(0,Dr._)`${s} <= ${o}`);t.if((0,Dr.not)(c),()=>a(c,o)),e.ok(c)}i.items=!0;function a(c,l){t.forRange("i",l,s,p=>{e.subschema({keyword:"unevaluatedItems",dataProp:p,dataPropType:zw.Type.Num},c),i.allErrors||t.if((0,Dr.not)(c),()=>t.break())})}}};Lf.default=qI});var Jw=S(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});var BI=Uw(),HI=Gw(),WI=[BI.default,HI.default];jf.default=WI});var Kw=S(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});var _e=Z(),UI={message:({schemaCode:e})=>(0,_e.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,_e._)`{format: ${e}}`},zI={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:UI,code(e,t){let{gen:r,data:n,$data:i,schema:o,schemaCode:s,it:a}=e,{opts:c,errSchemaPath:l,schemaEnv:p,self:f}=a;if(!c.validateFormats)return;i?h():m();function h(){let y=r.scopeValue("formats",{ref:f.formats,code:c.code.formats}),g=r.const("fDef",(0,_e._)`${y}[${s}]`),v=r.let("fType"),$=r.let("format");r.if((0,_e._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>r.assign(v,(0,_e._)`${g}.type || "string"`).assign($,(0,_e._)`${g}.validate`),()=>r.assign(v,(0,_e._)`"string"`).assign($,g)),e.fail$data((0,_e.or)(I(),_()));function I(){return c.strictSchema===!1?_e.nil:(0,_e._)`${s} && !${$}`}function _(){let R=p.$async?(0,_e._)`(${g}.async ? await ${$}(${n}) : ${$}(${n}))`:(0,_e._)`${$}(${n})`,N=(0,_e._)`(typeof ${$} == "function" ? ${R} : ${$}.test(${n}))`;return(0,_e._)`${$} && ${$} !== true && ${v} === ${t} && !${N}`}}function m(){let y=f.formats[o];if(!y){I();return}if(y===!0)return;let[g,v,$]=_(y);g===t&&e.pass(R());function I(){if(c.strictSchema===!1){f.logger.warn(N());return}throw new Error(N());function N(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function _(N){let j=N instanceof RegExp?(0,_e.regexpCode)(N):c.code.formats?(0,_e._)`${c.code.formats}${(0,_e.getProperty)(o)}`:void 0,U=r.scopeValue("formats",{key:o,ref:N,code:j});return typeof N=="object"&&!(N instanceof RegExp)?[N.type||"string",N.validate,(0,_e._)`${U}.validate`]:["string",N,U]}function R(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!p.$async)throw new Error("async format in sync schema");return(0,_e._)`await ${$}(${n})`}return typeof v=="function"?(0,_e._)`${$}(${n})`:(0,_e._)`${$}.test(${n})`}}}};Df.default=zI});var Yw=S(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});var GI=Kw(),JI=[GI.default];Ff.default=JI});var Xw=S(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.contentVocabulary=Rn.metadataVocabulary=void 0;Rn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Rn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Zw=S(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var KI=Hv(),YI=nw(),XI=Rw(),QI=jw(),ZI=Hw(),eR=Jw(),tR=Yw(),Qw=Xw(),rR=[QI.default,KI.default,YI.default,(0,XI.default)(!0),tR.default,Qw.metadataVocabulary,Qw.contentVocabulary,ZI.default,eR.default];qf.default=rR});var tb=S(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.DiscrError=void 0;var eb;(function(e){e.Tag="tag",e.Mapping="mapping"})(eb||(la.DiscrError=eb={}))});var nb=S(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});var Tn=Z(),Bf=tb(),rb=Bi(),nR=qi(),iR=ie(),oR={message:({params:{discrError:e,tagName:t}})=>e===Bf.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Tn._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},sR={keyword:"discriminator",type:"object",schemaType:"object",error:oR,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{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 c=t.let("valid",!1),l=t.const("tag",(0,Tn._)`${r}${(0,Tn.getProperty)(a)}`);t.if((0,Tn._)`typeof ${l} == "string"`,()=>p(),()=>e.error(!1,{discrError:Bf.DiscrError.Tag,tag:l,tagName:a})),e.ok(c);function p(){let m=h();t.if(!1);for(let y in m)t.elseIf((0,Tn._)`${l} === ${y}`),t.assign(c,f(m[y]));t.else(),e.error(!1,{discrError:Bf.DiscrError.Mapping,tag:l,tagName:a}),t.endIf()}function f(m){let y=t.name("valid"),g=e.subschema({keyword:"oneOf",schemaProp:m},y);return e.mergeEvaluated(g,Tn.Name),y}function h(){var m;let y={},g=$(i),v=!0;for(let R=0;R<s.length;R++){let N=s[R];if(N?.$ref&&!(0,iR.schemaHasRulesButRef)(N,o.self.RULES)){let U=N.$ref;if(N=rb.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,U),N instanceof rb.SchemaEnv&&(N=N.schema),N===void 0)throw new nR.default(o.opts.uriResolver,o.baseId,U)}let j=(m=N?.properties)===null||m===void 0?void 0:m[a];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);v=v&&(g||$(N)),I(j,R)}if(!v)throw new Error(`discriminator: "${a}" must be required`);return y;function $({required:R}){return Array.isArray(R)&&R.includes(a)}function I(R,N){if(R.const)_(R.const,N);else if(R.enum)for(let j of R.enum)_(j,N);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function _(R,N){if(typeof R!="string"||R in y)throw new Error(`discriminator: "${a}" values must be unique strings`);y[R]=N}}}};Hf.default=sR});var ib=S((k3,aR)=>{aR.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 ob=S((C3,lR)=>{lR.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 sb=S((E3,cR)=>{cR.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 ab=S((P3,uR)=>{uR.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 lb=S((I3,fR)=>{fR.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 cb=S((R3,pR)=>{pR.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 ub=S((T3,dR)=>{dR.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 fb=S((A3,hR)=>{hR.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 pb=S(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});var mR=ib(),gR=ob(),yR=sb(),vR=ab(),wR=lb(),bR=cb(),$R=ub(),xR=fb(),_R=["/properties"];function SR(e){return[mR,gR,yR,vR,wR,t(this,bR),$R,t(this,xR)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,_R):n}}Wf.default=SR});var db=S((ve,zf)=>{"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 kR=jv(),CR=Zw(),ER=nb(),PR=pb(),Uf="https://json-schema.org/draft/2020-12/schema",An=class extends kR.default{constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),CR.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(ER.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:t,meta:r}=this.opts;r&&(PR.default.call(this,t),this.refs["http://json-schema.org/schema"]=Uf)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Uf)?Uf:void 0)}};ve.Ajv2020=An;zf.exports=ve=An;zf.exports.Ajv2020=An;Object.defineProperty(ve,"__esModule",{value:!0});ve.default=An;var IR=Fi();Object.defineProperty(ve,"KeywordCxt",{enumerable:!0,get:function(){return IR.KeywordCxt}});var Nn=Z();Object.defineProperty(ve,"_",{enumerable:!0,get:function(){return Nn._}});Object.defineProperty(ve,"str",{enumerable:!0,get:function(){return Nn.str}});Object.defineProperty(ve,"stringify",{enumerable:!0,get:function(){return Nn.stringify}});Object.defineProperty(ve,"nil",{enumerable:!0,get:function(){return Nn.nil}});Object.defineProperty(ve,"Name",{enumerable:!0,get:function(){return Nn.Name}});Object.defineProperty(ve,"CodeGen",{enumerable:!0,get:function(){return Nn.CodeGen}});var RR=Fs();Object.defineProperty(ve,"ValidationError",{enumerable:!0,get:function(){return RR.default}});var TR=qi();Object.defineProperty(ve,"MissingRefError",{enumerable:!0,get:function(){return TR.default}})});Mt();os();Ot();pi();import{transform as LR}from"esbuild";import{resolve as Fr}from"node:path";import{resolve as OR}from"node:path";import{readFile as ty}from"node:fs/promises";import{basename as j_,resolve as ry}from"node:path";mt();import{dirname as Wg,resolve as Ug}from"node:path";import L from"typescript";import{readFileSync as w_}from"node:fs";import{resolve as b_}from"node:path";import ue from"typescript";function Ac(e,t){let r=new Map;for(let n of e.statements){if(!ue.isImportDeclaration(n)||!n.importClause?.namedBindings||!ue.isStringLiteral(n.moduleSpecifier)||!ue.isNamedImports(n.importClause.namedBindings))continue;let i=n.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=b_(t,i);for(let s of n.importClause.namedBindings.elements)r.set(s.name.text,o)}return r}function $_(e){if(ue.isObjectBindingPattern(e.name)){let t=[];for(let r of e.name.elements)ue.isBindingElement(r)&&ue.isIdentifier(r.name)&&t.push(r.name.text);return t}return ue.isIdentifier(e.name)?[e.name.text]:[]}function x_(e){if(!ue.isObjectBindingPattern(e.name)||e.name.elements.length===0)return null;let t=e.name.elements[0];return!ue.isBindingElement(t)||!ue.isIdentifier(t.name)?null:t.name.text}function __(e){if(ue.isParenthesizedExpression(e))return e.expression;if(ue.isJsxElement(e)||ue.isJsxSelfClosingElement(e)||ue.isJsxFragment(e))return e;if(ue.isBlock(e))for(let t=e.statements.length-1;t>=0;t--){let r=e.statements[t];if(ue.isReturnStatement(r)&&r.expression)return ue.isParenthesizedExpression(r.expression)?r.expression.expression:r.expression}return null}function Bg(e){if(!ue.isIdentifier(e.expression)||e.expression.text!=="view"||e.arguments.length!==1)return null;let t=e.arguments[0];if(!ue.isArrowFunction(t)&&!ue.isFunctionExpression(t))return null;let r="__noop",n=[];if(t.parameters.length===1){let a=x_(t.parameters[0]);if(n=$_(t.parameters[0]),a)r=a;else if(ue.isIdentifier(t.parameters[0].name))r=t.parameters[0].name.text,n=[r];else return null}else if(t.parameters.length>1)return null;let i=__(t.body);if(!i)return null;let o=e.typeArguments?.length===1?e.typeArguments[0]:void 0,s=o?.getText();return{paramName:r,jsxRoot:i,propNames:n,propsType:s,propsTypeNode:o}}function Nc(e,t){let r=null;function n(i){if(ue.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!ue.isIdentifier(o.name)||o.name.text!==t||!o.initializer||!ue.isCallExpression(o.initializer))continue;let s=Bg(o.initializer);s&&(r=s)}if(ue.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&ue.isCallExpression(i.expression)){let o=Bg(i.expression);o&&t==="default"&&(r=o)}ue.forEachChild(i,n)}return n(e),r}function Hg(e,t){let r=w_(e,"utf-8"),n=ue.createSourceFile(e,r,ue.ScriptTarget.Latest,!0,ue.ScriptKind.TSX);return Nc(n,t)}function S_(e,t,r){if("tone"in t){let n=t.tone;delete t.tone,"variant"in t||(t.variant=n),r.warnings.push(`"tone" on <${e}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in t){let n=t.textStyle;delete t.textStyle,"variant"in t||(t.variant=n),r.warnings.push(`"textStyle" on <${e}> is deprecated; use variant instead (mapped automatically)`)}}function Mc(e){return e.join(".")}function ct(e){let t=e.getText().replace(/\s+/g," ").trim();return t.length>100?`${t.slice(0,97)}...`:t}function Vc(e){if(L.isIdentifier(e))return[e.text];if(L.isPropertyAccessExpression(e)&&!e.questionDotToken){let t=Vc(e.expression);return t?[...t,e.name.text]:null}return null}function zg(e,t){if(t.length===0)return e;let r=t.join(".");return{kind:"binding",path:e.path?`${e.path}.${r}`:r,scope:e.scope}}function Si(e,t){let r=Vc(e);if(!r)return null;if(r[0]in t.propBindings)return zg(t.propBindings[r[0]],r.slice(1));if(r[0]===t.vmName)return{kind:"binding",path:Mc(r.slice(1))};let n=t.scopes[t.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:Mc(r.slice(1)),scope:n}:null}function Gg(e,t){let r=[];for(let n of e.properties)L.isPropertyAssignment(n)&&L.isIdentifier(n.name)?r.push({key:n.name.text,value:n.initializer}):L.isShorthandPropertyAssignment(n)?r.push({key:n.name.text,value:n.name}):t.errors.push(`Unsupported object literal member: ${ct(n)}`);return r}function k_(e,t){let r=e.find(o=>o.key==="name");if(!r||!L.isStringLiteral(r.value))return null;let n=r.value.text,i={};for(let{key:o,value:s}of e)if(o!=="name"){if(o!=="params"){t.errors.push(`Unsupported property "${o}" in action "${n}"; an action is { name, params? }`);continue}if(!L.isObjectLiteralExpression(s)){t.errors.push(`Action "${n}" params must be an object literal: ${ct(s)}`);continue}for(let a of Gg(s,t)){let c=Cs(a.value,t);c!==null?i[a.key]=c:t.errors.push(`Unsupported action param expression for "${a.key}": ${ct(a.value)}`)}}return Object.keys(i).length>0?{kind:"action",name:n,params:i}:{kind:"action",name:n}}function Cs(e,t){if(L.isStringLiteral(e)||L.isNoSubstitutionTemplateLiteral(e))return e.text;if(e.kind===L.SyntaxKind.TrueKeyword)return!0;if(e.kind===L.SyntaxKind.FalseKeyword)return!1;if(L.isNumericLiteral(e))return Number(e.text);if(e.kind===L.SyntaxKind.NullKeyword)return null;if(L.isTemplateExpression(e)){let n=[];e.head.text&&n.push(e.head.text);for(let i of e.templateSpans){let o=Si(i.expression,t);if(!o)return null;n.push(o),i.literal.text&&n.push(i.literal.text)}return{kind:"concat",parts:n}}let r=Si(e,t);if(r)return r;if(L.isObjectLiteralExpression(e)){let n=Gg(e,t),i=k_(n,t);if(i)return i;let o={};for(let{key:s,value:a}of n){let c=Cs(a,t);c!==null?o[s]=c:t.errors.push(`Unsupported object literal property "${s}": ${ct(a)}`)}return{kind:"literal",value:o}}if(L.isArrayLiteralExpression(e)){let n=[];for(let i of e.elements){if(!L.isExpression(i))continue;let o=Cs(i,t);o!==null?n.push(o):t.errors.push(`Unsupported array element expression: ${ct(i)}`)}return n}return null}function C_(e){return L.isIdentifier(e)?e.text:L.isPropertyAccessExpression(e)&&L.isIdentifier(e.name)?e.name.text:null}function Jg(e){return e.getText()}function Oc(e,t){let r=[];for(let n of e){if(L.isJsxText(n)){let i=n.getText().trim();i&&r.push({kind:"text",value:i});continue}if(L.isJsxExpression(n)&&n.expression){let i=Si(n.expression,t);if(i){r.push(i);continue}let o=Kg(n.expression,t);o?Array.isArray(o)?r.push(...o):r.push(o):t.errors.push(`Unsupported JSX child expression: ${ct(n.expression)}`);continue}if(L.isJsxElement(n)||L.isJsxSelfClosingElement(n)){let i=ki(n,t);i&&r.push(i);continue}L.isJsxFragment(n)&&t.errors.push(`Unsupported nested JSX fragment: ${ct(n)}`)}return r}function E_(e,t){if(e.length===0)return null;let r=e[0];return r in t.propBindings?zg(t.propBindings[r],e.slice(1)):r===t.vmName?{kind:"binding",path:Mc(e.slice(1))}:null}function Kg(e,t){if(L.isParenthesizedExpression(e))return Kg(e.expression,t);if(L.isCallExpression(e)&&L.isPropertyAccessExpression(e.expression)&&!e.expression.questionDotToken){let n=Vc(e.expression.expression),i=e.expression.name.text;if(n&&i==="map"&&e.arguments.length>=1){let o=E_(n,t);if(!o)return null;let s=e.arguments[0];if(!L.isArrowFunction(s)&&!L.isFunctionExpression(s))return t.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!L.isIdentifier(a[0].name))return t.errors.push("map callback must have a single item parameter"),null;let c=a[0].name.text,l={...t,scopes:[...t.scopes,c]},p=null,f=L.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(L.isBlock(s.body))return t.errors.push("map callback body must be a JSX expression, not a block"),null;if(L.isJsxElement(f)||L.isJsxSelfClosingElement(f)?p=ki(f,l):L.isJsxFragment(f)&&(p=Lc(f,l)),!p)return null;let h;if(L.isJsxElement(f)||L.isJsxSelfClosingElement(f)){let m=L.isJsxElement(f)?f.openingElement.attributes:f.attributes;for(let y of m.properties)if(!(!L.isJsxAttribute(y)||Jg(y.name)!=="key"||!y.initializer)&&L.isJsxExpression(y.initializer)&&y.initializer.expression){let g=Si(y.initializer.expression,l);g&&(h=g)}}return{kind:"map",source:o,item:c,key:h,body:p}}}if(L.isJsxElement(e)||L.isJsxSelfClosingElement(e))return ki(e,t);let r=Si(e,t);return r||null}function Lc(e,t){return{kind:"fragment",children:Oc(e.children,t)}}function P_(e,t,r){let n=r.viewImports.get(e);return n?Hg(n,e)?{kind:"viewRef",name:e,sourcePath:n,props:t}:(r.errors.push(`View component "${e}" is imported but has no view() export`),null):null}function ki(e,t){let r=L.isJsxElement(e)?e.openingElement:e,n=C_(r.tagName);if(!n)return t.errors.push("Unsupported JSX tag expression"),null;let i={};for(let c of r.attributes.properties){if(!L.isJsxAttribute(c)){t.errors.push(`Unsupported JSX spread attribute on <${n}>: ${ct(c)}`);continue}let l=Jg(c.name);if(l!=="key"){if(!c.initializer){i[l]=!0;continue}if(L.isStringLiteral(c.initializer)){i[l]=c.initializer.text;continue}if(L.isJsxExpression(c.initializer)&&c.initializer.expression){let p=Cs(c.initializer.expression,t);p!==null?i[l]=p:t.errors.push(`Unsupported JSX prop expression for "${l}" on <${n}>: ${ct(c.initializer.expression)}`);continue}t.errors.push(`Unsupported JSX prop initializer for "${l}" on <${n}>: ${ct(c.initializer)}`)}}if(!t.allowedComponents.has(n)){let c=P_(n,i,t);return c||(t.errors.push(`Component "${n}" is not in the allowed registry`),null)}S_(n,i,t);let o=t;if(n==="Table"&&i.source){let c=typeof i.source=="object"&&"kind"in i.source&&i.source.kind==="binding"?i.source:void 0;c&&(o={...t,tableSource:c})}let s=typeof i.each=="string"?i.each:void 0;if(s){let c=t.tableSource;if(!c)return t.errors.push(`<${n} each="${s}"> requires an ancestor <Table source={...}>`),null;delete i.each;let l={...o,scopes:[...o.scopes,s]},p=L.isJsxElement(e)?Oc(e.children,l):[];return{kind:"map",source:c,item:s,body:{kind:"component",name:n,props:i,children:p}}}let a=L.isJsxElement(e)?Oc(e.children,o):[];return{kind:"component",name:n,props:i,children:a}}function I_(e){let t=null;function r(n){if(L.isCallExpression(n)&&L.isIdentifier(n.expression)&&n.expression.text==="screen"&&n.arguments.length===1&&(L.isArrowFunction(n.arguments[0])||L.isFunctionExpression(n.arguments[0]))){let i=n.arguments[0],o="unknown";if(n.typeArguments&&n.typeArguments.length===1){let a=n.typeArguments[0];L.isTypeReferenceNode(a)&&L.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(L.isParenthesizedExpression(s))(L.isJsxElement(s.expression)||L.isJsxSelfClosingElement(s.expression))&&(t={viewModel:o,jsxRoot:s.expression});else if(L.isJsxElement(s)||L.isJsxSelfClosingElement(s))t={viewModel:o,jsxRoot:s};else if(L.isBlock(s)&&s.statements.length===1){let a=s.statements[0];L.isReturnStatement(a)&&a.expression&&(L.isParenthesizedExpression(a.expression)?t={viewModel:o,jsxRoot:a.expression.expression}:t={viewModel:o,jsxRoot:a.expression})}}L.forEachChild(n,r)}return r(e),t}function Yg(e,t,r,n={}){let i=new Set(ot);for(let f of n.allowlistExtra??[])i.add(f);let o=Ug(t),s=Wg(o),a=L.createSourceFile(o,e,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),c={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Ac(a,s),allowedComponents:i},l=I_(a);if(!l)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let p=L.isJsxElement(l.jsxRoot)||L.isJsxSelfClosingElement(l.jsxRoot)?ki(l.jsxRoot,c):L.isJsxFragment(l.jsxRoot)?Lc(l.jsxRoot,c):null;return p?{viewModel:l.viewModel,exportName:r,root:p,errors:c.errors,warnings:c.warnings}:(c.errors.push("screen() callback must return a single JSX root element"),{viewModel:l.viewModel,exportName:r,root:{kind:"fragment",children:[]},errors:c.errors,warnings:c.warnings})}function R_(e,t){let r={...t.propBindings};for(let i of e.propNames)r[i]={kind:"binding",path:"",scope:i};let n={...t,vmName:e.paramName,propBindings:r,scopes:[]};return L.isJsxElement(e.jsxRoot)||L.isJsxSelfClosingElement(e.jsxRoot)?ki(e.jsxRoot,n):L.isJsxFragment(e.jsxRoot)?Lc(e.jsxRoot,n):L.isConditionalExpression(e.jsxRoot)?(t.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):L.isExpression(e.jsxRoot)?(t.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${ct(e.jsxRoot)}`),null):(t.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${L.SyntaxKind[e.jsxRoot.kind]}`),null)}function T_(e,t){if(!e||!L.isTypeLiteralNode(e))return;let r=[];for(let n of e.members)L.isPropertySignature(n)&&L.isIdentifier(n.name)&&n.type?r.push({name:n.name.text,type:n.type.getText(),optional:n.questionToken!==void 0}):t.errors.push(`Unsupported view() props type member: ${ct(n)}`);return r}function Xg(e,t,r,n={}){let i=new Set(ot);for(let h of n.allowlistExtra??[])i.add(h);let o=Ug(t),s=Wg(o),a=L.createSourceFile(o,e,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),c=Nc(a,r),l={vmName:c?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Ac(a,s),allowedComponents:i};if(!c)return{exportName:r,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${r}" found in ${t}`],warnings:[]};let p=T_(c.propsTypeNode,l),f=R_(c,l);return f?{exportName:r,propsType:c.propsType,propDecls:p,propNames:c.propNames,root:f,errors:l.errors,warnings:l.warnings}:{exportName:r,propsType:c.propsType,propDecls:p,propNames:c.propNames,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings}}function jc(e){let t=[];function r(n){if(n.kind==="viewRef"){t.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(e),t}function Qg(e){return`${e.sourcePath}:${e.name}`}import{relative as A_}from"node:path";function Dc(e,t){return A_(e,t).split("\\").join("/")}mt();var N_=new Set(["swiftui","compose"]),M_=new Set(["action"]);function O_(e,t){return!ot.has(e)&&e in t.extensions}function Fc(e){return e?` (${e})`:""}function Es(e,t,r={}){let n=[],i=[],o=r.targets??[],s=o.some(c=>N_.has(c)),a=c=>{if(c.kind!=="viewRef"){if(c.kind==="component"){if(!ot.has(c.name)&&!(c.name in t.extensions))n.push(`Extension component "${c.name}" is not registered in extensions.yaml${Fc(r.source)}`);else if(O_(c.name,t)){let l=t.extensions[c.name];s&&l.renderer==="react-only"&&n.push(`Extension "${c.name}" is react-only but binding targets include native renderer(s): ${o.join(", ")}${Fc(r.source)}`);for(let p of Object.keys(c.props))p in l.properties||M_.has(p)||n.push(`Extension "${c.name}" does not accept property "${p}"${Fc(r.source)}`)}for(let l of c.children)a(l);return}if(c.kind==="map"){a(c.body);return}if(c.kind==="fragment")for(let l of c.children)a(l)}};return a(e),{errors:n,warnings:i}}function Zg(e,t,r,n,i){let o=[],s=[],a=Es(e,r,{targets:n,source:i.screen});o.push(...a.errors),s.push(...a.warnings);for(let c=0;c<t.length;c++){let l=Es(t[c],r,{targets:n,source:i.partials[c]});o.push(...l.errors),s.push(...l.warnings)}return{errors:o,warnings:s}}mt();function V_(e){let t=Hn[e];return t?t.lowering==="inline-css"||t.lowering==="class-name":!1}function L_(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="action"}function Ci(e,t,r,n){if(e.kind==="component"){let{name:i,props:o}=e;if(r.has(i)||!ot.has(i)){for(let s of e.children)Ci(s,t,r,n);return}for(let[s,a]of Object.entries(o))Hn[s]?.type==="action"&&!L_(a)&&n.push(`${t}: <${i}> "${s}" must be an action descriptor { name: "..." }, got ${JSON.stringify(a)}`),V_(s)&&(Fp(s,i)||n.push(`${t}: <${i}> does not accept property "${s}"`));for(let s of e.children)Ci(s,t,r,n);return}if(e.kind==="map"){Ci(e.body,t,r,n);return}if(e.kind==="fragment"){for(let i of e.children)Ci(i,t,r,n);return}}async function ey(e,t=[]){let r=new Set(t),n=[];for(let i of e)Ci(i.root,i.source,r,n);if(n.length>0)throw new Error(`View property validation failed:
402
+ deps: ${r}}`};var XP={keyword:"dependencies",type:"object",schemaType:"object",error:At.error,code(e){let[t,r]=QP(e);Ew(e,t),Pw(e,r)}};function QP({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}function Ew(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let s in t){let a=t[s];if(a.length===0)continue;let c=(0,ro.propertyInData)(r,n,s,i.opts.ownProperties);e.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of a)(0,ro.checkReportMissingProp)(e,l)}):(r.if((0,$f._)`${c} && (${(0,ro.checkMissingProp)(e,a,o)})`),(0,ro.reportMissingProp)(e,o),r.else())}}At.validatePropertyDeps=Ew;function Pw(e,t=e.schema){let{gen:r,data:n,keyword:i,it:o}=e,s=r.name("valid");for(let a in t)(0,YP.alwaysValidSchema)(o,t[a])||(r.if((0,ro.propertyInData)(r,n,a,o.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:a},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s))}At.validateSchemaDeps=Pw;At.default=XP});var Rw=S(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});var Iw=Z(),ZP=ie(),eI={message:"property name must be valid",params:({params:e})=>(0,Iw._)`{propertyName: ${e.propertyName}}`},tI={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:eI,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,ZP.alwaysValidSchema)(i,r))return;let o=t.name("valid");t.forIn("key",n,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),t.if((0,Iw.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};xf.default=tI});var Sf=S(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var aa=pt(),_t=Z(),rI=ft(),la=ie(),nI={message:"must NOT have additional properties",params:({params:e})=>(0,_t._)`{additionalProperty: ${e.additionalProperty}}`},iI={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:nI,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:s}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,la.alwaysValidSchema)(s,r))return;let l=(0,aa.allSchemaProperties)(n.properties),p=(0,aa.allSchemaProperties)(n.patternProperties);f(),e.ok((0,_t._)`${o} === ${rI.default.errors}`);function f(){t.forIn("key",i,v=>{!l.length&&!p.length?y(v):t.if(d(v),()=>y(v))})}function d(v){let b;if(l.length>8){let I=(0,la.schemaRefOrVal)(s,n.properties,"properties");b=(0,aa.isOwnProperty)(t,I,v)}else l.length?b=(0,_t.or)(...l.map(I=>(0,_t._)`${v} === ${I}`)):b=_t.nil;return p.length&&(b=(0,_t.or)(b,...p.map(I=>(0,_t._)`${(0,aa.usePattern)(e,I)}.test(${v})`))),(0,_t.not)(b)}function m(v){t.code((0,_t._)`delete ${i}[${v}]`)}function y(v){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(v);return}if(r===!1){e.setParams({additionalProperty:v}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,la.alwaysValidSchema)(s,r)){let b=t.name("valid");c.removeAdditional==="failing"?(g(v,b,!1),t.if((0,_t.not)(b),()=>{e.reset(),m(v)})):(g(v,b),a||t.if((0,_t.not)(b),()=>t.break()))}}function g(v,b,I){let _={keyword:"additionalProperties",dataProp:v,dataPropType:la.Type.Str};I===!1&&Object.assign(_,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(_,b)}}};_f.default=iI});var Nw=S(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});var oI=Fi(),Tw=pt(),kf=ie(),Aw=Sf(),sI={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Aw.default.code(new oI.KeywordCxt(o,Aw.default,"additionalProperties"));let s=(0,Tw.allSchemaProperties)(r);for(let f of s)o.definedProperties.add(f);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=kf.mergeEvaluated.props(t,(0,kf.toHash)(s),o.props));let a=s.filter(f=>!(0,kf.alwaysValidSchema)(o,r[f]));if(a.length===0)return;let c=t.name("valid");for(let f of a)l(f)?p(f):(t.if((0,Tw.propertyInData)(t,i,f,o.opts.ownProperties)),p(f),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(f),e.ok(c);function l(f){return o.opts.useDefaults&&!o.compositeRule&&r[f].default!==void 0}function p(f){e.subschema({keyword:"properties",schemaProp:f,dataProp:f},c)}}};Cf.default=sI});var Lw=S(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});var Ow=pt(),ca=Z(),Mw=ie(),Vw=ie(),aI={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:s}=o,a=(0,Ow.allSchemaProperties)(r),c=a.filter(g=>(0,Mw.alwaysValidSchema)(o,r[g]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===!0))return;let l=s.strictSchema&&!s.allowMatchingProperties&&i.properties,p=t.name("valid");o.props!==!0&&!(o.props instanceof ca.Name)&&(o.props=(0,Vw.evaluatedPropsToName)(t,o.props));let{props:f}=o;d();function d(){for(let g of a)l&&m(g),o.allErrors?y(g):(t.var(p,!0),y(g),t.if(p))}function m(g){for(let v in l)new RegExp(g).test(v)&&(0,Mw.checkStrictMode)(o,`property ${v} matches pattern ${g} (use allowMatchingProperties)`)}function y(g){t.forIn("key",n,v=>{t.if((0,ca._)`${(0,Ow.usePattern)(e,g)}.test(${v})`,()=>{let b=c.includes(g);b||e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:v,dataPropType:Vw.Type.Str},p),o.opts.unevaluated&&f!==!0?t.assign((0,ca._)`${f}[${v}]`,!0):!b&&!o.allErrors&&t.if((0,ca.not)(p),()=>t.break())})})}}};Ef.default=aI});var jw=S(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});var lI=ie(),cI={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,lI.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Pf.default=cI});var Dw=S(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});var uI=pt(),fI={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:uI.validateUnion,error:{message:"must match a schema in anyOf"}};If.default=fI});var Fw=S(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});var ua=Z(),pI=ie(),dI={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,ua._)`{passingSchemas: ${e.passing}}`},hI={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:dI,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,s=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(l),e.result(s,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((p,f)=>{let d;(0,pI.alwaysValidSchema)(i,p)?t.var(c,!0):d=e.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},c),f>0&&t.if((0,ua._)`${c} && ${s}`).assign(s,!1).assign(a,(0,ua._)`[${a}, ${f}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(a,f),d&&e.mergeEvaluated(d,ua.Name)})})}}};Rf.default=hI});var qw=S(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});var mI=ie(),gI={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((o,s)=>{if((0,mI.alwaysValidSchema)(n,o))return;let a=e.subschema({keyword:"allOf",schemaProp:s},i);e.ok(i),e.mergeEvaluated(a)})}};Tf.default=gI});var Ww=S(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});var fa=Z(),Hw=ie(),yI={message:({params:e})=>(0,fa.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,fa._)`{failingKeyword: ${e.ifClause}}`},vI={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:yI,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,Hw.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=Bw(n,"then"),o=Bw(n,"else");if(!i&&!o)return;let s=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),i&&o){let p=t.let("ifClause");e.setParams({ifClause:p}),t.if(a,l("then",p),l("else",p))}else i?t.if(a,l("then")):t.if((0,fa.not)(a),l("else"));e.pass(s,()=>e.error(!0));function c(){let p=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(p)}function l(p,f){return()=>{let d=e.subschema({keyword:p},a);t.assign(s,a),e.mergeValidEvaluated(d,s),f?t.assign(f,(0,fa._)`${p}`):e.setParams({ifClause:p})}}}};function Bw(e,t){let r=e.schema[t];return r!==void 0&&!(0,Hw.alwaysValidSchema)(e,r)}Af.default=vI});var Uw=S(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});var wI=ie(),bI={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,wI.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Nf.default=bI});var zw=S(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});var $I=gf(),xI=_w(),_I=yf(),SI=kw(),kI=Cw(),CI=sa(),EI=Rw(),PI=Sf(),II=Nw(),RI=Lw(),TI=jw(),AI=Dw(),NI=Fw(),OI=qw(),MI=Ww(),VI=Uw();function LI(e=!1){let t=[TI.default,AI.default,NI.default,OI.default,MI.default,VI.default,EI.default,PI.default,CI.default,II.default,RI.default];return e?t.push(xI.default,SI.default):t.push($I.default,_I.default),t.push(kI.default),t}Of.default=LI});var Vf=S(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.dynamicAnchor=void 0;var Mf=Z(),jI=ft(),Gw=Bi(),DI=ea(),FI={keyword:"$dynamicAnchor",schemaType:"string",code:e=>Jw(e,e.schema)};function Jw(e,t){let{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;let i=(0,Mf._)`${jI.default.dynamicAnchors}${(0,Mf.getProperty)(t)}`,o=n.errSchemaPath==="#"?n.validateName:qI(e);r.if((0,Mf._)`!${i}`,()=>r.assign(i,o))}no.dynamicAnchor=Jw;function qI(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:o,localRefs:s,meta:a}=t.root,{schemaId:c}=n.opts,l=new Gw.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:s,meta:a});return Gw.compileSchema.call(n,l),(0,DI.getValidate)(e,l)}no.default=FI});var Lf=S(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.dynamicRef=void 0;var Kw=Z(),BI=ft(),Yw=ea(),HI={keyword:"$dynamicRef",schemaType:"string",code:e=>Xw(e,e.schema)};function Xw(e,t){let{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=t.slice(1);if(i.allErrors)s();else{let c=r.let("valid",!1);s(c),e.ok(c)}function s(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,Kw._)`${BI.default.dynamicAnchors}${(0,Kw.getProperty)(o)}`);r.if(l,a(l,c),a(i.validateName,c))}else a(i.validateName,c)()}function a(c,l){return l?()=>r.block(()=>{(0,Yw.callRef)(e,c),r.let(l,!0)}):()=>(0,Yw.callRef)(e,c)}}io.dynamicRef=Xw;io.default=HI});var Qw=S(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});var WI=Vf(),UI=ie(),zI={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,WI.dynamicAnchor)(e,""):(0,UI.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};jf.default=zI});var Zw=S(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});var GI=Lf(),JI={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,GI.dynamicRef)(e,e.schema)};Df.default=JI});var eb=S(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});var KI=Vf(),YI=Lf(),XI=Qw(),QI=Zw(),ZI=[KI.default,YI.default,XI.default,QI.default];Ff.default=ZI});var rb=S(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var tb=sa(),eR={keyword:"dependentRequired",type:"object",schemaType:"object",error:tb.error,code:e=>(0,tb.validatePropertyDeps)(e)};qf.default=eR});var nb=S(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});var tR=sa(),rR={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,tR.validateSchemaDeps)(e)};Bf.default=rR});var ib=S(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});var nR=ie(),iR={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){t.contains===void 0&&(0,nR.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};Hf.default=iR});var ob=S(Wf=>{"use strict";Object.defineProperty(Wf,"__esModule",{value:!0});var oR=rb(),sR=nb(),aR=ib(),lR=[oR.default,sR.default,aR.default];Wf.default=lR});var ab=S(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});var hr=Z(),sb=ie(),cR=ft(),uR={message:"must NOT have unevaluated properties",params:({params:e})=>(0,hr._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},fR={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:uR,code(e){let{gen:t,schema:r,data:n,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:s,props:a}=o;a instanceof hr.Name?t.if((0,hr._)`${a} !== true`,()=>t.forIn("key",n,f=>t.if(l(a,f),()=>c(f)))):a!==!0&&t.forIn("key",n,f=>a===void 0?c(f):t.if(p(a,f),()=>c(f))),o.props=!0,e.ok((0,hr._)`${i} === ${cR.default.errors}`);function c(f){if(r===!1){e.setParams({unevaluatedProperty:f}),e.error(),s||t.break();return}if(!(0,sb.alwaysValidSchema)(o,r)){let d=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:f,dataPropType:sb.Type.Str},d),s||t.if((0,hr.not)(d),()=>t.break())}}function l(f,d){return(0,hr._)`!${f} || !${f}[${d}]`}function p(f,d){let m=[];for(let y in f)f[y]===!0&&m.push((0,hr._)`${d} !== ${y}`);return(0,hr.and)(...m)}}};Uf.default=fR});var cb=S(zf=>{"use strict";Object.defineProperty(zf,"__esModule",{value:!0});var Wr=Z(),lb=ie(),pR={message:({params:{len:e}})=>(0,Wr.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Wr._)`{limit: ${e}}`},dR={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:pR,code(e){let{gen:t,schema:r,data:n,it:i}=e,o=i.items||0;if(o===!0)return;let s=t.const("len",(0,Wr._)`${n}.length`);if(r===!1)e.setParams({len:o}),e.fail((0,Wr._)`${s} > ${o}`);else if(typeof r=="object"&&!(0,lb.alwaysValidSchema)(i,r)){let c=t.var("valid",(0,Wr._)`${s} <= ${o}`);t.if((0,Wr.not)(c),()=>a(c,o)),e.ok(c)}i.items=!0;function a(c,l){t.forRange("i",l,s,p=>{e.subschema({keyword:"unevaluatedItems",dataProp:p,dataPropType:lb.Type.Num},c),i.allErrors||t.if((0,Wr.not)(c),()=>t.break())})}}};zf.default=dR});var ub=S(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});var hR=ab(),mR=cb(),gR=[hR.default,mR.default];Gf.default=gR});var fb=S(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});var _e=Z(),yR={message:({schemaCode:e})=>(0,_e.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,_e._)`{format: ${e}}`},vR={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:yR,code(e,t){let{gen:r,data:n,$data:i,schema:o,schemaCode:s,it:a}=e,{opts:c,errSchemaPath:l,schemaEnv:p,self:f}=a;if(!c.validateFormats)return;i?d():m();function d(){let y=r.scopeValue("formats",{ref:f.formats,code:c.code.formats}),g=r.const("fDef",(0,_e._)`${y}[${s}]`),v=r.let("fType"),b=r.let("format");r.if((0,_e._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>r.assign(v,(0,_e._)`${g}.type || "string"`).assign(b,(0,_e._)`${g}.validate`),()=>r.assign(v,(0,_e._)`"string"`).assign(b,g)),e.fail$data((0,_e.or)(I(),_()));function I(){return c.strictSchema===!1?_e.nil:(0,_e._)`${s} && !${b}`}function _(){let R=p.$async?(0,_e._)`(${g}.async ? await ${b}(${n}) : ${b}(${n}))`:(0,_e._)`${b}(${n})`,N=(0,_e._)`(typeof ${b} == "function" ? ${R} : ${b}.test(${n}))`;return(0,_e._)`${b} && ${b} !== true && ${v} === ${t} && !${N}`}}function m(){let y=f.formats[o];if(!y){I();return}if(y===!0)return;let[g,v,b]=_(y);g===t&&e.pass(R());function I(){if(c.strictSchema===!1){f.logger.warn(N());return}throw new Error(N());function N(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function _(N){let j=N instanceof RegExp?(0,_e.regexpCode)(N):c.code.formats?(0,_e._)`${c.code.formats}${(0,_e.getProperty)(o)}`:void 0,U=r.scopeValue("formats",{key:o,ref:N,code:j});return typeof N=="object"&&!(N instanceof RegExp)?[N.type||"string",N.validate,(0,_e._)`${U}.validate`]:["string",N,U]}function R(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!p.$async)throw new Error("async format in sync schema");return(0,_e._)`await ${b}(${n})`}return typeof v=="function"?(0,_e._)`${b}(${n})`:(0,_e._)`${b}.test(${n})`}}}};Jf.default=vR});var pb=S(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});var wR=fb(),bR=[wR.default];Kf.default=bR});var db=S(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.contentVocabulary=Vn.metadataVocabulary=void 0;Vn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Vn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var mb=S(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});var $R=ow(),xR=ww(),_R=zw(),SR=eb(),kR=ob(),CR=ub(),ER=pb(),hb=db(),PR=[SR.default,$R.default,xR.default,(0,_R.default)(!0),ER.default,hb.metadataVocabulary,hb.contentVocabulary,kR.default,CR.default];Yf.default=PR});var yb=S(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.DiscrError=void 0;var gb;(function(e){e.Tag="tag",e.Mapping="mapping"})(gb||(pa.DiscrError=gb={}))});var wb=S(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var Ln=Z(),Xf=yb(),vb=Bi(),IR=qi(),RR=ie(),TR={message:({params:{discrError:e,tagName:t}})=>e===Xf.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Ln._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},AR={keyword:"discriminator",type:"object",schemaType:"object",error:TR,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{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 c=t.let("valid",!1),l=t.const("tag",(0,Ln._)`${r}${(0,Ln.getProperty)(a)}`);t.if((0,Ln._)`typeof ${l} == "string"`,()=>p(),()=>e.error(!1,{discrError:Xf.DiscrError.Tag,tag:l,tagName:a})),e.ok(c);function p(){let m=d();t.if(!1);for(let y in m)t.elseIf((0,Ln._)`${l} === ${y}`),t.assign(c,f(m[y]));t.else(),e.error(!1,{discrError:Xf.DiscrError.Mapping,tag:l,tagName:a}),t.endIf()}function f(m){let y=t.name("valid"),g=e.subschema({keyword:"oneOf",schemaProp:m},y);return e.mergeEvaluated(g,Ln.Name),y}function d(){var m;let y={},g=b(i),v=!0;for(let R=0;R<s.length;R++){let N=s[R];if(N?.$ref&&!(0,RR.schemaHasRulesButRef)(N,o.self.RULES)){let U=N.$ref;if(N=vb.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,U),N instanceof vb.SchemaEnv&&(N=N.schema),N===void 0)throw new IR.default(o.opts.uriResolver,o.baseId,U)}let j=(m=N?.properties)===null||m===void 0?void 0:m[a];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);v=v&&(g||b(N)),I(j,R)}if(!v)throw new Error(`discriminator: "${a}" must be required`);return y;function b({required:R}){return Array.isArray(R)&&R.includes(a)}function I(R,N){if(R.const)_(R.const,N);else if(R.enum)for(let j of R.enum)_(j,N);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function _(R,N){if(typeof R!="string"||R in y)throw new Error(`discriminator: "${a}" values must be unique strings`);y[R]=N}}}};Qf.default=AR});var bb=S((Z3,NR)=>{NR.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 $b=S((e4,OR)=>{OR.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 xb=S((t4,MR)=>{MR.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 _b=S((r4,VR)=>{VR.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 Sb=S((n4,LR)=>{LR.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 kb=S((i4,jR)=>{jR.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 Cb=S((o4,DR)=>{DR.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 Eb=S((s4,FR)=>{FR.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 Pb=S(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var qR=bb(),BR=$b(),HR=xb(),WR=_b(),UR=Sb(),zR=kb(),GR=Cb(),JR=Eb(),KR=["/properties"];function YR(e){return[qR,BR,HR,WR,UR,t(this,zR),GR,t(this,JR)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,KR):n}}Zf.default=YR});var Ib=S((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 XR=ew(),QR=mb(),ZR=wb(),eT=Pb(),ep="https://json-schema.org/draft/2020-12/schema",jn=class extends XR.default{constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),QR.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(ZR.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:t,meta:r}=this.opts;r&&(eT.default.call(this,t),this.refs["http://json-schema.org/schema"]=ep)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(ep)?ep:void 0)}};ve.Ajv2020=jn;tp.exports=ve=jn;tp.exports.Ajv2020=jn;Object.defineProperty(ve,"__esModule",{value:!0});ve.default=jn;var tT=Fi();Object.defineProperty(ve,"KeywordCxt",{enumerable:!0,get:function(){return tT.KeywordCxt}});var Dn=Z();Object.defineProperty(ve,"_",{enumerable:!0,get:function(){return Dn._}});Object.defineProperty(ve,"str",{enumerable:!0,get:function(){return Dn.str}});Object.defineProperty(ve,"stringify",{enumerable:!0,get:function(){return Dn.stringify}});Object.defineProperty(ve,"nil",{enumerable:!0,get:function(){return Dn.nil}});Object.defineProperty(ve,"Name",{enumerable:!0,get:function(){return Dn.Name}});Object.defineProperty(ve,"CodeGen",{enumerable:!0,get:function(){return Dn.CodeGen}});var rT=Bs();Object.defineProperty(ve,"ValidationError",{enumerable:!0,get:function(){return rT.default}});var nT=qi();Object.defineProperty(ve,"MissingRefError",{enumerable:!0,get:function(){return nT.default}})});Mt();as();Vt();pi();import{transform as cT}from"esbuild";import{resolve as Ur}from"node:path";import{resolve as aT}from"node:path";import{readFile as my}from"node:fs/promises";import{basename as lS,resolve as gy}from"node:path";mt();import{dirname as iy,resolve as oy}from"node:path";import L from"typescript";import{existsSync as B_,readFileSync as H_}from"node:fs";import{resolve as W_}from"node:path";import ue from"typescript";function Fc(e,t){let r=new Map;for(let n of e.statements){if(!ue.isImportDeclaration(n)||!n.importClause?.namedBindings||n.importClause.isTypeOnly||!ue.isStringLiteral(n.moduleSpecifier)||!n.moduleSpecifier.text.startsWith(".")||!ue.isNamedImports(n.importClause.namedBindings))continue;let i=n.moduleSpecifier.text;i.endsWith(".tsx")||(i=`${i}.tsx`);let o=W_(t,i);for(let s of n.importClause.namedBindings.elements)s.isTypeOnly||r.set(s.name.text,o)}return r}function U_(e){if(ue.isObjectBindingPattern(e.name)){let t=[];for(let r of e.name.elements)ue.isBindingElement(r)&&ue.isIdentifier(r.name)&&t.push(r.name.text);return t}return ue.isIdentifier(e.name)?[e.name.text]:[]}function z_(e){if(!ue.isObjectBindingPattern(e.name)||e.name.elements.length===0)return null;let t=e.name.elements[0];return!ue.isBindingElement(t)||!ue.isIdentifier(t.name)?null:t.name.text}function G_(e){if(ue.isParenthesizedExpression(e))return e.expression;if(ue.isJsxElement(e)||ue.isJsxSelfClosingElement(e)||ue.isJsxFragment(e))return e;if(ue.isBlock(e))for(let t=e.statements.length-1;t>=0;t--){let r=e.statements[t];if(ue.isReturnStatement(r)&&r.expression)return ue.isParenthesizedExpression(r.expression)?r.expression.expression:r.expression}return null}function ny(e){if(!ue.isIdentifier(e.expression)||e.expression.text!=="view"||e.arguments.length!==1)return null;let t=e.arguments[0];if(!ue.isArrowFunction(t)&&!ue.isFunctionExpression(t))return null;let r="__noop",n=[];if(t.parameters.length===1){let a=z_(t.parameters[0]);if(n=U_(t.parameters[0]),a)r=a;else if(ue.isIdentifier(t.parameters[0].name))r=t.parameters[0].name.text,n=[r];else return null}else if(t.parameters.length>1)return null;let i=G_(t.body);if(!i)return null;let o=e.typeArguments?.length===1?e.typeArguments[0]:void 0,s=o?.getText();return{paramName:r,jsxRoot:i,propNames:n,propsType:s,propsTypeNode:o}}function qc(e,t){let r=null;function n(i){if(ue.isVariableStatement(i))for(let o of i.declarationList.declarations){if(!ue.isIdentifier(o.name)||o.name.text!==t||!o.initializer||!ue.isCallExpression(o.initializer))continue;let s=ny(o.initializer);s&&(r=s)}if(ue.isExportAssignment(i)&&i.isExportEquals===!1&&i.expression&&ue.isCallExpression(i.expression)){let o=ny(i.expression);o&&t==="default"&&(r=o)}ue.forEachChild(i,n)}return n(e),r}function Bc(e,t){if(!B_(e))return null;let r=H_(e,"utf-8"),n=ue.createSourceFile(e,r,ue.ScriptTarget.Latest,!0,ue.ScriptKind.TSX);return qc(n,t)}function J_(e,t,r){if("tone"in t){let n=t.tone;delete t.tone,"variant"in t||(t.variant=n),r.warnings.push(`"tone" on <${e}> is deprecated; use variant instead (mapped automatically)`)}if("textStyle"in t){let n=t.textStyle;delete t.textStyle,"variant"in t||(t.variant=n),r.warnings.push(`"textStyle" on <${e}> is deprecated; use variant instead (mapped automatically)`)}}function Hc(e){return e.join(".")}function ct(e){let t=e.getText().replace(/\s+/g," ").trim();return t.length>100?`${t.slice(0,97)}...`:t}function Uc(e){if(L.isIdentifier(e))return[e.text];if(L.isPropertyAccessExpression(e)&&!e.questionDotToken){let t=Uc(e.expression);return t?[...t,e.name.text]:null}return null}function sy(e,t){if(t.length===0)return e;let r=t.join(".");return{kind:"binding",path:e.path?`${e.path}.${r}`:r,scope:e.scope}}function Si(e,t){let r=Uc(e);if(!r)return null;if(r[0]in t.propBindings)return sy(t.propBindings[r[0]],r.slice(1));if(r[0]===t.vmName)return{kind:"binding",path:Hc(r.slice(1))};let n=t.scopes[t.scopes.length-1];return n&&r[0]===n?{kind:"binding",path:Hc(r.slice(1)),scope:n}:null}function ay(e,t){let r=[];for(let n of e.properties)L.isPropertyAssignment(n)&&L.isIdentifier(n.name)?r.push({key:n.name.text,value:n.initializer}):L.isShorthandPropertyAssignment(n)?r.push({key:n.name.text,value:n.name}):t.errors.push(`Unsupported object literal member: ${ct(n)}`);return r}function K_(e,t){let r=e.find(o=>o.key==="name");if(!r||!L.isStringLiteral(r.value))return null;let n=r.value.text,i={};for(let{key:o,value:s}of e)if(o!=="name"){if(o!=="params"){t.errors.push(`Unsupported property "${o}" in action "${n}"; an action is { name, params? }`);continue}if(!L.isObjectLiteralExpression(s)){t.errors.push(`Action "${n}" params must be an object literal: ${ct(s)}`);continue}for(let a of ay(s,t)){let c=Ps(a.value,t);c!==null?i[a.key]=c:t.errors.push(`Unsupported action param expression for "${a.key}": ${ct(a.value)}`)}}return Object.keys(i).length>0?{kind:"action",name:n,params:i}:{kind:"action",name:n}}function Ps(e,t){if(L.isStringLiteral(e)||L.isNoSubstitutionTemplateLiteral(e))return e.text;if(e.kind===L.SyntaxKind.TrueKeyword)return!0;if(e.kind===L.SyntaxKind.FalseKeyword)return!1;if(L.isNumericLiteral(e))return Number(e.text);if(e.kind===L.SyntaxKind.NullKeyword)return null;if(L.isTemplateExpression(e)){let n=[];e.head.text&&n.push(e.head.text);for(let i of e.templateSpans){let o=Si(i.expression,t);if(!o)return null;n.push(o),i.literal.text&&n.push(i.literal.text)}return{kind:"concat",parts:n}}let r=Si(e,t);if(r)return r;if(L.isObjectLiteralExpression(e)){let n=ay(e,t),i=K_(n,t);if(i)return i;let o={};for(let{key:s,value:a}of n){let c=Ps(a,t);c!==null?o[s]=c:t.errors.push(`Unsupported object literal property "${s}": ${ct(a)}`)}return{kind:"literal",value:o}}if(L.isArrayLiteralExpression(e)){let n=[];for(let i of e.elements){if(!L.isExpression(i))continue;let o=Ps(i,t);o!==null?n.push(o):t.errors.push(`Unsupported array element expression: ${ct(i)}`)}return n}return null}function Y_(e){return L.isIdentifier(e)?e.text:L.isPropertyAccessExpression(e)&&L.isIdentifier(e.name)?e.name.text:null}function ly(e){return e.getText()}function Wc(e,t){let r=[];for(let n of e){if(L.isJsxText(n)){let i=n.getText().trim();i&&r.push({kind:"text",value:i});continue}if(L.isJsxExpression(n)&&n.expression){let i=Si(n.expression,t);if(i){r.push(i);continue}let o=cy(n.expression,t);o?Array.isArray(o)?r.push(...o):r.push(o):t.errors.push(`Unsupported JSX child expression: ${ct(n.expression)}`);continue}if(L.isJsxElement(n)||L.isJsxSelfClosingElement(n)){let i=ki(n,t);i&&r.push(i);continue}L.isJsxFragment(n)&&t.errors.push(`Unsupported nested JSX fragment: ${ct(n)}`)}return r}function X_(e,t){if(e.length===0)return null;let r=e[0];return r in t.propBindings?sy(t.propBindings[r],e.slice(1)):r===t.vmName?{kind:"binding",path:Hc(e.slice(1))}:null}function cy(e,t){if(L.isParenthesizedExpression(e))return cy(e.expression,t);if(L.isCallExpression(e)&&L.isPropertyAccessExpression(e.expression)&&!e.expression.questionDotToken){let n=Uc(e.expression.expression),i=e.expression.name.text;if(n&&i==="map"&&e.arguments.length>=1){let o=X_(n,t);if(!o)return null;let s=e.arguments[0];if(!L.isArrowFunction(s)&&!L.isFunctionExpression(s))return t.errors.push("map callback must be an arrow function"),null;let a=s.parameters;if(a.length!==1||!L.isIdentifier(a[0].name))return t.errors.push("map callback must have a single item parameter"),null;let c=a[0].name.text,l={...t,scopes:[...t.scopes,c]},p=null,f=L.isParenthesizedExpression(s.body)?s.body.expression:s.body;if(L.isBlock(s.body))return t.errors.push("map callback body must be a JSX expression, not a block"),null;if(L.isJsxElement(f)||L.isJsxSelfClosingElement(f)?p=ki(f,l):L.isJsxFragment(f)&&(p=zc(f,l)),!p)return null;let d;if(L.isJsxElement(f)||L.isJsxSelfClosingElement(f)){let m=L.isJsxElement(f)?f.openingElement.attributes:f.attributes;for(let y of m.properties)if(!(!L.isJsxAttribute(y)||ly(y.name)!=="key"||!y.initializer)&&L.isJsxExpression(y.initializer)&&y.initializer.expression){let g=Si(y.initializer.expression,l);g&&(d=g)}}return{kind:"map",source:o,item:c,key:d,body:p}}}if(L.isJsxElement(e)||L.isJsxSelfClosingElement(e))return ki(e,t);let r=Si(e,t);return r||null}function zc(e,t){return{kind:"fragment",children:Wc(e.children,t)}}function Q_(e,t,r){let n=r.viewImports.get(e);return n?Bc(n,e)?{kind:"viewRef",name:e,sourcePath:n,props:t}:(r.errors.push(`View component "${e}" is imported but has no view() export`),null):null}function ki(e,t){let r=L.isJsxElement(e)?e.openingElement:e,n=Y_(r.tagName);if(!n)return t.errors.push("Unsupported JSX tag expression"),null;let i={};for(let l of r.attributes.properties){if(!L.isJsxAttribute(l)){t.errors.push(`Unsupported JSX spread attribute on <${n}>: ${ct(l)}`);continue}let p=ly(l.name);if(p!=="key"){if(!l.initializer){i[p]=!0;continue}if(L.isStringLiteral(l.initializer)){i[p]=l.initializer.text;continue}if(L.isJsxExpression(l.initializer)&&l.initializer.expression){let f=Ps(l.initializer.expression,t);f!==null?i[p]=f:t.errors.push(`Unsupported JSX prop expression for "${p}" on <${n}>: ${ct(l.initializer.expression)}`);continue}t.errors.push(`Unsupported JSX prop initializer for "${p}" on <${n}>: ${ct(l.initializer)}`)}}let o=t.viewImports.get(n);if(t.allowedComponents.has(n)&&o&&Bc(o,n))return t.errors.push(`<${n}> is both a vocabulary element and a view() component imported from ${o}; rename the view() component`),null;if(!t.allowedComponents.has(n)){let l=Q_(n,i,t);return l||(t.errors.push(`Component "${n}" is not in the allowed registry`),null)}J_(n,i,t);let s=t;if(n==="Table"&&i.source){let l=typeof i.source=="object"&&"kind"in i.source&&i.source.kind==="binding"?i.source:void 0;l&&(s={...t,tableSource:l})}let a=typeof i.each=="string"?i.each:void 0;if(a){let l=t.tableSource;if(!l)return t.errors.push(`<${n} each="${a}"> requires an ancestor <Table source={...}>`),null;delete i.each;let p={...s,scopes:[...s.scopes,a]},f=L.isJsxElement(e)?Wc(e.children,p):[];return{kind:"map",source:l,item:a,body:{kind:"component",name:n,props:i,children:f}}}let c=L.isJsxElement(e)?Wc(e.children,s):[];return{kind:"component",name:n,props:i,children:c}}function Z_(e){let t=null;function r(n){if(L.isCallExpression(n)&&L.isIdentifier(n.expression)&&n.expression.text==="screen"&&n.arguments.length===1&&(L.isArrowFunction(n.arguments[0])||L.isFunctionExpression(n.arguments[0]))){let i=n.arguments[0],o="unknown";if(n.typeArguments&&n.typeArguments.length===1){let a=n.typeArguments[0];L.isTypeReferenceNode(a)&&L.isIdentifier(a.typeName)&&(o=a.typeName.text)}let s=i.body;if(L.isParenthesizedExpression(s))(L.isJsxElement(s.expression)||L.isJsxSelfClosingElement(s.expression))&&(t={viewModel:o,jsxRoot:s.expression});else if(L.isJsxElement(s)||L.isJsxSelfClosingElement(s))t={viewModel:o,jsxRoot:s};else if(L.isBlock(s)&&s.statements.length===1){let a=s.statements[0];L.isReturnStatement(a)&&a.expression&&(L.isParenthesizedExpression(a.expression)?t={viewModel:o,jsxRoot:a.expression.expression}:t={viewModel:o,jsxRoot:a.expression})}}L.forEachChild(n,r)}return r(e),t}function uy(e,t,r,n={}){let i=new Set(it);for(let f of n.allowlistExtra??[])i.add(f);let o=oy(t),s=iy(o),a=L.createSourceFile(o,e,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),c={vmName:"vm",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Fc(a,s),allowedComponents:i},l=Z_(a);if(!l)return{viewModel:"unknown",exportName:r,root:{kind:"fragment",children:[]},errors:["No screen<T>() default export found"],warnings:[]};let p=L.isJsxElement(l.jsxRoot)||L.isJsxSelfClosingElement(l.jsxRoot)?ki(l.jsxRoot,c):L.isJsxFragment(l.jsxRoot)?zc(l.jsxRoot,c):null;return p?{viewModel:l.viewModel,exportName:r,root:p,errors:c.errors,warnings:c.warnings}:(c.errors.push("screen() callback must return a single JSX root element"),{viewModel:l.viewModel,exportName:r,root:{kind:"fragment",children:[]},errors:c.errors,warnings:c.warnings})}function eS(e,t){let r={...t.propBindings};for(let i of e.propNames)r[i]={kind:"binding",path:"",scope:i};let n={...t,vmName:e.paramName,propBindings:r,scopes:[]};return L.isJsxElement(e.jsxRoot)||L.isJsxSelfClosingElement(e.jsxRoot)?ki(e.jsxRoot,n):L.isJsxFragment(e.jsxRoot)?zc(e.jsxRoot,n):L.isConditionalExpression(e.jsxRoot)?(t.errors.push("view() partial root must be a JSX element or fragment; conditional expressions are not supported"),null):L.isExpression(e.jsxRoot)?(t.errors.push(`view() partial root must be a JSX element or fragment; unsupported expression: ${ct(e.jsxRoot)}`),null):(t.errors.push(`view() partial root must be a JSX element or fragment; unsupported syntax kind: ${L.SyntaxKind[e.jsxRoot.kind]}`),null)}function tS(e,t){if(!e||!L.isTypeLiteralNode(e))return;let r=[];for(let n of e.members)L.isPropertySignature(n)&&L.isIdentifier(n.name)&&n.type?r.push({name:n.name.text,type:n.type.getText(),optional:n.questionToken!==void 0}):t.errors.push(`Unsupported view() props type member: ${ct(n)}`);return r}function fy(e,t,r,n={}){let i=new Set(it);for(let d of n.allowlistExtra??[])i.add(d);let o=oy(t),s=iy(o),a=L.createSourceFile(o,e,L.ScriptTarget.Latest,!0,L.ScriptKind.TSX),c=qc(a,r),l={vmName:c?.paramName??"__noop",scopes:[],propBindings:{},errors:[],warnings:[],viewImports:Fc(a,s),allowedComponents:i};if(!c)return{exportName:r,propNames:[],root:{kind:"fragment",children:[]},errors:[`No view() export "${r}" found in ${t}`],warnings:[]};let p=tS(c.propsTypeNode,l),f=eS(c,l);return f?{exportName:r,propsType:c.propsType,propDecls:p,propNames:c.propNames,root:f,errors:l.errors,warnings:l.warnings}:{exportName:r,propsType:c.propsType,propDecls:p,propNames:c.propNames,root:{kind:"fragment",children:[]},errors:l.errors,warnings:l.warnings}}function Gc(e){let t=[];function r(n){if(n.kind==="viewRef"){t.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(e),t}function py(e){return`${e.sourcePath}:${e.name}`}import{dirname as mM,relative as rS}from"node:path";function Jc(e,t){return rS(e,t).split("\\").join("/")}mt();var nS=new Set(["swiftui","compose"]),iS=new Set(["action"]);function oS(e,t){return!it.has(e)&&e in t.extensions}function Kc(e){return e?` (${e})`:""}function Is(e,t,r={}){let n=[],i=[],o=r.targets??[],s=o.some(c=>nS.has(c)),a=c=>{if(c.kind!=="viewRef"){if(c.kind==="component"){if(!it.has(c.name)&&!(c.name in t.extensions))n.push(`Extension component "${c.name}" is not registered in extensions.yaml${Kc(r.source)}`);else if(oS(c.name,t)){let l=t.extensions[c.name];s&&l.renderer==="react-only"&&n.push(`Extension "${c.name}" is react-only but binding targets include native renderer(s): ${o.join(", ")}${Kc(r.source)}`);for(let p of Object.keys(c.props))p in l.properties||iS.has(p)||n.push(`Extension "${c.name}" does not accept property "${p}"${Kc(r.source)}`)}for(let l of c.children)a(l);return}if(c.kind==="map"){a(c.body);return}if(c.kind==="fragment")for(let l of c.children)a(l)}};return a(e),{errors:n,warnings:i}}function dy(e,t,r,n,i){let o=[],s=[],a=Is(e,r,{targets:n,source:i.screen});o.push(...a.errors),s.push(...a.warnings);for(let c=0;c<t.length;c++){let l=Is(t[c],r,{targets:n,source:i.partials[c]});o.push(...l.errors),s.push(...l.warnings)}return{errors:o,warnings:s}}mt();function sS(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="action"}function aS(e){if(typeof e!="object"||e===null||!("kind"in e)||e.kind!=="literal")return!1;let t=e.value;return typeof t!="object"||t===null||Array.isArray(t)?!1:Object.values(t).every(r=>r===null||typeof r!="object"||!Array.isArray(r)&&(r.kind==="binding"||r.kind==="concat"))}function Ci(e,t,r,n){if(e.kind==="component"){let{name:i,props:o}=e;if(r.has(i)||!it.has(i)){for(let s of e.children)Ci(s,t,r,n);return}for(let[s,a]of Object.entries(o)){if(!Kp(s,i)){n.push(`${t}: <${i}> does not accept property "${s}"`);continue}yo[s]?.type==="action"&&!sS(a)&&n.push(`${t}: <${i}> "${s}" must be an action descriptor { name: "..." }, got ${JSON.stringify(a)}`),s==="data"&&!aS(a)&&n.push(`${t}: <${i}> "data" must be an object of string, number, boolean or binding values, got ${JSON.stringify(a)}`)}for(let s of e.children)Ci(s,t,r,n);return}if(e.kind==="map"){Ci(e.body,t,r,n);return}if(e.kind==="fragment"){for(let i of e.children)Ci(i,t,r,n);return}}async function hy(e,t=[]){let r=new Set(t),n=[];for(let i of e)Ci(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
- `)}`)}async function D_(e,t,r){let n=await ty(e,"utf-8"),i=Xg(n,e,t,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${e} (${t}):
404
+ `)}`)}async function cS(e,t,r){let n=await my(e,"utf-8"),i=fy(n,e,t,{allowlistExtra:r.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${e} (${t}):
405
405
  ${i.errors.map(o=>` - ${o}`).join(`
406
- `)}`);if(r.extensionRegistry){let o=Es(i.root,r.extensionRegistry,{targets:r.targets,source:e});if(o.errors.length>0)throw new Error(`Extension validation errors in ${e} (${t}):
406
+ `)}`);if(r.extensionRegistry){let o=Is(i.root,r.extensionRegistry,{targets:r.targets,source:e});if(o.errors.length>0)throw new Error(`Extension validation errors in ${e} (${t}):
407
407
  ${o.errors.map(s=>` - ${s}`).join(`
408
- `)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${e} (${t}): ${o}`);return{version:1,source:Dc(r.projectRoot,ry(e)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType,propDecls:i.propDecls}}async function F_(e,t){let r=new Map,n=jc(e);for(;n.length>0;){let i=n.shift(),o=Qg(i);if(r.has(o))continue;let s=await D_(i.sourcePath,i.name,t);r.set(o,s),n.push(...jc(s.root))}return[...r.values()]}async function ny(e,t){let r=await ty(e.sourcePath,"utf-8"),n=e.exportName??j_(e.sourcePath,".view.tsx"),i=Yg(r,e.sourcePath,n,{allowlistExtra:t.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${e.sourcePath}:
408
+ `)}`);i.warnings.push(...o.warnings)}for(let o of i.warnings)console.warn(`Warning in ${e} (${t}): ${o}`);return{version:1,source:Jc(r.projectRoot,gy(e)),viewModel:i.propsType??"Record<string, unknown>",exportName:i.exportName,root:i.root,isPartial:!0,propsType:i.propsType,propDecls:i.propDecls}}async function uS(e,t){let r=new Map,n=Gc(e);for(;n.length>0;){let i=n.shift(),o=py(i);if(r.has(o))continue;let s=await cS(i.sourcePath,i.name,t);r.set(o,s),n.push(...Gc(s.root))}return[...r.values()]}async function yy(e,t){let r=await my(e.sourcePath,"utf-8"),n=e.exportName??lS(e.sourcePath,".view.tsx"),i=uy(r,e.sourcePath,n,{allowlistExtra:t.allowlistExtra});if(i.errors.length>0)throw new Error(`Compile errors in ${e.sourcePath}:
409
409
  ${i.errors.map(a=>` - ${a}`).join(`
410
- `)}`);let o={version:1,source:Dc(t.projectRoot,ry(e.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await F_(o.root,{...t,targets:e.targets??t.targets});if(t.extensionRegistry){let a=Zg(o.root,s.map(c=>c.root),t.extensionRegistry,e.targets??["react"],{screen:o.source,partials:s.map(c=>c.source)});if(a.errors.length>0)throw new Error(`Extension validation errors in ${e.sourcePath}:
410
+ `)}`);let o={version:1,source:Jc(t.projectRoot,gy(e.sourcePath)),viewModel:i.viewModel,exportName:i.exportName,root:i.root},s=await uS(o.root,{...t,targets:e.targets??t.targets});if(t.extensionRegistry){let a=dy(o.root,s.map(c=>c.root),t.extensionRegistry,e.targets??["react"],{screen:o.source,partials:s.map(c=>c.source)});if(a.errors.length>0)throw new Error(`Extension validation errors in ${e.sourcePath}:
411
411
  ${a.errors.map(c=>` - ${c}`).join(`
412
- `)}`);i.warnings.push(...a.warnings)}await ey([o,...s],t.allowlistExtra);for(let a of i.warnings)console.warn(`Warning in ${e.sourcePath}: ${a}`);return{screen:o,partials:s}}Mt();Tc();var hb=Jf(db(),1);Ur();Ot();import{readFile as mb}from"node:fs/promises";import{resolve as gb}from"node:path";var AR=hb.default,NR=gb(Se(),"spec/ui-dsl-extensions.meta.json"),ca;async function MR(){if(ca)return ca;let e=JSON.parse(await mb(NR,"utf-8"));return ca=new AR({allErrors:!0,strict:!1}).compile(e),ca}async function yb(e){if(!e)return{extensions:{}};let t=gb(e),r=await mb(t,"utf-8"),n=it.load(r),i=await MR();if(!i(n)){let o=i.errors?.map(s=>`${s.instancePath||"/"} ${s.message??""}`).join("; ")??"unknown";throw new Error(`Extension registry validation failed (${t}): ${o}`)}return n}pi();async function vb(e,t,r){return(await _g()).renderReactPreviewBundle(e,t,r)}var Gf="view-contracts:screen/",ua="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 VR(e){if(!e.extensions)return{allowlistExtra:e.allowlistExtra??[]};let t=await yb(e.extensions),r=[...new Set([...e.allowlistExtra??[],...Object.keys(t.extensions)])];return{extensionRegistry:t,allowlistExtra:r}}async function wb(e,t){let r=await Zt(e),i=(await jp(r.bindings)).views.find(m=>m.screenName===t);if(!i)throw new Error(`No view binding for screen "${t}"`);if(!i.targets.includes("react"))throw new Error(`Screen "${t}" is not a react target`);let{extensionRegistry:o,allowlistExtra:s}=await VR(r),a=Ie(e),{screen:c,partials:l}=await ny({sourcePath:OR(a,i.source),exportName:i.exportName,screenName:i.screenName},{projectRoot:a,allowlistExtra:s,extensionRegistry:o}),{tokensPath:p,themePath:f}=go(r),{themeIR:h}=await ks(p,f);return await _i(r,e),Cc([c,...l],h),vb(c,l,{runtimeImportFrom:_t.dispatch,extensionsImportFrom:_t.extensions,contractsImportFrom:_t.contracts,allowlistExtra:s,previewImports:_t})}Mt();ps();import{resolve as bb}from"node:path";var xb="\0";function $b(e){return`${xb}${e}`}function _b(e){let t="";async function r(){let o=await Zt(e.configPath);t=await Tm(e.configPath,o)}function n(o){return o.startsWith(t)&&o.endsWith(".mock.yaml")}function i(o,s){let a=o.moduleGraph.getModuleById($b(`${gi}${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(gi)?$b(o):null},async load(o){let s=Rm(o.slice(xb.length));if(!s)return null;try{let a=await Zt(e.configPath);return await Im(e.configPath,a,s)}catch(a){let c=a instanceof Error?a.message:String(a);this.error(`Preview mock failed for ${s}:
413
- ${c}`)}},configureServer(o){r(),o.watcher.on("change",s=>{if(!n(s))return;let a=bb(s).slice(t.length+1).replace(/\.mock\.yaml$/,"");i(o,a)})},handleHotUpdate({file:o,server:s}){if(!n(o))return;let a=bb(o).slice(t.length+1).replace(/\.mock\.yaml$/,"");return i(s,a)}}}var jR="\0";function fa(e){return`${jR}${e}`}function DR(e){let t=fa(Gf);if(!e.startsWith(t))return null;let r=e.slice(t.length);return r.endsWith(".tsx")?r.slice(0,-4):r}function FR(e){let t="",r="",n=[],i,o,s="";async function a(){let f=await Zt(e.configPath);t=Ie(e.configPath),r=f.viewsDir,n=[],f.design?.tokens&&n.push(f.design.tokens),f.design?.theme&&n.push(f.design.theme),o=f.design?.extensionsCss,i=f.extensions,s=fi()}function c(f){let h=f.moduleGraph.getModuleById(fa(ua));return h?(f.moduleGraph.invalidateModule(h),[h]):[]}function l(f,h){let m=f.moduleGraph.getModulesByFile(h);if(m)for(let y of m)f.moduleGraph.invalidateModule(y);(h.endsWith(".view.tsx")||h.includes("/views/"))&&f.moduleGraph.invalidateAll()}function p(f){return n.some(h=>f===h)||f===s||o!==void 0&&f===o}return{name:"view-contracts-preview",enforce:"pre",async buildStart(){await a()},resolveId(f){return f===ua||f.startsWith(Gf)?fa(f):null},async load(f){if(f===fa(ua)){let m=await Zt(e.configPath);return await di(m,e.configPath)}let h=DR(f);if(h)try{let m=await wb(e.configPath,h),{code:y}=await LR(m,{loader:"tsx",format:"esm",jsx:"automatic",jsxImportSource:"react",target:"es2022"});return y}catch(m){let y=m instanceof Error?m.message:String(m);this.error(`Preview compile failed for ${h}:
414
- ${y}`)}return null},configureServer(f){a(),f.watcher.on("change",h=>{p(h)&&c(f),(h.startsWith(r)||p(h)||i&&h===i||pc(h))&&l(f,h)})},handleHotUpdate({file:f,server:h}){if(p(f))return l(h,f),c(h);if(f.startsWith(r)||i&&f===i||pc(f))return l(h,f),[...h.moduleGraph.getModulesByFile(f)??[]]}}}function qR(e){let t=Se(),r=ln();return[{find:"@view-contracts/core",replacement:Fr(t,"dist/dsl.js")},{find:"@view-contracts/components",replacement:Sg()},{find:_t.dispatch,replacement:Fr(r,"dispatch.ts")},{find:_t.style,replacement:Fr(r,"style.ts")},{find:_t.types,replacement:Fr(r,"types.ts")},{find:_t.styleHelpers,replacement:Fr(t,"dist/preview-style-helpers.js")},{find:_t.contracts,replacement:Fr(e,"contracts/view-models.ts")},{find:_t.extensions,replacement:Fr(e,"src/components/extensions.tsx")}]}function BR(e,t){return[e,t,Se()]}export{BR as previewFsAllowPaths,qR as previewRuntimeAliases,_b as viewContractsPreviewMockPlugin,FR as viewContractsPreviewPlugin};
412
+ `)}`);i.warnings.push(...a.warnings)}await hy([o,...s],t.allowlistExtra);for(let a of i.warnings)console.warn(`Warning in ${e.sourcePath}: ${a}`);return{screen:o,partials:s}}Mt();Dc();var Rb=np(Ib(),1);Yr();Vt();import{readFile as Tb}from"node:fs/promises";import{resolve as Ab}from"node:path";var iT=Rb.default,oT=Ab(Se(),"spec/ui-dsl-extensions.meta.json"),da;async function sT(){if(da)return da;let e=JSON.parse(await Tb(oT,"utf-8"));return da=new iT({allErrors:!0,strict:!1}).compile(e),da}async function Nb(e){if(!e)return{extensions:{}};let t=Ab(e),r=await Tb(t,"utf-8"),n=nt.load(r),i=await sT();if(!i(n)){let o=i.errors?.map(s=>`${s.instancePath||"/"} ${s.message??""}`).join("; ")??"unknown";throw new Error(`Extension registry validation failed (${t}): ${o}`)}return n}pi();async function Ob(e,t,r){return(await jg()).renderReactPreviewBundle(e,t,r)}var rp="view-contracts:screen/",ha="view-contracts:theme.css";var St={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 lT(e){if(!e.extensions)return{allowlistExtra:e.allowlistExtra??[]};let t=await Nb(e.extensions),r=[...new Set([...e.allowlistExtra??[],...Object.keys(t.extensions)])];return{extensionRegistry:t,allowlistExtra:r}}async function Mb(e,t){let r=await tr(e),i=(await Gp(r.bindings)).views.find(m=>m.screenName===t);if(!i)throw new Error(`No view binding for screen "${t}"`);if(!i.targets.includes("react"))throw new Error(`Screen "${t}" is not a react target`);let{extensionRegistry:o,allowlistExtra:s}=await lT(r),a=Ie(e),{screen:c,partials:l}=await yy({sourcePath:aT(a,i.source),exportName:i.exportName,screenName:i.screenName},{projectRoot:a,allowlistExtra:s,extensionRegistry:o}),{tokensPath:p,themePath:f}=go(r),{themeIR:d}=await Es(p,f);return await _i(r,e),Oc([c,...l],d),Ob(c,l,{runtimeImportFrom:St.dispatch,extensionsImportFrom:St.extensions,contractsImportFrom:St.contracts,allowlistExtra:s,previewImports:St})}Mt();hs();import{resolve as Vb}from"node:path";var jb="\0";function Lb(e){return`${jb}${e}`}function Db(e){let t="";async function r(){let o=await tr(e.configPath);t=await zm(e.configPath,o)}function n(o){return o.startsWith(t)&&o.endsWith(".mock.yaml")}function i(o,s){let a=o.moduleGraph.getModuleById(Lb(`${gi}${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(gi)?Lb(o):null},async load(o){let s=Um(o.slice(jb.length));if(!s)return null;try{let a=await tr(e.configPath);return await Wm(e.configPath,a,s)}catch(a){let c=a instanceof Error?a.message:String(a);this.error(`Preview mock failed for ${s}:
413
+ ${c}`)}},configureServer(o){r(),o.watcher.on("change",s=>{if(!n(s))return;let a=Vb(s).slice(t.length+1).replace(/\.mock\.yaml$/,"");i(o,a)})},handleHotUpdate({file:o,server:s}){if(!n(o))return;let a=Vb(o).slice(t.length+1).replace(/\.mock\.yaml$/,"");return i(s,a)}}}var uT="\0";function ma(e){return`${uT}${e}`}function fT(e){let t=ma(rp);if(!e.startsWith(t))return null;let r=e.slice(t.length);return r.endsWith(".tsx")?r.slice(0,-4):r}function pT(e){let t="",r="",n=[],i,o,s="";async function a(){let f=await tr(e.configPath);t=Ie(e.configPath),r=f.viewsDir,n=[],f.design?.tokens&&n.push(f.design.tokens),f.design?.theme&&n.push(f.design.theme),o=f.design?.extensionsCss,i=f.extensions,s=fi()}function c(f){let d=f.moduleGraph.getModuleById(ma(ha));return d?(f.moduleGraph.invalidateModule(d),[d]):[]}function l(f,d){let m=f.moduleGraph.getModulesByFile(d);if(m)for(let y of m)f.moduleGraph.invalidateModule(y);(d.endsWith(".view.tsx")||d.includes("/views/"))&&f.moduleGraph.invalidateAll()}function p(f){return n.some(d=>f===d)||f===s||o!==void 0&&f===o}return{name:"view-contracts-preview",enforce:"pre",async buildStart(){await a()},resolveId(f){return f===ha||f.startsWith(rp)?ma(f):null},async load(f){if(f===ma(ha)){let m=await tr(e.configPath);return await di(m,e.configPath)}let d=fT(f);if(d)try{let m=await Mb(e.configPath,d),{code:y}=await cT(m,{loader:"tsx",format:"esm",jsx:"automatic",jsxImportSource:"react",target:"es2022"});return y}catch(m){let y=m instanceof Error?m.message:String(m);this.error(`Preview compile failed for ${d}:
414
+ ${y}`)}return null},configureServer(f){a(),f.watcher.on("change",d=>{p(d)&&c(f),(d.startsWith(r)||p(d)||i&&d===i||bc(d))&&l(f,d)})},handleHotUpdate({file:f,server:d}){if(p(f))return l(d,f),c(d);if(f.startsWith(r)||i&&f===i||bc(f))return l(d,f),[...d.moduleGraph.getModulesByFile(f)??[]]}}}function dT(e){let t=Se(),r=hn();return[{find:"@view-contracts/core",replacement:Ur(t,"dist/dsl.js")},{find:"@view-contracts/components",replacement:Dg()},{find:St.dispatch,replacement:Ur(r,"dispatch.ts")},{find:St.style,replacement:Ur(r,"style.ts")},{find:St.types,replacement:Ur(r,"types.ts")},{find:St.styleHelpers,replacement:Ur(t,"dist/preview-style-helpers.js")},{find:St.contracts,replacement:Ur(e,"contracts/view-models.ts")},{find:St.extensions,replacement:Ur(e,"src/components/extensions.tsx")}]}function hT(e,t){return[e,t,Se()]}export{hT as previewFsAllowPaths,dT as previewRuntimeAliases,Db as viewContractsPreviewMockPlugin,pT as viewContractsPreviewPlugin};
415
415
  //# sourceMappingURL=preview.mjs.map