@kelceyp/swic 0.2.11 → 0.2.12
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/cli/cli.js +170 -170
- package/dist/server/Server.js +104 -104
- package/package.json +2 -2
package/dist/server/Server.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
var iO=Object.create;var{getPrototypeOf:oO,defineProperty:aK,getOwnPropertyNames:cO}=Object;var LO=Object.prototype.hasOwnProperty;var IK=(_,q,f)=>{f=_!=null?iO(oO(_)):{};let K=q||!_||!_.__esModule?aK(f,"default",{value:_,enumerable:!0}):f;for(let $ of cO(_))if(!LO.call(K,$))aK(K,$,{get:()=>_[$],enumerable:!0});return K};var p=(_,q)=>()=>(q||_((q={exports:{}}).exports,q),q.exports);var _7=(_,q)=>{for(var f in q)aK(_,f,{get:q[f],enumerable:!0,configurable:!0,set:(K)=>q[f]=()=>K})};var b_=(_,q)=>()=>(_&&(q=_(_=0)),q);var a_=import.meta.require;var n7=p(($$,l7)=>{(function(_,q){typeof $$==="object"&&typeof l7!=="undefined"?q($$):typeof define==="function"&&define.amd?define(["exports"],q):q(_.URI=_.URI||{})})($$,function(_){function q(){for(var G=arguments.length,Z=Array(G),b=0;b<G;b++)Z[b]=arguments[b];if(Z.length>1){Z[0]=Z[0].slice(0,-1);var E=Z.length-1;for(var d=1;d<E;++d)Z[d]=Z[d].slice(1,-1);return Z[E]=Z[E].slice(1),Z.join("")}else return Z[0]}function f(G){return"(?:"+G+")"}function K(G){return G===void 0?"undefined":G===null?"null":Object.prototype.toString.call(G).split(" ").pop().split("]").shift().toLowerCase()}function $(G){return G.toUpperCase()}function P(G){return G!==void 0&&G!==null?G instanceof Array?G:typeof G.length!=="number"||G.split||G.setInterval||G.call?[G]:Array.prototype.slice.call(G):[]}function j(G,Z){var b=G;if(Z)for(var E in Z)b[E]=Z[E];return b}function v(G){var Z="[A-Za-z]",b="[\\x0D]",E="[0-9]",d="[\\x22]",x=q(E,"[A-Fa-f]"),fq="[\\x0A]",Yq="[\\x20]",Wq=f(f("%[EFef]"+x+"%"+x+x+"%"+x+x)+"|"+f("%[89A-Fa-f]"+x+"%"+x+x)+"|"+f("%"+x+x)),Cq="[\\:\\/\\?\\#\\[\\]\\@]",wq="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",mq=q(Cq,wq),pq=G?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",uq=G?"[\\uE000-\\uF8FF]":"[]",Tq=q(Z,E,"[\\-\\.\\_\\~]",pq),rq=f(Z+q(Z,E,"[\\+\\-\\.]")+"*"),hq=f(f(Wq+"|"+q(Tq,wq,"[\\:]"))+"*"),k8=f(f("25[0-5]")+"|"+f("2[0-4]"+E)+"|"+f("1"+E+E)+"|"+f("[1-9]"+E)+"|"+E),Fq=f(f("25[0-5]")+"|"+f("2[0-4]"+E)+"|"+f("1"+E+E)+"|"+f("0?[1-9]"+E)+"|0?0?"+E),f_=f(Fq+"\\."+Fq+"\\."+Fq+"\\."+Fq),Jq=f(x+"{1,4}"),Qq=f(f(Jq+"\\:"+Jq)+"|"+f_),$_=f(f(Jq+"\\:")+"{6}"+Qq),r_=f("\\:\\:"+f(Jq+"\\:")+"{5}"+Qq),Z8=f(f(Jq)+"?\\:\\:"+f(Jq+"\\:")+"{4}"+Qq),E_=f(f(f(Jq+"\\:")+"{0,1}"+Jq)+"?\\:\\:"+f(Jq+"\\:")+"{3}"+Qq),pf=f(f(f(Jq+"\\:")+"{0,2}"+Jq)+"?\\:\\:"+f(Jq+"\\:")+"{2}"+Qq),R6=f(f(f(Jq+"\\:")+"{0,3}"+Jq)+"?\\:\\:"+Jq+"\\:"+Qq),E6=f(f(f(Jq+"\\:")+"{0,4}"+Jq)+"?\\:\\:"+Qq),D8=f(f(f(Jq+"\\:")+"{0,5}"+Jq)+"?\\:\\:"+Jq),y8=f(f(f(Jq+"\\:")+"{0,6}"+Jq)+"?\\:\\:"),g_=f([$_,r_,Z8,E_,pf,R6,E6,D8,y8].join("|")),i8=f(f(Tq+"|"+Wq)+"+"),gK=f(g_+"\\%25"+i8),X8=f(g_+f("\\%25|\\%(?!"+x+"{2})")+i8),EO=f("[vV]"+x+"+\\."+q(Tq,wq,"[\\:]")+"+"),gO=f("\\["+f(X8+"|"+g_+"|"+EO)+"\\]"),U4=f(f(Wq+"|"+q(Tq,wq))+"*"),lf=f(gO+"|"+f_+"(?!"+U4+")|"+U4),nf=f(E+"*"),F4=f(f(hq+"@")+"?"+lf+f("\\:"+nf)+"?"),Rf=f(Wq+"|"+q(Tq,wq,"[\\:\\@]")),dO=f(Rf+"*"),Q4=f(Rf+"+"),aO=f(f(Wq+"|"+q(Tq,wq,"[\\@]"))+"+"),d_=f(f("\\/"+dO)+"*"),o8=f("\\/"+f(Q4+d_)+"?"),dK=f(aO+d_),g6=f(Q4+d_),c8="(?!"+Rf+")",cN=f(d_+"|"+o8+"|"+dK+"|"+g6+"|"+c8),L8=f(f(Rf+"|"+q("[\\/\\?]",uq))+"*"),Ef=f(f(Rf+"|[\\/\\?]")+"*"),q7=f(f("\\/\\/"+F4+d_)+"|"+o8+"|"+g6+"|"+c8),IO=f(rq+"\\:"+q7+f("\\?"+L8)+"?"+f("\\#"+Ef)+"?"),DO=f(f("\\/\\/"+F4+d_)+"|"+o8+"|"+dK+"|"+c8),yO=f(DO+f("\\?"+L8)+"?"+f("\\#"+Ef)+"?"),LN=f(IO+"|"+yO),tN=f(rq+"\\:"+q7+f("\\?"+L8)+"?"),eN="^("+rq+")\\:"+f(f("\\/\\/("+f("("+hq+")@")+"?("+lf+")"+f("\\:("+nf+")")+"?)")+"?("+d_+"|"+o8+"|"+g6+"|"+c8+")")+f("\\?("+L8+")")+"?"+f("\\#("+Ef+")")+"?$",xN="^(){0}"+f(f("\\/\\/("+f("("+hq+")@")+"?("+lf+")"+f("\\:("+nf+")")+"?)")+"?("+d_+"|"+o8+"|"+dK+"|"+c8+")")+f("\\?("+L8+")")+"?"+f("\\#("+Ef+")")+"?$",sN="^("+rq+")\\:"+f(f("\\/\\/("+f("("+hq+")@")+"?("+lf+")"+f("\\:("+nf+")")+"?)")+"?("+d_+"|"+o8+"|"+g6+"|"+c8+")")+f("\\?("+L8+")")+"?$",BN="^"+f("\\#("+Ef+")")+"?$",UN="^"+f("("+hq+")@")+"?("+lf+")"+f("\\:("+nf+")")+"?$";return{NOT_SCHEME:new RegExp(q("[^]",Z,E,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(q("[^\\%\\:]",Tq,wq),"g"),NOT_HOST:new RegExp(q("[^\\%\\[\\]\\:]",Tq,wq),"g"),NOT_PATH:new RegExp(q("[^\\%\\/\\:\\@]",Tq,wq),"g"),NOT_PATH_NOSCHEME:new RegExp(q("[^\\%\\/\\@]",Tq,wq),"g"),NOT_QUERY:new RegExp(q("[^\\%]",Tq,wq,"[\\:\\@\\/\\?]",uq),"g"),NOT_FRAGMENT:new RegExp(q("[^\\%]",Tq,wq,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(q("[^]",Tq,wq),"g"),UNRESERVED:new RegExp(Tq,"g"),OTHER_CHARS:new RegExp(q("[^\\%]",Tq,mq),"g"),PCT_ENCODED:new RegExp(Wq,"g"),IPV4ADDRESS:new RegExp("^("+f_+")$"),IPV6ADDRESS:new RegExp("^\\[?("+g_+")"+f(f("\\%25|\\%(?!"+x+"{2})")+"("+i8+")")+"?\\]?$")}}var w=v(!1),O=v(!0),T=function(){function G(Z,b){var E=[],d=!0,x=!1,fq=void 0;try{for(var Yq=Z[Symbol.iterator](),Wq;!(d=(Wq=Yq.next()).done);d=!0)if(E.push(Wq.value),b&&E.length===b)break}catch(Cq){x=!0,fq=Cq}finally{try{if(!d&&Yq.return)Yq.return()}finally{if(x)throw fq}}return E}return function(Z,b){if(Array.isArray(Z))return Z;else if(Symbol.iterator in Object(Z))return G(Z,b);else throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Y=function(G){if(Array.isArray(G)){for(var Z=0,b=Array(G.length);Z<G.length;Z++)b[Z]=G[Z];return b}else return Array.from(G)},z=2147483647,H=36,h=1,J=26,k=38,X=700,l=72,N=128,n="-",R=/^xn--/,g=/[^\0-\x7E]/,V=/[\x2E\u3002\uFF0E\uFF61]/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=H-h,a=Math.floor,r=String.fromCharCode;function A(G){throw new RangeError(M[G])}function u(G,Z){var b=[],E=G.length;while(E--)b[E]=Z(G[E]);return b}function m(G,Z){var b=G.split("@"),E="";if(b.length>1)E=b[0]+"@",G=b[1];G=G.replace(V,".");var d=G.split("."),x=u(d,Z).join(".");return E+x}function S(G){var Z=[],b=0,E=G.length;while(b<E){var d=G.charCodeAt(b++);if(d>=55296&&d<=56319&&b<E){var x=G.charCodeAt(b++);if((x&64512)==56320)Z.push(((d&1023)<<10)+(x&1023)+65536);else Z.push(d),b--}else Z.push(d)}return Z}var I=function G(Z){return String.fromCodePoint.apply(String,Y(Z))},D=function G(Z){if(Z-48<10)return Z-22;if(Z-65<26)return Z-65;if(Z-97<26)return Z-97;return H},c=function G(Z,b){return Z+22+75*(Z<26)-((b!=0)<<5)},e=function G(Z,b,E){var d=0;Z=E?a(Z/X):Z>>1,Z+=a(Z/b);for(;Z>C*J>>1;d+=H)Z=a(Z/C);return a(d+(C+1)*Z/(Z+k))},L=function G(Z){var b=[],E=Z.length,d=0,x=N,fq=l,Yq=Z.lastIndexOf(n);if(Yq<0)Yq=0;for(var Wq=0;Wq<Yq;++Wq){if(Z.charCodeAt(Wq)>=128)A("not-basic");b.push(Z.charCodeAt(Wq))}for(var Cq=Yq>0?Yq+1:0;Cq<E;){var wq=d;for(var mq=1,pq=H;;pq+=H){if(Cq>=E)A("invalid-input");var uq=D(Z.charCodeAt(Cq++));if(uq>=H||uq>a((z-d)/mq))A("overflow");d+=uq*mq;var Tq=pq<=fq?h:pq>=fq+J?J:pq-fq;if(uq<Tq)break;var rq=H-Tq;if(mq>a(z/rq))A("overflow");mq*=rq}var hq=b.length+1;if(fq=e(d-wq,hq,wq==0),a(d/hq)>z-x)A("overflow");x+=a(d/hq),d%=hq,b.splice(d++,0,x)}return String.fromCodePoint.apply(String,b)},Q=function G(Z){var b=[];Z=S(Z);var E=Z.length,d=N,x=0,fq=l,Yq=!0,Wq=!1,Cq=void 0;try{for(var wq=Z[Symbol.iterator](),mq;!(Yq=(mq=wq.next()).done);Yq=!0){var pq=mq.value;if(pq<128)b.push(r(pq))}}catch(X8){Wq=!0,Cq=X8}finally{try{if(!Yq&&wq.return)wq.return()}finally{if(Wq)throw Cq}}var uq=b.length,Tq=uq;if(uq)b.push(n);while(Tq<E){var rq=z,hq=!0,k8=!1,Fq=void 0;try{for(var f_=Z[Symbol.iterator](),Jq;!(hq=(Jq=f_.next()).done);hq=!0){var Qq=Jq.value;if(Qq>=d&&Qq<rq)rq=Qq}}catch(X8){k8=!0,Fq=X8}finally{try{if(!hq&&f_.return)f_.return()}finally{if(k8)throw Fq}}var $_=Tq+1;if(rq-d>a((z-x)/$_))A("overflow");x+=(rq-d)*$_,d=rq;var r_=!0,Z8=!1,E_=void 0;try{for(var pf=Z[Symbol.iterator](),R6;!(r_=(R6=pf.next()).done);r_=!0){var E6=R6.value;if(E6<d&&++x>z)A("overflow");if(E6==d){var D8=x;for(var y8=H;;y8+=H){var g_=y8<=fq?h:y8>=fq+J?J:y8-fq;if(D8<g_)break;var i8=D8-g_,gK=H-g_;b.push(r(c(g_+i8%gK,0))),D8=a(i8/gK)}b.push(r(c(D8,0))),fq=e(x,$_,Tq==uq),x=0,++Tq}}}catch(X8){Z8=!0,E_=X8}finally{try{if(!r_&&pf.return)pf.return()}finally{if(Z8)throw E_}}++x,++d}return b.join("")},Hq=function G(Z){return m(Z,function(b){return R.test(b)?L(b.slice(4).toLowerCase()):b})},Pq=function G(Z){return m(Z,function(b){return g.test(b)?"xn--"+Q(b):b})},_q={version:"2.1.0",ucs2:{decode:S,encode:I},decode:L,encode:Q,toASCII:Pq,toUnicode:Hq},kq={};function gq(G){var Z=G.charCodeAt(0),b=void 0;if(Z<16)b="%0"+Z.toString(16).toUpperCase();else if(Z<128)b="%"+Z.toString(16).toUpperCase();else if(Z<2048)b="%"+(Z>>6|192).toString(16).toUpperCase()+"%"+(Z&63|128).toString(16).toUpperCase();else b="%"+(Z>>12|224).toString(16).toUpperCase()+"%"+(Z>>6&63|128).toString(16).toUpperCase()+"%"+(Z&63|128).toString(16).toUpperCase();return b}function iq(G){var Z="",b=0,E=G.length;while(b<E){var d=parseInt(G.substr(b+1,2),16);if(d<128)Z+=String.fromCharCode(d),b+=3;else if(d>=194&&d<224){if(E-b>=6){var x=parseInt(G.substr(b+4,2),16);Z+=String.fromCharCode((d&31)<<6|x&63)}else Z+=G.substr(b,6);b+=6}else if(d>=224){if(E-b>=9){var fq=parseInt(G.substr(b+4,2),16),Yq=parseInt(G.substr(b+7,2),16);Z+=String.fromCharCode((d&15)<<12|(fq&63)<<6|Yq&63)}else Z+=G.substr(b,9);b+=9}else Z+=G.substr(b,3),b+=3}return Z}function x_(G,Z){function b(E){var d=iq(E);return!d.match(Z.UNRESERVED)?E:d}if(G.scheme)G.scheme=String(G.scheme).replace(Z.PCT_ENCODED,b).toLowerCase().replace(Z.NOT_SCHEME,"");if(G.userinfo!==void 0)G.userinfo=String(G.userinfo).replace(Z.PCT_ENCODED,b).replace(Z.NOT_USERINFO,gq).replace(Z.PCT_ENCODED,$);if(G.host!==void 0)G.host=String(G.host).replace(Z.PCT_ENCODED,b).toLowerCase().replace(Z.NOT_HOST,gq).replace(Z.PCT_ENCODED,$);if(G.path!==void 0)G.path=String(G.path).replace(Z.PCT_ENCODED,b).replace(G.scheme?Z.NOT_PATH:Z.NOT_PATH_NOSCHEME,gq).replace(Z.PCT_ENCODED,$);if(G.query!==void 0)G.query=String(G.query).replace(Z.PCT_ENCODED,b).replace(Z.NOT_QUERY,gq).replace(Z.PCT_ENCODED,$);if(G.fragment!==void 0)G.fragment=String(G.fragment).replace(Z.PCT_ENCODED,b).replace(Z.NOT_FRAGMENT,gq).replace(Z.PCT_ENCODED,$);return G}function n_(G){return G.replace(/^0*(.*)/,"$1")||"0"}function Nq(G,Z){var b=G.match(Z.IPV4ADDRESS)||[],E=T(b,2),d=E[1];if(d)return d.split(".").map(n_).join(".");else return G}function Vq(G,Z){var b=G.match(Z.IPV6ADDRESS)||[],E=T(b,3),d=E[1],x=E[2];if(d){var fq=d.toLowerCase().split("::").reverse(),Yq=T(fq,2),Wq=Yq[0],Cq=Yq[1],wq=Cq?Cq.split(":").map(n_):[],mq=Wq.split(":").map(n_),pq=Z.IPV4ADDRESS.test(mq[mq.length-1]),uq=pq?7:8,Tq=mq.length-uq,rq=Array(uq);for(var hq=0;hq<uq;++hq)rq[hq]=wq[hq]||mq[Tq+hq]||"";if(pq)rq[uq-1]=Nq(rq[uq-1],Z);var k8=rq.reduce(function($_,r_,Z8){if(!r_||r_==="0"){var E_=$_[$_.length-1];if(E_&&E_.index+E_.length===Z8)E_.length++;else $_.push({index:Z8,length:1})}return $_},[]),Fq=k8.sort(function($_,r_){return r_.length-$_.length})[0],f_=void 0;if(Fq&&Fq.length>1){var Jq=rq.slice(0,Fq.index),Qq=rq.slice(Fq.index+Fq.length);f_=Jq.join(":")+"::"+Qq.join(":")}else f_=rq.join(":");if(x)f_+="%"+x;return f_}else return G}var H8=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Dq="".match(/(){0}/)[1]===void 0;function zq(G){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b={},E=Z.iri!==!1?O:w;if(Z.reference==="suffix")G=(Z.scheme?Z.scheme+":":"")+"//"+G;var d=G.match(H8);if(d){if(Dq){if(b.scheme=d[1],b.userinfo=d[3],b.host=d[4],b.port=parseInt(d[5],10),b.path=d[6]||"",b.query=d[7],b.fragment=d[8],isNaN(b.port))b.port=d[5]}else if(b.scheme=d[1]||void 0,b.userinfo=G.indexOf("@")!==-1?d[3]:void 0,b.host=G.indexOf("//")!==-1?d[4]:void 0,b.port=parseInt(d[5],10),b.path=d[6]||"",b.query=G.indexOf("?")!==-1?d[7]:void 0,b.fragment=G.indexOf("#")!==-1?d[8]:void 0,isNaN(b.port))b.port=G.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?d[4]:void 0;if(b.host)b.host=Vq(Nq(b.host,E),E);if(b.scheme===void 0&&b.userinfo===void 0&&b.host===void 0&&b.port===void 0&&!b.path&&b.query===void 0)b.reference="same-document";else if(b.scheme===void 0)b.reference="relative";else if(b.fragment===void 0)b.reference="absolute";else b.reference="uri";if(Z.reference&&Z.reference!=="suffix"&&Z.reference!==b.reference)b.error=b.error||"URI is not a "+Z.reference+" reference.";var x=kq[(Z.scheme||b.scheme||"").toLowerCase()];if(!Z.unicodeSupport&&(!x||!x.unicodeSupport)){if(b.host&&(Z.domainHost||x&&x.domainHost))try{b.host=_q.toASCII(b.host.replace(E.PCT_ENCODED,iq).toLowerCase())}catch(fq){b.error=b.error||"Host's domain name can not be converted to ASCII via punycode: "+fq}x_(b,w)}else x_(b,E);if(x&&x.parse)x.parse(b,Z)}else b.error=b.error||"URI can not be parsed.";return b}function s_(G,Z){var b=Z.iri!==!1?O:w,E=[];if(G.userinfo!==void 0)E.push(G.userinfo),E.push("@");if(G.host!==void 0)E.push(Vq(Nq(String(G.host),b),b).replace(b.IPV6ADDRESS,function(d,x,fq){return"["+x+(fq?"%25"+fq:"")+"]"}));if(typeof G.port==="number"||typeof G.port==="string")E.push(":"),E.push(String(G.port));return E.length?E.join(""):void 0}var R_=/^\.\.?\//,h8=/^\/\.(\/|$)/,J8=/^\/\.\.(\/|$)/,dq=/^\/?(?:.|\n)*?(?=\/|$)/;function __(G){var Z=[];while(G.length)if(G.match(R_))G=G.replace(R_,"");else if(G.match(h8))G=G.replace(h8,"/");else if(G.match(J8))G=G.replace(J8,"/"),Z.pop();else if(G==="."||G==="..")G="";else{var b=G.match(dq);if(b){var E=b[0];G=G.slice(E.length),Z.push(E)}else throw new Error("Unexpected dot segment condition")}return Z.join("")}function tq(G){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b=Z.iri?O:w,E=[],d=kq[(Z.scheme||G.scheme||"").toLowerCase()];if(d&&d.serialize)d.serialize(G,Z);if(G.host){if(b.IPV6ADDRESS.test(G.host));else if(Z.domainHost||d&&d.domainHost)try{G.host=!Z.iri?_q.toASCII(G.host.replace(b.PCT_ENCODED,iq).toLowerCase()):_q.toUnicode(G.host)}catch(Yq){G.error=G.error||"Host's domain name can not be converted to "+(!Z.iri?"ASCII":"Unicode")+" via punycode: "+Yq}}if(x_(G,b),Z.reference!=="suffix"&&G.scheme)E.push(G.scheme),E.push(":");var x=s_(G,Z);if(x!==void 0){if(Z.reference!=="suffix")E.push("//");if(E.push(x),G.path&&G.path.charAt(0)!=="/")E.push("/")}if(G.path!==void 0){var fq=G.path;if(!Z.absolutePath&&(!d||!d.absolutePath))fq=__(fq);if(x===void 0)fq=fq.replace(/^\/\//,"/%2F");E.push(fq)}if(G.query!==void 0)E.push("?"),E.push(G.query);if(G.fragment!==void 0)E.push("#"),E.push(G.fragment);return E.join("")}function oq(G,Z){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},E=arguments[3],d={};if(!E)G=zq(tq(G,b),b),Z=zq(tq(Z,b),b);if(b=b||{},!b.tolerant&&Z.scheme)d.scheme=Z.scheme,d.userinfo=Z.userinfo,d.host=Z.host,d.port=Z.port,d.path=__(Z.path||""),d.query=Z.query;else{if(Z.userinfo!==void 0||Z.host!==void 0||Z.port!==void 0)d.userinfo=Z.userinfo,d.host=Z.host,d.port=Z.port,d.path=__(Z.path||""),d.query=Z.query;else{if(!Z.path)if(d.path=G.path,Z.query!==void 0)d.query=Z.query;else d.query=G.query;else{if(Z.path.charAt(0)==="/")d.path=__(Z.path);else{if((G.userinfo!==void 0||G.host!==void 0||G.port!==void 0)&&!G.path)d.path="/"+Z.path;else if(!G.path)d.path=Z.path;else d.path=G.path.slice(0,G.path.lastIndexOf("/")+1)+Z.path;d.path=__(d.path)}d.query=Z.query}d.userinfo=G.userinfo,d.host=G.host,d.port=G.port}d.scheme=G.scheme}return d.fragment=Z.fragment,d}function G_(G,Z,b){var E=j({scheme:"null"},b);return tq(oq(zq(G,E),zq(Z,E),E,!0),E)}function Uq(G,Z){if(typeof G==="string")G=tq(zq(G,Z),Z);else if(K(G)==="object")G=zq(tq(G,Z),Z);return G}function n6(G,Z,b){if(typeof G==="string")G=tq(zq(G,b),b);else if(K(G)==="object")G=tq(G,b);if(typeof Z==="string")Z=tq(zq(Z,b),b);else if(K(Z)==="object")Z=tq(Z,b);return G===Z}function RK(G,Z){return G&&G.toString().replace(!Z||!Z.iri?w.ESCAPE:O.ESCAPE,gq)}function Y_(G,Z){return G&&G.toString().replace(!Z||!Z.iri?w.PCT_ENCODED:O.PCT_ENCODED,iq)}var Nf={scheme:"http",domainHost:!0,parse:function G(Z,b){if(!Z.host)Z.error=Z.error||"HTTP URIs must have a host.";return Z},serialize:function G(Z,b){var E=String(Z.scheme).toLowerCase()==="https";if(Z.port===(E?443:80)||Z.port==="")Z.port=void 0;if(!Z.path)Z.path="/";return Z}},o4={scheme:"https",domainHost:Nf.domainHost,parse:Nf.parse,serialize:Nf.serialize};function c4(G){return typeof G.secure==="boolean"?G.secure:String(G.scheme).toLowerCase()==="wss"}var Cf={scheme:"ws",domainHost:!0,parse:function G(Z,b){var E=Z;return E.secure=c4(E),E.resourceName=(E.path||"/")+(E.query?"?"+E.query:""),E.path=void 0,E.query=void 0,E},serialize:function G(Z,b){if(Z.port===(c4(Z)?443:80)||Z.port==="")Z.port=void 0;if(typeof Z.secure==="boolean")Z.scheme=Z.secure?"wss":"ws",Z.secure=void 0;if(Z.resourceName){var E=Z.resourceName.split("?"),d=T(E,2),x=d[0],fq=d[1];Z.path=x&&x!=="/"?x:void 0,Z.query=fq,Z.resourceName=void 0}return Z.fragment=void 0,Z}},L4={scheme:"wss",domainHost:Cf.domainHost,parse:Cf.parse,serialize:Cf.serialize},mO={},rO=!0,t4="[A-Za-z0-9\\-\\.\\_\\~"+(rO?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",m_="[0-9A-Fa-f]",bO=f(f("%[EFef]"+m_+"%"+m_+m_+"%"+m_+m_)+"|"+f("%[89A-Fa-f]"+m_+"%"+m_+m_)+"|"+f("%"+m_+m_)),VO="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",MO="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",SO=q(MO,"[\\\"\\\\]"),NO="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",CO=new RegExp(t4,"g"),I8=new RegExp(bO,"g"),pO=new RegExp(q("[^]",VO,"[\\.]","[\\\"]",SO),"g"),e4=new RegExp(q("[^]",t4,NO),"g"),lO=e4;function EK(G){var Z=iq(G);return!Z.match(CO)?G:Z}var x4={scheme:"mailto",parse:function G(Z,b){var E=Z,d=E.to=E.path?E.path.split(","):[];if(E.path=void 0,E.query){var x=!1,fq={},Yq=E.query.split("&");for(var Wq=0,Cq=Yq.length;Wq<Cq;++Wq){var wq=Yq[Wq].split("=");switch(wq[0]){case"to":var mq=wq[1].split(",");for(var pq=0,uq=mq.length;pq<uq;++pq)d.push(mq[pq]);break;case"subject":E.subject=Y_(wq[1],b);break;case"body":E.body=Y_(wq[1],b);break;default:x=!0,fq[Y_(wq[0],b)]=Y_(wq[1],b);break}}if(x)E.headers=fq}E.query=void 0;for(var Tq=0,rq=d.length;Tq<rq;++Tq){var hq=d[Tq].split("@");if(hq[0]=Y_(hq[0]),!b.unicodeSupport)try{hq[1]=_q.toASCII(Y_(hq[1],b).toLowerCase())}catch(k8){E.error=E.error||"Email address's domain name can not be converted to ASCII via punycode: "+k8}else hq[1]=Y_(hq[1],b).toLowerCase();d[Tq]=hq.join("@")}return E},serialize:function G(Z,b){var E=Z,d=P(Z.to);if(d){for(var x=0,fq=d.length;x<fq;++x){var Yq=String(d[x]),Wq=Yq.lastIndexOf("@"),Cq=Yq.slice(0,Wq).replace(I8,EK).replace(I8,$).replace(pO,gq),wq=Yq.slice(Wq+1);try{wq=!b.iri?_q.toASCII(Y_(wq,b).toLowerCase()):_q.toUnicode(wq)}catch(Tq){E.error=E.error||"Email address's domain name can not be converted to "+(!b.iri?"ASCII":"Unicode")+" via punycode: "+Tq}d[x]=Cq+"@"+wq}E.path=d.join(",")}var mq=Z.headers=Z.headers||{};if(Z.subject)mq.subject=Z.subject;if(Z.body)mq.body=Z.body;var pq=[];for(var uq in mq)if(mq[uq]!==mO[uq])pq.push(uq.replace(I8,EK).replace(I8,$).replace(e4,gq)+"="+mq[uq].replace(I8,EK).replace(I8,$).replace(lO,gq));if(pq.length)E.query=pq.join("&");return E}},nO=/^([^\:]+)\:(.*)/,s4={scheme:"urn",parse:function G(Z,b){var E=Z.path&&Z.path.match(nO),d=Z;if(E){var x=b.scheme||d.scheme||"urn",fq=E[1].toLowerCase(),Yq=E[2],Wq=x+":"+(b.nid||fq),Cq=kq[Wq];if(d.nid=fq,d.nss=Yq,d.path=void 0,Cq)d=Cq.parse(d,b)}else d.error=d.error||"URN can not be parsed.";return d},serialize:function G(Z,b){var E=b.scheme||Z.scheme||"urn",d=Z.nid,x=E+":"+(b.nid||d),fq=kq[x];if(fq)Z=fq.serialize(Z,b);var Yq=Z,Wq=Z.nss;return Yq.path=(d||b.nid)+":"+Wq,Yq}},RO=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,B4={scheme:"urn:uuid",parse:function G(Z,b){var E=Z;if(E.uuid=E.nss,E.nss=void 0,!b.tolerant&&(!E.uuid||!E.uuid.match(RO)))E.error=E.error||"UUID is not valid.";return E},serialize:function G(Z,b){var E=Z;return E.nss=(Z.uuid||"").toLowerCase(),E}};kq[Nf.scheme]=Nf,kq[o4.scheme]=o4,kq[Cf.scheme]=Cf,kq[L4.scheme]=L4,kq[x4.scheme]=x4,kq[s4.scheme]=s4,kq[B4.scheme]=B4,_.SCHEMES=kq,_.pctEncChar=gq,_.pctDecChars=iq,_.parse=zq,_.removeDotSegments=__,_.serialize=tq,_.resolveComponents=oq,_.resolve=G_,_.normalize=Uq,_.equal=n6,_.escapeComponent=RK,_.unescapeComponent=Y_,Object.defineProperty(_,"__esModule",{value:!0})})});var K$=p((gC,R7)=>{R7.exports=function _(q,f){if(q===f)return!0;if(q&&f&&typeof q=="object"&&typeof f=="object"){if(q.constructor!==f.constructor)return!1;var K,$,P;if(Array.isArray(q)){if(K=q.length,K!=f.length)return!1;for($=K;$--!==0;)if(!_(q[$],f[$]))return!1;return!0}if(q.constructor===RegExp)return q.source===f.source&&q.flags===f.flags;if(q.valueOf!==Object.prototype.valueOf)return q.valueOf()===f.valueOf();if(q.toString!==Object.prototype.toString)return q.toString()===f.toString();if(P=Object.keys(q),K=P.length,K!==Object.keys(f).length)return!1;for($=K;$--!==0;)if(!Object.prototype.hasOwnProperty.call(f,P[$]))return!1;for($=K;$--!==0;){var j=P[$];if(!_(q[j],f[j]))return!1}return!0}return q!==q&&f!==f}});var g7=p((dC,E7)=>{E7.exports=function _(q){var f=0,K=q.length,$=0,P;while($<K)if(f++,P=q.charCodeAt($++),P>=55296&&P<=56319&&$<K){if(P=q.charCodeAt($),(P&64512)==56320)$++}return f}});var b8=p((aC,I7)=>{I7.exports={copy:tT,checkDataType:fP,checkDataTypes:eT,coerceToTypes:xT,toHash:KP,getProperty:PP,escapeQuotes:jP,equal:K$(),ucs2length:g7(),varOccurences:UT,varReplace:FT,schemaHasRules:QT,schemaHasRulesExcept:qz,schemaUnknownRules:_z,toQuotedString:$P,getPathExpr:fz,getPath:$z,getData:jz,unescapeFragment:vz,unescapeJsonPointer:wP,escapeFragment:wz,escapeJsonPointer:vP};function tT(_,q){q=q||{};for(var f in _)q[f]=_[f];return q}function fP(_,q,f,K){var $=K?" !== ":" === ",P=K?" || ":" && ",j=K?"!":"",v=K?"":"!";switch(_){case"null":return q+$+"null";case"array":return j+"Array.isArray("+q+")";case"object":return"("+j+q+P+"typeof "+q+$+'"object"'+P+v+"Array.isArray("+q+"))";case"integer":return"(typeof "+q+$+'"number"'+P+v+"("+q+" % 1)"+P+q+$+q+(f?P+j+"isFinite("+q+")":"")+")";case"number":return"(typeof "+q+$+'"'+_+'"'+(f?P+j+"isFinite("+q+")":"")+")";default:return"typeof "+q+$+'"'+_+'"'}}function eT(_,q,f){switch(_.length){case 1:return fP(_[0],q,f,!0);default:var K="",$=KP(_);if($.array&&$.object)K=$.null?"(":"(!"+q+" || ",K+="typeof "+q+' !== "object")',delete $.null,delete $.array,delete $.object;if($.number)delete $.integer;for(var P in $)K+=(K?" && ":"")+fP(P,q,f,!0);return K}}var d7=KP(["string","number","integer","boolean","null"]);function xT(_,q){if(Array.isArray(q)){var f=[];for(var K=0;K<q.length;K++){var $=q[K];if(d7[$])f[f.length]=$;else if(_==="array"&&$==="array")f[f.length]=$}if(f.length)return f}else if(d7[q])return[q];else if(_==="array"&&q==="array")return["array"]}function KP(_){var q={};for(var f=0;f<_.length;f++)q[_[f]]=!0;return q}var sT=/^[a-z$_][a-z$_0-9]*$/i,BT=/'|\\/g;function PP(_){return typeof _=="number"?"["+_+"]":sT.test(_)?"."+_:"['"+jP(_)+"']"}function jP(_){return _.replace(BT,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function UT(_,q){q+="[^0-9]";var f=_.match(new RegExp(q,"g"));return f?f.length:0}function FT(_,q,f){return q+="([^0-9])",f=f.replace(/\$/g,"$$$$"),_.replace(new RegExp(q,"g"),f+"$1")}function QT(_,q){if(typeof _=="boolean")return!_;for(var f in _)if(q[f])return!0}function qz(_,q,f){if(typeof _=="boolean")return!_&&f!="not";for(var K in _)if(K!=f&&q[K])return!0}function _z(_,q){if(typeof _=="boolean")return;for(var f in _)if(!q[f])return f}function $P(_){return"'"+jP(_)+"'"}function fz(_,q,f,K){var $=f?"'/' + "+q+(K?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):K?"'[' + "+q+" + ']'":"'[\\'' + "+q+" + '\\']'";return a7(_,$)}function $z(_,q,f){var K=f?$P("/"+vP(q)):$P(PP(q));return a7(_,K)}var Kz=/^\/(?:[^~]|~0|~1)*$/,Pz=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function jz(_,q,f){var K,$,P,j;if(_==="")return"rootData";if(_[0]=="/"){if(!Kz.test(_))throw new Error("Invalid JSON-pointer: "+_);$=_,P="rootData"}else{if(j=_.match(Pz),!j)throw new Error("Invalid JSON-pointer: "+_);if(K=+j[1],$=j[2],$=="#"){if(K>=q)throw new Error("Cannot access property/index "+K+" levels up, current level is "+q);return f[q-K]}if(K>q)throw new Error("Cannot access data "+K+" levels up, current level is "+q);if(P="data"+(q-K||""),!$)return P}var v=P,w=$.split("/");for(var O=0;O<w.length;O++){var T=w[O];if(T)P+=PP(wP(T)),v+=" && "+P}return v}function a7(_,q){if(_=='""')return q;return(_+" + "+q).replace(/([^\\])' \+ '/g,"$1")}function vz(_){return wP(decodeURIComponent(_))}function wz(_){return encodeURIComponent(vP(_))}function vP(_){return _.replace(/~/g,"~0").replace(/\//g,"~1")}function wP(_){return _.replace(/~1/g,"/").replace(/~0/g,"~")}});var OP=p((IC,D7)=>{var Oz=b8();D7.exports=Yz;function Yz(_){Oz.copy(_,this)}});var i7=p((DC,y7)=>{var _8=y7.exports=function(_,q,f){if(typeof q=="function")f=q,q={};f=q.cb||f;var K=typeof f=="function"?f:f.pre||function(){},$=f.post||function(){};P$(q,K,$,_,"",_)};_8.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0};_8.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};_8.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};_8.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 P$(_,q,f,K,$,P,j,v,w,O){if(K&&typeof K=="object"&&!Array.isArray(K)){q(K,$,P,j,v,w,O);for(var T in K){var Y=K[T];if(Array.isArray(Y)){if(T in _8.arrayKeywords)for(var z=0;z<Y.length;z++)P$(_,q,f,Y[z],$+"/"+T+"/"+z,P,$,T,K,z)}else if(T in _8.propsKeywords){if(Y&&typeof Y=="object")for(var H in Y)P$(_,q,f,Y[H],$+"/"+T+"/"+Tz(H),P,$,T,K,H)}else if(T in _8.keywords||_.allKeys&&!(T in _8.skipKeywords))P$(_,q,f,Y,$+"/"+T,P,$,T,K)}f(K,$,P,j,v,w,O)}}function Tz(_){return _.replace(/~/g,"~0").replace(/\//g,"~1")}});var T$=p((yC,t7)=>{var xf=n7(),o7=K$(),O$=b8(),j$=OP(),zz=i7();t7.exports=$8;$8.normalizeId=f8;$8.fullPath=v$;$8.url=w$;$8.ids=kz;$8.inlineRef=YP;$8.schema=Y$;function $8(_,q,f){var K=this._refs[f];if(typeof K=="string")if(this._refs[K])K=this._refs[K];else return $8.call(this,_,q,K);if(K=K||this._schemas[f],K instanceof j$)return YP(K.schema,this._opts.inlineRefs)?K.schema:K.validate||this._compile(K);var $=Y$.call(this,q,f),P,j,v;if($)P=$.schema,q=$.root,v=$.baseId;if(P instanceof j$)j=P.validate||_.call(this,P.schema,q,void 0,v);else if(P!==void 0)j=YP(P,this._opts.inlineRefs)?P:_.call(this,P,q,void 0,v);return j}function Y$(_,q){var f=xf.parse(q),K=L7(f),$=v$(this._getId(_.schema));if(Object.keys(_.schema).length===0||K!==$){var P=f8(K),j=this._refs[P];if(typeof j=="string")return Wz.call(this,_,j,f);else if(j instanceof j$){if(!j.validate)this._compile(j);_=j}else if(j=this._schemas[P],j instanceof j$){if(!j.validate)this._compile(j);if(P==f8(q))return{schema:j,root:_,baseId:$};_=j}else return;if(!_.schema)return;$=v$(this._getId(_.schema))}return c7.call(this,f,$,_.schema,_)}function Wz(_,q,f){var K=Y$.call(this,_,q);if(K){var{schema:$,baseId:P}=K;_=K.root;var j=this._getId($);if(j)P=w$(P,j);return c7.call(this,f,P,$,_)}}var Hz=O$.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function c7(_,q,f,K){if(_.fragment=_.fragment||"",_.fragment.slice(0,1)!="/")return;var $=_.fragment.split("/");for(var P=1;P<$.length;P++){var j=$[P];if(j){if(j=O$.unescapeFragment(j),f=f[j],f===void 0)break;var v;if(!Hz[j]){if(v=this._getId(f),v)q=w$(q,v);if(f.$ref){var w=w$(q,f.$ref),O=Y$.call(this,K,w);if(O)f=O.schema,K=O.root,q=O.baseId}}}}if(f!==void 0&&f!==K.schema)return{schema:f,root:K,baseId:q}}var hz=O$.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function YP(_,q){if(q===!1)return!1;if(q===void 0||q===!0)return TP(_);else if(q)return zP(_)<=q}function TP(_){var q;if(Array.isArray(_)){for(var f=0;f<_.length;f++)if(q=_[f],typeof q=="object"&&!TP(q))return!1}else for(var K in _){if(K=="$ref")return!1;if(q=_[K],typeof q=="object"&&!TP(q))return!1}return!0}function zP(_){var q=0,f;if(Array.isArray(_))for(var K=0;K<_.length;K++){if(f=_[K],typeof f=="object")q+=zP(f);if(q==1/0)return 1/0}else for(var $ in _){if($=="$ref")return 1/0;if(hz[$])q++;else{if(f=_[$],typeof f=="object")q+=zP(f)+1;if(q==1/0)return 1/0}}return q}function v$(_,q){if(q!==!1)_=f8(_);var f=xf.parse(_);return L7(f)}function L7(_){return xf.serialize(_).split("#")[0]+"#"}var Jz=/#\/?$/;function f8(_){return _?_.replace(Jz,""):""}function w$(_,q){return q=f8(q),xf.resolve(_,q)}function kz(_){var q=f8(this._getId(_)),f={"":q},K={"":v$(q,!1)},$={},P=this;return zz(_,{allKeys:!0},function(j,v,w,O,T,Y,z){if(v==="")return;var H=P._getId(j),h=f[O],J=K[O]+"/"+T;if(z!==void 0)J+="/"+(typeof z=="number"?z:O$.escapeFragment(z));if(typeof H=="string"){H=h=f8(h?xf.resolve(h,H):H);var k=P._refs[H];if(typeof k=="string")k=P._refs[k];if(k&&k.schema){if(!o7(j,k.schema))throw new Error('id "'+H+'" resolves to more than one schema')}else if(H!=f8(J))if(H[0]=="#"){if($[H]&&!o7(j,$[H]))throw new Error('id "'+H+'" resolves to more than one schema');$[H]=j}else P._refs[H]=J}f[v]=h,K[v]=J}),$}});var z$=p((iC,x7)=>{var WP=T$();x7.exports={Validation:e7(Zz),MissingRef:e7(HP)};function Zz(_){this.message="validation failed",this.errors=_,this.ajv=this.validation=!0}HP.message=function(_,q){return"can't resolve reference "+q+" from id "+_};function HP(_,q,f){this.message=f||HP.message(_,q),this.missingRef=WP.url(_,q),this.missingSchema=WP.normalizeId(WP.fullPath(this.missingRef))}function e7(_){return _.prototype=Object.create(Error.prototype),_.prototype.constructor=_,_}});var hP=p((oC,s7)=>{s7.exports=function(_,q){if(!q)q={};if(typeof q==="function")q={cmp:q};var f=typeof q.cycles==="boolean"?q.cycles:!1,K=q.cmp&&function(P){return function(j){return function(v,w){var O={key:v,value:j[v]},T={key:w,value:j[w]};return P(O,T)}}}(q.cmp),$=[];return function P(j){if(j&&j.toJSON&&typeof j.toJSON==="function")j=j.toJSON();if(j===void 0)return;if(typeof j=="number")return isFinite(j)?""+j:"null";if(typeof j!=="object")return JSON.stringify(j);var v,w;if(Array.isArray(j)){w="[";for(v=0;v<j.length;v++){if(v)w+=",";w+=P(j[v])||"null"}return w+"]"}if(j===null)return"null";if($.indexOf(j)!==-1){if(f)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var O=$.push(j)-1,T=Object.keys(j).sort(K&&K(j));w="";for(v=0;v<T.length;v++){var Y=T[v],z=P(j[Y]);if(!z)continue;if(w)w+=",";w+=JSON.stringify(Y)+":"+z}return $.splice(O,1),"{"+w+"}"}(_)}});var JP=p((cC,B7)=>{B7.exports=function _(q,f,K){var $="",P=q.schema.$async===!0,j=q.util.schemaHasRulesExcept(q.schema,q.RULES.all,"$ref"),v=q.self._getId(q.schema);if(q.opts.strictKeywords){var w=q.util.schemaUnknownRules(q.schema,q.RULES.keywords);if(w){var O="unknown keyword: "+w;if(q.opts.strictKeywords==="log")q.logger.warn(O);else throw new Error(O)}}if(q.isTop){if($+=" var validate = ",P)q.async=!0,$+="async ";if($+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",v&&(q.opts.sourceCode||q.opts.processCode))$+=" "+("/*# sourceURL="+v+" */")+" "}if(typeof q.schema=="boolean"||!(j||q.schema.$ref)){var f="false schema",T=q.level,Y=q.dataLevel,z=q.schema[f],H=q.schemaPath+q.util.getProperty(f),h=q.errSchemaPath+"/"+f,R=!q.opts.allErrors,M,J="data"+(Y||""),n="valid"+T;if(q.schema===!1){if(q.isTop)R=!0;else $+=" var "+n+" = false; ";var k=k||[];if(k.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(M||"false schema")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(h)+" , params: {} ",q.opts.messages!==!1)$+=" , message: 'boolean schema is false' ";if(q.opts.verbose)$+=" , schema: false , parentSchema: validate.schema"+q.schemaPath+" , data: "+J+" ";$+=" } "}else $+=" {} ";var X=$;if($=k.pop(),!q.compositeRule&&R)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else if(q.isTop)if(P)$+=" return data; ";else $+=" validate.errors = null; return true; ";else $+=" var "+n+" = true; ";if(q.isTop)$+=" }; return validate; ";return $}if(q.isTop){var l=q.isTop,T=q.level=0,Y=q.dataLevel=0,J="data";if(q.rootId=q.resolve.fullPath(q.self._getId(q.root.schema)),q.baseId=q.baseId||q.rootId,delete q.isTop,q.dataPathArr=[""],q.schema.default!==void 0&&q.opts.useDefaults&&q.opts.strictDefaults){var N="default is ignored in the schema root";if(q.opts.strictDefaults==="log")q.logger.warn(N);else throw new Error(N)}$+=" var vErrors = null; ",$+=" var errors = 0; ",$+=" if (rootData === undefined) rootData = data; "}else{var{level:T,dataLevel:Y}=q,J="data"+(Y||"");if(v)q.baseId=q.resolve.url(q.baseId,v);if(P&&!q.async)throw new Error("async schema in sync schema");$+=" var errs_"+T+" = errors;"}var n="valid"+T,R=!q.opts.allErrors,g="",V="",M,C=q.schema.type,a=Array.isArray(C);if(C&&q.opts.nullable&&q.schema.nullable===!0){if(a){if(C.indexOf("null")==-1)C=C.concat("null")}else if(C!="null")C=[C,"null"],a=!0}if(a&&C.length==1)C=C[0],a=!1;if(q.schema.$ref&&j){if(q.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+q.errSchemaPath+'" (see option extendRefs)');else if(q.opts.extendRefs!==!0)j=!1,q.logger.warn('$ref: keywords ignored in schema at path "'+q.errSchemaPath+'"')}if(q.schema.$comment&&q.opts.$comment)$+=" "+q.RULES.all.$comment.code(q,"$comment");if(C){if(q.opts.coerceTypes)var r=q.util.coerceToTypes(q.opts.coerceTypes,C);var A=q.RULES.types[C];if(r||a||A===!0||A&&!dq(A)){var H=q.schemaPath+".type",h=q.errSchemaPath+"/type",H=q.schemaPath+".type",h=q.errSchemaPath+"/type",u=a?"checkDataTypes":"checkDataType";if($+=" if ("+q.util[u](C,J,q.opts.strictNumbers,!0)+") { ",r){var m="dataType"+T,S="coerced"+T;if($+=" var "+m+" = typeof "+J+"; var "+S+" = undefined; ",q.opts.coerceTypes=="array")$+=" if ("+m+" == 'object' && Array.isArray("+J+") && "+J+".length == 1) { "+J+" = "+J+"[0]; "+m+" = typeof "+J+"; if ("+q.util.checkDataType(q.schema.type,J,q.opts.strictNumbers)+") "+S+" = "+J+"; } ";$+=" if ("+S+" !== undefined) ; ";var I=r;if(I){var D,c=-1,e=I.length-1;while(c<e)if(D=I[c+=1],D=="string")$+=" else if ("+m+" == 'number' || "+m+" == 'boolean') "+S+" = '' + "+J+"; else if ("+J+" === null) "+S+" = ''; ";else if(D=="number"||D=="integer"){if($+=" else if ("+m+" == 'boolean' || "+J+" === null || ("+m+" == 'string' && "+J+" && "+J+" == +"+J+" ",D=="integer")$+=" && !("+J+" % 1)";$+=")) "+S+" = +"+J+"; "}else if(D=="boolean")$+=" else if ("+J+" === 'false' || "+J+" === 0 || "+J+" === null) "+S+" = false; else if ("+J+" === 'true' || "+J+" === 1) "+S+" = true; ";else if(D=="null")$+=" else if ("+J+" === '' || "+J+" === 0 || "+J+" === false) "+S+" = null; ";else if(q.opts.coerceTypes=="array"&&D=="array")$+=" else if ("+m+" == 'string' || "+m+" == 'number' || "+m+" == 'boolean' || "+J+" == null) "+S+" = ["+J+"]; "}$+=" else { ";var k=k||[];if(k.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(M||"type")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(h)+" , params: { type: '",a)$+=""+C.join(",");else $+=""+C;if($+="' } ",q.opts.messages!==!1){if($+=" , message: 'should be ",a)$+=""+C.join(",");else $+=""+C;$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+H+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+J+" ";$+=" } "}else $+=" {} ";var X=$;if($=k.pop(),!q.compositeRule&&R)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";$+=" } if ("+S+" !== undefined) { ";var L=Y?"data"+(Y-1||""):"parentData",Q=Y?q.dataPathArr[Y]:"parentDataProperty";if($+=" "+J+" = "+S+"; ",!Y)$+="if ("+L+" !== undefined)";$+=" "+L+"["+Q+"] = "+S+"; } "}else{var k=k||[];if(k.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(M||"type")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(h)+" , params: { type: '",a)$+=""+C.join(",");else $+=""+C;if($+="' } ",q.opts.messages!==!1){if($+=" , message: 'should be ",a)$+=""+C.join(",");else $+=""+C;$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+H+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+J+" ";$+=" } "}else $+=" {} ";var X=$;if($=k.pop(),!q.compositeRule&&R)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}$+=" } "}}if(q.schema.$ref&&!j){if($+=" "+q.RULES.all.$ref.code(q,"$ref")+" ",R){if($+=" } if (errors === ",l)$+="0";else $+="errs_"+T;$+=") { ",V+="}"}}else{var Hq=q.RULES;if(Hq){var A,Pq=-1,_q=Hq.length-1;while(Pq<_q)if(A=Hq[Pq+=1],dq(A)){if(A.type)$+=" if ("+q.util.checkDataType(A.type,J,q.opts.strictNumbers)+") { ";if(q.opts.useDefaults){if(A.type=="object"&&q.schema.properties){var z=q.schema.properties,kq=Object.keys(z),gq=kq;if(gq){var iq,x_=-1,n_=gq.length-1;while(x_<n_){iq=gq[x_+=1];var Nq=z[iq];if(Nq.default!==void 0){var Vq=J+q.util.getProperty(iq);if(q.compositeRule){if(q.opts.strictDefaults){var N="default is ignored for: "+Vq;if(q.opts.strictDefaults==="log")q.logger.warn(N);else throw new Error(N)}}else{if($+=" if ("+Vq+" === undefined ",q.opts.useDefaults=="empty")$+=" || "+Vq+" === null || "+Vq+" === '' ";if($+=" ) "+Vq+" = ",q.opts.useDefaults=="shared")$+=" "+q.useDefault(Nq.default)+" ";else $+=" "+JSON.stringify(Nq.default)+" ";$+="; "}}}}}else if(A.type=="array"&&Array.isArray(q.schema.items)){var H8=q.schema.items;if(H8){var Nq,c=-1,Dq=H8.length-1;while(c<Dq)if(Nq=H8[c+=1],Nq.default!==void 0){var Vq=J+"["+c+"]";if(q.compositeRule){if(q.opts.strictDefaults){var N="default is ignored for: "+Vq;if(q.opts.strictDefaults==="log")q.logger.warn(N);else throw new Error(N)}}else{if($+=" if ("+Vq+" === undefined ",q.opts.useDefaults=="empty")$+=" || "+Vq+" === null || "+Vq+" === '' ";if($+=" ) "+Vq+" = ",q.opts.useDefaults=="shared")$+=" "+q.useDefault(Nq.default)+" ";else $+=" "+JSON.stringify(Nq.default)+" ";$+="; "}}}}}var zq=A.rules;if(zq){var s_,R_=-1,h8=zq.length-1;while(R_<h8)if(s_=zq[R_+=1],__(s_)){var J8=s_.code(q,s_.keyword,A.type);if(J8){if($+=" "+J8+" ",R)g+="}"}}}if(R)$+=" "+g+" ",g="";if(A.type){if($+=" } ",C&&C===A.type&&!r){$+=" else { ";var H=q.schemaPath+".type",h=q.errSchemaPath+"/type",k=k||[];if(k.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(M||"type")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(h)+" , params: { type: '",a)$+=""+C.join(",");else $+=""+C;if($+="' } ",q.opts.messages!==!1){if($+=" , message: 'should be ",a)$+=""+C.join(",");else $+=""+C;$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+H+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+J+" ";$+=" } "}else $+=" {} ";var X=$;if($=k.pop(),!q.compositeRule&&R)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";$+=" } "}}if(R){if($+=" if (errors === ",l)$+="0";else $+="errs_"+T;$+=") { ",V+="}"}}}}if(R)$+=" "+V+" ";if(l){if(P)$+=" if (errors === 0) return data; ",$+=" else throw new ValidationError(vErrors); ";else $+=" validate.errors = vErrors; ",$+=" return errors === 0; ";$+=" }; return validate;"}else $+=" var "+n+" = errors === errs_"+T+";";function dq(oq){var G_=oq.rules;for(var Uq=0;Uq<G_.length;Uq++)if(__(G_[Uq]))return!0}function __(oq){return q.schema[oq.keyword]!==void 0||oq.implements&&tq(oq)}function tq(oq){var G_=oq.implements;for(var Uq=0;Uq<G_.length;Uq++)if(q.schema[G_[Uq]]!==void 0)return!0}return $}});var _j=p((LC,qj)=>{var W$=T$(),h$=b8(),F7=z$(),Xz=hP(),U7=JP(),Az=h$.ucs2length,uz=K$(),Gz=F7.Validation;qj.exports=kP;function kP(_,q,f,K){var $=this,P=this._opts,j=[void 0],v={},w=[],O={},T=[],Y={},z=[];q=q||{schema:_,refVal:j,refs:v};var H=mz.call(this,_,q,K),h=this._compilations[H.index];if(H.compiling)return h.callValidate=N;var J=this._formats,k=this.RULES;try{var X=n(_,q,f,K);h.validate=X;var l=h.callValidate;if(l){if(l.schema=X.schema,l.errors=null,l.refs=X.refs,l.refVal=X.refVal,l.root=X.root,l.$async=X.$async,P.sourceCode)l.source=X.source}return X}finally{rz.call(this,_,q,K)}function N(){var u=h.validate,m=u.apply(this,arguments);return N.errors=u.errors,m}function n(u,m,S,I){var D=!m||m&&m.schema==u;if(m.schema!=q.schema)return kP.call($,u,m,S,I);var c=u.$async===!0,e=U7({isTop:!0,schema:u,isRoot:D,baseId:I,root:m,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:F7.MissingRef,RULES:k,validate:U7,util:h$,resolve:W$,resolveRef:R,usePattern:a,useDefault:r,useCustomRule:A,opts:P,formats:J,logger:$.logger,self:$});if(e=H$(j,Mz)+H$(w,bz)+H$(T,Vz)+H$(z,Sz)+e,P.processCode)e=P.processCode(e,u);var L;try{var Q=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",e);L=Q($,k,J,q,j,T,z,uz,Az,Gz),j[0]=L}catch(Hq){throw $.logger.error("Error compiling schema, function code:",e),Hq}if(L.schema=u,L.errors=null,L.refs=v,L.refVal=j,L.root=D?L:m,c)L.$async=!0;if(P.sourceCode===!0)L.source={code:e,patterns:w,defaults:T};return L}function R(u,m,S){m=W$.url(u,m);var I=v[m],D,c;if(I!==void 0)return D=j[I],c="refVal["+I+"]",C(D,c);if(!S&&q.refs){var e=q.refs[m];if(e!==void 0)return D=q.refVal[e],c=g(m,D),C(D,c)}c=g(m);var L=W$.call($,n,q,m);if(L===void 0){var Q=f&&f[m];if(Q)L=W$.inlineRef(Q,P.inlineRefs)?Q:kP.call($,Q,q,f,u)}if(L===void 0)V(m);else return M(m,L),C(L,c)}function g(u,m){var S=j.length;return j[S]=m,v[u]=S,"refVal"+S}function V(u){delete v[u]}function M(u,m){var S=v[u];j[S]=m}function C(u,m){return typeof u=="object"||typeof u=="boolean"?{code:m,schema:u,inline:!0}:{code:m,$async:u&&!!u.$async}}function a(u){var m=O[u];if(m===void 0)m=O[u]=w.length,w[m]=u;return"pattern"+m}function r(u){switch(typeof u){case"boolean":case"number":return""+u;case"string":return h$.toQuotedString(u);case"object":if(u===null)return"null";var m=Xz(u),S=Y[m];if(S===void 0)S=Y[m]=T.length,T[S]=u;return"default"+S}}function A(u,m,S,I){if($._opts.validateSchema!==!1){var D=u.definition.dependencies;if(D&&!D.every(function(gq){return Object.prototype.hasOwnProperty.call(S,gq)}))throw new Error("parent schema must have all required keywords: "+D.join(","));var c=u.definition.validateSchema;if(c){var e=c(m);if(!e){var L="keyword schema is invalid: "+$.errorsText(c.errors);if($._opts.validateSchema=="log")$.logger.error(L);else throw new Error(L)}}}var Q=u.definition.compile,Hq=u.definition.inline,Pq=u.definition.macro,_q;if(Q)_q=Q.call($,m,S,I);else if(Pq){if(_q=Pq.call($,m,S,I),P.validateSchema!==!1)$.validateSchema(_q,!0)}else if(Hq)_q=Hq.call($,I,u.keyword,m,S);else if(_q=u.definition.validate,!_q)return;if(_q===void 0)throw new Error('custom keyword "'+u.keyword+'"failed to compile');var kq=z.length;return z[kq]=_q,{code:"customRule"+kq,validate:_q}}}function mz(_,q,f){var K=Q7.call(this,_,q,f);if(K>=0)return{index:K,compiling:!0};return K=this._compilations.length,this._compilations[K]={schema:_,root:q,baseId:f},{index:K,compiling:!1}}function rz(_,q,f){var K=Q7.call(this,_,q,f);if(K>=0)this._compilations.splice(K,1)}function Q7(_,q,f){for(var K=0;K<this._compilations.length;K++){var $=this._compilations[K];if($.schema==_&&$.root==q&&$.baseId==f)return K}return-1}function bz(_,q){return"var pattern"+_+" = new RegExp("+h$.toQuotedString(q[_])+");"}function Vz(_){return"var default"+_+" = defaults["+_+"];"}function Mz(_,q){return q[_]===void 0?"":"var refVal"+_+" = refVal["+_+"];"}function Sz(_){return"var customRule"+_+" = customRules["+_+"];"}function H$(_,q){if(!_.length)return"";var f="";for(var K=0;K<_.length;K++)f+=q(K,_);return f}});var $j=p((tC,fj)=>{var J$=fj.exports=function _(){this._cache={}};J$.prototype.put=function _(q,f){this._cache[q]=f};J$.prototype.get=function _(q){return this._cache[q]};J$.prototype.del=function _(q){delete this._cache[q]};J$.prototype.clear=function _(){this._cache={}}});var hj=p((eC,Hj)=>{var Nz=b8(),Cz=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,pz=[0,31,28,31,30,31,30,31,31,30,31,30,31],lz=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,Kj=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,nz=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Rz=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Pj=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,jj=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,vj=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,wj=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Oj=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Yj=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;Hj.exports=k$;function k$(_){return _=_=="full"?"full":"fast",Nz.copy(k$[_])}k$.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":Pj,url:jj,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:Kj,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Wj,uuid:vj,"json-pointer":wj,"json-pointer-uri-fragment":Oj,"relative-json-pointer":Yj};k$.full={date:Tj,time:zj,"date-time":dz,uri:Iz,"uri-reference":Rz,"uri-template":Pj,url:jj,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:Kj,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Wj,uuid:vj,"json-pointer":wj,"json-pointer-uri-fragment":Oj,"relative-json-pointer":Yj};function Ez(_){return _%4===0&&(_%100!==0||_%400===0)}function Tj(_){var q=_.match(Cz);if(!q)return!1;var f=+q[1],K=+q[2],$=+q[3];return K>=1&&K<=12&&$>=1&&$<=(K==2&&Ez(f)?29:pz[K])}function zj(_,q){var f=_.match(lz);if(!f)return!1;var K=f[1],$=f[2],P=f[3],j=f[5];return(K<=23&&$<=59&&P<=59||K==23&&$==59&&P==60)&&(!q||j)}var gz=/t|\s/i;function dz(_){var q=_.split(gz);return q.length==2&&Tj(q[0])&&zj(q[1],!0)}var az=/\/|:/;function Iz(_){return az.test(_)&&nz.test(_)}var Dz=/[^\\]\\Z/;function Wj(_){if(Dz.test(_))return!1;try{return new RegExp(_),!0}catch(q){return!1}}});var kj=p((xC,Jj)=>{Jj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.errSchemaPath+"/"+f,O=!q.opts.allErrors,T="data"+(j||""),Y="valid"+P,z,H;if(v=="#"||v=="#/")if(q.isRoot)z=q.async,H="validate";else z=q.root.schema.$async===!0,H="root.refVal[0]";else{var h=q.resolveRef(q.baseId,v,q.isRoot);if(h===void 0){var J=q.MissingRefError.message(q.baseId,v);if(q.opts.missingRefs=="fail"){q.logger.error(J);var k=k||[];if(k.push($),$="",q.createErrors!==!1){if($+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(w)+" , params: { ref: '"+q.util.escapeQuotes(v)+"' } ",q.opts.messages!==!1)$+=" , message: 'can\\'t resolve reference "+q.util.escapeQuotes(v)+"' ";if(q.opts.verbose)$+=" , schema: "+q.util.toQuotedString(v)+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+T+" ";$+=" } "}else $+=" {} ";var X=$;if($=k.pop(),!q.compositeRule&&O)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(O)$+=" if (false) { "}else if(q.opts.missingRefs=="ignore"){if(q.logger.warn(J),O)$+=" if (true) { "}else throw new q.MissingRefError(q.baseId,v,J)}else if(h.inline){var l=q.util.copy(q);l.level++;var N="valid"+l.level;l.schema=h.schema,l.schemaPath="",l.errSchemaPath=v;var n=q.validate(l).replace(/validate\.schema/g,h.code);if($+=" "+n+" ",O)$+=" if ("+N+") { "}else z=h.$async===!0||q.async&&h.$async!==!1,H=h.code}if(H){var k=k||[];if(k.push($),$="",q.opts.passContext)$+=" "+H+".call(this, ";else $+=" "+H+"( ";if($+=" "+T+", (dataPath || '')",q.errorPath!='""')$+=" + "+q.errorPath;var R=j?"data"+(j-1||""):"parentData",g=j?q.dataPathArr[j]:"parentDataProperty";$+=" , "+R+" , "+g+", rootData) ";var V=$;if($=k.pop(),z){if(!q.async)throw new Error("async schema referenced by sync schema");if(O)$+=" var "+Y+"; ";if($+=" try { await "+V+"; ",O)$+=" "+Y+" = true; ";if($+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",O)$+=" "+Y+" = false; ";if($+=" } ",O)$+=" if ("+Y+") { "}else if($+=" if (!"+V+") { if (vErrors === null) vErrors = "+H+".errors; else vErrors = vErrors.concat("+H+".errors); errors = vErrors.length; } ",O)$+=" else { "}return $}});var Xj=p((sC,Zj)=>{Zj.exports=function _(q,f,K){var $=" ",P=q.schema[f],j=q.schemaPath+q.util.getProperty(f),v=q.errSchemaPath+"/"+f,w=!q.opts.allErrors,O=q.util.copy(q),T="";O.level++;var Y="valid"+O.level,z=O.baseId,H=!0,h=P;if(h){var J,k=-1,X=h.length-1;while(k<X)if(J=h[k+=1],q.opts.strictKeywords?typeof J=="object"&&Object.keys(J).length>0||J===!1:q.util.schemaHasRules(J,q.RULES.all)){if(H=!1,O.schema=J,O.schemaPath=j+"["+k+"]",O.errSchemaPath=v+"/"+k,$+=" "+q.validate(O)+" ",O.baseId=z,w)$+=" if ("+Y+") { ",T+="}"}}if(w)if(H)$+=" if (true) { ";else $+=" "+T.slice(0,-1)+" ";return $}});var uj=p((BC,Aj)=>{Aj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H="errs__"+P,h=q.util.copy(q),J="";h.level++;var k="valid"+h.level,X=v.every(function(M){return q.opts.strictKeywords?typeof M=="object"&&Object.keys(M).length>0||M===!1:q.util.schemaHasRules(M,q.RULES.all)});if(X){var l=h.baseId;$+=" var "+H+" = errors; var "+z+" = false; ";var N=q.compositeRule;q.compositeRule=h.compositeRule=!0;var n=v;if(n){var R,g=-1,V=n.length-1;while(g<V)R=n[g+=1],h.schema=R,h.schemaPath=w+"["+g+"]",h.errSchemaPath=O+"/"+g,$+=" "+q.validate(h)+" ",h.baseId=l,$+=" "+z+" = "+z+" || "+k+"; if (!"+z+") { ",J+="}"}if(q.compositeRule=h.compositeRule=N,$+=" "+J+" if (!"+z+") { var err = ",q.createErrors!==!1){if($+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: {} ",q.opts.messages!==!1)$+=" , message: 'should match some schema in anyOf' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";if($+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(vErrors); ";else $+=" validate.errors = vErrors; return false; ";if($+=" } else { errors = "+H+"; if (vErrors !== null) { if ("+H+") vErrors.length = "+H+"; else vErrors = null; } ",q.opts.allErrors)$+=" } "}else if(T)$+=" if (true) { ";return $}});var mj=p((UC,Gj)=>{Gj.exports=function _(q,f,K){var $=" ",P=q.schema[f],j=q.errSchemaPath+"/"+f,v=!q.opts.allErrors,w=q.util.toQuotedString(P);if(q.opts.$comment===!0)$+=" console.log("+w+");";else if(typeof q.opts.$comment=="function")$+=" self._opts.$comment("+w+", "+q.util.toQuotedString(j)+", validate.root.schema);";return $}});var bj=p((FC,rj)=>{rj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H=q.opts.$data&&v&&v.$data,h;if(H)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",h="schema"+P;else h=v;if(!H)$+=" var schema"+P+" = validate.schema"+w+";";$+="var "+z+" = equal("+Y+", schema"+P+"); if (!"+z+") { ";var J=J||[];if(J.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'const' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { allowedValue: schema"+P+" } ",q.opts.messages!==!1)$+=" , message: 'should be equal to constant' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var k=$;if($=J.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+k+"]); ";else $+=" validate.errors = ["+k+"]; return false; ";else $+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" }",T)$+=" else { ";return $}});var Mj=p((QC,Vj)=>{Vj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H="errs__"+P,h=q.util.copy(q),J="";h.level++;var k="valid"+h.level,X="i"+P,l=h.dataLevel=q.dataLevel+1,N="data"+l,n=q.baseId,R=q.opts.strictKeywords?typeof v=="object"&&Object.keys(v).length>0||v===!1:q.util.schemaHasRules(v,q.RULES.all);if($+="var "+H+" = errors;var "+z+";",R){var g=q.compositeRule;q.compositeRule=h.compositeRule=!0,h.schema=v,h.schemaPath=w,h.errSchemaPath=O,$+=" var "+k+" = false; for (var "+X+" = 0; "+X+" < "+Y+".length; "+X+"++) { ",h.errorPath=q.util.getPathExpr(q.errorPath,X,q.opts.jsonPointers,!0);var V=Y+"["+X+"]";h.dataPathArr[l]=X;var M=q.validate(h);if(h.baseId=n,q.util.varOccurences(M,N)<2)$+=" "+q.util.varReplace(M,N,V)+" ";else $+=" var "+N+" = "+V+"; "+M+" ";$+=" if ("+k+") break; } ",q.compositeRule=h.compositeRule=g,$+=" "+J+" if (!"+k+") {"}else $+=" if ("+Y+".length == 0) {";var C=C||[];if(C.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: {} ",q.opts.messages!==!1)$+=" , message: 'should contain a valid item' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var a=$;if($=C.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+a+"]); ";else $+=" validate.errors = ["+a+"]; return false; ";else $+=" var err = "+a+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" } else { ",R)$+=" errors = "+H+"; if (vErrors !== null) { if ("+H+") vErrors.length = "+H+"; else vErrors = null; } ";if(q.opts.allErrors)$+=" } ";return $}});var Nj=p((qp,Sj)=>{Sj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="errs__"+P,H=q.util.copy(q),h="";H.level++;var J="valid"+H.level,k={},X={},l=q.opts.ownProperties;for(g in v){if(g=="__proto__")continue;var N=v[g],n=Array.isArray(N)?X:k;n[g]=N}$+="var "+z+" = errors;";var R=q.errorPath;$+="var missing"+P+";";for(var g in X)if(n=X[g],n.length){if($+=" if ( "+Y+q.util.getProperty(g)+" !== undefined ",l)$+=" && Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(g)+"') ";if(T){$+=" && ( ";var V=n;if(V){var M,C=-1,a=V.length-1;while(C<a){if(M=V[C+=1],C)$+=" || ";var r=q.util.getProperty(M),A=Y+r;if($+=" ( ( "+A+" === undefined ",l)$+=" || ! Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(M)+"') ";$+=") && (missing"+P+" = "+q.util.toQuotedString(q.opts.jsonPointers?M:r)+") ) "}}$+=")) { ";var u="missing"+P,m="' + "+u+" + '";if(q.opts._errorDataPathProperty)q.errorPath=q.opts.jsonPointers?q.util.getPathExpr(R,u,!0):R+" + "+u;var S=S||[];if(S.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { property: '"+q.util.escapeQuotes(g)+"', missingProperty: '"+m+"', depsCount: "+n.length+", deps: '"+q.util.escapeQuotes(n.length==1?n[0]:n.join(", "))+"' } ",q.opts.messages!==!1){if($+=" , message: 'should have ",n.length==1)$+="property "+q.util.escapeQuotes(n[0]);else $+="properties "+q.util.escapeQuotes(n.join(", "));$+=" when property "+q.util.escapeQuotes(g)+" is present' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var I=$;if($=S.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+I+"]); ";else $+=" validate.errors = ["+I+"]; return false; ";else $+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{$+=" ) { ";var D=n;if(D){var M,c=-1,e=D.length-1;while(c<e){M=D[c+=1];var r=q.util.getProperty(M),m=q.util.escapeQuotes(M),A=Y+r;if(q.opts._errorDataPathProperty)q.errorPath=q.util.getPath(R,M,q.opts.jsonPointers);if($+=" if ( "+A+" === undefined ",l)$+=" || ! Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(M)+"') ";if($+=") { var err = ",q.createErrors!==!1){if($+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { property: '"+q.util.escapeQuotes(g)+"', missingProperty: '"+m+"', depsCount: "+n.length+", deps: '"+q.util.escapeQuotes(n.length==1?n[0]:n.join(", "))+"' } ",q.opts.messages!==!1){if($+=" , message: 'should have ",n.length==1)$+="property "+q.util.escapeQuotes(n[0]);else $+="properties "+q.util.escapeQuotes(n.join(", "));$+=" when property "+q.util.escapeQuotes(g)+" is present' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";$+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}}if($+=" } ",T)h+="}",$+=" else { "}q.errorPath=R;var L=H.baseId;for(var g in k){var N=k[g];if(q.opts.strictKeywords?typeof N=="object"&&Object.keys(N).length>0||N===!1:q.util.schemaHasRules(N,q.RULES.all)){if($+=" "+J+" = true; if ( "+Y+q.util.getProperty(g)+" !== undefined ",l)$+=" && Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(g)+"') ";if($+=") { ",H.schema=N,H.schemaPath=w+q.util.getProperty(g),H.errSchemaPath=O+"/"+q.util.escapeFragment(g),$+=" "+q.validate(H)+" ",H.baseId=L,$+=" } ",T)$+=" if ("+J+") { ",h+="}"}}if(T)$+=" "+h+" if ("+z+" == errors) {";return $}});var pj=p((_p,Cj)=>{Cj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H=q.opts.$data&&v&&v.$data,h;if(H)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",h="schema"+P;else h=v;var J="i"+P,k="schema"+P;if(!H)$+=" var "+k+" = validate.schema"+w+";";if($+="var "+z+";",H)$+=" if (schema"+P+" === undefined) "+z+" = true; else if (!Array.isArray(schema"+P+")) "+z+" = false; else {";if($+=""+z+" = false;for (var "+J+"=0; "+J+"<"+k+".length; "+J+"++) if (equal("+Y+", "+k+"["+J+"])) { "+z+" = true; break; }",H)$+=" } ";$+=" if (!"+z+") { ";var X=X||[];if(X.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { allowedValues: schema"+P+" } ",q.opts.messages!==!1)$+=" , message: 'should be equal to one of the allowed values' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var l=$;if($=X.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+l+"]); ";else $+=" validate.errors = ["+l+"]; return false; ";else $+=" var err = "+l+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" }",T)$+=" else { ";return $}});var nj=p((fp,lj)=>{lj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||"");if(q.opts.format===!1){if(T)$+=" if (true) { ";return $}var z=q.opts.$data&&v&&v.$data,H;if(z)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",H="schema"+P;else H=v;var h=q.opts.unknownFormats,J=Array.isArray(h);if(z){var k="format"+P,X="isObject"+P,l="formatType"+P;if($+=" var "+k+" = formats["+H+"]; var "+X+" = typeof "+k+" == 'object' && !("+k+" instanceof RegExp) && "+k+".validate; var "+l+" = "+X+" && "+k+".type || 'string'; if ("+X+") { ",q.async)$+=" var async"+P+" = "+k+".async; ";if($+=" "+k+" = "+k+".validate; } if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'string') || ";if($+=" (",h!="ignore"){if($+=" ("+H+" && !"+k+" ",J)$+=" && self._opts.unknownFormats.indexOf("+H+") == -1 ";$+=") || "}if($+=" ("+k+" && "+l+" == '"+K+"' && !(typeof "+k+" == 'function' ? ",q.async)$+=" (async"+P+" ? await "+k+"("+Y+") : "+k+"("+Y+")) ";else $+=" "+k+"("+Y+") ";$+=" : "+k+".test("+Y+"))))) {"}else{var k=q.formats[v];if(!k)if(h=="ignore"){if(q.logger.warn('unknown format "'+v+'" ignored in schema at path "'+q.errSchemaPath+'"'),T)$+=" if (true) { ";return $}else if(J&&h.indexOf(v)>=0){if(T)$+=" if (true) { ";return $}else throw new Error('unknown format "'+v+'" is used in schema at path "'+q.errSchemaPath+'"');var X=typeof k=="object"&&!(k instanceof RegExp)&&k.validate,l=X&&k.type||"string";if(X){var N=k.async===!0;k=k.validate}if(l!=K){if(T)$+=" if (true) { ";return $}if(N){if(!q.async)throw new Error("async format in sync schema");var n="formats"+q.util.getProperty(v)+".validate";$+=" if (!(await "+n+"("+Y+"))) { "}else{$+=" if (! ";var n="formats"+q.util.getProperty(v);if(X)n+=".validate";if(typeof k=="function")$+=" "+n+"("+Y+") ";else $+=" "+n+".test("+Y+") ";$+=") { "}}var R=R||[];if(R.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'format' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { format: ",z)$+=""+H;else $+=""+q.util.toQuotedString(v);if($+=" } ",q.opts.messages!==!1){if($+=` , message: 'should match format "`,z)$+="' + "+H+" + '";else $+=""+q.util.escapeQuotes(v);$+=`"' `}if(q.opts.verbose){if($+=" , schema: ",z)$+="validate.schema"+w;else $+=""+q.util.toQuotedString(v);$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var g=$;if($=R.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+g+"]); ";else $+=" validate.errors = ["+g+"]; return false; ";else $+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" } ",T)$+=" else { ";return $}});var Ej=p(($p,Rj)=>{Rj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H="errs__"+P,h=q.util.copy(q);h.level++;var J="valid"+h.level,k=q.schema.then,X=q.schema.else,l=k!==void 0&&(q.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:q.util.schemaHasRules(k,q.RULES.all)),N=X!==void 0&&(q.opts.strictKeywords?typeof X=="object"&&Object.keys(X).length>0||X===!1:q.util.schemaHasRules(X,q.RULES.all)),n=h.baseId;if(l||N){var R;h.createErrors=!1,h.schema=v,h.schemaPath=w,h.errSchemaPath=O,$+=" var "+H+" = errors; var "+z+" = true; ";var g=q.compositeRule;if(q.compositeRule=h.compositeRule=!0,$+=" "+q.validate(h)+" ",h.baseId=n,h.createErrors=!0,$+=" errors = "+H+"; if (vErrors !== null) { if ("+H+") vErrors.length = "+H+"; else vErrors = null; } ",q.compositeRule=h.compositeRule=g,l){if($+=" if ("+J+") { ",h.schema=q.schema.then,h.schemaPath=q.schemaPath+".then",h.errSchemaPath=q.errSchemaPath+"/then",$+=" "+q.validate(h)+" ",h.baseId=n,$+=" "+z+" = "+J+"; ",l&&N)R="ifClause"+P,$+=" var "+R+" = 'then'; ";else R="'then'";if($+=" } ",N)$+=" else { "}else $+=" if (!"+J+") { ";if(N){if(h.schema=q.schema.else,h.schemaPath=q.schemaPath+".else",h.errSchemaPath=q.errSchemaPath+"/else",$+=" "+q.validate(h)+" ",h.baseId=n,$+=" "+z+" = "+J+"; ",l&&N)R="ifClause"+P,$+=" var "+R+" = 'else'; ";else R="'else'";$+=" } "}if($+=" if (!"+z+") { var err = ",q.createErrors!==!1){if($+=" { keyword: 'if' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { failingKeyword: "+R+" } ",q.opts.messages!==!1)$+=` , message: 'should match "' + `+R+` + '" schema' `;if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";if($+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(vErrors); ";else $+=" validate.errors = vErrors; return false; ";if($+=" } ",T)$+=" else { "}else if(T)$+=" if (true) { ";return $}});var dj=p((Kp,gj)=>{gj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H="errs__"+P,h=q.util.copy(q),J="";h.level++;var k="valid"+h.level,X="i"+P,l=h.dataLevel=q.dataLevel+1,N="data"+l,n=q.baseId;if($+="var "+H+" = errors;var "+z+";",Array.isArray(v)){var R=q.schema.additionalItems;if(R===!1){$+=" "+z+" = "+Y+".length <= "+v.length+"; ";var g=O;O=q.errSchemaPath+"/additionalItems",$+=" if (!"+z+") { ";var V=V||[];if(V.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { limit: "+v.length+" } ",q.opts.messages!==!1)$+=" , message: 'should NOT have more than "+v.length+" items' ";if(q.opts.verbose)$+=" , schema: false , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var M=$;if($=V.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+M+"]); ";else $+=" validate.errors = ["+M+"]; return false; ";else $+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" } ",O=g,T)J+="}",$+=" else { "}var C=v;if(C){var a,r=-1,A=C.length-1;while(r<A)if(a=C[r+=1],q.opts.strictKeywords?typeof a=="object"&&Object.keys(a).length>0||a===!1:q.util.schemaHasRules(a,q.RULES.all)){$+=" "+k+" = true; if ("+Y+".length > "+r+") { ";var u=Y+"["+r+"]";h.schema=a,h.schemaPath=w+"["+r+"]",h.errSchemaPath=O+"/"+r,h.errorPath=q.util.getPathExpr(q.errorPath,r,q.opts.jsonPointers,!0),h.dataPathArr[l]=r;var m=q.validate(h);if(h.baseId=n,q.util.varOccurences(m,N)<2)$+=" "+q.util.varReplace(m,N,u)+" ";else $+=" var "+N+" = "+u+"; "+m+" ";if($+=" } ",T)$+=" if ("+k+") { ",J+="}"}}if(typeof R=="object"&&(q.opts.strictKeywords?typeof R=="object"&&Object.keys(R).length>0||R===!1:q.util.schemaHasRules(R,q.RULES.all))){h.schema=R,h.schemaPath=q.schemaPath+".additionalItems",h.errSchemaPath=q.errSchemaPath+"/additionalItems",$+=" "+k+" = true; if ("+Y+".length > "+v.length+") { for (var "+X+" = "+v.length+"; "+X+" < "+Y+".length; "+X+"++) { ",h.errorPath=q.util.getPathExpr(q.errorPath,X,q.opts.jsonPointers,!0);var u=Y+"["+X+"]";h.dataPathArr[l]=X;var m=q.validate(h);if(h.baseId=n,q.util.varOccurences(m,N)<2)$+=" "+q.util.varReplace(m,N,u)+" ";else $+=" var "+N+" = "+u+"; "+m+" ";if(T)$+=" if (!"+k+") break; ";if($+=" } } ",T)$+=" if ("+k+") { ",J+="}"}}else if(q.opts.strictKeywords?typeof v=="object"&&Object.keys(v).length>0||v===!1:q.util.schemaHasRules(v,q.RULES.all)){h.schema=v,h.schemaPath=w,h.errSchemaPath=O,$+=" for (var "+X+" = 0; "+X+" < "+Y+".length; "+X+"++) { ",h.errorPath=q.util.getPathExpr(q.errorPath,X,q.opts.jsonPointers,!0);var u=Y+"["+X+"]";h.dataPathArr[l]=X;var m=q.validate(h);if(h.baseId=n,q.util.varOccurences(m,N)<2)$+=" "+q.util.varReplace(m,N,u)+" ";else $+=" var "+N+" = "+u+"; "+m+" ";if(T)$+=" if (!"+k+") break; ";$+=" }"}if(T)$+=" "+J+" if ("+H+" == errors) {";return $}});var ZP=p((Pp,aj)=>{aj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,n,Y="data"+(j||""),z=q.opts.$data&&v&&v.$data,H;if(z)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",H="schema"+P;else H=v;var h=f=="maximum",J=h?"exclusiveMaximum":"exclusiveMinimum",k=q.schema[J],X=q.opts.$data&&k&&k.$data,l=h?"<":">",N=h?">":"<",n=void 0;if(!(z||typeof v=="number"||v===void 0))throw new Error(f+" must be number");if(!(X||k===void 0||typeof k=="number"||typeof k=="boolean"))throw new Error(J+" must be number or boolean");if(X){var R=q.util.getData(k.$data,j,q.dataPathArr),g="exclusive"+P,V="exclType"+P,M="exclIsNumber"+P,C="op"+P,a="' + "+C+" + '";$+=" var schemaExcl"+P+" = "+R+"; ",R="schemaExcl"+P,$+=" var "+g+"; var "+V+" = typeof "+R+"; if ("+V+" != 'boolean' && "+V+" != 'undefined' && "+V+" != 'number') { ";var n=J,r=r||[];if(r.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(n||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: {} ",q.opts.messages!==!1)$+=" , message: '"+J+" should be boolean' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var A=$;if($=r.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+A+"]); ";else $+=" validate.errors = ["+A+"]; return false; ";else $+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" } else if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'number') || ";if($+=" "+V+" == 'number' ? ( ("+g+" = "+H+" === undefined || "+R+" "+l+"= "+H+") ? "+Y+" "+N+"= "+R+" : "+Y+" "+N+" "+H+" ) : ( ("+g+" = "+R+" === true) ? "+Y+" "+N+"= "+H+" : "+Y+" "+N+" "+H+" ) || "+Y+" !== "+Y+") { var op"+P+" = "+g+" ? '"+l+"' : '"+l+"='; ",v===void 0)n=J,O=q.errSchemaPath+"/"+J,H=R,z=X}else{var M=typeof k=="number",a=l;if(M&&z){var C="'"+a+"'";if($+=" if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'number') || ";$+=" ( "+H+" === undefined || "+k+" "+l+"= "+H+" ? "+Y+" "+N+"= "+k+" : "+Y+" "+N+" "+H+" ) || "+Y+" !== "+Y+") { "}else{if(M&&v===void 0)g=!0,n=J,O=q.errSchemaPath+"/"+J,H=k,N+="=";else{if(M)H=Math[h?"min":"max"](k,v);if(k===(M?H:!0))g=!0,n=J,O=q.errSchemaPath+"/"+J,N+="=";else g=!1,a+="="}var C="'"+a+"'";if($+=" if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'number') || ";$+=" "+Y+" "+N+" "+H+" || "+Y+" !== "+Y+") { "}}n=n||f;var r=r||[];if(r.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(n||"_limit")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { comparison: "+C+", limit: "+H+", exclusive: "+g+" } ",q.opts.messages!==!1)if($+=" , message: 'should be "+a+" ",z)$+="' + "+H;else $+=""+H+"'";if(q.opts.verbose){if($+=" , schema: ",z)$+="validate.schema"+w;else $+=""+v;$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var A=$;if($=r.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+A+"]); ";else $+=" validate.errors = ["+A+"]; return false; ";else $+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" } ",T)$+=" else { ";return $}});var XP=p((jp,Ij)=>{Ij.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,J,Y="data"+(j||""),z=q.opts.$data&&v&&v.$data,H;if(z)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",H="schema"+P;else H=v;if(!(z||typeof v=="number"))throw new Error(f+" must be number");var h=f=="maxItems"?">":"<";if($+="if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'number') || ";$+=" "+Y+".length "+h+" "+H+") { ";var J=f,k=k||[];if(k.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(J||"_limitItems")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { limit: "+H+" } ",q.opts.messages!==!1){if($+=" , message: 'should NOT have ",f=="maxItems")$+="more";else $+="fewer";if($+=" than ",z)$+="' + "+H+" + '";else $+=""+v;$+=" items' "}if(q.opts.verbose){if($+=" , schema: ",z)$+="validate.schema"+w;else $+=""+v;$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var X=$;if($=k.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+="} ",T)$+=" else { ";return $}});var AP=p((vp,Dj)=>{Dj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,J,Y="data"+(j||""),z=q.opts.$data&&v&&v.$data,H;if(z)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",H="schema"+P;else H=v;if(!(z||typeof v=="number"))throw new Error(f+" must be number");var h=f=="maxLength"?">":"<";if($+="if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'number') || ";if(q.opts.unicode===!1)$+=" "+Y+".length ";else $+=" ucs2length("+Y+") ";$+=" "+h+" "+H+") { ";var J=f,k=k||[];if(k.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(J||"_limitLength")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { limit: "+H+" } ",q.opts.messages!==!1){if($+=" , message: 'should NOT be ",f=="maxLength")$+="longer";else $+="shorter";if($+=" than ",z)$+="' + "+H+" + '";else $+=""+v;$+=" characters' "}if(q.opts.verbose){if($+=" , schema: ",z)$+="validate.schema"+w;else $+=""+v;$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var X=$;if($=k.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+="} ",T)$+=" else { ";return $}});var uP=p((wp,yj)=>{yj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,J,Y="data"+(j||""),z=q.opts.$data&&v&&v.$data,H;if(z)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",H="schema"+P;else H=v;if(!(z||typeof v=="number"))throw new Error(f+" must be number");var h=f=="maxProperties"?">":"<";if($+="if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'number') || ";$+=" Object.keys("+Y+").length "+h+" "+H+") { ";var J=f,k=k||[];if(k.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(J||"_limitProperties")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { limit: "+H+" } ",q.opts.messages!==!1){if($+=" , message: 'should NOT have ",f=="maxProperties")$+="more";else $+="fewer";if($+=" than ",z)$+="' + "+H+" + '";else $+=""+v;$+=" properties' "}if(q.opts.verbose){if($+=" , schema: ",z)$+="validate.schema"+w;else $+=""+v;$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var X=$;if($=k.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+="} ",T)$+=" else { ";return $}});var oj=p((Op,ij)=>{ij.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z=q.opts.$data&&v&&v.$data,H;if(z)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",H="schema"+P;else H=v;if(!(z||typeof v=="number"))throw new Error(f+" must be number");if($+="var division"+P+";if (",z)$+=" "+H+" !== undefined && ( typeof "+H+" != 'number' || ";if($+=" (division"+P+" = "+Y+" / "+H+", ",q.opts.multipleOfPrecision)$+=" Math.abs(Math.round(division"+P+") - division"+P+") > 1e-"+q.opts.multipleOfPrecision+" ";else $+=" division"+P+" !== parseInt(division"+P+") ";if($+=" ) ",z)$+=" ) ";$+=" ) { ";var h=h||[];if(h.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { multipleOf: "+H+" } ",q.opts.messages!==!1)if($+=" , message: 'should be multiple of ",z)$+="' + "+H;else $+=""+H+"'";if(q.opts.verbose){if($+=" , schema: ",z)$+="validate.schema"+w;else $+=""+v;$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var J=$;if($=h.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+J+"]); ";else $+=" validate.errors = ["+J+"]; return false; ";else $+=" var err = "+J+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+="} ",T)$+=" else { ";return $}});var Lj=p((Yp,cj)=>{cj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="errs__"+P,H=q.util.copy(q);H.level++;var h="valid"+H.level;if(q.opts.strictKeywords?typeof v=="object"&&Object.keys(v).length>0||v===!1:q.util.schemaHasRules(v,q.RULES.all)){H.schema=v,H.schemaPath=w,H.errSchemaPath=O,$+=" var "+z+" = errors; ";var J=q.compositeRule;q.compositeRule=H.compositeRule=!0,H.createErrors=!1;var k;if(H.opts.allErrors)k=H.opts.allErrors,H.opts.allErrors=!1;if($+=" "+q.validate(H)+" ",H.createErrors=!0,k)H.opts.allErrors=k;q.compositeRule=H.compositeRule=J,$+=" if ("+h+") { ";var X=X||[];if(X.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'not' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: {} ",q.opts.messages!==!1)$+=" , message: 'should NOT be valid' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var l=$;if($=X.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+l+"]); ";else $+=" validate.errors = ["+l+"]; return false; ";else $+=" var err = "+l+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" } else { errors = "+z+"; if (vErrors !== null) { if ("+z+") vErrors.length = "+z+"; else vErrors = null; } ",q.opts.allErrors)$+=" } "}else{if($+=" var err = ",q.createErrors!==!1){if($+=" { keyword: 'not' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: {} ",q.opts.messages!==!1)$+=" , message: 'should NOT be valid' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";if($+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",T)$+=" if (false) { "}return $}});var ej=p((Tp,tj)=>{tj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H="errs__"+P,h=q.util.copy(q),J="";h.level++;var k="valid"+h.level,X=h.baseId,l="prevValid"+P,N="passingSchemas"+P;$+="var "+H+" = errors , "+l+" = false , "+z+" = false , "+N+" = null; ";var n=q.compositeRule;q.compositeRule=h.compositeRule=!0;var R=v;if(R){var g,V=-1,M=R.length-1;while(V<M){if(g=R[V+=1],q.opts.strictKeywords?typeof g=="object"&&Object.keys(g).length>0||g===!1:q.util.schemaHasRules(g,q.RULES.all))h.schema=g,h.schemaPath=w+"["+V+"]",h.errSchemaPath=O+"/"+V,$+=" "+q.validate(h)+" ",h.baseId=X;else $+=" var "+k+" = true; ";if(V)$+=" if ("+k+" && "+l+") { "+z+" = false; "+N+" = ["+N+", "+V+"]; } else { ",J+="}";$+=" if ("+k+") { "+z+" = "+l+" = true; "+N+" = "+V+"; }"}}if(q.compositeRule=h.compositeRule=n,$+=""+J+"if (!"+z+") { var err = ",q.createErrors!==!1){if($+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { passingSchemas: "+N+" } ",q.opts.messages!==!1)$+=" , message: 'should match exactly one schema in oneOf' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";if($+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(vErrors); ";else $+=" validate.errors = vErrors; return false; ";if($+="} else { errors = "+H+"; if (vErrors !== null) { if ("+H+") vErrors.length = "+H+"; else vErrors = null; }",q.opts.allErrors)$+=" } ";return $}});var sj=p((zp,xj)=>{xj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z=q.opts.$data&&v&&v.$data,H;if(z)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",H="schema"+P;else H=v;var h=z?"(new RegExp("+H+"))":q.usePattern(v);if($+="if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'string') || ";$+=" !"+h+".test("+Y+") ) { ";var J=J||[];if(J.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { pattern: ",z)$+=""+H;else $+=""+q.util.toQuotedString(v);if($+=" } ",q.opts.messages!==!1){if($+=` , message: 'should match pattern "`,z)$+="' + "+H+" + '";else $+=""+q.util.escapeQuotes(v);$+=`"' `}if(q.opts.verbose){if($+=" , schema: ",z)$+="validate.schema"+w;else $+=""+q.util.toQuotedString(v);$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var k=$;if($=J.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+k+"]); ";else $+=" validate.errors = ["+k+"]; return false; ";else $+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+="} ",T)$+=" else { ";return $}});var Uj=p((Wp,Bj)=>{Bj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="errs__"+P,H=q.util.copy(q),h="";H.level++;var J="valid"+H.level,k="key"+P,X="idx"+P,l=H.dataLevel=q.dataLevel+1,N="data"+l,n="dataProperties"+P,R=Object.keys(v||{}).filter(c),g=q.schema.patternProperties||{},V=Object.keys(g).filter(c),M=q.schema.additionalProperties,C=R.length||V.length,a=M===!1,r=typeof M=="object"&&Object.keys(M).length,A=q.opts.removeAdditional,u=a||r||A,m=q.opts.ownProperties,S=q.baseId,I=q.schema.required;if(I&&!(q.opts.$data&&I.$data)&&I.length<q.opts.loopRequired)var D=q.util.toHash(I);function c(Y_){return Y_!=="__proto__"}if($+="var "+z+" = errors;var "+J+" = true;",m)$+=" var "+n+" = undefined;";if(u){if(m)$+=" "+n+" = "+n+" || Object.keys("+Y+"); for (var "+X+"=0; "+X+"<"+n+".length; "+X+"++) { var "+k+" = "+n+"["+X+"]; ";else $+=" for (var "+k+" in "+Y+") { ";if(C){if($+=" var isAdditional"+P+" = !(false ",R.length)if(R.length>8)$+=" || validate.schema"+w+".hasOwnProperty("+k+") ";else{var e=R;if(e){var L,Q=-1,Hq=e.length-1;while(Q<Hq)L=e[Q+=1],$+=" || "+k+" == "+q.util.toQuotedString(L)+" "}}if(V.length){var Pq=V;if(Pq){var _q,kq=-1,gq=Pq.length-1;while(kq<gq)_q=Pq[kq+=1],$+=" || "+q.usePattern(_q)+".test("+k+") "}}$+=" ); if (isAdditional"+P+") { "}if(A=="all")$+=" delete "+Y+"["+k+"]; ";else{var iq=q.errorPath,x_="' + "+k+" + '";if(q.opts._errorDataPathProperty)q.errorPath=q.util.getPathExpr(q.errorPath,k,q.opts.jsonPointers);if(a)if(A)$+=" delete "+Y+"["+k+"]; ";else{$+=" "+J+" = false; ";var n_=O;O=q.errSchemaPath+"/additionalProperties";var Nq=Nq||[];if(Nq.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { additionalProperty: '"+x_+"' } ",q.opts.messages!==!1){if($+=" , message: '",q.opts._errorDataPathProperty)$+="is an invalid additional property";else $+="should NOT have additional properties";$+="' "}if(q.opts.verbose)$+=" , schema: false , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var Vq=$;if($=Nq.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+Vq+"]); ";else $+=" validate.errors = ["+Vq+"]; return false; ";else $+=" var err = "+Vq+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(O=n_,T)$+=" break; "}else if(r)if(A=="failing"){$+=" var "+z+" = errors; ";var H8=q.compositeRule;q.compositeRule=H.compositeRule=!0,H.schema=M,H.schemaPath=q.schemaPath+".additionalProperties",H.errSchemaPath=q.errSchemaPath+"/additionalProperties",H.errorPath=q.opts._errorDataPathProperty?q.errorPath:q.util.getPathExpr(q.errorPath,k,q.opts.jsonPointers);var Dq=Y+"["+k+"]";H.dataPathArr[l]=k;var zq=q.validate(H);if(H.baseId=S,q.util.varOccurences(zq,N)<2)$+=" "+q.util.varReplace(zq,N,Dq)+" ";else $+=" var "+N+" = "+Dq+"; "+zq+" ";$+=" if (!"+J+") { errors = "+z+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+Y+"["+k+"]; } ",q.compositeRule=H.compositeRule=H8}else{H.schema=M,H.schemaPath=q.schemaPath+".additionalProperties",H.errSchemaPath=q.errSchemaPath+"/additionalProperties",H.errorPath=q.opts._errorDataPathProperty?q.errorPath:q.util.getPathExpr(q.errorPath,k,q.opts.jsonPointers);var Dq=Y+"["+k+"]";H.dataPathArr[l]=k;var zq=q.validate(H);if(H.baseId=S,q.util.varOccurences(zq,N)<2)$+=" "+q.util.varReplace(zq,N,Dq)+" ";else $+=" var "+N+" = "+Dq+"; "+zq+" ";if(T)$+=" if (!"+J+") break; "}q.errorPath=iq}if(C)$+=" } ";if($+=" } ",T)$+=" if ("+J+") { ",h+="}"}var s_=q.opts.useDefaults&&!q.compositeRule;if(R.length){var R_=R;if(R_){var L,h8=-1,J8=R_.length-1;while(h8<J8){L=R_[h8+=1];var dq=v[L];if(q.opts.strictKeywords?typeof dq=="object"&&Object.keys(dq).length>0||dq===!1:q.util.schemaHasRules(dq,q.RULES.all)){var __=q.util.getProperty(L),Dq=Y+__,tq=s_&&dq.default!==void 0;H.schema=dq,H.schemaPath=w+__,H.errSchemaPath=O+"/"+q.util.escapeFragment(L),H.errorPath=q.util.getPath(q.errorPath,L,q.opts.jsonPointers),H.dataPathArr[l]=q.util.toQuotedString(L);var zq=q.validate(H);if(H.baseId=S,q.util.varOccurences(zq,N)<2){zq=q.util.varReplace(zq,N,Dq);var oq=Dq}else{var oq=N;$+=" var "+N+" = "+Dq+"; "}if(tq)$+=" "+zq+" ";else{if(D&&D[L]){if($+=" if ( "+oq+" === undefined ",m)$+=" || ! Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(L)+"') ";$+=") { "+J+" = false; ";var iq=q.errorPath,n_=O,G_=q.util.escapeQuotes(L);if(q.opts._errorDataPathProperty)q.errorPath=q.util.getPath(iq,L,q.opts.jsonPointers);O=q.errSchemaPath+"/required";var Nq=Nq||[];if(Nq.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'required' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { missingProperty: '"+G_+"' } ",q.opts.messages!==!1){if($+=" , message: '",q.opts._errorDataPathProperty)$+="is a required property";else $+="should have required property \\'"+G_+"\\'";$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var Vq=$;if($=Nq.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+Vq+"]); ";else $+=" validate.errors = ["+Vq+"]; return false; ";else $+=" var err = "+Vq+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";O=n_,q.errorPath=iq,$+=" } else { "}else if(T){if($+=" if ( "+oq+" === undefined ",m)$+=" || ! Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(L)+"') ";$+=") { "+J+" = true; } else { "}else{if($+=" if ("+oq+" !== undefined ",m)$+=" && Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(L)+"') ";$+=" ) { "}$+=" "+zq+" } "}}if(T)$+=" if ("+J+") { ",h+="}"}}}if(V.length){var Uq=V;if(Uq){var _q,n6=-1,RK=Uq.length-1;while(n6<RK){_q=Uq[n6+=1];var dq=g[_q];if(q.opts.strictKeywords?typeof dq=="object"&&Object.keys(dq).length>0||dq===!1:q.util.schemaHasRules(dq,q.RULES.all)){if(H.schema=dq,H.schemaPath=q.schemaPath+".patternProperties"+q.util.getProperty(_q),H.errSchemaPath=q.errSchemaPath+"/patternProperties/"+q.util.escapeFragment(_q),m)$+=" "+n+" = "+n+" || Object.keys("+Y+"); for (var "+X+"=0; "+X+"<"+n+".length; "+X+"++) { var "+k+" = "+n+"["+X+"]; ";else $+=" for (var "+k+" in "+Y+") { ";$+=" if ("+q.usePattern(_q)+".test("+k+")) { ",H.errorPath=q.util.getPathExpr(q.errorPath,k,q.opts.jsonPointers);var Dq=Y+"["+k+"]";H.dataPathArr[l]=k;var zq=q.validate(H);if(H.baseId=S,q.util.varOccurences(zq,N)<2)$+=" "+q.util.varReplace(zq,N,Dq)+" ";else $+=" var "+N+" = "+Dq+"; "+zq+" ";if(T)$+=" if (!"+J+") break; ";if($+=" } ",T)$+=" else "+J+" = true; ";if($+=" } ",T)$+=" if ("+J+") { ",h+="}"}}}}if(T)$+=" "+h+" if ("+z+" == errors) {";return $}});var Qj=p((Hp,Fj)=>{Fj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="errs__"+P,H=q.util.copy(q),h="";H.level++;var J="valid"+H.level;if($+="var "+z+" = errors;",q.opts.strictKeywords?typeof v=="object"&&Object.keys(v).length>0||v===!1:q.util.schemaHasRules(v,q.RULES.all)){H.schema=v,H.schemaPath=w,H.errSchemaPath=O;var k="key"+P,X="idx"+P,l="i"+P,N="' + "+k+" + '",n=H.dataLevel=q.dataLevel+1,R="data"+n,g="dataProperties"+P,V=q.opts.ownProperties,M=q.baseId;if(V)$+=" var "+g+" = undefined; ";if(V)$+=" "+g+" = "+g+" || Object.keys("+Y+"); for (var "+X+"=0; "+X+"<"+g+".length; "+X+"++) { var "+k+" = "+g+"["+X+"]; ";else $+=" for (var "+k+" in "+Y+") { ";$+=" var startErrs"+P+" = errors; ";var C=k,a=q.compositeRule;q.compositeRule=H.compositeRule=!0;var r=q.validate(H);if(H.baseId=M,q.util.varOccurences(r,R)<2)$+=" "+q.util.varReplace(r,R,C)+" ";else $+=" var "+R+" = "+C+"; "+r+" ";if(q.compositeRule=H.compositeRule=a,$+=" if (!"+J+") { for (var "+l+"=startErrs"+P+"; "+l+"<errors; "+l+"++) { vErrors["+l+"].propertyName = "+k+"; } var err = ",q.createErrors!==!1){if($+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { propertyName: '"+N+"' } ",q.opts.messages!==!1)$+=" , message: 'property name \\'"+N+"\\' is invalid' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";if($+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(vErrors); ";else $+=" validate.errors = vErrors; return false; ";if(T)$+=" break; ";$+=" } }"}if(T)$+=" "+h+" if ("+z+" == errors) {";return $}});var _9=p((hp,q9)=>{q9.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H=q.opts.$data&&v&&v.$data,h;if(H)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",h="schema"+P;else h=v;var J="schema"+P;if(!H)if(v.length<q.opts.loopRequired&&q.schema.properties&&Object.keys(q.schema.properties).length){var k=[],X=v;if(X){var l,N=-1,n=X.length-1;while(N<n){l=X[N+=1];var R=q.schema.properties[l];if(!(R&&(q.opts.strictKeywords?typeof R=="object"&&Object.keys(R).length>0||R===!1:q.util.schemaHasRules(R,q.RULES.all))))k[k.length]=l}}}else var k=v;if(H||k.length){var g=q.errorPath,V=H||k.length>=q.opts.loopRequired,M=q.opts.ownProperties;if(T)if($+=" var missing"+P+"; ",V){if(!H)$+=" var "+J+" = validate.schema"+w+"; ";var C="i"+P,a="schema"+P+"["+C+"]",r="' + "+a+" + '";if(q.opts._errorDataPathProperty)q.errorPath=q.util.getPathExpr(g,a,q.opts.jsonPointers);if($+=" var "+z+" = true; ",H)$+=" if (schema"+P+" === undefined) "+z+" = true; else if (!Array.isArray(schema"+P+")) "+z+" = false; else {";if($+=" for (var "+C+" = 0; "+C+" < "+J+".length; "+C+"++) { "+z+" = "+Y+"["+J+"["+C+"]] !== undefined ",M)$+=" && Object.prototype.hasOwnProperty.call("+Y+", "+J+"["+C+"]) ";if($+="; if (!"+z+") break; } ",H)$+=" } ";$+=" if (!"+z+") { ";var A=A||[];if(A.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'required' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { missingProperty: '"+r+"' } ",q.opts.messages!==!1){if($+=" , message: '",q.opts._errorDataPathProperty)$+="is a required property";else $+="should have required property \\'"+r+"\\'";$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var u=$;if($=A.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+u+"]); ";else $+=" validate.errors = ["+u+"]; return false; ";else $+=" var err = "+u+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";$+=" } else { "}else{$+=" if ( ";var m=k;if(m){var S,C=-1,I=m.length-1;while(C<I){if(S=m[C+=1],C)$+=" || ";var D=q.util.getProperty(S),c=Y+D;if($+=" ( ( "+c+" === undefined ",M)$+=" || ! Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(S)+"') ";$+=") && (missing"+P+" = "+q.util.toQuotedString(q.opts.jsonPointers?S:D)+") ) "}}$+=") { ";var a="missing"+P,r="' + "+a+" + '";if(q.opts._errorDataPathProperty)q.errorPath=q.opts.jsonPointers?q.util.getPathExpr(g,a,!0):g+" + "+a;var A=A||[];if(A.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'required' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { missingProperty: '"+r+"' } ",q.opts.messages!==!1){if($+=" , message: '",q.opts._errorDataPathProperty)$+="is a required property";else $+="should have required property \\'"+r+"\\'";$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var u=$;if($=A.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+u+"]); ";else $+=" validate.errors = ["+u+"]; return false; ";else $+=" var err = "+u+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";$+=" } else { "}else if(V){if(!H)$+=" var "+J+" = validate.schema"+w+"; ";var C="i"+P,a="schema"+P+"["+C+"]",r="' + "+a+" + '";if(q.opts._errorDataPathProperty)q.errorPath=q.util.getPathExpr(g,a,q.opts.jsonPointers);if(H){if($+=" if ("+J+" && !Array.isArray("+J+")) { var err = ",q.createErrors!==!1){if($+=" { keyword: 'required' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { missingProperty: '"+r+"' } ",q.opts.messages!==!1){if($+=" , message: '",q.opts._errorDataPathProperty)$+="is a required property";else $+="should have required property \\'"+r+"\\'";$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";$+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+J+" !== undefined) { "}if($+=" for (var "+C+" = 0; "+C+" < "+J+".length; "+C+"++) { if ("+Y+"["+J+"["+C+"]] === undefined ",M)$+=" || ! Object.prototype.hasOwnProperty.call("+Y+", "+J+"["+C+"]) ";if($+=") { var err = ",q.createErrors!==!1){if($+=" { keyword: 'required' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { missingProperty: '"+r+"' } ",q.opts.messages!==!1){if($+=" , message: '",q.opts._errorDataPathProperty)$+="is a required property";else $+="should have required property \\'"+r+"\\'";$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";if($+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",H)$+=" } "}else{var e=k;if(e){var S,L=-1,Q=e.length-1;while(L<Q){S=e[L+=1];var D=q.util.getProperty(S),r=q.util.escapeQuotes(S),c=Y+D;if(q.opts._errorDataPathProperty)q.errorPath=q.util.getPath(g,S,q.opts.jsonPointers);if($+=" if ( "+c+" === undefined ",M)$+=" || ! Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(S)+"') ";if($+=") { var err = ",q.createErrors!==!1){if($+=" { keyword: 'required' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { missingProperty: '"+r+"' } ",q.opts.messages!==!1){if($+=" , message: '",q.opts._errorDataPathProperty)$+="is a required property";else $+="should have required property \\'"+r+"\\'";$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";$+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}}q.errorPath=g}else if(T)$+=" if (true) {";return $}});var $9=p((Jp,f9)=>{f9.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H=q.opts.$data&&v&&v.$data,h;if(H)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",h="schema"+P;else h=v;if((v||H)&&q.opts.uniqueItems!==!1){if(H)$+=" var "+z+"; if ("+h+" === false || "+h+" === undefined) "+z+" = true; else if (typeof "+h+" != 'boolean') "+z+" = false; else { ";$+=" var i = "+Y+".length , "+z+" = true , j; if (i > 1) { ";var J=q.schema.items&&q.schema.items.type,k=Array.isArray(J);if(!J||J=="object"||J=="array"||k&&(J.indexOf("object")>=0||J.indexOf("array")>=0))$+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+Y+"[i], "+Y+"[j])) { "+z+" = false; break outer; } } } ";else{$+=" var itemIndices = {}, item; for (;i--;) { var item = "+Y+"[i]; ";var X="checkDataType"+(k?"s":"");if($+=" if ("+q.util[X](J,"item",q.opts.strictNumbers,!0)+") continue; ",k)$+=` if (typeof item == 'string') item = '"' + item; `;$+=" if (typeof itemIndices[item] == 'number') { "+z+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}if($+=" } ",H)$+=" } ";$+=" if (!"+z+") { ";var l=l||[];if(l.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { i: i, j: j } ",q.opts.messages!==!1)$+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' ";if(q.opts.verbose){if($+=" , schema: ",H)$+="validate.schema"+w;else $+=""+v;$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var N=$;if($=l.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+N+"]); ";else $+=" validate.errors = ["+N+"]; return false; ";else $+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" } ",T)$+=" else { "}else if(T)$+=" if (true) { ";return $}});var P9=p((kp,K9)=>{K9.exports={$ref:kj(),allOf:Xj(),anyOf:uj(),$comment:mj(),const:bj(),contains:Mj(),dependencies:Nj(),enum:pj(),format:nj(),if:Ej(),items:dj(),maximum:ZP(),minimum:ZP(),maxItems:XP(),minItems:XP(),maxLength:AP(),minLength:AP(),maxProperties:uP(),minProperties:uP(),multipleOf:oj(),not:Lj(),oneOf:ej(),pattern:sj(),properties:Uj(),propertyNames:Qj(),required:_9(),uniqueItems:$9(),validate:JP()}});var w9=p((Zp,v9)=>{var j9=P9(),GP=b8().toHash;v9.exports=function _(){var q=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],f=["type","$comment"],K=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],$=["number","integer","string","array","object","boolean","null"];return q.all=GP(f),q.types=GP($),q.forEach(function(P){if(P.rules=P.rules.map(function(j){var v;if(typeof j=="object"){var w=Object.keys(j)[0];v=j[w],j=w,v.forEach(function(T){f.push(T),q.all[T]=!0})}f.push(j);var O=q.all[j]={keyword:j,code:j9[j],implements:v};return O}),q.all.$comment={keyword:"$comment",code:j9.$comment},P.type)q.types[P.type]=P}),q.keywords=GP(f.concat(K)),q.custom={},q}});var T9=p((Xp,Y9)=>{var O9=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];Y9.exports=function(_,q){for(var f=0;f<q.length;f++){_=JSON.parse(JSON.stringify(_));var K=q[f].split("/"),$=_,P;for(P=1;P<K.length;P++)$=$[K[P]];for(P=0;P<O9.length;P++){var j=O9[P],v=$[j];if(v)$[j]={anyOf:[v,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}}}return _}});var H9=p((Ap,W9)=>{var yz=z$().MissingRef;W9.exports=z9;function z9(_,q,f){var K=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof q=="function")f=q,q=void 0;var $=P(_).then(function(){var v=K._addSchema(_,void 0,q);return v.validate||j(v)});if(f)$.then(function(v){f(null,v)},f);return $;function P(v){var w=v.$schema;return w&&!K.getSchema(w)?z9.call(K,{$ref:w},!0):Promise.resolve()}function j(v){try{return K._compile(v)}catch(O){if(O instanceof yz)return w(O);throw O}function w(O){var T=O.missingSchema;if(H(T))throw new Error("Schema "+T+" is loaded but "+O.missingRef+" cannot be resolved");var Y=K._loadingSchemas[T];if(!Y)Y=K._loadingSchemas[T]=K._opts.loadSchema(T),Y.then(z,z);return Y.then(function(h){if(!H(T))return P(h).then(function(){if(!H(T))K.addSchema(h,T,void 0,q)})}).then(function(){return j(v)});function z(){delete K._loadingSchemas[T]}function H(h){return K._refs[h]||K._schemas[h]}}}}});var J9=p((up,h9)=>{h9.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y,z="data"+(j||""),H="valid"+P,h="errs__"+P,J=q.opts.$data&&v&&v.$data,k;if(J)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",k="schema"+P;else k=v;var X=this,l="definition"+P,N=X.definition,n="",R,g,V,M,C;if(J&&N.$data){C="keywordValidate"+P;var a=N.validateSchema;$+=" var "+l+" = RULES.custom['"+f+"'].definition; var "+C+" = "+l+".validate;"}else{if(M=q.useCustomRule(X,v,q.schema,q),!M)return;k="validate.schema"+w,C=M.code,R=N.compile,g=N.inline,V=N.macro}var r=C+".errors",A="i"+P,u="ruleErr"+P,m=N.async;if(m&&!q.async)throw new Error("async keyword in sync schema");if(!(g||V))$+=""+r+" = null;";if($+="var "+h+" = errors;var "+H+";",J&&N.$data){if(n+="}",$+=" if ("+k+" === undefined) { "+H+" = true; } else { ",a)n+="}",$+=" "+H+" = "+l+".validateSchema("+k+"); if ("+H+") { "}if(g)if(N.statements)$+=" "+M.validate+" ";else $+=" "+H+" = "+M.validate+"; ";else if(V){var S=q.util.copy(q),n="";S.level++;var I="valid"+S.level;S.schema=M.validate,S.schemaPath="";var D=q.compositeRule;q.compositeRule=S.compositeRule=!0;var c=q.validate(S).replace(/validate\.schema/g,C);q.compositeRule=S.compositeRule=D,$+=" "+c}else{var e=e||[];if(e.push($),$="",$+=" "+C+".call( ",q.opts.passContext)$+="this";else $+="self";if(R||N.schema===!1)$+=" , "+z+" ";else $+=" , "+k+" , "+z+" , validate.schema"+q.schemaPath+" ";if($+=" , (dataPath || '')",q.errorPath!='""')$+=" + "+q.errorPath;var L=j?"data"+(j-1||""):"parentData",Q=j?q.dataPathArr[j]:"parentDataProperty";$+=" , "+L+" , "+Q+" , rootData ) ";var Hq=$;if($=e.pop(),N.errors===!1){if($+=" "+H+" = ",m)$+="await ";$+=""+Hq+"; "}else if(m)r="customErrors"+P,$+=" var "+r+" = null; try { "+H+" = await "+Hq+"; } catch (e) { "+H+" = false; if (e instanceof ValidationError) "+r+" = e.errors; else throw e; } ";else $+=" "+r+" = null; "+H+" = "+Hq+"; "}if(N.modifying)$+=" if ("+L+") "+z+" = "+L+"["+Q+"];";if($+=""+n,N.valid){if(T)$+=" if (true) { "}else{if($+=" if ( ",N.valid===void 0)if($+=" !",V)$+=""+I;else $+=""+H;else $+=" "+!N.valid+" ";$+=") { ",Y=X.keyword;var e=e||[];e.push($),$="";var e=e||[];if(e.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(Y||"custom")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { keyword: '"+X.keyword+"' } ",q.opts.messages!==!1)$+=` , message: 'should pass "`+X.keyword+`" keyword validation' `;if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+z+" ";$+=" } "}else $+=" {} ";var Pq=$;if($=e.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+Pq+"]); ";else $+=" validate.errors = ["+Pq+"]; return false; ";else $+=" var err = "+Pq+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var _q=$;if($=e.pop(),g)if(N.errors){if(N.errors!="full"){if($+=" for (var "+A+"="+h+"; "+A+"<errors; "+A+"++) { var "+u+" = vErrors["+A+"]; if ("+u+".dataPath === undefined) "+u+".dataPath = (dataPath || '') + "+q.errorPath+"; if ("+u+".schemaPath === undefined) { "+u+'.schemaPath = "'+O+'"; } ',q.opts.verbose)$+=" "+u+".schema = "+k+"; "+u+".data = "+z+"; ";$+=" } "}}else if(N.errors===!1)$+=" "+_q+" ";else{if($+=" if ("+h+" == errors) { "+_q+" } else { for (var "+A+"="+h+"; "+A+"<errors; "+A+"++) { var "+u+" = vErrors["+A+"]; if ("+u+".dataPath === undefined) "+u+".dataPath = (dataPath || '') + "+q.errorPath+"; if ("+u+".schemaPath === undefined) { "+u+'.schemaPath = "'+O+'"; } ',q.opts.verbose)$+=" "+u+".schema = "+k+"; "+u+".data = "+z+"; ";$+=" } } "}else if(V){if($+=" var err = ",q.createErrors!==!1){if($+=" { keyword: '"+(Y||"custom")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { keyword: '"+X.keyword+"' } ",q.opts.messages!==!1)$+=` , message: 'should pass "`+X.keyword+`" keyword validation' `;if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+z+" ";$+=" } "}else $+=" {} ";if($+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(vErrors); ";else $+=" validate.errors = vErrors; return false; "}else if(N.errors===!1)$+=" "+_q+" ";else{if($+=" if (Array.isArray("+r+")) { if (vErrors === null) vErrors = "+r+"; else vErrors = vErrors.concat("+r+"); errors = vErrors.length; for (var "+A+"="+h+"; "+A+"<errors; "+A+"++) { var "+u+" = vErrors["+A+"]; if ("+u+".dataPath === undefined) "+u+".dataPath = (dataPath || '') + "+q.errorPath+"; "+u+'.schemaPath = "'+O+'"; ',q.opts.verbose)$+=" "+u+".schema = "+k+"; "+u+".data = "+z+"; ";$+=" } } else { "+_q+" } "}if($+=" } ",T)$+=" else { "}return $}});var mP=p((Gp,iz)=>{iz.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var X9=p((mp,Z9)=>{var k9=mP();Z9.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:k9.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:k9.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}});var u9=p((rp,A9)=>{var oz=/^[a-z_$][a-z0-9_$-]*$/i,cz=J9(),Lz=X9();A9.exports={add:tz,get:ez,remove:xz,validate:rP};function tz(_,q){var f=this.RULES;if(f.keywords[_])throw new Error("Keyword "+_+" is already defined");if(!oz.test(_))throw new Error("Keyword "+_+" is not a valid identifier");if(q){this.validateKeyword(q,!0);var K=q.type;if(Array.isArray(K))for(var $=0;$<K.length;$++)j(_,K[$],q);else j(_,K,q);var P=q.metaSchema;if(P){if(q.$data&&this._opts.$data)P={anyOf:[P,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]};q.validateSchema=this.compile(P,!0)}}f.keywords[_]=f.all[_]=!0;function j(v,w,O){var T;for(var Y=0;Y<f.length;Y++){var z=f[Y];if(z.type==w){T=z;break}}if(!T)T={type:w,rules:[]},f.push(T);var H={keyword:v,definition:O,custom:!0,code:cz,implements:O.implements};T.rules.push(H),f.custom[v]=H}return this}function ez(_){var q=this.RULES.custom[_];return q?q.definition:this.RULES.keywords[_]||!1}function xz(_){var q=this.RULES;delete q.keywords[_],delete q.all[_],delete q.custom[_];for(var f=0;f<q.length;f++){var K=q[f].rules;for(var $=0;$<K.length;$++)if(K[$].keyword==_){K.splice($,1);break}}return this}function rP(_,q){rP.errors=null;var f=this._validateKeyword=this._validateKeyword||this.compile(Lz,!0);if(f(_))return!0;if(rP.errors=f.errors,q)throw new Error("custom keyword definition is invalid: "+this.errorsText(f.errors));else return!1}});var G9=p((bp,sz)=>{sz.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var l9=p((Vp,p9)=>{var r9=_j(),V8=T$(),Bz=$j(),b9=OP(),Uz=hP(),Fz=hj(),Qz=w9(),V9=T9(),M9=b8();p9.exports=Mq;Mq.prototype.validate=_W;Mq.prototype.compile=fW;Mq.prototype.addSchema=$W;Mq.prototype.addMetaSchema=KW;Mq.prototype.validateSchema=PW;Mq.prototype.getSchema=vW;Mq.prototype.removeSchema=OW;Mq.prototype.addFormat=kW;Mq.prototype.errorsText=JW;Mq.prototype._addSchema=YW;Mq.prototype._compile=TW;Mq.prototype.compileAsync=H9();var A$=u9();Mq.prototype.addKeyword=A$.add;Mq.prototype.getKeyword=A$.get;Mq.prototype.removeKeyword=A$.remove;Mq.prototype.validateKeyword=A$.validate;var S9=z$();Mq.ValidationError=S9.Validation;Mq.MissingRefError=S9.MissingRef;Mq.$dataMetaSchema=V9;var X$="http://json-schema.org/draft-07/schema",m9=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],qW=["/properties"];function Mq(_){if(!(this instanceof Mq))return new Mq(_);if(_=this._opts=M9.copy(_)||{},mW(this),this._schemas={},this._refs={},this._fragments={},this._formats=Fz(_.format),this._cache=_.cache||new Bz,this._loadingSchemas={},this._compilations=[],this.RULES=Qz(),this._getId=zW(_),_.loopRequired=_.loopRequired||1/0,_.errorDataPath=="property")_._errorDataPathProperty=!0;if(_.serialize===void 0)_.serialize=Uz;if(this._metaOpts=GW(this),_.formats)AW(this);if(_.keywords)uW(this);if(ZW(this),typeof _.meta=="object")this.addMetaSchema(_.meta);if(_.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});XW(this)}function _W(_,q){var f;if(typeof _=="string"){if(f=this.getSchema(_),!f)throw new Error('no schema with key or ref "'+_+'"')}else{var K=this._addSchema(_);f=K.validate||this._compile(K)}var $=f(q);if(f.$async!==!0)this.errors=f.errors;return $}function fW(_,q){var f=this._addSchema(_,void 0,q);return f.validate||this._compile(f)}function $W(_,q,f,K){if(Array.isArray(_)){for(var $=0;$<_.length;$++)this.addSchema(_[$],void 0,f,K);return this}var P=this._getId(_);if(P!==void 0&&typeof P!="string")throw new Error("schema id must be string");return q=V8.normalizeId(q||P),C9(this,q),this._schemas[q]=this._addSchema(_,f,K,!0),this}function KW(_,q,f){return this.addSchema(_,q,f,!0),this}function PW(_,q){var f=_.$schema;if(f!==void 0&&typeof f!="string")throw new Error("$schema must be a string");if(f=f||this._opts.defaultMeta||jW(this),!f)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var K=this.validate(f,_);if(!K&&q){var $="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error($);else throw new Error($)}return K}function jW(_){var q=_._opts.meta;return _._opts.defaultMeta=typeof q=="object"?_._getId(q)||q:_.getSchema(X$)?X$:void 0,_._opts.defaultMeta}function vW(_){var q=N9(this,_);switch(typeof q){case"object":return q.validate||this._compile(q);case"string":return this.getSchema(q);case"undefined":return wW(this,_)}}function wW(_,q){var f=V8.schema.call(_,{schema:{}},q);if(f){var{schema:K,root:$,baseId:P}=f,j=r9.call(_,K,$,void 0,P);return _._fragments[q]=new b9({ref:q,fragment:!0,schema:K,root:$,baseId:P,validate:j}),j}}function N9(_,q){return q=V8.normalizeId(q),_._schemas[q]||_._refs[q]||_._fragments[q]}function OW(_){if(_ instanceof RegExp)return Z$(this,this._schemas,_),Z$(this,this._refs,_),this;switch(typeof _){case"undefined":return Z$(this,this._schemas),Z$(this,this._refs),this._cache.clear(),this;case"string":var q=N9(this,_);if(q)this._cache.del(q.cacheKey);return delete this._schemas[_],delete this._refs[_],this;case"object":var f=this._opts.serialize,K=f?f(_):_;this._cache.del(K);var $=this._getId(_);if($)$=V8.normalizeId($),delete this._schemas[$],delete this._refs[$]}return this}function Z$(_,q,f){for(var K in q){var $=q[K];if(!$.meta&&(!f||f.test(K)))_._cache.del($.cacheKey),delete q[K]}}function YW(_,q,f,K){if(typeof _!="object"&&typeof _!="boolean")throw new Error("schema should be object or boolean");var $=this._opts.serialize,P=$?$(_):_,j=this._cache.get(P);if(j)return j;K=K||this._opts.addUsedSchema!==!1;var v=V8.normalizeId(this._getId(_));if(v&&K)C9(this,v);var w=this._opts.validateSchema!==!1&&!q,O;if(w&&!(O=v&&v==V8.normalizeId(_.$schema)))this.validateSchema(_,!0);var T=V8.ids.call(this,_),Y=new b9({id:v,schema:_,localRefs:T,cacheKey:P,meta:f});if(v[0]!="#"&&K)this._refs[v]=Y;if(this._cache.put(P,Y),w&&O)this.validateSchema(_,!0);return Y}function TW(_,q){if(_.compiling){if(_.validate=$,$.schema=_.schema,$.errors=null,$.root=q?q:$,_.schema.$async===!0)$.$async=!0;return $}_.compiling=!0;var f;if(_.meta)f=this._opts,this._opts=this._metaOpts;var K;try{K=r9.call(this,_.schema,q,_.localRefs)}catch(P){throw delete _.validate,P}finally{if(_.compiling=!1,_.meta)this._opts=f}return _.validate=K,_.refs=K.refs,_.refVal=K.refVal,_.root=K.root,K;function $(){var P=_.validate,j=P.apply(this,arguments);return $.errors=P.errors,j}}function zW(_){switch(_.schemaId){case"auto":return hW;case"id":return WW;default:return HW}}function WW(_){if(_.$id)this.logger.warn("schema $id ignored",_.$id);return _.id}function HW(_){if(_.id)this.logger.warn("schema id ignored",_.id);return _.$id}function hW(_){if(_.$id&&_.id&&_.$id!=_.id)throw new Error("schema $id is different from id");return _.$id||_.id}function JW(_,q){if(_=_||this.errors,!_)return"No errors";q=q||{};var f=q.separator===void 0?", ":q.separator,K=q.dataVar===void 0?"data":q.dataVar,$="";for(var P=0;P<_.length;P++){var j=_[P];if(j)$+=K+j.dataPath+" "+j.message+f}return $.slice(0,-f.length)}function kW(_,q){if(typeof q=="string")q=new RegExp(q);return this._formats[_]=q,this}function ZW(_){var q;if(_._opts.$data)q=G9(),_.addMetaSchema(q,q.$id,!0);if(_._opts.meta===!1)return;var f=mP();if(_._opts.$data)f=V9(f,qW);_.addMetaSchema(f,X$,!0),_._refs["http://json-schema.org/schema"]=X$}function XW(_){var q=_._opts.schemas;if(!q)return;if(Array.isArray(q))_.addSchema(q);else for(var f in q)_.addSchema(q[f],f)}function AW(_){for(var q in _._opts.formats){var f=_._opts.formats[q];_.addFormat(q,f)}}function uW(_){for(var q in _._opts.keywords){var f=_._opts.keywords[q];_.addKeyword(q,f)}}function C9(_,q){if(_._schemas[q]||_._refs[q])throw new Error('schema with key or id "'+q+'" already exists')}function GW(_){var q=M9.copy(_._opts);for(var f=0;f<m9.length;f++)delete q[m9[f]];return q}function mW(_){var q=_._opts.logger;if(q===!1)_.logger={log:bP,warn:bP,error:bP};else{if(q===void 0)q=console;if(!(typeof q=="object"&&q.log&&q.warn&&q.error))throw new Error("logger must implement log, warn and error methods");_.logger=q}}function bP(){}});var DW=(_)=>{let{idPattern:q,entityName:f}=_,K=(w)=>{return q.test(w)};return Object.freeze({isId:K,validateId:(w)=>{return K(w)},resolve:(w)=>{if(K(w))return{kind:"id",value:w};return{kind:"path",value:w}},getPattern:()=>{return q},getEntityName:()=>{return f}})},yW,vf;var gP=b_(()=>{yW=Object.freeze({create:DW}),vf=yW});var S$,N$,dP=(_)=>{if(S$.isId(_))return"project";if(N$.isId(_))return"shared";return},iW=(_)=>{return S$.isId(_)||N$.isId(_)},kv=(_)=>{return _==="project"?S$:N$},oW=(_,q)=>{return kv(q).validateId(_)},cW,sq;var wf=b_(()=>{gP();S$=vf.create({idPattern:/^doc\d{3,}$/,entityName:"project-doc"}),N$=vf.create({idPattern:/^sdoc\d{3,}$/,entityName:"shared-doc"}),cW=Object.freeze({project:S$,shared:N$,detectScopeFromId:dP,isdocId:iW,getResolverForScope:kv,validateIdForScope:oW}),sq=cW});import{resolve as lv,relative as Rv,normalize as kH,isAbsolute as Ev}from"path";import{realpath as nv,lstat as ZH}from"fs/promises";var Z_=(_,q,f)=>{let K=new Error(q);return K.name=_,K.code=_,K.details=f,K},gv=(_)=>{if(!_)throw Z_("VALIDATION_ERROR","Empty path");if(Ev(_))throw Z_("VALIDATION_ERROR","Absolute path not allowed",{path:_});let q=kH(_).replaceAll("\\","/");if(q.split("/").some((K)=>K===".."))throw Z_("BOUNDARY_VIOLATION","Path contains ..",{path:_});return q},aP=(_,q)=>{let f=Rv(_,q);return f!==""&&!f.startsWith("..")&&!Ev(f)},XH=async(_,q,f)=>{let K=gv(q),$=lv(_),P=lv($,K);if(f?.followSymlinks)try{P=await nv(P)}catch(v){if(v.code!=="ENOENT")throw v}else try{if((await ZH(P)).isSymbolicLink()){let w=await nv(P);if(!aP($,w))throw Z_("BOUNDARY_VIOLATION",`Symlink target escapes boundary: '${q}' \u2192 '${w}'`,{path:q,resolved:P,target:w})}}catch(v){if(v.code!=="ENOENT"&&v.code!=="BOUNDARY_VIOLATION")throw v;if(v.code==="BOUNDARY_VIOLATION")throw v}if(!aP($,P)&&P!==$)throw Z_("BOUNDARY_VIOLATION",`Path escapes boundary: '${q}' \u2192 '${P}'`,{path:q,resolved:P,boundary:$});let j=Rv($,P).replaceAll("\\","/");return{abs:P,rel:j}},AH=(_,q)=>{let f=_.code,K=q?.path?q.resolved?`'${q.path}' \u2192 '${q.resolved}'`:`'${q.path}'`:"";switch(f){case"ENOENT":return Z_("NOT_FOUND",`File or directory not found${K?`: ${K}`:""}`,{...q,originalCode:f});case"ENOTEMPTY":return Z_("DIRECTORY_NOT_EMPTY",`Directory not empty${K?`: ${K}`:""}`,{...q,originalCode:f});case"ENOTDIR":case"EISDIR":return Z_("VALIDATION_ERROR",`Invalid path type${K?`: ${K}`:""}`,{...q,originalCode:f,reason:f==="ENOTDIR"?"not a directory":"is a directory"});case"EACCES":case"EPERM":return Z_("FS_ERROR",`Permission denied${K?`: ${K}`:""}`,{...q,originalCode:f});case"EBUSY":return Z_("FS_ERROR",`Resource busy or locked${K?`: ${K}`:""}`,{...q,originalCode:f});default:if(q)_.context=q;return _}},uH,vq;var IP=b_(()=>{uH=Object.freeze({fsError:Z_,validateRelative:gv,insideBoundary:aP,resolveWithinBoundary:XH,mapOsError:AH}),vq=uH});import{readFile as GH,writeFile as mH,unlink as dv,stat as DP,rename as rH,access as bH,mkdir as VH}from"fs/promises";import{constants as MH}from"fs";import{resolve as SH,dirname as yP,isAbsolute as NH}from"path";var CH=(_)=>{let{boundaryDir:q}=_;if(!q)throw vq.fsError("VALIDATION_ERROR","boundaryDir is required (empty string)",{boundaryDir:q});if(!NH(q))throw vq.fsError("VALIDATION_ERROR",`boundaryDir must be an absolute path: '${q}'`,{boundaryDir:q});let f=SH(q),K=async(z)=>{let{abs:H}=await vq.resolveWithinBoundary(f,z);return H},$=async(z)=>{let H=await K(z);try{return await bH(H,MH.F_OK),!0}catch{return!1}},P=async(z)=>{let H=await K(z);try{return await DP(H)}catch(h){throw vq.mapOsError(h,{path:z,resolved:H,operation:"stat"})}},j=async(z)=>{let H=await K(z),h;try{h=await DP(H)}catch(J){throw vq.mapOsError(J,{path:z,resolved:H,operation:"stat"})}if(!h.isFile())throw vq.fsError("VALIDATION_ERROR","Target is not a regular file",{path:z,resolved:H});try{return await GH(H,"utf-8")}catch(J){throw vq.mapOsError(J,{path:z,resolved:H,operation:"readFile"})}},v=async(z,H)=>{let h=await K(z),J;try{J=await DP(h)}catch(X){if(X.code==="ENOENT")J=null;else throw vq.mapOsError(X,{path:z,resolved:h,operation:"stat"})}if(J&&!J.isFile())throw vq.fsError("VALIDATION_ERROR","Target path exists and is not a regular file",{path:z,resolved:h});try{await VH(yP(h),{recursive:!0})}catch(X){throw vq.mapOsError(X,{path:yP(z),resolved:yP(h),operation:"mkdir"})}let k=`${h}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;try{await mH(k,H,{encoding:"utf-8",mode:384}),await rH(k,h)}catch(X){try{await dv(k)}catch{}throw vq.mapOsError(X,{path:z,resolved:h,operation:"writeText"})}},w=async(z)=>{let H=await K(z);try{return await dv(H),{deleted:!0}}catch(h){if(h.code==="ENOENT")return{deleted:!1};throw vq.mapOsError(h,{path:z,resolved:H,operation:"delete"})}},O=(z,H,h)=>{for(let X=0;X<H.length;X++){let{oldText:l}=H[X];if(l.length===0)throw vq.fsError("VALIDATION_ERROR",`Empty oldText in replacement at index ${X} would cause infinite loop`,{index:X})}let J=z,k=0;for(let{oldText:X,newText:l}of H)if(J.includes(X))J=J.replace(X,l),k++;if(h?.requireAll&&k!==H.length)throw vq.fsError("VALIDATION_ERROR",`Only ${k} of ${H.length} replacements were applied (requireAll=true)`,{applied:k,total:H.length});return{wouldContent:J,applied:k}};return Object.freeze({exists:$,stat:P,readText:j,resolveSafe:async(z)=>{return vq.resolveWithinBoundary(f,z)},writeText:v,delete:w,previewReplaceFirst:O,applyReplaceFirst:async(z,H,h)=>{let J=await j(z),{wouldContent:k,applied:X}=O(J,H,h);if(X===0)return{applied:0};return await v(z,k),{applied:X}}})},pH,Uf;var av=b_(()=>{IP();pH=Object.freeze({create:CH}),Uf=pH});import{mkdir as lH,rm as nH,rmdir as RH,stat as Iv,readdir as EH}from"fs/promises";import{resolve as Dv,dirname as gH,isAbsolute as yv}from"path";var dH=(_)=>{let{boundaryDir:q}=_;if(!q)throw vq.fsError("VALIDATION_ERROR","boundaryDir is required (empty string)",{boundaryDir:q});if(!yv(q))throw vq.fsError("VALIDATION_ERROR",`boundaryDir must be an absolute path: '${q}'`,{boundaryDir:q});let f=Dv(q),K=(T)=>{let Y=T.toLowerCase().replace(/[^a-z0-9-_]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");if(!Y)throw vq.fsError("VALIDATION_ERROR",`normalizeName produced empty result from input: '${T}'`,{name:T,normalized:Y});return Y},$=async(T,Y)=>{return await vq.resolveWithinBoundary(f,T,Y)};return Object.freeze({normalizeName:K,resolve:$,isInsideBoundary:(T)=>{if(!yv(T))throw vq.fsError("VALIDATION_ERROR",`targetAbs must be an absolute path: '${T}'`,{targetAbs:T});let Y=Dv(T);return vq.insideBoundary(f,Y)},ensureDir:async(T)=>{let{abs:Y}=await $(T);try{await lH(Y,{recursive:!0})}catch(z){throw vq.mapOsError(z,{path:T,resolved:Y,operation:"ensureDir"})}},parentDir:(T)=>{let Y=vq.validateRelative(T),z=gH(Y);return z==="."?z:z.replaceAll("\\","/")},stat:async(T)=>{let{abs:Y}=await $(T);try{return await Iv(Y)}catch(z){throw vq.mapOsError(z,{path:T,resolved:Y,operation:"stat"})}},deleteDir:async(T,Y)=>{if(Y?.requireEmpty&&Y?.recursive)throw vq.fsError("VALIDATION_ERROR","requireEmpty and recursive are mutually exclusive",{path:T});let{abs:z}=await $(T);if(z===f)throw vq.fsError("VALIDATION_ERROR",`Cannot delete boundary root: '${T}' \u2192 '${z}'`,{path:T,resolved:z,boundary:f});let H;try{H=await Iv(z)}catch(h){if(h.code==="ENOENT")return{deleted:!1,reason:"NOT_FOUND"};throw vq.mapOsError(h,{path:T,resolved:z,operation:"stat"})}if(!H.isDirectory())return{deleted:!1,reason:"NOT_DIR"};if(Y?.requireEmpty){let h;try{h=await EH(z)}catch(J){throw vq.mapOsError(J,{path:T,resolved:z,operation:"readdir"})}if(h.length>0)throw vq.fsError("DIRECTORY_NOT_EMPTY",`Directory not empty: '${T}' \u2192 '${z}'`,{path:T,resolved:z});try{return await RH(z),{deleted:!0}}catch(J){if(J.code==="ENOENT")return{deleted:!1,reason:"NOT_FOUND"};if(J.code==="ENOTEMPTY")throw vq.fsError("DIRECTORY_NOT_EMPTY",`Directory not empty (race condition): '${T}' \u2192 '${z}'`,{path:T,resolved:z});throw vq.mapOsError(J,{path:T,resolved:z,operation:"rmdir"})}}try{return await nH(z,{recursive:Y?.recursive??!1}),{deleted:!0}}catch(h){if(h.code==="ENOENT")return{deleted:!1,reason:"NOT_FOUND"};if(h.code==="ENOTEMPTY"||h.code==="EISDIR"||h.code==="EACCES")throw vq.fsError("DIRECTORY_NOT_EMPTY",`Directory not empty: '${T}' \u2192 '${z}'`,{path:T,resolved:z,originalCode:h.code});throw vq.mapOsError(h,{path:T,resolved:z,operation:"deleteDir"})}}})},aH,Ff;var iv=b_(()=>{IP();aH=Object.freeze({create:dH}),Ff=aH});import{dirname as IH}from"path";var ov="---",Rq=(_,q,f)=>{let K=new Error(q);if(K.code=_,f!==void 0)K.data=f;throw K},DH=(_)=>{let{fileServiceByScope:q,folderServiceByScope:f,indexFilename:K}=_,$=(V)=>{if(V==="project")return q.project;if(V==="shared")return q.shared;return Rq("INVALID_SCOPE",`Unknown scope '${V}'`,{scope:V})},P=(V)=>{if(V==="project")return f.project;if(V==="shared")return f.shared;return Rq("INVALID_SCOPE",`Unknown scope '${V}'`,{scope:V})},j=async(V)=>{if(V.scope)return{scope:V.scope};if(V.kind==="id"){let C=dP(V.id);if(!C)Rq("INVALID_ID_FORMAT",`Invalid doc ID format: '${V.id}'. Expected docNNN or sdocNNN`,{id:V.id});return{scope:C}}if(V.kind==="path"){try{if((await w("project")).pathToId[V.path])return{scope:"project"}}catch{}try{if((await w("shared")).pathToId[V.path])return{scope:"shared",fallback:!0}}catch{}return{scope:"project"}}let M=V;return Rq("VALIDATION_ERROR",`Unknown address kind: ${JSON.stringify(M)}`)},v=(V)=>{return K},w=async(V)=>{let M=v(V),C=$(V);try{let a=await C.readText(M),r=JSON.parse(a);if(!r.id&&!r.pathToId){let u={id:{},pathToId:{}};for(let[m,S]of Object.entries(r))u.id[m]={path:S},u.pathToId[S]=m;return await O(V,u),u}return r}catch(a){if(a.code==="NOT_FOUND")return{id:{},pathToId:{}};throw a}},O=async(V,M)=>{let C=v(V),a=$(V),r=JSON.stringify(M,null,2);await a.writeText(C,r)},T=(V)=>{let M=V.split(`
|
|
3
|
-
`);if(
|
|
4
|
-
`),A=
|
|
5
|
-
`).trim(),u=(S)=>{if(S.startsWith('"')&&S.endsWith('"')||S.startsWith("'")&&S.endsWith("'"))return S.slice(1,-1);return S},m={};for(let S of a){let I=S.indexOf(":");if(I===-1)continue;let D=S.slice(0,I).trim(),c=S.slice(I+1).trim();m[D]=u(c)}return{rawFrontMatter:r,frontMatter:Object.keys(m).length>0?m:void 0,bodyContent:A}},Y=(V,M)=>{switch(M.op){case"replaceOnce":{let{oldText:C,newText:a}=M;if(!V.includes(C))return{newContent:V,applied:!1};return{newContent:V.replace(C,a),applied:!0}}case"replaceAll":{let{oldText:C,newText:a}=M;if(!V.includes(C))return{newContent:V,applied:!1};let r=new RegExp(C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g");return{newContent:V.replace(r,a),applied:!0}}case"replaceRegex":{let{pattern:C,flags:a,replacement:r}=M,A=new RegExp(C,a);if(!A.test(V))return{newContent:V,applied:!1};return{newContent:V.replace(A,r),applied:!0}}case"replaceAllContent":{let{content:C}=M;return{newContent:C,applied:!0}}default:{let C=M;return Rq("VALIDATION_ERROR",`Unknown edit operation: ${JSON.stringify(C)}`)}}},z=(V)=>{return sq.isdocId(V)},H=(V)=>{if(!V||V.trim().length===0)return{valid:!1,reason:"Path cannot be empty"};if(V.startsWith("/"))return{valid:!1,reason:"Path must be relative (no leading slash)"};if(V.includes(".."))return{valid:!1,reason:'Path cannot contain ".." segments'};let C=V.replace(/\\/g,"/").replace(/^\/+|\/+$/g,"");if(/[<>:"|?*\0]/.test(C))return{valid:!1,reason:"Path contains invalid characters"};return{valid:!0,normalized:C}},h=(V)=>{let{scope:M,path:C}=V;if(M!=="project"&&M!=="shared")Rq("INVALID_SCOPE",`Scope must be 'project' or 'shared', got '${M}'`,{scope:M});let a=H(C);if(!a.valid)Rq("INVALID_PATH_FORMAT",a.reason,{path:C});return{scope:M,path:a.normalized}},J=async(V)=>{let{scope:M}=await j(V),C=P(M),a;if(V.kind==="path")a=h({...V,scope:M}).path;else{let{id:A}=V;if(!z(A))Rq("INVALID_ID_FORMAT",`ID must match pattern doc\\d{3,} or sdoc\\d{3,}, got '${A}'`,{id:A});let u=await w(M);if(!u.id[A])Rq("doc_NOT_FOUND",`No doc with ID '${A}' in scope '${M}'`,{id:A,scope:M});a=u.id[A].path}return{...await C.resolve(a),scope:M}},k=async(V)=>{if(V!=="project"&&V!=="shared")Rq("INVALID_SCOPE",`Scope must be 'project' or 'shared', got '${V}'`,{scope:V});let M=await w(V),C=V==="project"?"doc":"sdoc",a=new RegExp(`^${C}(\\d{3,})$`),r=0;for(let m of Object.keys(M.id)){let S=m.match(a);if(S){let I=parseInt(S[1],10);if(I>r)r=I}}let A=r+1;return`${C}${A.toString().padStart(3,"0")}`},X=async(V)=>{let{address:M,content:C}=V;if(M.kind!=="path")Rq("VALIDATION_ERROR","Create requires path-based addressing");let a=M.scope??"project",r=h({...M,scope:a}),{path:A}=r;if(sq.isdocId(A))Rq("INVALID_PATH_FORMAT",`Cannot create doc with path '${A}' - matches ID pattern`,{path:A,scope:a});let u=$(a),m=P(a),S=await k(a);if(await u.exists(A))Rq("doc_ALREADY_EXISTS",`doc already exists at path '${A}'`,{path:A,scope:a});let D=IH(A);if(D!==".")await m.ensureDir(D);await u.writeText(A,C);let c=await w(a);return c.id[S]={path:A},c.pathToId[A]=S,await O(a,c),{id:S,path:A}},l=async(V)=>{let{rel:M,scope:C}=await J(V),r=await $(C).readText(M),{frontMatter:A,bodyContent:u,rawFrontMatter:m}=T(r),S,I;if(V.kind==="path"){S=h({...V,scope:C}).path;let e=(await w(C)).pathToId[S];if(!e)return Rq("doc_NOT_FOUND",`doc exists but not in index: '${S}'`,{path:S,scope:C});I=e}else if(V.kind==="id"){I=V.id;let c=(await w(C)).id[I]?.path;if(!c)return Rq("doc_NOT_FOUND",`No doc with ID '${I}'`,{id:I,scope:C});S=c}else{let D=V;return Rq("VALIDATION_ERROR",`Unknown address kind: ${JSON.stringify(D)}`)}return{address:V,content:r,frontMatter:A,bodyContent:u,path:S,id:I}},N=async(V,M)=>{let{rel:C,scope:a}=await J(V),r=$(a),u=await r.readText(C),m=0;for(let S of M){let{newContent:I,applied:D}=Y(u,S);if(u=I,D)m++}if(m===0)return{applied:0};return await r.writeText(C,u),{applied:m}},n=async(V)=>{let{rel:M,scope:C}=await J(V),a=await(async()=>{if(V.kind==="id")return V.id;else if(V.kind==="path"){let S=h({...V,scope:C}),D=(await w(C)).pathToId[S.path];if(!D)return Rq("doc_NOT_FOUND",`doc not in index: '${S.path}'`,{path:S.path,scope:C});return D}else{let m=V;return Rq("VALIDATION_ERROR",`Unknown address kind: ${JSON.stringify(m)}`)}})(),r=$(C),A=!1;try{A=(await r.delete(M)).deleted}catch(m){if(m.code==="NOT_FOUND")A=!1;else throw m}let u=await w(C);if(u.id[a]){let m=u.id[a].path;delete u.id[a],delete u.pathToId[m],await O(C,u)}return{deleted:A}},R=async(V)=>{let{scope:M,pathPrefix:C,includeContent:a=!1}=V;if(M){if(M!=="project"&&M!=="shared")Rq("INVALID_SCOPE",`Scope must be 'project' or 'shared', got '${M}'`,{scope:M});return await g(M,C,a)}let r=await g("project",C,a),A=await g("shared",C,a),u=new Set(r.map((I)=>I.path)),m=new Set(A.map((I)=>I.path));for(let I of r)if(m.has(I.path))I.override="overrides";for(let I of A)if(u.has(I.path))I.override="overridden";let S=[...r,...A];return S.sort((I,D)=>I.path.localeCompare(D.path)),S},g=async(V,M,C=!1)=>{let a=$(V),r;try{r=await w(V)}catch(u){if(u.code==="NOT_FOUND"||u.code==="ENOENT")return[];throw u}let A=[];for(let[u,m]of Object.entries(r.id)){let S=m.path;if(M&&!S.startsWith(M))continue;try{if(C){let I=await a.readText(S),D=await a.stat(S),{frontMatter:c}=T(I);A.push({scope:V,id:u,path:S,synopsis:c?.synopsis,modifiedAt:D.mtime})}else{let I=await a.stat(S);A.push({scope:V,id:u,path:S,modifiedAt:I.mtime})}}catch{continue}}return A.sort((u,m)=>u.path.localeCompare(m.path)),A};return Object.freeze({create:X,read:l,editLatest:N,deleteLatest:n,list:R})},yH,cv;var Lv=b_(()=>{wf();yH=Object.freeze({create:DH}),cv=yH});var C$,p$,iP=(_)=>{if(C$.isId(_))return"project";if(p$.isId(_))return"shared";return},iH=(_)=>{return C$.isId(_)||p$.isId(_)},tv=(_)=>{return _==="project"?C$:p$},oH=(_,q)=>{return tv(q).validateId(_)},cH,oP;var ev=b_(()=>{gP();C$=vf.create({idPattern:/^tpl\d{3,}$/,entityName:"project-template"}),p$=vf.create({idPattern:/^stpl\d{3,}$/,entityName:"shared-template"}),cH=Object.freeze({project:C$,shared:p$,detectScopeFromId:iP,isTemplateId:iH,getResolverForScope:tv,validateIdForScope:oH}),oP=cH});var Lq=p((_h)=>{_h.__esModule=!0;_h.extend=xv;_h.indexOf=sH;_h.escapeExpression=BH;_h.isEmpty=UH;_h.createFrame=FH;_h.blockParams=QH;_h.appendContextPath=qh;var LH={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},tH=/[&<>"'`=]/g,eH=/[&<>"'`=]/;function xH(_){return LH[_]}function xv(_){for(var q=1;q<arguments.length;q++)for(var f in arguments[q])if(Object.prototype.hasOwnProperty.call(arguments[q],f))_[f]=arguments[q][f];return _}var LP=Object.prototype.toString;_h.toString=LP;var cP=function _(q){return typeof q==="function"};if(cP(/x/))_h.isFunction=cP=function(_){return typeof _==="function"&&LP.call(_)==="[object Function]"};_h.isFunction=cP;var sv=Array.isArray||function(_){return _&&typeof _==="object"?LP.call(_)==="[object Array]":!1};_h.isArray=sv;function sH(_,q){for(var f=0,K=_.length;f<K;f++)if(_[f]===q)return f;return-1}function BH(_){if(typeof _!=="string"){if(_&&_.toHTML)return _.toHTML();else if(_==null)return"";else if(!_)return _+"";_=""+_}if(!eH.test(_))return _;return _.replace(tH,xH)}function UH(_){if(!_&&_!==0)return!0;else if(sv(_)&&_.length===0)return!0;else return!1}function FH(_){var q=xv({},_);return q._parent=_,q}function QH(_,q){return _.path=q,_}function qh(_,q){return(_?_+".":"")+q}});var j_=p((Bv,Uv)=>{Bv.__esModule=!0;var tP=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function eP(_,q){var f=q&&q.loc,K=void 0,$=void 0,P=void 0,j=void 0;if(f)K=f.start.line,$=f.end.line,P=f.start.column,j=f.end.column,_+=" - "+K+":"+P;var v=Error.prototype.constructor.call(this,_);for(var w=0;w<tP.length;w++)this[tP[w]]=v[tP[w]];if(Error.captureStackTrace)Error.captureStackTrace(this,eP);try{if(f)if(this.lineNumber=K,this.endLineNumber=$,Object.defineProperty)Object.defineProperty(this,"column",{value:P,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:j,enumerable:!0});else this.column=P,this.endColumn=j}catch(O){}}eP.prototype=new Error;Bv.default=eP;Uv.exports=Bv.default});var q5=p((Fv,Qv)=>{Fv.__esModule=!0;var xP=Lq();Fv.default=function(_){_.registerHelper("blockHelperMissing",function(q,f){var{inverse:K,fn:$}=f;if(q===!0)return $(this);else if(q===!1||q==null)return K(this);else if(xP.isArray(q))if(q.length>0){if(f.ids)f.ids=[f.name];return _.helpers.each(q,f)}else return K(this);else{if(f.data&&f.ids){var P=xP.createFrame(f.data);P.contextPath=xP.appendContextPath(f.data.contextPath,f.name),f={data:P}}return $(q,f)}})};Qv.exports=Fv.default});var $5=p((_5,f5)=>{_5.__esModule=!0;function kh(_){return _&&_.__esModule?_:{default:_}}var Qf=Lq(),Zh=j_(),Xh=kh(Zh);_5.default=function(_){_.registerHelper("each",function(q,f){if(!f)throw new Xh.default("Must pass iterator to #each");var{fn:K,inverse:$}=f,P=0,j="",v=void 0,w=void 0;if(f.data&&f.ids)w=Qf.appendContextPath(f.data.contextPath,f.ids[0])+".";if(Qf.isFunction(q))q=q.call(this);if(f.data)v=Qf.createFrame(f.data);function O(h,J,k){if(v){if(v.key=h,v.index=J,v.first=J===0,v.last=!!k,w)v.contextPath=w+h}j=j+K(q[h],{data:v,blockParams:Qf.blockParams([q[h],h],[w+h,null])})}if(q&&typeof q==="object")if(Qf.isArray(q)){for(var T=q.length;P<T;P++)if(P in q)O(P,P,P===q.length-1)}else if(typeof Symbol==="function"&&q[Symbol.iterator]){var Y=[],z=q[Symbol.iterator]();for(var H=z.next();!H.done;H=z.next())Y.push(H.value);q=Y;for(var T=q.length;P<T;P++)O(P,P,P===q.length-1)}else(function(){var h=void 0;if(Object.keys(q).forEach(function(J){if(h!==void 0)O(h,P-1);h=J,P++}),h!==void 0)O(h,P-1,!0)})();if(P===0)j=$(this);return j})};f5.exports=_5.default});var j5=p((K5,P5)=>{K5.__esModule=!0;function Gh(_){return _&&_.__esModule?_:{default:_}}var mh=j_(),rh=Gh(mh);K5.default=function(_){_.registerHelper("helperMissing",function(){if(arguments.length===1)return;else throw new rh.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};P5.exports=K5.default});var T5=p((O5,Y5)=>{O5.__esModule=!0;function Mh(_){return _&&_.__esModule?_:{default:_}}var v5=Lq(),Sh=j_(),w5=Mh(Sh);O5.default=function(_){_.registerHelper("if",function(q,f){if(arguments.length!=2)throw new w5.default("#if requires exactly one argument");if(v5.isFunction(q))q=q.call(this);if(!f.hash.includeZero&&!q||v5.isEmpty(q))return f.inverse(this);else return f.fn(this)}),_.registerHelper("unless",function(q,f){if(arguments.length!=2)throw new w5.default("#unless requires exactly one argument");return _.helpers.if.call(this,q,{fn:f.inverse,inverse:f.fn,hash:f.hash})})};Y5.exports=O5.default});var H5=p((z5,W5)=>{z5.__esModule=!0;z5.default=function(_){_.registerHelper("log",function(){var q=[void 0],f=arguments[arguments.length-1];for(var K=0;K<arguments.length-1;K++)q.push(arguments[K]);var $=1;if(f.hash.level!=null)$=f.hash.level;else if(f.data&&f.data.level!=null)$=f.data.level;q[0]=$,_.log.apply(_,q)})};W5.exports=z5.default});var k5=p((h5,J5)=>{h5.__esModule=!0;h5.default=function(_){_.registerHelper("lookup",function(q,f,K){if(!q)return q;return K.lookupProperty(q,f)})};J5.exports=h5.default});var A5=p((Z5,X5)=>{Z5.__esModule=!0;function Eh(_){return _&&_.__esModule?_:{default:_}}var q6=Lq(),gh=j_(),dh=Eh(gh);Z5.default=function(_){_.registerHelper("with",function(q,f){if(arguments.length!=2)throw new dh.default("#with requires exactly one argument");if(q6.isFunction(q))q=q.call(this);var K=f.fn;if(!q6.isEmpty(q)){var $=f.data;if(f.data&&f.ids)$=q6.createFrame(f.data),$.contextPath=q6.appendContextPath(f.data.contextPath,f.ids[0]);return K(q,{data:$,blockParams:q6.blockParams([q],[$&&$.contextPath])})}else return f.inverse(this)})};X5.exports=Z5.default});var sP=p((fJ)=>{fJ.__esModule=!0;fJ.registerDefaultHelpers=qJ;fJ.moveHelperToHooks=_J;function M8(_){return _&&_.__esModule?_:{default:_}}var Dh=q5(),yh=M8(Dh),ih=$5(),oh=M8(ih),ch=j5(),Lh=M8(ch),th=T5(),eh=M8(th),xh=H5(),sh=M8(xh),Bh=k5(),Uh=M8(Bh),Fh=A5(),Qh=M8(Fh);function qJ(_){yh.default(_),oh.default(_),Lh.default(_),eh.default(_),sh.default(_),Uh.default(_),Qh.default(_)}function _J(_,q,f){if(_.helpers[q]){if(_.hooks[q]=_.helpers[q],!f)delete _.helpers[q]}}});var m5=p((u5,G5)=>{u5.__esModule=!0;var jJ=Lq();u5.default=function(_){_.registerDecorator("inline",function(q,f,K,$){var P=q;if(!f.partials)f.partials={},P=function(j,v){var w=K.partials;K.partials=jJ.extend({},w,f.partials);var O=q(j,v);return K.partials=w,O};return f.partials[$.args[0]]=$.fn,P})};G5.exports=u5.default});var r5=p((WJ)=>{WJ.__esModule=!0;WJ.registerDefaultDecorators=zJ;function OJ(_){return _&&_.__esModule?_:{default:_}}var YJ=m5(),TJ=OJ(YJ);function zJ(_){TJ.default(_)}});var BP=p((b5,V5)=>{b5.__esModule=!0;var JJ=Lq(),Of={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function _(q){if(typeof q==="string"){var f=JJ.indexOf(Of.methodMap,q.toLowerCase());if(f>=0)q=f;else q=parseInt(q,10)}return q},log:function _(q){if(q=Of.lookupLevel(q),typeof console!=="undefined"&&Of.lookupLevel(Of.level)<=q){var f=Of.methodMap[q];if(!console[f])f="log";for(var K=arguments.length,$=Array(K>1?K-1:0),P=1;P<K;P++)$[P-1]=arguments[P];console[f].apply(console,$)}}};b5.default=Of;V5.exports=b5.default});var M5=p((uJ)=>{uJ.__esModule=!0;uJ.createNewLookupObject=AJ;var XJ=Lq();function AJ(){for(var _=arguments.length,q=Array(_),f=0;f<_;f++)q[f]=arguments[f];return XJ.extend.apply(void 0,[Object.create(null)].concat(q))}});var UP=p((pJ)=>{pJ.__esModule=!0;pJ.createProtoAccessControl=MJ;pJ.resultIsAllowed=SJ;pJ.resetLoggedProperties=CJ;function rJ(_){return _&&_.__esModule?_:{default:_}}var S5=M5(),bJ=BP(),VJ=rJ(bJ),l$=Object.create(null);function MJ(_){var q=Object.create(null);q.constructor=!1,q.__defineGetter__=!1,q.__defineSetter__=!1,q.__lookupGetter__=!1;var f=Object.create(null);return f.__proto__=!1,{properties:{whitelist:S5.createNewLookupObject(f,_.allowedProtoProperties),defaultValue:_.allowProtoPropertiesByDefault},methods:{whitelist:S5.createNewLookupObject(q,_.allowedProtoMethods),defaultValue:_.allowProtoMethodsByDefault}}}function SJ(_,q,f){if(typeof _==="function")return N5(q.methods,f);else return N5(q.properties,f)}function N5(_,q){if(_.whitelist[q]!==void 0)return _.whitelist[q]===!0;if(_.defaultValue!==void 0)return _.defaultValue;return NJ(q),!1}function NJ(_){if(l$[_]!==!0)l$[_]=!0,VJ.default.log("error",'Handlebars: Access has been denied to resolve the property "'+_+`" because it is not an "own property" of its parent.
|
|
2
|
+
var cO=Object.create;var{getPrototypeOf:LO,defineProperty:DK,getOwnPropertyNames:tO}=Object;var eO=Object.prototype.hasOwnProperty;var yK=(_,q,f)=>{f=_!=null?cO(LO(_)):{};let K=q||!_||!_.__esModule?DK(f,"default",{value:_,enumerable:!0}):f;for(let $ of tO(_))if(!eO.call(K,$))DK(K,$,{get:()=>_[$],enumerable:!0});return K};var l=(_,q)=>()=>(q||_((q={exports:{}}).exports,q),q.exports);var $7=(_,q)=>{for(var f in q)DK(_,f,{get:q[f],enumerable:!0,configurable:!0,set:(K)=>q[f]=()=>K})};var b_=(_,q)=>()=>(_&&(q=_(_=0)),q);var a_=import.meta.require;var E7=l((K$,R7)=>{(function(_,q){typeof K$==="object"&&typeof R7!=="undefined"?q(K$):typeof define==="function"&&define.amd?define(["exports"],q):q(_.URI=_.URI||{})})(K$,function(_){function q(){for(var G=arguments.length,Z=Array(G),S=0;S<G;S++)Z[S]=arguments[S];if(Z.length>1){Z[0]=Z[0].slice(0,-1);var E=Z.length-1;for(var d=1;d<E;++d)Z[d]=Z[d].slice(1,-1);return Z[E]=Z[E].slice(1),Z.join("")}else return Z[0]}function f(G){return"(?:"+G+")"}function K(G){return G===void 0?"undefined":G===null?"null":Object.prototype.toString.call(G).split(" ").pop().split("]").shift().toLowerCase()}function $(G){return G.toUpperCase()}function P(G){return G!==void 0&&G!==null?G instanceof Array?G:typeof G.length!=="number"||G.split||G.setInterval||G.call?[G]:Array.prototype.slice.call(G):[]}function j(G,Z){var S=G;if(Z)for(var E in Z)S[E]=Z[E];return S}function v(G){var Z="[A-Za-z]",S="[\\x0D]",E="[0-9]",d="[\\x22]",x=q(E,"[A-Fa-f]"),fq="[\\x0A]",Yq="[\\x20]",Wq=f(f("%[EFef]"+x+"%"+x+x+"%"+x+x)+"|"+f("%[89A-Fa-f]"+x+"%"+x+x)+"|"+f("%"+x+x)),Cq="[\\:\\/\\?\\#\\[\\]\\@]",wq="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",mq=q(Cq,wq),pq=G?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",uq=G?"[\\uE000-\\uF8FF]":"[]",Tq=q(Z,E,"[\\-\\.\\_\\~]",pq),rq=f(Z+q(Z,E,"[\\+\\-\\.]")+"*"),hq=f(f(Wq+"|"+q(Tq,wq,"[\\:]"))+"*"),k8=f(f("25[0-5]")+"|"+f("2[0-4]"+E)+"|"+f("1"+E+E)+"|"+f("[1-9]"+E)+"|"+E),Fq=f(f("25[0-5]")+"|"+f("2[0-4]"+E)+"|"+f("1"+E+E)+"|"+f("0?[1-9]"+E)+"|0?0?"+E),f_=f(Fq+"\\."+Fq+"\\."+Fq+"\\."+Fq),Jq=f(x+"{1,4}"),Qq=f(f(Jq+"\\:"+Jq)+"|"+f_),$_=f(f(Jq+"\\:")+"{6}"+Qq),r_=f("\\:\\:"+f(Jq+"\\:")+"{5}"+Qq),Z8=f(f(Jq)+"?\\:\\:"+f(Jq+"\\:")+"{4}"+Qq),E_=f(f(f(Jq+"\\:")+"{0,1}"+Jq)+"?\\:\\:"+f(Jq+"\\:")+"{3}"+Qq),l6=f(f(f(Jq+"\\:")+"{0,2}"+Jq)+"?\\:\\:"+f(Jq+"\\:")+"{2}"+Qq),Rf=f(f(f(Jq+"\\:")+"{0,3}"+Jq)+"?\\:\\:"+Jq+"\\:"+Qq),Ef=f(f(f(Jq+"\\:")+"{0,4}"+Jq)+"?\\:\\:"+Qq),y8=f(f(f(Jq+"\\:")+"{0,5}"+Jq)+"?\\:\\:"+Jq),i8=f(f(f(Jq+"\\:")+"{0,6}"+Jq)+"?\\:\\:"),g_=f([$_,r_,Z8,E_,l6,Rf,Ef,y8,i8].join("|")),o8=f(f(Tq+"|"+Wq)+"+"),aK=f(g_+"\\%25"+o8),X8=f(g_+f("\\%25|\\%(?!"+x+"{2})")+o8),dO=f("[vV]"+x+"+\\."+q(Tq,wq,"[\\:]")+"+"),aO=f("\\["+f(X8+"|"+g_+"|"+dO)+"\\]"),Q4=f(f(Wq+"|"+q(Tq,wq))+"*"),n6=f(aO+"|"+f_+"(?!"+Q4+")|"+Q4),R6=f(E+"*"),q7=f(f(hq+"@")+"?"+n6+f("\\:"+R6)+"?"),E6=f(Wq+"|"+q(Tq,wq,"[\\:\\@]")),IO=f(E6+"*"),_7=f(E6+"+"),DO=f(f(Wq+"|"+q(Tq,wq,"[\\@]"))+"+"),d_=f(f("\\/"+IO)+"*"),c8=f("\\/"+f(_7+d_)+"?"),IK=f(DO+d_),gf=f(_7+d_),L8="(?!"+E6+")",tN=f(d_+"|"+c8+"|"+IK+"|"+gf+"|"+L8),t8=f(f(E6+"|"+q("[\\/\\?]",uq))+"*"),g6=f(f(E6+"|[\\/\\?]")+"*"),f7=f(f("\\/\\/"+q7+d_)+"|"+c8+"|"+gf+"|"+L8),yO=f(rq+"\\:"+f7+f("\\?"+t8)+"?"+f("\\#"+g6)+"?"),iO=f(f("\\/\\/"+q7+d_)+"|"+c8+"|"+IK+"|"+L8),oO=f(iO+f("\\?"+t8)+"?"+f("\\#"+g6)+"?"),eN=f(yO+"|"+oO),xN=f(rq+"\\:"+f7+f("\\?"+t8)+"?"),sN="^("+rq+")\\:"+f(f("\\/\\/("+f("("+hq+")@")+"?("+n6+")"+f("\\:("+R6+")")+"?)")+"?("+d_+"|"+c8+"|"+gf+"|"+L8+")")+f("\\?("+t8+")")+"?"+f("\\#("+g6+")")+"?$",BN="^(){0}"+f(f("\\/\\/("+f("("+hq+")@")+"?("+n6+")"+f("\\:("+R6+")")+"?)")+"?("+d_+"|"+c8+"|"+IK+"|"+L8+")")+f("\\?("+t8+")")+"?"+f("\\#("+g6+")")+"?$",UN="^("+rq+")\\:"+f(f("\\/\\/("+f("("+hq+")@")+"?("+n6+")"+f("\\:("+R6+")")+"?)")+"?("+d_+"|"+c8+"|"+gf+"|"+L8+")")+f("\\?("+t8+")")+"?$",FN="^"+f("\\#("+g6+")")+"?$",QN="^"+f("("+hq+")@")+"?("+n6+")"+f("\\:("+R6+")")+"?$";return{NOT_SCHEME:new RegExp(q("[^]",Z,E,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(q("[^\\%\\:]",Tq,wq),"g"),NOT_HOST:new RegExp(q("[^\\%\\[\\]\\:]",Tq,wq),"g"),NOT_PATH:new RegExp(q("[^\\%\\/\\:\\@]",Tq,wq),"g"),NOT_PATH_NOSCHEME:new RegExp(q("[^\\%\\/\\@]",Tq,wq),"g"),NOT_QUERY:new RegExp(q("[^\\%]",Tq,wq,"[\\:\\@\\/\\?]",uq),"g"),NOT_FRAGMENT:new RegExp(q("[^\\%]",Tq,wq,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(q("[^]",Tq,wq),"g"),UNRESERVED:new RegExp(Tq,"g"),OTHER_CHARS:new RegExp(q("[^\\%]",Tq,mq),"g"),PCT_ENCODED:new RegExp(Wq,"g"),IPV4ADDRESS:new RegExp("^("+f_+")$"),IPV6ADDRESS:new RegExp("^\\[?("+g_+")"+f(f("\\%25|\\%(?!"+x+"{2})")+"("+o8+")")+"?\\]?$")}}var w=v(!1),O=v(!0),T=function(){function G(Z,S){var E=[],d=!0,x=!1,fq=void 0;try{for(var Yq=Z[Symbol.iterator](),Wq;!(d=(Wq=Yq.next()).done);d=!0)if(E.push(Wq.value),S&&E.length===S)break}catch(Cq){x=!0,fq=Cq}finally{try{if(!d&&Yq.return)Yq.return()}finally{if(x)throw fq}}return E}return function(Z,S){if(Array.isArray(Z))return Z;else if(Symbol.iterator in Object(Z))return G(Z,S);else throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Y=function(G){if(Array.isArray(G)){for(var Z=0,S=Array(G.length);Z<G.length;Z++)S[Z]=G[Z];return S}else return Array.from(G)},z=2147483647,H=36,k=1,J=26,h=38,X=700,M=72,b=128,N="-",p=/^xn--/,g=/[^\0-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,u={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=H-k,R=Math.floor,r=String.fromCharCode;function m(G){throw new RangeError(u[G])}function A(G,Z){var S=[],E=G.length;while(E--)S[E]=Z(G[E]);return S}function V(G,Z){var S=G.split("@"),E="";if(S.length>1)E=S[0]+"@",G=S[1];G=G.replace(D,".");var d=G.split("."),x=A(d,Z).join(".");return E+x}function n(G){var Z=[],S=0,E=G.length;while(S<E){var d=G.charCodeAt(S++);if(d>=55296&&d<=56319&&S<E){var x=G.charCodeAt(S++);if((x&64512)==56320)Z.push(((d&1023)<<10)+(x&1023)+65536);else Z.push(d),S--}else Z.push(d)}return Z}var a=function G(Z){return String.fromCodePoint.apply(String,Y(Z))},I=function G(Z){if(Z-48<10)return Z-22;if(Z-65<26)return Z-65;if(Z-97<26)return Z-97;return H},c=function G(Z,S){return Z+22+75*(Z<26)-((S!=0)<<5)},o=function G(Z,S,E){var d=0;Z=E?R(Z/X):Z>>1,Z+=R(Z/S);for(;Z>C*J>>1;d+=H)Z=R(Z/C);return R(d+(C+1)*Z/(Z+h))},t=function G(Z){var S=[],E=Z.length,d=0,x=b,fq=M,Yq=Z.lastIndexOf(N);if(Yq<0)Yq=0;for(var Wq=0;Wq<Yq;++Wq){if(Z.charCodeAt(Wq)>=128)m("not-basic");S.push(Z.charCodeAt(Wq))}for(var Cq=Yq>0?Yq+1:0;Cq<E;){var wq=d;for(var mq=1,pq=H;;pq+=H){if(Cq>=E)m("invalid-input");var uq=I(Z.charCodeAt(Cq++));if(uq>=H||uq>R((z-d)/mq))m("overflow");d+=uq*mq;var Tq=pq<=fq?k:pq>=fq+J?J:pq-fq;if(uq<Tq)break;var rq=H-Tq;if(mq>R(z/rq))m("overflow");mq*=rq}var hq=S.length+1;if(fq=o(d-wq,hq,wq==0),R(d/hq)>z-x)m("overflow");x+=R(d/hq),d%=hq,S.splice(d++,0,x)}return String.fromCodePoint.apply(String,S)},Q=function G(Z){var S=[];Z=n(Z);var E=Z.length,d=b,x=0,fq=M,Yq=!0,Wq=!1,Cq=void 0;try{for(var wq=Z[Symbol.iterator](),mq;!(Yq=(mq=wq.next()).done);Yq=!0){var pq=mq.value;if(pq<128)S.push(r(pq))}}catch(X8){Wq=!0,Cq=X8}finally{try{if(!Yq&&wq.return)wq.return()}finally{if(Wq)throw Cq}}var uq=S.length,Tq=uq;if(uq)S.push(N);while(Tq<E){var rq=z,hq=!0,k8=!1,Fq=void 0;try{for(var f_=Z[Symbol.iterator](),Jq;!(hq=(Jq=f_.next()).done);hq=!0){var Qq=Jq.value;if(Qq>=d&&Qq<rq)rq=Qq}}catch(X8){k8=!0,Fq=X8}finally{try{if(!hq&&f_.return)f_.return()}finally{if(k8)throw Fq}}var $_=Tq+1;if(rq-d>R((z-x)/$_))m("overflow");x+=(rq-d)*$_,d=rq;var r_=!0,Z8=!1,E_=void 0;try{for(var l6=Z[Symbol.iterator](),Rf;!(r_=(Rf=l6.next()).done);r_=!0){var Ef=Rf.value;if(Ef<d&&++x>z)m("overflow");if(Ef==d){var y8=x;for(var i8=H;;i8+=H){var g_=i8<=fq?k:i8>=fq+J?J:i8-fq;if(y8<g_)break;var o8=y8-g_,aK=H-g_;S.push(r(c(g_+o8%aK,0))),y8=R(o8/aK)}S.push(r(c(y8,0))),fq=o(x,$_,Tq==uq),x=0,++Tq}}}catch(X8){Z8=!0,E_=X8}finally{try{if(!r_&&l6.return)l6.return()}finally{if(Z8)throw E_}}++x,++d}return S.join("")},Hq=function G(Z){return V(Z,function(S){return p.test(S)?t(S.slice(4).toLowerCase()):S})},Pq=function G(Z){return V(Z,function(S){return g.test(S)?"xn--"+Q(S):S})},_q={version:"2.1.0",ucs2:{decode:n,encode:a},decode:t,encode:Q,toASCII:Pq,toUnicode:Hq},kq={};function gq(G){var Z=G.charCodeAt(0),S=void 0;if(Z<16)S="%0"+Z.toString(16).toUpperCase();else if(Z<128)S="%"+Z.toString(16).toUpperCase();else if(Z<2048)S="%"+(Z>>6|192).toString(16).toUpperCase()+"%"+(Z&63|128).toString(16).toUpperCase();else S="%"+(Z>>12|224).toString(16).toUpperCase()+"%"+(Z>>6&63|128).toString(16).toUpperCase()+"%"+(Z&63|128).toString(16).toUpperCase();return S}function iq(G){var Z="",S=0,E=G.length;while(S<E){var d=parseInt(G.substr(S+1,2),16);if(d<128)Z+=String.fromCharCode(d),S+=3;else if(d>=194&&d<224){if(E-S>=6){var x=parseInt(G.substr(S+4,2),16);Z+=String.fromCharCode((d&31)<<6|x&63)}else Z+=G.substr(S,6);S+=6}else if(d>=224){if(E-S>=9){var fq=parseInt(G.substr(S+4,2),16),Yq=parseInt(G.substr(S+7,2),16);Z+=String.fromCharCode((d&15)<<12|(fq&63)<<6|Yq&63)}else Z+=G.substr(S,9);S+=9}else Z+=G.substr(S,3),S+=3}return Z}function x_(G,Z){function S(E){var d=iq(E);return!d.match(Z.UNRESERVED)?E:d}if(G.scheme)G.scheme=String(G.scheme).replace(Z.PCT_ENCODED,S).toLowerCase().replace(Z.NOT_SCHEME,"");if(G.userinfo!==void 0)G.userinfo=String(G.userinfo).replace(Z.PCT_ENCODED,S).replace(Z.NOT_USERINFO,gq).replace(Z.PCT_ENCODED,$);if(G.host!==void 0)G.host=String(G.host).replace(Z.PCT_ENCODED,S).toLowerCase().replace(Z.NOT_HOST,gq).replace(Z.PCT_ENCODED,$);if(G.path!==void 0)G.path=String(G.path).replace(Z.PCT_ENCODED,S).replace(G.scheme?Z.NOT_PATH:Z.NOT_PATH_NOSCHEME,gq).replace(Z.PCT_ENCODED,$);if(G.query!==void 0)G.query=String(G.query).replace(Z.PCT_ENCODED,S).replace(Z.NOT_QUERY,gq).replace(Z.PCT_ENCODED,$);if(G.fragment!==void 0)G.fragment=String(G.fragment).replace(Z.PCT_ENCODED,S).replace(Z.NOT_FRAGMENT,gq).replace(Z.PCT_ENCODED,$);return G}function n_(G){return G.replace(/^0*(.*)/,"$1")||"0"}function Nq(G,Z){var S=G.match(Z.IPV4ADDRESS)||[],E=T(S,2),d=E[1];if(d)return d.split(".").map(n_).join(".");else return G}function Vq(G,Z){var S=G.match(Z.IPV6ADDRESS)||[],E=T(S,3),d=E[1],x=E[2];if(d){var fq=d.toLowerCase().split("::").reverse(),Yq=T(fq,2),Wq=Yq[0],Cq=Yq[1],wq=Cq?Cq.split(":").map(n_):[],mq=Wq.split(":").map(n_),pq=Z.IPV4ADDRESS.test(mq[mq.length-1]),uq=pq?7:8,Tq=mq.length-uq,rq=Array(uq);for(var hq=0;hq<uq;++hq)rq[hq]=wq[hq]||mq[Tq+hq]||"";if(pq)rq[uq-1]=Nq(rq[uq-1],Z);var k8=rq.reduce(function($_,r_,Z8){if(!r_||r_==="0"){var E_=$_[$_.length-1];if(E_&&E_.index+E_.length===Z8)E_.length++;else $_.push({index:Z8,length:1})}return $_},[]),Fq=k8.sort(function($_,r_){return r_.length-$_.length})[0],f_=void 0;if(Fq&&Fq.length>1){var Jq=rq.slice(0,Fq.index),Qq=rq.slice(Fq.index+Fq.length);f_=Jq.join(":")+"::"+Qq.join(":")}else f_=rq.join(":");if(x)f_+="%"+x;return f_}else return G}var H8=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Dq="".match(/(){0}/)[1]===void 0;function zq(G){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S={},E=Z.iri!==!1?O:w;if(Z.reference==="suffix")G=(Z.scheme?Z.scheme+":":"")+"//"+G;var d=G.match(H8);if(d){if(Dq){if(S.scheme=d[1],S.userinfo=d[3],S.host=d[4],S.port=parseInt(d[5],10),S.path=d[6]||"",S.query=d[7],S.fragment=d[8],isNaN(S.port))S.port=d[5]}else if(S.scheme=d[1]||void 0,S.userinfo=G.indexOf("@")!==-1?d[3]:void 0,S.host=G.indexOf("//")!==-1?d[4]:void 0,S.port=parseInt(d[5],10),S.path=d[6]||"",S.query=G.indexOf("?")!==-1?d[7]:void 0,S.fragment=G.indexOf("#")!==-1?d[8]:void 0,isNaN(S.port))S.port=G.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?d[4]:void 0;if(S.host)S.host=Vq(Nq(S.host,E),E);if(S.scheme===void 0&&S.userinfo===void 0&&S.host===void 0&&S.port===void 0&&!S.path&&S.query===void 0)S.reference="same-document";else if(S.scheme===void 0)S.reference="relative";else if(S.fragment===void 0)S.reference="absolute";else S.reference="uri";if(Z.reference&&Z.reference!=="suffix"&&Z.reference!==S.reference)S.error=S.error||"URI is not a "+Z.reference+" reference.";var x=kq[(Z.scheme||S.scheme||"").toLowerCase()];if(!Z.unicodeSupport&&(!x||!x.unicodeSupport)){if(S.host&&(Z.domainHost||x&&x.domainHost))try{S.host=_q.toASCII(S.host.replace(E.PCT_ENCODED,iq).toLowerCase())}catch(fq){S.error=S.error||"Host's domain name can not be converted to ASCII via punycode: "+fq}x_(S,w)}else x_(S,E);if(x&&x.parse)x.parse(S,Z)}else S.error=S.error||"URI can not be parsed.";return S}function s_(G,Z){var S=Z.iri!==!1?O:w,E=[];if(G.userinfo!==void 0)E.push(G.userinfo),E.push("@");if(G.host!==void 0)E.push(Vq(Nq(String(G.host),S),S).replace(S.IPV6ADDRESS,function(d,x,fq){return"["+x+(fq?"%25"+fq:"")+"]"}));if(typeof G.port==="number"||typeof G.port==="string")E.push(":"),E.push(String(G.port));return E.length?E.join(""):void 0}var R_=/^\.\.?\//,h8=/^\/\.(\/|$)/,J8=/^\/\.\.(\/|$)/,dq=/^\/?(?:.|\n)*?(?=\/|$)/;function __(G){var Z=[];while(G.length)if(G.match(R_))G=G.replace(R_,"");else if(G.match(h8))G=G.replace(h8,"/");else if(G.match(J8))G=G.replace(J8,"/"),Z.pop();else if(G==="."||G==="..")G="";else{var S=G.match(dq);if(S){var E=S[0];G=G.slice(E.length),Z.push(E)}else throw new Error("Unexpected dot segment condition")}return Z.join("")}function tq(G){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=Z.iri?O:w,E=[],d=kq[(Z.scheme||G.scheme||"").toLowerCase()];if(d&&d.serialize)d.serialize(G,Z);if(G.host){if(S.IPV6ADDRESS.test(G.host));else if(Z.domainHost||d&&d.domainHost)try{G.host=!Z.iri?_q.toASCII(G.host.replace(S.PCT_ENCODED,iq).toLowerCase()):_q.toUnicode(G.host)}catch(Yq){G.error=G.error||"Host's domain name can not be converted to "+(!Z.iri?"ASCII":"Unicode")+" via punycode: "+Yq}}if(x_(G,S),Z.reference!=="suffix"&&G.scheme)E.push(G.scheme),E.push(":");var x=s_(G,Z);if(x!==void 0){if(Z.reference!=="suffix")E.push("//");if(E.push(x),G.path&&G.path.charAt(0)!=="/")E.push("/")}if(G.path!==void 0){var fq=G.path;if(!Z.absolutePath&&(!d||!d.absolutePath))fq=__(fq);if(x===void 0)fq=fq.replace(/^\/\//,"/%2F");E.push(fq)}if(G.query!==void 0)E.push("?"),E.push(G.query);if(G.fragment!==void 0)E.push("#"),E.push(G.fragment);return E.join("")}function oq(G,Z){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},E=arguments[3],d={};if(!E)G=zq(tq(G,S),S),Z=zq(tq(Z,S),S);if(S=S||{},!S.tolerant&&Z.scheme)d.scheme=Z.scheme,d.userinfo=Z.userinfo,d.host=Z.host,d.port=Z.port,d.path=__(Z.path||""),d.query=Z.query;else{if(Z.userinfo!==void 0||Z.host!==void 0||Z.port!==void 0)d.userinfo=Z.userinfo,d.host=Z.host,d.port=Z.port,d.path=__(Z.path||""),d.query=Z.query;else{if(!Z.path)if(d.path=G.path,Z.query!==void 0)d.query=Z.query;else d.query=G.query;else{if(Z.path.charAt(0)==="/")d.path=__(Z.path);else{if((G.userinfo!==void 0||G.host!==void 0||G.port!==void 0)&&!G.path)d.path="/"+Z.path;else if(!G.path)d.path=Z.path;else d.path=G.path.slice(0,G.path.lastIndexOf("/")+1)+Z.path;d.path=__(d.path)}d.query=Z.query}d.userinfo=G.userinfo,d.host=G.host,d.port=G.port}d.scheme=G.scheme}return d.fragment=Z.fragment,d}function G_(G,Z,S){var E=j({scheme:"null"},S);return tq(oq(zq(G,E),zq(Z,E),E,!0),E)}function Uq(G,Z){if(typeof G==="string")G=tq(zq(G,Z),Z);else if(K(G)==="object")G=zq(tq(G,Z),Z);return G}function nf(G,Z,S){if(typeof G==="string")G=tq(zq(G,S),S);else if(K(G)==="object")G=tq(G,S);if(typeof Z==="string")Z=tq(zq(Z,S),S);else if(K(Z)==="object")Z=tq(Z,S);return G===Z}function gK(G,Z){return G&&G.toString().replace(!Z||!Z.iri?w.ESCAPE:O.ESCAPE,gq)}function Y_(G,Z){return G&&G.toString().replace(!Z||!Z.iri?w.PCT_ENCODED:O.PCT_ENCODED,iq)}var C6={scheme:"http",domainHost:!0,parse:function G(Z,S){if(!Z.host)Z.error=Z.error||"HTTP URIs must have a host.";return Z},serialize:function G(Z,S){var E=String(Z.scheme).toLowerCase()==="https";if(Z.port===(E?443:80)||Z.port==="")Z.port=void 0;if(!Z.path)Z.path="/";return Z}},L4={scheme:"https",domainHost:C6.domainHost,parse:C6.parse,serialize:C6.serialize};function t4(G){return typeof G.secure==="boolean"?G.secure:String(G.scheme).toLowerCase()==="wss"}var p6={scheme:"ws",domainHost:!0,parse:function G(Z,S){var E=Z;return E.secure=t4(E),E.resourceName=(E.path||"/")+(E.query?"?"+E.query:""),E.path=void 0,E.query=void 0,E},serialize:function G(Z,S){if(Z.port===(t4(Z)?443:80)||Z.port==="")Z.port=void 0;if(typeof Z.secure==="boolean")Z.scheme=Z.secure?"wss":"ws",Z.secure=void 0;if(Z.resourceName){var E=Z.resourceName.split("?"),d=T(E,2),x=d[0],fq=d[1];Z.path=x&&x!=="/"?x:void 0,Z.query=fq,Z.resourceName=void 0}return Z.fragment=void 0,Z}},e4={scheme:"wss",domainHost:p6.domainHost,parse:p6.parse,serialize:p6.serialize},bO={},VO=!0,x4="[A-Za-z0-9\\-\\.\\_\\~"+(VO?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",m_="[0-9A-Fa-f]",MO=f(f("%[EFef]"+m_+"%"+m_+m_+"%"+m_+m_)+"|"+f("%[89A-Fa-f]"+m_+"%"+m_+m_)+"|"+f("%"+m_+m_)),SO="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",NO="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",CO=q(NO,"[\\\"\\\\]"),pO="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",lO=new RegExp(x4,"g"),D8=new RegExp(MO,"g"),nO=new RegExp(q("[^]",SO,"[\\.]","[\\\"]",CO),"g"),s4=new RegExp(q("[^]",x4,pO),"g"),RO=s4;function dK(G){var Z=iq(G);return!Z.match(lO)?G:Z}var B4={scheme:"mailto",parse:function G(Z,S){var E=Z,d=E.to=E.path?E.path.split(","):[];if(E.path=void 0,E.query){var x=!1,fq={},Yq=E.query.split("&");for(var Wq=0,Cq=Yq.length;Wq<Cq;++Wq){var wq=Yq[Wq].split("=");switch(wq[0]){case"to":var mq=wq[1].split(",");for(var pq=0,uq=mq.length;pq<uq;++pq)d.push(mq[pq]);break;case"subject":E.subject=Y_(wq[1],S);break;case"body":E.body=Y_(wq[1],S);break;default:x=!0,fq[Y_(wq[0],S)]=Y_(wq[1],S);break}}if(x)E.headers=fq}E.query=void 0;for(var Tq=0,rq=d.length;Tq<rq;++Tq){var hq=d[Tq].split("@");if(hq[0]=Y_(hq[0]),!S.unicodeSupport)try{hq[1]=_q.toASCII(Y_(hq[1],S).toLowerCase())}catch(k8){E.error=E.error||"Email address's domain name can not be converted to ASCII via punycode: "+k8}else hq[1]=Y_(hq[1],S).toLowerCase();d[Tq]=hq.join("@")}return E},serialize:function G(Z,S){var E=Z,d=P(Z.to);if(d){for(var x=0,fq=d.length;x<fq;++x){var Yq=String(d[x]),Wq=Yq.lastIndexOf("@"),Cq=Yq.slice(0,Wq).replace(D8,dK).replace(D8,$).replace(nO,gq),wq=Yq.slice(Wq+1);try{wq=!S.iri?_q.toASCII(Y_(wq,S).toLowerCase()):_q.toUnicode(wq)}catch(Tq){E.error=E.error||"Email address's domain name can not be converted to "+(!S.iri?"ASCII":"Unicode")+" via punycode: "+Tq}d[x]=Cq+"@"+wq}E.path=d.join(",")}var mq=Z.headers=Z.headers||{};if(Z.subject)mq.subject=Z.subject;if(Z.body)mq.body=Z.body;var pq=[];for(var uq in mq)if(mq[uq]!==bO[uq])pq.push(uq.replace(D8,dK).replace(D8,$).replace(s4,gq)+"="+mq[uq].replace(D8,dK).replace(D8,$).replace(RO,gq));if(pq.length)E.query=pq.join("&");return E}},EO=/^([^\:]+)\:(.*)/,U4={scheme:"urn",parse:function G(Z,S){var E=Z.path&&Z.path.match(EO),d=Z;if(E){var x=S.scheme||d.scheme||"urn",fq=E[1].toLowerCase(),Yq=E[2],Wq=x+":"+(S.nid||fq),Cq=kq[Wq];if(d.nid=fq,d.nss=Yq,d.path=void 0,Cq)d=Cq.parse(d,S)}else d.error=d.error||"URN can not be parsed.";return d},serialize:function G(Z,S){var E=S.scheme||Z.scheme||"urn",d=Z.nid,x=E+":"+(S.nid||d),fq=kq[x];if(fq)Z=fq.serialize(Z,S);var Yq=Z,Wq=Z.nss;return Yq.path=(d||S.nid)+":"+Wq,Yq}},gO=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,F4={scheme:"urn:uuid",parse:function G(Z,S){var E=Z;if(E.uuid=E.nss,E.nss=void 0,!S.tolerant&&(!E.uuid||!E.uuid.match(gO)))E.error=E.error||"UUID is not valid.";return E},serialize:function G(Z,S){var E=Z;return E.nss=(Z.uuid||"").toLowerCase(),E}};kq[C6.scheme]=C6,kq[L4.scheme]=L4,kq[p6.scheme]=p6,kq[e4.scheme]=e4,kq[B4.scheme]=B4,kq[U4.scheme]=U4,kq[F4.scheme]=F4,_.SCHEMES=kq,_.pctEncChar=gq,_.pctDecChars=iq,_.parse=zq,_.removeDotSegments=__,_.serialize=tq,_.resolveComponents=oq,_.resolve=G_,_.normalize=Uq,_.equal=nf,_.escapeComponent=gK,_.unescapeComponent=Y_,Object.defineProperty(_,"__esModule",{value:!0})})});var P$=l((aC,g7)=>{g7.exports=function _(q,f){if(q===f)return!0;if(q&&f&&typeof q=="object"&&typeof f=="object"){if(q.constructor!==f.constructor)return!1;var K,$,P;if(Array.isArray(q)){if(K=q.length,K!=f.length)return!1;for($=K;$--!==0;)if(!_(q[$],f[$]))return!1;return!0}if(q.constructor===RegExp)return q.source===f.source&&q.flags===f.flags;if(q.valueOf!==Object.prototype.valueOf)return q.valueOf()===f.valueOf();if(q.toString!==Object.prototype.toString)return q.toString()===f.toString();if(P=Object.keys(q),K=P.length,K!==Object.keys(f).length)return!1;for($=K;$--!==0;)if(!Object.prototype.hasOwnProperty.call(f,P[$]))return!1;for($=K;$--!==0;){var j=P[$];if(!_(q[j],f[j]))return!1}return!0}return q!==q&&f!==f}});var a7=l((IC,d7)=>{d7.exports=function _(q){var f=0,K=q.length,$=0,P;while($<K)if(f++,P=q.charCodeAt($++),P>=55296&&P<=56319&&$<K){if(P=q.charCodeAt($),(P&64512)==56320)$++}return f}});var b8=l((DC,y7)=>{y7.exports={copy:xT,checkDataType:KP,checkDataTypes:sT,coerceToTypes:BT,toHash:jP,getProperty:vP,escapeQuotes:wP,equal:P$(),ucs2length:a7(),varOccurences:QT,varReplace:qz,schemaHasRules:_z,schemaHasRulesExcept:fz,schemaUnknownRules:$z,toQuotedString:PP,getPathExpr:Kz,getPath:Pz,getData:wz,unescapeFragment:Oz,unescapeJsonPointer:YP,escapeFragment:Yz,escapeJsonPointer:OP};function xT(_,q){q=q||{};for(var f in _)q[f]=_[f];return q}function KP(_,q,f,K){var $=K?" !== ":" === ",P=K?" || ":" && ",j=K?"!":"",v=K?"":"!";switch(_){case"null":return q+$+"null";case"array":return j+"Array.isArray("+q+")";case"object":return"("+j+q+P+"typeof "+q+$+'"object"'+P+v+"Array.isArray("+q+"))";case"integer":return"(typeof "+q+$+'"number"'+P+v+"("+q+" % 1)"+P+q+$+q+(f?P+j+"isFinite("+q+")":"")+")";case"number":return"(typeof "+q+$+'"'+_+'"'+(f?P+j+"isFinite("+q+")":"")+")";default:return"typeof "+q+$+'"'+_+'"'}}function sT(_,q,f){switch(_.length){case 1:return KP(_[0],q,f,!0);default:var K="",$=jP(_);if($.array&&$.object)K=$.null?"(":"(!"+q+" || ",K+="typeof "+q+' !== "object")',delete $.null,delete $.array,delete $.object;if($.number)delete $.integer;for(var P in $)K+=(K?" && ":"")+KP(P,q,f,!0);return K}}var I7=jP(["string","number","integer","boolean","null"]);function BT(_,q){if(Array.isArray(q)){var f=[];for(var K=0;K<q.length;K++){var $=q[K];if(I7[$])f[f.length]=$;else if(_==="array"&&$==="array")f[f.length]=$}if(f.length)return f}else if(I7[q])return[q];else if(_==="array"&&q==="array")return["array"]}function jP(_){var q={};for(var f=0;f<_.length;f++)q[_[f]]=!0;return q}var UT=/^[a-z$_][a-z$_0-9]*$/i,FT=/'|\\/g;function vP(_){return typeof _=="number"?"["+_+"]":UT.test(_)?"."+_:"['"+wP(_)+"']"}function wP(_){return _.replace(FT,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function QT(_,q){q+="[^0-9]";var f=_.match(new RegExp(q,"g"));return f?f.length:0}function qz(_,q,f){return q+="([^0-9])",f=f.replace(/\$/g,"$$$$"),_.replace(new RegExp(q,"g"),f+"$1")}function _z(_,q){if(typeof _=="boolean")return!_;for(var f in _)if(q[f])return!0}function fz(_,q,f){if(typeof _=="boolean")return!_&&f!="not";for(var K in _)if(K!=f&&q[K])return!0}function $z(_,q){if(typeof _=="boolean")return;for(var f in _)if(!q[f])return f}function PP(_){return"'"+wP(_)+"'"}function Kz(_,q,f,K){var $=f?"'/' + "+q+(K?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):K?"'[' + "+q+" + ']'":"'[\\'' + "+q+" + '\\']'";return D7(_,$)}function Pz(_,q,f){var K=f?PP("/"+OP(q)):PP(vP(q));return D7(_,K)}var jz=/^\/(?:[^~]|~0|~1)*$/,vz=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function wz(_,q,f){var K,$,P,j;if(_==="")return"rootData";if(_[0]=="/"){if(!jz.test(_))throw new Error("Invalid JSON-pointer: "+_);$=_,P="rootData"}else{if(j=_.match(vz),!j)throw new Error("Invalid JSON-pointer: "+_);if(K=+j[1],$=j[2],$=="#"){if(K>=q)throw new Error("Cannot access property/index "+K+" levels up, current level is "+q);return f[q-K]}if(K>q)throw new Error("Cannot access data "+K+" levels up, current level is "+q);if(P="data"+(q-K||""),!$)return P}var v=P,w=$.split("/");for(var O=0;O<w.length;O++){var T=w[O];if(T)P+=vP(YP(T)),v+=" && "+P}return v}function D7(_,q){if(_=='""')return q;return(_+" + "+q).replace(/([^\\])' \+ '/g,"$1")}function Oz(_){return YP(decodeURIComponent(_))}function Yz(_){return encodeURIComponent(OP(_))}function OP(_){return _.replace(/~/g,"~0").replace(/\//g,"~1")}function YP(_){return _.replace(/~1/g,"/").replace(/~0/g,"~")}});var TP=l((yC,i7)=>{var Tz=b8();i7.exports=zz;function zz(_){Tz.copy(_,this)}});var c7=l((iC,o7)=>{var _8=o7.exports=function(_,q,f){if(typeof q=="function")f=q,q={};f=q.cb||f;var K=typeof f=="function"?f:f.pre||function(){},$=f.post||function(){};j$(q,K,$,_,"",_)};_8.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0};_8.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};_8.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};_8.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 j$(_,q,f,K,$,P,j,v,w,O){if(K&&typeof K=="object"&&!Array.isArray(K)){q(K,$,P,j,v,w,O);for(var T in K){var Y=K[T];if(Array.isArray(Y)){if(T in _8.arrayKeywords)for(var z=0;z<Y.length;z++)j$(_,q,f,Y[z],$+"/"+T+"/"+z,P,$,T,K,z)}else if(T in _8.propsKeywords){if(Y&&typeof Y=="object")for(var H in Y)j$(_,q,f,Y[H],$+"/"+T+"/"+Wz(H),P,$,T,K,H)}else if(T in _8.keywords||_.allKeys&&!(T in _8.skipKeywords))j$(_,q,f,Y,$+"/"+T,P,$,T,K)}f(K,$,P,j,v,w,O)}}function Wz(_){return _.replace(/~/g,"~0").replace(/\//g,"~1")}});var z$=l((oC,x7)=>{var x6=E7(),L7=P$(),Y$=b8(),v$=TP(),Hz=c7();x7.exports=$8;$8.normalizeId=f8;$8.fullPath=w$;$8.url=O$;$8.ids=Xz;$8.inlineRef=zP;$8.schema=T$;function $8(_,q,f){var K=this._refs[f];if(typeof K=="string")if(this._refs[K])K=this._refs[K];else return $8.call(this,_,q,K);if(K=K||this._schemas[f],K instanceof v$)return zP(K.schema,this._opts.inlineRefs)?K.schema:K.validate||this._compile(K);var $=T$.call(this,q,f),P,j,v;if($)P=$.schema,q=$.root,v=$.baseId;if(P instanceof v$)j=P.validate||_.call(this,P.schema,q,void 0,v);else if(P!==void 0)j=zP(P,this._opts.inlineRefs)?P:_.call(this,P,q,void 0,v);return j}function T$(_,q){var f=x6.parse(q),K=e7(f),$=w$(this._getId(_.schema));if(Object.keys(_.schema).length===0||K!==$){var P=f8(K),j=this._refs[P];if(typeof j=="string")return hz.call(this,_,j,f);else if(j instanceof v$){if(!j.validate)this._compile(j);_=j}else if(j=this._schemas[P],j instanceof v$){if(!j.validate)this._compile(j);if(P==f8(q))return{schema:j,root:_,baseId:$};_=j}else return;if(!_.schema)return;$=w$(this._getId(_.schema))}return t7.call(this,f,$,_.schema,_)}function hz(_,q,f){var K=T$.call(this,_,q);if(K){var{schema:$,baseId:P}=K;_=K.root;var j=this._getId($);if(j)P=O$(P,j);return t7.call(this,f,P,$,_)}}var Jz=Y$.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function t7(_,q,f,K){if(_.fragment=_.fragment||"",_.fragment.slice(0,1)!="/")return;var $=_.fragment.split("/");for(var P=1;P<$.length;P++){var j=$[P];if(j){if(j=Y$.unescapeFragment(j),f=f[j],f===void 0)break;var v;if(!Jz[j]){if(v=this._getId(f),v)q=O$(q,v);if(f.$ref){var w=O$(q,f.$ref),O=T$.call(this,K,w);if(O)f=O.schema,K=O.root,q=O.baseId}}}}if(f!==void 0&&f!==K.schema)return{schema:f,root:K,baseId:q}}var kz=Y$.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function zP(_,q){if(q===!1)return!1;if(q===void 0||q===!0)return WP(_);else if(q)return HP(_)<=q}function WP(_){var q;if(Array.isArray(_)){for(var f=0;f<_.length;f++)if(q=_[f],typeof q=="object"&&!WP(q))return!1}else for(var K in _){if(K=="$ref")return!1;if(q=_[K],typeof q=="object"&&!WP(q))return!1}return!0}function HP(_){var q=0,f;if(Array.isArray(_))for(var K=0;K<_.length;K++){if(f=_[K],typeof f=="object")q+=HP(f);if(q==1/0)return 1/0}else for(var $ in _){if($=="$ref")return 1/0;if(kz[$])q++;else{if(f=_[$],typeof f=="object")q+=HP(f)+1;if(q==1/0)return 1/0}}return q}function w$(_,q){if(q!==!1)_=f8(_);var f=x6.parse(_);return e7(f)}function e7(_){return x6.serialize(_).split("#")[0]+"#"}var Zz=/#\/?$/;function f8(_){return _?_.replace(Zz,""):""}function O$(_,q){return q=f8(q),x6.resolve(_,q)}function Xz(_){var q=f8(this._getId(_)),f={"":q},K={"":w$(q,!1)},$={},P=this;return Hz(_,{allKeys:!0},function(j,v,w,O,T,Y,z){if(v==="")return;var H=P._getId(j),k=f[O],J=K[O]+"/"+T;if(z!==void 0)J+="/"+(typeof z=="number"?z:Y$.escapeFragment(z));if(typeof H=="string"){H=k=f8(k?x6.resolve(k,H):H);var h=P._refs[H];if(typeof h=="string")h=P._refs[h];if(h&&h.schema){if(!L7(j,h.schema))throw new Error('id "'+H+'" resolves to more than one schema')}else if(H!=f8(J))if(H[0]=="#"){if($[H]&&!L7(j,$[H]))throw new Error('id "'+H+'" resolves to more than one schema');$[H]=j}else P._refs[H]=J}f[v]=k,K[v]=J}),$}});var W$=l((cC,B7)=>{var hP=z$();B7.exports={Validation:s7(Az),MissingRef:s7(JP)};function Az(_){this.message="validation failed",this.errors=_,this.ajv=this.validation=!0}JP.message=function(_,q){return"can't resolve reference "+q+" from id "+_};function JP(_,q,f){this.message=f||JP.message(_,q),this.missingRef=hP.url(_,q),this.missingSchema=hP.normalizeId(hP.fullPath(this.missingRef))}function s7(_){return _.prototype=Object.create(Error.prototype),_.prototype.constructor=_,_}});var kP=l((LC,U7)=>{U7.exports=function(_,q){if(!q)q={};if(typeof q==="function")q={cmp:q};var f=typeof q.cycles==="boolean"?q.cycles:!1,K=q.cmp&&function(P){return function(j){return function(v,w){var O={key:v,value:j[v]},T={key:w,value:j[w]};return P(O,T)}}}(q.cmp),$=[];return function P(j){if(j&&j.toJSON&&typeof j.toJSON==="function")j=j.toJSON();if(j===void 0)return;if(typeof j=="number")return isFinite(j)?""+j:"null";if(typeof j!=="object")return JSON.stringify(j);var v,w;if(Array.isArray(j)){w="[";for(v=0;v<j.length;v++){if(v)w+=",";w+=P(j[v])||"null"}return w+"]"}if(j===null)return"null";if($.indexOf(j)!==-1){if(f)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var O=$.push(j)-1,T=Object.keys(j).sort(K&&K(j));w="";for(v=0;v<T.length;v++){var Y=T[v],z=P(j[Y]);if(!z)continue;if(w)w+=",";w+=JSON.stringify(Y)+":"+z}return $.splice(O,1),"{"+w+"}"}(_)}});var ZP=l((tC,F7)=>{F7.exports=function _(q,f,K){var $="",P=q.schema.$async===!0,j=q.util.schemaHasRulesExcept(q.schema,q.RULES.all,"$ref"),v=q.self._getId(q.schema);if(q.opts.strictKeywords){var w=q.util.schemaUnknownRules(q.schema,q.RULES.keywords);if(w){var O="unknown keyword: "+w;if(q.opts.strictKeywords==="log")q.logger.warn(O);else throw new Error(O)}}if(q.isTop){if($+=" var validate = ",P)q.async=!0,$+="async ";if($+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",v&&(q.opts.sourceCode||q.opts.processCode))$+=" "+("/*# sourceURL="+v+" */")+" "}if(typeof q.schema=="boolean"||!(j||q.schema.$ref)){var f="false schema",T=q.level,Y=q.dataLevel,z=q.schema[f],H=q.schemaPath+q.util.getProperty(f),k=q.errSchemaPath+"/"+f,p=!q.opts.allErrors,u,J="data"+(Y||""),N="valid"+T;if(q.schema===!1){if(q.isTop)p=!0;else $+=" var "+N+" = false; ";var h=h||[];if(h.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(u||"false schema")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(k)+" , params: {} ",q.opts.messages!==!1)$+=" , message: 'boolean schema is false' ";if(q.opts.verbose)$+=" , schema: false , parentSchema: validate.schema"+q.schemaPath+" , data: "+J+" ";$+=" } "}else $+=" {} ";var X=$;if($=h.pop(),!q.compositeRule&&p)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else if(q.isTop)if(P)$+=" return data; ";else $+=" validate.errors = null; return true; ";else $+=" var "+N+" = true; ";if(q.isTop)$+=" }; return validate; ";return $}if(q.isTop){var M=q.isTop,T=q.level=0,Y=q.dataLevel=0,J="data";if(q.rootId=q.resolve.fullPath(q.self._getId(q.root.schema)),q.baseId=q.baseId||q.rootId,delete q.isTop,q.dataPathArr=[""],q.schema.default!==void 0&&q.opts.useDefaults&&q.opts.strictDefaults){var b="default is ignored in the schema root";if(q.opts.strictDefaults==="log")q.logger.warn(b);else throw new Error(b)}$+=" var vErrors = null; ",$+=" var errors = 0; ",$+=" if (rootData === undefined) rootData = data; "}else{var{level:T,dataLevel:Y}=q,J="data"+(Y||"");if(v)q.baseId=q.resolve.url(q.baseId,v);if(P&&!q.async)throw new Error("async schema in sync schema");$+=" var errs_"+T+" = errors;"}var N="valid"+T,p=!q.opts.allErrors,g="",D="",u,C=q.schema.type,R=Array.isArray(C);if(C&&q.opts.nullable&&q.schema.nullable===!0){if(R){if(C.indexOf("null")==-1)C=C.concat("null")}else if(C!="null")C=[C,"null"],R=!0}if(R&&C.length==1)C=C[0],R=!1;if(q.schema.$ref&&j){if(q.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+q.errSchemaPath+'" (see option extendRefs)');else if(q.opts.extendRefs!==!0)j=!1,q.logger.warn('$ref: keywords ignored in schema at path "'+q.errSchemaPath+'"')}if(q.schema.$comment&&q.opts.$comment)$+=" "+q.RULES.all.$comment.code(q,"$comment");if(C){if(q.opts.coerceTypes)var r=q.util.coerceToTypes(q.opts.coerceTypes,C);var m=q.RULES.types[C];if(r||R||m===!0||m&&!dq(m)){var H=q.schemaPath+".type",k=q.errSchemaPath+"/type",H=q.schemaPath+".type",k=q.errSchemaPath+"/type",A=R?"checkDataTypes":"checkDataType";if($+=" if ("+q.util[A](C,J,q.opts.strictNumbers,!0)+") { ",r){var V="dataType"+T,n="coerced"+T;if($+=" var "+V+" = typeof "+J+"; var "+n+" = undefined; ",q.opts.coerceTypes=="array")$+=" if ("+V+" == 'object' && Array.isArray("+J+") && "+J+".length == 1) { "+J+" = "+J+"[0]; "+V+" = typeof "+J+"; if ("+q.util.checkDataType(q.schema.type,J,q.opts.strictNumbers)+") "+n+" = "+J+"; } ";$+=" if ("+n+" !== undefined) ; ";var a=r;if(a){var I,c=-1,o=a.length-1;while(c<o)if(I=a[c+=1],I=="string")$+=" else if ("+V+" == 'number' || "+V+" == 'boolean') "+n+" = '' + "+J+"; else if ("+J+" === null) "+n+" = ''; ";else if(I=="number"||I=="integer"){if($+=" else if ("+V+" == 'boolean' || "+J+" === null || ("+V+" == 'string' && "+J+" && "+J+" == +"+J+" ",I=="integer")$+=" && !("+J+" % 1)";$+=")) "+n+" = +"+J+"; "}else if(I=="boolean")$+=" else if ("+J+" === 'false' || "+J+" === 0 || "+J+" === null) "+n+" = false; else if ("+J+" === 'true' || "+J+" === 1) "+n+" = true; ";else if(I=="null")$+=" else if ("+J+" === '' || "+J+" === 0 || "+J+" === false) "+n+" = null; ";else if(q.opts.coerceTypes=="array"&&I=="array")$+=" else if ("+V+" == 'string' || "+V+" == 'number' || "+V+" == 'boolean' || "+J+" == null) "+n+" = ["+J+"]; "}$+=" else { ";var h=h||[];if(h.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(u||"type")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(k)+" , params: { type: '",R)$+=""+C.join(",");else $+=""+C;if($+="' } ",q.opts.messages!==!1){if($+=" , message: 'should be ",R)$+=""+C.join(",");else $+=""+C;$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+H+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+J+" ";$+=" } "}else $+=" {} ";var X=$;if($=h.pop(),!q.compositeRule&&p)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";$+=" } if ("+n+" !== undefined) { ";var t=Y?"data"+(Y-1||""):"parentData",Q=Y?q.dataPathArr[Y]:"parentDataProperty";if($+=" "+J+" = "+n+"; ",!Y)$+="if ("+t+" !== undefined)";$+=" "+t+"["+Q+"] = "+n+"; } "}else{var h=h||[];if(h.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(u||"type")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(k)+" , params: { type: '",R)$+=""+C.join(",");else $+=""+C;if($+="' } ",q.opts.messages!==!1){if($+=" , message: 'should be ",R)$+=""+C.join(",");else $+=""+C;$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+H+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+J+" ";$+=" } "}else $+=" {} ";var X=$;if($=h.pop(),!q.compositeRule&&p)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}$+=" } "}}if(q.schema.$ref&&!j){if($+=" "+q.RULES.all.$ref.code(q,"$ref")+" ",p){if($+=" } if (errors === ",M)$+="0";else $+="errs_"+T;$+=") { ",D+="}"}}else{var Hq=q.RULES;if(Hq){var m,Pq=-1,_q=Hq.length-1;while(Pq<_q)if(m=Hq[Pq+=1],dq(m)){if(m.type)$+=" if ("+q.util.checkDataType(m.type,J,q.opts.strictNumbers)+") { ";if(q.opts.useDefaults){if(m.type=="object"&&q.schema.properties){var z=q.schema.properties,kq=Object.keys(z),gq=kq;if(gq){var iq,x_=-1,n_=gq.length-1;while(x_<n_){iq=gq[x_+=1];var Nq=z[iq];if(Nq.default!==void 0){var Vq=J+q.util.getProperty(iq);if(q.compositeRule){if(q.opts.strictDefaults){var b="default is ignored for: "+Vq;if(q.opts.strictDefaults==="log")q.logger.warn(b);else throw new Error(b)}}else{if($+=" if ("+Vq+" === undefined ",q.opts.useDefaults=="empty")$+=" || "+Vq+" === null || "+Vq+" === '' ";if($+=" ) "+Vq+" = ",q.opts.useDefaults=="shared")$+=" "+q.useDefault(Nq.default)+" ";else $+=" "+JSON.stringify(Nq.default)+" ";$+="; "}}}}}else if(m.type=="array"&&Array.isArray(q.schema.items)){var H8=q.schema.items;if(H8){var Nq,c=-1,Dq=H8.length-1;while(c<Dq)if(Nq=H8[c+=1],Nq.default!==void 0){var Vq=J+"["+c+"]";if(q.compositeRule){if(q.opts.strictDefaults){var b="default is ignored for: "+Vq;if(q.opts.strictDefaults==="log")q.logger.warn(b);else throw new Error(b)}}else{if($+=" if ("+Vq+" === undefined ",q.opts.useDefaults=="empty")$+=" || "+Vq+" === null || "+Vq+" === '' ";if($+=" ) "+Vq+" = ",q.opts.useDefaults=="shared")$+=" "+q.useDefault(Nq.default)+" ";else $+=" "+JSON.stringify(Nq.default)+" ";$+="; "}}}}}var zq=m.rules;if(zq){var s_,R_=-1,h8=zq.length-1;while(R_<h8)if(s_=zq[R_+=1],__(s_)){var J8=s_.code(q,s_.keyword,m.type);if(J8){if($+=" "+J8+" ",p)g+="}"}}}if(p)$+=" "+g+" ",g="";if(m.type){if($+=" } ",C&&C===m.type&&!r){$+=" else { ";var H=q.schemaPath+".type",k=q.errSchemaPath+"/type",h=h||[];if(h.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(u||"type")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(k)+" , params: { type: '",R)$+=""+C.join(",");else $+=""+C;if($+="' } ",q.opts.messages!==!1){if($+=" , message: 'should be ",R)$+=""+C.join(",");else $+=""+C;$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+H+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+J+" ";$+=" } "}else $+=" {} ";var X=$;if($=h.pop(),!q.compositeRule&&p)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";$+=" } "}}if(p){if($+=" if (errors === ",M)$+="0";else $+="errs_"+T;$+=") { ",D+="}"}}}}if(p)$+=" "+D+" ";if(M){if(P)$+=" if (errors === 0) return data; ",$+=" else throw new ValidationError(vErrors); ";else $+=" validate.errors = vErrors; ",$+=" return errors === 0; ";$+=" }; return validate;"}else $+=" var "+N+" = errors === errs_"+T+";";function dq(oq){var G_=oq.rules;for(var Uq=0;Uq<G_.length;Uq++)if(__(G_[Uq]))return!0}function __(oq){return q.schema[oq.keyword]!==void 0||oq.implements&&tq(oq)}function tq(oq){var G_=oq.implements;for(var Uq=0;Uq<G_.length;Uq++)if(q.schema[G_[Uq]]!==void 0)return!0}return $}});var $j=l((eC,fj)=>{var H$=z$(),J$=b8(),qj=W$(),uz=kP(),Q7=ZP(),Gz=J$.ucs2length,mz=P$(),rz=qj.Validation;fj.exports=XP;function XP(_,q,f,K){var $=this,P=this._opts,j=[void 0],v={},w=[],O={},T=[],Y={},z=[];q=q||{schema:_,refVal:j,refs:v};var H=bz.call(this,_,q,K),k=this._compilations[H.index];if(H.compiling)return k.callValidate=b;var J=this._formats,h=this.RULES;try{var X=N(_,q,f,K);k.validate=X;var M=k.callValidate;if(M){if(M.schema=X.schema,M.errors=null,M.refs=X.refs,M.refVal=X.refVal,M.root=X.root,M.$async=X.$async,P.sourceCode)M.source=X.source}return X}finally{Vz.call(this,_,q,K)}function b(){var A=k.validate,V=A.apply(this,arguments);return b.errors=A.errors,V}function N(A,V,n,a){var I=!V||V&&V.schema==A;if(V.schema!=q.schema)return XP.call($,A,V,n,a);var c=A.$async===!0,o=Q7({isTop:!0,schema:A,isRoot:I,baseId:a,root:V,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:qj.MissingRef,RULES:h,validate:Q7,util:J$,resolve:H$,resolveRef:p,usePattern:R,useDefault:r,useCustomRule:m,opts:P,formats:J,logger:$.logger,self:$});if(o=h$(j,Nz)+h$(w,Mz)+h$(T,Sz)+h$(z,Cz)+o,P.processCode)o=P.processCode(o,A);var t;try{var Q=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",o);t=Q($,h,J,q,j,T,z,mz,Gz,rz),j[0]=t}catch(Hq){throw $.logger.error("Error compiling schema, function code:",o),Hq}if(t.schema=A,t.errors=null,t.refs=v,t.refVal=j,t.root=I?t:V,c)t.$async=!0;if(P.sourceCode===!0)t.source={code:o,patterns:w,defaults:T};return t}function p(A,V,n){V=H$.url(A,V);var a=v[V],I,c;if(a!==void 0)return I=j[a],c="refVal["+a+"]",C(I,c);if(!n&&q.refs){var o=q.refs[V];if(o!==void 0)return I=q.refVal[o],c=g(V,I),C(I,c)}c=g(V);var t=H$.call($,N,q,V);if(t===void 0){var Q=f&&f[V];if(Q)t=H$.inlineRef(Q,P.inlineRefs)?Q:XP.call($,Q,q,f,A)}if(t===void 0)D(V);else return u(V,t),C(t,c)}function g(A,V){var n=j.length;return j[n]=V,v[A]=n,"refVal"+n}function D(A){delete v[A]}function u(A,V){var n=v[A];j[n]=V}function C(A,V){return typeof A=="object"||typeof A=="boolean"?{code:V,schema:A,inline:!0}:{code:V,$async:A&&!!A.$async}}function R(A){var V=O[A];if(V===void 0)V=O[A]=w.length,w[V]=A;return"pattern"+V}function r(A){switch(typeof A){case"boolean":case"number":return""+A;case"string":return J$.toQuotedString(A);case"object":if(A===null)return"null";var V=uz(A),n=Y[V];if(n===void 0)n=Y[V]=T.length,T[n]=A;return"default"+n}}function m(A,V,n,a){if($._opts.validateSchema!==!1){var I=A.definition.dependencies;if(I&&!I.every(function(gq){return Object.prototype.hasOwnProperty.call(n,gq)}))throw new Error("parent schema must have all required keywords: "+I.join(","));var c=A.definition.validateSchema;if(c){var o=c(V);if(!o){var t="keyword schema is invalid: "+$.errorsText(c.errors);if($._opts.validateSchema=="log")$.logger.error(t);else throw new Error(t)}}}var Q=A.definition.compile,Hq=A.definition.inline,Pq=A.definition.macro,_q;if(Q)_q=Q.call($,V,n,a);else if(Pq){if(_q=Pq.call($,V,n,a),P.validateSchema!==!1)$.validateSchema(_q,!0)}else if(Hq)_q=Hq.call($,a,A.keyword,V,n);else if(_q=A.definition.validate,!_q)return;if(_q===void 0)throw new Error('custom keyword "'+A.keyword+'"failed to compile');var kq=z.length;return z[kq]=_q,{code:"customRule"+kq,validate:_q}}}function bz(_,q,f){var K=_j.call(this,_,q,f);if(K>=0)return{index:K,compiling:!0};return K=this._compilations.length,this._compilations[K]={schema:_,root:q,baseId:f},{index:K,compiling:!1}}function Vz(_,q,f){var K=_j.call(this,_,q,f);if(K>=0)this._compilations.splice(K,1)}function _j(_,q,f){for(var K=0;K<this._compilations.length;K++){var $=this._compilations[K];if($.schema==_&&$.root==q&&$.baseId==f)return K}return-1}function Mz(_,q){return"var pattern"+_+" = new RegExp("+J$.toQuotedString(q[_])+");"}function Sz(_){return"var default"+_+" = defaults["+_+"];"}function Nz(_,q){return q[_]===void 0?"":"var refVal"+_+" = refVal["+_+"];"}function Cz(_){return"var customRule"+_+" = customRules["+_+"];"}function h$(_,q){if(!_.length)return"";var f="";for(var K=0;K<_.length;K++)f+=q(K,_);return f}});var Pj=l((xC,Kj)=>{var k$=Kj.exports=function _(){this._cache={}};k$.prototype.put=function _(q,f){this._cache[q]=f};k$.prototype.get=function _(q){return this._cache[q]};k$.prototype.del=function _(q){delete this._cache[q]};k$.prototype.clear=function _(){this._cache={}}});var kj=l((sC,Jj)=>{var pz=b8(),lz=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,nz=[0,31,28,31,30,31,30,31,31,30,31,30,31],Rz=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,jj=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,Ez=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,gz=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,vj=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,wj=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,Oj=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Yj=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Tj=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,zj=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;Jj.exports=Z$;function Z$(_){return _=_=="full"?"full":"fast",pz.copy(Z$[_])}Z$.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":vj,url:wj,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:jj,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:hj,uuid:Oj,"json-pointer":Yj,"json-pointer-uri-fragment":Tj,"relative-json-pointer":zj};Z$.full={date:Wj,time:Hj,"date-time":Iz,uri:yz,"uri-reference":gz,"uri-template":vj,url:wj,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:jj,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:hj,uuid:Oj,"json-pointer":Yj,"json-pointer-uri-fragment":Tj,"relative-json-pointer":zj};function dz(_){return _%4===0&&(_%100!==0||_%400===0)}function Wj(_){var q=_.match(lz);if(!q)return!1;var f=+q[1],K=+q[2],$=+q[3];return K>=1&&K<=12&&$>=1&&$<=(K==2&&dz(f)?29:nz[K])}function Hj(_,q){var f=_.match(Rz);if(!f)return!1;var K=f[1],$=f[2],P=f[3],j=f[5];return(K<=23&&$<=59&&P<=59||K==23&&$==59&&P==60)&&(!q||j)}var az=/t|\s/i;function Iz(_){var q=_.split(az);return q.length==2&&Wj(q[0])&&Hj(q[1],!0)}var Dz=/\/|:/;function yz(_){return Dz.test(_)&&Ez.test(_)}var iz=/[^\\]\\Z/;function hj(_){if(iz.test(_))return!1;try{return new RegExp(_),!0}catch(q){return!1}}});var Xj=l((BC,Zj)=>{Zj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.errSchemaPath+"/"+f,O=!q.opts.allErrors,T="data"+(j||""),Y="valid"+P,z,H;if(v=="#"||v=="#/")if(q.isRoot)z=q.async,H="validate";else z=q.root.schema.$async===!0,H="root.refVal[0]";else{var k=q.resolveRef(q.baseId,v,q.isRoot);if(k===void 0){var J=q.MissingRefError.message(q.baseId,v);if(q.opts.missingRefs=="fail"){q.logger.error(J);var h=h||[];if(h.push($),$="",q.createErrors!==!1){if($+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(w)+" , params: { ref: '"+q.util.escapeQuotes(v)+"' } ",q.opts.messages!==!1)$+=" , message: 'can\\'t resolve reference "+q.util.escapeQuotes(v)+"' ";if(q.opts.verbose)$+=" , schema: "+q.util.toQuotedString(v)+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+T+" ";$+=" } "}else $+=" {} ";var X=$;if($=h.pop(),!q.compositeRule&&O)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(O)$+=" if (false) { "}else if(q.opts.missingRefs=="ignore"){if(q.logger.warn(J),O)$+=" if (true) { "}else throw new q.MissingRefError(q.baseId,v,J)}else if(k.inline){var M=q.util.copy(q);M.level++;var b="valid"+M.level;M.schema=k.schema,M.schemaPath="",M.errSchemaPath=v;var N=q.validate(M).replace(/validate\.schema/g,k.code);if($+=" "+N+" ",O)$+=" if ("+b+") { "}else z=k.$async===!0||q.async&&k.$async!==!1,H=k.code}if(H){var h=h||[];if(h.push($),$="",q.opts.passContext)$+=" "+H+".call(this, ";else $+=" "+H+"( ";if($+=" "+T+", (dataPath || '')",q.errorPath!='""')$+=" + "+q.errorPath;var p=j?"data"+(j-1||""):"parentData",g=j?q.dataPathArr[j]:"parentDataProperty";$+=" , "+p+" , "+g+", rootData) ";var D=$;if($=h.pop(),z){if(!q.async)throw new Error("async schema referenced by sync schema");if(O)$+=" var "+Y+"; ";if($+=" try { await "+D+"; ",O)$+=" "+Y+" = true; ";if($+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",O)$+=" "+Y+" = false; ";if($+=" } ",O)$+=" if ("+Y+") { "}else if($+=" if (!"+D+") { if (vErrors === null) vErrors = "+H+".errors; else vErrors = vErrors.concat("+H+".errors); errors = vErrors.length; } ",O)$+=" else { "}return $}});var uj=l((UC,Aj)=>{Aj.exports=function _(q,f,K){var $=" ",P=q.schema[f],j=q.schemaPath+q.util.getProperty(f),v=q.errSchemaPath+"/"+f,w=!q.opts.allErrors,O=q.util.copy(q),T="";O.level++;var Y="valid"+O.level,z=O.baseId,H=!0,k=P;if(k){var J,h=-1,X=k.length-1;while(h<X)if(J=k[h+=1],q.opts.strictKeywords?typeof J=="object"&&Object.keys(J).length>0||J===!1:q.util.schemaHasRules(J,q.RULES.all)){if(H=!1,O.schema=J,O.schemaPath=j+"["+h+"]",O.errSchemaPath=v+"/"+h,$+=" "+q.validate(O)+" ",O.baseId=z,w)$+=" if ("+Y+") { ",T+="}"}}if(w)if(H)$+=" if (true) { ";else $+=" "+T.slice(0,-1)+" ";return $}});var mj=l((FC,Gj)=>{Gj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H="errs__"+P,k=q.util.copy(q),J="";k.level++;var h="valid"+k.level,X=v.every(function(u){return q.opts.strictKeywords?typeof u=="object"&&Object.keys(u).length>0||u===!1:q.util.schemaHasRules(u,q.RULES.all)});if(X){var M=k.baseId;$+=" var "+H+" = errors; var "+z+" = false; ";var b=q.compositeRule;q.compositeRule=k.compositeRule=!0;var N=v;if(N){var p,g=-1,D=N.length-1;while(g<D)p=N[g+=1],k.schema=p,k.schemaPath=w+"["+g+"]",k.errSchemaPath=O+"/"+g,$+=" "+q.validate(k)+" ",k.baseId=M,$+=" "+z+" = "+z+" || "+h+"; if (!"+z+") { ",J+="}"}if(q.compositeRule=k.compositeRule=b,$+=" "+J+" if (!"+z+") { var err = ",q.createErrors!==!1){if($+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: {} ",q.opts.messages!==!1)$+=" , message: 'should match some schema in anyOf' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";if($+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(vErrors); ";else $+=" validate.errors = vErrors; return false; ";if($+=" } else { errors = "+H+"; if (vErrors !== null) { if ("+H+") vErrors.length = "+H+"; else vErrors = null; } ",q.opts.allErrors)$+=" } "}else if(T)$+=" if (true) { ";return $}});var bj=l((QC,rj)=>{rj.exports=function _(q,f,K){var $=" ",P=q.schema[f],j=q.errSchemaPath+"/"+f,v=!q.opts.allErrors,w=q.util.toQuotedString(P);if(q.opts.$comment===!0)$+=" console.log("+w+");";else if(typeof q.opts.$comment=="function")$+=" self._opts.$comment("+w+", "+q.util.toQuotedString(j)+", validate.root.schema);";return $}});var Mj=l((qp,Vj)=>{Vj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H=q.opts.$data&&v&&v.$data,k;if(H)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",k="schema"+P;else k=v;if(!H)$+=" var schema"+P+" = validate.schema"+w+";";$+="var "+z+" = equal("+Y+", schema"+P+"); if (!"+z+") { ";var J=J||[];if(J.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'const' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { allowedValue: schema"+P+" } ",q.opts.messages!==!1)$+=" , message: 'should be equal to constant' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var h=$;if($=J.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+h+"]); ";else $+=" validate.errors = ["+h+"]; return false; ";else $+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" }",T)$+=" else { ";return $}});var Nj=l((_p,Sj)=>{Sj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H="errs__"+P,k=q.util.copy(q),J="";k.level++;var h="valid"+k.level,X="i"+P,M=k.dataLevel=q.dataLevel+1,b="data"+M,N=q.baseId,p=q.opts.strictKeywords?typeof v=="object"&&Object.keys(v).length>0||v===!1:q.util.schemaHasRules(v,q.RULES.all);if($+="var "+H+" = errors;var "+z+";",p){var g=q.compositeRule;q.compositeRule=k.compositeRule=!0,k.schema=v,k.schemaPath=w,k.errSchemaPath=O,$+=" var "+h+" = false; for (var "+X+" = 0; "+X+" < "+Y+".length; "+X+"++) { ",k.errorPath=q.util.getPathExpr(q.errorPath,X,q.opts.jsonPointers,!0);var D=Y+"["+X+"]";k.dataPathArr[M]=X;var u=q.validate(k);if(k.baseId=N,q.util.varOccurences(u,b)<2)$+=" "+q.util.varReplace(u,b,D)+" ";else $+=" var "+b+" = "+D+"; "+u+" ";$+=" if ("+h+") break; } ",q.compositeRule=k.compositeRule=g,$+=" "+J+" if (!"+h+") {"}else $+=" if ("+Y+".length == 0) {";var C=C||[];if(C.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: {} ",q.opts.messages!==!1)$+=" , message: 'should contain a valid item' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var R=$;if($=C.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+R+"]); ";else $+=" validate.errors = ["+R+"]; return false; ";else $+=" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" } else { ",p)$+=" errors = "+H+"; if (vErrors !== null) { if ("+H+") vErrors.length = "+H+"; else vErrors = null; } ";if(q.opts.allErrors)$+=" } ";return $}});var pj=l((fp,Cj)=>{Cj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="errs__"+P,H=q.util.copy(q),k="";H.level++;var J="valid"+H.level,h={},X={},M=q.opts.ownProperties;for(g in v){if(g=="__proto__")continue;var b=v[g],N=Array.isArray(b)?X:h;N[g]=b}$+="var "+z+" = errors;";var p=q.errorPath;$+="var missing"+P+";";for(var g in X)if(N=X[g],N.length){if($+=" if ( "+Y+q.util.getProperty(g)+" !== undefined ",M)$+=" && Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(g)+"') ";if(T){$+=" && ( ";var D=N;if(D){var u,C=-1,R=D.length-1;while(C<R){if(u=D[C+=1],C)$+=" || ";var r=q.util.getProperty(u),m=Y+r;if($+=" ( ( "+m+" === undefined ",M)$+=" || ! Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(u)+"') ";$+=") && (missing"+P+" = "+q.util.toQuotedString(q.opts.jsonPointers?u:r)+") ) "}}$+=")) { ";var A="missing"+P,V="' + "+A+" + '";if(q.opts._errorDataPathProperty)q.errorPath=q.opts.jsonPointers?q.util.getPathExpr(p,A,!0):p+" + "+A;var n=n||[];if(n.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { property: '"+q.util.escapeQuotes(g)+"', missingProperty: '"+V+"', depsCount: "+N.length+", deps: '"+q.util.escapeQuotes(N.length==1?N[0]:N.join(", "))+"' } ",q.opts.messages!==!1){if($+=" , message: 'should have ",N.length==1)$+="property "+q.util.escapeQuotes(N[0]);else $+="properties "+q.util.escapeQuotes(N.join(", "));$+=" when property "+q.util.escapeQuotes(g)+" is present' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var a=$;if($=n.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+a+"]); ";else $+=" validate.errors = ["+a+"]; return false; ";else $+=" var err = "+a+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{$+=" ) { ";var I=N;if(I){var u,c=-1,o=I.length-1;while(c<o){u=I[c+=1];var r=q.util.getProperty(u),V=q.util.escapeQuotes(u),m=Y+r;if(q.opts._errorDataPathProperty)q.errorPath=q.util.getPath(p,u,q.opts.jsonPointers);if($+=" if ( "+m+" === undefined ",M)$+=" || ! Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(u)+"') ";if($+=") { var err = ",q.createErrors!==!1){if($+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { property: '"+q.util.escapeQuotes(g)+"', missingProperty: '"+V+"', depsCount: "+N.length+", deps: '"+q.util.escapeQuotes(N.length==1?N[0]:N.join(", "))+"' } ",q.opts.messages!==!1){if($+=" , message: 'should have ",N.length==1)$+="property "+q.util.escapeQuotes(N[0]);else $+="properties "+q.util.escapeQuotes(N.join(", "));$+=" when property "+q.util.escapeQuotes(g)+" is present' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";$+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}}if($+=" } ",T)k+="}",$+=" else { "}q.errorPath=p;var t=H.baseId;for(var g in h){var b=h[g];if(q.opts.strictKeywords?typeof b=="object"&&Object.keys(b).length>0||b===!1:q.util.schemaHasRules(b,q.RULES.all)){if($+=" "+J+" = true; if ( "+Y+q.util.getProperty(g)+" !== undefined ",M)$+=" && Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(g)+"') ";if($+=") { ",H.schema=b,H.schemaPath=w+q.util.getProperty(g),H.errSchemaPath=O+"/"+q.util.escapeFragment(g),$+=" "+q.validate(H)+" ",H.baseId=t,$+=" } ",T)$+=" if ("+J+") { ",k+="}"}}if(T)$+=" "+k+" if ("+z+" == errors) {";return $}});var nj=l(($p,lj)=>{lj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H=q.opts.$data&&v&&v.$data,k;if(H)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",k="schema"+P;else k=v;var J="i"+P,h="schema"+P;if(!H)$+=" var "+h+" = validate.schema"+w+";";if($+="var "+z+";",H)$+=" if (schema"+P+" === undefined) "+z+" = true; else if (!Array.isArray(schema"+P+")) "+z+" = false; else {";if($+=""+z+" = false;for (var "+J+"=0; "+J+"<"+h+".length; "+J+"++) if (equal("+Y+", "+h+"["+J+"])) { "+z+" = true; break; }",H)$+=" } ";$+=" if (!"+z+") { ";var X=X||[];if(X.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { allowedValues: schema"+P+" } ",q.opts.messages!==!1)$+=" , message: 'should be equal to one of the allowed values' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var M=$;if($=X.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+M+"]); ";else $+=" validate.errors = ["+M+"]; return false; ";else $+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" }",T)$+=" else { ";return $}});var Ej=l((Kp,Rj)=>{Rj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||"");if(q.opts.format===!1){if(T)$+=" if (true) { ";return $}var z=q.opts.$data&&v&&v.$data,H;if(z)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",H="schema"+P;else H=v;var k=q.opts.unknownFormats,J=Array.isArray(k);if(z){var h="format"+P,X="isObject"+P,M="formatType"+P;if($+=" var "+h+" = formats["+H+"]; var "+X+" = typeof "+h+" == 'object' && !("+h+" instanceof RegExp) && "+h+".validate; var "+M+" = "+X+" && "+h+".type || 'string'; if ("+X+") { ",q.async)$+=" var async"+P+" = "+h+".async; ";if($+=" "+h+" = "+h+".validate; } if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'string') || ";if($+=" (",k!="ignore"){if($+=" ("+H+" && !"+h+" ",J)$+=" && self._opts.unknownFormats.indexOf("+H+") == -1 ";$+=") || "}if($+=" ("+h+" && "+M+" == '"+K+"' && !(typeof "+h+" == 'function' ? ",q.async)$+=" (async"+P+" ? await "+h+"("+Y+") : "+h+"("+Y+")) ";else $+=" "+h+"("+Y+") ";$+=" : "+h+".test("+Y+"))))) {"}else{var h=q.formats[v];if(!h)if(k=="ignore"){if(q.logger.warn('unknown format "'+v+'" ignored in schema at path "'+q.errSchemaPath+'"'),T)$+=" if (true) { ";return $}else if(J&&k.indexOf(v)>=0){if(T)$+=" if (true) { ";return $}else throw new Error('unknown format "'+v+'" is used in schema at path "'+q.errSchemaPath+'"');var X=typeof h=="object"&&!(h instanceof RegExp)&&h.validate,M=X&&h.type||"string";if(X){var b=h.async===!0;h=h.validate}if(M!=K){if(T)$+=" if (true) { ";return $}if(b){if(!q.async)throw new Error("async format in sync schema");var N="formats"+q.util.getProperty(v)+".validate";$+=" if (!(await "+N+"("+Y+"))) { "}else{$+=" if (! ";var N="formats"+q.util.getProperty(v);if(X)N+=".validate";if(typeof h=="function")$+=" "+N+"("+Y+") ";else $+=" "+N+".test("+Y+") ";$+=") { "}}var p=p||[];if(p.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'format' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { format: ",z)$+=""+H;else $+=""+q.util.toQuotedString(v);if($+=" } ",q.opts.messages!==!1){if($+=` , message: 'should match format "`,z)$+="' + "+H+" + '";else $+=""+q.util.escapeQuotes(v);$+=`"' `}if(q.opts.verbose){if($+=" , schema: ",z)$+="validate.schema"+w;else $+=""+q.util.toQuotedString(v);$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var g=$;if($=p.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+g+"]); ";else $+=" validate.errors = ["+g+"]; return false; ";else $+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" } ",T)$+=" else { ";return $}});var dj=l((Pp,gj)=>{gj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H="errs__"+P,k=q.util.copy(q);k.level++;var J="valid"+k.level,h=q.schema.then,X=q.schema.else,M=h!==void 0&&(q.opts.strictKeywords?typeof h=="object"&&Object.keys(h).length>0||h===!1:q.util.schemaHasRules(h,q.RULES.all)),b=X!==void 0&&(q.opts.strictKeywords?typeof X=="object"&&Object.keys(X).length>0||X===!1:q.util.schemaHasRules(X,q.RULES.all)),N=k.baseId;if(M||b){var p;k.createErrors=!1,k.schema=v,k.schemaPath=w,k.errSchemaPath=O,$+=" var "+H+" = errors; var "+z+" = true; ";var g=q.compositeRule;if(q.compositeRule=k.compositeRule=!0,$+=" "+q.validate(k)+" ",k.baseId=N,k.createErrors=!0,$+=" errors = "+H+"; if (vErrors !== null) { if ("+H+") vErrors.length = "+H+"; else vErrors = null; } ",q.compositeRule=k.compositeRule=g,M){if($+=" if ("+J+") { ",k.schema=q.schema.then,k.schemaPath=q.schemaPath+".then",k.errSchemaPath=q.errSchemaPath+"/then",$+=" "+q.validate(k)+" ",k.baseId=N,$+=" "+z+" = "+J+"; ",M&&b)p="ifClause"+P,$+=" var "+p+" = 'then'; ";else p="'then'";if($+=" } ",b)$+=" else { "}else $+=" if (!"+J+") { ";if(b){if(k.schema=q.schema.else,k.schemaPath=q.schemaPath+".else",k.errSchemaPath=q.errSchemaPath+"/else",$+=" "+q.validate(k)+" ",k.baseId=N,$+=" "+z+" = "+J+"; ",M&&b)p="ifClause"+P,$+=" var "+p+" = 'else'; ";else p="'else'";$+=" } "}if($+=" if (!"+z+") { var err = ",q.createErrors!==!1){if($+=" { keyword: 'if' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { failingKeyword: "+p+" } ",q.opts.messages!==!1)$+=` , message: 'should match "' + `+p+` + '" schema' `;if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";if($+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(vErrors); ";else $+=" validate.errors = vErrors; return false; ";if($+=" } ",T)$+=" else { "}else if(T)$+=" if (true) { ";return $}});var Ij=l((jp,aj)=>{aj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H="errs__"+P,k=q.util.copy(q),J="";k.level++;var h="valid"+k.level,X="i"+P,M=k.dataLevel=q.dataLevel+1,b="data"+M,N=q.baseId;if($+="var "+H+" = errors;var "+z+";",Array.isArray(v)){var p=q.schema.additionalItems;if(p===!1){$+=" "+z+" = "+Y+".length <= "+v.length+"; ";var g=O;O=q.errSchemaPath+"/additionalItems",$+=" if (!"+z+") { ";var D=D||[];if(D.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { limit: "+v.length+" } ",q.opts.messages!==!1)$+=" , message: 'should NOT have more than "+v.length+" items' ";if(q.opts.verbose)$+=" , schema: false , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var u=$;if($=D.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+u+"]); ";else $+=" validate.errors = ["+u+"]; return false; ";else $+=" var err = "+u+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" } ",O=g,T)J+="}",$+=" else { "}var C=v;if(C){var R,r=-1,m=C.length-1;while(r<m)if(R=C[r+=1],q.opts.strictKeywords?typeof R=="object"&&Object.keys(R).length>0||R===!1:q.util.schemaHasRules(R,q.RULES.all)){$+=" "+h+" = true; if ("+Y+".length > "+r+") { ";var A=Y+"["+r+"]";k.schema=R,k.schemaPath=w+"["+r+"]",k.errSchemaPath=O+"/"+r,k.errorPath=q.util.getPathExpr(q.errorPath,r,q.opts.jsonPointers,!0),k.dataPathArr[M]=r;var V=q.validate(k);if(k.baseId=N,q.util.varOccurences(V,b)<2)$+=" "+q.util.varReplace(V,b,A)+" ";else $+=" var "+b+" = "+A+"; "+V+" ";if($+=" } ",T)$+=" if ("+h+") { ",J+="}"}}if(typeof p=="object"&&(q.opts.strictKeywords?typeof p=="object"&&Object.keys(p).length>0||p===!1:q.util.schemaHasRules(p,q.RULES.all))){k.schema=p,k.schemaPath=q.schemaPath+".additionalItems",k.errSchemaPath=q.errSchemaPath+"/additionalItems",$+=" "+h+" = true; if ("+Y+".length > "+v.length+") { for (var "+X+" = "+v.length+"; "+X+" < "+Y+".length; "+X+"++) { ",k.errorPath=q.util.getPathExpr(q.errorPath,X,q.opts.jsonPointers,!0);var A=Y+"["+X+"]";k.dataPathArr[M]=X;var V=q.validate(k);if(k.baseId=N,q.util.varOccurences(V,b)<2)$+=" "+q.util.varReplace(V,b,A)+" ";else $+=" var "+b+" = "+A+"; "+V+" ";if(T)$+=" if (!"+h+") break; ";if($+=" } } ",T)$+=" if ("+h+") { ",J+="}"}}else if(q.opts.strictKeywords?typeof v=="object"&&Object.keys(v).length>0||v===!1:q.util.schemaHasRules(v,q.RULES.all)){k.schema=v,k.schemaPath=w,k.errSchemaPath=O,$+=" for (var "+X+" = 0; "+X+" < "+Y+".length; "+X+"++) { ",k.errorPath=q.util.getPathExpr(q.errorPath,X,q.opts.jsonPointers,!0);var A=Y+"["+X+"]";k.dataPathArr[M]=X;var V=q.validate(k);if(k.baseId=N,q.util.varOccurences(V,b)<2)$+=" "+q.util.varReplace(V,b,A)+" ";else $+=" var "+b+" = "+A+"; "+V+" ";if(T)$+=" if (!"+h+") break; ";$+=" }"}if(T)$+=" "+J+" if ("+H+" == errors) {";return $}});var AP=l((vp,Dj)=>{Dj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,N,Y="data"+(j||""),z=q.opts.$data&&v&&v.$data,H;if(z)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",H="schema"+P;else H=v;var k=f=="maximum",J=k?"exclusiveMaximum":"exclusiveMinimum",h=q.schema[J],X=q.opts.$data&&h&&h.$data,M=k?"<":">",b=k?">":"<",N=void 0;if(!(z||typeof v=="number"||v===void 0))throw new Error(f+" must be number");if(!(X||h===void 0||typeof h=="number"||typeof h=="boolean"))throw new Error(J+" must be number or boolean");if(X){var p=q.util.getData(h.$data,j,q.dataPathArr),g="exclusive"+P,D="exclType"+P,u="exclIsNumber"+P,C="op"+P,R="' + "+C+" + '";$+=" var schemaExcl"+P+" = "+p+"; ",p="schemaExcl"+P,$+=" var "+g+"; var "+D+" = typeof "+p+"; if ("+D+" != 'boolean' && "+D+" != 'undefined' && "+D+" != 'number') { ";var N=J,r=r||[];if(r.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(N||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: {} ",q.opts.messages!==!1)$+=" , message: '"+J+" should be boolean' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var m=$;if($=r.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+m+"]); ";else $+=" validate.errors = ["+m+"]; return false; ";else $+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" } else if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'number') || ";if($+=" "+D+" == 'number' ? ( ("+g+" = "+H+" === undefined || "+p+" "+M+"= "+H+") ? "+Y+" "+b+"= "+p+" : "+Y+" "+b+" "+H+" ) : ( ("+g+" = "+p+" === true) ? "+Y+" "+b+"= "+H+" : "+Y+" "+b+" "+H+" ) || "+Y+" !== "+Y+") { var op"+P+" = "+g+" ? '"+M+"' : '"+M+"='; ",v===void 0)N=J,O=q.errSchemaPath+"/"+J,H=p,z=X}else{var u=typeof h=="number",R=M;if(u&&z){var C="'"+R+"'";if($+=" if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'number') || ";$+=" ( "+H+" === undefined || "+h+" "+M+"= "+H+" ? "+Y+" "+b+"= "+h+" : "+Y+" "+b+" "+H+" ) || "+Y+" !== "+Y+") { "}else{if(u&&v===void 0)g=!0,N=J,O=q.errSchemaPath+"/"+J,H=h,b+="=";else{if(u)H=Math[k?"min":"max"](h,v);if(h===(u?H:!0))g=!0,N=J,O=q.errSchemaPath+"/"+J,b+="=";else g=!1,R+="="}var C="'"+R+"'";if($+=" if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'number') || ";$+=" "+Y+" "+b+" "+H+" || "+Y+" !== "+Y+") { "}}N=N||f;var r=r||[];if(r.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(N||"_limit")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { comparison: "+C+", limit: "+H+", exclusive: "+g+" } ",q.opts.messages!==!1)if($+=" , message: 'should be "+R+" ",z)$+="' + "+H;else $+=""+H+"'";if(q.opts.verbose){if($+=" , schema: ",z)$+="validate.schema"+w;else $+=""+v;$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var m=$;if($=r.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+m+"]); ";else $+=" validate.errors = ["+m+"]; return false; ";else $+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" } ",T)$+=" else { ";return $}});var uP=l((wp,yj)=>{yj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,J,Y="data"+(j||""),z=q.opts.$data&&v&&v.$data,H;if(z)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",H="schema"+P;else H=v;if(!(z||typeof v=="number"))throw new Error(f+" must be number");var k=f=="maxItems"?">":"<";if($+="if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'number') || ";$+=" "+Y+".length "+k+" "+H+") { ";var J=f,h=h||[];if(h.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(J||"_limitItems")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { limit: "+H+" } ",q.opts.messages!==!1){if($+=" , message: 'should NOT have ",f=="maxItems")$+="more";else $+="fewer";if($+=" than ",z)$+="' + "+H+" + '";else $+=""+v;$+=" items' "}if(q.opts.verbose){if($+=" , schema: ",z)$+="validate.schema"+w;else $+=""+v;$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var X=$;if($=h.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+="} ",T)$+=" else { ";return $}});var GP=l((Op,ij)=>{ij.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,J,Y="data"+(j||""),z=q.opts.$data&&v&&v.$data,H;if(z)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",H="schema"+P;else H=v;if(!(z||typeof v=="number"))throw new Error(f+" must be number");var k=f=="maxLength"?">":"<";if($+="if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'number') || ";if(q.opts.unicode===!1)$+=" "+Y+".length ";else $+=" ucs2length("+Y+") ";$+=" "+k+" "+H+") { ";var J=f,h=h||[];if(h.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(J||"_limitLength")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { limit: "+H+" } ",q.opts.messages!==!1){if($+=" , message: 'should NOT be ",f=="maxLength")$+="longer";else $+="shorter";if($+=" than ",z)$+="' + "+H+" + '";else $+=""+v;$+=" characters' "}if(q.opts.verbose){if($+=" , schema: ",z)$+="validate.schema"+w;else $+=""+v;$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var X=$;if($=h.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+="} ",T)$+=" else { ";return $}});var mP=l((Yp,oj)=>{oj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,J,Y="data"+(j||""),z=q.opts.$data&&v&&v.$data,H;if(z)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",H="schema"+P;else H=v;if(!(z||typeof v=="number"))throw new Error(f+" must be number");var k=f=="maxProperties"?">":"<";if($+="if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'number') || ";$+=" Object.keys("+Y+").length "+k+" "+H+") { ";var J=f,h=h||[];if(h.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(J||"_limitProperties")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { limit: "+H+" } ",q.opts.messages!==!1){if($+=" , message: 'should NOT have ",f=="maxProperties")$+="more";else $+="fewer";if($+=" than ",z)$+="' + "+H+" + '";else $+=""+v;$+=" properties' "}if(q.opts.verbose){if($+=" , schema: ",z)$+="validate.schema"+w;else $+=""+v;$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var X=$;if($=h.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+X+"]); ";else $+=" validate.errors = ["+X+"]; return false; ";else $+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+="} ",T)$+=" else { ";return $}});var Lj=l((Tp,cj)=>{cj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z=q.opts.$data&&v&&v.$data,H;if(z)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",H="schema"+P;else H=v;if(!(z||typeof v=="number"))throw new Error(f+" must be number");if($+="var division"+P+";if (",z)$+=" "+H+" !== undefined && ( typeof "+H+" != 'number' || ";if($+=" (division"+P+" = "+Y+" / "+H+", ",q.opts.multipleOfPrecision)$+=" Math.abs(Math.round(division"+P+") - division"+P+") > 1e-"+q.opts.multipleOfPrecision+" ";else $+=" division"+P+" !== parseInt(division"+P+") ";if($+=" ) ",z)$+=" ) ";$+=" ) { ";var k=k||[];if(k.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { multipleOf: "+H+" } ",q.opts.messages!==!1)if($+=" , message: 'should be multiple of ",z)$+="' + "+H;else $+=""+H+"'";if(q.opts.verbose){if($+=" , schema: ",z)$+="validate.schema"+w;else $+=""+v;$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var J=$;if($=k.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+J+"]); ";else $+=" validate.errors = ["+J+"]; return false; ";else $+=" var err = "+J+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+="} ",T)$+=" else { ";return $}});var ej=l((zp,tj)=>{tj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="errs__"+P,H=q.util.copy(q);H.level++;var k="valid"+H.level;if(q.opts.strictKeywords?typeof v=="object"&&Object.keys(v).length>0||v===!1:q.util.schemaHasRules(v,q.RULES.all)){H.schema=v,H.schemaPath=w,H.errSchemaPath=O,$+=" var "+z+" = errors; ";var J=q.compositeRule;q.compositeRule=H.compositeRule=!0,H.createErrors=!1;var h;if(H.opts.allErrors)h=H.opts.allErrors,H.opts.allErrors=!1;if($+=" "+q.validate(H)+" ",H.createErrors=!0,h)H.opts.allErrors=h;q.compositeRule=H.compositeRule=J,$+=" if ("+k+") { ";var X=X||[];if(X.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'not' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: {} ",q.opts.messages!==!1)$+=" , message: 'should NOT be valid' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var M=$;if($=X.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+M+"]); ";else $+=" validate.errors = ["+M+"]; return false; ";else $+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" } else { errors = "+z+"; if (vErrors !== null) { if ("+z+") vErrors.length = "+z+"; else vErrors = null; } ",q.opts.allErrors)$+=" } "}else{if($+=" var err = ",q.createErrors!==!1){if($+=" { keyword: 'not' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: {} ",q.opts.messages!==!1)$+=" , message: 'should NOT be valid' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";if($+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",T)$+=" if (false) { "}return $}});var sj=l((Wp,xj)=>{xj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H="errs__"+P,k=q.util.copy(q),J="";k.level++;var h="valid"+k.level,X=k.baseId,M="prevValid"+P,b="passingSchemas"+P;$+="var "+H+" = errors , "+M+" = false , "+z+" = false , "+b+" = null; ";var N=q.compositeRule;q.compositeRule=k.compositeRule=!0;var p=v;if(p){var g,D=-1,u=p.length-1;while(D<u){if(g=p[D+=1],q.opts.strictKeywords?typeof g=="object"&&Object.keys(g).length>0||g===!1:q.util.schemaHasRules(g,q.RULES.all))k.schema=g,k.schemaPath=w+"["+D+"]",k.errSchemaPath=O+"/"+D,$+=" "+q.validate(k)+" ",k.baseId=X;else $+=" var "+h+" = true; ";if(D)$+=" if ("+h+" && "+M+") { "+z+" = false; "+b+" = ["+b+", "+D+"]; } else { ",J+="}";$+=" if ("+h+") { "+z+" = "+M+" = true; "+b+" = "+D+"; }"}}if(q.compositeRule=k.compositeRule=N,$+=""+J+"if (!"+z+") { var err = ",q.createErrors!==!1){if($+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { passingSchemas: "+b+" } ",q.opts.messages!==!1)$+=" , message: 'should match exactly one schema in oneOf' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";if($+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(vErrors); ";else $+=" validate.errors = vErrors; return false; ";if($+="} else { errors = "+H+"; if (vErrors !== null) { if ("+H+") vErrors.length = "+H+"; else vErrors = null; }",q.opts.allErrors)$+=" } ";return $}});var Uj=l((Hp,Bj)=>{Bj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z=q.opts.$data&&v&&v.$data,H;if(z)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",H="schema"+P;else H=v;var k=z?"(new RegExp("+H+"))":q.usePattern(v);if($+="if ( ",z)$+=" ("+H+" !== undefined && typeof "+H+" != 'string') || ";$+=" !"+k+".test("+Y+") ) { ";var J=J||[];if(J.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { pattern: ",z)$+=""+H;else $+=""+q.util.toQuotedString(v);if($+=" } ",q.opts.messages!==!1){if($+=` , message: 'should match pattern "`,z)$+="' + "+H+" + '";else $+=""+q.util.escapeQuotes(v);$+=`"' `}if(q.opts.verbose){if($+=" , schema: ",z)$+="validate.schema"+w;else $+=""+q.util.toQuotedString(v);$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var h=$;if($=J.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+h+"]); ";else $+=" validate.errors = ["+h+"]; return false; ";else $+=" var err = "+h+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+="} ",T)$+=" else { ";return $}});var Qj=l((hp,Fj)=>{Fj.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="errs__"+P,H=q.util.copy(q),k="";H.level++;var J="valid"+H.level,h="key"+P,X="idx"+P,M=H.dataLevel=q.dataLevel+1,b="data"+M,N="dataProperties"+P,p=Object.keys(v||{}).filter(c),g=q.schema.patternProperties||{},D=Object.keys(g).filter(c),u=q.schema.additionalProperties,C=p.length||D.length,R=u===!1,r=typeof u=="object"&&Object.keys(u).length,m=q.opts.removeAdditional,A=R||r||m,V=q.opts.ownProperties,n=q.baseId,a=q.schema.required;if(a&&!(q.opts.$data&&a.$data)&&a.length<q.opts.loopRequired)var I=q.util.toHash(a);function c(Y_){return Y_!=="__proto__"}if($+="var "+z+" = errors;var "+J+" = true;",V)$+=" var "+N+" = undefined;";if(A){if(V)$+=" "+N+" = "+N+" || Object.keys("+Y+"); for (var "+X+"=0; "+X+"<"+N+".length; "+X+"++) { var "+h+" = "+N+"["+X+"]; ";else $+=" for (var "+h+" in "+Y+") { ";if(C){if($+=" var isAdditional"+P+" = !(false ",p.length)if(p.length>8)$+=" || validate.schema"+w+".hasOwnProperty("+h+") ";else{var o=p;if(o){var t,Q=-1,Hq=o.length-1;while(Q<Hq)t=o[Q+=1],$+=" || "+h+" == "+q.util.toQuotedString(t)+" "}}if(D.length){var Pq=D;if(Pq){var _q,kq=-1,gq=Pq.length-1;while(kq<gq)_q=Pq[kq+=1],$+=" || "+q.usePattern(_q)+".test("+h+") "}}$+=" ); if (isAdditional"+P+") { "}if(m=="all")$+=" delete "+Y+"["+h+"]; ";else{var iq=q.errorPath,x_="' + "+h+" + '";if(q.opts._errorDataPathProperty)q.errorPath=q.util.getPathExpr(q.errorPath,h,q.opts.jsonPointers);if(R)if(m)$+=" delete "+Y+"["+h+"]; ";else{$+=" "+J+" = false; ";var n_=O;O=q.errSchemaPath+"/additionalProperties";var Nq=Nq||[];if(Nq.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { additionalProperty: '"+x_+"' } ",q.opts.messages!==!1){if($+=" , message: '",q.opts._errorDataPathProperty)$+="is an invalid additional property";else $+="should NOT have additional properties";$+="' "}if(q.opts.verbose)$+=" , schema: false , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var Vq=$;if($=Nq.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+Vq+"]); ";else $+=" validate.errors = ["+Vq+"]; return false; ";else $+=" var err = "+Vq+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(O=n_,T)$+=" break; "}else if(r)if(m=="failing"){$+=" var "+z+" = errors; ";var H8=q.compositeRule;q.compositeRule=H.compositeRule=!0,H.schema=u,H.schemaPath=q.schemaPath+".additionalProperties",H.errSchemaPath=q.errSchemaPath+"/additionalProperties",H.errorPath=q.opts._errorDataPathProperty?q.errorPath:q.util.getPathExpr(q.errorPath,h,q.opts.jsonPointers);var Dq=Y+"["+h+"]";H.dataPathArr[M]=h;var zq=q.validate(H);if(H.baseId=n,q.util.varOccurences(zq,b)<2)$+=" "+q.util.varReplace(zq,b,Dq)+" ";else $+=" var "+b+" = "+Dq+"; "+zq+" ";$+=" if (!"+J+") { errors = "+z+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+Y+"["+h+"]; } ",q.compositeRule=H.compositeRule=H8}else{H.schema=u,H.schemaPath=q.schemaPath+".additionalProperties",H.errSchemaPath=q.errSchemaPath+"/additionalProperties",H.errorPath=q.opts._errorDataPathProperty?q.errorPath:q.util.getPathExpr(q.errorPath,h,q.opts.jsonPointers);var Dq=Y+"["+h+"]";H.dataPathArr[M]=h;var zq=q.validate(H);if(H.baseId=n,q.util.varOccurences(zq,b)<2)$+=" "+q.util.varReplace(zq,b,Dq)+" ";else $+=" var "+b+" = "+Dq+"; "+zq+" ";if(T)$+=" if (!"+J+") break; "}q.errorPath=iq}if(C)$+=" } ";if($+=" } ",T)$+=" if ("+J+") { ",k+="}"}var s_=q.opts.useDefaults&&!q.compositeRule;if(p.length){var R_=p;if(R_){var t,h8=-1,J8=R_.length-1;while(h8<J8){t=R_[h8+=1];var dq=v[t];if(q.opts.strictKeywords?typeof dq=="object"&&Object.keys(dq).length>0||dq===!1:q.util.schemaHasRules(dq,q.RULES.all)){var __=q.util.getProperty(t),Dq=Y+__,tq=s_&&dq.default!==void 0;H.schema=dq,H.schemaPath=w+__,H.errSchemaPath=O+"/"+q.util.escapeFragment(t),H.errorPath=q.util.getPath(q.errorPath,t,q.opts.jsonPointers),H.dataPathArr[M]=q.util.toQuotedString(t);var zq=q.validate(H);if(H.baseId=n,q.util.varOccurences(zq,b)<2){zq=q.util.varReplace(zq,b,Dq);var oq=Dq}else{var oq=b;$+=" var "+b+" = "+Dq+"; "}if(tq)$+=" "+zq+" ";else{if(I&&I[t]){if($+=" if ( "+oq+" === undefined ",V)$+=" || ! Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(t)+"') ";$+=") { "+J+" = false; ";var iq=q.errorPath,n_=O,G_=q.util.escapeQuotes(t);if(q.opts._errorDataPathProperty)q.errorPath=q.util.getPath(iq,t,q.opts.jsonPointers);O=q.errSchemaPath+"/required";var Nq=Nq||[];if(Nq.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'required' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { missingProperty: '"+G_+"' } ",q.opts.messages!==!1){if($+=" , message: '",q.opts._errorDataPathProperty)$+="is a required property";else $+="should have required property \\'"+G_+"\\'";$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var Vq=$;if($=Nq.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+Vq+"]); ";else $+=" validate.errors = ["+Vq+"]; return false; ";else $+=" var err = "+Vq+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";O=n_,q.errorPath=iq,$+=" } else { "}else if(T){if($+=" if ( "+oq+" === undefined ",V)$+=" || ! Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(t)+"') ";$+=") { "+J+" = true; } else { "}else{if($+=" if ("+oq+" !== undefined ",V)$+=" && Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(t)+"') ";$+=" ) { "}$+=" "+zq+" } "}}if(T)$+=" if ("+J+") { ",k+="}"}}}if(D.length){var Uq=D;if(Uq){var _q,nf=-1,gK=Uq.length-1;while(nf<gK){_q=Uq[nf+=1];var dq=g[_q];if(q.opts.strictKeywords?typeof dq=="object"&&Object.keys(dq).length>0||dq===!1:q.util.schemaHasRules(dq,q.RULES.all)){if(H.schema=dq,H.schemaPath=q.schemaPath+".patternProperties"+q.util.getProperty(_q),H.errSchemaPath=q.errSchemaPath+"/patternProperties/"+q.util.escapeFragment(_q),V)$+=" "+N+" = "+N+" || Object.keys("+Y+"); for (var "+X+"=0; "+X+"<"+N+".length; "+X+"++) { var "+h+" = "+N+"["+X+"]; ";else $+=" for (var "+h+" in "+Y+") { ";$+=" if ("+q.usePattern(_q)+".test("+h+")) { ",H.errorPath=q.util.getPathExpr(q.errorPath,h,q.opts.jsonPointers);var Dq=Y+"["+h+"]";H.dataPathArr[M]=h;var zq=q.validate(H);if(H.baseId=n,q.util.varOccurences(zq,b)<2)$+=" "+q.util.varReplace(zq,b,Dq)+" ";else $+=" var "+b+" = "+Dq+"; "+zq+" ";if(T)$+=" if (!"+J+") break; ";if($+=" } ",T)$+=" else "+J+" = true; ";if($+=" } ",T)$+=" if ("+J+") { ",k+="}"}}}}if(T)$+=" "+k+" if ("+z+" == errors) {";return $}});var _9=l((Jp,q9)=>{q9.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="errs__"+P,H=q.util.copy(q),k="";H.level++;var J="valid"+H.level;if($+="var "+z+" = errors;",q.opts.strictKeywords?typeof v=="object"&&Object.keys(v).length>0||v===!1:q.util.schemaHasRules(v,q.RULES.all)){H.schema=v,H.schemaPath=w,H.errSchemaPath=O;var h="key"+P,X="idx"+P,M="i"+P,b="' + "+h+" + '",N=H.dataLevel=q.dataLevel+1,p="data"+N,g="dataProperties"+P,D=q.opts.ownProperties,u=q.baseId;if(D)$+=" var "+g+" = undefined; ";if(D)$+=" "+g+" = "+g+" || Object.keys("+Y+"); for (var "+X+"=0; "+X+"<"+g+".length; "+X+"++) { var "+h+" = "+g+"["+X+"]; ";else $+=" for (var "+h+" in "+Y+") { ";$+=" var startErrs"+P+" = errors; ";var C=h,R=q.compositeRule;q.compositeRule=H.compositeRule=!0;var r=q.validate(H);if(H.baseId=u,q.util.varOccurences(r,p)<2)$+=" "+q.util.varReplace(r,p,C)+" ";else $+=" var "+p+" = "+C+"; "+r+" ";if(q.compositeRule=H.compositeRule=R,$+=" if (!"+J+") { for (var "+M+"=startErrs"+P+"; "+M+"<errors; "+M+"++) { vErrors["+M+"].propertyName = "+h+"; } var err = ",q.createErrors!==!1){if($+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { propertyName: '"+b+"' } ",q.opts.messages!==!1)$+=" , message: 'property name \\'"+b+"\\' is invalid' ";if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";if($+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(vErrors); ";else $+=" validate.errors = vErrors; return false; ";if(T)$+=" break; ";$+=" } }"}if(T)$+=" "+k+" if ("+z+" == errors) {";return $}});var $9=l((kp,f9)=>{f9.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H=q.opts.$data&&v&&v.$data,k;if(H)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",k="schema"+P;else k=v;var J="schema"+P;if(!H)if(v.length<q.opts.loopRequired&&q.schema.properties&&Object.keys(q.schema.properties).length){var h=[],X=v;if(X){var M,b=-1,N=X.length-1;while(b<N){M=X[b+=1];var p=q.schema.properties[M];if(!(p&&(q.opts.strictKeywords?typeof p=="object"&&Object.keys(p).length>0||p===!1:q.util.schemaHasRules(p,q.RULES.all))))h[h.length]=M}}}else var h=v;if(H||h.length){var g=q.errorPath,D=H||h.length>=q.opts.loopRequired,u=q.opts.ownProperties;if(T)if($+=" var missing"+P+"; ",D){if(!H)$+=" var "+J+" = validate.schema"+w+"; ";var C="i"+P,R="schema"+P+"["+C+"]",r="' + "+R+" + '";if(q.opts._errorDataPathProperty)q.errorPath=q.util.getPathExpr(g,R,q.opts.jsonPointers);if($+=" var "+z+" = true; ",H)$+=" if (schema"+P+" === undefined) "+z+" = true; else if (!Array.isArray(schema"+P+")) "+z+" = false; else {";if($+=" for (var "+C+" = 0; "+C+" < "+J+".length; "+C+"++) { "+z+" = "+Y+"["+J+"["+C+"]] !== undefined ",u)$+=" && Object.prototype.hasOwnProperty.call("+Y+", "+J+"["+C+"]) ";if($+="; if (!"+z+") break; } ",H)$+=" } ";$+=" if (!"+z+") { ";var m=m||[];if(m.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'required' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { missingProperty: '"+r+"' } ",q.opts.messages!==!1){if($+=" , message: '",q.opts._errorDataPathProperty)$+="is a required property";else $+="should have required property \\'"+r+"\\'";$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var A=$;if($=m.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+A+"]); ";else $+=" validate.errors = ["+A+"]; return false; ";else $+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";$+=" } else { "}else{$+=" if ( ";var V=h;if(V){var n,C=-1,a=V.length-1;while(C<a){if(n=V[C+=1],C)$+=" || ";var I=q.util.getProperty(n),c=Y+I;if($+=" ( ( "+c+" === undefined ",u)$+=" || ! Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(n)+"') ";$+=") && (missing"+P+" = "+q.util.toQuotedString(q.opts.jsonPointers?n:I)+") ) "}}$+=") { ";var R="missing"+P,r="' + "+R+" + '";if(q.opts._errorDataPathProperty)q.errorPath=q.opts.jsonPointers?q.util.getPathExpr(g,R,!0):g+" + "+R;var m=m||[];if(m.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'required' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { missingProperty: '"+r+"' } ",q.opts.messages!==!1){if($+=" , message: '",q.opts._errorDataPathProperty)$+="is a required property";else $+="should have required property \\'"+r+"\\'";$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";var A=$;if($=m.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+A+"]); ";else $+=" validate.errors = ["+A+"]; return false; ";else $+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";$+=" } else { "}else if(D){if(!H)$+=" var "+J+" = validate.schema"+w+"; ";var C="i"+P,R="schema"+P+"["+C+"]",r="' + "+R+" + '";if(q.opts._errorDataPathProperty)q.errorPath=q.util.getPathExpr(g,R,q.opts.jsonPointers);if(H){if($+=" if ("+J+" && !Array.isArray("+J+")) { var err = ",q.createErrors!==!1){if($+=" { keyword: 'required' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { missingProperty: '"+r+"' } ",q.opts.messages!==!1){if($+=" , message: '",q.opts._errorDataPathProperty)$+="is a required property";else $+="should have required property \\'"+r+"\\'";$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";$+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+J+" !== undefined) { "}if($+=" for (var "+C+" = 0; "+C+" < "+J+".length; "+C+"++) { if ("+Y+"["+J+"["+C+"]] === undefined ",u)$+=" || ! Object.prototype.hasOwnProperty.call("+Y+", "+J+"["+C+"]) ";if($+=") { var err = ",q.createErrors!==!1){if($+=" { keyword: 'required' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { missingProperty: '"+r+"' } ",q.opts.messages!==!1){if($+=" , message: '",q.opts._errorDataPathProperty)$+="is a required property";else $+="should have required property \\'"+r+"\\'";$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";if($+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",H)$+=" } "}else{var o=h;if(o){var n,t=-1,Q=o.length-1;while(t<Q){n=o[t+=1];var I=q.util.getProperty(n),r=q.util.escapeQuotes(n),c=Y+I;if(q.opts._errorDataPathProperty)q.errorPath=q.util.getPath(g,n,q.opts.jsonPointers);if($+=" if ( "+c+" === undefined ",u)$+=" || ! Object.prototype.hasOwnProperty.call("+Y+", '"+q.util.escapeQuotes(n)+"') ";if($+=") { var err = ",q.createErrors!==!1){if($+=" { keyword: 'required' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { missingProperty: '"+r+"' } ",q.opts.messages!==!1){if($+=" , message: '",q.opts._errorDataPathProperty)$+="is a required property";else $+="should have required property \\'"+r+"\\'";$+="' "}if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" ";$+=" } "}else $+=" {} ";$+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}}q.errorPath=g}else if(T)$+=" if (true) {";return $}});var P9=l((Zp,K9)=>{K9.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y="data"+(j||""),z="valid"+P,H=q.opts.$data&&v&&v.$data,k;if(H)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",k="schema"+P;else k=v;if((v||H)&&q.opts.uniqueItems!==!1){if(H)$+=" var "+z+"; if ("+k+" === false || "+k+" === undefined) "+z+" = true; else if (typeof "+k+" != 'boolean') "+z+" = false; else { ";$+=" var i = "+Y+".length , "+z+" = true , j; if (i > 1) { ";var J=q.schema.items&&q.schema.items.type,h=Array.isArray(J);if(!J||J=="object"||J=="array"||h&&(J.indexOf("object")>=0||J.indexOf("array")>=0))$+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+Y+"[i], "+Y+"[j])) { "+z+" = false; break outer; } } } ";else{$+=" var itemIndices = {}, item; for (;i--;) { var item = "+Y+"[i]; ";var X="checkDataType"+(h?"s":"");if($+=" if ("+q.util[X](J,"item",q.opts.strictNumbers,!0)+") continue; ",h)$+=` if (typeof item == 'string') item = '"' + item; `;$+=" if (typeof itemIndices[item] == 'number') { "+z+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}if($+=" } ",H)$+=" } ";$+=" if (!"+z+") { ";var M=M||[];if(M.push($),$="",q.createErrors!==!1){if($+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { i: i, j: j } ",q.opts.messages!==!1)$+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' ";if(q.opts.verbose){if($+=" , schema: ",H)$+="validate.schema"+w;else $+=""+v;$+=" , parentSchema: validate.schema"+q.schemaPath+" , data: "+Y+" "}$+=" } "}else $+=" {} ";var b=$;if($=M.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+b+"]); ";else $+=" validate.errors = ["+b+"]; return false; ";else $+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if($+=" } ",T)$+=" else { "}else if(T)$+=" if (true) { ";return $}});var v9=l((Xp,j9)=>{j9.exports={$ref:Xj(),allOf:uj(),anyOf:mj(),$comment:bj(),const:Mj(),contains:Nj(),dependencies:pj(),enum:nj(),format:Ej(),if:dj(),items:Ij(),maximum:AP(),minimum:AP(),maxItems:uP(),minItems:uP(),maxLength:GP(),minLength:GP(),maxProperties:mP(),minProperties:mP(),multipleOf:Lj(),not:ej(),oneOf:sj(),pattern:Uj(),properties:Qj(),propertyNames:_9(),required:$9(),uniqueItems:P9(),validate:ZP()}});var Y9=l((Ap,O9)=>{var w9=v9(),rP=b8().toHash;O9.exports=function _(){var q=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],f=["type","$comment"],K=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],$=["number","integer","string","array","object","boolean","null"];return q.all=rP(f),q.types=rP($),q.forEach(function(P){if(P.rules=P.rules.map(function(j){var v;if(typeof j=="object"){var w=Object.keys(j)[0];v=j[w],j=w,v.forEach(function(T){f.push(T),q.all[T]=!0})}f.push(j);var O=q.all[j]={keyword:j,code:w9[j],implements:v};return O}),q.all.$comment={keyword:"$comment",code:w9.$comment},P.type)q.types[P.type]=P}),q.keywords=rP(f.concat(K)),q.custom={},q}});var W9=l((up,z9)=>{var T9=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];z9.exports=function(_,q){for(var f=0;f<q.length;f++){_=JSON.parse(JSON.stringify(_));var K=q[f].split("/"),$=_,P;for(P=1;P<K.length;P++)$=$[K[P]];for(P=0;P<T9.length;P++){var j=T9[P],v=$[j];if(v)$[j]={anyOf:[v,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}}}return _}});var J9=l((Gp,h9)=>{var oz=W$().MissingRef;h9.exports=H9;function H9(_,q,f){var K=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof q=="function")f=q,q=void 0;var $=P(_).then(function(){var v=K._addSchema(_,void 0,q);return v.validate||j(v)});if(f)$.then(function(v){f(null,v)},f);return $;function P(v){var w=v.$schema;return w&&!K.getSchema(w)?H9.call(K,{$ref:w},!0):Promise.resolve()}function j(v){try{return K._compile(v)}catch(O){if(O instanceof oz)return w(O);throw O}function w(O){var T=O.missingSchema;if(H(T))throw new Error("Schema "+T+" is loaded but "+O.missingRef+" cannot be resolved");var Y=K._loadingSchemas[T];if(!Y)Y=K._loadingSchemas[T]=K._opts.loadSchema(T),Y.then(z,z);return Y.then(function(k){if(!H(T))return P(k).then(function(){if(!H(T))K.addSchema(k,T,void 0,q)})}).then(function(){return j(v)});function z(){delete K._loadingSchemas[T]}function H(k){return K._refs[k]||K._schemas[k]}}}}});var Z9=l((mp,k9)=>{k9.exports=function _(q,f,K){var $=" ",P=q.level,j=q.dataLevel,v=q.schema[f],w=q.schemaPath+q.util.getProperty(f),O=q.errSchemaPath+"/"+f,T=!q.opts.allErrors,Y,z="data"+(j||""),H="valid"+P,k="errs__"+P,J=q.opts.$data&&v&&v.$data,h;if(J)$+=" var schema"+P+" = "+q.util.getData(v.$data,j,q.dataPathArr)+"; ",h="schema"+P;else h=v;var X=this,M="definition"+P,b=X.definition,N="",p,g,D,u,C;if(J&&b.$data){C="keywordValidate"+P;var R=b.validateSchema;$+=" var "+M+" = RULES.custom['"+f+"'].definition; var "+C+" = "+M+".validate;"}else{if(u=q.useCustomRule(X,v,q.schema,q),!u)return;h="validate.schema"+w,C=u.code,p=b.compile,g=b.inline,D=b.macro}var r=C+".errors",m="i"+P,A="ruleErr"+P,V=b.async;if(V&&!q.async)throw new Error("async keyword in sync schema");if(!(g||D))$+=""+r+" = null;";if($+="var "+k+" = errors;var "+H+";",J&&b.$data){if(N+="}",$+=" if ("+h+" === undefined) { "+H+" = true; } else { ",R)N+="}",$+=" "+H+" = "+M+".validateSchema("+h+"); if ("+H+") { "}if(g)if(b.statements)$+=" "+u.validate+" ";else $+=" "+H+" = "+u.validate+"; ";else if(D){var n=q.util.copy(q),N="";n.level++;var a="valid"+n.level;n.schema=u.validate,n.schemaPath="";var I=q.compositeRule;q.compositeRule=n.compositeRule=!0;var c=q.validate(n).replace(/validate\.schema/g,C);q.compositeRule=n.compositeRule=I,$+=" "+c}else{var o=o||[];if(o.push($),$="",$+=" "+C+".call( ",q.opts.passContext)$+="this";else $+="self";if(p||b.schema===!1)$+=" , "+z+" ";else $+=" , "+h+" , "+z+" , validate.schema"+q.schemaPath+" ";if($+=" , (dataPath || '')",q.errorPath!='""')$+=" + "+q.errorPath;var t=j?"data"+(j-1||""):"parentData",Q=j?q.dataPathArr[j]:"parentDataProperty";$+=" , "+t+" , "+Q+" , rootData ) ";var Hq=$;if($=o.pop(),b.errors===!1){if($+=" "+H+" = ",V)$+="await ";$+=""+Hq+"; "}else if(V)r="customErrors"+P,$+=" var "+r+" = null; try { "+H+" = await "+Hq+"; } catch (e) { "+H+" = false; if (e instanceof ValidationError) "+r+" = e.errors; else throw e; } ";else $+=" "+r+" = null; "+H+" = "+Hq+"; "}if(b.modifying)$+=" if ("+t+") "+z+" = "+t+"["+Q+"];";if($+=""+N,b.valid){if(T)$+=" if (true) { "}else{if($+=" if ( ",b.valid===void 0)if($+=" !",D)$+=""+a;else $+=""+H;else $+=" "+!b.valid+" ";$+=") { ",Y=X.keyword;var o=o||[];o.push($),$="";var o=o||[];if(o.push($),$="",q.createErrors!==!1){if($+=" { keyword: '"+(Y||"custom")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { keyword: '"+X.keyword+"' } ",q.opts.messages!==!1)$+=` , message: 'should pass "`+X.keyword+`" keyword validation' `;if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+z+" ";$+=" } "}else $+=" {} ";var Pq=$;if($=o.pop(),!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(["+Pq+"]); ";else $+=" validate.errors = ["+Pq+"]; return false; ";else $+=" var err = "+Pq+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var _q=$;if($=o.pop(),g)if(b.errors){if(b.errors!="full"){if($+=" for (var "+m+"="+k+"; "+m+"<errors; "+m+"++) { var "+A+" = vErrors["+m+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+q.errorPath+"; if ("+A+".schemaPath === undefined) { "+A+'.schemaPath = "'+O+'"; } ',q.opts.verbose)$+=" "+A+".schema = "+h+"; "+A+".data = "+z+"; ";$+=" } "}}else if(b.errors===!1)$+=" "+_q+" ";else{if($+=" if ("+k+" == errors) { "+_q+" } else { for (var "+m+"="+k+"; "+m+"<errors; "+m+"++) { var "+A+" = vErrors["+m+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+q.errorPath+"; if ("+A+".schemaPath === undefined) { "+A+'.schemaPath = "'+O+'"; } ',q.opts.verbose)$+=" "+A+".schema = "+h+"; "+A+".data = "+z+"; ";$+=" } } "}else if(D){if($+=" var err = ",q.createErrors!==!1){if($+=" { keyword: '"+(Y||"custom")+"' , dataPath: (dataPath || '') + "+q.errorPath+" , schemaPath: "+q.util.toQuotedString(O)+" , params: { keyword: '"+X.keyword+"' } ",q.opts.messages!==!1)$+=` , message: 'should pass "`+X.keyword+`" keyword validation' `;if(q.opts.verbose)$+=" , schema: validate.schema"+w+" , parentSchema: validate.schema"+q.schemaPath+" , data: "+z+" ";$+=" } "}else $+=" {} ";if($+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!q.compositeRule&&T)if(q.async)$+=" throw new ValidationError(vErrors); ";else $+=" validate.errors = vErrors; return false; "}else if(b.errors===!1)$+=" "+_q+" ";else{if($+=" if (Array.isArray("+r+")) { if (vErrors === null) vErrors = "+r+"; else vErrors = vErrors.concat("+r+"); errors = vErrors.length; for (var "+m+"="+k+"; "+m+"<errors; "+m+"++) { var "+A+" = vErrors["+m+"]; if ("+A+".dataPath === undefined) "+A+".dataPath = (dataPath || '') + "+q.errorPath+"; "+A+'.schemaPath = "'+O+'"; ',q.opts.verbose)$+=" "+A+".schema = "+h+"; "+A+".data = "+z+"; ";$+=" } } else { "+_q+" } "}if($+=" } ",T)$+=" else { "}return $}});var bP=l((rp,cz)=>{cz.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var u9=l((bp,A9)=>{var X9=bP();A9.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:X9.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:X9.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}});var m9=l((Vp,G9)=>{var Lz=/^[a-z_$][a-z0-9_$-]*$/i,tz=Z9(),ez=u9();G9.exports={add:xz,get:sz,remove:Bz,validate:VP};function xz(_,q){var f=this.RULES;if(f.keywords[_])throw new Error("Keyword "+_+" is already defined");if(!Lz.test(_))throw new Error("Keyword "+_+" is not a valid identifier");if(q){this.validateKeyword(q,!0);var K=q.type;if(Array.isArray(K))for(var $=0;$<K.length;$++)j(_,K[$],q);else j(_,K,q);var P=q.metaSchema;if(P){if(q.$data&&this._opts.$data)P={anyOf:[P,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]};q.validateSchema=this.compile(P,!0)}}f.keywords[_]=f.all[_]=!0;function j(v,w,O){var T;for(var Y=0;Y<f.length;Y++){var z=f[Y];if(z.type==w){T=z;break}}if(!T)T={type:w,rules:[]},f.push(T);var H={keyword:v,definition:O,custom:!0,code:tz,implements:O.implements};T.rules.push(H),f.custom[v]=H}return this}function sz(_){var q=this.RULES.custom[_];return q?q.definition:this.RULES.keywords[_]||!1}function Bz(_){var q=this.RULES;delete q.keywords[_],delete q.all[_],delete q.custom[_];for(var f=0;f<q.length;f++){var K=q[f].rules;for(var $=0;$<K.length;$++)if(K[$].keyword==_){K.splice($,1);break}}return this}function VP(_,q){VP.errors=null;var f=this._validateKeyword=this._validateKeyword||this.compile(ez,!0);if(f(_))return!0;if(VP.errors=f.errors,q)throw new Error("custom keyword definition is invalid: "+this.errorsText(f.errors));else return!1}});var r9=l((Mp,Uz)=>{Uz.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var R9=l((Sp,n9)=>{var V9=$j(),V8=z$(),Fz=Pj(),M9=TP(),Qz=kP(),qW=kj(),_W=Y9(),S9=W9(),N9=b8();n9.exports=Mq;Mq.prototype.validate=$W;Mq.prototype.compile=KW;Mq.prototype.addSchema=PW;Mq.prototype.addMetaSchema=jW;Mq.prototype.validateSchema=vW;Mq.prototype.getSchema=OW;Mq.prototype.removeSchema=TW;Mq.prototype.addFormat=XW;Mq.prototype.errorsText=ZW;Mq.prototype._addSchema=zW;Mq.prototype._compile=WW;Mq.prototype.compileAsync=J9();var u$=m9();Mq.prototype.addKeyword=u$.add;Mq.prototype.getKeyword=u$.get;Mq.prototype.removeKeyword=u$.remove;Mq.prototype.validateKeyword=u$.validate;var C9=W$();Mq.ValidationError=C9.Validation;Mq.MissingRefError=C9.MissingRef;Mq.$dataMetaSchema=S9;var A$="http://json-schema.org/draft-07/schema",b9=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],fW=["/properties"];function Mq(_){if(!(this instanceof Mq))return new Mq(_);if(_=this._opts=N9.copy(_)||{},bW(this),this._schemas={},this._refs={},this._fragments={},this._formats=qW(_.format),this._cache=_.cache||new Fz,this._loadingSchemas={},this._compilations=[],this.RULES=_W(),this._getId=HW(_),_.loopRequired=_.loopRequired||1/0,_.errorDataPath=="property")_._errorDataPathProperty=!0;if(_.serialize===void 0)_.serialize=Qz;if(this._metaOpts=rW(this),_.formats)GW(this);if(_.keywords)mW(this);if(AW(this),typeof _.meta=="object")this.addMetaSchema(_.meta);if(_.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});uW(this)}function $W(_,q){var f;if(typeof _=="string"){if(f=this.getSchema(_),!f)throw new Error('no schema with key or ref "'+_+'"')}else{var K=this._addSchema(_);f=K.validate||this._compile(K)}var $=f(q);if(f.$async!==!0)this.errors=f.errors;return $}function KW(_,q){var f=this._addSchema(_,void 0,q);return f.validate||this._compile(f)}function PW(_,q,f,K){if(Array.isArray(_)){for(var $=0;$<_.length;$++)this.addSchema(_[$],void 0,f,K);return this}var P=this._getId(_);if(P!==void 0&&typeof P!="string")throw new Error("schema id must be string");return q=V8.normalizeId(q||P),l9(this,q),this._schemas[q]=this._addSchema(_,f,K,!0),this}function jW(_,q,f){return this.addSchema(_,q,f,!0),this}function vW(_,q){var f=_.$schema;if(f!==void 0&&typeof f!="string")throw new Error("$schema must be a string");if(f=f||this._opts.defaultMeta||wW(this),!f)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var K=this.validate(f,_);if(!K&&q){var $="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error($);else throw new Error($)}return K}function wW(_){var q=_._opts.meta;return _._opts.defaultMeta=typeof q=="object"?_._getId(q)||q:_.getSchema(A$)?A$:void 0,_._opts.defaultMeta}function OW(_){var q=p9(this,_);switch(typeof q){case"object":return q.validate||this._compile(q);case"string":return this.getSchema(q);case"undefined":return YW(this,_)}}function YW(_,q){var f=V8.schema.call(_,{schema:{}},q);if(f){var{schema:K,root:$,baseId:P}=f,j=V9.call(_,K,$,void 0,P);return _._fragments[q]=new M9({ref:q,fragment:!0,schema:K,root:$,baseId:P,validate:j}),j}}function p9(_,q){return q=V8.normalizeId(q),_._schemas[q]||_._refs[q]||_._fragments[q]}function TW(_){if(_ instanceof RegExp)return X$(this,this._schemas,_),X$(this,this._refs,_),this;switch(typeof _){case"undefined":return X$(this,this._schemas),X$(this,this._refs),this._cache.clear(),this;case"string":var q=p9(this,_);if(q)this._cache.del(q.cacheKey);return delete this._schemas[_],delete this._refs[_],this;case"object":var f=this._opts.serialize,K=f?f(_):_;this._cache.del(K);var $=this._getId(_);if($)$=V8.normalizeId($),delete this._schemas[$],delete this._refs[$]}return this}function X$(_,q,f){for(var K in q){var $=q[K];if(!$.meta&&(!f||f.test(K)))_._cache.del($.cacheKey),delete q[K]}}function zW(_,q,f,K){if(typeof _!="object"&&typeof _!="boolean")throw new Error("schema should be object or boolean");var $=this._opts.serialize,P=$?$(_):_,j=this._cache.get(P);if(j)return j;K=K||this._opts.addUsedSchema!==!1;var v=V8.normalizeId(this._getId(_));if(v&&K)l9(this,v);var w=this._opts.validateSchema!==!1&&!q,O;if(w&&!(O=v&&v==V8.normalizeId(_.$schema)))this.validateSchema(_,!0);var T=V8.ids.call(this,_),Y=new M9({id:v,schema:_,localRefs:T,cacheKey:P,meta:f});if(v[0]!="#"&&K)this._refs[v]=Y;if(this._cache.put(P,Y),w&&O)this.validateSchema(_,!0);return Y}function WW(_,q){if(_.compiling){if(_.validate=$,$.schema=_.schema,$.errors=null,$.root=q?q:$,_.schema.$async===!0)$.$async=!0;return $}_.compiling=!0;var f;if(_.meta)f=this._opts,this._opts=this._metaOpts;var K;try{K=V9.call(this,_.schema,q,_.localRefs)}catch(P){throw delete _.validate,P}finally{if(_.compiling=!1,_.meta)this._opts=f}return _.validate=K,_.refs=K.refs,_.refVal=K.refVal,_.root=K.root,K;function $(){var P=_.validate,j=P.apply(this,arguments);return $.errors=P.errors,j}}function HW(_){switch(_.schemaId){case"auto":return kW;case"id":return hW;default:return JW}}function hW(_){if(_.$id)this.logger.warn("schema $id ignored",_.$id);return _.id}function JW(_){if(_.id)this.logger.warn("schema id ignored",_.id);return _.$id}function kW(_){if(_.$id&&_.id&&_.$id!=_.id)throw new Error("schema $id is different from id");return _.$id||_.id}function ZW(_,q){if(_=_||this.errors,!_)return"No errors";q=q||{};var f=q.separator===void 0?", ":q.separator,K=q.dataVar===void 0?"data":q.dataVar,$="";for(var P=0;P<_.length;P++){var j=_[P];if(j)$+=K+j.dataPath+" "+j.message+f}return $.slice(0,-f.length)}function XW(_,q){if(typeof q=="string")q=new RegExp(q);return this._formats[_]=q,this}function AW(_){var q;if(_._opts.$data)q=r9(),_.addMetaSchema(q,q.$id,!0);if(_._opts.meta===!1)return;var f=bP();if(_._opts.$data)f=S9(f,fW);_.addMetaSchema(f,A$,!0),_._refs["http://json-schema.org/schema"]=A$}function uW(_){var q=_._opts.schemas;if(!q)return;if(Array.isArray(q))_.addSchema(q);else for(var f in q)_.addSchema(q[f],f)}function GW(_){for(var q in _._opts.formats){var f=_._opts.formats[q];_.addFormat(q,f)}}function mW(_){for(var q in _._opts.keywords){var f=_._opts.keywords[q];_.addKeyword(q,f)}}function l9(_,q){if(_._schemas[q]||_._refs[q])throw new Error('schema with key or id "'+q+'" already exists')}function rW(_){var q=N9.copy(_._opts);for(var f=0;f<b9.length;f++)delete q[b9[f]];return q}function bW(_){var q=_._opts.logger;if(q===!1)_.logger={log:MP,warn:MP,error:MP};else{if(q===void 0)q=console;if(!(typeof q=="object"&&q.log&&q.warn&&q.error))throw new Error("logger must implement log, warn and error methods");_.logger=q}}function MP(){}});var iW=(_)=>{let{idPattern:q,entityName:f}=_,K=(w)=>{return q.test(w)};return Object.freeze({isId:K,validateId:(w)=>{return K(w)},resolve:(w)=>{if(K(w))return{kind:"id",value:w};return{kind:"path",value:w}},getPattern:()=>{return q},getEntityName:()=>{return f}})},oW,w6;var aP=b_(()=>{oW=Object.freeze({create:iW}),w6=oW});var N$,C$,IP=(_)=>{if(N$.isId(_))return"project";if(C$.isId(_))return"shared";return},cW=(_)=>{return N$.isId(_)||C$.isId(_)},Xv=(_)=>{return _==="project"?N$:C$},LW=(_,q)=>{return Xv(q).validateId(_)},tW,sq;var O6=b_(()=>{aP();N$=w6.create({idPattern:/^doc\d{3,}$/,entityName:"project-doc"}),C$=w6.create({idPattern:/^sdoc\d{3,}$/,entityName:"shared-doc"}),tW=Object.freeze({project:N$,shared:C$,detectScopeFromId:IP,isdocId:cW,getResolverForScope:Xv,validateIdForScope:LW}),sq=tW});import{resolve as Rv,relative as gv,normalize as XH,isAbsolute as dv}from"path";import{realpath as Ev,lstat as AH}from"fs/promises";var Z_=(_,q,f)=>{let K=new Error(q);return K.name=_,K.code=_,K.details=f,K},av=(_)=>{if(!_)throw Z_("VALIDATION_ERROR","Empty path");if(dv(_))throw Z_("VALIDATION_ERROR","Absolute path not allowed",{path:_});let q=XH(_).replaceAll("\\","/");if(q.split("/").some((K)=>K===".."))throw Z_("BOUNDARY_VIOLATION","Path contains ..",{path:_});return q},DP=(_,q)=>{let f=gv(_,q);return f!==""&&!f.startsWith("..")&&!dv(f)},uH=async(_,q,f)=>{let K=av(q),$=Rv(_),P=Rv($,K);if(f?.followSymlinks)try{P=await Ev(P)}catch(v){if(v.code!=="ENOENT")throw v}else try{if((await AH(P)).isSymbolicLink()){let w=await Ev(P);if(!DP($,w))throw Z_("BOUNDARY_VIOLATION",`Symlink target escapes boundary: '${q}' \u2192 '${w}'`,{path:q,resolved:P,target:w})}}catch(v){if(v.code!=="ENOENT"&&v.code!=="BOUNDARY_VIOLATION")throw v;if(v.code==="BOUNDARY_VIOLATION")throw v}if(!DP($,P)&&P!==$)throw Z_("BOUNDARY_VIOLATION",`Path escapes boundary: '${q}' \u2192 '${P}'`,{path:q,resolved:P,boundary:$});let j=gv($,P).replaceAll("\\","/");return{abs:P,rel:j}},GH=(_,q)=>{let f=_.code,K=q?.path?q.resolved?`'${q.path}' \u2192 '${q.resolved}'`:`'${q.path}'`:"";switch(f){case"ENOENT":return Z_("NOT_FOUND",`File or directory not found${K?`: ${K}`:""}`,{...q,originalCode:f});case"ENOTEMPTY":return Z_("DIRECTORY_NOT_EMPTY",`Directory not empty${K?`: ${K}`:""}`,{...q,originalCode:f});case"ENOTDIR":case"EISDIR":return Z_("VALIDATION_ERROR",`Invalid path type${K?`: ${K}`:""}`,{...q,originalCode:f,reason:f==="ENOTDIR"?"not a directory":"is a directory"});case"EACCES":case"EPERM":return Z_("FS_ERROR",`Permission denied${K?`: ${K}`:""}`,{...q,originalCode:f});case"EBUSY":return Z_("FS_ERROR",`Resource busy or locked${K?`: ${K}`:""}`,{...q,originalCode:f});default:if(q)_.context=q;return _}},mH,vq;var yP=b_(()=>{mH=Object.freeze({fsError:Z_,validateRelative:av,insideBoundary:DP,resolveWithinBoundary:uH,mapOsError:GH}),vq=mH});import{readFile as rH,writeFile as bH,unlink as Iv,stat as iP,rename as VH,access as MH,mkdir as SH}from"fs/promises";import{constants as NH}from"fs";import{resolve as CH,dirname as oP,isAbsolute as pH}from"path";import*as p$ from"fs/promises";import*as M8 from"path";var lH=(_)=>{let{boundaryDir:q}=_;if(!q)throw vq.fsError("VALIDATION_ERROR","boundaryDir is required (empty string)",{boundaryDir:q});if(!pH(q))throw vq.fsError("VALIDATION_ERROR",`boundaryDir must be an absolute path: '${q}'`,{boundaryDir:q});let f=CH(q),K=async(h)=>{let{abs:X}=await vq.resolveWithinBoundary(f,h);return X},$=async(h)=>{let X=await K(h);try{return await MH(X,NH.F_OK),!0}catch{return!1}},P=async(h)=>{let X=await K(h);try{return await iP(X)}catch(M){throw vq.mapOsError(M,{path:h,resolved:X,operation:"stat"})}},j=async(h)=>{let X=await K(h),M;try{M=await iP(X)}catch(b){throw vq.mapOsError(b,{path:h,resolved:X,operation:"stat"})}if(!M.isFile())throw vq.fsError("VALIDATION_ERROR","Target is not a regular file",{path:h,resolved:X});try{return await rH(X,"utf-8")}catch(b){throw vq.mapOsError(b,{path:h,resolved:X,operation:"readFile"})}},v=async(h,X)=>{let M=await K(h),b;try{b=await iP(M)}catch(p){if(p.code==="ENOENT")b=null;else throw vq.mapOsError(p,{path:h,resolved:M,operation:"stat"})}if(b&&!b.isFile())throw vq.fsError("VALIDATION_ERROR","Target path exists and is not a regular file",{path:h,resolved:M});try{await SH(oP(M),{recursive:!0})}catch(p){throw vq.mapOsError(p,{path:oP(h),resolved:oP(M),operation:"mkdir"})}let N=`${M}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;try{await bH(N,X,{encoding:"utf-8",mode:384}),await VH(N,M)}catch(p){try{await Iv(N)}catch{}throw vq.mapOsError(p,{path:h,resolved:M,operation:"writeText"})}},w=async(h,X)=>{let M=await K(h);try{if(await Iv(M),X)try{await z(M,X)}catch{}return{deleted:!0}}catch(b){if(b instanceof Error&&b.code==="ENOENT")return{deleted:!1};throw vq.mapOsError(b,{path:h,resolved:M,operation:"delete"})}},O=async(h)=>{try{let X=await p$.readdir(h,{withFileTypes:!0});for(let M of X){if(M.isDirectory())return!1;if(M.isFile()&&M.name.endsWith(".md"))return!1}return!0}catch{return!1}},T=async(h)=>{try{return await p$.rmdir(h),!0}catch(X){switch(X instanceof Error?X.code:void 0){case"ENOENT":return!0;case"ENOTEMPTY":return!1;case"EACCES":case"EPERM":return!1;default:return!1}}},Y=(h,X)=>{let M=M8.normalize(h),b=M8.normalize(X);return M===b||!M.startsWith(b)},z=async(h,X)=>{let M=M8.dirname(h),b=M8.normalize(X);while(!Y(M,b)){if(!await O(M))break;if(!await T(M))break;M=M8.dirname(M)}},H=(h,X,M)=>{for(let p=0;p<X.length;p++){let{oldText:g}=X[p];if(g.length===0)throw vq.fsError("VALIDATION_ERROR",`Empty oldText in replacement at index ${p} would cause infinite loop`,{index:p})}let b=h,N=0;for(let{oldText:p,newText:g}of X)if(b.includes(p))b=b.replace(p,g),N++;if(M?.requireAll&&N!==X.length)throw vq.fsError("VALIDATION_ERROR",`Only ${N} of ${X.length} replacements were applied (requireAll=true)`,{applied:N,total:X.length});return{wouldContent:b,applied:N}};return Object.freeze({exists:$,stat:P,readText:j,resolveSafe:async(h)=>{return vq.resolveWithinBoundary(f,h)},writeText:v,delete:w,previewReplaceFirst:H,applyReplaceFirst:async(h,X,M)=>{let b=await j(h),{wouldContent:N,applied:p}=H(b,X,M);if(p===0)return{applied:0};return await v(h,N),{applied:p}}})},nH,U6;var Dv=b_(()=>{yP();nH=Object.freeze({create:lH}),U6=nH});import{mkdir as RH,rm as EH,rmdir as gH,stat as yv,readdir as dH}from"fs/promises";import{resolve as iv,dirname as aH,isAbsolute as ov}from"path";var IH=(_)=>{let{boundaryDir:q}=_;if(!q)throw vq.fsError("VALIDATION_ERROR","boundaryDir is required (empty string)",{boundaryDir:q});if(!ov(q))throw vq.fsError("VALIDATION_ERROR",`boundaryDir must be an absolute path: '${q}'`,{boundaryDir:q});let f=iv(q),K=(T)=>{let Y=T.toLowerCase().replace(/[^a-z0-9-_]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");if(!Y)throw vq.fsError("VALIDATION_ERROR",`normalizeName produced empty result from input: '${T}'`,{name:T,normalized:Y});return Y},$=async(T,Y)=>{return await vq.resolveWithinBoundary(f,T,Y)};return Object.freeze({normalizeName:K,resolve:$,isInsideBoundary:(T)=>{if(!ov(T))throw vq.fsError("VALIDATION_ERROR",`targetAbs must be an absolute path: '${T}'`,{targetAbs:T});let Y=iv(T);return vq.insideBoundary(f,Y)},ensureDir:async(T)=>{let{abs:Y}=await $(T);try{await RH(Y,{recursive:!0})}catch(z){throw vq.mapOsError(z,{path:T,resolved:Y,operation:"ensureDir"})}},parentDir:(T)=>{let Y=vq.validateRelative(T),z=aH(Y);return z==="."?z:z.replaceAll("\\","/")},stat:async(T)=>{let{abs:Y}=await $(T);try{return await yv(Y)}catch(z){throw vq.mapOsError(z,{path:T,resolved:Y,operation:"stat"})}},deleteDir:async(T,Y)=>{if(Y?.requireEmpty&&Y?.recursive)throw vq.fsError("VALIDATION_ERROR","requireEmpty and recursive are mutually exclusive",{path:T});let{abs:z}=await $(T);if(z===f)throw vq.fsError("VALIDATION_ERROR",`Cannot delete boundary root: '${T}' \u2192 '${z}'`,{path:T,resolved:z,boundary:f});let H;try{H=await yv(z)}catch(k){if(k.code==="ENOENT")return{deleted:!1,reason:"NOT_FOUND"};throw vq.mapOsError(k,{path:T,resolved:z,operation:"stat"})}if(!H.isDirectory())return{deleted:!1,reason:"NOT_DIR"};if(Y?.requireEmpty){let k;try{k=await dH(z)}catch(J){throw vq.mapOsError(J,{path:T,resolved:z,operation:"readdir"})}if(k.length>0)throw vq.fsError("DIRECTORY_NOT_EMPTY",`Directory not empty: '${T}' \u2192 '${z}'`,{path:T,resolved:z});try{return await gH(z),{deleted:!0}}catch(J){if(J.code==="ENOENT")return{deleted:!1,reason:"NOT_FOUND"};if(J.code==="ENOTEMPTY")throw vq.fsError("DIRECTORY_NOT_EMPTY",`Directory not empty (race condition): '${T}' \u2192 '${z}'`,{path:T,resolved:z});throw vq.mapOsError(J,{path:T,resolved:z,operation:"rmdir"})}}try{return await EH(z,{recursive:Y?.recursive??!1}),{deleted:!0}}catch(k){if(k.code==="ENOENT")return{deleted:!1,reason:"NOT_FOUND"};if(k.code==="ENOTEMPTY"||k.code==="EISDIR"||k.code==="EACCES")throw vq.fsError("DIRECTORY_NOT_EMPTY",`Directory not empty: '${T}' \u2192 '${z}'`,{path:T,resolved:z,originalCode:k.code});throw vq.mapOsError(k,{path:T,resolved:z,operation:"deleteDir"})}}})},DH,F6;var cv=b_(()=>{yP();DH=Object.freeze({create:IH}),F6=DH});import{dirname as yH}from"path";var Lv="---",Rq=(_,q,f)=>{let K=new Error(q);if(K.code=_,f!==void 0)K.data=f;throw K},iH=(_)=>{let{fileServiceByScope:q,folderServiceByScope:f,scopeRootByScope:K,indexFilename:$}=_,P=(u)=>{if(u==="project")return q.project;if(u==="shared")return q.shared;return Rq("INVALID_SCOPE",`Unknown scope '${u}'`,{scope:u})},j=(u)=>{if(u==="project")return f.project;if(u==="shared")return f.shared;return Rq("INVALID_SCOPE",`Unknown scope '${u}'`,{scope:u})},v=async(u)=>{if(u.scope)return{scope:u.scope};if(u.kind==="id"){let R=IP(u.id);if(!R)Rq("INVALID_ID_FORMAT",`Invalid doc ID format: '${u.id}'. Expected docNNN or sdocNNN`,{id:u.id});return{scope:R}}if(u.kind==="path"){try{if((await O("project")).pathToId[u.path])return{scope:"project"}}catch{}try{if((await O("shared")).pathToId[u.path])return{scope:"shared",fallback:!0}}catch{}return{scope:"project"}}let C=u;return Rq("VALIDATION_ERROR",`Unknown address kind: ${JSON.stringify(C)}`)},w=(u)=>{return $},O=async(u)=>{let C=w(u),R=P(u);try{let r=await R.readText(C),m=JSON.parse(r);if(!m.id&&!m.pathToId){let V={id:{},pathToId:{}};for(let[n,a]of Object.entries(m))V.id[n]={path:a},V.pathToId[a]=n;return await T(u,V),V}return m}catch(r){if(r.code==="NOT_FOUND")return{id:{},pathToId:{}};throw r}},T=async(u,C)=>{let R=w(u),r=P(u),m=JSON.stringify(C,null,2);await r.writeText(R,m)},Y=(u)=>{let C=u.split(`
|
|
3
|
+
`);if(C.length<3||C[0].trim()!==Lv)return{bodyContent:u};let R=-1;for(let a=1;a<C.length;a++)if(C[a].trim()===Lv){R=a;break}if(R===-1)return{bodyContent:u};let r=C.slice(1,R),m=C.slice(0,R+1).join(`
|
|
4
|
+
`),A=C.slice(R+1).join(`
|
|
5
|
+
`).trim(),V=(a)=>{if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return a.slice(1,-1);return a},n={};for(let a of r){let I=a.indexOf(":");if(I===-1)continue;let c=a.slice(0,I).trim(),o=a.slice(I+1).trim();n[c]=V(o)}return{rawFrontMatter:m,frontMatter:Object.keys(n).length>0?n:void 0,bodyContent:A}},z=(u,C)=>{switch(C.op){case"replaceOnce":{let{oldText:R,newText:r}=C;if(!u.includes(R))return{newContent:u,applied:!1};return{newContent:u.replace(R,r),applied:!0}}case"replaceAll":{let{oldText:R,newText:r}=C;if(!u.includes(R))return{newContent:u,applied:!1};let m=new RegExp(R.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g");return{newContent:u.replace(m,r),applied:!0}}case"replaceRegex":{let{pattern:R,flags:r,replacement:m}=C,A=new RegExp(R,r);if(!A.test(u))return{newContent:u,applied:!1};return{newContent:u.replace(A,m),applied:!0}}case"replaceAllContent":{let{content:R}=C;return{newContent:R,applied:!0}}default:{let R=C;return Rq("VALIDATION_ERROR",`Unknown edit operation: ${JSON.stringify(R)}`)}}},H=(u)=>{return sq.isdocId(u)},k=(u)=>{if(!u||u.trim().length===0)return{valid:!1,reason:"Path cannot be empty"};if(u.startsWith("/"))return{valid:!1,reason:"Path must be relative (no leading slash)"};if(u.includes(".."))return{valid:!1,reason:'Path cannot contain ".." segments'};let R=u.replace(/\\/g,"/").replace(/^\/+|\/+$/g,"");if(/[<>:"|?*\0]/.test(R))return{valid:!1,reason:"Path contains invalid characters"};return{valid:!0,normalized:R}},J=(u)=>{let{scope:C,path:R}=u;if(C!=="project"&&C!=="shared")Rq("INVALID_SCOPE",`Scope must be 'project' or 'shared', got '${C}'`,{scope:C});let r=k(R);if(!r.valid)Rq("INVALID_PATH_FORMAT",r.reason,{path:R});return{scope:C,path:r.normalized}},h=async(u)=>{let{scope:C}=await v(u),R=j(C),r;if(u.kind==="path")r=J({...u,scope:C}).path;else{let{id:A}=u;if(!H(A))Rq("INVALID_ID_FORMAT",`ID must match pattern doc\\d{3,} or sdoc\\d{3,}, got '${A}'`,{id:A});let V=await O(C);if(!V.id[A])Rq("doc_NOT_FOUND",`No doc with ID '${A}' in scope '${C}'`,{id:A,scope:C});r=V.id[A].path}return{...await R.resolve(r),scope:C}},X=async(u)=>{if(u!=="project"&&u!=="shared")Rq("INVALID_SCOPE",`Scope must be 'project' or 'shared', got '${u}'`,{scope:u});let C=await O(u),R=u==="project"?"doc":"sdoc",r=new RegExp(`^${R}(\\d{3,})$`),m=0;for(let n of Object.keys(C.id)){let a=n.match(r);if(a){let I=parseInt(a[1],10);if(I>m)m=I}}let A=m+1;return`${R}${A.toString().padStart(3,"0")}`},M=async(u)=>{let{address:C,content:R}=u;if(C.kind!=="path")Rq("VALIDATION_ERROR","Create requires path-based addressing");let r=C.scope??"project",m=J({...C,scope:r}),{path:A}=m;if(sq.isdocId(A))Rq("INVALID_PATH_FORMAT",`Cannot create doc with path '${A}' - matches ID pattern`,{path:A,scope:r});let V=P(r),n=j(r),a=await X(r);if(await V.exists(A))Rq("doc_ALREADY_EXISTS",`doc already exists at path '${A}'`,{path:A,scope:r});let c=yH(A);if(c!==".")await n.ensureDir(c);await V.writeText(A,R);let o=await O(r);return o.id[a]={path:A},o.pathToId[A]=a,await T(r,o),{id:a,path:A}},b=async(u)=>{let{rel:C,scope:R}=await h(u),m=await P(R).readText(C),{frontMatter:A,bodyContent:V,rawFrontMatter:n}=Y(m),a,I;if(u.kind==="path"){a=J({...u,scope:R}).path;let t=(await O(R)).pathToId[a];if(!t)return Rq("doc_NOT_FOUND",`doc exists but not in index: '${a}'`,{path:a,scope:R});I=t}else if(u.kind==="id"){I=u.id;let o=(await O(R)).id[I]?.path;if(!o)return Rq("doc_NOT_FOUND",`No doc with ID '${I}'`,{id:I,scope:R});a=o}else{let c=u;return Rq("VALIDATION_ERROR",`Unknown address kind: ${JSON.stringify(c)}`)}return{address:u,content:m,frontMatter:A,bodyContent:V,path:a,id:I}},N=async(u,C)=>{let{rel:R,scope:r}=await h(u),m=P(r),V=await m.readText(R),n=0;for(let a of C){let{newContent:I,applied:c}=z(V,a);if(V=I,c)n++}if(n===0)return{applied:0};return await m.writeText(R,V),{applied:n}},p=async(u)=>{let{rel:C,scope:R}=await h(u),r=await(async()=>{if(u.kind==="id")return u.id;else if(u.kind==="path"){let I=J({...u,scope:R}),o=(await O(R)).pathToId[I.path];if(!o)return Rq("doc_NOT_FOUND",`doc not in index: '${I.path}'`,{path:I.path,scope:R});return o}else{let a=u;return Rq("VALIDATION_ERROR",`Unknown address kind: ${JSON.stringify(a)}`)}})(),m=P(R),A=K?.[R],V=!1;try{V=(await m.delete(C,A)).deleted}catch(a){if(a.code==="NOT_FOUND")V=!1;else throw a}let n=await O(R);if(n.id[r]){let a=n.id[r].path;delete n.id[r],delete n.pathToId[a],await T(R,n)}return{deleted:V}},g=async(u)=>{let{scope:C,pathPrefix:R,includeContent:r=!1}=u;if(C){if(C!=="project"&&C!=="shared")Rq("INVALID_SCOPE",`Scope must be 'project' or 'shared', got '${C}'`,{scope:C});return await D(C,R,r)}let m=await D("project",R,r),A=await D("shared",R,r),V=new Set(m.map((I)=>I.path)),n=new Set(A.map((I)=>I.path));for(let I of m)if(n.has(I.path))I.override="overrides";for(let I of A)if(V.has(I.path))I.override="overridden";let a=[...m,...A];return a.sort((I,c)=>I.path.localeCompare(c.path)),a},D=async(u,C,R=!1)=>{let r=P(u),m;try{m=await O(u)}catch(V){if(V.code==="NOT_FOUND"||V.code==="ENOENT")return[];throw V}let A=[];for(let[V,n]of Object.entries(m.id)){let a=n.path;if(C&&!a.startsWith(C))continue;try{if(R){let I=await r.readText(a),c=await r.stat(a),{frontMatter:o}=Y(I);A.push({scope:u,id:V,path:a,synopsis:o?.synopsis,modifiedAt:c.mtime})}else{let I=await r.stat(a);A.push({scope:u,id:V,path:a,modifiedAt:I.mtime})}}catch{continue}}return A.sort((V,n)=>V.path.localeCompare(n.path)),A};return Object.freeze({create:M,read:b,editLatest:N,deleteLatest:p,list:g})},oH,tv;var ev=b_(()=>{O6();oH=Object.freeze({create:iH}),tv=oH});var l$,n$,cP=(_)=>{if(l$.isId(_))return"project";if(n$.isId(_))return"shared";return},cH=(_)=>{return l$.isId(_)||n$.isId(_)},xv=(_)=>{return _==="project"?l$:n$},LH=(_,q)=>{return xv(q).validateId(_)},tH,LP;var sv=b_(()=>{aP();l$=w6.create({idPattern:/^tpl\d{3,}$/,entityName:"project-template"}),n$=w6.create({idPattern:/^stpl\d{3,}$/,entityName:"shared-template"}),tH=Object.freeze({project:l$,shared:n$,detectScopeFromId:cP,isTemplateId:cH,getResolverForScope:xv,validateIdForScope:LH}),LP=tH});var Lq=l(($h)=>{$h.__esModule=!0;$h.extend=Bv;$h.indexOf=UH;$h.escapeExpression=FH;$h.isEmpty=QH;$h.createFrame=qh;$h.blockParams=_h;$h.appendContextPath=fh;var eH={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},xH=/[&<>"'`=]/g,sH=/[&<>"'`=]/;function BH(_){return eH[_]}function Bv(_){for(var q=1;q<arguments.length;q++)for(var f in arguments[q])if(Object.prototype.hasOwnProperty.call(arguments[q],f))_[f]=arguments[q][f];return _}var eP=Object.prototype.toString;$h.toString=eP;var tP=function _(q){return typeof q==="function"};if(tP(/x/))$h.isFunction=tP=function(_){return typeof _==="function"&&eP.call(_)==="[object Function]"};$h.isFunction=tP;var Uv=Array.isArray||function(_){return _&&typeof _==="object"?eP.call(_)==="[object Array]":!1};$h.isArray=Uv;function UH(_,q){for(var f=0,K=_.length;f<K;f++)if(_[f]===q)return f;return-1}function FH(_){if(typeof _!=="string"){if(_&&_.toHTML)return _.toHTML();else if(_==null)return"";else if(!_)return _+"";_=""+_}if(!sH.test(_))return _;return _.replace(xH,BH)}function QH(_){if(!_&&_!==0)return!0;else if(Uv(_)&&_.length===0)return!0;else return!1}function qh(_){var q=Bv({},_);return q._parent=_,q}function _h(_,q){return _.path=q,_}function fh(_,q){return(_?_+".":"")+q}});var j_=l((Fv,Qv)=>{Fv.__esModule=!0;var xP=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function sP(_,q){var f=q&&q.loc,K=void 0,$=void 0,P=void 0,j=void 0;if(f)K=f.start.line,$=f.end.line,P=f.start.column,j=f.end.column,_+=" - "+K+":"+P;var v=Error.prototype.constructor.call(this,_);for(var w=0;w<xP.length;w++)this[xP[w]]=v[xP[w]];if(Error.captureStackTrace)Error.captureStackTrace(this,sP);try{if(f)if(this.lineNumber=K,this.endLineNumber=$,Object.defineProperty)Object.defineProperty(this,"column",{value:P,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:j,enumerable:!0});else this.column=P,this.endColumn=j}catch(O){}}sP.prototype=new Error;Fv.default=sP;Qv.exports=Fv.default});var f5=l((q5,_5)=>{q5.__esModule=!0;var BP=Lq();q5.default=function(_){_.registerHelper("blockHelperMissing",function(q,f){var{inverse:K,fn:$}=f;if(q===!0)return $(this);else if(q===!1||q==null)return K(this);else if(BP.isArray(q))if(q.length>0){if(f.ids)f.ids=[f.name];return _.helpers.each(q,f)}else return K(this);else{if(f.data&&f.ids){var P=BP.createFrame(f.data);P.contextPath=BP.appendContextPath(f.data.contextPath,f.name),f={data:P}}return $(q,f)}})};_5.exports=q5.default});var P5=l(($5,K5)=>{$5.__esModule=!0;function Xh(_){return _&&_.__esModule?_:{default:_}}var Q6=Lq(),Ah=j_(),uh=Xh(Ah);$5.default=function(_){_.registerHelper("each",function(q,f){if(!f)throw new uh.default("Must pass iterator to #each");var{fn:K,inverse:$}=f,P=0,j="",v=void 0,w=void 0;if(f.data&&f.ids)w=Q6.appendContextPath(f.data.contextPath,f.ids[0])+".";if(Q6.isFunction(q))q=q.call(this);if(f.data)v=Q6.createFrame(f.data);function O(k,J,h){if(v){if(v.key=k,v.index=J,v.first=J===0,v.last=!!h,w)v.contextPath=w+k}j=j+K(q[k],{data:v,blockParams:Q6.blockParams([q[k],k],[w+k,null])})}if(q&&typeof q==="object")if(Q6.isArray(q)){for(var T=q.length;P<T;P++)if(P in q)O(P,P,P===q.length-1)}else if(typeof Symbol==="function"&&q[Symbol.iterator]){var Y=[],z=q[Symbol.iterator]();for(var H=z.next();!H.done;H=z.next())Y.push(H.value);q=Y;for(var T=q.length;P<T;P++)O(P,P,P===q.length-1)}else(function(){var k=void 0;if(Object.keys(q).forEach(function(J){if(k!==void 0)O(k,P-1);k=J,P++}),k!==void 0)O(k,P-1,!0)})();if(P===0)j=$(this);return j})};K5.exports=$5.default});var w5=l((j5,v5)=>{j5.__esModule=!0;function rh(_){return _&&_.__esModule?_:{default:_}}var bh=j_(),Vh=rh(bh);j5.default=function(_){_.registerHelper("helperMissing",function(){if(arguments.length===1)return;else throw new Vh.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};v5.exports=j5.default});var W5=l((T5,z5)=>{T5.__esModule=!0;function Nh(_){return _&&_.__esModule?_:{default:_}}var O5=Lq(),Ch=j_(),Y5=Nh(Ch);T5.default=function(_){_.registerHelper("if",function(q,f){if(arguments.length!=2)throw new Y5.default("#if requires exactly one argument");if(O5.isFunction(q))q=q.call(this);if(!f.hash.includeZero&&!q||O5.isEmpty(q))return f.inverse(this);else return f.fn(this)}),_.registerHelper("unless",function(q,f){if(arguments.length!=2)throw new Y5.default("#unless requires exactly one argument");return _.helpers.if.call(this,q,{fn:f.inverse,inverse:f.fn,hash:f.hash})})};z5.exports=T5.default});var J5=l((H5,h5)=>{H5.__esModule=!0;H5.default=function(_){_.registerHelper("log",function(){var q=[void 0],f=arguments[arguments.length-1];for(var K=0;K<arguments.length-1;K++)q.push(arguments[K]);var $=1;if(f.hash.level!=null)$=f.hash.level;else if(f.data&&f.data.level!=null)$=f.data.level;q[0]=$,_.log.apply(_,q)})};h5.exports=H5.default});var X5=l((k5,Z5)=>{k5.__esModule=!0;k5.default=function(_){_.registerHelper("lookup",function(q,f,K){if(!q)return q;return K.lookupProperty(q,f)})};Z5.exports=k5.default});var G5=l((A5,u5)=>{A5.__esModule=!0;function dh(_){return _&&_.__esModule?_:{default:_}}var qf=Lq(),ah=j_(),Ih=dh(ah);A5.default=function(_){_.registerHelper("with",function(q,f){if(arguments.length!=2)throw new Ih.default("#with requires exactly one argument");if(qf.isFunction(q))q=q.call(this);var K=f.fn;if(!qf.isEmpty(q)){var $=f.data;if(f.data&&f.ids)$=qf.createFrame(f.data),$.contextPath=qf.appendContextPath(f.data.contextPath,f.ids[0]);return K(q,{data:$,blockParams:qf.blockParams([q],[$&&$.contextPath])})}else return f.inverse(this)})};u5.exports=A5.default});var UP=l((KJ)=>{KJ.__esModule=!0;KJ.registerDefaultHelpers=fJ;KJ.moveHelperToHooks=$J;function S8(_){return _&&_.__esModule?_:{default:_}}var ih=f5(),oh=S8(ih),ch=P5(),Lh=S8(ch),th=w5(),eh=S8(th),xh=W5(),sh=S8(xh),Bh=J5(),Uh=S8(Bh),Fh=X5(),Qh=S8(Fh),qJ=G5(),_J=S8(qJ);function fJ(_){oh.default(_),Lh.default(_),eh.default(_),sh.default(_),Uh.default(_),Qh.default(_),_J.default(_)}function $J(_,q,f){if(_.helpers[q]){if(_.hooks[q]=_.helpers[q],!f)delete _.helpers[q]}}});var b5=l((m5,r5)=>{m5.__esModule=!0;var wJ=Lq();m5.default=function(_){_.registerDecorator("inline",function(q,f,K,$){var P=q;if(!f.partials)f.partials={},P=function(j,v){var w=K.partials;K.partials=wJ.extend({},w,f.partials);var O=q(j,v);return K.partials=w,O};return f.partials[$.args[0]]=$.fn,P})};r5.exports=m5.default});var V5=l((hJ)=>{hJ.__esModule=!0;hJ.registerDefaultDecorators=HJ;function TJ(_){return _&&_.__esModule?_:{default:_}}var zJ=b5(),WJ=TJ(zJ);function HJ(_){WJ.default(_)}});var FP=l((M5,S5)=>{M5.__esModule=!0;var ZJ=Lq(),Y6={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function _(q){if(typeof q==="string"){var f=ZJ.indexOf(Y6.methodMap,q.toLowerCase());if(f>=0)q=f;else q=parseInt(q,10)}return q},log:function _(q){if(q=Y6.lookupLevel(q),typeof console!=="undefined"&&Y6.lookupLevel(Y6.level)<=q){var f=Y6.methodMap[q];if(!console[f])f="log";for(var K=arguments.length,$=Array(K>1?K-1:0),P=1;P<K;P++)$[P-1]=arguments[P];console[f].apply(console,$)}}};M5.default=Y6;S5.exports=M5.default});var N5=l((mJ)=>{mJ.__esModule=!0;mJ.createNewLookupObject=GJ;var uJ=Lq();function GJ(){for(var _=arguments.length,q=Array(_),f=0;f<_;f++)q[f]=arguments[f];return uJ.extend.apply(void 0,[Object.create(null)].concat(q))}});var QP=l((nJ)=>{nJ.__esModule=!0;nJ.createProtoAccessControl=NJ;nJ.resultIsAllowed=CJ;nJ.resetLoggedProperties=lJ;function VJ(_){return _&&_.__esModule?_:{default:_}}var C5=N5(),MJ=FP(),SJ=VJ(MJ),R$=Object.create(null);function NJ(_){var q=Object.create(null);q.constructor=!1,q.__defineGetter__=!1,q.__defineSetter__=!1,q.__lookupGetter__=!1;var f=Object.create(null);return f.__proto__=!1,{properties:{whitelist:C5.createNewLookupObject(f,_.allowedProtoProperties),defaultValue:_.allowProtoPropertiesByDefault},methods:{whitelist:C5.createNewLookupObject(q,_.allowedProtoMethods),defaultValue:_.allowProtoMethodsByDefault}}}function CJ(_,q,f){if(typeof _==="function")return p5(q.methods,f);else return p5(q.properties,f)}function p5(_,q){if(_.whitelist[q]!==void 0)return _.whitelist[q]===!0;if(_.defaultValue!==void 0)return _.defaultValue;return pJ(q),!1}function pJ(_){if(R$[_]!==!0)R$[_]=!0,SJ.default.log("error",'Handlebars: Access has been denied to resolve the property "'+_+`" because it is not an "own property" of its parent.
|
|
6
6
|
You can add a runtime option to disable the check or this warning:
|
|
7
|
-
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`)}function
|
|
7
|
+
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`)}function lJ(){Object.keys(R$).forEach(function(_){delete R$[_]})}});var g$=l((xJ)=>{xJ.__esModule=!0;xJ.HandlebarsEnvironment=f3;function l5(_){return _&&_.__esModule?_:{default:_}}var N8=Lq(),aJ=j_(),q3=l5(aJ),IJ=UP(),DJ=V5(),yJ=FP(),E$=l5(yJ),iJ=QP(),oJ="4.7.8";xJ.VERSION=oJ;var cJ=8;xJ.COMPILER_REVISION=cJ;var LJ=7;xJ.LAST_COMPATIBLE_COMPILER_REVISION=LJ;var tJ={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"};xJ.REVISION_CHANGES=tJ;var _3="[object Object]";function f3(_,q,f){this.helpers=_||{},this.partials=q||{},this.decorators=f||{},IJ.registerDefaultHelpers(this),DJ.registerDefaultDecorators(this)}f3.prototype={constructor:f3,logger:E$.default,log:E$.default.log,registerHelper:function _(q,f){if(N8.toString.call(q)===_3){if(f)throw new q3.default("Arg not supported with multiple helpers");N8.extend(this.helpers,q)}else this.helpers[q]=f},unregisterHelper:function _(q){delete this.helpers[q]},registerPartial:function _(q,f){if(N8.toString.call(q)===_3)N8.extend(this.partials,q);else{if(typeof f==="undefined")throw new q3.default('Attempting to register a partial called "'+q+'" as undefined');this.partials[q]=f}},unregisterPartial:function _(q){delete this.partials[q]},registerDecorator:function _(q,f){if(N8.toString.call(q)===_3){if(f)throw new q3.default("Arg not supported with multiple decorators");N8.extend(this.decorators,q)}else this.decorators[q]=f},unregisterDecorator:function _(q){delete this.decorators[q]},resetLoggedPropertyAccesses:function _(){iJ.resetLoggedProperties()}};var eJ=E$.default.log;xJ.log=eJ;xJ.createFrame=N8.createFrame;xJ.logger=E$.default});var E5=l((n5,R5)=>{n5.__esModule=!0;function $3(_){this.string=_}$3.prototype.toString=$3.prototype.toHTML=function(){return""+this.string};n5.default=$3;R5.exports=n5.default});var g5=l((vk)=>{vk.__esModule=!0;vk.wrapHelper=jk;function jk(_,q){if(typeof _!=="function")return _;var f=function K(){var $=arguments[arguments.length-1];return arguments[arguments.length-1]=q($),_.apply(this,arguments)};return f}});var y5=l((Gk)=>{Gk.__esModule=!0;Gk.checkRevision=hk;Gk.template=Jk;Gk.wrapProgram=d$;Gk.resolvePartial=kk;Gk.invokePartial=Zk;Gk.noop=I5;function Yk(_){return _&&_.__esModule?_:{default:_}}function Tk(_){if(_&&_.__esModule)return _;else{var q={};if(_!=null){for(var f in _)if(Object.prototype.hasOwnProperty.call(_,f))q[f]=_[f]}return q.default=_,q}}var zk=Lq(),i_=Tk(zk),Wk=j_(),o_=Yk(Wk),c_=g$(),d5=UP(),Hk=g5(),a5=QP();function hk(_){var q=_&&_[0]||1,f=c_.COMPILER_REVISION;if(q>=c_.LAST_COMPATIBLE_COMPILER_REVISION&&q<=c_.COMPILER_REVISION)return;if(q<c_.LAST_COMPATIBLE_COMPILER_REVISION){var K=c_.REVISION_CHANGES[f],$=c_.REVISION_CHANGES[q];throw new o_.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+K+") or downgrade your runtime to an older version ("+$+").")}else throw new o_.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+_[1]+").")}function Jk(_,q){if(!q)throw new o_.default("No environment passed to template");if(!_||!_.main)throw new o_.default("Unknown template object: "+typeof _);_.main.decorator=_.main_d,q.VM.checkRevision(_.compiler);var f=_.compiler&&_.compiler[0]===7;function K(j,v,w){if(w.hash){if(v=i_.extend({},v,w.hash),w.ids)w.ids[0]=!0}j=q.VM.resolvePartial.call(this,j,v,w);var O=i_.extend({},w,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),T=q.VM.invokePartial.call(this,j,v,O);if(T==null&&q.compile)w.partials[w.name]=q.compile(j,_.compilerOptions,q),T=w.partials[w.name](v,O);if(T!=null){if(w.indent){var Y=T.split(`
|
|
8
8
|
`);for(var z=0,H=Y.length;z<H;z++){if(!Y[z]&&z+1===H)break;Y[z]=w.indent+Y[z]}T=Y.join(`
|
|
9
|
-
`)}return T}else throw new o_.default("The partial "+w.name+" could not be compiled when running in runtime-only mode")}var $={strict:function j(v,w,O){if(!v||!(w in v))throw new o_.default('"'+w+'" not defined in '+v,{loc:O});return $.lookupProperty(v,w)},lookupProperty:function j(v,w){var O=v[w];if(O==null)return O;if(Object.prototype.hasOwnProperty.call(v,w))return O;if(g5.resultIsAllowed(O,$.protoAccessControl,w))return O;return},lookup:function j(v,w){var O=v.length;for(var T=0;T<O;T++){var Y=v[T]&&$.lookupProperty(v[T],w);if(Y!=null)return v[T][w]}},lambda:function j(v,w){return typeof v==="function"?v.call(w):v},escapeExpression:i_.escapeExpression,invokePartial:K,fn:function j(v){var w=_[v];return w.decorator=_[v+"_d"],w},programs:[],program:function j(v,w,O,T,Y){var z=this.programs[v],H=this.fn(v);if(w||Y||T||O)z=E$(this,v,H,w,O,T,Y);else if(!z)z=this.programs[v]=E$(this,v,H);return z},data:function j(v,w){while(v&&w--)v=v._parent;return v},mergeIfNeeded:function j(v,w){var O=v||w;if(v&&w&&v!==w)O=i_.extend({},w,v);return O},nullContext:Object.seal({}),noop:q.VM.noop,compilerInfo:_.compiler};function P(j){var v=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],w=v.data;if(P._setup(v),!v.partial&&_.useData)w=kk(j,w);var O=void 0,T=_.useBlockParams?[]:void 0;if(_.useDepths)if(v.depths)O=j!=v.depths[0]?[j].concat(v.depths):v.depths;else O=[j];function Y(z){return""+_.main($,z,$.helpers,$.partials,w,T,O)}return Y=a5(_.main,Y,$,v.depths||[],w,T),Y(j,v)}return P.isTop=!0,P._setup=function(j){if(!j.partial){var v=i_.extend({},q.helpers,j.helpers);if(Zk(v,$),$.helpers=v,_.usePartial)$.partials=$.mergeIfNeeded(j.partials,q.partials);if(_.usePartial||_.useDecorators)$.decorators=i_.extend({},q.decorators,j.decorators);$.hooks={},$.protoAccessControl=g5.createProtoAccessControl(j);var w=j.allowCallsToHelperMissing||f;E5.moveHelperToHooks($,"helperMissing",w),E5.moveHelperToHooks($,"blockHelperMissing",w)}else $.protoAccessControl=j.protoAccessControl,$.helpers=j.helpers,$.partials=j.partials,$.decorators=j.decorators,$.hooks=j.hooks},P._child=function(j,v,w,O){if(_.useBlockParams&&!w)throw new o_.default("must pass block params");if(_.useDepths&&!O)throw new o_.default("must pass parent depths");return E$($,j,_[j],v,0,w,O)},P}function E$(_,q,f,K,$,P,j){function v(w){var O=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],T=j;if(j&&w!=j[0]&&!(w===_.nullContext&&j[0]===null))T=[w].concat(j);return f(_,w,_.helpers,_.partials,O.data||K,P&&[O.blockParams].concat(P),T)}return v=a5(f,v,_,j,K,P),v.program=q,v.depth=j?j.length:0,v.blockParams=$||0,v}function hk(_,q,f){if(!_)if(f.name==="@partial-block")_=f.data["partial-block"];else _=f.partials[f.name];else if(!_.call&&!f.name)f.name=_,_=f.partials[_];return _}function Jk(_,q,f){var K=f.data&&f.data["partial-block"];if(f.partial=!0,f.ids)f.data.contextPath=f.ids[0]||f.data.contextPath;var $=void 0;if(f.fn&&f.fn!==d5)(function(){f.data=c_.createFrame(f.data);var P=f.fn;if($=f.data["partial-block"]=function j(v){var w=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return w.data=c_.createFrame(w.data),w.data["partial-block"]=K,P(v,w)},P.partials)f.partials=i_.extend({},f.partials,P.partials)})();if(_===void 0&&$)_=$;if(_===void 0)throw new o_.default("The partial "+f.name+" could not be found");else if(_ instanceof Function)return _(q,f)}function d5(){return""}function kk(_,q){if(!q||!("root"in q))q=q?c_.createFrame(q):{},q.root=_;return q}function a5(_,q,f,K,$,P){if(_.decorator){var j={};q=_.decorator(q,j,f,K&&K[0],$,P,K),i_.extend(q,j)}return q}function Zk(_,q){Object.keys(_).forEach(function(f){var K=_[f];_[f]=Xk(K,q)})}function Xk(_,q){var f=q.lookupProperty;return zk.wrapHelper(_,function(K){return i_.extend({lookupProperty:f},K)})}});var f3=p((D5,y5)=>{D5.__esModule=!0;D5.default=function(_){(function(){if(typeof globalThis==="object")return;Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__})();var q=globalThis.Handlebars;_.noConflict=function(){if(globalThis.Handlebars===_)globalThis.Handlebars=q;return _}};y5.exports=D5.default});var e5=p((L5,t5)=>{L5.__esModule=!0;function K3(_){return _&&_.__esModule?_:{default:_}}function P3(_){if(_&&_.__esModule)return _;else{var q={};if(_!=null){for(var f in _)if(Object.prototype.hasOwnProperty.call(_,f))q[f]=_[f]}return q.default=_,q}}var Ck=R$(),i5=P3(Ck),pk=n5(),lk=K3(pk),nk=j_(),Rk=K3(nk),Ek=Lq(),$3=P3(Ek),gk=I5(),o5=P3(gk),dk=f3(),ak=K3(dk);function c5(){var _=new i5.HandlebarsEnvironment;return $3.extend(_,i5),_.SafeString=lk.default,_.Exception=Rk.default,_.Utils=$3,_.escapeExpression=$3.escapeExpression,_.VM=o5,_.template=function(q){return o5.template(q,_)},_}var _6=c5();_6.create=c5;ak.default(_6);_6.default=_6;L5.default=_6;t5.exports=L5.default});var j3=p((s5,B5)=>{s5.__esModule=!0;var x5={helpers:{helperExpression:function _(q){return q.type==="SubExpression"||(q.type==="MustacheStatement"||q.type==="BlockStatement")&&!!(q.params&&q.params.length||q.hash)},scopedId:function _(q){return/^\.|this\b/.test(q.original)},simpleId:function _(q){return q.parts.length===1&&!x5.helpers.scopedId(q)&&!q.depth}}};s5.default=x5;B5.exports=s5.default});var Q5=p((U5,F5)=>{U5.__esModule=!0;var ok=function(){var _={trace:function K(){},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 K($,P,j,v,w,O,T){var Y=O.length-1;switch(w){case 1:return O[Y-1];case 2:this.$=v.prepareProgram(O[Y]);break;case 3:this.$=O[Y];break;case 4:this.$=O[Y];break;case 5:this.$=O[Y];break;case 6:this.$=O[Y];break;case 7:this.$=O[Y];break;case 8:this.$=O[Y];break;case 9:this.$={type:"CommentStatement",value:v.stripComment(O[Y]),strip:v.stripFlags(O[Y],O[Y]),loc:v.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:O[Y],value:O[Y],loc:v.locInfo(this._$)};break;case 11:this.$=v.prepareRawBlock(O[Y-2],O[Y-1],O[Y],this._$);break;case 12:this.$={path:O[Y-3],params:O[Y-2],hash:O[Y-1]};break;case 13:this.$=v.prepareBlock(O[Y-3],O[Y-2],O[Y-1],O[Y],!1,this._$);break;case 14:this.$=v.prepareBlock(O[Y-3],O[Y-2],O[Y-1],O[Y],!0,this._$);break;case 15:this.$={open:O[Y-5],path:O[Y-4],params:O[Y-3],hash:O[Y-2],blockParams:O[Y-1],strip:v.stripFlags(O[Y-5],O[Y])};break;case 16:this.$={path:O[Y-4],params:O[Y-3],hash:O[Y-2],blockParams:O[Y-1],strip:v.stripFlags(O[Y-5],O[Y])};break;case 17:this.$={path:O[Y-4],params:O[Y-3],hash:O[Y-2],blockParams:O[Y-1],strip:v.stripFlags(O[Y-5],O[Y])};break;case 18:this.$={strip:v.stripFlags(O[Y-1],O[Y-1]),program:O[Y]};break;case 19:var z=v.prepareBlock(O[Y-2],O[Y-1],O[Y],O[Y],!1,this._$),H=v.prepareProgram([z],O[Y-1].loc);H.chained=!0,this.$={strip:O[Y-2].strip,program:H,chain:!0};break;case 20:this.$=O[Y];break;case 21:this.$={path:O[Y-1],strip:v.stripFlags(O[Y-2],O[Y])};break;case 22:this.$=v.prepareMustache(O[Y-3],O[Y-2],O[Y-1],O[Y-4],v.stripFlags(O[Y-4],O[Y]),this._$);break;case 23:this.$=v.prepareMustache(O[Y-3],O[Y-2],O[Y-1],O[Y-4],v.stripFlags(O[Y-4],O[Y]),this._$);break;case 24:this.$={type:"PartialStatement",name:O[Y-3],params:O[Y-2],hash:O[Y-1],indent:"",strip:v.stripFlags(O[Y-4],O[Y]),loc:v.locInfo(this._$)};break;case 25:this.$=v.preparePartialBlock(O[Y-2],O[Y-1],O[Y],this._$);break;case 26:this.$={path:O[Y-3],params:O[Y-2],hash:O[Y-1],strip:v.stripFlags(O[Y-4],O[Y])};break;case 27:this.$=O[Y];break;case 28:this.$=O[Y];break;case 29:this.$={type:"SubExpression",path:O[Y-3],params:O[Y-2],hash:O[Y-1],loc:v.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:O[Y],loc:v.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:v.id(O[Y-2]),value:O[Y],loc:v.locInfo(this._$)};break;case 32:this.$=v.id(O[Y-1]);break;case 33:this.$=O[Y];break;case 34:this.$=O[Y];break;case 35:this.$={type:"StringLiteral",value:O[Y],original:O[Y],loc:v.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(O[Y]),original:Number(O[Y]),loc:v.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:O[Y]==="true",original:O[Y]==="true",loc:v.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:v.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:v.locInfo(this._$)};break;case 40:this.$=O[Y];break;case 41:this.$=O[Y];break;case 42:this.$=v.preparePath(!0,O[Y],this._$);break;case 43:this.$=v.preparePath(!1,O[Y],this._$);break;case 44:O[Y-2].push({part:v.id(O[Y]),original:O[Y],separator:O[Y-1]}),this.$=O[Y-2];break;case 45:this.$=[{part:v.id(O[Y]),original:O[Y]}];break;case 46:this.$=[];break;case 47:O[Y-1].push(O[Y]);break;case 48:this.$=[];break;case 49:O[Y-1].push(O[Y]);break;case 50:this.$=[];break;case 51:O[Y-1].push(O[Y]);break;case 58:this.$=[];break;case 59:O[Y-1].push(O[Y]);break;case 64:this.$=[];break;case 65:O[Y-1].push(O[Y]);break;case 70:this.$=[];break;case 71:O[Y-1].push(O[Y]);break;case 78:this.$=[];break;case 79:O[Y-1].push(O[Y]);break;case 82:this.$=[];break;case 83:O[Y-1].push(O[Y]);break;case 86:this.$=[];break;case 87:O[Y-1].push(O[Y]);break;case 90:this.$=[];break;case 91:O[Y-1].push(O[Y]);break;case 94:this.$=[];break;case 95:O[Y-1].push(O[Y]);break;case 98:this.$=[O[Y]];break;case 99:O[Y-1].push(O[Y]);break;case 100:this.$=[O[Y]];break;case 101:O[Y-1].push(O[Y]);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 K($,P){throw new Error($)},parse:function K($){var P=this,j=[0],v=[null],w=[],O=this.table,T="",Y=0,z=0,H=0,h=2,J=1;if(this.lexer.setInput($),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc=="undefined")this.lexer.yylloc={};var k=this.lexer.yylloc;w.push(k);var X=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function l(I){j.length=j.length-2*I,v.length=v.length-I,w.length=w.length-I}function N(){var I=P.lexer.lex()||1;if(typeof I!=="number")I=P.symbols_[I]||I;return I}var n,R,g,V,M,C,a={},r,A,u,m;while(!0){if(g=j[j.length-1],this.defaultActions[g])V=this.defaultActions[g];else{if(n===null||typeof n=="undefined")n=N();V=O[g]&&O[g][n]}if(typeof V==="undefined"||!V.length||!V[0]){var S="";if(!H){m=[];for(r in O[g])if(this.terminals_[r]&&r>2)m.push("'"+this.terminals_[r]+"'");if(this.lexer.showPosition)S="Parse error on line "+(Y+1)+`:
|
|
9
|
+
`)}return T}else throw new o_.default("The partial "+w.name+" could not be compiled when running in runtime-only mode")}var $={strict:function j(v,w,O){if(!v||!(w in v))throw new o_.default('"'+w+'" not defined in '+v,{loc:O});return $.lookupProperty(v,w)},lookupProperty:function j(v,w){var O=v[w];if(O==null)return O;if(Object.prototype.hasOwnProperty.call(v,w))return O;if(a5.resultIsAllowed(O,$.protoAccessControl,w))return O;return},lookup:function j(v,w){var O=v.length;for(var T=0;T<O;T++){var Y=v[T]&&$.lookupProperty(v[T],w);if(Y!=null)return v[T][w]}},lambda:function j(v,w){return typeof v==="function"?v.call(w):v},escapeExpression:i_.escapeExpression,invokePartial:K,fn:function j(v){var w=_[v];return w.decorator=_[v+"_d"],w},programs:[],program:function j(v,w,O,T,Y){var z=this.programs[v],H=this.fn(v);if(w||Y||T||O)z=d$(this,v,H,w,O,T,Y);else if(!z)z=this.programs[v]=d$(this,v,H);return z},data:function j(v,w){while(v&&w--)v=v._parent;return v},mergeIfNeeded:function j(v,w){var O=v||w;if(v&&w&&v!==w)O=i_.extend({},w,v);return O},nullContext:Object.seal({}),noop:q.VM.noop,compilerInfo:_.compiler};function P(j){var v=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],w=v.data;if(P._setup(v),!v.partial&&_.useData)w=Xk(j,w);var O=void 0,T=_.useBlockParams?[]:void 0;if(_.useDepths)if(v.depths)O=j!=v.depths[0]?[j].concat(v.depths):v.depths;else O=[j];function Y(z){return""+_.main($,z,$.helpers,$.partials,w,T,O)}return Y=D5(_.main,Y,$,v.depths||[],w,T),Y(j,v)}return P.isTop=!0,P._setup=function(j){if(!j.partial){var v=i_.extend({},q.helpers,j.helpers);if(Ak(v,$),$.helpers=v,_.usePartial)$.partials=$.mergeIfNeeded(j.partials,q.partials);if(_.usePartial||_.useDecorators)$.decorators=i_.extend({},q.decorators,j.decorators);$.hooks={},$.protoAccessControl=a5.createProtoAccessControl(j);var w=j.allowCallsToHelperMissing||f;d5.moveHelperToHooks($,"helperMissing",w),d5.moveHelperToHooks($,"blockHelperMissing",w)}else $.protoAccessControl=j.protoAccessControl,$.helpers=j.helpers,$.partials=j.partials,$.decorators=j.decorators,$.hooks=j.hooks},P._child=function(j,v,w,O){if(_.useBlockParams&&!w)throw new o_.default("must pass block params");if(_.useDepths&&!O)throw new o_.default("must pass parent depths");return d$($,j,_[j],v,0,w,O)},P}function d$(_,q,f,K,$,P,j){function v(w){var O=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],T=j;if(j&&w!=j[0]&&!(w===_.nullContext&&j[0]===null))T=[w].concat(j);return f(_,w,_.helpers,_.partials,O.data||K,P&&[O.blockParams].concat(P),T)}return v=D5(f,v,_,j,K,P),v.program=q,v.depth=j?j.length:0,v.blockParams=$||0,v}function kk(_,q,f){if(!_)if(f.name==="@partial-block")_=f.data["partial-block"];else _=f.partials[f.name];else if(!_.call&&!f.name)f.name=_,_=f.partials[_];return _}function Zk(_,q,f){var K=f.data&&f.data["partial-block"];if(f.partial=!0,f.ids)f.data.contextPath=f.ids[0]||f.data.contextPath;var $=void 0;if(f.fn&&f.fn!==I5)(function(){f.data=c_.createFrame(f.data);var P=f.fn;if($=f.data["partial-block"]=function j(v){var w=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return w.data=c_.createFrame(w.data),w.data["partial-block"]=K,P(v,w)},P.partials)f.partials=i_.extend({},f.partials,P.partials)})();if(_===void 0&&$)_=$;if(_===void 0)throw new o_.default("The partial "+f.name+" could not be found");else if(_ instanceof Function)return _(q,f)}function I5(){return""}function Xk(_,q){if(!q||!("root"in q))q=q?c_.createFrame(q):{},q.root=_;return q}function D5(_,q,f,K,$,P){if(_.decorator){var j={};q=_.decorator(q,j,f,K&&K[0],$,P,K),i_.extend(q,j)}return q}function Ak(_,q){Object.keys(_).forEach(function(f){var K=_[f];_[f]=uk(K,q)})}function uk(_,q){var f=q.lookupProperty;return Hk.wrapHelper(_,function(K){return i_.extend({lookupProperty:f},K)})}});var K3=l((i5,o5)=>{i5.__esModule=!0;i5.default=function(_){(function(){if(typeof globalThis==="object")return;Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__})();var q=globalThis.Handlebars;_.noConflict=function(){if(globalThis.Handlebars===_)globalThis.Handlebars=q;return _}};o5.exports=i5.default});var s5=l((e5,x5)=>{e5.__esModule=!0;function j3(_){return _&&_.__esModule?_:{default:_}}function v3(_){if(_&&_.__esModule)return _;else{var q={};if(_!=null){for(var f in _)if(Object.prototype.hasOwnProperty.call(_,f))q[f]=_[f]}return q.default=_,q}}var lk=g$(),c5=v3(lk),nk=E5(),Rk=j3(nk),Ek=j_(),gk=j3(Ek),dk=Lq(),P3=v3(dk),ak=y5(),L5=v3(ak),Ik=K3(),Dk=j3(Ik);function t5(){var _=new c5.HandlebarsEnvironment;return P3.extend(_,c5),_.SafeString=Rk.default,_.Exception=gk.default,_.Utils=P3,_.escapeExpression=P3.escapeExpression,_.VM=L5,_.template=function(q){return L5.template(q,_)},_}var _f=t5();_f.create=t5;Dk.default(_f);_f.default=_f;e5.default=_f;x5.exports=e5.default});var w3=l((U5,F5)=>{U5.__esModule=!0;var B5={helpers:{helperExpression:function _(q){return q.type==="SubExpression"||(q.type==="MustacheStatement"||q.type==="BlockStatement")&&!!(q.params&&q.params.length||q.hash)},scopedId:function _(q){return/^\.|this\b/.test(q.original)},simpleId:function _(q){return q.parts.length===1&&!B5.helpers.scopedId(q)&&!q.depth}}};U5.default=B5;F5.exports=U5.default});var _w=l((Q5,qw)=>{Q5.__esModule=!0;var Lk=function(){var _={trace:function K(){},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 K($,P,j,v,w,O,T){var Y=O.length-1;switch(w){case 1:return O[Y-1];case 2:this.$=v.prepareProgram(O[Y]);break;case 3:this.$=O[Y];break;case 4:this.$=O[Y];break;case 5:this.$=O[Y];break;case 6:this.$=O[Y];break;case 7:this.$=O[Y];break;case 8:this.$=O[Y];break;case 9:this.$={type:"CommentStatement",value:v.stripComment(O[Y]),strip:v.stripFlags(O[Y],O[Y]),loc:v.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:O[Y],value:O[Y],loc:v.locInfo(this._$)};break;case 11:this.$=v.prepareRawBlock(O[Y-2],O[Y-1],O[Y],this._$);break;case 12:this.$={path:O[Y-3],params:O[Y-2],hash:O[Y-1]};break;case 13:this.$=v.prepareBlock(O[Y-3],O[Y-2],O[Y-1],O[Y],!1,this._$);break;case 14:this.$=v.prepareBlock(O[Y-3],O[Y-2],O[Y-1],O[Y],!0,this._$);break;case 15:this.$={open:O[Y-5],path:O[Y-4],params:O[Y-3],hash:O[Y-2],blockParams:O[Y-1],strip:v.stripFlags(O[Y-5],O[Y])};break;case 16:this.$={path:O[Y-4],params:O[Y-3],hash:O[Y-2],blockParams:O[Y-1],strip:v.stripFlags(O[Y-5],O[Y])};break;case 17:this.$={path:O[Y-4],params:O[Y-3],hash:O[Y-2],blockParams:O[Y-1],strip:v.stripFlags(O[Y-5],O[Y])};break;case 18:this.$={strip:v.stripFlags(O[Y-1],O[Y-1]),program:O[Y]};break;case 19:var z=v.prepareBlock(O[Y-2],O[Y-1],O[Y],O[Y],!1,this._$),H=v.prepareProgram([z],O[Y-1].loc);H.chained=!0,this.$={strip:O[Y-2].strip,program:H,chain:!0};break;case 20:this.$=O[Y];break;case 21:this.$={path:O[Y-1],strip:v.stripFlags(O[Y-2],O[Y])};break;case 22:this.$=v.prepareMustache(O[Y-3],O[Y-2],O[Y-1],O[Y-4],v.stripFlags(O[Y-4],O[Y]),this._$);break;case 23:this.$=v.prepareMustache(O[Y-3],O[Y-2],O[Y-1],O[Y-4],v.stripFlags(O[Y-4],O[Y]),this._$);break;case 24:this.$={type:"PartialStatement",name:O[Y-3],params:O[Y-2],hash:O[Y-1],indent:"",strip:v.stripFlags(O[Y-4],O[Y]),loc:v.locInfo(this._$)};break;case 25:this.$=v.preparePartialBlock(O[Y-2],O[Y-1],O[Y],this._$);break;case 26:this.$={path:O[Y-3],params:O[Y-2],hash:O[Y-1],strip:v.stripFlags(O[Y-4],O[Y])};break;case 27:this.$=O[Y];break;case 28:this.$=O[Y];break;case 29:this.$={type:"SubExpression",path:O[Y-3],params:O[Y-2],hash:O[Y-1],loc:v.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:O[Y],loc:v.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:v.id(O[Y-2]),value:O[Y],loc:v.locInfo(this._$)};break;case 32:this.$=v.id(O[Y-1]);break;case 33:this.$=O[Y];break;case 34:this.$=O[Y];break;case 35:this.$={type:"StringLiteral",value:O[Y],original:O[Y],loc:v.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(O[Y]),original:Number(O[Y]),loc:v.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:O[Y]==="true",original:O[Y]==="true",loc:v.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:v.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:v.locInfo(this._$)};break;case 40:this.$=O[Y];break;case 41:this.$=O[Y];break;case 42:this.$=v.preparePath(!0,O[Y],this._$);break;case 43:this.$=v.preparePath(!1,O[Y],this._$);break;case 44:O[Y-2].push({part:v.id(O[Y]),original:O[Y],separator:O[Y-1]}),this.$=O[Y-2];break;case 45:this.$=[{part:v.id(O[Y]),original:O[Y]}];break;case 46:this.$=[];break;case 47:O[Y-1].push(O[Y]);break;case 48:this.$=[];break;case 49:O[Y-1].push(O[Y]);break;case 50:this.$=[];break;case 51:O[Y-1].push(O[Y]);break;case 58:this.$=[];break;case 59:O[Y-1].push(O[Y]);break;case 64:this.$=[];break;case 65:O[Y-1].push(O[Y]);break;case 70:this.$=[];break;case 71:O[Y-1].push(O[Y]);break;case 78:this.$=[];break;case 79:O[Y-1].push(O[Y]);break;case 82:this.$=[];break;case 83:O[Y-1].push(O[Y]);break;case 86:this.$=[];break;case 87:O[Y-1].push(O[Y]);break;case 90:this.$=[];break;case 91:O[Y-1].push(O[Y]);break;case 94:this.$=[];break;case 95:O[Y-1].push(O[Y]);break;case 98:this.$=[O[Y]];break;case 99:O[Y-1].push(O[Y]);break;case 100:this.$=[O[Y]];break;case 101:O[Y-1].push(O[Y]);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 K($,P){throw new Error($)},parse:function K($){var P=this,j=[0],v=[null],w=[],O=this.table,T="",Y=0,z=0,H=0,k=2,J=1;if(this.lexer.setInput($),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc=="undefined")this.lexer.yylloc={};var h=this.lexer.yylloc;w.push(h);var X=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function M(a){j.length=j.length-2*a,v.length=v.length-a,w.length=w.length-a}function b(){var a=P.lexer.lex()||1;if(typeof a!=="number")a=P.symbols_[a]||a;return a}var N,p,g,D,u,C,R={},r,m,A,V;while(!0){if(g=j[j.length-1],this.defaultActions[g])D=this.defaultActions[g];else{if(N===null||typeof N=="undefined")N=b();D=O[g]&&O[g][N]}if(typeof D==="undefined"||!D.length||!D[0]){var n="";if(!H){V=[];for(r in O[g])if(this.terminals_[r]&&r>2)V.push("'"+this.terminals_[r]+"'");if(this.lexer.showPosition)n="Parse error on line "+(Y+1)+`:
|
|
10
10
|
`+this.lexer.showPosition()+`
|
|
11
|
-
Expecting `+
|
|
11
|
+
Expecting `+V.join(", ")+", got '"+(this.terminals_[N]||N)+"'";else n="Parse error on line "+(Y+1)+": Unexpected "+(N==1?"end of input":"'"+(this.terminals_[N]||N)+"'");this.parseError(n,{text:this.lexer.match,token:this.terminals_[N]||N,line:this.lexer.yylineno,loc:h,expected:V})}}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+N);switch(D[0]){case 1:if(j.push(N),v.push(this.lexer.yytext),w.push(this.lexer.yylloc),j.push(D[1]),N=null,!p){if(z=this.lexer.yyleng,T=this.lexer.yytext,Y=this.lexer.yylineno,h=this.lexer.yylloc,H>0)H--}else N=p,p=null;break;case 2:if(m=this.productions_[D[1]][1],R.$=v[v.length-m],R._$={first_line:w[w.length-(m||1)].first_line,last_line:w[w.length-1].last_line,first_column:w[w.length-(m||1)].first_column,last_column:w[w.length-1].last_column},X)R._$.range=[w[w.length-(m||1)].range[0],w[w.length-1].range[1]];if(C=this.performAction.call(R,T,z,Y,this.yy,D[1],v,w),typeof C!=="undefined")return C;if(m)j=j.slice(0,-1*m*2),v=v.slice(0,-1*m),w=w.slice(0,-1*m);j.push(this.productions_[D[1]][0]),v.push(R.$),w.push(R._$),A=O[j[j.length-2]][j[j.length-1]],j.push(A);break;case 3:return!0}}return!0}},q=function(){var K={EOF:1,parseError:function $(P,j){if(this.yy.parser)this.yy.parser.parseError(P,j);else throw new Error(P)},setInput:function $(P){if(this._input=P,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];return this.offset=0,this},input:function $(){var P=this._input[0];this.yytext+=P,this.yyleng++,this.offset++,this.match+=P,this.matched+=P;var j=P.match(/(?:\r\n?|\n).*/g);if(j)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),P},unput:function $(P){var j=P.length,v=P.split(/(?:\r\n?|\n)/g);this._input=P+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-j-1),this.offset-=j;var w=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1)this.yylineno-=v.length-1;var O=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===w.length?this.yylloc.first_column:0)+w[w.length-v.length].length-v[0].length:this.yylloc.first_column-j},this.options.ranges)this.yylloc.range=[O[0],O[0]+this.yyleng-j];return this},more:function $(){return this._more=!0,this},less:function $(P){this.unput(this.match.slice(P))},pastInput:function $(){var P=this.matched.substr(0,this.matched.length-this.match.length);return(P.length>20?"...":"")+P.substr(-20).replace(/\n/g,"")},upcomingInput:function $(){var P=this.match;if(P.length<20)P+=this._input.substr(0,20-P.length);return(P.substr(0,20)+(P.length>20?"...":"")).replace(/\n/g,"")},showPosition:function $(){var P=this.pastInput(),j=new Array(P.length+1).join("-");return P+this.upcomingInput()+`
|
|
12
12
|
`+j+"^"},next:function $(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var P,j,v,w,O,T;if(!this._more)this.yytext="",this.match="";var Y=this._currentRules();for(var z=0;z<Y.length;z++)if(v=this._input.match(this.rules[Y[z]]),v&&(!j||v[0].length>j[0].length)){if(j=v,w=z,!this.options.flex)break}if(j){if(T=j[0].match(/(?:\r\n?|\n).*/g),T)this.yylineno+=T.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:T?T[T.length-1].length-T[T.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+j[0].length},this.yytext+=j[0],this.match+=j[0],this.matches=j,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._input=this._input.slice(j[0].length),this.matched+=j[0],P=this.performAction.call(this,this.yy,this,Y[w],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(P)return P;else return}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
13
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function $(){var P=this.next();if(typeof P!=="undefined")return P;else return this.lex()},begin:function $(P){this.conditionStack.push(P)},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 $(P){this.begin(P)}};return K.options={},K.performAction=function $(P,j,v,w){function O(Y,z){return j.yytext=j.yytext.substring(Y,j.yyleng-z+Y)}var T=w;switch(v){case 0:if(j.yytext.slice(-2)==="\\\\")O(0,1),this.begin("mu");else if(j.yytext.slice(-1)==="\\")O(0,1),this.begin("emu");else this.begin("mu");if(j.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:if(this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw")return 15;else return O(5,9),"END_RAW_BLOCK";break;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(j.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 j.yytext=O(1,2).replace(/\\"/g,'"'),80;break;case 32:return j.yytext=O(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 j.yytext=j.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},K.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\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],K.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}},K}();_.lexer=q;function f(){this.yy={}}return f.prototype=_,_.Parser=f,new f}();U5.default=ok;F5.exports=U5.default});var a$=p((fw,$w)=>{fw.__esModule=!0;function tk(_){return _&&_.__esModule?_:{default:_}}var ek=j_(),v3=tk(ek);function g$(){this.parents=[]}g$.prototype={constructor:g$,mutating:!1,acceptKey:function _(q,f){var K=this.accept(q[f]);if(this.mutating){if(K&&!g$.prototype[K.type])throw new v3.default('Unexpected node type "'+K.type+'" found when accepting '+f+" on "+q.type);q[f]=K}},acceptRequired:function _(q,f){if(this.acceptKey(q,f),!q[f])throw new v3.default(q.type+" requires "+f)},acceptArray:function _(q){for(var f=0,K=q.length;f<K;f++)if(this.acceptKey(q,f),!q[f])q.splice(f,1),f--,K--},accept:function _(q){if(!q)return;if(!this[q.type])throw new v3.default("Unknown type: "+q.type,q);if(this.current)this.parents.unshift(this.current);this.current=q;var f=this[q.type](q);if(this.current=this.parents.shift(),!this.mutating||f)return f;else if(f!==!1)return q},Program:function _(q){this.acceptArray(q.body)},MustacheStatement:d$,Decorator:d$,BlockStatement:qw,DecoratorBlock:qw,PartialStatement:_w,PartialBlockStatement:function _(q){_w.call(this,q),this.acceptKey(q,"program")},ContentStatement:function _(){},CommentStatement:function _(){},SubExpression:d$,PathExpression:function _(){},StringLiteral:function _(){},NumberLiteral:function _(){},BooleanLiteral:function _(){},UndefinedLiteral:function _(){},NullLiteral:function _(){},Hash:function _(q){this.acceptArray(q.pairs)},HashPair:function _(q){this.acceptRequired(q,"value")}};function d$(_){this.acceptRequired(_,"path"),this.acceptArray(_.params),this.acceptKey(_,"hash")}function qw(_){d$.call(this,_),this.acceptKey(_,"program"),this.acceptKey(_,"inverse")}function _w(_){this.acceptRequired(_,"name"),this.acceptArray(_.params),this.acceptKey(_,"hash")}fw.default=g$;$w.exports=fw.default});var jw=p((Kw,Pw)=>{Kw.__esModule=!0;function Bk(_){return _&&_.__esModule?_:{default:_}}var Uk=a$(),Fk=Bk(Uk);function C_(){var _=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=_}C_.prototype=new Fk.default;C_.prototype.Program=function(_){var q=!this.options.ignoreStandalone,f=!this.isRootSeen;this.isRootSeen=!0;var K=_.body;for(var $=0,P=K.length;$<P;$++){var j=K[$],v=this.accept(j);if(!v)continue;var w=w3(K,$,f),O=O3(K,$,f),T=v.openStandalone&&w,Y=v.closeStandalone&&O,z=v.inlineStandalone&&w&&O;if(v.close)N8(K,$,!0);if(v.open)K8(K,$,!0);if(q&&z){if(N8(K,$),K8(K,$)){if(j.type==="PartialStatement")j.indent=/([ \t]+$)/.exec(K[$-1].original)[1]}}if(q&&T)N8((j.program||j.inverse).body),K8(K,$);if(q&&Y)N8(K,$),K8((j.inverse||j.program).body)}return _};C_.prototype.BlockStatement=C_.prototype.DecoratorBlock=C_.prototype.PartialBlockStatement=function(_){this.accept(_.program),this.accept(_.inverse);var q=_.program||_.inverse,f=_.program&&_.inverse,K=f,$=f;if(f&&f.chained){K=f.body[0].program;while($.chained)$=$.body[$.body.length-1].program}var P={open:_.openStrip.open,close:_.closeStrip.close,openStandalone:O3(q.body),closeStandalone:w3((K||q).body)};if(_.openStrip.close)N8(q.body,null,!0);if(f){var j=_.inverseStrip;if(j.open)K8(q.body,null,!0);if(j.close)N8(K.body,null,!0);if(_.closeStrip.open)K8($.body,null,!0);if(!this.options.ignoreStandalone&&w3(q.body)&&O3(K.body))K8(q.body),N8(K.body)}else if(_.closeStrip.open)K8(q.body,null,!0);return P};C_.prototype.Decorator=C_.prototype.MustacheStatement=function(_){return _.strip};C_.prototype.PartialStatement=C_.prototype.CommentStatement=function(_){var q=_.strip||{};return{inlineStandalone:!0,open:q.open,close:q.close}};function w3(_,q,f){if(q===void 0)q=_.length;var K=_[q-1],$=_[q-2];if(!K)return f;if(K.type==="ContentStatement")return($||!f?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(K.original)}function O3(_,q,f){if(q===void 0)q=-1;var K=_[q+1],$=_[q+2];if(!K)return f;if(K.type==="ContentStatement")return($||!f?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(K.original)}function N8(_,q,f){var K=_[q==null?0:q+1];if(!K||K.type!=="ContentStatement"||!f&&K.rightStripped)return;var $=K.value;K.value=K.value.replace(f?/^\s+/:/^[ \t]*\r?\n?/,""),K.rightStripped=K.value!==$}function K8(_,q,f){var K=_[q==null?_.length-1:q-1];if(!K||K.type!=="ContentStatement"||!f&&K.leftStripped)return;var $=K.value;return K.value=K.value.replace(f?/\s+$/:/[ \t]+$/,""),K.leftStripped=K.value!==$,K.leftStripped}Kw.default=C_;Pw.exports=Kw.default});var vw=p((WZ)=>{WZ.__esModule=!0;WZ.SourceLocation=$Z;WZ.id=KZ;WZ.stripFlags=PZ;WZ.stripComment=jZ;WZ.preparePath=vZ;WZ.prepareMustache=wZ;WZ.prepareRawBlock=OZ;WZ.prepareBlock=YZ;WZ.prepareProgram=TZ;WZ.preparePartialBlock=zZ;function _Z(_){return _&&_.__esModule?_:{default:_}}var fZ=j_(),Y3=_Z(fZ);function T3(_,q){if(q=q.path?q.path.original:q,_.path.original!==q){var f={loc:_.path.loc};throw new Y3.default(_.path.original+" doesn't match "+q,f)}}function $Z(_,q){this.source=_,this.start={line:q.first_line,column:q.first_column},this.end={line:q.last_line,column:q.last_column}}function KZ(_){if(/^\[.*\]$/.test(_))return _.substring(1,_.length-1);else return _}function PZ(_,q){return{open:_.charAt(2)==="~",close:q.charAt(q.length-3)==="~"}}function jZ(_){return _.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function vZ(_,q,f){f=this.locInfo(f);var K=_?"@":"",$=[],P=0;for(var j=0,v=q.length;j<v;j++){var w=q[j].part,O=q[j].original!==w;if(K+=(q[j].separator||"")+w,!O&&(w===".."||w==="."||w==="this")){if($.length>0)throw new Y3.default("Invalid path: "+K,{loc:f});else if(w==="..")P++}else $.push(w)}return{type:"PathExpression",data:_,depth:P,parts:$,original:K,loc:f}}function wZ(_,q,f,K,$,P){var j=K.charAt(3)||K.charAt(2),v=j!=="{"&&j!=="&",w=/\*/.test(K);return{type:w?"Decorator":"MustacheStatement",path:_,params:q,hash:f,escaped:v,strip:$,loc:this.locInfo(P)}}function OZ(_,q,f,K){T3(_,f),K=this.locInfo(K);var $={type:"Program",body:q,strip:{},loc:K};return{type:"BlockStatement",path:_.path,params:_.params,hash:_.hash,program:$,openStrip:{},inverseStrip:{},closeStrip:{},loc:K}}function YZ(_,q,f,K,$,P){if(K&&K.path)T3(_,K);var j=/\*/.test(_.open);q.blockParams=_.blockParams;var v=void 0,w=void 0;if(f){if(j)throw new Y3.default("Unexpected inverse block on decorator",f);if(f.chain)f.program.body[0].closeStrip=K.strip;w=f.strip,v=f.program}if($)$=v,v=q,q=$;return{type:j?"DecoratorBlock":"BlockStatement",path:_.path,params:_.params,hash:_.hash,program:q,inverse:v,openStrip:_.strip,inverseStrip:w,closeStrip:K&&K.strip,loc:this.locInfo(P)}}function TZ(_,q){if(!q&&_.length){var f=_[0].loc,K=_[_.length-1].loc;if(f&&K)q={source:f.source,start:{line:f.start.line,column:f.start.column},end:{line:K.end.line,column:K.end.column}}}return{type:"Program",body:_,strip:{},loc:q}}function zZ(_,q,f,K){return T3(_,f),{type:"PartialBlockStatement",name:_.path,params:_.params,hash:_.hash,program:q,openStrip:_.strip,closeStrip:f&&f.strip,loc:this.locInfo(K)}}});var Yw=p((nZ)=>{nZ.__esModule=!0;nZ.parseWithoutProcessing=Ow;nZ.parse=lZ;function bZ(_){if(_&&_.__esModule)return _;else{var q={};if(_!=null){for(var f in _)if(Object.prototype.hasOwnProperty.call(_,f))q[f]=_[f]}return q.default=_,q}}function ww(_){return _&&_.__esModule?_:{default:_}}var VZ=Q5(),z3=ww(VZ),MZ=jw(),SZ=ww(MZ),NZ=vw(),CZ=bZ(NZ),pZ=Lq();nZ.parser=z3.default;var I$={};pZ.extend(I$,CZ);function Ow(_,q){if(_.type==="Program")return _;z3.default.yy=I$,I$.locInfo=function(K){return new I$.SourceLocation(q&&q.srcName,K)};var f=z3.default.parse(_);return f}function lZ(_,q){var f=Ow(_,q),K=new SZ.default(q);return K.accept(f)}});var Hw=p((oZ)=>{oZ.__esModule=!0;oZ.Compiler=W3;oZ.precompile=yZ;oZ.compile=iZ;function zw(_){return _&&_.__esModule?_:{default:_}}var aZ=j_(),$6=zw(aZ),K6=Lq(),IZ=j3(),f6=zw(IZ),DZ=[].slice;function W3(){}W3.prototype={compiler:W3,equals:function _(q){var f=this.opcodes.length;if(q.opcodes.length!==f)return!1;for(var K=0;K<f;K++){var $=this.opcodes[K],P=q.opcodes[K];if($.opcode!==P.opcode||!Ww($.args,P.args))return!1}f=this.children.length;for(var K=0;K<f;K++)if(!this.children[K].equals(q.children[K]))return!1;return!0},guid:0,compile:function _(q,f){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=f,this.stringParams=f.stringParams,this.trackIds=f.trackIds,f.blockParams=f.blockParams||[],f.knownHelpers=K6.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},f.knownHelpers),this.accept(q)},compileProgram:function _(q){var f=new this.compiler,K=f.compile(q,this.options),$=this.guid++;return this.usePartial=this.usePartial||K.usePartial,this.children[$]=K,this.useDepths=this.useDepths||K.useDepths,$},accept:function _(q){if(!this[q.type])throw new $6.default("Unknown type: "+q.type,q);this.sourceNode.unshift(q);var f=this[q.type](q);return this.sourceNode.shift(),f},Program:function _(q){this.options.blockParams.unshift(q.blockParams);var f=q.body,K=f.length;for(var $=0;$<K;$++)this.accept(f[$]);return this.options.blockParams.shift(),this.isSimple=K===1,this.blockParams=q.blockParams?q.blockParams.length:0,this},BlockStatement:function _(q){Tw(q);var{program:f,inverse:K}=q;f=f&&this.compileProgram(f),K=K&&this.compileProgram(K);var $=this.classifySexpr(q);if($==="helper")this.helperSexpr(q,f,K);else if($==="simple")this.simpleSexpr(q),this.opcode("pushProgram",f),this.opcode("pushProgram",K),this.opcode("emptyHash"),this.opcode("blockValue",q.path.original);else this.ambiguousSexpr(q,f,K),this.opcode("pushProgram",f),this.opcode("pushProgram",K),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue");this.opcode("append")},DecoratorBlock:function _(q){var f=q.program&&this.compileProgram(q.program),K=this.setupFullMustacheParams(q,f,void 0),$=q.path;this.useDecorators=!0,this.opcode("registerDecorator",K.length,$.original)},PartialStatement:function _(q){this.usePartial=!0;var f=q.program;if(f)f=this.compileProgram(q.program);var K=q.params;if(K.length>1)throw new $6.default("Unsupported number of partial arguments: "+K.length,q);else if(!K.length)if(this.options.explicitPartialContext)this.opcode("pushLiteral","undefined");else K.push({type:"PathExpression",parts:[],depth:0});var $=q.name.original,P=q.name.type==="SubExpression";if(P)this.accept(q.name);this.setupFullMustacheParams(q,f,void 0,!0);var j=q.indent||"";if(this.options.preventIndent&&j)this.opcode("appendContent",j),j="";this.opcode("invokePartial",P,$,j),this.opcode("append")},PartialBlockStatement:function _(q){this.PartialStatement(q)},MustacheStatement:function _(q){if(this.SubExpression(q),q.escaped&&!this.options.noEscape)this.opcode("appendEscaped");else this.opcode("append")},Decorator:function _(q){this.DecoratorBlock(q)},ContentStatement:function _(q){if(q.value)this.opcode("appendContent",q.value)},CommentStatement:function _(){},SubExpression:function _(q){Tw(q);var f=this.classifySexpr(q);if(f==="simple")this.simpleSexpr(q);else if(f==="helper")this.helperSexpr(q);else this.ambiguousSexpr(q)},ambiguousSexpr:function _(q,f,K){var $=q.path,P=$.parts[0],j=f!=null||K!=null;this.opcode("getContext",$.depth),this.opcode("pushProgram",f),this.opcode("pushProgram",K),$.strict=!0,this.accept($),this.opcode("invokeAmbiguous",P,j)},simpleSexpr:function _(q){var f=q.path;f.strict=!0,this.accept(f),this.opcode("resolvePossibleLambda")},helperSexpr:function _(q,f,K){var $=this.setupFullMustacheParams(q,f,K),P=q.path,j=P.parts[0];if(this.options.knownHelpers[j])this.opcode("invokeKnownHelper",$.length,j);else if(this.options.knownHelpersOnly)throw new $6.default("You specified knownHelpersOnly, but used the unknown helper "+j,q);else P.strict=!0,P.falsy=!0,this.accept(P),this.opcode("invokeHelper",$.length,P.original,f6.default.helpers.simpleId(P))},PathExpression:function _(q){this.addDepth(q.depth),this.opcode("getContext",q.depth);var f=q.parts[0],K=f6.default.helpers.scopedId(q),$=!q.depth&&!K&&this.blockParamIndex(f);if($)this.opcode("lookupBlockParam",$,q.parts);else if(!f)this.opcode("pushContext");else if(q.data)this.options.data=!0,this.opcode("lookupData",q.depth,q.parts,q.strict);else this.opcode("lookupOnContext",q.parts,q.falsy,q.strict,K)},StringLiteral:function _(q){this.opcode("pushString",q.value)},NumberLiteral:function _(q){this.opcode("pushLiteral",q.value)},BooleanLiteral:function _(q){this.opcode("pushLiteral",q.value)},UndefinedLiteral:function _(){this.opcode("pushLiteral","undefined")},NullLiteral:function _(){this.opcode("pushLiteral","null")},Hash:function _(q){var f=q.pairs,K=0,$=f.length;this.opcode("pushHash");for(;K<$;K++)this.pushParam(f[K].value);while(K--)this.opcode("assignToHash",f[K].key);this.opcode("popHash")},opcode:function _(q){this.opcodes.push({opcode:q,args:DZ.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function _(q){if(!q)return;this.useDepths=!0},classifySexpr:function _(q){var f=f6.default.helpers.simpleId(q.path),K=f&&!!this.blockParamIndex(q.path.parts[0]),$=!K&&f6.default.helpers.helperExpression(q),P=!K&&($||f);if(P&&!$){var j=q.path.parts[0],v=this.options;if(v.knownHelpers[j])$=!0;else if(v.knownHelpersOnly)P=!1}if($)return"helper";else if(P)return"ambiguous";else return"simple"},pushParams:function _(q){for(var f=0,K=q.length;f<K;f++)this.pushParam(q[f])},pushParam:function _(q){var f=q.value!=null?q.value:q.original||"";if(this.stringParams){if(f.replace)f=f.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".");if(q.depth)this.addDepth(q.depth);if(this.opcode("getContext",q.depth||0),this.opcode("pushStringParam",f,q.type),q.type==="SubExpression")this.accept(q)}else{if(this.trackIds){var K=void 0;if(q.parts&&!f6.default.helpers.scopedId(q)&&!q.depth)K=this.blockParamIndex(q.parts[0]);if(K){var $=q.parts.slice(1).join(".");this.opcode("pushId","BlockParam",K,$)}else{if(f=q.original||f,f.replace)f=f.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"");this.opcode("pushId",q.type,f)}}this.accept(q)}},setupFullMustacheParams:function _(q,f,K,$){var P=q.params;if(this.pushParams(P),this.opcode("pushProgram",f),this.opcode("pushProgram",K),q.hash)this.accept(q.hash);else this.opcode("emptyHash",$);return P},blockParamIndex:function _(q){for(var f=0,K=this.options.blockParams.length;f<K;f++){var $=this.options.blockParams[f],P=$&&K6.indexOf($,q);if($&&P>=0)return[f,P]}}};function yZ(_,q,f){if(_==null||typeof _!=="string"&&_.type!=="Program")throw new $6.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+_);if(q=q||{},!("data"in q))q.data=!0;if(q.compat)q.useDepths=!0;var K=f.parse(_,q),$=new f.Compiler().compile(K,q);return new f.JavaScriptCompiler().compile($,q)}function iZ(_,q,f){if(q===void 0)q={};if(_==null||typeof _!=="string"&&_.type!=="Program")throw new $6.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+_);if(q=K6.extend({},q),!("data"in q))q.data=!0;if(q.compat)q.useDepths=!0;var K=void 0;function $(){var j=f.parse(_,q),v=new f.Compiler().compile(j,q),w=new f.JavaScriptCompiler().compile(v,q,void 0,!0);return f.template(w)}function P(j,v){if(!K)K=$();return K.call(this,j,v)}return P._setup=function(j){if(!K)K=$();return K._setup(j)},P._child=function(j,v,w,O){if(!K)K=$();return K._child(j,v,w,O)},P}function Ww(_,q){if(_===q)return!0;if(K6.isArray(_)&&K6.isArray(q)&&_.length===q.length){for(var f=0;f<_.length;f++)if(!Ww(_[f],q[f]))return!1;return!0}}function Tw(_){if(!_.path.parts){var q=_.path;_.path={type:"PathExpression",data:!1,depth:0,parts:[q.original+""],original:q.original+"",loc:q.loc}}}});var Jw=p((xZ)=>{var hw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");xZ.encode=function(_){if(0<=_&&_<hw.length)return hw[_];throw new TypeError("Must be between 0 and 63: "+_)};xZ.decode=function(_){var q=65,f=90,K=97,$=122,P=48,j=57,v=43,w=47,O=26,T=52;if(q<=_&&_<=f)return _-q;if(K<=_&&_<=$)return _-K+O;if(P<=_&&_<=j)return _-P+T;if(_==v)return 62;if(_==w)return 63;return-1}});var h3=p((QZ)=>{var kw=Jw(),H3=5,Zw=1<<H3,Xw=Zw-1,Aw=Zw;function UZ(_){return _<0?(-_<<1)+1:(_<<1)+0}function FZ(_){var q=(_&1)===1,f=_>>1;return q?-f:f}QZ.encode=function _(q){var f="",K,$=UZ(q);do{if(K=$&Xw,$>>>=H3,$>0)K|=Aw;f+=kw.encode(K)}while($>0);return f};QZ.decode=function _(q,f,K){var $=q.length,P=0,j=0,v,w;do{if(f>=$)throw new Error("Expected more digits in base 64 VLQ value.");if(w=kw.decode(q.charCodeAt(f++)),w===-1)throw new Error("Invalid base64 digit: "+q.charAt(f-1));v=!!(w&Aw),w&=Xw,P=P+(w<<j),j+=H3}while(v);K.value=FZ(P),K.rest=f}});var zf=p((zX)=>{function fX(_,q,f){if(q in _)return _[q];else if(arguments.length===3)return f;else throw new Error('"'+q+'" is a required argument.')}zX.getArg=fX;var uw=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,$X=/^data:.+\,.+$/;function P6(_){var q=_.match(uw);if(!q)return null;return{scheme:q[1],auth:q[2],host:q[3],port:q[4],path:q[5]}}zX.urlParse=P6;function Yf(_){var q="";if(_.scheme)q+=_.scheme+":";if(q+="//",_.auth)q+=_.auth+"@";if(_.host)q+=_.host;if(_.port)q+=":"+_.port;if(_.path)q+=_.path;return q}zX.urlGenerate=Yf;function J3(_){var q=_,f=P6(_);if(f){if(!f.path)return _;q=f.path}var K=zX.isAbsolute(q),$=q.split(/\/+/);for(var P,j=0,v=$.length-1;v>=0;v--)if(P=$[v],P===".")$.splice(v,1);else if(P==="..")j++;else if(j>0)if(P==="")$.splice(v+1,j),j=0;else $.splice(v,2),j--;if(q=$.join("/"),q==="")q=K?"/":".";if(f)return f.path=q,Yf(f);return q}zX.normalize=J3;function Gw(_,q){if(_==="")_=".";if(q==="")q=".";var f=P6(q),K=P6(_);if(K)_=K.path||"/";if(f&&!f.scheme){if(K)f.scheme=K.scheme;return Yf(f)}if(f||q.match($X))return q;if(K&&!K.host&&!K.path)return K.host=q,Yf(K);var $=q.charAt(0)==="/"?q:J3(_.replace(/\/+$/,"")+"/"+q);if(K)return K.path=$,Yf(K);return $}zX.join=Gw;zX.isAbsolute=function(_){return _.charAt(0)==="/"||uw.test(_)};function KX(_,q){if(_==="")_=".";_=_.replace(/\/$/,"");var f=0;while(q.indexOf(_+"/")!==0){var K=_.lastIndexOf("/");if(K<0)return q;if(_=_.slice(0,K),_.match(/^([^\/]+:\/)?\/*$/))return q;++f}return Array(f+1).join("../")+q.substr(_.length+1)}zX.relative=KX;var mw=function(){var _=Object.create(null);return!("__proto__"in _)}();function rw(_){return _}function PX(_){if(bw(_))return"$"+_;return _}zX.toSetString=mw?rw:PX;function jX(_){if(bw(_))return _.slice(1);return _}zX.fromSetString=mw?rw:jX;function bw(_){if(!_)return!1;var q=_.length;if(q<9)return!1;if(_.charCodeAt(q-1)!==95||_.charCodeAt(q-2)!==95||_.charCodeAt(q-3)!==111||_.charCodeAt(q-4)!==116||_.charCodeAt(q-5)!==111||_.charCodeAt(q-6)!==114||_.charCodeAt(q-7)!==112||_.charCodeAt(q-8)!==95||_.charCodeAt(q-9)!==95)return!1;for(var f=q-10;f>=0;f--)if(_.charCodeAt(f)!==36)return!1;return!0}function vX(_,q,f){var K=Tf(_.source,q.source);if(K!==0)return K;if(K=_.originalLine-q.originalLine,K!==0)return K;if(K=_.originalColumn-q.originalColumn,K!==0||f)return K;if(K=_.generatedColumn-q.generatedColumn,K!==0)return K;if(K=_.generatedLine-q.generatedLine,K!==0)return K;return Tf(_.name,q.name)}zX.compareByOriginalPositions=vX;function wX(_,q,f){var K=_.generatedLine-q.generatedLine;if(K!==0)return K;if(K=_.generatedColumn-q.generatedColumn,K!==0||f)return K;if(K=Tf(_.source,q.source),K!==0)return K;if(K=_.originalLine-q.originalLine,K!==0)return K;if(K=_.originalColumn-q.originalColumn,K!==0)return K;return Tf(_.name,q.name)}zX.compareByGeneratedPositionsDeflated=wX;function Tf(_,q){if(_===q)return 0;if(_===null)return 1;if(q===null)return-1;if(_>q)return 1;return-1}function OX(_,q){var f=_.generatedLine-q.generatedLine;if(f!==0)return f;if(f=_.generatedColumn-q.generatedColumn,f!==0)return f;if(f=Tf(_.source,q.source),f!==0)return f;if(f=_.originalLine-q.originalLine,f!==0)return f;if(f=_.originalColumn-q.originalColumn,f!==0)return f;return Tf(_.name,q.name)}zX.compareByGeneratedPositionsInflated=OX;function YX(_){return JSON.parse(_.replace(/^\)]}'[^\n]*\n/,""))}zX.parseSourceMapInput=YX;function TX(_,q,f){if(q=q||"",_){if(_[_.length-1]!=="/"&&q[0]!=="/")_+="/";q=_+q}if(f){var K=P6(f);if(!K)throw new Error("sourceMapURL could not be parsed");if(K.path){var $=K.path.lastIndexOf("/");if($>=0)K.path=K.path.substring(0,$+1)}q=Gw(Yf(K),q)}return J3(q)}zX.computeSourceURL=TX});var X3=p((MX)=>{var k3=zf(),Z3=Object.prototype.hasOwnProperty,C8=typeof Map!=="undefined";function L_(){this._array=[],this._set=C8?new Map:Object.create(null)}L_.fromArray=function _(q,f){var K=new L_;for(var $=0,P=q.length;$<P;$++)K.add(q[$],f);return K};L_.prototype.size=function _(){return C8?this._set.size:Object.getOwnPropertyNames(this._set).length};L_.prototype.add=function _(q,f){var K=C8?q:k3.toSetString(q),$=C8?this.has(q):Z3.call(this._set,K),P=this._array.length;if(!$||f)this._array.push(q);if(!$)if(C8)this._set.set(q,P);else this._set[K]=P};L_.prototype.has=function _(q){if(C8)return this._set.has(q);else{var f=k3.toSetString(q);return Z3.call(this._set,f)}};L_.prototype.indexOf=function _(q){if(C8){var f=this._set.get(q);if(f>=0)return f}else{var K=k3.toSetString(q);if(Z3.call(this._set,K))return this._set[K]}throw new Error('"'+q+'" is not in the set.')};L_.prototype.at=function _(q){if(q>=0&&q<this._array.length)return this._array[q];throw new Error("No element indexed by "+q)};L_.prototype.toArray=function _(){return this._array.slice()};MX.ArraySet=L_});var Mw=p((CX)=>{var Vw=zf();function NX(_,q){var f=_.generatedLine,K=q.generatedLine,$=_.generatedColumn,P=q.generatedColumn;return K>f||K==f&&P>=$||Vw.compareByGeneratedPositionsInflated(_,q)<=0}function D$(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}D$.prototype.unsortedForEach=function _(q,f){this._array.forEach(q,f)};D$.prototype.add=function _(q){if(NX(this._last,q))this._last=q,this._array.push(q);else this._sorted=!1,this._array.push(q)};D$.prototype.toArray=function _(){if(!this._sorted)this._array.sort(Vw.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};CX.MappingList=D$});var A3=p((nX)=>{var j6=h3(),lq=zf(),y$=X3().ArraySet,lX=Mw().MappingList;function v_(_){if(!_)_={};this._file=lq.getArg(_,"file",null),this._sourceRoot=lq.getArg(_,"sourceRoot",null),this._skipValidation=lq.getArg(_,"skipValidation",!1),this._sources=new y$,this._names=new y$,this._mappings=new lX,this._sourcesContents=null}v_.prototype._version=3;v_.fromSourceMap=function _(q){var f=q.sourceRoot,K=new v_({file:q.file,sourceRoot:f});return q.eachMapping(function($){var P={generated:{line:$.generatedLine,column:$.generatedColumn}};if($.source!=null){if(P.source=$.source,f!=null)P.source=lq.relative(f,P.source);if(P.original={line:$.originalLine,column:$.originalColumn},$.name!=null)P.name=$.name}K.addMapping(P)}),q.sources.forEach(function($){var P=$;if(f!==null)P=lq.relative(f,$);if(!K._sources.has(P))K._sources.add(P);var j=q.sourceContentFor($);if(j!=null)K.setSourceContent($,j)}),K};v_.prototype.addMapping=function _(q){var f=lq.getArg(q,"generated"),K=lq.getArg(q,"original",null),$=lq.getArg(q,"source",null),P=lq.getArg(q,"name",null);if(!this._skipValidation)this._validateMapping(f,K,$,P);if($!=null){if($=String($),!this._sources.has($))this._sources.add($)}if(P!=null){if(P=String(P),!this._names.has(P))this._names.add(P)}this._mappings.add({generatedLine:f.line,generatedColumn:f.column,originalLine:K!=null&&K.line,originalColumn:K!=null&&K.column,source:$,name:P})};v_.prototype.setSourceContent=function _(q,f){var K=q;if(this._sourceRoot!=null)K=lq.relative(this._sourceRoot,K);if(f!=null){if(!this._sourcesContents)this._sourcesContents=Object.create(null);this._sourcesContents[lq.toSetString(K)]=f}else if(this._sourcesContents){if(delete this._sourcesContents[lq.toSetString(K)],Object.keys(this._sourcesContents).length===0)this._sourcesContents=null}};v_.prototype.applySourceMap=function _(q,f,K){var $=f;if(f==null){if(q.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);$=q.file}var P=this._sourceRoot;if(P!=null)$=lq.relative(P,$);var j=new y$,v=new y$;this._mappings.unsortedForEach(function(w){if(w.source===$&&w.originalLine!=null){var O=q.originalPositionFor({line:w.originalLine,column:w.originalColumn});if(O.source!=null){if(w.source=O.source,K!=null)w.source=lq.join(K,w.source);if(P!=null)w.source=lq.relative(P,w.source);if(w.originalLine=O.line,w.originalColumn=O.column,O.name!=null)w.name=O.name}}var T=w.source;if(T!=null&&!j.has(T))j.add(T);var Y=w.name;if(Y!=null&&!v.has(Y))v.add(Y)},this),this._sources=j,this._names=v,q.sources.forEach(function(w){var O=q.sourceContentFor(w);if(O!=null){if(K!=null)w=lq.join(K,w);if(P!=null)w=lq.relative(P,w);this.setSourceContent(w,O)}},this)};v_.prototype._validateMapping=function _(q,f,K,$){if(f&&typeof f.line!=="number"&&typeof f.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(q&&"line"in q&&"column"in q&&q.line>0&&q.column>=0&&!f&&!K&&!$)return;else if(q&&"line"in q&&"column"in q&&f&&"line"in f&&"column"in f&&q.line>0&&q.column>=0&&f.line>0&&f.column>=0&&K)return;else throw new Error("Invalid mapping: "+JSON.stringify({generated:q,source:K,original:f,name:$}))};v_.prototype._serializeMappings=function _(){var q=0,f=1,K=0,$=0,P=0,j=0,v="",w,O,T,Y,z=this._mappings.toArray();for(var H=0,h=z.length;H<h;H++){if(O=z[H],w="",O.generatedLine!==f){q=0;while(O.generatedLine!==f)w+=";",f++}else if(H>0){if(!lq.compareByGeneratedPositionsInflated(O,z[H-1]))continue;w+=","}if(w+=j6.encode(O.generatedColumn-q),q=O.generatedColumn,O.source!=null){if(Y=this._sources.indexOf(O.source),w+=j6.encode(Y-j),j=Y,w+=j6.encode(O.originalLine-1-$),$=O.originalLine-1,w+=j6.encode(O.originalColumn-K),K=O.originalColumn,O.name!=null)T=this._names.indexOf(O.name),w+=j6.encode(T-P),P=T}v+=w}return v};v_.prototype._generateSourcesContent=function _(q,f){return q.map(function(K){if(!this._sourcesContents)return null;if(f!=null)K=lq.relative(f,K);var $=lq.toSetString(K);return Object.prototype.hasOwnProperty.call(this._sourcesContents,$)?this._sourcesContents[$]:null},this)};v_.prototype.toJSON=function _(){var q={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null)q.file=this._file;if(this._sourceRoot!=null)q.sourceRoot=this._sourceRoot;if(this._sourcesContents)q.sourcesContent=this._generateSourcesContent(q.sources,q.sourceRoot);return q};v_.prototype.toString=function _(){return JSON.stringify(this.toJSON())};nX.SourceMapGenerator=v_});var Nw=p((EX)=>{EX.GREATEST_LOWER_BOUND=1;EX.LEAST_UPPER_BOUND=2;function u3(_,q,f,K,$,P){var j=Math.floor((q-_)/2)+_,v=$(f,K[j],!0);if(v===0)return j;else if(v>0){if(q-j>1)return u3(j,q,f,K,$,P);if(P==EX.LEAST_UPPER_BOUND)return q<K.length?q:-1;else return j}else{if(j-_>1)return u3(_,j,f,K,$,P);if(P==EX.LEAST_UPPER_BOUND)return j;else return _<0?-1:_}}EX.search=function _(q,f,K,$){if(f.length===0)return-1;var P=u3(-1,f.length,q,f,K,$||EX.GREATEST_LOWER_BOUND);if(P<0)return-1;while(P-1>=0){if(K(f[P],f[P-1],!0)!==0)break;--P}return P}});var Cw=p((aX)=>{function m3(_,q,f){var K=_[q];_[q]=_[f],_[f]=K}function dX(_,q){return Math.round(_+Math.random()*(q-_))}function r3(_,q,f,K){if(f<K){var $=dX(f,K),P=f-1;m3(_,$,K);var j=_[K];for(var v=f;v<K;v++)if(q(_[v],j)<=0)P+=1,m3(_,P,v);m3(_,P+1,v);var w=P+1;r3(_,q,f,w-1),r3(_,q,w+1,K)}}aX.quickSort=function(_,q){r3(_,q,0,_.length-1)}});var lw=p((yX)=>{var s=zf(),b3=Nw(),Wf=X3().ArraySet,DX=h3(),v6=Cw().quickSort;function Aq(_,q){var f=_;if(typeof _==="string")f=s.parseSourceMapInput(_);return f.sections!=null?new X_(f,q):new Iq(f,q)}Aq.fromSourceMap=function(_,q){return Iq.fromSourceMap(_,q)};Aq.prototype._version=3;Aq.prototype.__generatedMappings=null;Object.defineProperty(Aq.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__generatedMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__generatedMappings}});Aq.prototype.__originalMappings=null;Object.defineProperty(Aq.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__originalMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__originalMappings}});Aq.prototype._charIsMappingSeparator=function _(q,f){var K=q.charAt(f);return K===";"||K===","};Aq.prototype._parseMappings=function _(q,f){throw new Error("Subclasses must implement _parseMappings")};Aq.GENERATED_ORDER=1;Aq.ORIGINAL_ORDER=2;Aq.GREATEST_LOWER_BOUND=1;Aq.LEAST_UPPER_BOUND=2;Aq.prototype.eachMapping=function _(q,f,K){var $=f||null,P=K||Aq.GENERATED_ORDER,j;switch(P){case Aq.GENERATED_ORDER:j=this._generatedMappings;break;case Aq.ORIGINAL_ORDER:j=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var v=this.sourceRoot;j.map(function(w){var O=w.source===null?null:this._sources.at(w.source);return O=s.computeSourceURL(v,O,this._sourceMapURL),{source:O,generatedLine:w.generatedLine,generatedColumn:w.generatedColumn,originalLine:w.originalLine,originalColumn:w.originalColumn,name:w.name===null?null:this._names.at(w.name)}},this).forEach(q,$)};Aq.prototype.allGeneratedPositionsFor=function _(q){var f=s.getArg(q,"line"),K={source:s.getArg(q,"source"),originalLine:f,originalColumn:s.getArg(q,"column",0)};if(K.source=this._findSourceIndex(K.source),K.source<0)return[];var $=[],P=this._findMapping(K,this._originalMappings,"originalLine","originalColumn",s.compareByOriginalPositions,b3.LEAST_UPPER_BOUND);if(P>=0){var j=this._originalMappings[P];if(q.column===void 0){var v=j.originalLine;while(j&&j.originalLine===v)$.push({line:s.getArg(j,"generatedLine",null),column:s.getArg(j,"generatedColumn",null),lastColumn:s.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}else{var w=j.originalColumn;while(j&&j.originalLine===f&&j.originalColumn==w)$.push({line:s.getArg(j,"generatedLine",null),column:s.getArg(j,"generatedColumn",null),lastColumn:s.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}}return $};yX.SourceMapConsumer=Aq;function Iq(_,q){var f=_;if(typeof _==="string")f=s.parseSourceMapInput(_);var K=s.getArg(f,"version"),$=s.getArg(f,"sources"),P=s.getArg(f,"names",[]),j=s.getArg(f,"sourceRoot",null),v=s.getArg(f,"sourcesContent",null),w=s.getArg(f,"mappings"),O=s.getArg(f,"file",null);if(K!=this._version)throw new Error("Unsupported version: "+K);if(j)j=s.normalize(j);$=$.map(String).map(s.normalize).map(function(T){return j&&s.isAbsolute(j)&&s.isAbsolute(T)?s.relative(j,T):T}),this._names=Wf.fromArray(P.map(String),!0),this._sources=Wf.fromArray($,!0),this._absoluteSources=this._sources.toArray().map(function(T){return s.computeSourceURL(j,T,q)}),this.sourceRoot=j,this.sourcesContent=v,this._mappings=w,this._sourceMapURL=q,this.file=O}Iq.prototype=Object.create(Aq.prototype);Iq.prototype.consumer=Aq;Iq.prototype._findSourceIndex=function(_){var q=_;if(this.sourceRoot!=null)q=s.relative(this.sourceRoot,q);if(this._sources.has(q))return this._sources.indexOf(q);var f;for(f=0;f<this._absoluteSources.length;++f)if(this._absoluteSources[f]==_)return f;return-1};Iq.fromSourceMap=function _(q,f){var K=Object.create(Iq.prototype),$=K._names=Wf.fromArray(q._names.toArray(),!0),P=K._sources=Wf.fromArray(q._sources.toArray(),!0);K.sourceRoot=q._sourceRoot,K.sourcesContent=q._generateSourcesContent(K._sources.toArray(),K.sourceRoot),K.file=q._file,K._sourceMapURL=f,K._absoluteSources=K._sources.toArray().map(function(H){return s.computeSourceURL(K.sourceRoot,H,f)});var j=q._mappings.toArray().slice(),v=K.__generatedMappings=[],w=K.__originalMappings=[];for(var O=0,T=j.length;O<T;O++){var Y=j[O],z=new pw;if(z.generatedLine=Y.generatedLine,z.generatedColumn=Y.generatedColumn,Y.source){if(z.source=P.indexOf(Y.source),z.originalLine=Y.originalLine,z.originalColumn=Y.originalColumn,Y.name)z.name=$.indexOf(Y.name);w.push(z)}v.push(z)}return v6(K.__originalMappings,s.compareByOriginalPositions),K};Iq.prototype._version=3;Object.defineProperty(Iq.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function pw(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Iq.prototype._parseMappings=function _(q,f){var K=1,$=0,P=0,j=0,v=0,w=0,O=q.length,T=0,Y={},z={},H=[],h=[],J,k,X,l,N;while(T<O)if(q.charAt(T)===";")K++,T++,$=0;else if(q.charAt(T)===",")T++;else{J=new pw,J.generatedLine=K;for(l=T;l<O;l++)if(this._charIsMappingSeparator(q,l))break;if(k=q.slice(T,l),X=Y[k],X)T+=k.length;else{X=[];while(T<l)DX.decode(q,T,z),N=z.value,T=z.rest,X.push(N);if(X.length===2)throw new Error("Found a source, but no line and column");if(X.length===3)throw new Error("Found a source and line, but no column");Y[k]=X}if(J.generatedColumn=$+X[0],$=J.generatedColumn,X.length>1){if(J.source=v+X[1],v+=X[1],J.originalLine=P+X[2],P=J.originalLine,J.originalLine+=1,J.originalColumn=j+X[3],j=J.originalColumn,X.length>4)J.name=w+X[4],w+=X[4]}if(h.push(J),typeof J.originalLine==="number")H.push(J)}v6(h,s.compareByGeneratedPositionsDeflated),this.__generatedMappings=h,v6(H,s.compareByOriginalPositions),this.__originalMappings=H};Iq.prototype._findMapping=function _(q,f,K,$,P,j){if(q[K]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+q[K]);if(q[$]<0)throw new TypeError("Column must be greater than or equal to 0, got "+q[$]);return b3.search(q,f,P,j)};Iq.prototype.computeColumnSpans=function _(){for(var q=0;q<this._generatedMappings.length;++q){var f=this._generatedMappings[q];if(q+1<this._generatedMappings.length){var K=this._generatedMappings[q+1];if(f.generatedLine===K.generatedLine){f.lastGeneratedColumn=K.generatedColumn-1;continue}}f.lastGeneratedColumn=1/0}};Iq.prototype.originalPositionFor=function _(q){var f={generatedLine:s.getArg(q,"line"),generatedColumn:s.getArg(q,"column")},K=this._findMapping(f,this._generatedMappings,"generatedLine","generatedColumn",s.compareByGeneratedPositionsDeflated,s.getArg(q,"bias",Aq.GREATEST_LOWER_BOUND));if(K>=0){var $=this._generatedMappings[K];if($.generatedLine===f.generatedLine){var P=s.getArg($,"source",null);if(P!==null)P=this._sources.at(P),P=s.computeSourceURL(this.sourceRoot,P,this._sourceMapURL);var j=s.getArg($,"name",null);if(j!==null)j=this._names.at(j);return{source:P,line:s.getArg($,"originalLine",null),column:s.getArg($,"originalColumn",null),name:j}}}return{source:null,line:null,column:null,name:null}};Iq.prototype.hasContentsOfAllSources=function _(){if(!this.sourcesContent)return!1;return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(q){return q==null})};Iq.prototype.sourceContentFor=function _(q,f){if(!this.sourcesContent)return null;var K=this._findSourceIndex(q);if(K>=0)return this.sourcesContent[K];var $=q;if(this.sourceRoot!=null)$=s.relative(this.sourceRoot,$);var P;if(this.sourceRoot!=null&&(P=s.urlParse(this.sourceRoot))){var j=$.replace(/^file:\/\//,"");if(P.scheme=="file"&&this._sources.has(j))return this.sourcesContent[this._sources.indexOf(j)];if((!P.path||P.path=="/")&&this._sources.has("/"+$))return this.sourcesContent[this._sources.indexOf("/"+$)]}if(f)return null;else throw new Error('"'+$+'" is not in the SourceMap.')};Iq.prototype.generatedPositionFor=function _(q){var f=s.getArg(q,"source");if(f=this._findSourceIndex(f),f<0)return{line:null,column:null,lastColumn:null};var K={source:f,originalLine:s.getArg(q,"line"),originalColumn:s.getArg(q,"column")},$=this._findMapping(K,this._originalMappings,"originalLine","originalColumn",s.compareByOriginalPositions,s.getArg(q,"bias",Aq.GREATEST_LOWER_BOUND));if($>=0){var P=this._originalMappings[$];if(P.source===K.source)return{line:s.getArg(P,"generatedLine",null),column:s.getArg(P,"generatedColumn",null),lastColumn:s.getArg(P,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};yX.BasicSourceMapConsumer=Iq;function X_(_,q){var f=_;if(typeof _==="string")f=s.parseSourceMapInput(_);var K=s.getArg(f,"version"),$=s.getArg(f,"sections");if(K!=this._version)throw new Error("Unsupported version: "+K);this._sources=new Wf,this._names=new Wf;var P={line:-1,column:0};this._sections=$.map(function(j){if(j.url)throw new Error("Support for url field in sections not implemented.");var v=s.getArg(j,"offset"),w=s.getArg(v,"line"),O=s.getArg(v,"column");if(w<P.line||w===P.line&&O<P.column)throw new Error("Section offsets must be ordered and non-overlapping.");return P=v,{generatedOffset:{generatedLine:w+1,generatedColumn:O+1},consumer:new Aq(s.getArg(j,"map"),q)}})}X_.prototype=Object.create(Aq.prototype);X_.prototype.constructor=Aq;X_.prototype._version=3;Object.defineProperty(X_.prototype,"sources",{get:function(){var _=[];for(var q=0;q<this._sections.length;q++)for(var f=0;f<this._sections[q].consumer.sources.length;f++)_.push(this._sections[q].consumer.sources[f]);return _}});X_.prototype.originalPositionFor=function _(q){var f={generatedLine:s.getArg(q,"line"),generatedColumn:s.getArg(q,"column")},K=b3.search(f,this._sections,function(P,j){var v=P.generatedLine-j.generatedOffset.generatedLine;if(v)return v;return P.generatedColumn-j.generatedOffset.generatedColumn}),$=this._sections[K];if(!$)return{source:null,line:null,column:null,name:null};return $.consumer.originalPositionFor({line:f.generatedLine-($.generatedOffset.generatedLine-1),column:f.generatedColumn-($.generatedOffset.generatedLine===f.generatedLine?$.generatedOffset.generatedColumn-1:0),bias:q.bias})};X_.prototype.hasContentsOfAllSources=function _(){return this._sections.every(function(q){return q.consumer.hasContentsOfAllSources()})};X_.prototype.sourceContentFor=function _(q,f){for(var K=0;K<this._sections.length;K++){var $=this._sections[K],P=$.consumer.sourceContentFor(q,!0);if(P)return P}if(f)return null;else throw new Error('"'+q+'" is not in the SourceMap.')};X_.prototype.generatedPositionFor=function _(q){for(var f=0;f<this._sections.length;f++){var K=this._sections[f];if(K.consumer._findSourceIndex(s.getArg(q,"source"))===-1)continue;var $=K.consumer.generatedPositionFor(q);if($){var P={line:$.line+(K.generatedOffset.generatedLine-1),column:$.column+(K.generatedOffset.generatedLine===$.line?K.generatedOffset.generatedColumn-1:0)};return P}}return{line:null,column:null}};X_.prototype._parseMappings=function _(q,f){this.__generatedMappings=[],this.__originalMappings=[];for(var K=0;K<this._sections.length;K++){var $=this._sections[K],P=$.consumer._generatedMappings;for(var j=0;j<P.length;j++){var v=P[j],w=$.consumer._sources.at(v.source);w=s.computeSourceURL($.consumer.sourceRoot,w,this._sourceMapURL),this._sources.add(w),w=this._sources.indexOf(w);var O=null;if(v.name)O=$.consumer._names.at(v.name),this._names.add(O),O=this._names.indexOf(O);var T={source:w,generatedLine:v.generatedLine+($.generatedOffset.generatedLine-1),generatedColumn:v.generatedColumn+($.generatedOffset.generatedLine===v.generatedLine?$.generatedOffset.generatedColumn-1:0),originalLine:v.originalLine,originalColumn:v.originalColumn,name:O};if(this.__generatedMappings.push(T),typeof T.originalLine==="number")this.__originalMappings.push(T)}}v6(this.__generatedMappings,s.compareByGeneratedPositionsDeflated),v6(this.__originalMappings,s.compareByOriginalPositions)};yX.IndexedSourceMapConsumer=X_});var nw=p((xX)=>{var LX=A3().SourceMapGenerator,i$=zf(),tX=/(\r?\n)/,eX=10,Hf="$$$isSourceNode$$$";function q_(_,q,f,K,$){if(this.children=[],this.sourceContents={},this.line=_==null?null:_,this.column=q==null?null:q,this.source=f==null?null:f,this.name=$==null?null:$,this[Hf]=!0,K!=null)this.add(K)}q_.fromStringWithSourceMap=function _(q,f,K){var $=new q_,P=q.split(tX),j=0,v=function(){var z=h(),H=h()||"";return z+H;function h(){return j<P.length?P[j++]:void 0}},w=1,O=0,T=null;if(f.eachMapping(function(z){if(T!==null)if(w<z.generatedLine)Y(T,v()),w++,O=0;else{var H=P[j]||"",h=H.substr(0,z.generatedColumn-O);P[j]=H.substr(z.generatedColumn-O),O=z.generatedColumn,Y(T,h),T=z;return}while(w<z.generatedLine)$.add(v()),w++;if(O<z.generatedColumn){var H=P[j]||"";$.add(H.substr(0,z.generatedColumn)),P[j]=H.substr(z.generatedColumn),O=z.generatedColumn}T=z},this),j<P.length){if(T)Y(T,v());$.add(P.splice(j).join(""))}return f.sources.forEach(function(z){var H=f.sourceContentFor(z);if(H!=null){if(K!=null)z=i$.join(K,z);$.setSourceContent(z,H)}}),$;function Y(z,H){if(z===null||z.source===void 0)$.add(H);else{var h=K?i$.join(K,z.source):z.source;$.add(new q_(z.originalLine,z.originalColumn,h,H,z.name))}}};q_.prototype.add=function _(q){if(Array.isArray(q))q.forEach(function(f){this.add(f)},this);else if(q[Hf]||typeof q==="string"){if(q)this.children.push(q)}else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+q);return this};q_.prototype.prepend=function _(q){if(Array.isArray(q))for(var f=q.length-1;f>=0;f--)this.prepend(q[f]);else if(q[Hf]||typeof q==="string")this.children.unshift(q);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+q);return this};q_.prototype.walk=function _(q){var f;for(var K=0,$=this.children.length;K<$;K++)if(f=this.children[K],f[Hf])f.walk(q);else if(f!=="")q(f,{source:this.source,line:this.line,column:this.column,name:this.name})};q_.prototype.join=function _(q){var f,K,$=this.children.length;if($>0){f=[];for(K=0;K<$-1;K++)f.push(this.children[K]),f.push(q);f.push(this.children[K]),this.children=f}return this};q_.prototype.replaceRight=function _(q,f){var K=this.children[this.children.length-1];if(K[Hf])K.replaceRight(q,f);else if(typeof K==="string")this.children[this.children.length-1]=K.replace(q,f);else this.children.push("".replace(q,f));return this};q_.prototype.setSourceContent=function _(q,f){this.sourceContents[i$.toSetString(q)]=f};q_.prototype.walkSourceContents=function _(q){for(var f=0,K=this.children.length;f<K;f++)if(this.children[f][Hf])this.children[f].walkSourceContents(q);var $=Object.keys(this.sourceContents);for(var f=0,K=$.length;f<K;f++)q(i$.fromSetString($[f]),this.sourceContents[$[f]])};q_.prototype.toString=function _(){var q="";return this.walk(function(f){q+=f}),q};q_.prototype.toStringWithSourceMap=function _(q){var f={code:"",line:1,column:0},K=new LX(q),$=!1,P=null,j=null,v=null,w=null;return this.walk(function(O,T){if(f.code+=O,T.source!==null&&T.line!==null&&T.column!==null){if(P!==T.source||j!==T.line||v!==T.column||w!==T.name)K.addMapping({source:T.source,original:{line:T.line,column:T.column},generated:{line:f.line,column:f.column},name:T.name});P=T.source,j=T.line,v=T.column,w=T.name,$=!0}else if($)K.addMapping({generated:{line:f.line,column:f.column}}),P=null,$=!1;for(var Y=0,z=O.length;Y<z;Y++)if(O.charCodeAt(Y)===eX){if(f.line++,f.column=0,Y+1===z)P=null,$=!1;else if($)K.addMapping({source:T.source,original:{line:T.line,column:T.column},generated:{line:f.line,column:f.column},name:T.name})}else f.column++}),this.walkSourceContents(function(O,T){K.setSourceContent(O,T)}),{code:f.code,map:K}};xX.SourceNode=q_});var Rw=p((BX)=>{BX.SourceMapGenerator=A3().SourceMapGenerator;BX.SourceMapConsumer=lw().SourceMapConsumer;BX.SourceNode=nw().SourceNode});var aw=p((gw,dw)=>{gw.__esModule=!0;var M3=Lq(),p8=void 0;try{if(typeof define!=="function"||!define.amd)S3=Rw(),p8=S3.SourceNode}catch(_){}var S3;if(!p8)p8=function(_,q,f,K){if(this.src="",K)this.add(K)},p8.prototype={add:function _(q){if(M3.isArray(q))q=q.join("");this.src+=q},prepend:function _(q){if(M3.isArray(q))q=q.join("");this.src=q+this.src},toStringWithSourceMap:function _(){return{code:this.toString()}},toString:function _(){return this.src}};function V3(_,q,f){if(M3.isArray(_)){var K=[];for(var $=0,P=_.length;$<P;$++)K.push(q.wrap(_[$],f));return K}else if(typeof _==="boolean"||typeof _==="number")return _+"";return _}function Ew(_){this.srcFile=_,this.source=[]}Ew.prototype={isEmpty:function _(){return!this.source.length},prepend:function _(q,f){this.source.unshift(this.wrap(q,f))},push:function _(q,f){this.source.push(this.wrap(q,f))},merge:function _(){var q=this.empty();return this.each(function(f){q.add([" ",f,`
|
|
14
|
-
`])}),q},each:function _(q){for(var f=0,K=this.source.length;f<K;f++)q(this.source[f])},empty:function _(){var q=this.currentLocation||{start:{}};return new
|
|
13
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function $(){var P=this.next();if(typeof P!=="undefined")return P;else return this.lex()},begin:function $(P){this.conditionStack.push(P)},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 $(P){this.begin(P)}};return K.options={},K.performAction=function $(P,j,v,w){function O(Y,z){return j.yytext=j.yytext.substring(Y,j.yyleng-z+Y)}var T=w;switch(v){case 0:if(j.yytext.slice(-2)==="\\\\")O(0,1),this.begin("mu");else if(j.yytext.slice(-1)==="\\")O(0,1),this.begin("emu");else this.begin("mu");if(j.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:if(this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw")return 15;else return O(5,9),"END_RAW_BLOCK";break;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(j.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 j.yytext=O(1,2).replace(/\\"/g,'"'),80;break;case 32:return j.yytext=O(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 j.yytext=j.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},K.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\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],K.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}},K}();_.lexer=q;function f(){this.yy={}}return f.prototype=_,_.Parser=f,new f}();Q5.default=Lk;qw.exports=Q5.default});var D$=l((Kw,Pw)=>{Kw.__esModule=!0;function xk(_){return _&&_.__esModule?_:{default:_}}var sk=j_(),O3=xk(sk);function a$(){this.parents=[]}a$.prototype={constructor:a$,mutating:!1,acceptKey:function _(q,f){var K=this.accept(q[f]);if(this.mutating){if(K&&!a$.prototype[K.type])throw new O3.default('Unexpected node type "'+K.type+'" found when accepting '+f+" on "+q.type);q[f]=K}},acceptRequired:function _(q,f){if(this.acceptKey(q,f),!q[f])throw new O3.default(q.type+" requires "+f)},acceptArray:function _(q){for(var f=0,K=q.length;f<K;f++)if(this.acceptKey(q,f),!q[f])q.splice(f,1),f--,K--},accept:function _(q){if(!q)return;if(!this[q.type])throw new O3.default("Unknown type: "+q.type,q);if(this.current)this.parents.unshift(this.current);this.current=q;var f=this[q.type](q);if(this.current=this.parents.shift(),!this.mutating||f)return f;else if(f!==!1)return q},Program:function _(q){this.acceptArray(q.body)},MustacheStatement:I$,Decorator:I$,BlockStatement:fw,DecoratorBlock:fw,PartialStatement:$w,PartialBlockStatement:function _(q){$w.call(this,q),this.acceptKey(q,"program")},ContentStatement:function _(){},CommentStatement:function _(){},SubExpression:I$,PathExpression:function _(){},StringLiteral:function _(){},NumberLiteral:function _(){},BooleanLiteral:function _(){},UndefinedLiteral:function _(){},NullLiteral:function _(){},Hash:function _(q){this.acceptArray(q.pairs)},HashPair:function _(q){this.acceptRequired(q,"value")}};function I$(_){this.acceptRequired(_,"path"),this.acceptArray(_.params),this.acceptKey(_,"hash")}function fw(_){I$.call(this,_),this.acceptKey(_,"program"),this.acceptKey(_,"inverse")}function $w(_){this.acceptRequired(_,"name"),this.acceptArray(_.params),this.acceptKey(_,"hash")}Kw.default=a$;Pw.exports=Kw.default});var ww=l((jw,vw)=>{jw.__esModule=!0;function Fk(_){return _&&_.__esModule?_:{default:_}}var Qk=D$(),qZ=Fk(Qk);function C_(){var _=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=_}C_.prototype=new qZ.default;C_.prototype.Program=function(_){var q=!this.options.ignoreStandalone,f=!this.isRootSeen;this.isRootSeen=!0;var K=_.body;for(var $=0,P=K.length;$<P;$++){var j=K[$],v=this.accept(j);if(!v)continue;var w=Y3(K,$,f),O=T3(K,$,f),T=v.openStandalone&&w,Y=v.closeStandalone&&O,z=v.inlineStandalone&&w&&O;if(v.close)C8(K,$,!0);if(v.open)K8(K,$,!0);if(q&&z){if(C8(K,$),K8(K,$)){if(j.type==="PartialStatement")j.indent=/([ \t]+$)/.exec(K[$-1].original)[1]}}if(q&&T)C8((j.program||j.inverse).body),K8(K,$);if(q&&Y)C8(K,$),K8((j.inverse||j.program).body)}return _};C_.prototype.BlockStatement=C_.prototype.DecoratorBlock=C_.prototype.PartialBlockStatement=function(_){this.accept(_.program),this.accept(_.inverse);var q=_.program||_.inverse,f=_.program&&_.inverse,K=f,$=f;if(f&&f.chained){K=f.body[0].program;while($.chained)$=$.body[$.body.length-1].program}var P={open:_.openStrip.open,close:_.closeStrip.close,openStandalone:T3(q.body),closeStandalone:Y3((K||q).body)};if(_.openStrip.close)C8(q.body,null,!0);if(f){var j=_.inverseStrip;if(j.open)K8(q.body,null,!0);if(j.close)C8(K.body,null,!0);if(_.closeStrip.open)K8($.body,null,!0);if(!this.options.ignoreStandalone&&Y3(q.body)&&T3(K.body))K8(q.body),C8(K.body)}else if(_.closeStrip.open)K8(q.body,null,!0);return P};C_.prototype.Decorator=C_.prototype.MustacheStatement=function(_){return _.strip};C_.prototype.PartialStatement=C_.prototype.CommentStatement=function(_){var q=_.strip||{};return{inlineStandalone:!0,open:q.open,close:q.close}};function Y3(_,q,f){if(q===void 0)q=_.length;var K=_[q-1],$=_[q-2];if(!K)return f;if(K.type==="ContentStatement")return($||!f?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(K.original)}function T3(_,q,f){if(q===void 0)q=-1;var K=_[q+1],$=_[q+2];if(!K)return f;if(K.type==="ContentStatement")return($||!f?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(K.original)}function C8(_,q,f){var K=_[q==null?0:q+1];if(!K||K.type!=="ContentStatement"||!f&&K.rightStripped)return;var $=K.value;K.value=K.value.replace(f?/^\s+/:/^[ \t]*\r?\n?/,""),K.rightStripped=K.value!==$}function K8(_,q,f){var K=_[q==null?_.length-1:q-1];if(!K||K.type!=="ContentStatement"||!f&&K.leftStripped)return;var $=K.value;return K.value=K.value.replace(f?/\s+$/:/[ \t]+$/,""),K.leftStripped=K.value!==$,K.leftStripped}jw.default=C_;vw.exports=jw.default});var Ow=l((hZ)=>{hZ.__esModule=!0;hZ.SourceLocation=PZ;hZ.id=jZ;hZ.stripFlags=vZ;hZ.stripComment=wZ;hZ.preparePath=OZ;hZ.prepareMustache=YZ;hZ.prepareRawBlock=TZ;hZ.prepareBlock=zZ;hZ.prepareProgram=WZ;hZ.preparePartialBlock=HZ;function $Z(_){return _&&_.__esModule?_:{default:_}}var KZ=j_(),z3=$Z(KZ);function W3(_,q){if(q=q.path?q.path.original:q,_.path.original!==q){var f={loc:_.path.loc};throw new z3.default(_.path.original+" doesn't match "+q,f)}}function PZ(_,q){this.source=_,this.start={line:q.first_line,column:q.first_column},this.end={line:q.last_line,column:q.last_column}}function jZ(_){if(/^\[.*\]$/.test(_))return _.substring(1,_.length-1);else return _}function vZ(_,q){return{open:_.charAt(2)==="~",close:q.charAt(q.length-3)==="~"}}function wZ(_){return _.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function OZ(_,q,f){f=this.locInfo(f);var K=_?"@":"",$=[],P=0;for(var j=0,v=q.length;j<v;j++){var w=q[j].part,O=q[j].original!==w;if(K+=(q[j].separator||"")+w,!O&&(w===".."||w==="."||w==="this")){if($.length>0)throw new z3.default("Invalid path: "+K,{loc:f});else if(w==="..")P++}else $.push(w)}return{type:"PathExpression",data:_,depth:P,parts:$,original:K,loc:f}}function YZ(_,q,f,K,$,P){var j=K.charAt(3)||K.charAt(2),v=j!=="{"&&j!=="&",w=/\*/.test(K);return{type:w?"Decorator":"MustacheStatement",path:_,params:q,hash:f,escaped:v,strip:$,loc:this.locInfo(P)}}function TZ(_,q,f,K){W3(_,f),K=this.locInfo(K);var $={type:"Program",body:q,strip:{},loc:K};return{type:"BlockStatement",path:_.path,params:_.params,hash:_.hash,program:$,openStrip:{},inverseStrip:{},closeStrip:{},loc:K}}function zZ(_,q,f,K,$,P){if(K&&K.path)W3(_,K);var j=/\*/.test(_.open);q.blockParams=_.blockParams;var v=void 0,w=void 0;if(f){if(j)throw new z3.default("Unexpected inverse block on decorator",f);if(f.chain)f.program.body[0].closeStrip=K.strip;w=f.strip,v=f.program}if($)$=v,v=q,q=$;return{type:j?"DecoratorBlock":"BlockStatement",path:_.path,params:_.params,hash:_.hash,program:q,inverse:v,openStrip:_.strip,inverseStrip:w,closeStrip:K&&K.strip,loc:this.locInfo(P)}}function WZ(_,q){if(!q&&_.length){var f=_[0].loc,K=_[_.length-1].loc;if(f&&K)q={source:f.source,start:{line:f.start.line,column:f.start.column},end:{line:K.end.line,column:K.end.column}}}return{type:"Program",body:_,strip:{},loc:q}}function HZ(_,q,f,K){return W3(_,f),{type:"PartialBlockStatement",name:_.path,params:_.params,hash:_.hash,program:q,openStrip:_.strip,closeStrip:f&&f.strip,loc:this.locInfo(K)}}});var zw=l((EZ)=>{EZ.__esModule=!0;EZ.parseWithoutProcessing=Tw;EZ.parse=RZ;function MZ(_){if(_&&_.__esModule)return _;else{var q={};if(_!=null){for(var f in _)if(Object.prototype.hasOwnProperty.call(_,f))q[f]=_[f]}return q.default=_,q}}function Yw(_){return _&&_.__esModule?_:{default:_}}var SZ=_w(),H3=Yw(SZ),NZ=ww(),CZ=Yw(NZ),pZ=Ow(),lZ=MZ(pZ),nZ=Lq();EZ.parser=H3.default;var y$={};nZ.extend(y$,lZ);function Tw(_,q){if(_.type==="Program")return _;H3.default.yy=y$,y$.locInfo=function(K){return new y$.SourceLocation(q&&q.srcName,K)};var f=H3.default.parse(_);return f}function RZ(_,q){var f=Tw(_,q),K=new CZ.default(q);return K.accept(f)}});var Jw=l((LZ)=>{LZ.__esModule=!0;LZ.Compiler=h3;LZ.precompile=oZ;LZ.compile=cZ;function Hw(_){return _&&_.__esModule?_:{default:_}}var DZ=j_(),$f=Hw(DZ),Kf=Lq(),yZ=w3(),ff=Hw(yZ),iZ=[].slice;function h3(){}h3.prototype={compiler:h3,equals:function _(q){var f=this.opcodes.length;if(q.opcodes.length!==f)return!1;for(var K=0;K<f;K++){var $=this.opcodes[K],P=q.opcodes[K];if($.opcode!==P.opcode||!hw($.args,P.args))return!1}f=this.children.length;for(var K=0;K<f;K++)if(!this.children[K].equals(q.children[K]))return!1;return!0},guid:0,compile:function _(q,f){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=f,this.stringParams=f.stringParams,this.trackIds=f.trackIds,f.blockParams=f.blockParams||[],f.knownHelpers=Kf.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},f.knownHelpers),this.accept(q)},compileProgram:function _(q){var f=new this.compiler,K=f.compile(q,this.options),$=this.guid++;return this.usePartial=this.usePartial||K.usePartial,this.children[$]=K,this.useDepths=this.useDepths||K.useDepths,$},accept:function _(q){if(!this[q.type])throw new $f.default("Unknown type: "+q.type,q);this.sourceNode.unshift(q);var f=this[q.type](q);return this.sourceNode.shift(),f},Program:function _(q){this.options.blockParams.unshift(q.blockParams);var f=q.body,K=f.length;for(var $=0;$<K;$++)this.accept(f[$]);return this.options.blockParams.shift(),this.isSimple=K===1,this.blockParams=q.blockParams?q.blockParams.length:0,this},BlockStatement:function _(q){Ww(q);var{program:f,inverse:K}=q;f=f&&this.compileProgram(f),K=K&&this.compileProgram(K);var $=this.classifySexpr(q);if($==="helper")this.helperSexpr(q,f,K);else if($==="simple")this.simpleSexpr(q),this.opcode("pushProgram",f),this.opcode("pushProgram",K),this.opcode("emptyHash"),this.opcode("blockValue",q.path.original);else this.ambiguousSexpr(q,f,K),this.opcode("pushProgram",f),this.opcode("pushProgram",K),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue");this.opcode("append")},DecoratorBlock:function _(q){var f=q.program&&this.compileProgram(q.program),K=this.setupFullMustacheParams(q,f,void 0),$=q.path;this.useDecorators=!0,this.opcode("registerDecorator",K.length,$.original)},PartialStatement:function _(q){this.usePartial=!0;var f=q.program;if(f)f=this.compileProgram(q.program);var K=q.params;if(K.length>1)throw new $f.default("Unsupported number of partial arguments: "+K.length,q);else if(!K.length)if(this.options.explicitPartialContext)this.opcode("pushLiteral","undefined");else K.push({type:"PathExpression",parts:[],depth:0});var $=q.name.original,P=q.name.type==="SubExpression";if(P)this.accept(q.name);this.setupFullMustacheParams(q,f,void 0,!0);var j=q.indent||"";if(this.options.preventIndent&&j)this.opcode("appendContent",j),j="";this.opcode("invokePartial",P,$,j),this.opcode("append")},PartialBlockStatement:function _(q){this.PartialStatement(q)},MustacheStatement:function _(q){if(this.SubExpression(q),q.escaped&&!this.options.noEscape)this.opcode("appendEscaped");else this.opcode("append")},Decorator:function _(q){this.DecoratorBlock(q)},ContentStatement:function _(q){if(q.value)this.opcode("appendContent",q.value)},CommentStatement:function _(){},SubExpression:function _(q){Ww(q);var f=this.classifySexpr(q);if(f==="simple")this.simpleSexpr(q);else if(f==="helper")this.helperSexpr(q);else this.ambiguousSexpr(q)},ambiguousSexpr:function _(q,f,K){var $=q.path,P=$.parts[0],j=f!=null||K!=null;this.opcode("getContext",$.depth),this.opcode("pushProgram",f),this.opcode("pushProgram",K),$.strict=!0,this.accept($),this.opcode("invokeAmbiguous",P,j)},simpleSexpr:function _(q){var f=q.path;f.strict=!0,this.accept(f),this.opcode("resolvePossibleLambda")},helperSexpr:function _(q,f,K){var $=this.setupFullMustacheParams(q,f,K),P=q.path,j=P.parts[0];if(this.options.knownHelpers[j])this.opcode("invokeKnownHelper",$.length,j);else if(this.options.knownHelpersOnly)throw new $f.default("You specified knownHelpersOnly, but used the unknown helper "+j,q);else P.strict=!0,P.falsy=!0,this.accept(P),this.opcode("invokeHelper",$.length,P.original,ff.default.helpers.simpleId(P))},PathExpression:function _(q){this.addDepth(q.depth),this.opcode("getContext",q.depth);var f=q.parts[0],K=ff.default.helpers.scopedId(q),$=!q.depth&&!K&&this.blockParamIndex(f);if($)this.opcode("lookupBlockParam",$,q.parts);else if(!f)this.opcode("pushContext");else if(q.data)this.options.data=!0,this.opcode("lookupData",q.depth,q.parts,q.strict);else this.opcode("lookupOnContext",q.parts,q.falsy,q.strict,K)},StringLiteral:function _(q){this.opcode("pushString",q.value)},NumberLiteral:function _(q){this.opcode("pushLiteral",q.value)},BooleanLiteral:function _(q){this.opcode("pushLiteral",q.value)},UndefinedLiteral:function _(){this.opcode("pushLiteral","undefined")},NullLiteral:function _(){this.opcode("pushLiteral","null")},Hash:function _(q){var f=q.pairs,K=0,$=f.length;this.opcode("pushHash");for(;K<$;K++)this.pushParam(f[K].value);while(K--)this.opcode("assignToHash",f[K].key);this.opcode("popHash")},opcode:function _(q){this.opcodes.push({opcode:q,args:iZ.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function _(q){if(!q)return;this.useDepths=!0},classifySexpr:function _(q){var f=ff.default.helpers.simpleId(q.path),K=f&&!!this.blockParamIndex(q.path.parts[0]),$=!K&&ff.default.helpers.helperExpression(q),P=!K&&($||f);if(P&&!$){var j=q.path.parts[0],v=this.options;if(v.knownHelpers[j])$=!0;else if(v.knownHelpersOnly)P=!1}if($)return"helper";else if(P)return"ambiguous";else return"simple"},pushParams:function _(q){for(var f=0,K=q.length;f<K;f++)this.pushParam(q[f])},pushParam:function _(q){var f=q.value!=null?q.value:q.original||"";if(this.stringParams){if(f.replace)f=f.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".");if(q.depth)this.addDepth(q.depth);if(this.opcode("getContext",q.depth||0),this.opcode("pushStringParam",f,q.type),q.type==="SubExpression")this.accept(q)}else{if(this.trackIds){var K=void 0;if(q.parts&&!ff.default.helpers.scopedId(q)&&!q.depth)K=this.blockParamIndex(q.parts[0]);if(K){var $=q.parts.slice(1).join(".");this.opcode("pushId","BlockParam",K,$)}else{if(f=q.original||f,f.replace)f=f.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"");this.opcode("pushId",q.type,f)}}this.accept(q)}},setupFullMustacheParams:function _(q,f,K,$){var P=q.params;if(this.pushParams(P),this.opcode("pushProgram",f),this.opcode("pushProgram",K),q.hash)this.accept(q.hash);else this.opcode("emptyHash",$);return P},blockParamIndex:function _(q){for(var f=0,K=this.options.blockParams.length;f<K;f++){var $=this.options.blockParams[f],P=$&&Kf.indexOf($,q);if($&&P>=0)return[f,P]}}};function oZ(_,q,f){if(_==null||typeof _!=="string"&&_.type!=="Program")throw new $f.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+_);if(q=q||{},!("data"in q))q.data=!0;if(q.compat)q.useDepths=!0;var K=f.parse(_,q),$=new f.Compiler().compile(K,q);return new f.JavaScriptCompiler().compile($,q)}function cZ(_,q,f){if(q===void 0)q={};if(_==null||typeof _!=="string"&&_.type!=="Program")throw new $f.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+_);if(q=Kf.extend({},q),!("data"in q))q.data=!0;if(q.compat)q.useDepths=!0;var K=void 0;function $(){var j=f.parse(_,q),v=new f.Compiler().compile(j,q),w=new f.JavaScriptCompiler().compile(v,q,void 0,!0);return f.template(w)}function P(j,v){if(!K)K=$();return K.call(this,j,v)}return P._setup=function(j){if(!K)K=$();return K._setup(j)},P._child=function(j,v,w,O){if(!K)K=$();return K._child(j,v,w,O)},P}function hw(_,q){if(_===q)return!0;if(Kf.isArray(_)&&Kf.isArray(q)&&_.length===q.length){for(var f=0;f<_.length;f++)if(!hw(_[f],q[f]))return!1;return!0}}function Ww(_){if(!_.path.parts){var q=_.path;_.path={type:"PathExpression",data:!1,depth:0,parts:[q.original+""],original:q.original+"",loc:q.loc}}}});var Zw=l((BZ)=>{var kw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");BZ.encode=function(_){if(0<=_&&_<kw.length)return kw[_];throw new TypeError("Must be between 0 and 63: "+_)};BZ.decode=function(_){var q=65,f=90,K=97,$=122,P=48,j=57,v=43,w=47,O=26,T=52;if(q<=_&&_<=f)return _-q;if(K<=_&&_<=$)return _-K+O;if(P<=_&&_<=j)return _-P+T;if(_==v)return 62;if(_==w)return 63;return-1}});var k3=l((_X)=>{var Xw=Zw(),J3=5,Aw=1<<J3,uw=Aw-1,Gw=Aw;function QZ(_){return _<0?(-_<<1)+1:(_<<1)+0}function qX(_){var q=(_&1)===1,f=_>>1;return q?-f:f}_X.encode=function _(q){var f="",K,$=QZ(q);do{if(K=$&uw,$>>>=J3,$>0)K|=Gw;f+=Xw.encode(K)}while($>0);return f};_X.decode=function _(q,f,K){var $=q.length,P=0,j=0,v,w;do{if(f>=$)throw new Error("Expected more digits in base 64 VLQ value.");if(w=Xw.decode(q.charCodeAt(f++)),w===-1)throw new Error("Invalid base64 digit: "+q.charAt(f-1));v=!!(w&Gw),w&=uw,P=P+(w<<j),j+=J3}while(v);K.value=qX(P),K.rest=f}});var W6=l((HX)=>{function KX(_,q,f){if(q in _)return _[q];else if(arguments.length===3)return f;else throw new Error('"'+q+'" is a required argument.')}HX.getArg=KX;var mw=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,PX=/^data:.+\,.+$/;function Pf(_){var q=_.match(mw);if(!q)return null;return{scheme:q[1],auth:q[2],host:q[3],port:q[4],path:q[5]}}HX.urlParse=Pf;function T6(_){var q="";if(_.scheme)q+=_.scheme+":";if(q+="//",_.auth)q+=_.auth+"@";if(_.host)q+=_.host;if(_.port)q+=":"+_.port;if(_.path)q+=_.path;return q}HX.urlGenerate=T6;function Z3(_){var q=_,f=Pf(_);if(f){if(!f.path)return _;q=f.path}var K=HX.isAbsolute(q),$=q.split(/\/+/);for(var P,j=0,v=$.length-1;v>=0;v--)if(P=$[v],P===".")$.splice(v,1);else if(P==="..")j++;else if(j>0)if(P==="")$.splice(v+1,j),j=0;else $.splice(v,2),j--;if(q=$.join("/"),q==="")q=K?"/":".";if(f)return f.path=q,T6(f);return q}HX.normalize=Z3;function rw(_,q){if(_==="")_=".";if(q==="")q=".";var f=Pf(q),K=Pf(_);if(K)_=K.path||"/";if(f&&!f.scheme){if(K)f.scheme=K.scheme;return T6(f)}if(f||q.match(PX))return q;if(K&&!K.host&&!K.path)return K.host=q,T6(K);var $=q.charAt(0)==="/"?q:Z3(_.replace(/\/+$/,"")+"/"+q);if(K)return K.path=$,T6(K);return $}HX.join=rw;HX.isAbsolute=function(_){return _.charAt(0)==="/"||mw.test(_)};function jX(_,q){if(_==="")_=".";_=_.replace(/\/$/,"");var f=0;while(q.indexOf(_+"/")!==0){var K=_.lastIndexOf("/");if(K<0)return q;if(_=_.slice(0,K),_.match(/^([^\/]+:\/)?\/*$/))return q;++f}return Array(f+1).join("../")+q.substr(_.length+1)}HX.relative=jX;var bw=function(){var _=Object.create(null);return!("__proto__"in _)}();function Vw(_){return _}function vX(_){if(Mw(_))return"$"+_;return _}HX.toSetString=bw?Vw:vX;function wX(_){if(Mw(_))return _.slice(1);return _}HX.fromSetString=bw?Vw:wX;function Mw(_){if(!_)return!1;var q=_.length;if(q<9)return!1;if(_.charCodeAt(q-1)!==95||_.charCodeAt(q-2)!==95||_.charCodeAt(q-3)!==111||_.charCodeAt(q-4)!==116||_.charCodeAt(q-5)!==111||_.charCodeAt(q-6)!==114||_.charCodeAt(q-7)!==112||_.charCodeAt(q-8)!==95||_.charCodeAt(q-9)!==95)return!1;for(var f=q-10;f>=0;f--)if(_.charCodeAt(f)!==36)return!1;return!0}function OX(_,q,f){var K=z6(_.source,q.source);if(K!==0)return K;if(K=_.originalLine-q.originalLine,K!==0)return K;if(K=_.originalColumn-q.originalColumn,K!==0||f)return K;if(K=_.generatedColumn-q.generatedColumn,K!==0)return K;if(K=_.generatedLine-q.generatedLine,K!==0)return K;return z6(_.name,q.name)}HX.compareByOriginalPositions=OX;function YX(_,q,f){var K=_.generatedLine-q.generatedLine;if(K!==0)return K;if(K=_.generatedColumn-q.generatedColumn,K!==0||f)return K;if(K=z6(_.source,q.source),K!==0)return K;if(K=_.originalLine-q.originalLine,K!==0)return K;if(K=_.originalColumn-q.originalColumn,K!==0)return K;return z6(_.name,q.name)}HX.compareByGeneratedPositionsDeflated=YX;function z6(_,q){if(_===q)return 0;if(_===null)return 1;if(q===null)return-1;if(_>q)return 1;return-1}function TX(_,q){var f=_.generatedLine-q.generatedLine;if(f!==0)return f;if(f=_.generatedColumn-q.generatedColumn,f!==0)return f;if(f=z6(_.source,q.source),f!==0)return f;if(f=_.originalLine-q.originalLine,f!==0)return f;if(f=_.originalColumn-q.originalColumn,f!==0)return f;return z6(_.name,q.name)}HX.compareByGeneratedPositionsInflated=TX;function zX(_){return JSON.parse(_.replace(/^\)]}'[^\n]*\n/,""))}HX.parseSourceMapInput=zX;function WX(_,q,f){if(q=q||"",_){if(_[_.length-1]!=="/"&&q[0]!=="/")_+="/";q=_+q}if(f){var K=Pf(f);if(!K)throw new Error("sourceMapURL could not be parsed");if(K.path){var $=K.path.lastIndexOf("/");if($>=0)K.path=K.path.substring(0,$+1)}q=rw(T6(K),q)}return Z3(q)}HX.computeSourceURL=WX});var u3=l((NX)=>{var X3=W6(),A3=Object.prototype.hasOwnProperty,p8=typeof Map!=="undefined";function L_(){this._array=[],this._set=p8?new Map:Object.create(null)}L_.fromArray=function _(q,f){var K=new L_;for(var $=0,P=q.length;$<P;$++)K.add(q[$],f);return K};L_.prototype.size=function _(){return p8?this._set.size:Object.getOwnPropertyNames(this._set).length};L_.prototype.add=function _(q,f){var K=p8?q:X3.toSetString(q),$=p8?this.has(q):A3.call(this._set,K),P=this._array.length;if(!$||f)this._array.push(q);if(!$)if(p8)this._set.set(q,P);else this._set[K]=P};L_.prototype.has=function _(q){if(p8)return this._set.has(q);else{var f=X3.toSetString(q);return A3.call(this._set,f)}};L_.prototype.indexOf=function _(q){if(p8){var f=this._set.get(q);if(f>=0)return f}else{var K=X3.toSetString(q);if(A3.call(this._set,K))return this._set[K]}throw new Error('"'+q+'" is not in the set.')};L_.prototype.at=function _(q){if(q>=0&&q<this._array.length)return this._array[q];throw new Error("No element indexed by "+q)};L_.prototype.toArray=function _(){return this._array.slice()};NX.ArraySet=L_});var Nw=l((lX)=>{var Sw=W6();function pX(_,q){var f=_.generatedLine,K=q.generatedLine,$=_.generatedColumn,P=q.generatedColumn;return K>f||K==f&&P>=$||Sw.compareByGeneratedPositionsInflated(_,q)<=0}function i$(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}i$.prototype.unsortedForEach=function _(q,f){this._array.forEach(q,f)};i$.prototype.add=function _(q){if(pX(this._last,q))this._last=q,this._array.push(q);else this._sorted=!1,this._array.push(q)};i$.prototype.toArray=function _(){if(!this._sorted)this._array.sort(Sw.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};lX.MappingList=i$});var G3=l((EX)=>{var jf=k3(),lq=W6(),o$=u3().ArraySet,RX=Nw().MappingList;function v_(_){if(!_)_={};this._file=lq.getArg(_,"file",null),this._sourceRoot=lq.getArg(_,"sourceRoot",null),this._skipValidation=lq.getArg(_,"skipValidation",!1),this._sources=new o$,this._names=new o$,this._mappings=new RX,this._sourcesContents=null}v_.prototype._version=3;v_.fromSourceMap=function _(q){var f=q.sourceRoot,K=new v_({file:q.file,sourceRoot:f});return q.eachMapping(function($){var P={generated:{line:$.generatedLine,column:$.generatedColumn}};if($.source!=null){if(P.source=$.source,f!=null)P.source=lq.relative(f,P.source);if(P.original={line:$.originalLine,column:$.originalColumn},$.name!=null)P.name=$.name}K.addMapping(P)}),q.sources.forEach(function($){var P=$;if(f!==null)P=lq.relative(f,$);if(!K._sources.has(P))K._sources.add(P);var j=q.sourceContentFor($);if(j!=null)K.setSourceContent($,j)}),K};v_.prototype.addMapping=function _(q){var f=lq.getArg(q,"generated"),K=lq.getArg(q,"original",null),$=lq.getArg(q,"source",null),P=lq.getArg(q,"name",null);if(!this._skipValidation)this._validateMapping(f,K,$,P);if($!=null){if($=String($),!this._sources.has($))this._sources.add($)}if(P!=null){if(P=String(P),!this._names.has(P))this._names.add(P)}this._mappings.add({generatedLine:f.line,generatedColumn:f.column,originalLine:K!=null&&K.line,originalColumn:K!=null&&K.column,source:$,name:P})};v_.prototype.setSourceContent=function _(q,f){var K=q;if(this._sourceRoot!=null)K=lq.relative(this._sourceRoot,K);if(f!=null){if(!this._sourcesContents)this._sourcesContents=Object.create(null);this._sourcesContents[lq.toSetString(K)]=f}else if(this._sourcesContents){if(delete this._sourcesContents[lq.toSetString(K)],Object.keys(this._sourcesContents).length===0)this._sourcesContents=null}};v_.prototype.applySourceMap=function _(q,f,K){var $=f;if(f==null){if(q.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);$=q.file}var P=this._sourceRoot;if(P!=null)$=lq.relative(P,$);var j=new o$,v=new o$;this._mappings.unsortedForEach(function(w){if(w.source===$&&w.originalLine!=null){var O=q.originalPositionFor({line:w.originalLine,column:w.originalColumn});if(O.source!=null){if(w.source=O.source,K!=null)w.source=lq.join(K,w.source);if(P!=null)w.source=lq.relative(P,w.source);if(w.originalLine=O.line,w.originalColumn=O.column,O.name!=null)w.name=O.name}}var T=w.source;if(T!=null&&!j.has(T))j.add(T);var Y=w.name;if(Y!=null&&!v.has(Y))v.add(Y)},this),this._sources=j,this._names=v,q.sources.forEach(function(w){var O=q.sourceContentFor(w);if(O!=null){if(K!=null)w=lq.join(K,w);if(P!=null)w=lq.relative(P,w);this.setSourceContent(w,O)}},this)};v_.prototype._validateMapping=function _(q,f,K,$){if(f&&typeof f.line!=="number"&&typeof f.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(q&&"line"in q&&"column"in q&&q.line>0&&q.column>=0&&!f&&!K&&!$)return;else if(q&&"line"in q&&"column"in q&&f&&"line"in f&&"column"in f&&q.line>0&&q.column>=0&&f.line>0&&f.column>=0&&K)return;else throw new Error("Invalid mapping: "+JSON.stringify({generated:q,source:K,original:f,name:$}))};v_.prototype._serializeMappings=function _(){var q=0,f=1,K=0,$=0,P=0,j=0,v="",w,O,T,Y,z=this._mappings.toArray();for(var H=0,k=z.length;H<k;H++){if(O=z[H],w="",O.generatedLine!==f){q=0;while(O.generatedLine!==f)w+=";",f++}else if(H>0){if(!lq.compareByGeneratedPositionsInflated(O,z[H-1]))continue;w+=","}if(w+=jf.encode(O.generatedColumn-q),q=O.generatedColumn,O.source!=null){if(Y=this._sources.indexOf(O.source),w+=jf.encode(Y-j),j=Y,w+=jf.encode(O.originalLine-1-$),$=O.originalLine-1,w+=jf.encode(O.originalColumn-K),K=O.originalColumn,O.name!=null)T=this._names.indexOf(O.name),w+=jf.encode(T-P),P=T}v+=w}return v};v_.prototype._generateSourcesContent=function _(q,f){return q.map(function(K){if(!this._sourcesContents)return null;if(f!=null)K=lq.relative(f,K);var $=lq.toSetString(K);return Object.prototype.hasOwnProperty.call(this._sourcesContents,$)?this._sourcesContents[$]:null},this)};v_.prototype.toJSON=function _(){var q={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null)q.file=this._file;if(this._sourceRoot!=null)q.sourceRoot=this._sourceRoot;if(this._sourcesContents)q.sourcesContent=this._generateSourcesContent(q.sources,q.sourceRoot);return q};v_.prototype.toString=function _(){return JSON.stringify(this.toJSON())};EX.SourceMapGenerator=v_});var pw=l((dX)=>{dX.GREATEST_LOWER_BOUND=1;dX.LEAST_UPPER_BOUND=2;function m3(_,q,f,K,$,P){var j=Math.floor((q-_)/2)+_,v=$(f,K[j],!0);if(v===0)return j;else if(v>0){if(q-j>1)return m3(j,q,f,K,$,P);if(P==dX.LEAST_UPPER_BOUND)return q<K.length?q:-1;else return j}else{if(j-_>1)return m3(_,j,f,K,$,P);if(P==dX.LEAST_UPPER_BOUND)return j;else return _<0?-1:_}}dX.search=function _(q,f,K,$){if(f.length===0)return-1;var P=m3(-1,f.length,q,f,K,$||dX.GREATEST_LOWER_BOUND);if(P<0)return-1;while(P-1>=0){if(K(f[P],f[P-1],!0)!==0)break;--P}return P}});var lw=l((DX)=>{function b3(_,q,f){var K=_[q];_[q]=_[f],_[f]=K}function IX(_,q){return Math.round(_+Math.random()*(q-_))}function V3(_,q,f,K){if(f<K){var $=IX(f,K),P=f-1;b3(_,$,K);var j=_[K];for(var v=f;v<K;v++)if(q(_[v],j)<=0)P+=1,b3(_,P,v);b3(_,P+1,v);var w=P+1;V3(_,q,f,w-1),V3(_,q,w+1,K)}}DX.quickSort=function(_,q){V3(_,q,0,_.length-1)}});var Rw=l((oX)=>{var s=W6(),M3=pw(),H6=u3().ArraySet,iX=k3(),vf=lw().quickSort;function Aq(_,q){var f=_;if(typeof _==="string")f=s.parseSourceMapInput(_);return f.sections!=null?new X_(f,q):new Iq(f,q)}Aq.fromSourceMap=function(_,q){return Iq.fromSourceMap(_,q)};Aq.prototype._version=3;Aq.prototype.__generatedMappings=null;Object.defineProperty(Aq.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__generatedMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__generatedMappings}});Aq.prototype.__originalMappings=null;Object.defineProperty(Aq.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__originalMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__originalMappings}});Aq.prototype._charIsMappingSeparator=function _(q,f){var K=q.charAt(f);return K===";"||K===","};Aq.prototype._parseMappings=function _(q,f){throw new Error("Subclasses must implement _parseMappings")};Aq.GENERATED_ORDER=1;Aq.ORIGINAL_ORDER=2;Aq.GREATEST_LOWER_BOUND=1;Aq.LEAST_UPPER_BOUND=2;Aq.prototype.eachMapping=function _(q,f,K){var $=f||null,P=K||Aq.GENERATED_ORDER,j;switch(P){case Aq.GENERATED_ORDER:j=this._generatedMappings;break;case Aq.ORIGINAL_ORDER:j=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var v=this.sourceRoot;j.map(function(w){var O=w.source===null?null:this._sources.at(w.source);return O=s.computeSourceURL(v,O,this._sourceMapURL),{source:O,generatedLine:w.generatedLine,generatedColumn:w.generatedColumn,originalLine:w.originalLine,originalColumn:w.originalColumn,name:w.name===null?null:this._names.at(w.name)}},this).forEach(q,$)};Aq.prototype.allGeneratedPositionsFor=function _(q){var f=s.getArg(q,"line"),K={source:s.getArg(q,"source"),originalLine:f,originalColumn:s.getArg(q,"column",0)};if(K.source=this._findSourceIndex(K.source),K.source<0)return[];var $=[],P=this._findMapping(K,this._originalMappings,"originalLine","originalColumn",s.compareByOriginalPositions,M3.LEAST_UPPER_BOUND);if(P>=0){var j=this._originalMappings[P];if(q.column===void 0){var v=j.originalLine;while(j&&j.originalLine===v)$.push({line:s.getArg(j,"generatedLine",null),column:s.getArg(j,"generatedColumn",null),lastColumn:s.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}else{var w=j.originalColumn;while(j&&j.originalLine===f&&j.originalColumn==w)$.push({line:s.getArg(j,"generatedLine",null),column:s.getArg(j,"generatedColumn",null),lastColumn:s.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}}return $};oX.SourceMapConsumer=Aq;function Iq(_,q){var f=_;if(typeof _==="string")f=s.parseSourceMapInput(_);var K=s.getArg(f,"version"),$=s.getArg(f,"sources"),P=s.getArg(f,"names",[]),j=s.getArg(f,"sourceRoot",null),v=s.getArg(f,"sourcesContent",null),w=s.getArg(f,"mappings"),O=s.getArg(f,"file",null);if(K!=this._version)throw new Error("Unsupported version: "+K);if(j)j=s.normalize(j);$=$.map(String).map(s.normalize).map(function(T){return j&&s.isAbsolute(j)&&s.isAbsolute(T)?s.relative(j,T):T}),this._names=H6.fromArray(P.map(String),!0),this._sources=H6.fromArray($,!0),this._absoluteSources=this._sources.toArray().map(function(T){return s.computeSourceURL(j,T,q)}),this.sourceRoot=j,this.sourcesContent=v,this._mappings=w,this._sourceMapURL=q,this.file=O}Iq.prototype=Object.create(Aq.prototype);Iq.prototype.consumer=Aq;Iq.prototype._findSourceIndex=function(_){var q=_;if(this.sourceRoot!=null)q=s.relative(this.sourceRoot,q);if(this._sources.has(q))return this._sources.indexOf(q);var f;for(f=0;f<this._absoluteSources.length;++f)if(this._absoluteSources[f]==_)return f;return-1};Iq.fromSourceMap=function _(q,f){var K=Object.create(Iq.prototype),$=K._names=H6.fromArray(q._names.toArray(),!0),P=K._sources=H6.fromArray(q._sources.toArray(),!0);K.sourceRoot=q._sourceRoot,K.sourcesContent=q._generateSourcesContent(K._sources.toArray(),K.sourceRoot),K.file=q._file,K._sourceMapURL=f,K._absoluteSources=K._sources.toArray().map(function(H){return s.computeSourceURL(K.sourceRoot,H,f)});var j=q._mappings.toArray().slice(),v=K.__generatedMappings=[],w=K.__originalMappings=[];for(var O=0,T=j.length;O<T;O++){var Y=j[O],z=new nw;if(z.generatedLine=Y.generatedLine,z.generatedColumn=Y.generatedColumn,Y.source){if(z.source=P.indexOf(Y.source),z.originalLine=Y.originalLine,z.originalColumn=Y.originalColumn,Y.name)z.name=$.indexOf(Y.name);w.push(z)}v.push(z)}return vf(K.__originalMappings,s.compareByOriginalPositions),K};Iq.prototype._version=3;Object.defineProperty(Iq.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function nw(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Iq.prototype._parseMappings=function _(q,f){var K=1,$=0,P=0,j=0,v=0,w=0,O=q.length,T=0,Y={},z={},H=[],k=[],J,h,X,M,b;while(T<O)if(q.charAt(T)===";")K++,T++,$=0;else if(q.charAt(T)===",")T++;else{J=new nw,J.generatedLine=K;for(M=T;M<O;M++)if(this._charIsMappingSeparator(q,M))break;if(h=q.slice(T,M),X=Y[h],X)T+=h.length;else{X=[];while(T<M)iX.decode(q,T,z),b=z.value,T=z.rest,X.push(b);if(X.length===2)throw new Error("Found a source, but no line and column");if(X.length===3)throw new Error("Found a source and line, but no column");Y[h]=X}if(J.generatedColumn=$+X[0],$=J.generatedColumn,X.length>1){if(J.source=v+X[1],v+=X[1],J.originalLine=P+X[2],P=J.originalLine,J.originalLine+=1,J.originalColumn=j+X[3],j=J.originalColumn,X.length>4)J.name=w+X[4],w+=X[4]}if(k.push(J),typeof J.originalLine==="number")H.push(J)}vf(k,s.compareByGeneratedPositionsDeflated),this.__generatedMappings=k,vf(H,s.compareByOriginalPositions),this.__originalMappings=H};Iq.prototype._findMapping=function _(q,f,K,$,P,j){if(q[K]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+q[K]);if(q[$]<0)throw new TypeError("Column must be greater than or equal to 0, got "+q[$]);return M3.search(q,f,P,j)};Iq.prototype.computeColumnSpans=function _(){for(var q=0;q<this._generatedMappings.length;++q){var f=this._generatedMappings[q];if(q+1<this._generatedMappings.length){var K=this._generatedMappings[q+1];if(f.generatedLine===K.generatedLine){f.lastGeneratedColumn=K.generatedColumn-1;continue}}f.lastGeneratedColumn=1/0}};Iq.prototype.originalPositionFor=function _(q){var f={generatedLine:s.getArg(q,"line"),generatedColumn:s.getArg(q,"column")},K=this._findMapping(f,this._generatedMappings,"generatedLine","generatedColumn",s.compareByGeneratedPositionsDeflated,s.getArg(q,"bias",Aq.GREATEST_LOWER_BOUND));if(K>=0){var $=this._generatedMappings[K];if($.generatedLine===f.generatedLine){var P=s.getArg($,"source",null);if(P!==null)P=this._sources.at(P),P=s.computeSourceURL(this.sourceRoot,P,this._sourceMapURL);var j=s.getArg($,"name",null);if(j!==null)j=this._names.at(j);return{source:P,line:s.getArg($,"originalLine",null),column:s.getArg($,"originalColumn",null),name:j}}}return{source:null,line:null,column:null,name:null}};Iq.prototype.hasContentsOfAllSources=function _(){if(!this.sourcesContent)return!1;return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(q){return q==null})};Iq.prototype.sourceContentFor=function _(q,f){if(!this.sourcesContent)return null;var K=this._findSourceIndex(q);if(K>=0)return this.sourcesContent[K];var $=q;if(this.sourceRoot!=null)$=s.relative(this.sourceRoot,$);var P;if(this.sourceRoot!=null&&(P=s.urlParse(this.sourceRoot))){var j=$.replace(/^file:\/\//,"");if(P.scheme=="file"&&this._sources.has(j))return this.sourcesContent[this._sources.indexOf(j)];if((!P.path||P.path=="/")&&this._sources.has("/"+$))return this.sourcesContent[this._sources.indexOf("/"+$)]}if(f)return null;else throw new Error('"'+$+'" is not in the SourceMap.')};Iq.prototype.generatedPositionFor=function _(q){var f=s.getArg(q,"source");if(f=this._findSourceIndex(f),f<0)return{line:null,column:null,lastColumn:null};var K={source:f,originalLine:s.getArg(q,"line"),originalColumn:s.getArg(q,"column")},$=this._findMapping(K,this._originalMappings,"originalLine","originalColumn",s.compareByOriginalPositions,s.getArg(q,"bias",Aq.GREATEST_LOWER_BOUND));if($>=0){var P=this._originalMappings[$];if(P.source===K.source)return{line:s.getArg(P,"generatedLine",null),column:s.getArg(P,"generatedColumn",null),lastColumn:s.getArg(P,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};oX.BasicSourceMapConsumer=Iq;function X_(_,q){var f=_;if(typeof _==="string")f=s.parseSourceMapInput(_);var K=s.getArg(f,"version"),$=s.getArg(f,"sections");if(K!=this._version)throw new Error("Unsupported version: "+K);this._sources=new H6,this._names=new H6;var P={line:-1,column:0};this._sections=$.map(function(j){if(j.url)throw new Error("Support for url field in sections not implemented.");var v=s.getArg(j,"offset"),w=s.getArg(v,"line"),O=s.getArg(v,"column");if(w<P.line||w===P.line&&O<P.column)throw new Error("Section offsets must be ordered and non-overlapping.");return P=v,{generatedOffset:{generatedLine:w+1,generatedColumn:O+1},consumer:new Aq(s.getArg(j,"map"),q)}})}X_.prototype=Object.create(Aq.prototype);X_.prototype.constructor=Aq;X_.prototype._version=3;Object.defineProperty(X_.prototype,"sources",{get:function(){var _=[];for(var q=0;q<this._sections.length;q++)for(var f=0;f<this._sections[q].consumer.sources.length;f++)_.push(this._sections[q].consumer.sources[f]);return _}});X_.prototype.originalPositionFor=function _(q){var f={generatedLine:s.getArg(q,"line"),generatedColumn:s.getArg(q,"column")},K=M3.search(f,this._sections,function(P,j){var v=P.generatedLine-j.generatedOffset.generatedLine;if(v)return v;return P.generatedColumn-j.generatedOffset.generatedColumn}),$=this._sections[K];if(!$)return{source:null,line:null,column:null,name:null};return $.consumer.originalPositionFor({line:f.generatedLine-($.generatedOffset.generatedLine-1),column:f.generatedColumn-($.generatedOffset.generatedLine===f.generatedLine?$.generatedOffset.generatedColumn-1:0),bias:q.bias})};X_.prototype.hasContentsOfAllSources=function _(){return this._sections.every(function(q){return q.consumer.hasContentsOfAllSources()})};X_.prototype.sourceContentFor=function _(q,f){for(var K=0;K<this._sections.length;K++){var $=this._sections[K],P=$.consumer.sourceContentFor(q,!0);if(P)return P}if(f)return null;else throw new Error('"'+q+'" is not in the SourceMap.')};X_.prototype.generatedPositionFor=function _(q){for(var f=0;f<this._sections.length;f++){var K=this._sections[f];if(K.consumer._findSourceIndex(s.getArg(q,"source"))===-1)continue;var $=K.consumer.generatedPositionFor(q);if($){var P={line:$.line+(K.generatedOffset.generatedLine-1),column:$.column+(K.generatedOffset.generatedLine===$.line?K.generatedOffset.generatedColumn-1:0)};return P}}return{line:null,column:null}};X_.prototype._parseMappings=function _(q,f){this.__generatedMappings=[],this.__originalMappings=[];for(var K=0;K<this._sections.length;K++){var $=this._sections[K],P=$.consumer._generatedMappings;for(var j=0;j<P.length;j++){var v=P[j],w=$.consumer._sources.at(v.source);w=s.computeSourceURL($.consumer.sourceRoot,w,this._sourceMapURL),this._sources.add(w),w=this._sources.indexOf(w);var O=null;if(v.name)O=$.consumer._names.at(v.name),this._names.add(O),O=this._names.indexOf(O);var T={source:w,generatedLine:v.generatedLine+($.generatedOffset.generatedLine-1),generatedColumn:v.generatedColumn+($.generatedOffset.generatedLine===v.generatedLine?$.generatedOffset.generatedColumn-1:0),originalLine:v.originalLine,originalColumn:v.originalColumn,name:O};if(this.__generatedMappings.push(T),typeof T.originalLine==="number")this.__originalMappings.push(T)}}vf(this.__generatedMappings,s.compareByGeneratedPositionsDeflated),vf(this.__originalMappings,s.compareByOriginalPositions)};oX.IndexedSourceMapConsumer=X_});var Ew=l((BX)=>{var eX=G3().SourceMapGenerator,c$=W6(),xX=/(\r?\n)/,sX=10,h6="$$$isSourceNode$$$";function q_(_,q,f,K,$){if(this.children=[],this.sourceContents={},this.line=_==null?null:_,this.column=q==null?null:q,this.source=f==null?null:f,this.name=$==null?null:$,this[h6]=!0,K!=null)this.add(K)}q_.fromStringWithSourceMap=function _(q,f,K){var $=new q_,P=q.split(xX),j=0,v=function(){var z=k(),H=k()||"";return z+H;function k(){return j<P.length?P[j++]:void 0}},w=1,O=0,T=null;if(f.eachMapping(function(z){if(T!==null)if(w<z.generatedLine)Y(T,v()),w++,O=0;else{var H=P[j]||"",k=H.substr(0,z.generatedColumn-O);P[j]=H.substr(z.generatedColumn-O),O=z.generatedColumn,Y(T,k),T=z;return}while(w<z.generatedLine)$.add(v()),w++;if(O<z.generatedColumn){var H=P[j]||"";$.add(H.substr(0,z.generatedColumn)),P[j]=H.substr(z.generatedColumn),O=z.generatedColumn}T=z},this),j<P.length){if(T)Y(T,v());$.add(P.splice(j).join(""))}return f.sources.forEach(function(z){var H=f.sourceContentFor(z);if(H!=null){if(K!=null)z=c$.join(K,z);$.setSourceContent(z,H)}}),$;function Y(z,H){if(z===null||z.source===void 0)$.add(H);else{var k=K?c$.join(K,z.source):z.source;$.add(new q_(z.originalLine,z.originalColumn,k,H,z.name))}}};q_.prototype.add=function _(q){if(Array.isArray(q))q.forEach(function(f){this.add(f)},this);else if(q[h6]||typeof q==="string"){if(q)this.children.push(q)}else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+q);return this};q_.prototype.prepend=function _(q){if(Array.isArray(q))for(var f=q.length-1;f>=0;f--)this.prepend(q[f]);else if(q[h6]||typeof q==="string")this.children.unshift(q);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+q);return this};q_.prototype.walk=function _(q){var f;for(var K=0,$=this.children.length;K<$;K++)if(f=this.children[K],f[h6])f.walk(q);else if(f!=="")q(f,{source:this.source,line:this.line,column:this.column,name:this.name})};q_.prototype.join=function _(q){var f,K,$=this.children.length;if($>0){f=[];for(K=0;K<$-1;K++)f.push(this.children[K]),f.push(q);f.push(this.children[K]),this.children=f}return this};q_.prototype.replaceRight=function _(q,f){var K=this.children[this.children.length-1];if(K[h6])K.replaceRight(q,f);else if(typeof K==="string")this.children[this.children.length-1]=K.replace(q,f);else this.children.push("".replace(q,f));return this};q_.prototype.setSourceContent=function _(q,f){this.sourceContents[c$.toSetString(q)]=f};q_.prototype.walkSourceContents=function _(q){for(var f=0,K=this.children.length;f<K;f++)if(this.children[f][h6])this.children[f].walkSourceContents(q);var $=Object.keys(this.sourceContents);for(var f=0,K=$.length;f<K;f++)q(c$.fromSetString($[f]),this.sourceContents[$[f]])};q_.prototype.toString=function _(){var q="";return this.walk(function(f){q+=f}),q};q_.prototype.toStringWithSourceMap=function _(q){var f={code:"",line:1,column:0},K=new eX(q),$=!1,P=null,j=null,v=null,w=null;return this.walk(function(O,T){if(f.code+=O,T.source!==null&&T.line!==null&&T.column!==null){if(P!==T.source||j!==T.line||v!==T.column||w!==T.name)K.addMapping({source:T.source,original:{line:T.line,column:T.column},generated:{line:f.line,column:f.column},name:T.name});P=T.source,j=T.line,v=T.column,w=T.name,$=!0}else if($)K.addMapping({generated:{line:f.line,column:f.column}}),P=null,$=!1;for(var Y=0,z=O.length;Y<z;Y++)if(O.charCodeAt(Y)===sX){if(f.line++,f.column=0,Y+1===z)P=null,$=!1;else if($)K.addMapping({source:T.source,original:{line:T.line,column:T.column},generated:{line:f.line,column:f.column},name:T.name})}else f.column++}),this.walkSourceContents(function(O,T){K.setSourceContent(O,T)}),{code:f.code,map:K}};BX.SourceNode=q_});var gw=l((FX)=>{FX.SourceMapGenerator=G3().SourceMapGenerator;FX.SourceMapConsumer=Rw().SourceMapConsumer;FX.SourceNode=Ew().SourceNode});var Dw=l((aw,Iw)=>{aw.__esModule=!0;var N3=Lq(),l8=void 0;try{if(typeof define!=="function"||!define.amd)C3=gw(),l8=C3.SourceNode}catch(_){}var C3;if(!l8)l8=function(_,q,f,K){if(this.src="",K)this.add(K)},l8.prototype={add:function _(q){if(N3.isArray(q))q=q.join("");this.src+=q},prepend:function _(q){if(N3.isArray(q))q=q.join("");this.src=q+this.src},toStringWithSourceMap:function _(){return{code:this.toString()}},toString:function _(){return this.src}};function S3(_,q,f){if(N3.isArray(_)){var K=[];for(var $=0,P=_.length;$<P;$++)K.push(q.wrap(_[$],f));return K}else if(typeof _==="boolean"||typeof _==="number")return _+"";return _}function dw(_){this.srcFile=_,this.source=[]}dw.prototype={isEmpty:function _(){return!this.source.length},prepend:function _(q,f){this.source.unshift(this.wrap(q,f))},push:function _(q,f){this.source.push(this.wrap(q,f))},merge:function _(){var q=this.empty();return this.each(function(f){q.add([" ",f,`
|
|
14
|
+
`])}),q},each:function _(q){for(var f=0,K=this.source.length;f<K;f++)q(this.source[f])},empty:function _(){var q=this.currentLocation||{start:{}};return new l8(q.start.line,q.start.column,this.srcFile)},wrap:function _(q){var f=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];if(q instanceof l8)return q;return q=S3(q,this,f),new l8(f.start.line,f.start.column,this.srcFile,q)},functionCall:function _(q,f,K){return K=this.generateList(K),this.wrap([q,f?"."+f+"(":"(",K,")"])},quotedString:function _(q){return'"'+(q+"").replace(/\\/g,"\\\\").replace(/"/g,"\\\"").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function _(q){var f=this,K=[];Object.keys(q).forEach(function(P){var j=S3(q[P],f);if(j!=="undefined")K.push([f.quotedString(P),":",j])});var $=this.generateList(K);return $.prepend("{"),$.add("}"),$},generateList:function _(q){var f=this.empty();for(var K=0,$=q.length;K<$;K++){if(K)f.add(",");f.add(S3(q[K],this))}return f},generateArray:function _(q){var f=this.generateList(q);return f.prepend("["),f.add("]"),f}};aw.default=dw;Iw.exports=aw.default});var tw=l((cw,Lw)=>{cw.__esModule=!0;function ow(_){return _&&_.__esModule?_:{default:_}}var yw=g$(),KA=j_(),p3=ow(KA),PA=Lq(),jA=Dw(),iw=ow(jA);function J6(_){this.value=_}function k6(){}k6.prototype={nameLookup:function _(q,f){return this.internalNameLookup(q,f)},depthedLookup:function _(q){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(q),")"]},compilerInfo:function _(){var q=yw.COMPILER_REVISION,f=yw.REVISION_CHANGES[q];return[q,f]},appendToBuffer:function _(q,f,K){if(!PA.isArray(q))q=[q];if(q=this.source.wrap(q,f),this.environment.isSimple)return["return ",q,";"];else if(K)return["buffer += ",q,";"];else return q.appendToBuffer=!0,q},initializeBuffer:function _(){return this.quotedString("")},internalNameLookup:function _(q,f){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",q,",",JSON.stringify(f),")"]},lookupPropertyFunctionIsUsed:!1,compile:function _(q,f,K,$){this.environment=q,this.options=f,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!$,this.name=this.environment.name,this.isChild=!!K,this.context=K||{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(q,f),this.useDepths=this.useDepths||q.useDepths||q.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||q.useBlockParams;var P=q.opcodes,j=void 0,v=void 0,w=void 0,O=void 0;for(w=0,O=P.length;w<O;w++)j=P[w],this.source.currentLocation=j.loc,v=v||j.loc,this[j.opcode].apply(this,j.args);if(this.source.currentLocation=v,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new p3.default("Compile completed with content left on stack");if(!this.decorators.isEmpty())if(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
|
|
15
15
|
`]),this.decorators.push("return fn;"),$)this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]);else this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
|
|
16
16
|
`),this.decorators.push(`}
|
|
17
|
-
`),this.decorators=this.decorators.merge();else this.decorators=void 0;var T=this.createFunctionContext($);if(!this.isChild){var Y={compiler:this.compilerInfo(),main:T};if(this.decorators)Y.main_d=this.decorators,Y.useDecorators=!0;var z=this.context,H=z.programs,
|
|
17
|
+
`),this.decorators=this.decorators.merge();else this.decorators=void 0;var T=this.createFunctionContext($);if(!this.isChild){var Y={compiler:this.compilerInfo(),main:T};if(this.decorators)Y.main_d=this.decorators,Y.useDecorators=!0;var z=this.context,H=z.programs,k=z.decorators;for(w=0,O=H.length;w<O;w++)if(H[w]){if(Y[w]=H[w],k[w])Y[w+"_d"]=k[w],Y.useDecorators=!0}if(this.environment.usePartial)Y.usePartial=!0;if(this.options.data)Y.useData=!0;if(this.useDepths)Y.useDepths=!0;if(this.useBlockParams)Y.useBlockParams=!0;if(this.options.compat)Y.compat=!0;if(!$)if(Y.compiler=JSON.stringify(Y.compiler),this.source.currentLocation={start:{line:1,column:0}},Y=this.objectLiteral(Y),f.srcName)Y=Y.toStringWithSourceMap({file:f.destName}),Y.map=Y.map&&Y.map.toString();else Y=Y.toString();else Y.compilerOptions=this.options;return Y}else return T},preamble:function _(){this.lastContext=0,this.source=new iw.default(this.options.srcName),this.decorators=new iw.default(this.options.srcName)},createFunctionContext:function _(q){var f=this,K="",$=this.stackVars.concat(this.registers.list);if($.length>0)K+=", "+$.join(", ");var P=0;if(Object.keys(this.aliases).forEach(function(w){var O=f.aliases[w];if(O.children&&O.referenceCount>1)K+=", alias"+ ++P+"="+w,O.children[0]="alias"+P}),this.lookupPropertyFunctionIsUsed)K+=", "+this.lookupPropertyFunctionVarDeclaration();var j=["container","depth0","helpers","partials","data"];if(this.useBlockParams||this.useDepths)j.push("blockParams");if(this.useDepths)j.push("depths");var v=this.mergeSource(K);if(q)return j.push(v),Function.apply(this,j);else return this.source.wrap(["function(",j.join(","),`) {
|
|
18
18
|
`,v,"}"])},mergeSource:function _(q){var f=this.environment.isSimple,K=!this.forceBuffer,$=void 0,P=void 0,j=void 0,v=void 0;if(this.source.each(function(w){if(w.appendToBuffer){if(j)w.prepend(" + ");else j=w;v=w}else{if(j){if(!P)$=!0;else j.prepend("buffer += ");v.add(";"),j=v=void 0}if(P=!0,!f)K=!1}}),K){if(j)j.prepend("return "),v.add(";");else if(!P)this.source.push('return "";')}else if(q+=", buffer = "+($?"":this.initializeBuffer()),j)j.prepend("return buffer + "),v.add(";");else this.source.push("return buffer;");if(q)this.source.prepend("var "+q.substring(2)+($?"":`;
|
|
19
19
|
`));return this.source.merge()},lookupPropertyFunctionVarDeclaration:function _(){return`
|
|
20
20
|
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
@@ -23,83 +23,83 @@ Expecting `+m.join(", ")+", got '"+(this.terminals_[n]||n)+"'";else S="Parse err
|
|
|
23
23
|
}
|
|
24
24
|
return undefined
|
|
25
25
|
}
|
|
26
|
-
`.trim()},blockValue:function _(q){var f=this.aliasable("container.hooks.blockHelperMissing"),K=[this.contextName(0)];this.setupHelperArgs(q,0,K);var $=this.popStack();K.splice(1,0,$),this.push(this.source.functionCall(f,"call",K))},ambiguousBlockValue:function _(){var q=this.aliasable("container.hooks.blockHelperMissing"),f=[this.contextName(0)];this.setupHelperArgs("",0,f,!0),this.flushInline();var K=this.topStack();f.splice(1,0,K),this.pushSource(["if (!",this.lastHelper,") { ",K," = ",this.source.functionCall(q,"call",f),"}"])},appendContent:function _(q){if(this.pendingContent)q=this.pendingContent+q;else this.pendingLocation=this.source.currentLocation;this.pendingContent=q},append:function _(){if(this.isInline())this.replaceStack(function(f){return[" != null ? ",f,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var q=this.popStack();if(this.pushSource(["if (",q," != null) { ",this.appendToBuffer(q,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 _(q){this.lastContext=q},pushContext:function _(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function _(q,f,K,$){var P=0;if(!$&&this.options.compat&&!this.lastContext)this.push(this.depthedLookup(q[P++]));else this.pushContext();this.resolvePath("context",q,P,f,K)},lookupBlockParam:function _(q,f){this.useBlockParams=!0,this.push(["blockParams[",q[0],"][",q[1],"]"]),this.resolvePath("context",f,1)},lookupData:function _(q,f,K){if(!q)this.pushStackLiteral("data");else this.pushStackLiteral("container.data(data, "+q+")");this.resolvePath("data",f,0,!0,K)},resolvePath:function _(q,f,K,$,P){var j=this;if(this.options.strict||this.options.assumeObjects){this.push(PA(this.options.strict&&P,this,f,K,q));return}var v=f.length;for(;K<v;K++)this.replaceStack(function(w){var O=j.nameLookup(w,f[K],q);if(!$)return[" != null ? ",O," : ",w];else return[" && ",O]})},resolvePossibleLambda:function _(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function _(q,f){if(this.pushContext(),this.pushString(f),f!=="SubExpression")if(typeof q==="string")this.pushString(q);else this.pushStackLiteral(q)},emptyHash:function _(q){if(this.trackIds)this.push("{}");if(this.stringParams)this.push("{}"),this.push("{}");this.pushStackLiteral(q?"undefined":"{}")},pushHash:function _(){if(this.hash)this.hashes.push(this.hash);this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function _(){var q=this.hash;if(this.hash=this.hashes.pop(),this.trackIds)this.push(this.objectLiteral(q.ids));if(this.stringParams)this.push(this.objectLiteral(q.contexts)),this.push(this.objectLiteral(q.types));this.push(this.objectLiteral(q.values))},pushString:function _(q){this.pushStackLiteral(this.quotedString(q))},pushLiteral:function _(q){this.pushStackLiteral(q)},pushProgram:function _(q){if(q!=null)this.pushStackLiteral(this.programExpression(q));else this.pushStackLiteral(null)},registerDecorator:function _(q,f){var K=this.nameLookup("decorators",f,"decorator"),$=this.setupHelperArgs(f,q);this.decorators.push(["fn = ",this.decorators.functionCall(K,"",["fn","props","container",$])," || fn;"])},invokeHelper:function _(q,f,K){var $=this.popStack(),P=this.setupHelper(q,f),j=[];if(K)j.push(P.name);if(j.push($),!this.options.strict)j.push(this.aliasable("container.hooks.helperMissing"));var v=["(",this.itemsSeparatedBy(j,"||"),")"],w=this.source.functionCall(v,"call",P.callParams);this.push(w)},itemsSeparatedBy:function _(q,f){var K=[];K.push(q[0]);for(var $=1;$<q.length;$++)K.push(f,q[$]);return K},invokeKnownHelper:function _(q,f){var K=this.setupHelper(q,f);this.push(this.source.functionCall(K.name,"call",K.callParams))},invokeAmbiguous:function _(q,f){this.useRegister("helper");var K=this.popStack();this.emptyHash();var $=this.setupHelper(0,q,f),P=this.lastHelper=this.nameLookup("helpers",q,"helper"),j=["(","(helper = ",P," || ",K,")"];if(!this.options.strict)j[0]="(helper = ",j.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"));this.push(["(",j,$.paramsInit?["),(",$.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",$.callParams)," : helper))"])},invokePartial:function _(q,f,K){var $=[],P=this.setupParams(f,1,$);if(q)f=this.popStack(),delete P.name;if(K)P.indent=JSON.stringify(K);if(P.helpers="helpers",P.partials="partials",P.decorators="container.decorators",!q)$.unshift(this.nameLookup("partials",f,"partial"));else $.unshift(f);if(this.options.compat)P.depths="depths";P=this.objectLiteral(P),$.push(P),this.push(this.source.functionCall("container.invokePartial","",$))},assignToHash:function _(q){var f=this.popStack(),K=void 0,$=void 0,P=void 0;if(this.trackIds)P=this.popStack();if(this.stringParams)$=this.popStack(),K=this.popStack();var j=this.hash;if(K)j.contexts[q]=K;if($)j.types[q]=$;if(P)j.ids[q]=P;j.values[q]=f},pushId:function _(q,f,K){if(q==="BlockParam")this.pushStackLiteral("blockParams["+f[0]+"].path["+f[1]+"]"+(K?" + "+JSON.stringify("."+K):""));else if(q==="PathExpression")this.pushString(f);else if(q==="SubExpression")this.pushStackLiteral("true");else this.pushStackLiteral("null")},compiler:Jf,compileChildren:function _(q,f){var K=q.children,$=void 0,P=void 0;for(var j=0,v=K.length;j<v;j++){$=K[j],P=new this.compiler;var w=this.matchExistingProgram($);if(w==null){this.context.programs.push("");var O=this.context.programs.length;$.index=O,$.name="program"+O,this.context.programs[O]=P.compile($,f,this.context,!this.precompile),this.context.decorators[O]=P.decorators,this.context.environments[O]=$,this.useDepths=this.useDepths||P.useDepths,this.useBlockParams=this.useBlockParams||P.useBlockParams,$.useDepths=this.useDepths,$.useBlockParams=this.useBlockParams}else $.index=w.index,$.name="program"+w.index,this.useDepths=this.useDepths||w.useDepths,this.useBlockParams=this.useBlockParams||w.useBlockParams}},matchExistingProgram:function _(q){for(var f=0,K=this.context.environments.length;f<K;f++){var $=this.context.environments[f];if($&&$.equals(q))return $}},programExpression:function _(q){var f=this.environment.children[q],K=[f.index,"data",f.blockParams];if(this.useBlockParams||this.useDepths)K.push("blockParams");if(this.useDepths)K.push("depths");return"container.program("+K.join(", ")+")"},useRegister:function _(q){if(!this.registers[q])this.registers[q]=!0,this.registers.list.push(q)},push:function _(q){if(!(q instanceof hf))q=this.source.wrap(q);return this.inlineStack.push(q),q},pushStackLiteral:function _(q){this.push(new hf(q))},pushSource:function _(q){if(this.pendingContent)this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0;if(q)this.source.push(q)},replaceStack:function _(q){var f=["("],K=void 0,$=void 0,P=void 0;if(!this.isInline())throw new N3.default("replaceStack on non-inline");var j=this.popStack(!0);if(j instanceof hf)K=[j.value],f=["(",K],P=!0;else{$=!0;var v=this.incrStack();f=["((",this.push(v)," = ",j,")"],K=this.topStack()}var w=q.call(this,K);if(!P)this.popStack();if($)this.stackSlot--;this.push(f.concat(w,")"))},incrStack:function _(){if(this.stackSlot++,this.stackSlot>this.stackVars.length)this.stackVars.push("stack"+this.stackSlot);return this.topStackName()},topStackName:function _(){return"stack"+this.stackSlot},flushInline:function _(){var q=this.inlineStack;this.inlineStack=[];for(var f=0,K=q.length;f<K;f++){var $=q[f];if($ instanceof hf)this.compileStack.push($);else{var P=this.incrStack();this.pushSource([P," = ",$,";"]),this.compileStack.push(P)}}},isInline:function _(){return this.inlineStack.length},popStack:function _(q){var f=this.isInline(),K=(f?this.inlineStack:this.compileStack).pop();if(!q&&K instanceof hf)return K.value;else{if(!f){if(!this.stackSlot)throw new N3.default("Invalid stack pop");this.stackSlot--}return K}},topStack:function _(){var q=this.isInline()?this.inlineStack:this.compileStack,f=q[q.length-1];if(f instanceof hf)return f.value;else return f},contextName:function _(q){if(this.useDepths&&q)return"depths["+q+"]";else return"depth"+q},quotedString:function _(q){return this.source.quotedString(q)},objectLiteral:function _(q){return this.source.objectLiteral(q)},aliasable:function _(q){var f=this.aliases[q];if(f)return f.referenceCount++,f;return f=this.aliases[q]=this.source.wrap(q),f.aliasable=!0,f.referenceCount=1,f},setupHelper:function _(q,f,K){var $=[],P=this.setupHelperArgs(f,q,$,K),j=this.nameLookup("helpers",f,"helper"),v=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:$,paramsInit:P,name:j,callParams:[v].concat($)}},setupParams:function _(q,f,K){var $={},P=[],j=[],v=[],w=!K,O=void 0;if(w)K=[];if($.name=this.quotedString(q),$.hash=this.popStack(),this.trackIds)$.hashIds=this.popStack();if(this.stringParams)$.hashTypes=this.popStack(),$.hashContexts=this.popStack();var T=this.popStack(),Y=this.popStack();if(Y||T)$.fn=Y||"container.noop",$.inverse=T||"container.noop";var z=f;while(z--){if(O=this.popStack(),K[z]=O,this.trackIds)v[z]=this.popStack();if(this.stringParams)j[z]=this.popStack(),P[z]=this.popStack()}if(w)$.args=this.source.generateArray(K);if(this.trackIds)$.ids=this.source.generateArray(v);if(this.stringParams)$.types=this.source.generateArray(j),$.contexts=this.source.generateArray(P);if(this.options.data)$.data="data";if(this.useBlockParams)$.blockParams="blockParams";return $},setupHelperArgs:function _(q,f,K,$){var P=this.setupParams(q,f,K);if(P.loc=JSON.stringify(this.source.currentLocation),P=this.objectLiteral(P),$)return this.useRegister("options"),K.push("options"),["options=",P];else if(K)return K.push(P),"";else return P}};(function(){var _="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(" "),q=Jf.RESERVED_WORDS={};for(var f=0,K=_.length;f<K;f++)q[_[f]]=!0})();Jf.isValidJavaScriptVariableName=function(_){return!Jf.RESERVED_WORDS[_]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(_)};function PA(_,q,f,K,$){var P=q.popStack(),j=f.length;if(_)j--;for(;K<j;K++)P=q.nameLookup(P,f[K],$);if(_)return[q.aliasable("container.strict"),"(",P,", ",q.quotedString(f[K]),", ",JSON.stringify(q.source.currentLocation)," )"];else return P}iw.default=Jf;ow.exports=iw.default});var xw=p((tw,ew)=>{tw.__esModule=!0;function w6(_){return _&&_.__esModule?_:{default:_}}var wA=e5(),OA=w6(wA),YA=j3(),TA=w6(YA),C3=Yw(),p3=Hw(),zA=cw(),WA=w6(zA),HA=a$(),hA=w6(HA),JA=f3(),kA=w6(JA),ZA=OA.default.create;function Lw(){var _=ZA();return _.compile=function(q,f){return p3.compile(q,f,_)},_.precompile=function(q,f){return p3.precompile(q,f,_)},_.AST=TA.default,_.Compiler=p3.Compiler,_.JavaScriptCompiler=WA.default,_.Parser=C3.parser,_.parse=C3.parse,_.parseWithoutProcessing=C3.parseWithoutProcessing,_}var kf=Lw();kf.create=Lw;kA.default(kf);kf.Visitor=hA.default;kf.default=kf;tw.default=kf;ew.exports=tw.default});var sw=p((bA)=>{bA.__esModule=!0;bA.print=rA;bA.PrintVisitor=Sq;function uA(_){return _&&_.__esModule?_:{default:_}}var GA=a$(),mA=uA(GA);function rA(_){return new Sq().accept(_)}function Sq(){this.padding=0}Sq.prototype=new mA.default;Sq.prototype.pad=function(_){var q="";for(var f=0,K=this.padding;f<K;f++)q+=" ";return q+=_+`
|
|
27
|
-
`,q};Sq.prototype.Program=function(_){var q="",f=_.body,K=void 0,$=void 0;if(_.blockParams){var P="BLOCK PARAMS: [";for(K=0,$=_.blockParams.length;K<$;K++)P+=" "+_.blockParams[K];P+=" ]",q+=this.pad(P)}for(K=0,$=f.length;K<$;K++)q+=this.accept(f[K]);return this.padding--,q};Sq.prototype.MustacheStatement=function(_){return this.pad("{{ "+this.SubExpression(_)+" }}")};Sq.prototype.Decorator=function(_){return this.pad("{{ DIRECTIVE "+this.SubExpression(_)+" }}")};Sq.prototype.BlockStatement=Sq.prototype.DecoratorBlock=function(_){var q="";if(q+=this.pad((_.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,q+=this.pad(this.SubExpression(_)),_.program)q+=this.pad("PROGRAM:"),this.padding++,q+=this.accept(_.program),this.padding--;if(_.inverse){if(_.program)this.padding++;if(q+=this.pad("{{^}}"),this.padding++,q+=this.accept(_.inverse),this.padding--,_.program)this.padding--}return this.padding--,q};Sq.prototype.PartialStatement=function(_){var q="PARTIAL:"+_.name.original;if(_.params[0])q+=" "+this.accept(_.params[0]);if(_.hash)q+=" "+this.accept(_.hash);return this.pad("{{> "+q+" }}")};Sq.prototype.PartialBlockStatement=function(_){var q="PARTIAL BLOCK:"+_.name.original;if(_.params[0])q+=" "+this.accept(_.params[0]);if(_.hash)q+=" "+this.accept(_.hash);return q+=" "+this.pad("PROGRAM:"),this.padding++,q+=this.accept(_.program),this.padding--,this.pad("{{> "+q+" }}")};Sq.prototype.ContentStatement=function(_){return this.pad("CONTENT[ '"+_.value+"' ]")};Sq.prototype.CommentStatement=function(_){return this.pad("{{! '"+_.value+"' }}")};Sq.prototype.SubExpression=function(_){var q=_.params,f=[],K=void 0;for(var $=0,P=q.length;$<P;$++)f.push(this.accept(q[$]));return q="["+f.join(", ")+"]",K=_.hash?" "+this.accept(_.hash):"",this.accept(_.path)+" "+q+K};Sq.prototype.PathExpression=function(_){var q=_.parts.join("/");return(_.data?"@":"")+"PATH:"+q};Sq.prototype.StringLiteral=function(_){return'"'+_.value+'"'};Sq.prototype.NumberLiteral=function(_){return"NUMBER{"+_.value+"}"};Sq.prototype.BooleanLiteral=function(_){return"BOOLEAN{"+_.value+"}"};Sq.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Sq.prototype.NullLiteral=function(){return"NULL"};Sq.prototype.Hash=function(_){var q=_.pairs,f=[];for(var K=0,$=q.length;K<$;K++)f.push(this.accept(q[K]));return"HASH{"+f.join(", ")+"}"};Sq.prototype.HashPair=function(_){return _.key+"="+this.accept(_.value)}});var
|
|
28
|
-
`)}}w_.defaultYaml={explicit:!1,version:"1.2"};w_.defaultTags={"!!":"tag:yaml.org,2002:"};
|
|
29
|
-
`)?
|
|
26
|
+
`.trim()},blockValue:function _(q){var f=this.aliasable("container.hooks.blockHelperMissing"),K=[this.contextName(0)];this.setupHelperArgs(q,0,K);var $=this.popStack();K.splice(1,0,$),this.push(this.source.functionCall(f,"call",K))},ambiguousBlockValue:function _(){var q=this.aliasable("container.hooks.blockHelperMissing"),f=[this.contextName(0)];this.setupHelperArgs("",0,f,!0),this.flushInline();var K=this.topStack();f.splice(1,0,K),this.pushSource(["if (!",this.lastHelper,") { ",K," = ",this.source.functionCall(q,"call",f),"}"])},appendContent:function _(q){if(this.pendingContent)q=this.pendingContent+q;else this.pendingLocation=this.source.currentLocation;this.pendingContent=q},append:function _(){if(this.isInline())this.replaceStack(function(f){return[" != null ? ",f,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var q=this.popStack();if(this.pushSource(["if (",q," != null) { ",this.appendToBuffer(q,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 _(q){this.lastContext=q},pushContext:function _(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function _(q,f,K,$){var P=0;if(!$&&this.options.compat&&!this.lastContext)this.push(this.depthedLookup(q[P++]));else this.pushContext();this.resolvePath("context",q,P,f,K)},lookupBlockParam:function _(q,f){this.useBlockParams=!0,this.push(["blockParams[",q[0],"][",q[1],"]"]),this.resolvePath("context",f,1)},lookupData:function _(q,f,K){if(!q)this.pushStackLiteral("data");else this.pushStackLiteral("container.data(data, "+q+")");this.resolvePath("data",f,0,!0,K)},resolvePath:function _(q,f,K,$,P){var j=this;if(this.options.strict||this.options.assumeObjects){this.push(vA(this.options.strict&&P,this,f,K,q));return}var v=f.length;for(;K<v;K++)this.replaceStack(function(w){var O=j.nameLookup(w,f[K],q);if(!$)return[" != null ? ",O," : ",w];else return[" && ",O]})},resolvePossibleLambda:function _(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function _(q,f){if(this.pushContext(),this.pushString(f),f!=="SubExpression")if(typeof q==="string")this.pushString(q);else this.pushStackLiteral(q)},emptyHash:function _(q){if(this.trackIds)this.push("{}");if(this.stringParams)this.push("{}"),this.push("{}");this.pushStackLiteral(q?"undefined":"{}")},pushHash:function _(){if(this.hash)this.hashes.push(this.hash);this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function _(){var q=this.hash;if(this.hash=this.hashes.pop(),this.trackIds)this.push(this.objectLiteral(q.ids));if(this.stringParams)this.push(this.objectLiteral(q.contexts)),this.push(this.objectLiteral(q.types));this.push(this.objectLiteral(q.values))},pushString:function _(q){this.pushStackLiteral(this.quotedString(q))},pushLiteral:function _(q){this.pushStackLiteral(q)},pushProgram:function _(q){if(q!=null)this.pushStackLiteral(this.programExpression(q));else this.pushStackLiteral(null)},registerDecorator:function _(q,f){var K=this.nameLookup("decorators",f,"decorator"),$=this.setupHelperArgs(f,q);this.decorators.push(["fn = ",this.decorators.functionCall(K,"",["fn","props","container",$])," || fn;"])},invokeHelper:function _(q,f,K){var $=this.popStack(),P=this.setupHelper(q,f),j=[];if(K)j.push(P.name);if(j.push($),!this.options.strict)j.push(this.aliasable("container.hooks.helperMissing"));var v=["(",this.itemsSeparatedBy(j,"||"),")"],w=this.source.functionCall(v,"call",P.callParams);this.push(w)},itemsSeparatedBy:function _(q,f){var K=[];K.push(q[0]);for(var $=1;$<q.length;$++)K.push(f,q[$]);return K},invokeKnownHelper:function _(q,f){var K=this.setupHelper(q,f);this.push(this.source.functionCall(K.name,"call",K.callParams))},invokeAmbiguous:function _(q,f){this.useRegister("helper");var K=this.popStack();this.emptyHash();var $=this.setupHelper(0,q,f),P=this.lastHelper=this.nameLookup("helpers",q,"helper"),j=["(","(helper = ",P," || ",K,")"];if(!this.options.strict)j[0]="(helper = ",j.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"));this.push(["(",j,$.paramsInit?["),(",$.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",$.callParams)," : helper))"])},invokePartial:function _(q,f,K){var $=[],P=this.setupParams(f,1,$);if(q)f=this.popStack(),delete P.name;if(K)P.indent=JSON.stringify(K);if(P.helpers="helpers",P.partials="partials",P.decorators="container.decorators",!q)$.unshift(this.nameLookup("partials",f,"partial"));else $.unshift(f);if(this.options.compat)P.depths="depths";P=this.objectLiteral(P),$.push(P),this.push(this.source.functionCall("container.invokePartial","",$))},assignToHash:function _(q){var f=this.popStack(),K=void 0,$=void 0,P=void 0;if(this.trackIds)P=this.popStack();if(this.stringParams)$=this.popStack(),K=this.popStack();var j=this.hash;if(K)j.contexts[q]=K;if($)j.types[q]=$;if(P)j.ids[q]=P;j.values[q]=f},pushId:function _(q,f,K){if(q==="BlockParam")this.pushStackLiteral("blockParams["+f[0]+"].path["+f[1]+"]"+(K?" + "+JSON.stringify("."+K):""));else if(q==="PathExpression")this.pushString(f);else if(q==="SubExpression")this.pushStackLiteral("true");else this.pushStackLiteral("null")},compiler:k6,compileChildren:function _(q,f){var K=q.children,$=void 0,P=void 0;for(var j=0,v=K.length;j<v;j++){$=K[j],P=new this.compiler;var w=this.matchExistingProgram($);if(w==null){this.context.programs.push("");var O=this.context.programs.length;$.index=O,$.name="program"+O,this.context.programs[O]=P.compile($,f,this.context,!this.precompile),this.context.decorators[O]=P.decorators,this.context.environments[O]=$,this.useDepths=this.useDepths||P.useDepths,this.useBlockParams=this.useBlockParams||P.useBlockParams,$.useDepths=this.useDepths,$.useBlockParams=this.useBlockParams}else $.index=w.index,$.name="program"+w.index,this.useDepths=this.useDepths||w.useDepths,this.useBlockParams=this.useBlockParams||w.useBlockParams}},matchExistingProgram:function _(q){for(var f=0,K=this.context.environments.length;f<K;f++){var $=this.context.environments[f];if($&&$.equals(q))return $}},programExpression:function _(q){var f=this.environment.children[q],K=[f.index,"data",f.blockParams];if(this.useBlockParams||this.useDepths)K.push("blockParams");if(this.useDepths)K.push("depths");return"container.program("+K.join(", ")+")"},useRegister:function _(q){if(!this.registers[q])this.registers[q]=!0,this.registers.list.push(q)},push:function _(q){if(!(q instanceof J6))q=this.source.wrap(q);return this.inlineStack.push(q),q},pushStackLiteral:function _(q){this.push(new J6(q))},pushSource:function _(q){if(this.pendingContent)this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0;if(q)this.source.push(q)},replaceStack:function _(q){var f=["("],K=void 0,$=void 0,P=void 0;if(!this.isInline())throw new p3.default("replaceStack on non-inline");var j=this.popStack(!0);if(j instanceof J6)K=[j.value],f=["(",K],P=!0;else{$=!0;var v=this.incrStack();f=["((",this.push(v)," = ",j,")"],K=this.topStack()}var w=q.call(this,K);if(!P)this.popStack();if($)this.stackSlot--;this.push(f.concat(w,")"))},incrStack:function _(){if(this.stackSlot++,this.stackSlot>this.stackVars.length)this.stackVars.push("stack"+this.stackSlot);return this.topStackName()},topStackName:function _(){return"stack"+this.stackSlot},flushInline:function _(){var q=this.inlineStack;this.inlineStack=[];for(var f=0,K=q.length;f<K;f++){var $=q[f];if($ instanceof J6)this.compileStack.push($);else{var P=this.incrStack();this.pushSource([P," = ",$,";"]),this.compileStack.push(P)}}},isInline:function _(){return this.inlineStack.length},popStack:function _(q){var f=this.isInline(),K=(f?this.inlineStack:this.compileStack).pop();if(!q&&K instanceof J6)return K.value;else{if(!f){if(!this.stackSlot)throw new p3.default("Invalid stack pop");this.stackSlot--}return K}},topStack:function _(){var q=this.isInline()?this.inlineStack:this.compileStack,f=q[q.length-1];if(f instanceof J6)return f.value;else return f},contextName:function _(q){if(this.useDepths&&q)return"depths["+q+"]";else return"depth"+q},quotedString:function _(q){return this.source.quotedString(q)},objectLiteral:function _(q){return this.source.objectLiteral(q)},aliasable:function _(q){var f=this.aliases[q];if(f)return f.referenceCount++,f;return f=this.aliases[q]=this.source.wrap(q),f.aliasable=!0,f.referenceCount=1,f},setupHelper:function _(q,f,K){var $=[],P=this.setupHelperArgs(f,q,$,K),j=this.nameLookup("helpers",f,"helper"),v=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:$,paramsInit:P,name:j,callParams:[v].concat($)}},setupParams:function _(q,f,K){var $={},P=[],j=[],v=[],w=!K,O=void 0;if(w)K=[];if($.name=this.quotedString(q),$.hash=this.popStack(),this.trackIds)$.hashIds=this.popStack();if(this.stringParams)$.hashTypes=this.popStack(),$.hashContexts=this.popStack();var T=this.popStack(),Y=this.popStack();if(Y||T)$.fn=Y||"container.noop",$.inverse=T||"container.noop";var z=f;while(z--){if(O=this.popStack(),K[z]=O,this.trackIds)v[z]=this.popStack();if(this.stringParams)j[z]=this.popStack(),P[z]=this.popStack()}if(w)$.args=this.source.generateArray(K);if(this.trackIds)$.ids=this.source.generateArray(v);if(this.stringParams)$.types=this.source.generateArray(j),$.contexts=this.source.generateArray(P);if(this.options.data)$.data="data";if(this.useBlockParams)$.blockParams="blockParams";return $},setupHelperArgs:function _(q,f,K,$){var P=this.setupParams(q,f,K);if(P.loc=JSON.stringify(this.source.currentLocation),P=this.objectLiteral(P),$)return this.useRegister("options"),K.push("options"),["options=",P];else if(K)return K.push(P),"";else return P}};(function(){var _="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(" "),q=k6.RESERVED_WORDS={};for(var f=0,K=_.length;f<K;f++)q[_[f]]=!0})();k6.isValidJavaScriptVariableName=function(_){return!k6.RESERVED_WORDS[_]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(_)};function vA(_,q,f,K,$){var P=q.popStack(),j=f.length;if(_)j--;for(;K<j;K++)P=q.nameLookup(P,f[K],$);if(_)return[q.aliasable("container.strict"),"(",P,", ",q.quotedString(f[K]),", ",JSON.stringify(q.source.currentLocation)," )"];else return P}cw.default=k6;Lw.exports=cw.default});var Bw=l((xw,sw)=>{xw.__esModule=!0;function wf(_){return _&&_.__esModule?_:{default:_}}var YA=s5(),TA=wf(YA),zA=w3(),WA=wf(zA),l3=zw(),n3=Jw(),HA=tw(),hA=wf(HA),JA=D$(),kA=wf(JA),ZA=K3(),XA=wf(ZA),AA=TA.default.create;function ew(){var _=AA();return _.compile=function(q,f){return n3.compile(q,f,_)},_.precompile=function(q,f){return n3.precompile(q,f,_)},_.AST=WA.default,_.Compiler=n3.Compiler,_.JavaScriptCompiler=hA.default,_.Parser=l3.parser,_.parse=l3.parse,_.parseWithoutProcessing=l3.parseWithoutProcessing,_}var Z6=ew();Z6.create=ew;XA.default(Z6);Z6.Visitor=kA.default;Z6.default=Z6;xw.default=Z6;sw.exports=xw.default});var Uw=l((MA)=>{MA.__esModule=!0;MA.print=VA;MA.PrintVisitor=Sq;function mA(_){return _&&_.__esModule?_:{default:_}}var rA=D$(),bA=mA(rA);function VA(_){return new Sq().accept(_)}function Sq(){this.padding=0}Sq.prototype=new bA.default;Sq.prototype.pad=function(_){var q="";for(var f=0,K=this.padding;f<K;f++)q+=" ";return q+=_+`
|
|
27
|
+
`,q};Sq.prototype.Program=function(_){var q="",f=_.body,K=void 0,$=void 0;if(_.blockParams){var P="BLOCK PARAMS: [";for(K=0,$=_.blockParams.length;K<$;K++)P+=" "+_.blockParams[K];P+=" ]",q+=this.pad(P)}for(K=0,$=f.length;K<$;K++)q+=this.accept(f[K]);return this.padding--,q};Sq.prototype.MustacheStatement=function(_){return this.pad("{{ "+this.SubExpression(_)+" }}")};Sq.prototype.Decorator=function(_){return this.pad("{{ DIRECTIVE "+this.SubExpression(_)+" }}")};Sq.prototype.BlockStatement=Sq.prototype.DecoratorBlock=function(_){var q="";if(q+=this.pad((_.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,q+=this.pad(this.SubExpression(_)),_.program)q+=this.pad("PROGRAM:"),this.padding++,q+=this.accept(_.program),this.padding--;if(_.inverse){if(_.program)this.padding++;if(q+=this.pad("{{^}}"),this.padding++,q+=this.accept(_.inverse),this.padding--,_.program)this.padding--}return this.padding--,q};Sq.prototype.PartialStatement=function(_){var q="PARTIAL:"+_.name.original;if(_.params[0])q+=" "+this.accept(_.params[0]);if(_.hash)q+=" "+this.accept(_.hash);return this.pad("{{> "+q+" }}")};Sq.prototype.PartialBlockStatement=function(_){var q="PARTIAL BLOCK:"+_.name.original;if(_.params[0])q+=" "+this.accept(_.params[0]);if(_.hash)q+=" "+this.accept(_.hash);return q+=" "+this.pad("PROGRAM:"),this.padding++,q+=this.accept(_.program),this.padding--,this.pad("{{> "+q+" }}")};Sq.prototype.ContentStatement=function(_){return this.pad("CONTENT[ '"+_.value+"' ]")};Sq.prototype.CommentStatement=function(_){return this.pad("{{! '"+_.value+"' }}")};Sq.prototype.SubExpression=function(_){var q=_.params,f=[],K=void 0;for(var $=0,P=q.length;$<P;$++)f.push(this.accept(q[$]));return q="["+f.join(", ")+"]",K=_.hash?" "+this.accept(_.hash):"",this.accept(_.path)+" "+q+K};Sq.prototype.PathExpression=function(_){var q=_.parts.join("/");return(_.data?"@":"")+"PATH:"+q};Sq.prototype.StringLiteral=function(_){return'"'+_.value+'"'};Sq.prototype.NumberLiteral=function(_){return"NUMBER{"+_.value+"}"};Sq.prototype.BooleanLiteral=function(_){return"BOOLEAN{"+_.value+"}"};Sq.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Sq.prototype.NullLiteral=function(){return"NULL"};Sq.prototype.Hash=function(_){var q=_.pairs,f=[];for(var K=0,$=q.length;K<$;K++)f.push(this.accept(q[K]));return"HASH{"+f.join(", ")+"}"};Sq.prototype.HashPair=function(_){return _.key+"="+this.accept(_.value)}});var _1=l((Vg,q1)=>{var L$=Bw().default,Qw=Uw();L$.PrintVisitor=Qw.PrintVisitor;L$.print=Qw.print;q1.exports=L$;function Fw(_,q){var f=a_("fs"),K=f.readFileSync(q,"utf8");_.exports=L$.compile(K)}if(a_.extensions)a_.extensions[".handlebars"]=Fw,a_.extensions[".hbs"]=Fw});var Oq=l((aA)=>{var R3=Symbol.for("yaml.alias"),f1=Symbol.for("yaml.document"),t$=Symbol.for("yaml.map"),$1=Symbol.for("yaml.pair"),E3=Symbol.for("yaml.scalar"),e$=Symbol.for("yaml.seq"),t_=Symbol.for("yaml.node.type"),pA=(_)=>!!_&&typeof _==="object"&&_[t_]===R3,lA=(_)=>!!_&&typeof _==="object"&&_[t_]===f1,nA=(_)=>!!_&&typeof _==="object"&&_[t_]===t$,RA=(_)=>!!_&&typeof _==="object"&&_[t_]===$1,K1=(_)=>!!_&&typeof _==="object"&&_[t_]===E3,EA=(_)=>!!_&&typeof _==="object"&&_[t_]===e$;function P1(_){if(_&&typeof _==="object")switch(_[t_]){case t$:case e$:return!0}return!1}function gA(_){if(_&&typeof _==="object")switch(_[t_]){case R3:case t$:case E3:case e$:return!0}return!1}var dA=(_)=>(K1(_)||P1(_))&&!!_.anchor;aA.ALIAS=R3;aA.DOC=f1;aA.MAP=t$;aA.NODE_TYPE=t_;aA.PAIR=$1;aA.SCALAR=E3;aA.SEQ=e$;aA.hasAnchor=dA;aA.isAlias=pA;aA.isCollection=P1;aA.isDocument=lA;aA.isMap=nA;aA.isNode=gA;aA.isPair=RA;aA.isScalar=K1;aA.isSeq=EA});var Of=l((_u)=>{var Eq=Oq(),Bq=Symbol("break visit"),j1=Symbol("skip children"),p_=Symbol("remove node");function x$(_,q){let f=v1(q);if(Eq.isDocument(_)){if(X6(null,_.contents,f,Object.freeze([_]))===p_)_.contents=null}else X6(null,_,f,Object.freeze([]))}x$.BREAK=Bq;x$.SKIP=j1;x$.REMOVE=p_;function X6(_,q,f,K){let $=w1(_,q,f,K);if(Eq.isNode($)||Eq.isPair($))return O1(_,K,$),X6(_,$,f,K);if(typeof $!=="symbol"){if(Eq.isCollection(q)){K=Object.freeze(K.concat(q));for(let P=0;P<q.items.length;++P){let j=X6(P,q.items[P],f,K);if(typeof j==="number")P=j-1;else if(j===Bq)return Bq;else if(j===p_)q.items.splice(P,1),P-=1}}else if(Eq.isPair(q)){K=Object.freeze(K.concat(q));let P=X6("key",q.key,f,K);if(P===Bq)return Bq;else if(P===p_)q.key=null;let j=X6("value",q.value,f,K);if(j===Bq)return Bq;else if(j===p_)q.value=null}}return $}async function s$(_,q){let f=v1(q);if(Eq.isDocument(_)){if(await A6(null,_.contents,f,Object.freeze([_]))===p_)_.contents=null}else await A6(null,_,f,Object.freeze([]))}s$.BREAK=Bq;s$.SKIP=j1;s$.REMOVE=p_;async function A6(_,q,f,K){let $=await w1(_,q,f,K);if(Eq.isNode($)||Eq.isPair($))return O1(_,K,$),A6(_,$,f,K);if(typeof $!=="symbol"){if(Eq.isCollection(q)){K=Object.freeze(K.concat(q));for(let P=0;P<q.items.length;++P){let j=await A6(P,q.items[P],f,K);if(typeof j==="number")P=j-1;else if(j===Bq)return Bq;else if(j===p_)q.items.splice(P,1),P-=1}}else if(Eq.isPair(q)){K=Object.freeze(K.concat(q));let P=await A6("key",q.key,f,K);if(P===Bq)return Bq;else if(P===p_)q.key=null;let j=await A6("value",q.value,f,K);if(j===Bq)return Bq;else if(j===p_)q.value=null}}return $}function v1(_){if(typeof _==="object"&&(_.Collection||_.Node||_.Value))return Object.assign({Alias:_.Node,Map:_.Node,Scalar:_.Node,Seq:_.Node},_.Value&&{Map:_.Value,Scalar:_.Value,Seq:_.Value},_.Collection&&{Map:_.Collection,Seq:_.Collection},_);return _}function w1(_,q,f,K){if(typeof f==="function")return f(_,q,K);if(Eq.isMap(q))return f.Map?.(_,q,K);if(Eq.isSeq(q))return f.Seq?.(_,q,K);if(Eq.isPair(q))return f.Pair?.(_,q,K);if(Eq.isScalar(q))return f.Scalar?.(_,q,K);if(Eq.isAlias(q))return f.Alias?.(_,q,K);return}function O1(_,q,f){let K=q[q.length-1];if(Eq.isCollection(K))K.items[_]=f;else if(Eq.isPair(K))if(_==="key")K.key=f;else K.value=f;else if(Eq.isDocument(K))K.contents=f;else{let $=Eq.isAlias(K)?"alias":"scalar";throw new Error(`Cannot replace node with ${$} parent`)}}_u.visit=x$;_u.visitAsync=s$});var g3=l((vu)=>{var Y1=Oq(),Ku=Of(),Pu={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},ju=(_)=>_.replace(/[!,[\]{}]/g,(q)=>Pu[q]);class w_{constructor(_,q){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},w_.defaultYaml,_),this.tags=Object.assign({},w_.defaultTags,q)}clone(){let _=new w_(this.yaml,this.tags);return _.docStart=this.docStart,_}atDocument(){let _=new w_(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:w_.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},w_.defaultTags);break}return _}add(_,q){if(this.atNextDocument)this.yaml={explicit:w_.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},w_.defaultTags),this.atNextDocument=!1;let f=_.trim().split(/[ \t]+/),K=f.shift();switch(K){case"%TAG":{if(f.length!==2){if(q(0,"%TAG directive should contain exactly two parts"),f.length<2)return!1}let[$,P]=f;return this.tags[$]=P,!0}case"%YAML":{if(this.yaml.explicit=!0,f.length!==1)return q(0,"%YAML directive should contain exactly one part"),!1;let[$]=f;if($==="1.1"||$==="1.2")return this.yaml.version=$,!0;else{let P=/^\d+\.\d+$/.test($);return q(6,`Unsupported YAML version ${$}`,P),!1}}default:return q(0,`Unknown directive ${K}`,!0),!1}}tagName(_,q){if(_==="!")return"!";if(_[0]!=="!")return q(`Not a valid tag: ${_}`),null;if(_[1]==="<"){let P=_.slice(2,-1);if(P==="!"||P==="!!")return q(`Verbatim tags aren't resolved, so ${_} is invalid.`),null;if(_[_.length-1]!==">")q("Verbatim tags must end with a >");return P}let[,f,K]=_.match(/^(.*!)([^!]*)$/s);if(!K)q(`The ${_} tag has no suffix`);let $=this.tags[f];if($)try{return $+decodeURIComponent(K)}catch(P){return q(String(P)),null}if(f==="!")return _;return q(`Could not resolve tag: ${_}`),null}tagString(_){for(let[q,f]of Object.entries(this.tags))if(_.startsWith(f))return q+ju(_.substring(f.length));return _[0]==="!"?_:`!<${_}>`}toString(_){let q=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],f=Object.entries(this.tags),K;if(_&&f.length>0&&Y1.isNode(_.contents)){let $={};Ku.visit(_.contents,(P,j)=>{if(Y1.isNode(j)&&j.tag)$[j.tag]=!0}),K=Object.keys($)}else K=[];for(let[$,P]of f){if($==="!!"&&P==="tag:yaml.org,2002:")continue;if(!_||K.some((j)=>j.startsWith(P)))q.push(`%TAG ${$} ${P}`)}return q.join(`
|
|
28
|
+
`)}}w_.defaultYaml={explicit:!1,version:"1.2"};w_.defaultTags={"!!":"tag:yaml.org,2002:"};vu.Directives=w_});var B$=l((zu)=>{var T1=Oq(),Ou=Of();function Yu(_){if(/[\x00-\x19\s,[\]{}]/.test(_)){let f=`Anchor must not contain whitespace or control characters: ${JSON.stringify(_)}`;throw new Error(f)}return!0}function z1(_){let q=new Set;return Ou.visit(_,{Value(f,K){if(K.anchor)q.add(K.anchor)}}),q}function W1(_,q){for(let f=1;;++f){let K=`${_}${f}`;if(!q.has(K))return K}}function Tu(_,q){let f=[],K=new Map,$=null;return{onAnchor:(P)=>{f.push(P),$??($=z1(_));let j=W1(q,$);return $.add(j),j},setAnchors:()=>{for(let P of f){let j=K.get(P);if(typeof j==="object"&&j.anchor&&(T1.isScalar(j.node)||T1.isCollection(j.node)))j.node.anchor=j.anchor;else{let v=new Error("Failed to resolve repeated object (this should not happen)");throw v.source=P,v}}},sourceObjects:K}}zu.anchorIsValid=Yu;zu.anchorNames=z1;zu.createNodeAnchors=Tu;zu.findNewAnchor=W1});var d3=l((ku)=>{function Yf(_,q,f,K){if(K&&typeof K==="object")if(Array.isArray(K))for(let $=0,P=K.length;$<P;++$){let j=K[$],v=Yf(_,K,String($),j);if(v===void 0)delete K[$];else if(v!==j)K[$]=v}else if(K instanceof Map)for(let $ of Array.from(K.keys())){let P=K.get($),j=Yf(_,K,$,P);if(j===void 0)K.delete($);else if(j!==P)K.set($,j)}else if(K instanceof Set)for(let $ of Array.from(K)){let P=Yf(_,K,$,$);if(P===void 0)K.delete($);else if(P!==$)K.delete($),K.add(P)}else for(let[$,P]of Object.entries(K)){let j=Yf(_,K,$,P);if(j===void 0)delete K[$];else if(j!==P)K[$]=j}return _.call(q,f,K)}ku.applyReviver=Yf});var P8=l((Au)=>{var Xu=Oq();function H1(_,q,f){if(Array.isArray(_))return _.map((K,$)=>H1(K,String($),f));if(_&&typeof _.toJSON==="function"){if(!f||!Xu.hasAnchor(_))return _.toJSON(q,f);let K={aliasCount:0,count:1,res:void 0};f.anchors.set(_,K),f.onCreate=(P)=>{K.res=P,delete f.onCreate};let $=_.toJSON(q,f);if(f.onCreate)f.onCreate($);return $}if(typeof _==="bigint"&&!f?.keep)return Number(_);return _}Au.toJS=H1});var U$=l((ru)=>{var Gu=d3(),h1=Oq(),mu=P8();class J1{constructor(_){Object.defineProperty(this,h1.NODE_TYPE,{value:_})}clone(){let _=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)_.range=this.range.slice();return _}toJS(_,{mapAsMap:q,maxAliasCount:f,onAnchor:K,reviver:$}={}){if(!h1.isDocument(_))throw new TypeError("A document argument is required");let P={anchors:new Map,doc:_,keep:!0,mapAsMap:q===!0,mapKeyWarned:!1,maxAliasCount:typeof f==="number"?f:100},j=mu.toJS(this,"",P);if(typeof K==="function")for(let{count:v,res:w}of P.anchors.values())K(w,v);return typeof $==="function"?Gu.applyReviver($,{"":j},"",j):j}}ru.NodeBase=J1});var Tf=l((Cu)=>{var Vu=B$(),Mu=Of(),u6=Oq(),Su=U$(),Nu=P8();class k1 extends Su.NodeBase{constructor(_){super(u6.ALIAS);this.source=_,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(_,q){let f;if(q?.aliasResolveCache)f=q.aliasResolveCache;else if(f=[],Mu.visit(_,{Node:($,P)=>{if(u6.isAlias(P)||u6.hasAnchor(P))f.push(P)}}),q)q.aliasResolveCache=f;let K=void 0;for(let $ of f){if($===this)break;if($.anchor===this.source)K=$}return K}toJSON(_,q){if(!q)return{source:this.source};let{anchors:f,doc:K,maxAliasCount:$}=q,P=this.resolve(K,q);if(!P){let v=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(v)}let j=f.get(P);if(!j)Nu.toJS(P,null,q),j=f.get(P);if(!j||j.res===void 0)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if($>=0){if(j.count+=1,j.aliasCount===0)j.aliasCount=F$(K,P,f);if(j.count*j.aliasCount>$)throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return j.res}toString(_,q,f){let K=`*${this.source}`;if(_){if(Vu.anchorIsValid(this.source),_.options.verifyAliasOrder&&!_.anchors.has(this.source)){let $=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error($)}if(_.implicitKey)return`${K} `}return K}}function F$(_,q,f){if(u6.isAlias(q)){let K=q.resolve(_),$=f&&K&&f.get(K);return $?$.count*$.aliasCount:0}else if(u6.isCollection(q)){let K=0;for(let $ of q.items){let P=F$(_,$,f);if(P>K)K=P}return K}else if(u6.isPair(q)){let K=F$(_,q.key,f),$=F$(_,q.value,f);return Math.max(K,$)}return 1}Cu.Alias=k1});var nq=l((gu)=>{var lu=Oq(),nu=U$(),Ru=P8(),Eu=(_)=>!_||typeof _!=="function"&&typeof _!=="object";class n8 extends nu.NodeBase{constructor(_){super(lu.SCALAR);this.value=_}toJSON(_,q){return q?.keep?this.value:Ru.toJS(this.value,_,q)}toString(){return String(this.value)}}n8.BLOCK_FOLDED="BLOCK_FOLDED";n8.BLOCK_LITERAL="BLOCK_LITERAL";n8.PLAIN="PLAIN";n8.QUOTE_DOUBLE="QUOTE_DOUBLE";n8.QUOTE_SINGLE="QUOTE_SINGLE";gu.Scalar=n8;gu.isScalarValue=Eu});var zf=l((ou)=>{var Iu=Tf(),R8=Oq(),Z1=nq(),Du="tag:yaml.org,2002:";function yu(_,q,f){if(q){let K=f.filter((P)=>P.tag===q),$=K.find((P)=>!P.format)??K[0];if(!$)throw new Error(`Tag ${q} not found`);return $}return f.find((K)=>K.identify?.(_)&&!K.format)}function iu(_,q,f){if(R8.isDocument(_))_=_.contents;if(R8.isNode(_))return _;if(R8.isPair(_)){let Y=f.schema[R8.MAP].createNode?.(f.schema,null,f);return Y.items.push(_),Y}if(_ instanceof String||_ instanceof Number||_ instanceof Boolean||typeof BigInt!=="undefined"&&_ instanceof BigInt)_=_.valueOf();let{aliasDuplicateObjects:K,onAnchor:$,onTagObj:P,schema:j,sourceObjects:v}=f,w=void 0;if(K&&_&&typeof _==="object")if(w=v.get(_),w)return w.anchor??(w.anchor=$(_)),new Iu.Alias(w.anchor);else w={anchor:null,node:null},v.set(_,w);if(q?.startsWith("!!"))q=Du+q.slice(2);let O=yu(_,q,j.tags);if(!O){if(_&&typeof _.toJSON==="function")_=_.toJSON();if(!_||typeof _!=="object"){let Y=new Z1.Scalar(_);if(w)w.node=Y;return Y}O=_ instanceof Map?j[R8.MAP]:(Symbol.iterator in Object(_))?j[R8.SEQ]:j[R8.MAP]}if(P)P(O),delete f.onTagObj;let T=O?.createNode?O.createNode(f.schema,_,f):typeof O?.nodeClass?.from==="function"?O.nodeClass.from(f.schema,_,f):new Z1.Scalar(_);if(q)T.tag=q;else if(!O.default)T.tag=O.tag;if(w)w.node=T;return T}ou.createNode=iu});var Q$=l((eu)=>{var Lu=zf(),l_=Oq(),tu=U$();function a3(_,q,f){let K=f;for(let $=q.length-1;$>=0;--$){let P=q[$];if(typeof P==="number"&&Number.isInteger(P)&&P>=0){let j=[];j[P]=K,K=j}else K=new Map([[P,K]])}return Lu.createNode(K,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:_,sourceObjects:new Map})}var X1=(_)=>_==null||typeof _==="object"&&!!_[Symbol.iterator]().next().done;class A1 extends tu.NodeBase{constructor(_,q){super(_);Object.defineProperty(this,"schema",{value:q,configurable:!0,enumerable:!1,writable:!0})}clone(_){let q=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(_)q.schema=_;if(q.items=q.items.map((f)=>l_.isNode(f)||l_.isPair(f)?f.clone(_):f),this.range)q.range=this.range.slice();return q}addIn(_,q){if(X1(_))this.add(q);else{let[f,...K]=_,$=this.get(f,!0);if(l_.isCollection($))$.addIn(K,q);else if($===void 0&&this.schema)this.set(f,a3(this.schema,K,q));else throw new Error(`Expected YAML collection at ${f}. Remaining path: ${K}`)}}deleteIn(_){let[q,...f]=_;if(f.length===0)return this.delete(q);let K=this.get(q,!0);if(l_.isCollection(K))return K.deleteIn(f);else throw new Error(`Expected YAML collection at ${q}. Remaining path: ${f}`)}getIn(_,q){let[f,...K]=_,$=this.get(f,!0);if(K.length===0)return!q&&l_.isScalar($)?$.value:$;else return l_.isCollection($)?$.getIn(K,q):void 0}hasAllNullValues(_){return this.items.every((q)=>{if(!l_.isPair(q))return!1;let f=q.value;return f==null||_&&l_.isScalar(f)&&f.value==null&&!f.commentBefore&&!f.comment&&!f.tag})}hasIn(_){let[q,...f]=_;if(f.length===0)return this.has(q);let K=this.get(q,!0);return l_.isCollection(K)?K.hasIn(f):!1}setIn(_,q){let[f,...K]=_;if(K.length===0)this.set(f,q);else{let $=this.get(f,!0);if(l_.isCollection($))$.setIn(K,q);else if($===void 0&&this.schema)this.set(f,a3(this.schema,K,q));else throw new Error(`Expected YAML collection at ${f}. Remaining path: ${K}`)}}}eu.Collection=A1;eu.collectionFromPath=a3;eu.isEmptyPath=X1});var Wf=l((Qu)=>{var Uu=(_)=>_.replace(/^(?!$)(?: $)?/gm,"#");function I3(_,q){if(/^\n+$/.test(_))return _.substring(1);return q?_.replace(/^(?! *$)/gm,q):_}var Fu=(_,q,f)=>_.endsWith(`
|
|
29
|
+
`)?I3(f,q):f.includes(`
|
|
30
30
|
`)?`
|
|
31
|
-
`+
|
|
32
|
-
`){if(f==="block")J=
|
|
33
|
-
`&&H!=="\t"){let
|
|
34
|
-
`&&
|
|
35
|
-
${q}${_.slice(0,
|
|
36
|
-
${q}${_.slice(
|
|
37
|
-
`);K=q,$=q+1,P=_[$]}return K}
|
|
38
|
-
`){if(P-j>K)return!0;if(j=P+1,$-j<=K)return!1}return!0}function
|
|
31
|
+
`+I3(f,q):(_.endsWith(" ")?"":" ")+f;Qu.indentComment=I3;Qu.lineComment=Fu;Qu.stringifyComment=Uu});var G1=l((KG)=>{function $G(_,q,f="flow",{indentAtStart:K,lineWidth:$=80,minContentWidth:P=20,onFold:j,onOverflow:v}={}){if(!$||$<0)return _;if($<P)P=0;let w=Math.max(1+P,1+$-q.length);if(_.length<=w)return _;let O=[],T={},Y=$-q.length;if(typeof K==="number")if(K>$-Math.max(2,P))O.push(0);else Y=$-K;let z=void 0,H=void 0,k=!1,J=-1,h=-1,X=-1;if(f==="block"){if(J=u1(_,J,q.length),J!==-1)Y=J+w}for(let b;b=_[J+=1];){if(f==="quoted"&&b==="\\"){switch(h=J,_[J+1]){case"x":J+=3;break;case"u":J+=5;break;case"U":J+=9;break;default:J+=1}X=J}if(b===`
|
|
32
|
+
`){if(f==="block")J=u1(_,J,q.length);Y=J+q.length+w,z=void 0}else{if(b===" "&&H&&H!==" "&&H!==`
|
|
33
|
+
`&&H!=="\t"){let N=_[J+1];if(N&&N!==" "&&N!==`
|
|
34
|
+
`&&N!=="\t")z=J}if(J>=Y)if(z)O.push(z),Y=z+w,z=void 0;else if(f==="quoted"){while(H===" "||H==="\t")H=b,b=_[J+=1],k=!0;let N=J>X+1?J-2:h-1;if(T[N])return _;O.push(N),T[N]=!0,Y=N+w,z=void 0}else k=!0}H=b}if(k&&v)v();if(O.length===0)return _;if(j)j();let M=_.slice(0,O[0]);for(let b=0;b<O.length;++b){let N=O[b],p=O[b+1]||_.length;if(N===0)M=`
|
|
35
|
+
${q}${_.slice(0,p)}`;else{if(f==="quoted"&&T[N])M+=`${_[N]}\\`;M+=`
|
|
36
|
+
${q}${_.slice(N+1,p)}`}}return M}function u1(_,q,f){let K=q,$=q+1,P=_[$];while(P===" "||P==="\t")if(q<$+f)P=_[++q];else{do P=_[++q];while(P&&P!==`
|
|
37
|
+
`);K=q,$=q+1,P=_[$]}return K}KG.FOLD_BLOCK="block";KG.FOLD_FLOW="flow";KG.FOLD_QUOTED="quoted";KG.foldFlowLines=$G});var hf=l((zG)=>{var A_=nq(),j8=G1(),_K=(_,q)=>({indentAtStart:q?_.indent.length:_.indentAtStart,lineWidth:_.options.lineWidth,minContentWidth:_.options.minContentWidth}),fK=(_)=>/^(%|---|\.\.\.)/m.test(_);function OG(_,q,f){if(!q||q<0)return!1;let K=q-f,$=_.length;if($<=K)return!1;for(let P=0,j=0;P<$;++P)if(_[P]===`
|
|
38
|
+
`){if(P-j>K)return!0;if(j=P+1,$-j<=K)return!1}return!0}function Hf(_,q){let f=JSON.stringify(_);if(q.options.doubleQuotedAsJSON)return f;let{implicitKey:K}=q,$=q.options.doubleQuotedMinMultiLineLength,P=q.indent||(fK(_)?" ":""),j="",v=0;for(let w=0,O=f[w];O;O=f[++w]){if(O===" "&&f[w+1]==="\\"&&f[w+2]==="n")j+=f.slice(v,w)+"\\ ",w+=1,v=w,O="\\";if(O==="\\")switch(f[w+1]){case"u":{j+=f.slice(v,w);let T=f.substr(w+2,4);switch(T){case"0000":j+="\\0";break;case"0007":j+="\\a";break;case"000b":j+="\\v";break;case"001b":j+="\\e";break;case"0085":j+="\\N";break;case"00a0":j+="\\_";break;case"2028":j+="\\L";break;case"2029":j+="\\P";break;default:if(T.substr(0,2)==="00")j+="\\x"+T.substr(2);else j+=f.substr(w,6)}w+=5,v=w+1}break;case"n":if(K||f[w+2]==='"'||f.length<$)w+=1;else{j+=f.slice(v,w)+`
|
|
39
39
|
|
|
40
40
|
`;while(f[w+2]==="\\"&&f[w+3]==="n"&&f[w+4]!=='"')j+=`
|
|
41
|
-
`,w+=2;if(j+=P,f[w+2]===" ")j+="\\";w+=1,v=w+1}break;default:w+=1}}return j=v?j+f.slice(v):f,K?j:j8.foldFlowLines(j,P,j8.FOLD_QUOTED,
|
|
42
|
-
`)||/[ \t]\n|\n[ \t]/.test(_))return
|
|
43
|
-
${f}`)+"'";return q.implicitKey?K:j8.foldFlowLines(K,f,j8.FOLD_FLOW,
|
|
41
|
+
`,w+=2;if(j+=P,f[w+2]===" ")j+="\\";w+=1,v=w+1}break;default:w+=1}}return j=v?j+f.slice(v):f,K?j:j8.foldFlowLines(j,P,j8.FOLD_QUOTED,_K(q,!1))}function D3(_,q){if(q.options.singleQuote===!1||q.implicitKey&&_.includes(`
|
|
42
|
+
`)||/[ \t]\n|\n[ \t]/.test(_))return Hf(_,q);let f=q.indent||(fK(_)?" ":""),K="'"+_.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
43
|
+
${f}`)+"'";return q.implicitKey?K:j8.foldFlowLines(K,f,j8.FOLD_FLOW,_K(q,!1))}function G6(_,q){let{singleQuote:f}=q.options,K;if(f===!1)K=Hf;else{let $=_.includes('"'),P=_.includes("'");if($&&!P)K=D3;else if(P&&!$)K=Hf;else K=f?D3:Hf}return K(_,q)}var y3;try{y3=new RegExp(`(^|(?<!
|
|
44
44
|
))
|
|
45
45
|
+(?!
|
|
46
|
-
|$)`,"g")}catch{
|
|
46
|
+
|$)`,"g")}catch{y3=/\n+(?!\n|$)/g}function qK({comment:_,type:q,value:f},K,$,P){let{blockQuote:j,commentString:v,lineWidth:w}=K.options;if(!j||/\n[\t ]+$/.test(f))return G6(f,K);let O=K.indent||(K.forceBlockIndent||fK(f)?" ":""),T=j==="literal"?!0:j==="folded"||q===A_.Scalar.BLOCK_FOLDED?!1:q===A_.Scalar.BLOCK_LITERAL?!0:!OG(f,w,O.length);if(!f)return T?`|
|
|
47
47
|
`:`>
|
|
48
|
-
`;let Y,z;for(z=f.length;z>0;--z){let
|
|
49
|
-
`&&
|
|
50
|
-
`);if(
|
|
51
|
-
`)H=H.slice(0,-1);H=H.replace(
|
|
52
|
-
`)X=
|
|
53
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${O}`),g=!1,
|
|
54
|
-
${O}${
|
|
55
|
-
${O}${
|
|
56
|
-
`)||T&&/[[\]{},]/.test(P))return
|
|
57
|
-
`)?
|
|
58
|
-
`))return
|
|
59
|
-
${w}`);if(j){let z=(J)=>J.default&&J.tag!=="tag:yaml.org,2002:str"&&J.test?.test(Y),{compat:H,tags:
|
|
60
|
-
${q.indent}${v}`}
|
|
61
|
-
${v}:`}else if(
|
|
62
|
-
`:"",
|
|
63
|
-
${
|
|
48
|
+
`;let Y,z;for(z=f.length;z>0;--z){let p=f[z-1];if(p!==`
|
|
49
|
+
`&&p!=="\t"&&p!==" ")break}let H=f.substring(z),k=H.indexOf(`
|
|
50
|
+
`);if(k===-1)Y="-";else if(f===H||k!==H.length-1){if(Y="+",P)P()}else Y="";if(H){if(f=f.slice(0,-H.length),H[H.length-1]===`
|
|
51
|
+
`)H=H.slice(0,-1);H=H.replace(y3,`$&${O}`)}let J=!1,h,X=-1;for(h=0;h<f.length;++h){let p=f[h];if(p===" ")J=!0;else if(p===`
|
|
52
|
+
`)X=h;else break}let M=f.substring(0,X<h?X+1:h);if(M)f=f.substring(M.length),M=M.replace(/\n+/g,`$&${O}`);let N=(J?O?"2":"1":"")+Y;if(_){if(N+=" "+v(_.replace(/ ?[\r\n]+/g," ")),$)$()}if(!T){let p=f.replace(/\n+/g,`
|
|
53
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${O}`),g=!1,D=_K(K,!0);if(j!=="folded"&&q!==A_.Scalar.BLOCK_FOLDED)D.onOverflow=()=>{g=!0};let u=j8.foldFlowLines(`${M}${p}${H}`,O,j8.FOLD_BLOCK,D);if(!g)return`>${N}
|
|
54
|
+
${O}${u}`}return f=f.replace(/\n+/g,`$&${O}`),`|${N}
|
|
55
|
+
${O}${M}${f}${H}`}function YG(_,q,f,K){let{type:$,value:P}=_,{actualString:j,implicitKey:v,indent:w,indentStep:O,inFlow:T}=q;if(v&&P.includes(`
|
|
56
|
+
`)||T&&/[[\]{},]/.test(P))return G6(P,q);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(P))return v||T||!P.includes(`
|
|
57
|
+
`)?G6(P,q):qK(_,q,f,K);if(!v&&!T&&$!==A_.Scalar.PLAIN&&P.includes(`
|
|
58
|
+
`))return qK(_,q,f,K);if(fK(P)){if(w==="")return q.forceBlockIndent=!0,qK(_,q,f,K);else if(v&&w===O)return G6(P,q)}let Y=P.replace(/\n+/g,`$&
|
|
59
|
+
${w}`);if(j){let z=(J)=>J.default&&J.tag!=="tag:yaml.org,2002:str"&&J.test?.test(Y),{compat:H,tags:k}=q.doc.schema;if(k.some(z)||H?.some(z))return G6(P,q)}return v?Y:j8.foldFlowLines(Y,w,j8.FOLD_FLOW,_K(q,!1))}function TG(_,q,f,K){let{implicitKey:$,inFlow:P}=q,j=typeof _.value==="string"?_:Object.assign({},_,{value:String(_.value)}),{type:v}=_;if(v!==A_.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(j.value))v=A_.Scalar.QUOTE_DOUBLE}let w=(T)=>{switch(T){case A_.Scalar.BLOCK_FOLDED:case A_.Scalar.BLOCK_LITERAL:return $||P?G6(j.value,q):qK(j,q,f,K);case A_.Scalar.QUOTE_DOUBLE:return Hf(j.value,q);case A_.Scalar.QUOTE_SINGLE:return D3(j.value,q);case A_.Scalar.PLAIN:return YG(j,q,f,K);default:return null}},O=w(v);if(O===null){let{defaultKeyType:T,defaultStringType:Y}=q.options,z=$&&T||Y;if(O=w(z),O===null)throw new Error(`Unsupported default string type ${z}`)}return O}zG.stringifyString=TG});var Jf=l((uG)=>{var HG=B$(),v8=Oq(),hG=Wf(),JG=hf();function kG(_,q){let f=Object.assign({blockQuote:!0,commentString:hG.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},_.schema.toStringOptions,q),K;switch(f.collectionStyle){case"block":K=!1;break;case"flow":K=!0;break;default:K=null}return{anchors:new Set,doc:_,flowCollectionPadding:f.flowCollectionPadding?" ":"",indent:"",indentStep:typeof f.indent==="number"?" ".repeat(f.indent):" ",inFlow:K,options:f}}function ZG(_,q){if(q.tag){let $=_.filter((P)=>P.tag===q.tag);if($.length>0)return $.find((P)=>P.format===q.format)??$[0]}let f=void 0,K;if(v8.isScalar(q)){K=q.value;let $=_.filter((P)=>P.identify?.(K));if($.length>1){let P=$.filter((j)=>j.test);if(P.length>0)$=P}f=$.find((P)=>P.format===q.format)??$.find((P)=>!P.format)}else K=q,f=_.find(($)=>$.nodeClass&&K instanceof $.nodeClass);if(!f){let $=K?.constructor?.name??(K===null?"null":typeof K);throw new Error(`Tag not resolved for ${$} value`)}return f}function XG(_,q,{anchors:f,doc:K}){if(!K.directives)return"";let $=[],P=(v8.isScalar(_)||v8.isCollection(_))&&_.anchor;if(P&&HG.anchorIsValid(P))f.add(P),$.push(`&${P}`);let j=_.tag??(q.default?null:q.tag);if(j)$.push(K.directives.tagString(j));return $.join(" ")}function AG(_,q,f,K){if(v8.isPair(_))return _.toString(q,f,K);if(v8.isAlias(_)){if(q.doc.directives)return _.toString(q);if(q.resolvedAliases?.has(_))throw new TypeError("Cannot stringify circular structure without alias nodes");else{if(q.resolvedAliases)q.resolvedAliases.add(_);else q.resolvedAliases=new Set([_]);_=_.resolve(q.doc)}}let $=void 0,P=v8.isNode(_)?_:q.doc.createNode(_,{onTagObj:(w)=>$=w});$??($=ZG(q.doc.schema.tags,P));let j=XG(P,$,q);if(j.length>0)q.indentAtStart=(q.indentAtStart??0)+j.length+1;let v=typeof $.stringify==="function"?$.stringify(P,q,f,K):v8.isScalar(P)?JG.stringifyString(P,q,f,K):P.toString(q,f,K);if(!j)return v;return v8.isScalar(P)||v[0]==="{"||v[0]==="["?`${j} ${v}`:`${j}
|
|
60
|
+
${q.indent}${v}`}uG.createStringifyContext=kG;uG.stringify=AG});var b1=l((bG)=>{var e_=Oq(),m1=nq(),r1=Jf(),kf=Wf();function rG({key:_,value:q},f,K,$){let{allNullValues:P,doc:j,indent:v,indentStep:w,options:{commentString:O,indentSeq:T,simpleKeys:Y}}=f,z=e_.isNode(_)&&_.comment||null;if(Y){if(z)throw new Error("With simple keys, key nodes cannot have comments");if(e_.isCollection(_)||!e_.isNode(_)&&typeof _==="object")throw new Error("With simple keys, collection cannot be used as a key value")}let H=!Y&&(!_||z&&q==null&&!f.inFlow||e_.isCollection(_)||(e_.isScalar(_)?_.type===m1.Scalar.BLOCK_FOLDED||_.type===m1.Scalar.BLOCK_LITERAL:typeof _==="object"));f=Object.assign({},f,{allNullValues:!1,implicitKey:!H&&(Y||!P),indent:v+w});let k=!1,J=!1,h=r1.stringify(_,f,()=>k=!0,()=>J=!0);if(!H&&!f.inFlow&&h.length>1024){if(Y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");H=!0}if(f.inFlow){if(P||q==null){if(k&&K)K();return h===""?"?":H?`? ${h}`:h}}else if(P&&!Y||q==null&&H){if(h=`? ${h}`,z&&!k)h+=kf.lineComment(h,f.indent,O(z));else if(J&&$)$();return h}if(k)z=null;if(H){if(z)h+=kf.lineComment(h,f.indent,O(z));h=`? ${h}
|
|
61
|
+
${v}:`}else if(h=`${h}:`,z)h+=kf.lineComment(h,f.indent,O(z));let X,M,b;if(e_.isNode(q))X=!!q.spaceBefore,M=q.commentBefore,b=q.comment;else if(X=!1,M=null,b=null,q&&typeof q==="object")q=j.createNode(q);if(f.implicitKey=!1,!H&&!z&&e_.isScalar(q))f.indentAtStart=h.length+1;if(J=!1,!T&&w.length>=2&&!f.inFlow&&!H&&e_.isSeq(q)&&!q.flow&&!q.tag&&!q.anchor)f.indent=f.indent.substring(2);let N=!1,p=r1.stringify(q,f,()=>N=!0,()=>J=!0),g=" ";if(z||X||M){if(g=X?`
|
|
62
|
+
`:"",M){let D=O(M);g+=`
|
|
63
|
+
${kf.indentComment(D,f.indent)}`}if(p===""&&!f.inFlow){if(g===`
|
|
64
64
|
`)g=`
|
|
65
65
|
|
|
66
66
|
`}else g+=`
|
|
67
|
-
${f.indent}`}else if(!H&&e_.isCollection(q)){let
|
|
68
|
-
`),C=
|
|
69
|
-
${f.indent}`}}else if(
|
|
70
|
-
`)g="";if(
|
|
67
|
+
${f.indent}`}else if(!H&&e_.isCollection(q)){let D=p[0],u=p.indexOf(`
|
|
68
|
+
`),C=u!==-1,R=f.inFlow??q.flow??q.items.length===0;if(C||!R){let r=!1;if(C&&(D==="&"||D==="!")){let m=p.indexOf(" ");if(D==="&"&&m!==-1&&m<u&&p[m+1]==="!")m=p.indexOf(" ",m+1);if(m===-1||u<m)r=!0}if(!r)g=`
|
|
69
|
+
${f.indent}`}}else if(p===""||p[0]===`
|
|
70
|
+
`)g="";if(h+=g+p,f.inFlow){if(N&&K)K()}else if(b&&!N)h+=kf.lineComment(h,f.indent,O(b));else if(J&&$)$();return h}bG.stringifyPair=rG});var i3=l((NG)=>{var V1=a_("process");function MG(_,...q){if(_==="debug")console.log(...q)}function SG(_,q){if(_==="debug"||_==="warn")if(typeof V1.emitWarning==="function")V1.emitWarning(q);else console.warn(q)}NG.debug=MG;NG.warn=SG});var PK=l((nG)=>{var Zf=Oq(),M1=nq(),$K="<<",KK={identify:(_)=>_===$K||typeof _==="symbol"&&_.description===$K,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new M1.Scalar(Symbol($K)),{addToJSMap:S1}),stringify:()=>$K},lG=(_,q)=>(KK.identify(q)||Zf.isScalar(q)&&(!q.type||q.type===M1.Scalar.PLAIN)&&KK.identify(q.value))&&_?.doc.schema.tags.some((f)=>f.tag===KK.tag&&f.default);function S1(_,q,f){if(f=_&&Zf.isAlias(f)?f.resolve(_.doc):f,Zf.isSeq(f))for(let K of f.items)o3(_,q,K);else if(Array.isArray(f))for(let K of f)o3(_,q,K);else o3(_,q,f)}function o3(_,q,f){let K=_&&Zf.isAlias(f)?f.resolve(_.doc):f;if(!Zf.isMap(K))throw new Error("Merge sources must be maps or map aliases");let $=K.toJSON(null,_,Map);for(let[P,j]of $)if(q instanceof Map){if(!q.has(P))q.set(P,j)}else if(q instanceof Set)q.add(P);else if(!Object.prototype.hasOwnProperty.call(q,P))Object.defineProperty(q,P,{value:j,writable:!0,enumerable:!0,configurable:!0});return q}nG.addMergeToJSMap=S1;nG.isMergeKey=lG;nG.merge=KK});var L3=l((yG)=>{var dG=i3(),N1=PK(),aG=Jf(),C1=Oq(),c3=P8();function IG(_,q,{key:f,value:K}){if(C1.isNode(f)&&f.addToJSMap)f.addToJSMap(_,q,K);else if(N1.isMergeKey(_,f))N1.addMergeToJSMap(_,q,K);else{let $=c3.toJS(f,"",_);if(q instanceof Map)q.set($,c3.toJS(K,$,_));else if(q instanceof Set)q.add($);else{let P=DG(f,$,_),j=c3.toJS(K,P,_);if(P in q)Object.defineProperty(q,P,{value:j,writable:!0,enumerable:!0,configurable:!0});else q[P]=j}}return q}function DG(_,q,f){if(q===null)return"";if(typeof q!=="object")return String(q);if(C1.isNode(_)&&f?.doc){let K=aG.createStringifyContext(f.doc,{});K.anchors=new Set;for(let P of f.anchors.keys())K.anchors.add(P.anchor);K.inFlow=!0,K.inStringifyKey=!0;let $=_.toString(K);if(!f.mapKeyWarned){let P=JSON.stringify($);if(P.length>40)P=P.substring(0,36)+'..."';dG.warn(f.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${P}. Set mapAsMap: true to use object keys.`),f.mapKeyWarned=!0}return $}return JSON.stringify(q)}yG.addPairToJSMap=IG});var w8=l((tG)=>{var p1=zf(),oG=b1(),cG=L3(),jK=Oq();function LG(_,q,f){let K=p1.createNode(_,void 0,f),$=p1.createNode(q,void 0,f);return new vK(K,$)}class vK{constructor(_,q=null){Object.defineProperty(this,jK.NODE_TYPE,{value:jK.PAIR}),this.key=_,this.value=q}clone(_){let{key:q,value:f}=this;if(jK.isNode(q))q=q.clone(_);if(jK.isNode(f))f=f.clone(_);return new vK(q,f)}toJSON(_,q){let f=q?.mapAsMap?new Map:{};return cG.addPairToJSMap(q,f,this)}toString(_,q,f){return _?.doc?oG.stringifyPair(this,_,q,f):JSON.stringify(this)}}tG.Pair=vK;tG.createPair=LG});var t3=l((FG)=>{var E8=Oq(),l1=Jf(),wK=Wf();function sG(_,q,f){return(q.inFlow??_.flow?UG:BG)(_,q,f)}function BG({comment:_,items:q},f,{blockItemPrefix:K,flowChars:$,itemIndent:P,onChompKeep:j,onComment:v}){let{indent:w,options:{commentString:O}}=f,T=Object.assign({},f,{indent:P,type:null}),Y=!1,z=[];for(let k=0;k<q.length;++k){let J=q[k],h=null;if(E8.isNode(J)){if(!Y&&J.spaceBefore)z.push("");if(OK(f,z,J.commentBefore,Y),J.comment)h=J.comment}else if(E8.isPair(J)){let M=E8.isNode(J.key)?J.key:null;if(M){if(!Y&&M.spaceBefore)z.push("");OK(f,z,M.commentBefore,Y)}}Y=!1;let X=l1.stringify(J,T,()=>h=null,()=>Y=!0);if(h)X+=wK.lineComment(X,P,O(h));if(Y&&h)Y=!1;z.push(K+X)}let H;if(z.length===0)H=$.start+$.end;else{H=z[0];for(let k=1;k<z.length;++k){let J=z[k];H+=J?`
|
|
71
71
|
${w}${J}`:`
|
|
72
72
|
`}}if(_){if(H+=`
|
|
73
|
-
`+
|
|
74
|
-
`)))O=!0;Y.push(X),T=Y.length}let{start:z,end:H}=f;if(Y.length===0)return z+H;else{if(!O){let
|
|
73
|
+
`+wK.indentComment(O(_),w),v)v()}else if(Y&&j)j();return H}function UG({items:_},q,{flowChars:f,itemIndent:K}){let{indent:$,indentStep:P,flowCollectionPadding:j,options:{commentString:v}}=q;K+=P;let w=Object.assign({},q,{indent:K,inFlow:!0,type:null}),O=!1,T=0,Y=[];for(let k=0;k<_.length;++k){let J=_[k],h=null;if(E8.isNode(J)){if(J.spaceBefore)Y.push("");if(OK(q,Y,J.commentBefore,!1),J.comment)h=J.comment}else if(E8.isPair(J)){let M=E8.isNode(J.key)?J.key:null;if(M){if(M.spaceBefore)Y.push("");if(OK(q,Y,M.commentBefore,!1),M.comment)O=!0}let b=E8.isNode(J.value)?J.value:null;if(b){if(b.comment)h=b.comment;if(b.commentBefore)O=!0}else if(J.value==null&&M?.comment)h=M.comment}if(h)O=!0;let X=l1.stringify(J,w,()=>h=null);if(k<_.length-1)X+=",";if(h)X+=wK.lineComment(X,K,v(h));if(!O&&(Y.length>T||X.includes(`
|
|
74
|
+
`)))O=!0;Y.push(X),T=Y.length}let{start:z,end:H}=f;if(Y.length===0)return z+H;else{if(!O){let k=Y.reduce((J,h)=>J+h.length+2,2);O=q.options.lineWidth>0&&k>q.options.lineWidth}if(O){let k=z;for(let J of Y)k+=J?`
|
|
75
75
|
${P}${$}${J}`:`
|
|
76
|
-
`;return`${
|
|
77
|
-
${$}${H}`}else return`${z}${j}${Y.join(" ")}${j}${H}`}}function
|
|
78
|
-
`:" ")}return
|
|
76
|
+
`;return`${k}
|
|
77
|
+
${$}${H}`}else return`${z}${j}${Y.join(" ")}${j}${H}`}}function OK({indent:_,options:{commentString:q}},f,K,$){if(K&&$)K=K.replace(/^\n+/,"");if(K){let P=wK.indentComment(q(K),_);f.push(P.trimStart())}}FG.stringifyCollection=sG});var Y8=l((Km)=>{var qm=t3(),_m=L3(),fm=Q$(),O8=Oq(),YK=w8(),$m=nq();function Xf(_,q){let f=O8.isScalar(q)?q.value:q;for(let K of _)if(O8.isPair(K)){if(K.key===q||K.key===f)return K;if(O8.isScalar(K.key)&&K.key.value===f)return K}return}class n1 extends fm.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(_){super(O8.MAP,_);this.items=[]}static from(_,q,f){let{keepUndefined:K,replacer:$}=f,P=new this(_),j=(v,w)=>{if(typeof $==="function")w=$.call(q,v,w);else if(Array.isArray($)&&!$.includes(v))return;if(w!==void 0||K)P.items.push(YK.createPair(v,w,f))};if(q instanceof Map)for(let[v,w]of q)j(v,w);else if(q&&typeof q==="object")for(let v of Object.keys(q))j(v,q[v]);if(typeof _.sortMapEntries==="function")P.items.sort(_.sortMapEntries);return P}add(_,q){let f;if(O8.isPair(_))f=_;else if(!_||typeof _!=="object"||!("key"in _))f=new YK.Pair(_,_?.value);else f=new YK.Pair(_.key,_.value);let K=Xf(this.items,f.key),$=this.schema?.sortMapEntries;if(K){if(!q)throw new Error(`Key ${f.key} already set`);if(O8.isScalar(K.value)&&$m.isScalarValue(f.value))K.value.value=f.value;else K.value=f.value}else if($){let P=this.items.findIndex((j)=>$(f,j)<0);if(P===-1)this.items.push(f);else this.items.splice(P,0,f)}else this.items.push(f)}delete(_){let q=Xf(this.items,_);if(!q)return!1;return this.items.splice(this.items.indexOf(q),1).length>0}get(_,q){let K=Xf(this.items,_)?.value;return(!q&&O8.isScalar(K)?K.value:K)??void 0}has(_){return!!Xf(this.items,_)}set(_,q){this.add(new YK.Pair(_,q),!0)}toJSON(_,q,f){let K=f?new f:q?.mapAsMap?new Map:{};if(q?.onCreate)q.onCreate(K);for(let $ of this.items)_m.addPairToJSMap(q,K,$);return K}toString(_,q,f){if(!_)return JSON.stringify(this);for(let K of this.items)if(!O8.isPair(K))throw new Error(`Map items must all be pairs; found ${JSON.stringify(K)} instead`);if(!_.allNullValues&&this.hasAllNullValues(!1))_=Object.assign({},_,{allNullValues:!0});return qm.stringifyCollection(this,_,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:_.indent||"",onChompKeep:f,onComment:q})}}Km.YAMLMap=n1;Km.findPair=Xf});var m6=l((Om)=>{var vm=Oq(),R1=Y8(),wm={collection:"map",default:!0,nodeClass:R1.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(_,q){if(!vm.isMap(_))q("Expected a mapping for this tag");return _},createNode:(_,q,f)=>R1.YAMLMap.from(_,q,f)};Om.map=wm});var T8=l((Jm)=>{var Tm=zf(),zm=t3(),Wm=Q$(),zK=Oq(),Hm=nq(),hm=P8();class E1 extends Wm.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(_){super(zK.SEQ,_);this.items=[]}add(_){this.items.push(_)}delete(_){let q=TK(_);if(typeof q!=="number")return!1;return this.items.splice(q,1).length>0}get(_,q){let f=TK(_);if(typeof f!=="number")return;let K=this.items[f];return!q&&zK.isScalar(K)?K.value:K}has(_){let q=TK(_);return typeof q==="number"&&q<this.items.length}set(_,q){let f=TK(_);if(typeof f!=="number")throw new Error(`Expected a valid index, not ${_}.`);let K=this.items[f];if(zK.isScalar(K)&&Hm.isScalarValue(q))K.value=q;else this.items[f]=q}toJSON(_,q){let f=[];if(q?.onCreate)q.onCreate(f);let K=0;for(let $ of this.items)f.push(hm.toJS($,String(K++),q));return f}toString(_,q,f){if(!_)return JSON.stringify(this);return zm.stringifyCollection(this,_,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(_.indent||"")+" ",onChompKeep:f,onComment:q})}static from(_,q,f){let{replacer:K}=f,$=new this(_);if(q&&Symbol.iterator in Object(q)){let P=0;for(let j of q){if(typeof K==="function"){let v=q instanceof Set?j:String(P++);j=K.call(q,v,j)}$.items.push(Tm.createNode(j,void 0,f))}}return $}}function TK(_){let q=zK.isScalar(_)?_.value:_;if(q&&typeof q==="string")q=Number(q);return typeof q==="number"&&Number.isInteger(q)&&q>=0?q:null}Jm.YAMLSeq=E1});var r6=l((Am)=>{var Zm=Oq(),g1=T8(),Xm={collection:"seq",default:!0,nodeClass:g1.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(_,q){if(!Zm.isSeq(_))q("Expected a sequence for this tag");return _},createNode:(_,q,f)=>g1.YAMLSeq.from(_,q,f)};Am.seq=Xm});var Af=l((rm)=>{var Gm=hf(),mm={identify:(_)=>typeof _==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(_)=>_,stringify(_,q,f,K){return q=Object.assign({actualString:!0},q),Gm.stringifyString(_,q,f,K)}};rm.string=mm});var WK=l((Vm)=>{var d1=nq(),a1={identify:(_)=>_==null,createNode:()=>new d1.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new d1.Scalar(null),stringify:({source:_},q)=>typeof _==="string"&&a1.test.test(_)?_:q.options.nullStr};Vm.nullTag=a1});var e3=l((Nm)=>{var Sm=nq(),I1={identify:(_)=>typeof _==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(_)=>new Sm.Scalar(_[0]==="t"||_[0]==="T"),stringify({source:_,value:q},f){if(_&&I1.test.test(_)){let K=_[0]==="t"||_[0]==="T";if(q===K)return _}return q?f.options.trueStr:f.options.falseStr}};Nm.boolTag=I1});var b6=l((lm)=>{function pm({format:_,minFractionDigits:q,tag:f,value:K}){if(typeof K==="bigint")return String(K);let $=typeof K==="number"?K:Number(K);if(!isFinite($))return isNaN($)?".nan":$<0?"-.inf":".inf";let P=JSON.stringify(K);if(!_&&q&&(!f||f==="tag:yaml.org,2002:float")&&/^\d/.test(P)){let j=P.indexOf(".");if(j<0)j=P.length,P+=".";let v=q-(P.length-j-1);while(v-- >0)P+="0"}return P}lm.stringifyNumber=pm});var s3=l((am)=>{var Rm=nq(),x3=b6(),Em={identify:(_)=>typeof _==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(_)=>_.slice(-3).toLowerCase()==="nan"?NaN:_[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:x3.stringifyNumber},gm={identify:(_)=>typeof _==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(_)=>parseFloat(_),stringify(_){let q=Number(_.value);return isFinite(q)?q.toExponential():x3.stringifyNumber(_)}},dm={identify:(_)=>typeof _==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(_){let q=new Rm.Scalar(parseFloat(_)),f=_.indexOf(".");if(f!==-1&&_[_.length-1]==="0")q.minFractionDigits=_.length-f-1;return q},stringify:x3.stringifyNumber};am.float=dm;am.floatExp=gm;am.floatNaN=Em});var U3=l((Lm)=>{var D1=b6(),HK=(_)=>typeof _==="bigint"||Number.isInteger(_),B3=(_,q,f,{intAsBigInt:K})=>K?BigInt(_):parseInt(_.substring(q),f);function y1(_,q,f){let{value:K}=_;if(HK(K)&&K>=0)return f+K.toString(q);return D1.stringifyNumber(_)}var im={identify:(_)=>HK(_)&&_>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(_,q,f)=>B3(_,2,8,f),stringify:(_)=>y1(_,8,"0o")},om={identify:HK,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(_,q,f)=>B3(_,0,10,f),stringify:D1.stringifyNumber},cm={identify:(_)=>HK(_)&&_>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(_,q,f)=>B3(_,2,16,f),stringify:(_)=>y1(_,16,"0x")};Lm.int=om;Lm.intHex=cm;Lm.intOct=im});var i1=l((_r)=>{var sm=m6(),Bm=WK(),Um=r6(),Fm=Af(),Qm=e3(),F3=s3(),Q3=U3(),qr=[sm.map,Um.seq,Fm.string,Bm.nullTag,Qm.boolTag,Q3.intOct,Q3.int,Q3.intHex,F3.floatNaN,F3.floatExp,F3.float];_r.schema=qr});var c1=l((Or)=>{var $r=nq(),Kr=m6(),Pr=r6();function o1(_){return typeof _==="bigint"||Number.isInteger(_)}var hK=({value:_})=>JSON.stringify(_),jr=[{identify:(_)=>typeof _==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(_)=>_,stringify:hK},{identify:(_)=>_==null,createNode:()=>new $r.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:hK},{identify:(_)=>typeof _==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(_)=>_==="true",stringify:hK},{identify:o1,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(_,q,{intAsBigInt:f})=>f?BigInt(_):parseInt(_,10),stringify:({value:_})=>o1(_)?_.toString():JSON.stringify(_)},{identify:(_)=>typeof _==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(_)=>parseFloat(_),stringify:hK}],vr={default:!0,tag:"",test:/^/,resolve(_,q){return q(`Unresolved plain scalar ${JSON.stringify(_)}`),_}},wr=[Kr.map,Pr.seq].concat(jr,vr);Or.schema=wr});var _4=l((Wr)=>{var uf=a_("buffer"),q4=nq(),Tr=hf(),zr={identify:(_)=>_ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(_,q){if(typeof uf.Buffer==="function")return uf.Buffer.from(_,"base64");else if(typeof atob==="function"){let f=atob(_.replace(/[\n\r]/g,"")),K=new Uint8Array(f.length);for(let $=0;$<f.length;++$)K[$]=f.charCodeAt($);return K}else return q("This environment does not support reading binary tags; either Buffer or atob is required"),_},stringify({comment:_,type:q,value:f},K,$,P){if(!f)return"";let j=f,v;if(typeof uf.Buffer==="function")v=j instanceof uf.Buffer?j.toString("base64"):uf.Buffer.from(j.buffer).toString("base64");else if(typeof btoa==="function"){let w="";for(let O=0;O<j.length;++O)w+=String.fromCharCode(j[O]);v=btoa(w)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(q??(q=q4.Scalar.BLOCK_LITERAL),q!==q4.Scalar.QUOTE_DOUBLE){let w=Math.max(K.options.lineWidth-K.indent.length,K.options.minContentWidth),O=Math.ceil(v.length/w),T=new Array(O);for(let Y=0,z=0;Y<O;++Y,z+=w)T[Y]=v.substr(z,w);v=T.join(q===q4.Scalar.BLOCK_LITERAL?`
|
|
78
|
+
`:" ")}return Tr.stringifyString({comment:_,type:q,value:v},K,$,P)}};Wr.binary=zr});var kK=l((Zr)=>{var JK=Oq(),f4=w8(),hr=nq(),Jr=T8();function L1(_,q){if(JK.isSeq(_))for(let f=0;f<_.items.length;++f){let K=_.items[f];if(JK.isPair(K))continue;else if(JK.isMap(K)){if(K.items.length>1)q("Each pair must have its own sequence indicator");let $=K.items[0]||new f4.Pair(new hr.Scalar(null));if(K.commentBefore)$.key.commentBefore=$.key.commentBefore?`${K.commentBefore}
|
|
79
79
|
${$.key.commentBefore}`:K.commentBefore;if(K.comment){let P=$.value??$.key;P.comment=P.comment?`${K.comment}
|
|
80
|
-
${P.comment}`:K.comment}K=$}_.items[f]=HK.isPair(K)?K:new q4.Pair(K)}else q("Expected a sequence for this tag");return _}function c1(_,q,f){let{replacer:K}=f,$=new Hr.YAMLSeq(_);$.tag="tag:yaml.org,2002:pairs";let P=0;if(q&&Symbol.iterator in Object(q))for(let j of q){if(typeof K==="function")j=K.call(q,String(P++),j);let v,w;if(Array.isArray(j))if(j.length===2)v=j[0],w=j[1];else throw new TypeError(`Expected [key, value] tuple: ${j}`);else if(j&&j instanceof Object){let O=Object.keys(j);if(O.length===1)v=O[0],w=j[v];else throw new TypeError(`Expected tuple with one key, not ${O.length} keys`)}else v=j;$.items.push(q4.createPair(v,w,f))}return $}var hr={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:o1,createNode:c1};Jr.createPairs=c1;Jr.pairs=hr;Jr.resolvePairs=o1});var f4=p((Gr)=>{var L1=Oq(),_4=P8(),G6=Y8(),Ar=T8(),t1=hK();class E8 extends Ar.YAMLSeq{constructor(){super();this.add=G6.YAMLMap.prototype.add.bind(this),this.delete=G6.YAMLMap.prototype.delete.bind(this),this.get=G6.YAMLMap.prototype.get.bind(this),this.has=G6.YAMLMap.prototype.has.bind(this),this.set=G6.YAMLMap.prototype.set.bind(this),this.tag=E8.tag}toJSON(_,q){if(!q)return super.toJSON(_);let f=new Map;if(q?.onCreate)q.onCreate(f);for(let K of this.items){let $,P;if(L1.isPair(K))$=_4.toJS(K.key,"",q),P=_4.toJS(K.value,$,q);else $=_4.toJS(K,"",q);if(f.has($))throw new Error("Ordered maps must not include duplicate keys");f.set($,P)}return f}static from(_,q,f){let K=t1.createPairs(_,q,f),$=new this;return $.items=K.items,$}}E8.tag="tag:yaml.org,2002:omap";var ur={collection:"seq",identify:(_)=>_ instanceof Map,nodeClass:E8,default:!1,tag:"tag:yaml.org,2002:omap",resolve(_,q){let f=t1.resolvePairs(_,q),K=[];for(let{key:$}of f.items)if(L1.isScalar($))if(K.includes($.value))q(`Ordered maps must not include duplicate keys: ${$.value}`);else K.push($.value);return Object.assign(new E8,f)},createNode:(_,q,f)=>E8.from(_,q,f)};Gr.YAMLOMap=E8;Gr.omap=ur});var U1=p((br)=>{var e1=nq();function x1({value:_,source:q},f){if(q&&(_?s1:B1).test.test(q))return q;return _?f.options.trueStr:f.options.falseStr}var s1={identify:(_)=>_===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new e1.Scalar(!0),stringify:x1},B1={identify:(_)=>_===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new e1.Scalar(!1),stringify:x1};br.falseTag=B1;br.trueTag=s1});var F1=p((lr)=>{var Sr=nq(),$4=rf(),Nr={identify:(_)=>typeof _==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(_)=>_.slice(-3).toLowerCase()==="nan"?NaN:_[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:$4.stringifyNumber},Cr={identify:(_)=>typeof _==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(_)=>parseFloat(_.replace(/_/g,"")),stringify(_){let q=Number(_.value);return isFinite(q)?q.toExponential():$4.stringifyNumber(_)}},pr={identify:(_)=>typeof _==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(_){let q=new Sr.Scalar(parseFloat(_.replace(/_/g,""))),f=_.indexOf(".");if(f!==-1){let K=_.substring(f+1).replace(/_/g,"");if(K[K.length-1]==="0")q.minFractionDigits=K.length}return q},stringify:$4.stringifyNumber};lr.float=pr;lr.floatExp=Cr;lr.floatNaN=Nr});var q2=p((Dr)=>{var Q1=rf(),m6=(_)=>typeof _==="bigint"||Number.isInteger(_);function JK(_,q,f,{intAsBigInt:K}){let $=_[0];if($==="-"||$==="+")q+=1;if(_=_.substring(q).replace(/_/g,""),K){switch(f){case 2:_=`0b${_}`;break;case 8:_=`0o${_}`;break;case 16:_=`0x${_}`;break}let j=BigInt(_);return $==="-"?BigInt(-1)*j:j}let P=parseInt(_,f);return $==="-"?-1*P:P}function K4(_,q,f){let{value:K}=_;if(m6(K)){let $=K.toString(q);return K<0?"-"+f+$.substr(1):f+$}return Q1.stringifyNumber(_)}var gr={identify:m6,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(_,q,f)=>JK(_,2,2,f),stringify:(_)=>K4(_,2,"0b")},dr={identify:m6,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(_,q,f)=>JK(_,1,8,f),stringify:(_)=>K4(_,8,"0")},ar={identify:m6,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(_,q,f)=>JK(_,0,10,f),stringify:Q1.stringifyNumber},Ir={identify:m6,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(_,q,f)=>JK(_,2,16,f),stringify:(_)=>K4(_,16,"0x")};Dr.int=ar;Dr.intBin=gr;Dr.intHex=Ir;Dr.intOct=dr});var P4=p((tr)=>{var XK=Oq(),kK=w8(),ZK=Y8();class g8 extends ZK.YAMLMap{constructor(_){super(_);this.tag=g8.tag}add(_){let q;if(XK.isPair(_))q=_;else if(_&&typeof _==="object"&&"key"in _&&"value"in _&&_.value===null)q=new kK.Pair(_.key,null);else q=new kK.Pair(_,null);if(!ZK.findPair(this.items,q.key))this.items.push(q)}get(_,q){let f=ZK.findPair(this.items,_);return!q&&XK.isPair(f)?XK.isScalar(f.key)?f.key.value:f.key:f}set(_,q){if(typeof q!=="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof q}`);let f=ZK.findPair(this.items,_);if(f&&!q)this.items.splice(this.items.indexOf(f),1);else if(!f&&q)this.items.push(new kK.Pair(_))}toJSON(_,q){return super.toJSON(_,q,Set)}toString(_,q,f){if(!_)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},_,{allNullValues:!0}),q,f);else throw new Error("Set items must all have null values")}static from(_,q,f){let{replacer:K}=f,$=new this(_);if(q&&Symbol.iterator in Object(q))for(let P of q){if(typeof K==="function")P=K.call(q,P,P);$.items.push(kK.createPair(P,null,f))}return $}}g8.tag="tag:yaml.org,2002:set";var Lr={collection:"map",identify:(_)=>_ instanceof Set,nodeClass:g8,default:!1,tag:"tag:yaml.org,2002:set",createNode:(_,q,f)=>g8.from(_,q,f),resolve(_,q){if(XK.isMap(_))if(_.hasAllNullValues(!0))return Object.assign(new g8,_);else q("Set items must all have null values");else q("Expected a mapping for this tag");return _}};tr.YAMLSet=g8;tr.set=Lr});var v4=p((Fr)=>{var sr=rf();function j4(_,q){let f=_[0],K=f==="-"||f==="+"?_.substring(1):_,$=(j)=>q?BigInt(j):Number(j),P=K.replace(/_/g,"").split(":").reduce((j,v)=>j*$(60)+$(v),$(0));return f==="-"?$(-1)*P:P}function _2(_){let{value:q}=_,f=(j)=>j;if(typeof q==="bigint")f=(j)=>BigInt(j);else if(isNaN(q)||!isFinite(q))return sr.stringifyNumber(_);let K="";if(q<0)K="-",q*=f(-1);let $=f(60),P=[q%$];if(q<60)P.unshift(0);else if(q=(q-P[0])/$,P.unshift(q%$),q>=60)q=(q-P[0])/$,P.unshift(q);return K+P.map((j)=>String(j).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Br={identify:(_)=>typeof _==="bigint"||Number.isInteger(_),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(_,q,{intAsBigInt:f})=>j4(_,f),stringify:_2},Ur={identify:(_)=>typeof _==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(_)=>j4(_,!1),stringify:_2},f2={identify:(_)=>_ instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(_){let q=_.match(f2.test);if(!q)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,f,K,$,P,j,v]=q.map(Number),w=q[7]?Number((q[7]+"00").substr(1,3)):0,O=Date.UTC(f,K-1,$,P||0,j||0,v||0,w),T=q[8];if(T&&T!=="Z"){let Y=j4(T,!1);if(Math.abs(Y)<30)Y*=60;O-=60000*Y}return new Date(O)},stringify:({value:_})=>_?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Fr.floatTime=Ur;Fr.intTime=Br;Fr.timestamp=f2});var K2=p((zb)=>{var fb=Gf(),$b=TK(),Kb=mf(),Pb=A6(),jb=Q3(),$2=U1(),w4=F1(),AK=q2(),vb=$K(),wb=f4(),Ob=hK(),Yb=P4(),O4=v4(),Tb=[fb.map,Kb.seq,Pb.string,$b.nullTag,$2.trueTag,$2.falseTag,AK.intBin,AK.intOct,AK.int,AK.intHex,w4.floatNaN,w4.floatExp,w4.float,jb.binary,vb.merge,wb.omap,Ob.pairs,Yb.set,O4.intTime,O4.floatTime,O4.timestamp];zb.schema=Tb});var H2=p((ub)=>{var w2=Gf(),Hb=TK(),O2=mf(),hb=A6(),Jb=L3(),Y4=e3(),T4=s3(),kb=D1(),Zb=i1(),Y2=Q3(),r6=$K(),T2=f4(),z2=hK(),P2=K2(),W2=P4(),uK=v4(),j2=new Map([["core",kb.schema],["failsafe",[w2.map,O2.seq,hb.string]],["json",Zb.schema],["yaml11",P2.schema],["yaml-1.1",P2.schema]]),v2={binary:Y2.binary,bool:Jb.boolTag,float:Y4.float,floatExp:Y4.floatExp,floatNaN:Y4.floatNaN,floatTime:uK.floatTime,int:T4.int,intHex:T4.intHex,intOct:T4.intOct,intTime:uK.intTime,map:w2.map,merge:r6.merge,null:Hb.nullTag,omap:T2.omap,pairs:z2.pairs,seq:O2.seq,set:W2.set,timestamp:uK.timestamp},Xb={"tag:yaml.org,2002:binary":Y2.binary,"tag:yaml.org,2002:merge":r6.merge,"tag:yaml.org,2002:omap":T2.omap,"tag:yaml.org,2002:pairs":z2.pairs,"tag:yaml.org,2002:set":W2.set,"tag:yaml.org,2002:timestamp":uK.timestamp};function Ab(_,q,f){let K=j2.get(q);if(K&&!_)return f&&!K.includes(r6.merge)?K.concat(r6.merge):K.slice();let $=K;if(!$)if(Array.isArray(_))$=[];else{let P=Array.from(j2.keys()).filter((j)=>j!=="yaml11").map((j)=>JSON.stringify(j)).join(", ");throw new Error(`Unknown schema "${q}"; use one of ${P} or define customTags array`)}if(Array.isArray(_))for(let P of _)$=$.concat(P);else if(typeof _==="function")$=_($.slice());if(f)$=$.concat(r6.merge);return $.reduce((P,j)=>{let v=typeof j==="string"?v2[j]:j;if(!v){let w=JSON.stringify(j),O=Object.keys(v2).map((T)=>JSON.stringify(T)).join(", ");throw new Error(`Unknown custom tag ${w}; use one of ${O}`)}if(!P.includes(v))P.push(v);return P},[])}ub.coreKnownTags=Xb;ub.getTags=Ab});var H4=p((Sb)=>{var z4=Oq(),rb=Gf(),bb=mf(),Vb=A6(),GK=H2(),Mb=(_,q)=>_.key<q.key?-1:_.key>q.key?1:0;class W4{constructor({compat:_,customTags:q,merge:f,resolveKnownTags:K,schema:$,sortMapEntries:P,toStringDefaults:j}){this.compat=Array.isArray(_)?GK.getTags(_,"compat"):_?GK.getTags(null,_):null,this.name=typeof $==="string"&&$||"core",this.knownTags=K?GK.coreKnownTags:{},this.tags=GK.getTags(q,this.name,f),this.toStringOptions=j??null,Object.defineProperty(this,z4.MAP,{value:rb.map}),Object.defineProperty(this,z4.SCALAR,{value:Vb.string}),Object.defineProperty(this,z4.SEQ,{value:bb.seq}),this.sortMapEntries=typeof P==="function"?P:P===!0?Mb:null}clone(){let _=Object.create(W4.prototype,Object.getOwnPropertyDescriptors(this));return _.tags=this.tags.slice(),_}}Sb.Schema=W4});var h2=p((lb)=>{var Cb=Oq(),h4=J6(),b6=W6();function pb(_,q){let f=[],K=q.directives===!0;if(q.directives!==!1&&_.directives){let w=_.directives.toString(_);if(w)f.push(w),K=!0;else if(_.directives.docStart)K=!0}if(K)f.push("---");let $=h4.createStringifyContext(_,q),{commentString:P}=$.options;if(_.commentBefore){if(f.length!==1)f.unshift("");let w=P(_.commentBefore);f.unshift(b6.indentComment(w,""))}let j=!1,v=null;if(_.contents){if(Cb.isNode(_.contents)){if(_.contents.spaceBefore&&K)f.push("");if(_.contents.commentBefore){let T=P(_.contents.commentBefore);f.push(b6.indentComment(T,""))}$.forceBlockIndent=!!_.comment,v=_.contents.comment}let w=v?void 0:()=>j=!0,O=h4.stringify(_.contents,$,()=>v=null,w);if(v)O+=b6.lineComment(O,"",P(v));if((O[0]==="|"||O[0]===">")&&f[f.length-1]==="---")f[f.length-1]=`--- ${O}`;else f.push(O)}else f.push(h4.stringify(_.contents,$));if(_.directives?.docEnd)if(_.comment){let w=P(_.comment);if(w.includes(`
|
|
81
|
-
`))f.push("..."),f.push(
|
|
80
|
+
${P.comment}`:K.comment}K=$}_.items[f]=JK.isPair(K)?K:new f4.Pair(K)}else q("Expected a sequence for this tag");return _}function t1(_,q,f){let{replacer:K}=f,$=new Jr.YAMLSeq(_);$.tag="tag:yaml.org,2002:pairs";let P=0;if(q&&Symbol.iterator in Object(q))for(let j of q){if(typeof K==="function")j=K.call(q,String(P++),j);let v,w;if(Array.isArray(j))if(j.length===2)v=j[0],w=j[1];else throw new TypeError(`Expected [key, value] tuple: ${j}`);else if(j&&j instanceof Object){let O=Object.keys(j);if(O.length===1)v=O[0],w=j[v];else throw new TypeError(`Expected tuple with one key, not ${O.length} keys`)}else v=j;$.items.push(f4.createPair(v,w,f))}return $}var kr={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:L1,createNode:t1};Zr.createPairs=t1;Zr.pairs=kr;Zr.resolvePairs=L1});var K4=l((rr)=>{var e1=Oq(),$4=P8(),Gf=Y8(),Gr=T8(),x1=kK();class g8 extends Gr.YAMLSeq{constructor(){super();this.add=Gf.YAMLMap.prototype.add.bind(this),this.delete=Gf.YAMLMap.prototype.delete.bind(this),this.get=Gf.YAMLMap.prototype.get.bind(this),this.has=Gf.YAMLMap.prototype.has.bind(this),this.set=Gf.YAMLMap.prototype.set.bind(this),this.tag=g8.tag}toJSON(_,q){if(!q)return super.toJSON(_);let f=new Map;if(q?.onCreate)q.onCreate(f);for(let K of this.items){let $,P;if(e1.isPair(K))$=$4.toJS(K.key,"",q),P=$4.toJS(K.value,$,q);else $=$4.toJS(K,"",q);if(f.has($))throw new Error("Ordered maps must not include duplicate keys");f.set($,P)}return f}static from(_,q,f){let K=x1.createPairs(_,q,f),$=new this;return $.items=K.items,$}}g8.tag="tag:yaml.org,2002:omap";var mr={collection:"seq",identify:(_)=>_ instanceof Map,nodeClass:g8,default:!1,tag:"tag:yaml.org,2002:omap",resolve(_,q){let f=x1.resolvePairs(_,q),K=[];for(let{key:$}of f.items)if(e1.isScalar($))if(K.includes($.value))q(`Ordered maps must not include duplicate keys: ${$.value}`);else K.push($.value);return Object.assign(new g8,f)},createNode:(_,q,f)=>g8.from(_,q,f)};rr.YAMLOMap=g8;rr.omap=mr});var Q1=l((Mr)=>{var s1=nq();function B1({value:_,source:q},f){if(q&&(_?U1:F1).test.test(q))return q;return _?f.options.trueStr:f.options.falseStr}var U1={identify:(_)=>_===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new s1.Scalar(!0),stringify:B1},F1={identify:(_)=>_===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new s1.Scalar(!1),stringify:B1};Mr.falseTag=F1;Mr.trueTag=U1});var q2=l((Rr)=>{var Cr=nq(),P4=b6(),pr={identify:(_)=>typeof _==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:(_)=>_.slice(-3).toLowerCase()==="nan"?NaN:_[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:P4.stringifyNumber},lr={identify:(_)=>typeof _==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(_)=>parseFloat(_.replace(/_/g,"")),stringify(_){let q=Number(_.value);return isFinite(q)?q.toExponential():P4.stringifyNumber(_)}},nr={identify:(_)=>typeof _==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(_){let q=new Cr.Scalar(parseFloat(_.replace(/_/g,""))),f=_.indexOf(".");if(f!==-1){let K=_.substring(f+1).replace(/_/g,"");if(K[K.length-1]==="0")q.minFractionDigits=K.length}return q},stringify:P4.stringifyNumber};Rr.float=nr;Rr.floatExp=lr;Rr.floatNaN=pr});var f2=l((ir)=>{var _2=b6(),mf=(_)=>typeof _==="bigint"||Number.isInteger(_);function ZK(_,q,f,{intAsBigInt:K}){let $=_[0];if($==="-"||$==="+")q+=1;if(_=_.substring(q).replace(/_/g,""),K){switch(f){case 2:_=`0b${_}`;break;case 8:_=`0o${_}`;break;case 16:_=`0x${_}`;break}let j=BigInt(_);return $==="-"?BigInt(-1)*j:j}let P=parseInt(_,f);return $==="-"?-1*P:P}function j4(_,q,f){let{value:K}=_;if(mf(K)){let $=K.toString(q);return K<0?"-"+f+$.substr(1):f+$}return _2.stringifyNumber(_)}var ar={identify:mf,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(_,q,f)=>ZK(_,2,2,f),stringify:(_)=>j4(_,2,"0b")},Ir={identify:mf,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(_,q,f)=>ZK(_,1,8,f),stringify:(_)=>j4(_,8,"0")},Dr={identify:mf,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(_,q,f)=>ZK(_,0,10,f),stringify:_2.stringifyNumber},yr={identify:mf,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(_,q,f)=>ZK(_,2,16,f),stringify:(_)=>j4(_,16,"0x")};ir.int=Dr;ir.intBin=ar;ir.intHex=yr;ir.intOct=Ir});var v4=l((xr)=>{var uK=Oq(),XK=w8(),AK=Y8();class d8 extends AK.YAMLMap{constructor(_){super(_);this.tag=d8.tag}add(_){let q;if(uK.isPair(_))q=_;else if(_&&typeof _==="object"&&"key"in _&&"value"in _&&_.value===null)q=new XK.Pair(_.key,null);else q=new XK.Pair(_,null);if(!AK.findPair(this.items,q.key))this.items.push(q)}get(_,q){let f=AK.findPair(this.items,_);return!q&&uK.isPair(f)?uK.isScalar(f.key)?f.key.value:f.key:f}set(_,q){if(typeof q!=="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof q}`);let f=AK.findPair(this.items,_);if(f&&!q)this.items.splice(this.items.indexOf(f),1);else if(!f&&q)this.items.push(new XK.Pair(_))}toJSON(_,q){return super.toJSON(_,q,Set)}toString(_,q,f){if(!_)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},_,{allNullValues:!0}),q,f);else throw new Error("Set items must all have null values")}static from(_,q,f){let{replacer:K}=f,$=new this(_);if(q&&Symbol.iterator in Object(q))for(let P of q){if(typeof K==="function")P=K.call(q,P,P);$.items.push(XK.createPair(P,null,f))}return $}}d8.tag="tag:yaml.org,2002:set";var er={collection:"map",identify:(_)=>_ instanceof Set,nodeClass:d8,default:!1,tag:"tag:yaml.org,2002:set",createNode:(_,q,f)=>d8.from(_,q,f),resolve(_,q){if(uK.isMap(_))if(_.hasAllNullValues(!0))return Object.assign(new d8,_);else q("Set items must all have null values");else q("Expected a mapping for this tag");return _}};xr.YAMLSet=d8;xr.set=er});var O4=l((qb)=>{var Ur=b6();function w4(_,q){let f=_[0],K=f==="-"||f==="+"?_.substring(1):_,$=(j)=>q?BigInt(j):Number(j),P=K.replace(/_/g,"").split(":").reduce((j,v)=>j*$(60)+$(v),$(0));return f==="-"?$(-1)*P:P}function $2(_){let{value:q}=_,f=(j)=>j;if(typeof q==="bigint")f=(j)=>BigInt(j);else if(isNaN(q)||!isFinite(q))return Ur.stringifyNumber(_);let K="";if(q<0)K="-",q*=f(-1);let $=f(60),P=[q%$];if(q<60)P.unshift(0);else if(q=(q-P[0])/$,P.unshift(q%$),q>=60)q=(q-P[0])/$,P.unshift(q);return K+P.map((j)=>String(j).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Fr={identify:(_)=>typeof _==="bigint"||Number.isInteger(_),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(_,q,{intAsBigInt:f})=>w4(_,f),stringify:$2},Qr={identify:(_)=>typeof _==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:(_)=>w4(_,!1),stringify:$2},K2={identify:(_)=>_ instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(_){let q=_.match(K2.test);if(!q)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,f,K,$,P,j,v]=q.map(Number),w=q[7]?Number((q[7]+"00").substr(1,3)):0,O=Date.UTC(f,K-1,$,P||0,j||0,v||0,w),T=q[8];if(T&&T!=="Z"){let Y=w4(T,!1);if(Math.abs(Y)<30)Y*=60;O-=60000*Y}return new Date(O)},stringify:({value:_})=>_?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};qb.floatTime=Qr;qb.intTime=Fr;qb.timestamp=K2});var j2=l((Hb)=>{var Kb=m6(),Pb=WK(),jb=r6(),vb=Af(),wb=_4(),P2=Q1(),Y4=q2(),GK=f2(),Ob=PK(),Yb=K4(),Tb=kK(),zb=v4(),T4=O4(),Wb=[Kb.map,jb.seq,vb.string,Pb.nullTag,P2.trueTag,P2.falseTag,GK.intBin,GK.intOct,GK.int,GK.intHex,Y4.floatNaN,Y4.floatExp,Y4.float,wb.binary,Ob.merge,Yb.omap,Tb.pairs,zb.set,T4.intTime,T4.floatTime,T4.timestamp];Hb.schema=Wb});var J2=l((mb)=>{var Y2=m6(),Jb=WK(),T2=r6(),kb=Af(),Zb=e3(),z4=s3(),W4=U3(),Xb=i1(),Ab=c1(),z2=_4(),rf=PK(),W2=K4(),H2=kK(),v2=j2(),h2=v4(),mK=O4(),w2=new Map([["core",Xb.schema],["failsafe",[Y2.map,T2.seq,kb.string]],["json",Ab.schema],["yaml11",v2.schema],["yaml-1.1",v2.schema]]),O2={binary:z2.binary,bool:Zb.boolTag,float:z4.float,floatExp:z4.floatExp,floatNaN:z4.floatNaN,floatTime:mK.floatTime,int:W4.int,intHex:W4.intHex,intOct:W4.intOct,intTime:mK.intTime,map:Y2.map,merge:rf.merge,null:Jb.nullTag,omap:W2.omap,pairs:H2.pairs,seq:T2.seq,set:h2.set,timestamp:mK.timestamp},ub={"tag:yaml.org,2002:binary":z2.binary,"tag:yaml.org,2002:merge":rf.merge,"tag:yaml.org,2002:omap":W2.omap,"tag:yaml.org,2002:pairs":H2.pairs,"tag:yaml.org,2002:set":h2.set,"tag:yaml.org,2002:timestamp":mK.timestamp};function Gb(_,q,f){let K=w2.get(q);if(K&&!_)return f&&!K.includes(rf.merge)?K.concat(rf.merge):K.slice();let $=K;if(!$)if(Array.isArray(_))$=[];else{let P=Array.from(w2.keys()).filter((j)=>j!=="yaml11").map((j)=>JSON.stringify(j)).join(", ");throw new Error(`Unknown schema "${q}"; use one of ${P} or define customTags array`)}if(Array.isArray(_))for(let P of _)$=$.concat(P);else if(typeof _==="function")$=_($.slice());if(f)$=$.concat(rf.merge);return $.reduce((P,j)=>{let v=typeof j==="string"?O2[j]:j;if(!v){let w=JSON.stringify(j),O=Object.keys(O2).map((T)=>JSON.stringify(T)).join(", ");throw new Error(`Unknown custom tag ${w}; use one of ${O}`)}if(!P.includes(v))P.push(v);return P},[])}mb.coreKnownTags=ub;mb.getTags=Gb});var J4=l((Cb)=>{var H4=Oq(),Vb=m6(),Mb=r6(),Sb=Af(),rK=J2(),Nb=(_,q)=>_.key<q.key?-1:_.key>q.key?1:0;class h4{constructor({compat:_,customTags:q,merge:f,resolveKnownTags:K,schema:$,sortMapEntries:P,toStringDefaults:j}){this.compat=Array.isArray(_)?rK.getTags(_,"compat"):_?rK.getTags(null,_):null,this.name=typeof $==="string"&&$||"core",this.knownTags=K?rK.coreKnownTags:{},this.tags=rK.getTags(q,this.name,f),this.toStringOptions=j??null,Object.defineProperty(this,H4.MAP,{value:Vb.map}),Object.defineProperty(this,H4.SCALAR,{value:Sb.string}),Object.defineProperty(this,H4.SEQ,{value:Mb.seq}),this.sortMapEntries=typeof P==="function"?P:P===!0?Nb:null}clone(){let _=Object.create(h4.prototype,Object.getOwnPropertyDescriptors(this));return _.tags=this.tags.slice(),_}}Cb.Schema=h4});var k2=l((Rb)=>{var lb=Oq(),k4=Jf(),bf=Wf();function nb(_,q){let f=[],K=q.directives===!0;if(q.directives!==!1&&_.directives){let w=_.directives.toString(_);if(w)f.push(w),K=!0;else if(_.directives.docStart)K=!0}if(K)f.push("---");let $=k4.createStringifyContext(_,q),{commentString:P}=$.options;if(_.commentBefore){if(f.length!==1)f.unshift("");let w=P(_.commentBefore);f.unshift(bf.indentComment(w,""))}let j=!1,v=null;if(_.contents){if(lb.isNode(_.contents)){if(_.contents.spaceBefore&&K)f.push("");if(_.contents.commentBefore){let T=P(_.contents.commentBefore);f.push(bf.indentComment(T,""))}$.forceBlockIndent=!!_.comment,v=_.contents.comment}let w=v?void 0:()=>j=!0,O=k4.stringify(_.contents,$,()=>v=null,w);if(v)O+=bf.lineComment(O,"",P(v));if((O[0]==="|"||O[0]===">")&&f[f.length-1]==="---")f[f.length-1]=`--- ${O}`;else f.push(O)}else f.push(k4.stringify(_.contents,$));if(_.directives?.docEnd)if(_.comment){let w=P(_.comment);if(w.includes(`
|
|
81
|
+
`))f.push("..."),f.push(bf.indentComment(w,""));else f.push(`... ${w}`)}else f.push("...");else{let w=_.comment;if(w&&j)w=w.replace(/^\n+/,"");if(w){if((!j||v)&&f[f.length-1]!=="")f.push("");f.push(bf.indentComment(P(w),""))}}return f.join(`
|
|
82
82
|
`)+`
|
|
83
|
-
`}
|
|
83
|
+
`}Rb.stringifyDocument=nb});var Vf=l((ob)=>{var gb=Tf(),V6=Q$(),O_=Oq(),db=w8(),ab=P8(),Ib=J4(),Db=k2(),Z4=B$(),yb=d3(),ib=zf(),X4=g3();class A4{constructor(_,q,f){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,O_.NODE_TYPE,{value:O_.DOC});let K=null;if(typeof q==="function"||Array.isArray(q))K=q;else if(f===void 0&&q)f=q,q=void 0;let $=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},f);this.options=$;let{version:P}=$;if(f?._directives){if(this.directives=f._directives.atDocument(),this.directives.yaml.explicit)P=this.directives.yaml.version}else this.directives=new X4.Directives({version:P});this.setSchema(P,f),this.contents=_===void 0?null:this.createNode(_,K,f)}clone(){let _=Object.create(A4.prototype,{[O_.NODE_TYPE]:{value:O_.DOC}});if(_.commentBefore=this.commentBefore,_.comment=this.comment,_.errors=this.errors.slice(),_.warnings=this.warnings.slice(),_.options=Object.assign({},this.options),this.directives)_.directives=this.directives.clone();if(_.schema=this.schema.clone(),_.contents=O_.isNode(this.contents)?this.contents.clone(_.schema):this.contents,this.range)_.range=this.range.slice();return _}add(_){if(M6(this.contents))this.contents.add(_)}addIn(_,q){if(M6(this.contents))this.contents.addIn(_,q)}createAlias(_,q){if(!_.anchor){let f=Z4.anchorNames(this);_.anchor=!q||f.has(q)?Z4.findNewAnchor(q||"a",f):q}return new gb.Alias(_.anchor)}createNode(_,q,f){let K=void 0;if(typeof q==="function")_=q.call({"":_},"",_),K=q;else if(Array.isArray(q)){let J=(X)=>typeof X==="number"||X instanceof String||X instanceof Number,h=q.filter(J).map(String);if(h.length>0)q=q.concat(h);K=q}else if(f===void 0&&q)f=q,q=void 0;let{aliasDuplicateObjects:$,anchorPrefix:P,flow:j,keepUndefined:v,onTagObj:w,tag:O}=f??{},{onAnchor:T,setAnchors:Y,sourceObjects:z}=Z4.createNodeAnchors(this,P||"a"),H={aliasDuplicateObjects:$??!0,keepUndefined:v??!1,onAnchor:T,onTagObj:w,replacer:K,schema:this.schema,sourceObjects:z},k=ib.createNode(_,O,H);if(j&&O_.isCollection(k))k.flow=!0;return Y(),k}createPair(_,q,f={}){let K=this.createNode(_,null,f),$=this.createNode(q,null,f);return new db.Pair(K,$)}delete(_){return M6(this.contents)?this.contents.delete(_):!1}deleteIn(_){if(V6.isEmptyPath(_)){if(this.contents==null)return!1;return this.contents=null,!0}return M6(this.contents)?this.contents.deleteIn(_):!1}get(_,q){return O_.isCollection(this.contents)?this.contents.get(_,q):void 0}getIn(_,q){if(V6.isEmptyPath(_))return!q&&O_.isScalar(this.contents)?this.contents.value:this.contents;return O_.isCollection(this.contents)?this.contents.getIn(_,q):void 0}has(_){return O_.isCollection(this.contents)?this.contents.has(_):!1}hasIn(_){if(V6.isEmptyPath(_))return this.contents!==void 0;return O_.isCollection(this.contents)?this.contents.hasIn(_):!1}set(_,q){if(this.contents==null)this.contents=V6.collectionFromPath(this.schema,[_],q);else if(M6(this.contents))this.contents.set(_,q)}setIn(_,q){if(V6.isEmptyPath(_))this.contents=q;else if(this.contents==null)this.contents=V6.collectionFromPath(this.schema,Array.from(_),q);else if(M6(this.contents))this.contents.setIn(_,q)}setSchema(_,q={}){if(typeof _==="number")_=String(_);let f;switch(_){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new X4.Directives({version:"1.1"});f={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=_;else this.directives=new X4.Directives({version:_});f={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;f=null;break;default:{let K=JSON.stringify(_);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${K}`)}}if(q.schema instanceof Object)this.schema=q.schema;else if(f)this.schema=new Ib.Schema(Object.assign(f,q));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:_,jsonArg:q,mapAsMap:f,maxAliasCount:K,onAnchor:$,reviver:P}={}){let j={anchors:new Map,doc:this,keep:!_,mapAsMap:f===!0,mapKeyWarned:!1,maxAliasCount:typeof K==="number"?K:100},v=ab.toJS(this.contents,q??"",j);if(typeof $==="function")for(let{count:w,res:O}of j.anchors.values())$(O,w);return typeof P==="function"?yb.applyReviver(P,{"":v},"",v):v}toJSON(_,q){return this.toJS({json:!0,jsonArg:_,mapAsMap:!1,onAnchor:q})}toString(_={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in _&&(!Number.isInteger(_.indent)||Number(_.indent)<=0)){let q=JSON.stringify(_.indent);throw new Error(`"indent" option must be a positive integer, not ${q}`)}return Db.stringifyDocument(this,_)}}function M6(_){if(O_.isCollection(_))return!0;throw new Error("Expected a YAML collection as document contents")}ob.Document=A4});var Mf=l((tb)=>{class bK extends Error{constructor(_,q,f,K){super();this.name=_,this.code=f,this.message=K,this.pos=q}}class Z2 extends bK{constructor(_,q,f){super("YAMLParseError",_,q,f)}}class X2 extends bK{constructor(_,q,f){super("YAMLWarning",_,q,f)}}var Lb=(_,q)=>(f)=>{if(f.pos[0]===-1)return;f.linePos=f.pos.map((v)=>q.linePos(v));let{line:K,col:$}=f.linePos[0];f.message+=` at line ${K}, column ${$}`;let P=$-1,j=_.substring(q.lineStarts[K-1],q.lineStarts[K]).replace(/[\n\r]+$/,"");if(P>=60&&j.length>80){let v=Math.min(P-39,j.length-79);j="\u2026"+j.substring(v),P-=v-1}if(j.length>80)j=j.substring(0,79)+"\u2026";if(K>1&&/^ *$/.test(j.substring(0,P))){let v=_.substring(q.lineStarts[K-2],q.lineStarts[K-1]);if(v.length>80)v=v.substring(0,79)+`\u2026
|
|
84
84
|
`;j=v+j}if(/[^ ]/.test(j)){let v=1,w=f.linePos[1];if(w&&w.line===K&&w.col>$)v=Math.max(1,Math.min(w.col-$,80-P));let O=" ".repeat(P)+"^".repeat(v);f.message+=`:
|
|
85
85
|
|
|
86
86
|
${j}
|
|
87
87
|
${O}
|
|
88
|
-
`}};
|
|
89
|
-
`))return!0;if(_.end){for(let q of _.end)if(q.type==="newline")return!0}return!1;case"flow-collection":for(let q of _.items){for(let f of q.start)if(f.type==="newline")return!0;if(q.sep){for(let f of q.sep)if(f.type==="newline")return!0}if(
|
|
90
|
-
`+J.comment;else v.comment=J.comment;continue}if(J.newlineAfterProp||
|
|
91
|
-
`+
|
|
92
|
-
`+g.comment;else O.comment=g.comment;Y=g.end;continue}if(!j&&f.options.strict&&
|
|
93
|
-
`+
|
|
94
|
-
`+C.comment;else
|
|
95
|
-
`+
|
|
96
|
-
`.repeat(Math.max(1,j.length-1)):"",
|
|
97
|
-
`;for(let J=T;J<v;++J){let[
|
|
98
|
-
`;else if(
|
|
88
|
+
`}};tb.YAMLError=bK;tb.YAMLParseError=Z2;tb.YAMLWarning=X2;tb.prettifyError=Lb});var Sf=l((Fb)=>{function Ub(_,{flow:q,indicator:f,next:K,offset:$,onError:P,parentIndent:j,startOnNewline:v}){let w=!1,O=v,T=v,Y="",z="",H=!1,k=!1,J=null,h=null,X=null,M=null,b=null,N=null,p=null;for(let u of _){if(k){if(u.type!=="space"&&u.type!=="newline"&&u.type!=="comma")P(u.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");k=!1}if(J){if(O&&u.type!=="comment"&&u.type!=="newline")P(J,"TAB_AS_INDENT","Tabs are not allowed as indentation");J=null}switch(u.type){case"space":if(!q&&(f!=="doc-start"||K?.type!=="flow-collection")&&u.source.includes("\t"))J=u;T=!0;break;case"comment":{if(!T)P(u,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let C=u.source.substring(1)||" ";if(!Y)Y=C;else Y+=z+C;z="",O=!1;break}case"newline":if(O){if(Y)Y+=u.source;else if(!N||f!=="seq-item-ind")w=!0}else z+=u.source;if(O=!0,H=!0,h||X)M=u;T=!0;break;case"anchor":if(h)P(u,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(u.source.endsWith(":"))P(u.offset+u.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);h=u,p??(p=u.offset),O=!1,T=!1,k=!0;break;case"tag":{if(X)P(u,"MULTIPLE_TAGS","A node can have at most one tag");X=u,p??(p=u.offset),O=!1,T=!1,k=!0;break}case f:if(h||X)P(u,"BAD_PROP_ORDER",`Anchors and tags must be after the ${u.source} indicator`);if(N)P(u,"UNEXPECTED_TOKEN",`Unexpected ${u.source} in ${q??"collection"}`);N=u,O=f==="seq-item-ind"||f==="explicit-key-ind",T=!1;break;case"comma":if(q){if(b)P(u,"UNEXPECTED_TOKEN",`Unexpected , in ${q}`);b=u,O=!1,T=!1;break}default:P(u,"UNEXPECTED_TOKEN",`Unexpected ${u.type} token`),O=!1,T=!1}}let g=_[_.length-1],D=g?g.offset+g.source.length:$;if(k&&K&&K.type!=="space"&&K.type!=="newline"&&K.type!=="comma"&&(K.type!=="scalar"||K.source!==""))P(K.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(J&&(O&&J.indent<=j||K?.type==="block-map"||K?.type==="block-seq"))P(J,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:b,found:N,spaceBefore:w,comment:Y,hasNewline:H,anchor:h,tag:X,newlineAfterProp:M,end:D,start:p??D}}Fb.resolveProps=Ub});var VK=l((qV)=>{function u4(_){if(!_)return null;switch(_.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(_.source.includes(`
|
|
89
|
+
`))return!0;if(_.end){for(let q of _.end)if(q.type==="newline")return!0}return!1;case"flow-collection":for(let q of _.items){for(let f of q.start)if(f.type==="newline")return!0;if(q.sep){for(let f of q.sep)if(f.type==="newline")return!0}if(u4(q.key)||u4(q.value))return!0}return!1;default:return!0}}qV.containsNewline=u4});var G4=l((KV)=>{var fV=VK();function $V(_,q,f){if(q?.type==="flow-collection"){let K=q.end[0];if(K.indent===_&&(K.source==="]"||K.source==="}")&&fV.containsNewline(q))f(K,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}KV.flowIndentCheck=$V});var m4=l((vV)=>{var A2=Oq();function jV(_,q,f){let{uniqueKeys:K}=_.options;if(K===!1)return!1;let $=typeof K==="function"?K:(P,j)=>P===j||A2.isScalar(P)&&A2.isScalar(j)&&P.value===j.value;return q.some((P)=>$(P.key,f))}vV.mapIncludes=jV});var b2=l((WV)=>{var u2=w8(),OV=Y8(),G2=Sf(),YV=VK(),m2=G4(),TV=m4(),r2="All mapping items must start at the same column";function zV({composeNode:_,composeEmptyNode:q},f,K,$,P){let v=new(P?.nodeClass??OV.YAMLMap)(f.schema);if(f.atRoot)f.atRoot=!1;let w=K.offset,O=null;for(let T of K.items){let{start:Y,key:z,sep:H,value:k}=T,J=G2.resolveProps(Y,{indicator:"explicit-key-ind",next:z??H?.[0],offset:w,onError:$,parentIndent:K.indent,startOnNewline:!0}),h=!J.found;if(h){if(z){if(z.type==="block-seq")$(w,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in z&&z.indent!==K.indent)$(w,"BAD_INDENT",r2)}if(!J.anchor&&!J.tag&&!H){if(O=J.end,J.comment)if(v.comment)v.comment+=`
|
|
90
|
+
`+J.comment;else v.comment=J.comment;continue}if(J.newlineAfterProp||YV.containsNewline(z))$(z??Y[Y.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(J.found?.indent!==K.indent)$(w,"BAD_INDENT",r2);f.atKey=!0;let X=J.end,M=z?_(f,z,J,$):q(f,X,Y,null,J,$);if(f.schema.compat)m2.flowIndentCheck(K.indent,z,$);if(f.atKey=!1,TV.mapIncludes(f,v.items,M))$(X,"DUPLICATE_KEY","Map keys must be unique");let b=G2.resolveProps(H??[],{indicator:"map-value-ind",next:k,offset:M.range[2],onError:$,parentIndent:K.indent,startOnNewline:!z||z.type==="block-scalar"});if(w=b.end,b.found){if(h){if(k?.type==="block-map"&&!b.hasNewline)$(w,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(f.options.strict&&J.start<b.found.offset-1024)$(M.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let N=k?_(f,k,b,$):q(f,w,H,null,b,$);if(f.schema.compat)m2.flowIndentCheck(K.indent,k,$);w=N.range[2];let p=new u2.Pair(M,N);if(f.options.keepSourceTokens)p.srcToken=T;v.items.push(p)}else{if(h)$(M.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(b.comment)if(M.comment)M.comment+=`
|
|
91
|
+
`+b.comment;else M.comment=b.comment;let N=new u2.Pair(M);if(f.options.keepSourceTokens)N.srcToken=T;v.items.push(N)}}if(O&&O<w)$(O,"IMPOSSIBLE","Map comment with trailing content");return v.range=[K.offset,w,O??w],v}WV.resolveBlockMap=zV});var V2=l((XV)=>{var hV=T8(),JV=Sf(),kV=G4();function ZV({composeNode:_,composeEmptyNode:q},f,K,$,P){let v=new(P?.nodeClass??hV.YAMLSeq)(f.schema);if(f.atRoot)f.atRoot=!1;if(f.atKey)f.atKey=!1;let w=K.offset,O=null;for(let{start:T,value:Y}of K.items){let z=JV.resolveProps(T,{indicator:"seq-item-ind",next:Y,offset:w,onError:$,parentIndent:K.indent,startOnNewline:!0});if(!z.found)if(z.anchor||z.tag||Y)if(Y&&Y.type==="block-seq")$(z.end,"BAD_INDENT","All sequence items must start at the same column");else $(w,"MISSING_CHAR","Sequence item without - indicator");else{if(O=z.end,z.comment)v.comment=z.comment;continue}let H=Y?_(f,Y,z,$):q(f,z.end,T,null,z,$);if(f.schema.compat)kV.flowIndentCheck(K.indent,Y,$);w=H.range[2],v.items.push(H)}return v.range=[K.offset,w,O??w],v}XV.resolveBlockSeq=ZV});var S6=l((GV)=>{function uV(_,q,f,K){let $="";if(_){let P=!1,j="";for(let v of _){let{source:w,type:O}=v;switch(O){case"space":P=!0;break;case"comment":{if(f&&!P)K(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let T=w.substring(1)||" ";if(!$)$=T;else $+=j+T;j="";break}case"newline":if($)j+=w;P=!0;break;default:K(v,"UNEXPECTED_TOKEN",`Unexpected ${O} at node end`)}q+=w.length}}return{comment:$,offset:q}}GV.resolveEnd=uV});var N2=l((pV)=>{var rV=Oq(),bV=w8(),M2=Y8(),VV=T8(),MV=S6(),S2=Sf(),SV=VK(),NV=m4(),r4="Block collections are not allowed within flow collections",b4=(_)=>_&&(_.type==="block-map"||_.type==="block-seq");function CV({composeNode:_,composeEmptyNode:q},f,K,$,P){let j=K.start.source==="{",v=j?"flow map":"flow sequence",O=new(P?.nodeClass??(j?M2.YAMLMap:VV.YAMLSeq))(f.schema);O.flow=!0;let T=f.atRoot;if(T)f.atRoot=!1;if(f.atKey)f.atKey=!1;let Y=K.offset+K.start.source.length;for(let h=0;h<K.items.length;++h){let X=K.items[h],{start:M,key:b,sep:N,value:p}=X,g=S2.resolveProps(M,{flow:v,indicator:"explicit-key-ind",next:b??N?.[0],offset:Y,onError:$,parentIndent:K.indent,startOnNewline:!1});if(!g.found){if(!g.anchor&&!g.tag&&!N&&!p){if(h===0&&g.comma)$(g.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${v}`);else if(h<K.items.length-1)$(g.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${v}`);if(g.comment)if(O.comment)O.comment+=`
|
|
92
|
+
`+g.comment;else O.comment=g.comment;Y=g.end;continue}if(!j&&f.options.strict&&SV.containsNewline(b))$(b,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(h===0){if(g.comma)$(g.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${v}`)}else{if(!g.comma)$(g.start,"MISSING_CHAR",`Missing , between ${v} items`);if(g.comment){let D="";q:for(let u of M)switch(u.type){case"comma":case"space":break;case"comment":D=u.source.substring(1);break q;default:break q}if(D){let u=O.items[O.items.length-1];if(rV.isPair(u))u=u.value??u.key;if(u.comment)u.comment+=`
|
|
93
|
+
`+D;else u.comment=D;g.comment=g.comment.substring(D.length+1)}}}if(!j&&!N&&!g.found){let D=p?_(f,p,g,$):q(f,g.end,N,null,g,$);if(O.items.push(D),Y=D.range[2],b4(p))$(D.range,"BLOCK_IN_FLOW",r4)}else{f.atKey=!0;let D=g.end,u=b?_(f,b,g,$):q(f,D,M,null,g,$);if(b4(b))$(u.range,"BLOCK_IN_FLOW",r4);f.atKey=!1;let C=S2.resolveProps(N??[],{flow:v,indicator:"map-value-ind",next:p,offset:u.range[2],onError:$,parentIndent:K.indent,startOnNewline:!1});if(C.found){if(!j&&!g.found&&f.options.strict){if(N)for(let m of N){if(m===C.found)break;if(m.type==="newline"){$(m,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(g.start<C.found.offset-1024)$(C.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(p)if("source"in p&&p.source&&p.source[0]===":")$(p,"MISSING_CHAR",`Missing space after : in ${v}`);else $(C.start,"MISSING_CHAR",`Missing , or : between ${v} items`);let R=p?_(f,p,C,$):C.found?q(f,C.end,N,null,C,$):null;if(R){if(b4(p))$(R.range,"BLOCK_IN_FLOW",r4)}else if(C.comment)if(u.comment)u.comment+=`
|
|
94
|
+
`+C.comment;else u.comment=C.comment;let r=new bV.Pair(u,R);if(f.options.keepSourceTokens)r.srcToken=X;if(j){let m=O;if(NV.mapIncludes(f,m.items,u))$(D,"DUPLICATE_KEY","Map keys must be unique");m.items.push(r)}else{let m=new M2.YAMLMap(f.schema);m.flow=!0,m.items.push(r);let A=(R??u).range;m.range=[u.range[0],A[1],A[2]],O.items.push(m)}Y=R?R.range[2]:C.end}}let z=j?"}":"]",[H,...k]=K.end,J=Y;if(H&&H.source===z)J=H.offset+H.source.length;else{let h=v[0].toUpperCase()+v.substring(1),X=T?`${h} must end with a ${z}`:`${h} in block collection must be sufficiently indented and end with a ${z}`;if($(Y,T?"MISSING_CHAR":"BAD_INDENT",X),H&&H.source.length!==1)k.unshift(H)}if(k.length>0){let h=MV.resolveEnd(k,J,f.options.strict,$);if(h.comment)if(O.comment)O.comment+=`
|
|
95
|
+
`+h.comment;else O.comment=h.comment;O.range=[K.offset,J,h.offset]}else O.range=[K.offset,J,J];return O}pV.resolveFlowCollection=CV});var C2=l((yV)=>{var nV=Oq(),RV=nq(),EV=Y8(),gV=T8(),dV=b2(),aV=V2(),IV=N2();function V4(_,q,f,K,$,P){let j=f.type==="block-map"?dV.resolveBlockMap(_,q,f,K,P):f.type==="block-seq"?aV.resolveBlockSeq(_,q,f,K,P):IV.resolveFlowCollection(_,q,f,K,P),v=j.constructor;if($==="!"||$===v.tagName)return j.tag=v.tagName,j;if($)j.tag=$;return j}function DV(_,q,f,K,$){let P=K.tag,j=!P?null:q.directives.tagName(P.source,(z)=>$(P,"TAG_RESOLVE_FAILED",z));if(f.type==="block-seq"){let{anchor:z,newlineAfterProp:H}=K,k=z&&P?z.offset>P.offset?z:P:z??P;if(k&&(!H||H.offset<k.offset))$(k,"MISSING_CHAR","Missing newline after block sequence props")}let v=f.type==="block-map"?"map":f.type==="block-seq"?"seq":f.start.source==="{"?"map":"seq";if(!P||!j||j==="!"||j===EV.YAMLMap.tagName&&v==="map"||j===gV.YAMLSeq.tagName&&v==="seq")return V4(_,q,f,$,j);let w=q.schema.tags.find((z)=>z.tag===j&&z.collection===v);if(!w){let z=q.schema.knownTags[j];if(z&&z.collection===v)q.schema.tags.push(Object.assign({},z,{default:!1})),w=z;else{if(z)$(P,"BAD_COLLECTION_TYPE",`${z.tag} used for ${v} collection, but expects ${z.collection??"scalar"}`,!0);else $(P,"TAG_RESOLVE_FAILED",`Unresolved tag: ${j}`,!0);return V4(_,q,f,$,j)}}let O=V4(_,q,f,$,j,w),T=w.resolve?.(O,(z)=>$(P,"TAG_RESOLVE_FAILED",z),q.options)??O,Y=nV.isNode(T)?T:new RV.Scalar(T);if(Y.range=O.range,Y.tag=j,w?.format)Y.format=w.format;return Y}yV.composeCollection=DV});var S4=l((tV)=>{var M4=nq();function oV(_,q,f){let K=q.offset,$=cV(q,_.options.strict,f);if(!$)return{value:"",type:null,comment:"",range:[K,K,K]};let P=$.mode===">"?M4.Scalar.BLOCK_FOLDED:M4.Scalar.BLOCK_LITERAL,j=q.source?LV(q.source):[],v=j.length;for(let J=j.length-1;J>=0;--J){let h=j[J][1];if(h===""||h==="\r")v=J;else break}if(v===0){let J=$.chomp==="+"&&j.length>0?`
|
|
96
|
+
`.repeat(Math.max(1,j.length-1)):"",h=K+$.length;if(q.source)h+=q.source.length;return{value:J,type:P,comment:$.comment,range:[K,h,h]}}let w=q.indent+$.indent,O=q.offset+$.length,T=0;for(let J=0;J<v;++J){let[h,X]=j[J];if(X===""||X==="\r"){if($.indent===0&&h.length>w)w=h.length}else{if(h.length<w)f(O+h.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if($.indent===0)w=h.length;if(T=J,w===0&&!_.atRoot)f(O,"BAD_INDENT","Block scalar values in collections must be indented");break}O+=h.length+X.length+1}for(let J=j.length-1;J>=v;--J)if(j[J][0].length>w)v=J+1;let Y="",z="",H=!1;for(let J=0;J<T;++J)Y+=j[J][0].slice(w)+`
|
|
97
|
+
`;for(let J=T;J<v;++J){let[h,X]=j[J];O+=h.length+X.length+1;let M=X[X.length-1]==="\r";if(M)X=X.slice(0,-1);if(X&&h.length<w){let N=`Block scalar lines must not be less indented than their ${$.indent?"explicit indentation indicator":"first line"}`;f(O-X.length-(M?2:1),"BAD_INDENT",N),h=""}if(P===M4.Scalar.BLOCK_LITERAL)Y+=z+h.slice(w)+X,z=`
|
|
98
|
+
`;else if(h.length>w||X[0]==="\t"){if(z===" ")z=`
|
|
99
99
|
`;else if(!H&&z===`
|
|
100
100
|
`)z=`
|
|
101
101
|
|
|
102
|
-
`;Y+=z+
|
|
102
|
+
`;Y+=z+h.slice(w)+X,z=`
|
|
103
103
|
`,H=!0}else if(X==="")if(z===`
|
|
104
104
|
`)Y+=`
|
|
105
105
|
`;else z=`
|
|
@@ -107,84 +107,84 @@ ${O}
|
|
|
107
107
|
`+j[J][0].slice(w);if(Y[Y.length-1]!==`
|
|
108
108
|
`)Y+=`
|
|
109
109
|
`;break;default:Y+=`
|
|
110
|
-
`}let
|
|
110
|
+
`}let k=K+$.length+q.source.length;return{value:Y,type:P,comment:$.comment,range:[K,k,k]}}function cV({offset:_,props:q},f,K){if(q[0].type!=="block-scalar-header")return K(q[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:$}=q[0],P=$[0],j=0,v="",w=-1;for(let z=1;z<$.length;++z){let H=$[z];if(!v&&(H==="-"||H==="+"))v=H;else{let k=Number(H);if(!j&&k)j=k;else if(w===-1)w=_+z}}if(w!==-1)K(w,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${$}`);let O=!1,T="",Y=$.length;for(let z=1;z<q.length;++z){let H=q[z];switch(H.type){case"space":O=!0;case"newline":Y+=H.source.length;break;case"comment":if(f&&!O)K(H,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");Y+=H.source.length,T=H.source.substring(1);break;case"error":K(H,"UNEXPECTED_TOKEN",H.message),Y+=H.source.length;break;default:{let k=`Unexpected token in block scalar header: ${H.type}`;K(H,"UNEXPECTED_TOKEN",k);let J=H.source;if(J&&typeof J==="string")Y+=J.length}}}return{mode:P,indent:j,chomp:v,comment:T,length:Y}}function LV(_){let q=_.split(/\n( *)/),f=q[0],K=f.match(/^( *)/),P=[K?.[1]?[K[1],f.slice(K[1].length)]:["",f]];for(let j=1;j<q.length;j+=2)P.push([q[j],q[j+1]]);return P}tV.resolveBlockScalar=oV});var C4=l((fM)=>{var N4=nq(),xV=S6();function sV(_,q,f){let{offset:K,type:$,source:P,end:j}=_,v,w,O=(z,H,k)=>f(K+z,H,k);switch($){case"scalar":v=N4.Scalar.PLAIN,w=BV(P,O);break;case"single-quoted-scalar":v=N4.Scalar.QUOTE_SINGLE,w=UV(P,O);break;case"double-quoted-scalar":v=N4.Scalar.QUOTE_DOUBLE,w=FV(P,O);break;default:return f(_,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${$}`),{value:"",type:null,comment:"",range:[K,K+P.length,K+P.length]}}let T=K+P.length,Y=xV.resolveEnd(j,T,q,f);return{value:w,type:v,comment:Y.comment,range:[K,T,Y.offset]}}function BV(_,q){let f="";switch(_[0]){case"\t":f="a tab character";break;case",":f="flow indicator character ,";break;case"%":f="directive indicator character %";break;case"|":case">":{f=`block scalar indicator ${_[0]}`;break}case"@":case"`":{f=`reserved character ${_[0]}`;break}}if(f)q(0,"BAD_SCALAR_START",`Plain value cannot start with ${f}`);return p2(_)}function UV(_,q){if(_[_.length-1]!=="'"||_.length===1)q(_.length,"MISSING_CHAR","Missing closing 'quote");return p2(_.slice(1,-1)).replace(/''/g,"'")}function p2(_){let q,f;try{q=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
111
111
|
`,"sy"),f=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
112
112
|
`,"sy")}catch{q=/(.*?)[ \t]*\r?\n/sy,f=/[ \t]*(.*?)[ \t]*\r?\n/sy}let K=q.exec(_);if(!K)return _;let $=K[1],P=" ",j=q.lastIndex;f.lastIndex=j;while(K=f.exec(_)){if(K[1]==="")if(P===`
|
|
113
113
|
`)$+=P;else P=`
|
|
114
|
-
`;else $+=P+K[1],P=" ";j=f.lastIndex}let v=/[ \t]*(.*)/sy;return v.lastIndex=j,K=v.exec(_),$+P+(K?.[1]??"")}function
|
|
114
|
+
`;else $+=P+K[1],P=" ";j=f.lastIndex}let v=/[ \t]*(.*)/sy;return v.lastIndex=j,K=v.exec(_),$+P+(K?.[1]??"")}function FV(_,q){let f="";for(let K=1;K<_.length-1;++K){let $=_[K];if($==="\r"&&_[K+1]===`
|
|
115
115
|
`)continue;if($===`
|
|
116
|
-
`){let{fold:P,offset:j}=
|
|
116
|
+
`){let{fold:P,offset:j}=QV(_,K);f+=P,K=j}else if($==="\\"){let P=_[++K],j=qM[P];if(j)f+=j;else if(P===`
|
|
117
117
|
`){P=_[K+1];while(P===" "||P==="\t")P=_[++K+1]}else if(P==="\r"&&_[K+1]===`
|
|
118
|
-
`){P=_[++K+1];while(P===" "||P==="\t")P=_[++K+1]}else if(P==="x"||P==="u"||P==="U"){let v={x:2,u:4,U:8}[P];f+=
|
|
118
|
+
`){P=_[++K+1];while(P===" "||P==="\t")P=_[++K+1]}else if(P==="x"||P==="u"||P==="U"){let v={x:2,u:4,U:8}[P];f+=_M(_,K+1,v,q),K+=v}else{let v=_.substr(K-1,2);q(K-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${v}`),f+=v}}else if($===" "||$==="\t"){let P=K,j=_[K+1];while(j===" "||j==="\t")j=_[++K+1];if(j!==`
|
|
119
119
|
`&&!(j==="\r"&&_[K+2]===`
|
|
120
|
-
`))f+=K>P?_.slice(P,K+1):$}else f+=$}if(_[_.length-1]!=='"'||_.length===1)q(_.length,"MISSING_CHAR",'Missing closing "quote');return f}function
|
|
120
|
+
`))f+=K>P?_.slice(P,K+1):$}else f+=$}if(_[_.length-1]!=='"'||_.length===1)q(_.length,"MISSING_CHAR",'Missing closing "quote');return f}function QV(_,q){let f="",K=_[q+1];while(K===" "||K==="\t"||K===`
|
|
121
121
|
`||K==="\r"){if(K==="\r"&&_[q+2]!==`
|
|
122
122
|
`)break;if(K===`
|
|
123
123
|
`)f+=`
|
|
124
|
-
`;q+=1,K=_[q+1]}if(!f)f=" ";return{fold:f,offset:q}}var
|
|
125
|
-
`,r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function
|
|
124
|
+
`;q+=1,K=_[q+1]}if(!f)f=" ";return{fold:f,offset:q}}var qM={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
125
|
+
`,r:"\r",t:"\t",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function _M(_,q,f,K){let $=_.substr(q,f),j=$.length===f&&/^[0-9a-fA-F]+$/.test($)?parseInt($,16):NaN;if(isNaN(j)){let v=_.substr(q-2,f+2);return K(q-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${v}`),v}return String.fromCodePoint(j)}fM.resolveFlowScalar=sV});var n2=l((OM)=>{var a8=Oq(),l2=nq(),KM=S4(),PM=C4();function jM(_,q,f,K){let{value:$,type:P,comment:j,range:v}=q.type==="block-scalar"?KM.resolveBlockScalar(_,q,K):PM.resolveFlowScalar(q,_.options.strict,K),w=f?_.directives.tagName(f.source,(Y)=>K(f,"TAG_RESOLVE_FAILED",Y)):null,O;if(_.options.stringKeys&&_.atKey)O=_.schema[a8.SCALAR];else if(w)O=vM(_.schema,$,w,f,K);else if(q.type==="scalar")O=wM(_,$,q,K);else O=_.schema[a8.SCALAR];let T;try{let Y=O.resolve($,(z)=>K(f??q,"TAG_RESOLVE_FAILED",z),_.options);T=a8.isScalar(Y)?Y:new l2.Scalar(Y)}catch(Y){let z=Y instanceof Error?Y.message:String(Y);K(f??q,"TAG_RESOLVE_FAILED",z),T=new l2.Scalar($)}if(T.range=v,T.source=$,P)T.type=P;if(w)T.tag=w;if(O.format)T.format=O.format;if(j)T.comment=j;return T}function vM(_,q,f,K,$){if(f==="!")return _[a8.SCALAR];let P=[];for(let v of _.tags)if(!v.collection&&v.tag===f)if(v.default&&v.test)P.push(v);else return v;for(let v of P)if(v.test?.test(q))return v;let j=_.knownTags[f];if(j&&!j.collection)return _.tags.push(Object.assign({},j,{default:!1,test:void 0})),j;return $(K,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,f!=="tag:yaml.org,2002:str"),_[a8.SCALAR]}function wM({atKey:_,directives:q,schema:f},K,$,P){let j=f.tags.find((v)=>(v.default===!0||_&&v.default==="key")&&v.test?.test(K))||f[a8.SCALAR];if(f.compat){let v=f.compat.find((w)=>w.default&&w.test?.test(K))??f[a8.SCALAR];if(j.tag!==v.tag){let w=q.tagString(j.tag),O=q.tagString(v.tag),T=`Value may be parsed as either ${w} or ${O}`;P($,"TAG_RESOLVE_FAILED",T,!0)}}return j}OM.composeScalar=jM});var R2=l((zM)=>{function TM(_,q,f){if(q){f??(f=q.length);for(let K=f-1;K>=0;--K){let $=q[K];switch($.type){case"space":case"comment":case"newline":_-=$.source.length;continue}$=q[++K];while($?.type==="space")_+=$.source.length,$=q[++K];break}}return _}zM.emptyScalarPosition=TM});var d2=l((uM)=>{var HM=Tf(),hM=Oq(),JM=C2(),E2=n2(),kM=S6(),ZM=R2(),XM={composeNode:g2,composeEmptyNode:p4};function g2(_,q,f,K){let $=_.atKey,{spaceBefore:P,comment:j,anchor:v,tag:w}=f,O,T=!0;switch(q.type){case"alias":if(O=AM(_,q,K),v||w)K(q,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(O=E2.composeScalar(_,q,w,K),v)O.anchor=v.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":if(O=JM.composeCollection(XM,_,q,f,K),v)O.anchor=v.source.substring(1);break;default:{let Y=q.type==="error"?q.message:`Unsupported token (type: ${q.type})`;K(q,"UNEXPECTED_TOKEN",Y),O=p4(_,q.offset,void 0,null,f,K),T=!1}}if(v&&O.anchor==="")K(v,"BAD_ALIAS","Anchor cannot be an empty string");if($&&_.options.stringKeys&&(!hM.isScalar(O)||typeof O.value!=="string"||O.tag&&O.tag!=="tag:yaml.org,2002:str"))K(w??q,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(P)O.spaceBefore=!0;if(j)if(q.type==="scalar"&&q.source==="")O.comment=j;else O.commentBefore=j;if(_.options.keepSourceTokens&&T)O.srcToken=q;return O}function p4(_,q,f,K,{spaceBefore:$,comment:P,anchor:j,tag:v,end:w},O){let T={type:"scalar",offset:ZM.emptyScalarPosition(q,f,K),indent:-1,source:""},Y=E2.composeScalar(_,T,v,O);if(j){if(Y.anchor=j.source.substring(1),Y.anchor==="")O(j,"BAD_ALIAS","Anchor cannot be an empty string")}if($)Y.spaceBefore=!0;if(P)Y.comment=P,Y.range[2]=w;return Y}function AM({options:_},{offset:q,source:f,end:K},$){let P=new HM.Alias(f.substring(1));if(P.source==="")$(q,"BAD_ALIAS","Alias cannot be an empty string");if(P.source.endsWith(":"))$(q+f.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let j=q+f.length,v=kM.resolveEnd(K,j,_.strict,$);if(P.range=[q,j,v.offset],v.comment)P.comment=v.comment;return P}uM.composeEmptyNode=p4;uM.composeNode=g2});var I2=l((SM)=>{var rM=Vf(),a2=d2(),bM=S6(),VM=Sf();function MM(_,q,{offset:f,start:K,value:$,end:P},j){let v=Object.assign({_directives:q},_),w=new rM.Document(void 0,v),O={atKey:!1,atRoot:!0,directives:w.directives,options:w.options,schema:w.schema},T=VM.resolveProps(K,{indicator:"doc-start",next:$??P?.[0],offset:f,onError:j,parentIndent:0,startOnNewline:!0});if(T.found){if(w.directives.docStart=!0,$&&($.type==="block-map"||$.type==="block-seq")&&!T.hasNewline)j(T.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}w.contents=$?a2.composeNode(O,$,T,j):a2.composeEmptyNode(O,T.end,K,null,T,j);let Y=w.contents.range[2],z=bM.resolveEnd(P,Y,!1,j);if(z.comment)w.comment=z.comment;return w.range=[f,Y,z.offset],w}SM.composeDoc=MM});var l4=l((EM)=>{var CM=a_("process"),pM=g3(),lM=Vf(),Nf=Mf(),D2=Oq(),nM=I2(),RM=S6();function Cf(_){if(typeof _==="number")return[_,_+1];if(Array.isArray(_))return _.length===2?_:[_[0],_[1]];let{offset:q,source:f}=_;return[q,q+(typeof f==="string"?f.length:1)]}function y2(_){let q="",f=!1,K=!1;for(let $=0;$<_.length;++$){let P=_[$];switch(P[0]){case"#":q+=(q===""?"":K?`
|
|
126
126
|
|
|
127
127
|
`:`
|
|
128
|
-
`)+(P.substring(1)||" "),f=!0,K=!1;break;case"%":if(_[$+1]?.[0]!=="#")$+=1;f=!1;break;default:if(!f)K=!0;f=!1}}return{comment:q,afterEmptyLine:K}}class
|
|
129
|
-
${f}`:f;else if(K||_.directives.docStart||!$)_.commentBefore=f;else if(
|
|
128
|
+
`)+(P.substring(1)||" "),f=!0,K=!1;break;case"%":if(_[$+1]?.[0]!=="#")$+=1;f=!1;break;default:if(!f)K=!0;f=!1}}return{comment:q,afterEmptyLine:K}}class i2{constructor(_={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(q,f,K,$)=>{let P=Cf(q);if($)this.warnings.push(new Nf.YAMLWarning(P,f,K));else this.errors.push(new Nf.YAMLParseError(P,f,K))},this.directives=new pM.Directives({version:_.version||"1.2"}),this.options=_}decorate(_,q){let{comment:f,afterEmptyLine:K}=y2(this.prelude);if(f){let $=_.contents;if(q)_.comment=_.comment?`${_.comment}
|
|
129
|
+
${f}`:f;else if(K||_.directives.docStart||!$)_.commentBefore=f;else if(D2.isCollection($)&&!$.flow&&$.items.length>0){let P=$.items[0];if(D2.isPair(P))P=P.key;let j=P.commentBefore;P.commentBefore=j?`${f}
|
|
130
130
|
${j}`:f}else{let P=$.commentBefore;$.commentBefore=P?`${f}
|
|
131
|
-
${P}`:f}}if(q)Array.prototype.push.apply(_.errors,this.errors),Array.prototype.push.apply(_.warnings,this.warnings);else _.errors=this.errors,_.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:
|
|
132
|
-
${q.comment}`:q.comment}this.doc.range[2]=q.offset;break}default:this.errors.push(new
|
|
131
|
+
${P}`:f}}if(q)Array.prototype.push.apply(_.errors,this.errors),Array.prototype.push.apply(_.warnings,this.warnings);else _.errors=this.errors,_.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:y2(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(_,q=!1,f=-1){for(let K of _)yield*this.next(K);yield*this.end(q,f)}*next(_){if(CM.env.LOG_STREAM)console.dir(_,{depth:null});switch(_.type){case"directive":this.directives.add(_.source,(q,f,K)=>{let $=Cf(_);$[0]+=q,this.onError($,"BAD_DIRECTIVE",f,K)}),this.prelude.push(_.source),this.atDirectives=!0;break;case"document":{let q=nM.composeDoc(this.options,this.directives,_,this.onError);if(this.atDirectives&&!q.directives.docStart)this.onError(_,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(q,!1),this.doc)yield this.doc;this.doc=q,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(_.source);break;case"error":{let q=_.source?`${_.message}: ${JSON.stringify(_.source)}`:_.message,f=new Nf.YAMLParseError(Cf(_),"UNEXPECTED_TOKEN",q);if(this.atDirectives||!this.doc)this.errors.push(f);else this.doc.errors.push(f);break}case"doc-end":{if(!this.doc){this.errors.push(new Nf.YAMLParseError(Cf(_),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let q=RM.resolveEnd(_.end,_.offset+_.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),q.comment){let f=this.doc.comment;this.doc.comment=f?`${f}
|
|
132
|
+
${q.comment}`:q.comment}this.doc.range[2]=q.offset;break}default:this.errors.push(new Nf.YAMLParseError(Cf(_),"UNEXPECTED_TOKEN",`Unsupported token ${_.type}`))}}*end(_=!1,q=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(_){let f=Object.assign({_directives:this.directives},this.options),K=new lM.Document(void 0,f);if(this.atDirectives)this.onError(q,"MISSING_CHAR","Missing directives-end indicator line");K.range=[0,q,q],this.decorate(K,!1),yield K}}}EM.Composer=i2});var L2=l((cM)=>{var dM=S4(),aM=C4(),IM=Mf(),o2=hf();function DM(_,q=!0,f){if(_){let K=($,P,j)=>{let v=typeof $==="number"?$:Array.isArray($)?$[0]:$.offset;if(f)f(v,P,j);else throw new IM.YAMLParseError([v,v+1],P,j)};switch(_.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return aM.resolveFlowScalar(_,q,K);case"block-scalar":return dM.resolveBlockScalar({options:{strict:q}},_,K)}}return null}function yM(_,q){let{implicitKey:f=!1,indent:K,inFlow:$=!1,offset:P=-1,type:j="PLAIN"}=q,v=o2.stringifyString({type:j,value:_},{implicitKey:f,indent:K>0?" ".repeat(K):"",inFlow:$,options:{blockQuote:!0,lineWidth:-1}}),w=q.end??[{type:"newline",offset:-1,indent:K,source:`
|
|
133
133
|
`}];switch(v[0]){case"|":case">":{let O=v.indexOf(`
|
|
134
134
|
`),T=v.substring(0,O),Y=v.substring(O+1)+`
|
|
135
|
-
`,z=[{type:"block-scalar-header",offset:P,indent:K,source:T}];if(!
|
|
136
|
-
`});return{type:"block-scalar",offset:P,indent:K,props:z,source:Y}}case'"':return{type:"double-quoted-scalar",offset:P,indent:K,source:v,end:w};case"'":return{type:"single-quoted-scalar",offset:P,indent:K,source:v,end:w};default:return{type:"scalar",offset:P,indent:K,source:v,end:w}}}function
|
|
135
|
+
`,z=[{type:"block-scalar-header",offset:P,indent:K,source:T}];if(!c2(z,w))z.push({type:"newline",offset:-1,indent:K,source:`
|
|
136
|
+
`});return{type:"block-scalar",offset:P,indent:K,props:z,source:Y}}case'"':return{type:"double-quoted-scalar",offset:P,indent:K,source:v,end:w};case"'":return{type:"single-quoted-scalar",offset:P,indent:K,source:v,end:w};default:return{type:"scalar",offset:P,indent:K,source:v,end:w}}}function iM(_,q,f={}){let{afterKey:K=!1,implicitKey:$=!1,inFlow:P=!1,type:j}=f,v="indent"in _?_.indent:null;if(K&&typeof v==="number")v+=2;if(!j)switch(_.type){case"single-quoted-scalar":j="QUOTE_SINGLE";break;case"double-quoted-scalar":j="QUOTE_DOUBLE";break;case"block-scalar":{let O=_.props[0];if(O.type!=="block-scalar-header")throw new Error("Invalid block scalar header");j=O.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:j="PLAIN"}let w=o2.stringifyString({type:j,value:q},{implicitKey:$||v===null,indent:v!==null&&v>0?" ".repeat(v):"",inFlow:P,options:{blockQuote:!0,lineWidth:-1}});switch(w[0]){case"|":case">":oM(_,w);break;case'"':n4(_,w,"double-quoted-scalar");break;case"'":n4(_,w,"single-quoted-scalar");break;default:n4(_,w,"scalar")}}function oM(_,q){let f=q.indexOf(`
|
|
137
137
|
`),K=q.substring(0,f),$=q.substring(f+1)+`
|
|
138
|
-
`;if(_.type==="block-scalar"){let P=_.props[0];if(P.type!=="block-scalar-header")throw new Error("Invalid block scalar header");P.source=K,_.source=$}else{let{offset:P}=_,j="indent"in _?_.indent:-1,v=[{type:"block-scalar-header",offset:P,indent:j,source:K}];if(!
|
|
139
|
-
`});for(let w of Object.keys(_))if(w!=="type"&&w!=="offset")delete _[w];Object.assign(_,{type:"block-scalar",indent:j,props:v,source:$})}}function
|
|
140
|
-
`};delete _.items,Object.assign(_,{type:f,source:q,end:[$]});break}default:{let K="indent"in _?_.indent:-1,$="end"in _&&Array.isArray(_.end)?_.end.filter((P)=>P.type==="space"||P.type==="comment"||P.type==="newline"):[];for(let P of Object.keys(_))if(P!=="type"&&P!=="offset")delete _[P];Object.assign(_,{type:f,indent:K,source:q,end:$})}}}
|
|
138
|
+
`;if(_.type==="block-scalar"){let P=_.props[0];if(P.type!=="block-scalar-header")throw new Error("Invalid block scalar header");P.source=K,_.source=$}else{let{offset:P}=_,j="indent"in _?_.indent:-1,v=[{type:"block-scalar-header",offset:P,indent:j,source:K}];if(!c2(v,"end"in _?_.end:void 0))v.push({type:"newline",offset:-1,indent:j,source:`
|
|
139
|
+
`});for(let w of Object.keys(_))if(w!=="type"&&w!=="offset")delete _[w];Object.assign(_,{type:"block-scalar",indent:j,props:v,source:$})}}function c2(_,q){if(q)for(let f of q)switch(f.type){case"space":case"comment":_.push(f);break;case"newline":return _.push(f),!0}return!1}function n4(_,q,f){switch(_.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":_.type=f,_.source=q;break;case"block-scalar":{let K=_.props.slice(1),$=q.length;if(_.props[0].type==="block-scalar-header")$-=_.props[0].source.length;for(let P of K)P.offset+=$;delete _.props,Object.assign(_,{type:f,source:q,end:K});break}case"block-map":case"block-seq":{let $={type:"newline",offset:_.offset+q.length,indent:_.indent,source:`
|
|
140
|
+
`};delete _.items,Object.assign(_,{type:f,source:q,end:[$]});break}default:{let K="indent"in _?_.indent:-1,$="end"in _&&Array.isArray(_.end)?_.end.filter((P)=>P.type==="space"||P.type==="comment"||P.type==="newline"):[];for(let P of Object.keys(_))if(P!=="type"&&P!=="offset")delete _[P];Object.assign(_,{type:f,indent:K,source:q,end:$})}}}cM.createScalarToken=yM;cM.resolveAsScalar=DM;cM.setScalarValue=iM});var t2=l((sM)=>{var xM=(_)=>("type"in _)?SK(_):MK(_);function SK(_){switch(_.type){case"block-scalar":{let q="";for(let f of _.props)q+=SK(f);return q+_.source}case"block-map":case"block-seq":{let q="";for(let f of _.items)q+=MK(f);return q}case"flow-collection":{let q=_.start.source;for(let f of _.items)q+=MK(f);for(let f of _.end)q+=f.source;return q}case"document":{let q=MK(_);if(_.end)for(let f of _.end)q+=f.source;return q}default:{let q=_.source;if("end"in _&&_.end)for(let f of _.end)q+=f.source;return q}}}function MK({start:_,key:q,sep:f,value:K}){let $="";for(let P of _)$+=P.source;if(q)$+=SK(q);if(f)for(let P of f)$+=P.source;if(K)$+=SK(K);return $}sM.stringify=xM});var s2=l((FM)=>{var R4=Symbol("break visit"),UM=Symbol("skip children"),e2=Symbol("remove item");function I8(_,q){if("type"in _&&_.type==="document")_={start:_.start,value:_.value};x2(Object.freeze([]),_,q)}I8.BREAK=R4;I8.SKIP=UM;I8.REMOVE=e2;I8.itemAtPath=(_,q)=>{let f=_;for(let[K,$]of q){let P=f?.[K];if(P&&"items"in P)f=P.items[$];else return}return f};I8.parentCollection=(_,q)=>{let f=I8.itemAtPath(_,q.slice(0,-1)),K=q[q.length-1][0],$=f?.[K];if($&&"items"in $)return $;throw new Error("Parent collection not found")};function x2(_,q,f){let K=f(q,_);if(typeof K==="symbol")return K;for(let $ of["key","value"]){let P=q[$];if(P&&"items"in P){for(let j=0;j<P.items.length;++j){let v=x2(Object.freeze(_.concat([[$,j]])),P.items[j],f);if(typeof v==="number")j=v-1;else if(v===R4)return R4;else if(v===e2)P.items.splice(j,1),j-=1}if(typeof K==="function"&&$==="key")K=K(q,_)}}return typeof K==="function"?K(q,_):K}FM.visit=I8});var NK=l((jS)=>{var E4=L2(),qS=t2(),_S=s2(),g4="\uFEFF",d4="\x02",a4="\x18",I4="\x1F",fS=(_)=>!!_&&("items"in _),$S=(_)=>!!_&&(_.type==="scalar"||_.type==="single-quoted-scalar"||_.type==="double-quoted-scalar"||_.type==="block-scalar");function KS(_){switch(_){case g4:return"<BOM>";case d4:return"<DOC>";case a4:return"<FLOW_END>";case I4:return"<SCALAR>";default:return JSON.stringify(_)}}function PS(_){switch(_){case g4:return"byte-order-mark";case d4:return"doc-mode";case a4:return"flow-error-end";case I4:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
141
141
|
`:case`\r
|
|
142
|
-
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(_[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}
|
|
143
|
-
`:case"\r":case"\t":return!0;default:return!1}}var
|
|
144
|
-
\r `),
|
|
142
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(_[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}jS.createScalarToken=E4.createScalarToken;jS.resolveAsScalar=E4.resolveAsScalar;jS.setScalarValue=E4.setScalarValue;jS.stringify=qS.stringify;jS.visit=_S.visit;jS.BOM=g4;jS.DOCUMENT=d4;jS.FLOW_END=a4;jS.SCALAR=I4;jS.isCollection=fS;jS.isScalar=$S;jS.prettyToken=KS;jS.tokenType=PS});var y4=l((GS)=>{var pf=NK();function u_(_){switch(_){case void 0:case" ":case`
|
|
143
|
+
`:case"\r":case"\t":return!0;default:return!1}}var B2=new Set("0123456789ABCDEFabcdef"),AS=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),CK=new Set(",[]{}"),uS=new Set(` ,[]{}
|
|
144
|
+
\r `),D4=(_)=>!_||uS.has(_);class U2{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(_,q=!1){if(_){if(typeof _!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+_:_,this.lineEndPos=null}this.atEnd=!q;let f=this.next??"stream";while(f&&(q||this.hasChars(1)))f=yield*this.parseNext(f)}atLineEnd(){let _=this.pos,q=this.buffer[_];while(q===" "||q==="\t")q=this.buffer[++_];if(!q||q==="#"||q===`
|
|
145
145
|
`)return!0;if(q==="\r")return this.buffer[_+1]===`
|
|
146
146
|
`;return!1}charAt(_){return this.buffer[this.pos+_]}continueScalar(_){let q=this.buffer[_];if(this.indentNext>0){let f=0;while(q===" ")q=this.buffer[++f+_];if(q==="\r"){let K=this.buffer[f+_+1];if(K===`
|
|
147
147
|
`||!K&&!this.atEnd)return _+f+1}return q===`
|
|
148
148
|
`||f>=this.indentNext||!q&&!this.atEnd?_+f:-1}if(q==="-"||q==="."){let f=this.buffer.substr(_,3);if((f==="---"||f==="...")&&u_(this.buffer[_+3]))return-1}return _}getLine(){let _=this.lineEndPos;if(typeof _!=="number"||_!==-1&&_<this.pos)_=this.buffer.indexOf(`
|
|
149
|
-
`,this.pos),this.lineEndPos=_;if(_===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[_-1]==="\r")_-=1;return this.buffer.substring(this.pos,_)}hasChars(_){return this.pos+_<=this.buffer.length}setNext(_){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=_,null}peek(_){return this.buffer.substr(this.pos,_)}*parseNext(_){switch(_){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let _=this.getLine();if(_===null)return this.setNext("stream");if(_[0]===
|
|
149
|
+
`,this.pos),this.lineEndPos=_;if(_===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[_-1]==="\r")_-=1;return this.buffer.substring(this.pos,_)}hasChars(_){return this.pos+_<=this.buffer.length}setNext(_){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=_,null}peek(_){return this.buffer.substr(this.pos,_)}*parseNext(_){switch(_){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let _=this.getLine();if(_===null)return this.setNext("stream");if(_[0]===pf.BOM)yield*this.pushCount(1),_=_.substring(1);if(_[0]==="%"){let q=_.length,f=_.indexOf("#");while(f!==-1){let $=_[f-1];if($===" "||$==="\t"){q=f-1;break}else f=_.indexOf("#",f+1)}while(!0){let $=_[q-1];if($===" "||$==="\t")q-=1;else break}let K=(yield*this.pushCount(q))+(yield*this.pushSpaces(!0));return yield*this.pushCount(_.length-K),this.pushNewline(),"stream"}if(this.atLineEnd()){let q=yield*this.pushSpaces(!0);return yield*this.pushCount(_.length-q),yield*this.pushNewline(),"stream"}return yield pf.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let _=this.charAt(0);if(!_&&!this.atEnd)return this.setNext("line-start");if(_==="-"||_==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let q=this.peek(3);if((q==="---"||q==="...")&&u_(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,q==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!u_(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[_,q]=this.peek(2);if(!q&&!this.atEnd)return this.setNext("block-start");if((_==="-"||_==="?"||_===":")&&u_(q)){let f=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=f,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let _=this.getLine();if(_===null)return this.setNext("doc");let q=yield*this.pushIndicators();switch(_[q]){case"#":yield*this.pushCount(_.length-q);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(D4),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return q+=yield*this.parseBlockScalarHeader(),q+=yield*this.pushSpaces(!0),yield*this.pushCount(_.length-q),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let _,q,f=-1;do{if(_=yield*this.pushNewline(),_>0)q=yield*this.pushSpaces(!1),this.indentValue=f=q;else q=0;q+=yield*this.pushSpaces(!0)}while(_+q>0);let K=this.getLine();if(K===null)return this.setNext("flow");if(f!==-1&&f<this.indentNext&&K[0]!=="#"||f===0&&(K.startsWith("---")||K.startsWith("..."))&&u_(K[3])){if(!(f===this.indentNext-1&&this.flowLevel===1&&(K[0]==="]"||K[0]==="}")))return this.flowLevel=0,yield pf.FLOW_END,yield*this.parseLineStart()}let $=0;while(K[$]===",")$+=yield*this.pushCount(1),$+=yield*this.pushSpaces(!0),this.flowKey=!1;switch($+=yield*this.pushIndicators(),K[$]){case void 0:return"flow";case"#":return yield*this.pushCount(K.length-$),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(D4),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let P=this.charAt(1);if(this.flowKey||u_(P)||P===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let _=this.charAt(0),q=this.buffer.indexOf(_,this.pos+1);if(_==="'")while(q!==-1&&this.buffer[q+1]==="'")q=this.buffer.indexOf("'",q+2);else while(q!==-1){let $=0;while(this.buffer[q-1-$]==="\\")$+=1;if($%2===0)break;q=this.buffer.indexOf('"',q+1)}let f=this.buffer.substring(0,q),K=f.indexOf(`
|
|
150
150
|
`,this.pos);if(K!==-1){while(K!==-1){let $=this.continueScalar(K+1);if($===-1)break;K=f.indexOf(`
|
|
151
151
|
`,$)}if(K!==-1)q=K-(f[K-1]==="\r"?2:1)}if(q===-1){if(!this.atEnd)return this.setNext("quoted-scalar");q=this.buffer.length}return yield*this.pushToIndex(q+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let _=this.pos;while(!0){let q=this.buffer[++_];if(q==="+")this.blockScalarKeep=!0;else if(q>"0"&&q<="9")this.blockScalarIndent=Number(q)-1;else if(q!=="-")break}return yield*this.pushUntil((q)=>u_(q)||q==="#")}*parseBlockScalar(){let _=this.pos-1,q=0,f;q:for(let $=this.pos;f=this.buffer[$];++$)switch(f){case" ":q+=1;break;case`
|
|
152
152
|
`:_=$,q=0;break;case"\r":{let P=this.buffer[$+1];if(!P&&!this.atEnd)return this.setNext("block-scalar");if(P===`
|
|
153
153
|
`)break}default:break q}if(!f&&!this.atEnd)return this.setNext("block-scalar");if(q>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=q;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let $=this.continueScalar(_+1);if($===-1)break;_=this.buffer.indexOf(`
|
|
154
154
|
`,$)}while(_!==-1);if(_===-1){if(!this.atEnd)return this.setNext("block-scalar");_=this.buffer.length}}let K=_+1;f=this.buffer[K];while(f===" ")f=this.buffer[++K];if(f==="\t"){while(f==="\t"||f===" "||f==="\r"||f===`
|
|
155
155
|
`)f=this.buffer[++K];_=K-1}else if(!this.blockScalarKeep)do{let $=_-1,P=this.buffer[$];if(P==="\r")P=this.buffer[--$];let j=$;while(P===" ")P=this.buffer[--$];if(P===`
|
|
156
|
-
`&&$>=this.pos&&$+1+q>j)_=$;else break}while(!0);return yield
|
|
156
|
+
`&&$>=this.pos&&$+1+q>j)_=$;else break}while(!0);return yield pf.SCALAR,yield*this.pushToIndex(_+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let _=this.flowLevel>0,q=this.pos-1,f=this.pos-1,K;while(K=this.buffer[++f])if(K===":"){let $=this.buffer[f+1];if(u_($)||_&&CK.has($))break;q=f}else if(u_(K)){let $=this.buffer[f+1];if(K==="\r")if($===`
|
|
157
157
|
`)f+=1,K=`
|
|
158
|
-
`,$=this.buffer[f+1];else q=f;if($==="#"||_&&
|
|
159
|
-
`){let P=this.continueScalar(f+1);if(P===-1)break;f=Math.max(f,P-2)}}else{if(_&&
|
|
158
|
+
`,$=this.buffer[f+1];else q=f;if($==="#"||_&&CK.has($))break;if(K===`
|
|
159
|
+
`){let P=this.continueScalar(f+1);if(P===-1)break;f=Math.max(f,P-2)}}else{if(_&&CK.has(K))break;q=f}if(!K&&!this.atEnd)return this.setNext("plain-scalar");return yield pf.SCALAR,yield*this.pushToIndex(q+1,!0),_?"flow":"doc"}*pushCount(_){if(_>0)return yield this.buffer.substr(this.pos,_),this.pos+=_,_;return 0}*pushToIndex(_,q){let f=this.buffer.slice(this.pos,_);if(f)return yield f,this.pos+=f.length,f.length;else if(q)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(D4))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let _=this.flowLevel>0,q=this.charAt(1);if(u_(q)||_&&CK.has(q)){if(!_)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;return(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let _=this.pos+2,q=this.buffer[_];while(!u_(q)&&q!==">")q=this.buffer[++_];return yield*this.pushToIndex(q===">"?_+1:_,!1)}else{let _=this.pos+1,q=this.buffer[_];while(q)if(AS.has(q))q=this.buffer[++_];else if(q==="%"&&B2.has(this.buffer[_+1])&&B2.has(this.buffer[_+2]))q=this.buffer[_+=3];else break;return yield*this.pushToIndex(_,!1)}}*pushNewline(){let _=this.buffer[this.pos];if(_===`
|
|
160
160
|
`)return yield*this.pushCount(1);else if(_==="\r"&&this.charAt(1)===`
|
|
161
|
-
`)return yield*this.pushCount(2);else return 0}*pushSpaces(_){let q=this.pos-1,f;do f=this.buffer[++q];while(f===" "||_&&f==="\t");let K=q-this.pos;if(K>0)yield this.buffer.substr(this.pos,K),this.pos=q;return K}*pushUntil(_){let q=this.pos,f=this.buffer[q];while(!_(f))f=this.buffer[++q];return yield*this.pushToIndex(q,!1)}}
|
|
161
|
+
`)return yield*this.pushCount(2);else return 0}*pushSpaces(_){let q=this.pos-1,f;do f=this.buffer[++q];while(f===" "||_&&f==="\t");let K=q-this.pos;if(K>0)yield this.buffer.substr(this.pos,K),this.pos=q;return K}*pushUntil(_){let q=this.pos,f=this.buffer[q];while(!_(f))f=this.buffer[++q];return yield*this.pushToIndex(q,!1)}}GS.Lexer=U2});var i4=l((rS)=>{class F2{constructor(){this.lineStarts=[],this.addNewLine=(_)=>this.lineStarts.push(_),this.linePos=(_)=>{let q=0,f=this.lineStarts.length;while(q<f){let $=q+f>>1;if(this.lineStarts[$]<_)q=$+1;else f=$}if(this.lineStarts[q]===_)return{line:q+1,col:1};if(q===0)return{line:0,col:_};let K=this.lineStarts[q-1];return{line:q,col:_-K+1}}}}rS.LineCounter=F2});var o4=l((SS)=>{var VS=a_("process"),Q2=NK(),MS=y4();function z8(_,q){for(let f=0;f<_.length;++f)if(_[f].type===q)return!0;return!1}function qO(_){for(let q=0;q<_.length;++q)switch(_[q].type){case"space":case"comment":case"newline":break;default:return q}return-1}function fO(_){switch(_?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function pK(_){switch(_.type){case"document":return _.start;case"block-map":{let q=_.items[_.items.length-1];return q.sep??q.start}case"block-seq":return _.items[_.items.length-1].start;default:return[]}}function N6(_){if(_.length===0)return[];let q=_.length;q:while(--q>=0)switch(_[q].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break q}while(_[++q]?.type==="space");return _.splice(q,_.length)}function _O(_){if(_.start.type==="flow-seq-start"){for(let q of _.items)if(q.sep&&!q.value&&!z8(q.start,"explicit-key-ind")&&!z8(q.sep,"map-value-ind")){if(q.key)q.value=q.key;if(delete q.key,fO(q.value))if(q.value.end)Array.prototype.push.apply(q.value.end,q.sep);else q.value.end=q.sep;else Array.prototype.push.apply(q.start,q.sep);delete q.sep}}}class $O{constructor(_){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new MS.Lexer,this.onNewLine=_}*parse(_,q=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let f of this.lexer.lex(_,q))yield*this.next(f);if(!q)yield*this.end()}*next(_){if(this.source=_,VS.env.LOG_TOKENS)console.log("|",Q2.prettyToken(_));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=_.length;return}let q=Q2.tokenType(_);if(!q){let f=`Not a YAML token: ${_}`;yield*this.pop({type:"error",offset:this.offset,message:f,source:_}),this.offset+=_.length}else if(q==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=q,yield*this.step(),q){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+_.length);break;case"space":if(this.atNewLine&&_[0]===" ")this.indent+=_.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=_.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=_.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let _=this.peek(1);if(this.type==="doc-end"&&(!_||_.type!=="doc-end")){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!_)return yield*this.stream();switch(_.type){case"document":return yield*this.document(_);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(_);case"block-scalar":return yield*this.blockScalar(_);case"block-map":return yield*this.blockMap(_);case"block-seq":return yield*this.blockSequence(_);case"flow-collection":return yield*this.flowCollection(_);case"doc-end":return yield*this.documentEnd(_)}yield*this.pop()}peek(_){return this.stack[this.stack.length-_]}*pop(_){let q=_??this.stack.pop();if(!q)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield q;else{let f=this.peek(1);if(q.type==="block-scalar")q.indent="indent"in f?f.indent:0;else if(q.type==="flow-collection"&&f.type==="document")q.indent=0;if(q.type==="flow-collection")_O(q);switch(f.type){case"document":f.value=q;break;case"block-scalar":f.props.push(q);break;case"block-map":{let K=f.items[f.items.length-1];if(K.value){f.items.push({start:[],key:q,sep:[]}),this.onKeyLine=!0;return}else if(K.sep)K.value=q;else{Object.assign(K,{key:q,sep:[]}),this.onKeyLine=!K.explicitKey;return}break}case"block-seq":{let K=f.items[f.items.length-1];if(K.value)f.items.push({start:[],value:q});else K.value=q;break}case"flow-collection":{let K=f.items[f.items.length-1];if(!K||K.value)f.items.push({start:[],key:q,sep:[]});else if(K.sep)K.value=q;else Object.assign(K,{key:q,sep:[]});return}default:yield*this.pop(),yield*this.pop(q)}if((f.type==="document"||f.type==="block-map"||f.type==="block-seq")&&(q.type==="block-map"||q.type==="block-seq")){let K=q.items[q.items.length-1];if(K&&!K.sep&&!K.value&&K.start.length>0&&qO(K.start)===-1&&(q.indent===0||K.start.every(($)=>$.type!=="comment"||$.indent<q.indent))){if(f.type==="document")f.end=K.start;else f.items.push({start:K.start});q.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let _={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")_.start.push(this.sourceToken);this.stack.push(_);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(_){if(_.value)return yield*this.lineEnd(_);switch(this.type){case"doc-start":{if(qO(_.start)!==-1)yield*this.pop(),yield*this.step();else _.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":_.start.push(this.sourceToken);return}let q=this.startBlockValue(_);if(q)this.stack.push(q);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(_){if(this.type==="map-value-ind"){let q=pK(this.peek(2)),f=N6(q),K;if(_.end)K=_.end,K.push(this.sourceToken),delete _.end;else K=[this.sourceToken];let $={type:"block-map",offset:_.offset,indent:_.indent,items:[{start:f,key:_,sep:K}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=$}else yield*this.lineEnd(_)}*blockScalar(_){switch(this.type){case"space":case"comment":case"newline":_.props.push(this.sourceToken);return;case"scalar":if(_.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let q=this.source.indexOf(`
|
|
162
162
|
`)+1;while(q!==0)this.onNewLine(this.offset+q),q=this.source.indexOf(`
|
|
163
|
-
`,q)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(_){let q=_.items[_.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,q.value){let f="end"in q.value?q.value.end:void 0;if((Array.isArray(f)?f[f.length-1]:void 0)?.type==="comment")f?.push(this.sourceToken);else _.items.push({start:[this.sourceToken]})}else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"space":case"comment":if(q.value)_.items.push({start:[this.sourceToken]});else if(q.sep)q.sep.push(this.sourceToken);else{if(this.atIndentedComment(q.start,_.indent)){let K=_.items[_.items.length-2]?.value?.end;if(Array.isArray(K)){Array.prototype.push.apply(K,q.start),K.push(this.sourceToken),_.items.pop();return}}q.start.push(this.sourceToken)}return}if(this.indent>=_.indent){let f=!this.onKeyLine&&this.indent===_.indent,K=f&&(q.sep||q.explicitKey)&&this.type!=="seq-item-ind",$=[];if(K&&q.sep&&!q.value){let P=[];for(let j=0;j<q.sep.length;++j){let v=q.sep[j];switch(v.type){case"newline":P.push(j);break;case"space":break;case"comment":if(v.indent>_.indent)P.length=0;break;default:P.length=0}}if(P.length>=2)$=q.sep.splice(P[1])}switch(this.type){case"anchor":case"tag":if(K||q.value)$.push(this.sourceToken),_.items.push({start:$}),this.onKeyLine=!0;else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"explicit-key-ind":if(!q.sep&&!q.explicitKey)q.start.push(this.sourceToken),q.explicitKey=!0;else if(K||q.value)$.push(this.sourceToken),_.items.push({start:$,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(q.explicitKey)if(!q.sep)if(z8(q.start,"newline"))Object.assign(q,{key:null,sep:[this.sourceToken]});else{let P=
|
|
163
|
+
`,q)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(_){let q=_.items[_.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,q.value){let f="end"in q.value?q.value.end:void 0;if((Array.isArray(f)?f[f.length-1]:void 0)?.type==="comment")f?.push(this.sourceToken);else _.items.push({start:[this.sourceToken]})}else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"space":case"comment":if(q.value)_.items.push({start:[this.sourceToken]});else if(q.sep)q.sep.push(this.sourceToken);else{if(this.atIndentedComment(q.start,_.indent)){let K=_.items[_.items.length-2]?.value?.end;if(Array.isArray(K)){Array.prototype.push.apply(K,q.start),K.push(this.sourceToken),_.items.pop();return}}q.start.push(this.sourceToken)}return}if(this.indent>=_.indent){let f=!this.onKeyLine&&this.indent===_.indent,K=f&&(q.sep||q.explicitKey)&&this.type!=="seq-item-ind",$=[];if(K&&q.sep&&!q.value){let P=[];for(let j=0;j<q.sep.length;++j){let v=q.sep[j];switch(v.type){case"newline":P.push(j);break;case"space":break;case"comment":if(v.indent>_.indent)P.length=0;break;default:P.length=0}}if(P.length>=2)$=q.sep.splice(P[1])}switch(this.type){case"anchor":case"tag":if(K||q.value)$.push(this.sourceToken),_.items.push({start:$}),this.onKeyLine=!0;else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"explicit-key-ind":if(!q.sep&&!q.explicitKey)q.start.push(this.sourceToken),q.explicitKey=!0;else if(K||q.value)$.push(this.sourceToken),_.items.push({start:$,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(q.explicitKey)if(!q.sep)if(z8(q.start,"newline"))Object.assign(q,{key:null,sep:[this.sourceToken]});else{let P=N6(q.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:P,key:null,sep:[this.sourceToken]}]})}else if(q.value)_.items.push({start:[],key:null,sep:[this.sourceToken]});else if(z8(q.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:$,key:null,sep:[this.sourceToken]}]});else if(fO(q.key)&&!z8(q.sep,"newline")){let P=N6(q.start),j=q.key,v=q.sep;v.push(this.sourceToken),delete q.key,delete q.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:P,key:j,sep:v}]})}else if($.length>0)q.sep=q.sep.concat($,this.sourceToken);else q.sep.push(this.sourceToken);else if(!q.sep)Object.assign(q,{key:null,sep:[this.sourceToken]});else if(q.value||K)_.items.push({start:$,key:null,sep:[this.sourceToken]});else if(z8(q.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else q.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let P=this.flowScalar(this.type);if(K||q.value)_.items.push({start:$,key:P,sep:[]}),this.onKeyLine=!0;else if(q.sep)this.stack.push(P);else Object.assign(q,{key:P,sep:[]}),this.onKeyLine=!0;return}default:{let P=this.startBlockValue(_);if(P){if(P.type==="block-seq"){if(!q.explicitKey&&q.sep&&!z8(q.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(f)_.items.push({start:$});this.stack.push(P);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(_){let q=_.items[_.items.length-1];switch(this.type){case"newline":if(q.value){let f="end"in q.value?q.value.end:void 0;if((Array.isArray(f)?f[f.length-1]:void 0)?.type==="comment")f?.push(this.sourceToken);else _.items.push({start:[this.sourceToken]})}else q.start.push(this.sourceToken);return;case"space":case"comment":if(q.value)_.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(q.start,_.indent)){let K=_.items[_.items.length-2]?.value?.end;if(Array.isArray(K)){Array.prototype.push.apply(K,q.start),K.push(this.sourceToken),_.items.pop();return}}q.start.push(this.sourceToken)}return;case"anchor":case"tag":if(q.value||this.indent<=_.indent)break;q.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==_.indent)break;if(q.value||z8(q.start,"seq-item-ind"))_.items.push({start:[this.sourceToken]});else q.start.push(this.sourceToken);return}if(this.indent>_.indent){let f=this.startBlockValue(_);if(f){this.stack.push(f);return}}yield*this.pop(),yield*this.step()}*flowCollection(_){let q=_.items[_.items.length-1];if(this.type==="flow-error-end"){let f;do yield*this.pop(),f=this.peek(1);while(f&&f.type==="flow-collection")}else if(_.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!q||q.sep)_.items.push({start:[this.sourceToken]});else q.start.push(this.sourceToken);return;case"map-value-ind":if(!q||q.value)_.items.push({start:[],key:null,sep:[this.sourceToken]});else if(q.sep)q.sep.push(this.sourceToken);else Object.assign(q,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!q||q.value)_.items.push({start:[this.sourceToken]});else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let K=this.flowScalar(this.type);if(!q||q.value)_.items.push({start:[],key:K,sep:[]});else if(q.sep)this.stack.push(K);else Object.assign(q,{key:K,sep:[]});return}case"flow-map-end":case"flow-seq-end":_.end.push(this.sourceToken);return}let f=this.startBlockValue(_);if(f)this.stack.push(f);else yield*this.pop(),yield*this.step()}else{let f=this.peek(2);if(f.type==="block-map"&&(this.type==="map-value-ind"&&f.indent===_.indent||this.type==="newline"&&!f.items[f.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&f.type!=="flow-collection"){let K=pK(f),$=N6(K);_O(_);let P=_.end.splice(1,_.end.length);P.push(this.sourceToken);let j={type:"block-map",offset:_.offset,indent:_.indent,items:[{start:$,key:_,sep:P}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=j}else yield*this.lineEnd(_)}}flowScalar(_){if(this.onNewLine){let q=this.source.indexOf(`
|
|
164
164
|
`)+1;while(q!==0)this.onNewLine(this.offset+q),q=this.source.indexOf(`
|
|
165
|
-
`,q)+1}return{type:_,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(_){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let q=
|
|
166
|
-
`);if(
|
|
167
|
-
`),
|
|
168
|
-
`),
|
|
169
|
-
`).trim(),
|
|
165
|
+
`,q)+1}return{type:_,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(_){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let q=pK(_),f=N6(q);return f.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let q=pK(_),f=N6(q);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(_,q){if(this.type!=="comment")return!1;if(this.indent<=q)return!1;return _.every((f)=>f.type==="newline"||f.type==="space")}*documentEnd(_){if(this.type!=="doc-mode"){if(_.end)_.end.push(this.sourceToken);else _.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(_){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if(_.end)_.end.push(this.sourceToken);else _.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}SS.Parser=$O});var wO=l((dS)=>{var KO=l4(),CS=Vf(),lf=Mf(),pS=i3(),lS=Oq(),nS=i4(),PO=o4();function jO(_){let q=_.prettyErrors!==!1;return{lineCounter:_.lineCounter||q&&new nS.LineCounter||null,prettyErrors:q}}function RS(_,q={}){let{lineCounter:f,prettyErrors:K}=jO(q),$=new PO.Parser(f?.addNewLine),P=new KO.Composer(q),j=Array.from(P.compose($.parse(_)));if(K&&f)for(let v of j)v.errors.forEach(lf.prettifyError(_,f)),v.warnings.forEach(lf.prettifyError(_,f));if(j.length>0)return j;return Object.assign([],{empty:!0},P.streamInfo())}function vO(_,q={}){let{lineCounter:f,prettyErrors:K}=jO(q),$=new PO.Parser(f?.addNewLine),P=new KO.Composer(q),j=null;for(let v of P.compose($.parse(_),!0,_.length))if(!j)j=v;else if(j.options.logLevel!=="silent"){j.errors.push(new lf.YAMLParseError(v.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(K&&f)j.errors.forEach(lf.prettifyError(_,f)),j.warnings.forEach(lf.prettifyError(_,f));return j}function ES(_,q,f){let K=void 0;if(typeof q==="function")K=q;else if(f===void 0&&q&&typeof q==="object")f=q;let $=vO(_,f);if(!$)return null;if($.warnings.forEach((P)=>pS.warn($.options.logLevel,P)),$.errors.length>0)if($.options.logLevel!=="silent")throw $.errors[0];else $.errors=[];return $.toJS(Object.assign({reviver:K},f))}function gS(_,q,f){let K=null;if(typeof q==="function"||Array.isArray(q))K=q;else if(f===void 0&&q)f=q;if(typeof f==="string")f=f.length;if(typeof f==="number"){let $=Math.round(f);f=$<1?void 0:$>8?{indent:8}:{indent:$}}if(_===void 0){let{keepUndefined:$}=f??q??{};if(!$)return}if(lS.isDocument(_)&&!K)return _.toString(f);return new CS.Document(_,K,f).toString(f)}dS.parse=ES;dS.parseAllDocuments=RS;dS.parseDocument=vO;dS.stringify=gS});var YO=l((qN)=>{var iS=l4(),oS=Vf(),cS=J4(),c4=Mf(),LS=Tf(),W8=Oq(),tS=w8(),eS=nq(),xS=Y8(),sS=T8(),BS=NK(),US=y4(),FS=i4(),QS=o4(),lK=wO(),OO=Of();qN.Composer=iS.Composer;qN.Document=oS.Document;qN.Schema=cS.Schema;qN.YAMLError=c4.YAMLError;qN.YAMLParseError=c4.YAMLParseError;qN.YAMLWarning=c4.YAMLWarning;qN.Alias=LS.Alias;qN.isAlias=W8.isAlias;qN.isCollection=W8.isCollection;qN.isDocument=W8.isDocument;qN.isMap=W8.isMap;qN.isNode=W8.isNode;qN.isPair=W8.isPair;qN.isScalar=W8.isScalar;qN.isSeq=W8.isSeq;qN.Pair=tS.Pair;qN.Scalar=eS.Scalar;qN.YAMLMap=xS.YAMLMap;qN.YAMLSeq=sS.YAMLSeq;qN.CST=BS;qN.Lexer=US.Lexer;qN.LineCounter=FS.LineCounter;qN.Parser=QS.Parser;qN.parse=lK.parse;qN.parseAllDocuments=lK.parseAllDocuments;qN.parseDocument=lK.parseDocument;qN.stringify=lK.stringify;qN.visit=OO.visit;qN.visitAsync=OO.visitAsync});import{dirname as CN}from"path";var zO,WO,pN=".index.json",TO="---",HO=(_)=>{let{projectFileService:q,projectFolderService:f,sharedFileService:K,sharedFolderService:$}=_,P=(r)=>{return r==="project"?q:K},j=(r)=>{return r==="project"?f:$},v=(r)=>{return pN},w=(r,m,A)=>{let V=new Error(m);if(V.code=r,A!==void 0)V.data=A;throw V},O=(r)=>{if(!r||r.trim().length===0)return{valid:!1,reason:"Path cannot be empty"};if(r.startsWith("/"))return{valid:!1,reason:"Path cannot start with /"};if(r.includes(".."))return{valid:!1,reason:"Path cannot contain .."};if(/[<>:"|?*\x00]/.test(r))return{valid:!1,reason:"Path contains invalid characters"};return{valid:!0,normalized:r.replace(/\\/g,"/").replace(/^\/+|\/+$/g,"")}},T=async(r)=>{let m=v(r),A=P(r);try{let V=await A.readText(m);return JSON.parse(V)}catch(V){if(V.code==="NOT_FOUND")return{id:{},pathToId:{}};throw V}},Y=async(r,m)=>{let A=v(r),V=P(r),n=JSON.stringify(m,null,2);await V.writeText(A,n)},z=(r)=>{let m=r.split(`
|
|
166
|
+
`);if(m.length<3||m[0].trim()!==TO)return{bodyContent:r,isValid:!1,validationError:"Missing front matter delimiter"};let A=-1;for(let Q=1;Q<m.length;Q++)if(m[Q].trim()===TO){A=Q;break}if(A===-1)return{bodyContent:r,isValid:!1,validationError:"Missing closing front matter delimiter"};let V=m.slice(1,A).join(`
|
|
167
|
+
`),n=m.slice(0,A+1).join(`
|
|
168
|
+
`),a=m.slice(A+1).join(`
|
|
169
|
+
`).trim(),I;try{I=WO.default.parse(V)}catch(Q){return{bodyContent:r,isValid:!1,validationError:`YAML parse error: ${Q.message}`}}if(!I.type)return{rawFrontMatter:n,bodyContent:a,isValid:!1,validationError:"Missing required field: type"};let c=["prompt","doc","story-spec","story-tech-doc","subtask","review","feedback","feedback-review","retro"];if(!c.includes(I.type))return{rawFrontMatter:n,bodyContent:a,isValid:!1,validationError:`Invalid type: ${I.type}. Must be one of: ${c.join(", ")}`};if(!I.params)return{rawFrontMatter:n,bodyContent:a,isValid:!1,validationError:"Missing required field: params"};if(typeof I.params!=="object"||Array.isArray(I.params))return{rawFrontMatter:n,bodyContent:a,isValid:!1,validationError:"params must be an object"};let o=["string","number","boolean"],t={};for(let[Q,Hq]of Object.entries(I.params)){if(typeof Hq!=="object"||Array.isArray(Hq))return{rawFrontMatter:n,bodyContent:a,isValid:!1,validationError:`Parameter ${Q} definition must be an object`};let Pq=Hq;if(!Pq.type)return{rawFrontMatter:n,bodyContent:a,isValid:!1,validationError:`Parameter ${Q} missing type field`};if(!o.includes(Pq.type))return{rawFrontMatter:n,bodyContent:a,isValid:!1,validationError:`Parameter ${Q} has invalid type: ${Pq.type}. Must be one of: ${o.join(", ")}`};if(Pq.required!==void 0&&typeof Pq.required!=="boolean")return{rawFrontMatter:n,bodyContent:a,isValid:!1,validationError:`Parameter ${Q} required field must be boolean`};t[Q]={type:Pq.type,required:Pq.required??!1,description:Pq.description,default:Pq.default}}return{rawFrontMatter:n,frontMatter:{type:I.type,params:t,synopsis:I.synopsis,...I},bodyContent:a,isValid:!0}},H=(r,m)=>{let A=r,V=0;for(let n of m){let a=A;switch(n.op){case"replaceOnce":A=A.replace(n.oldText,n.newText);break;case"replaceAll":{let I=n.oldText.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");A=A.replace(new RegExp(I,"g"),n.newText);break}case"replaceRegex":{let I=new RegExp(n.pattern,n.flags||"");A=A.replace(I,n.replacement);break}case"replaceAllContent":A=n.content;break}if(A!==a||n.op==="replaceAllContent")V++}return{content:A,applied:V}},k=async(r)=>{if(r.kind==="id"){let m=r.scope;if(!m){let n=cP(r.id);if(!n)w("INVALID_ID_FORMAT",`Invalid template ID format: ${r.id}`);m=n}if(!LP.validateIdForScope(r.id,m))w("INVALID_ID_FORMAT",`Invalid template ID format for ${m} scope: ${r.id}`);let V=(await T(m)).id[r.id];if(!V)w("TEMPLATE_NOT_FOUND",`Template not found: ${r.id}`);return{scope:m,path:V.path,id:r.id}}else{let m=O(r.path);if(!m.valid)w("INVALID_PATH_FORMAT",m.reason||"Invalid path format");let A=m.normalized;if(r.scope){let n=(await T(r.scope)).pathToId[A];if(!n)w("TEMPLATE_NOT_FOUND",`Template not found: ${A} in ${r.scope} scope`);return{scope:r.scope,path:A,id:n}}else{let n=(await T("project")).pathToId[A];if(n)return{scope:"project",path:A,id:n};let I=(await T("shared")).pathToId[A];if(I)return{scope:"shared",path:A,id:I};w("TEMPLATE_NOT_FOUND",`Template not found: ${A}`)}}},J=async(r)=>{let m=await T(r),A=r==="project"?"tpl":"stpl",V=new RegExp(`^${A}(\\d{3,})$`),n=0;for(let I of Object.keys(m.id)){let c=I.match(V);if(c){let o=parseInt(c[1],10);if(o>n)n=o}}let a=n+1;return`${A}${a.toString().padStart(3,"0")}`},h=(r,m,A)=>{if(m==="string")return String(r);if(m==="number"){if(typeof r==="number")return r;let V=parseFloat(String(r));if(isNaN(V))w("INVALID_PARAM_TYPE",`Parameter ${A} must be a valid number, got: ${r}`);return V}if(m==="boolean"){if(typeof r==="boolean")return r;let V=String(r).toLowerCase();if(V==="true"||V==="1")return!0;if(V==="false"||V==="0")return!1;w("INVALID_PARAM_TYPE",`Parameter ${A} must be a boolean (true/false/1/0), got: ${r}`)}return r},X=async(r)=>{let m=r.address.scope||"project",A=O(r.address.path);if(!A.valid)w("INVALID_PATH_FORMAT",A.reason||"Invalid path format");let V=A.normalized;if(LP.isTemplateId(V))w("INVALID_PATH_FORMAT","Cannot create template with ID pattern as path");let n=await T(m);if(n.pathToId[V])w("TEMPLATE_ALREADY_EXISTS",`Template already exists at path: ${V}`);let a=z(r.content);if(!a.isValid)w("TEMPLATE_INVALID",a.validationError||"Invalid front matter");let I=await J(m),c=P(m),o=j(m),t=CN(V);if(t&&t!==".")await o.ensureDir(t);return await c.writeText(V,r.content),n.id[I]={path:V,isValid:!0,params:a.frontMatter.params},n.pathToId[V]=I,await Y(m,n),{id:I,path:V}},M=async(r)=>{let m=await k(r),V=await P(m.scope).readText(m.path),n=z(V);return{address:r,content:V,frontMatter:n.frontMatter,bodyContent:n.bodyContent,path:m.path,id:m.id,isValid:n.isValid}},b=async(r,m)=>{let A=Array.from(new Map(r.map((V)=>[JSON.stringify(V),V])).values());return Promise.all(A.map((V)=>M(V)))},N=async(r,m)=>{let A=await k(r),V=P(A.scope),n=await V.readText(A.path),{content:a,applied:I}=H(n,m),c=z(a);await V.writeText(A.path,a);let o=await T(A.scope);if(o.id[A.id]){if(o.id[A.id].isValid=c.isValid,c.isValid&&c.frontMatter)o.id[A.id].params=c.frontMatter.params;await Y(A.scope,o)}return{applied:I}},p=async(r)=>{try{let m=await k(r),A=P(m.scope);try{await A.delete(m.path)}catch(n){if(n.code==="NOT_FOUND"){let a=await T(m.scope);return delete a.id[m.id],delete a.pathToId[m.path],await Y(m.scope,a),{deleted:!1}}throw n}let V=await T(m.scope);return delete V.id[m.id],delete V.pathToId[m.path],await Y(m.scope,V),{deleted:!0}}catch(m){if(m.code==="TEMPLATE_NOT_FOUND")return{deleted:!1};throw m}};return Object.freeze({create:X,read:M,readMany:b,edit:N,delete:p,deleteMany:async(r)=>{let m=Array.from(new Map(r.map((V)=>[JSON.stringify(V),V])).values()),A=[];for(let V of m)A.push(await p(V));return A},list:async(r)=>{let{scope:m,pathPrefix:A,includeContent:V}=r||{};if(m){let n=await T(m),a=[];for(let[I,c]of Object.entries(n.id)){if(A&&!c.path.startsWith(A))continue;let o;if(V)try{let Q=await P(m).readText(c.path);o=z(Q).frontMatter?.synopsis}catch{}a.push({scope:m,id:I,path:c.path,synopsis:o,isValid:c.isValid})}return a.sort((I,c)=>I.path.localeCompare(c.path))}else{let n=await T("project"),a=await T("shared"),I=[],c=new Map;for(let o of Object.values(n.id)){if(!c.has(o.path))c.set(o.path,new Set);c.get(o.path).add("project")}for(let o of Object.values(a.id)){if(!c.has(o.path))c.set(o.path,new Set);c.get(o.path).add("shared")}for(let[o,t]of Object.entries(n.id)){if(A&&!t.path.startsWith(A))continue;let Q;if(V)try{let _q=await q.readText(t.path);Q=z(_q).frontMatter?.synopsis}catch{}let Hq=c.get(t.path),Pq=Hq&&Hq.size>1?"overrides":void 0;I.push({scope:"project",id:o,path:t.path,synopsis:Q,isValid:t.isValid,override:Pq})}for(let[o,t]of Object.entries(a.id)){if(A&&!t.path.startsWith(A))continue;let Q;if(V)try{let _q=await K.readText(t.path);Q=z(_q).frontMatter?.synopsis}catch{}let Hq=c.get(t.path),Pq=Hq&&Hq.size>1?"overridden":void 0;I.push({scope:"shared",id:o,path:t.path,synopsis:Q,isValid:t.isValid,override:Pq})}return I.sort((o,t)=>o.path.localeCompare(t.path))}},move:async(r,m,A)=>{let V=await k(r),n=A||V.scope,a=O(m);if(!a.valid)w("INVALID_PATH_FORMAT",a.reason||"Invalid destination path");let I=a.normalized;if(V.scope===n&&V.path===I)w("TEMPLATE_ALREADY_EXISTS","Source and destination are identical");if((await T(n)).pathToId[I])w("TEMPLATE_ALREADY_EXISTS",`Destination already exists: ${I}`);let t=await P(V.scope).readText(V.path),Q=await X({address:{kind:"path",scope:n,path:I},content:t});return await p(r),{oldId:V.id,newId:Q.id,oldPath:V.path,newPath:I,sourceScope:V.scope,destinationScope:n}},render:async(r,m)=>{let A=await k(r);if(!(await T(A.scope)).id[A.id].isValid)w("TEMPLATE_INVALID",`Template has invalid front matter: ${A.id}`);let I=await P(A.scope).readText(A.path),c=z(I);if(!c.isValid||!c.frontMatter)w("TEMPLATE_INVALID",`Template has invalid front matter: ${A.id}`);let o=c.frontMatter.params,t={};for(let[Pq,_q]of Object.entries(o)){if(_q.required&&!(Pq in m))w("MISSING_REQUIRED_PARAM",`Missing required parameter: ${Pq} for template ${A.id}`);let kq;if(Pq in m)kq=h(m[Pq],_q.type,Pq);else if(_q.default!==void 0)kq=_q.default;else continue;t[Pq]=kq}let Q=zO.default.create();return Q.registerHelper("helperMissing",function(){throw new Error("Custom helpers are not supported")}),Q.compile(c.bodyContent,{strict:!0,noEscape:!1,preventIndent:!1})(t)},getParameters:async(r)=>{let m=await k(r),V=(await T(m.scope)).id[m.id];if(!V.isValid)w("TEMPLATE_INVALID",`Template has invalid front matter: ${m.id}`);return V.params}})};var hO=b_(()=>{sv();zO=yK(_1(),1),WO=yK(YO(),1)});import{resolve as nK,dirname as lN}from"path";import{homedir as nN}from"os";import{existsSync as RN}from"fs";var EN=(_=process.cwd())=>{let q=nK(_),f=nK("/"),K=nK(nN(),".swic");while(q!==f){let $=nK(q,".swic");if($===K)throw new Error("Not in a project directory (found ~/.swic instead). Run swic from within a project.");if(RN($))return $;q=lN(q)}throw new Error("Could not find .swic directory. Are you in a SWIC project?")},JO;var kO=b_(()=>{JO=Object.freeze({findProjectRoot:EN})});var uO={};$7(uO,{default:()=>yN});import{mkdirSync as ZO}from"fs";import{resolve as XO}from"path";import{homedir as gN}from"os";var RK="docs",EK="templates",dN=".index.json",AO=(_,q)=>{try{ZO(_,{recursive:!0}),ZO(q,{recursive:!0})}catch(f){let K=f instanceof Error?f.message:String(f);throw new Error(`Failed to create swic directories. Please check permissions.
|
|
170
170
|
Project: ${_}
|
|
171
171
|
Shared: ${q}
|
|
172
|
-
Error: ${K}`)}},gN=()=>{let _;try{_=HO.findProjectRoot()}catch{_=kO(process.cwd(),".swic")}let q=kO(RN(),".swic"),f=`${_}/${lK}`,K=`${q}/${lK}`,$=`${_}/${nK}`,P=`${q}/${nK}`;return ZO(f,K),ZO($,P),{projectDataDir:_,sharedDataDir:q}},dN=(_)=>{let{projectBoundaryDir:q,sharedBoundaryDir:f}=_,K=`${q}/${lK}`,$=`${f}/${lK}`,P=`${q}/${nK}`,j=`${f}/${nK}`,v=Uf.create({boundaryDir:K}),w=Uf.create({boundaryDir:$}),O=Ff.create({boundaryDir:K}),T=Ff.create({boundaryDir:$}),Y=Uf.create({boundaryDir:P}),z=Uf.create({boundaryDir:j}),H=Ff.create({boundaryDir:P}),h=Ff.create({boundaryDir:j}),J=cv.create({fileServiceByScope:{project:v,shared:w},folderServiceByScope:{project:O,shared:T},indexFilename:EN}),k=zO({projectFileService:Y,projectFolderService:H,sharedFileService:z,sharedFolderService:h});return Object.freeze({DocService:J,TemplateService:k})},aN,IN;var AO=b_(()=>{av();iv();Lv();WO();hO();aN=Object.freeze({createServices:dN,lazilyGetDataDirs:gN}),IN=aN});var W={};_7(W,{void:()=>NY,util:()=>Kq,unknown:()=>MY,union:()=>nY,undefined:()=>rY,tuple:()=>gY,transformer:()=>tY,symbol:()=>mY,string:()=>Y7,strictObject:()=>lY,setErrorMap:()=>xO,set:()=>IY,record:()=>dY,quotelessJson:()=>tO,promise:()=>LY,preprocess:()=>sY,pipeline:()=>BY,ostring:()=>UY,optional:()=>eY,onumber:()=>FY,oboolean:()=>QY,objectUtil:()=>DK,object:()=>pY,number:()=>T7,nullable:()=>xY,null:()=>bY,never:()=>SY,nativeEnum:()=>cY,nan:()=>AY,map:()=>aY,makeIssue:()=>gf,literal:()=>iY,lazy:()=>yY,late:()=>ZY,isValid:()=>B_,isDirty:()=>a6,isAsync:()=>e8,isAborted:()=>d6,intersection:()=>EY,instanceof:()=>XY,getParsedType:()=>V_,getErrorMap:()=>t8,function:()=>DY,enum:()=>oY,effect:()=>tY,discriminatedUnion:()=>RY,defaultErrorMap:()=>I_,datetimeRegex:()=>v7,date:()=>GY,custom:()=>O7,coerce:()=>qT,boolean:()=>z7,bigint:()=>uY,array:()=>CY,any:()=>VY,addIssueToContext:()=>t,ZodVoid:()=>af,ZodUnknown:()=>U_,ZodUnion:()=>Q8,ZodUndefined:()=>U8,ZodType:()=>$q,ZodTuple:()=>S_,ZodTransformer:()=>h_,ZodSymbol:()=>df,ZodString:()=>T_,ZodSet:()=>m8,ZodSchema:()=>$q,ZodRecord:()=>If,ZodReadonly:()=>jf,ZodPromise:()=>r8,ZodPipeline:()=>of,ZodParsedType:()=>o,ZodOptional:()=>W_,ZodObject:()=>bq,ZodNumber:()=>F_,ZodNullable:()=>y_,ZodNull:()=>F8,ZodNever:()=>M_,ZodNativeEnum:()=>$f,ZodNaN:()=>yf,ZodMap:()=>Df,ZodLiteral:()=>ff,ZodLazy:()=>_f,ZodIssueCode:()=>y,ZodIntersection:()=>qf,ZodFunction:()=>s8,ZodFirstPartyTypeKind:()=>i,ZodError:()=>eq,ZodEnum:()=>q8,ZodEffects:()=>h_,ZodDiscriminatedUnion:()=>I6,ZodDefault:()=>Kf,ZodDate:()=>u8,ZodCatch:()=>Pf,ZodBranded:()=>D6,ZodBoolean:()=>B8,ZodBigInt:()=>Q_,ZodArray:()=>z_,ZodAny:()=>G8,Schema:()=>$q,ParseStatus:()=>aq,OK:()=>yq,NEVER:()=>_T,INVALID:()=>U,EMPTY_PATH:()=>sO,DIRTY:()=>A8,BRAND:()=>kY});var Kq;(function(_){_.assertEqual=($)=>{};function q($){}_.assertIs=q;function f($){throw new Error}_.assertNever=f,_.arrayToEnum=($)=>{let P={};for(let j of $)P[j]=j;return P},_.getValidEnumValues=($)=>{let P=_.objectKeys($).filter((v)=>typeof $[$[v]]!=="number"),j={};for(let v of P)j[v]=$[v];return _.objectValues(j)},_.objectValues=($)=>{return _.objectKeys($).map(function(P){return $[P]})},_.objectKeys=typeof Object.keys==="function"?($)=>Object.keys($):($)=>{let P=[];for(let j in $)if(Object.prototype.hasOwnProperty.call($,j))P.push(j);return P},_.find=($,P)=>{for(let j of $)if(P(j))return j;return},_.isInteger=typeof Number.isInteger==="function"?($)=>Number.isInteger($):($)=>typeof $==="number"&&Number.isFinite($)&&Math.floor($)===$;function K($,P=" | "){return $.map((j)=>typeof j==="string"?`'${j}'`:j).join(P)}_.joinValues=K,_.jsonStringifyReplacer=($,P)=>{if(typeof P==="bigint")return P.toString();return P}})(Kq||(Kq={}));var DK;(function(_){_.mergeShapes=(q,f)=>{return{...q,...f}}})(DK||(DK={}));var o=Kq.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),V_=(_)=>{switch(typeof _){case"undefined":return o.undefined;case"string":return o.string;case"number":return Number.isNaN(_)?o.nan:o.number;case"boolean":return o.boolean;case"function":return o.function;case"bigint":return o.bigint;case"symbol":return o.symbol;case"object":if(Array.isArray(_))return o.array;if(_===null)return o.null;if(_.then&&typeof _.then==="function"&&_.catch&&typeof _.catch==="function")return o.promise;if(typeof Map!=="undefined"&&_ instanceof Map)return o.map;if(typeof Set!=="undefined"&&_ instanceof Set)return o.set;if(typeof Date!=="undefined"&&_ instanceof Date)return o.date;return o.object;default:return o.unknown}};var y=Kq.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),tO=(_)=>{return JSON.stringify(_,null,2).replace(/"([^"]+)":/g,"$1:")};class eq extends Error{get errors(){return this.issues}constructor(_){super();this.issues=[],this.addIssue=(f)=>{this.issues=[...this.issues,f]},this.addIssues=(f=[])=>{this.issues=[...this.issues,...f]};let q=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,q);else this.__proto__=q;this.name="ZodError",this.issues=_}format(_){let q=_||function($){return $.message},f={_errors:[]},K=($)=>{for(let P of $.issues)if(P.code==="invalid_union")P.unionErrors.map(K);else if(P.code==="invalid_return_type")K(P.returnTypeError);else if(P.code==="invalid_arguments")K(P.argumentsError);else if(P.path.length===0)f._errors.push(q(P));else{let j=f,v=0;while(v<P.path.length){let w=P.path[v];if(v!==P.path.length-1)j[w]=j[w]||{_errors:[]};else j[w]=j[w]||{_errors:[]},j[w]._errors.push(q(P));j=j[w],v++}}};return K(this),f}static assert(_){if(!(_ instanceof eq))throw new Error(`Not a ZodError: ${_}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Kq.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(_=(q)=>q.message){let q={},f=[];for(let K of this.issues)if(K.path.length>0){let $=K.path[0];q[$]=q[$]||[],q[$].push(_(K))}else f.push(_(K));return{formErrors:f,fieldErrors:q}}get formErrors(){return this.flatten()}}eq.create=(_)=>{return new eq(_)};var eO=(_,q)=>{let f;switch(_.code){case y.invalid_type:if(_.received===o.undefined)f="Required";else f=`Expected ${_.expected}, received ${_.received}`;break;case y.invalid_literal:f=`Invalid literal value, expected ${JSON.stringify(_.expected,Kq.jsonStringifyReplacer)}`;break;case y.unrecognized_keys:f=`Unrecognized key(s) in object: ${Kq.joinValues(_.keys,", ")}`;break;case y.invalid_union:f="Invalid input";break;case y.invalid_union_discriminator:f=`Invalid discriminator value. Expected ${Kq.joinValues(_.options)}`;break;case y.invalid_enum_value:f=`Invalid enum value. Expected ${Kq.joinValues(_.options)}, received '${_.received}'`;break;case y.invalid_arguments:f="Invalid function arguments";break;case y.invalid_return_type:f="Invalid function return type";break;case y.invalid_date:f="Invalid date";break;case y.invalid_string:if(typeof _.validation==="object")if("includes"in _.validation){if(f=`Invalid input: must include "${_.validation.includes}"`,typeof _.validation.position==="number")f=`${f} at one or more positions greater than or equal to ${_.validation.position}`}else if("startsWith"in _.validation)f=`Invalid input: must start with "${_.validation.startsWith}"`;else if("endsWith"in _.validation)f=`Invalid input: must end with "${_.validation.endsWith}"`;else Kq.assertNever(_.validation);else if(_.validation!=="regex")f=`Invalid ${_.validation}`;else f="Invalid";break;case y.too_small:if(_.type==="array")f=`Array must contain ${_.exact?"exactly":_.inclusive?"at least":"more than"} ${_.minimum} element(s)`;else if(_.type==="string")f=`String must contain ${_.exact?"exactly":_.inclusive?"at least":"over"} ${_.minimum} character(s)`;else if(_.type==="number")f=`Number must be ${_.exact?"exactly equal to ":_.inclusive?"greater than or equal to ":"greater than "}${_.minimum}`;else if(_.type==="bigint")f=`Number must be ${_.exact?"exactly equal to ":_.inclusive?"greater than or equal to ":"greater than "}${_.minimum}`;else if(_.type==="date")f=`Date must be ${_.exact?"exactly equal to ":_.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(_.minimum))}`;else f="Invalid input";break;case y.too_big:if(_.type==="array")f=`Array must contain ${_.exact?"exactly":_.inclusive?"at most":"less than"} ${_.maximum} element(s)`;else if(_.type==="string")f=`String must contain ${_.exact?"exactly":_.inclusive?"at most":"under"} ${_.maximum} character(s)`;else if(_.type==="number")f=`Number must be ${_.exact?"exactly":_.inclusive?"less than or equal to":"less than"} ${_.maximum}`;else if(_.type==="bigint")f=`BigInt must be ${_.exact?"exactly":_.inclusive?"less than or equal to":"less than"} ${_.maximum}`;else if(_.type==="date")f=`Date must be ${_.exact?"exactly":_.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(_.maximum))}`;else f="Invalid input";break;case y.custom:f="Invalid input";break;case y.invalid_intersection_types:f="Intersection results could not be merged";break;case y.not_multiple_of:f=`Number must be a multiple of ${_.multipleOf}`;break;case y.not_finite:f="Number must be finite";break;default:f=q.defaultError,Kq.assertNever(_)}return{message:f}},I_=eO;var f7=I_;function xO(_){f7=_}function t8(){return f7}var gf=(_)=>{let{data:q,path:f,errorMaps:K,issueData:$}=_,P=[...f,...$.path||[]],j={...$,path:P};if($.message!==void 0)return{...$,path:P,message:$.message};let v="",w=K.filter((O)=>!!O).slice().reverse();for(let O of w)v=O(j,{data:q,defaultError:v}).message;return{...$,path:P,message:v}},sO=[];function t(_,q){let f=t8(),K=gf({issueData:q,data:_.data,path:_.path,errorMaps:[_.common.contextualErrorMap,_.schemaErrorMap,f,f===I_?void 0:I_].filter(($)=>!!$)});_.common.issues.push(K)}class aq{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(_,q){let f=[];for(let K of q){if(K.status==="aborted")return U;if(K.status==="dirty")_.dirty();f.push(K.value)}return{status:_.value,value:f}}static async mergeObjectAsync(_,q){let f=[];for(let K of q){let $=await K.key,P=await K.value;f.push({key:$,value:P})}return aq.mergeObjectSync(_,f)}static mergeObjectSync(_,q){let f={};for(let K of q){let{key:$,value:P}=K;if($.status==="aborted")return U;if(P.status==="aborted")return U;if($.status==="dirty")_.dirty();if(P.status==="dirty")_.dirty();if($.value!=="__proto__"&&(typeof P.value!=="undefined"||K.alwaysSet))f[$.value]=P.value}return{status:_.value,value:f}}}var U=Object.freeze({status:"aborted"}),A8=(_)=>({status:"dirty",value:_}),yq=(_)=>({status:"valid",value:_}),d6=(_)=>_.status==="aborted",a6=(_)=>_.status==="dirty",B_=(_)=>_.status==="valid",e8=(_)=>typeof Promise!=="undefined"&&_ instanceof Promise;var B;(function(_){_.errToObj=(q)=>typeof q==="string"?{message:q}:q||{},_.toString=(q)=>typeof q==="string"?q:q?.message})(B||(B={}));class H_{constructor(_,q,f,K){this._cachedPath=[],this.parent=_,this.data=q,this._path=f,this._key=K}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var $7=(_,q)=>{if(B_(q))return{success:!0,data:q.value};else{if(!_.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let f=new eq(_.common.issues);return this._error=f,this._error}}}};function qq(_){if(!_)return{};let{errorMap:q,invalid_type_error:f,required_error:K,description:$}=_;if(q&&(f||K))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(q)return{errorMap:q,description:$};return{errorMap:(j,v)=>{let{message:w}=_;if(j.code==="invalid_enum_value")return{message:w??v.defaultError};if(typeof v.data==="undefined")return{message:w??K??v.defaultError};if(j.code!=="invalid_type")return{message:v.defaultError};return{message:w??f??v.defaultError}},description:$}}class $q{get description(){return this._def.description}_getType(_){return V_(_.data)}_getOrReturnCtx(_,q){return q||{common:_.parent.common,data:_.data,parsedType:V_(_.data),schemaErrorMap:this._def.errorMap,path:_.path,parent:_.parent}}_processInputParams(_){return{status:new aq,ctx:{common:_.parent.common,data:_.data,parsedType:V_(_.data),schemaErrorMap:this._def.errorMap,path:_.path,parent:_.parent}}}_parseSync(_){let q=this._parse(_);if(e8(q))throw new Error("Synchronous parse encountered promise.");return q}_parseAsync(_){let q=this._parse(_);return Promise.resolve(q)}parse(_,q){let f=this.safeParse(_,q);if(f.success)return f.data;throw f.error}safeParse(_,q){let f={common:{issues:[],async:q?.async??!1,contextualErrorMap:q?.errorMap},path:q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:_,parsedType:V_(_)},K=this._parseSync({data:_,path:f.path,parent:f});return $7(f,K)}"~validate"(_){let q={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:_,parsedType:V_(_)};if(!this["~standard"].async)try{let f=this._parseSync({data:_,path:[],parent:q});return B_(f)?{value:f.value}:{issues:q.common.issues}}catch(f){if(f?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;q.common={issues:[],async:!0}}return this._parseAsync({data:_,path:[],parent:q}).then((f)=>B_(f)?{value:f.value}:{issues:q.common.issues})}async parseAsync(_,q){let f=await this.safeParseAsync(_,q);if(f.success)return f.data;throw f.error}async safeParseAsync(_,q){let f={common:{issues:[],contextualErrorMap:q?.errorMap,async:!0},path:q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:_,parsedType:V_(_)},K=this._parse({data:_,path:f.path,parent:f}),$=await(e8(K)?K:Promise.resolve(K));return $7(f,$)}refine(_,q){let f=(K)=>{if(typeof q==="string"||typeof q==="undefined")return{message:q};else if(typeof q==="function")return q(K);else return q};return this._refinement((K,$)=>{let P=_(K),j=()=>$.addIssue({code:y.custom,...f(K)});if(typeof Promise!=="undefined"&&P instanceof Promise)return P.then((v)=>{if(!v)return j(),!1;else return!0});if(!P)return j(),!1;else return!0})}refinement(_,q){return this._refinement((f,K)=>{if(!_(f))return K.addIssue(typeof q==="function"?q(f,K):q),!1;else return!0})}_refinement(_){return new h_({schema:this,typeName:i.ZodEffects,effect:{type:"refinement",refinement:_}})}superRefine(_){return this._refinement(_)}constructor(_){this.spa=this.safeParseAsync,this._def=_,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(q)=>this["~validate"](q)}}optional(){return W_.create(this,this._def)}nullable(){return y_.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return z_.create(this)}promise(){return r8.create(this,this._def)}or(_){return Q8.create([this,_],this._def)}and(_){return qf.create(this,_,this._def)}transform(_){return new h_({...qq(this._def),schema:this,typeName:i.ZodEffects,effect:{type:"transform",transform:_}})}default(_){let q=typeof _==="function"?_:()=>_;return new Kf({...qq(this._def),innerType:this,defaultValue:q,typeName:i.ZodDefault})}brand(){return new D6({typeName:i.ZodBranded,type:this,...qq(this._def)})}catch(_){let q=typeof _==="function"?_:()=>_;return new Pf({...qq(this._def),innerType:this,catchValue:q,typeName:i.ZodCatch})}describe(_){return new this.constructor({...this._def,description:_})}pipe(_){return of.create(this,_)}readonly(){return jf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var BO=/^c[^\s-]{8,}$/i,UO=/^[0-9a-z]+$/,FO=/^[0-9A-HJKMNP-TV-Z]{26}$/i,QO=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,qY=/^[a-z0-9_-]{21}$/i,_Y=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,fY=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,$Y=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,KY="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",yK,PY=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jY=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,vY=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,wY=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,OY=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,YY=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,P7="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",TY=new RegExp(`^${P7}$`);function j7(_){let q="[0-5]\\d";if(_.precision)q=`${q}\\.\\d{${_.precision}}`;else if(_.precision==null)q=`${q}(\\.\\d+)?`;let f=_.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${q})${f}`}function zY(_){return new RegExp(`^${j7(_)}$`)}function v7(_){let q=`${P7}T${j7(_)}`,f=[];if(f.push(_.local?"Z?":"Z"),_.offset)f.push("([+-]\\d{2}:?\\d{2})");return q=`${q}(${f.join("|")})`,new RegExp(`^${q}$`)}function WY(_,q){if((q==="v4"||!q)&&PY.test(_))return!0;if((q==="v6"||!q)&&vY.test(_))return!0;return!1}function HY(_,q){if(!_Y.test(_))return!1;try{let[f]=_.split(".");if(!f)return!1;let K=f.replace(/-/g,"+").replace(/_/g,"/").padEnd(f.length+(4-f.length%4)%4,"="),$=JSON.parse(atob(K));if(typeof $!=="object"||$===null)return!1;if("typ"in $&&$?.typ!=="JWT")return!1;if(!$.alg)return!1;if(q&&$.alg!==q)return!1;return!0}catch{return!1}}function hY(_,q){if((q==="v4"||!q)&&jY.test(_))return!0;if((q==="v6"||!q)&&wY.test(_))return!0;return!1}class T_ extends $q{_parse(_){if(this._def.coerce)_.data=String(_.data);if(this._getType(_)!==o.string){let $=this._getOrReturnCtx(_);return t($,{code:y.invalid_type,expected:o.string,received:$.parsedType}),U}let f=new aq,K=void 0;for(let $ of this._def.checks)if($.kind==="min"){if(_.data.length<$.value)K=this._getOrReturnCtx(_,K),t(K,{code:y.too_small,minimum:$.value,type:"string",inclusive:!0,exact:!1,message:$.message}),f.dirty()}else if($.kind==="max"){if(_.data.length>$.value)K=this._getOrReturnCtx(_,K),t(K,{code:y.too_big,maximum:$.value,type:"string",inclusive:!0,exact:!1,message:$.message}),f.dirty()}else if($.kind==="length"){let P=_.data.length>$.value,j=_.data.length<$.value;if(P||j){if(K=this._getOrReturnCtx(_,K),P)t(K,{code:y.too_big,maximum:$.value,type:"string",inclusive:!0,exact:!0,message:$.message});else if(j)t(K,{code:y.too_small,minimum:$.value,type:"string",inclusive:!0,exact:!0,message:$.message});f.dirty()}}else if($.kind==="email"){if(!$Y.test(_.data))K=this._getOrReturnCtx(_,K),t(K,{validation:"email",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="emoji"){if(!yK)yK=new RegExp(KY,"u");if(!yK.test(_.data))K=this._getOrReturnCtx(_,K),t(K,{validation:"emoji",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="uuid"){if(!QO.test(_.data))K=this._getOrReturnCtx(_,K),t(K,{validation:"uuid",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="nanoid"){if(!qY.test(_.data))K=this._getOrReturnCtx(_,K),t(K,{validation:"nanoid",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="cuid"){if(!BO.test(_.data))K=this._getOrReturnCtx(_,K),t(K,{validation:"cuid",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="cuid2"){if(!UO.test(_.data))K=this._getOrReturnCtx(_,K),t(K,{validation:"cuid2",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="ulid"){if(!FO.test(_.data))K=this._getOrReturnCtx(_,K),t(K,{validation:"ulid",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="url")try{new URL(_.data)}catch{K=this._getOrReturnCtx(_,K),t(K,{validation:"url",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="regex"){if($.regex.lastIndex=0,!$.regex.test(_.data))K=this._getOrReturnCtx(_,K),t(K,{validation:"regex",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="trim")_.data=_.data.trim();else if($.kind==="includes"){if(!_.data.includes($.value,$.position))K=this._getOrReturnCtx(_,K),t(K,{code:y.invalid_string,validation:{includes:$.value,position:$.position},message:$.message}),f.dirty()}else if($.kind==="toLowerCase")_.data=_.data.toLowerCase();else if($.kind==="toUpperCase")_.data=_.data.toUpperCase();else if($.kind==="startsWith"){if(!_.data.startsWith($.value))K=this._getOrReturnCtx(_,K),t(K,{code:y.invalid_string,validation:{startsWith:$.value},message:$.message}),f.dirty()}else if($.kind==="endsWith"){if(!_.data.endsWith($.value))K=this._getOrReturnCtx(_,K),t(K,{code:y.invalid_string,validation:{endsWith:$.value},message:$.message}),f.dirty()}else if($.kind==="datetime"){if(!v7($).test(_.data))K=this._getOrReturnCtx(_,K),t(K,{code:y.invalid_string,validation:"datetime",message:$.message}),f.dirty()}else if($.kind==="date"){if(!TY.test(_.data))K=this._getOrReturnCtx(_,K),t(K,{code:y.invalid_string,validation:"date",message:$.message}),f.dirty()}else if($.kind==="time"){if(!zY($).test(_.data))K=this._getOrReturnCtx(_,K),t(K,{code:y.invalid_string,validation:"time",message:$.message}),f.dirty()}else if($.kind==="duration"){if(!fY.test(_.data))K=this._getOrReturnCtx(_,K),t(K,{validation:"duration",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="ip"){if(!WY(_.data,$.version))K=this._getOrReturnCtx(_,K),t(K,{validation:"ip",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="jwt"){if(!HY(_.data,$.alg))K=this._getOrReturnCtx(_,K),t(K,{validation:"jwt",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="cidr"){if(!hY(_.data,$.version))K=this._getOrReturnCtx(_,K),t(K,{validation:"cidr",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="base64"){if(!OY.test(_.data))K=this._getOrReturnCtx(_,K),t(K,{validation:"base64",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="base64url"){if(!YY.test(_.data))K=this._getOrReturnCtx(_,K),t(K,{validation:"base64url",code:y.invalid_string,message:$.message}),f.dirty()}else Kq.assertNever($);return{status:f.value,value:_.data}}_regex(_,q,f){return this.refinement((K)=>_.test(K),{validation:q,code:y.invalid_string,...B.errToObj(f)})}_addCheck(_){return new T_({...this._def,checks:[...this._def.checks,_]})}email(_){return this._addCheck({kind:"email",...B.errToObj(_)})}url(_){return this._addCheck({kind:"url",...B.errToObj(_)})}emoji(_){return this._addCheck({kind:"emoji",...B.errToObj(_)})}uuid(_){return this._addCheck({kind:"uuid",...B.errToObj(_)})}nanoid(_){return this._addCheck({kind:"nanoid",...B.errToObj(_)})}cuid(_){return this._addCheck({kind:"cuid",...B.errToObj(_)})}cuid2(_){return this._addCheck({kind:"cuid2",...B.errToObj(_)})}ulid(_){return this._addCheck({kind:"ulid",...B.errToObj(_)})}base64(_){return this._addCheck({kind:"base64",...B.errToObj(_)})}base64url(_){return this._addCheck({kind:"base64url",...B.errToObj(_)})}jwt(_){return this._addCheck({kind:"jwt",...B.errToObj(_)})}ip(_){return this._addCheck({kind:"ip",...B.errToObj(_)})}cidr(_){return this._addCheck({kind:"cidr",...B.errToObj(_)})}datetime(_){if(typeof _==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:_});return this._addCheck({kind:"datetime",precision:typeof _?.precision==="undefined"?null:_?.precision,offset:_?.offset??!1,local:_?.local??!1,...B.errToObj(_?.message)})}date(_){return this._addCheck({kind:"date",message:_})}time(_){if(typeof _==="string")return this._addCheck({kind:"time",precision:null,message:_});return this._addCheck({kind:"time",precision:typeof _?.precision==="undefined"?null:_?.precision,...B.errToObj(_?.message)})}duration(_){return this._addCheck({kind:"duration",...B.errToObj(_)})}regex(_,q){return this._addCheck({kind:"regex",regex:_,...B.errToObj(q)})}includes(_,q){return this._addCheck({kind:"includes",value:_,position:q?.position,...B.errToObj(q?.message)})}startsWith(_,q){return this._addCheck({kind:"startsWith",value:_,...B.errToObj(q)})}endsWith(_,q){return this._addCheck({kind:"endsWith",value:_,...B.errToObj(q)})}min(_,q){return this._addCheck({kind:"min",value:_,...B.errToObj(q)})}max(_,q){return this._addCheck({kind:"max",value:_,...B.errToObj(q)})}length(_,q){return this._addCheck({kind:"length",value:_,...B.errToObj(q)})}nonempty(_){return this.min(1,B.errToObj(_))}trim(){return new T_({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new T_({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new T_({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((_)=>_.kind==="datetime")}get isDate(){return!!this._def.checks.find((_)=>_.kind==="date")}get isTime(){return!!this._def.checks.find((_)=>_.kind==="time")}get isDuration(){return!!this._def.checks.find((_)=>_.kind==="duration")}get isEmail(){return!!this._def.checks.find((_)=>_.kind==="email")}get isURL(){return!!this._def.checks.find((_)=>_.kind==="url")}get isEmoji(){return!!this._def.checks.find((_)=>_.kind==="emoji")}get isUUID(){return!!this._def.checks.find((_)=>_.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((_)=>_.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((_)=>_.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((_)=>_.kind==="cuid2")}get isULID(){return!!this._def.checks.find((_)=>_.kind==="ulid")}get isIP(){return!!this._def.checks.find((_)=>_.kind==="ip")}get isCIDR(){return!!this._def.checks.find((_)=>_.kind==="cidr")}get isBase64(){return!!this._def.checks.find((_)=>_.kind==="base64")}get isBase64url(){return!!this._def.checks.find((_)=>_.kind==="base64url")}get minLength(){let _=null;for(let q of this._def.checks)if(q.kind==="min"){if(_===null||q.value>_)_=q.value}return _}get maxLength(){let _=null;for(let q of this._def.checks)if(q.kind==="max"){if(_===null||q.value<_)_=q.value}return _}}T_.create=(_)=>{return new T_({checks:[],typeName:i.ZodString,coerce:_?.coerce??!1,...qq(_)})};function JY(_,q){let f=(_.toString().split(".")[1]||"").length,K=(q.toString().split(".")[1]||"").length,$=f>K?f:K,P=Number.parseInt(_.toFixed($).replace(".","")),j=Number.parseInt(q.toFixed($).replace(".",""));return P%j/10**$}class F_ extends $q{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(_){if(this._def.coerce)_.data=Number(_.data);if(this._getType(_)!==o.number){let $=this._getOrReturnCtx(_);return t($,{code:y.invalid_type,expected:o.number,received:$.parsedType}),U}let f=void 0,K=new aq;for(let $ of this._def.checks)if($.kind==="int"){if(!Kq.isInteger(_.data))f=this._getOrReturnCtx(_,f),t(f,{code:y.invalid_type,expected:"integer",received:"float",message:$.message}),K.dirty()}else if($.kind==="min"){if($.inclusive?_.data<$.value:_.data<=$.value)f=this._getOrReturnCtx(_,f),t(f,{code:y.too_small,minimum:$.value,type:"number",inclusive:$.inclusive,exact:!1,message:$.message}),K.dirty()}else if($.kind==="max"){if($.inclusive?_.data>$.value:_.data>=$.value)f=this._getOrReturnCtx(_,f),t(f,{code:y.too_big,maximum:$.value,type:"number",inclusive:$.inclusive,exact:!1,message:$.message}),K.dirty()}else if($.kind==="multipleOf"){if(JY(_.data,$.value)!==0)f=this._getOrReturnCtx(_,f),t(f,{code:y.not_multiple_of,multipleOf:$.value,message:$.message}),K.dirty()}else if($.kind==="finite"){if(!Number.isFinite(_.data))f=this._getOrReturnCtx(_,f),t(f,{code:y.not_finite,message:$.message}),K.dirty()}else Kq.assertNever($);return{status:K.value,value:_.data}}gte(_,q){return this.setLimit("min",_,!0,B.toString(q))}gt(_,q){return this.setLimit("min",_,!1,B.toString(q))}lte(_,q){return this.setLimit("max",_,!0,B.toString(q))}lt(_,q){return this.setLimit("max",_,!1,B.toString(q))}setLimit(_,q,f,K){return new F_({...this._def,checks:[...this._def.checks,{kind:_,value:q,inclusive:f,message:B.toString(K)}]})}_addCheck(_){return new F_({...this._def,checks:[...this._def.checks,_]})}int(_){return this._addCheck({kind:"int",message:B.toString(_)})}positive(_){return this._addCheck({kind:"min",value:0,inclusive:!1,message:B.toString(_)})}negative(_){return this._addCheck({kind:"max",value:0,inclusive:!1,message:B.toString(_)})}nonpositive(_){return this._addCheck({kind:"max",value:0,inclusive:!0,message:B.toString(_)})}nonnegative(_){return this._addCheck({kind:"min",value:0,inclusive:!0,message:B.toString(_)})}multipleOf(_,q){return this._addCheck({kind:"multipleOf",value:_,message:B.toString(q)})}finite(_){return this._addCheck({kind:"finite",message:B.toString(_)})}safe(_){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:B.toString(_)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:B.toString(_)})}get minValue(){let _=null;for(let q of this._def.checks)if(q.kind==="min"){if(_===null||q.value>_)_=q.value}return _}get maxValue(){let _=null;for(let q of this._def.checks)if(q.kind==="max"){if(_===null||q.value<_)_=q.value}return _}get isInt(){return!!this._def.checks.find((_)=>_.kind==="int"||_.kind==="multipleOf"&&Kq.isInteger(_.value))}get isFinite(){let _=null,q=null;for(let f of this._def.checks)if(f.kind==="finite"||f.kind==="int"||f.kind==="multipleOf")return!0;else if(f.kind==="min"){if(q===null||f.value>q)q=f.value}else if(f.kind==="max"){if(_===null||f.value<_)_=f.value}return Number.isFinite(q)&&Number.isFinite(_)}}F_.create=(_)=>{return new F_({checks:[],typeName:i.ZodNumber,coerce:_?.coerce||!1,...qq(_)})};class Q_ extends $q{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(_){if(this._def.coerce)try{_.data=BigInt(_.data)}catch{return this._getInvalidInput(_)}if(this._getType(_)!==o.bigint)return this._getInvalidInput(_);let f=void 0,K=new aq;for(let $ of this._def.checks)if($.kind==="min"){if($.inclusive?_.data<$.value:_.data<=$.value)f=this._getOrReturnCtx(_,f),t(f,{code:y.too_small,type:"bigint",minimum:$.value,inclusive:$.inclusive,message:$.message}),K.dirty()}else if($.kind==="max"){if($.inclusive?_.data>$.value:_.data>=$.value)f=this._getOrReturnCtx(_,f),t(f,{code:y.too_big,type:"bigint",maximum:$.value,inclusive:$.inclusive,message:$.message}),K.dirty()}else if($.kind==="multipleOf"){if(_.data%$.value!==BigInt(0))f=this._getOrReturnCtx(_,f),t(f,{code:y.not_multiple_of,multipleOf:$.value,message:$.message}),K.dirty()}else Kq.assertNever($);return{status:K.value,value:_.data}}_getInvalidInput(_){let q=this._getOrReturnCtx(_);return t(q,{code:y.invalid_type,expected:o.bigint,received:q.parsedType}),U}gte(_,q){return this.setLimit("min",_,!0,B.toString(q))}gt(_,q){return this.setLimit("min",_,!1,B.toString(q))}lte(_,q){return this.setLimit("max",_,!0,B.toString(q))}lt(_,q){return this.setLimit("max",_,!1,B.toString(q))}setLimit(_,q,f,K){return new Q_({...this._def,checks:[...this._def.checks,{kind:_,value:q,inclusive:f,message:B.toString(K)}]})}_addCheck(_){return new Q_({...this._def,checks:[...this._def.checks,_]})}positive(_){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:B.toString(_)})}negative(_){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:B.toString(_)})}nonpositive(_){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:B.toString(_)})}nonnegative(_){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:B.toString(_)})}multipleOf(_,q){return this._addCheck({kind:"multipleOf",value:_,message:B.toString(q)})}get minValue(){let _=null;for(let q of this._def.checks)if(q.kind==="min"){if(_===null||q.value>_)_=q.value}return _}get maxValue(){let _=null;for(let q of this._def.checks)if(q.kind==="max"){if(_===null||q.value<_)_=q.value}return _}}Q_.create=(_)=>{return new Q_({checks:[],typeName:i.ZodBigInt,coerce:_?.coerce??!1,...qq(_)})};class B8 extends $q{_parse(_){if(this._def.coerce)_.data=Boolean(_.data);if(this._getType(_)!==o.boolean){let f=this._getOrReturnCtx(_);return t(f,{code:y.invalid_type,expected:o.boolean,received:f.parsedType}),U}return yq(_.data)}}B8.create=(_)=>{return new B8({typeName:i.ZodBoolean,coerce:_?.coerce||!1,...qq(_)})};class u8 extends $q{_parse(_){if(this._def.coerce)_.data=new Date(_.data);if(this._getType(_)!==o.date){let $=this._getOrReturnCtx(_);return t($,{code:y.invalid_type,expected:o.date,received:$.parsedType}),U}if(Number.isNaN(_.data.getTime())){let $=this._getOrReturnCtx(_);return t($,{code:y.invalid_date}),U}let f=new aq,K=void 0;for(let $ of this._def.checks)if($.kind==="min"){if(_.data.getTime()<$.value)K=this._getOrReturnCtx(_,K),t(K,{code:y.too_small,message:$.message,inclusive:!0,exact:!1,minimum:$.value,type:"date"}),f.dirty()}else if($.kind==="max"){if(_.data.getTime()>$.value)K=this._getOrReturnCtx(_,K),t(K,{code:y.too_big,message:$.message,inclusive:!0,exact:!1,maximum:$.value,type:"date"}),f.dirty()}else Kq.assertNever($);return{status:f.value,value:new Date(_.data.getTime())}}_addCheck(_){return new u8({...this._def,checks:[...this._def.checks,_]})}min(_,q){return this._addCheck({kind:"min",value:_.getTime(),message:B.toString(q)})}max(_,q){return this._addCheck({kind:"max",value:_.getTime(),message:B.toString(q)})}get minDate(){let _=null;for(let q of this._def.checks)if(q.kind==="min"){if(_===null||q.value>_)_=q.value}return _!=null?new Date(_):null}get maxDate(){let _=null;for(let q of this._def.checks)if(q.kind==="max"){if(_===null||q.value<_)_=q.value}return _!=null?new Date(_):null}}u8.create=(_)=>{return new u8({checks:[],coerce:_?.coerce||!1,typeName:i.ZodDate,...qq(_)})};class df extends $q{_parse(_){if(this._getType(_)!==o.symbol){let f=this._getOrReturnCtx(_);return t(f,{code:y.invalid_type,expected:o.symbol,received:f.parsedType}),U}return yq(_.data)}}df.create=(_)=>{return new df({typeName:i.ZodSymbol,...qq(_)})};class U8 extends $q{_parse(_){if(this._getType(_)!==o.undefined){let f=this._getOrReturnCtx(_);return t(f,{code:y.invalid_type,expected:o.undefined,received:f.parsedType}),U}return yq(_.data)}}U8.create=(_)=>{return new U8({typeName:i.ZodUndefined,...qq(_)})};class F8 extends $q{_parse(_){if(this._getType(_)!==o.null){let f=this._getOrReturnCtx(_);return t(f,{code:y.invalid_type,expected:o.null,received:f.parsedType}),U}return yq(_.data)}}F8.create=(_)=>{return new F8({typeName:i.ZodNull,...qq(_)})};class G8 extends $q{constructor(){super(...arguments);this._any=!0}_parse(_){return yq(_.data)}}G8.create=(_)=>{return new G8({typeName:i.ZodAny,...qq(_)})};class U_ extends $q{constructor(){super(...arguments);this._unknown=!0}_parse(_){return yq(_.data)}}U_.create=(_)=>{return new U_({typeName:i.ZodUnknown,...qq(_)})};class M_ extends $q{_parse(_){let q=this._getOrReturnCtx(_);return t(q,{code:y.invalid_type,expected:o.never,received:q.parsedType}),U}}M_.create=(_)=>{return new M_({typeName:i.ZodNever,...qq(_)})};class af extends $q{_parse(_){if(this._getType(_)!==o.undefined){let f=this._getOrReturnCtx(_);return t(f,{code:y.invalid_type,expected:o.void,received:f.parsedType}),U}return yq(_.data)}}af.create=(_)=>{return new af({typeName:i.ZodVoid,...qq(_)})};class z_ extends $q{_parse(_){let{ctx:q,status:f}=this._processInputParams(_),K=this._def;if(q.parsedType!==o.array)return t(q,{code:y.invalid_type,expected:o.array,received:q.parsedType}),U;if(K.exactLength!==null){let P=q.data.length>K.exactLength.value,j=q.data.length<K.exactLength.value;if(P||j)t(q,{code:P?y.too_big:y.too_small,minimum:j?K.exactLength.value:void 0,maximum:P?K.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:K.exactLength.message}),f.dirty()}if(K.minLength!==null){if(q.data.length<K.minLength.value)t(q,{code:y.too_small,minimum:K.minLength.value,type:"array",inclusive:!0,exact:!1,message:K.minLength.message}),f.dirty()}if(K.maxLength!==null){if(q.data.length>K.maxLength.value)t(q,{code:y.too_big,maximum:K.maxLength.value,type:"array",inclusive:!0,exact:!1,message:K.maxLength.message}),f.dirty()}if(q.common.async)return Promise.all([...q.data].map((P,j)=>{return K.type._parseAsync(new H_(q,P,q.path,j))})).then((P)=>{return aq.mergeArray(f,P)});let $=[...q.data].map((P,j)=>{return K.type._parseSync(new H_(q,P,q.path,j))});return aq.mergeArray(f,$)}get element(){return this._def.type}min(_,q){return new z_({...this._def,minLength:{value:_,message:B.toString(q)}})}max(_,q){return new z_({...this._def,maxLength:{value:_,message:B.toString(q)}})}length(_,q){return new z_({...this._def,exactLength:{value:_,message:B.toString(q)}})}nonempty(_){return this.min(1,_)}}z_.create=(_,q)=>{return new z_({type:_,minLength:null,maxLength:null,exactLength:null,typeName:i.ZodArray,...qq(q)})};function x8(_){if(_ instanceof bq){let q={};for(let f in _.shape){let K=_.shape[f];q[f]=W_.create(x8(K))}return new bq({..._._def,shape:()=>q})}else if(_ instanceof z_)return new z_({..._._def,type:x8(_.element)});else if(_ instanceof W_)return W_.create(x8(_.unwrap()));else if(_ instanceof y_)return y_.create(x8(_.unwrap()));else if(_ instanceof S_)return S_.create(_.items.map((q)=>x8(q)));else return _}class bq extends $q{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let _=this._def.shape(),q=Kq.objectKeys(_);return this._cached={shape:_,keys:q},this._cached}_parse(_){if(this._getType(_)!==o.object){let w=this._getOrReturnCtx(_);return t(w,{code:y.invalid_type,expected:o.object,received:w.parsedType}),U}let{status:f,ctx:K}=this._processInputParams(_),{shape:$,keys:P}=this._getCached(),j=[];if(!(this._def.catchall instanceof M_&&this._def.unknownKeys==="strip")){for(let w in K.data)if(!P.includes(w))j.push(w)}let v=[];for(let w of P){let O=$[w],T=K.data[w];v.push({key:{status:"valid",value:w},value:O._parse(new H_(K,T,K.path,w)),alwaysSet:w in K.data})}if(this._def.catchall instanceof M_){let w=this._def.unknownKeys;if(w==="passthrough")for(let O of j)v.push({key:{status:"valid",value:O},value:{status:"valid",value:K.data[O]}});else if(w==="strict"){if(j.length>0)t(K,{code:y.unrecognized_keys,keys:j}),f.dirty()}else if(w==="strip");else throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let w=this._def.catchall;for(let O of j){let T=K.data[O];v.push({key:{status:"valid",value:O},value:w._parse(new H_(K,T,K.path,O)),alwaysSet:O in K.data})}}if(K.common.async)return Promise.resolve().then(async()=>{let w=[];for(let O of v){let T=await O.key,Y=await O.value;w.push({key:T,value:Y,alwaysSet:O.alwaysSet})}return w}).then((w)=>{return aq.mergeObjectSync(f,w)});else return aq.mergeObjectSync(f,v)}get shape(){return this._def.shape()}strict(_){return B.errToObj,new bq({...this._def,unknownKeys:"strict",..._!==void 0?{errorMap:(q,f)=>{let K=this._def.errorMap?.(q,f).message??f.defaultError;if(q.code==="unrecognized_keys")return{message:B.errToObj(_).message??K};return{message:K}}}:{}})}strip(){return new bq({...this._def,unknownKeys:"strip"})}passthrough(){return new bq({...this._def,unknownKeys:"passthrough"})}extend(_){return new bq({...this._def,shape:()=>({...this._def.shape(),..._})})}merge(_){return new bq({unknownKeys:_._def.unknownKeys,catchall:_._def.catchall,shape:()=>({...this._def.shape(),..._._def.shape()}),typeName:i.ZodObject})}setKey(_,q){return this.augment({[_]:q})}catchall(_){return new bq({...this._def,catchall:_})}pick(_){let q={};for(let f of Kq.objectKeys(_))if(_[f]&&this.shape[f])q[f]=this.shape[f];return new bq({...this._def,shape:()=>q})}omit(_){let q={};for(let f of Kq.objectKeys(this.shape))if(!_[f])q[f]=this.shape[f];return new bq({...this._def,shape:()=>q})}deepPartial(){return x8(this)}partial(_){let q={};for(let f of Kq.objectKeys(this.shape)){let K=this.shape[f];if(_&&!_[f])q[f]=K;else q[f]=K.optional()}return new bq({...this._def,shape:()=>q})}required(_){let q={};for(let f of Kq.objectKeys(this.shape))if(_&&!_[f])q[f]=this.shape[f];else{let $=this.shape[f];while($ instanceof W_)$=$._def.innerType;q[f]=$}return new bq({...this._def,shape:()=>q})}keyof(){return w7(Kq.objectKeys(this.shape))}}bq.create=(_,q)=>{return new bq({shape:()=>_,unknownKeys:"strip",catchall:M_.create(),typeName:i.ZodObject,...qq(q)})};bq.strictCreate=(_,q)=>{return new bq({shape:()=>_,unknownKeys:"strict",catchall:M_.create(),typeName:i.ZodObject,...qq(q)})};bq.lazycreate=(_,q)=>{return new bq({shape:_,unknownKeys:"strip",catchall:M_.create(),typeName:i.ZodObject,...qq(q)})};class Q8 extends $q{_parse(_){let{ctx:q}=this._processInputParams(_),f=this._def.options;function K($){for(let j of $)if(j.result.status==="valid")return j.result;for(let j of $)if(j.result.status==="dirty")return q.common.issues.push(...j.ctx.common.issues),j.result;let P=$.map((j)=>new eq(j.ctx.common.issues));return t(q,{code:y.invalid_union,unionErrors:P}),U}if(q.common.async)return Promise.all(f.map(async($)=>{let P={...q,common:{...q.common,issues:[]},parent:null};return{result:await $._parseAsync({data:q.data,path:q.path,parent:P}),ctx:P}})).then(K);else{let $=void 0,P=[];for(let v of f){let w={...q,common:{...q.common,issues:[]},parent:null},O=v._parseSync({data:q.data,path:q.path,parent:w});if(O.status==="valid")return O;else if(O.status==="dirty"&&!$)$={result:O,ctx:w};if(w.common.issues.length)P.push(w.common.issues)}if($)return q.common.issues.push(...$.ctx.common.issues),$.result;let j=P.map((v)=>new eq(v));return t(q,{code:y.invalid_union,unionErrors:j}),U}}get options(){return this._def.options}}Q8.create=(_,q)=>{return new Q8({options:_,typeName:i.ZodUnion,...qq(q)})};var D_=(_)=>{if(_ instanceof _f)return D_(_.schema);else if(_ instanceof h_)return D_(_.innerType());else if(_ instanceof ff)return[_.value];else if(_ instanceof q8)return _.options;else if(_ instanceof $f)return Kq.objectValues(_.enum);else if(_ instanceof Kf)return D_(_._def.innerType);else if(_ instanceof U8)return[void 0];else if(_ instanceof F8)return[null];else if(_ instanceof W_)return[void 0,...D_(_.unwrap())];else if(_ instanceof y_)return[null,...D_(_.unwrap())];else if(_ instanceof D6)return D_(_.unwrap());else if(_ instanceof jf)return D_(_.unwrap());else if(_ instanceof Pf)return D_(_._def.innerType);else return[]};class I6 extends $q{_parse(_){let{ctx:q}=this._processInputParams(_);if(q.parsedType!==o.object)return t(q,{code:y.invalid_type,expected:o.object,received:q.parsedType}),U;let f=this.discriminator,K=q.data[f],$=this.optionsMap.get(K);if(!$)return t(q,{code:y.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[f]}),U;if(q.common.async)return $._parseAsync({data:q.data,path:q.path,parent:q});else return $._parseSync({data:q.data,path:q.path,parent:q})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(_,q,f){let K=new Map;for(let $ of q){let P=D_($.shape[_]);if(!P.length)throw new Error(`A discriminator value for key \`${_}\` could not be extracted from all schema options`);for(let j of P){if(K.has(j))throw new Error(`Discriminator property ${String(_)} has duplicate value ${String(j)}`);K.set(j,$)}}return new I6({typeName:i.ZodDiscriminatedUnion,discriminator:_,options:q,optionsMap:K,...qq(f)})}}function iK(_,q){let f=V_(_),K=V_(q);if(_===q)return{valid:!0,data:_};else if(f===o.object&&K===o.object){let $=Kq.objectKeys(q),P=Kq.objectKeys(_).filter((v)=>$.indexOf(v)!==-1),j={..._,...q};for(let v of P){let w=iK(_[v],q[v]);if(!w.valid)return{valid:!1};j[v]=w.data}return{valid:!0,data:j}}else if(f===o.array&&K===o.array){if(_.length!==q.length)return{valid:!1};let $=[];for(let P=0;P<_.length;P++){let j=_[P],v=q[P],w=iK(j,v);if(!w.valid)return{valid:!1};$.push(w.data)}return{valid:!0,data:$}}else if(f===o.date&&K===o.date&&+_===+q)return{valid:!0,data:_};else return{valid:!1}}class qf extends $q{_parse(_){let{status:q,ctx:f}=this._processInputParams(_),K=($,P)=>{if(d6($)||d6(P))return U;let j=iK($.value,P.value);if(!j.valid)return t(f,{code:y.invalid_intersection_types}),U;if(a6($)||a6(P))q.dirty();return{status:q.value,value:j.data}};if(f.common.async)return Promise.all([this._def.left._parseAsync({data:f.data,path:f.path,parent:f}),this._def.right._parseAsync({data:f.data,path:f.path,parent:f})]).then(([$,P])=>K($,P));else return K(this._def.left._parseSync({data:f.data,path:f.path,parent:f}),this._def.right._parseSync({data:f.data,path:f.path,parent:f}))}}qf.create=(_,q,f)=>{return new qf({left:_,right:q,typeName:i.ZodIntersection,...qq(f)})};class S_ extends $q{_parse(_){let{status:q,ctx:f}=this._processInputParams(_);if(f.parsedType!==o.array)return t(f,{code:y.invalid_type,expected:o.array,received:f.parsedType}),U;if(f.data.length<this._def.items.length)return t(f,{code:y.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),U;if(!this._def.rest&&f.data.length>this._def.items.length)t(f,{code:y.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q.dirty();let $=[...f.data].map((P,j)=>{let v=this._def.items[j]||this._def.rest;if(!v)return null;return v._parse(new H_(f,P,f.path,j))}).filter((P)=>!!P);if(f.common.async)return Promise.all($).then((P)=>{return aq.mergeArray(q,P)});else return aq.mergeArray(q,$)}get items(){return this._def.items}rest(_){return new S_({...this._def,rest:_})}}S_.create=(_,q)=>{if(!Array.isArray(_))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new S_({items:_,typeName:i.ZodTuple,rest:null,...qq(q)})};class If extends $q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(_){let{status:q,ctx:f}=this._processInputParams(_);if(f.parsedType!==o.object)return t(f,{code:y.invalid_type,expected:o.object,received:f.parsedType}),U;let K=[],$=this._def.keyType,P=this._def.valueType;for(let j in f.data)K.push({key:$._parse(new H_(f,j,f.path,j)),value:P._parse(new H_(f,f.data[j],f.path,j)),alwaysSet:j in f.data});if(f.common.async)return aq.mergeObjectAsync(q,K);else return aq.mergeObjectSync(q,K)}get element(){return this._def.valueType}static create(_,q,f){if(q instanceof $q)return new If({keyType:_,valueType:q,typeName:i.ZodRecord,...qq(f)});return new If({keyType:T_.create(),valueType:_,typeName:i.ZodRecord,...qq(q)})}}class Df extends $q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(_){let{status:q,ctx:f}=this._processInputParams(_);if(f.parsedType!==o.map)return t(f,{code:y.invalid_type,expected:o.map,received:f.parsedType}),U;let K=this._def.keyType,$=this._def.valueType,P=[...f.data.entries()].map(([j,v],w)=>{return{key:K._parse(new H_(f,j,f.path,[w,"key"])),value:$._parse(new H_(f,v,f.path,[w,"value"]))}});if(f.common.async){let j=new Map;return Promise.resolve().then(async()=>{for(let v of P){let w=await v.key,O=await v.value;if(w.status==="aborted"||O.status==="aborted")return U;if(w.status==="dirty"||O.status==="dirty")q.dirty();j.set(w.value,O.value)}return{status:q.value,value:j}})}else{let j=new Map;for(let v of P){let{key:w,value:O}=v;if(w.status==="aborted"||O.status==="aborted")return U;if(w.status==="dirty"||O.status==="dirty")q.dirty();j.set(w.value,O.value)}return{status:q.value,value:j}}}}Df.create=(_,q,f)=>{return new Df({valueType:q,keyType:_,typeName:i.ZodMap,...qq(f)})};class m8 extends $q{_parse(_){let{status:q,ctx:f}=this._processInputParams(_);if(f.parsedType!==o.set)return t(f,{code:y.invalid_type,expected:o.set,received:f.parsedType}),U;let K=this._def;if(K.minSize!==null){if(f.data.size<K.minSize.value)t(f,{code:y.too_small,minimum:K.minSize.value,type:"set",inclusive:!0,exact:!1,message:K.minSize.message}),q.dirty()}if(K.maxSize!==null){if(f.data.size>K.maxSize.value)t(f,{code:y.too_big,maximum:K.maxSize.value,type:"set",inclusive:!0,exact:!1,message:K.maxSize.message}),q.dirty()}let $=this._def.valueType;function P(v){let w=new Set;for(let O of v){if(O.status==="aborted")return U;if(O.status==="dirty")q.dirty();w.add(O.value)}return{status:q.value,value:w}}let j=[...f.data.values()].map((v,w)=>$._parse(new H_(f,v,f.path,w)));if(f.common.async)return Promise.all(j).then((v)=>P(v));else return P(j)}min(_,q){return new m8({...this._def,minSize:{value:_,message:B.toString(q)}})}max(_,q){return new m8({...this._def,maxSize:{value:_,message:B.toString(q)}})}size(_,q){return this.min(_,q).max(_,q)}nonempty(_){return this.min(1,_)}}m8.create=(_,q)=>{return new m8({valueType:_,minSize:null,maxSize:null,typeName:i.ZodSet,...qq(q)})};class s8 extends $q{constructor(){super(...arguments);this.validate=this.implement}_parse(_){let{ctx:q}=this._processInputParams(_);if(q.parsedType!==o.function)return t(q,{code:y.invalid_type,expected:o.function,received:q.parsedType}),U;function f(j,v){return gf({data:j,path:q.path,errorMaps:[q.common.contextualErrorMap,q.schemaErrorMap,t8(),I_].filter((w)=>!!w),issueData:{code:y.invalid_arguments,argumentsError:v}})}function K(j,v){return gf({data:j,path:q.path,errorMaps:[q.common.contextualErrorMap,q.schemaErrorMap,t8(),I_].filter((w)=>!!w),issueData:{code:y.invalid_return_type,returnTypeError:v}})}let $={errorMap:q.common.contextualErrorMap},P=q.data;if(this._def.returns instanceof r8){let j=this;return yq(async function(...v){let w=new eq([]),O=await j._def.args.parseAsync(v,$).catch((z)=>{throw w.addIssue(f(v,z)),w}),T=await Reflect.apply(P,this,O);return await j._def.returns._def.type.parseAsync(T,$).catch((z)=>{throw w.addIssue(K(T,z)),w})})}else{let j=this;return yq(function(...v){let w=j._def.args.safeParse(v,$);if(!w.success)throw new eq([f(v,w.error)]);let O=Reflect.apply(P,this,w.data),T=j._def.returns.safeParse(O,$);if(!T.success)throw new eq([K(O,T.error)]);return T.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(..._){return new s8({...this._def,args:S_.create(_).rest(U_.create())})}returns(_){return new s8({...this._def,returns:_})}implement(_){return this.parse(_)}strictImplement(_){return this.parse(_)}static create(_,q,f){return new s8({args:_?_:S_.create([]).rest(U_.create()),returns:q||U_.create(),typeName:i.ZodFunction,...qq(f)})}}class _f extends $q{get schema(){return this._def.getter()}_parse(_){let{ctx:q}=this._processInputParams(_);return this._def.getter()._parse({data:q.data,path:q.path,parent:q})}}_f.create=(_,q)=>{return new _f({getter:_,typeName:i.ZodLazy,...qq(q)})};class ff extends $q{_parse(_){if(_.data!==this._def.value){let q=this._getOrReturnCtx(_);return t(q,{received:q.data,code:y.invalid_literal,expected:this._def.value}),U}return{status:"valid",value:_.data}}get value(){return this._def.value}}ff.create=(_,q)=>{return new ff({value:_,typeName:i.ZodLiteral,...qq(q)})};function w7(_,q){return new q8({values:_,typeName:i.ZodEnum,...qq(q)})}class q8 extends $q{_parse(_){if(typeof _.data!=="string"){let q=this._getOrReturnCtx(_),f=this._def.values;return t(q,{expected:Kq.joinValues(f),received:q.parsedType,code:y.invalid_type}),U}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(_.data)){let q=this._getOrReturnCtx(_),f=this._def.values;return t(q,{received:q.data,code:y.invalid_enum_value,options:f}),U}return yq(_.data)}get options(){return this._def.values}get enum(){let _={};for(let q of this._def.values)_[q]=q;return _}get Values(){let _={};for(let q of this._def.values)_[q]=q;return _}get Enum(){let _={};for(let q of this._def.values)_[q]=q;return _}extract(_,q=this._def){return q8.create(_,{...this._def,...q})}exclude(_,q=this._def){return q8.create(this.options.filter((f)=>!_.includes(f)),{...this._def,...q})}}q8.create=w7;class $f extends $q{_parse(_){let q=Kq.getValidEnumValues(this._def.values),f=this._getOrReturnCtx(_);if(f.parsedType!==o.string&&f.parsedType!==o.number){let K=Kq.objectValues(q);return t(f,{expected:Kq.joinValues(K),received:f.parsedType,code:y.invalid_type}),U}if(!this._cache)this._cache=new Set(Kq.getValidEnumValues(this._def.values));if(!this._cache.has(_.data)){let K=Kq.objectValues(q);return t(f,{received:f.data,code:y.invalid_enum_value,options:K}),U}return yq(_.data)}get enum(){return this._def.values}}$f.create=(_,q)=>{return new $f({values:_,typeName:i.ZodNativeEnum,...qq(q)})};class r8 extends $q{unwrap(){return this._def.type}_parse(_){let{ctx:q}=this._processInputParams(_);if(q.parsedType!==o.promise&&q.common.async===!1)return t(q,{code:y.invalid_type,expected:o.promise,received:q.parsedType}),U;let f=q.parsedType===o.promise?q.data:Promise.resolve(q.data);return yq(f.then((K)=>{return this._def.type.parseAsync(K,{path:q.path,errorMap:q.common.contextualErrorMap})}))}}r8.create=(_,q)=>{return new r8({type:_,typeName:i.ZodPromise,...qq(q)})};class h_ extends $q{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===i.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(_){let{status:q,ctx:f}=this._processInputParams(_),K=this._def.effect||null,$={addIssue:(P)=>{if(t(f,P),P.fatal)q.abort();else q.dirty()},get path(){return f.path}};if($.addIssue=$.addIssue.bind($),K.type==="preprocess"){let P=K.transform(f.data,$);if(f.common.async)return Promise.resolve(P).then(async(j)=>{if(q.value==="aborted")return U;let v=await this._def.schema._parseAsync({data:j,path:f.path,parent:f});if(v.status==="aborted")return U;if(v.status==="dirty")return A8(v.value);if(q.value==="dirty")return A8(v.value);return v});else{if(q.value==="aborted")return U;let j=this._def.schema._parseSync({data:P,path:f.path,parent:f});if(j.status==="aborted")return U;if(j.status==="dirty")return A8(j.value);if(q.value==="dirty")return A8(j.value);return j}}if(K.type==="refinement"){let P=(j)=>{let v=K.refinement(j,$);if(f.common.async)return Promise.resolve(v);if(v instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return j};if(f.common.async===!1){let j=this._def.schema._parseSync({data:f.data,path:f.path,parent:f});if(j.status==="aborted")return U;if(j.status==="dirty")q.dirty();return P(j.value),{status:q.value,value:j.value}}else return this._def.schema._parseAsync({data:f.data,path:f.path,parent:f}).then((j)=>{if(j.status==="aborted")return U;if(j.status==="dirty")q.dirty();return P(j.value).then(()=>{return{status:q.value,value:j.value}})})}if(K.type==="transform")if(f.common.async===!1){let P=this._def.schema._parseSync({data:f.data,path:f.path,parent:f});if(!B_(P))return U;let j=K.transform(P.value,$);if(j instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:q.value,value:j}}else return this._def.schema._parseAsync({data:f.data,path:f.path,parent:f}).then((P)=>{if(!B_(P))return U;return Promise.resolve(K.transform(P.value,$)).then((j)=>({status:q.value,value:j}))});Kq.assertNever(K)}}h_.create=(_,q,f)=>{return new h_({schema:_,typeName:i.ZodEffects,effect:q,...qq(f)})};h_.createWithPreprocess=(_,q,f)=>{return new h_({schema:q,effect:{type:"preprocess",transform:_},typeName:i.ZodEffects,...qq(f)})};class W_ extends $q{_parse(_){if(this._getType(_)===o.undefined)return yq(void 0);return this._def.innerType._parse(_)}unwrap(){return this._def.innerType}}W_.create=(_,q)=>{return new W_({innerType:_,typeName:i.ZodOptional,...qq(q)})};class y_ extends $q{_parse(_){if(this._getType(_)===o.null)return yq(null);return this._def.innerType._parse(_)}unwrap(){return this._def.innerType}}y_.create=(_,q)=>{return new y_({innerType:_,typeName:i.ZodNullable,...qq(q)})};class Kf extends $q{_parse(_){let{ctx:q}=this._processInputParams(_),f=q.data;if(q.parsedType===o.undefined)f=this._def.defaultValue();return this._def.innerType._parse({data:f,path:q.path,parent:q})}removeDefault(){return this._def.innerType}}Kf.create=(_,q)=>{return new Kf({innerType:_,typeName:i.ZodDefault,defaultValue:typeof q.default==="function"?q.default:()=>q.default,...qq(q)})};class Pf extends $q{_parse(_){let{ctx:q}=this._processInputParams(_),f={...q,common:{...q.common,issues:[]}},K=this._def.innerType._parse({data:f.data,path:f.path,parent:{...f}});if(e8(K))return K.then(($)=>{return{status:"valid",value:$.status==="valid"?$.value:this._def.catchValue({get error(){return new eq(f.common.issues)},input:f.data})}});else return{status:"valid",value:K.status==="valid"?K.value:this._def.catchValue({get error(){return new eq(f.common.issues)},input:f.data})}}removeCatch(){return this._def.innerType}}Pf.create=(_,q)=>{return new Pf({innerType:_,typeName:i.ZodCatch,catchValue:typeof q.catch==="function"?q.catch:()=>q.catch,...qq(q)})};class yf extends $q{_parse(_){if(this._getType(_)!==o.nan){let f=this._getOrReturnCtx(_);return t(f,{code:y.invalid_type,expected:o.nan,received:f.parsedType}),U}return{status:"valid",value:_.data}}}yf.create=(_)=>{return new yf({typeName:i.ZodNaN,...qq(_)})};var kY=Symbol("zod_brand");class D6 extends $q{_parse(_){let{ctx:q}=this._processInputParams(_),f=q.data;return this._def.type._parse({data:f,path:q.path,parent:q})}unwrap(){return this._def.type}}class of extends $q{_parse(_){let{status:q,ctx:f}=this._processInputParams(_);if(f.common.async)return(async()=>{let $=await this._def.in._parseAsync({data:f.data,path:f.path,parent:f});if($.status==="aborted")return U;if($.status==="dirty")return q.dirty(),A8($.value);else return this._def.out._parseAsync({data:$.value,path:f.path,parent:f})})();else{let K=this._def.in._parseSync({data:f.data,path:f.path,parent:f});if(K.status==="aborted")return U;if(K.status==="dirty")return q.dirty(),{status:"dirty",value:K.value};else return this._def.out._parseSync({data:K.value,path:f.path,parent:f})}}static create(_,q){return new of({in:_,out:q,typeName:i.ZodPipeline})}}class jf extends $q{_parse(_){let q=this._def.innerType._parse(_),f=(K)=>{if(B_(K))K.value=Object.freeze(K.value);return K};return e8(q)?q.then((K)=>f(K)):f(q)}unwrap(){return this._def.innerType}}jf.create=(_,q)=>{return new jf({innerType:_,typeName:i.ZodReadonly,...qq(q)})};function K7(_,q){let f=typeof _==="function"?_(q):typeof _==="string"?{message:_}:_;return typeof f==="string"?{message:f}:f}function O7(_,q={},f){if(_)return G8.create().superRefine((K,$)=>{let P=_(K);if(P instanceof Promise)return P.then((j)=>{if(!j){let v=K7(q,K),w=v.fatal??f??!0;$.addIssue({code:"custom",...v,fatal:w})}});if(!P){let j=K7(q,K),v=j.fatal??f??!0;$.addIssue({code:"custom",...j,fatal:v})}return});return G8.create()}var ZY={object:bq.lazycreate},i;(function(_){_.ZodString="ZodString",_.ZodNumber="ZodNumber",_.ZodNaN="ZodNaN",_.ZodBigInt="ZodBigInt",_.ZodBoolean="ZodBoolean",_.ZodDate="ZodDate",_.ZodSymbol="ZodSymbol",_.ZodUndefined="ZodUndefined",_.ZodNull="ZodNull",_.ZodAny="ZodAny",_.ZodUnknown="ZodUnknown",_.ZodNever="ZodNever",_.ZodVoid="ZodVoid",_.ZodArray="ZodArray",_.ZodObject="ZodObject",_.ZodUnion="ZodUnion",_.ZodDiscriminatedUnion="ZodDiscriminatedUnion",_.ZodIntersection="ZodIntersection",_.ZodTuple="ZodTuple",_.ZodRecord="ZodRecord",_.ZodMap="ZodMap",_.ZodSet="ZodSet",_.ZodFunction="ZodFunction",_.ZodLazy="ZodLazy",_.ZodLiteral="ZodLiteral",_.ZodEnum="ZodEnum",_.ZodEffects="ZodEffects",_.ZodNativeEnum="ZodNativeEnum",_.ZodOptional="ZodOptional",_.ZodNullable="ZodNullable",_.ZodDefault="ZodDefault",_.ZodCatch="ZodCatch",_.ZodPromise="ZodPromise",_.ZodBranded="ZodBranded",_.ZodPipeline="ZodPipeline",_.ZodReadonly="ZodReadonly"})(i||(i={}));var XY=(_,q={message:`Input not instance of ${_.name}`})=>O7((f)=>f instanceof _,q),Y7=T_.create,T7=F_.create,AY=yf.create,uY=Q_.create,z7=B8.create,GY=u8.create,mY=df.create,rY=U8.create,bY=F8.create,VY=G8.create,MY=U_.create,SY=M_.create,NY=af.create,CY=z_.create,pY=bq.create,lY=bq.strictCreate,nY=Q8.create,RY=I6.create,EY=qf.create,gY=S_.create,dY=If.create,aY=Df.create,IY=m8.create,DY=s8.create,yY=_f.create,iY=ff.create,oY=q8.create,cY=$f.create,LY=r8.create,tY=h_.create,eY=W_.create,xY=y_.create,sY=h_.createWithPreprocess,BY=of.create,UY=()=>Y7().optional(),FY=()=>T7().optional(),QY=()=>z7().optional(),qT={string:(_)=>T_.create({..._,coerce:!0}),number:(_)=>F_.create({..._,coerce:!0}),boolean:(_)=>B8.create({..._,coerce:!0}),bigint:(_)=>Q_.create({..._,coerce:!0}),date:(_)=>u8.create({..._,coerce:!0})};var _T=U;var oK="2025-06-18";var W7=[oK,"2025-03-26","2024-11-05","2024-10-07"],y6="2.0",H7=W.union([W.string(),W.number().int()]),h7=W.string(),fT=W.object({progressToken:W.optional(H7)}).passthrough(),K_=W.object({_meta:W.optional(fT)}).passthrough(),xq=W.object({method:W.string(),params:W.optional(K_)}),cf=W.object({_meta:W.optional(W.object({}).passthrough())}).passthrough(),N_=W.object({method:W.string(),params:W.optional(cf)}),P_=W.object({_meta:W.optional(W.object({}).passthrough())}).passthrough(),i6=W.union([W.string(),W.number().int()]),J7=W.object({jsonrpc:W.literal(y6),id:i6}).merge(xq).strict(),k7=(_)=>J7.safeParse(_).success,Z7=W.object({jsonrpc:W.literal(y6)}).merge(N_).strict(),X7=(_)=>Z7.safeParse(_).success,A7=W.object({jsonrpc:W.literal(y6),id:i6,result:P_}).strict(),cK=(_)=>A7.safeParse(_).success,Zq;(function(_){_[_.ConnectionClosed=-32000]="ConnectionClosed",_[_.RequestTimeout=-32001]="RequestTimeout",_[_.ParseError=-32700]="ParseError",_[_.InvalidRequest=-32600]="InvalidRequest",_[_.MethodNotFound=-32601]="MethodNotFound",_[_.InvalidParams=-32602]="InvalidParams",_[_.InternalError=-32603]="InternalError"})(Zq||(Zq={}));var u7=W.object({jsonrpc:W.literal(y6),id:i6,error:W.object({code:W.number().int(),message:W.string(),data:W.optional(W.unknown())})}).strict(),G7=(_)=>u7.safeParse(_).success,m7=W.union([J7,Z7,A7,u7]),o6=P_.strict(),c6=N_.extend({method:W.literal("notifications/cancelled"),params:cf.extend({requestId:i6,reason:W.string().optional()})}),$T=W.object({src:W.string(),mimeType:W.optional(W.string()),sizes:W.optional(W.array(W.string()))}).passthrough(),Lf=W.object({icons:W.array($T).optional()}).passthrough(),tf=W.object({name:W.string(),title:W.optional(W.string())}).passthrough(),r7=tf.extend({version:W.string(),websiteUrl:W.optional(W.string())}).merge(Lf),KT=W.object({experimental:W.optional(W.object({}).passthrough()),sampling:W.optional(W.object({}).passthrough()),elicitation:W.optional(W.object({}).passthrough()),roots:W.optional(W.object({listChanged:W.optional(W.boolean())}).passthrough())}).passthrough(),LK=xq.extend({method:W.literal("initialize"),params:K_.extend({protocolVersion:W.string(),capabilities:KT,clientInfo:r7})});var PT=W.object({experimental:W.optional(W.object({}).passthrough()),logging:W.optional(W.object({}).passthrough()),completions:W.optional(W.object({}).passthrough()),prompts:W.optional(W.object({listChanged:W.optional(W.boolean())}).passthrough()),resources:W.optional(W.object({subscribe:W.optional(W.boolean()),listChanged:W.optional(W.boolean())}).passthrough()),tools:W.optional(W.object({listChanged:W.optional(W.boolean())}).passthrough())}).passthrough(),jT=P_.extend({protocolVersion:W.string(),capabilities:PT,serverInfo:r7,instructions:W.optional(W.string())}),tK=N_.extend({method:W.literal("notifications/initialized")});var L6=xq.extend({method:W.literal("ping")}),vT=W.object({progress:W.number(),total:W.optional(W.number()),message:W.optional(W.string())}).passthrough(),t6=N_.extend({method:W.literal("notifications/progress"),params:cf.merge(vT).extend({progressToken:H7})}),e6=xq.extend({params:K_.extend({cursor:W.optional(h7)}).optional()}),x6=P_.extend({nextCursor:W.optional(h7)}),b7=W.object({uri:W.string(),mimeType:W.optional(W.string()),_meta:W.optional(W.object({}).passthrough())}).passthrough(),V7=b7.extend({text:W.string()}),eK=W.string().refine((_)=>{try{return atob(_),!0}catch(q){return!1}},{message:"Invalid Base64 string"}),M7=b7.extend({blob:eK}),S7=tf.extend({uri:W.string(),description:W.optional(W.string()),mimeType:W.optional(W.string()),_meta:W.optional(W.object({}).passthrough())}).merge(Lf),wT=tf.extend({uriTemplate:W.string(),description:W.optional(W.string()),mimeType:W.optional(W.string()),_meta:W.optional(W.object({}).passthrough())}).merge(Lf),s6=e6.extend({method:W.literal("resources/list")}),OT=x6.extend({resources:W.array(S7)}),B6=e6.extend({method:W.literal("resources/templates/list")}),YT=x6.extend({resourceTemplates:W.array(wT)}),U6=xq.extend({method:W.literal("resources/read"),params:K_.extend({uri:W.string()})}),TT=P_.extend({contents:W.array(W.union([V7,M7]))}),zT=N_.extend({method:W.literal("notifications/resources/list_changed")}),WT=xq.extend({method:W.literal("resources/subscribe"),params:K_.extend({uri:W.string()})}),HT=xq.extend({method:W.literal("resources/unsubscribe"),params:K_.extend({uri:W.string()})}),hT=N_.extend({method:W.literal("notifications/resources/updated"),params:cf.extend({uri:W.string()})}),JT=W.object({name:W.string(),description:W.optional(W.string()),required:W.optional(W.boolean())}).passthrough(),kT=tf.extend({description:W.optional(W.string()),arguments:W.optional(W.array(JT)),_meta:W.optional(W.object({}).passthrough())}).merge(Lf),F6=e6.extend({method:W.literal("prompts/list")}),ZT=x6.extend({prompts:W.array(kT)}),Q6=xq.extend({method:W.literal("prompts/get"),params:K_.extend({name:W.string(),arguments:W.optional(W.record(W.string()))})}),xK=W.object({type:W.literal("text"),text:W.string(),_meta:W.optional(W.object({}).passthrough())}).passthrough(),sK=W.object({type:W.literal("image"),data:eK,mimeType:W.string(),_meta:W.optional(W.object({}).passthrough())}).passthrough(),BK=W.object({type:W.literal("audio"),data:eK,mimeType:W.string(),_meta:W.optional(W.object({}).passthrough())}).passthrough(),XT=W.object({type:W.literal("resource"),resource:W.union([V7,M7]),_meta:W.optional(W.object({}).passthrough())}).passthrough(),AT=S7.extend({type:W.literal("resource_link")}),N7=W.union([xK,sK,BK,AT,XT]),uT=W.object({role:W.enum(["user","assistant"]),content:N7}).passthrough(),GT=P_.extend({description:W.optional(W.string()),messages:W.array(uT)}),mT=N_.extend({method:W.literal("notifications/prompts/list_changed")}),rT=W.object({title:W.optional(W.string()),readOnlyHint:W.optional(W.boolean()),destructiveHint:W.optional(W.boolean()),idempotentHint:W.optional(W.boolean()),openWorldHint:W.optional(W.boolean())}).passthrough(),bT=tf.extend({description:W.optional(W.string()),inputSchema:W.object({type:W.literal("object"),properties:W.optional(W.object({}).passthrough()),required:W.optional(W.array(W.string()))}).passthrough(),outputSchema:W.optional(W.object({type:W.literal("object"),properties:W.optional(W.object({}).passthrough()),required:W.optional(W.array(W.string()))}).passthrough()),annotations:W.optional(rT),_meta:W.optional(W.object({}).passthrough())}).merge(Lf),q$=e6.extend({method:W.literal("tools/list")}),VT=x6.extend({tools:W.array(bT)}),C7=P_.extend({content:W.array(N7).default([]),structuredContent:W.object({}).passthrough().optional(),isError:W.optional(W.boolean())}),VC=C7.or(P_.extend({toolResult:W.unknown()})),_$=xq.extend({method:W.literal("tools/call"),params:K_.extend({name:W.string(),arguments:W.optional(W.record(W.unknown()))})}),MT=N_.extend({method:W.literal("notifications/tools/list_changed")}),ef=W.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),UK=xq.extend({method:W.literal("logging/setLevel"),params:K_.extend({level:ef})}),ST=N_.extend({method:W.literal("notifications/message"),params:cf.extend({level:ef,logger:W.optional(W.string()),data:W.unknown()})}),NT=W.object({name:W.string().optional()}).passthrough(),CT=W.object({hints:W.optional(W.array(NT)),costPriority:W.optional(W.number().min(0).max(1)),speedPriority:W.optional(W.number().min(0).max(1)),intelligencePriority:W.optional(W.number().min(0).max(1))}).passthrough(),pT=W.object({role:W.enum(["user","assistant"]),content:W.union([xK,sK,BK])}).passthrough(),lT=xq.extend({method:W.literal("sampling/createMessage"),params:K_.extend({messages:W.array(pT),systemPrompt:W.optional(W.string()),includeContext:W.optional(W.enum(["none","thisServer","allServers"])),temperature:W.optional(W.number()),maxTokens:W.number().int(),stopSequences:W.optional(W.array(W.string())),metadata:W.optional(W.object({}).passthrough()),modelPreferences:W.optional(CT)})}),FK=P_.extend({model:W.string(),stopReason:W.optional(W.enum(["endTurn","stopSequence","maxTokens"]).or(W.string())),role:W.enum(["user","assistant"]),content:W.discriminatedUnion("type",[xK,sK,BK])}),nT=W.object({type:W.literal("boolean"),title:W.optional(W.string()),description:W.optional(W.string()),default:W.optional(W.boolean())}).passthrough(),RT=W.object({type:W.literal("string"),title:W.optional(W.string()),description:W.optional(W.string()),minLength:W.optional(W.number()),maxLength:W.optional(W.number()),format:W.optional(W.enum(["email","uri","date","date-time"]))}).passthrough(),ET=W.object({type:W.enum(["number","integer"]),title:W.optional(W.string()),description:W.optional(W.string()),minimum:W.optional(W.number()),maximum:W.optional(W.number())}).passthrough(),gT=W.object({type:W.literal("string"),title:W.optional(W.string()),description:W.optional(W.string()),enum:W.array(W.string()),enumNames:W.optional(W.array(W.string()))}).passthrough(),dT=W.union([nT,RT,ET,gT]),aT=xq.extend({method:W.literal("elicitation/create"),params:K_.extend({message:W.string(),requestedSchema:W.object({type:W.literal("object"),properties:W.record(W.string(),dT),required:W.optional(W.array(W.string()))}).passthrough()})}),QK=P_.extend({action:W.enum(["accept","decline","cancel"]),content:W.optional(W.record(W.string(),W.unknown()))}),IT=W.object({type:W.literal("ref/resource"),uri:W.string()}).passthrough();var DT=W.object({type:W.literal("ref/prompt"),name:W.string()}).passthrough(),f$=xq.extend({method:W.literal("completion/complete"),params:K_.extend({ref:W.union([DT,IT]),argument:W.object({name:W.string(),value:W.string()}).passthrough(),context:W.optional(W.object({arguments:W.optional(W.record(W.string(),W.string()))}))})}),yT=P_.extend({completion:W.object({values:W.array(W.string()).max(100),total:W.optional(W.number().int()),hasMore:W.optional(W.boolean())}).passthrough()}),iT=W.object({uri:W.string().startsWith("file://"),name:W.optional(W.string()),_meta:W.optional(W.object({}).passthrough())}).passthrough(),oT=xq.extend({method:W.literal("roots/list")}),qP=P_.extend({roots:W.array(iT)}),cT=N_.extend({method:W.literal("notifications/roots/list_changed")}),MC=W.union([L6,LK,f$,UK,Q6,F6,s6,B6,U6,WT,HT,_$,q$]),SC=W.union([c6,t6,tK,cT]),NC=W.union([o6,FK,QK,qP]),CC=W.union([L6,lT,aT,oT]),pC=W.union([c6,t6,ST,hT,zT,MT,mT]),lC=W.union([o6,jT,yT,GT,ZT,OT,YT,TT,C7,VT]);class Xq extends Error{constructor(_,q,f){super(`MCP error ${_}: ${q}`);this.code=_,this.data=f,this.name="McpError"}}var LT=60000;class _P{constructor(_){this._options=_,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this.setNotificationHandler(c6,(q)=>{let f=this._requestHandlerAbortControllers.get(q.params.requestId);f===null||f===void 0||f.abort(q.params.reason)}),this.setNotificationHandler(t6,(q)=>{this._onprogress(q)}),this.setRequestHandler(L6,(q)=>({}))}_setupTimeout(_,q,f,K,$=!1){this._timeoutInfo.set(_,{timeoutId:setTimeout(K,q),startTime:Date.now(),timeout:q,maxTotalTimeout:f,resetTimeoutOnProgress:$,onTimeout:K})}_resetTimeout(_){let q=this._timeoutInfo.get(_);if(!q)return!1;let f=Date.now()-q.startTime;if(q.maxTotalTimeout&&f>=q.maxTotalTimeout)throw this._timeoutInfo.delete(_),new Xq(Zq.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:q.maxTotalTimeout,totalElapsed:f});return clearTimeout(q.timeoutId),q.timeoutId=setTimeout(q.onTimeout,q.timeout),!0}_cleanupTimeout(_){let q=this._timeoutInfo.get(_);if(q)clearTimeout(q.timeoutId),this._timeoutInfo.delete(_)}async connect(_){var q,f,K;this._transport=_;let $=(q=this.transport)===null||q===void 0?void 0:q.onclose;this._transport.onclose=()=>{$===null||$===void 0||$(),this._onclose()};let P=(f=this.transport)===null||f===void 0?void 0:f.onerror;this._transport.onerror=(v)=>{P===null||P===void 0||P(v),this._onerror(v)};let j=(K=this._transport)===null||K===void 0?void 0:K.onmessage;this._transport.onmessage=(v,w)=>{if(j===null||j===void 0||j(v,w),cK(v)||G7(v))this._onresponse(v);else if(k7(v))this._onrequest(v,w);else if(X7(v))this._onnotification(v);else this._onerror(new Error(`Unknown message type: ${JSON.stringify(v)}`))},await this._transport.start()}_onclose(){var _;let q=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._transport=void 0,(_=this.onclose)===null||_===void 0||_.call(this);let f=new Xq(Zq.ConnectionClosed,"Connection closed");for(let K of q.values())K(f)}_onerror(_){var q;(q=this.onerror)===null||q===void 0||q.call(this,_)}_onnotification(_){var q;let f=(q=this._notificationHandlers.get(_.method))!==null&&q!==void 0?q:this.fallbackNotificationHandler;if(f===void 0)return;Promise.resolve().then(()=>f(_)).catch((K)=>this._onerror(new Error(`Uncaught error in notification handler: ${K}`)))}_onrequest(_,q){var f,K;let $=(f=this._requestHandlers.get(_.method))!==null&&f!==void 0?f:this.fallbackRequestHandler,P=this._transport;if($===void 0){P===null||P===void 0||P.send({jsonrpc:"2.0",id:_.id,error:{code:Zq.MethodNotFound,message:"Method not found"}}).catch((w)=>this._onerror(new Error(`Failed to send an error response: ${w}`)));return}let j=new AbortController;this._requestHandlerAbortControllers.set(_.id,j);let v={signal:j.signal,sessionId:P===null||P===void 0?void 0:P.sessionId,_meta:(K=_.params)===null||K===void 0?void 0:K._meta,sendNotification:(w)=>this.notification(w,{relatedRequestId:_.id}),sendRequest:(w,O,T)=>this.request(w,O,{...T,relatedRequestId:_.id}),authInfo:q===null||q===void 0?void 0:q.authInfo,requestId:_.id,requestInfo:q===null||q===void 0?void 0:q.requestInfo};Promise.resolve().then(()=>$(_,v)).then((w)=>{if(j.signal.aborted)return;return P===null||P===void 0?void 0:P.send({result:w,jsonrpc:"2.0",id:_.id})},(w)=>{var O;if(j.signal.aborted)return;return P===null||P===void 0?void 0:P.send({jsonrpc:"2.0",id:_.id,error:{code:Number.isSafeInteger(w.code)?w.code:Zq.InternalError,message:(O=w.message)!==null&&O!==void 0?O:"Internal error"}})}).catch((w)=>this._onerror(new Error(`Failed to send response: ${w}`))).finally(()=>{this._requestHandlerAbortControllers.delete(_.id)})}_onprogress(_){let{progressToken:q,...f}=_.params,K=Number(q),$=this._progressHandlers.get(K);if(!$){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(_)}`));return}let P=this._responseHandlers.get(K),j=this._timeoutInfo.get(K);if(j&&P&&j.resetTimeoutOnProgress)try{this._resetTimeout(K)}catch(v){P(v);return}$(f)}_onresponse(_){let q=Number(_.id),f=this._responseHandlers.get(q);if(f===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(_)}`));return}if(this._responseHandlers.delete(q),this._progressHandlers.delete(q),this._cleanupTimeout(q),cK(_))f(_);else{let K=new Xq(_.error.code,_.error.message,_.error.data);f(K)}}get transport(){return this._transport}async close(){var _;await((_=this._transport)===null||_===void 0?void 0:_.close())}request(_,q,f){let{relatedRequestId:K,resumptionToken:$,onresumptiontoken:P}=f!==null&&f!==void 0?f:{};return new Promise((j,v)=>{var w,O,T,Y,z,H;if(!this._transport){v(new Error("Not connected"));return}if(((w=this._options)===null||w===void 0?void 0:w.enforceStrictCapabilities)===!0)this.assertCapabilityForMethod(_.method);(O=f===null||f===void 0?void 0:f.signal)===null||O===void 0||O.throwIfAborted();let h=this._requestMessageId++,J={..._,jsonrpc:"2.0",id:h};if(f===null||f===void 0?void 0:f.onprogress)this._progressHandlers.set(h,f.onprogress),J.params={..._.params,_meta:{...((T=_.params)===null||T===void 0?void 0:T._meta)||{},progressToken:h}};let k=(N)=>{var n;this._responseHandlers.delete(h),this._progressHandlers.delete(h),this._cleanupTimeout(h),(n=this._transport)===null||n===void 0||n.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:h,reason:String(N)}},{relatedRequestId:K,resumptionToken:$,onresumptiontoken:P}).catch((R)=>this._onerror(new Error(`Failed to send cancellation: ${R}`))),v(N)};this._responseHandlers.set(h,(N)=>{var n;if((n=f===null||f===void 0?void 0:f.signal)===null||n===void 0?void 0:n.aborted)return;if(N instanceof Error)return v(N);try{let R=q.parse(N.result);j(R)}catch(R){v(R)}}),(Y=f===null||f===void 0?void 0:f.signal)===null||Y===void 0||Y.addEventListener("abort",()=>{var N;k((N=f===null||f===void 0?void 0:f.signal)===null||N===void 0?void 0:N.reason)});let X=(z=f===null||f===void 0?void 0:f.timeout)!==null&&z!==void 0?z:LT,l=()=>k(new Xq(Zq.RequestTimeout,"Request timed out",{timeout:X}));this._setupTimeout(h,X,f===null||f===void 0?void 0:f.maxTotalTimeout,l,(H=f===null||f===void 0?void 0:f.resetTimeoutOnProgress)!==null&&H!==void 0?H:!1),this._transport.send(J,{relatedRequestId:K,resumptionToken:$,onresumptiontoken:P}).catch((N)=>{this._cleanupTimeout(h),v(N)})})}async notification(_,q){var f,K;if(!this._transport)throw new Error("Not connected");if(this.assertNotificationCapability(_.method),((K=(f=this._options)===null||f===void 0?void 0:f.debouncedNotificationMethods)!==null&&K!==void 0?K:[]).includes(_.method)&&!_.params&&!(q===null||q===void 0?void 0:q.relatedRequestId)){if(this._pendingDebouncedNotifications.has(_.method))return;this._pendingDebouncedNotifications.add(_.method),Promise.resolve().then(()=>{var v;if(this._pendingDebouncedNotifications.delete(_.method),!this._transport)return;let w={..._,jsonrpc:"2.0"};(v=this._transport)===null||v===void 0||v.send(w,q).catch((O)=>this._onerror(O))});return}let j={..._,jsonrpc:"2.0"};await this._transport.send(j,q)}setRequestHandler(_,q){let f=_.shape.method.value;this.assertRequestHandlerCapability(f),this._requestHandlers.set(f,(K,$)=>{return Promise.resolve(q(_.parse(K),$))})}removeRequestHandler(_){this._requestHandlers.delete(_)}assertCanSetRequestHandler(_){if(this._requestHandlers.has(_))throw new Error(`A request handler for ${_} already exists, which would be overridden`)}setNotificationHandler(_,q){this._notificationHandlers.set(_.shape.method.value,(f)=>Promise.resolve(q(_.parse(f))))}removeNotificationHandler(_){this._notificationHandlers.delete(_)}}function p7(_,q){return Object.entries(q).reduce((f,[K,$])=>{if($&&typeof $==="object")f[K]=f[K]?{...f[K],...$}:$;else f[K]=$;return f},{..._})}var n9=IK(l9(),1);class VP extends _P{constructor(_,q){var f;super(q);if(this._serverInfo=_,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(ef.options.map((K,$)=>[K,$])),this.isMessageIgnored=(K,$)=>{let P=this._loggingLevels.get($);return P?this.LOG_LEVEL_SEVERITY.get(K)<this.LOG_LEVEL_SEVERITY.get(P):!1},this._capabilities=(f=q===null||q===void 0?void 0:q.capabilities)!==null&&f!==void 0?f:{},this._instructions=q===null||q===void 0?void 0:q.instructions,this.setRequestHandler(LK,(K)=>this._oninitialize(K)),this.setNotificationHandler(tK,()=>{var K;return(K=this.oninitialized)===null||K===void 0?void 0:K.call(this)}),this._capabilities.logging)this.setRequestHandler(UK,async(K,$)=>{var P;let j=$.sessionId||((P=$.requestInfo)===null||P===void 0?void 0:P.headers["mcp-session-id"])||void 0,{level:v}=K.params,w=ef.safeParse(v);if(w.success)this._loggingLevels.set(j,w.data);return{}})}registerCapabilities(_){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=p7(this._capabilities,_)}assertCapabilityForMethod(_){var q,f,K;switch(_){case"sampling/createMessage":if(!((q=this._clientCapabilities)===null||q===void 0?void 0:q.sampling))throw new Error(`Client does not support sampling (required for ${_})`);break;case"elicitation/create":if(!((f=this._clientCapabilities)===null||f===void 0?void 0:f.elicitation))throw new Error(`Client does not support elicitation (required for ${_})`);break;case"roots/list":if(!((K=this._clientCapabilities)===null||K===void 0?void 0:K.roots))throw new Error(`Client does not support listing roots (required for ${_})`);break;case"ping":break}}assertNotificationCapability(_){switch(_){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${_})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${_})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${_})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${_})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(_){switch(_){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Server does not support sampling (required for ${_})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${_})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${_})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${_})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${_})`);break;case"ping":case"initialize":break}}async _oninitialize(_){let q=_.params.protocolVersion;return this._clientCapabilities=_.params.capabilities,this._clientVersion=_.params.clientInfo,{protocolVersion:W7.includes(q)?q:oK,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},o6)}async createMessage(_,q){return this.request({method:"sampling/createMessage",params:_},FK,q)}async elicitInput(_,q){let f=await this.request({method:"elicitation/create",params:_},QK,q);if(f.action==="accept"&&f.content)try{let K=new n9.default,$=K.compile(_.requestedSchema);if(!$(f.content))throw new Xq(Zq.InvalidParams,`Elicitation response content does not match requested schema: ${K.errorsText($.errors)}`)}catch(K){if(K instanceof Xq)throw K;throw new Xq(Zq.InternalError,`Error validating elicitation response: ${K}`)}return f}async listRoots(_,q){return this.request({method:"roots/list",params:_},qP,q)}async sendLoggingMessage(_,q){if(this._capabilities.logging){if(!this.isMessageIgnored(_.level,q))return this.notification({method:"notifications/message",params:_})}}async sendResourceUpdated(_){return this.notification({method:"notifications/resources/updated",params:_})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}}var E9=Symbol("Let zodToJsonSchema decide on which parser to use");var R9={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},g9=(_)=>typeof _==="string"?{...R9,name:_}:{...R9,..._};var d9=(_)=>{let q=g9(_),f=q.name!==void 0?[...q.basePath,q.definitionPath,q.name]:q.basePath;return{...q,flags:{hasReferencedOpenAiAnyType:!1},currentPath:f,propertyPath:void 0,seen:new Map(Object.entries(q.definitions).map(([K,$])=>[$._def,{def:$._def,path:[...q.basePath,q.definitionPath,K],jsonSchema:void 0}]))}};function MP(_,q,f,K){if(!K?.errorMessages)return;if(f)_.errorMessage={..._.errorMessage,[q]:f}}function jq(_,q,f,K,$){_[q]=f,MP(_,q,K,$)}var u$=(_,q)=>{let f=0;for(;f<_.length&&f<q.length;f++)if(_[f]!==q[f])break;return[(_.length-f).toString(),...q.slice(f)].join("/")};function Gq(_){if(_.target!=="openAi")return{};let q=[..._.basePath,_.definitionPath,_.openAiAnyTypeName];return _.flags.hasReferencedOpenAiAnyType=!0,{$ref:_.$refStrategy==="relative"?u$(q,_.currentPath):q.join("/")}}function a9(_,q){let f={type:"array"};if(_.type?._def&&_.type?._def?.typeName!==i.ZodAny)f.items=F(_.type._def,{...q,currentPath:[...q.currentPath,"items"]});if(_.minLength)jq(f,"minItems",_.minLength.value,_.minLength.message,q);if(_.maxLength)jq(f,"maxItems",_.maxLength.value,_.maxLength.message,q);if(_.exactLength)jq(f,"minItems",_.exactLength.value,_.exactLength.message,q),jq(f,"maxItems",_.exactLength.value,_.exactLength.message,q);return f}function I9(_,q){let f={type:"integer",format:"int64"};if(!_.checks)return f;for(let K of _.checks)switch(K.kind){case"min":if(q.target==="jsonSchema7")if(K.inclusive)jq(f,"minimum",K.value,K.message,q);else jq(f,"exclusiveMinimum",K.value,K.message,q);else{if(!K.inclusive)f.exclusiveMinimum=!0;jq(f,"minimum",K.value,K.message,q)}break;case"max":if(q.target==="jsonSchema7")if(K.inclusive)jq(f,"maximum",K.value,K.message,q);else jq(f,"exclusiveMaximum",K.value,K.message,q);else{if(!K.inclusive)f.exclusiveMaximum=!0;jq(f,"maximum",K.value,K.message,q)}break;case"multipleOf":jq(f,"multipleOf",K.value,K.message,q);break}return f}function D9(){return{type:"boolean"}}function G$(_,q){return F(_.type._def,q)}var y9=(_,q)=>{return F(_.innerType._def,q)};function SP(_,q,f){let K=f??q.dateStrategy;if(Array.isArray(K))return{anyOf:K.map(($,P)=>SP(_,q,$))};switch(K){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return rW(_,q)}}var rW=(_,q)=>{let f={type:"integer",format:"unix-time"};if(q.target==="openApi3")return f;for(let K of _.checks)switch(K.kind){case"min":jq(f,"minimum",K.value,K.message,q);break;case"max":jq(f,"maximum",K.value,K.message,q);break}return f};function i9(_,q){return{...F(_.innerType._def,q),default:_.defaultValue()}}function o9(_,q){return q.effectStrategy==="input"?F(_.schema._def,q):Gq(q)}function c9(_){return{type:"string",enum:Array.from(_.values)}}var bW=(_)=>{if("type"in _&&_.type==="string")return!1;return"allOf"in _};function L9(_,q){let f=[F(_.left._def,{...q,currentPath:[...q.currentPath,"allOf","0"]}),F(_.right._def,{...q,currentPath:[...q.currentPath,"allOf","1"]})].filter((P)=>!!P),K=q.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,$=[];return f.forEach((P)=>{if(bW(P)){if($.push(...P.allOf),P.unevaluatedProperties===void 0)K=void 0}else{let j=P;if("additionalProperties"in P&&P.additionalProperties===!1){let{additionalProperties:v,...w}=P;j=w}else K=void 0;$.push(j)}}),$.length?{allOf:$,...K}:void 0}function t9(_,q){let f=typeof _.value;if(f!=="bigint"&&f!=="number"&&f!=="boolean"&&f!=="string")return{type:Array.isArray(_.value)?"array":"object"};if(q.target==="openApi3")return{type:f==="bigint"?"integer":f,enum:[_.value]};return{type:f==="bigint"?"integer":f,const:_.value}}var NP=void 0,J_={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(NP===void 0)NP=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return NP},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function m$(_,q){let f={type:"string"};if(_.checks)for(let K of _.checks)switch(K.kind){case"min":jq(f,"minLength",typeof f.minLength==="number"?Math.max(f.minLength,K.value):K.value,K.message,q);break;case"max":jq(f,"maxLength",typeof f.maxLength==="number"?Math.min(f.maxLength,K.value):K.value,K.message,q);break;case"email":switch(q.emailStrategy){case"format:email":k_(f,"email",K.message,q);break;case"format:idn-email":k_(f,"idn-email",K.message,q);break;case"pattern:zod":cq(f,J_.email,K.message,q);break}break;case"url":k_(f,"uri",K.message,q);break;case"uuid":k_(f,"uuid",K.message,q);break;case"regex":cq(f,K.regex,K.message,q);break;case"cuid":cq(f,J_.cuid,K.message,q);break;case"cuid2":cq(f,J_.cuid2,K.message,q);break;case"startsWith":cq(f,RegExp(`^${CP(K.value,q)}`),K.message,q);break;case"endsWith":cq(f,RegExp(`${CP(K.value,q)}$`),K.message,q);break;case"datetime":k_(f,"date-time",K.message,q);break;case"date":k_(f,"date",K.message,q);break;case"time":k_(f,"time",K.message,q);break;case"duration":k_(f,"duration",K.message,q);break;case"length":jq(f,"minLength",typeof f.minLength==="number"?Math.max(f.minLength,K.value):K.value,K.message,q),jq(f,"maxLength",typeof f.maxLength==="number"?Math.min(f.maxLength,K.value):K.value,K.message,q);break;case"includes":{cq(f,RegExp(CP(K.value,q)),K.message,q);break}case"ip":{if(K.version!=="v6")k_(f,"ipv4",K.message,q);if(K.version!=="v4")k_(f,"ipv6",K.message,q);break}case"base64url":cq(f,J_.base64url,K.message,q);break;case"jwt":cq(f,J_.jwt,K.message,q);break;case"cidr":{if(K.version!=="v6")cq(f,J_.ipv4Cidr,K.message,q);if(K.version!=="v4")cq(f,J_.ipv6Cidr,K.message,q);break}case"emoji":cq(f,J_.emoji(),K.message,q);break;case"ulid":{cq(f,J_.ulid,K.message,q);break}case"base64":{switch(q.base64Strategy){case"format:binary":{k_(f,"binary",K.message,q);break}case"contentEncoding:base64":{jq(f,"contentEncoding","base64",K.message,q);break}case"pattern:zod":{cq(f,J_.base64,K.message,q);break}}break}case"nanoid":cq(f,J_.nanoid,K.message,q);case"toLowerCase":case"toUpperCase":case"trim":break;default:(($)=>{})(K)}return f}function CP(_,q){return q.patternStrategy==="escape"?MW(_):_}var VW=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function MW(_){let q="";for(let f=0;f<_.length;f++){if(!VW.has(_[f]))q+="\\";q+=_[f]}return q}function k_(_,q,f,K){if(_.format||_.anyOf?.some(($)=>$.format)){if(!_.anyOf)_.anyOf=[];if(_.format){if(_.anyOf.push({format:_.format,..._.errorMessage&&K.errorMessages&&{errorMessage:{format:_.errorMessage.format}}}),delete _.format,_.errorMessage){if(delete _.errorMessage.format,Object.keys(_.errorMessage).length===0)delete _.errorMessage}}_.anyOf.push({format:q,...f&&K.errorMessages&&{errorMessage:{format:f}}})}else jq(_,"format",q,f,K)}function cq(_,q,f,K){if(_.pattern||_.allOf?.some(($)=>$.pattern)){if(!_.allOf)_.allOf=[];if(_.pattern){if(_.allOf.push({pattern:_.pattern,..._.errorMessage&&K.errorMessages&&{errorMessage:{pattern:_.errorMessage.pattern}}}),delete _.pattern,_.errorMessage){if(delete _.errorMessage.pattern,Object.keys(_.errorMessage).length===0)delete _.errorMessage}}_.allOf.push({pattern:e9(q,K),...f&&K.errorMessages&&{errorMessage:{pattern:f}}})}else jq(_,"pattern",e9(q,K),f,K)}function e9(_,q){if(!q.applyRegexFlags||!_.flags)return _.source;let f={i:_.flags.includes("i"),m:_.flags.includes("m"),s:_.flags.includes("s")},K=f.i?_.source.toLowerCase():_.source,$="",P=!1,j=!1,v=!1;for(let w=0;w<K.length;w++){if(P){$+=K[w],P=!1;continue}if(f.i){if(j){if(K[w].match(/[a-z]/)){if(v)$+=K[w],$+=`${K[w-2]}-${K[w]}`.toUpperCase(),v=!1;else if(K[w+1]==="-"&&K[w+2]?.match(/[a-z]/))$+=K[w],v=!0;else $+=`${K[w]}${K[w].toUpperCase()}`;continue}}else if(K[w].match(/[a-z]/)){$+=`[${K[w]}${K[w].toUpperCase()}]`;continue}}if(f.m){if(K[w]==="^"){$+=`(^|(?<=[\r
|
|
172
|
+
Error: ${K}`)}},aN=()=>{let _;try{_=JO.findProjectRoot()}catch{_=XO(process.cwd(),".swic")}let q=XO(gN(),".swic"),f=`${_}/${RK}`,K=`${q}/${RK}`,$=`${_}/${EK}`,P=`${q}/${EK}`;return AO(f,K),AO($,P),{projectDataDir:_,sharedDataDir:q}},IN=(_)=>{let{projectBoundaryDir:q,sharedBoundaryDir:f}=_,K=`${q}/${RK}`,$=`${f}/${RK}`,P=`${q}/${EK}`,j=`${f}/${EK}`,v=U6.create({boundaryDir:K}),w=U6.create({boundaryDir:$}),O=F6.create({boundaryDir:K}),T=F6.create({boundaryDir:$}),Y=U6.create({boundaryDir:P}),z=U6.create({boundaryDir:j}),H=F6.create({boundaryDir:P}),k=F6.create({boundaryDir:j}),J=tv.create({fileServiceByScope:{project:v,shared:w},folderServiceByScope:{project:O,shared:T},scopeRootByScope:{project:K,shared:$},indexFilename:dN}),h=HO({projectFileService:Y,projectFolderService:H,sharedFileService:z,sharedFolderService:k});return Object.freeze({DocService:J,TemplateService:h})},DN,yN;var GO=b_(()=>{Dv();cv();ev();hO();kO();DN=Object.freeze({createServices:IN,lazilyGetDataDirs:aN}),yN=DN});var W={};$7(W,{void:()=>pY,util:()=>Kq,unknown:()=>NY,union:()=>EY,undefined:()=>VY,tuple:()=>aY,transformer:()=>xY,symbol:()=>bY,string:()=>z7,strictObject:()=>RY,setErrorMap:()=>BO,set:()=>yY,record:()=>IY,quotelessJson:()=>xO,promise:()=>eY,preprocess:()=>UY,pipeline:()=>FY,ostring:()=>QY,optional:()=>sY,onumber:()=>qT,oboolean:()=>_T,objectUtil:()=>iK,object:()=>nY,number:()=>W7,nullable:()=>BY,null:()=>MY,never:()=>CY,nativeEnum:()=>tY,nan:()=>GY,map:()=>DY,makeIssue:()=>d6,literal:()=>cY,lazy:()=>oY,late:()=>AY,isValid:()=>B_,isDirty:()=>af,isAsync:()=>x8,isAborted:()=>df,intersection:()=>dY,instanceof:()=>uY,getParsedType:()=>V_,getErrorMap:()=>e8,function:()=>iY,enum:()=>LY,effect:()=>xY,discriminatedUnion:()=>gY,defaultErrorMap:()=>I_,datetimeRegex:()=>O7,date:()=>rY,custom:()=>T7,coerce:()=>fT,boolean:()=>H7,bigint:()=>mY,array:()=>lY,any:()=>SY,addIssueToContext:()=>e,ZodVoid:()=>I6,ZodUnknown:()=>U_,ZodUnion:()=>q6,ZodUndefined:()=>F8,ZodType:()=>$q,ZodTuple:()=>S_,ZodTransformer:()=>h_,ZodSymbol:()=>a6,ZodString:()=>T_,ZodSet:()=>m8,ZodSchema:()=>$q,ZodRecord:()=>D6,ZodReadonly:()=>v6,ZodPromise:()=>r8,ZodPipeline:()=>o6,ZodParsedType:()=>L,ZodOptional:()=>W_,ZodObject:()=>bq,ZodNumber:()=>F_,ZodNullable:()=>y_,ZodNull:()=>Q8,ZodNever:()=>M_,ZodNativeEnum:()=>K6,ZodNaN:()=>i6,ZodMap:()=>y6,ZodLiteral:()=>$6,ZodLazy:()=>f6,ZodIssueCode:()=>y,ZodIntersection:()=>_6,ZodFunction:()=>B8,ZodFirstPartyTypeKind:()=>i,ZodError:()=>eq,ZodEnum:()=>q8,ZodEffects:()=>h_,ZodDiscriminatedUnion:()=>If,ZodDefault:()=>P6,ZodDate:()=>u8,ZodCatch:()=>j6,ZodBranded:()=>Df,ZodBoolean:()=>U8,ZodBigInt:()=>Q_,ZodArray:()=>z_,ZodAny:()=>G8,Schema:()=>$q,ParseStatus:()=>aq,OK:()=>yq,NEVER:()=>$T,INVALID:()=>U,EMPTY_PATH:()=>UO,DIRTY:()=>A8,BRAND:()=>XY});var Kq;(function(_){_.assertEqual=($)=>{};function q($){}_.assertIs=q;function f($){throw new Error}_.assertNever=f,_.arrayToEnum=($)=>{let P={};for(let j of $)P[j]=j;return P},_.getValidEnumValues=($)=>{let P=_.objectKeys($).filter((v)=>typeof $[$[v]]!=="number"),j={};for(let v of P)j[v]=$[v];return _.objectValues(j)},_.objectValues=($)=>{return _.objectKeys($).map(function(P){return $[P]})},_.objectKeys=typeof Object.keys==="function"?($)=>Object.keys($):($)=>{let P=[];for(let j in $)if(Object.prototype.hasOwnProperty.call($,j))P.push(j);return P},_.find=($,P)=>{for(let j of $)if(P(j))return j;return},_.isInteger=typeof Number.isInteger==="function"?($)=>Number.isInteger($):($)=>typeof $==="number"&&Number.isFinite($)&&Math.floor($)===$;function K($,P=" | "){return $.map((j)=>typeof j==="string"?`'${j}'`:j).join(P)}_.joinValues=K,_.jsonStringifyReplacer=($,P)=>{if(typeof P==="bigint")return P.toString();return P}})(Kq||(Kq={}));var iK;(function(_){_.mergeShapes=(q,f)=>{return{...q,...f}}})(iK||(iK={}));var L=Kq.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),V_=(_)=>{switch(typeof _){case"undefined":return L.undefined;case"string":return L.string;case"number":return Number.isNaN(_)?L.nan:L.number;case"boolean":return L.boolean;case"function":return L.function;case"bigint":return L.bigint;case"symbol":return L.symbol;case"object":if(Array.isArray(_))return L.array;if(_===null)return L.null;if(_.then&&typeof _.then==="function"&&_.catch&&typeof _.catch==="function")return L.promise;if(typeof Map!=="undefined"&&_ instanceof Map)return L.map;if(typeof Set!=="undefined"&&_ instanceof Set)return L.set;if(typeof Date!=="undefined"&&_ instanceof Date)return L.date;return L.object;default:return L.unknown}};var y=Kq.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),xO=(_)=>{return JSON.stringify(_,null,2).replace(/"([^"]+)":/g,"$1:")};class eq extends Error{get errors(){return this.issues}constructor(_){super();this.issues=[],this.addIssue=(f)=>{this.issues=[...this.issues,f]},this.addIssues=(f=[])=>{this.issues=[...this.issues,...f]};let q=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,q);else this.__proto__=q;this.name="ZodError",this.issues=_}format(_){let q=_||function($){return $.message},f={_errors:[]},K=($)=>{for(let P of $.issues)if(P.code==="invalid_union")P.unionErrors.map(K);else if(P.code==="invalid_return_type")K(P.returnTypeError);else if(P.code==="invalid_arguments")K(P.argumentsError);else if(P.path.length===0)f._errors.push(q(P));else{let j=f,v=0;while(v<P.path.length){let w=P.path[v];if(v!==P.path.length-1)j[w]=j[w]||{_errors:[]};else j[w]=j[w]||{_errors:[]},j[w]._errors.push(q(P));j=j[w],v++}}};return K(this),f}static assert(_){if(!(_ instanceof eq))throw new Error(`Not a ZodError: ${_}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Kq.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(_=(q)=>q.message){let q={},f=[];for(let K of this.issues)if(K.path.length>0){let $=K.path[0];q[$]=q[$]||[],q[$].push(_(K))}else f.push(_(K));return{formErrors:f,fieldErrors:q}}get formErrors(){return this.flatten()}}eq.create=(_)=>{return new eq(_)};var sO=(_,q)=>{let f;switch(_.code){case y.invalid_type:if(_.received===L.undefined)f="Required";else f=`Expected ${_.expected}, received ${_.received}`;break;case y.invalid_literal:f=`Invalid literal value, expected ${JSON.stringify(_.expected,Kq.jsonStringifyReplacer)}`;break;case y.unrecognized_keys:f=`Unrecognized key(s) in object: ${Kq.joinValues(_.keys,", ")}`;break;case y.invalid_union:f="Invalid input";break;case y.invalid_union_discriminator:f=`Invalid discriminator value. Expected ${Kq.joinValues(_.options)}`;break;case y.invalid_enum_value:f=`Invalid enum value. Expected ${Kq.joinValues(_.options)}, received '${_.received}'`;break;case y.invalid_arguments:f="Invalid function arguments";break;case y.invalid_return_type:f="Invalid function return type";break;case y.invalid_date:f="Invalid date";break;case y.invalid_string:if(typeof _.validation==="object")if("includes"in _.validation){if(f=`Invalid input: must include "${_.validation.includes}"`,typeof _.validation.position==="number")f=`${f} at one or more positions greater than or equal to ${_.validation.position}`}else if("startsWith"in _.validation)f=`Invalid input: must start with "${_.validation.startsWith}"`;else if("endsWith"in _.validation)f=`Invalid input: must end with "${_.validation.endsWith}"`;else Kq.assertNever(_.validation);else if(_.validation!=="regex")f=`Invalid ${_.validation}`;else f="Invalid";break;case y.too_small:if(_.type==="array")f=`Array must contain ${_.exact?"exactly":_.inclusive?"at least":"more than"} ${_.minimum} element(s)`;else if(_.type==="string")f=`String must contain ${_.exact?"exactly":_.inclusive?"at least":"over"} ${_.minimum} character(s)`;else if(_.type==="number")f=`Number must be ${_.exact?"exactly equal to ":_.inclusive?"greater than or equal to ":"greater than "}${_.minimum}`;else if(_.type==="bigint")f=`Number must be ${_.exact?"exactly equal to ":_.inclusive?"greater than or equal to ":"greater than "}${_.minimum}`;else if(_.type==="date")f=`Date must be ${_.exact?"exactly equal to ":_.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(_.minimum))}`;else f="Invalid input";break;case y.too_big:if(_.type==="array")f=`Array must contain ${_.exact?"exactly":_.inclusive?"at most":"less than"} ${_.maximum} element(s)`;else if(_.type==="string")f=`String must contain ${_.exact?"exactly":_.inclusive?"at most":"under"} ${_.maximum} character(s)`;else if(_.type==="number")f=`Number must be ${_.exact?"exactly":_.inclusive?"less than or equal to":"less than"} ${_.maximum}`;else if(_.type==="bigint")f=`BigInt must be ${_.exact?"exactly":_.inclusive?"less than or equal to":"less than"} ${_.maximum}`;else if(_.type==="date")f=`Date must be ${_.exact?"exactly":_.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(_.maximum))}`;else f="Invalid input";break;case y.custom:f="Invalid input";break;case y.invalid_intersection_types:f="Intersection results could not be merged";break;case y.not_multiple_of:f=`Number must be a multiple of ${_.multipleOf}`;break;case y.not_finite:f="Number must be finite";break;default:f=q.defaultError,Kq.assertNever(_)}return{message:f}},I_=sO;var K7=I_;function BO(_){K7=_}function e8(){return K7}var d6=(_)=>{let{data:q,path:f,errorMaps:K,issueData:$}=_,P=[...f,...$.path||[]],j={...$,path:P};if($.message!==void 0)return{...$,path:P,message:$.message};let v="",w=K.filter((O)=>!!O).slice().reverse();for(let O of w)v=O(j,{data:q,defaultError:v}).message;return{...$,path:P,message:v}},UO=[];function e(_,q){let f=e8(),K=d6({issueData:q,data:_.data,path:_.path,errorMaps:[_.common.contextualErrorMap,_.schemaErrorMap,f,f===I_?void 0:I_].filter(($)=>!!$)});_.common.issues.push(K)}class aq{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(_,q){let f=[];for(let K of q){if(K.status==="aborted")return U;if(K.status==="dirty")_.dirty();f.push(K.value)}return{status:_.value,value:f}}static async mergeObjectAsync(_,q){let f=[];for(let K of q){let $=await K.key,P=await K.value;f.push({key:$,value:P})}return aq.mergeObjectSync(_,f)}static mergeObjectSync(_,q){let f={};for(let K of q){let{key:$,value:P}=K;if($.status==="aborted")return U;if(P.status==="aborted")return U;if($.status==="dirty")_.dirty();if(P.status==="dirty")_.dirty();if($.value!=="__proto__"&&(typeof P.value!=="undefined"||K.alwaysSet))f[$.value]=P.value}return{status:_.value,value:f}}}var U=Object.freeze({status:"aborted"}),A8=(_)=>({status:"dirty",value:_}),yq=(_)=>({status:"valid",value:_}),df=(_)=>_.status==="aborted",af=(_)=>_.status==="dirty",B_=(_)=>_.status==="valid",x8=(_)=>typeof Promise!=="undefined"&&_ instanceof Promise;var B;(function(_){_.errToObj=(q)=>typeof q==="string"?{message:q}:q||{},_.toString=(q)=>typeof q==="string"?q:q?.message})(B||(B={}));class H_{constructor(_,q,f,K){this._cachedPath=[],this.parent=_,this.data=q,this._path=f,this._key=K}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var P7=(_,q)=>{if(B_(q))return{success:!0,data:q.value};else{if(!_.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let f=new eq(_.common.issues);return this._error=f,this._error}}}};function qq(_){if(!_)return{};let{errorMap:q,invalid_type_error:f,required_error:K,description:$}=_;if(q&&(f||K))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(q)return{errorMap:q,description:$};return{errorMap:(j,v)=>{let{message:w}=_;if(j.code==="invalid_enum_value")return{message:w??v.defaultError};if(typeof v.data==="undefined")return{message:w??K??v.defaultError};if(j.code!=="invalid_type")return{message:v.defaultError};return{message:w??f??v.defaultError}},description:$}}class $q{get description(){return this._def.description}_getType(_){return V_(_.data)}_getOrReturnCtx(_,q){return q||{common:_.parent.common,data:_.data,parsedType:V_(_.data),schemaErrorMap:this._def.errorMap,path:_.path,parent:_.parent}}_processInputParams(_){return{status:new aq,ctx:{common:_.parent.common,data:_.data,parsedType:V_(_.data),schemaErrorMap:this._def.errorMap,path:_.path,parent:_.parent}}}_parseSync(_){let q=this._parse(_);if(x8(q))throw new Error("Synchronous parse encountered promise.");return q}_parseAsync(_){let q=this._parse(_);return Promise.resolve(q)}parse(_,q){let f=this.safeParse(_,q);if(f.success)return f.data;throw f.error}safeParse(_,q){let f={common:{issues:[],async:q?.async??!1,contextualErrorMap:q?.errorMap},path:q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:_,parsedType:V_(_)},K=this._parseSync({data:_,path:f.path,parent:f});return P7(f,K)}"~validate"(_){let q={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:_,parsedType:V_(_)};if(!this["~standard"].async)try{let f=this._parseSync({data:_,path:[],parent:q});return B_(f)?{value:f.value}:{issues:q.common.issues}}catch(f){if(f?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;q.common={issues:[],async:!0}}return this._parseAsync({data:_,path:[],parent:q}).then((f)=>B_(f)?{value:f.value}:{issues:q.common.issues})}async parseAsync(_,q){let f=await this.safeParseAsync(_,q);if(f.success)return f.data;throw f.error}async safeParseAsync(_,q){let f={common:{issues:[],contextualErrorMap:q?.errorMap,async:!0},path:q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:_,parsedType:V_(_)},K=this._parse({data:_,path:f.path,parent:f}),$=await(x8(K)?K:Promise.resolve(K));return P7(f,$)}refine(_,q){let f=(K)=>{if(typeof q==="string"||typeof q==="undefined")return{message:q};else if(typeof q==="function")return q(K);else return q};return this._refinement((K,$)=>{let P=_(K),j=()=>$.addIssue({code:y.custom,...f(K)});if(typeof Promise!=="undefined"&&P instanceof Promise)return P.then((v)=>{if(!v)return j(),!1;else return!0});if(!P)return j(),!1;else return!0})}refinement(_,q){return this._refinement((f,K)=>{if(!_(f))return K.addIssue(typeof q==="function"?q(f,K):q),!1;else return!0})}_refinement(_){return new h_({schema:this,typeName:i.ZodEffects,effect:{type:"refinement",refinement:_}})}superRefine(_){return this._refinement(_)}constructor(_){this.spa=this.safeParseAsync,this._def=_,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:(q)=>this["~validate"](q)}}optional(){return W_.create(this,this._def)}nullable(){return y_.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return z_.create(this)}promise(){return r8.create(this,this._def)}or(_){return q6.create([this,_],this._def)}and(_){return _6.create(this,_,this._def)}transform(_){return new h_({...qq(this._def),schema:this,typeName:i.ZodEffects,effect:{type:"transform",transform:_}})}default(_){let q=typeof _==="function"?_:()=>_;return new P6({...qq(this._def),innerType:this,defaultValue:q,typeName:i.ZodDefault})}brand(){return new Df({typeName:i.ZodBranded,type:this,...qq(this._def)})}catch(_){let q=typeof _==="function"?_:()=>_;return new j6({...qq(this._def),innerType:this,catchValue:q,typeName:i.ZodCatch})}describe(_){return new this.constructor({...this._def,description:_})}pipe(_){return o6.create(this,_)}readonly(){return v6.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var FO=/^c[^\s-]{8,}$/i,QO=/^[0-9a-z]+$/,qY=/^[0-9A-HJKMNP-TV-Z]{26}$/i,_Y=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,fY=/^[a-z0-9_-]{21}$/i,$Y=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,KY=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,PY=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,jY="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",oK,vY=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,wY=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,OY=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,YY=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,TY=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,zY=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,v7="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",WY=new RegExp(`^${v7}$`);function w7(_){let q="[0-5]\\d";if(_.precision)q=`${q}\\.\\d{${_.precision}}`;else if(_.precision==null)q=`${q}(\\.\\d+)?`;let f=_.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${q})${f}`}function HY(_){return new RegExp(`^${w7(_)}$`)}function O7(_){let q=`${v7}T${w7(_)}`,f=[];if(f.push(_.local?"Z?":"Z"),_.offset)f.push("([+-]\\d{2}:?\\d{2})");return q=`${q}(${f.join("|")})`,new RegExp(`^${q}$`)}function hY(_,q){if((q==="v4"||!q)&&vY.test(_))return!0;if((q==="v6"||!q)&&OY.test(_))return!0;return!1}function JY(_,q){if(!$Y.test(_))return!1;try{let[f]=_.split(".");if(!f)return!1;let K=f.replace(/-/g,"+").replace(/_/g,"/").padEnd(f.length+(4-f.length%4)%4,"="),$=JSON.parse(atob(K));if(typeof $!=="object"||$===null)return!1;if("typ"in $&&$?.typ!=="JWT")return!1;if(!$.alg)return!1;if(q&&$.alg!==q)return!1;return!0}catch{return!1}}function kY(_,q){if((q==="v4"||!q)&&wY.test(_))return!0;if((q==="v6"||!q)&&YY.test(_))return!0;return!1}class T_ extends $q{_parse(_){if(this._def.coerce)_.data=String(_.data);if(this._getType(_)!==L.string){let $=this._getOrReturnCtx(_);return e($,{code:y.invalid_type,expected:L.string,received:$.parsedType}),U}let f=new aq,K=void 0;for(let $ of this._def.checks)if($.kind==="min"){if(_.data.length<$.value)K=this._getOrReturnCtx(_,K),e(K,{code:y.too_small,minimum:$.value,type:"string",inclusive:!0,exact:!1,message:$.message}),f.dirty()}else if($.kind==="max"){if(_.data.length>$.value)K=this._getOrReturnCtx(_,K),e(K,{code:y.too_big,maximum:$.value,type:"string",inclusive:!0,exact:!1,message:$.message}),f.dirty()}else if($.kind==="length"){let P=_.data.length>$.value,j=_.data.length<$.value;if(P||j){if(K=this._getOrReturnCtx(_,K),P)e(K,{code:y.too_big,maximum:$.value,type:"string",inclusive:!0,exact:!0,message:$.message});else if(j)e(K,{code:y.too_small,minimum:$.value,type:"string",inclusive:!0,exact:!0,message:$.message});f.dirty()}}else if($.kind==="email"){if(!PY.test(_.data))K=this._getOrReturnCtx(_,K),e(K,{validation:"email",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="emoji"){if(!oK)oK=new RegExp(jY,"u");if(!oK.test(_.data))K=this._getOrReturnCtx(_,K),e(K,{validation:"emoji",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="uuid"){if(!_Y.test(_.data))K=this._getOrReturnCtx(_,K),e(K,{validation:"uuid",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="nanoid"){if(!fY.test(_.data))K=this._getOrReturnCtx(_,K),e(K,{validation:"nanoid",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="cuid"){if(!FO.test(_.data))K=this._getOrReturnCtx(_,K),e(K,{validation:"cuid",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="cuid2"){if(!QO.test(_.data))K=this._getOrReturnCtx(_,K),e(K,{validation:"cuid2",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="ulid"){if(!qY.test(_.data))K=this._getOrReturnCtx(_,K),e(K,{validation:"ulid",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="url")try{new URL(_.data)}catch{K=this._getOrReturnCtx(_,K),e(K,{validation:"url",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="regex"){if($.regex.lastIndex=0,!$.regex.test(_.data))K=this._getOrReturnCtx(_,K),e(K,{validation:"regex",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="trim")_.data=_.data.trim();else if($.kind==="includes"){if(!_.data.includes($.value,$.position))K=this._getOrReturnCtx(_,K),e(K,{code:y.invalid_string,validation:{includes:$.value,position:$.position},message:$.message}),f.dirty()}else if($.kind==="toLowerCase")_.data=_.data.toLowerCase();else if($.kind==="toUpperCase")_.data=_.data.toUpperCase();else if($.kind==="startsWith"){if(!_.data.startsWith($.value))K=this._getOrReturnCtx(_,K),e(K,{code:y.invalid_string,validation:{startsWith:$.value},message:$.message}),f.dirty()}else if($.kind==="endsWith"){if(!_.data.endsWith($.value))K=this._getOrReturnCtx(_,K),e(K,{code:y.invalid_string,validation:{endsWith:$.value},message:$.message}),f.dirty()}else if($.kind==="datetime"){if(!O7($).test(_.data))K=this._getOrReturnCtx(_,K),e(K,{code:y.invalid_string,validation:"datetime",message:$.message}),f.dirty()}else if($.kind==="date"){if(!WY.test(_.data))K=this._getOrReturnCtx(_,K),e(K,{code:y.invalid_string,validation:"date",message:$.message}),f.dirty()}else if($.kind==="time"){if(!HY($).test(_.data))K=this._getOrReturnCtx(_,K),e(K,{code:y.invalid_string,validation:"time",message:$.message}),f.dirty()}else if($.kind==="duration"){if(!KY.test(_.data))K=this._getOrReturnCtx(_,K),e(K,{validation:"duration",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="ip"){if(!hY(_.data,$.version))K=this._getOrReturnCtx(_,K),e(K,{validation:"ip",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="jwt"){if(!JY(_.data,$.alg))K=this._getOrReturnCtx(_,K),e(K,{validation:"jwt",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="cidr"){if(!kY(_.data,$.version))K=this._getOrReturnCtx(_,K),e(K,{validation:"cidr",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="base64"){if(!TY.test(_.data))K=this._getOrReturnCtx(_,K),e(K,{validation:"base64",code:y.invalid_string,message:$.message}),f.dirty()}else if($.kind==="base64url"){if(!zY.test(_.data))K=this._getOrReturnCtx(_,K),e(K,{validation:"base64url",code:y.invalid_string,message:$.message}),f.dirty()}else Kq.assertNever($);return{status:f.value,value:_.data}}_regex(_,q,f){return this.refinement((K)=>_.test(K),{validation:q,code:y.invalid_string,...B.errToObj(f)})}_addCheck(_){return new T_({...this._def,checks:[...this._def.checks,_]})}email(_){return this._addCheck({kind:"email",...B.errToObj(_)})}url(_){return this._addCheck({kind:"url",...B.errToObj(_)})}emoji(_){return this._addCheck({kind:"emoji",...B.errToObj(_)})}uuid(_){return this._addCheck({kind:"uuid",...B.errToObj(_)})}nanoid(_){return this._addCheck({kind:"nanoid",...B.errToObj(_)})}cuid(_){return this._addCheck({kind:"cuid",...B.errToObj(_)})}cuid2(_){return this._addCheck({kind:"cuid2",...B.errToObj(_)})}ulid(_){return this._addCheck({kind:"ulid",...B.errToObj(_)})}base64(_){return this._addCheck({kind:"base64",...B.errToObj(_)})}base64url(_){return this._addCheck({kind:"base64url",...B.errToObj(_)})}jwt(_){return this._addCheck({kind:"jwt",...B.errToObj(_)})}ip(_){return this._addCheck({kind:"ip",...B.errToObj(_)})}cidr(_){return this._addCheck({kind:"cidr",...B.errToObj(_)})}datetime(_){if(typeof _==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:_});return this._addCheck({kind:"datetime",precision:typeof _?.precision==="undefined"?null:_?.precision,offset:_?.offset??!1,local:_?.local??!1,...B.errToObj(_?.message)})}date(_){return this._addCheck({kind:"date",message:_})}time(_){if(typeof _==="string")return this._addCheck({kind:"time",precision:null,message:_});return this._addCheck({kind:"time",precision:typeof _?.precision==="undefined"?null:_?.precision,...B.errToObj(_?.message)})}duration(_){return this._addCheck({kind:"duration",...B.errToObj(_)})}regex(_,q){return this._addCheck({kind:"regex",regex:_,...B.errToObj(q)})}includes(_,q){return this._addCheck({kind:"includes",value:_,position:q?.position,...B.errToObj(q?.message)})}startsWith(_,q){return this._addCheck({kind:"startsWith",value:_,...B.errToObj(q)})}endsWith(_,q){return this._addCheck({kind:"endsWith",value:_,...B.errToObj(q)})}min(_,q){return this._addCheck({kind:"min",value:_,...B.errToObj(q)})}max(_,q){return this._addCheck({kind:"max",value:_,...B.errToObj(q)})}length(_,q){return this._addCheck({kind:"length",value:_,...B.errToObj(q)})}nonempty(_){return this.min(1,B.errToObj(_))}trim(){return new T_({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new T_({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new T_({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((_)=>_.kind==="datetime")}get isDate(){return!!this._def.checks.find((_)=>_.kind==="date")}get isTime(){return!!this._def.checks.find((_)=>_.kind==="time")}get isDuration(){return!!this._def.checks.find((_)=>_.kind==="duration")}get isEmail(){return!!this._def.checks.find((_)=>_.kind==="email")}get isURL(){return!!this._def.checks.find((_)=>_.kind==="url")}get isEmoji(){return!!this._def.checks.find((_)=>_.kind==="emoji")}get isUUID(){return!!this._def.checks.find((_)=>_.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((_)=>_.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((_)=>_.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((_)=>_.kind==="cuid2")}get isULID(){return!!this._def.checks.find((_)=>_.kind==="ulid")}get isIP(){return!!this._def.checks.find((_)=>_.kind==="ip")}get isCIDR(){return!!this._def.checks.find((_)=>_.kind==="cidr")}get isBase64(){return!!this._def.checks.find((_)=>_.kind==="base64")}get isBase64url(){return!!this._def.checks.find((_)=>_.kind==="base64url")}get minLength(){let _=null;for(let q of this._def.checks)if(q.kind==="min"){if(_===null||q.value>_)_=q.value}return _}get maxLength(){let _=null;for(let q of this._def.checks)if(q.kind==="max"){if(_===null||q.value<_)_=q.value}return _}}T_.create=(_)=>{return new T_({checks:[],typeName:i.ZodString,coerce:_?.coerce??!1,...qq(_)})};function ZY(_,q){let f=(_.toString().split(".")[1]||"").length,K=(q.toString().split(".")[1]||"").length,$=f>K?f:K,P=Number.parseInt(_.toFixed($).replace(".","")),j=Number.parseInt(q.toFixed($).replace(".",""));return P%j/10**$}class F_ extends $q{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(_){if(this._def.coerce)_.data=Number(_.data);if(this._getType(_)!==L.number){let $=this._getOrReturnCtx(_);return e($,{code:y.invalid_type,expected:L.number,received:$.parsedType}),U}let f=void 0,K=new aq;for(let $ of this._def.checks)if($.kind==="int"){if(!Kq.isInteger(_.data))f=this._getOrReturnCtx(_,f),e(f,{code:y.invalid_type,expected:"integer",received:"float",message:$.message}),K.dirty()}else if($.kind==="min"){if($.inclusive?_.data<$.value:_.data<=$.value)f=this._getOrReturnCtx(_,f),e(f,{code:y.too_small,minimum:$.value,type:"number",inclusive:$.inclusive,exact:!1,message:$.message}),K.dirty()}else if($.kind==="max"){if($.inclusive?_.data>$.value:_.data>=$.value)f=this._getOrReturnCtx(_,f),e(f,{code:y.too_big,maximum:$.value,type:"number",inclusive:$.inclusive,exact:!1,message:$.message}),K.dirty()}else if($.kind==="multipleOf"){if(ZY(_.data,$.value)!==0)f=this._getOrReturnCtx(_,f),e(f,{code:y.not_multiple_of,multipleOf:$.value,message:$.message}),K.dirty()}else if($.kind==="finite"){if(!Number.isFinite(_.data))f=this._getOrReturnCtx(_,f),e(f,{code:y.not_finite,message:$.message}),K.dirty()}else Kq.assertNever($);return{status:K.value,value:_.data}}gte(_,q){return this.setLimit("min",_,!0,B.toString(q))}gt(_,q){return this.setLimit("min",_,!1,B.toString(q))}lte(_,q){return this.setLimit("max",_,!0,B.toString(q))}lt(_,q){return this.setLimit("max",_,!1,B.toString(q))}setLimit(_,q,f,K){return new F_({...this._def,checks:[...this._def.checks,{kind:_,value:q,inclusive:f,message:B.toString(K)}]})}_addCheck(_){return new F_({...this._def,checks:[...this._def.checks,_]})}int(_){return this._addCheck({kind:"int",message:B.toString(_)})}positive(_){return this._addCheck({kind:"min",value:0,inclusive:!1,message:B.toString(_)})}negative(_){return this._addCheck({kind:"max",value:0,inclusive:!1,message:B.toString(_)})}nonpositive(_){return this._addCheck({kind:"max",value:0,inclusive:!0,message:B.toString(_)})}nonnegative(_){return this._addCheck({kind:"min",value:0,inclusive:!0,message:B.toString(_)})}multipleOf(_,q){return this._addCheck({kind:"multipleOf",value:_,message:B.toString(q)})}finite(_){return this._addCheck({kind:"finite",message:B.toString(_)})}safe(_){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:B.toString(_)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:B.toString(_)})}get minValue(){let _=null;for(let q of this._def.checks)if(q.kind==="min"){if(_===null||q.value>_)_=q.value}return _}get maxValue(){let _=null;for(let q of this._def.checks)if(q.kind==="max"){if(_===null||q.value<_)_=q.value}return _}get isInt(){return!!this._def.checks.find((_)=>_.kind==="int"||_.kind==="multipleOf"&&Kq.isInteger(_.value))}get isFinite(){let _=null,q=null;for(let f of this._def.checks)if(f.kind==="finite"||f.kind==="int"||f.kind==="multipleOf")return!0;else if(f.kind==="min"){if(q===null||f.value>q)q=f.value}else if(f.kind==="max"){if(_===null||f.value<_)_=f.value}return Number.isFinite(q)&&Number.isFinite(_)}}F_.create=(_)=>{return new F_({checks:[],typeName:i.ZodNumber,coerce:_?.coerce||!1,...qq(_)})};class Q_ extends $q{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(_){if(this._def.coerce)try{_.data=BigInt(_.data)}catch{return this._getInvalidInput(_)}if(this._getType(_)!==L.bigint)return this._getInvalidInput(_);let f=void 0,K=new aq;for(let $ of this._def.checks)if($.kind==="min"){if($.inclusive?_.data<$.value:_.data<=$.value)f=this._getOrReturnCtx(_,f),e(f,{code:y.too_small,type:"bigint",minimum:$.value,inclusive:$.inclusive,message:$.message}),K.dirty()}else if($.kind==="max"){if($.inclusive?_.data>$.value:_.data>=$.value)f=this._getOrReturnCtx(_,f),e(f,{code:y.too_big,type:"bigint",maximum:$.value,inclusive:$.inclusive,message:$.message}),K.dirty()}else if($.kind==="multipleOf"){if(_.data%$.value!==BigInt(0))f=this._getOrReturnCtx(_,f),e(f,{code:y.not_multiple_of,multipleOf:$.value,message:$.message}),K.dirty()}else Kq.assertNever($);return{status:K.value,value:_.data}}_getInvalidInput(_){let q=this._getOrReturnCtx(_);return e(q,{code:y.invalid_type,expected:L.bigint,received:q.parsedType}),U}gte(_,q){return this.setLimit("min",_,!0,B.toString(q))}gt(_,q){return this.setLimit("min",_,!1,B.toString(q))}lte(_,q){return this.setLimit("max",_,!0,B.toString(q))}lt(_,q){return this.setLimit("max",_,!1,B.toString(q))}setLimit(_,q,f,K){return new Q_({...this._def,checks:[...this._def.checks,{kind:_,value:q,inclusive:f,message:B.toString(K)}]})}_addCheck(_){return new Q_({...this._def,checks:[...this._def.checks,_]})}positive(_){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:B.toString(_)})}negative(_){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:B.toString(_)})}nonpositive(_){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:B.toString(_)})}nonnegative(_){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:B.toString(_)})}multipleOf(_,q){return this._addCheck({kind:"multipleOf",value:_,message:B.toString(q)})}get minValue(){let _=null;for(let q of this._def.checks)if(q.kind==="min"){if(_===null||q.value>_)_=q.value}return _}get maxValue(){let _=null;for(let q of this._def.checks)if(q.kind==="max"){if(_===null||q.value<_)_=q.value}return _}}Q_.create=(_)=>{return new Q_({checks:[],typeName:i.ZodBigInt,coerce:_?.coerce??!1,...qq(_)})};class U8 extends $q{_parse(_){if(this._def.coerce)_.data=Boolean(_.data);if(this._getType(_)!==L.boolean){let f=this._getOrReturnCtx(_);return e(f,{code:y.invalid_type,expected:L.boolean,received:f.parsedType}),U}return yq(_.data)}}U8.create=(_)=>{return new U8({typeName:i.ZodBoolean,coerce:_?.coerce||!1,...qq(_)})};class u8 extends $q{_parse(_){if(this._def.coerce)_.data=new Date(_.data);if(this._getType(_)!==L.date){let $=this._getOrReturnCtx(_);return e($,{code:y.invalid_type,expected:L.date,received:$.parsedType}),U}if(Number.isNaN(_.data.getTime())){let $=this._getOrReturnCtx(_);return e($,{code:y.invalid_date}),U}let f=new aq,K=void 0;for(let $ of this._def.checks)if($.kind==="min"){if(_.data.getTime()<$.value)K=this._getOrReturnCtx(_,K),e(K,{code:y.too_small,message:$.message,inclusive:!0,exact:!1,minimum:$.value,type:"date"}),f.dirty()}else if($.kind==="max"){if(_.data.getTime()>$.value)K=this._getOrReturnCtx(_,K),e(K,{code:y.too_big,message:$.message,inclusive:!0,exact:!1,maximum:$.value,type:"date"}),f.dirty()}else Kq.assertNever($);return{status:f.value,value:new Date(_.data.getTime())}}_addCheck(_){return new u8({...this._def,checks:[...this._def.checks,_]})}min(_,q){return this._addCheck({kind:"min",value:_.getTime(),message:B.toString(q)})}max(_,q){return this._addCheck({kind:"max",value:_.getTime(),message:B.toString(q)})}get minDate(){let _=null;for(let q of this._def.checks)if(q.kind==="min"){if(_===null||q.value>_)_=q.value}return _!=null?new Date(_):null}get maxDate(){let _=null;for(let q of this._def.checks)if(q.kind==="max"){if(_===null||q.value<_)_=q.value}return _!=null?new Date(_):null}}u8.create=(_)=>{return new u8({checks:[],coerce:_?.coerce||!1,typeName:i.ZodDate,...qq(_)})};class a6 extends $q{_parse(_){if(this._getType(_)!==L.symbol){let f=this._getOrReturnCtx(_);return e(f,{code:y.invalid_type,expected:L.symbol,received:f.parsedType}),U}return yq(_.data)}}a6.create=(_)=>{return new a6({typeName:i.ZodSymbol,...qq(_)})};class F8 extends $q{_parse(_){if(this._getType(_)!==L.undefined){let f=this._getOrReturnCtx(_);return e(f,{code:y.invalid_type,expected:L.undefined,received:f.parsedType}),U}return yq(_.data)}}F8.create=(_)=>{return new F8({typeName:i.ZodUndefined,...qq(_)})};class Q8 extends $q{_parse(_){if(this._getType(_)!==L.null){let f=this._getOrReturnCtx(_);return e(f,{code:y.invalid_type,expected:L.null,received:f.parsedType}),U}return yq(_.data)}}Q8.create=(_)=>{return new Q8({typeName:i.ZodNull,...qq(_)})};class G8 extends $q{constructor(){super(...arguments);this._any=!0}_parse(_){return yq(_.data)}}G8.create=(_)=>{return new G8({typeName:i.ZodAny,...qq(_)})};class U_ extends $q{constructor(){super(...arguments);this._unknown=!0}_parse(_){return yq(_.data)}}U_.create=(_)=>{return new U_({typeName:i.ZodUnknown,...qq(_)})};class M_ extends $q{_parse(_){let q=this._getOrReturnCtx(_);return e(q,{code:y.invalid_type,expected:L.never,received:q.parsedType}),U}}M_.create=(_)=>{return new M_({typeName:i.ZodNever,...qq(_)})};class I6 extends $q{_parse(_){if(this._getType(_)!==L.undefined){let f=this._getOrReturnCtx(_);return e(f,{code:y.invalid_type,expected:L.void,received:f.parsedType}),U}return yq(_.data)}}I6.create=(_)=>{return new I6({typeName:i.ZodVoid,...qq(_)})};class z_ extends $q{_parse(_){let{ctx:q,status:f}=this._processInputParams(_),K=this._def;if(q.parsedType!==L.array)return e(q,{code:y.invalid_type,expected:L.array,received:q.parsedType}),U;if(K.exactLength!==null){let P=q.data.length>K.exactLength.value,j=q.data.length<K.exactLength.value;if(P||j)e(q,{code:P?y.too_big:y.too_small,minimum:j?K.exactLength.value:void 0,maximum:P?K.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:K.exactLength.message}),f.dirty()}if(K.minLength!==null){if(q.data.length<K.minLength.value)e(q,{code:y.too_small,minimum:K.minLength.value,type:"array",inclusive:!0,exact:!1,message:K.minLength.message}),f.dirty()}if(K.maxLength!==null){if(q.data.length>K.maxLength.value)e(q,{code:y.too_big,maximum:K.maxLength.value,type:"array",inclusive:!0,exact:!1,message:K.maxLength.message}),f.dirty()}if(q.common.async)return Promise.all([...q.data].map((P,j)=>{return K.type._parseAsync(new H_(q,P,q.path,j))})).then((P)=>{return aq.mergeArray(f,P)});let $=[...q.data].map((P,j)=>{return K.type._parseSync(new H_(q,P,q.path,j))});return aq.mergeArray(f,$)}get element(){return this._def.type}min(_,q){return new z_({...this._def,minLength:{value:_,message:B.toString(q)}})}max(_,q){return new z_({...this._def,maxLength:{value:_,message:B.toString(q)}})}length(_,q){return new z_({...this._def,exactLength:{value:_,message:B.toString(q)}})}nonempty(_){return this.min(1,_)}}z_.create=(_,q)=>{return new z_({type:_,minLength:null,maxLength:null,exactLength:null,typeName:i.ZodArray,...qq(q)})};function s8(_){if(_ instanceof bq){let q={};for(let f in _.shape){let K=_.shape[f];q[f]=W_.create(s8(K))}return new bq({..._._def,shape:()=>q})}else if(_ instanceof z_)return new z_({..._._def,type:s8(_.element)});else if(_ instanceof W_)return W_.create(s8(_.unwrap()));else if(_ instanceof y_)return y_.create(s8(_.unwrap()));else if(_ instanceof S_)return S_.create(_.items.map((q)=>s8(q)));else return _}class bq extends $q{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let _=this._def.shape(),q=Kq.objectKeys(_);return this._cached={shape:_,keys:q},this._cached}_parse(_){if(this._getType(_)!==L.object){let w=this._getOrReturnCtx(_);return e(w,{code:y.invalid_type,expected:L.object,received:w.parsedType}),U}let{status:f,ctx:K}=this._processInputParams(_),{shape:$,keys:P}=this._getCached(),j=[];if(!(this._def.catchall instanceof M_&&this._def.unknownKeys==="strip")){for(let w in K.data)if(!P.includes(w))j.push(w)}let v=[];for(let w of P){let O=$[w],T=K.data[w];v.push({key:{status:"valid",value:w},value:O._parse(new H_(K,T,K.path,w)),alwaysSet:w in K.data})}if(this._def.catchall instanceof M_){let w=this._def.unknownKeys;if(w==="passthrough")for(let O of j)v.push({key:{status:"valid",value:O},value:{status:"valid",value:K.data[O]}});else if(w==="strict"){if(j.length>0)e(K,{code:y.unrecognized_keys,keys:j}),f.dirty()}else if(w==="strip");else throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let w=this._def.catchall;for(let O of j){let T=K.data[O];v.push({key:{status:"valid",value:O},value:w._parse(new H_(K,T,K.path,O)),alwaysSet:O in K.data})}}if(K.common.async)return Promise.resolve().then(async()=>{let w=[];for(let O of v){let T=await O.key,Y=await O.value;w.push({key:T,value:Y,alwaysSet:O.alwaysSet})}return w}).then((w)=>{return aq.mergeObjectSync(f,w)});else return aq.mergeObjectSync(f,v)}get shape(){return this._def.shape()}strict(_){return B.errToObj,new bq({...this._def,unknownKeys:"strict",..._!==void 0?{errorMap:(q,f)=>{let K=this._def.errorMap?.(q,f).message??f.defaultError;if(q.code==="unrecognized_keys")return{message:B.errToObj(_).message??K};return{message:K}}}:{}})}strip(){return new bq({...this._def,unknownKeys:"strip"})}passthrough(){return new bq({...this._def,unknownKeys:"passthrough"})}extend(_){return new bq({...this._def,shape:()=>({...this._def.shape(),..._})})}merge(_){return new bq({unknownKeys:_._def.unknownKeys,catchall:_._def.catchall,shape:()=>({...this._def.shape(),..._._def.shape()}),typeName:i.ZodObject})}setKey(_,q){return this.augment({[_]:q})}catchall(_){return new bq({...this._def,catchall:_})}pick(_){let q={};for(let f of Kq.objectKeys(_))if(_[f]&&this.shape[f])q[f]=this.shape[f];return new bq({...this._def,shape:()=>q})}omit(_){let q={};for(let f of Kq.objectKeys(this.shape))if(!_[f])q[f]=this.shape[f];return new bq({...this._def,shape:()=>q})}deepPartial(){return s8(this)}partial(_){let q={};for(let f of Kq.objectKeys(this.shape)){let K=this.shape[f];if(_&&!_[f])q[f]=K;else q[f]=K.optional()}return new bq({...this._def,shape:()=>q})}required(_){let q={};for(let f of Kq.objectKeys(this.shape))if(_&&!_[f])q[f]=this.shape[f];else{let $=this.shape[f];while($ instanceof W_)$=$._def.innerType;q[f]=$}return new bq({...this._def,shape:()=>q})}keyof(){return Y7(Kq.objectKeys(this.shape))}}bq.create=(_,q)=>{return new bq({shape:()=>_,unknownKeys:"strip",catchall:M_.create(),typeName:i.ZodObject,...qq(q)})};bq.strictCreate=(_,q)=>{return new bq({shape:()=>_,unknownKeys:"strict",catchall:M_.create(),typeName:i.ZodObject,...qq(q)})};bq.lazycreate=(_,q)=>{return new bq({shape:_,unknownKeys:"strip",catchall:M_.create(),typeName:i.ZodObject,...qq(q)})};class q6 extends $q{_parse(_){let{ctx:q}=this._processInputParams(_),f=this._def.options;function K($){for(let j of $)if(j.result.status==="valid")return j.result;for(let j of $)if(j.result.status==="dirty")return q.common.issues.push(...j.ctx.common.issues),j.result;let P=$.map((j)=>new eq(j.ctx.common.issues));return e(q,{code:y.invalid_union,unionErrors:P}),U}if(q.common.async)return Promise.all(f.map(async($)=>{let P={...q,common:{...q.common,issues:[]},parent:null};return{result:await $._parseAsync({data:q.data,path:q.path,parent:P}),ctx:P}})).then(K);else{let $=void 0,P=[];for(let v of f){let w={...q,common:{...q.common,issues:[]},parent:null},O=v._parseSync({data:q.data,path:q.path,parent:w});if(O.status==="valid")return O;else if(O.status==="dirty"&&!$)$={result:O,ctx:w};if(w.common.issues.length)P.push(w.common.issues)}if($)return q.common.issues.push(...$.ctx.common.issues),$.result;let j=P.map((v)=>new eq(v));return e(q,{code:y.invalid_union,unionErrors:j}),U}}get options(){return this._def.options}}q6.create=(_,q)=>{return new q6({options:_,typeName:i.ZodUnion,...qq(q)})};var D_=(_)=>{if(_ instanceof f6)return D_(_.schema);else if(_ instanceof h_)return D_(_.innerType());else if(_ instanceof $6)return[_.value];else if(_ instanceof q8)return _.options;else if(_ instanceof K6)return Kq.objectValues(_.enum);else if(_ instanceof P6)return D_(_._def.innerType);else if(_ instanceof F8)return[void 0];else if(_ instanceof Q8)return[null];else if(_ instanceof W_)return[void 0,...D_(_.unwrap())];else if(_ instanceof y_)return[null,...D_(_.unwrap())];else if(_ instanceof Df)return D_(_.unwrap());else if(_ instanceof v6)return D_(_.unwrap());else if(_ instanceof j6)return D_(_._def.innerType);else return[]};class If extends $q{_parse(_){let{ctx:q}=this._processInputParams(_);if(q.parsedType!==L.object)return e(q,{code:y.invalid_type,expected:L.object,received:q.parsedType}),U;let f=this.discriminator,K=q.data[f],$=this.optionsMap.get(K);if(!$)return e(q,{code:y.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[f]}),U;if(q.common.async)return $._parseAsync({data:q.data,path:q.path,parent:q});else return $._parseSync({data:q.data,path:q.path,parent:q})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(_,q,f){let K=new Map;for(let $ of q){let P=D_($.shape[_]);if(!P.length)throw new Error(`A discriminator value for key \`${_}\` could not be extracted from all schema options`);for(let j of P){if(K.has(j))throw new Error(`Discriminator property ${String(_)} has duplicate value ${String(j)}`);K.set(j,$)}}return new If({typeName:i.ZodDiscriminatedUnion,discriminator:_,options:q,optionsMap:K,...qq(f)})}}function cK(_,q){let f=V_(_),K=V_(q);if(_===q)return{valid:!0,data:_};else if(f===L.object&&K===L.object){let $=Kq.objectKeys(q),P=Kq.objectKeys(_).filter((v)=>$.indexOf(v)!==-1),j={..._,...q};for(let v of P){let w=cK(_[v],q[v]);if(!w.valid)return{valid:!1};j[v]=w.data}return{valid:!0,data:j}}else if(f===L.array&&K===L.array){if(_.length!==q.length)return{valid:!1};let $=[];for(let P=0;P<_.length;P++){let j=_[P],v=q[P],w=cK(j,v);if(!w.valid)return{valid:!1};$.push(w.data)}return{valid:!0,data:$}}else if(f===L.date&&K===L.date&&+_===+q)return{valid:!0,data:_};else return{valid:!1}}class _6 extends $q{_parse(_){let{status:q,ctx:f}=this._processInputParams(_),K=($,P)=>{if(df($)||df(P))return U;let j=cK($.value,P.value);if(!j.valid)return e(f,{code:y.invalid_intersection_types}),U;if(af($)||af(P))q.dirty();return{status:q.value,value:j.data}};if(f.common.async)return Promise.all([this._def.left._parseAsync({data:f.data,path:f.path,parent:f}),this._def.right._parseAsync({data:f.data,path:f.path,parent:f})]).then(([$,P])=>K($,P));else return K(this._def.left._parseSync({data:f.data,path:f.path,parent:f}),this._def.right._parseSync({data:f.data,path:f.path,parent:f}))}}_6.create=(_,q,f)=>{return new _6({left:_,right:q,typeName:i.ZodIntersection,...qq(f)})};class S_ extends $q{_parse(_){let{status:q,ctx:f}=this._processInputParams(_);if(f.parsedType!==L.array)return e(f,{code:y.invalid_type,expected:L.array,received:f.parsedType}),U;if(f.data.length<this._def.items.length)return e(f,{code:y.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),U;if(!this._def.rest&&f.data.length>this._def.items.length)e(f,{code:y.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q.dirty();let $=[...f.data].map((P,j)=>{let v=this._def.items[j]||this._def.rest;if(!v)return null;return v._parse(new H_(f,P,f.path,j))}).filter((P)=>!!P);if(f.common.async)return Promise.all($).then((P)=>{return aq.mergeArray(q,P)});else return aq.mergeArray(q,$)}get items(){return this._def.items}rest(_){return new S_({...this._def,rest:_})}}S_.create=(_,q)=>{if(!Array.isArray(_))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new S_({items:_,typeName:i.ZodTuple,rest:null,...qq(q)})};class D6 extends $q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(_){let{status:q,ctx:f}=this._processInputParams(_);if(f.parsedType!==L.object)return e(f,{code:y.invalid_type,expected:L.object,received:f.parsedType}),U;let K=[],$=this._def.keyType,P=this._def.valueType;for(let j in f.data)K.push({key:$._parse(new H_(f,j,f.path,j)),value:P._parse(new H_(f,f.data[j],f.path,j)),alwaysSet:j in f.data});if(f.common.async)return aq.mergeObjectAsync(q,K);else return aq.mergeObjectSync(q,K)}get element(){return this._def.valueType}static create(_,q,f){if(q instanceof $q)return new D6({keyType:_,valueType:q,typeName:i.ZodRecord,...qq(f)});return new D6({keyType:T_.create(),valueType:_,typeName:i.ZodRecord,...qq(q)})}}class y6 extends $q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(_){let{status:q,ctx:f}=this._processInputParams(_);if(f.parsedType!==L.map)return e(f,{code:y.invalid_type,expected:L.map,received:f.parsedType}),U;let K=this._def.keyType,$=this._def.valueType,P=[...f.data.entries()].map(([j,v],w)=>{return{key:K._parse(new H_(f,j,f.path,[w,"key"])),value:$._parse(new H_(f,v,f.path,[w,"value"]))}});if(f.common.async){let j=new Map;return Promise.resolve().then(async()=>{for(let v of P){let w=await v.key,O=await v.value;if(w.status==="aborted"||O.status==="aborted")return U;if(w.status==="dirty"||O.status==="dirty")q.dirty();j.set(w.value,O.value)}return{status:q.value,value:j}})}else{let j=new Map;for(let v of P){let{key:w,value:O}=v;if(w.status==="aborted"||O.status==="aborted")return U;if(w.status==="dirty"||O.status==="dirty")q.dirty();j.set(w.value,O.value)}return{status:q.value,value:j}}}}y6.create=(_,q,f)=>{return new y6({valueType:q,keyType:_,typeName:i.ZodMap,...qq(f)})};class m8 extends $q{_parse(_){let{status:q,ctx:f}=this._processInputParams(_);if(f.parsedType!==L.set)return e(f,{code:y.invalid_type,expected:L.set,received:f.parsedType}),U;let K=this._def;if(K.minSize!==null){if(f.data.size<K.minSize.value)e(f,{code:y.too_small,minimum:K.minSize.value,type:"set",inclusive:!0,exact:!1,message:K.minSize.message}),q.dirty()}if(K.maxSize!==null){if(f.data.size>K.maxSize.value)e(f,{code:y.too_big,maximum:K.maxSize.value,type:"set",inclusive:!0,exact:!1,message:K.maxSize.message}),q.dirty()}let $=this._def.valueType;function P(v){let w=new Set;for(let O of v){if(O.status==="aborted")return U;if(O.status==="dirty")q.dirty();w.add(O.value)}return{status:q.value,value:w}}let j=[...f.data.values()].map((v,w)=>$._parse(new H_(f,v,f.path,w)));if(f.common.async)return Promise.all(j).then((v)=>P(v));else return P(j)}min(_,q){return new m8({...this._def,minSize:{value:_,message:B.toString(q)}})}max(_,q){return new m8({...this._def,maxSize:{value:_,message:B.toString(q)}})}size(_,q){return this.min(_,q).max(_,q)}nonempty(_){return this.min(1,_)}}m8.create=(_,q)=>{return new m8({valueType:_,minSize:null,maxSize:null,typeName:i.ZodSet,...qq(q)})};class B8 extends $q{constructor(){super(...arguments);this.validate=this.implement}_parse(_){let{ctx:q}=this._processInputParams(_);if(q.parsedType!==L.function)return e(q,{code:y.invalid_type,expected:L.function,received:q.parsedType}),U;function f(j,v){return d6({data:j,path:q.path,errorMaps:[q.common.contextualErrorMap,q.schemaErrorMap,e8(),I_].filter((w)=>!!w),issueData:{code:y.invalid_arguments,argumentsError:v}})}function K(j,v){return d6({data:j,path:q.path,errorMaps:[q.common.contextualErrorMap,q.schemaErrorMap,e8(),I_].filter((w)=>!!w),issueData:{code:y.invalid_return_type,returnTypeError:v}})}let $={errorMap:q.common.contextualErrorMap},P=q.data;if(this._def.returns instanceof r8){let j=this;return yq(async function(...v){let w=new eq([]),O=await j._def.args.parseAsync(v,$).catch((z)=>{throw w.addIssue(f(v,z)),w}),T=await Reflect.apply(P,this,O);return await j._def.returns._def.type.parseAsync(T,$).catch((z)=>{throw w.addIssue(K(T,z)),w})})}else{let j=this;return yq(function(...v){let w=j._def.args.safeParse(v,$);if(!w.success)throw new eq([f(v,w.error)]);let O=Reflect.apply(P,this,w.data),T=j._def.returns.safeParse(O,$);if(!T.success)throw new eq([K(O,T.error)]);return T.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(..._){return new B8({...this._def,args:S_.create(_).rest(U_.create())})}returns(_){return new B8({...this._def,returns:_})}implement(_){return this.parse(_)}strictImplement(_){return this.parse(_)}static create(_,q,f){return new B8({args:_?_:S_.create([]).rest(U_.create()),returns:q||U_.create(),typeName:i.ZodFunction,...qq(f)})}}class f6 extends $q{get schema(){return this._def.getter()}_parse(_){let{ctx:q}=this._processInputParams(_);return this._def.getter()._parse({data:q.data,path:q.path,parent:q})}}f6.create=(_,q)=>{return new f6({getter:_,typeName:i.ZodLazy,...qq(q)})};class $6 extends $q{_parse(_){if(_.data!==this._def.value){let q=this._getOrReturnCtx(_);return e(q,{received:q.data,code:y.invalid_literal,expected:this._def.value}),U}return{status:"valid",value:_.data}}get value(){return this._def.value}}$6.create=(_,q)=>{return new $6({value:_,typeName:i.ZodLiteral,...qq(q)})};function Y7(_,q){return new q8({values:_,typeName:i.ZodEnum,...qq(q)})}class q8 extends $q{_parse(_){if(typeof _.data!=="string"){let q=this._getOrReturnCtx(_),f=this._def.values;return e(q,{expected:Kq.joinValues(f),received:q.parsedType,code:y.invalid_type}),U}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(_.data)){let q=this._getOrReturnCtx(_),f=this._def.values;return e(q,{received:q.data,code:y.invalid_enum_value,options:f}),U}return yq(_.data)}get options(){return this._def.values}get enum(){let _={};for(let q of this._def.values)_[q]=q;return _}get Values(){let _={};for(let q of this._def.values)_[q]=q;return _}get Enum(){let _={};for(let q of this._def.values)_[q]=q;return _}extract(_,q=this._def){return q8.create(_,{...this._def,...q})}exclude(_,q=this._def){return q8.create(this.options.filter((f)=>!_.includes(f)),{...this._def,...q})}}q8.create=Y7;class K6 extends $q{_parse(_){let q=Kq.getValidEnumValues(this._def.values),f=this._getOrReturnCtx(_);if(f.parsedType!==L.string&&f.parsedType!==L.number){let K=Kq.objectValues(q);return e(f,{expected:Kq.joinValues(K),received:f.parsedType,code:y.invalid_type}),U}if(!this._cache)this._cache=new Set(Kq.getValidEnumValues(this._def.values));if(!this._cache.has(_.data)){let K=Kq.objectValues(q);return e(f,{received:f.data,code:y.invalid_enum_value,options:K}),U}return yq(_.data)}get enum(){return this._def.values}}K6.create=(_,q)=>{return new K6({values:_,typeName:i.ZodNativeEnum,...qq(q)})};class r8 extends $q{unwrap(){return this._def.type}_parse(_){let{ctx:q}=this._processInputParams(_);if(q.parsedType!==L.promise&&q.common.async===!1)return e(q,{code:y.invalid_type,expected:L.promise,received:q.parsedType}),U;let f=q.parsedType===L.promise?q.data:Promise.resolve(q.data);return yq(f.then((K)=>{return this._def.type.parseAsync(K,{path:q.path,errorMap:q.common.contextualErrorMap})}))}}r8.create=(_,q)=>{return new r8({type:_,typeName:i.ZodPromise,...qq(q)})};class h_ extends $q{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===i.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(_){let{status:q,ctx:f}=this._processInputParams(_),K=this._def.effect||null,$={addIssue:(P)=>{if(e(f,P),P.fatal)q.abort();else q.dirty()},get path(){return f.path}};if($.addIssue=$.addIssue.bind($),K.type==="preprocess"){let P=K.transform(f.data,$);if(f.common.async)return Promise.resolve(P).then(async(j)=>{if(q.value==="aborted")return U;let v=await this._def.schema._parseAsync({data:j,path:f.path,parent:f});if(v.status==="aborted")return U;if(v.status==="dirty")return A8(v.value);if(q.value==="dirty")return A8(v.value);return v});else{if(q.value==="aborted")return U;let j=this._def.schema._parseSync({data:P,path:f.path,parent:f});if(j.status==="aborted")return U;if(j.status==="dirty")return A8(j.value);if(q.value==="dirty")return A8(j.value);return j}}if(K.type==="refinement"){let P=(j)=>{let v=K.refinement(j,$);if(f.common.async)return Promise.resolve(v);if(v instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return j};if(f.common.async===!1){let j=this._def.schema._parseSync({data:f.data,path:f.path,parent:f});if(j.status==="aborted")return U;if(j.status==="dirty")q.dirty();return P(j.value),{status:q.value,value:j.value}}else return this._def.schema._parseAsync({data:f.data,path:f.path,parent:f}).then((j)=>{if(j.status==="aborted")return U;if(j.status==="dirty")q.dirty();return P(j.value).then(()=>{return{status:q.value,value:j.value}})})}if(K.type==="transform")if(f.common.async===!1){let P=this._def.schema._parseSync({data:f.data,path:f.path,parent:f});if(!B_(P))return U;let j=K.transform(P.value,$);if(j instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:q.value,value:j}}else return this._def.schema._parseAsync({data:f.data,path:f.path,parent:f}).then((P)=>{if(!B_(P))return U;return Promise.resolve(K.transform(P.value,$)).then((j)=>({status:q.value,value:j}))});Kq.assertNever(K)}}h_.create=(_,q,f)=>{return new h_({schema:_,typeName:i.ZodEffects,effect:q,...qq(f)})};h_.createWithPreprocess=(_,q,f)=>{return new h_({schema:q,effect:{type:"preprocess",transform:_},typeName:i.ZodEffects,...qq(f)})};class W_ extends $q{_parse(_){if(this._getType(_)===L.undefined)return yq(void 0);return this._def.innerType._parse(_)}unwrap(){return this._def.innerType}}W_.create=(_,q)=>{return new W_({innerType:_,typeName:i.ZodOptional,...qq(q)})};class y_ extends $q{_parse(_){if(this._getType(_)===L.null)return yq(null);return this._def.innerType._parse(_)}unwrap(){return this._def.innerType}}y_.create=(_,q)=>{return new y_({innerType:_,typeName:i.ZodNullable,...qq(q)})};class P6 extends $q{_parse(_){let{ctx:q}=this._processInputParams(_),f=q.data;if(q.parsedType===L.undefined)f=this._def.defaultValue();return this._def.innerType._parse({data:f,path:q.path,parent:q})}removeDefault(){return this._def.innerType}}P6.create=(_,q)=>{return new P6({innerType:_,typeName:i.ZodDefault,defaultValue:typeof q.default==="function"?q.default:()=>q.default,...qq(q)})};class j6 extends $q{_parse(_){let{ctx:q}=this._processInputParams(_),f={...q,common:{...q.common,issues:[]}},K=this._def.innerType._parse({data:f.data,path:f.path,parent:{...f}});if(x8(K))return K.then(($)=>{return{status:"valid",value:$.status==="valid"?$.value:this._def.catchValue({get error(){return new eq(f.common.issues)},input:f.data})}});else return{status:"valid",value:K.status==="valid"?K.value:this._def.catchValue({get error(){return new eq(f.common.issues)},input:f.data})}}removeCatch(){return this._def.innerType}}j6.create=(_,q)=>{return new j6({innerType:_,typeName:i.ZodCatch,catchValue:typeof q.catch==="function"?q.catch:()=>q.catch,...qq(q)})};class i6 extends $q{_parse(_){if(this._getType(_)!==L.nan){let f=this._getOrReturnCtx(_);return e(f,{code:y.invalid_type,expected:L.nan,received:f.parsedType}),U}return{status:"valid",value:_.data}}}i6.create=(_)=>{return new i6({typeName:i.ZodNaN,...qq(_)})};var XY=Symbol("zod_brand");class Df extends $q{_parse(_){let{ctx:q}=this._processInputParams(_),f=q.data;return this._def.type._parse({data:f,path:q.path,parent:q})}unwrap(){return this._def.type}}class o6 extends $q{_parse(_){let{status:q,ctx:f}=this._processInputParams(_);if(f.common.async)return(async()=>{let $=await this._def.in._parseAsync({data:f.data,path:f.path,parent:f});if($.status==="aborted")return U;if($.status==="dirty")return q.dirty(),A8($.value);else return this._def.out._parseAsync({data:$.value,path:f.path,parent:f})})();else{let K=this._def.in._parseSync({data:f.data,path:f.path,parent:f});if(K.status==="aborted")return U;if(K.status==="dirty")return q.dirty(),{status:"dirty",value:K.value};else return this._def.out._parseSync({data:K.value,path:f.path,parent:f})}}static create(_,q){return new o6({in:_,out:q,typeName:i.ZodPipeline})}}class v6 extends $q{_parse(_){let q=this._def.innerType._parse(_),f=(K)=>{if(B_(K))K.value=Object.freeze(K.value);return K};return x8(q)?q.then((K)=>f(K)):f(q)}unwrap(){return this._def.innerType}}v6.create=(_,q)=>{return new v6({innerType:_,typeName:i.ZodReadonly,...qq(q)})};function j7(_,q){let f=typeof _==="function"?_(q):typeof _==="string"?{message:_}:_;return typeof f==="string"?{message:f}:f}function T7(_,q={},f){if(_)return G8.create().superRefine((K,$)=>{let P=_(K);if(P instanceof Promise)return P.then((j)=>{if(!j){let v=j7(q,K),w=v.fatal??f??!0;$.addIssue({code:"custom",...v,fatal:w})}});if(!P){let j=j7(q,K),v=j.fatal??f??!0;$.addIssue({code:"custom",...j,fatal:v})}return});return G8.create()}var AY={object:bq.lazycreate},i;(function(_){_.ZodString="ZodString",_.ZodNumber="ZodNumber",_.ZodNaN="ZodNaN",_.ZodBigInt="ZodBigInt",_.ZodBoolean="ZodBoolean",_.ZodDate="ZodDate",_.ZodSymbol="ZodSymbol",_.ZodUndefined="ZodUndefined",_.ZodNull="ZodNull",_.ZodAny="ZodAny",_.ZodUnknown="ZodUnknown",_.ZodNever="ZodNever",_.ZodVoid="ZodVoid",_.ZodArray="ZodArray",_.ZodObject="ZodObject",_.ZodUnion="ZodUnion",_.ZodDiscriminatedUnion="ZodDiscriminatedUnion",_.ZodIntersection="ZodIntersection",_.ZodTuple="ZodTuple",_.ZodRecord="ZodRecord",_.ZodMap="ZodMap",_.ZodSet="ZodSet",_.ZodFunction="ZodFunction",_.ZodLazy="ZodLazy",_.ZodLiteral="ZodLiteral",_.ZodEnum="ZodEnum",_.ZodEffects="ZodEffects",_.ZodNativeEnum="ZodNativeEnum",_.ZodOptional="ZodOptional",_.ZodNullable="ZodNullable",_.ZodDefault="ZodDefault",_.ZodCatch="ZodCatch",_.ZodPromise="ZodPromise",_.ZodBranded="ZodBranded",_.ZodPipeline="ZodPipeline",_.ZodReadonly="ZodReadonly"})(i||(i={}));var uY=(_,q={message:`Input not instance of ${_.name}`})=>T7((f)=>f instanceof _,q),z7=T_.create,W7=F_.create,GY=i6.create,mY=Q_.create,H7=U8.create,rY=u8.create,bY=a6.create,VY=F8.create,MY=Q8.create,SY=G8.create,NY=U_.create,CY=M_.create,pY=I6.create,lY=z_.create,nY=bq.create,RY=bq.strictCreate,EY=q6.create,gY=If.create,dY=_6.create,aY=S_.create,IY=D6.create,DY=y6.create,yY=m8.create,iY=B8.create,oY=f6.create,cY=$6.create,LY=q8.create,tY=K6.create,eY=r8.create,xY=h_.create,sY=W_.create,BY=y_.create,UY=h_.createWithPreprocess,FY=o6.create,QY=()=>z7().optional(),qT=()=>W7().optional(),_T=()=>H7().optional(),fT={string:(_)=>T_.create({..._,coerce:!0}),number:(_)=>F_.create({..._,coerce:!0}),boolean:(_)=>U8.create({..._,coerce:!0}),bigint:(_)=>Q_.create({..._,coerce:!0}),date:(_)=>u8.create({..._,coerce:!0})};var $T=U;var LK="2025-06-18";var h7=[LK,"2025-03-26","2024-11-05","2024-10-07"],yf="2.0",J7=W.union([W.string(),W.number().int()]),k7=W.string(),KT=W.object({progressToken:W.optional(J7)}).passthrough(),K_=W.object({_meta:W.optional(KT)}).passthrough(),xq=W.object({method:W.string(),params:W.optional(K_)}),c6=W.object({_meta:W.optional(W.object({}).passthrough())}).passthrough(),N_=W.object({method:W.string(),params:W.optional(c6)}),P_=W.object({_meta:W.optional(W.object({}).passthrough())}).passthrough(),of=W.union([W.string(),W.number().int()]),Z7=W.object({jsonrpc:W.literal(yf),id:of}).merge(xq).strict(),X7=(_)=>Z7.safeParse(_).success,A7=W.object({jsonrpc:W.literal(yf)}).merge(N_).strict(),u7=(_)=>A7.safeParse(_).success,G7=W.object({jsonrpc:W.literal(yf),id:of,result:P_}).strict(),tK=(_)=>G7.safeParse(_).success,Zq;(function(_){_[_.ConnectionClosed=-32000]="ConnectionClosed",_[_.RequestTimeout=-32001]="RequestTimeout",_[_.ParseError=-32700]="ParseError",_[_.InvalidRequest=-32600]="InvalidRequest",_[_.MethodNotFound=-32601]="MethodNotFound",_[_.InvalidParams=-32602]="InvalidParams",_[_.InternalError=-32603]="InternalError"})(Zq||(Zq={}));var m7=W.object({jsonrpc:W.literal(yf),id:of,error:W.object({code:W.number().int(),message:W.string(),data:W.optional(W.unknown())})}).strict(),r7=(_)=>m7.safeParse(_).success,b7=W.union([Z7,A7,G7,m7]),cf=P_.strict(),Lf=N_.extend({method:W.literal("notifications/cancelled"),params:c6.extend({requestId:of,reason:W.string().optional()})}),PT=W.object({src:W.string(),mimeType:W.optional(W.string()),sizes:W.optional(W.array(W.string()))}).passthrough(),L6=W.object({icons:W.array(PT).optional()}).passthrough(),t6=W.object({name:W.string(),title:W.optional(W.string())}).passthrough(),V7=t6.extend({version:W.string(),websiteUrl:W.optional(W.string())}).merge(L6),jT=W.object({experimental:W.optional(W.object({}).passthrough()),sampling:W.optional(W.object({}).passthrough()),elicitation:W.optional(W.object({}).passthrough()),roots:W.optional(W.object({listChanged:W.optional(W.boolean())}).passthrough())}).passthrough(),eK=xq.extend({method:W.literal("initialize"),params:K_.extend({protocolVersion:W.string(),capabilities:jT,clientInfo:V7})});var vT=W.object({experimental:W.optional(W.object({}).passthrough()),logging:W.optional(W.object({}).passthrough()),completions:W.optional(W.object({}).passthrough()),prompts:W.optional(W.object({listChanged:W.optional(W.boolean())}).passthrough()),resources:W.optional(W.object({subscribe:W.optional(W.boolean()),listChanged:W.optional(W.boolean())}).passthrough()),tools:W.optional(W.object({listChanged:W.optional(W.boolean())}).passthrough())}).passthrough(),wT=P_.extend({protocolVersion:W.string(),capabilities:vT,serverInfo:V7,instructions:W.optional(W.string())}),xK=N_.extend({method:W.literal("notifications/initialized")});var tf=xq.extend({method:W.literal("ping")}),OT=W.object({progress:W.number(),total:W.optional(W.number()),message:W.optional(W.string())}).passthrough(),ef=N_.extend({method:W.literal("notifications/progress"),params:c6.merge(OT).extend({progressToken:J7})}),xf=xq.extend({params:K_.extend({cursor:W.optional(k7)}).optional()}),sf=P_.extend({nextCursor:W.optional(k7)}),M7=W.object({uri:W.string(),mimeType:W.optional(W.string()),_meta:W.optional(W.object({}).passthrough())}).passthrough(),S7=M7.extend({text:W.string()}),sK=W.string().refine((_)=>{try{return atob(_),!0}catch(q){return!1}},{message:"Invalid Base64 string"}),N7=M7.extend({blob:sK}),C7=t6.extend({uri:W.string(),description:W.optional(W.string()),mimeType:W.optional(W.string()),_meta:W.optional(W.object({}).passthrough())}).merge(L6),YT=t6.extend({uriTemplate:W.string(),description:W.optional(W.string()),mimeType:W.optional(W.string()),_meta:W.optional(W.object({}).passthrough())}).merge(L6),Bf=xf.extend({method:W.literal("resources/list")}),TT=sf.extend({resources:W.array(C7)}),Uf=xf.extend({method:W.literal("resources/templates/list")}),zT=sf.extend({resourceTemplates:W.array(YT)}),Ff=xq.extend({method:W.literal("resources/read"),params:K_.extend({uri:W.string()})}),WT=P_.extend({contents:W.array(W.union([S7,N7]))}),HT=N_.extend({method:W.literal("notifications/resources/list_changed")}),hT=xq.extend({method:W.literal("resources/subscribe"),params:K_.extend({uri:W.string()})}),JT=xq.extend({method:W.literal("resources/unsubscribe"),params:K_.extend({uri:W.string()})}),kT=N_.extend({method:W.literal("notifications/resources/updated"),params:c6.extend({uri:W.string()})}),ZT=W.object({name:W.string(),description:W.optional(W.string()),required:W.optional(W.boolean())}).passthrough(),XT=t6.extend({description:W.optional(W.string()),arguments:W.optional(W.array(ZT)),_meta:W.optional(W.object({}).passthrough())}).merge(L6),Qf=xf.extend({method:W.literal("prompts/list")}),AT=sf.extend({prompts:W.array(XT)}),q$=xq.extend({method:W.literal("prompts/get"),params:K_.extend({name:W.string(),arguments:W.optional(W.record(W.string()))})}),BK=W.object({type:W.literal("text"),text:W.string(),_meta:W.optional(W.object({}).passthrough())}).passthrough(),UK=W.object({type:W.literal("image"),data:sK,mimeType:W.string(),_meta:W.optional(W.object({}).passthrough())}).passthrough(),FK=W.object({type:W.literal("audio"),data:sK,mimeType:W.string(),_meta:W.optional(W.object({}).passthrough())}).passthrough(),uT=W.object({type:W.literal("resource"),resource:W.union([S7,N7]),_meta:W.optional(W.object({}).passthrough())}).passthrough(),GT=C7.extend({type:W.literal("resource_link")}),p7=W.union([BK,UK,FK,GT,uT]),mT=W.object({role:W.enum(["user","assistant"]),content:p7}).passthrough(),rT=P_.extend({description:W.optional(W.string()),messages:W.array(mT)}),bT=N_.extend({method:W.literal("notifications/prompts/list_changed")}),VT=W.object({title:W.optional(W.string()),readOnlyHint:W.optional(W.boolean()),destructiveHint:W.optional(W.boolean()),idempotentHint:W.optional(W.boolean()),openWorldHint:W.optional(W.boolean())}).passthrough(),MT=t6.extend({description:W.optional(W.string()),inputSchema:W.object({type:W.literal("object"),properties:W.optional(W.object({}).passthrough()),required:W.optional(W.array(W.string()))}).passthrough(),outputSchema:W.optional(W.object({type:W.literal("object"),properties:W.optional(W.object({}).passthrough()),required:W.optional(W.array(W.string()))}).passthrough()),annotations:W.optional(VT),_meta:W.optional(W.object({}).passthrough())}).merge(L6),_$=xf.extend({method:W.literal("tools/list")}),ST=sf.extend({tools:W.array(MT)}),l7=P_.extend({content:W.array(p7).default([]),structuredContent:W.object({}).passthrough().optional(),isError:W.optional(W.boolean())}),SC=l7.or(P_.extend({toolResult:W.unknown()})),f$=xq.extend({method:W.literal("tools/call"),params:K_.extend({name:W.string(),arguments:W.optional(W.record(W.unknown()))})}),NT=N_.extend({method:W.literal("notifications/tools/list_changed")}),e6=W.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),QK=xq.extend({method:W.literal("logging/setLevel"),params:K_.extend({level:e6})}),CT=N_.extend({method:W.literal("notifications/message"),params:c6.extend({level:e6,logger:W.optional(W.string()),data:W.unknown()})}),pT=W.object({name:W.string().optional()}).passthrough(),lT=W.object({hints:W.optional(W.array(pT)),costPriority:W.optional(W.number().min(0).max(1)),speedPriority:W.optional(W.number().min(0).max(1)),intelligencePriority:W.optional(W.number().min(0).max(1))}).passthrough(),nT=W.object({role:W.enum(["user","assistant"]),content:W.union([BK,UK,FK])}).passthrough(),RT=xq.extend({method:W.literal("sampling/createMessage"),params:K_.extend({messages:W.array(nT),systemPrompt:W.optional(W.string()),includeContext:W.optional(W.enum(["none","thisServer","allServers"])),temperature:W.optional(W.number()),maxTokens:W.number().int(),stopSequences:W.optional(W.array(W.string())),metadata:W.optional(W.object({}).passthrough()),modelPreferences:W.optional(lT)})}),qP=P_.extend({model:W.string(),stopReason:W.optional(W.enum(["endTurn","stopSequence","maxTokens"]).or(W.string())),role:W.enum(["user","assistant"]),content:W.discriminatedUnion("type",[BK,UK,FK])}),ET=W.object({type:W.literal("boolean"),title:W.optional(W.string()),description:W.optional(W.string()),default:W.optional(W.boolean())}).passthrough(),gT=W.object({type:W.literal("string"),title:W.optional(W.string()),description:W.optional(W.string()),minLength:W.optional(W.number()),maxLength:W.optional(W.number()),format:W.optional(W.enum(["email","uri","date","date-time"]))}).passthrough(),dT=W.object({type:W.enum(["number","integer"]),title:W.optional(W.string()),description:W.optional(W.string()),minimum:W.optional(W.number()),maximum:W.optional(W.number())}).passthrough(),aT=W.object({type:W.literal("string"),title:W.optional(W.string()),description:W.optional(W.string()),enum:W.array(W.string()),enumNames:W.optional(W.array(W.string()))}).passthrough(),IT=W.union([ET,gT,dT,aT]),DT=xq.extend({method:W.literal("elicitation/create"),params:K_.extend({message:W.string(),requestedSchema:W.object({type:W.literal("object"),properties:W.record(W.string(),IT),required:W.optional(W.array(W.string()))}).passthrough()})}),_P=P_.extend({action:W.enum(["accept","decline","cancel"]),content:W.optional(W.record(W.string(),W.unknown()))}),yT=W.object({type:W.literal("ref/resource"),uri:W.string()}).passthrough();var iT=W.object({type:W.literal("ref/prompt"),name:W.string()}).passthrough(),$$=xq.extend({method:W.literal("completion/complete"),params:K_.extend({ref:W.union([iT,yT]),argument:W.object({name:W.string(),value:W.string()}).passthrough(),context:W.optional(W.object({arguments:W.optional(W.record(W.string(),W.string()))}))})}),oT=P_.extend({completion:W.object({values:W.array(W.string()).max(100),total:W.optional(W.number().int()),hasMore:W.optional(W.boolean())}).passthrough()}),cT=W.object({uri:W.string().startsWith("file://"),name:W.optional(W.string()),_meta:W.optional(W.object({}).passthrough())}).passthrough(),LT=xq.extend({method:W.literal("roots/list")}),fP=P_.extend({roots:W.array(cT)}),tT=N_.extend({method:W.literal("notifications/roots/list_changed")}),NC=W.union([tf,eK,$$,QK,q$,Qf,Bf,Uf,Ff,hT,JT,f$,_$]),CC=W.union([Lf,ef,xK,tT]),pC=W.union([cf,qP,_P,fP]),lC=W.union([tf,RT,DT,LT]),nC=W.union([Lf,ef,CT,kT,HT,NT,bT]),RC=W.union([cf,wT,oT,rT,AT,TT,zT,WT,l7,ST]);class Xq extends Error{constructor(_,q,f){super(`MCP error ${_}: ${q}`);this.code=_,this.data=f,this.name="McpError"}}var eT=60000;class $P{constructor(_){this._options=_,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this.setNotificationHandler(Lf,(q)=>{let f=this._requestHandlerAbortControllers.get(q.params.requestId);f===null||f===void 0||f.abort(q.params.reason)}),this.setNotificationHandler(ef,(q)=>{this._onprogress(q)}),this.setRequestHandler(tf,(q)=>({}))}_setupTimeout(_,q,f,K,$=!1){this._timeoutInfo.set(_,{timeoutId:setTimeout(K,q),startTime:Date.now(),timeout:q,maxTotalTimeout:f,resetTimeoutOnProgress:$,onTimeout:K})}_resetTimeout(_){let q=this._timeoutInfo.get(_);if(!q)return!1;let f=Date.now()-q.startTime;if(q.maxTotalTimeout&&f>=q.maxTotalTimeout)throw this._timeoutInfo.delete(_),new Xq(Zq.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:q.maxTotalTimeout,totalElapsed:f});return clearTimeout(q.timeoutId),q.timeoutId=setTimeout(q.onTimeout,q.timeout),!0}_cleanupTimeout(_){let q=this._timeoutInfo.get(_);if(q)clearTimeout(q.timeoutId),this._timeoutInfo.delete(_)}async connect(_){var q,f,K;this._transport=_;let $=(q=this.transport)===null||q===void 0?void 0:q.onclose;this._transport.onclose=()=>{$===null||$===void 0||$(),this._onclose()};let P=(f=this.transport)===null||f===void 0?void 0:f.onerror;this._transport.onerror=(v)=>{P===null||P===void 0||P(v),this._onerror(v)};let j=(K=this._transport)===null||K===void 0?void 0:K.onmessage;this._transport.onmessage=(v,w)=>{if(j===null||j===void 0||j(v,w),tK(v)||r7(v))this._onresponse(v);else if(X7(v))this._onrequest(v,w);else if(u7(v))this._onnotification(v);else this._onerror(new Error(`Unknown message type: ${JSON.stringify(v)}`))},await this._transport.start()}_onclose(){var _;let q=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._transport=void 0,(_=this.onclose)===null||_===void 0||_.call(this);let f=new Xq(Zq.ConnectionClosed,"Connection closed");for(let K of q.values())K(f)}_onerror(_){var q;(q=this.onerror)===null||q===void 0||q.call(this,_)}_onnotification(_){var q;let f=(q=this._notificationHandlers.get(_.method))!==null&&q!==void 0?q:this.fallbackNotificationHandler;if(f===void 0)return;Promise.resolve().then(()=>f(_)).catch((K)=>this._onerror(new Error(`Uncaught error in notification handler: ${K}`)))}_onrequest(_,q){var f,K;let $=(f=this._requestHandlers.get(_.method))!==null&&f!==void 0?f:this.fallbackRequestHandler,P=this._transport;if($===void 0){P===null||P===void 0||P.send({jsonrpc:"2.0",id:_.id,error:{code:Zq.MethodNotFound,message:"Method not found"}}).catch((w)=>this._onerror(new Error(`Failed to send an error response: ${w}`)));return}let j=new AbortController;this._requestHandlerAbortControllers.set(_.id,j);let v={signal:j.signal,sessionId:P===null||P===void 0?void 0:P.sessionId,_meta:(K=_.params)===null||K===void 0?void 0:K._meta,sendNotification:(w)=>this.notification(w,{relatedRequestId:_.id}),sendRequest:(w,O,T)=>this.request(w,O,{...T,relatedRequestId:_.id}),authInfo:q===null||q===void 0?void 0:q.authInfo,requestId:_.id,requestInfo:q===null||q===void 0?void 0:q.requestInfo};Promise.resolve().then(()=>$(_,v)).then((w)=>{if(j.signal.aborted)return;return P===null||P===void 0?void 0:P.send({result:w,jsonrpc:"2.0",id:_.id})},(w)=>{var O;if(j.signal.aborted)return;return P===null||P===void 0?void 0:P.send({jsonrpc:"2.0",id:_.id,error:{code:Number.isSafeInteger(w.code)?w.code:Zq.InternalError,message:(O=w.message)!==null&&O!==void 0?O:"Internal error"}})}).catch((w)=>this._onerror(new Error(`Failed to send response: ${w}`))).finally(()=>{this._requestHandlerAbortControllers.delete(_.id)})}_onprogress(_){let{progressToken:q,...f}=_.params,K=Number(q),$=this._progressHandlers.get(K);if(!$){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(_)}`));return}let P=this._responseHandlers.get(K),j=this._timeoutInfo.get(K);if(j&&P&&j.resetTimeoutOnProgress)try{this._resetTimeout(K)}catch(v){P(v);return}$(f)}_onresponse(_){let q=Number(_.id),f=this._responseHandlers.get(q);if(f===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(_)}`));return}if(this._responseHandlers.delete(q),this._progressHandlers.delete(q),this._cleanupTimeout(q),tK(_))f(_);else{let K=new Xq(_.error.code,_.error.message,_.error.data);f(K)}}get transport(){return this._transport}async close(){var _;await((_=this._transport)===null||_===void 0?void 0:_.close())}request(_,q,f){let{relatedRequestId:K,resumptionToken:$,onresumptiontoken:P}=f!==null&&f!==void 0?f:{};return new Promise((j,v)=>{var w,O,T,Y,z,H;if(!this._transport){v(new Error("Not connected"));return}if(((w=this._options)===null||w===void 0?void 0:w.enforceStrictCapabilities)===!0)this.assertCapabilityForMethod(_.method);(O=f===null||f===void 0?void 0:f.signal)===null||O===void 0||O.throwIfAborted();let k=this._requestMessageId++,J={..._,jsonrpc:"2.0",id:k};if(f===null||f===void 0?void 0:f.onprogress)this._progressHandlers.set(k,f.onprogress),J.params={..._.params,_meta:{...((T=_.params)===null||T===void 0?void 0:T._meta)||{},progressToken:k}};let h=(b)=>{var N;this._responseHandlers.delete(k),this._progressHandlers.delete(k),this._cleanupTimeout(k),(N=this._transport)===null||N===void 0||N.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:k,reason:String(b)}},{relatedRequestId:K,resumptionToken:$,onresumptiontoken:P}).catch((p)=>this._onerror(new Error(`Failed to send cancellation: ${p}`))),v(b)};this._responseHandlers.set(k,(b)=>{var N;if((N=f===null||f===void 0?void 0:f.signal)===null||N===void 0?void 0:N.aborted)return;if(b instanceof Error)return v(b);try{let p=q.parse(b.result);j(p)}catch(p){v(p)}}),(Y=f===null||f===void 0?void 0:f.signal)===null||Y===void 0||Y.addEventListener("abort",()=>{var b;h((b=f===null||f===void 0?void 0:f.signal)===null||b===void 0?void 0:b.reason)});let X=(z=f===null||f===void 0?void 0:f.timeout)!==null&&z!==void 0?z:eT,M=()=>h(new Xq(Zq.RequestTimeout,"Request timed out",{timeout:X}));this._setupTimeout(k,X,f===null||f===void 0?void 0:f.maxTotalTimeout,M,(H=f===null||f===void 0?void 0:f.resetTimeoutOnProgress)!==null&&H!==void 0?H:!1),this._transport.send(J,{relatedRequestId:K,resumptionToken:$,onresumptiontoken:P}).catch((b)=>{this._cleanupTimeout(k),v(b)})})}async notification(_,q){var f,K;if(!this._transport)throw new Error("Not connected");if(this.assertNotificationCapability(_.method),((K=(f=this._options)===null||f===void 0?void 0:f.debouncedNotificationMethods)!==null&&K!==void 0?K:[]).includes(_.method)&&!_.params&&!(q===null||q===void 0?void 0:q.relatedRequestId)){if(this._pendingDebouncedNotifications.has(_.method))return;this._pendingDebouncedNotifications.add(_.method),Promise.resolve().then(()=>{var v;if(this._pendingDebouncedNotifications.delete(_.method),!this._transport)return;let w={..._,jsonrpc:"2.0"};(v=this._transport)===null||v===void 0||v.send(w,q).catch((O)=>this._onerror(O))});return}let j={..._,jsonrpc:"2.0"};await this._transport.send(j,q)}setRequestHandler(_,q){let f=_.shape.method.value;this.assertRequestHandlerCapability(f),this._requestHandlers.set(f,(K,$)=>{return Promise.resolve(q(_.parse(K),$))})}removeRequestHandler(_){this._requestHandlers.delete(_)}assertCanSetRequestHandler(_){if(this._requestHandlers.has(_))throw new Error(`A request handler for ${_} already exists, which would be overridden`)}setNotificationHandler(_,q){this._notificationHandlers.set(_.shape.method.value,(f)=>Promise.resolve(q(_.parse(f))))}removeNotificationHandler(_){this._notificationHandlers.delete(_)}}function n7(_,q){return Object.entries(q).reduce((f,[K,$])=>{if($&&typeof $==="object")f[K]=f[K]?{...f[K],...$}:$;else f[K]=$;return f},{..._})}var E9=yK(R9(),1);class SP extends $P{constructor(_,q){var f;super(q);if(this._serverInfo=_,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(e6.options.map((K,$)=>[K,$])),this.isMessageIgnored=(K,$)=>{let P=this._loggingLevels.get($);return P?this.LOG_LEVEL_SEVERITY.get(K)<this.LOG_LEVEL_SEVERITY.get(P):!1},this._capabilities=(f=q===null||q===void 0?void 0:q.capabilities)!==null&&f!==void 0?f:{},this._instructions=q===null||q===void 0?void 0:q.instructions,this.setRequestHandler(eK,(K)=>this._oninitialize(K)),this.setNotificationHandler(xK,()=>{var K;return(K=this.oninitialized)===null||K===void 0?void 0:K.call(this)}),this._capabilities.logging)this.setRequestHandler(QK,async(K,$)=>{var P;let j=$.sessionId||((P=$.requestInfo)===null||P===void 0?void 0:P.headers["mcp-session-id"])||void 0,{level:v}=K.params,w=e6.safeParse(v);if(w.success)this._loggingLevels.set(j,w.data);return{}})}registerCapabilities(_){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=n7(this._capabilities,_)}assertCapabilityForMethod(_){var q,f,K;switch(_){case"sampling/createMessage":if(!((q=this._clientCapabilities)===null||q===void 0?void 0:q.sampling))throw new Error(`Client does not support sampling (required for ${_})`);break;case"elicitation/create":if(!((f=this._clientCapabilities)===null||f===void 0?void 0:f.elicitation))throw new Error(`Client does not support elicitation (required for ${_})`);break;case"roots/list":if(!((K=this._clientCapabilities)===null||K===void 0?void 0:K.roots))throw new Error(`Client does not support listing roots (required for ${_})`);break;case"ping":break}}assertNotificationCapability(_){switch(_){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${_})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${_})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${_})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${_})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(_){switch(_){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Server does not support sampling (required for ${_})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${_})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${_})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${_})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${_})`);break;case"ping":case"initialize":break}}async _oninitialize(_){let q=_.params.protocolVersion;return this._clientCapabilities=_.params.capabilities,this._clientVersion=_.params.clientInfo,{protocolVersion:h7.includes(q)?q:LK,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},cf)}async createMessage(_,q){return this.request({method:"sampling/createMessage",params:_},qP,q)}async elicitInput(_,q){let f=await this.request({method:"elicitation/create",params:_},_P,q);if(f.action==="accept"&&f.content)try{let K=new E9.default,$=K.compile(_.requestedSchema);if(!$(f.content))throw new Xq(Zq.InvalidParams,`Elicitation response content does not match requested schema: ${K.errorsText($.errors)}`)}catch(K){if(K instanceof Xq)throw K;throw new Xq(Zq.InternalError,`Error validating elicitation response: ${K}`)}return f}async listRoots(_,q){return this.request({method:"roots/list",params:_},fP,q)}async sendLoggingMessage(_,q){if(this._capabilities.logging){if(!this.isMessageIgnored(_.level,q))return this.notification({method:"notifications/message",params:_})}}async sendResourceUpdated(_){return this.notification({method:"notifications/resources/updated",params:_})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}}var d9=Symbol("Let zodToJsonSchema decide on which parser to use");var g9={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},a9=(_)=>typeof _==="string"?{...g9,name:_}:{...g9,..._};var I9=(_)=>{let q=a9(_),f=q.name!==void 0?[...q.basePath,q.definitionPath,q.name]:q.basePath;return{...q,flags:{hasReferencedOpenAiAnyType:!1},currentPath:f,propertyPath:void 0,seen:new Map(Object.entries(q.definitions).map(([K,$])=>[$._def,{def:$._def,path:[...q.basePath,q.definitionPath,K],jsonSchema:void 0}]))}};function NP(_,q,f,K){if(!K?.errorMessages)return;if(f)_.errorMessage={..._.errorMessage,[q]:f}}function jq(_,q,f,K,$){_[q]=f,NP(_,q,K,$)}var G$=(_,q)=>{let f=0;for(;f<_.length&&f<q.length;f++)if(_[f]!==q[f])break;return[(_.length-f).toString(),...q.slice(f)].join("/")};function Gq(_){if(_.target!=="openAi")return{};let q=[..._.basePath,_.definitionPath,_.openAiAnyTypeName];return _.flags.hasReferencedOpenAiAnyType=!0,{$ref:_.$refStrategy==="relative"?G$(q,_.currentPath):q.join("/")}}function D9(_,q){let f={type:"array"};if(_.type?._def&&_.type?._def?.typeName!==i.ZodAny)f.items=F(_.type._def,{...q,currentPath:[...q.currentPath,"items"]});if(_.minLength)jq(f,"minItems",_.minLength.value,_.minLength.message,q);if(_.maxLength)jq(f,"maxItems",_.maxLength.value,_.maxLength.message,q);if(_.exactLength)jq(f,"minItems",_.exactLength.value,_.exactLength.message,q),jq(f,"maxItems",_.exactLength.value,_.exactLength.message,q);return f}function y9(_,q){let f={type:"integer",format:"int64"};if(!_.checks)return f;for(let K of _.checks)switch(K.kind){case"min":if(q.target==="jsonSchema7")if(K.inclusive)jq(f,"minimum",K.value,K.message,q);else jq(f,"exclusiveMinimum",K.value,K.message,q);else{if(!K.inclusive)f.exclusiveMinimum=!0;jq(f,"minimum",K.value,K.message,q)}break;case"max":if(q.target==="jsonSchema7")if(K.inclusive)jq(f,"maximum",K.value,K.message,q);else jq(f,"exclusiveMaximum",K.value,K.message,q);else{if(!K.inclusive)f.exclusiveMaximum=!0;jq(f,"maximum",K.value,K.message,q)}break;case"multipleOf":jq(f,"multipleOf",K.value,K.message,q);break}return f}function i9(){return{type:"boolean"}}function m$(_,q){return F(_.type._def,q)}var o9=(_,q)=>{return F(_.innerType._def,q)};function CP(_,q,f){let K=f??q.dateStrategy;if(Array.isArray(K))return{anyOf:K.map(($,P)=>CP(_,q,$))};switch(K){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return VW(_,q)}}var VW=(_,q)=>{let f={type:"integer",format:"unix-time"};if(q.target==="openApi3")return f;for(let K of _.checks)switch(K.kind){case"min":jq(f,"minimum",K.value,K.message,q);break;case"max":jq(f,"maximum",K.value,K.message,q);break}return f};function c9(_,q){return{...F(_.innerType._def,q),default:_.defaultValue()}}function L9(_,q){return q.effectStrategy==="input"?F(_.schema._def,q):Gq(q)}function t9(_){return{type:"string",enum:Array.from(_.values)}}var MW=(_)=>{if("type"in _&&_.type==="string")return!1;return"allOf"in _};function e9(_,q){let f=[F(_.left._def,{...q,currentPath:[...q.currentPath,"allOf","0"]}),F(_.right._def,{...q,currentPath:[...q.currentPath,"allOf","1"]})].filter((P)=>!!P),K=q.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,$=[];return f.forEach((P)=>{if(MW(P)){if($.push(...P.allOf),P.unevaluatedProperties===void 0)K=void 0}else{let j=P;if("additionalProperties"in P&&P.additionalProperties===!1){let{additionalProperties:v,...w}=P;j=w}else K=void 0;$.push(j)}}),$.length?{allOf:$,...K}:void 0}function x9(_,q){let f=typeof _.value;if(f!=="bigint"&&f!=="number"&&f!=="boolean"&&f!=="string")return{type:Array.isArray(_.value)?"array":"object"};if(q.target==="openApi3")return{type:f==="bigint"?"integer":f,enum:[_.value]};return{type:f==="bigint"?"integer":f,const:_.value}}var pP=void 0,J_={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(pP===void 0)pP=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return pP},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function r$(_,q){let f={type:"string"};if(_.checks)for(let K of _.checks)switch(K.kind){case"min":jq(f,"minLength",typeof f.minLength==="number"?Math.max(f.minLength,K.value):K.value,K.message,q);break;case"max":jq(f,"maxLength",typeof f.maxLength==="number"?Math.min(f.maxLength,K.value):K.value,K.message,q);break;case"email":switch(q.emailStrategy){case"format:email":k_(f,"email",K.message,q);break;case"format:idn-email":k_(f,"idn-email",K.message,q);break;case"pattern:zod":cq(f,J_.email,K.message,q);break}break;case"url":k_(f,"uri",K.message,q);break;case"uuid":k_(f,"uuid",K.message,q);break;case"regex":cq(f,K.regex,K.message,q);break;case"cuid":cq(f,J_.cuid,K.message,q);break;case"cuid2":cq(f,J_.cuid2,K.message,q);break;case"startsWith":cq(f,RegExp(`^${lP(K.value,q)}`),K.message,q);break;case"endsWith":cq(f,RegExp(`${lP(K.value,q)}$`),K.message,q);break;case"datetime":k_(f,"date-time",K.message,q);break;case"date":k_(f,"date",K.message,q);break;case"time":k_(f,"time",K.message,q);break;case"duration":k_(f,"duration",K.message,q);break;case"length":jq(f,"minLength",typeof f.minLength==="number"?Math.max(f.minLength,K.value):K.value,K.message,q),jq(f,"maxLength",typeof f.maxLength==="number"?Math.min(f.maxLength,K.value):K.value,K.message,q);break;case"includes":{cq(f,RegExp(lP(K.value,q)),K.message,q);break}case"ip":{if(K.version!=="v6")k_(f,"ipv4",K.message,q);if(K.version!=="v4")k_(f,"ipv6",K.message,q);break}case"base64url":cq(f,J_.base64url,K.message,q);break;case"jwt":cq(f,J_.jwt,K.message,q);break;case"cidr":{if(K.version!=="v6")cq(f,J_.ipv4Cidr,K.message,q);if(K.version!=="v4")cq(f,J_.ipv6Cidr,K.message,q);break}case"emoji":cq(f,J_.emoji(),K.message,q);break;case"ulid":{cq(f,J_.ulid,K.message,q);break}case"base64":{switch(q.base64Strategy){case"format:binary":{k_(f,"binary",K.message,q);break}case"contentEncoding:base64":{jq(f,"contentEncoding","base64",K.message,q);break}case"pattern:zod":{cq(f,J_.base64,K.message,q);break}}break}case"nanoid":cq(f,J_.nanoid,K.message,q);case"toLowerCase":case"toUpperCase":case"trim":break;default:(($)=>{})(K)}return f}function lP(_,q){return q.patternStrategy==="escape"?NW(_):_}var SW=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function NW(_){let q="";for(let f=0;f<_.length;f++){if(!SW.has(_[f]))q+="\\";q+=_[f]}return q}function k_(_,q,f,K){if(_.format||_.anyOf?.some(($)=>$.format)){if(!_.anyOf)_.anyOf=[];if(_.format){if(_.anyOf.push({format:_.format,..._.errorMessage&&K.errorMessages&&{errorMessage:{format:_.errorMessage.format}}}),delete _.format,_.errorMessage){if(delete _.errorMessage.format,Object.keys(_.errorMessage).length===0)delete _.errorMessage}}_.anyOf.push({format:q,...f&&K.errorMessages&&{errorMessage:{format:f}}})}else jq(_,"format",q,f,K)}function cq(_,q,f,K){if(_.pattern||_.allOf?.some(($)=>$.pattern)){if(!_.allOf)_.allOf=[];if(_.pattern){if(_.allOf.push({pattern:_.pattern,..._.errorMessage&&K.errorMessages&&{errorMessage:{pattern:_.errorMessage.pattern}}}),delete _.pattern,_.errorMessage){if(delete _.errorMessage.pattern,Object.keys(_.errorMessage).length===0)delete _.errorMessage}}_.allOf.push({pattern:s9(q,K),...f&&K.errorMessages&&{errorMessage:{pattern:f}}})}else jq(_,"pattern",s9(q,K),f,K)}function s9(_,q){if(!q.applyRegexFlags||!_.flags)return _.source;let f={i:_.flags.includes("i"),m:_.flags.includes("m"),s:_.flags.includes("s")},K=f.i?_.source.toLowerCase():_.source,$="",P=!1,j=!1,v=!1;for(let w=0;w<K.length;w++){if(P){$+=K[w],P=!1;continue}if(f.i){if(j){if(K[w].match(/[a-z]/)){if(v)$+=K[w],$+=`${K[w-2]}-${K[w]}`.toUpperCase(),v=!1;else if(K[w+1]==="-"&&K[w+2]?.match(/[a-z]/))$+=K[w],v=!0;else $+=`${K[w]}${K[w].toUpperCase()}`;continue}}else if(K[w].match(/[a-z]/)){$+=`[${K[w]}${K[w].toUpperCase()}]`;continue}}if(f.m){if(K[w]==="^"){$+=`(^|(?<=[\r
|
|
173
173
|
]))`;continue}else if(K[w]==="$"){$+=`($|(?=[\r
|
|
174
174
|
]))`;continue}}if(f.s&&K[w]==="."){$+=j?`${K[w]}\r
|
|
175
175
|
`:`[${K[w]}\r
|
|
176
|
-
]`;continue}if($+=K[w],K[w]==="\\")P=!0;else if(j&&K[w]==="]")j=!1;else if(!j&&K[w]==="[")j=!0}try{new RegExp($)}catch{return console.warn(`Could not convert regex pattern at ${q.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),_.source}return $}function r$(_,q){if(q.target==="openAi")console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");if(q.target==="openApi3"&&_.keyType?._def.typeName===i.ZodEnum)return{type:"object",required:_.keyType._def.values,properties:_.keyType._def.values.reduce((K,$)=>({...K,[$]:F(_.valueType._def,{...q,currentPath:[...q.currentPath,"properties",$]})??Gq(q)}),{}),additionalProperties:q.rejectedAdditionalProperties};let f={type:"object",additionalProperties:F(_.valueType._def,{...q,currentPath:[...q.currentPath,"additionalProperties"]})??q.allowedAdditionalProperties};if(q.target==="openApi3")return f;if(_.keyType?._def.typeName===i.ZodString&&_.keyType._def.checks?.length){let{type:K,...$}=m$(_.keyType._def,q);return{...f,propertyNames:$}}else if(_.keyType?._def.typeName===i.ZodEnum)return{...f,propertyNames:{enum:_.keyType._def.values}};else if(_.keyType?._def.typeName===i.ZodBranded&&_.keyType._def.type._def.typeName===i.ZodString&&_.keyType._def.type._def.checks?.length){let{type:K,...$}=G$(_.keyType._def,q);return{...f,propertyNames:$}}return f}function x9(_,q){if(q.mapStrategy==="record")return r$(_,q);let f=F(_.keyType._def,{...q,currentPath:[...q.currentPath,"items","items","0"]})||Gq(q),K=F(_.valueType._def,{...q,currentPath:[...q.currentPath,"items","items","1"]})||Gq(q);return{type:"array",maxItems:125,items:{type:"array",items:[f,K],minItems:2,maxItems:2}}}function s9(_){let q=_.values,K=Object.keys(_.values).filter((P)=>{return typeof q[q[P]]!=="number"}).map((P)=>q[P]),$=Array.from(new Set(K.map((P)=>typeof P)));return{type:$.length===1?$[0]==="string"?"string":"number":["string","number"],enum:K}}function B9(_){return _.target==="openAi"?void 0:{not:Gq({..._,currentPath:[..._.currentPath,"not"]})}}function U9(_){return _.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var sf={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Q9(_,q){if(q.target==="openApi3")return F9(_,q);let f=_.options instanceof Map?Array.from(_.options.values()):_.options;if(f.every((K)=>(K._def.typeName in sf)&&(!K._def.checks||!K._def.checks.length))){let K=f.reduce(($,P)=>{let j=sf[P._def.typeName];return j&&!$.includes(j)?[...$,j]:$},[]);return{type:K.length>1?K:K[0]}}else if(f.every((K)=>K._def.typeName==="ZodLiteral"&&!K.description)){let K=f.reduce(($,P)=>{let j=typeof P._def.value;switch(j){case"string":case"number":case"boolean":return[...$,j];case"bigint":return[...$,"integer"];case"object":if(P._def.value===null)return[...$,"null"];case"symbol":case"undefined":case"function":default:return $}},[]);if(K.length===f.length){let $=K.filter((P,j,v)=>v.indexOf(P)===j);return{type:$.length>1?$:$[0],enum:f.reduce((P,j)=>{return P.includes(j._def.value)?P:[...P,j._def.value]},[])}}}else if(f.every((K)=>K._def.typeName==="ZodEnum"))return{type:"string",enum:f.reduce((K,$)=>[...K,...$._def.values.filter((P)=>!K.includes(P))],[])};return F9(_,q)}var F9=(_,q)=>{let f=(_.options instanceof Map?Array.from(_.options.values()):_.options).map((K,$)=>F(K._def,{...q,currentPath:[...q.currentPath,"anyOf",`${$}`]})).filter((K)=>!!K&&(!q.strictUnions||typeof K==="object"&&Object.keys(K).length>0));return f.length?{anyOf:f}:void 0};function qv(_,q){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(_.innerType._def.typeName)&&(!_.innerType._def.checks||!_.innerType._def.checks.length)){if(q.target==="openApi3")return{type:sf[_.innerType._def.typeName],nullable:!0};return{type:[sf[_.innerType._def.typeName],"null"]}}if(q.target==="openApi3"){let K=F(_.innerType._def,{...q,currentPath:[...q.currentPath]});if(K&&"$ref"in K)return{allOf:[K],nullable:!0};return K&&{...K,nullable:!0}}let f=F(_.innerType._def,{...q,currentPath:[...q.currentPath,"anyOf","0"]});return f&&{anyOf:[f,{type:"null"}]}}function _v(_,q){let f={type:"number"};if(!_.checks)return f;for(let K of _.checks)switch(K.kind){case"int":f.type="integer",MP(f,"type",K.message,q);break;case"min":if(q.target==="jsonSchema7")if(K.inclusive)jq(f,"minimum",K.value,K.message,q);else jq(f,"exclusiveMinimum",K.value,K.message,q);else{if(!K.inclusive)f.exclusiveMinimum=!0;jq(f,"minimum",K.value,K.message,q)}break;case"max":if(q.target==="jsonSchema7")if(K.inclusive)jq(f,"maximum",K.value,K.message,q);else jq(f,"exclusiveMaximum",K.value,K.message,q);else{if(!K.inclusive)f.exclusiveMaximum=!0;jq(f,"maximum",K.value,K.message,q)}break;case"multipleOf":jq(f,"multipleOf",K.value,K.message,q);break}return f}function fv(_,q){let f=q.target==="openAi",K={type:"object",properties:{}},$=[],P=_.shape();for(let v in P){let w=P[v];if(w===void 0||w._def===void 0)continue;let O=NW(w);if(O&&f){if(w._def.typeName==="ZodOptional")w=w._def.innerType;if(!w.isNullable())w=w.nullable();O=!1}let T=F(w._def,{...q,currentPath:[...q.currentPath,"properties",v],propertyPath:[...q.currentPath,"properties",v]});if(T===void 0)continue;if(K.properties[v]=T,!O)$.push(v)}if($.length)K.required=$;let j=SW(_,q);if(j!==void 0)K.additionalProperties=j;return K}function SW(_,q){if(_.catchall._def.typeName!=="ZodNever")return F(_.catchall._def,{...q,currentPath:[...q.currentPath,"additionalProperties"]});switch(_.unknownKeys){case"passthrough":return q.allowedAdditionalProperties;case"strict":return q.rejectedAdditionalProperties;case"strip":return q.removeAdditionalStrategy==="strict"?q.allowedAdditionalProperties:q.rejectedAdditionalProperties}}function NW(_){try{return _.isOptional()}catch{return!0}}var $v=(_,q)=>{if(q.currentPath.toString()===q.propertyPath?.toString())return F(_.innerType._def,q);let f=F(_.innerType._def,{...q,currentPath:[...q.currentPath,"anyOf","1"]});return f?{anyOf:[{not:Gq(q)},f]}:Gq(q)};var Kv=(_,q)=>{if(q.pipeStrategy==="input")return F(_.in._def,q);else if(q.pipeStrategy==="output")return F(_.out._def,q);let f=F(_.in._def,{...q,currentPath:[...q.currentPath,"allOf","0"]}),K=F(_.out._def,{...q,currentPath:[...q.currentPath,"allOf",f?"1":"0"]});return{allOf:[f,K].filter(($)=>$!==void 0)}};function Pv(_,q){return F(_.type._def,q)}function jv(_,q){let K={type:"array",uniqueItems:!0,items:F(_.valueType._def,{...q,currentPath:[...q.currentPath,"items"]})};if(_.minSize)jq(K,"minItems",_.minSize.value,_.minSize.message,q);if(_.maxSize)jq(K,"maxItems",_.maxSize.value,_.maxSize.message,q);return K}function vv(_,q){if(_.rest)return{type:"array",minItems:_.items.length,items:_.items.map((f,K)=>F(f._def,{...q,currentPath:[...q.currentPath,"items",`${K}`]})).reduce((f,K)=>K===void 0?f:[...f,K],[]),additionalItems:F(_.rest._def,{...q,currentPath:[...q.currentPath,"additionalItems"]})};else return{type:"array",minItems:_.items.length,maxItems:_.items.length,items:_.items.map((f,K)=>F(f._def,{...q,currentPath:[...q.currentPath,"items",`${K}`]})).reduce((f,K)=>K===void 0?f:[...f,K],[])}}function wv(_){return{not:Gq(_)}}function Ov(_){return Gq(_)}var Yv=(_,q)=>{return F(_.innerType._def,q)};var Tv=(_,q,f)=>{switch(q){case i.ZodString:return m$(_,f);case i.ZodNumber:return _v(_,f);case i.ZodObject:return fv(_,f);case i.ZodBigInt:return I9(_,f);case i.ZodBoolean:return D9();case i.ZodDate:return SP(_,f);case i.ZodUndefined:return wv(f);case i.ZodNull:return U9(f);case i.ZodArray:return a9(_,f);case i.ZodUnion:case i.ZodDiscriminatedUnion:return Q9(_,f);case i.ZodIntersection:return L9(_,f);case i.ZodTuple:return vv(_,f);case i.ZodRecord:return r$(_,f);case i.ZodLiteral:return t9(_,f);case i.ZodEnum:return c9(_);case i.ZodNativeEnum:return s9(_);case i.ZodNullable:return qv(_,f);case i.ZodOptional:return $v(_,f);case i.ZodMap:return x9(_,f);case i.ZodSet:return jv(_,f);case i.ZodLazy:return()=>_.getter()._def;case i.ZodPromise:return Pv(_,f);case i.ZodNaN:case i.ZodNever:return B9(f);case i.ZodEffects:return o9(_,f);case i.ZodAny:return Gq(f);case i.ZodUnknown:return Ov(f);case i.ZodDefault:return i9(_,f);case i.ZodBranded:return G$(_,f);case i.ZodReadonly:return Yv(_,f);case i.ZodCatch:return y9(_,f);case i.ZodPipeline:return Kv(_,f);case i.ZodFunction:case i.ZodVoid:case i.ZodSymbol:return;default:return((K)=>{return})(q)}};function F(_,q,f=!1){let K=q.seen.get(_);if(q.override){let v=q.override?.(_,q,K,f);if(v!==E9)return v}if(K&&!f){let v=CW(K,q);if(v!==void 0)return v}let $={def:_,path:q.currentPath,jsonSchema:void 0};q.seen.set(_,$);let P=Tv(_,_.typeName,q),j=typeof P==="function"?F(P(),q):P;if(j)pW(_,q,j);if(q.postProcess){let v=q.postProcess(j,_,q);return $.jsonSchema=j,v}return $.jsonSchema=j,j}var CW=(_,q)=>{switch(q.$refStrategy){case"root":return{$ref:_.path.join("/")};case"relative":return{$ref:u$(q.currentPath,_.path)};case"none":case"seen":{if(_.path.length<q.currentPath.length&&_.path.every((f,K)=>q.currentPath[K]===f))return console.warn(`Recursive reference detected at ${q.currentPath.join("/")}! Defaulting to any`),Gq(q);return q.$refStrategy==="seen"?Gq(q):void 0}}},pW=(_,q,f)=>{if(_.description){if(f.description=_.description,q.markdownDescription)f.markdownDescription=_.description}return f};var b$=(_,q)=>{let f=d9(q),K=typeof q==="object"&&q.definitions?Object.entries(q.definitions).reduce((w,[O,T])=>({...w,[O]:F(T._def,{...f,currentPath:[...f.basePath,f.definitionPath,O]},!0)??Gq(f)}),{}):void 0,$=typeof q==="string"?q:q?.nameStrategy==="title"?void 0:q?.name,P=F(_._def,$===void 0?f:{...f,currentPath:[...f.basePath,f.definitionPath,$]},!1)??Gq(f),j=typeof q==="object"&&q.name!==void 0&&q.nameStrategy==="title"?q.name:void 0;if(j!==void 0)P.title=j;if(f.flags.hasReferencedOpenAiAnyType){if(!K)K={};if(!K[f.openAiAnyTypeName])K[f.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:f.$refStrategy==="relative"?"1":[...f.basePath,f.definitionPath,f.openAiAnyTypeName].join("/")}}}let v=$===void 0?K?{...P,[f.definitionPath]:K}:P:{$ref:[...f.$refStrategy==="relative"?[]:f.basePath,f.definitionPath,$].join("/"),[f.definitionPath]:{...K,[$]:P}};if(f.target==="jsonSchema7")v.$schema="http://json-schema.org/draft-07/schema#";else if(f.target==="jsonSchema2019-09"||f.target==="openAi")v.$schema="https://json-schema.org/draft/2019-09/schema#";if(f.target==="openAi"&&(("anyOf"in v)||("oneOf"in v)||("allOf"in v)||("type"in v)&&Array.isArray(v.type)))console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");return v};var pP;(function(_){_.Completable="McpCompletable"})(pP||(pP={}));class Bf extends $q{_parse(_){let{ctx:q}=this._processInputParams(_),f=q.data;return this._def.type._parse({data:f,path:q.path,parent:q})}unwrap(){return this._def.type}}Bf.create=(_,q)=>{return new Bf({type:_,typeName:pP.Completable,complete:q.complete,...lW(q)})};function lW(_){if(!_)return{};let{errorMap:q,invalid_type_error:f,required_error:K,description:$}=_;if(q&&(f||K))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(q)return{errorMap:q,description:$};return{errorMap:(j,v)=>{var w,O;let{message:T}=_;if(j.code==="invalid_enum_value")return{message:T!==null&&T!==void 0?T:v.defaultError};if(typeof v.data==="undefined")return{message:(w=T!==null&&T!==void 0?T:K)!==null&&w!==void 0?w:v.defaultError};if(j.code!=="invalid_type")return{message:v.defaultError};return{message:(O=T!==null&&T!==void 0?T:f)!==null&&O!==void 0?O:v.defaultError}},description:$}}class lP{constructor(_,q){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new VP(_,q)}async connect(_){return await this.server.connect(_)}async close(){await this.server.close()}setToolRequestHandlers(){if(this._toolHandlersInitialized)return;this.server.assertCanSetRequestHandler(q$.shape.method.value),this.server.assertCanSetRequestHandler(_$.shape.method.value),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(q$,()=>({tools:Object.entries(this._registeredTools).filter(([,_])=>_.enabled).map(([_,q])=>{let f={name:_,title:q.title,description:q.description,inputSchema:q.inputSchema?b$(q.inputSchema,{strictUnions:!0}):nW,annotations:q.annotations,_meta:q._meta};if(q.outputSchema)f.outputSchema=b$(q.outputSchema,{strictUnions:!0});return f})})),this.server.setRequestHandler(_$,async(_,q)=>{let f=this._registeredTools[_.params.name];if(!f)throw new Xq(Zq.InvalidParams,`Tool ${_.params.name} not found`);if(!f.enabled)throw new Xq(Zq.InvalidParams,`Tool ${_.params.name} disabled`);let K;if(f.inputSchema){let $=await f.inputSchema.safeParseAsync(_.params.arguments);if(!$.success)throw new Xq(Zq.InvalidParams,`Invalid arguments for tool ${_.params.name}: ${$.error.message}`);let P=$.data,j=f.callback;try{K=await Promise.resolve(j(P,q))}catch(v){K={content:[{type:"text",text:v instanceof Error?v.message:String(v)}],isError:!0}}}else{let $=f.callback;try{K=await Promise.resolve($(q))}catch(P){K={content:[{type:"text",text:P instanceof Error?P.message:String(P)}],isError:!0}}}if(f.outputSchema&&!K.isError){if(!K.structuredContent)throw new Xq(Zq.InvalidParams,`Tool ${_.params.name} has an output schema but no structured content was provided`);let $=await f.outputSchema.safeParseAsync(K.structuredContent);if(!$.success)throw new Xq(Zq.InvalidParams,`Invalid structured content for tool ${_.params.name}: ${$.error.message}`)}return K}),this._toolHandlersInitialized=!0}setCompletionRequestHandler(){if(this._completionHandlerInitialized)return;this.server.assertCanSetRequestHandler(f$.shape.method.value),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(f$,async(_)=>{switch(_.params.ref.type){case"ref/prompt":return this.handlePromptCompletion(_,_.params.ref);case"ref/resource":return this.handleResourceCompletion(_,_.params.ref);default:throw new Xq(Zq.InvalidParams,`Invalid completion reference: ${_.params.ref}`)}}),this._completionHandlerInitialized=!0}async handlePromptCompletion(_,q){let f=this._registeredPrompts[q.name];if(!f)throw new Xq(Zq.InvalidParams,`Prompt ${q.name} not found`);if(!f.enabled)throw new Xq(Zq.InvalidParams,`Prompt ${q.name} disabled`);if(!f.argsSchema)return V$;let K=f.argsSchema.shape[_.params.argument.name];if(!(K instanceof Bf))return V$;let P=await K._def.complete(_.params.argument.value,_.params.context);return Wv(P)}async handleResourceCompletion(_,q){let f=Object.values(this._registeredResourceTemplates).find((P)=>P.resourceTemplate.uriTemplate.toString()===q.uri);if(!f){if(this._registeredResources[q.uri])return V$;throw new Xq(Zq.InvalidParams,`Resource template ${_.params.ref.uri} not found`)}let K=f.resourceTemplate.completeCallback(_.params.argument.name);if(!K)return V$;let $=await K(_.params.argument.value,_.params.context);return Wv($)}setResourceRequestHandlers(){if(this._resourceHandlersInitialized)return;this.server.assertCanSetRequestHandler(s6.shape.method.value),this.server.assertCanSetRequestHandler(B6.shape.method.value),this.server.assertCanSetRequestHandler(U6.shape.method.value),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(s6,async(_,q)=>{let f=Object.entries(this._registeredResources).filter(([$,P])=>P.enabled).map(([$,P])=>({uri:$,name:P.name,...P.metadata})),K=[];for(let $ of Object.values(this._registeredResourceTemplates)){if(!$.resourceTemplate.listCallback)continue;let P=await $.resourceTemplate.listCallback(q);for(let j of P.resources)K.push({...$.metadata,...j})}return{resources:[...f,...K]}}),this.server.setRequestHandler(B6,async()=>{return{resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([q,f])=>({name:q,uriTemplate:f.resourceTemplate.uriTemplate.toString(),...f.metadata}))}}),this.server.setRequestHandler(U6,async(_,q)=>{let f=new URL(_.params.uri),K=this._registeredResources[f.toString()];if(K){if(!K.enabled)throw new Xq(Zq.InvalidParams,`Resource ${f} disabled`);return K.readCallback(f,q)}for(let $ of Object.values(this._registeredResourceTemplates)){let P=$.resourceTemplate.uriTemplate.match(f.toString());if(P)return $.readCallback(f,P,q)}throw new Xq(Zq.InvalidParams,`Resource ${f} not found`)}),this.setCompletionRequestHandler(),this._resourceHandlersInitialized=!0}setPromptRequestHandlers(){if(this._promptHandlersInitialized)return;this.server.assertCanSetRequestHandler(F6.shape.method.value),this.server.assertCanSetRequestHandler(Q6.shape.method.value),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(F6,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,_])=>_.enabled).map(([_,q])=>{return{name:_,title:q.title,description:q.description,arguments:q.argsSchema?EW(q.argsSchema):void 0}})})),this.server.setRequestHandler(Q6,async(_,q)=>{let f=this._registeredPrompts[_.params.name];if(!f)throw new Xq(Zq.InvalidParams,`Prompt ${_.params.name} not found`);if(!f.enabled)throw new Xq(Zq.InvalidParams,`Prompt ${_.params.name} disabled`);if(f.argsSchema){let K=await f.argsSchema.safeParseAsync(_.params.arguments);if(!K.success)throw new Xq(Zq.InvalidParams,`Invalid arguments for prompt ${_.params.name}: ${K.error.message}`);let $=K.data,P=f.callback;return await Promise.resolve(P($,q))}else{let K=f.callback;return await Promise.resolve(K(q))}}),this.setCompletionRequestHandler(),this._promptHandlersInitialized=!0}resource(_,q,...f){let K;if(typeof f[0]==="object")K=f.shift();let $=f[0];if(typeof q==="string"){if(this._registeredResources[q])throw new Error(`Resource ${q} is already registered`);let P=this._createRegisteredResource(_,void 0,q,K,$);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),P}else{if(this._registeredResourceTemplates[_])throw new Error(`Resource template ${_} is already registered`);let P=this._createRegisteredResourceTemplate(_,void 0,q,K,$);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),P}}registerResource(_,q,f,K){if(typeof q==="string"){if(this._registeredResources[q])throw new Error(`Resource ${q} is already registered`);let $=this._createRegisteredResource(_,f.title,q,f,K);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),$}else{if(this._registeredResourceTemplates[_])throw new Error(`Resource template ${_} is already registered`);let $=this._createRegisteredResourceTemplate(_,f.title,q,f,K);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),$}}_createRegisteredResource(_,q,f,K,$){let P={name:_,title:q,metadata:K,readCallback:$,enabled:!0,disable:()=>P.update({enabled:!1}),enable:()=>P.update({enabled:!0}),remove:()=>P.update({uri:null}),update:(j)=>{if(typeof j.uri!=="undefined"&&j.uri!==f){if(delete this._registeredResources[f],j.uri)this._registeredResources[j.uri]=P}if(typeof j.name!=="undefined")P.name=j.name;if(typeof j.title!=="undefined")P.title=j.title;if(typeof j.metadata!=="undefined")P.metadata=j.metadata;if(typeof j.callback!=="undefined")P.readCallback=j.callback;if(typeof j.enabled!=="undefined")P.enabled=j.enabled;this.sendResourceListChanged()}};return this._registeredResources[f]=P,P}_createRegisteredResourceTemplate(_,q,f,K,$){let P={resourceTemplate:f,title:q,metadata:K,readCallback:$,enabled:!0,disable:()=>P.update({enabled:!1}),enable:()=>P.update({enabled:!0}),remove:()=>P.update({name:null}),update:(j)=>{if(typeof j.name!=="undefined"&&j.name!==_){if(delete this._registeredResourceTemplates[_],j.name)this._registeredResourceTemplates[j.name]=P}if(typeof j.title!=="undefined")P.title=j.title;if(typeof j.template!=="undefined")P.resourceTemplate=j.template;if(typeof j.metadata!=="undefined")P.metadata=j.metadata;if(typeof j.callback!=="undefined")P.readCallback=j.callback;if(typeof j.enabled!=="undefined")P.enabled=j.enabled;this.sendResourceListChanged()}};return this._registeredResourceTemplates[_]=P,P}_createRegisteredPrompt(_,q,f,K,$){let P={title:q,description:f,argsSchema:K===void 0?void 0:W.object(K),callback:$,enabled:!0,disable:()=>P.update({enabled:!1}),enable:()=>P.update({enabled:!0}),remove:()=>P.update({name:null}),update:(j)=>{if(typeof j.name!=="undefined"&&j.name!==_){if(delete this._registeredPrompts[_],j.name)this._registeredPrompts[j.name]=P}if(typeof j.title!=="undefined")P.title=j.title;if(typeof j.description!=="undefined")P.description=j.description;if(typeof j.argsSchema!=="undefined")P.argsSchema=W.object(j.argsSchema);if(typeof j.callback!=="undefined")P.callback=j.callback;if(typeof j.enabled!=="undefined")P.enabled=j.enabled;this.sendPromptListChanged()}};return this._registeredPrompts[_]=P,P}_createRegisteredTool(_,q,f,K,$,P,j,v){let w={title:q,description:f,inputSchema:K===void 0?void 0:W.object(K),outputSchema:$===void 0?void 0:W.object($),annotations:P,_meta:j,callback:v,enabled:!0,disable:()=>w.update({enabled:!1}),enable:()=>w.update({enabled:!0}),remove:()=>w.update({name:null}),update:(O)=>{if(typeof O.name!=="undefined"&&O.name!==_){if(delete this._registeredTools[_],O.name)this._registeredTools[O.name]=w}if(typeof O.title!=="undefined")w.title=O.title;if(typeof O.description!=="undefined")w.description=O.description;if(typeof O.paramsSchema!=="undefined")w.inputSchema=W.object(O.paramsSchema);if(typeof O.callback!=="undefined")w.callback=O.callback;if(typeof O.annotations!=="undefined")w.annotations=O.annotations;if(typeof O._meta!=="undefined")w._meta=O._meta;if(typeof O.enabled!=="undefined")w.enabled=O.enabled;this.sendToolListChanged()}};return this._registeredTools[_]=w,this.setToolRequestHandlers(),this.sendToolListChanged(),w}tool(_,...q){if(this._registeredTools[_])throw new Error(`Tool ${_} is already registered`);let f,K,$,P;if(typeof q[0]==="string")f=q.shift();if(q.length>1){let v=q[0];if(zv(v)){if(K=q.shift(),q.length>1&&typeof q[0]==="object"&&q[0]!==null&&!zv(q[0]))P=q.shift()}else if(typeof v==="object"&&v!==null)P=q.shift()}let j=q[0];return this._createRegisteredTool(_,void 0,f,K,$,P,void 0,j)}registerTool(_,q,f){if(this._registeredTools[_])throw new Error(`Tool ${_} is already registered`);let{title:K,description:$,inputSchema:P,outputSchema:j,annotations:v,_meta:w}=q;return this._createRegisteredTool(_,K,$,P,j,v,w,f)}prompt(_,...q){if(this._registeredPrompts[_])throw new Error(`Prompt ${_} is already registered`);let f;if(typeof q[0]==="string")f=q.shift();let K;if(q.length>1)K=q.shift();let $=q[0],P=this._createRegisteredPrompt(_,void 0,f,K,$);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),P}registerPrompt(_,q,f){if(this._registeredPrompts[_])throw new Error(`Prompt ${_} is already registered`);let{title:K,description:$,argsSchema:P}=q,j=this._createRegisteredPrompt(_,K,$,P,f);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),j}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(_,q){return this.server.sendLoggingMessage(_,q)}sendResourceListChanged(){if(this.isConnected())this.server.sendResourceListChanged()}sendToolListChanged(){if(this.isConnected())this.server.sendToolListChanged()}sendPromptListChanged(){if(this.isConnected())this.server.sendPromptListChanged()}}var nW={type:"object",properties:{}};function zv(_){if(typeof _!=="object"||_===null)return!1;return Object.keys(_).length===0||Object.values(_).some(RW)}function RW(_){return _!==null&&typeof _==="object"&&"parse"in _&&typeof _.parse==="function"&&"safeParse"in _&&typeof _.safeParse==="function"}function EW(_){return Object.entries(_.shape).map(([q,f])=>({name:q,description:f.description,required:!f.isOptional()}))}function Wv(_){return{completion:{values:_.slice(0,100),total:_.length,hasMore:_.length>100}}}var V$={completion:{values:[],hasMore:!1}};import hv from"process";class nP{append(_){this._buffer=this._buffer?Buffer.concat([this._buffer,_]):_}readMessage(){if(!this._buffer)return null;let _=this._buffer.indexOf(`
|
|
177
|
-
`);if(_===-1)return null;let q=this._buffer.toString("utf8",0,_).replace(/\r$/,"");return this._buffer=this._buffer.subarray(_+1),
|
|
178
|
-
`}class
|
|
179
|
-
Applied: ${T.applied} edit operation(s)`}]}}})},
|
|
176
|
+
]`;continue}if($+=K[w],K[w]==="\\")P=!0;else if(j&&K[w]==="]")j=!1;else if(!j&&K[w]==="[")j=!0}try{new RegExp($)}catch{return console.warn(`Could not convert regex pattern at ${q.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),_.source}return $}function b$(_,q){if(q.target==="openAi")console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");if(q.target==="openApi3"&&_.keyType?._def.typeName===i.ZodEnum)return{type:"object",required:_.keyType._def.values,properties:_.keyType._def.values.reduce((K,$)=>({...K,[$]:F(_.valueType._def,{...q,currentPath:[...q.currentPath,"properties",$]})??Gq(q)}),{}),additionalProperties:q.rejectedAdditionalProperties};let f={type:"object",additionalProperties:F(_.valueType._def,{...q,currentPath:[...q.currentPath,"additionalProperties"]})??q.allowedAdditionalProperties};if(q.target==="openApi3")return f;if(_.keyType?._def.typeName===i.ZodString&&_.keyType._def.checks?.length){let{type:K,...$}=r$(_.keyType._def,q);return{...f,propertyNames:$}}else if(_.keyType?._def.typeName===i.ZodEnum)return{...f,propertyNames:{enum:_.keyType._def.values}};else if(_.keyType?._def.typeName===i.ZodBranded&&_.keyType._def.type._def.typeName===i.ZodString&&_.keyType._def.type._def.checks?.length){let{type:K,...$}=m$(_.keyType._def,q);return{...f,propertyNames:$}}return f}function B9(_,q){if(q.mapStrategy==="record")return b$(_,q);let f=F(_.keyType._def,{...q,currentPath:[...q.currentPath,"items","items","0"]})||Gq(q),K=F(_.valueType._def,{...q,currentPath:[...q.currentPath,"items","items","1"]})||Gq(q);return{type:"array",maxItems:125,items:{type:"array",items:[f,K],minItems:2,maxItems:2}}}function U9(_){let q=_.values,K=Object.keys(_.values).filter((P)=>{return typeof q[q[P]]!=="number"}).map((P)=>q[P]),$=Array.from(new Set(K.map((P)=>typeof P)));return{type:$.length===1?$[0]==="string"?"string":"number":["string","number"],enum:K}}function F9(_){return _.target==="openAi"?void 0:{not:Gq({..._,currentPath:[..._.currentPath,"not"]})}}function Q9(_){return _.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var s6={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function _v(_,q){if(q.target==="openApi3")return qv(_,q);let f=_.options instanceof Map?Array.from(_.options.values()):_.options;if(f.every((K)=>(K._def.typeName in s6)&&(!K._def.checks||!K._def.checks.length))){let K=f.reduce(($,P)=>{let j=s6[P._def.typeName];return j&&!$.includes(j)?[...$,j]:$},[]);return{type:K.length>1?K:K[0]}}else if(f.every((K)=>K._def.typeName==="ZodLiteral"&&!K.description)){let K=f.reduce(($,P)=>{let j=typeof P._def.value;switch(j){case"string":case"number":case"boolean":return[...$,j];case"bigint":return[...$,"integer"];case"object":if(P._def.value===null)return[...$,"null"];case"symbol":case"undefined":case"function":default:return $}},[]);if(K.length===f.length){let $=K.filter((P,j,v)=>v.indexOf(P)===j);return{type:$.length>1?$:$[0],enum:f.reduce((P,j)=>{return P.includes(j._def.value)?P:[...P,j._def.value]},[])}}}else if(f.every((K)=>K._def.typeName==="ZodEnum"))return{type:"string",enum:f.reduce((K,$)=>[...K,...$._def.values.filter((P)=>!K.includes(P))],[])};return qv(_,q)}var qv=(_,q)=>{let f=(_.options instanceof Map?Array.from(_.options.values()):_.options).map((K,$)=>F(K._def,{...q,currentPath:[...q.currentPath,"anyOf",`${$}`]})).filter((K)=>!!K&&(!q.strictUnions||typeof K==="object"&&Object.keys(K).length>0));return f.length?{anyOf:f}:void 0};function fv(_,q){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(_.innerType._def.typeName)&&(!_.innerType._def.checks||!_.innerType._def.checks.length)){if(q.target==="openApi3")return{type:s6[_.innerType._def.typeName],nullable:!0};return{type:[s6[_.innerType._def.typeName],"null"]}}if(q.target==="openApi3"){let K=F(_.innerType._def,{...q,currentPath:[...q.currentPath]});if(K&&"$ref"in K)return{allOf:[K],nullable:!0};return K&&{...K,nullable:!0}}let f=F(_.innerType._def,{...q,currentPath:[...q.currentPath,"anyOf","0"]});return f&&{anyOf:[f,{type:"null"}]}}function $v(_,q){let f={type:"number"};if(!_.checks)return f;for(let K of _.checks)switch(K.kind){case"int":f.type="integer",NP(f,"type",K.message,q);break;case"min":if(q.target==="jsonSchema7")if(K.inclusive)jq(f,"minimum",K.value,K.message,q);else jq(f,"exclusiveMinimum",K.value,K.message,q);else{if(!K.inclusive)f.exclusiveMinimum=!0;jq(f,"minimum",K.value,K.message,q)}break;case"max":if(q.target==="jsonSchema7")if(K.inclusive)jq(f,"maximum",K.value,K.message,q);else jq(f,"exclusiveMaximum",K.value,K.message,q);else{if(!K.inclusive)f.exclusiveMaximum=!0;jq(f,"maximum",K.value,K.message,q)}break;case"multipleOf":jq(f,"multipleOf",K.value,K.message,q);break}return f}function Kv(_,q){let f=q.target==="openAi",K={type:"object",properties:{}},$=[],P=_.shape();for(let v in P){let w=P[v];if(w===void 0||w._def===void 0)continue;let O=pW(w);if(O&&f){if(w._def.typeName==="ZodOptional")w=w._def.innerType;if(!w.isNullable())w=w.nullable();O=!1}let T=F(w._def,{...q,currentPath:[...q.currentPath,"properties",v],propertyPath:[...q.currentPath,"properties",v]});if(T===void 0)continue;if(K.properties[v]=T,!O)$.push(v)}if($.length)K.required=$;let j=CW(_,q);if(j!==void 0)K.additionalProperties=j;return K}function CW(_,q){if(_.catchall._def.typeName!=="ZodNever")return F(_.catchall._def,{...q,currentPath:[...q.currentPath,"additionalProperties"]});switch(_.unknownKeys){case"passthrough":return q.allowedAdditionalProperties;case"strict":return q.rejectedAdditionalProperties;case"strip":return q.removeAdditionalStrategy==="strict"?q.allowedAdditionalProperties:q.rejectedAdditionalProperties}}function pW(_){try{return _.isOptional()}catch{return!0}}var Pv=(_,q)=>{if(q.currentPath.toString()===q.propertyPath?.toString())return F(_.innerType._def,q);let f=F(_.innerType._def,{...q,currentPath:[...q.currentPath,"anyOf","1"]});return f?{anyOf:[{not:Gq(q)},f]}:Gq(q)};var jv=(_,q)=>{if(q.pipeStrategy==="input")return F(_.in._def,q);else if(q.pipeStrategy==="output")return F(_.out._def,q);let f=F(_.in._def,{...q,currentPath:[...q.currentPath,"allOf","0"]}),K=F(_.out._def,{...q,currentPath:[...q.currentPath,"allOf",f?"1":"0"]});return{allOf:[f,K].filter(($)=>$!==void 0)}};function vv(_,q){return F(_.type._def,q)}function wv(_,q){let K={type:"array",uniqueItems:!0,items:F(_.valueType._def,{...q,currentPath:[...q.currentPath,"items"]})};if(_.minSize)jq(K,"minItems",_.minSize.value,_.minSize.message,q);if(_.maxSize)jq(K,"maxItems",_.maxSize.value,_.maxSize.message,q);return K}function Ov(_,q){if(_.rest)return{type:"array",minItems:_.items.length,items:_.items.map((f,K)=>F(f._def,{...q,currentPath:[...q.currentPath,"items",`${K}`]})).reduce((f,K)=>K===void 0?f:[...f,K],[]),additionalItems:F(_.rest._def,{...q,currentPath:[...q.currentPath,"additionalItems"]})};else return{type:"array",minItems:_.items.length,maxItems:_.items.length,items:_.items.map((f,K)=>F(f._def,{...q,currentPath:[...q.currentPath,"items",`${K}`]})).reduce((f,K)=>K===void 0?f:[...f,K],[])}}function Yv(_){return{not:Gq(_)}}function Tv(_){return Gq(_)}var zv=(_,q)=>{return F(_.innerType._def,q)};var Wv=(_,q,f)=>{switch(q){case i.ZodString:return r$(_,f);case i.ZodNumber:return $v(_,f);case i.ZodObject:return Kv(_,f);case i.ZodBigInt:return y9(_,f);case i.ZodBoolean:return i9();case i.ZodDate:return CP(_,f);case i.ZodUndefined:return Yv(f);case i.ZodNull:return Q9(f);case i.ZodArray:return D9(_,f);case i.ZodUnion:case i.ZodDiscriminatedUnion:return _v(_,f);case i.ZodIntersection:return e9(_,f);case i.ZodTuple:return Ov(_,f);case i.ZodRecord:return b$(_,f);case i.ZodLiteral:return x9(_,f);case i.ZodEnum:return t9(_);case i.ZodNativeEnum:return U9(_);case i.ZodNullable:return fv(_,f);case i.ZodOptional:return Pv(_,f);case i.ZodMap:return B9(_,f);case i.ZodSet:return wv(_,f);case i.ZodLazy:return()=>_.getter()._def;case i.ZodPromise:return vv(_,f);case i.ZodNaN:case i.ZodNever:return F9(f);case i.ZodEffects:return L9(_,f);case i.ZodAny:return Gq(f);case i.ZodUnknown:return Tv(f);case i.ZodDefault:return c9(_,f);case i.ZodBranded:return m$(_,f);case i.ZodReadonly:return zv(_,f);case i.ZodCatch:return o9(_,f);case i.ZodPipeline:return jv(_,f);case i.ZodFunction:case i.ZodVoid:case i.ZodSymbol:return;default:return((K)=>{return})(q)}};function F(_,q,f=!1){let K=q.seen.get(_);if(q.override){let v=q.override?.(_,q,K,f);if(v!==d9)return v}if(K&&!f){let v=lW(K,q);if(v!==void 0)return v}let $={def:_,path:q.currentPath,jsonSchema:void 0};q.seen.set(_,$);let P=Wv(_,_.typeName,q),j=typeof P==="function"?F(P(),q):P;if(j)nW(_,q,j);if(q.postProcess){let v=q.postProcess(j,_,q);return $.jsonSchema=j,v}return $.jsonSchema=j,j}var lW=(_,q)=>{switch(q.$refStrategy){case"root":return{$ref:_.path.join("/")};case"relative":return{$ref:G$(q.currentPath,_.path)};case"none":case"seen":{if(_.path.length<q.currentPath.length&&_.path.every((f,K)=>q.currentPath[K]===f))return console.warn(`Recursive reference detected at ${q.currentPath.join("/")}! Defaulting to any`),Gq(q);return q.$refStrategy==="seen"?Gq(q):void 0}}},nW=(_,q,f)=>{if(_.description){if(f.description=_.description,q.markdownDescription)f.markdownDescription=_.description}return f};var V$=(_,q)=>{let f=I9(q),K=typeof q==="object"&&q.definitions?Object.entries(q.definitions).reduce((w,[O,T])=>({...w,[O]:F(T._def,{...f,currentPath:[...f.basePath,f.definitionPath,O]},!0)??Gq(f)}),{}):void 0,$=typeof q==="string"?q:q?.nameStrategy==="title"?void 0:q?.name,P=F(_._def,$===void 0?f:{...f,currentPath:[...f.basePath,f.definitionPath,$]},!1)??Gq(f),j=typeof q==="object"&&q.name!==void 0&&q.nameStrategy==="title"?q.name:void 0;if(j!==void 0)P.title=j;if(f.flags.hasReferencedOpenAiAnyType){if(!K)K={};if(!K[f.openAiAnyTypeName])K[f.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:f.$refStrategy==="relative"?"1":[...f.basePath,f.definitionPath,f.openAiAnyTypeName].join("/")}}}let v=$===void 0?K?{...P,[f.definitionPath]:K}:P:{$ref:[...f.$refStrategy==="relative"?[]:f.basePath,f.definitionPath,$].join("/"),[f.definitionPath]:{...K,[$]:P}};if(f.target==="jsonSchema7")v.$schema="http://json-schema.org/draft-07/schema#";else if(f.target==="jsonSchema2019-09"||f.target==="openAi")v.$schema="https://json-schema.org/draft/2019-09/schema#";if(f.target==="openAi"&&(("anyOf"in v)||("oneOf"in v)||("allOf"in v)||("type"in v)&&Array.isArray(v.type)))console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");return v};var nP;(function(_){_.Completable="McpCompletable"})(nP||(nP={}));class B6 extends $q{_parse(_){let{ctx:q}=this._processInputParams(_),f=q.data;return this._def.type._parse({data:f,path:q.path,parent:q})}unwrap(){return this._def.type}}B6.create=(_,q)=>{return new B6({type:_,typeName:nP.Completable,complete:q.complete,...RW(q)})};function RW(_){if(!_)return{};let{errorMap:q,invalid_type_error:f,required_error:K,description:$}=_;if(q&&(f||K))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(q)return{errorMap:q,description:$};return{errorMap:(j,v)=>{var w,O;let{message:T}=_;if(j.code==="invalid_enum_value")return{message:T!==null&&T!==void 0?T:v.defaultError};if(typeof v.data==="undefined")return{message:(w=T!==null&&T!==void 0?T:K)!==null&&w!==void 0?w:v.defaultError};if(j.code!=="invalid_type")return{message:v.defaultError};return{message:(O=T!==null&&T!==void 0?T:f)!==null&&O!==void 0?O:v.defaultError}},description:$}}class RP{constructor(_,q){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new SP(_,q)}async connect(_){return await this.server.connect(_)}async close(){await this.server.close()}setToolRequestHandlers(){if(this._toolHandlersInitialized)return;this.server.assertCanSetRequestHandler(_$.shape.method.value),this.server.assertCanSetRequestHandler(f$.shape.method.value),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(_$,()=>({tools:Object.entries(this._registeredTools).filter(([,_])=>_.enabled).map(([_,q])=>{let f={name:_,title:q.title,description:q.description,inputSchema:q.inputSchema?V$(q.inputSchema,{strictUnions:!0}):EW,annotations:q.annotations,_meta:q._meta};if(q.outputSchema)f.outputSchema=V$(q.outputSchema,{strictUnions:!0});return f})})),this.server.setRequestHandler(f$,async(_,q)=>{let f=this._registeredTools[_.params.name];if(!f)throw new Xq(Zq.InvalidParams,`Tool ${_.params.name} not found`);if(!f.enabled)throw new Xq(Zq.InvalidParams,`Tool ${_.params.name} disabled`);let K;if(f.inputSchema){let $=await f.inputSchema.safeParseAsync(_.params.arguments);if(!$.success)throw new Xq(Zq.InvalidParams,`Invalid arguments for tool ${_.params.name}: ${$.error.message}`);let P=$.data,j=f.callback;try{K=await Promise.resolve(j(P,q))}catch(v){K={content:[{type:"text",text:v instanceof Error?v.message:String(v)}],isError:!0}}}else{let $=f.callback;try{K=await Promise.resolve($(q))}catch(P){K={content:[{type:"text",text:P instanceof Error?P.message:String(P)}],isError:!0}}}if(f.outputSchema&&!K.isError){if(!K.structuredContent)throw new Xq(Zq.InvalidParams,`Tool ${_.params.name} has an output schema but no structured content was provided`);let $=await f.outputSchema.safeParseAsync(K.structuredContent);if(!$.success)throw new Xq(Zq.InvalidParams,`Invalid structured content for tool ${_.params.name}: ${$.error.message}`)}return K}),this._toolHandlersInitialized=!0}setCompletionRequestHandler(){if(this._completionHandlerInitialized)return;this.server.assertCanSetRequestHandler($$.shape.method.value),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler($$,async(_)=>{switch(_.params.ref.type){case"ref/prompt":return this.handlePromptCompletion(_,_.params.ref);case"ref/resource":return this.handleResourceCompletion(_,_.params.ref);default:throw new Xq(Zq.InvalidParams,`Invalid completion reference: ${_.params.ref}`)}}),this._completionHandlerInitialized=!0}async handlePromptCompletion(_,q){let f=this._registeredPrompts[q.name];if(!f)throw new Xq(Zq.InvalidParams,`Prompt ${q.name} not found`);if(!f.enabled)throw new Xq(Zq.InvalidParams,`Prompt ${q.name} disabled`);if(!f.argsSchema)return M$;let K=f.argsSchema.shape[_.params.argument.name];if(!(K instanceof B6))return M$;let P=await K._def.complete(_.params.argument.value,_.params.context);return hv(P)}async handleResourceCompletion(_,q){let f=Object.values(this._registeredResourceTemplates).find((P)=>P.resourceTemplate.uriTemplate.toString()===q.uri);if(!f){if(this._registeredResources[q.uri])return M$;throw new Xq(Zq.InvalidParams,`Resource template ${_.params.ref.uri} not found`)}let K=f.resourceTemplate.completeCallback(_.params.argument.name);if(!K)return M$;let $=await K(_.params.argument.value,_.params.context);return hv($)}setResourceRequestHandlers(){if(this._resourceHandlersInitialized)return;this.server.assertCanSetRequestHandler(Bf.shape.method.value),this.server.assertCanSetRequestHandler(Uf.shape.method.value),this.server.assertCanSetRequestHandler(Ff.shape.method.value),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Bf,async(_,q)=>{let f=Object.entries(this._registeredResources).filter(([$,P])=>P.enabled).map(([$,P])=>({uri:$,name:P.name,...P.metadata})),K=[];for(let $ of Object.values(this._registeredResourceTemplates)){if(!$.resourceTemplate.listCallback)continue;let P=await $.resourceTemplate.listCallback(q);for(let j of P.resources)K.push({...$.metadata,...j})}return{resources:[...f,...K]}}),this.server.setRequestHandler(Uf,async()=>{return{resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([q,f])=>({name:q,uriTemplate:f.resourceTemplate.uriTemplate.toString(),...f.metadata}))}}),this.server.setRequestHandler(Ff,async(_,q)=>{let f=new URL(_.params.uri),K=this._registeredResources[f.toString()];if(K){if(!K.enabled)throw new Xq(Zq.InvalidParams,`Resource ${f} disabled`);return K.readCallback(f,q)}for(let $ of Object.values(this._registeredResourceTemplates)){let P=$.resourceTemplate.uriTemplate.match(f.toString());if(P)return $.readCallback(f,P,q)}throw new Xq(Zq.InvalidParams,`Resource ${f} not found`)}),this.setCompletionRequestHandler(),this._resourceHandlersInitialized=!0}setPromptRequestHandlers(){if(this._promptHandlersInitialized)return;this.server.assertCanSetRequestHandler(Qf.shape.method.value),this.server.assertCanSetRequestHandler(q$.shape.method.value),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(Qf,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,_])=>_.enabled).map(([_,q])=>{return{name:_,title:q.title,description:q.description,arguments:q.argsSchema?dW(q.argsSchema):void 0}})})),this.server.setRequestHandler(q$,async(_,q)=>{let f=this._registeredPrompts[_.params.name];if(!f)throw new Xq(Zq.InvalidParams,`Prompt ${_.params.name} not found`);if(!f.enabled)throw new Xq(Zq.InvalidParams,`Prompt ${_.params.name} disabled`);if(f.argsSchema){let K=await f.argsSchema.safeParseAsync(_.params.arguments);if(!K.success)throw new Xq(Zq.InvalidParams,`Invalid arguments for prompt ${_.params.name}: ${K.error.message}`);let $=K.data,P=f.callback;return await Promise.resolve(P($,q))}else{let K=f.callback;return await Promise.resolve(K(q))}}),this.setCompletionRequestHandler(),this._promptHandlersInitialized=!0}resource(_,q,...f){let K;if(typeof f[0]==="object")K=f.shift();let $=f[0];if(typeof q==="string"){if(this._registeredResources[q])throw new Error(`Resource ${q} is already registered`);let P=this._createRegisteredResource(_,void 0,q,K,$);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),P}else{if(this._registeredResourceTemplates[_])throw new Error(`Resource template ${_} is already registered`);let P=this._createRegisteredResourceTemplate(_,void 0,q,K,$);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),P}}registerResource(_,q,f,K){if(typeof q==="string"){if(this._registeredResources[q])throw new Error(`Resource ${q} is already registered`);let $=this._createRegisteredResource(_,f.title,q,f,K);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),$}else{if(this._registeredResourceTemplates[_])throw new Error(`Resource template ${_} is already registered`);let $=this._createRegisteredResourceTemplate(_,f.title,q,f,K);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),$}}_createRegisteredResource(_,q,f,K,$){let P={name:_,title:q,metadata:K,readCallback:$,enabled:!0,disable:()=>P.update({enabled:!1}),enable:()=>P.update({enabled:!0}),remove:()=>P.update({uri:null}),update:(j)=>{if(typeof j.uri!=="undefined"&&j.uri!==f){if(delete this._registeredResources[f],j.uri)this._registeredResources[j.uri]=P}if(typeof j.name!=="undefined")P.name=j.name;if(typeof j.title!=="undefined")P.title=j.title;if(typeof j.metadata!=="undefined")P.metadata=j.metadata;if(typeof j.callback!=="undefined")P.readCallback=j.callback;if(typeof j.enabled!=="undefined")P.enabled=j.enabled;this.sendResourceListChanged()}};return this._registeredResources[f]=P,P}_createRegisteredResourceTemplate(_,q,f,K,$){let P={resourceTemplate:f,title:q,metadata:K,readCallback:$,enabled:!0,disable:()=>P.update({enabled:!1}),enable:()=>P.update({enabled:!0}),remove:()=>P.update({name:null}),update:(j)=>{if(typeof j.name!=="undefined"&&j.name!==_){if(delete this._registeredResourceTemplates[_],j.name)this._registeredResourceTemplates[j.name]=P}if(typeof j.title!=="undefined")P.title=j.title;if(typeof j.template!=="undefined")P.resourceTemplate=j.template;if(typeof j.metadata!=="undefined")P.metadata=j.metadata;if(typeof j.callback!=="undefined")P.readCallback=j.callback;if(typeof j.enabled!=="undefined")P.enabled=j.enabled;this.sendResourceListChanged()}};return this._registeredResourceTemplates[_]=P,P}_createRegisteredPrompt(_,q,f,K,$){let P={title:q,description:f,argsSchema:K===void 0?void 0:W.object(K),callback:$,enabled:!0,disable:()=>P.update({enabled:!1}),enable:()=>P.update({enabled:!0}),remove:()=>P.update({name:null}),update:(j)=>{if(typeof j.name!=="undefined"&&j.name!==_){if(delete this._registeredPrompts[_],j.name)this._registeredPrompts[j.name]=P}if(typeof j.title!=="undefined")P.title=j.title;if(typeof j.description!=="undefined")P.description=j.description;if(typeof j.argsSchema!=="undefined")P.argsSchema=W.object(j.argsSchema);if(typeof j.callback!=="undefined")P.callback=j.callback;if(typeof j.enabled!=="undefined")P.enabled=j.enabled;this.sendPromptListChanged()}};return this._registeredPrompts[_]=P,P}_createRegisteredTool(_,q,f,K,$,P,j,v){let w={title:q,description:f,inputSchema:K===void 0?void 0:W.object(K),outputSchema:$===void 0?void 0:W.object($),annotations:P,_meta:j,callback:v,enabled:!0,disable:()=>w.update({enabled:!1}),enable:()=>w.update({enabled:!0}),remove:()=>w.update({name:null}),update:(O)=>{if(typeof O.name!=="undefined"&&O.name!==_){if(delete this._registeredTools[_],O.name)this._registeredTools[O.name]=w}if(typeof O.title!=="undefined")w.title=O.title;if(typeof O.description!=="undefined")w.description=O.description;if(typeof O.paramsSchema!=="undefined")w.inputSchema=W.object(O.paramsSchema);if(typeof O.callback!=="undefined")w.callback=O.callback;if(typeof O.annotations!=="undefined")w.annotations=O.annotations;if(typeof O._meta!=="undefined")w._meta=O._meta;if(typeof O.enabled!=="undefined")w.enabled=O.enabled;this.sendToolListChanged()}};return this._registeredTools[_]=w,this.setToolRequestHandlers(),this.sendToolListChanged(),w}tool(_,...q){if(this._registeredTools[_])throw new Error(`Tool ${_} is already registered`);let f,K,$,P;if(typeof q[0]==="string")f=q.shift();if(q.length>1){let v=q[0];if(Hv(v)){if(K=q.shift(),q.length>1&&typeof q[0]==="object"&&q[0]!==null&&!Hv(q[0]))P=q.shift()}else if(typeof v==="object"&&v!==null)P=q.shift()}let j=q[0];return this._createRegisteredTool(_,void 0,f,K,$,P,void 0,j)}registerTool(_,q,f){if(this._registeredTools[_])throw new Error(`Tool ${_} is already registered`);let{title:K,description:$,inputSchema:P,outputSchema:j,annotations:v,_meta:w}=q;return this._createRegisteredTool(_,K,$,P,j,v,w,f)}prompt(_,...q){if(this._registeredPrompts[_])throw new Error(`Prompt ${_} is already registered`);let f;if(typeof q[0]==="string")f=q.shift();let K;if(q.length>1)K=q.shift();let $=q[0],P=this._createRegisteredPrompt(_,void 0,f,K,$);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),P}registerPrompt(_,q,f){if(this._registeredPrompts[_])throw new Error(`Prompt ${_} is already registered`);let{title:K,description:$,argsSchema:P}=q,j=this._createRegisteredPrompt(_,K,$,P,f);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),j}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(_,q){return this.server.sendLoggingMessage(_,q)}sendResourceListChanged(){if(this.isConnected())this.server.sendResourceListChanged()}sendToolListChanged(){if(this.isConnected())this.server.sendToolListChanged()}sendPromptListChanged(){if(this.isConnected())this.server.sendPromptListChanged()}}var EW={type:"object",properties:{}};function Hv(_){if(typeof _!=="object"||_===null)return!1;return Object.keys(_).length===0||Object.values(_).some(gW)}function gW(_){return _!==null&&typeof _==="object"&&"parse"in _&&typeof _.parse==="function"&&"safeParse"in _&&typeof _.safeParse==="function"}function dW(_){return Object.entries(_.shape).map(([q,f])=>({name:q,description:f.description,required:!f.isOptional()}))}function hv(_){return{completion:{values:_.slice(0,100),total:_.length,hasMore:_.length>100}}}var M$={completion:{values:[],hasMore:!1}};import kv from"process";class EP{append(_){this._buffer=this._buffer?Buffer.concat([this._buffer,_]):_}readMessage(){if(!this._buffer)return null;let _=this._buffer.indexOf(`
|
|
177
|
+
`);if(_===-1)return null;let q=this._buffer.toString("utf8",0,_).replace(/\r$/,"");return this._buffer=this._buffer.subarray(_+1),aW(q)}clear(){this._buffer=void 0}}function aW(_){return b7.parse(JSON.parse(_))}function Jv(_){return JSON.stringify(_)+`
|
|
178
|
+
`}class gP{constructor(_=kv.stdin,q=kv.stdout){this._stdin=_,this._stdout=q,this._readBuffer=new EP,this._started=!1,this._ondata=(f)=>{this._readBuffer.append(f),this.processReadBuffer()},this._onerror=(f)=>{var K;(K=this.onerror)===null||K===void 0||K.call(this,f)}}async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){var _,q;while(!0)try{let f=this._readBuffer.readMessage();if(f===null)break;(_=this.onmessage)===null||_===void 0||_.call(this,f)}catch(f){(q=this.onerror)===null||q===void 0||q.call(this,f)}}async close(){var _;if(this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0)this._stdin.pause();this._readBuffer.clear(),(_=this.onclose)===null||_===void 0||_.call(this)}send(_){return new Promise((q)=>{let f=Jv(_);if(this._stdout.write(f))q();else this._stdout.once("drain",q)})}}var dP={name:"@kelceyp/swic",version:"0.2.12",description:"Story Workflow Inject Context - MCP server for managing stories, subtasks, and pipelines",type:"module",main:"dist/server/Server.js",bin:{"swic-mcp":"./bin/swic-mcp.js",swic:"./dist/cli/cli.js"},files:["dist/","README.md","LICENSE"],scripts:{"build-server":"bun run scripts/server/build-dist.ts","build-cli":"bun run scripts/cli/build-dist.ts",build:"bun run scripts/build-all.ts",prepublishOnly:"bun run build","test:e2e":"bash tests/e2e/run-e2e-tests.sh","test:e2e:build":"bash tests/e2e/build-test-image.sh","test:e2e:rebuild":"bash tests/e2e/build-test-image.sh && bash tests/e2e/run-e2e-tests.sh",lint:"eslint src scripts archive --ext .ts","lint:fix":"eslint src scripts archive --ext .ts --fix"},dependencies:{"@kelceyp/clibuilder":"^0.2.1","@modelcontextprotocol/sdk":"^1.0.0","@types/handlebars":"^4.0.40","@types/yaml":"^1.9.6",debug:"^4.4.3",handlebars:"^4.7.8",yaml:"^2.8.1"},devDependencies:{"@kelceyp/swic":"^0.2.12","@types/bun":"latest","@types/debug":"^4.1.12","@types/node":"^20.0.0","@typescript-eslint/eslint-plugin":"^8.46.2","@typescript-eslint/parser":"^8.46.2",esbuild:"^0.25.11",eslint:"8",typescript:"^5.0.0"},engines:{bun:">=1.0.0"},repository:{type:"git",url:"https://github.com/kelceyp/swic.git"},author:"Paul Kelcey",license:"MIT",keywords:["mcp","model-context-protocol","workflow","story-management","pipeline-orchestration","development-workflow","sdlc"]};var DW=(_)=>{let q={name:"doc_create",description:"Create a new doc with content. Returns the created doc ID.",inputSchema:{scope:W.enum(["project","shared"]).describe("Scope for the doc (project or shared)"),path:W.string().describe('Path for the doc (e.g., "auth/jwt-setup.md")'),content:W.string().describe("Content of the doc")}};return Object.freeze({definition:q,handler:async(K)=>{let{scope:$,path:P,content:j}=K,v=await _.DocService.create({address:{kind:"path",scope:$,path:P},content:j});return{content:[{type:"text",text:`Created doc: ${v.id} at ${v.path}`}]}}})},yW=Object.freeze({create:DW}),Zv=yW;var S$=(_)=>{let q;if(typeof _==="string")q=[_];else if(Array.isArray(_)){if(_.length===0)throw new Error("identifier array cannot be empty");q=_}else throw new Error("identifier must be a string or array of strings");for(let $ of q)if(typeof $!=="string"||$.trim().length===0)throw new Error("All identifiers must be non-empty strings");let f=q.map(($)=>$.trim()),K=[...new Set(f)];if(K.length===0)throw new Error("No valid identifiers provided");return K};O6();var eW=(_)=>{let q={name:"doc_delete",description:"Delete one or more docs. Idempotent - does not error if doc already deleted. Supports bulk operations by passing an array of identifiers.",inputSchema:{identifier:W.union([W.string().describe('Single doc ID (e.g., "doc001") or path (e.g., "auth/jwt-setup.md")'),W.array(W.string()).describe("Array of doc IDs or paths for bulk delete")]).describe("doc identifier(s) - ID or path, single or array"),scope:W.enum(["project","shared"]).optional().describe("Optional scope. Auto-resolves if omitted (checks project first, then shared, or infers from ID prefix)")}};return Object.freeze({definition:q,handler:async(K)=>{let{identifier:$,scope:P}=K,j=S$($),v=await Promise.all(j.map(async(z)=>{let k=sq.isdocId(z)?{kind:"id",scope:P,id:z}:{kind:"path",scope:P,path:z},J=await _.DocService.read(k);return{identifier:z,address:k,doc:J}})),w=[];for(let z of v){let H=await _.DocService.deleteLatest(z.address);w.push({id:z.doc.id,deleted:H.deleted})}let O=w.filter((z)=>z.deleted),T=w.length-O.length,Y={deleted:O.map((z)=>z.id),alreadyDeleted:w.filter((z)=>!z.deleted).map((z)=>z.id),message:`Deleted ${O.length} doc${O.length!==1?"s":""}`+(T>0?`, ${T} ${T!==1?"were":"was"} already deleted`:"")};return{content:[{type:"text",text:JSON.stringify(Y,null,2)}]}}})},xW=Object.freeze({create:eW}),Av=xW;O6();var sW=(_)=>{let q={name:"doc_edit",description:"Edit doc content using text replacement operations. Uses last-write-wins semantics.",inputSchema:{identifier:W.string().describe('doc ID (e.g., "doc001") or path (e.g., "auth/jwt-setup.md")'),scope:W.enum(["project","shared"]).optional().describe("Optional scope. Auto-resolves if omitted (checks project first, then shared, or infers from ID prefix)"),operation:W.discriminatedUnion("type",[W.object({type:W.literal("replaceOnce"),oldText:W.string(),newText:W.string()}),W.object({type:W.literal("replaceAll"),oldText:W.string(),newText:W.string()}),W.object({type:W.literal("replaceRegex"),pattern:W.string(),flags:W.string().optional(),replacement:W.string()}),W.object({type:W.literal("replaceAllContent"),content:W.string()})]).describe("Edit operation to perform")}};return Object.freeze({definition:q,handler:async(K)=>{let{identifier:$,scope:P,operation:j}=K,v;switch(j.type){case"replaceOnce":v={op:"replaceOnce",oldText:j.oldText,newText:j.newText};break;case"replaceAll":v={op:"replaceAll",oldText:j.oldText,newText:j.newText};break;case"replaceRegex":v={op:"replaceRegex",pattern:j.pattern,flags:j.flags||"",replacement:j.replacement};break;case"replaceAllContent":v={op:"replaceAllContent",content:j.content};break;default:throw new Error(`Unknown operation type: ${j.type}`)}let O=sq.isdocId($)?{kind:"id",scope:P,id:$}:{kind:"path",scope:P,path:$},T=await _.DocService.editLatest(O,[v]);return{content:[{type:"text",text:`Edited doc: ${$}
|
|
179
|
+
Applied: ${T.applied} edit operation(s)`}]}}})},BW=Object.freeze({create:sW}),uv=BW;var UW=(_)=>{let q={name:"doc_list",description:"List docs with optional filtering. Returns structured JSON with doc metadata. When no scope specified, lists from both scopes with override detection.",inputSchema:{scope:W.enum(["project","shared"]).optional().describe("Optional scope filter. If omitted, lists from both scopes and detects overrides (project docs that shadow shared ones)"),pathPrefix:W.string().optional().describe('Optional path prefix filter (e.g., "auth/" to list only docs in auth namespace)'),includeContent:W.boolean().optional().default(!1).describe("Include synopsis from front matter in results")}};return Object.freeze({definition:q,handler:async(K)=>{let{scope:$,pathPrefix:P,includeContent:j}=K,v=await _.DocService.list({scope:$,pathPrefix:P,includeContent:j===!0}),w;if(!$){let T=v.filter((k)=>k.id.startsWith("doc")),Y=v.filter((k)=>k.id.startsWith("sdoc")),z=new Set(T.map((k)=>k.path)),H=new Set(Y.map((k)=>k.path));w=v.map((k)=>{let J=k.id.startsWith("doc"),h;if(J&&H.has(k.path))h="overrides";else if(!J&&z.has(k.path))h="overridden";return{id:k.id,path:k.path,scope:J?"project":"shared",override:h,synopsis:k.synopsis,modifiedAt:k.modifiedAt}})}else w=v.map((T)=>({id:T.id,path:T.path,scope:T.id.startsWith("doc")?"project":"shared",synopsis:T.synopsis,modifiedAt:T.modifiedAt}));w.sort((T,Y)=>T.path.localeCompare(Y.path));let O={docs:w,count:w.length};return{content:[{type:"text",text:JSON.stringify(O,null,2)}]}}})},FW=Object.freeze({create:UW}),Gv=FW;O6();var QW=(_)=>{let q={name:"doc_move",description:"Move or rename a doc to a new path. Generates a new ID. Supports cross-scope moves.",inputSchema:{source:W.string().describe('Source doc ID (e.g., "doc001") or path (e.g., "auth/jwt-setup.md")'),destination:W.string().describe("Destination path (not ID) for the doc"),sourceScope:W.enum(["project","shared"]).optional().describe("Optional. Source scope. Auto-resolves if omitted."),destinationScope:W.enum(["project","shared"]).optional().describe("Optional. Destination scope. Defaults to source scope if omitted.")}};return Object.freeze({definition:q,handler:async(K)=>{let{source:$,destination:P,sourceScope:j,destinationScope:v}=K,O=sq.isdocId($)?{kind:"id",scope:j,id:$}:{kind:"path",scope:j,path:$},T=await _.DocService.read(O),Y=T.id.startsWith("sdoc")?"shared":"project",z=v||Y,H=Y!==z;if(T.path===P&&Y===z)throw new Error("Source and destination are identical");try{throw await _.DocService.read({kind:"path",scope:z,path:P}),new Error(`Destination already exists: ${z} ${P}`)}catch(h){if(!(h.message.includes("No doc")||h.message.includes("not found")||h.message.includes("File or directory")))throw h}let k=await _.DocService.create({address:{kind:"path",path:P,scope:z},content:T.content});await _.DocService.deleteLatest(O,T.hash);let J={oldId:T.id,newId:k.id,oldPath:T.path,newPath:P,oldScope:Y,newScope:z,message:H?`Moved doc across scopes from ${Y} ${T.path} (${T.id}) to ${z} ${P} (new ID: ${k.id})`:`Moved doc from ${T.path} (${T.id}) to ${P} (new ID: ${k.id})`};return{content:[{type:"text",text:JSON.stringify(J,null,2)}]}}})},qH=Object.freeze({create:QW}),mv=qH;O6();var _H=(_)=>{let q={name:"doc_read",description:"Read one or more docs by ID or path. Returns content with optional metadata. Supports bulk operations by passing an array of identifiers.",inputSchema:{identifier:W.union([W.string().describe('Single doc ID (e.g., "doc001") or path (e.g., "auth/jwt-setup.md")'),W.array(W.string()).describe("Array of doc IDs or paths for bulk read")]).describe("doc identifier(s) - ID or path, single or array"),scope:W.enum(["project","shared"]).optional().describe("Optional scope. If omitted, auto-resolves (checks project first, then shared, or infers from ID prefix)"),includeMetadata:W.boolean().optional().default(!1).describe("Include ID and path metadata header for each doc")}};return Object.freeze({definition:q,handler:async(K)=>{let{identifier:$,scope:P,includeMetadata:j}=K,v=S$($),w=await Promise.all(v.map(async(Y)=>{let z=sq.isdocId(Y);return await _.DocService.read(z?{kind:"id",scope:P,id:Y}:{kind:"path",scope:P,path:Y})})),O=[];for(let Y=0;Y<w.length;Y++){let z=w[Y];if(j)O.push(`ID: ${z.id}`),O.push(`Path: ${z.path}`),O.push("---");let H=z.content;if(!H.endsWith(`
|
|
180
180
|
`))H+=`
|
|
181
181
|
`;if(O.push(H),Y<w.length-1)O.push("")}return{content:[{type:"text",text:O.join(`
|
|
182
|
-
`)}]}}})},
|
|
183
|
-
Applied: ${T.applied} edit operation(s)`}]}}})},
|
|
182
|
+
`)}]}}})},fH=Object.freeze({create:_H}),rv=fH;var $H=(_)=>{let q={name:"template_create",description:"Create a new template with content. Returns the created template ID.",inputSchema:{scope:W.enum(["project","shared"]).describe("Scope for the template (project or shared)"),path:W.string().describe('Path for the template (e.g., "prompts/story-init.md")'),content:W.string().describe("Content of the template including front matter")}};return Object.freeze({definition:q,handler:async(K)=>{let{scope:$,path:P,content:j}=K,v=await _.TemplateService.create({address:{kind:"path",scope:$,path:P},content:j});return{content:[{type:"text",text:`Created template: ${v.id} at ${v.path}`}]}}})},KH=Object.freeze({create:$H}),bv=KH;var PH=(_)=>{let q={name:"template_delete",description:"Delete one or more templates. Idempotent - does not error if template already deleted. Supports bulk operations by passing an array of identifiers.",inputSchema:{identifier:W.union([W.string(),W.array(W.string())]).describe('Template ID (e.g., "tpl001") or path (e.g., "prompts/story-init.md"), single or array'),scope:W.enum(["project","shared"]).optional().describe("Optional scope. Auto-resolves if omitted (checks project first, then shared, or infers from ID prefix)")}};return Object.freeze({definition:q,handler:async(K)=>{let{identifier:$,scope:P}=K,j=Array.isArray($)?$:[$],w=[...new Set(j)].map((z)=>{if(/^(tpl|stpl)\d{3,}$/.test(z))return{kind:"id",id:z,scope:P};else return{kind:"path",path:z,scope:P}}),O=w.length===1?[await _.TemplateService.delete(w[0])]:await _.TemplateService.deleteMany(w),T=O.filter((z)=>z.deleted).length,Y=O.length-T;return{content:[{type:"text",text:JSON.stringify({deleted:T,alreadyDeleted:Y,total:O.length},null,2)}]}}})},jH=Object.freeze({create:PH}),Vv=jH;var vH=(_)=>{let q={name:"template_edit",description:"Edit template content using text replacement operations. Uses last-write-wins semantics.",inputSchema:{identifier:W.string().describe('Template ID (e.g., "tpl001") or path (e.g., "prompts/story-init.md")'),scope:W.enum(["project","shared"]).optional().describe("Optional scope. Auto-resolves if omitted"),operation:W.union([W.object({type:W.literal("replaceOnce"),oldText:W.string(),newText:W.string()}),W.object({type:W.literal("replaceAll"),oldText:W.string(),newText:W.string()}),W.object({type:W.literal("replaceRegex"),pattern:W.string(),replacement:W.string(),flags:W.string().optional()}),W.object({type:W.literal("replaceAllContent"),content:W.string()})]).describe("Edit operation to perform")}};return Object.freeze({definition:q,handler:async(K)=>{let{identifier:$,scope:P,operation:j}=K,w=/^(tpl|stpl)\d{3,}$/.test($)?{kind:"id",id:$,scope:P}:{kind:"path",path:$,scope:P},O;if(j.type==="replaceOnce")O={op:"replaceOnce",oldText:j.oldText,newText:j.newText};else if(j.type==="replaceAll")O={op:"replaceAll",oldText:j.oldText,newText:j.newText};else if(j.type==="replaceRegex")O={op:"replaceRegex",pattern:j.pattern,replacement:j.replacement,flags:j.flags};else O={op:"replaceAllContent",content:j.content};let T=await _.TemplateService.edit(w,[O]);return{content:[{type:"text",text:`Edited template: ${$}
|
|
183
|
+
Applied: ${T.applied} edit operation(s)`}]}}})},wH=Object.freeze({create:vH}),Mv=wH;var OH=(_)=>{let q={name:"template_list",description:"List templates with optional filtering. Returns structured JSON with template metadata.",inputSchema:{scope:W.enum(["project","shared"]).optional().describe("Optional scope filter. If omitted, lists from both scopes and detects overrides (project templates that shadow shared ones)"),pathPrefix:W.string().optional().describe('Optional path prefix filter (e.g., "prompts/" to list only templates in prompts namespace)'),includeContent:W.boolean().optional().default(!1).describe("Include synopsis from front matter in results")}};return Object.freeze({definition:q,handler:async(K)=>{let{scope:$,pathPrefix:P,includeContent:j}=K,v=await _.TemplateService.list({scope:$,pathPrefix:P,includeContent:j});return{content:[{type:"text",text:JSON.stringify({templates:v.map((w)=>({id:w.id,path:w.path,scope:w.scope,isValid:w.isValid,synopsis:w.synopsis,override:w.override})),count:v.length},null,2)}]}}})},YH=Object.freeze({create:OH}),Sv=YH;var TH=(_)=>{let q={name:"template_move",description:"Move or rename a template to a new path. Generates a new ID. Supports cross-scope moves.",inputSchema:{source:W.string().describe('Source template ID (e.g., "tpl001") or path (e.g., "prompts/story-init.md")'),destination:W.string().describe("Destination path (not ID) for the template"),sourceScope:W.enum(["project","shared"]).optional().describe("Optional. Source scope. Auto-resolves if omitted."),destinationScope:W.enum(["project","shared"]).optional().describe("Optional. Destination scope. Defaults to source scope if omitted.")}};return Object.freeze({definition:q,handler:async(K)=>{let{source:$,destination:P,sourceScope:j,destinationScope:v}=K,O=/^(tpl|stpl)\d{3,}$/.test($)?{kind:"id",id:$,scope:j}:{kind:"path",path:$,scope:j},T=await _.TemplateService.move(O,P,v);return{content:[{type:"text",text:JSON.stringify({oldId:T.oldId,newId:T.newId,oldPath:T.oldPath,newPath:T.newPath,sourceScope:T.sourceScope,destinationScope:T.destinationScope,message:`Moved template: ${T.oldId} \u2192 ${T.newId}`},null,2)}]}}})},zH=Object.freeze({create:TH}),Nv=zH;var WH=(_)=>{let q={name:"template_read",description:"Read one or more templates by ID or path. Supports bulk operations by passing an array of identifiers.",inputSchema:{identifier:W.union([W.string(),W.array(W.string())]).describe('Single template ID (e.g., "tpl001") or path (e.g., "prompts/story-init.md"), or array for bulk read'),scope:W.enum(["project","shared"]).optional().describe("Optional scope. If omitted, auto-resolves (checks project first, then shared, or infers from ID prefix)"),includeMetadata:W.boolean().optional().default(!1).describe("Include ID and path metadata header for each template")}};return Object.freeze({definition:q,handler:async(K)=>{let{identifier:$,scope:P,includeMetadata:j}=K,v=Array.isArray($)?$:[$],O=[...new Set(v)].map((z)=>{if(/^(tpl|stpl)\d{3,}$/.test(z))return{kind:"id",id:z,scope:P};else return{kind:"path",path:z,scope:P}}),T=O.length===1?[await _.TemplateService.read(O[0])]:await _.TemplateService.readMany(O,j),Y="";for(let z=0;z<T.length;z++){let H=T[z];if(j)Y+=`ID: ${H.id}
|
|
184
184
|
`,Y+=`Path: ${H.path}
|
|
185
185
|
`,Y+=`Valid: ${H.isValid}
|
|
186
186
|
`,Y+=`---
|
|
187
187
|
`;if(Y+=H.content,!H.content.endsWith(`
|
|
188
188
|
`))Y+=`
|
|
189
189
|
`;if(z<T.length-1)Y+=`
|
|
190
|
-
`}return{content:[{type:"text",text:Y}]}}})},
|
|
190
|
+
`}return{content:[{type:"text",text:Y}]}}})},HH=Object.freeze({create:WH}),Cv=HH;var hH=(_)=>{let q={name:"template_render",description:"Render a template with provided parameters. Validates required parameters before rendering.",inputSchema:{identifier:W.string().describe('Template ID (e.g., "tpl001") or path (e.g., "prompts/story-init.md")'),scope:W.enum(["project","shared"]).optional().describe("Optional scope. Auto-resolves if omitted"),params:W.record(W.union([W.string(),W.number(),W.boolean()])).describe("Parameter values as key-value pairs")}};return Object.freeze({definition:q,handler:async(K)=>{let{identifier:$,scope:P,params:j}=K,w=/^(tpl|stpl)\d{3,}$/.test($)?{kind:"id",id:$,scope:P}:{kind:"path",path:$,scope:P};return{content:[{type:"text",text:await _.TemplateService.render(w,j||{})}]}}})},JH=Object.freeze({create:hH}),pv=JH;var kH=(_)=>{let q={name:"template_get_parameters",description:"Get parameter definitions for a template. Extracts parameter metadata from front matter.",inputSchema:{identifier:W.string().describe('Template ID (e.g., "tpl001") or path (e.g., "prompts/story-init.md")'),scope:W.enum(["project","shared"]).optional().describe("Optional scope. Auto-resolves if omitted")}};return Object.freeze({definition:q,handler:async(K)=>{let{identifier:$,scope:P}=K,v=/^(tpl|stpl)\d{3,}$/.test($)?{kind:"id",id:$,scope:P}:{kind:"path",path:$,scope:P},w=await _.TemplateService.getParameters(v);return{content:[{type:"text",text:JSON.stringify({parameters:w},null,2)}]}}})},ZH=Object.freeze({create:kH}),lv=ZH;var nv=[Zv.create,Av.create,uv.create,Gv.create,mv.create,rv.create,bv.create,Vv.create,Mv.create,Sv.create,Nv.create,Cv.create,pv.create,lv.create];import{fileURLToPath as cN}from"url";import{realpathSync as mO}from"fs";var rO=(_)=>{let{services:q}=_,f=dP.name,K=dP.version,$=new RP({name:f,version:K});return Object.freeze({start:async()=>{for(let v of nv){let w=v(q);$.registerTool(w.definition.name,{description:w.definition.description,inputSchema:w.definition.inputSchema},async(O)=>w.handler(O))}let j=new gP;await $.connect(j),console.error(`${f} v${K} running on stdio`)}})},iN=async()=>{let{default:_}=await Promise.resolve().then(() => (GO(),uO)),{projectDataDir:q,sharedDataDir:f}=_.lazilyGetDataDirs(),K=_.createServices({projectBoundaryDir:q,sharedBoundaryDir:f});await rO({services:K}).start()},oN=Object.freeze({create:rO}),LN=import.meta.main??(()=>{try{let _=mO(cN(import.meta.url)),q=mO(process.argv[1]);return _===q}catch{return!1}})();if(LN)iN().catch(console.error);var H0=oN;export{H0 as default};
|