@f2c/mcp 0.4.0 → 0.4.1

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.
@@ -279,7 +279,7 @@ data: ${JSON.stringify(i)}
279
279
  * Copyright(c) 2013 Roman Shtylman
280
280
  * Copyright(c) 2014-2015 Douglas Christopher Wilson
281
281
  * MIT Licensed
282
- */gm.exports=Zm()});var Tm={};a0(Tm,{stopHttpServer:()=>$h,startHttpServer:()=>Hh});async function Hh(i,a){let n=hx.default();n.use((c,l,x)=>{let u=c.headers.personaltoken;if(u&&u.trim()!==""&&u!==Zi.personalToken)mi.debug("Updating Figma personal token from request headers",u,Zi.personalToken),Zi.personalToken=u;x()}),n.use("/mcp",hx.default.json()),n.post("/mcp",async(c,l)=>{mi.debug("Received StreamableHTTP request",JSON.stringify(c.headers),JSON.stringify(c.body)),l.setHeader("Content-Type","application/json");let x=c.headers["mcp-session-id"],u;if(x&&Jn.streamable[x])mi.debug("Reusing existing StreamableHTTP transport for sessionId",x),u=Jn.streamable[x];else if(!x&&m1(c.body))mi.debug("New initialization request for StreamableHTTP sessionId",x),u=new zv({sessionIdGenerator:()=>Sm.randomUUID(),onsessioninitialized:(W)=>{Jn.streamable[W]=u}}),u.onclose=()=>{if(u.sessionId)delete Jn.streamable[u.sessionId]},await a.connect(u);else{mi.error("Invalid request:",c.body),l.status(400).json({jsonrpc:"2.0",error:{code:-32000,message:"Bad Request: No valid session ID provided"},id:null});return}let f=null,w=c.body.params?._meta?.progressToken,m=0;if(w)mi.info(`Setting up progress notifications for token ${w} on session ${x}`),f=setInterval(async()=>{mi.info("Sending progress notification",m),await a.server.notification({method:"notifications/progress",params:{progress:m,progressToken:w}}),m++},1000);if(mi.debug("Handling StreamableHTTP request"),await u.handleRequest(c,l,c.body),f)clearInterval(f);mi.debug("StreamableHTTP request handled")});let v=async(c,l)=>{let x=c.headers["mcp-session-id"];if(!x||!Jn.streamable[x]){l.status(400).send("Invalid or missing session ID");return}mi.info(`Received session termination request for session ${x}`);try{await Jn.streamable[x].handleRequest(c,l)}catch(u){if(mi.error("Error handling session termination:",u),!l.headersSent)l.status(500).send("Error processing session termination")}};n.get("/mcp",v),n.delete("/mcp",v),n.get("/sse",async(c,l)=>{mi.debug("Received SSE request",JSON.stringify(c.headers),JSON.stringify(c.body));let x=new f6("/messages",l);Jn.sse[x.sessionId]=x,l.on("close",()=>{delete Jn.sse[x.sessionId]}),await a.connect(x)}),n.post("/messages",async(c,l)=>{let x=c.query.sessionId,u=Jn.sse[x];if(u)await u.handlePostMessage(c,l);else{l.status(400).send(`No transport found for sessionId ${x}`);return}}),ap=n.listen(i,()=>{mi.info(`SSE endpoint available at http://localhost:${i}/sse`),mi.info(`Message endpoint available at http://localhost:${i}/messages`),mi.info(`StreamableHTTP endpoint available at http://localhost:${i}/mcp`)}),process.on("SIGINT",async()=>{mi.debug("Shutting down server..."),await Im(Jn.sse),await Im(Jn.streamable),mi.debug("Server shutdown complete"),process.exit(0)})}async function Im(i){for(let a in i)try{await i[a]?.close(),delete i[a]}catch(n){mi.error(`Error closing transport for session ${a}:`,n)}}async function $h(){if(!ap)throw new Error("HTTP server is not running");return new Promise((i,a)=>{ap.close((n)=>{if(n){a(n);return}ap=null;let v=Object.values(Jn.sse).map((c)=>{return c.close()});Promise.all(v).then(()=>{i()})})})}var Sm,hx,mi,ap=null,Jn;var km=qa(()=>{Sm=require("node:crypto");i0();En();J5();z4();Dc();hx=ii(e4()),mi=xi("HttpServer",1),Jn={streamable:{},sse:{}}});var ym={};a0(ym,{startServer:()=>Bh});var sm,Lx,Cm,I0,Bh=(i,a=3000)=>{let n={};I0.post("/mcp",async(c,l)=>{l.setHeader("Content-Type","application/json");let x=c.headers["mcp-session-id"],u;if(x&&n[x])u=n[x];else if(!x&&m1(c.body))u=new zv({sessionIdGenerator:()=>sm.randomUUID(),enableJsonResponse:!0,onsessioninitialized:(f)=>{n[f]=u}}),u.onclose=()=>{if(u.sessionId)delete n[u.sessionId]},await i.connect(u);else{l.status(400).json({jsonrpc:"2.0",error:{code:-32000,message:"Bad Request: No valid session ID provided"},id:null});return}await u.handleRequest(c,l,c.body)});let v=async(c,l)=>{let x=c.headers["mcp-session-id"];if(!x||!n[x]){l.status(400).send("Invalid or missing session ID");return}await n[x].handleRequest(c,l)};I0.get("/mcp",v),I0.delete("/mcp",v),I0.listen(a,()=>{Cm.info(`MCP Session-based Streamable HTTP Server listening on port ${a}`),Cm.info(`Server address: http://localhost:${a}/mcp`)})};var rm=qa(()=>{sm=require("node:crypto");En();z4();Dc();Lx=ii(e4()),Cm=xi("SessionStreamableHttp"),I0=Lx.default();I0.use(Lx.default.json())});var tm={};a0(tm,{startServer:()=>Uh});var Dx,S0,T0,dm=(i,a,n)=>{return a.writeHead(405).end(JSON.stringify({jsonrpc:"2.0",error:{code:-32000,message:"Method not allowed."},id:null}))},Uh=(i,a=3000)=>{T0.post("/mcp",async(n,v)=>{v.setHeader("Content-Type","application/json"),S0.info("Request body:",JSON.stringify(n.body));try{let c=new zv({sessionIdGenerator:void 0,enableJsonResponse:!0});v.on("close",()=>{c.close(),i.close()}),await i.connect(c),await c.handleRequest(n,v,n.body)}catch(c){if(S0.error("Error handling MCP request:",c),S0.error("Error stack:",c.stack),!v.headersSent)v.status(500).json({jsonrpc:"2.0",error:{code:-32603,message:"Internal server error",data:{errorMessage:c.message,errorName:c.name}},id:n.body?.id||null})}}),T0.get("/mcp",dm),T0.delete("/mcp",dm),T0.listen(a,()=>{S0.info(`MCP Stateless Streamable HTTP server started, listening on port ${a}`),S0.info(`Server address: http://localhost:${a}/mcp`)})};var em=qa(()=>{En();z4();Dx=ii(e4()),S0=xi("StatelessStreamableHttp"),T0=Dx.default();T0.use(Dx.default.json({type:["application/json","application/*+json","*/*"]}))});var cQ=U((ip,nQ)=>{(function(i,a){typeof ip==="object"&&typeof nQ!=="undefined"?a(ip):typeof define==="function"&&define.amd?define(["exports"],a):a(i.URI=i.URI||{})})(ip,function(i){function a(){for(var H=arguments.length,P=Array(H),B=0;B<H;B++)P[B]=arguments[B];if(P.length>1){P[0]=P[0].slice(0,-1);var q=P.length-1;for(var N=1;N<q;++N)P[N]=P[N].slice(1,-1);return P[q]=P[q].slice(1),P.join("")}else return P[0]}function n(H){return"(?:"+H+")"}function v(H){return H===void 0?"undefined":H===null?"null":Object.prototype.toString.call(H).split(" ").pop().split("]").shift().toLowerCase()}function c(H){return H.toUpperCase()}function l(H){return H!==void 0&&H!==null?H instanceof Array?H:typeof H.length!=="number"||H.split||H.setInterval||H.call?[H]:Array.prototype.slice.call(H):[]}function x(H,P){var B=H;if(P)for(var q in P)B[q]=P[q];return B}function u(H){var P="[A-Za-z]",B="[\\x0D]",q="[0-9]",N="[\\x22]",S=a(q,"[A-Fa-f]"),na="[\\x0A]",Xa="[\\x20]",Ya=n(n("%[EFef]"+S+"%"+S+S+"%"+S+S)+"|"+n("%[89A-Fa-f]"+S+"%"+S+S)+"|"+n("%"+S+S)),Ia="[\\:\\/\\?\\#\\[\\]\\@]",za="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Oa=a(Ia,za),ba=H?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",La=H?"[\\uE000-\\uF8FF]":"[]",Va=a(P,q,"[\\-\\.\\_\\~]",ba),Na=n(P+a(P,q,"[\\+\\-\\.]")+"*"),Ba=n(n(Ya+"|"+a(Va,za,"[\\:]"))+"*"),On=n(n("25[0-5]")+"|"+n("2[0-4]"+q)+"|"+n("1"+q+q)+"|"+n("[1-9]"+q)+"|"+q),Wi=n(n("25[0-5]")+"|"+n("2[0-4]"+q)+"|"+n("1"+q+q)+"|"+n("0?[1-9]"+q)+"|0?0?"+q),Pi=n(Wi+"\\."+Wi+"\\."+Wi+"\\."+Wi),Ua=n(S+"{1,4}"),hi=n(n(Ua+"\\:"+Ua)+"|"+Pi),Ai=n(n(Ua+"\\:")+"{6}"+hi),ti=n("\\:\\:"+n(Ua+"\\:")+"{5}"+hi),Nn=n(n(Ua)+"?\\:\\:"+n(Ua+"\\:")+"{4}"+hi),Vi=n(n(n(Ua+"\\:")+"{0,1}"+Ua)+"?\\:\\:"+n(Ua+"\\:")+"{3}"+hi),sc=n(n(n(Ua+"\\:")+"{0,2}"+Ua)+"?\\:\\:"+n(Ua+"\\:")+"{2}"+hi),dn=n(n(n(Ua+"\\:")+"{0,3}"+Ua)+"?\\:\\:"+Ua+"\\:"+hi),An=n(n(n(Ua+"\\:")+"{0,4}"+Ua)+"?\\:\\:"+hi),Xn=n(n(n(Ua+"\\:")+"{0,5}"+Ua)+"?\\:\\:"+Ua),ni=n(n(n(Ua+"\\:")+"{0,6}"+Ua)+"?\\:\\:"),ei=n([Ai,ti,Nn,Vi,sc,dn,An,Xn,ni].join("|")),qn=n(n(Va+"|"+Ya)+"+"),jv=n(ei+"\\%25"+qn),an=n(ei+n("\\%25|\\%(?!"+S+"{2})")+qn),Rv=n("[vV]"+S+"+\\."+a(Va,za,"[\\:]")+"+"),Ql=n("\\["+n(an+"|"+ei+"|"+Rv)+"\\]"),Jl=n(n(Ya+"|"+a(Va,za))+"*"),yc=n(Ql+"|"+Pi+"(?!"+Jl+")|"+Jl),tn=n(q+"*"),Kc=n(n(Ba+"@")+"?"+yc+n("\\:"+tn)+"?"),rc=n(Ya+"|"+a(Va,za,"[\\:\\@]")),_p=n(rc+"*"),Wl=n(rc+"+"),Yl=n(n(Ya+"|"+a(Va,za,"[\\@]"))+"+"),nn=n(n("\\/"+_p)+"*"),Fc=n("\\/"+n(Wl+nn)+"?"),ov=n(Yl+nn),Pc=n(Wl+nn),Mi="(?!"+rc+")",Vc=n(nn+"|"+Fc+"|"+ov+"|"+Pc+"|"+Mi),en=n(n(rc+"|"+a("[\\/\\?]",La))+"*"),dc=n(n(rc+"|[\\/\\?]")+"*"),I1=n(n("\\/\\/"+Kc+nn)+"|"+Fc+"|"+Pc+"|"+Mi),Ev=n(Na+"\\:"+I1+n("\\?"+en)+"?"+n("\\#"+dc)+"?"),tc=n(n("\\/\\/"+Kc+nn)+"|"+Fc+"|"+ov+"|"+Mi),bv=n(tc+n("\\?"+en)+"?"+n("\\#"+dc)+"?"),S1=n(Ev+"|"+bv),h2=n(Na+"\\:"+I1+n("\\?"+en)+"?"),L2="^("+Na+")\\:"+n(n("\\/\\/("+n("("+Ba+")@")+"?("+yc+")"+n("\\:("+tn+")")+"?)")+"?("+nn+"|"+Fc+"|"+Pc+"|"+Mi+")")+n("\\?("+en+")")+"?"+n("\\#("+dc+")")+"?$",D2="^(){0}"+n(n("\\/\\/("+n("("+Ba+")@")+"?("+yc+")"+n("\\:("+tn+")")+"?)")+"?("+nn+"|"+Fc+"|"+ov+"|"+Mi+")")+n("\\?("+en+")")+"?"+n("\\#("+dc+")")+"?$",O2="^("+Na+")\\:"+n(n("\\/\\/("+n("("+Ba+")@")+"?("+yc+")"+n("\\:("+tn+")")+"?)")+"?("+nn+"|"+Fc+"|"+Pc+"|"+Mi+")")+n("\\?("+en+")")+"?$",N2="^"+n("\\#("+dc+")")+"?$",A2="^"+n("("+Ba+")@")+"?("+yc+")"+n("\\:("+tn+")")+"?$";return{NOT_SCHEME:new RegExp(a("[^]",P,q,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(a("[^\\%\\:]",Va,za),"g"),NOT_HOST:new RegExp(a("[^\\%\\[\\]\\:]",Va,za),"g"),NOT_PATH:new RegExp(a("[^\\%\\/\\:\\@]",Va,za),"g"),NOT_PATH_NOSCHEME:new RegExp(a("[^\\%\\/\\@]",Va,za),"g"),NOT_QUERY:new RegExp(a("[^\\%]",Va,za,"[\\:\\@\\/\\?]",La),"g"),NOT_FRAGMENT:new RegExp(a("[^\\%]",Va,za,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(a("[^]",Va,za),"g"),UNRESERVED:new RegExp(Va,"g"),OTHER_CHARS:new RegExp(a("[^\\%]",Va,Oa),"g"),PCT_ENCODED:new RegExp(Ya,"g"),IPV4ADDRESS:new RegExp("^("+Pi+")$"),IPV6ADDRESS:new RegExp("^\\[?("+ei+")"+n(n("\\%25|\\%(?!"+S+"{2})")+"("+qn+")")+"?\\]?$")}}var f=u(!1),w=u(!0),m=function(){function H(P,B){var q=[],N=!0,S=!1,na=void 0;try{for(var Xa=P[Symbol.iterator](),Ya;!(N=(Ya=Xa.next()).done);N=!0)if(q.push(Ya.value),B&&q.length===B)break}catch(Ia){S=!0,na=Ia}finally{try{if(!N&&Xa.return)Xa.return()}finally{if(S)throw na}}return q}return function(P,B){if(Array.isArray(P))return P;else if(Symbol.iterator in Object(P))return H(P,B);else throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),W=function(H){if(Array.isArray(H)){for(var P=0,B=Array(H.length);P<H.length;P++)B[P]=H[P];return B}else return Array.from(H)},Y=2147483647,J=36,X=1,F=26,K=38,M=700,L=72,$=128,D="-",O=/^xn--/,j=/[^\0-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=J-X,k=Math.floor,y=String.fromCharCode;function C(H){throw new RangeError(g[H])}function R(H,P){var B=[],q=H.length;while(q--)B[q]=P(H[q]);return B}function b(H,P){var B=H.split("@"),q="";if(B.length>1)q=B[0]+"@",H=B[1];H=H.replace(I,".");var N=H.split("."),S=R(N,P).join(".");return q+S}function T(H){var P=[],B=0,q=H.length;while(B<q){var N=H.charCodeAt(B++);if(N>=55296&&N<=56319&&B<q){var S=H.charCodeAt(B++);if((S&64512)==56320)P.push(((N&1023)<<10)+(S&1023)+65536);else P.push(N),B--}else P.push(N)}return P}var Wa=function H(P){return String.fromCodePoint.apply(String,W(P))},xa=function H(P){if(P-48<10)return P-22;if(P-65<26)return P-65;if(P-97<26)return P-97;return J},Ja=function H(P,B){return P+22+75*(P<26)-((B!=0)<<5)},pa=function H(P,B,q){var N=0;P=q?k(P/M):P>>1,P+=k(P/B);for(;P>E*F>>1;N+=J)P=k(P/E);return k(N+(E+1)*P/(P+K))},e=function H(P){var B=[],q=P.length,N=0,S=$,na=L,Xa=P.lastIndexOf(D);if(Xa<0)Xa=0;for(var Ya=0;Ya<Xa;++Ya){if(P.charCodeAt(Ya)>=128)C("not-basic");B.push(P.charCodeAt(Ya))}for(var Ia=Xa>0?Xa+1:0;Ia<q;){var za=N;for(var Oa=1,ba=J;;ba+=J){if(Ia>=q)C("invalid-input");var La=xa(P.charCodeAt(Ia++));if(La>=J||La>k((Y-N)/Oa))C("overflow");N+=La*Oa;var Va=ba<=na?X:ba>=na+F?F:ba-na;if(La<Va)break;var Na=J-Va;if(Oa>k(Y/Na))C("overflow");Oa*=Na}var Ba=B.length+1;if(na=pa(N-za,Ba,za==0),k(N/Ba)>Y-S)C("overflow");S+=k(N/Ba),N%=Ba,B.splice(N++,0,S)}return String.fromCodePoint.apply(String,B)},oa=function H(P){var B=[];P=T(P);var q=P.length,N=$,S=0,na=L,Xa=!0,Ya=!1,Ia=void 0;try{for(var za=P[Symbol.iterator](),Oa;!(Xa=(Oa=za.next()).done);Xa=!0){var ba=Oa.value;if(ba<128)B.push(y(ba))}}catch(an){Ya=!0,Ia=an}finally{try{if(!Xa&&za.return)za.return()}finally{if(Ya)throw Ia}}var La=B.length,Va=La;if(La)B.push(D);while(Va<q){var Na=Y,Ba=!0,On=!1,Wi=void 0;try{for(var Pi=P[Symbol.iterator](),Ua;!(Ba=(Ua=Pi.next()).done);Ba=!0){var hi=Ua.value;if(hi>=N&&hi<Na)Na=hi}}catch(an){On=!0,Wi=an}finally{try{if(!Ba&&Pi.return)Pi.return()}finally{if(On)throw Wi}}var Ai=Va+1;if(Na-N>k((Y-S)/Ai))C("overflow");S+=(Na-N)*Ai,N=Na;var ti=!0,Nn=!1,Vi=void 0;try{for(var sc=P[Symbol.iterator](),dn;!(ti=(dn=sc.next()).done);ti=!0){var An=dn.value;if(An<N&&++S>Y)C("overflow");if(An==N){var Xn=S;for(var ni=J;;ni+=J){var ei=ni<=na?X:ni>=na+F?F:ni-na;if(Xn<ei)break;var qn=Xn-ei,jv=J-ei;B.push(y(Ja(ei+qn%jv,0))),Xn=k(qn/jv)}B.push(y(Ja(Xn,0))),na=pa(S,Ai,Va==La),S=0,++Va}}}catch(an){Nn=!0,Vi=an}finally{try{if(!ti&&sc.return)sc.return()}finally{if(Nn)throw Vi}}++S,++N}return B.join("")},vi=function H(P){return b(P,function(B){return O.test(B)?e(B.slice(4).toLowerCase()):B})},Ji=function H(P){return b(P,function(B){return j.test(B)?"xn--"+oa(B):B})},ua={version:"2.1.0",ucs2:{decode:T,encode:Wa},decode:e,encode:oa,toASCII:Ji,toUnicode:vi},$a={};function ta(H){var P=H.charCodeAt(0),B=void 0;if(P<16)B="%0"+P.toString(16).toUpperCase();else if(P<128)B="%"+P.toString(16).toUpperCase();else if(P<2048)B="%"+(P>>6|192).toString(16).toUpperCase()+"%"+(P&63|128).toString(16).toUpperCase();else B="%"+(P>>12|224).toString(16).toUpperCase()+"%"+(P>>6&63|128).toString(16).toUpperCase()+"%"+(P&63|128).toString(16).toUpperCase();return B}function li(H){var P="",B=0,q=H.length;while(B<q){var N=parseInt(H.substr(B+1,2),16);if(N<128)P+=String.fromCharCode(N),B+=3;else if(N>=194&&N<224){if(q-B>=6){var S=parseInt(H.substr(B+4,2),16);P+=String.fromCharCode((N&31)<<6|S&63)}else P+=H.substr(B,6);B+=6}else if(N>=224){if(q-B>=9){var na=parseInt(H.substr(B+4,2),16),Xa=parseInt(H.substr(B+7,2),16);P+=String.fromCharCode((N&15)<<12|(na&63)<<6|Xa&63)}else P+=H.substr(B,9);B+=9}else P+=H.substr(B,3),B+=3}return P}function pi(H,P){function B(q){var N=li(q);return!N.match(P.UNRESERVED)?q:N}if(H.scheme)H.scheme=String(H.scheme).replace(P.PCT_ENCODED,B).toLowerCase().replace(P.NOT_SCHEME,"");if(H.userinfo!==void 0)H.userinfo=String(H.userinfo).replace(P.PCT_ENCODED,B).replace(P.NOT_USERINFO,ta).replace(P.PCT_ENCODED,c);if(H.host!==void 0)H.host=String(H.host).replace(P.PCT_ENCODED,B).toLowerCase().replace(P.NOT_HOST,ta).replace(P.PCT_ENCODED,c);if(H.path!==void 0)H.path=String(H.path).replace(P.PCT_ENCODED,B).replace(H.scheme?P.NOT_PATH:P.NOT_PATH_NOSCHEME,ta).replace(P.PCT_ENCODED,c);if(H.query!==void 0)H.query=String(H.query).replace(P.PCT_ENCODED,B).replace(P.NOT_QUERY,ta).replace(P.PCT_ENCODED,c);if(H.fragment!==void 0)H.fragment=String(H.fragment).replace(P.PCT_ENCODED,B).replace(P.NOT_FRAGMENT,ta).replace(P.PCT_ENCODED,c);return H}function bi(H){return H.replace(/^0*(.*)/,"$1")||"0"}function Za(H,P){var B=H.match(P.IPV4ADDRESS)||[],q=m(B,2),N=q[1];if(N)return N.split(".").map(bi).join(".");else return H}function Ea(H,P){var B=H.match(P.IPV6ADDRESS)||[],q=m(B,3),N=q[1],S=q[2];if(N){var na=N.toLowerCase().split("::").reverse(),Xa=m(na,2),Ya=Xa[0],Ia=Xa[1],za=Ia?Ia.split(":").map(bi):[],Oa=Ya.split(":").map(bi),ba=P.IPV4ADDRESS.test(Oa[Oa.length-1]),La=ba?7:8,Va=Oa.length-La,Na=Array(La);for(var Ba=0;Ba<La;++Ba)Na[Ba]=za[Ba]||Oa[Va+Ba]||"";if(ba)Na[La-1]=Za(Na[La-1],P);var On=Na.reduce(function(Ai,ti,Nn){if(!ti||ti==="0"){var Vi=Ai[Ai.length-1];if(Vi&&Vi.index+Vi.length===Nn)Vi.length++;else Ai.push({index:Nn,length:1})}return Ai},[]),Wi=On.sort(function(Ai,ti){return ti.length-Ai.length})[0],Pi=void 0;if(Wi&&Wi.length>1){var Ua=Na.slice(0,Wi.index),hi=Na.slice(Wi.index+Wi.length);Pi=Ua.join(":")+"::"+hi.join(":")}else Pi=Na.join(":");if(S)Pi+="%"+S;return Pi}else return H}var yn=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ea="".match(/(){0}/)[1]===void 0;function Pa(H){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B={},q=P.iri!==!1?w:f;if(P.reference==="suffix")H=(P.scheme?P.scheme+":":"")+"//"+H;var N=H.match(yn);if(N){if(ea){if(B.scheme=N[1],B.userinfo=N[3],B.host=N[4],B.port=parseInt(N[5],10),B.path=N[6]||"",B.query=N[7],B.fragment=N[8],isNaN(B.port))B.port=N[5]}else if(B.scheme=N[1]||void 0,B.userinfo=H.indexOf("@")!==-1?N[3]:void 0,B.host=H.indexOf("//")!==-1?N[4]:void 0,B.port=parseInt(N[5],10),B.path=N[6]||"",B.query=H.indexOf("?")!==-1?N[7]:void 0,B.fragment=H.indexOf("#")!==-1?N[8]:void 0,isNaN(B.port))B.port=H.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?N[4]:void 0;if(B.host)B.host=Ea(Za(B.host,q),q);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(P.reference&&P.reference!=="suffix"&&P.reference!==B.reference)B.error=B.error||"URI is not a "+P.reference+" reference.";var S=$a[(P.scheme||B.scheme||"").toLowerCase()];if(!P.unicodeSupport&&(!S||!S.unicodeSupport)){if(B.host&&(P.domainHost||S&&S.domainHost))try{B.host=ua.toASCII(B.host.replace(q.PCT_ENCODED,li).toLowerCase())}catch(na){B.error=B.error||"Host's domain name can not be converted to ASCII via punycode: "+na}pi(B,f)}else pi(B,q);if(S&&S.parse)S.parse(B,P)}else B.error=B.error||"URI can not be parsed.";return B}function Bi(H,P){var B=P.iri!==!1?w:f,q=[];if(H.userinfo!==void 0)q.push(H.userinfo),q.push("@");if(H.host!==void 0)q.push(Ea(Za(String(H.host),B),B).replace(B.IPV6ADDRESS,function(N,S,na){return"["+S+(na?"%25"+na:"")+"]"}));if(typeof H.port==="number"||typeof H.port==="string")q.push(":"),q.push(String(H.port));return q.length?q.join(""):void 0}var yi=/^\.\.?\//,Yn=/^\/\.(\/|$)/,ri=/^\/\.\.(\/|$)/,ai=/^\/?(?:.|\n)*?(?=\/|$)/;function ka(H){var P=[];while(H.length)if(H.match(yi))H=H.replace(yi,"");else if(H.match(Yn))H=H.replace(Yn,"/");else if(H.match(ri))H=H.replace(ri,"/"),P.pop();else if(H==="."||H==="..")H="";else{var B=H.match(ai);if(B){var q=B[0];H=H.slice(q.length),P.push(q)}else throw new Error("Unexpected dot segment condition")}return P.join("")}function ga(H){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=P.iri?w:f,q=[],N=$a[(P.scheme||H.scheme||"").toLowerCase()];if(N&&N.serialize)N.serialize(H,P);if(H.host){if(B.IPV6ADDRESS.test(H.host));else if(P.domainHost||N&&N.domainHost)try{H.host=!P.iri?ua.toASCII(H.host.replace(B.PCT_ENCODED,li).toLowerCase()):ua.toUnicode(H.host)}catch(Xa){H.error=H.error||"Host's domain name can not be converted to "+(!P.iri?"ASCII":"Unicode")+" via punycode: "+Xa}}if(pi(H,B),P.reference!=="suffix"&&H.scheme)q.push(H.scheme),q.push(":");var S=Bi(H,P);if(S!==void 0){if(P.reference!=="suffix")q.push("//");if(q.push(S),H.path&&H.path.charAt(0)!=="/")q.push("/")}if(H.path!==void 0){var na=H.path;if(!P.absolutePath&&(!N||!N.absolutePath))na=ka(na);if(S===void 0)na=na.replace(/^\/\//,"/%2F");q.push(na)}if(H.query!==void 0)q.push("?"),q.push(H.query);if(H.fragment!==void 0)q.push("#"),q.push(H.fragment);return q.join("")}function ya(H,P){var B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},q=arguments[3],N={};if(!q)H=Pa(ga(H,B),B),P=Pa(ga(P,B),B);if(B=B||{},!B.tolerant&&P.scheme)N.scheme=P.scheme,N.userinfo=P.userinfo,N.host=P.host,N.port=P.port,N.path=ka(P.path||""),N.query=P.query;else{if(P.userinfo!==void 0||P.host!==void 0||P.port!==void 0)N.userinfo=P.userinfo,N.host=P.host,N.port=P.port,N.path=ka(P.path||""),N.query=P.query;else{if(!P.path)if(N.path=H.path,P.query!==void 0)N.query=P.query;else N.query=H.query;else{if(P.path.charAt(0)==="/")N.path=ka(P.path);else{if((H.userinfo!==void 0||H.host!==void 0||H.port!==void 0)&&!H.path)N.path="/"+P.path;else if(!H.path)N.path=P.path;else N.path=H.path.slice(0,H.path.lastIndexOf("/")+1)+P.path;N.path=ka(N.path)}N.query=P.query}N.userinfo=H.userinfo,N.host=H.host,N.port=H.port}N.scheme=H.scheme}return N.fragment=P.fragment,N}function di(H,P,B){var q=x({scheme:"null"},B);return ga(ya(Pa(H,q),Pa(P,q),q,!0),q)}function Ki(H,P){if(typeof H==="string")H=ga(Pa(H,P),P);else if(v(H)==="object")H=Pa(ga(H,P),P);return H}function rn(H,P,B){if(typeof H==="string")H=ga(Pa(H,B),B);else if(v(H)==="object")H=ga(H,B);if(typeof P==="string")P=ga(Pa(P,B),B);else if(v(P)==="object")P=ga(P,B);return H===P}function R1(H,P){return H&&H.toString().replace(!P||!P.iri?f.ESCAPE:w.ESCAPE,ta)}function Ui(H,P){return H&&H.toString().replace(!P||!P.iri?f.PCT_ENCODED:w.PCT_ENCODED,li)}var Xc={scheme:"http",domainHost:!0,parse:function H(P,B){if(!P.host)P.error=P.error||"HTTP URIs must have a host.";return P},serialize:function H(P,B){var q=String(P.scheme).toLowerCase()==="https";if(P.port===(q?443:80)||P.port==="")P.port=void 0;if(!P.path)P.path="/";return P}},vl={scheme:"https",domainHost:Xc.domainHost,parse:Xc.parse,serialize:Xc.serialize};function o1(H){return typeof H.secure==="boolean"?H.secure:String(H.scheme).toLowerCase()==="wss"}var Gc={scheme:"ws",domainHost:!0,parse:function H(P,B){var q=P;return q.secure=o1(q),q.resourceName=(q.path||"/")+(q.query?"?"+q.query:""),q.path=void 0,q.query=void 0,q},serialize:function H(P,B){if(P.port===(o1(P)?443:80)||P.port==="")P.port=void 0;if(typeof P.secure==="boolean")P.scheme=P.secure?"wss":"ws",P.secure=void 0;if(P.resourceName){var q=P.resourceName.split("?"),N=m(q,2),S=N[0],na=N[1];P.path=S&&S!=="/"?S:void 0,P.query=na,P.resourceName=void 0}return P.fragment=void 0,P}},E1={scheme:"wss",domainHost:Gc.domainHost,parse:Gc.parse,serialize:Gc.serialize},b1={},_1=!0,Nv="[A-Za-z0-9\\-\\.\\_\\~"+(_1?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",Fi="[0-9A-Fa-f]",ll=n(n("%[EFef]"+Fi+"%"+Fi+Fi+"%"+Fi+Fi)+"|"+n("%[89A-Fa-f]"+Fi+"%"+Fi+Fi)+"|"+n("%"+Fi+Fi)),zn="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Ln="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",pl=a(Ln,"[\\\"\\\\]"),Av="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ep=new RegExp(Nv,"g"),Dn=new RegExp(ll,"g"),xl=new RegExp(a("[^]",zn,"[\\.]","[\\\"]",pl),"g"),ul=new RegExp(a("[^]",Nv,Av),"g"),bp=ul;function Z1(H){var P=li(H);return!P.match(Ep)?H:P}var fl={scheme:"mailto",parse:function H(P,B){var q=P,N=q.to=q.path?q.path.split(","):[];if(q.path=void 0,q.query){var S=!1,na={},Xa=q.query.split("&");for(var Ya=0,Ia=Xa.length;Ya<Ia;++Ya){var za=Xa[Ya].split("=");switch(za[0]){case"to":var Oa=za[1].split(",");for(var ba=0,La=Oa.length;ba<La;++ba)N.push(Oa[ba]);break;case"subject":q.subject=Ui(za[1],B);break;case"body":q.body=Ui(za[1],B);break;default:S=!0,na[Ui(za[0],B)]=Ui(za[1],B);break}}if(S)q.headers=na}q.query=void 0;for(var Va=0,Na=N.length;Va<Na;++Va){var Ba=N[Va].split("@");if(Ba[0]=Ui(Ba[0]),!B.unicodeSupport)try{Ba[1]=ua.toASCII(Ui(Ba[1],B).toLowerCase())}catch(On){q.error=q.error||"Email address's domain name can not be converted to ASCII via punycode: "+On}else Ba[1]=Ui(Ba[1],B).toLowerCase();N[Va]=Ba.join("@")}return q},serialize:function H(P,B){var q=P,N=l(P.to);if(N){for(var S=0,na=N.length;S<na;++S){var Xa=String(N[S]),Ya=Xa.lastIndexOf("@"),Ia=Xa.slice(0,Ya).replace(Dn,Z1).replace(Dn,c).replace(xl,ta),za=Xa.slice(Ya+1);try{za=!B.iri?ua.toASCII(Ui(za,B).toLowerCase()):ua.toUnicode(za)}catch(Va){q.error=q.error||"Email address's domain name can not be converted to "+(!B.iri?"ASCII":"Unicode")+" via punycode: "+Va}N[S]=Ia+"@"+za}q.path=N.join(",")}var Oa=P.headers=P.headers||{};if(P.subject)Oa.subject=P.subject;if(P.body)Oa.body=P.body;var ba=[];for(var La in Oa)if(Oa[La]!==b1[La])ba.push(La.replace(Dn,Z1).replace(Dn,c).replace(ul,ta)+"="+Oa[La].replace(Dn,Z1).replace(Dn,c).replace(bp,ta));if(ba.length)q.query=ba.join("&");return q}},wl=/^([^\:]+)\:(.*)/,qv={scheme:"urn",parse:function H(P,B){var q=P.path&&P.path.match(wl),N=P;if(q){var S=B.scheme||N.scheme||"urn",na=q[1].toLowerCase(),Xa=q[2],Ya=S+":"+(B.nid||na),Ia=$a[Ya];if(N.nid=na,N.nss=Xa,N.path=void 0,Ia)N=Ia.parse(N,B)}else N.error=N.error||"URN can not be parsed.";return N},serialize:function H(P,B){var q=B.scheme||P.scheme||"urn",N=P.nid,S=q+":"+(B.nid||N),na=$a[S];if(na)P=na.serialize(P,B);var Xa=P,Ya=P.nss;return Xa.path=(N||B.nid)+":"+Ya,Xa}},g1=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ml={scheme:"urn:uuid",parse:function H(P,B){var q=P;if(q.uuid=q.nss,q.nss=void 0,!B.tolerant&&(!q.uuid||!q.uuid.match(g1)))q.error=q.error||"UUID is not valid.";return q},serialize:function H(P,B){var q=P;return q.nss=(P.uuid||"").toLowerCase(),q}};$a[Xc.scheme]=Xc,$a[vl.scheme]=vl,$a[Gc.scheme]=Gc,$a[E1.scheme]=E1,$a[fl.scheme]=fl,$a[qv.scheme]=qv,$a[ml.scheme]=ml,i.SCHEMES=$a,i.pctEncChar=ta,i.pctDecChars=li,i.parse=Pa,i.removeDotSegments=ka,i.serialize=ga,i.resolveComponents=ya,i.resolve=di,i.normalize=Ki,i.equal=rn,i.escapeComponent=R1,i.unescapeComponent=Ui,Object.defineProperty(i,"__esModule",{value:!0})})});var np=U((yA,vQ)=>{vQ.exports=function i(a,n){if(a===n)return!0;if(a&&n&&typeof a=="object"&&typeof n=="object"){if(a.constructor!==n.constructor)return!1;var v,c,l;if(Array.isArray(a)){if(v=a.length,v!=n.length)return!1;for(c=v;c--!==0;)if(!i(a[c],n[c]))return!1;return!0}if(a.constructor===RegExp)return a.source===n.source&&a.flags===n.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===n.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===n.toString();if(l=Object.keys(a),v=l.length,v!==Object.keys(n).length)return!1;for(c=v;c--!==0;)if(!Object.prototype.hasOwnProperty.call(n,l[c]))return!1;for(c=v;c--!==0;){var x=l[c];if(!i(a[x],n[x]))return!1}return!0}return a!==a&&n!==n}});var pQ=U((rA,lQ)=>{lQ.exports=function i(a){var n=0,v=a.length,c=0,l;while(c<v)if(n++,l=a.charCodeAt(c++),l>=55296&&l<=56319&&c<v){if(l=a.charCodeAt(c),(l&64512)==56320)c++}return n}});var Bv=U((dA,fQ)=>{fQ.exports={copy:Lh,checkDataType:Nx,checkDataTypes:Dh,coerceToTypes:Oh,toHash:qx,getProperty:jx,escapeQuotes:Rx,equal:np(),ucs2length:pQ(),varOccurences:qh,varReplace:jh,schemaHasRules:Rh,schemaHasRulesExcept:oh,schemaUnknownRules:Eh,toQuotedString:Ax,getPathExpr:bh,getPath:_h,getData:Ih,unescapeFragment:Sh,unescapeJsonPointer:Ex,escapeFragment:Th,escapeJsonPointer:ox};function Lh(i,a){a=a||{};for(var n in i)a[n]=i[n];return a}function Nx(i,a,n,v){var c=v?" !== ":" === ",l=v?" || ":" && ",x=v?"!":"",u=v?"":"!";switch(i){case"null":return a+c+"null";case"array":return x+"Array.isArray("+a+")";case"object":return"("+x+a+l+"typeof "+a+c+'"object"'+l+u+"Array.isArray("+a+"))";case"integer":return"(typeof "+a+c+'"number"'+l+u+"("+a+" % 1)"+l+a+c+a+(n?l+x+"isFinite("+a+")":"")+")";case"number":return"(typeof "+a+c+'"'+i+'"'+(n?l+x+"isFinite("+a+")":"")+")";default:return"typeof "+a+c+'"'+i+'"'}}function Dh(i,a,n){switch(i.length){case 1:return Nx(i[0],a,n,!0);default:var v="",c=qx(i);if(c.array&&c.object)v=c.null?"(":"(!"+a+" || ",v+="typeof "+a+' !== "object")',delete c.null,delete c.array,delete c.object;if(c.number)delete c.integer;for(var l in c)v+=(v?" && ":"")+Nx(l,a,n,!0);return v}}var xQ=qx(["string","number","integer","boolean","null"]);function Oh(i,a){if(Array.isArray(a)){var n=[];for(var v=0;v<a.length;v++){var c=a[v];if(xQ[c])n[n.length]=c;else if(i==="array"&&c==="array")n[n.length]=c}if(n.length)return n}else if(xQ[a])return[a];else if(i==="array"&&a==="array")return["array"]}function qx(i){var a={};for(var n=0;n<i.length;n++)a[i[n]]=!0;return a}var Nh=/^[a-z$_][a-z$_0-9]*$/i,Ah=/'|\\/g;function jx(i){return typeof i=="number"?"["+i+"]":Nh.test(i)?"."+i:"['"+Rx(i)+"']"}function Rx(i){return i.replace(Ah,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function qh(i,a){a+="[^0-9]";var n=i.match(new RegExp(a,"g"));return n?n.length:0}function jh(i,a,n){return a+="([^0-9])",n=n.replace(/\$/g,"$$$$"),i.replace(new RegExp(a,"g"),n+"$1")}function Rh(i,a){if(typeof i=="boolean")return!i;for(var n in i)if(a[n])return!0}function oh(i,a,n){if(typeof i=="boolean")return!i&&n!="not";for(var v in i)if(v!=n&&a[v])return!0}function Eh(i,a){if(typeof i=="boolean")return;for(var n in i)if(!a[n])return n}function Ax(i){return"'"+Rx(i)+"'"}function bh(i,a,n,v){var c=n?"'/' + "+a+(v?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):v?"'[' + "+a+" + ']'":"'[\\'' + "+a+" + '\\']'";return uQ(i,c)}function _h(i,a,n){var v=n?Ax("/"+ox(a)):Ax(jx(a));return uQ(i,v)}var Zh=/^\/(?:[^~]|~0|~1)*$/,gh=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ih(i,a,n){var v,c,l,x;if(i==="")return"rootData";if(i[0]=="/"){if(!Zh.test(i))throw new Error("Invalid JSON-pointer: "+i);c=i,l="rootData"}else{if(x=i.match(gh),!x)throw new Error("Invalid JSON-pointer: "+i);if(v=+x[1],c=x[2],c=="#"){if(v>=a)throw new Error("Cannot access property/index "+v+" levels up, current level is "+a);return n[a-v]}if(v>a)throw new Error("Cannot access data "+v+" levels up, current level is "+a);if(l="data"+(a-v||""),!c)return l}var u=l,f=c.split("/");for(var w=0;w<f.length;w++){var m=f[w];if(m)l+=jx(Ex(m)),u+=" && "+l}return u}function uQ(i,a){if(i=='""')return a;return(i+" + "+a).replace(/([^\\])' \+ '/g,"$1")}function Sh(i){return Ex(decodeURIComponent(i))}function Th(i){return encodeURIComponent(ox(i))}function ox(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}function Ex(i){return i.replace(/~1/g,"/").replace(/~0/g,"~")}});var bx=U((tA,wQ)=>{var kh=Bv();wQ.exports=Ch;function Ch(i){kh.copy(i,this)}});var QQ=U((eA,mQ)=>{var bc=mQ.exports=function(i,a,n){if(typeof a=="function")n=a,a={};n=a.cb||n;var v=typeof n=="function"?n:n.pre||function(){},c=n.post||function(){};cp(a,v,c,i,"",i)};bc.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0};bc.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};bc.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};bc.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 cp(i,a,n,v,c,l,x,u,f,w){if(v&&typeof v=="object"&&!Array.isArray(v)){a(v,c,l,x,u,f,w);for(var m in v){var W=v[m];if(Array.isArray(W)){if(m in bc.arrayKeywords)for(var Y=0;Y<W.length;Y++)cp(i,a,n,W[Y],c+"/"+m+"/"+Y,l,c,m,v,Y)}else if(m in bc.propsKeywords){if(W&&typeof W=="object")for(var J in W)cp(i,a,n,W[J],c+"/"+m+"/"+sh(J),l,c,m,v,J)}else if(m in bc.keywords||i.allKeys&&!(m in bc.skipKeywords))cp(i,a,n,W,c+"/"+m,l,c,m,v)}n(v,c,l,x,u,f,w)}}function sh(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}});var fp=U((aq,zQ)=>{var k0=cQ(),JQ=np(),xp=Bv(),vp=bx(),yh=QQ();zQ.exports=Zc;Zc.normalizeId=_c;Zc.fullPath=lp;Zc.url=pp;Zc.ids=aL;Zc.inlineRef=_x;Zc.schema=up;function Zc(i,a,n){var v=this._refs[n];if(typeof v=="string")if(this._refs[v])v=this._refs[v];else return Zc.call(this,i,a,v);if(v=v||this._schemas[n],v instanceof vp)return _x(v.schema,this._opts.inlineRefs)?v.schema:v.validate||this._compile(v);var c=up.call(this,a,n),l,x,u;if(c)l=c.schema,a=c.root,u=c.baseId;if(l instanceof vp)x=l.validate||i.call(this,l.schema,a,void 0,u);else if(l!==void 0)x=_x(l,this._opts.inlineRefs)?l:i.call(this,l,a,void 0,u);return x}function up(i,a){var n=k0.parse(a),v=YQ(n),c=lp(this._getId(i.schema));if(Object.keys(i.schema).length===0||v!==c){var l=_c(v),x=this._refs[l];if(typeof x=="string")return rh.call(this,i,x,n);else if(x instanceof vp){if(!x.validate)this._compile(x);i=x}else if(x=this._schemas[l],x instanceof vp){if(!x.validate)this._compile(x);if(l==_c(a))return{schema:x,root:i,baseId:c};i=x}else return;if(!i.schema)return;c=lp(this._getId(i.schema))}return WQ.call(this,n,c,i.schema,i)}function rh(i,a,n){var v=up.call(this,i,a);if(v){var{schema:c,baseId:l}=v;i=v.root;var x=this._getId(c);if(x)l=pp(l,x);return WQ.call(this,n,l,c,i)}}var dh=xp.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function WQ(i,a,n,v){if(i.fragment=i.fragment||"",i.fragment.slice(0,1)!="/")return;var c=i.fragment.split("/");for(var l=1;l<c.length;l++){var x=c[l];if(x){if(x=xp.unescapeFragment(x),n=n[x],n===void 0)break;var u;if(!dh[x]){if(u=this._getId(n),u)a=pp(a,u);if(n.$ref){var f=pp(a,n.$ref),w=up.call(this,v,f);if(w)n=w.schema,v=w.root,a=w.baseId}}}}if(n!==void 0&&n!==v.schema)return{schema:n,root:v,baseId:a}}var th=xp.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function _x(i,a){if(a===!1)return!1;if(a===void 0||a===!0)return Zx(i);else if(a)return gx(i)<=a}function Zx(i){var a;if(Array.isArray(i)){for(var n=0;n<i.length;n++)if(a=i[n],typeof a=="object"&&!Zx(a))return!1}else for(var v in i){if(v=="$ref")return!1;if(a=i[v],typeof a=="object"&&!Zx(a))return!1}return!0}function gx(i){var a=0,n;if(Array.isArray(i))for(var v=0;v<i.length;v++){if(n=i[v],typeof n=="object")a+=gx(n);if(a==1/0)return 1/0}else for(var c in i){if(c=="$ref")return 1/0;if(th[c])a++;else{if(n=i[c],typeof n=="object")a+=gx(n)+1;if(a==1/0)return 1/0}}return a}function lp(i,a){if(a!==!1)i=_c(i);var n=k0.parse(i);return YQ(n)}function YQ(i){return k0.serialize(i).split("#")[0]+"#"}var eh=/#\/?$/;function _c(i){return i?i.replace(eh,""):""}function pp(i,a){return a=_c(a),k0.resolve(i,a)}function aL(i){var a=_c(this._getId(i)),n={"":a},v={"":lp(a,!1)},c={},l=this;return yh(i,{allKeys:!0},function(x,u,f,w,m,W,Y){if(u==="")return;var J=l._getId(x),X=n[w],F=v[w]+"/"+m;if(Y!==void 0)F+="/"+(typeof Y=="number"?Y:xp.escapeFragment(Y));if(typeof J=="string"){J=X=_c(X?k0.resolve(X,J):J);var K=l._refs[J];if(typeof K=="string")K=l._refs[K];if(K&&K.schema){if(!JQ(x,K.schema))throw new Error('id "'+J+'" resolves to more than one schema')}else if(J!=_c(F))if(J[0]=="#"){if(c[J]&&!JQ(x,c[J]))throw new Error('id "'+J+'" resolves to more than one schema');c[J]=x}else l._refs[J]=F}n[u]=X,v[u]=F}),c}});var wp=U((iq,GQ)=>{var Ix=fp();GQ.exports={Validation:XQ(iL),MissingRef:XQ(Sx)};function iL(i){this.message="validation failed",this.errors=i,this.ajv=this.validation=!0}Sx.message=function(i,a){return"can't resolve reference "+a+" from id "+i};function Sx(i,a,n){this.message=n||Sx.message(i,a),this.missingRef=Ix.url(i,a),this.missingSchema=Ix.normalizeId(Ix.fullPath(this.missingRef))}function XQ(i){return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i}});var Tx=U((nq,KQ)=>{KQ.exports=function(i,a){if(!a)a={};if(typeof a==="function")a={cmp:a};var n=typeof a.cycles==="boolean"?a.cycles:!1,v=a.cmp&&function(l){return function(x){return function(u,f){var w={key:u,value:x[u]},m={key:f,value:x[f]};return l(w,m)}}}(a.cmp),c=[];return function l(x){if(x&&x.toJSON&&typeof x.toJSON==="function")x=x.toJSON();if(x===void 0)return;if(typeof x=="number")return isFinite(x)?""+x:"null";if(typeof x!=="object")return JSON.stringify(x);var u,f;if(Array.isArray(x)){f="[";for(u=0;u<x.length;u++){if(u)f+=",";f+=l(x[u])||"null"}return f+"]"}if(x===null)return"null";if(c.indexOf(x)!==-1){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var w=c.push(x)-1,m=Object.keys(x).sort(v&&v(x));f="";for(u=0;u<m.length;u++){var W=m[u],Y=l(x[W]);if(!Y)continue;if(f)f+=",";f+=JSON.stringify(W)+":"+Y}return c.splice(w,1),"{"+f+"}"}(i)}});var kx=U((cq,FQ)=>{FQ.exports=function i(a,n,v){var c="",l=a.schema.$async===!0,x=a.util.schemaHasRulesExcept(a.schema,a.RULES.all,"$ref"),u=a.self._getId(a.schema);if(a.opts.strictKeywords){var f=a.util.schemaUnknownRules(a.schema,a.RULES.keywords);if(f){var w="unknown keyword: "+f;if(a.opts.strictKeywords==="log")a.logger.warn(w);else throw new Error(w)}}if(a.isTop){if(c+=" var validate = ",l)a.async=!0,c+="async ";if(c+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",u&&(a.opts.sourceCode||a.opts.processCode))c+=" "+("/*# sourceURL="+u+" */")+" "}if(typeof a.schema=="boolean"||!(x||a.schema.$ref)){var n="false schema",m=a.level,W=a.dataLevel,Y=a.schema[n],J=a.schemaPath+a.util.getProperty(n),X=a.errSchemaPath+"/"+n,O=!a.opts.allErrors,g,F="data"+(W||""),D="valid"+m;if(a.schema===!1){if(a.isTop)O=!0;else c+=" var "+D+" = false; ";var K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(g||"false schema")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(X)+" , params: {} ",a.opts.messages!==!1)c+=" , message: 'boolean schema is false' ";if(a.opts.verbose)c+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+F+" ";c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&O)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else if(a.isTop)if(l)c+=" return data; ";else c+=" validate.errors = null; return true; ";else c+=" var "+D+" = true; ";if(a.isTop)c+=" }; return validate; ";return c}if(a.isTop){var L=a.isTop,m=a.level=0,W=a.dataLevel=0,F="data";if(a.rootId=a.resolve.fullPath(a.self._getId(a.root.schema)),a.baseId=a.baseId||a.rootId,delete a.isTop,a.dataPathArr=[""],a.schema.default!==void 0&&a.opts.useDefaults&&a.opts.strictDefaults){var $="default is ignored in the schema root";if(a.opts.strictDefaults==="log")a.logger.warn($);else throw new Error($)}c+=" var vErrors = null; ",c+=" var errors = 0; ",c+=" if (rootData === undefined) rootData = data; "}else{var{level:m,dataLevel:W}=a,F="data"+(W||"");if(u)a.baseId=a.resolve.url(a.baseId,u);if(l&&!a.async)throw new Error("async schema in sync schema");c+=" var errs_"+m+" = errors;"}var D="valid"+m,O=!a.opts.allErrors,j="",I="",g,E=a.schema.type,k=Array.isArray(E);if(E&&a.opts.nullable&&a.schema.nullable===!0){if(k){if(E.indexOf("null")==-1)E=E.concat("null")}else if(E!="null")E=[E,"null"],k=!0}if(k&&E.length==1)E=E[0],k=!1;if(a.schema.$ref&&x){if(a.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+a.errSchemaPath+'" (see option extendRefs)');else if(a.opts.extendRefs!==!0)x=!1,a.logger.warn('$ref: keywords ignored in schema at path "'+a.errSchemaPath+'"')}if(a.schema.$comment&&a.opts.$comment)c+=" "+a.RULES.all.$comment.code(a,"$comment");if(E){if(a.opts.coerceTypes)var y=a.util.coerceToTypes(a.opts.coerceTypes,E);var C=a.RULES.types[E];if(y||k||C===!0||C&&!ai(C)){var J=a.schemaPath+".type",X=a.errSchemaPath+"/type",J=a.schemaPath+".type",X=a.errSchemaPath+"/type",R=k?"checkDataTypes":"checkDataType";if(c+=" if ("+a.util[R](E,F,a.opts.strictNumbers,!0)+") { ",y){var b="dataType"+m,T="coerced"+m;if(c+=" var "+b+" = typeof "+F+"; var "+T+" = undefined; ",a.opts.coerceTypes=="array")c+=" if ("+b+" == 'object' && Array.isArray("+F+") && "+F+".length == 1) { "+F+" = "+F+"[0]; "+b+" = typeof "+F+"; if ("+a.util.checkDataType(a.schema.type,F,a.opts.strictNumbers)+") "+T+" = "+F+"; } ";c+=" if ("+T+" !== undefined) ; ";var Wa=y;if(Wa){var xa,Ja=-1,pa=Wa.length-1;while(Ja<pa)if(xa=Wa[Ja+=1],xa=="string")c+=" else if ("+b+" == 'number' || "+b+" == 'boolean') "+T+" = '' + "+F+"; else if ("+F+" === null) "+T+" = ''; ";else if(xa=="number"||xa=="integer"){if(c+=" else if ("+b+" == 'boolean' || "+F+" === null || ("+b+" == 'string' && "+F+" && "+F+" == +"+F+" ",xa=="integer")c+=" && !("+F+" % 1)";c+=")) "+T+" = +"+F+"; "}else if(xa=="boolean")c+=" else if ("+F+" === 'false' || "+F+" === 0 || "+F+" === null) "+T+" = false; else if ("+F+" === 'true' || "+F+" === 1) "+T+" = true; ";else if(xa=="null")c+=" else if ("+F+" === '' || "+F+" === 0 || "+F+" === false) "+T+" = null; ";else if(a.opts.coerceTypes=="array"&&xa=="array")c+=" else if ("+b+" == 'string' || "+b+" == 'number' || "+b+" == 'boolean' || "+F+" == null) "+T+" = ["+F+"]; "}c+=" else { ";var K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(g||"type")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(X)+" , params: { type: '",k)c+=""+E.join(",");else c+=""+E;if(c+="' } ",a.opts.messages!==!1){if(c+=" , message: 'should be ",k)c+=""+E.join(",");else c+=""+E;c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+J+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+F+" ";c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&O)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";c+=" } if ("+T+" !== undefined) { ";var e=W?"data"+(W-1||""):"parentData",oa=W?a.dataPathArr[W]:"parentDataProperty";if(c+=" "+F+" = "+T+"; ",!W)c+="if ("+e+" !== undefined)";c+=" "+e+"["+oa+"] = "+T+"; } "}else{var K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(g||"type")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(X)+" , params: { type: '",k)c+=""+E.join(",");else c+=""+E;if(c+="' } ",a.opts.messages!==!1){if(c+=" , message: 'should be ",k)c+=""+E.join(",");else c+=""+E;c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+J+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+F+" ";c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&O)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}c+=" } "}}if(a.schema.$ref&&!x){if(c+=" "+a.RULES.all.$ref.code(a,"$ref")+" ",O){if(c+=" } if (errors === ",L)c+="0";else c+="errs_"+m;c+=") { ",I+="}"}}else{var vi=a.RULES;if(vi){var C,Ji=-1,ua=vi.length-1;while(Ji<ua)if(C=vi[Ji+=1],ai(C)){if(C.type)c+=" if ("+a.util.checkDataType(C.type,F,a.opts.strictNumbers)+") { ";if(a.opts.useDefaults){if(C.type=="object"&&a.schema.properties){var Y=a.schema.properties,$a=Object.keys(Y),ta=$a;if(ta){var li,pi=-1,bi=ta.length-1;while(pi<bi){li=ta[pi+=1];var Za=Y[li];if(Za.default!==void 0){var Ea=F+a.util.getProperty(li);if(a.compositeRule){if(a.opts.strictDefaults){var $="default is ignored for: "+Ea;if(a.opts.strictDefaults==="log")a.logger.warn($);else throw new Error($)}}else{if(c+=" if ("+Ea+" === undefined ",a.opts.useDefaults=="empty")c+=" || "+Ea+" === null || "+Ea+" === '' ";if(c+=" ) "+Ea+" = ",a.opts.useDefaults=="shared")c+=" "+a.useDefault(Za.default)+" ";else c+=" "+JSON.stringify(Za.default)+" ";c+="; "}}}}}else if(C.type=="array"&&Array.isArray(a.schema.items)){var yn=a.schema.items;if(yn){var Za,Ja=-1,ea=yn.length-1;while(Ja<ea)if(Za=yn[Ja+=1],Za.default!==void 0){var Ea=F+"["+Ja+"]";if(a.compositeRule){if(a.opts.strictDefaults){var $="default is ignored for: "+Ea;if(a.opts.strictDefaults==="log")a.logger.warn($);else throw new Error($)}}else{if(c+=" if ("+Ea+" === undefined ",a.opts.useDefaults=="empty")c+=" || "+Ea+" === null || "+Ea+" === '' ";if(c+=" ) "+Ea+" = ",a.opts.useDefaults=="shared")c+=" "+a.useDefault(Za.default)+" ";else c+=" "+JSON.stringify(Za.default)+" ";c+="; "}}}}}var Pa=C.rules;if(Pa){var Bi,yi=-1,Yn=Pa.length-1;while(yi<Yn)if(Bi=Pa[yi+=1],ka(Bi)){var ri=Bi.code(a,Bi.keyword,C.type);if(ri){if(c+=" "+ri+" ",O)j+="}"}}}if(O)c+=" "+j+" ",j="";if(C.type){if(c+=" } ",E&&E===C.type&&!y){c+=" else { ";var J=a.schemaPath+".type",X=a.errSchemaPath+"/type",K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(g||"type")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(X)+" , params: { type: '",k)c+=""+E.join(",");else c+=""+E;if(c+="' } ",a.opts.messages!==!1){if(c+=" , message: 'should be ",k)c+=""+E.join(",");else c+=""+E;c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+J+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+F+" ";c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&O)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";c+=" } "}}if(O){if(c+=" if (errors === ",L)c+="0";else c+="errs_"+m;c+=") { ",I+="}"}}}}if(O)c+=" "+I+" ";if(L){if(l)c+=" if (errors === 0) return data; ",c+=" else throw new ValidationError(vErrors); ";else c+=" validate.errors = vErrors; ",c+=" return errors === 0; ";c+=" }; return validate;"}else c+=" var "+D+" = errors === errs_"+m+";";function ai(ya){var di=ya.rules;for(var Ki=0;Ki<di.length;Ki++)if(ka(di[Ki]))return!0}function ka(ya){return a.schema[ya.keyword]!==void 0||ya.implements&&ga(ya)}function ga(ya){var di=ya.implements;for(var Ki=0;Ki<di.length;Ki++)if(a.schema[di[Ki]]!==void 0)return!0}return c}});var $Q=U((vq,HQ)=>{var mp=fp(),Jp=Bv(),VQ=wp(),nL=Tx(),PQ=kx(),cL=Jp.ucs2length,vL=np(),lL=VQ.Validation;HQ.exports=Cx;function Cx(i,a,n,v){var c=this,l=this._opts,x=[void 0],u={},f=[],w={},m=[],W={},Y=[];a=a||{schema:i,refVal:x,refs:u};var J=pL.call(this,i,a,v),X=this._compilations[J.index];if(J.compiling)return X.callValidate=$;var F=this._formats,K=this.RULES;try{var M=D(i,a,n,v);X.validate=M;var L=X.callValidate;if(L){if(L.schema=M.schema,L.errors=null,L.refs=M.refs,L.refVal=M.refVal,L.root=M.root,L.$async=M.$async,l.sourceCode)L.source=M.source}return M}finally{xL.call(this,i,a,v)}function $(){var R=X.validate,b=R.apply(this,arguments);return $.errors=R.errors,b}function D(R,b,T,Wa){var xa=!b||b&&b.schema==R;if(b.schema!=a.schema)return Cx.call(c,R,b,T,Wa);var Ja=R.$async===!0,pa=PQ({isTop:!0,schema:R,isRoot:xa,baseId:Wa,root:b,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:VQ.MissingRef,RULES:K,validate:PQ,util:Jp,resolve:mp,resolveRef:O,usePattern:k,useDefault:y,useCustomRule:C,opts:l,formats:F,logger:c.logger,self:c});if(pa=Qp(x,wL)+Qp(f,uL)+Qp(m,fL)+Qp(Y,mL)+pa,l.processCode)pa=l.processCode(pa,R);var e;try{var oa=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",pa);e=oa(c,K,F,a,x,m,Y,vL,cL,lL),x[0]=e}catch(vi){throw c.logger.error("Error compiling schema, function code:",pa),vi}if(e.schema=R,e.errors=null,e.refs=u,e.refVal=x,e.root=xa?e:b,Ja)e.$async=!0;if(l.sourceCode===!0)e.source={code:pa,patterns:f,defaults:m};return e}function O(R,b,T){b=mp.url(R,b);var Wa=u[b],xa,Ja;if(Wa!==void 0)return xa=x[Wa],Ja="refVal["+Wa+"]",E(xa,Ja);if(!T&&a.refs){var pa=a.refs[b];if(pa!==void 0)return xa=a.refVal[pa],Ja=j(b,xa),E(xa,Ja)}Ja=j(b);var e=mp.call(c,D,a,b);if(e===void 0){var oa=n&&n[b];if(oa)e=mp.inlineRef(oa,l.inlineRefs)?oa:Cx.call(c,oa,a,n,R)}if(e===void 0)I(b);else return g(b,e),E(e,Ja)}function j(R,b){var T=x.length;return x[T]=b,u[R]=T,"refVal"+T}function I(R){delete u[R]}function g(R,b){var T=u[R];x[T]=b}function E(R,b){return typeof R=="object"||typeof R=="boolean"?{code:b,schema:R,inline:!0}:{code:b,$async:R&&!!R.$async}}function k(R){var b=w[R];if(b===void 0)b=w[R]=f.length,f[b]=R;return"pattern"+b}function y(R){switch(typeof R){case"boolean":case"number":return""+R;case"string":return Jp.toQuotedString(R);case"object":if(R===null)return"null";var b=nL(R),T=W[b];if(T===void 0)T=W[b]=m.length,m[T]=R;return"default"+T}}function C(R,b,T,Wa){if(c._opts.validateSchema!==!1){var xa=R.definition.dependencies;if(xa&&!xa.every(function(ta){return Object.prototype.hasOwnProperty.call(T,ta)}))throw new Error("parent schema must have all required keywords: "+xa.join(","));var Ja=R.definition.validateSchema;if(Ja){var pa=Ja(b);if(!pa){var e="keyword schema is invalid: "+c.errorsText(Ja.errors);if(c._opts.validateSchema=="log")c.logger.error(e);else throw new Error(e)}}}var oa=R.definition.compile,vi=R.definition.inline,Ji=R.definition.macro,ua;if(oa)ua=oa.call(c,b,T,Wa);else if(Ji){if(ua=Ji.call(c,b,T,Wa),l.validateSchema!==!1)c.validateSchema(ua,!0)}else if(vi)ua=vi.call(c,Wa,R.keyword,b,T);else if(ua=R.definition.validate,!ua)return;if(ua===void 0)throw new Error('custom keyword "'+R.keyword+'"failed to compile');var $a=Y.length;return Y[$a]=ua,{code:"customRule"+$a,validate:ua}}}function pL(i,a,n){var v=MQ.call(this,i,a,n);if(v>=0)return{index:v,compiling:!0};return v=this._compilations.length,this._compilations[v]={schema:i,root:a,baseId:n},{index:v,compiling:!1}}function xL(i,a,n){var v=MQ.call(this,i,a,n);if(v>=0)this._compilations.splice(v,1)}function MQ(i,a,n){for(var v=0;v<this._compilations.length;v++){var c=this._compilations[v];if(c.schema==i&&c.root==a&&c.baseId==n)return v}return-1}function uL(i,a){return"var pattern"+i+" = new RegExp("+Jp.toQuotedString(a[i])+");"}function fL(i){return"var default"+i+" = defaults["+i+"];"}function wL(i,a){return a[i]===void 0?"":"var refVal"+i+" = refVal["+i+"];"}function mL(i){return"var customRule"+i+" = customRules["+i+"];"}function Qp(i,a){if(!i.length)return"";var n="";for(var v=0;v<i.length;v++)n+=a(v,i);return n}});var UQ=U((lq,BQ)=>{var Wp=BQ.exports=function i(){this._cache={}};Wp.prototype.put=function i(a,n){this._cache[a]=n};Wp.prototype.get=function i(a){return this._cache[a]};Wp.prototype.del=function i(a){delete this._cache[a]};Wp.prototype.clear=function i(){this._cache={}}});var bQ=U((pq,EQ)=>{var QL=Bv(),JL=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,WL=[0,31,28,31,30,31,30,31,31,30,31,30,31],YL=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,hQ=/^(?=.{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,zL=/^(?:[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,XL=/^(?:[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,LQ=/^(?:(?:[^\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,DQ=/^(?:(?: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,OQ=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,NQ=/^(?:\/(?:[^~/]|~0|~1)*)*$/,AQ=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,qQ=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;EQ.exports=Yp;function Yp(i){return i=i=="full"?"full":"fast",QL.copy(Yp[i])}Yp.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":LQ,url:DQ,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:hQ,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:oQ,uuid:OQ,"json-pointer":NQ,"json-pointer-uri-fragment":AQ,"relative-json-pointer":qQ};Yp.full={date:jQ,time:RQ,"date-time":FL,uri:VL,"uri-reference":XL,"uri-template":LQ,url:DQ,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:hQ,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:oQ,uuid:OQ,"json-pointer":NQ,"json-pointer-uri-fragment":AQ,"relative-json-pointer":qQ};function GL(i){return i%4===0&&(i%100!==0||i%400===0)}function jQ(i){var a=i.match(JL);if(!a)return!1;var n=+a[1],v=+a[2],c=+a[3];return v>=1&&v<=12&&c>=1&&c<=(v==2&&GL(n)?29:WL[v])}function RQ(i,a){var n=i.match(YL);if(!n)return!1;var v=n[1],c=n[2],l=n[3],x=n[5];return(v<=23&&c<=59&&l<=59||v==23&&c==59&&l==60)&&(!a||x)}var KL=/t|\s/i;function FL(i){var a=i.split(KL);return a.length==2&&jQ(a[0])&&RQ(a[1],!0)}var PL=/\/|:/;function VL(i){return PL.test(i)&&zL.test(i)}var ML=/[^\\]\\Z/;function oQ(i){if(ML.test(i))return!1;try{return new RegExp(i),!0}catch(a){return!1}}});var ZQ=U((xq,_Q)=>{_Q.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.errSchemaPath+"/"+n,w=!a.opts.allErrors,m="data"+(x||""),W="valid"+l,Y,J;if(u=="#"||u=="#/")if(a.isRoot)Y=a.async,J="validate";else Y=a.root.schema.$async===!0,J="root.refVal[0]";else{var X=a.resolveRef(a.baseId,u,a.isRoot);if(X===void 0){var F=a.MissingRefError.message(a.baseId,u);if(a.opts.missingRefs=="fail"){a.logger.error(F);var K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(f)+" , params: { ref: '"+a.util.escapeQuotes(u)+"' } ",a.opts.messages!==!1)c+=" , message: 'can\\'t resolve reference "+a.util.escapeQuotes(u)+"' ";if(a.opts.verbose)c+=" , schema: "+a.util.toQuotedString(u)+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+m+" ";c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&w)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(w)c+=" if (false) { "}else if(a.opts.missingRefs=="ignore"){if(a.logger.warn(F),w)c+=" if (true) { "}else throw new a.MissingRefError(a.baseId,u,F)}else if(X.inline){var L=a.util.copy(a);L.level++;var $="valid"+L.level;L.schema=X.schema,L.schemaPath="",L.errSchemaPath=u;var D=a.validate(L).replace(/validate\.schema/g,X.code);if(c+=" "+D+" ",w)c+=" if ("+$+") { "}else Y=X.$async===!0||a.async&&X.$async!==!1,J=X.code}if(J){var K=K||[];if(K.push(c),c="",a.opts.passContext)c+=" "+J+".call(this, ";else c+=" "+J+"( ";if(c+=" "+m+", (dataPath || '')",a.errorPath!='""')c+=" + "+a.errorPath;var O=x?"data"+(x-1||""):"parentData",j=x?a.dataPathArr[x]:"parentDataProperty";c+=" , "+O+" , "+j+", rootData) ";var I=c;if(c=K.pop(),Y){if(!a.async)throw new Error("async schema referenced by sync schema");if(w)c+=" var "+W+"; ";if(c+=" try { await "+I+"; ",w)c+=" "+W+" = true; ";if(c+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",w)c+=" "+W+" = false; ";if(c+=" } ",w)c+=" if ("+W+") { "}else if(c+=" if (!"+I+") { if (vErrors === null) vErrors = "+J+".errors; else vErrors = vErrors.concat("+J+".errors); errors = vErrors.length; } ",w)c+=" else { "}return c}});var IQ=U((uq,gQ)=>{gQ.exports=function i(a,n,v){var c=" ",l=a.schema[n],x=a.schemaPath+a.util.getProperty(n),u=a.errSchemaPath+"/"+n,f=!a.opts.allErrors,w=a.util.copy(a),m="";w.level++;var W="valid"+w.level,Y=w.baseId,J=!0,X=l;if(X){var F,K=-1,M=X.length-1;while(K<M)if(F=X[K+=1],a.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:a.util.schemaHasRules(F,a.RULES.all)){if(J=!1,w.schema=F,w.schemaPath=x+"["+K+"]",w.errSchemaPath=u+"/"+K,c+=" "+a.validate(w)+" ",w.baseId=Y,f)c+=" if ("+W+") { ",m+="}"}}if(f)if(J)c+=" if (true) { ";else c+=" "+m.slice(0,-1)+" ";return c}});var TQ=U((fq,SQ)=>{SQ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J="errs__"+l,X=a.util.copy(a),F="";X.level++;var K="valid"+X.level,M=u.every(function(g){return a.opts.strictKeywords?typeof g=="object"&&Object.keys(g).length>0||g===!1:a.util.schemaHasRules(g,a.RULES.all)});if(M){var L=X.baseId;c+=" var "+J+" = errors; var "+Y+" = false; ";var $=a.compositeRule;a.compositeRule=X.compositeRule=!0;var D=u;if(D){var O,j=-1,I=D.length-1;while(j<I)O=D[j+=1],X.schema=O,X.schemaPath=f+"["+j+"]",X.errSchemaPath=w+"/"+j,c+=" "+a.validate(X)+" ",X.baseId=L,c+=" "+Y+" = "+Y+" || "+K+"; if (!"+Y+") { ",F+="}"}if(a.compositeRule=X.compositeRule=$,c+=" "+F+" if (!"+Y+") { var err = ",a.createErrors!==!1){if(c+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: {} ",a.opts.messages!==!1)c+=" , message: 'should match some schema in anyOf' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";if(c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(vErrors); ";else c+=" validate.errors = vErrors; return false; ";if(c+=" } else { errors = "+J+"; if (vErrors !== null) { if ("+J+") vErrors.length = "+J+"; else vErrors = null; } ",a.opts.allErrors)c+=" } "}else if(m)c+=" if (true) { ";return c}});var CQ=U((wq,kQ)=>{kQ.exports=function i(a,n,v){var c=" ",l=a.schema[n],x=a.errSchemaPath+"/"+n,u=!a.opts.allErrors,f=a.util.toQuotedString(l);if(a.opts.$comment===!0)c+=" console.log("+f+");";else if(typeof a.opts.$comment=="function")c+=" self._opts.$comment("+f+", "+a.util.toQuotedString(x)+", validate.root.schema);";return c}});var yQ=U((mq,sQ)=>{sQ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J=a.opts.$data&&u&&u.$data,X;if(J)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",X="schema"+l;else X=u;if(!J)c+=" var schema"+l+" = validate.schema"+f+";";c+="var "+Y+" = equal("+W+", schema"+l+"); if (!"+Y+") { ";var F=F||[];if(F.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'const' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { allowedValue: schema"+l+" } ",a.opts.messages!==!1)c+=" , message: 'should be equal to constant' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var K=c;if(c=F.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+K+"]); ";else c+=" validate.errors = ["+K+"]; return false; ";else c+=" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" }",m)c+=" else { ";return c}});var dQ=U((Qq,rQ)=>{rQ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J="errs__"+l,X=a.util.copy(a),F="";X.level++;var K="valid"+X.level,M="i"+l,L=X.dataLevel=a.dataLevel+1,$="data"+L,D=a.baseId,O=a.opts.strictKeywords?typeof u=="object"&&Object.keys(u).length>0||u===!1:a.util.schemaHasRules(u,a.RULES.all);if(c+="var "+J+" = errors;var "+Y+";",O){var j=a.compositeRule;a.compositeRule=X.compositeRule=!0,X.schema=u,X.schemaPath=f,X.errSchemaPath=w,c+=" var "+K+" = false; for (var "+M+" = 0; "+M+" < "+W+".length; "+M+"++) { ",X.errorPath=a.util.getPathExpr(a.errorPath,M,a.opts.jsonPointers,!0);var I=W+"["+M+"]";X.dataPathArr[L]=M;var g=a.validate(X);if(X.baseId=D,a.util.varOccurences(g,$)<2)c+=" "+a.util.varReplace(g,$,I)+" ";else c+=" var "+$+" = "+I+"; "+g+" ";c+=" if ("+K+") break; } ",a.compositeRule=X.compositeRule=j,c+=" "+F+" if (!"+K+") {"}else c+=" if ("+W+".length == 0) {";var E=E||[];if(E.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: {} ",a.opts.messages!==!1)c+=" , message: 'should contain a valid item' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var k=c;if(c=E.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+k+"]); ";else c+=" validate.errors = ["+k+"]; return false; ";else c+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" } else { ",O)c+=" errors = "+J+"; if (vErrors !== null) { if ("+J+") vErrors.length = "+J+"; else vErrors = null; } ";if(a.opts.allErrors)c+=" } ";return c}});var eQ=U((Jq,tQ)=>{tQ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="errs__"+l,J=a.util.copy(a),X="";J.level++;var F="valid"+J.level,K={},M={},L=a.opts.ownProperties;for(j in u){if(j=="__proto__")continue;var $=u[j],D=Array.isArray($)?M:K;D[j]=$}c+="var "+Y+" = errors;";var O=a.errorPath;c+="var missing"+l+";";for(var j in M)if(D=M[j],D.length){if(c+=" if ( "+W+a.util.getProperty(j)+" !== undefined ",L)c+=" && Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(j)+"') ";if(m){c+=" && ( ";var I=D;if(I){var g,E=-1,k=I.length-1;while(E<k){if(g=I[E+=1],E)c+=" || ";var y=a.util.getProperty(g),C=W+y;if(c+=" ( ( "+C+" === undefined ",L)c+=" || ! Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(g)+"') ";c+=") && (missing"+l+" = "+a.util.toQuotedString(a.opts.jsonPointers?g:y)+") ) "}}c+=")) { ";var R="missing"+l,b="' + "+R+" + '";if(a.opts._errorDataPathProperty)a.errorPath=a.opts.jsonPointers?a.util.getPathExpr(O,R,!0):O+" + "+R;var T=T||[];if(T.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { property: '"+a.util.escapeQuotes(j)+"', missingProperty: '"+b+"', depsCount: "+D.length+", deps: '"+a.util.escapeQuotes(D.length==1?D[0]:D.join(", "))+"' } ",a.opts.messages!==!1){if(c+=" , message: 'should have ",D.length==1)c+="property "+a.util.escapeQuotes(D[0]);else c+="properties "+a.util.escapeQuotes(D.join(", "));c+=" when property "+a.util.escapeQuotes(j)+" is present' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var Wa=c;if(c=T.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+Wa+"]); ";else c+=" validate.errors = ["+Wa+"]; return false; ";else c+=" var err = "+Wa+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{c+=" ) { ";var xa=D;if(xa){var g,Ja=-1,pa=xa.length-1;while(Ja<pa){g=xa[Ja+=1];var y=a.util.getProperty(g),b=a.util.escapeQuotes(g),C=W+y;if(a.opts._errorDataPathProperty)a.errorPath=a.util.getPath(O,g,a.opts.jsonPointers);if(c+=" if ( "+C+" === undefined ",L)c+=" || ! Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(g)+"') ";if(c+=") { var err = ",a.createErrors!==!1){if(c+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { property: '"+a.util.escapeQuotes(j)+"', missingProperty: '"+b+"', depsCount: "+D.length+", deps: '"+a.util.escapeQuotes(D.length==1?D[0]:D.join(", "))+"' } ",a.opts.messages!==!1){if(c+=" , message: 'should have ",D.length==1)c+="property "+a.util.escapeQuotes(D[0]);else c+="properties "+a.util.escapeQuotes(D.join(", "));c+=" when property "+a.util.escapeQuotes(j)+" is present' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}}if(c+=" } ",m)X+="}",c+=" else { "}a.errorPath=O;var e=J.baseId;for(var j in K){var $=K[j];if(a.opts.strictKeywords?typeof $=="object"&&Object.keys($).length>0||$===!1:a.util.schemaHasRules($,a.RULES.all)){if(c+=" "+F+" = true; if ( "+W+a.util.getProperty(j)+" !== undefined ",L)c+=" && Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(j)+"') ";if(c+=") { ",J.schema=$,J.schemaPath=f+a.util.getProperty(j),J.errSchemaPath=w+"/"+a.util.escapeFragment(j),c+=" "+a.validate(J)+" ",J.baseId=e,c+=" } ",m)c+=" if ("+F+") { ",X+="}"}}if(m)c+=" "+X+" if ("+Y+" == errors) {";return c}});var iJ=U((Wq,aJ)=>{aJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J=a.opts.$data&&u&&u.$data,X;if(J)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",X="schema"+l;else X=u;var F="i"+l,K="schema"+l;if(!J)c+=" var "+K+" = validate.schema"+f+";";if(c+="var "+Y+";",J)c+=" if (schema"+l+" === undefined) "+Y+" = true; else if (!Array.isArray(schema"+l+")) "+Y+" = false; else {";if(c+=""+Y+" = false;for (var "+F+"=0; "+F+"<"+K+".length; "+F+"++) if (equal("+W+", "+K+"["+F+"])) { "+Y+" = true; break; }",J)c+=" } ";c+=" if (!"+Y+") { ";var M=M||[];if(M.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { allowedValues: schema"+l+" } ",a.opts.messages!==!1)c+=" , message: 'should be equal to one of the allowed values' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var L=c;if(c=M.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+L+"]); ";else c+=" validate.errors = ["+L+"]; return false; ";else c+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" }",m)c+=" else { ";return c}});var cJ=U((Yq,nJ)=>{nJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||"");if(a.opts.format===!1){if(m)c+=" if (true) { ";return c}var Y=a.opts.$data&&u&&u.$data,J;if(Y)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",J="schema"+l;else J=u;var X=a.opts.unknownFormats,F=Array.isArray(X);if(Y){var K="format"+l,M="isObject"+l,L="formatType"+l;if(c+=" var "+K+" = formats["+J+"]; var "+M+" = typeof "+K+" == 'object' && !("+K+" instanceof RegExp) && "+K+".validate; var "+L+" = "+M+" && "+K+".type || 'string'; if ("+M+") { ",a.async)c+=" var async"+l+" = "+K+".async; ";if(c+=" "+K+" = "+K+".validate; } if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'string') || ";if(c+=" (",X!="ignore"){if(c+=" ("+J+" && !"+K+" ",F)c+=" && self._opts.unknownFormats.indexOf("+J+") == -1 ";c+=") || "}if(c+=" ("+K+" && "+L+" == '"+v+"' && !(typeof "+K+" == 'function' ? ",a.async)c+=" (async"+l+" ? await "+K+"("+W+") : "+K+"("+W+")) ";else c+=" "+K+"("+W+") ";c+=" : "+K+".test("+W+"))))) {"}else{var K=a.formats[u];if(!K)if(X=="ignore"){if(a.logger.warn('unknown format "'+u+'" ignored in schema at path "'+a.errSchemaPath+'"'),m)c+=" if (true) { ";return c}else if(F&&X.indexOf(u)>=0){if(m)c+=" if (true) { ";return c}else throw new Error('unknown format "'+u+'" is used in schema at path "'+a.errSchemaPath+'"');var M=typeof K=="object"&&!(K instanceof RegExp)&&K.validate,L=M&&K.type||"string";if(M){var $=K.async===!0;K=K.validate}if(L!=v){if(m)c+=" if (true) { ";return c}if($){if(!a.async)throw new Error("async format in sync schema");var D="formats"+a.util.getProperty(u)+".validate";c+=" if (!(await "+D+"("+W+"))) { "}else{c+=" if (! ";var D="formats"+a.util.getProperty(u);if(M)D+=".validate";if(typeof K=="function")c+=" "+D+"("+W+") ";else c+=" "+D+".test("+W+") ";c+=") { "}}var O=O||[];if(O.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'format' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { format: ",Y)c+=""+J;else c+=""+a.util.toQuotedString(u);if(c+=" } ",a.opts.messages!==!1){if(c+=` , message: 'should match format "`,Y)c+="' + "+J+" + '";else c+=""+a.util.escapeQuotes(u);c+=`"' `}if(a.opts.verbose){if(c+=" , schema: ",Y)c+="validate.schema"+f;else c+=""+a.util.toQuotedString(u);c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var j=c;if(c=O.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+j+"]); ";else c+=" validate.errors = ["+j+"]; return false; ";else c+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" } ",m)c+=" else { ";return c}});var lJ=U((zq,vJ)=>{vJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J="errs__"+l,X=a.util.copy(a);X.level++;var F="valid"+X.level,K=a.schema.then,M=a.schema.else,L=K!==void 0&&(a.opts.strictKeywords?typeof K=="object"&&Object.keys(K).length>0||K===!1:a.util.schemaHasRules(K,a.RULES.all)),$=M!==void 0&&(a.opts.strictKeywords?typeof M=="object"&&Object.keys(M).length>0||M===!1:a.util.schemaHasRules(M,a.RULES.all)),D=X.baseId;if(L||$){var O;X.createErrors=!1,X.schema=u,X.schemaPath=f,X.errSchemaPath=w,c+=" var "+J+" = errors; var "+Y+" = true; ";var j=a.compositeRule;if(a.compositeRule=X.compositeRule=!0,c+=" "+a.validate(X)+" ",X.baseId=D,X.createErrors=!0,c+=" errors = "+J+"; if (vErrors !== null) { if ("+J+") vErrors.length = "+J+"; else vErrors = null; } ",a.compositeRule=X.compositeRule=j,L){if(c+=" if ("+F+") { ",X.schema=a.schema.then,X.schemaPath=a.schemaPath+".then",X.errSchemaPath=a.errSchemaPath+"/then",c+=" "+a.validate(X)+" ",X.baseId=D,c+=" "+Y+" = "+F+"; ",L&&$)O="ifClause"+l,c+=" var "+O+" = 'then'; ";else O="'then'";if(c+=" } ",$)c+=" else { "}else c+=" if (!"+F+") { ";if($){if(X.schema=a.schema.else,X.schemaPath=a.schemaPath+".else",X.errSchemaPath=a.errSchemaPath+"/else",c+=" "+a.validate(X)+" ",X.baseId=D,c+=" "+Y+" = "+F+"; ",L&&$)O="ifClause"+l,c+=" var "+O+" = 'else'; ";else O="'else'";c+=" } "}if(c+=" if (!"+Y+") { var err = ",a.createErrors!==!1){if(c+=" { keyword: 'if' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { failingKeyword: "+O+" } ",a.opts.messages!==!1)c+=` , message: 'should match "' + `+O+` + '" schema' `;if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";if(c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(vErrors); ";else c+=" validate.errors = vErrors; return false; ";if(c+=" } ",m)c+=" else { "}else if(m)c+=" if (true) { ";return c}});var xJ=U((Xq,pJ)=>{pJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J="errs__"+l,X=a.util.copy(a),F="";X.level++;var K="valid"+X.level,M="i"+l,L=X.dataLevel=a.dataLevel+1,$="data"+L,D=a.baseId;if(c+="var "+J+" = errors;var "+Y+";",Array.isArray(u)){var O=a.schema.additionalItems;if(O===!1){c+=" "+Y+" = "+W+".length <= "+u.length+"; ";var j=w;w=a.errSchemaPath+"/additionalItems",c+=" if (!"+Y+") { ";var I=I||[];if(I.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { limit: "+u.length+" } ",a.opts.messages!==!1)c+=" , message: 'should NOT have more than "+u.length+" items' ";if(a.opts.verbose)c+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var g=c;if(c=I.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+g+"]); ";else c+=" validate.errors = ["+g+"]; return false; ";else c+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" } ",w=j,m)F+="}",c+=" else { "}var E=u;if(E){var k,y=-1,C=E.length-1;while(y<C)if(k=E[y+=1],a.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:a.util.schemaHasRules(k,a.RULES.all)){c+=" "+K+" = true; if ("+W+".length > "+y+") { ";var R=W+"["+y+"]";X.schema=k,X.schemaPath=f+"["+y+"]",X.errSchemaPath=w+"/"+y,X.errorPath=a.util.getPathExpr(a.errorPath,y,a.opts.jsonPointers,!0),X.dataPathArr[L]=y;var b=a.validate(X);if(X.baseId=D,a.util.varOccurences(b,$)<2)c+=" "+a.util.varReplace(b,$,R)+" ";else c+=" var "+$+" = "+R+"; "+b+" ";if(c+=" } ",m)c+=" if ("+K+") { ",F+="}"}}if(typeof O=="object"&&(a.opts.strictKeywords?typeof O=="object"&&Object.keys(O).length>0||O===!1:a.util.schemaHasRules(O,a.RULES.all))){X.schema=O,X.schemaPath=a.schemaPath+".additionalItems",X.errSchemaPath=a.errSchemaPath+"/additionalItems",c+=" "+K+" = true; if ("+W+".length > "+u.length+") { for (var "+M+" = "+u.length+"; "+M+" < "+W+".length; "+M+"++) { ",X.errorPath=a.util.getPathExpr(a.errorPath,M,a.opts.jsonPointers,!0);var R=W+"["+M+"]";X.dataPathArr[L]=M;var b=a.validate(X);if(X.baseId=D,a.util.varOccurences(b,$)<2)c+=" "+a.util.varReplace(b,$,R)+" ";else c+=" var "+$+" = "+R+"; "+b+" ";if(m)c+=" if (!"+K+") break; ";if(c+=" } } ",m)c+=" if ("+K+") { ",F+="}"}}else if(a.opts.strictKeywords?typeof u=="object"&&Object.keys(u).length>0||u===!1:a.util.schemaHasRules(u,a.RULES.all)){X.schema=u,X.schemaPath=f,X.errSchemaPath=w,c+=" for (var "+M+" = 0; "+M+" < "+W+".length; "+M+"++) { ",X.errorPath=a.util.getPathExpr(a.errorPath,M,a.opts.jsonPointers,!0);var R=W+"["+M+"]";X.dataPathArr[L]=M;var b=a.validate(X);if(X.baseId=D,a.util.varOccurences(b,$)<2)c+=" "+a.util.varReplace(b,$,R)+" ";else c+=" var "+$+" = "+R+"; "+b+" ";if(m)c+=" if (!"+K+") break; ";c+=" }"}if(m)c+=" "+F+" if ("+J+" == errors) {";return c}});var sx=U((Gq,uJ)=>{uJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,D,W="data"+(x||""),Y=a.opts.$data&&u&&u.$data,J;if(Y)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",J="schema"+l;else J=u;var X=n=="maximum",F=X?"exclusiveMaximum":"exclusiveMinimum",K=a.schema[F],M=a.opts.$data&&K&&K.$data,L=X?"<":">",$=X?">":"<",D=void 0;if(!(Y||typeof u=="number"||u===void 0))throw new Error(n+" must be number");if(!(M||K===void 0||typeof K=="number"||typeof K=="boolean"))throw new Error(F+" must be number or boolean");if(M){var O=a.util.getData(K.$data,x,a.dataPathArr),j="exclusive"+l,I="exclType"+l,g="exclIsNumber"+l,E="op"+l,k="' + "+E+" + '";c+=" var schemaExcl"+l+" = "+O+"; ",O="schemaExcl"+l,c+=" var "+j+"; var "+I+" = typeof "+O+"; if ("+I+" != 'boolean' && "+I+" != 'undefined' && "+I+" != 'number') { ";var D=F,y=y||[];if(y.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(D||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: {} ",a.opts.messages!==!1)c+=" , message: '"+F+" should be boolean' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var C=c;if(c=y.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+C+"]); ";else c+=" validate.errors = ["+C+"]; return false; ";else c+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" } else if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'number') || ";if(c+=" "+I+" == 'number' ? ( ("+j+" = "+J+" === undefined || "+O+" "+L+"= "+J+") ? "+W+" "+$+"= "+O+" : "+W+" "+$+" "+J+" ) : ( ("+j+" = "+O+" === true) ? "+W+" "+$+"= "+J+" : "+W+" "+$+" "+J+" ) || "+W+" !== "+W+") { var op"+l+" = "+j+" ? '"+L+"' : '"+L+"='; ",u===void 0)D=F,w=a.errSchemaPath+"/"+F,J=O,Y=M}else{var g=typeof K=="number",k=L;if(g&&Y){var E="'"+k+"'";if(c+=" if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'number') || ";c+=" ( "+J+" === undefined || "+K+" "+L+"= "+J+" ? "+W+" "+$+"= "+K+" : "+W+" "+$+" "+J+" ) || "+W+" !== "+W+") { "}else{if(g&&u===void 0)j=!0,D=F,w=a.errSchemaPath+"/"+F,J=K,$+="=";else{if(g)J=Math[X?"min":"max"](K,u);if(K===(g?J:!0))j=!0,D=F,w=a.errSchemaPath+"/"+F,$+="=";else j=!1,k+="="}var E="'"+k+"'";if(c+=" if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'number') || ";c+=" "+W+" "+$+" "+J+" || "+W+" !== "+W+") { "}}D=D||n;var y=y||[];if(y.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(D||"_limit")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { comparison: "+E+", limit: "+J+", exclusive: "+j+" } ",a.opts.messages!==!1)if(c+=" , message: 'should be "+k+" ",Y)c+="' + "+J;else c+=""+J+"'";if(a.opts.verbose){if(c+=" , schema: ",Y)c+="validate.schema"+f;else c+=""+u;c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var C=c;if(c=y.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+C+"]); ";else c+=" validate.errors = ["+C+"]; return false; ";else c+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" } ",m)c+=" else { ";return c}});var yx=U((Kq,fJ)=>{fJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,F,W="data"+(x||""),Y=a.opts.$data&&u&&u.$data,J;if(Y)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",J="schema"+l;else J=u;if(!(Y||typeof u=="number"))throw new Error(n+" must be number");var X=n=="maxItems"?">":"<";if(c+="if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'number') || ";c+=" "+W+".length "+X+" "+J+") { ";var F=n,K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(F||"_limitItems")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { limit: "+J+" } ",a.opts.messages!==!1){if(c+=" , message: 'should NOT have ",n=="maxItems")c+="more";else c+="fewer";if(c+=" than ",Y)c+="' + "+J+" + '";else c+=""+u;c+=" items' "}if(a.opts.verbose){if(c+=" , schema: ",Y)c+="validate.schema"+f;else c+=""+u;c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+="} ",m)c+=" else { ";return c}});var rx=U((Fq,wJ)=>{wJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,F,W="data"+(x||""),Y=a.opts.$data&&u&&u.$data,J;if(Y)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",J="schema"+l;else J=u;if(!(Y||typeof u=="number"))throw new Error(n+" must be number");var X=n=="maxLength"?">":"<";if(c+="if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'number') || ";if(a.opts.unicode===!1)c+=" "+W+".length ";else c+=" ucs2length("+W+") ";c+=" "+X+" "+J+") { ";var F=n,K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(F||"_limitLength")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { limit: "+J+" } ",a.opts.messages!==!1){if(c+=" , message: 'should NOT be ",n=="maxLength")c+="longer";else c+="shorter";if(c+=" than ",Y)c+="' + "+J+" + '";else c+=""+u;c+=" characters' "}if(a.opts.verbose){if(c+=" , schema: ",Y)c+="validate.schema"+f;else c+=""+u;c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+="} ",m)c+=" else { ";return c}});var dx=U((Pq,mJ)=>{mJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,F,W="data"+(x||""),Y=a.opts.$data&&u&&u.$data,J;if(Y)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",J="schema"+l;else J=u;if(!(Y||typeof u=="number"))throw new Error(n+" must be number");var X=n=="maxProperties"?">":"<";if(c+="if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'number') || ";c+=" Object.keys("+W+").length "+X+" "+J+") { ";var F=n,K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(F||"_limitProperties")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { limit: "+J+" } ",a.opts.messages!==!1){if(c+=" , message: 'should NOT have ",n=="maxProperties")c+="more";else c+="fewer";if(c+=" than ",Y)c+="' + "+J+" + '";else c+=""+u;c+=" properties' "}if(a.opts.verbose){if(c+=" , schema: ",Y)c+="validate.schema"+f;else c+=""+u;c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+="} ",m)c+=" else { ";return c}});var JJ=U((Vq,QJ)=>{QJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y=a.opts.$data&&u&&u.$data,J;if(Y)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",J="schema"+l;else J=u;if(!(Y||typeof u=="number"))throw new Error(n+" must be number");if(c+="var division"+l+";if (",Y)c+=" "+J+" !== undefined && ( typeof "+J+" != 'number' || ";if(c+=" (division"+l+" = "+W+" / "+J+", ",a.opts.multipleOfPrecision)c+=" Math.abs(Math.round(division"+l+") - division"+l+") > 1e-"+a.opts.multipleOfPrecision+" ";else c+=" division"+l+" !== parseInt(division"+l+") ";if(c+=" ) ",Y)c+=" ) ";c+=" ) { ";var X=X||[];if(X.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { multipleOf: "+J+" } ",a.opts.messages!==!1)if(c+=" , message: 'should be multiple of ",Y)c+="' + "+J;else c+=""+J+"'";if(a.opts.verbose){if(c+=" , schema: ",Y)c+="validate.schema"+f;else c+=""+u;c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var F=c;if(c=X.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+F+"]); ";else c+=" validate.errors = ["+F+"]; return false; ";else c+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+="} ",m)c+=" else { ";return c}});var YJ=U((Mq,WJ)=>{WJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="errs__"+l,J=a.util.copy(a);J.level++;var X="valid"+J.level;if(a.opts.strictKeywords?typeof u=="object"&&Object.keys(u).length>0||u===!1:a.util.schemaHasRules(u,a.RULES.all)){J.schema=u,J.schemaPath=f,J.errSchemaPath=w,c+=" var "+Y+" = errors; ";var F=a.compositeRule;a.compositeRule=J.compositeRule=!0,J.createErrors=!1;var K;if(J.opts.allErrors)K=J.opts.allErrors,J.opts.allErrors=!1;if(c+=" "+a.validate(J)+" ",J.createErrors=!0,K)J.opts.allErrors=K;a.compositeRule=J.compositeRule=F,c+=" if ("+X+") { ";var M=M||[];if(M.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'not' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: {} ",a.opts.messages!==!1)c+=" , message: 'should NOT be valid' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var L=c;if(c=M.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+L+"]); ";else c+=" validate.errors = ["+L+"]; return false; ";else c+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" } else { errors = "+Y+"; if (vErrors !== null) { if ("+Y+") vErrors.length = "+Y+"; else vErrors = null; } ",a.opts.allErrors)c+=" } "}else{if(c+=" var err = ",a.createErrors!==!1){if(c+=" { keyword: 'not' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: {} ",a.opts.messages!==!1)c+=" , message: 'should NOT be valid' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";if(c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",m)c+=" if (false) { "}return c}});var XJ=U((Hq,zJ)=>{zJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J="errs__"+l,X=a.util.copy(a),F="";X.level++;var K="valid"+X.level,M=X.baseId,L="prevValid"+l,$="passingSchemas"+l;c+="var "+J+" = errors , "+L+" = false , "+Y+" = false , "+$+" = null; ";var D=a.compositeRule;a.compositeRule=X.compositeRule=!0;var O=u;if(O){var j,I=-1,g=O.length-1;while(I<g){if(j=O[I+=1],a.opts.strictKeywords?typeof j=="object"&&Object.keys(j).length>0||j===!1:a.util.schemaHasRules(j,a.RULES.all))X.schema=j,X.schemaPath=f+"["+I+"]",X.errSchemaPath=w+"/"+I,c+=" "+a.validate(X)+" ",X.baseId=M;else c+=" var "+K+" = true; ";if(I)c+=" if ("+K+" && "+L+") { "+Y+" = false; "+$+" = ["+$+", "+I+"]; } else { ",F+="}";c+=" if ("+K+") { "+Y+" = "+L+" = true; "+$+" = "+I+"; }"}}if(a.compositeRule=X.compositeRule=D,c+=""+F+"if (!"+Y+") { var err = ",a.createErrors!==!1){if(c+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { passingSchemas: "+$+" } ",a.opts.messages!==!1)c+=" , message: 'should match exactly one schema in oneOf' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";if(c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(vErrors); ";else c+=" validate.errors = vErrors; return false; ";if(c+="} else { errors = "+J+"; if (vErrors !== null) { if ("+J+") vErrors.length = "+J+"; else vErrors = null; }",a.opts.allErrors)c+=" } ";return c}});var KJ=U(($q,GJ)=>{GJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y=a.opts.$data&&u&&u.$data,J;if(Y)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",J="schema"+l;else J=u;var X=Y?"(new RegExp("+J+"))":a.usePattern(u);if(c+="if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'string') || ";c+=" !"+X+".test("+W+") ) { ";var F=F||[];if(F.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { pattern: ",Y)c+=""+J;else c+=""+a.util.toQuotedString(u);if(c+=" } ",a.opts.messages!==!1){if(c+=` , message: 'should match pattern "`,Y)c+="' + "+J+" + '";else c+=""+a.util.escapeQuotes(u);c+=`"' `}if(a.opts.verbose){if(c+=" , schema: ",Y)c+="validate.schema"+f;else c+=""+a.util.toQuotedString(u);c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var K=c;if(c=F.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+K+"]); ";else c+=" validate.errors = ["+K+"]; return false; ";else c+=" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+="} ",m)c+=" else { ";return c}});var PJ=U((Bq,FJ)=>{FJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="errs__"+l,J=a.util.copy(a),X="";J.level++;var F="valid"+J.level,K="key"+l,M="idx"+l,L=J.dataLevel=a.dataLevel+1,$="data"+L,D="dataProperties"+l,O=Object.keys(u||{}).filter(Ja),j=a.schema.patternProperties||{},I=Object.keys(j).filter(Ja),g=a.schema.additionalProperties,E=O.length||I.length,k=g===!1,y=typeof g=="object"&&Object.keys(g).length,C=a.opts.removeAdditional,R=k||y||C,b=a.opts.ownProperties,T=a.baseId,Wa=a.schema.required;if(Wa&&!(a.opts.$data&&Wa.$data)&&Wa.length<a.opts.loopRequired)var xa=a.util.toHash(Wa);function Ja(Ui){return Ui!=="__proto__"}if(c+="var "+Y+" = errors;var "+F+" = true;",b)c+=" var "+D+" = undefined;";if(R){if(b)c+=" "+D+" = "+D+" || Object.keys("+W+"); for (var "+M+"=0; "+M+"<"+D+".length; "+M+"++) { var "+K+" = "+D+"["+M+"]; ";else c+=" for (var "+K+" in "+W+") { ";if(E){if(c+=" var isAdditional"+l+" = !(false ",O.length)if(O.length>8)c+=" || validate.schema"+f+".hasOwnProperty("+K+") ";else{var pa=O;if(pa){var e,oa=-1,vi=pa.length-1;while(oa<vi)e=pa[oa+=1],c+=" || "+K+" == "+a.util.toQuotedString(e)+" "}}if(I.length){var Ji=I;if(Ji){var ua,$a=-1,ta=Ji.length-1;while($a<ta)ua=Ji[$a+=1],c+=" || "+a.usePattern(ua)+".test("+K+") "}}c+=" ); if (isAdditional"+l+") { "}if(C=="all")c+=" delete "+W+"["+K+"]; ";else{var li=a.errorPath,pi="' + "+K+" + '";if(a.opts._errorDataPathProperty)a.errorPath=a.util.getPathExpr(a.errorPath,K,a.opts.jsonPointers);if(k)if(C)c+=" delete "+W+"["+K+"]; ";else{c+=" "+F+" = false; ";var bi=w;w=a.errSchemaPath+"/additionalProperties";var Za=Za||[];if(Za.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { additionalProperty: '"+pi+"' } ",a.opts.messages!==!1){if(c+=" , message: '",a.opts._errorDataPathProperty)c+="is an invalid additional property";else c+="should NOT have additional properties";c+="' "}if(a.opts.verbose)c+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var Ea=c;if(c=Za.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+Ea+"]); ";else c+=" validate.errors = ["+Ea+"]; return false; ";else c+=" var err = "+Ea+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(w=bi,m)c+=" break; "}else if(y)if(C=="failing"){c+=" var "+Y+" = errors; ";var yn=a.compositeRule;a.compositeRule=J.compositeRule=!0,J.schema=g,J.schemaPath=a.schemaPath+".additionalProperties",J.errSchemaPath=a.errSchemaPath+"/additionalProperties",J.errorPath=a.opts._errorDataPathProperty?a.errorPath:a.util.getPathExpr(a.errorPath,K,a.opts.jsonPointers);var ea=W+"["+K+"]";J.dataPathArr[L]=K;var Pa=a.validate(J);if(J.baseId=T,a.util.varOccurences(Pa,$)<2)c+=" "+a.util.varReplace(Pa,$,ea)+" ";else c+=" var "+$+" = "+ea+"; "+Pa+" ";c+=" if (!"+F+") { errors = "+Y+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+W+"["+K+"]; } ",a.compositeRule=J.compositeRule=yn}else{J.schema=g,J.schemaPath=a.schemaPath+".additionalProperties",J.errSchemaPath=a.errSchemaPath+"/additionalProperties",J.errorPath=a.opts._errorDataPathProperty?a.errorPath:a.util.getPathExpr(a.errorPath,K,a.opts.jsonPointers);var ea=W+"["+K+"]";J.dataPathArr[L]=K;var Pa=a.validate(J);if(J.baseId=T,a.util.varOccurences(Pa,$)<2)c+=" "+a.util.varReplace(Pa,$,ea)+" ";else c+=" var "+$+" = "+ea+"; "+Pa+" ";if(m)c+=" if (!"+F+") break; "}a.errorPath=li}if(E)c+=" } ";if(c+=" } ",m)c+=" if ("+F+") { ",X+="}"}var Bi=a.opts.useDefaults&&!a.compositeRule;if(O.length){var yi=O;if(yi){var e,Yn=-1,ri=yi.length-1;while(Yn<ri){e=yi[Yn+=1];var ai=u[e];if(a.opts.strictKeywords?typeof ai=="object"&&Object.keys(ai).length>0||ai===!1:a.util.schemaHasRules(ai,a.RULES.all)){var ka=a.util.getProperty(e),ea=W+ka,ga=Bi&&ai.default!==void 0;J.schema=ai,J.schemaPath=f+ka,J.errSchemaPath=w+"/"+a.util.escapeFragment(e),J.errorPath=a.util.getPath(a.errorPath,e,a.opts.jsonPointers),J.dataPathArr[L]=a.util.toQuotedString(e);var Pa=a.validate(J);if(J.baseId=T,a.util.varOccurences(Pa,$)<2){Pa=a.util.varReplace(Pa,$,ea);var ya=ea}else{var ya=$;c+=" var "+$+" = "+ea+"; "}if(ga)c+=" "+Pa+" ";else{if(xa&&xa[e]){if(c+=" if ( "+ya+" === undefined ",b)c+=" || ! Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(e)+"') ";c+=") { "+F+" = false; ";var li=a.errorPath,bi=w,di=a.util.escapeQuotes(e);if(a.opts._errorDataPathProperty)a.errorPath=a.util.getPath(li,e,a.opts.jsonPointers);w=a.errSchemaPath+"/required";var Za=Za||[];if(Za.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'required' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { missingProperty: '"+di+"' } ",a.opts.messages!==!1){if(c+=" , message: '",a.opts._errorDataPathProperty)c+="is a required property";else c+="should have required property \\'"+di+"\\'";c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var Ea=c;if(c=Za.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+Ea+"]); ";else c+=" validate.errors = ["+Ea+"]; return false; ";else c+=" var err = "+Ea+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";w=bi,a.errorPath=li,c+=" } else { "}else if(m){if(c+=" if ( "+ya+" === undefined ",b)c+=" || ! Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(e)+"') ";c+=") { "+F+" = true; } else { "}else{if(c+=" if ("+ya+" !== undefined ",b)c+=" && Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(e)+"') ";c+=" ) { "}c+=" "+Pa+" } "}}if(m)c+=" if ("+F+") { ",X+="}"}}}if(I.length){var Ki=I;if(Ki){var ua,rn=-1,R1=Ki.length-1;while(rn<R1){ua=Ki[rn+=1];var ai=j[ua];if(a.opts.strictKeywords?typeof ai=="object"&&Object.keys(ai).length>0||ai===!1:a.util.schemaHasRules(ai,a.RULES.all)){if(J.schema=ai,J.schemaPath=a.schemaPath+".patternProperties"+a.util.getProperty(ua),J.errSchemaPath=a.errSchemaPath+"/patternProperties/"+a.util.escapeFragment(ua),b)c+=" "+D+" = "+D+" || Object.keys("+W+"); for (var "+M+"=0; "+M+"<"+D+".length; "+M+"++) { var "+K+" = "+D+"["+M+"]; ";else c+=" for (var "+K+" in "+W+") { ";c+=" if ("+a.usePattern(ua)+".test("+K+")) { ",J.errorPath=a.util.getPathExpr(a.errorPath,K,a.opts.jsonPointers);var ea=W+"["+K+"]";J.dataPathArr[L]=K;var Pa=a.validate(J);if(J.baseId=T,a.util.varOccurences(Pa,$)<2)c+=" "+a.util.varReplace(Pa,$,ea)+" ";else c+=" var "+$+" = "+ea+"; "+Pa+" ";if(m)c+=" if (!"+F+") break; ";if(c+=" } ",m)c+=" else "+F+" = true; ";if(c+=" } ",m)c+=" if ("+F+") { ",X+="}"}}}}if(m)c+=" "+X+" if ("+Y+" == errors) {";return c}});var MJ=U((Uq,VJ)=>{VJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="errs__"+l,J=a.util.copy(a),X="";J.level++;var F="valid"+J.level;if(c+="var "+Y+" = errors;",a.opts.strictKeywords?typeof u=="object"&&Object.keys(u).length>0||u===!1:a.util.schemaHasRules(u,a.RULES.all)){J.schema=u,J.schemaPath=f,J.errSchemaPath=w;var K="key"+l,M="idx"+l,L="i"+l,$="' + "+K+" + '",D=J.dataLevel=a.dataLevel+1,O="data"+D,j="dataProperties"+l,I=a.opts.ownProperties,g=a.baseId;if(I)c+=" var "+j+" = undefined; ";if(I)c+=" "+j+" = "+j+" || Object.keys("+W+"); for (var "+M+"=0; "+M+"<"+j+".length; "+M+"++) { var "+K+" = "+j+"["+M+"]; ";else c+=" for (var "+K+" in "+W+") { ";c+=" var startErrs"+l+" = errors; ";var E=K,k=a.compositeRule;a.compositeRule=J.compositeRule=!0;var y=a.validate(J);if(J.baseId=g,a.util.varOccurences(y,O)<2)c+=" "+a.util.varReplace(y,O,E)+" ";else c+=" var "+O+" = "+E+"; "+y+" ";if(a.compositeRule=J.compositeRule=k,c+=" if (!"+F+") { for (var "+L+"=startErrs"+l+"; "+L+"<errors; "+L+"++) { vErrors["+L+"].propertyName = "+K+"; } var err = ",a.createErrors!==!1){if(c+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { propertyName: '"+$+"' } ",a.opts.messages!==!1)c+=" , message: 'property name \\'"+$+"\\' is invalid' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";if(c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(vErrors); ";else c+=" validate.errors = vErrors; return false; ";if(m)c+=" break; ";c+=" } }"}if(m)c+=" "+X+" if ("+Y+" == errors) {";return c}});var $J=U((hq,HJ)=>{HJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J=a.opts.$data&&u&&u.$data,X;if(J)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",X="schema"+l;else X=u;var F="schema"+l;if(!J)if(u.length<a.opts.loopRequired&&a.schema.properties&&Object.keys(a.schema.properties).length){var K=[],M=u;if(M){var L,$=-1,D=M.length-1;while($<D){L=M[$+=1];var O=a.schema.properties[L];if(!(O&&(a.opts.strictKeywords?typeof O=="object"&&Object.keys(O).length>0||O===!1:a.util.schemaHasRules(O,a.RULES.all))))K[K.length]=L}}}else var K=u;if(J||K.length){var j=a.errorPath,I=J||K.length>=a.opts.loopRequired,g=a.opts.ownProperties;if(m)if(c+=" var missing"+l+"; ",I){if(!J)c+=" var "+F+" = validate.schema"+f+"; ";var E="i"+l,k="schema"+l+"["+E+"]",y="' + "+k+" + '";if(a.opts._errorDataPathProperty)a.errorPath=a.util.getPathExpr(j,k,a.opts.jsonPointers);if(c+=" var "+Y+" = true; ",J)c+=" if (schema"+l+" === undefined) "+Y+" = true; else if (!Array.isArray(schema"+l+")) "+Y+" = false; else {";if(c+=" for (var "+E+" = 0; "+E+" < "+F+".length; "+E+"++) { "+Y+" = "+W+"["+F+"["+E+"]] !== undefined ",g)c+=" && Object.prototype.hasOwnProperty.call("+W+", "+F+"["+E+"]) ";if(c+="; if (!"+Y+") break; } ",J)c+=" } ";c+=" if (!"+Y+") { ";var C=C||[];if(C.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'required' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { missingProperty: '"+y+"' } ",a.opts.messages!==!1){if(c+=" , message: '",a.opts._errorDataPathProperty)c+="is a required property";else c+="should have required property \\'"+y+"\\'";c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var R=c;if(c=C.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+R+"]); ";else c+=" validate.errors = ["+R+"]; return false; ";else c+=" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";c+=" } else { "}else{c+=" if ( ";var b=K;if(b){var T,E=-1,Wa=b.length-1;while(E<Wa){if(T=b[E+=1],E)c+=" || ";var xa=a.util.getProperty(T),Ja=W+xa;if(c+=" ( ( "+Ja+" === undefined ",g)c+=" || ! Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(T)+"') ";c+=") && (missing"+l+" = "+a.util.toQuotedString(a.opts.jsonPointers?T:xa)+") ) "}}c+=") { ";var k="missing"+l,y="' + "+k+" + '";if(a.opts._errorDataPathProperty)a.errorPath=a.opts.jsonPointers?a.util.getPathExpr(j,k,!0):j+" + "+k;var C=C||[];if(C.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'required' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { missingProperty: '"+y+"' } ",a.opts.messages!==!1){if(c+=" , message: '",a.opts._errorDataPathProperty)c+="is a required property";else c+="should have required property \\'"+y+"\\'";c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var R=c;if(c=C.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+R+"]); ";else c+=" validate.errors = ["+R+"]; return false; ";else c+=" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";c+=" } else { "}else if(I){if(!J)c+=" var "+F+" = validate.schema"+f+"; ";var E="i"+l,k="schema"+l+"["+E+"]",y="' + "+k+" + '";if(a.opts._errorDataPathProperty)a.errorPath=a.util.getPathExpr(j,k,a.opts.jsonPointers);if(J){if(c+=" if ("+F+" && !Array.isArray("+F+")) { var err = ",a.createErrors!==!1){if(c+=" { keyword: 'required' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { missingProperty: '"+y+"' } ",a.opts.messages!==!1){if(c+=" , message: '",a.opts._errorDataPathProperty)c+="is a required property";else c+="should have required property \\'"+y+"\\'";c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+F+" !== undefined) { "}if(c+=" for (var "+E+" = 0; "+E+" < "+F+".length; "+E+"++) { if ("+W+"["+F+"["+E+"]] === undefined ",g)c+=" || ! Object.prototype.hasOwnProperty.call("+W+", "+F+"["+E+"]) ";if(c+=") { var err = ",a.createErrors!==!1){if(c+=" { keyword: 'required' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { missingProperty: '"+y+"' } ",a.opts.messages!==!1){if(c+=" , message: '",a.opts._errorDataPathProperty)c+="is a required property";else c+="should have required property \\'"+y+"\\'";c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";if(c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",J)c+=" } "}else{var pa=K;if(pa){var T,e=-1,oa=pa.length-1;while(e<oa){T=pa[e+=1];var xa=a.util.getProperty(T),y=a.util.escapeQuotes(T),Ja=W+xa;if(a.opts._errorDataPathProperty)a.errorPath=a.util.getPath(j,T,a.opts.jsonPointers);if(c+=" if ( "+Ja+" === undefined ",g)c+=" || ! Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(T)+"') ";if(c+=") { var err = ",a.createErrors!==!1){if(c+=" { keyword: 'required' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { missingProperty: '"+y+"' } ",a.opts.messages!==!1){if(c+=" , message: '",a.opts._errorDataPathProperty)c+="is a required property";else c+="should have required property \\'"+y+"\\'";c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}}a.errorPath=j}else if(m)c+=" if (true) {";return c}});var UJ=U((Lq,BJ)=>{BJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J=a.opts.$data&&u&&u.$data,X;if(J)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",X="schema"+l;else X=u;if((u||J)&&a.opts.uniqueItems!==!1){if(J)c+=" var "+Y+"; if ("+X+" === false || "+X+" === undefined) "+Y+" = true; else if (typeof "+X+" != 'boolean') "+Y+" = false; else { ";c+=" var i = "+W+".length , "+Y+" = true , j; if (i > 1) { ";var F=a.schema.items&&a.schema.items.type,K=Array.isArray(F);if(!F||F=="object"||F=="array"||K&&(F.indexOf("object")>=0||F.indexOf("array")>=0))c+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+W+"[i], "+W+"[j])) { "+Y+" = false; break outer; } } } ";else{c+=" var itemIndices = {}, item; for (;i--;) { var item = "+W+"[i]; ";var M="checkDataType"+(K?"s":"");if(c+=" if ("+a.util[M](F,"item",a.opts.strictNumbers,!0)+") continue; ",K)c+=` if (typeof item == 'string') item = '"' + item; `;c+=" if (typeof itemIndices[item] == 'number') { "+Y+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}if(c+=" } ",J)c+=" } ";c+=" if (!"+Y+") { ";var L=L||[];if(L.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { i: i, j: j } ",a.opts.messages!==!1)c+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' ";if(a.opts.verbose){if(c+=" , schema: ",J)c+="validate.schema"+f;else c+=""+u;c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var $=c;if(c=L.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+$+"]); ";else c+=" validate.errors = ["+$+"]; return false; ";else c+=" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" } ",m)c+=" else { "}else if(m)c+=" if (true) { ";return c}});var LJ=U((Dq,hJ)=>{hJ.exports={$ref:ZQ(),allOf:IQ(),anyOf:TQ(),$comment:CQ(),const:yQ(),contains:dQ(),dependencies:eQ(),enum:iJ(),format:cJ(),if:lJ(),items:xJ(),maximum:sx(),minimum:sx(),maxItems:yx(),minItems:yx(),maxLength:rx(),minLength:rx(),maxProperties:dx(),minProperties:dx(),multipleOf:JJ(),not:YJ(),oneOf:XJ(),pattern:KJ(),properties:PJ(),propertyNames:MJ(),required:$J(),uniqueItems:UJ(),validate:kx()}});var NJ=U((Oq,OJ)=>{var DJ=LJ(),tx=Bv().toHash;OJ.exports=function i(){var a=[{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"]}],n=["type","$comment"],v=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],c=["number","integer","string","array","object","boolean","null"];return a.all=tx(n),a.types=tx(c),a.forEach(function(l){if(l.rules=l.rules.map(function(x){var u;if(typeof x=="object"){var f=Object.keys(x)[0];u=x[f],x=f,u.forEach(function(m){n.push(m),a.all[m]=!0})}n.push(x);var w=a.all[x]={keyword:x,code:DJ[x],implements:u};return w}),a.all.$comment={keyword:"$comment",code:DJ.$comment},l.type)a.types[l.type]=l}),a.keywords=tx(n.concat(v)),a.custom={},a}});var jJ=U((Nq,qJ)=>{var AJ=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];qJ.exports=function(i,a){for(var n=0;n<a.length;n++){i=JSON.parse(JSON.stringify(i));var v=a[n].split("/"),c=i,l;for(l=1;l<v.length;l++)c=c[v[l]];for(l=0;l<AJ.length;l++){var x=AJ[l],u=c[x];if(u)c[x]={anyOf:[u,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}}}return i}});var EJ=U((Aq,oJ)=>{var HL=wp().MissingRef;oJ.exports=RJ;function RJ(i,a,n){var v=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof a=="function")n=a,a=void 0;var c=l(i).then(function(){var u=v._addSchema(i,void 0,a);return u.validate||x(u)});if(n)c.then(function(u){n(null,u)},n);return c;function l(u){var f=u.$schema;return f&&!v.getSchema(f)?RJ.call(v,{$ref:f},!0):Promise.resolve()}function x(u){try{return v._compile(u)}catch(w){if(w instanceof HL)return f(w);throw w}function f(w){var m=w.missingSchema;if(J(m))throw new Error("Schema "+m+" is loaded but "+w.missingRef+" cannot be resolved");var W=v._loadingSchemas[m];if(!W)W=v._loadingSchemas[m]=v._opts.loadSchema(m),W.then(Y,Y);return W.then(function(X){if(!J(m))return l(X).then(function(){if(!J(m))v.addSchema(X,m,void 0,a)})}).then(function(){return x(u)});function Y(){delete v._loadingSchemas[m]}function J(X){return v._refs[X]||v._schemas[X]}}}}});var _J=U((qq,bJ)=>{bJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W,Y="data"+(x||""),J="valid"+l,X="errs__"+l,F=a.opts.$data&&u&&u.$data,K;if(F)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",K="schema"+l;else K=u;var M=this,L="definition"+l,$=M.definition,D="",O,j,I,g,E;if(F&&$.$data){E="keywordValidate"+l;var k=$.validateSchema;c+=" var "+L+" = RULES.custom['"+n+"'].definition; var "+E+" = "+L+".validate;"}else{if(g=a.useCustomRule(M,u,a.schema,a),!g)return;K="validate.schema"+f,E=g.code,O=$.compile,j=$.inline,I=$.macro}var y=E+".errors",C="i"+l,R="ruleErr"+l,b=$.async;if(b&&!a.async)throw new Error("async keyword in sync schema");if(!(j||I))c+=""+y+" = null;";if(c+="var "+X+" = errors;var "+J+";",F&&$.$data){if(D+="}",c+=" if ("+K+" === undefined) { "+J+" = true; } else { ",k)D+="}",c+=" "+J+" = "+L+".validateSchema("+K+"); if ("+J+") { "}if(j)if($.statements)c+=" "+g.validate+" ";else c+=" "+J+" = "+g.validate+"; ";else if(I){var T=a.util.copy(a),D="";T.level++;var Wa="valid"+T.level;T.schema=g.validate,T.schemaPath="";var xa=a.compositeRule;a.compositeRule=T.compositeRule=!0;var Ja=a.validate(T).replace(/validate\.schema/g,E);a.compositeRule=T.compositeRule=xa,c+=" "+Ja}else{var pa=pa||[];if(pa.push(c),c="",c+=" "+E+".call( ",a.opts.passContext)c+="this";else c+="self";if(O||$.schema===!1)c+=" , "+Y+" ";else c+=" , "+K+" , "+Y+" , validate.schema"+a.schemaPath+" ";if(c+=" , (dataPath || '')",a.errorPath!='""')c+=" + "+a.errorPath;var e=x?"data"+(x-1||""):"parentData",oa=x?a.dataPathArr[x]:"parentDataProperty";c+=" , "+e+" , "+oa+" , rootData ) ";var vi=c;if(c=pa.pop(),$.errors===!1){if(c+=" "+J+" = ",b)c+="await ";c+=""+vi+"; "}else if(b)y="customErrors"+l,c+=" var "+y+" = null; try { "+J+" = await "+vi+"; } catch (e) { "+J+" = false; if (e instanceof ValidationError) "+y+" = e.errors; else throw e; } ";else c+=" "+y+" = null; "+J+" = "+vi+"; "}if($.modifying)c+=" if ("+e+") "+Y+" = "+e+"["+oa+"];";if(c+=""+D,$.valid){if(m)c+=" if (true) { "}else{if(c+=" if ( ",$.valid===void 0)if(c+=" !",I)c+=""+Wa;else c+=""+J;else c+=" "+!$.valid+" ";c+=") { ",W=M.keyword;var pa=pa||[];pa.push(c),c="";var pa=pa||[];if(pa.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(W||"custom")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { keyword: '"+M.keyword+"' } ",a.opts.messages!==!1)c+=` , message: 'should pass "`+M.keyword+`" keyword validation' `;if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+Y+" ";c+=" } "}else c+=" {} ";var Ji=c;if(c=pa.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+Ji+"]); ";else c+=" validate.errors = ["+Ji+"]; return false; ";else c+=" var err = "+Ji+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var ua=c;if(c=pa.pop(),j)if($.errors){if($.errors!="full"){if(c+=" for (var "+C+"="+X+"; "+C+"<errors; "+C+"++) { var "+R+" = vErrors["+C+"]; if ("+R+".dataPath === undefined) "+R+".dataPath = (dataPath || '') + "+a.errorPath+"; if ("+R+".schemaPath === undefined) { "+R+'.schemaPath = "'+w+'"; } ',a.opts.verbose)c+=" "+R+".schema = "+K+"; "+R+".data = "+Y+"; ";c+=" } "}}else if($.errors===!1)c+=" "+ua+" ";else{if(c+=" if ("+X+" == errors) { "+ua+" } else { for (var "+C+"="+X+"; "+C+"<errors; "+C+"++) { var "+R+" = vErrors["+C+"]; if ("+R+".dataPath === undefined) "+R+".dataPath = (dataPath || '') + "+a.errorPath+"; if ("+R+".schemaPath === undefined) { "+R+'.schemaPath = "'+w+'"; } ',a.opts.verbose)c+=" "+R+".schema = "+K+"; "+R+".data = "+Y+"; ";c+=" } } "}else if(I){if(c+=" var err = ",a.createErrors!==!1){if(c+=" { keyword: '"+(W||"custom")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { keyword: '"+M.keyword+"' } ",a.opts.messages!==!1)c+=` , message: 'should pass "`+M.keyword+`" keyword validation' `;if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+Y+" ";c+=" } "}else c+=" {} ";if(c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(vErrors); ";else c+=" validate.errors = vErrors; return false; "}else if($.errors===!1)c+=" "+ua+" ";else{if(c+=" if (Array.isArray("+y+")) { if (vErrors === null) vErrors = "+y+"; else vErrors = vErrors.concat("+y+"); errors = vErrors.length; for (var "+C+"="+X+"; "+C+"<errors; "+C+"++) { var "+R+" = vErrors["+C+"]; if ("+R+".dataPath === undefined) "+R+".dataPath = (dataPath || '') + "+a.errorPath+"; "+R+'.schemaPath = "'+w+'"; ',a.opts.verbose)c+=" "+R+".schema = "+K+"; "+R+".data = "+Y+"; ";c+=" } } else { "+ua+" } "}if(c+=" } ",m)c+=" else { "}return c}});var ex=U((jq,$L)=>{$L.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 IJ=U((Rq,gJ)=>{var ZJ=ex();gJ.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:ZJ.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:ZJ.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 TJ=U((oq,SJ)=>{var BL=/^[a-z_$][a-z0-9_$-]*$/i,UL=_J(),hL=IJ();SJ.exports={add:LL,get:DL,remove:OL,validate:a2};function LL(i,a){var n=this.RULES;if(n.keywords[i])throw new Error("Keyword "+i+" is already defined");if(!BL.test(i))throw new Error("Keyword "+i+" is not a valid identifier");if(a){this.validateKeyword(a,!0);var v=a.type;if(Array.isArray(v))for(var c=0;c<v.length;c++)x(i,v[c],a);else x(i,v,a);var l=a.metaSchema;if(l){if(a.$data&&this._opts.$data)l={anyOf:[l,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]};a.validateSchema=this.compile(l,!0)}}n.keywords[i]=n.all[i]=!0;function x(u,f,w){var m;for(var W=0;W<n.length;W++){var Y=n[W];if(Y.type==f){m=Y;break}}if(!m)m={type:f,rules:[]},n.push(m);var J={keyword:u,definition:w,custom:!0,code:UL,implements:w.implements};m.rules.push(J),n.custom[u]=J}return this}function DL(i){var a=this.RULES.custom[i];return a?a.definition:this.RULES.keywords[i]||!1}function OL(i){var a=this.RULES;delete a.keywords[i],delete a.all[i],delete a.custom[i];for(var n=0;n<a.length;n++){var v=a[n].rules;for(var c=0;c<v.length;c++)if(v[c].keyword==i){v.splice(c,1);break}}return this}function a2(i,a){a2.errors=null;var n=this._validateKeyword=this._validateKeyword||this.compile(hL,!0);if(n(i))return!0;if(a2.errors=n.errors,a)throw new Error("custom keyword definition is invalid: "+this.errorsText(n.errors));else return!1}});var kJ=U((Eq,NL)=>{NL.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 nW=U((bq,iW)=>{var sJ=$Q(),Uv=fp(),AL=UQ(),yJ=bx(),qL=Tx(),jL=bQ(),RL=NJ(),rJ=jJ(),dJ=Bv();iW.exports=sa;sa.prototype.validate=EL;sa.prototype.compile=bL;sa.prototype.addSchema=_L;sa.prototype.addMetaSchema=ZL;sa.prototype.validateSchema=gL;sa.prototype.getSchema=SL;sa.prototype.removeSchema=kL;sa.prototype.addFormat=aD;sa.prototype.errorsText=eL;sa.prototype._addSchema=CL;sa.prototype._compile=sL;sa.prototype.compileAsync=EJ();var Gp=TJ();sa.prototype.addKeyword=Gp.add;sa.prototype.getKeyword=Gp.get;sa.prototype.removeKeyword=Gp.remove;sa.prototype.validateKeyword=Gp.validate;var tJ=wp();sa.ValidationError=tJ.Validation;sa.MissingRefError=tJ.MissingRef;sa.$dataMetaSchema=rJ;var Xp="http://json-schema.org/draft-07/schema",CJ=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],oL=["/properties"];function sa(i){if(!(this instanceof sa))return new sa(i);if(i=this._opts=dJ.copy(i)||{},pD(this),this._schemas={},this._refs={},this._fragments={},this._formats=jL(i.format),this._cache=i.cache||new AL,this._loadingSchemas={},this._compilations=[],this.RULES=RL(),this._getId=yL(i),i.loopRequired=i.loopRequired||1/0,i.errorDataPath=="property")i._errorDataPathProperty=!0;if(i.serialize===void 0)i.serialize=qL;if(this._metaOpts=lD(this),i.formats)cD(this);if(i.keywords)vD(this);if(iD(this),typeof i.meta=="object")this.addMetaSchema(i.meta);if(i.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});nD(this)}function EL(i,a){var n;if(typeof i=="string"){if(n=this.getSchema(i),!n)throw new Error('no schema with key or ref "'+i+'"')}else{var v=this._addSchema(i);n=v.validate||this._compile(v)}var c=n(a);if(n.$async!==!0)this.errors=n.errors;return c}function bL(i,a){var n=this._addSchema(i,void 0,a);return n.validate||this._compile(n)}function _L(i,a,n,v){if(Array.isArray(i)){for(var c=0;c<i.length;c++)this.addSchema(i[c],void 0,n,v);return this}var l=this._getId(i);if(l!==void 0&&typeof l!="string")throw new Error("schema id must be string");return a=Uv.normalizeId(a||l),aW(this,a),this._schemas[a]=this._addSchema(i,n,v,!0),this}function ZL(i,a,n){return this.addSchema(i,a,n,!0),this}function gL(i,a){var n=i.$schema;if(n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this._opts.defaultMeta||IL(this),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var v=this.validate(n,i);if(!v&&a){var c="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(c);else throw new Error(c)}return v}function IL(i){var a=i._opts.meta;return i._opts.defaultMeta=typeof a=="object"?i._getId(a)||a:i.getSchema(Xp)?Xp:void 0,i._opts.defaultMeta}function SL(i){var a=eJ(this,i);switch(typeof a){case"object":return a.validate||this._compile(a);case"string":return this.getSchema(a);case"undefined":return TL(this,i)}}function TL(i,a){var n=Uv.schema.call(i,{schema:{}},a);if(n){var{schema:v,root:c,baseId:l}=n,x=sJ.call(i,v,c,void 0,l);return i._fragments[a]=new yJ({ref:a,fragment:!0,schema:v,root:c,baseId:l,validate:x}),x}}function eJ(i,a){return a=Uv.normalizeId(a),i._schemas[a]||i._refs[a]||i._fragments[a]}function kL(i){if(i instanceof RegExp)return zp(this,this._schemas,i),zp(this,this._refs,i),this;switch(typeof i){case"undefined":return zp(this,this._schemas),zp(this,this._refs),this._cache.clear(),this;case"string":var a=eJ(this,i);if(a)this._cache.del(a.cacheKey);return delete this._schemas[i],delete this._refs[i],this;case"object":var n=this._opts.serialize,v=n?n(i):i;this._cache.del(v);var c=this._getId(i);if(c)c=Uv.normalizeId(c),delete this._schemas[c],delete this._refs[c]}return this}function zp(i,a,n){for(var v in a){var c=a[v];if(!c.meta&&(!n||n.test(v)))i._cache.del(c.cacheKey),delete a[v]}}function CL(i,a,n,v){if(typeof i!="object"&&typeof i!="boolean")throw new Error("schema should be object or boolean");var c=this._opts.serialize,l=c?c(i):i,x=this._cache.get(l);if(x)return x;v=v||this._opts.addUsedSchema!==!1;var u=Uv.normalizeId(this._getId(i));if(u&&v)aW(this,u);var f=this._opts.validateSchema!==!1&&!a,w;if(f&&!(w=u&&u==Uv.normalizeId(i.$schema)))this.validateSchema(i,!0);var m=Uv.ids.call(this,i),W=new yJ({id:u,schema:i,localRefs:m,cacheKey:l,meta:n});if(u[0]!="#"&&v)this._refs[u]=W;if(this._cache.put(l,W),f&&w)this.validateSchema(i,!0);return W}function sL(i,a){if(i.compiling){if(i.validate=c,c.schema=i.schema,c.errors=null,c.root=a?a:c,i.schema.$async===!0)c.$async=!0;return c}i.compiling=!0;var n;if(i.meta)n=this._opts,this._opts=this._metaOpts;var v;try{v=sJ.call(this,i.schema,a,i.localRefs)}catch(l){throw delete i.validate,l}finally{if(i.compiling=!1,i.meta)this._opts=n}return i.validate=v,i.refs=v.refs,i.refVal=v.refVal,i.root=v.root,v;function c(){var l=i.validate,x=l.apply(this,arguments);return c.errors=l.errors,x}}function yL(i){switch(i.schemaId){case"auto":return tL;case"id":return rL;default:return dL}}function rL(i){if(i.$id)this.logger.warn("schema $id ignored",i.$id);return i.id}function dL(i){if(i.id)this.logger.warn("schema id ignored",i.id);return i.$id}function tL(i){if(i.$id&&i.id&&i.$id!=i.id)throw new Error("schema $id is different from id");return i.$id||i.id}function eL(i,a){if(i=i||this.errors,!i)return"No errors";a=a||{};var n=a.separator===void 0?", ":a.separator,v=a.dataVar===void 0?"data":a.dataVar,c="";for(var l=0;l<i.length;l++){var x=i[l];if(x)c+=v+x.dataPath+" "+x.message+n}return c.slice(0,-n.length)}function aD(i,a){if(typeof a=="string")a=new RegExp(a);return this._formats[i]=a,this}function iD(i){var a;if(i._opts.$data)a=kJ(),i.addMetaSchema(a,a.$id,!0);if(i._opts.meta===!1)return;var n=ex();if(i._opts.$data)n=rJ(n,oL);i.addMetaSchema(n,Xp,!0),i._refs["http://json-schema.org/schema"]=Xp}function nD(i){var a=i._opts.schemas;if(!a)return;if(Array.isArray(a))i.addSchema(a);else for(var n in a)i.addSchema(a[n],n)}function cD(i){for(var a in i._opts.formats){var n=i._opts.formats[a];i.addFormat(a,n)}}function vD(i){for(var a in i._opts.keywords){var n=i._opts.keywords[a];i.addKeyword(a,n)}}function aW(i,a){if(i._schemas[a]||i._refs[a])throw new Error('schema with key or id "'+a+'" already exists')}function lD(i){var a=dJ.copy(i._opts);for(var n=0;n<CJ.length;n++)delete a[CJ[n]];return a}function pD(i){var a=i._opts.logger;if(a===!1)i.logger={log:i2,warn:i2,error:i2};else{if(a===void 0)a=console;if(!(typeof a=="object"&&a.log&&a.warn&&a.error))throw new Error("logger must implement log, warn and error methods");i.logger=a}}function i2(){}});function FD(i){if(!/^data:/i.test(i))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');i=i.replace(/\r?\n/g,"");let a=i.indexOf(",");if(a===-1||a<=4)throw new TypeError("malformed data: URI");let n=i.substring(5,a).split(";"),v="",c=!1,l=n[0]||"text/plain",x=l;for(let m=1;m<n.length;m++)if(n[m]==="base64")c=!0;else if(n[m]){if(x+=`;${n[m]}`,n[m].indexOf("charset=")===0)v=n[m].substring(8)}if(!n[0]&&!v.length)x+=";charset=US-ASCII",v="US-ASCII";let u=c?"base64":"ascii",f=unescape(i.substring(a+1)),w=Buffer.from(f,u);return w.type=l,w.typeFull=x,w.charset=v,w}var ZW;var gW=qa(()=>{ZW=FD});var SW=U((Hp,IW)=>{(function(i,a){typeof Hp==="object"&&typeof IW!=="undefined"?a(Hp):typeof define==="function"&&define.amd?define(["exports"],a):(i=typeof globalThis!=="undefined"?globalThis:i||self,a(i.WebStreamsPolyfill={}))})(Hp,function(i){function a(){return}function n(p){return typeof p==="object"&&p!==null||typeof p==="function"}let v=a;function c(p,Q){try{Object.defineProperty(p,"name",{value:Q,configurable:!0})}catch(z){}}let l=Promise,x=Promise.prototype.then,u=Promise.reject.bind(l);function f(p){return new l(p)}function w(p){return f((Q)=>Q(p))}function m(p){return u(p)}function W(p,Q,z){return x.call(p,Q,z)}function Y(p,Q,z){W(W(p,Q,z),void 0,v)}function J(p,Q){Y(p,Q)}function X(p,Q){Y(p,void 0,Q)}function F(p,Q,z){return W(p,Q,z)}function K(p){W(p,void 0,v)}let M=(p)=>{if(typeof queueMicrotask==="function")M=queueMicrotask;else{let Q=w(void 0);M=(z)=>W(Q,z)}return M(p)};function L(p,Q,z){if(typeof p!=="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(p,Q,z)}function $(p,Q,z){try{return w(L(p,Q,z))}catch(V){return m(V)}}let D=16384;class O{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(p){let Q=this._back,z=Q;if(Q._elements.length===D-1)z={_elements:[],_next:void 0};if(Q._elements.push(p),z!==Q)this._back=z,Q._next=z;++this._size}shift(){let p=this._front,Q=p,z=this._cursor,V=z+1,h=p._elements,A=h[z];if(V===D)Q=p._next,V=0;if(--this._size,this._cursor=V,p!==Q)this._front=Q;return h[z]=void 0,A}forEach(p){let Q=this._cursor,z=this._front,V=z._elements;while(Q!==V.length||z._next!==void 0){if(Q===V.length){if(z=z._next,V=z._elements,Q=0,V.length===0)break}p(V[Q]),++Q}}peek(){let p=this._front,Q=this._cursor;return p._elements[Q]}}let j=Symbol("[[AbortSteps]]"),I=Symbol("[[ErrorSteps]]"),g=Symbol("[[CancelSteps]]"),E=Symbol("[[PullSteps]]"),k=Symbol("[[ReleaseSteps]]");function y(p,Q){if(p._ownerReadableStream=Q,Q._reader=p,Q._state==="readable")T(p);else if(Q._state==="closed")xa(p);else Wa(p,Q._storedError)}function C(p,Q){let z=p._ownerReadableStream;return Kn(z,Q)}function R(p){let Q=p._ownerReadableStream;if(Q._state==="readable")Ja(p,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"));else pa(p,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"));Q._readableStreamController[k](),Q._reader=void 0,p._ownerReadableStream=void 0}function b(p){return new TypeError("Cannot "+p+" a stream using a released reader")}function T(p){p._closedPromise=f((Q,z)=>{p._closedPromise_resolve=Q,p._closedPromise_reject=z})}function Wa(p,Q){T(p),Ja(p,Q)}function xa(p){T(p),e(p)}function Ja(p,Q){if(p._closedPromise_reject===void 0)return;K(p._closedPromise),p._closedPromise_reject(Q),p._closedPromise_resolve=void 0,p._closedPromise_reject=void 0}function pa(p,Q){Wa(p,Q)}function e(p){if(p._closedPromise_resolve===void 0)return;p._closedPromise_resolve(void 0),p._closedPromise_resolve=void 0,p._closedPromise_reject=void 0}let oa=Number.isFinite||function(p){return typeof p==="number"&&isFinite(p)},vi=Math.trunc||function(p){return p<0?Math.ceil(p):Math.floor(p)};function Ji(p){return typeof p==="object"||typeof p==="function"}function ua(p,Q){if(p!==void 0&&!Ji(p))throw new TypeError(`${Q} is not an object.`)}function $a(p,Q){if(typeof p!=="function")throw new TypeError(`${Q} is not a function.`)}function ta(p){return typeof p==="object"&&p!==null||typeof p==="function"}function li(p,Q){if(!ta(p))throw new TypeError(`${Q} is not an object.`)}function pi(p,Q,z){if(p===void 0)throw new TypeError(`Parameter ${Q} is required in '${z}'.`)}function bi(p,Q,z){if(p===void 0)throw new TypeError(`${Q} is required in '${z}'.`)}function Za(p){return Number(p)}function Ea(p){return p===0?0:p}function yn(p){return Ea(vi(p))}function ea(p,Q){let V=Number.MAX_SAFE_INTEGER,h=Number(p);if(h=Ea(h),!oa(h))throw new TypeError(`${Q} is not a finite number`);if(h=yn(h),h<0||h>V)throw new TypeError(`${Q} is outside the accepted range of 0 to ${V}, inclusive`);if(!oa(h)||h===0)return 0;return h}function Pa(p,Q){if(!Mc(p))throw new TypeError(`${Q} is not a ReadableStream.`)}function Bi(p){return new ka(p)}function yi(p,Q){p._reader._readRequests.push(Q)}function Yn(p,Q,z){let h=p._reader._readRequests.shift();if(z)h._closeSteps();else h._chunkSteps(Q)}function ri(p){return p._reader._readRequests.length}function ai(p){let Q=p._reader;if(Q===void 0)return!1;if(!ga(Q))return!1;return!0}class ka{constructor(p){if(pi(p,1,"ReadableStreamDefaultReader"),Pa(p,"First parameter"),Hc(p))throw new TypeError("This stream has already been locked for exclusive reading by another reader");y(this,p),this._readRequests=new O}get closed(){if(!ga(this))return m(rn("closed"));return this._closedPromise}cancel(p=void 0){if(!ga(this))return m(rn("cancel"));if(this._ownerReadableStream===void 0)return m(b("cancel"));return C(this,p)}read(){if(!ga(this))return m(rn("read"));if(this._ownerReadableStream===void 0)return m(b("read from"));let p,Q,z=f((h,A)=>{p=h,Q=A});return ya(this,{_chunkSteps:(h)=>p({value:h,done:!1}),_closeSteps:()=>p({value:void 0,done:!0}),_errorSteps:(h)=>Q(h)}),z}releaseLock(){if(!ga(this))throw rn("releaseLock");if(this._ownerReadableStream===void 0)return;di(this)}}if(Object.defineProperties(ka.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),c(ka.prototype.cancel,"cancel"),c(ka.prototype.read,"read"),c(ka.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(ka.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function ga(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_readRequests"))return!1;return p instanceof ka}function ya(p,Q){let z=p._ownerReadableStream;if(z._disturbed=!0,z._state==="closed")Q._closeSteps();else if(z._state==="errored")Q._errorSteps(z._storedError);else z._readableStreamController[E](Q)}function di(p){R(p);let Q=new TypeError("Reader was released");Ki(p,Q)}function Ki(p,Q){let z=p._readRequests;p._readRequests=new O,z.forEach((V)=>{V._errorSteps(Q)})}function rn(p){return new TypeError(`ReadableStreamDefaultReader.prototype.${p} can only be used on a ReadableStreamDefaultReader`)}let R1=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ui{constructor(p,Q){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=p,this._preventCancel=Q}next(){let p=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?F(this._ongoingPromise,p,p):p(),this._ongoingPromise}return(p){let Q=()=>this._returnSteps(p);return this._ongoingPromise?F(this._ongoingPromise,Q,Q):Q()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let p=this._reader,Q,z,V=f((A,o)=>{Q=A,z=o});return ya(p,{_chunkSteps:(A)=>{this._ongoingPromise=void 0,M(()=>Q({value:A,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,R(p),Q({value:void 0,done:!0})},_errorSteps:(A)=>{this._ongoingPromise=void 0,this._isFinished=!0,R(p),z(A)}}),V}_returnSteps(p){if(this._isFinished)return Promise.resolve({value:p,done:!0});this._isFinished=!0;let Q=this._reader;if(!this._preventCancel){let z=C(Q,p);return R(Q),F(z,()=>({value:p,done:!0}))}return R(Q),w({value:p,done:!0})}}let Xc={next(){if(!o1(this))return m(Gc("next"));return this._asyncIteratorImpl.next()},return(p){if(!o1(this))return m(Gc("return"));return this._asyncIteratorImpl.return(p)}};Object.setPrototypeOf(Xc,R1);function vl(p,Q){let z=Bi(p),V=new Ui(z,Q),h=Object.create(Xc);return h._asyncIteratorImpl=V,h}function o1(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_asyncIteratorImpl"))return!1;try{return p._asyncIteratorImpl instanceof Ui}catch(Q){return!1}}function Gc(p){return new TypeError(`ReadableStreamAsyncIterator.${p} can only be used on a ReadableSteamAsyncIterator`)}let E1=Number.isNaN||function(p){return p!==p};var b1,_1,Nv;function Fi(p){return p.slice()}function ll(p,Q,z,V,h){new Uint8Array(p).set(new Uint8Array(z,V,h),Q)}let zn=(p)=>{if(typeof p.transfer==="function")zn=(Q)=>Q.transfer();else if(typeof structuredClone==="function")zn=(Q)=>structuredClone(Q,{transfer:[Q]});else zn=(Q)=>Q;return zn(p)},Ln=(p)=>{if(typeof p.detached==="boolean")Ln=(Q)=>Q.detached;else Ln=(Q)=>Q.byteLength===0;return Ln(p)};function pl(p,Q,z){if(p.slice)return p.slice(Q,z);let V=z-Q,h=new ArrayBuffer(V);return ll(h,0,p,Q,V),h}function Av(p,Q){let z=p[Q];if(z===void 0||z===null)return;if(typeof z!=="function")throw new TypeError(`${String(Q)} is not a function`);return z}function Ep(p){let Q={[Symbol.iterator]:()=>p.iterator},z=async function*(){return yield*Q}(),V=z.next;return{iterator:z,nextMethod:V,done:!1}}let Dn=(Nv=(b1=Symbol.asyncIterator)!==null&&b1!==void 0?b1:(_1=Symbol.for)===null||_1===void 0?void 0:_1.call(Symbol,"Symbol.asyncIterator"))!==null&&Nv!==void 0?Nv:"@@asyncIterator";function xl(p,Q="sync",z){if(z===void 0)if(Q==="async"){if(z=Av(p,Dn),z===void 0){let A=Av(p,Symbol.iterator),o=xl(p,"sync",A);return Ep(o)}}else z=Av(p,Symbol.iterator);if(z===void 0)throw new TypeError("The object is not iterable");let V=L(z,p,[]);if(!n(V))throw new TypeError("The iterator method must return an object");let h=V.next;return{iterator:V,nextMethod:h,done:!1}}function ul(p){let Q=L(p.nextMethod,p.iterator,[]);if(!n(Q))throw new TypeError("The iterator.next() method must return an object");return Q}function bp(p){return Boolean(p.done)}function Z1(p){return p.value}function fl(p){if(typeof p!=="number")return!1;if(E1(p))return!1;if(p<0)return!1;return!0}function wl(p){let Q=pl(p.buffer,p.byteOffset,p.byteOffset+p.byteLength);return new Uint8Array(Q)}function qv(p){let Q=p._queue.shift();if(p._queueTotalSize-=Q.size,p._queueTotalSize<0)p._queueTotalSize=0;return Q.value}function g1(p,Q,z){if(!fl(z)||z===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");p._queue.push({value:Q,size:z}),p._queueTotalSize+=z}function ml(p){return p._queue.peek().value}function H(p){p._queue=new O,p._queueTotalSize=0}function P(p){return p===DataView}function B(p){return P(p.constructor)}function q(p){if(P(p))return 1;return p.BYTES_PER_ELEMENT}class N{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Xa(this))throw tn("view");return this._view}respond(p){if(!Xa(this))throw tn("respond");if(pi(p,1,"respond"),p=ea(p,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Ln(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");an(this._associatedReadableByteStreamController,p)}respondWithNewView(p){if(!Xa(this))throw tn("respondWithNewView");if(pi(p,1,"respondWithNewView"),!ArrayBuffer.isView(p))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Ln(p.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Rv(this._associatedReadableByteStreamController,p)}}if(Object.defineProperties(N.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),c(N.prototype.respond,"respond"),c(N.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(N.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class S{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!na(this))throw Kc("byobRequest");return qn(this)}get desiredSize(){if(!na(this))throw Kc("desiredSize");return jv(this)}close(){if(!na(this))throw Kc("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let p=this._controlledReadableByteStream._state;if(p!=="readable")throw new TypeError(`The stream (in ${p} state) is not in the readable state and cannot be closed`);An(this)}enqueue(p){if(!na(this))throw Kc("enqueue");if(pi(p,1,"enqueue"),!ArrayBuffer.isView(p))throw new TypeError("chunk must be an array buffer view");if(p.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(p.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let Q=this._controlledReadableByteStream._state;if(Q!=="readable")throw new TypeError(`The stream (in ${Q} state) is not in the readable state and cannot be enqueued to`);Xn(this,p)}error(p=void 0){if(!na(this))throw Kc("error");ni(this,p)}[g](p){Ia(this),H(this);let Q=this._cancelAlgorithm(p);return dn(this),Q}[E](p){let Q=this._controlledReadableByteStream;if(this._queueTotalSize>0){ei(this,p);return}let z=this._autoAllocateChunkSize;if(z!==void 0){let V;try{V=new ArrayBuffer(z)}catch(A){p._errorSteps(A);return}let h={buffer:V,bufferByteLength:z,byteOffset:0,byteLength:z,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(h)}yi(Q,p),Ya(this)}[k](){if(this._pendingPullIntos.length>0){let p=this._pendingPullIntos.peek();p.readerType="none",this._pendingPullIntos=new O,this._pendingPullIntos.push(p)}}}if(Object.defineProperties(S.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),c(S.prototype.close,"close"),c(S.prototype.enqueue,"enqueue"),c(S.prototype.error,"error"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(S.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function na(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_controlledReadableByteStream"))return!1;return p instanceof S}function Xa(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_associatedReadableByteStreamController"))return!1;return p instanceof N}function Ya(p){if(!sc(p))return;if(p._pulling){p._pullAgain=!0;return}p._pulling=!0;let z=p._pullAlgorithm();Y(z,()=>{if(p._pulling=!1,p._pullAgain)p._pullAgain=!1,Ya(p);return null},(V)=>{return ni(p,V),null})}function Ia(p){Wi(p),p._pendingPullIntos=new O}function za(p,Q){let z=!1;if(p._state==="closed")z=!0;let V=Oa(Q);if(Q.readerType==="default")Yn(p,V,z);else Fc(p,V,z)}function Oa(p){let{bytesFilled:Q,elementSize:z}=p;return new p.viewConstructor(p.buffer,p.byteOffset,Q/z)}function ba(p,Q,z,V){p._queue.push({buffer:Q,byteOffset:z,byteLength:V}),p._queueTotalSize+=V}function La(p,Q,z,V){let h;try{h=pl(Q,z,z+V)}catch(A){throw ni(p,A),A}ba(p,h,0,V)}function Va(p,Q){if(Q.bytesFilled>0)La(p,Q.buffer,Q.byteOffset,Q.bytesFilled);Vi(p)}function Na(p,Q){let z=Math.min(p._queueTotalSize,Q.byteLength-Q.bytesFilled),V=Q.bytesFilled+z,h=z,A=!1,o=V%Q.elementSize,d=V-o;if(d>=Q.minimumFill)h=d-Q.bytesFilled,A=!0;let aa=p._queue;while(h>0){let la=aa.peek(),fa=Math.min(h,la.byteLength),Ga=Q.byteOffset+Q.bytesFilled;if(ll(Q.buffer,Ga,la.buffer,la.byteOffset,fa),la.byteLength===fa)aa.shift();else la.byteOffset+=fa,la.byteLength-=fa;p._queueTotalSize-=fa,Ba(p,fa,Q),h-=fa}return A}function Ba(p,Q,z){z.bytesFilled+=Q}function On(p){if(p._queueTotalSize===0&&p._closeRequested)dn(p),y1(p._controlledReadableByteStream);else Ya(p)}function Wi(p){if(p._byobRequest===null)return;p._byobRequest._associatedReadableByteStreamController=void 0,p._byobRequest._view=null,p._byobRequest=null}function Pi(p){while(p._pendingPullIntos.length>0){if(p._queueTotalSize===0)return;let Q=p._pendingPullIntos.peek();if(Na(p,Q))Vi(p),za(p._controlledReadableByteStream,Q)}}function Ua(p){let Q=p._controlledReadableByteStream._reader;while(Q._readRequests.length>0){if(p._queueTotalSize===0)return;let z=Q._readRequests.shift();ei(p,z)}}function hi(p,Q,z,V){let h=p._controlledReadableByteStream,A=Q.constructor,o=q(A),{byteOffset:d,byteLength:aa}=Q,la=z*o,fa;try{fa=zn(Q.buffer)}catch(Da){V._errorSteps(Da);return}let Ga={buffer:fa,bufferByteLength:fa.byteLength,byteOffset:d,byteLength:aa,bytesFilled:0,minimumFill:la,elementSize:o,viewConstructor:A,readerType:"byob"};if(p._pendingPullIntos.length>0){p._pendingPullIntos.push(Ga),nn(h,V);return}if(h._state==="closed"){let Da=new A(Ga.buffer,Ga.byteOffset,0);V._closeSteps(Da);return}if(p._queueTotalSize>0){if(Na(p,Ga)){let Da=Oa(Ga);On(p),V._chunkSteps(Da);return}if(p._closeRequested){let Da=new TypeError("Insufficient bytes to fill elements in the given buffer");ni(p,Da),V._errorSteps(Da);return}}p._pendingPullIntos.push(Ga),nn(h,V),Ya(p)}function Ai(p,Q){if(Q.readerType==="none")Vi(p);let z=p._controlledReadableByteStream;if(Pc(z))while(ov(z)>0){let V=Vi(p);za(z,V)}}function ti(p,Q,z){if(Ba(p,Q,z),z.readerType==="none"){Va(p,z),Pi(p);return}if(z.bytesFilled<z.minimumFill)return;Vi(p);let V=z.bytesFilled%z.elementSize;if(V>0){let h=z.byteOffset+z.bytesFilled;La(p,z.buffer,h-V,V)}z.bytesFilled-=V,za(p._controlledReadableByteStream,z),Pi(p)}function Nn(p,Q){let z=p._pendingPullIntos.peek();if(Wi(p),p._controlledReadableByteStream._state==="closed")Ai(p,z);else ti(p,Q,z);Ya(p)}function Vi(p){return p._pendingPullIntos.shift()}function sc(p){let Q=p._controlledReadableByteStream;if(Q._state!=="readable")return!1;if(p._closeRequested)return!1;if(!p._started)return!1;if(ai(Q)&&ri(Q)>0)return!0;if(Pc(Q)&&ov(Q)>0)return!0;if(jv(p)>0)return!0;return!1}function dn(p){p._pullAlgorithm=void 0,p._cancelAlgorithm=void 0}function An(p){let Q=p._controlledReadableByteStream;if(p._closeRequested||Q._state!=="readable")return;if(p._queueTotalSize>0){p._closeRequested=!0;return}if(p._pendingPullIntos.length>0){let z=p._pendingPullIntos.peek();if(z.bytesFilled%z.elementSize!==0){let V=new TypeError("Insufficient bytes to fill elements in the given buffer");throw ni(p,V),V}}dn(p),y1(Q)}function Xn(p,Q){let z=p._controlledReadableByteStream;if(p._closeRequested||z._state!=="readable")return;let{buffer:V,byteOffset:h,byteLength:A}=Q;if(Ln(V))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let o=zn(V);if(p._pendingPullIntos.length>0){let d=p._pendingPullIntos.peek();if(Ln(d.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");if(Wi(p),d.buffer=zn(d.buffer),d.readerType==="none")Va(p,d)}if(ai(z))if(Ua(p),ri(z)===0)ba(p,o,h,A);else{if(p._pendingPullIntos.length>0)Vi(p);let d=new Uint8Array(o,h,A);Yn(z,d,!1)}else if(Pc(z))ba(p,o,h,A),Pi(p);else ba(p,o,h,A);Ya(p)}function ni(p,Q){let z=p._controlledReadableByteStream;if(z._state!=="readable")return;Ia(p),H(p),dn(p),i9(z,Q)}function ei(p,Q){let z=p._queue.shift();p._queueTotalSize-=z.byteLength,On(p);let V=new Uint8Array(z.buffer,z.byteOffset,z.byteLength);Q._chunkSteps(V)}function qn(p){if(p._byobRequest===null&&p._pendingPullIntos.length>0){let Q=p._pendingPullIntos.peek(),z=new Uint8Array(Q.buffer,Q.byteOffset+Q.bytesFilled,Q.byteLength-Q.bytesFilled),V=Object.create(N.prototype);yc(V,p,z),p._byobRequest=V}return p._byobRequest}function jv(p){let Q=p._controlledReadableByteStream._state;if(Q==="errored")return null;if(Q==="closed")return 0;return p._strategyHWM-p._queueTotalSize}function an(p,Q){let z=p._pendingPullIntos.peek();if(p._controlledReadableByteStream._state==="closed"){if(Q!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(Q===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(z.bytesFilled+Q>z.byteLength)throw new RangeError("bytesWritten out of range")}z.buffer=zn(z.buffer),Nn(p,Q)}function Rv(p,Q){let z=p._pendingPullIntos.peek();if(p._controlledReadableByteStream._state==="closed"){if(Q.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(Q.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(z.byteOffset+z.bytesFilled!==Q.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(z.bufferByteLength!==Q.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(z.bytesFilled+Q.byteLength>z.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let h=Q.byteLength;z.buffer=zn(Q.buffer),Nn(p,h)}function Ql(p,Q,z,V,h,A,o){Q._controlledReadableByteStream=p,Q._pullAgain=!1,Q._pulling=!1,Q._byobRequest=null,Q._queue=Q._queueTotalSize=void 0,H(Q),Q._closeRequested=!1,Q._started=!1,Q._strategyHWM=A,Q._pullAlgorithm=V,Q._cancelAlgorithm=h,Q._autoAllocateChunkSize=o,Q._pendingPullIntos=new O,p._readableStreamController=Q;let d=z();Y(w(d),()=>{return Q._started=!0,Ya(Q),null},(aa)=>{return ni(Q,aa),null})}function Jl(p,Q,z){let V=Object.create(S.prototype),h,A,o;if(Q.start!==void 0)h=()=>Q.start(V);else h=()=>{return};if(Q.pull!==void 0)A=()=>Q.pull(V);else A=()=>w(void 0);if(Q.cancel!==void 0)o=(aa)=>Q.cancel(aa);else o=()=>w(void 0);let d=Q.autoAllocateChunkSize;if(d===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ql(p,V,h,A,o,z,d)}function yc(p,Q,z){p._associatedReadableByteStreamController=Q,p._view=z}function tn(p){return new TypeError(`ReadableStreamBYOBRequest.prototype.${p} can only be used on a ReadableStreamBYOBRequest`)}function Kc(p){return new TypeError(`ReadableByteStreamController.prototype.${p} can only be used on a ReadableByteStreamController`)}function rc(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.mode;return{mode:z===void 0?void 0:_p(z,`${Q} has member 'mode' that`)}}function _p(p,Q){if(p=`${p}`,p!=="byob")throw new TypeError(`${Q} '${p}' is not a valid enumeration value for ReadableStreamReaderMode`);return p}function Wl(p,Q){var z;ua(p,Q);let V=(z=p===null||p===void 0?void 0:p.min)!==null&&z!==void 0?z:1;return{min:ea(V,`${Q} has member 'min' that`)}}function Yl(p){return new Mi(p)}function nn(p,Q){p._reader._readIntoRequests.push(Q)}function Fc(p,Q,z){let h=p._reader._readIntoRequests.shift();if(z)h._closeSteps(Q);else h._chunkSteps(Q)}function ov(p){return p._reader._readIntoRequests.length}function Pc(p){let Q=p._reader;if(Q===void 0)return!1;if(!Vc(Q))return!1;return!0}class Mi{constructor(p){if(pi(p,1,"ReadableStreamBYOBReader"),Pa(p,"First parameter"),Hc(p))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!na(p._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");y(this,p),this._readIntoRequests=new O}get closed(){if(!Vc(this))return m(Ev("closed"));return this._closedPromise}cancel(p=void 0){if(!Vc(this))return m(Ev("cancel"));if(this._ownerReadableStream===void 0)return m(b("cancel"));return C(this,p)}read(p,Q={}){if(!Vc(this))return m(Ev("read"));if(!ArrayBuffer.isView(p))return m(new TypeError("view must be an array buffer view"));if(p.byteLength===0)return m(new TypeError("view must have non-zero byteLength"));if(p.buffer.byteLength===0)return m(new TypeError("view's buffer must have non-zero byteLength"));if(Ln(p.buffer))return m(new TypeError("view's buffer has been detached"));let z;try{z=Wl(Q,"options")}catch(aa){return m(aa)}let V=z.min;if(V===0)return m(new TypeError("options.min must be greater than 0"));if(!B(p)){if(V>p.length)return m(new RangeError("options.min must be less than or equal to view's length"))}else if(V>p.byteLength)return m(new RangeError("options.min must be less than or equal to view's byteLength"));if(this._ownerReadableStream===void 0)return m(b("read from"));let h,A,o=f((aa,la)=>{h=aa,A=la});return en(this,p,V,{_chunkSteps:(aa)=>h({value:aa,done:!1}),_closeSteps:(aa)=>h({value:aa,done:!0}),_errorSteps:(aa)=>A(aa)}),o}releaseLock(){if(!Vc(this))throw Ev("releaseLock");if(this._ownerReadableStream===void 0)return;dc(this)}}if(Object.defineProperties(Mi.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),c(Mi.prototype.cancel,"cancel"),c(Mi.prototype.read,"read"),c(Mi.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Mi.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Vc(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_readIntoRequests"))return!1;return p instanceof Mi}function en(p,Q,z,V){let h=p._ownerReadableStream;if(h._disturbed=!0,h._state==="errored")V._errorSteps(h._storedError);else hi(h._readableStreamController,Q,z,V)}function dc(p){R(p);let Q=new TypeError("Reader was released");I1(p,Q)}function I1(p,Q){let z=p._readIntoRequests;p._readIntoRequests=new O,z.forEach((V)=>{V._errorSteps(Q)})}function Ev(p){return new TypeError(`ReadableStreamBYOBReader.prototype.${p} can only be used on a ReadableStreamBYOBReader`)}function tc(p,Q){let{highWaterMark:z}=p;if(z===void 0)return Q;if(E1(z)||z<0)throw new RangeError("Invalid highWaterMark");return z}function bv(p){let{size:Q}=p;if(!Q)return()=>1;return Q}function S1(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.highWaterMark,V=p===null||p===void 0?void 0:p.size;return{highWaterMark:z===void 0?void 0:Za(z),size:V===void 0?void 0:h2(V,`${Q} has member 'size' that`)}}function h2(p,Q){return $a(p,Q),(z)=>Za(p(z))}function L2(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.abort,V=p===null||p===void 0?void 0:p.close,h=p===null||p===void 0?void 0:p.start,A=p===null||p===void 0?void 0:p.type,o=p===null||p===void 0?void 0:p.write;return{abort:z===void 0?void 0:D2(z,p,`${Q} has member 'abort' that`),close:V===void 0?void 0:O2(V,p,`${Q} has member 'close' that`),start:h===void 0?void 0:N2(h,p,`${Q} has member 'start' that`),write:o===void 0?void 0:A2(o,p,`${Q} has member 'write' that`),type:A}}function D2(p,Q,z){return $a(p,z),(V)=>$(p,Q,[V])}function O2(p,Q,z){return $a(p,z),()=>$(p,Q,[])}function N2(p,Q,z){return $a(p,z),(V)=>L(p,Q,[V])}function A2(p,Q,z){return $a(p,z),(V,h)=>$(p,Q,[V,h])}function q2(p,Q){if(!_v(p))throw new TypeError(`${Q} is not a WritableStream.`)}function gY(p){if(typeof p!=="object"||p===null)return!1;try{return typeof p.aborted==="boolean"}catch(Q){return!1}}let IY=typeof AbortController==="function";function SY(){if(IY)return new AbortController;return}class ac{constructor(p={},Q={}){if(p===void 0)p=null;else li(p,"First parameter");let z=S1(Q,"Second parameter"),V=L2(p,"First parameter");if(R2(this),V.type!==void 0)throw new RangeError("Invalid type is specified");let A=bv(z),o=tc(z,1);vz(this,V,o,A)}get locked(){if(!_v(this))throw Fl("locked");return Zv(this)}abort(p=void 0){if(!_v(this))return m(Fl("abort"));if(Zv(this))return m(new TypeError("Cannot abort a stream that already has a writer"));return zl(this,p)}close(){if(!_v(this))return m(Fl("close"));if(Zv(this))return m(new TypeError("Cannot close a stream that already has a writer"));if(jn(this))return m(new TypeError("Cannot close an already-closing stream"));return o2(this)}getWriter(){if(!_v(this))throw Fl("getWriter");return j2(this)}}if(Object.defineProperties(ac.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),c(ac.prototype.abort,"abort"),c(ac.prototype.close,"close"),c(ac.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(ac.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function j2(p){return new Rn(p)}function TY(p,Q,z,V,h=1,A=()=>1){let o=Object.create(ac.prototype);R2(o);let d=Object.create(av.prototype);return I2(o,d,p,Q,z,V,h,A),o}function R2(p){p._state="writable",p._storedError=void 0,p._writer=void 0,p._writableStreamController=void 0,p._writeRequests=new O,p._inFlightWriteRequest=void 0,p._closeRequest=void 0,p._inFlightCloseRequest=void 0,p._pendingAbortRequest=void 0,p._backpressure=!1}function _v(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_writableStreamController"))return!1;return p instanceof ac}function Zv(p){if(p._writer===void 0)return!1;return!0}function zl(p,Q){var z;if(p._state==="closed"||p._state==="errored")return w(void 0);p._writableStreamController._abortReason=Q,(z=p._writableStreamController._abortController)===null||z===void 0||z.abort(Q);let V=p._state;if(V==="closed"||V==="errored")return w(void 0);if(p._pendingAbortRequest!==void 0)return p._pendingAbortRequest._promise;let h=!1;if(V==="erroring")h=!0,Q=void 0;let A=f((o,d)=>{p._pendingAbortRequest={_promise:void 0,_resolve:o,_reject:d,_reason:Q,_wasAlreadyErroring:h}});if(p._pendingAbortRequest._promise=A,!h)gp(p,Q);return A}function o2(p){let Q=p._state;if(Q==="closed"||Q==="errored")return m(new TypeError(`The stream (in ${Q} state) is not in the writable state and cannot be closed`));let z=f((h,A)=>{let o={_resolve:h,_reject:A};p._closeRequest=o}),V=p._writer;if(V!==void 0&&p._backpressure&&Q==="writable")rp(V);return lz(p._writableStreamController),z}function kY(p){return f((z,V)=>{let h={_resolve:z,_reject:V};p._writeRequests.push(h)})}function Zp(p,Q){if(p._state==="writable"){gp(p,Q);return}Ip(p)}function gp(p,Q){let z=p._writableStreamController;p._state="erroring",p._storedError=Q;let V=p._writer;if(V!==void 0)b2(V,Q);if(!dY(p)&&z._started)Ip(p)}function Ip(p){p._state="errored",p._writableStreamController[I]();let Q=p._storedError;if(p._writeRequests.forEach((h)=>{h._reject(Q)}),p._writeRequests=new O,p._pendingAbortRequest===void 0){Xl(p);return}let z=p._pendingAbortRequest;if(p._pendingAbortRequest=void 0,z._wasAlreadyErroring){z._reject(Q),Xl(p);return}let V=p._writableStreamController[j](z._reason);Y(V,()=>{return z._resolve(),Xl(p),null},(h)=>{return z._reject(h),Xl(p),null})}function CY(p){p._inFlightWriteRequest._resolve(void 0),p._inFlightWriteRequest=void 0}function sY(p,Q){p._inFlightWriteRequest._reject(Q),p._inFlightWriteRequest=void 0,Zp(p,Q)}function yY(p){if(p._inFlightCloseRequest._resolve(void 0),p._inFlightCloseRequest=void 0,p._state==="erroring"){if(p._storedError=void 0,p._pendingAbortRequest!==void 0)p._pendingAbortRequest._resolve(),p._pendingAbortRequest=void 0}p._state="closed";let z=p._writer;if(z!==void 0)C2(z)}function rY(p,Q){if(p._inFlightCloseRequest._reject(Q),p._inFlightCloseRequest=void 0,p._pendingAbortRequest!==void 0)p._pendingAbortRequest._reject(Q),p._pendingAbortRequest=void 0;Zp(p,Q)}function jn(p){if(p._closeRequest===void 0&&p._inFlightCloseRequest===void 0)return!1;return!0}function dY(p){if(p._inFlightWriteRequest===void 0&&p._inFlightCloseRequest===void 0)return!1;return!0}function tY(p){p._inFlightCloseRequest=p._closeRequest,p._closeRequest=void 0}function eY(p){p._inFlightWriteRequest=p._writeRequests.shift()}function Xl(p){if(p._closeRequest!==void 0)p._closeRequest._reject(p._storedError),p._closeRequest=void 0;let Q=p._writer;if(Q!==void 0)sp(Q,p._storedError)}function Sp(p,Q){let z=p._writer;if(z!==void 0&&Q!==p._backpressure)if(Q)Qz(z);else rp(z);p._backpressure=Q}class Rn{constructor(p){if(pi(p,1,"WritableStreamDefaultWriter"),q2(p,"First parameter"),Zv(p))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=p,p._writer=this;let Q=p._state;if(Q==="writable"){if(!jn(p)&&p._backpressure)Vl(this);else s2(this);Pl(this)}else if(Q==="erroring")yp(this,p._storedError),Pl(this);else if(Q==="closed")s2(this),wz(this);else{let z=p._storedError;yp(this,z),k2(this,z)}}get closed(){if(!ec(this))return m(iv("closed"));return this._closedPromise}get desiredSize(){if(!ec(this))throw iv("desiredSize");if(this._ownerWritableStream===void 0)throw k1("desiredSize");return cz(this)}get ready(){if(!ec(this))return m(iv("ready"));return this._readyPromise}abort(p=void 0){if(!ec(this))return m(iv("abort"));if(this._ownerWritableStream===void 0)return m(k1("abort"));return az(this,p)}close(){if(!ec(this))return m(iv("close"));let p=this._ownerWritableStream;if(p===void 0)return m(k1("close"));if(jn(p))return m(new TypeError("Cannot close an already-closing stream"));return E2(this)}releaseLock(){if(!ec(this))throw iv("releaseLock");if(this._ownerWritableStream===void 0)return;_2(this)}write(p=void 0){if(!ec(this))return m(iv("write"));if(this._ownerWritableStream===void 0)return m(k1("write to"));return Z2(this,p)}}if(Object.defineProperties(Rn.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),c(Rn.prototype.abort,"abort"),c(Rn.prototype.close,"close"),c(Rn.prototype.releaseLock,"releaseLock"),c(Rn.prototype.write,"write"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Rn.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function ec(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_ownerWritableStream"))return!1;return p instanceof Rn}function az(p,Q){let z=p._ownerWritableStream;return zl(z,Q)}function E2(p){let Q=p._ownerWritableStream;return o2(Q)}function iz(p){let Q=p._ownerWritableStream,z=Q._state;if(jn(Q)||z==="closed")return w(void 0);if(z==="errored")return m(Q._storedError);return E2(p)}function nz(p,Q){if(p._closedPromiseState==="pending")sp(p,Q);else mz(p,Q)}function b2(p,Q){if(p._readyPromiseState==="pending")y2(p,Q);else Jz(p,Q)}function cz(p){let Q=p._ownerWritableStream,z=Q._state;if(z==="errored"||z==="erroring")return null;if(z==="closed")return 0;return S2(Q._writableStreamController)}function _2(p){let Q=p._ownerWritableStream,z=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");b2(p,z),nz(p,z),Q._writer=void 0,p._ownerWritableStream=void 0}function Z2(p,Q){let z=p._ownerWritableStream,V=z._writableStreamController,h=pz(V,Q);if(z!==p._ownerWritableStream)return m(k1("write to"));let A=z._state;if(A==="errored")return m(z._storedError);if(jn(z)||A==="closed")return m(new TypeError("The stream is closing or closed and cannot be written to"));if(A==="erroring")return m(z._storedError);let o=kY(z);return xz(V,Q,h),o}let g2={};class av{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Tp(this))throw Cp("abortReason");return this._abortReason}get signal(){if(!Tp(this))throw Cp("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(p=void 0){if(!Tp(this))throw Cp("error");if(this._controlledWritableStream._state!=="writable")return;T2(this,p)}[j](p){let Q=this._abortAlgorithm(p);return Gl(this),Q}[I](){H(this)}}if(Object.defineProperties(av.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(av.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Tp(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_controlledWritableStream"))return!1;return p instanceof av}function I2(p,Q,z,V,h,A,o,d){Q._controlledWritableStream=p,p._writableStreamController=Q,Q._queue=void 0,Q._queueTotalSize=void 0,H(Q),Q._abortReason=void 0,Q._abortController=SY(),Q._started=!1,Q._strategySizeAlgorithm=d,Q._strategyHWM=o,Q._writeAlgorithm=V,Q._closeAlgorithm=h,Q._abortAlgorithm=A;let aa=kp(Q);Sp(p,aa);let la=z(),fa=w(la);Y(fa,()=>{return Q._started=!0,Kl(Q),null},(Ga)=>{return Q._started=!0,Zp(p,Ga),null})}function vz(p,Q,z,V){let h=Object.create(av.prototype),A,o,d,aa;if(Q.start!==void 0)A=()=>Q.start(h);else A=()=>{return};if(Q.write!==void 0)o=(la)=>Q.write(la,h);else o=()=>w(void 0);if(Q.close!==void 0)d=()=>Q.close();else d=()=>w(void 0);if(Q.abort!==void 0)aa=(la)=>Q.abort(la);else aa=()=>w(void 0);I2(p,h,A,o,d,aa,z,V)}function Gl(p){p._writeAlgorithm=void 0,p._closeAlgorithm=void 0,p._abortAlgorithm=void 0,p._strategySizeAlgorithm=void 0}function lz(p){g1(p,g2,0),Kl(p)}function pz(p,Q){try{return p._strategySizeAlgorithm(Q)}catch(z){return T1(p,z),1}}function S2(p){return p._strategyHWM-p._queueTotalSize}function xz(p,Q,z){try{g1(p,Q,z)}catch(h){T1(p,h);return}let V=p._controlledWritableStream;if(!jn(V)&&V._state==="writable"){let h=kp(p);Sp(V,h)}Kl(p)}function Kl(p){let Q=p._controlledWritableStream;if(!p._started)return;if(Q._inFlightWriteRequest!==void 0)return;if(Q._state==="erroring"){Ip(Q);return}if(p._queue.length===0)return;let V=ml(p);if(V===g2)uz(p);else fz(p,V)}function T1(p,Q){if(p._controlledWritableStream._state==="writable")T2(p,Q)}function uz(p){let Q=p._controlledWritableStream;tY(Q),qv(p);let z=p._closeAlgorithm();Gl(p),Y(z,()=>{return yY(Q),null},(V)=>{return rY(Q,V),null})}function fz(p,Q){let z=p._controlledWritableStream;eY(z);let V=p._writeAlgorithm(Q);Y(V,()=>{CY(z);let h=z._state;if(qv(p),!jn(z)&&h==="writable"){let A=kp(p);Sp(z,A)}return Kl(p),null},(h)=>{if(z._state==="writable")Gl(p);return sY(z,h),null})}function kp(p){return S2(p)<=0}function T2(p,Q){let z=p._controlledWritableStream;Gl(p),gp(z,Q)}function Fl(p){return new TypeError(`WritableStream.prototype.${p} can only be used on a WritableStream`)}function Cp(p){return new TypeError(`WritableStreamDefaultController.prototype.${p} can only be used on a WritableStreamDefaultController`)}function iv(p){return new TypeError(`WritableStreamDefaultWriter.prototype.${p} can only be used on a WritableStreamDefaultWriter`)}function k1(p){return new TypeError("Cannot "+p+" a stream using a released writer")}function Pl(p){p._closedPromise=f((Q,z)=>{p._closedPromise_resolve=Q,p._closedPromise_reject=z,p._closedPromiseState="pending"})}function k2(p,Q){Pl(p),sp(p,Q)}function wz(p){Pl(p),C2(p)}function sp(p,Q){if(p._closedPromise_reject===void 0)return;K(p._closedPromise),p._closedPromise_reject(Q),p._closedPromise_resolve=void 0,p._closedPromise_reject=void 0,p._closedPromiseState="rejected"}function mz(p,Q){k2(p,Q)}function C2(p){if(p._closedPromise_resolve===void 0)return;p._closedPromise_resolve(void 0),p._closedPromise_resolve=void 0,p._closedPromise_reject=void 0,p._closedPromiseState="resolved"}function Vl(p){p._readyPromise=f((Q,z)=>{p._readyPromise_resolve=Q,p._readyPromise_reject=z}),p._readyPromiseState="pending"}function yp(p,Q){Vl(p),y2(p,Q)}function s2(p){Vl(p),rp(p)}function y2(p,Q){if(p._readyPromise_reject===void 0)return;K(p._readyPromise),p._readyPromise_reject(Q),p._readyPromise_resolve=void 0,p._readyPromise_reject=void 0,p._readyPromiseState="rejected"}function Qz(p){Vl(p)}function Jz(p,Q){yp(p,Q)}function rp(p){if(p._readyPromise_resolve===void 0)return;p._readyPromise_resolve(void 0),p._readyPromise_resolve=void 0,p._readyPromise_reject=void 0,p._readyPromiseState="fulfilled"}function Wz(){if(typeof globalThis!=="undefined")return globalThis;else if(typeof self!=="undefined")return self;else if(typeof global!=="undefined")return global;return}let dp=Wz();function Yz(p){if(!(typeof p==="function"||typeof p==="object"))return!1;if(p.name!=="DOMException")return!1;try{return new p,!0}catch(Q){return!1}}function zz(){let p=dp===null||dp===void 0?void 0:dp.DOMException;return Yz(p)?p:void 0}function Xz(){let p=function Q(z,V){if(this.message=z||"",this.name=V||"Error",Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)};return c(p,"DOMException"),p.prototype=Object.create(Error.prototype),Object.defineProperty(p.prototype,"constructor",{value:p,writable:!0,configurable:!0}),p}let Gz=zz()||Xz();function r2(p,Q,z,V,h,A){let o=Bi(p),d=j2(Q);p._disturbed=!0;let aa=!1,la=w(void 0);return f((fa,Ga)=>{let Da;if(A!==void 0){if(Da=()=>{let ia=A.reason!==void 0?A.reason:new Gz("Aborted","AbortError"),Fa=[];if(!V)Fa.push(()=>{if(Q._state==="writable")return zl(Q,ia);return w(void 0)});if(!h)Fa.push(()=>{if(p._state==="readable")return Kn(p,ia);return w(void 0)});qi(()=>Promise.all(Fa.map((Aa)=>Aa())),!0,ia)},A.aborted){Da();return}A.addEventListener("abort",Da)}function nc(){return f((ia,Fa)=>{function Aa(_i){if(_i)ia();else W(Tv(),Aa,Fa)}Aa(!1)})}function Tv(){if(aa)return w(!0);return W(d._readyPromise,()=>{return f((ia,Fa)=>{ya(o,{_chunkSteps:(Aa)=>{la=W(Z2(d,Aa),void 0,a),ia(!1)},_closeSteps:()=>ia(!0),_errorSteps:Fa})})})}if(cc(p,o._closedPromise,(ia)=>{if(!V)qi(()=>zl(Q,ia),!0,ia);else cn(!0,ia);return null}),cc(Q,d._closedPromise,(ia)=>{if(!h)qi(()=>Kn(p,ia),!0,ia);else cn(!0,ia);return null}),Li(p,o._closedPromise,()=>{if(!z)qi(()=>iz(d));else cn();return null}),jn(Q)||Q._state==="closed"){let ia=new TypeError("the destination writable stream closed before all data could be piped to it");if(!h)qi(()=>Kn(p,ia),!0,ia);else cn(!0,ia)}K(nc());function $c(){let ia=la;return W(la,()=>ia!==la?$c():void 0)}function cc(ia,Fa,Aa){if(ia._state==="errored")Aa(ia._storedError);else X(Fa,Aa)}function Li(ia,Fa,Aa){if(ia._state==="closed")Aa();else J(Fa,Aa)}function qi(ia,Fa,Aa){if(aa)return;if(aa=!0,Q._state==="writable"&&!jn(Q))J($c(),_i);else _i();function _i(){return Y(ia(),()=>vc(Fa,Aa),(kv)=>vc(!0,kv)),null}}function cn(ia,Fa){if(aa)return;if(aa=!0,Q._state==="writable"&&!jn(Q))J($c(),()=>vc(ia,Fa));else vc(ia,Fa)}function vc(ia,Fa){if(_2(d),R(o),A!==void 0)A.removeEventListener("abort",Da);if(ia)Ga(Fa);else fa(void 0);return null}})}class on{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Ml(this))throw $l("desiredSize");return tp(this)}close(){if(!Ml(this))throw $l("close");if(!Iv(this))throw new TypeError("The stream is not in a state that permits close");nv(this)}enqueue(p=void 0){if(!Ml(this))throw $l("enqueue");if(!Iv(this))throw new TypeError("The stream is not in a state that permits enqueue");return gv(this,p)}error(p=void 0){if(!Ml(this))throw $l("error");Gn(this,p)}[g](p){H(this);let Q=this._cancelAlgorithm(p);return Hl(this),Q}[E](p){let Q=this._controlledReadableStream;if(this._queue.length>0){let z=qv(this);if(this._closeRequested&&this._queue.length===0)Hl(this),y1(Q);else C1(this);p._chunkSteps(z)}else yi(Q,p),C1(this)}[k](){}}if(Object.defineProperties(on.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),c(on.prototype.close,"close"),c(on.prototype.enqueue,"enqueue"),c(on.prototype.error,"error"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(on.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Ml(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_controlledReadableStream"))return!1;return p instanceof on}function C1(p){if(!d2(p))return;if(p._pulling){p._pullAgain=!0;return}p._pulling=!0;let z=p._pullAlgorithm();Y(z,()=>{if(p._pulling=!1,p._pullAgain)p._pullAgain=!1,C1(p);return null},(V)=>{return Gn(p,V),null})}function d2(p){let Q=p._controlledReadableStream;if(!Iv(p))return!1;if(!p._started)return!1;if(Hc(Q)&&ri(Q)>0)return!0;if(tp(p)>0)return!0;return!1}function Hl(p){p._pullAlgorithm=void 0,p._cancelAlgorithm=void 0,p._strategySizeAlgorithm=void 0}function nv(p){if(!Iv(p))return;let Q=p._controlledReadableStream;if(p._closeRequested=!0,p._queue.length===0)Hl(p),y1(Q)}function gv(p,Q){if(!Iv(p))return;let z=p._controlledReadableStream;if(Hc(z)&&ri(z)>0)Yn(z,Q,!1);else{let V;try{V=p._strategySizeAlgorithm(Q)}catch(h){throw Gn(p,h),h}try{g1(p,Q,V)}catch(h){throw Gn(p,h),h}}C1(p)}function Gn(p,Q){let z=p._controlledReadableStream;if(z._state!=="readable")return;H(p),Hl(p),i9(z,Q)}function tp(p){let Q=p._controlledReadableStream._state;if(Q==="errored")return null;if(Q==="closed")return 0;return p._strategyHWM-p._queueTotalSize}function Kz(p){if(d2(p))return!1;return!0}function Iv(p){let Q=p._controlledReadableStream._state;if(!p._closeRequested&&Q==="readable")return!0;return!1}function t2(p,Q,z,V,h,A,o){Q._controlledReadableStream=p,Q._queue=void 0,Q._queueTotalSize=void 0,H(Q),Q._started=!1,Q._closeRequested=!1,Q._pullAgain=!1,Q._pulling=!1,Q._strategySizeAlgorithm=o,Q._strategyHWM=A,Q._pullAlgorithm=V,Q._cancelAlgorithm=h,p._readableStreamController=Q;let d=z();Y(w(d),()=>{return Q._started=!0,C1(Q),null},(aa)=>{return Gn(Q,aa),null})}function Fz(p,Q,z,V){let h=Object.create(on.prototype),A,o,d;if(Q.start!==void 0)A=()=>Q.start(h);else A=()=>{return};if(Q.pull!==void 0)o=()=>Q.pull(h);else o=()=>w(void 0);if(Q.cancel!==void 0)d=(aa)=>Q.cancel(aa);else d=()=>w(void 0);t2(p,h,A,o,d,z,V)}function $l(p){return new TypeError(`ReadableStreamDefaultController.prototype.${p} can only be used on a ReadableStreamDefaultController`)}function Pz(p,Q){if(na(p._readableStreamController))return Mz(p);return Vz(p)}function Vz(p,Q){let z=Bi(p),V=!1,h=!1,A=!1,o=!1,d,aa,la,fa,Ga,Da=f((Li)=>{Ga=Li});function nc(){if(V)return h=!0,w(void 0);return V=!0,ya(z,{_chunkSteps:(qi)=>{M(()=>{h=!1;let cn=qi,vc=qi;if(!A)gv(la._readableStreamController,cn);if(!o)gv(fa._readableStreamController,vc);if(V=!1,h)nc()})},_closeSteps:()=>{if(V=!1,!A)nv(la._readableStreamController);if(!o)nv(fa._readableStreamController);if(!A||!o)Ga(void 0)},_errorSteps:()=>{V=!1}}),w(void 0)}function Tv(Li){if(A=!0,d=Li,o){let qi=Fi([d,aa]),cn=Kn(p,qi);Ga(cn)}return Da}function $c(Li){if(o=!0,aa=Li,A){let qi=Fi([d,aa]),cn=Kn(p,qi);Ga(cn)}return Da}function cc(){}return la=s1(cc,nc,Tv),fa=s1(cc,nc,$c),X(z._closedPromise,(Li)=>{if(Gn(la._readableStreamController,Li),Gn(fa._readableStreamController,Li),!A||!o)Ga(void 0);return null}),[la,fa]}function Mz(p){let Q=Bi(p),z=!1,V=!1,h=!1,A=!1,o=!1,d,aa,la,fa,Ga,Da=f((ia)=>{Ga=ia});function nc(ia){X(ia._closedPromise,(Fa)=>{if(ia!==Q)return null;if(ni(la._readableStreamController,Fa),ni(fa._readableStreamController,Fa),!A||!o)Ga(void 0);return null})}function Tv(){if(Vc(Q))R(Q),Q=Bi(p),nc(Q);ya(Q,{_chunkSteps:(Fa)=>{M(()=>{V=!1,h=!1;let Aa=Fa,_i=Fa;if(!A&&!o)try{_i=wl(Fa)}catch(kv){ni(la._readableStreamController,kv),ni(fa._readableStreamController,kv),Ga(Kn(p,kv));return}if(!A)Xn(la._readableStreamController,Aa);if(!o)Xn(fa._readableStreamController,_i);if(z=!1,V)cc();else if(h)Li()})},_closeSteps:()=>{if(z=!1,!A)An(la._readableStreamController);if(!o)An(fa._readableStreamController);if(la._readableStreamController._pendingPullIntos.length>0)an(la._readableStreamController,0);if(fa._readableStreamController._pendingPullIntos.length>0)an(fa._readableStreamController,0);if(!A||!o)Ga(void 0)},_errorSteps:()=>{z=!1}})}function $c(ia,Fa){if(ga(Q))R(Q),Q=Yl(p),nc(Q);let Aa=Fa?fa:la,_i=Fa?la:fa;en(Q,ia,1,{_chunkSteps:(Cv)=>{M(()=>{V=!1,h=!1;let sv=Fa?o:A;if(!(Fa?A:o)){let W9;try{W9=wl(Cv)}catch(c8){ni(Aa._readableStreamController,c8),ni(_i._readableStreamController,c8),Ga(Kn(p,c8));return}if(!sv)Rv(Aa._readableStreamController,Cv);Xn(_i._readableStreamController,W9)}else if(!sv)Rv(Aa._readableStreamController,Cv);if(z=!1,V)cc();else if(h)Li()})},_closeSteps:(Cv)=>{z=!1;let sv=Fa?o:A,Dl=Fa?A:o;if(!sv)An(Aa._readableStreamController);if(!Dl)An(_i._readableStreamController);if(Cv!==void 0){if(!sv)Rv(Aa._readableStreamController,Cv);if(!Dl&&_i._readableStreamController._pendingPullIntos.length>0)an(_i._readableStreamController,0)}if(!sv||!Dl)Ga(void 0)},_errorSteps:()=>{z=!1}})}function cc(){if(z)return V=!0,w(void 0);z=!0;let ia=qn(la._readableStreamController);if(ia===null)Tv();else $c(ia._view,!1);return w(void 0)}function Li(){if(z)return h=!0,w(void 0);z=!0;let ia=qn(fa._readableStreamController);if(ia===null)Tv();else $c(ia._view,!0);return w(void 0)}function qi(ia){if(A=!0,d=ia,o){let Fa=Fi([d,aa]),Aa=Kn(p,Fa);Ga(Aa)}return Da}function cn(ia){if(o=!0,aa=ia,A){let Fa=Fi([d,aa]),Aa=Kn(p,Fa);Ga(Aa)}return Da}function vc(){return}return la=a9(vc,cc,qi),fa=a9(vc,Li,cn),nc(Q),[la,fa]}function Hz(p){return n(p)&&typeof p.getReader!=="undefined"}function $z(p){if(Hz(p))return Uz(p.getReader());return Bz(p)}function Bz(p){let Q,z=xl(p,"async"),V=a;function h(){let o;try{o=ul(z)}catch(aa){return m(aa)}let d=w(o);return F(d,(aa)=>{if(!n(aa))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(bp(aa))nv(Q._readableStreamController);else{let fa=Z1(aa);gv(Q._readableStreamController,fa)}})}function A(o){let d=z.iterator,aa;try{aa=Av(d,"return")}catch(Ga){return m(Ga)}if(aa===void 0)return w(void 0);let la;try{la=L(aa,d,[o])}catch(Ga){return m(Ga)}let fa=w(la);return F(fa,(Ga)=>{if(!n(Ga))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object");return})}return Q=s1(V,h,A,0),Q}function Uz(p){let Q,z=a;function V(){let A;try{A=p.read()}catch(o){return m(o)}return F(A,(o)=>{if(!n(o))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(o.done)nv(Q._readableStreamController);else{let d=o.value;gv(Q._readableStreamController,d)}})}function h(A){try{return w(p.cancel(A))}catch(o){return m(o)}}return Q=s1(z,V,h,0),Q}function hz(p,Q){ua(p,Q);let z=p,V=z===null||z===void 0?void 0:z.autoAllocateChunkSize,h=z===null||z===void 0?void 0:z.cancel,A=z===null||z===void 0?void 0:z.pull,o=z===null||z===void 0?void 0:z.start,d=z===null||z===void 0?void 0:z.type;return{autoAllocateChunkSize:V===void 0?void 0:ea(V,`${Q} has member 'autoAllocateChunkSize' that`),cancel:h===void 0?void 0:Lz(h,z,`${Q} has member 'cancel' that`),pull:A===void 0?void 0:Dz(A,z,`${Q} has member 'pull' that`),start:o===void 0?void 0:Oz(o,z,`${Q} has member 'start' that`),type:d===void 0?void 0:Nz(d,`${Q} has member 'type' that`)}}function Lz(p,Q,z){return $a(p,z),(V)=>$(p,Q,[V])}function Dz(p,Q,z){return $a(p,z),(V)=>$(p,Q,[V])}function Oz(p,Q,z){return $a(p,z),(V)=>L(p,Q,[V])}function Nz(p,Q){if(p=`${p}`,p!=="bytes")throw new TypeError(`${Q} '${p}' is not a valid enumeration value for ReadableStreamType`);return p}function Az(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.preventCancel;return{preventCancel:Boolean(z)}}function e2(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.preventAbort,V=p===null||p===void 0?void 0:p.preventCancel,h=p===null||p===void 0?void 0:p.preventClose,A=p===null||p===void 0?void 0:p.signal;if(A!==void 0)qz(A,`${Q} has member 'signal' that`);return{preventAbort:Boolean(z),preventCancel:Boolean(V),preventClose:Boolean(h),signal:A}}function qz(p,Q){if(!gY(p))throw new TypeError(`${Q} is not an AbortSignal.`)}function jz(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.readable;bi(z,"readable","ReadableWritablePair"),Pa(z,`${Q} has member 'readable' that`);let V=p===null||p===void 0?void 0:p.writable;return bi(V,"writable","ReadableWritablePair"),q2(V,`${Q} has member 'writable' that`),{readable:z,writable:V}}class Yi{constructor(p={},Q={}){if(p===void 0)p=null;else li(p,"First parameter");let z=S1(Q,"Second parameter"),V=hz(p,"First parameter");if(ep(this),V.type==="bytes"){if(z.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let h=tc(z,0);Jl(this,V,h)}else{let h=bv(z),A=tc(z,1);Fz(this,V,A,h)}}get locked(){if(!Mc(this))throw cv("locked");return Hc(this)}cancel(p=void 0){if(!Mc(this))return m(cv("cancel"));if(Hc(this))return m(new TypeError("Cannot cancel a stream that already has a reader"));return Kn(this,p)}getReader(p=void 0){if(!Mc(this))throw cv("getReader");if(rc(p,"First parameter").mode===void 0)return Bi(this);return Yl(this)}pipeThrough(p,Q={}){if(!Mc(this))throw cv("pipeThrough");pi(p,1,"pipeThrough");let z=jz(p,"First parameter"),V=e2(Q,"Second parameter");if(Hc(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Zv(z.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let h=r2(this,z.writable,V.preventClose,V.preventAbort,V.preventCancel,V.signal);return K(h),z.readable}pipeTo(p,Q={}){if(!Mc(this))return m(cv("pipeTo"));if(p===void 0)return m("Parameter 1 is required in 'pipeTo'.");if(!_v(p))return m(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let z;try{z=e2(Q,"Second parameter")}catch(V){return m(V)}if(Hc(this))return m(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));if(Zv(p))return m(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));return r2(this,p,z.preventClose,z.preventAbort,z.preventCancel,z.signal)}tee(){if(!Mc(this))throw cv("tee");let p=Pz(this);return Fi(p)}values(p=void 0){if(!Mc(this))throw cv("values");let Q=Az(p,"First parameter");return vl(this,Q.preventCancel)}[Dn](p){return this.values(p)}static from(p){return $z(p)}}if(Object.defineProperties(Yi,{from:{enumerable:!0}}),Object.defineProperties(Yi.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),c(Yi.from,"from"),c(Yi.prototype.cancel,"cancel"),c(Yi.prototype.getReader,"getReader"),c(Yi.prototype.pipeThrough,"pipeThrough"),c(Yi.prototype.pipeTo,"pipeTo"),c(Yi.prototype.tee,"tee"),c(Yi.prototype.values,"values"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Yi.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0});Object.defineProperty(Yi.prototype,Dn,{value:Yi.prototype.values,writable:!0,configurable:!0});function s1(p,Q,z,V=1,h=()=>1){let A=Object.create(Yi.prototype);ep(A);let o=Object.create(on.prototype);return t2(A,o,p,Q,z,V,h),A}function a9(p,Q,z){let V=Object.create(Yi.prototype);ep(V);let h=Object.create(S.prototype);return Ql(V,h,p,Q,z,0,void 0),V}function ep(p){p._state="readable",p._reader=void 0,p._storedError=void 0,p._disturbed=!1}function Mc(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_readableStreamController"))return!1;return p instanceof Yi}function Hc(p){if(p._reader===void 0)return!1;return!0}function Kn(p,Q){if(p._disturbed=!0,p._state==="closed")return w(void 0);if(p._state==="errored")return m(p._storedError);y1(p);let z=p._reader;if(z!==void 0&&Vc(z)){let h=z._readIntoRequests;z._readIntoRequests=new O,h.forEach((A)=>{A._closeSteps(void 0)})}let V=p._readableStreamController[g](Q);return F(V,a)}function y1(p){p._state="closed";let Q=p._reader;if(Q===void 0)return;if(e(Q),ga(Q)){let z=Q._readRequests;Q._readRequests=new O,z.forEach((V)=>{V._closeSteps()})}}function i9(p,Q){p._state="errored",p._storedError=Q;let z=p._reader;if(z===void 0)return;if(Ja(z,Q),ga(z))Ki(z,Q);else I1(z,Q)}function cv(p){return new TypeError(`ReadableStream.prototype.${p} can only be used on a ReadableStream`)}function n9(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.highWaterMark;return bi(z,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Za(z)}}let c9=(p)=>{return p.byteLength};c(c9,"size");class r1{constructor(p){pi(p,1,"ByteLengthQueuingStrategy"),p=n9(p,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=p.highWaterMark}get highWaterMark(){if(!l9(this))throw v9("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!l9(this))throw v9("size");return c9}}if(Object.defineProperties(r1.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(r1.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function v9(p){return new TypeError(`ByteLengthQueuingStrategy.prototype.${p} can only be used on a ByteLengthQueuingStrategy`)}function l9(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_byteLengthQueuingStrategyHighWaterMark"))return!1;return p instanceof r1}let p9=()=>{return 1};c(p9,"size");class d1{constructor(p){pi(p,1,"CountQueuingStrategy"),p=n9(p,"First parameter"),this._countQueuingStrategyHighWaterMark=p.highWaterMark}get highWaterMark(){if(!u9(this))throw x9("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!u9(this))throw x9("size");return p9}}if(Object.defineProperties(d1.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(d1.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function x9(p){return new TypeError(`CountQueuingStrategy.prototype.${p} can only be used on a CountQueuingStrategy`)}function u9(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_countQueuingStrategyHighWaterMark"))return!1;return p instanceof d1}function Rz(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.cancel,V=p===null||p===void 0?void 0:p.flush,h=p===null||p===void 0?void 0:p.readableType,A=p===null||p===void 0?void 0:p.start,o=p===null||p===void 0?void 0:p.transform,d=p===null||p===void 0?void 0:p.writableType;return{cancel:z===void 0?void 0:_z(z,p,`${Q} has member 'cancel' that`),flush:V===void 0?void 0:oz(V,p,`${Q} has member 'flush' that`),readableType:h,start:A===void 0?void 0:Ez(A,p,`${Q} has member 'start' that`),transform:o===void 0?void 0:bz(o,p,`${Q} has member 'transform' that`),writableType:d}}function oz(p,Q,z){return $a(p,z),(V)=>$(p,Q,[V])}function Ez(p,Q,z){return $a(p,z),(V)=>L(p,Q,[V])}function bz(p,Q,z){return $a(p,z),(V,h)=>$(p,Q,[V,h])}function _z(p,Q,z){return $a(p,z),(V)=>$(p,Q,[V])}class t1{constructor(p={},Q={},z={}){if(p===void 0)p=null;let V=S1(Q,"Second parameter"),h=S1(z,"Third parameter"),A=Rz(p,"First parameter");if(A.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(A.writableType!==void 0)throw new RangeError("Invalid writableType specified");let o=tc(h,0),d=bv(h),aa=tc(V,1),la=bv(V),fa,Ga=f((Da)=>{fa=Da});if(Zz(this,Ga,aa,la,o,d),Iz(this,A),A.start!==void 0)fa(A.start(this._transformStreamController));else fa(void 0)}get readable(){if(!f9(this))throw J9("readable");return this._readable}get writable(){if(!f9(this))throw J9("writable");return this._writable}}if(Object.defineProperties(t1.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(t1.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function Zz(p,Q,z,V,h,A){function o(){return Q}function d(Da){return kz(p,Da)}function aa(Da){return Cz(p,Da)}function la(){return sz(p)}p._writable=TY(o,d,la,aa,z,V);function fa(){return yz(p)}function Ga(Da){return rz(p,Da)}p._readable=s1(o,fa,Ga,h,A),p._backpressure=void 0,p._backpressureChangePromise=void 0,p._backpressureChangePromise_resolve=void 0,Bl(p,!0),p._transformStreamController=void 0}function f9(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_transformStreamController"))return!1;return p instanceof t1}function w9(p,Q){Gn(p._readable._readableStreamController,Q),a8(p,Q)}function a8(p,Q){hl(p._transformStreamController),T1(p._writable._writableStreamController,Q),i8(p)}function i8(p){if(p._backpressure)Bl(p,!1)}function Bl(p,Q){if(p._backpressureChangePromise!==void 0)p._backpressureChangePromise_resolve();p._backpressureChangePromise=f((z)=>{p._backpressureChangePromise_resolve=z}),p._backpressure=Q}class ic{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Ul(this))throw Ll("desiredSize");let p=this._controlledTransformStream._readable._readableStreamController;return tp(p)}enqueue(p=void 0){if(!Ul(this))throw Ll("enqueue");m9(this,p)}error(p=void 0){if(!Ul(this))throw Ll("error");Sz(this,p)}terminate(){if(!Ul(this))throw Ll("terminate");Tz(this)}}if(Object.defineProperties(ic.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),c(ic.prototype.enqueue,"enqueue"),c(ic.prototype.error,"error"),c(ic.prototype.terminate,"terminate"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(ic.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Ul(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_controlledTransformStream"))return!1;return p instanceof ic}function gz(p,Q,z,V,h){Q._controlledTransformStream=p,p._transformStreamController=Q,Q._transformAlgorithm=z,Q._flushAlgorithm=V,Q._cancelAlgorithm=h,Q._finishPromise=void 0,Q._finishPromise_resolve=void 0,Q._finishPromise_reject=void 0}function Iz(p,Q){let z=Object.create(ic.prototype),V,h,A;if(Q.transform!==void 0)V=(o)=>Q.transform(o,z);else V=(o)=>{try{return m9(z,o),w(void 0)}catch(d){return m(d)}};if(Q.flush!==void 0)h=()=>Q.flush(z);else h=()=>w(void 0);if(Q.cancel!==void 0)A=(o)=>Q.cancel(o);else A=()=>w(void 0);gz(p,z,V,h,A)}function hl(p){p._transformAlgorithm=void 0,p._flushAlgorithm=void 0,p._cancelAlgorithm=void 0}function m9(p,Q){let z=p._controlledTransformStream,V=z._readable._readableStreamController;if(!Iv(V))throw new TypeError("Readable side is not in a state that permits enqueue");try{gv(V,Q)}catch(A){throw a8(z,A),z._readable._storedError}if(Kz(V)!==z._backpressure)Bl(z,!0)}function Sz(p,Q){w9(p._controlledTransformStream,Q)}function Q9(p,Q){let z=p._transformAlgorithm(Q);return F(z,void 0,(V)=>{throw w9(p._controlledTransformStream,V),V})}function Tz(p){let Q=p._controlledTransformStream,z=Q._readable._readableStreamController;nv(z);let V=new TypeError("TransformStream terminated");a8(Q,V)}function kz(p,Q){let z=p._transformStreamController;if(p._backpressure){let V=p._backpressureChangePromise;return F(V,()=>{let h=p._writable;if(h._state==="erroring")throw h._storedError;return Q9(z,Q)})}return Q9(z,Q)}function Cz(p,Q){let z=p._transformStreamController;if(z._finishPromise!==void 0)return z._finishPromise;let V=p._readable;z._finishPromise=f((A,o)=>{z._finishPromise_resolve=A,z._finishPromise_reject=o});let h=z._cancelAlgorithm(Q);return hl(z),Y(h,()=>{if(V._state==="errored")Sv(z,V._storedError);else Gn(V._readableStreamController,Q),n8(z);return null},(A)=>{return Gn(V._readableStreamController,A),Sv(z,A),null}),z._finishPromise}function sz(p){let Q=p._transformStreamController;if(Q._finishPromise!==void 0)return Q._finishPromise;let z=p._readable;Q._finishPromise=f((h,A)=>{Q._finishPromise_resolve=h,Q._finishPromise_reject=A});let V=Q._flushAlgorithm();return hl(Q),Y(V,()=>{if(z._state==="errored")Sv(Q,z._storedError);else nv(z._readableStreamController),n8(Q);return null},(h)=>{return Gn(z._readableStreamController,h),Sv(Q,h),null}),Q._finishPromise}function yz(p){return Bl(p,!1),p._backpressureChangePromise}function rz(p,Q){let z=p._transformStreamController;if(z._finishPromise!==void 0)return z._finishPromise;let V=p._writable;z._finishPromise=f((A,o)=>{z._finishPromise_resolve=A,z._finishPromise_reject=o});let h=z._cancelAlgorithm(Q);return hl(z),Y(h,()=>{if(V._state==="errored")Sv(z,V._storedError);else T1(V._writableStreamController,Q),i8(p),n8(z);return null},(A)=>{return T1(V._writableStreamController,A),i8(p),Sv(z,A),null}),z._finishPromise}function Ll(p){return new TypeError(`TransformStreamDefaultController.prototype.${p} can only be used on a TransformStreamDefaultController`)}function n8(p){if(p._finishPromise_resolve===void 0)return;p._finishPromise_resolve(),p._finishPromise_resolve=void 0,p._finishPromise_reject=void 0}function Sv(p,Q){if(p._finishPromise_reject===void 0)return;K(p._finishPromise),p._finishPromise_reject(Q),p._finishPromise_resolve=void 0,p._finishPromise_reject=void 0}function J9(p){return new TypeError(`TransformStream.prototype.${p} can only be used on a TransformStream`)}i.ByteLengthQueuingStrategy=r1,i.CountQueuingStrategy=d1,i.ReadableByteStreamController=S,i.ReadableStream=Yi,i.ReadableStreamBYOBReader=Mi,i.ReadableStreamBYOBRequest=N,i.ReadableStreamDefaultController=on,i.ReadableStreamDefaultReader=ka,i.TransformStream=t1,i.TransformStreamDefaultController=ic,i.WritableStream=ac,i.WritableStreamDefaultController=av,i.WritableStreamDefaultWriter=Rn})});var TW=U(()=>{if(!globalThis.ReadableStream)try{let i=require("node:process"),{emitWarning:a}=i;try{i.emitWarning=()=>{},Object.assign(globalThis,require("node:stream/web")),i.emitWarning=a}catch(n){throw i.emitWarning=a,n}}catch(i){Object.assign(globalThis,SW())}try{let{Blob:i}=require("buffer");if(i&&!i.prototype.stream)i.prototype.stream=function a(n){let v=0,c=this;return new ReadableStream({type:"bytes",async pull(l){let u=await c.slice(v,Math.min(c.size,v+65536)).arrayBuffer();if(v+=u.byteLength,l.enqueue(new Uint8Array(u)),v===c.size)l.close()}})}}catch(i){}});async function*f2(i,a=!0){for(let n of i)if("stream"in n)yield*n.stream();else if(ArrayBuffer.isView(n))if(a){let v=n.byteOffset,c=n.byteOffset+n.byteLength;while(v!==c){let l=Math.min(c-v,kW),x=n.buffer.slice(v,v+l);v+=x.byteLength,yield new Uint8Array(x)}}else yield n;else{let v=0,c=n;while(v!==c.size){let x=await c.slice(v,Math.min(c.size,v+kW)).arrayBuffer();v+=x.byteLength,yield new Uint8Array(x)}}}var bo,kW=65536,CW,PD,Bn;var y0=qa(()=>{bo=ii(TW());/*! fetch-blob. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */CW=class i{#a=[];#i="";#n=0;#c="transparent";constructor(a=[],n={}){if(typeof a!=="object"||a===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof a[Symbol.iterator]!=="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof n!=="object"&&typeof n!=="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");if(n===null)n={};let v=new TextEncoder;for(let l of a){let x;if(ArrayBuffer.isView(l))x=new Uint8Array(l.buffer.slice(l.byteOffset,l.byteOffset+l.byteLength));else if(l instanceof ArrayBuffer)x=new Uint8Array(l.slice(0));else if(l instanceof i)x=l;else x=v.encode(`${l}`);this.#n+=ArrayBuffer.isView(x)?x.byteLength:x.size,this.#a.push(x)}this.#c=`${n.endings===void 0?"transparent":n.endings}`;let c=n.type===void 0?"":String(n.type);this.#i=/^[\x20-\x7E]*$/.test(c)?c:""}get size(){return this.#n}get type(){return this.#i}async text(){let a=new TextDecoder,n="";for await(let v of f2(this.#a,!1))n+=a.decode(v,{stream:!0});return n+=a.decode(),n}async arrayBuffer(){let a=new Uint8Array(this.size),n=0;for await(let v of f2(this.#a,!1))a.set(v,n),n+=v.length;return a.buffer}stream(){let a=f2(this.#a,!0);return new globalThis.ReadableStream({type:"bytes",async pull(n){let v=await a.next();v.done?n.close():n.enqueue(v.value)},async cancel(){await a.return()}})}slice(a=0,n=this.size,v=""){let{size:c}=this,l=a<0?Math.max(c+a,0):Math.min(a,c),x=n<0?Math.max(c+n,0):Math.min(n,c),u=Math.max(x-l,0),f=this.#a,w=[],m=0;for(let Y of f){if(m>=u)break;let J=ArrayBuffer.isView(Y)?Y.byteLength:Y.size;if(l&&J<=l)l-=J,x-=J;else{let X;if(ArrayBuffer.isView(Y))X=Y.subarray(l,Math.min(J,x)),m+=X.byteLength;else X=Y.slice(l,Math.min(J,x)),m+=X.size;x-=J,w.push(X),l=0}}let W=new i([],{type:String(v).toLowerCase()});return W.#n=u,W.#a=w,W}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](a){return a&&typeof a==="object"&&typeof a.constructor==="function"&&(typeof a.stream==="function"||typeof a.arrayBuffer==="function")&&/^(Blob|File)$/.test(a[Symbol.toStringTag])}};Object.defineProperties(CW.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});PD=CW,Bn=PD});var VD,MD,gc;var w2=qa(()=>{y0();VD=class i extends Bn{#a=0;#i="";constructor(a,n,v={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(a,v);if(v===null)v={};let c=v.lastModified===void 0?Date.now():Number(v.lastModified);if(!Number.isNaN(c))this.#a=c;this.#i=String(n)}get name(){return this.#i}get lastModified(){return this.#a}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](a){return!!a&&a instanceof Bn&&/^(File)$/.test(a[Symbol.toStringTag])}},MD=VD,gc=MD});function rW(i,a=Bn){var n=`${sW()}${sW()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),v=[],c=`--${n}\r
282
+ */gm.exports=Zm()});var Tm={};a0(Tm,{stopHttpServer:()=>$h,startHttpServer:()=>Hh});async function Hh(i,a){let n=hx.default();n.use((c,l,x)=>{let u=c.header("personalToken");if(u&&u.trim()!==""&&u!==Zi.personalToken)mi.debug("Updating Figma personal token from request headers",u,Zi.personalToken),Zi.personalToken=u;x()}),n.use("/mcp",hx.default.json()),n.post("/mcp",async(c,l)=>{mi.debug("Received StreamableHTTP request",JSON.stringify(c.headers),JSON.stringify(c.body)),l.setHeader("Content-Type","application/json");let x=c.headers["mcp-session-id"],u;if(x&&Jn.streamable[x])mi.debug("Reusing existing StreamableHTTP transport for sessionId",x),u=Jn.streamable[x];else if(!x&&m1(c.body))mi.debug("New initialization request for StreamableHTTP sessionId",x),u=new zv({sessionIdGenerator:()=>Sm.randomUUID(),onsessioninitialized:(W)=>{Jn.streamable[W]=u}}),u.onclose=()=>{if(u.sessionId)delete Jn.streamable[u.sessionId]},await a.connect(u);else{mi.error("Invalid request:",c.body),l.status(400).json({jsonrpc:"2.0",error:{code:-32000,message:"Bad Request: No valid session ID provided"},id:null});return}let f=null,w=c.body.params?._meta?.progressToken,m=0;if(w)mi.info(`Setting up progress notifications for token ${w} on session ${x}`),f=setInterval(async()=>{mi.info("Sending progress notification",m),await a.server.notification({method:"notifications/progress",params:{progress:m,progressToken:w}}),m++},1000);if(mi.debug("Handling StreamableHTTP request"),await u.handleRequest(c,l,c.body),f)clearInterval(f);mi.debug("StreamableHTTP request handled")});let v=async(c,l)=>{let x=c.headers["mcp-session-id"];if(!x||!Jn.streamable[x]){l.status(400).send("Invalid or missing session ID");return}mi.info(`Received session termination request for session ${x}`);try{await Jn.streamable[x].handleRequest(c,l)}catch(u){if(mi.error("Error handling session termination:",u),!l.headersSent)l.status(500).send("Error processing session termination")}};n.get("/mcp",v),n.delete("/mcp",v),n.get("/sse",async(c,l)=>{mi.debug("Received SSE request",JSON.stringify(c.headers),JSON.stringify(c.body));let x=new f6("/messages",l);Jn.sse[x.sessionId]=x,l.on("close",()=>{delete Jn.sse[x.sessionId]}),await a.connect(x)}),n.post("/messages",async(c,l)=>{let x=c.query.sessionId,u=Jn.sse[x];if(u)await u.handlePostMessage(c,l);else{l.status(400).send(`No transport found for sessionId ${x}`);return}}),ap=n.listen(i,()=>{mi.info(`SSE endpoint available at http://localhost:${i}/sse`),mi.info(`Message endpoint available at http://localhost:${i}/messages`),mi.info(`StreamableHTTP endpoint available at http://localhost:${i}/mcp`)}),process.on("SIGINT",async()=>{mi.debug("Shutting down server..."),await Im(Jn.sse),await Im(Jn.streamable),mi.debug("Server shutdown complete"),process.exit(0)})}async function Im(i){for(let a in i)try{await i[a]?.close(),delete i[a]}catch(n){mi.error(`Error closing transport for session ${a}:`,n)}}async function $h(){if(!ap)throw new Error("HTTP server is not running");return new Promise((i,a)=>{ap.close((n)=>{if(n){a(n);return}ap=null;let v=Object.values(Jn.sse).map((c)=>{return c.close()});Promise.all(v).then(()=>{i()})})})}var Sm,hx,mi,ap=null,Jn;var km=qa(()=>{Sm=require("node:crypto");i0();En();J5();z4();Dc();hx=ii(e4()),mi=xi("HttpServer",1),Jn={streamable:{},sse:{}}});var ym={};a0(ym,{startServer:()=>Bh});var sm,Lx,Cm,I0,Bh=(i,a=3000)=>{let n={};I0.post("/mcp",async(c,l)=>{l.setHeader("Content-Type","application/json");let x=c.headers["mcp-session-id"],u;if(x&&n[x])u=n[x];else if(!x&&m1(c.body))u=new zv({sessionIdGenerator:()=>sm.randomUUID(),enableJsonResponse:!0,onsessioninitialized:(f)=>{n[f]=u}}),u.onclose=()=>{if(u.sessionId)delete n[u.sessionId]},await i.connect(u);else{l.status(400).json({jsonrpc:"2.0",error:{code:-32000,message:"Bad Request: No valid session ID provided"},id:null});return}await u.handleRequest(c,l,c.body)});let v=async(c,l)=>{let x=c.headers["mcp-session-id"];if(!x||!n[x]){l.status(400).send("Invalid or missing session ID");return}await n[x].handleRequest(c,l)};I0.get("/mcp",v),I0.delete("/mcp",v),I0.listen(a,()=>{Cm.info(`MCP Session-based Streamable HTTP Server listening on port ${a}`),Cm.info(`Server address: http://localhost:${a}/mcp`)})};var rm=qa(()=>{sm=require("node:crypto");En();z4();Dc();Lx=ii(e4()),Cm=xi("SessionStreamableHttp"),I0=Lx.default();I0.use(Lx.default.json())});var tm={};a0(tm,{startServer:()=>Uh});var Dx,S0,T0,dm=(i,a,n)=>{return a.writeHead(405).end(JSON.stringify({jsonrpc:"2.0",error:{code:-32000,message:"Method not allowed."},id:null}))},Uh=(i,a=3000)=>{T0.post("/mcp",async(n,v)=>{v.setHeader("Content-Type","application/json"),S0.info("Request body:",JSON.stringify(n.body));try{let c=new zv({sessionIdGenerator:void 0,enableJsonResponse:!0});v.on("close",()=>{c.close(),i.close()}),await i.connect(c),await c.handleRequest(n,v,n.body)}catch(c){if(S0.error("Error handling MCP request:",c),S0.error("Error stack:",c.stack),!v.headersSent)v.status(500).json({jsonrpc:"2.0",error:{code:-32603,message:"Internal server error",data:{errorMessage:c.message,errorName:c.name}},id:n.body?.id||null})}}),T0.get("/mcp",dm),T0.delete("/mcp",dm),T0.listen(a,()=>{S0.info(`MCP Stateless Streamable HTTP server started, listening on port ${a}`),S0.info(`Server address: http://localhost:${a}/mcp`)})};var em=qa(()=>{En();z4();Dx=ii(e4()),S0=xi("StatelessStreamableHttp"),T0=Dx.default();T0.use(Dx.default.json({type:["application/json","application/*+json","*/*"]}))});var cQ=U((ip,nQ)=>{(function(i,a){typeof ip==="object"&&typeof nQ!=="undefined"?a(ip):typeof define==="function"&&define.amd?define(["exports"],a):a(i.URI=i.URI||{})})(ip,function(i){function a(){for(var H=arguments.length,P=Array(H),B=0;B<H;B++)P[B]=arguments[B];if(P.length>1){P[0]=P[0].slice(0,-1);var q=P.length-1;for(var N=1;N<q;++N)P[N]=P[N].slice(1,-1);return P[q]=P[q].slice(1),P.join("")}else return P[0]}function n(H){return"(?:"+H+")"}function v(H){return H===void 0?"undefined":H===null?"null":Object.prototype.toString.call(H).split(" ").pop().split("]").shift().toLowerCase()}function c(H){return H.toUpperCase()}function l(H){return H!==void 0&&H!==null?H instanceof Array?H:typeof H.length!=="number"||H.split||H.setInterval||H.call?[H]:Array.prototype.slice.call(H):[]}function x(H,P){var B=H;if(P)for(var q in P)B[q]=P[q];return B}function u(H){var P="[A-Za-z]",B="[\\x0D]",q="[0-9]",N="[\\x22]",S=a(q,"[A-Fa-f]"),na="[\\x0A]",Xa="[\\x20]",Ya=n(n("%[EFef]"+S+"%"+S+S+"%"+S+S)+"|"+n("%[89A-Fa-f]"+S+"%"+S+S)+"|"+n("%"+S+S)),Ia="[\\:\\/\\?\\#\\[\\]\\@]",za="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Oa=a(Ia,za),ba=H?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",La=H?"[\\uE000-\\uF8FF]":"[]",Va=a(P,q,"[\\-\\.\\_\\~]",ba),Na=n(P+a(P,q,"[\\+\\-\\.]")+"*"),Ba=n(n(Ya+"|"+a(Va,za,"[\\:]"))+"*"),On=n(n("25[0-5]")+"|"+n("2[0-4]"+q)+"|"+n("1"+q+q)+"|"+n("[1-9]"+q)+"|"+q),Wi=n(n("25[0-5]")+"|"+n("2[0-4]"+q)+"|"+n("1"+q+q)+"|"+n("0?[1-9]"+q)+"|0?0?"+q),Pi=n(Wi+"\\."+Wi+"\\."+Wi+"\\."+Wi),Ua=n(S+"{1,4}"),hi=n(n(Ua+"\\:"+Ua)+"|"+Pi),Ai=n(n(Ua+"\\:")+"{6}"+hi),ti=n("\\:\\:"+n(Ua+"\\:")+"{5}"+hi),Nn=n(n(Ua)+"?\\:\\:"+n(Ua+"\\:")+"{4}"+hi),Vi=n(n(n(Ua+"\\:")+"{0,1}"+Ua)+"?\\:\\:"+n(Ua+"\\:")+"{3}"+hi),sc=n(n(n(Ua+"\\:")+"{0,2}"+Ua)+"?\\:\\:"+n(Ua+"\\:")+"{2}"+hi),dn=n(n(n(Ua+"\\:")+"{0,3}"+Ua)+"?\\:\\:"+Ua+"\\:"+hi),An=n(n(n(Ua+"\\:")+"{0,4}"+Ua)+"?\\:\\:"+hi),Xn=n(n(n(Ua+"\\:")+"{0,5}"+Ua)+"?\\:\\:"+Ua),ni=n(n(n(Ua+"\\:")+"{0,6}"+Ua)+"?\\:\\:"),ei=n([Ai,ti,Nn,Vi,sc,dn,An,Xn,ni].join("|")),qn=n(n(Va+"|"+Ya)+"+"),jv=n(ei+"\\%25"+qn),an=n(ei+n("\\%25|\\%(?!"+S+"{2})")+qn),Rv=n("[vV]"+S+"+\\."+a(Va,za,"[\\:]")+"+"),Ql=n("\\["+n(an+"|"+ei+"|"+Rv)+"\\]"),Jl=n(n(Ya+"|"+a(Va,za))+"*"),yc=n(Ql+"|"+Pi+"(?!"+Jl+")|"+Jl),tn=n(q+"*"),Kc=n(n(Ba+"@")+"?"+yc+n("\\:"+tn)+"?"),rc=n(Ya+"|"+a(Va,za,"[\\:\\@]")),_p=n(rc+"*"),Wl=n(rc+"+"),Yl=n(n(Ya+"|"+a(Va,za,"[\\@]"))+"+"),nn=n(n("\\/"+_p)+"*"),Fc=n("\\/"+n(Wl+nn)+"?"),ov=n(Yl+nn),Pc=n(Wl+nn),Mi="(?!"+rc+")",Vc=n(nn+"|"+Fc+"|"+ov+"|"+Pc+"|"+Mi),en=n(n(rc+"|"+a("[\\/\\?]",La))+"*"),dc=n(n(rc+"|[\\/\\?]")+"*"),I1=n(n("\\/\\/"+Kc+nn)+"|"+Fc+"|"+Pc+"|"+Mi),Ev=n(Na+"\\:"+I1+n("\\?"+en)+"?"+n("\\#"+dc)+"?"),tc=n(n("\\/\\/"+Kc+nn)+"|"+Fc+"|"+ov+"|"+Mi),bv=n(tc+n("\\?"+en)+"?"+n("\\#"+dc)+"?"),S1=n(Ev+"|"+bv),h2=n(Na+"\\:"+I1+n("\\?"+en)+"?"),L2="^("+Na+")\\:"+n(n("\\/\\/("+n("("+Ba+")@")+"?("+yc+")"+n("\\:("+tn+")")+"?)")+"?("+nn+"|"+Fc+"|"+Pc+"|"+Mi+")")+n("\\?("+en+")")+"?"+n("\\#("+dc+")")+"?$",D2="^(){0}"+n(n("\\/\\/("+n("("+Ba+")@")+"?("+yc+")"+n("\\:("+tn+")")+"?)")+"?("+nn+"|"+Fc+"|"+ov+"|"+Mi+")")+n("\\?("+en+")")+"?"+n("\\#("+dc+")")+"?$",O2="^("+Na+")\\:"+n(n("\\/\\/("+n("("+Ba+")@")+"?("+yc+")"+n("\\:("+tn+")")+"?)")+"?("+nn+"|"+Fc+"|"+Pc+"|"+Mi+")")+n("\\?("+en+")")+"?$",N2="^"+n("\\#("+dc+")")+"?$",A2="^"+n("("+Ba+")@")+"?("+yc+")"+n("\\:("+tn+")")+"?$";return{NOT_SCHEME:new RegExp(a("[^]",P,q,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(a("[^\\%\\:]",Va,za),"g"),NOT_HOST:new RegExp(a("[^\\%\\[\\]\\:]",Va,za),"g"),NOT_PATH:new RegExp(a("[^\\%\\/\\:\\@]",Va,za),"g"),NOT_PATH_NOSCHEME:new RegExp(a("[^\\%\\/\\@]",Va,za),"g"),NOT_QUERY:new RegExp(a("[^\\%]",Va,za,"[\\:\\@\\/\\?]",La),"g"),NOT_FRAGMENT:new RegExp(a("[^\\%]",Va,za,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(a("[^]",Va,za),"g"),UNRESERVED:new RegExp(Va,"g"),OTHER_CHARS:new RegExp(a("[^\\%]",Va,Oa),"g"),PCT_ENCODED:new RegExp(Ya,"g"),IPV4ADDRESS:new RegExp("^("+Pi+")$"),IPV6ADDRESS:new RegExp("^\\[?("+ei+")"+n(n("\\%25|\\%(?!"+S+"{2})")+"("+qn+")")+"?\\]?$")}}var f=u(!1),w=u(!0),m=function(){function H(P,B){var q=[],N=!0,S=!1,na=void 0;try{for(var Xa=P[Symbol.iterator](),Ya;!(N=(Ya=Xa.next()).done);N=!0)if(q.push(Ya.value),B&&q.length===B)break}catch(Ia){S=!0,na=Ia}finally{try{if(!N&&Xa.return)Xa.return()}finally{if(S)throw na}}return q}return function(P,B){if(Array.isArray(P))return P;else if(Symbol.iterator in Object(P))return H(P,B);else throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),W=function(H){if(Array.isArray(H)){for(var P=0,B=Array(H.length);P<H.length;P++)B[P]=H[P];return B}else return Array.from(H)},Y=2147483647,J=36,X=1,F=26,K=38,M=700,L=72,$=128,D="-",O=/^xn--/,j=/[^\0-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=J-X,k=Math.floor,y=String.fromCharCode;function C(H){throw new RangeError(g[H])}function R(H,P){var B=[],q=H.length;while(q--)B[q]=P(H[q]);return B}function b(H,P){var B=H.split("@"),q="";if(B.length>1)q=B[0]+"@",H=B[1];H=H.replace(I,".");var N=H.split("."),S=R(N,P).join(".");return q+S}function T(H){var P=[],B=0,q=H.length;while(B<q){var N=H.charCodeAt(B++);if(N>=55296&&N<=56319&&B<q){var S=H.charCodeAt(B++);if((S&64512)==56320)P.push(((N&1023)<<10)+(S&1023)+65536);else P.push(N),B--}else P.push(N)}return P}var Wa=function H(P){return String.fromCodePoint.apply(String,W(P))},xa=function H(P){if(P-48<10)return P-22;if(P-65<26)return P-65;if(P-97<26)return P-97;return J},Ja=function H(P,B){return P+22+75*(P<26)-((B!=0)<<5)},pa=function H(P,B,q){var N=0;P=q?k(P/M):P>>1,P+=k(P/B);for(;P>E*F>>1;N+=J)P=k(P/E);return k(N+(E+1)*P/(P+K))},e=function H(P){var B=[],q=P.length,N=0,S=$,na=L,Xa=P.lastIndexOf(D);if(Xa<0)Xa=0;for(var Ya=0;Ya<Xa;++Ya){if(P.charCodeAt(Ya)>=128)C("not-basic");B.push(P.charCodeAt(Ya))}for(var Ia=Xa>0?Xa+1:0;Ia<q;){var za=N;for(var Oa=1,ba=J;;ba+=J){if(Ia>=q)C("invalid-input");var La=xa(P.charCodeAt(Ia++));if(La>=J||La>k((Y-N)/Oa))C("overflow");N+=La*Oa;var Va=ba<=na?X:ba>=na+F?F:ba-na;if(La<Va)break;var Na=J-Va;if(Oa>k(Y/Na))C("overflow");Oa*=Na}var Ba=B.length+1;if(na=pa(N-za,Ba,za==0),k(N/Ba)>Y-S)C("overflow");S+=k(N/Ba),N%=Ba,B.splice(N++,0,S)}return String.fromCodePoint.apply(String,B)},oa=function H(P){var B=[];P=T(P);var q=P.length,N=$,S=0,na=L,Xa=!0,Ya=!1,Ia=void 0;try{for(var za=P[Symbol.iterator](),Oa;!(Xa=(Oa=za.next()).done);Xa=!0){var ba=Oa.value;if(ba<128)B.push(y(ba))}}catch(an){Ya=!0,Ia=an}finally{try{if(!Xa&&za.return)za.return()}finally{if(Ya)throw Ia}}var La=B.length,Va=La;if(La)B.push(D);while(Va<q){var Na=Y,Ba=!0,On=!1,Wi=void 0;try{for(var Pi=P[Symbol.iterator](),Ua;!(Ba=(Ua=Pi.next()).done);Ba=!0){var hi=Ua.value;if(hi>=N&&hi<Na)Na=hi}}catch(an){On=!0,Wi=an}finally{try{if(!Ba&&Pi.return)Pi.return()}finally{if(On)throw Wi}}var Ai=Va+1;if(Na-N>k((Y-S)/Ai))C("overflow");S+=(Na-N)*Ai,N=Na;var ti=!0,Nn=!1,Vi=void 0;try{for(var sc=P[Symbol.iterator](),dn;!(ti=(dn=sc.next()).done);ti=!0){var An=dn.value;if(An<N&&++S>Y)C("overflow");if(An==N){var Xn=S;for(var ni=J;;ni+=J){var ei=ni<=na?X:ni>=na+F?F:ni-na;if(Xn<ei)break;var qn=Xn-ei,jv=J-ei;B.push(y(Ja(ei+qn%jv,0))),Xn=k(qn/jv)}B.push(y(Ja(Xn,0))),na=pa(S,Ai,Va==La),S=0,++Va}}}catch(an){Nn=!0,Vi=an}finally{try{if(!ti&&sc.return)sc.return()}finally{if(Nn)throw Vi}}++S,++N}return B.join("")},vi=function H(P){return b(P,function(B){return O.test(B)?e(B.slice(4).toLowerCase()):B})},Ji=function H(P){return b(P,function(B){return j.test(B)?"xn--"+oa(B):B})},ua={version:"2.1.0",ucs2:{decode:T,encode:Wa},decode:e,encode:oa,toASCII:Ji,toUnicode:vi},$a={};function ta(H){var P=H.charCodeAt(0),B=void 0;if(P<16)B="%0"+P.toString(16).toUpperCase();else if(P<128)B="%"+P.toString(16).toUpperCase();else if(P<2048)B="%"+(P>>6|192).toString(16).toUpperCase()+"%"+(P&63|128).toString(16).toUpperCase();else B="%"+(P>>12|224).toString(16).toUpperCase()+"%"+(P>>6&63|128).toString(16).toUpperCase()+"%"+(P&63|128).toString(16).toUpperCase();return B}function li(H){var P="",B=0,q=H.length;while(B<q){var N=parseInt(H.substr(B+1,2),16);if(N<128)P+=String.fromCharCode(N),B+=3;else if(N>=194&&N<224){if(q-B>=6){var S=parseInt(H.substr(B+4,2),16);P+=String.fromCharCode((N&31)<<6|S&63)}else P+=H.substr(B,6);B+=6}else if(N>=224){if(q-B>=9){var na=parseInt(H.substr(B+4,2),16),Xa=parseInt(H.substr(B+7,2),16);P+=String.fromCharCode((N&15)<<12|(na&63)<<6|Xa&63)}else P+=H.substr(B,9);B+=9}else P+=H.substr(B,3),B+=3}return P}function pi(H,P){function B(q){var N=li(q);return!N.match(P.UNRESERVED)?q:N}if(H.scheme)H.scheme=String(H.scheme).replace(P.PCT_ENCODED,B).toLowerCase().replace(P.NOT_SCHEME,"");if(H.userinfo!==void 0)H.userinfo=String(H.userinfo).replace(P.PCT_ENCODED,B).replace(P.NOT_USERINFO,ta).replace(P.PCT_ENCODED,c);if(H.host!==void 0)H.host=String(H.host).replace(P.PCT_ENCODED,B).toLowerCase().replace(P.NOT_HOST,ta).replace(P.PCT_ENCODED,c);if(H.path!==void 0)H.path=String(H.path).replace(P.PCT_ENCODED,B).replace(H.scheme?P.NOT_PATH:P.NOT_PATH_NOSCHEME,ta).replace(P.PCT_ENCODED,c);if(H.query!==void 0)H.query=String(H.query).replace(P.PCT_ENCODED,B).replace(P.NOT_QUERY,ta).replace(P.PCT_ENCODED,c);if(H.fragment!==void 0)H.fragment=String(H.fragment).replace(P.PCT_ENCODED,B).replace(P.NOT_FRAGMENT,ta).replace(P.PCT_ENCODED,c);return H}function bi(H){return H.replace(/^0*(.*)/,"$1")||"0"}function Za(H,P){var B=H.match(P.IPV4ADDRESS)||[],q=m(B,2),N=q[1];if(N)return N.split(".").map(bi).join(".");else return H}function Ea(H,P){var B=H.match(P.IPV6ADDRESS)||[],q=m(B,3),N=q[1],S=q[2];if(N){var na=N.toLowerCase().split("::").reverse(),Xa=m(na,2),Ya=Xa[0],Ia=Xa[1],za=Ia?Ia.split(":").map(bi):[],Oa=Ya.split(":").map(bi),ba=P.IPV4ADDRESS.test(Oa[Oa.length-1]),La=ba?7:8,Va=Oa.length-La,Na=Array(La);for(var Ba=0;Ba<La;++Ba)Na[Ba]=za[Ba]||Oa[Va+Ba]||"";if(ba)Na[La-1]=Za(Na[La-1],P);var On=Na.reduce(function(Ai,ti,Nn){if(!ti||ti==="0"){var Vi=Ai[Ai.length-1];if(Vi&&Vi.index+Vi.length===Nn)Vi.length++;else Ai.push({index:Nn,length:1})}return Ai},[]),Wi=On.sort(function(Ai,ti){return ti.length-Ai.length})[0],Pi=void 0;if(Wi&&Wi.length>1){var Ua=Na.slice(0,Wi.index),hi=Na.slice(Wi.index+Wi.length);Pi=Ua.join(":")+"::"+hi.join(":")}else Pi=Na.join(":");if(S)Pi+="%"+S;return Pi}else return H}var yn=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ea="".match(/(){0}/)[1]===void 0;function Pa(H){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B={},q=P.iri!==!1?w:f;if(P.reference==="suffix")H=(P.scheme?P.scheme+":":"")+"//"+H;var N=H.match(yn);if(N){if(ea){if(B.scheme=N[1],B.userinfo=N[3],B.host=N[4],B.port=parseInt(N[5],10),B.path=N[6]||"",B.query=N[7],B.fragment=N[8],isNaN(B.port))B.port=N[5]}else if(B.scheme=N[1]||void 0,B.userinfo=H.indexOf("@")!==-1?N[3]:void 0,B.host=H.indexOf("//")!==-1?N[4]:void 0,B.port=parseInt(N[5],10),B.path=N[6]||"",B.query=H.indexOf("?")!==-1?N[7]:void 0,B.fragment=H.indexOf("#")!==-1?N[8]:void 0,isNaN(B.port))B.port=H.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?N[4]:void 0;if(B.host)B.host=Ea(Za(B.host,q),q);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(P.reference&&P.reference!=="suffix"&&P.reference!==B.reference)B.error=B.error||"URI is not a "+P.reference+" reference.";var S=$a[(P.scheme||B.scheme||"").toLowerCase()];if(!P.unicodeSupport&&(!S||!S.unicodeSupport)){if(B.host&&(P.domainHost||S&&S.domainHost))try{B.host=ua.toASCII(B.host.replace(q.PCT_ENCODED,li).toLowerCase())}catch(na){B.error=B.error||"Host's domain name can not be converted to ASCII via punycode: "+na}pi(B,f)}else pi(B,q);if(S&&S.parse)S.parse(B,P)}else B.error=B.error||"URI can not be parsed.";return B}function Bi(H,P){var B=P.iri!==!1?w:f,q=[];if(H.userinfo!==void 0)q.push(H.userinfo),q.push("@");if(H.host!==void 0)q.push(Ea(Za(String(H.host),B),B).replace(B.IPV6ADDRESS,function(N,S,na){return"["+S+(na?"%25"+na:"")+"]"}));if(typeof H.port==="number"||typeof H.port==="string")q.push(":"),q.push(String(H.port));return q.length?q.join(""):void 0}var yi=/^\.\.?\//,Yn=/^\/\.(\/|$)/,ri=/^\/\.\.(\/|$)/,ai=/^\/?(?:.|\n)*?(?=\/|$)/;function ka(H){var P=[];while(H.length)if(H.match(yi))H=H.replace(yi,"");else if(H.match(Yn))H=H.replace(Yn,"/");else if(H.match(ri))H=H.replace(ri,"/"),P.pop();else if(H==="."||H==="..")H="";else{var B=H.match(ai);if(B){var q=B[0];H=H.slice(q.length),P.push(q)}else throw new Error("Unexpected dot segment condition")}return P.join("")}function ga(H){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=P.iri?w:f,q=[],N=$a[(P.scheme||H.scheme||"").toLowerCase()];if(N&&N.serialize)N.serialize(H,P);if(H.host){if(B.IPV6ADDRESS.test(H.host));else if(P.domainHost||N&&N.domainHost)try{H.host=!P.iri?ua.toASCII(H.host.replace(B.PCT_ENCODED,li).toLowerCase()):ua.toUnicode(H.host)}catch(Xa){H.error=H.error||"Host's domain name can not be converted to "+(!P.iri?"ASCII":"Unicode")+" via punycode: "+Xa}}if(pi(H,B),P.reference!=="suffix"&&H.scheme)q.push(H.scheme),q.push(":");var S=Bi(H,P);if(S!==void 0){if(P.reference!=="suffix")q.push("//");if(q.push(S),H.path&&H.path.charAt(0)!=="/")q.push("/")}if(H.path!==void 0){var na=H.path;if(!P.absolutePath&&(!N||!N.absolutePath))na=ka(na);if(S===void 0)na=na.replace(/^\/\//,"/%2F");q.push(na)}if(H.query!==void 0)q.push("?"),q.push(H.query);if(H.fragment!==void 0)q.push("#"),q.push(H.fragment);return q.join("")}function ya(H,P){var B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},q=arguments[3],N={};if(!q)H=Pa(ga(H,B),B),P=Pa(ga(P,B),B);if(B=B||{},!B.tolerant&&P.scheme)N.scheme=P.scheme,N.userinfo=P.userinfo,N.host=P.host,N.port=P.port,N.path=ka(P.path||""),N.query=P.query;else{if(P.userinfo!==void 0||P.host!==void 0||P.port!==void 0)N.userinfo=P.userinfo,N.host=P.host,N.port=P.port,N.path=ka(P.path||""),N.query=P.query;else{if(!P.path)if(N.path=H.path,P.query!==void 0)N.query=P.query;else N.query=H.query;else{if(P.path.charAt(0)==="/")N.path=ka(P.path);else{if((H.userinfo!==void 0||H.host!==void 0||H.port!==void 0)&&!H.path)N.path="/"+P.path;else if(!H.path)N.path=P.path;else N.path=H.path.slice(0,H.path.lastIndexOf("/")+1)+P.path;N.path=ka(N.path)}N.query=P.query}N.userinfo=H.userinfo,N.host=H.host,N.port=H.port}N.scheme=H.scheme}return N.fragment=P.fragment,N}function di(H,P,B){var q=x({scheme:"null"},B);return ga(ya(Pa(H,q),Pa(P,q),q,!0),q)}function Ki(H,P){if(typeof H==="string")H=ga(Pa(H,P),P);else if(v(H)==="object")H=Pa(ga(H,P),P);return H}function rn(H,P,B){if(typeof H==="string")H=ga(Pa(H,B),B);else if(v(H)==="object")H=ga(H,B);if(typeof P==="string")P=ga(Pa(P,B),B);else if(v(P)==="object")P=ga(P,B);return H===P}function R1(H,P){return H&&H.toString().replace(!P||!P.iri?f.ESCAPE:w.ESCAPE,ta)}function Ui(H,P){return H&&H.toString().replace(!P||!P.iri?f.PCT_ENCODED:w.PCT_ENCODED,li)}var Xc={scheme:"http",domainHost:!0,parse:function H(P,B){if(!P.host)P.error=P.error||"HTTP URIs must have a host.";return P},serialize:function H(P,B){var q=String(P.scheme).toLowerCase()==="https";if(P.port===(q?443:80)||P.port==="")P.port=void 0;if(!P.path)P.path="/";return P}},vl={scheme:"https",domainHost:Xc.domainHost,parse:Xc.parse,serialize:Xc.serialize};function o1(H){return typeof H.secure==="boolean"?H.secure:String(H.scheme).toLowerCase()==="wss"}var Gc={scheme:"ws",domainHost:!0,parse:function H(P,B){var q=P;return q.secure=o1(q),q.resourceName=(q.path||"/")+(q.query?"?"+q.query:""),q.path=void 0,q.query=void 0,q},serialize:function H(P,B){if(P.port===(o1(P)?443:80)||P.port==="")P.port=void 0;if(typeof P.secure==="boolean")P.scheme=P.secure?"wss":"ws",P.secure=void 0;if(P.resourceName){var q=P.resourceName.split("?"),N=m(q,2),S=N[0],na=N[1];P.path=S&&S!=="/"?S:void 0,P.query=na,P.resourceName=void 0}return P.fragment=void 0,P}},E1={scheme:"wss",domainHost:Gc.domainHost,parse:Gc.parse,serialize:Gc.serialize},b1={},_1=!0,Nv="[A-Za-z0-9\\-\\.\\_\\~"+(_1?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",Fi="[0-9A-Fa-f]",ll=n(n("%[EFef]"+Fi+"%"+Fi+Fi+"%"+Fi+Fi)+"|"+n("%[89A-Fa-f]"+Fi+"%"+Fi+Fi)+"|"+n("%"+Fi+Fi)),zn="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Ln="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",pl=a(Ln,"[\\\"\\\\]"),Av="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ep=new RegExp(Nv,"g"),Dn=new RegExp(ll,"g"),xl=new RegExp(a("[^]",zn,"[\\.]","[\\\"]",pl),"g"),ul=new RegExp(a("[^]",Nv,Av),"g"),bp=ul;function Z1(H){var P=li(H);return!P.match(Ep)?H:P}var fl={scheme:"mailto",parse:function H(P,B){var q=P,N=q.to=q.path?q.path.split(","):[];if(q.path=void 0,q.query){var S=!1,na={},Xa=q.query.split("&");for(var Ya=0,Ia=Xa.length;Ya<Ia;++Ya){var za=Xa[Ya].split("=");switch(za[0]){case"to":var Oa=za[1].split(",");for(var ba=0,La=Oa.length;ba<La;++ba)N.push(Oa[ba]);break;case"subject":q.subject=Ui(za[1],B);break;case"body":q.body=Ui(za[1],B);break;default:S=!0,na[Ui(za[0],B)]=Ui(za[1],B);break}}if(S)q.headers=na}q.query=void 0;for(var Va=0,Na=N.length;Va<Na;++Va){var Ba=N[Va].split("@");if(Ba[0]=Ui(Ba[0]),!B.unicodeSupport)try{Ba[1]=ua.toASCII(Ui(Ba[1],B).toLowerCase())}catch(On){q.error=q.error||"Email address's domain name can not be converted to ASCII via punycode: "+On}else Ba[1]=Ui(Ba[1],B).toLowerCase();N[Va]=Ba.join("@")}return q},serialize:function H(P,B){var q=P,N=l(P.to);if(N){for(var S=0,na=N.length;S<na;++S){var Xa=String(N[S]),Ya=Xa.lastIndexOf("@"),Ia=Xa.slice(0,Ya).replace(Dn,Z1).replace(Dn,c).replace(xl,ta),za=Xa.slice(Ya+1);try{za=!B.iri?ua.toASCII(Ui(za,B).toLowerCase()):ua.toUnicode(za)}catch(Va){q.error=q.error||"Email address's domain name can not be converted to "+(!B.iri?"ASCII":"Unicode")+" via punycode: "+Va}N[S]=Ia+"@"+za}q.path=N.join(",")}var Oa=P.headers=P.headers||{};if(P.subject)Oa.subject=P.subject;if(P.body)Oa.body=P.body;var ba=[];for(var La in Oa)if(Oa[La]!==b1[La])ba.push(La.replace(Dn,Z1).replace(Dn,c).replace(ul,ta)+"="+Oa[La].replace(Dn,Z1).replace(Dn,c).replace(bp,ta));if(ba.length)q.query=ba.join("&");return q}},wl=/^([^\:]+)\:(.*)/,qv={scheme:"urn",parse:function H(P,B){var q=P.path&&P.path.match(wl),N=P;if(q){var S=B.scheme||N.scheme||"urn",na=q[1].toLowerCase(),Xa=q[2],Ya=S+":"+(B.nid||na),Ia=$a[Ya];if(N.nid=na,N.nss=Xa,N.path=void 0,Ia)N=Ia.parse(N,B)}else N.error=N.error||"URN can not be parsed.";return N},serialize:function H(P,B){var q=B.scheme||P.scheme||"urn",N=P.nid,S=q+":"+(B.nid||N),na=$a[S];if(na)P=na.serialize(P,B);var Xa=P,Ya=P.nss;return Xa.path=(N||B.nid)+":"+Ya,Xa}},g1=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ml={scheme:"urn:uuid",parse:function H(P,B){var q=P;if(q.uuid=q.nss,q.nss=void 0,!B.tolerant&&(!q.uuid||!q.uuid.match(g1)))q.error=q.error||"UUID is not valid.";return q},serialize:function H(P,B){var q=P;return q.nss=(P.uuid||"").toLowerCase(),q}};$a[Xc.scheme]=Xc,$a[vl.scheme]=vl,$a[Gc.scheme]=Gc,$a[E1.scheme]=E1,$a[fl.scheme]=fl,$a[qv.scheme]=qv,$a[ml.scheme]=ml,i.SCHEMES=$a,i.pctEncChar=ta,i.pctDecChars=li,i.parse=Pa,i.removeDotSegments=ka,i.serialize=ga,i.resolveComponents=ya,i.resolve=di,i.normalize=Ki,i.equal=rn,i.escapeComponent=R1,i.unescapeComponent=Ui,Object.defineProperty(i,"__esModule",{value:!0})})});var np=U((yA,vQ)=>{vQ.exports=function i(a,n){if(a===n)return!0;if(a&&n&&typeof a=="object"&&typeof n=="object"){if(a.constructor!==n.constructor)return!1;var v,c,l;if(Array.isArray(a)){if(v=a.length,v!=n.length)return!1;for(c=v;c--!==0;)if(!i(a[c],n[c]))return!1;return!0}if(a.constructor===RegExp)return a.source===n.source&&a.flags===n.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===n.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===n.toString();if(l=Object.keys(a),v=l.length,v!==Object.keys(n).length)return!1;for(c=v;c--!==0;)if(!Object.prototype.hasOwnProperty.call(n,l[c]))return!1;for(c=v;c--!==0;){var x=l[c];if(!i(a[x],n[x]))return!1}return!0}return a!==a&&n!==n}});var pQ=U((rA,lQ)=>{lQ.exports=function i(a){var n=0,v=a.length,c=0,l;while(c<v)if(n++,l=a.charCodeAt(c++),l>=55296&&l<=56319&&c<v){if(l=a.charCodeAt(c),(l&64512)==56320)c++}return n}});var Bv=U((dA,fQ)=>{fQ.exports={copy:Lh,checkDataType:Nx,checkDataTypes:Dh,coerceToTypes:Oh,toHash:qx,getProperty:jx,escapeQuotes:Rx,equal:np(),ucs2length:pQ(),varOccurences:qh,varReplace:jh,schemaHasRules:Rh,schemaHasRulesExcept:oh,schemaUnknownRules:Eh,toQuotedString:Ax,getPathExpr:bh,getPath:_h,getData:Ih,unescapeFragment:Sh,unescapeJsonPointer:Ex,escapeFragment:Th,escapeJsonPointer:ox};function Lh(i,a){a=a||{};for(var n in i)a[n]=i[n];return a}function Nx(i,a,n,v){var c=v?" !== ":" === ",l=v?" || ":" && ",x=v?"!":"",u=v?"":"!";switch(i){case"null":return a+c+"null";case"array":return x+"Array.isArray("+a+")";case"object":return"("+x+a+l+"typeof "+a+c+'"object"'+l+u+"Array.isArray("+a+"))";case"integer":return"(typeof "+a+c+'"number"'+l+u+"("+a+" % 1)"+l+a+c+a+(n?l+x+"isFinite("+a+")":"")+")";case"number":return"(typeof "+a+c+'"'+i+'"'+(n?l+x+"isFinite("+a+")":"")+")";default:return"typeof "+a+c+'"'+i+'"'}}function Dh(i,a,n){switch(i.length){case 1:return Nx(i[0],a,n,!0);default:var v="",c=qx(i);if(c.array&&c.object)v=c.null?"(":"(!"+a+" || ",v+="typeof "+a+' !== "object")',delete c.null,delete c.array,delete c.object;if(c.number)delete c.integer;for(var l in c)v+=(v?" && ":"")+Nx(l,a,n,!0);return v}}var xQ=qx(["string","number","integer","boolean","null"]);function Oh(i,a){if(Array.isArray(a)){var n=[];for(var v=0;v<a.length;v++){var c=a[v];if(xQ[c])n[n.length]=c;else if(i==="array"&&c==="array")n[n.length]=c}if(n.length)return n}else if(xQ[a])return[a];else if(i==="array"&&a==="array")return["array"]}function qx(i){var a={};for(var n=0;n<i.length;n++)a[i[n]]=!0;return a}var Nh=/^[a-z$_][a-z$_0-9]*$/i,Ah=/'|\\/g;function jx(i){return typeof i=="number"?"["+i+"]":Nh.test(i)?"."+i:"['"+Rx(i)+"']"}function Rx(i){return i.replace(Ah,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function qh(i,a){a+="[^0-9]";var n=i.match(new RegExp(a,"g"));return n?n.length:0}function jh(i,a,n){return a+="([^0-9])",n=n.replace(/\$/g,"$$$$"),i.replace(new RegExp(a,"g"),n+"$1")}function Rh(i,a){if(typeof i=="boolean")return!i;for(var n in i)if(a[n])return!0}function oh(i,a,n){if(typeof i=="boolean")return!i&&n!="not";for(var v in i)if(v!=n&&a[v])return!0}function Eh(i,a){if(typeof i=="boolean")return;for(var n in i)if(!a[n])return n}function Ax(i){return"'"+Rx(i)+"'"}function bh(i,a,n,v){var c=n?"'/' + "+a+(v?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):v?"'[' + "+a+" + ']'":"'[\\'' + "+a+" + '\\']'";return uQ(i,c)}function _h(i,a,n){var v=n?Ax("/"+ox(a)):Ax(jx(a));return uQ(i,v)}var Zh=/^\/(?:[^~]|~0|~1)*$/,gh=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ih(i,a,n){var v,c,l,x;if(i==="")return"rootData";if(i[0]=="/"){if(!Zh.test(i))throw new Error("Invalid JSON-pointer: "+i);c=i,l="rootData"}else{if(x=i.match(gh),!x)throw new Error("Invalid JSON-pointer: "+i);if(v=+x[1],c=x[2],c=="#"){if(v>=a)throw new Error("Cannot access property/index "+v+" levels up, current level is "+a);return n[a-v]}if(v>a)throw new Error("Cannot access data "+v+" levels up, current level is "+a);if(l="data"+(a-v||""),!c)return l}var u=l,f=c.split("/");for(var w=0;w<f.length;w++){var m=f[w];if(m)l+=jx(Ex(m)),u+=" && "+l}return u}function uQ(i,a){if(i=='""')return a;return(i+" + "+a).replace(/([^\\])' \+ '/g,"$1")}function Sh(i){return Ex(decodeURIComponent(i))}function Th(i){return encodeURIComponent(ox(i))}function ox(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}function Ex(i){return i.replace(/~1/g,"/").replace(/~0/g,"~")}});var bx=U((tA,wQ)=>{var kh=Bv();wQ.exports=Ch;function Ch(i){kh.copy(i,this)}});var QQ=U((eA,mQ)=>{var bc=mQ.exports=function(i,a,n){if(typeof a=="function")n=a,a={};n=a.cb||n;var v=typeof n=="function"?n:n.pre||function(){},c=n.post||function(){};cp(a,v,c,i,"",i)};bc.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0};bc.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};bc.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};bc.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 cp(i,a,n,v,c,l,x,u,f,w){if(v&&typeof v=="object"&&!Array.isArray(v)){a(v,c,l,x,u,f,w);for(var m in v){var W=v[m];if(Array.isArray(W)){if(m in bc.arrayKeywords)for(var Y=0;Y<W.length;Y++)cp(i,a,n,W[Y],c+"/"+m+"/"+Y,l,c,m,v,Y)}else if(m in bc.propsKeywords){if(W&&typeof W=="object")for(var J in W)cp(i,a,n,W[J],c+"/"+m+"/"+sh(J),l,c,m,v,J)}else if(m in bc.keywords||i.allKeys&&!(m in bc.skipKeywords))cp(i,a,n,W,c+"/"+m,l,c,m,v)}n(v,c,l,x,u,f,w)}}function sh(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}});var fp=U((aq,zQ)=>{var k0=cQ(),JQ=np(),xp=Bv(),vp=bx(),yh=QQ();zQ.exports=Zc;Zc.normalizeId=_c;Zc.fullPath=lp;Zc.url=pp;Zc.ids=aL;Zc.inlineRef=_x;Zc.schema=up;function Zc(i,a,n){var v=this._refs[n];if(typeof v=="string")if(this._refs[v])v=this._refs[v];else return Zc.call(this,i,a,v);if(v=v||this._schemas[n],v instanceof vp)return _x(v.schema,this._opts.inlineRefs)?v.schema:v.validate||this._compile(v);var c=up.call(this,a,n),l,x,u;if(c)l=c.schema,a=c.root,u=c.baseId;if(l instanceof vp)x=l.validate||i.call(this,l.schema,a,void 0,u);else if(l!==void 0)x=_x(l,this._opts.inlineRefs)?l:i.call(this,l,a,void 0,u);return x}function up(i,a){var n=k0.parse(a),v=YQ(n),c=lp(this._getId(i.schema));if(Object.keys(i.schema).length===0||v!==c){var l=_c(v),x=this._refs[l];if(typeof x=="string")return rh.call(this,i,x,n);else if(x instanceof vp){if(!x.validate)this._compile(x);i=x}else if(x=this._schemas[l],x instanceof vp){if(!x.validate)this._compile(x);if(l==_c(a))return{schema:x,root:i,baseId:c};i=x}else return;if(!i.schema)return;c=lp(this._getId(i.schema))}return WQ.call(this,n,c,i.schema,i)}function rh(i,a,n){var v=up.call(this,i,a);if(v){var{schema:c,baseId:l}=v;i=v.root;var x=this._getId(c);if(x)l=pp(l,x);return WQ.call(this,n,l,c,i)}}var dh=xp.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function WQ(i,a,n,v){if(i.fragment=i.fragment||"",i.fragment.slice(0,1)!="/")return;var c=i.fragment.split("/");for(var l=1;l<c.length;l++){var x=c[l];if(x){if(x=xp.unescapeFragment(x),n=n[x],n===void 0)break;var u;if(!dh[x]){if(u=this._getId(n),u)a=pp(a,u);if(n.$ref){var f=pp(a,n.$ref),w=up.call(this,v,f);if(w)n=w.schema,v=w.root,a=w.baseId}}}}if(n!==void 0&&n!==v.schema)return{schema:n,root:v,baseId:a}}var th=xp.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function _x(i,a){if(a===!1)return!1;if(a===void 0||a===!0)return Zx(i);else if(a)return gx(i)<=a}function Zx(i){var a;if(Array.isArray(i)){for(var n=0;n<i.length;n++)if(a=i[n],typeof a=="object"&&!Zx(a))return!1}else for(var v in i){if(v=="$ref")return!1;if(a=i[v],typeof a=="object"&&!Zx(a))return!1}return!0}function gx(i){var a=0,n;if(Array.isArray(i))for(var v=0;v<i.length;v++){if(n=i[v],typeof n=="object")a+=gx(n);if(a==1/0)return 1/0}else for(var c in i){if(c=="$ref")return 1/0;if(th[c])a++;else{if(n=i[c],typeof n=="object")a+=gx(n)+1;if(a==1/0)return 1/0}}return a}function lp(i,a){if(a!==!1)i=_c(i);var n=k0.parse(i);return YQ(n)}function YQ(i){return k0.serialize(i).split("#")[0]+"#"}var eh=/#\/?$/;function _c(i){return i?i.replace(eh,""):""}function pp(i,a){return a=_c(a),k0.resolve(i,a)}function aL(i){var a=_c(this._getId(i)),n={"":a},v={"":lp(a,!1)},c={},l=this;return yh(i,{allKeys:!0},function(x,u,f,w,m,W,Y){if(u==="")return;var J=l._getId(x),X=n[w],F=v[w]+"/"+m;if(Y!==void 0)F+="/"+(typeof Y=="number"?Y:xp.escapeFragment(Y));if(typeof J=="string"){J=X=_c(X?k0.resolve(X,J):J);var K=l._refs[J];if(typeof K=="string")K=l._refs[K];if(K&&K.schema){if(!JQ(x,K.schema))throw new Error('id "'+J+'" resolves to more than one schema')}else if(J!=_c(F))if(J[0]=="#"){if(c[J]&&!JQ(x,c[J]))throw new Error('id "'+J+'" resolves to more than one schema');c[J]=x}else l._refs[J]=F}n[u]=X,v[u]=F}),c}});var wp=U((iq,GQ)=>{var Ix=fp();GQ.exports={Validation:XQ(iL),MissingRef:XQ(Sx)};function iL(i){this.message="validation failed",this.errors=i,this.ajv=this.validation=!0}Sx.message=function(i,a){return"can't resolve reference "+a+" from id "+i};function Sx(i,a,n){this.message=n||Sx.message(i,a),this.missingRef=Ix.url(i,a),this.missingSchema=Ix.normalizeId(Ix.fullPath(this.missingRef))}function XQ(i){return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i}});var Tx=U((nq,KQ)=>{KQ.exports=function(i,a){if(!a)a={};if(typeof a==="function")a={cmp:a};var n=typeof a.cycles==="boolean"?a.cycles:!1,v=a.cmp&&function(l){return function(x){return function(u,f){var w={key:u,value:x[u]},m={key:f,value:x[f]};return l(w,m)}}}(a.cmp),c=[];return function l(x){if(x&&x.toJSON&&typeof x.toJSON==="function")x=x.toJSON();if(x===void 0)return;if(typeof x=="number")return isFinite(x)?""+x:"null";if(typeof x!=="object")return JSON.stringify(x);var u,f;if(Array.isArray(x)){f="[";for(u=0;u<x.length;u++){if(u)f+=",";f+=l(x[u])||"null"}return f+"]"}if(x===null)return"null";if(c.indexOf(x)!==-1){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var w=c.push(x)-1,m=Object.keys(x).sort(v&&v(x));f="";for(u=0;u<m.length;u++){var W=m[u],Y=l(x[W]);if(!Y)continue;if(f)f+=",";f+=JSON.stringify(W)+":"+Y}return c.splice(w,1),"{"+f+"}"}(i)}});var kx=U((cq,FQ)=>{FQ.exports=function i(a,n,v){var c="",l=a.schema.$async===!0,x=a.util.schemaHasRulesExcept(a.schema,a.RULES.all,"$ref"),u=a.self._getId(a.schema);if(a.opts.strictKeywords){var f=a.util.schemaUnknownRules(a.schema,a.RULES.keywords);if(f){var w="unknown keyword: "+f;if(a.opts.strictKeywords==="log")a.logger.warn(w);else throw new Error(w)}}if(a.isTop){if(c+=" var validate = ",l)a.async=!0,c+="async ";if(c+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",u&&(a.opts.sourceCode||a.opts.processCode))c+=" "+("/*# sourceURL="+u+" */")+" "}if(typeof a.schema=="boolean"||!(x||a.schema.$ref)){var n="false schema",m=a.level,W=a.dataLevel,Y=a.schema[n],J=a.schemaPath+a.util.getProperty(n),X=a.errSchemaPath+"/"+n,O=!a.opts.allErrors,g,F="data"+(W||""),D="valid"+m;if(a.schema===!1){if(a.isTop)O=!0;else c+=" var "+D+" = false; ";var K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(g||"false schema")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(X)+" , params: {} ",a.opts.messages!==!1)c+=" , message: 'boolean schema is false' ";if(a.opts.verbose)c+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+F+" ";c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&O)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else if(a.isTop)if(l)c+=" return data; ";else c+=" validate.errors = null; return true; ";else c+=" var "+D+" = true; ";if(a.isTop)c+=" }; return validate; ";return c}if(a.isTop){var L=a.isTop,m=a.level=0,W=a.dataLevel=0,F="data";if(a.rootId=a.resolve.fullPath(a.self._getId(a.root.schema)),a.baseId=a.baseId||a.rootId,delete a.isTop,a.dataPathArr=[""],a.schema.default!==void 0&&a.opts.useDefaults&&a.opts.strictDefaults){var $="default is ignored in the schema root";if(a.opts.strictDefaults==="log")a.logger.warn($);else throw new Error($)}c+=" var vErrors = null; ",c+=" var errors = 0; ",c+=" if (rootData === undefined) rootData = data; "}else{var{level:m,dataLevel:W}=a,F="data"+(W||"");if(u)a.baseId=a.resolve.url(a.baseId,u);if(l&&!a.async)throw new Error("async schema in sync schema");c+=" var errs_"+m+" = errors;"}var D="valid"+m,O=!a.opts.allErrors,j="",I="",g,E=a.schema.type,k=Array.isArray(E);if(E&&a.opts.nullable&&a.schema.nullable===!0){if(k){if(E.indexOf("null")==-1)E=E.concat("null")}else if(E!="null")E=[E,"null"],k=!0}if(k&&E.length==1)E=E[0],k=!1;if(a.schema.$ref&&x){if(a.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+a.errSchemaPath+'" (see option extendRefs)');else if(a.opts.extendRefs!==!0)x=!1,a.logger.warn('$ref: keywords ignored in schema at path "'+a.errSchemaPath+'"')}if(a.schema.$comment&&a.opts.$comment)c+=" "+a.RULES.all.$comment.code(a,"$comment");if(E){if(a.opts.coerceTypes)var y=a.util.coerceToTypes(a.opts.coerceTypes,E);var C=a.RULES.types[E];if(y||k||C===!0||C&&!ai(C)){var J=a.schemaPath+".type",X=a.errSchemaPath+"/type",J=a.schemaPath+".type",X=a.errSchemaPath+"/type",R=k?"checkDataTypes":"checkDataType";if(c+=" if ("+a.util[R](E,F,a.opts.strictNumbers,!0)+") { ",y){var b="dataType"+m,T="coerced"+m;if(c+=" var "+b+" = typeof "+F+"; var "+T+" = undefined; ",a.opts.coerceTypes=="array")c+=" if ("+b+" == 'object' && Array.isArray("+F+") && "+F+".length == 1) { "+F+" = "+F+"[0]; "+b+" = typeof "+F+"; if ("+a.util.checkDataType(a.schema.type,F,a.opts.strictNumbers)+") "+T+" = "+F+"; } ";c+=" if ("+T+" !== undefined) ; ";var Wa=y;if(Wa){var xa,Ja=-1,pa=Wa.length-1;while(Ja<pa)if(xa=Wa[Ja+=1],xa=="string")c+=" else if ("+b+" == 'number' || "+b+" == 'boolean') "+T+" = '' + "+F+"; else if ("+F+" === null) "+T+" = ''; ";else if(xa=="number"||xa=="integer"){if(c+=" else if ("+b+" == 'boolean' || "+F+" === null || ("+b+" == 'string' && "+F+" && "+F+" == +"+F+" ",xa=="integer")c+=" && !("+F+" % 1)";c+=")) "+T+" = +"+F+"; "}else if(xa=="boolean")c+=" else if ("+F+" === 'false' || "+F+" === 0 || "+F+" === null) "+T+" = false; else if ("+F+" === 'true' || "+F+" === 1) "+T+" = true; ";else if(xa=="null")c+=" else if ("+F+" === '' || "+F+" === 0 || "+F+" === false) "+T+" = null; ";else if(a.opts.coerceTypes=="array"&&xa=="array")c+=" else if ("+b+" == 'string' || "+b+" == 'number' || "+b+" == 'boolean' || "+F+" == null) "+T+" = ["+F+"]; "}c+=" else { ";var K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(g||"type")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(X)+" , params: { type: '",k)c+=""+E.join(",");else c+=""+E;if(c+="' } ",a.opts.messages!==!1){if(c+=" , message: 'should be ",k)c+=""+E.join(",");else c+=""+E;c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+J+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+F+" ";c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&O)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";c+=" } if ("+T+" !== undefined) { ";var e=W?"data"+(W-1||""):"parentData",oa=W?a.dataPathArr[W]:"parentDataProperty";if(c+=" "+F+" = "+T+"; ",!W)c+="if ("+e+" !== undefined)";c+=" "+e+"["+oa+"] = "+T+"; } "}else{var K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(g||"type")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(X)+" , params: { type: '",k)c+=""+E.join(",");else c+=""+E;if(c+="' } ",a.opts.messages!==!1){if(c+=" , message: 'should be ",k)c+=""+E.join(",");else c+=""+E;c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+J+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+F+" ";c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&O)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}c+=" } "}}if(a.schema.$ref&&!x){if(c+=" "+a.RULES.all.$ref.code(a,"$ref")+" ",O){if(c+=" } if (errors === ",L)c+="0";else c+="errs_"+m;c+=") { ",I+="}"}}else{var vi=a.RULES;if(vi){var C,Ji=-1,ua=vi.length-1;while(Ji<ua)if(C=vi[Ji+=1],ai(C)){if(C.type)c+=" if ("+a.util.checkDataType(C.type,F,a.opts.strictNumbers)+") { ";if(a.opts.useDefaults){if(C.type=="object"&&a.schema.properties){var Y=a.schema.properties,$a=Object.keys(Y),ta=$a;if(ta){var li,pi=-1,bi=ta.length-1;while(pi<bi){li=ta[pi+=1];var Za=Y[li];if(Za.default!==void 0){var Ea=F+a.util.getProperty(li);if(a.compositeRule){if(a.opts.strictDefaults){var $="default is ignored for: "+Ea;if(a.opts.strictDefaults==="log")a.logger.warn($);else throw new Error($)}}else{if(c+=" if ("+Ea+" === undefined ",a.opts.useDefaults=="empty")c+=" || "+Ea+" === null || "+Ea+" === '' ";if(c+=" ) "+Ea+" = ",a.opts.useDefaults=="shared")c+=" "+a.useDefault(Za.default)+" ";else c+=" "+JSON.stringify(Za.default)+" ";c+="; "}}}}}else if(C.type=="array"&&Array.isArray(a.schema.items)){var yn=a.schema.items;if(yn){var Za,Ja=-1,ea=yn.length-1;while(Ja<ea)if(Za=yn[Ja+=1],Za.default!==void 0){var Ea=F+"["+Ja+"]";if(a.compositeRule){if(a.opts.strictDefaults){var $="default is ignored for: "+Ea;if(a.opts.strictDefaults==="log")a.logger.warn($);else throw new Error($)}}else{if(c+=" if ("+Ea+" === undefined ",a.opts.useDefaults=="empty")c+=" || "+Ea+" === null || "+Ea+" === '' ";if(c+=" ) "+Ea+" = ",a.opts.useDefaults=="shared")c+=" "+a.useDefault(Za.default)+" ";else c+=" "+JSON.stringify(Za.default)+" ";c+="; "}}}}}var Pa=C.rules;if(Pa){var Bi,yi=-1,Yn=Pa.length-1;while(yi<Yn)if(Bi=Pa[yi+=1],ka(Bi)){var ri=Bi.code(a,Bi.keyword,C.type);if(ri){if(c+=" "+ri+" ",O)j+="}"}}}if(O)c+=" "+j+" ",j="";if(C.type){if(c+=" } ",E&&E===C.type&&!y){c+=" else { ";var J=a.schemaPath+".type",X=a.errSchemaPath+"/type",K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(g||"type")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(X)+" , params: { type: '",k)c+=""+E.join(",");else c+=""+E;if(c+="' } ",a.opts.messages!==!1){if(c+=" , message: 'should be ",k)c+=""+E.join(",");else c+=""+E;c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+J+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+F+" ";c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&O)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";c+=" } "}}if(O){if(c+=" if (errors === ",L)c+="0";else c+="errs_"+m;c+=") { ",I+="}"}}}}if(O)c+=" "+I+" ";if(L){if(l)c+=" if (errors === 0) return data; ",c+=" else throw new ValidationError(vErrors); ";else c+=" validate.errors = vErrors; ",c+=" return errors === 0; ";c+=" }; return validate;"}else c+=" var "+D+" = errors === errs_"+m+";";function ai(ya){var di=ya.rules;for(var Ki=0;Ki<di.length;Ki++)if(ka(di[Ki]))return!0}function ka(ya){return a.schema[ya.keyword]!==void 0||ya.implements&&ga(ya)}function ga(ya){var di=ya.implements;for(var Ki=0;Ki<di.length;Ki++)if(a.schema[di[Ki]]!==void 0)return!0}return c}});var $Q=U((vq,HQ)=>{var mp=fp(),Jp=Bv(),VQ=wp(),nL=Tx(),PQ=kx(),cL=Jp.ucs2length,vL=np(),lL=VQ.Validation;HQ.exports=Cx;function Cx(i,a,n,v){var c=this,l=this._opts,x=[void 0],u={},f=[],w={},m=[],W={},Y=[];a=a||{schema:i,refVal:x,refs:u};var J=pL.call(this,i,a,v),X=this._compilations[J.index];if(J.compiling)return X.callValidate=$;var F=this._formats,K=this.RULES;try{var M=D(i,a,n,v);X.validate=M;var L=X.callValidate;if(L){if(L.schema=M.schema,L.errors=null,L.refs=M.refs,L.refVal=M.refVal,L.root=M.root,L.$async=M.$async,l.sourceCode)L.source=M.source}return M}finally{xL.call(this,i,a,v)}function $(){var R=X.validate,b=R.apply(this,arguments);return $.errors=R.errors,b}function D(R,b,T,Wa){var xa=!b||b&&b.schema==R;if(b.schema!=a.schema)return Cx.call(c,R,b,T,Wa);var Ja=R.$async===!0,pa=PQ({isTop:!0,schema:R,isRoot:xa,baseId:Wa,root:b,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:VQ.MissingRef,RULES:K,validate:PQ,util:Jp,resolve:mp,resolveRef:O,usePattern:k,useDefault:y,useCustomRule:C,opts:l,formats:F,logger:c.logger,self:c});if(pa=Qp(x,wL)+Qp(f,uL)+Qp(m,fL)+Qp(Y,mL)+pa,l.processCode)pa=l.processCode(pa,R);var e;try{var oa=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",pa);e=oa(c,K,F,a,x,m,Y,vL,cL,lL),x[0]=e}catch(vi){throw c.logger.error("Error compiling schema, function code:",pa),vi}if(e.schema=R,e.errors=null,e.refs=u,e.refVal=x,e.root=xa?e:b,Ja)e.$async=!0;if(l.sourceCode===!0)e.source={code:pa,patterns:f,defaults:m};return e}function O(R,b,T){b=mp.url(R,b);var Wa=u[b],xa,Ja;if(Wa!==void 0)return xa=x[Wa],Ja="refVal["+Wa+"]",E(xa,Ja);if(!T&&a.refs){var pa=a.refs[b];if(pa!==void 0)return xa=a.refVal[pa],Ja=j(b,xa),E(xa,Ja)}Ja=j(b);var e=mp.call(c,D,a,b);if(e===void 0){var oa=n&&n[b];if(oa)e=mp.inlineRef(oa,l.inlineRefs)?oa:Cx.call(c,oa,a,n,R)}if(e===void 0)I(b);else return g(b,e),E(e,Ja)}function j(R,b){var T=x.length;return x[T]=b,u[R]=T,"refVal"+T}function I(R){delete u[R]}function g(R,b){var T=u[R];x[T]=b}function E(R,b){return typeof R=="object"||typeof R=="boolean"?{code:b,schema:R,inline:!0}:{code:b,$async:R&&!!R.$async}}function k(R){var b=w[R];if(b===void 0)b=w[R]=f.length,f[b]=R;return"pattern"+b}function y(R){switch(typeof R){case"boolean":case"number":return""+R;case"string":return Jp.toQuotedString(R);case"object":if(R===null)return"null";var b=nL(R),T=W[b];if(T===void 0)T=W[b]=m.length,m[T]=R;return"default"+T}}function C(R,b,T,Wa){if(c._opts.validateSchema!==!1){var xa=R.definition.dependencies;if(xa&&!xa.every(function(ta){return Object.prototype.hasOwnProperty.call(T,ta)}))throw new Error("parent schema must have all required keywords: "+xa.join(","));var Ja=R.definition.validateSchema;if(Ja){var pa=Ja(b);if(!pa){var e="keyword schema is invalid: "+c.errorsText(Ja.errors);if(c._opts.validateSchema=="log")c.logger.error(e);else throw new Error(e)}}}var oa=R.definition.compile,vi=R.definition.inline,Ji=R.definition.macro,ua;if(oa)ua=oa.call(c,b,T,Wa);else if(Ji){if(ua=Ji.call(c,b,T,Wa),l.validateSchema!==!1)c.validateSchema(ua,!0)}else if(vi)ua=vi.call(c,Wa,R.keyword,b,T);else if(ua=R.definition.validate,!ua)return;if(ua===void 0)throw new Error('custom keyword "'+R.keyword+'"failed to compile');var $a=Y.length;return Y[$a]=ua,{code:"customRule"+$a,validate:ua}}}function pL(i,a,n){var v=MQ.call(this,i,a,n);if(v>=0)return{index:v,compiling:!0};return v=this._compilations.length,this._compilations[v]={schema:i,root:a,baseId:n},{index:v,compiling:!1}}function xL(i,a,n){var v=MQ.call(this,i,a,n);if(v>=0)this._compilations.splice(v,1)}function MQ(i,a,n){for(var v=0;v<this._compilations.length;v++){var c=this._compilations[v];if(c.schema==i&&c.root==a&&c.baseId==n)return v}return-1}function uL(i,a){return"var pattern"+i+" = new RegExp("+Jp.toQuotedString(a[i])+");"}function fL(i){return"var default"+i+" = defaults["+i+"];"}function wL(i,a){return a[i]===void 0?"":"var refVal"+i+" = refVal["+i+"];"}function mL(i){return"var customRule"+i+" = customRules["+i+"];"}function Qp(i,a){if(!i.length)return"";var n="";for(var v=0;v<i.length;v++)n+=a(v,i);return n}});var UQ=U((lq,BQ)=>{var Wp=BQ.exports=function i(){this._cache={}};Wp.prototype.put=function i(a,n){this._cache[a]=n};Wp.prototype.get=function i(a){return this._cache[a]};Wp.prototype.del=function i(a){delete this._cache[a]};Wp.prototype.clear=function i(){this._cache={}}});var bQ=U((pq,EQ)=>{var QL=Bv(),JL=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,WL=[0,31,28,31,30,31,30,31,31,30,31,30,31],YL=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,hQ=/^(?=.{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,zL=/^(?:[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,XL=/^(?:[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,LQ=/^(?:(?:[^\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,DQ=/^(?:(?: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,OQ=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,NQ=/^(?:\/(?:[^~/]|~0|~1)*)*$/,AQ=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,qQ=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;EQ.exports=Yp;function Yp(i){return i=i=="full"?"full":"fast",QL.copy(Yp[i])}Yp.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":LQ,url:DQ,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:hQ,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:oQ,uuid:OQ,"json-pointer":NQ,"json-pointer-uri-fragment":AQ,"relative-json-pointer":qQ};Yp.full={date:jQ,time:RQ,"date-time":FL,uri:VL,"uri-reference":XL,"uri-template":LQ,url:DQ,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:hQ,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:oQ,uuid:OQ,"json-pointer":NQ,"json-pointer-uri-fragment":AQ,"relative-json-pointer":qQ};function GL(i){return i%4===0&&(i%100!==0||i%400===0)}function jQ(i){var a=i.match(JL);if(!a)return!1;var n=+a[1],v=+a[2],c=+a[3];return v>=1&&v<=12&&c>=1&&c<=(v==2&&GL(n)?29:WL[v])}function RQ(i,a){var n=i.match(YL);if(!n)return!1;var v=n[1],c=n[2],l=n[3],x=n[5];return(v<=23&&c<=59&&l<=59||v==23&&c==59&&l==60)&&(!a||x)}var KL=/t|\s/i;function FL(i){var a=i.split(KL);return a.length==2&&jQ(a[0])&&RQ(a[1],!0)}var PL=/\/|:/;function VL(i){return PL.test(i)&&zL.test(i)}var ML=/[^\\]\\Z/;function oQ(i){if(ML.test(i))return!1;try{return new RegExp(i),!0}catch(a){return!1}}});var ZQ=U((xq,_Q)=>{_Q.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.errSchemaPath+"/"+n,w=!a.opts.allErrors,m="data"+(x||""),W="valid"+l,Y,J;if(u=="#"||u=="#/")if(a.isRoot)Y=a.async,J="validate";else Y=a.root.schema.$async===!0,J="root.refVal[0]";else{var X=a.resolveRef(a.baseId,u,a.isRoot);if(X===void 0){var F=a.MissingRefError.message(a.baseId,u);if(a.opts.missingRefs=="fail"){a.logger.error(F);var K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(f)+" , params: { ref: '"+a.util.escapeQuotes(u)+"' } ",a.opts.messages!==!1)c+=" , message: 'can\\'t resolve reference "+a.util.escapeQuotes(u)+"' ";if(a.opts.verbose)c+=" , schema: "+a.util.toQuotedString(u)+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+m+" ";c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&w)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(w)c+=" if (false) { "}else if(a.opts.missingRefs=="ignore"){if(a.logger.warn(F),w)c+=" if (true) { "}else throw new a.MissingRefError(a.baseId,u,F)}else if(X.inline){var L=a.util.copy(a);L.level++;var $="valid"+L.level;L.schema=X.schema,L.schemaPath="",L.errSchemaPath=u;var D=a.validate(L).replace(/validate\.schema/g,X.code);if(c+=" "+D+" ",w)c+=" if ("+$+") { "}else Y=X.$async===!0||a.async&&X.$async!==!1,J=X.code}if(J){var K=K||[];if(K.push(c),c="",a.opts.passContext)c+=" "+J+".call(this, ";else c+=" "+J+"( ";if(c+=" "+m+", (dataPath || '')",a.errorPath!='""')c+=" + "+a.errorPath;var O=x?"data"+(x-1||""):"parentData",j=x?a.dataPathArr[x]:"parentDataProperty";c+=" , "+O+" , "+j+", rootData) ";var I=c;if(c=K.pop(),Y){if(!a.async)throw new Error("async schema referenced by sync schema");if(w)c+=" var "+W+"; ";if(c+=" try { await "+I+"; ",w)c+=" "+W+" = true; ";if(c+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",w)c+=" "+W+" = false; ";if(c+=" } ",w)c+=" if ("+W+") { "}else if(c+=" if (!"+I+") { if (vErrors === null) vErrors = "+J+".errors; else vErrors = vErrors.concat("+J+".errors); errors = vErrors.length; } ",w)c+=" else { "}return c}});var IQ=U((uq,gQ)=>{gQ.exports=function i(a,n,v){var c=" ",l=a.schema[n],x=a.schemaPath+a.util.getProperty(n),u=a.errSchemaPath+"/"+n,f=!a.opts.allErrors,w=a.util.copy(a),m="";w.level++;var W="valid"+w.level,Y=w.baseId,J=!0,X=l;if(X){var F,K=-1,M=X.length-1;while(K<M)if(F=X[K+=1],a.opts.strictKeywords?typeof F=="object"&&Object.keys(F).length>0||F===!1:a.util.schemaHasRules(F,a.RULES.all)){if(J=!1,w.schema=F,w.schemaPath=x+"["+K+"]",w.errSchemaPath=u+"/"+K,c+=" "+a.validate(w)+" ",w.baseId=Y,f)c+=" if ("+W+") { ",m+="}"}}if(f)if(J)c+=" if (true) { ";else c+=" "+m.slice(0,-1)+" ";return c}});var TQ=U((fq,SQ)=>{SQ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J="errs__"+l,X=a.util.copy(a),F="";X.level++;var K="valid"+X.level,M=u.every(function(g){return a.opts.strictKeywords?typeof g=="object"&&Object.keys(g).length>0||g===!1:a.util.schemaHasRules(g,a.RULES.all)});if(M){var L=X.baseId;c+=" var "+J+" = errors; var "+Y+" = false; ";var $=a.compositeRule;a.compositeRule=X.compositeRule=!0;var D=u;if(D){var O,j=-1,I=D.length-1;while(j<I)O=D[j+=1],X.schema=O,X.schemaPath=f+"["+j+"]",X.errSchemaPath=w+"/"+j,c+=" "+a.validate(X)+" ",X.baseId=L,c+=" "+Y+" = "+Y+" || "+K+"; if (!"+Y+") { ",F+="}"}if(a.compositeRule=X.compositeRule=$,c+=" "+F+" if (!"+Y+") { var err = ",a.createErrors!==!1){if(c+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: {} ",a.opts.messages!==!1)c+=" , message: 'should match some schema in anyOf' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";if(c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(vErrors); ";else c+=" validate.errors = vErrors; return false; ";if(c+=" } else { errors = "+J+"; if (vErrors !== null) { if ("+J+") vErrors.length = "+J+"; else vErrors = null; } ",a.opts.allErrors)c+=" } "}else if(m)c+=" if (true) { ";return c}});var CQ=U((wq,kQ)=>{kQ.exports=function i(a,n,v){var c=" ",l=a.schema[n],x=a.errSchemaPath+"/"+n,u=!a.opts.allErrors,f=a.util.toQuotedString(l);if(a.opts.$comment===!0)c+=" console.log("+f+");";else if(typeof a.opts.$comment=="function")c+=" self._opts.$comment("+f+", "+a.util.toQuotedString(x)+", validate.root.schema);";return c}});var yQ=U((mq,sQ)=>{sQ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J=a.opts.$data&&u&&u.$data,X;if(J)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",X="schema"+l;else X=u;if(!J)c+=" var schema"+l+" = validate.schema"+f+";";c+="var "+Y+" = equal("+W+", schema"+l+"); if (!"+Y+") { ";var F=F||[];if(F.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'const' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { allowedValue: schema"+l+" } ",a.opts.messages!==!1)c+=" , message: 'should be equal to constant' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var K=c;if(c=F.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+K+"]); ";else c+=" validate.errors = ["+K+"]; return false; ";else c+=" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" }",m)c+=" else { ";return c}});var dQ=U((Qq,rQ)=>{rQ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J="errs__"+l,X=a.util.copy(a),F="";X.level++;var K="valid"+X.level,M="i"+l,L=X.dataLevel=a.dataLevel+1,$="data"+L,D=a.baseId,O=a.opts.strictKeywords?typeof u=="object"&&Object.keys(u).length>0||u===!1:a.util.schemaHasRules(u,a.RULES.all);if(c+="var "+J+" = errors;var "+Y+";",O){var j=a.compositeRule;a.compositeRule=X.compositeRule=!0,X.schema=u,X.schemaPath=f,X.errSchemaPath=w,c+=" var "+K+" = false; for (var "+M+" = 0; "+M+" < "+W+".length; "+M+"++) { ",X.errorPath=a.util.getPathExpr(a.errorPath,M,a.opts.jsonPointers,!0);var I=W+"["+M+"]";X.dataPathArr[L]=M;var g=a.validate(X);if(X.baseId=D,a.util.varOccurences(g,$)<2)c+=" "+a.util.varReplace(g,$,I)+" ";else c+=" var "+$+" = "+I+"; "+g+" ";c+=" if ("+K+") break; } ",a.compositeRule=X.compositeRule=j,c+=" "+F+" if (!"+K+") {"}else c+=" if ("+W+".length == 0) {";var E=E||[];if(E.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: {} ",a.opts.messages!==!1)c+=" , message: 'should contain a valid item' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var k=c;if(c=E.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+k+"]); ";else c+=" validate.errors = ["+k+"]; return false; ";else c+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" } else { ",O)c+=" errors = "+J+"; if (vErrors !== null) { if ("+J+") vErrors.length = "+J+"; else vErrors = null; } ";if(a.opts.allErrors)c+=" } ";return c}});var eQ=U((Jq,tQ)=>{tQ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="errs__"+l,J=a.util.copy(a),X="";J.level++;var F="valid"+J.level,K={},M={},L=a.opts.ownProperties;for(j in u){if(j=="__proto__")continue;var $=u[j],D=Array.isArray($)?M:K;D[j]=$}c+="var "+Y+" = errors;";var O=a.errorPath;c+="var missing"+l+";";for(var j in M)if(D=M[j],D.length){if(c+=" if ( "+W+a.util.getProperty(j)+" !== undefined ",L)c+=" && Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(j)+"') ";if(m){c+=" && ( ";var I=D;if(I){var g,E=-1,k=I.length-1;while(E<k){if(g=I[E+=1],E)c+=" || ";var y=a.util.getProperty(g),C=W+y;if(c+=" ( ( "+C+" === undefined ",L)c+=" || ! Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(g)+"') ";c+=") && (missing"+l+" = "+a.util.toQuotedString(a.opts.jsonPointers?g:y)+") ) "}}c+=")) { ";var R="missing"+l,b="' + "+R+" + '";if(a.opts._errorDataPathProperty)a.errorPath=a.opts.jsonPointers?a.util.getPathExpr(O,R,!0):O+" + "+R;var T=T||[];if(T.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { property: '"+a.util.escapeQuotes(j)+"', missingProperty: '"+b+"', depsCount: "+D.length+", deps: '"+a.util.escapeQuotes(D.length==1?D[0]:D.join(", "))+"' } ",a.opts.messages!==!1){if(c+=" , message: 'should have ",D.length==1)c+="property "+a.util.escapeQuotes(D[0]);else c+="properties "+a.util.escapeQuotes(D.join(", "));c+=" when property "+a.util.escapeQuotes(j)+" is present' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var Wa=c;if(c=T.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+Wa+"]); ";else c+=" validate.errors = ["+Wa+"]; return false; ";else c+=" var err = "+Wa+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{c+=" ) { ";var xa=D;if(xa){var g,Ja=-1,pa=xa.length-1;while(Ja<pa){g=xa[Ja+=1];var y=a.util.getProperty(g),b=a.util.escapeQuotes(g),C=W+y;if(a.opts._errorDataPathProperty)a.errorPath=a.util.getPath(O,g,a.opts.jsonPointers);if(c+=" if ( "+C+" === undefined ",L)c+=" || ! Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(g)+"') ";if(c+=") { var err = ",a.createErrors!==!1){if(c+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { property: '"+a.util.escapeQuotes(j)+"', missingProperty: '"+b+"', depsCount: "+D.length+", deps: '"+a.util.escapeQuotes(D.length==1?D[0]:D.join(", "))+"' } ",a.opts.messages!==!1){if(c+=" , message: 'should have ",D.length==1)c+="property "+a.util.escapeQuotes(D[0]);else c+="properties "+a.util.escapeQuotes(D.join(", "));c+=" when property "+a.util.escapeQuotes(j)+" is present' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}}if(c+=" } ",m)X+="}",c+=" else { "}a.errorPath=O;var e=J.baseId;for(var j in K){var $=K[j];if(a.opts.strictKeywords?typeof $=="object"&&Object.keys($).length>0||$===!1:a.util.schemaHasRules($,a.RULES.all)){if(c+=" "+F+" = true; if ( "+W+a.util.getProperty(j)+" !== undefined ",L)c+=" && Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(j)+"') ";if(c+=") { ",J.schema=$,J.schemaPath=f+a.util.getProperty(j),J.errSchemaPath=w+"/"+a.util.escapeFragment(j),c+=" "+a.validate(J)+" ",J.baseId=e,c+=" } ",m)c+=" if ("+F+") { ",X+="}"}}if(m)c+=" "+X+" if ("+Y+" == errors) {";return c}});var iJ=U((Wq,aJ)=>{aJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J=a.opts.$data&&u&&u.$data,X;if(J)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",X="schema"+l;else X=u;var F="i"+l,K="schema"+l;if(!J)c+=" var "+K+" = validate.schema"+f+";";if(c+="var "+Y+";",J)c+=" if (schema"+l+" === undefined) "+Y+" = true; else if (!Array.isArray(schema"+l+")) "+Y+" = false; else {";if(c+=""+Y+" = false;for (var "+F+"=0; "+F+"<"+K+".length; "+F+"++) if (equal("+W+", "+K+"["+F+"])) { "+Y+" = true; break; }",J)c+=" } ";c+=" if (!"+Y+") { ";var M=M||[];if(M.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { allowedValues: schema"+l+" } ",a.opts.messages!==!1)c+=" , message: 'should be equal to one of the allowed values' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var L=c;if(c=M.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+L+"]); ";else c+=" validate.errors = ["+L+"]; return false; ";else c+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" }",m)c+=" else { ";return c}});var cJ=U((Yq,nJ)=>{nJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||"");if(a.opts.format===!1){if(m)c+=" if (true) { ";return c}var Y=a.opts.$data&&u&&u.$data,J;if(Y)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",J="schema"+l;else J=u;var X=a.opts.unknownFormats,F=Array.isArray(X);if(Y){var K="format"+l,M="isObject"+l,L="formatType"+l;if(c+=" var "+K+" = formats["+J+"]; var "+M+" = typeof "+K+" == 'object' && !("+K+" instanceof RegExp) && "+K+".validate; var "+L+" = "+M+" && "+K+".type || 'string'; if ("+M+") { ",a.async)c+=" var async"+l+" = "+K+".async; ";if(c+=" "+K+" = "+K+".validate; } if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'string') || ";if(c+=" (",X!="ignore"){if(c+=" ("+J+" && !"+K+" ",F)c+=" && self._opts.unknownFormats.indexOf("+J+") == -1 ";c+=") || "}if(c+=" ("+K+" && "+L+" == '"+v+"' && !(typeof "+K+" == 'function' ? ",a.async)c+=" (async"+l+" ? await "+K+"("+W+") : "+K+"("+W+")) ";else c+=" "+K+"("+W+") ";c+=" : "+K+".test("+W+"))))) {"}else{var K=a.formats[u];if(!K)if(X=="ignore"){if(a.logger.warn('unknown format "'+u+'" ignored in schema at path "'+a.errSchemaPath+'"'),m)c+=" if (true) { ";return c}else if(F&&X.indexOf(u)>=0){if(m)c+=" if (true) { ";return c}else throw new Error('unknown format "'+u+'" is used in schema at path "'+a.errSchemaPath+'"');var M=typeof K=="object"&&!(K instanceof RegExp)&&K.validate,L=M&&K.type||"string";if(M){var $=K.async===!0;K=K.validate}if(L!=v){if(m)c+=" if (true) { ";return c}if($){if(!a.async)throw new Error("async format in sync schema");var D="formats"+a.util.getProperty(u)+".validate";c+=" if (!(await "+D+"("+W+"))) { "}else{c+=" if (! ";var D="formats"+a.util.getProperty(u);if(M)D+=".validate";if(typeof K=="function")c+=" "+D+"("+W+") ";else c+=" "+D+".test("+W+") ";c+=") { "}}var O=O||[];if(O.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'format' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { format: ",Y)c+=""+J;else c+=""+a.util.toQuotedString(u);if(c+=" } ",a.opts.messages!==!1){if(c+=` , message: 'should match format "`,Y)c+="' + "+J+" + '";else c+=""+a.util.escapeQuotes(u);c+=`"' `}if(a.opts.verbose){if(c+=" , schema: ",Y)c+="validate.schema"+f;else c+=""+a.util.toQuotedString(u);c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var j=c;if(c=O.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+j+"]); ";else c+=" validate.errors = ["+j+"]; return false; ";else c+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" } ",m)c+=" else { ";return c}});var lJ=U((zq,vJ)=>{vJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J="errs__"+l,X=a.util.copy(a);X.level++;var F="valid"+X.level,K=a.schema.then,M=a.schema.else,L=K!==void 0&&(a.opts.strictKeywords?typeof K=="object"&&Object.keys(K).length>0||K===!1:a.util.schemaHasRules(K,a.RULES.all)),$=M!==void 0&&(a.opts.strictKeywords?typeof M=="object"&&Object.keys(M).length>0||M===!1:a.util.schemaHasRules(M,a.RULES.all)),D=X.baseId;if(L||$){var O;X.createErrors=!1,X.schema=u,X.schemaPath=f,X.errSchemaPath=w,c+=" var "+J+" = errors; var "+Y+" = true; ";var j=a.compositeRule;if(a.compositeRule=X.compositeRule=!0,c+=" "+a.validate(X)+" ",X.baseId=D,X.createErrors=!0,c+=" errors = "+J+"; if (vErrors !== null) { if ("+J+") vErrors.length = "+J+"; else vErrors = null; } ",a.compositeRule=X.compositeRule=j,L){if(c+=" if ("+F+") { ",X.schema=a.schema.then,X.schemaPath=a.schemaPath+".then",X.errSchemaPath=a.errSchemaPath+"/then",c+=" "+a.validate(X)+" ",X.baseId=D,c+=" "+Y+" = "+F+"; ",L&&$)O="ifClause"+l,c+=" var "+O+" = 'then'; ";else O="'then'";if(c+=" } ",$)c+=" else { "}else c+=" if (!"+F+") { ";if($){if(X.schema=a.schema.else,X.schemaPath=a.schemaPath+".else",X.errSchemaPath=a.errSchemaPath+"/else",c+=" "+a.validate(X)+" ",X.baseId=D,c+=" "+Y+" = "+F+"; ",L&&$)O="ifClause"+l,c+=" var "+O+" = 'else'; ";else O="'else'";c+=" } "}if(c+=" if (!"+Y+") { var err = ",a.createErrors!==!1){if(c+=" { keyword: 'if' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { failingKeyword: "+O+" } ",a.opts.messages!==!1)c+=` , message: 'should match "' + `+O+` + '" schema' `;if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";if(c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(vErrors); ";else c+=" validate.errors = vErrors; return false; ";if(c+=" } ",m)c+=" else { "}else if(m)c+=" if (true) { ";return c}});var xJ=U((Xq,pJ)=>{pJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J="errs__"+l,X=a.util.copy(a),F="";X.level++;var K="valid"+X.level,M="i"+l,L=X.dataLevel=a.dataLevel+1,$="data"+L,D=a.baseId;if(c+="var "+J+" = errors;var "+Y+";",Array.isArray(u)){var O=a.schema.additionalItems;if(O===!1){c+=" "+Y+" = "+W+".length <= "+u.length+"; ";var j=w;w=a.errSchemaPath+"/additionalItems",c+=" if (!"+Y+") { ";var I=I||[];if(I.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { limit: "+u.length+" } ",a.opts.messages!==!1)c+=" , message: 'should NOT have more than "+u.length+" items' ";if(a.opts.verbose)c+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var g=c;if(c=I.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+g+"]); ";else c+=" validate.errors = ["+g+"]; return false; ";else c+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" } ",w=j,m)F+="}",c+=" else { "}var E=u;if(E){var k,y=-1,C=E.length-1;while(y<C)if(k=E[y+=1],a.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:a.util.schemaHasRules(k,a.RULES.all)){c+=" "+K+" = true; if ("+W+".length > "+y+") { ";var R=W+"["+y+"]";X.schema=k,X.schemaPath=f+"["+y+"]",X.errSchemaPath=w+"/"+y,X.errorPath=a.util.getPathExpr(a.errorPath,y,a.opts.jsonPointers,!0),X.dataPathArr[L]=y;var b=a.validate(X);if(X.baseId=D,a.util.varOccurences(b,$)<2)c+=" "+a.util.varReplace(b,$,R)+" ";else c+=" var "+$+" = "+R+"; "+b+" ";if(c+=" } ",m)c+=" if ("+K+") { ",F+="}"}}if(typeof O=="object"&&(a.opts.strictKeywords?typeof O=="object"&&Object.keys(O).length>0||O===!1:a.util.schemaHasRules(O,a.RULES.all))){X.schema=O,X.schemaPath=a.schemaPath+".additionalItems",X.errSchemaPath=a.errSchemaPath+"/additionalItems",c+=" "+K+" = true; if ("+W+".length > "+u.length+") { for (var "+M+" = "+u.length+"; "+M+" < "+W+".length; "+M+"++) { ",X.errorPath=a.util.getPathExpr(a.errorPath,M,a.opts.jsonPointers,!0);var R=W+"["+M+"]";X.dataPathArr[L]=M;var b=a.validate(X);if(X.baseId=D,a.util.varOccurences(b,$)<2)c+=" "+a.util.varReplace(b,$,R)+" ";else c+=" var "+$+" = "+R+"; "+b+" ";if(m)c+=" if (!"+K+") break; ";if(c+=" } } ",m)c+=" if ("+K+") { ",F+="}"}}else if(a.opts.strictKeywords?typeof u=="object"&&Object.keys(u).length>0||u===!1:a.util.schemaHasRules(u,a.RULES.all)){X.schema=u,X.schemaPath=f,X.errSchemaPath=w,c+=" for (var "+M+" = 0; "+M+" < "+W+".length; "+M+"++) { ",X.errorPath=a.util.getPathExpr(a.errorPath,M,a.opts.jsonPointers,!0);var R=W+"["+M+"]";X.dataPathArr[L]=M;var b=a.validate(X);if(X.baseId=D,a.util.varOccurences(b,$)<2)c+=" "+a.util.varReplace(b,$,R)+" ";else c+=" var "+$+" = "+R+"; "+b+" ";if(m)c+=" if (!"+K+") break; ";c+=" }"}if(m)c+=" "+F+" if ("+J+" == errors) {";return c}});var sx=U((Gq,uJ)=>{uJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,D,W="data"+(x||""),Y=a.opts.$data&&u&&u.$data,J;if(Y)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",J="schema"+l;else J=u;var X=n=="maximum",F=X?"exclusiveMaximum":"exclusiveMinimum",K=a.schema[F],M=a.opts.$data&&K&&K.$data,L=X?"<":">",$=X?">":"<",D=void 0;if(!(Y||typeof u=="number"||u===void 0))throw new Error(n+" must be number");if(!(M||K===void 0||typeof K=="number"||typeof K=="boolean"))throw new Error(F+" must be number or boolean");if(M){var O=a.util.getData(K.$data,x,a.dataPathArr),j="exclusive"+l,I="exclType"+l,g="exclIsNumber"+l,E="op"+l,k="' + "+E+" + '";c+=" var schemaExcl"+l+" = "+O+"; ",O="schemaExcl"+l,c+=" var "+j+"; var "+I+" = typeof "+O+"; if ("+I+" != 'boolean' && "+I+" != 'undefined' && "+I+" != 'number') { ";var D=F,y=y||[];if(y.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(D||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: {} ",a.opts.messages!==!1)c+=" , message: '"+F+" should be boolean' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var C=c;if(c=y.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+C+"]); ";else c+=" validate.errors = ["+C+"]; return false; ";else c+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" } else if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'number') || ";if(c+=" "+I+" == 'number' ? ( ("+j+" = "+J+" === undefined || "+O+" "+L+"= "+J+") ? "+W+" "+$+"= "+O+" : "+W+" "+$+" "+J+" ) : ( ("+j+" = "+O+" === true) ? "+W+" "+$+"= "+J+" : "+W+" "+$+" "+J+" ) || "+W+" !== "+W+") { var op"+l+" = "+j+" ? '"+L+"' : '"+L+"='; ",u===void 0)D=F,w=a.errSchemaPath+"/"+F,J=O,Y=M}else{var g=typeof K=="number",k=L;if(g&&Y){var E="'"+k+"'";if(c+=" if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'number') || ";c+=" ( "+J+" === undefined || "+K+" "+L+"= "+J+" ? "+W+" "+$+"= "+K+" : "+W+" "+$+" "+J+" ) || "+W+" !== "+W+") { "}else{if(g&&u===void 0)j=!0,D=F,w=a.errSchemaPath+"/"+F,J=K,$+="=";else{if(g)J=Math[X?"min":"max"](K,u);if(K===(g?J:!0))j=!0,D=F,w=a.errSchemaPath+"/"+F,$+="=";else j=!1,k+="="}var E="'"+k+"'";if(c+=" if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'number') || ";c+=" "+W+" "+$+" "+J+" || "+W+" !== "+W+") { "}}D=D||n;var y=y||[];if(y.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(D||"_limit")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { comparison: "+E+", limit: "+J+", exclusive: "+j+" } ",a.opts.messages!==!1)if(c+=" , message: 'should be "+k+" ",Y)c+="' + "+J;else c+=""+J+"'";if(a.opts.verbose){if(c+=" , schema: ",Y)c+="validate.schema"+f;else c+=""+u;c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var C=c;if(c=y.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+C+"]); ";else c+=" validate.errors = ["+C+"]; return false; ";else c+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" } ",m)c+=" else { ";return c}});var yx=U((Kq,fJ)=>{fJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,F,W="data"+(x||""),Y=a.opts.$data&&u&&u.$data,J;if(Y)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",J="schema"+l;else J=u;if(!(Y||typeof u=="number"))throw new Error(n+" must be number");var X=n=="maxItems"?">":"<";if(c+="if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'number') || ";c+=" "+W+".length "+X+" "+J+") { ";var F=n,K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(F||"_limitItems")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { limit: "+J+" } ",a.opts.messages!==!1){if(c+=" , message: 'should NOT have ",n=="maxItems")c+="more";else c+="fewer";if(c+=" than ",Y)c+="' + "+J+" + '";else c+=""+u;c+=" items' "}if(a.opts.verbose){if(c+=" , schema: ",Y)c+="validate.schema"+f;else c+=""+u;c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+="} ",m)c+=" else { ";return c}});var rx=U((Fq,wJ)=>{wJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,F,W="data"+(x||""),Y=a.opts.$data&&u&&u.$data,J;if(Y)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",J="schema"+l;else J=u;if(!(Y||typeof u=="number"))throw new Error(n+" must be number");var X=n=="maxLength"?">":"<";if(c+="if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'number') || ";if(a.opts.unicode===!1)c+=" "+W+".length ";else c+=" ucs2length("+W+") ";c+=" "+X+" "+J+") { ";var F=n,K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(F||"_limitLength")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { limit: "+J+" } ",a.opts.messages!==!1){if(c+=" , message: 'should NOT be ",n=="maxLength")c+="longer";else c+="shorter";if(c+=" than ",Y)c+="' + "+J+" + '";else c+=""+u;c+=" characters' "}if(a.opts.verbose){if(c+=" , schema: ",Y)c+="validate.schema"+f;else c+=""+u;c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+="} ",m)c+=" else { ";return c}});var dx=U((Pq,mJ)=>{mJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,F,W="data"+(x||""),Y=a.opts.$data&&u&&u.$data,J;if(Y)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",J="schema"+l;else J=u;if(!(Y||typeof u=="number"))throw new Error(n+" must be number");var X=n=="maxProperties"?">":"<";if(c+="if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'number') || ";c+=" Object.keys("+W+").length "+X+" "+J+") { ";var F=n,K=K||[];if(K.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(F||"_limitProperties")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { limit: "+J+" } ",a.opts.messages!==!1){if(c+=" , message: 'should NOT have ",n=="maxProperties")c+="more";else c+="fewer";if(c+=" than ",Y)c+="' + "+J+" + '";else c+=""+u;c+=" properties' "}if(a.opts.verbose){if(c+=" , schema: ",Y)c+="validate.schema"+f;else c+=""+u;c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var M=c;if(c=K.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+M+"]); ";else c+=" validate.errors = ["+M+"]; return false; ";else c+=" var err = "+M+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+="} ",m)c+=" else { ";return c}});var JJ=U((Vq,QJ)=>{QJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y=a.opts.$data&&u&&u.$data,J;if(Y)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",J="schema"+l;else J=u;if(!(Y||typeof u=="number"))throw new Error(n+" must be number");if(c+="var division"+l+";if (",Y)c+=" "+J+" !== undefined && ( typeof "+J+" != 'number' || ";if(c+=" (division"+l+" = "+W+" / "+J+", ",a.opts.multipleOfPrecision)c+=" Math.abs(Math.round(division"+l+") - division"+l+") > 1e-"+a.opts.multipleOfPrecision+" ";else c+=" division"+l+" !== parseInt(division"+l+") ";if(c+=" ) ",Y)c+=" ) ";c+=" ) { ";var X=X||[];if(X.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { multipleOf: "+J+" } ",a.opts.messages!==!1)if(c+=" , message: 'should be multiple of ",Y)c+="' + "+J;else c+=""+J+"'";if(a.opts.verbose){if(c+=" , schema: ",Y)c+="validate.schema"+f;else c+=""+u;c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var F=c;if(c=X.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+F+"]); ";else c+=" validate.errors = ["+F+"]; return false; ";else c+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+="} ",m)c+=" else { ";return c}});var YJ=U((Mq,WJ)=>{WJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="errs__"+l,J=a.util.copy(a);J.level++;var X="valid"+J.level;if(a.opts.strictKeywords?typeof u=="object"&&Object.keys(u).length>0||u===!1:a.util.schemaHasRules(u,a.RULES.all)){J.schema=u,J.schemaPath=f,J.errSchemaPath=w,c+=" var "+Y+" = errors; ";var F=a.compositeRule;a.compositeRule=J.compositeRule=!0,J.createErrors=!1;var K;if(J.opts.allErrors)K=J.opts.allErrors,J.opts.allErrors=!1;if(c+=" "+a.validate(J)+" ",J.createErrors=!0,K)J.opts.allErrors=K;a.compositeRule=J.compositeRule=F,c+=" if ("+X+") { ";var M=M||[];if(M.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'not' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: {} ",a.opts.messages!==!1)c+=" , message: 'should NOT be valid' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var L=c;if(c=M.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+L+"]); ";else c+=" validate.errors = ["+L+"]; return false; ";else c+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" } else { errors = "+Y+"; if (vErrors !== null) { if ("+Y+") vErrors.length = "+Y+"; else vErrors = null; } ",a.opts.allErrors)c+=" } "}else{if(c+=" var err = ",a.createErrors!==!1){if(c+=" { keyword: 'not' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: {} ",a.opts.messages!==!1)c+=" , message: 'should NOT be valid' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";if(c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",m)c+=" if (false) { "}return c}});var XJ=U((Hq,zJ)=>{zJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J="errs__"+l,X=a.util.copy(a),F="";X.level++;var K="valid"+X.level,M=X.baseId,L="prevValid"+l,$="passingSchemas"+l;c+="var "+J+" = errors , "+L+" = false , "+Y+" = false , "+$+" = null; ";var D=a.compositeRule;a.compositeRule=X.compositeRule=!0;var O=u;if(O){var j,I=-1,g=O.length-1;while(I<g){if(j=O[I+=1],a.opts.strictKeywords?typeof j=="object"&&Object.keys(j).length>0||j===!1:a.util.schemaHasRules(j,a.RULES.all))X.schema=j,X.schemaPath=f+"["+I+"]",X.errSchemaPath=w+"/"+I,c+=" "+a.validate(X)+" ",X.baseId=M;else c+=" var "+K+" = true; ";if(I)c+=" if ("+K+" && "+L+") { "+Y+" = false; "+$+" = ["+$+", "+I+"]; } else { ",F+="}";c+=" if ("+K+") { "+Y+" = "+L+" = true; "+$+" = "+I+"; }"}}if(a.compositeRule=X.compositeRule=D,c+=""+F+"if (!"+Y+") { var err = ",a.createErrors!==!1){if(c+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { passingSchemas: "+$+" } ",a.opts.messages!==!1)c+=" , message: 'should match exactly one schema in oneOf' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";if(c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(vErrors); ";else c+=" validate.errors = vErrors; return false; ";if(c+="} else { errors = "+J+"; if (vErrors !== null) { if ("+J+") vErrors.length = "+J+"; else vErrors = null; }",a.opts.allErrors)c+=" } ";return c}});var KJ=U(($q,GJ)=>{GJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y=a.opts.$data&&u&&u.$data,J;if(Y)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",J="schema"+l;else J=u;var X=Y?"(new RegExp("+J+"))":a.usePattern(u);if(c+="if ( ",Y)c+=" ("+J+" !== undefined && typeof "+J+" != 'string') || ";c+=" !"+X+".test("+W+") ) { ";var F=F||[];if(F.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { pattern: ",Y)c+=""+J;else c+=""+a.util.toQuotedString(u);if(c+=" } ",a.opts.messages!==!1){if(c+=` , message: 'should match pattern "`,Y)c+="' + "+J+" + '";else c+=""+a.util.escapeQuotes(u);c+=`"' `}if(a.opts.verbose){if(c+=" , schema: ",Y)c+="validate.schema"+f;else c+=""+a.util.toQuotedString(u);c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var K=c;if(c=F.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+K+"]); ";else c+=" validate.errors = ["+K+"]; return false; ";else c+=" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+="} ",m)c+=" else { ";return c}});var PJ=U((Bq,FJ)=>{FJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="errs__"+l,J=a.util.copy(a),X="";J.level++;var F="valid"+J.level,K="key"+l,M="idx"+l,L=J.dataLevel=a.dataLevel+1,$="data"+L,D="dataProperties"+l,O=Object.keys(u||{}).filter(Ja),j=a.schema.patternProperties||{},I=Object.keys(j).filter(Ja),g=a.schema.additionalProperties,E=O.length||I.length,k=g===!1,y=typeof g=="object"&&Object.keys(g).length,C=a.opts.removeAdditional,R=k||y||C,b=a.opts.ownProperties,T=a.baseId,Wa=a.schema.required;if(Wa&&!(a.opts.$data&&Wa.$data)&&Wa.length<a.opts.loopRequired)var xa=a.util.toHash(Wa);function Ja(Ui){return Ui!=="__proto__"}if(c+="var "+Y+" = errors;var "+F+" = true;",b)c+=" var "+D+" = undefined;";if(R){if(b)c+=" "+D+" = "+D+" || Object.keys("+W+"); for (var "+M+"=0; "+M+"<"+D+".length; "+M+"++) { var "+K+" = "+D+"["+M+"]; ";else c+=" for (var "+K+" in "+W+") { ";if(E){if(c+=" var isAdditional"+l+" = !(false ",O.length)if(O.length>8)c+=" || validate.schema"+f+".hasOwnProperty("+K+") ";else{var pa=O;if(pa){var e,oa=-1,vi=pa.length-1;while(oa<vi)e=pa[oa+=1],c+=" || "+K+" == "+a.util.toQuotedString(e)+" "}}if(I.length){var Ji=I;if(Ji){var ua,$a=-1,ta=Ji.length-1;while($a<ta)ua=Ji[$a+=1],c+=" || "+a.usePattern(ua)+".test("+K+") "}}c+=" ); if (isAdditional"+l+") { "}if(C=="all")c+=" delete "+W+"["+K+"]; ";else{var li=a.errorPath,pi="' + "+K+" + '";if(a.opts._errorDataPathProperty)a.errorPath=a.util.getPathExpr(a.errorPath,K,a.opts.jsonPointers);if(k)if(C)c+=" delete "+W+"["+K+"]; ";else{c+=" "+F+" = false; ";var bi=w;w=a.errSchemaPath+"/additionalProperties";var Za=Za||[];if(Za.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { additionalProperty: '"+pi+"' } ",a.opts.messages!==!1){if(c+=" , message: '",a.opts._errorDataPathProperty)c+="is an invalid additional property";else c+="should NOT have additional properties";c+="' "}if(a.opts.verbose)c+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var Ea=c;if(c=Za.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+Ea+"]); ";else c+=" validate.errors = ["+Ea+"]; return false; ";else c+=" var err = "+Ea+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(w=bi,m)c+=" break; "}else if(y)if(C=="failing"){c+=" var "+Y+" = errors; ";var yn=a.compositeRule;a.compositeRule=J.compositeRule=!0,J.schema=g,J.schemaPath=a.schemaPath+".additionalProperties",J.errSchemaPath=a.errSchemaPath+"/additionalProperties",J.errorPath=a.opts._errorDataPathProperty?a.errorPath:a.util.getPathExpr(a.errorPath,K,a.opts.jsonPointers);var ea=W+"["+K+"]";J.dataPathArr[L]=K;var Pa=a.validate(J);if(J.baseId=T,a.util.varOccurences(Pa,$)<2)c+=" "+a.util.varReplace(Pa,$,ea)+" ";else c+=" var "+$+" = "+ea+"; "+Pa+" ";c+=" if (!"+F+") { errors = "+Y+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+W+"["+K+"]; } ",a.compositeRule=J.compositeRule=yn}else{J.schema=g,J.schemaPath=a.schemaPath+".additionalProperties",J.errSchemaPath=a.errSchemaPath+"/additionalProperties",J.errorPath=a.opts._errorDataPathProperty?a.errorPath:a.util.getPathExpr(a.errorPath,K,a.opts.jsonPointers);var ea=W+"["+K+"]";J.dataPathArr[L]=K;var Pa=a.validate(J);if(J.baseId=T,a.util.varOccurences(Pa,$)<2)c+=" "+a.util.varReplace(Pa,$,ea)+" ";else c+=" var "+$+" = "+ea+"; "+Pa+" ";if(m)c+=" if (!"+F+") break; "}a.errorPath=li}if(E)c+=" } ";if(c+=" } ",m)c+=" if ("+F+") { ",X+="}"}var Bi=a.opts.useDefaults&&!a.compositeRule;if(O.length){var yi=O;if(yi){var e,Yn=-1,ri=yi.length-1;while(Yn<ri){e=yi[Yn+=1];var ai=u[e];if(a.opts.strictKeywords?typeof ai=="object"&&Object.keys(ai).length>0||ai===!1:a.util.schemaHasRules(ai,a.RULES.all)){var ka=a.util.getProperty(e),ea=W+ka,ga=Bi&&ai.default!==void 0;J.schema=ai,J.schemaPath=f+ka,J.errSchemaPath=w+"/"+a.util.escapeFragment(e),J.errorPath=a.util.getPath(a.errorPath,e,a.opts.jsonPointers),J.dataPathArr[L]=a.util.toQuotedString(e);var Pa=a.validate(J);if(J.baseId=T,a.util.varOccurences(Pa,$)<2){Pa=a.util.varReplace(Pa,$,ea);var ya=ea}else{var ya=$;c+=" var "+$+" = "+ea+"; "}if(ga)c+=" "+Pa+" ";else{if(xa&&xa[e]){if(c+=" if ( "+ya+" === undefined ",b)c+=" || ! Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(e)+"') ";c+=") { "+F+" = false; ";var li=a.errorPath,bi=w,di=a.util.escapeQuotes(e);if(a.opts._errorDataPathProperty)a.errorPath=a.util.getPath(li,e,a.opts.jsonPointers);w=a.errSchemaPath+"/required";var Za=Za||[];if(Za.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'required' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { missingProperty: '"+di+"' } ",a.opts.messages!==!1){if(c+=" , message: '",a.opts._errorDataPathProperty)c+="is a required property";else c+="should have required property \\'"+di+"\\'";c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var Ea=c;if(c=Za.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+Ea+"]); ";else c+=" validate.errors = ["+Ea+"]; return false; ";else c+=" var err = "+Ea+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";w=bi,a.errorPath=li,c+=" } else { "}else if(m){if(c+=" if ( "+ya+" === undefined ",b)c+=" || ! Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(e)+"') ";c+=") { "+F+" = true; } else { "}else{if(c+=" if ("+ya+" !== undefined ",b)c+=" && Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(e)+"') ";c+=" ) { "}c+=" "+Pa+" } "}}if(m)c+=" if ("+F+") { ",X+="}"}}}if(I.length){var Ki=I;if(Ki){var ua,rn=-1,R1=Ki.length-1;while(rn<R1){ua=Ki[rn+=1];var ai=j[ua];if(a.opts.strictKeywords?typeof ai=="object"&&Object.keys(ai).length>0||ai===!1:a.util.schemaHasRules(ai,a.RULES.all)){if(J.schema=ai,J.schemaPath=a.schemaPath+".patternProperties"+a.util.getProperty(ua),J.errSchemaPath=a.errSchemaPath+"/patternProperties/"+a.util.escapeFragment(ua),b)c+=" "+D+" = "+D+" || Object.keys("+W+"); for (var "+M+"=0; "+M+"<"+D+".length; "+M+"++) { var "+K+" = "+D+"["+M+"]; ";else c+=" for (var "+K+" in "+W+") { ";c+=" if ("+a.usePattern(ua)+".test("+K+")) { ",J.errorPath=a.util.getPathExpr(a.errorPath,K,a.opts.jsonPointers);var ea=W+"["+K+"]";J.dataPathArr[L]=K;var Pa=a.validate(J);if(J.baseId=T,a.util.varOccurences(Pa,$)<2)c+=" "+a.util.varReplace(Pa,$,ea)+" ";else c+=" var "+$+" = "+ea+"; "+Pa+" ";if(m)c+=" if (!"+F+") break; ";if(c+=" } ",m)c+=" else "+F+" = true; ";if(c+=" } ",m)c+=" if ("+F+") { ",X+="}"}}}}if(m)c+=" "+X+" if ("+Y+" == errors) {";return c}});var MJ=U((Uq,VJ)=>{VJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="errs__"+l,J=a.util.copy(a),X="";J.level++;var F="valid"+J.level;if(c+="var "+Y+" = errors;",a.opts.strictKeywords?typeof u=="object"&&Object.keys(u).length>0||u===!1:a.util.schemaHasRules(u,a.RULES.all)){J.schema=u,J.schemaPath=f,J.errSchemaPath=w;var K="key"+l,M="idx"+l,L="i"+l,$="' + "+K+" + '",D=J.dataLevel=a.dataLevel+1,O="data"+D,j="dataProperties"+l,I=a.opts.ownProperties,g=a.baseId;if(I)c+=" var "+j+" = undefined; ";if(I)c+=" "+j+" = "+j+" || Object.keys("+W+"); for (var "+M+"=0; "+M+"<"+j+".length; "+M+"++) { var "+K+" = "+j+"["+M+"]; ";else c+=" for (var "+K+" in "+W+") { ";c+=" var startErrs"+l+" = errors; ";var E=K,k=a.compositeRule;a.compositeRule=J.compositeRule=!0;var y=a.validate(J);if(J.baseId=g,a.util.varOccurences(y,O)<2)c+=" "+a.util.varReplace(y,O,E)+" ";else c+=" var "+O+" = "+E+"; "+y+" ";if(a.compositeRule=J.compositeRule=k,c+=" if (!"+F+") { for (var "+L+"=startErrs"+l+"; "+L+"<errors; "+L+"++) { vErrors["+L+"].propertyName = "+K+"; } var err = ",a.createErrors!==!1){if(c+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { propertyName: '"+$+"' } ",a.opts.messages!==!1)c+=" , message: 'property name \\'"+$+"\\' is invalid' ";if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";if(c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(vErrors); ";else c+=" validate.errors = vErrors; return false; ";if(m)c+=" break; ";c+=" } }"}if(m)c+=" "+X+" if ("+Y+" == errors) {";return c}});var $J=U((hq,HJ)=>{HJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J=a.opts.$data&&u&&u.$data,X;if(J)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",X="schema"+l;else X=u;var F="schema"+l;if(!J)if(u.length<a.opts.loopRequired&&a.schema.properties&&Object.keys(a.schema.properties).length){var K=[],M=u;if(M){var L,$=-1,D=M.length-1;while($<D){L=M[$+=1];var O=a.schema.properties[L];if(!(O&&(a.opts.strictKeywords?typeof O=="object"&&Object.keys(O).length>0||O===!1:a.util.schemaHasRules(O,a.RULES.all))))K[K.length]=L}}}else var K=u;if(J||K.length){var j=a.errorPath,I=J||K.length>=a.opts.loopRequired,g=a.opts.ownProperties;if(m)if(c+=" var missing"+l+"; ",I){if(!J)c+=" var "+F+" = validate.schema"+f+"; ";var E="i"+l,k="schema"+l+"["+E+"]",y="' + "+k+" + '";if(a.opts._errorDataPathProperty)a.errorPath=a.util.getPathExpr(j,k,a.opts.jsonPointers);if(c+=" var "+Y+" = true; ",J)c+=" if (schema"+l+" === undefined) "+Y+" = true; else if (!Array.isArray(schema"+l+")) "+Y+" = false; else {";if(c+=" for (var "+E+" = 0; "+E+" < "+F+".length; "+E+"++) { "+Y+" = "+W+"["+F+"["+E+"]] !== undefined ",g)c+=" && Object.prototype.hasOwnProperty.call("+W+", "+F+"["+E+"]) ";if(c+="; if (!"+Y+") break; } ",J)c+=" } ";c+=" if (!"+Y+") { ";var C=C||[];if(C.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'required' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { missingProperty: '"+y+"' } ",a.opts.messages!==!1){if(c+=" , message: '",a.opts._errorDataPathProperty)c+="is a required property";else c+="should have required property \\'"+y+"\\'";c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var R=c;if(c=C.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+R+"]); ";else c+=" validate.errors = ["+R+"]; return false; ";else c+=" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";c+=" } else { "}else{c+=" if ( ";var b=K;if(b){var T,E=-1,Wa=b.length-1;while(E<Wa){if(T=b[E+=1],E)c+=" || ";var xa=a.util.getProperty(T),Ja=W+xa;if(c+=" ( ( "+Ja+" === undefined ",g)c+=" || ! Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(T)+"') ";c+=") && (missing"+l+" = "+a.util.toQuotedString(a.opts.jsonPointers?T:xa)+") ) "}}c+=") { ";var k="missing"+l,y="' + "+k+" + '";if(a.opts._errorDataPathProperty)a.errorPath=a.opts.jsonPointers?a.util.getPathExpr(j,k,!0):j+" + "+k;var C=C||[];if(C.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'required' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { missingProperty: '"+y+"' } ",a.opts.messages!==!1){if(c+=" , message: '",a.opts._errorDataPathProperty)c+="is a required property";else c+="should have required property \\'"+y+"\\'";c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";var R=c;if(c=C.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+R+"]); ";else c+=" validate.errors = ["+R+"]; return false; ";else c+=" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";c+=" } else { "}else if(I){if(!J)c+=" var "+F+" = validate.schema"+f+"; ";var E="i"+l,k="schema"+l+"["+E+"]",y="' + "+k+" + '";if(a.opts._errorDataPathProperty)a.errorPath=a.util.getPathExpr(j,k,a.opts.jsonPointers);if(J){if(c+=" if ("+F+" && !Array.isArray("+F+")) { var err = ",a.createErrors!==!1){if(c+=" { keyword: 'required' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { missingProperty: '"+y+"' } ",a.opts.messages!==!1){if(c+=" , message: '",a.opts._errorDataPathProperty)c+="is a required property";else c+="should have required property \\'"+y+"\\'";c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+F+" !== undefined) { "}if(c+=" for (var "+E+" = 0; "+E+" < "+F+".length; "+E+"++) { if ("+W+"["+F+"["+E+"]] === undefined ",g)c+=" || ! Object.prototype.hasOwnProperty.call("+W+", "+F+"["+E+"]) ";if(c+=") { var err = ",a.createErrors!==!1){if(c+=" { keyword: 'required' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { missingProperty: '"+y+"' } ",a.opts.messages!==!1){if(c+=" , message: '",a.opts._errorDataPathProperty)c+="is a required property";else c+="should have required property \\'"+y+"\\'";c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";if(c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",J)c+=" } "}else{var pa=K;if(pa){var T,e=-1,oa=pa.length-1;while(e<oa){T=pa[e+=1];var xa=a.util.getProperty(T),y=a.util.escapeQuotes(T),Ja=W+xa;if(a.opts._errorDataPathProperty)a.errorPath=a.util.getPath(j,T,a.opts.jsonPointers);if(c+=" if ( "+Ja+" === undefined ",g)c+=" || ! Object.prototype.hasOwnProperty.call("+W+", '"+a.util.escapeQuotes(T)+"') ";if(c+=") { var err = ",a.createErrors!==!1){if(c+=" { keyword: 'required' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { missingProperty: '"+y+"' } ",a.opts.messages!==!1){if(c+=" , message: '",a.opts._errorDataPathProperty)c+="is a required property";else c+="should have required property \\'"+y+"\\'";c+="' "}if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" ";c+=" } "}else c+=" {} ";c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}}a.errorPath=j}else if(m)c+=" if (true) {";return c}});var UJ=U((Lq,BJ)=>{BJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W="data"+(x||""),Y="valid"+l,J=a.opts.$data&&u&&u.$data,X;if(J)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",X="schema"+l;else X=u;if((u||J)&&a.opts.uniqueItems!==!1){if(J)c+=" var "+Y+"; if ("+X+" === false || "+X+" === undefined) "+Y+" = true; else if (typeof "+X+" != 'boolean') "+Y+" = false; else { ";c+=" var i = "+W+".length , "+Y+" = true , j; if (i > 1) { ";var F=a.schema.items&&a.schema.items.type,K=Array.isArray(F);if(!F||F=="object"||F=="array"||K&&(F.indexOf("object")>=0||F.indexOf("array")>=0))c+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+W+"[i], "+W+"[j])) { "+Y+" = false; break outer; } } } ";else{c+=" var itemIndices = {}, item; for (;i--;) { var item = "+W+"[i]; ";var M="checkDataType"+(K?"s":"");if(c+=" if ("+a.util[M](F,"item",a.opts.strictNumbers,!0)+") continue; ",K)c+=` if (typeof item == 'string') item = '"' + item; `;c+=" if (typeof itemIndices[item] == 'number') { "+Y+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}if(c+=" } ",J)c+=" } ";c+=" if (!"+Y+") { ";var L=L||[];if(L.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { i: i, j: j } ",a.opts.messages!==!1)c+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' ";if(a.opts.verbose){if(c+=" , schema: ",J)c+="validate.schema"+f;else c+=""+u;c+=" , parentSchema: validate.schema"+a.schemaPath+" , data: "+W+" "}c+=" } "}else c+=" {} ";var $=c;if(c=L.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+$+"]); ";else c+=" validate.errors = ["+$+"]; return false; ";else c+=" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";if(c+=" } ",m)c+=" else { "}else if(m)c+=" if (true) { ";return c}});var LJ=U((Dq,hJ)=>{hJ.exports={$ref:ZQ(),allOf:IQ(),anyOf:TQ(),$comment:CQ(),const:yQ(),contains:dQ(),dependencies:eQ(),enum:iJ(),format:cJ(),if:lJ(),items:xJ(),maximum:sx(),minimum:sx(),maxItems:yx(),minItems:yx(),maxLength:rx(),minLength:rx(),maxProperties:dx(),minProperties:dx(),multipleOf:JJ(),not:YJ(),oneOf:XJ(),pattern:KJ(),properties:PJ(),propertyNames:MJ(),required:$J(),uniqueItems:UJ(),validate:kx()}});var NJ=U((Oq,OJ)=>{var DJ=LJ(),tx=Bv().toHash;OJ.exports=function i(){var a=[{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"]}],n=["type","$comment"],v=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],c=["number","integer","string","array","object","boolean","null"];return a.all=tx(n),a.types=tx(c),a.forEach(function(l){if(l.rules=l.rules.map(function(x){var u;if(typeof x=="object"){var f=Object.keys(x)[0];u=x[f],x=f,u.forEach(function(m){n.push(m),a.all[m]=!0})}n.push(x);var w=a.all[x]={keyword:x,code:DJ[x],implements:u};return w}),a.all.$comment={keyword:"$comment",code:DJ.$comment},l.type)a.types[l.type]=l}),a.keywords=tx(n.concat(v)),a.custom={},a}});var jJ=U((Nq,qJ)=>{var AJ=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];qJ.exports=function(i,a){for(var n=0;n<a.length;n++){i=JSON.parse(JSON.stringify(i));var v=a[n].split("/"),c=i,l;for(l=1;l<v.length;l++)c=c[v[l]];for(l=0;l<AJ.length;l++){var x=AJ[l],u=c[x];if(u)c[x]={anyOf:[u,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}}}return i}});var EJ=U((Aq,oJ)=>{var HL=wp().MissingRef;oJ.exports=RJ;function RJ(i,a,n){var v=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");if(typeof a=="function")n=a,a=void 0;var c=l(i).then(function(){var u=v._addSchema(i,void 0,a);return u.validate||x(u)});if(n)c.then(function(u){n(null,u)},n);return c;function l(u){var f=u.$schema;return f&&!v.getSchema(f)?RJ.call(v,{$ref:f},!0):Promise.resolve()}function x(u){try{return v._compile(u)}catch(w){if(w instanceof HL)return f(w);throw w}function f(w){var m=w.missingSchema;if(J(m))throw new Error("Schema "+m+" is loaded but "+w.missingRef+" cannot be resolved");var W=v._loadingSchemas[m];if(!W)W=v._loadingSchemas[m]=v._opts.loadSchema(m),W.then(Y,Y);return W.then(function(X){if(!J(m))return l(X).then(function(){if(!J(m))v.addSchema(X,m,void 0,a)})}).then(function(){return x(u)});function Y(){delete v._loadingSchemas[m]}function J(X){return v._refs[X]||v._schemas[X]}}}}});var _J=U((qq,bJ)=>{bJ.exports=function i(a,n,v){var c=" ",l=a.level,x=a.dataLevel,u=a.schema[n],f=a.schemaPath+a.util.getProperty(n),w=a.errSchemaPath+"/"+n,m=!a.opts.allErrors,W,Y="data"+(x||""),J="valid"+l,X="errs__"+l,F=a.opts.$data&&u&&u.$data,K;if(F)c+=" var schema"+l+" = "+a.util.getData(u.$data,x,a.dataPathArr)+"; ",K="schema"+l;else K=u;var M=this,L="definition"+l,$=M.definition,D="",O,j,I,g,E;if(F&&$.$data){E="keywordValidate"+l;var k=$.validateSchema;c+=" var "+L+" = RULES.custom['"+n+"'].definition; var "+E+" = "+L+".validate;"}else{if(g=a.useCustomRule(M,u,a.schema,a),!g)return;K="validate.schema"+f,E=g.code,O=$.compile,j=$.inline,I=$.macro}var y=E+".errors",C="i"+l,R="ruleErr"+l,b=$.async;if(b&&!a.async)throw new Error("async keyword in sync schema");if(!(j||I))c+=""+y+" = null;";if(c+="var "+X+" = errors;var "+J+";",F&&$.$data){if(D+="}",c+=" if ("+K+" === undefined) { "+J+" = true; } else { ",k)D+="}",c+=" "+J+" = "+L+".validateSchema("+K+"); if ("+J+") { "}if(j)if($.statements)c+=" "+g.validate+" ";else c+=" "+J+" = "+g.validate+"; ";else if(I){var T=a.util.copy(a),D="";T.level++;var Wa="valid"+T.level;T.schema=g.validate,T.schemaPath="";var xa=a.compositeRule;a.compositeRule=T.compositeRule=!0;var Ja=a.validate(T).replace(/validate\.schema/g,E);a.compositeRule=T.compositeRule=xa,c+=" "+Ja}else{var pa=pa||[];if(pa.push(c),c="",c+=" "+E+".call( ",a.opts.passContext)c+="this";else c+="self";if(O||$.schema===!1)c+=" , "+Y+" ";else c+=" , "+K+" , "+Y+" , validate.schema"+a.schemaPath+" ";if(c+=" , (dataPath || '')",a.errorPath!='""')c+=" + "+a.errorPath;var e=x?"data"+(x-1||""):"parentData",oa=x?a.dataPathArr[x]:"parentDataProperty";c+=" , "+e+" , "+oa+" , rootData ) ";var vi=c;if(c=pa.pop(),$.errors===!1){if(c+=" "+J+" = ",b)c+="await ";c+=""+vi+"; "}else if(b)y="customErrors"+l,c+=" var "+y+" = null; try { "+J+" = await "+vi+"; } catch (e) { "+J+" = false; if (e instanceof ValidationError) "+y+" = e.errors; else throw e; } ";else c+=" "+y+" = null; "+J+" = "+vi+"; "}if($.modifying)c+=" if ("+e+") "+Y+" = "+e+"["+oa+"];";if(c+=""+D,$.valid){if(m)c+=" if (true) { "}else{if(c+=" if ( ",$.valid===void 0)if(c+=" !",I)c+=""+Wa;else c+=""+J;else c+=" "+!$.valid+" ";c+=") { ",W=M.keyword;var pa=pa||[];pa.push(c),c="";var pa=pa||[];if(pa.push(c),c="",a.createErrors!==!1){if(c+=" { keyword: '"+(W||"custom")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { keyword: '"+M.keyword+"' } ",a.opts.messages!==!1)c+=` , message: 'should pass "`+M.keyword+`" keyword validation' `;if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+Y+" ";c+=" } "}else c+=" {} ";var Ji=c;if(c=pa.pop(),!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(["+Ji+"]); ";else c+=" validate.errors = ["+Ji+"]; return false; ";else c+=" var err = "+Ji+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var ua=c;if(c=pa.pop(),j)if($.errors){if($.errors!="full"){if(c+=" for (var "+C+"="+X+"; "+C+"<errors; "+C+"++) { var "+R+" = vErrors["+C+"]; if ("+R+".dataPath === undefined) "+R+".dataPath = (dataPath || '') + "+a.errorPath+"; if ("+R+".schemaPath === undefined) { "+R+'.schemaPath = "'+w+'"; } ',a.opts.verbose)c+=" "+R+".schema = "+K+"; "+R+".data = "+Y+"; ";c+=" } "}}else if($.errors===!1)c+=" "+ua+" ";else{if(c+=" if ("+X+" == errors) { "+ua+" } else { for (var "+C+"="+X+"; "+C+"<errors; "+C+"++) { var "+R+" = vErrors["+C+"]; if ("+R+".dataPath === undefined) "+R+".dataPath = (dataPath || '') + "+a.errorPath+"; if ("+R+".schemaPath === undefined) { "+R+'.schemaPath = "'+w+'"; } ',a.opts.verbose)c+=" "+R+".schema = "+K+"; "+R+".data = "+Y+"; ";c+=" } } "}else if(I){if(c+=" var err = ",a.createErrors!==!1){if(c+=" { keyword: '"+(W||"custom")+"' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(w)+" , params: { keyword: '"+M.keyword+"' } ",a.opts.messages!==!1)c+=` , message: 'should pass "`+M.keyword+`" keyword validation' `;if(a.opts.verbose)c+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+a.schemaPath+" , data: "+Y+" ";c+=" } "}else c+=" {} ";if(c+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!a.compositeRule&&m)if(a.async)c+=" throw new ValidationError(vErrors); ";else c+=" validate.errors = vErrors; return false; "}else if($.errors===!1)c+=" "+ua+" ";else{if(c+=" if (Array.isArray("+y+")) { if (vErrors === null) vErrors = "+y+"; else vErrors = vErrors.concat("+y+"); errors = vErrors.length; for (var "+C+"="+X+"; "+C+"<errors; "+C+"++) { var "+R+" = vErrors["+C+"]; if ("+R+".dataPath === undefined) "+R+".dataPath = (dataPath || '') + "+a.errorPath+"; "+R+'.schemaPath = "'+w+'"; ',a.opts.verbose)c+=" "+R+".schema = "+K+"; "+R+".data = "+Y+"; ";c+=" } } else { "+ua+" } "}if(c+=" } ",m)c+=" else { "}return c}});var ex=U((jq,$L)=>{$L.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 IJ=U((Rq,gJ)=>{var ZJ=ex();gJ.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:ZJ.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:ZJ.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 TJ=U((oq,SJ)=>{var BL=/^[a-z_$][a-z0-9_$-]*$/i,UL=_J(),hL=IJ();SJ.exports={add:LL,get:DL,remove:OL,validate:a2};function LL(i,a){var n=this.RULES;if(n.keywords[i])throw new Error("Keyword "+i+" is already defined");if(!BL.test(i))throw new Error("Keyword "+i+" is not a valid identifier");if(a){this.validateKeyword(a,!0);var v=a.type;if(Array.isArray(v))for(var c=0;c<v.length;c++)x(i,v[c],a);else x(i,v,a);var l=a.metaSchema;if(l){if(a.$data&&this._opts.$data)l={anyOf:[l,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]};a.validateSchema=this.compile(l,!0)}}n.keywords[i]=n.all[i]=!0;function x(u,f,w){var m;for(var W=0;W<n.length;W++){var Y=n[W];if(Y.type==f){m=Y;break}}if(!m)m={type:f,rules:[]},n.push(m);var J={keyword:u,definition:w,custom:!0,code:UL,implements:w.implements};m.rules.push(J),n.custom[u]=J}return this}function DL(i){var a=this.RULES.custom[i];return a?a.definition:this.RULES.keywords[i]||!1}function OL(i){var a=this.RULES;delete a.keywords[i],delete a.all[i],delete a.custom[i];for(var n=0;n<a.length;n++){var v=a[n].rules;for(var c=0;c<v.length;c++)if(v[c].keyword==i){v.splice(c,1);break}}return this}function a2(i,a){a2.errors=null;var n=this._validateKeyword=this._validateKeyword||this.compile(hL,!0);if(n(i))return!0;if(a2.errors=n.errors,a)throw new Error("custom keyword definition is invalid: "+this.errorsText(n.errors));else return!1}});var kJ=U((Eq,NL)=>{NL.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 nW=U((bq,iW)=>{var sJ=$Q(),Uv=fp(),AL=UQ(),yJ=bx(),qL=Tx(),jL=bQ(),RL=NJ(),rJ=jJ(),dJ=Bv();iW.exports=sa;sa.prototype.validate=EL;sa.prototype.compile=bL;sa.prototype.addSchema=_L;sa.prototype.addMetaSchema=ZL;sa.prototype.validateSchema=gL;sa.prototype.getSchema=SL;sa.prototype.removeSchema=kL;sa.prototype.addFormat=aD;sa.prototype.errorsText=eL;sa.prototype._addSchema=CL;sa.prototype._compile=sL;sa.prototype.compileAsync=EJ();var Gp=TJ();sa.prototype.addKeyword=Gp.add;sa.prototype.getKeyword=Gp.get;sa.prototype.removeKeyword=Gp.remove;sa.prototype.validateKeyword=Gp.validate;var tJ=wp();sa.ValidationError=tJ.Validation;sa.MissingRefError=tJ.MissingRef;sa.$dataMetaSchema=rJ;var Xp="http://json-schema.org/draft-07/schema",CJ=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],oL=["/properties"];function sa(i){if(!(this instanceof sa))return new sa(i);if(i=this._opts=dJ.copy(i)||{},pD(this),this._schemas={},this._refs={},this._fragments={},this._formats=jL(i.format),this._cache=i.cache||new AL,this._loadingSchemas={},this._compilations=[],this.RULES=RL(),this._getId=yL(i),i.loopRequired=i.loopRequired||1/0,i.errorDataPath=="property")i._errorDataPathProperty=!0;if(i.serialize===void 0)i.serialize=qL;if(this._metaOpts=lD(this),i.formats)cD(this);if(i.keywords)vD(this);if(iD(this),typeof i.meta=="object")this.addMetaSchema(i.meta);if(i.nullable)this.addKeyword("nullable",{metaSchema:{type:"boolean"}});nD(this)}function EL(i,a){var n;if(typeof i=="string"){if(n=this.getSchema(i),!n)throw new Error('no schema with key or ref "'+i+'"')}else{var v=this._addSchema(i);n=v.validate||this._compile(v)}var c=n(a);if(n.$async!==!0)this.errors=n.errors;return c}function bL(i,a){var n=this._addSchema(i,void 0,a);return n.validate||this._compile(n)}function _L(i,a,n,v){if(Array.isArray(i)){for(var c=0;c<i.length;c++)this.addSchema(i[c],void 0,n,v);return this}var l=this._getId(i);if(l!==void 0&&typeof l!="string")throw new Error("schema id must be string");return a=Uv.normalizeId(a||l),aW(this,a),this._schemas[a]=this._addSchema(i,n,v,!0),this}function ZL(i,a,n){return this.addSchema(i,a,n,!0),this}function gL(i,a){var n=i.$schema;if(n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this._opts.defaultMeta||IL(this),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var v=this.validate(n,i);if(!v&&a){var c="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(c);else throw new Error(c)}return v}function IL(i){var a=i._opts.meta;return i._opts.defaultMeta=typeof a=="object"?i._getId(a)||a:i.getSchema(Xp)?Xp:void 0,i._opts.defaultMeta}function SL(i){var a=eJ(this,i);switch(typeof a){case"object":return a.validate||this._compile(a);case"string":return this.getSchema(a);case"undefined":return TL(this,i)}}function TL(i,a){var n=Uv.schema.call(i,{schema:{}},a);if(n){var{schema:v,root:c,baseId:l}=n,x=sJ.call(i,v,c,void 0,l);return i._fragments[a]=new yJ({ref:a,fragment:!0,schema:v,root:c,baseId:l,validate:x}),x}}function eJ(i,a){return a=Uv.normalizeId(a),i._schemas[a]||i._refs[a]||i._fragments[a]}function kL(i){if(i instanceof RegExp)return zp(this,this._schemas,i),zp(this,this._refs,i),this;switch(typeof i){case"undefined":return zp(this,this._schemas),zp(this,this._refs),this._cache.clear(),this;case"string":var a=eJ(this,i);if(a)this._cache.del(a.cacheKey);return delete this._schemas[i],delete this._refs[i],this;case"object":var n=this._opts.serialize,v=n?n(i):i;this._cache.del(v);var c=this._getId(i);if(c)c=Uv.normalizeId(c),delete this._schemas[c],delete this._refs[c]}return this}function zp(i,a,n){for(var v in a){var c=a[v];if(!c.meta&&(!n||n.test(v)))i._cache.del(c.cacheKey),delete a[v]}}function CL(i,a,n,v){if(typeof i!="object"&&typeof i!="boolean")throw new Error("schema should be object or boolean");var c=this._opts.serialize,l=c?c(i):i,x=this._cache.get(l);if(x)return x;v=v||this._opts.addUsedSchema!==!1;var u=Uv.normalizeId(this._getId(i));if(u&&v)aW(this,u);var f=this._opts.validateSchema!==!1&&!a,w;if(f&&!(w=u&&u==Uv.normalizeId(i.$schema)))this.validateSchema(i,!0);var m=Uv.ids.call(this,i),W=new yJ({id:u,schema:i,localRefs:m,cacheKey:l,meta:n});if(u[0]!="#"&&v)this._refs[u]=W;if(this._cache.put(l,W),f&&w)this.validateSchema(i,!0);return W}function sL(i,a){if(i.compiling){if(i.validate=c,c.schema=i.schema,c.errors=null,c.root=a?a:c,i.schema.$async===!0)c.$async=!0;return c}i.compiling=!0;var n;if(i.meta)n=this._opts,this._opts=this._metaOpts;var v;try{v=sJ.call(this,i.schema,a,i.localRefs)}catch(l){throw delete i.validate,l}finally{if(i.compiling=!1,i.meta)this._opts=n}return i.validate=v,i.refs=v.refs,i.refVal=v.refVal,i.root=v.root,v;function c(){var l=i.validate,x=l.apply(this,arguments);return c.errors=l.errors,x}}function yL(i){switch(i.schemaId){case"auto":return tL;case"id":return rL;default:return dL}}function rL(i){if(i.$id)this.logger.warn("schema $id ignored",i.$id);return i.id}function dL(i){if(i.id)this.logger.warn("schema id ignored",i.id);return i.$id}function tL(i){if(i.$id&&i.id&&i.$id!=i.id)throw new Error("schema $id is different from id");return i.$id||i.id}function eL(i,a){if(i=i||this.errors,!i)return"No errors";a=a||{};var n=a.separator===void 0?", ":a.separator,v=a.dataVar===void 0?"data":a.dataVar,c="";for(var l=0;l<i.length;l++){var x=i[l];if(x)c+=v+x.dataPath+" "+x.message+n}return c.slice(0,-n.length)}function aD(i,a){if(typeof a=="string")a=new RegExp(a);return this._formats[i]=a,this}function iD(i){var a;if(i._opts.$data)a=kJ(),i.addMetaSchema(a,a.$id,!0);if(i._opts.meta===!1)return;var n=ex();if(i._opts.$data)n=rJ(n,oL);i.addMetaSchema(n,Xp,!0),i._refs["http://json-schema.org/schema"]=Xp}function nD(i){var a=i._opts.schemas;if(!a)return;if(Array.isArray(a))i.addSchema(a);else for(var n in a)i.addSchema(a[n],n)}function cD(i){for(var a in i._opts.formats){var n=i._opts.formats[a];i.addFormat(a,n)}}function vD(i){for(var a in i._opts.keywords){var n=i._opts.keywords[a];i.addKeyword(a,n)}}function aW(i,a){if(i._schemas[a]||i._refs[a])throw new Error('schema with key or id "'+a+'" already exists')}function lD(i){var a=dJ.copy(i._opts);for(var n=0;n<CJ.length;n++)delete a[CJ[n]];return a}function pD(i){var a=i._opts.logger;if(a===!1)i.logger={log:i2,warn:i2,error:i2};else{if(a===void 0)a=console;if(!(typeof a=="object"&&a.log&&a.warn&&a.error))throw new Error("logger must implement log, warn and error methods");i.logger=a}}function i2(){}});function FD(i){if(!/^data:/i.test(i))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');i=i.replace(/\r?\n/g,"");let a=i.indexOf(",");if(a===-1||a<=4)throw new TypeError("malformed data: URI");let n=i.substring(5,a).split(";"),v="",c=!1,l=n[0]||"text/plain",x=l;for(let m=1;m<n.length;m++)if(n[m]==="base64")c=!0;else if(n[m]){if(x+=`;${n[m]}`,n[m].indexOf("charset=")===0)v=n[m].substring(8)}if(!n[0]&&!v.length)x+=";charset=US-ASCII",v="US-ASCII";let u=c?"base64":"ascii",f=unescape(i.substring(a+1)),w=Buffer.from(f,u);return w.type=l,w.typeFull=x,w.charset=v,w}var ZW;var gW=qa(()=>{ZW=FD});var SW=U((Hp,IW)=>{(function(i,a){typeof Hp==="object"&&typeof IW!=="undefined"?a(Hp):typeof define==="function"&&define.amd?define(["exports"],a):(i=typeof globalThis!=="undefined"?globalThis:i||self,a(i.WebStreamsPolyfill={}))})(Hp,function(i){function a(){return}function n(p){return typeof p==="object"&&p!==null||typeof p==="function"}let v=a;function c(p,Q){try{Object.defineProperty(p,"name",{value:Q,configurable:!0})}catch(z){}}let l=Promise,x=Promise.prototype.then,u=Promise.reject.bind(l);function f(p){return new l(p)}function w(p){return f((Q)=>Q(p))}function m(p){return u(p)}function W(p,Q,z){return x.call(p,Q,z)}function Y(p,Q,z){W(W(p,Q,z),void 0,v)}function J(p,Q){Y(p,Q)}function X(p,Q){Y(p,void 0,Q)}function F(p,Q,z){return W(p,Q,z)}function K(p){W(p,void 0,v)}let M=(p)=>{if(typeof queueMicrotask==="function")M=queueMicrotask;else{let Q=w(void 0);M=(z)=>W(Q,z)}return M(p)};function L(p,Q,z){if(typeof p!=="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(p,Q,z)}function $(p,Q,z){try{return w(L(p,Q,z))}catch(V){return m(V)}}let D=16384;class O{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(p){let Q=this._back,z=Q;if(Q._elements.length===D-1)z={_elements:[],_next:void 0};if(Q._elements.push(p),z!==Q)this._back=z,Q._next=z;++this._size}shift(){let p=this._front,Q=p,z=this._cursor,V=z+1,h=p._elements,A=h[z];if(V===D)Q=p._next,V=0;if(--this._size,this._cursor=V,p!==Q)this._front=Q;return h[z]=void 0,A}forEach(p){let Q=this._cursor,z=this._front,V=z._elements;while(Q!==V.length||z._next!==void 0){if(Q===V.length){if(z=z._next,V=z._elements,Q=0,V.length===0)break}p(V[Q]),++Q}}peek(){let p=this._front,Q=this._cursor;return p._elements[Q]}}let j=Symbol("[[AbortSteps]]"),I=Symbol("[[ErrorSteps]]"),g=Symbol("[[CancelSteps]]"),E=Symbol("[[PullSteps]]"),k=Symbol("[[ReleaseSteps]]");function y(p,Q){if(p._ownerReadableStream=Q,Q._reader=p,Q._state==="readable")T(p);else if(Q._state==="closed")xa(p);else Wa(p,Q._storedError)}function C(p,Q){let z=p._ownerReadableStream;return Kn(z,Q)}function R(p){let Q=p._ownerReadableStream;if(Q._state==="readable")Ja(p,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"));else pa(p,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"));Q._readableStreamController[k](),Q._reader=void 0,p._ownerReadableStream=void 0}function b(p){return new TypeError("Cannot "+p+" a stream using a released reader")}function T(p){p._closedPromise=f((Q,z)=>{p._closedPromise_resolve=Q,p._closedPromise_reject=z})}function Wa(p,Q){T(p),Ja(p,Q)}function xa(p){T(p),e(p)}function Ja(p,Q){if(p._closedPromise_reject===void 0)return;K(p._closedPromise),p._closedPromise_reject(Q),p._closedPromise_resolve=void 0,p._closedPromise_reject=void 0}function pa(p,Q){Wa(p,Q)}function e(p){if(p._closedPromise_resolve===void 0)return;p._closedPromise_resolve(void 0),p._closedPromise_resolve=void 0,p._closedPromise_reject=void 0}let oa=Number.isFinite||function(p){return typeof p==="number"&&isFinite(p)},vi=Math.trunc||function(p){return p<0?Math.ceil(p):Math.floor(p)};function Ji(p){return typeof p==="object"||typeof p==="function"}function ua(p,Q){if(p!==void 0&&!Ji(p))throw new TypeError(`${Q} is not an object.`)}function $a(p,Q){if(typeof p!=="function")throw new TypeError(`${Q} is not a function.`)}function ta(p){return typeof p==="object"&&p!==null||typeof p==="function"}function li(p,Q){if(!ta(p))throw new TypeError(`${Q} is not an object.`)}function pi(p,Q,z){if(p===void 0)throw new TypeError(`Parameter ${Q} is required in '${z}'.`)}function bi(p,Q,z){if(p===void 0)throw new TypeError(`${Q} is required in '${z}'.`)}function Za(p){return Number(p)}function Ea(p){return p===0?0:p}function yn(p){return Ea(vi(p))}function ea(p,Q){let V=Number.MAX_SAFE_INTEGER,h=Number(p);if(h=Ea(h),!oa(h))throw new TypeError(`${Q} is not a finite number`);if(h=yn(h),h<0||h>V)throw new TypeError(`${Q} is outside the accepted range of 0 to ${V}, inclusive`);if(!oa(h)||h===0)return 0;return h}function Pa(p,Q){if(!Mc(p))throw new TypeError(`${Q} is not a ReadableStream.`)}function Bi(p){return new ka(p)}function yi(p,Q){p._reader._readRequests.push(Q)}function Yn(p,Q,z){let h=p._reader._readRequests.shift();if(z)h._closeSteps();else h._chunkSteps(Q)}function ri(p){return p._reader._readRequests.length}function ai(p){let Q=p._reader;if(Q===void 0)return!1;if(!ga(Q))return!1;return!0}class ka{constructor(p){if(pi(p,1,"ReadableStreamDefaultReader"),Pa(p,"First parameter"),Hc(p))throw new TypeError("This stream has already been locked for exclusive reading by another reader");y(this,p),this._readRequests=new O}get closed(){if(!ga(this))return m(rn("closed"));return this._closedPromise}cancel(p=void 0){if(!ga(this))return m(rn("cancel"));if(this._ownerReadableStream===void 0)return m(b("cancel"));return C(this,p)}read(){if(!ga(this))return m(rn("read"));if(this._ownerReadableStream===void 0)return m(b("read from"));let p,Q,z=f((h,A)=>{p=h,Q=A});return ya(this,{_chunkSteps:(h)=>p({value:h,done:!1}),_closeSteps:()=>p({value:void 0,done:!0}),_errorSteps:(h)=>Q(h)}),z}releaseLock(){if(!ga(this))throw rn("releaseLock");if(this._ownerReadableStream===void 0)return;di(this)}}if(Object.defineProperties(ka.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),c(ka.prototype.cancel,"cancel"),c(ka.prototype.read,"read"),c(ka.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(ka.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function ga(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_readRequests"))return!1;return p instanceof ka}function ya(p,Q){let z=p._ownerReadableStream;if(z._disturbed=!0,z._state==="closed")Q._closeSteps();else if(z._state==="errored")Q._errorSteps(z._storedError);else z._readableStreamController[E](Q)}function di(p){R(p);let Q=new TypeError("Reader was released");Ki(p,Q)}function Ki(p,Q){let z=p._readRequests;p._readRequests=new O,z.forEach((V)=>{V._errorSteps(Q)})}function rn(p){return new TypeError(`ReadableStreamDefaultReader.prototype.${p} can only be used on a ReadableStreamDefaultReader`)}let R1=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Ui{constructor(p,Q){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=p,this._preventCancel=Q}next(){let p=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?F(this._ongoingPromise,p,p):p(),this._ongoingPromise}return(p){let Q=()=>this._returnSteps(p);return this._ongoingPromise?F(this._ongoingPromise,Q,Q):Q()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let p=this._reader,Q,z,V=f((A,o)=>{Q=A,z=o});return ya(p,{_chunkSteps:(A)=>{this._ongoingPromise=void 0,M(()=>Q({value:A,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,R(p),Q({value:void 0,done:!0})},_errorSteps:(A)=>{this._ongoingPromise=void 0,this._isFinished=!0,R(p),z(A)}}),V}_returnSteps(p){if(this._isFinished)return Promise.resolve({value:p,done:!0});this._isFinished=!0;let Q=this._reader;if(!this._preventCancel){let z=C(Q,p);return R(Q),F(z,()=>({value:p,done:!0}))}return R(Q),w({value:p,done:!0})}}let Xc={next(){if(!o1(this))return m(Gc("next"));return this._asyncIteratorImpl.next()},return(p){if(!o1(this))return m(Gc("return"));return this._asyncIteratorImpl.return(p)}};Object.setPrototypeOf(Xc,R1);function vl(p,Q){let z=Bi(p),V=new Ui(z,Q),h=Object.create(Xc);return h._asyncIteratorImpl=V,h}function o1(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_asyncIteratorImpl"))return!1;try{return p._asyncIteratorImpl instanceof Ui}catch(Q){return!1}}function Gc(p){return new TypeError(`ReadableStreamAsyncIterator.${p} can only be used on a ReadableSteamAsyncIterator`)}let E1=Number.isNaN||function(p){return p!==p};var b1,_1,Nv;function Fi(p){return p.slice()}function ll(p,Q,z,V,h){new Uint8Array(p).set(new Uint8Array(z,V,h),Q)}let zn=(p)=>{if(typeof p.transfer==="function")zn=(Q)=>Q.transfer();else if(typeof structuredClone==="function")zn=(Q)=>structuredClone(Q,{transfer:[Q]});else zn=(Q)=>Q;return zn(p)},Ln=(p)=>{if(typeof p.detached==="boolean")Ln=(Q)=>Q.detached;else Ln=(Q)=>Q.byteLength===0;return Ln(p)};function pl(p,Q,z){if(p.slice)return p.slice(Q,z);let V=z-Q,h=new ArrayBuffer(V);return ll(h,0,p,Q,V),h}function Av(p,Q){let z=p[Q];if(z===void 0||z===null)return;if(typeof z!=="function")throw new TypeError(`${String(Q)} is not a function`);return z}function Ep(p){let Q={[Symbol.iterator]:()=>p.iterator},z=async function*(){return yield*Q}(),V=z.next;return{iterator:z,nextMethod:V,done:!1}}let Dn=(Nv=(b1=Symbol.asyncIterator)!==null&&b1!==void 0?b1:(_1=Symbol.for)===null||_1===void 0?void 0:_1.call(Symbol,"Symbol.asyncIterator"))!==null&&Nv!==void 0?Nv:"@@asyncIterator";function xl(p,Q="sync",z){if(z===void 0)if(Q==="async"){if(z=Av(p,Dn),z===void 0){let A=Av(p,Symbol.iterator),o=xl(p,"sync",A);return Ep(o)}}else z=Av(p,Symbol.iterator);if(z===void 0)throw new TypeError("The object is not iterable");let V=L(z,p,[]);if(!n(V))throw new TypeError("The iterator method must return an object");let h=V.next;return{iterator:V,nextMethod:h,done:!1}}function ul(p){let Q=L(p.nextMethod,p.iterator,[]);if(!n(Q))throw new TypeError("The iterator.next() method must return an object");return Q}function bp(p){return Boolean(p.done)}function Z1(p){return p.value}function fl(p){if(typeof p!=="number")return!1;if(E1(p))return!1;if(p<0)return!1;return!0}function wl(p){let Q=pl(p.buffer,p.byteOffset,p.byteOffset+p.byteLength);return new Uint8Array(Q)}function qv(p){let Q=p._queue.shift();if(p._queueTotalSize-=Q.size,p._queueTotalSize<0)p._queueTotalSize=0;return Q.value}function g1(p,Q,z){if(!fl(z)||z===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");p._queue.push({value:Q,size:z}),p._queueTotalSize+=z}function ml(p){return p._queue.peek().value}function H(p){p._queue=new O,p._queueTotalSize=0}function P(p){return p===DataView}function B(p){return P(p.constructor)}function q(p){if(P(p))return 1;return p.BYTES_PER_ELEMENT}class N{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Xa(this))throw tn("view");return this._view}respond(p){if(!Xa(this))throw tn("respond");if(pi(p,1,"respond"),p=ea(p,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Ln(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");an(this._associatedReadableByteStreamController,p)}respondWithNewView(p){if(!Xa(this))throw tn("respondWithNewView");if(pi(p,1,"respondWithNewView"),!ArrayBuffer.isView(p))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Ln(p.buffer))throw new TypeError("The given view's buffer has been detached and so cannot be used as a response");Rv(this._associatedReadableByteStreamController,p)}}if(Object.defineProperties(N.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),c(N.prototype.respond,"respond"),c(N.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(N.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class S{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!na(this))throw Kc("byobRequest");return qn(this)}get desiredSize(){if(!na(this))throw Kc("desiredSize");return jv(this)}close(){if(!na(this))throw Kc("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let p=this._controlledReadableByteStream._state;if(p!=="readable")throw new TypeError(`The stream (in ${p} state) is not in the readable state and cannot be closed`);An(this)}enqueue(p){if(!na(this))throw Kc("enqueue");if(pi(p,1,"enqueue"),!ArrayBuffer.isView(p))throw new TypeError("chunk must be an array buffer view");if(p.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(p.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let Q=this._controlledReadableByteStream._state;if(Q!=="readable")throw new TypeError(`The stream (in ${Q} state) is not in the readable state and cannot be enqueued to`);Xn(this,p)}error(p=void 0){if(!na(this))throw Kc("error");ni(this,p)}[g](p){Ia(this),H(this);let Q=this._cancelAlgorithm(p);return dn(this),Q}[E](p){let Q=this._controlledReadableByteStream;if(this._queueTotalSize>0){ei(this,p);return}let z=this._autoAllocateChunkSize;if(z!==void 0){let V;try{V=new ArrayBuffer(z)}catch(A){p._errorSteps(A);return}let h={buffer:V,bufferByteLength:z,byteOffset:0,byteLength:z,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(h)}yi(Q,p),Ya(this)}[k](){if(this._pendingPullIntos.length>0){let p=this._pendingPullIntos.peek();p.readerType="none",this._pendingPullIntos=new O,this._pendingPullIntos.push(p)}}}if(Object.defineProperties(S.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),c(S.prototype.close,"close"),c(S.prototype.enqueue,"enqueue"),c(S.prototype.error,"error"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(S.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function na(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_controlledReadableByteStream"))return!1;return p instanceof S}function Xa(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_associatedReadableByteStreamController"))return!1;return p instanceof N}function Ya(p){if(!sc(p))return;if(p._pulling){p._pullAgain=!0;return}p._pulling=!0;let z=p._pullAlgorithm();Y(z,()=>{if(p._pulling=!1,p._pullAgain)p._pullAgain=!1,Ya(p);return null},(V)=>{return ni(p,V),null})}function Ia(p){Wi(p),p._pendingPullIntos=new O}function za(p,Q){let z=!1;if(p._state==="closed")z=!0;let V=Oa(Q);if(Q.readerType==="default")Yn(p,V,z);else Fc(p,V,z)}function Oa(p){let{bytesFilled:Q,elementSize:z}=p;return new p.viewConstructor(p.buffer,p.byteOffset,Q/z)}function ba(p,Q,z,V){p._queue.push({buffer:Q,byteOffset:z,byteLength:V}),p._queueTotalSize+=V}function La(p,Q,z,V){let h;try{h=pl(Q,z,z+V)}catch(A){throw ni(p,A),A}ba(p,h,0,V)}function Va(p,Q){if(Q.bytesFilled>0)La(p,Q.buffer,Q.byteOffset,Q.bytesFilled);Vi(p)}function Na(p,Q){let z=Math.min(p._queueTotalSize,Q.byteLength-Q.bytesFilled),V=Q.bytesFilled+z,h=z,A=!1,o=V%Q.elementSize,d=V-o;if(d>=Q.minimumFill)h=d-Q.bytesFilled,A=!0;let aa=p._queue;while(h>0){let la=aa.peek(),fa=Math.min(h,la.byteLength),Ga=Q.byteOffset+Q.bytesFilled;if(ll(Q.buffer,Ga,la.buffer,la.byteOffset,fa),la.byteLength===fa)aa.shift();else la.byteOffset+=fa,la.byteLength-=fa;p._queueTotalSize-=fa,Ba(p,fa,Q),h-=fa}return A}function Ba(p,Q,z){z.bytesFilled+=Q}function On(p){if(p._queueTotalSize===0&&p._closeRequested)dn(p),y1(p._controlledReadableByteStream);else Ya(p)}function Wi(p){if(p._byobRequest===null)return;p._byobRequest._associatedReadableByteStreamController=void 0,p._byobRequest._view=null,p._byobRequest=null}function Pi(p){while(p._pendingPullIntos.length>0){if(p._queueTotalSize===0)return;let Q=p._pendingPullIntos.peek();if(Na(p,Q))Vi(p),za(p._controlledReadableByteStream,Q)}}function Ua(p){let Q=p._controlledReadableByteStream._reader;while(Q._readRequests.length>0){if(p._queueTotalSize===0)return;let z=Q._readRequests.shift();ei(p,z)}}function hi(p,Q,z,V){let h=p._controlledReadableByteStream,A=Q.constructor,o=q(A),{byteOffset:d,byteLength:aa}=Q,la=z*o,fa;try{fa=zn(Q.buffer)}catch(Da){V._errorSteps(Da);return}let Ga={buffer:fa,bufferByteLength:fa.byteLength,byteOffset:d,byteLength:aa,bytesFilled:0,minimumFill:la,elementSize:o,viewConstructor:A,readerType:"byob"};if(p._pendingPullIntos.length>0){p._pendingPullIntos.push(Ga),nn(h,V);return}if(h._state==="closed"){let Da=new A(Ga.buffer,Ga.byteOffset,0);V._closeSteps(Da);return}if(p._queueTotalSize>0){if(Na(p,Ga)){let Da=Oa(Ga);On(p),V._chunkSteps(Da);return}if(p._closeRequested){let Da=new TypeError("Insufficient bytes to fill elements in the given buffer");ni(p,Da),V._errorSteps(Da);return}}p._pendingPullIntos.push(Ga),nn(h,V),Ya(p)}function Ai(p,Q){if(Q.readerType==="none")Vi(p);let z=p._controlledReadableByteStream;if(Pc(z))while(ov(z)>0){let V=Vi(p);za(z,V)}}function ti(p,Q,z){if(Ba(p,Q,z),z.readerType==="none"){Va(p,z),Pi(p);return}if(z.bytesFilled<z.minimumFill)return;Vi(p);let V=z.bytesFilled%z.elementSize;if(V>0){let h=z.byteOffset+z.bytesFilled;La(p,z.buffer,h-V,V)}z.bytesFilled-=V,za(p._controlledReadableByteStream,z),Pi(p)}function Nn(p,Q){let z=p._pendingPullIntos.peek();if(Wi(p),p._controlledReadableByteStream._state==="closed")Ai(p,z);else ti(p,Q,z);Ya(p)}function Vi(p){return p._pendingPullIntos.shift()}function sc(p){let Q=p._controlledReadableByteStream;if(Q._state!=="readable")return!1;if(p._closeRequested)return!1;if(!p._started)return!1;if(ai(Q)&&ri(Q)>0)return!0;if(Pc(Q)&&ov(Q)>0)return!0;if(jv(p)>0)return!0;return!1}function dn(p){p._pullAlgorithm=void 0,p._cancelAlgorithm=void 0}function An(p){let Q=p._controlledReadableByteStream;if(p._closeRequested||Q._state!=="readable")return;if(p._queueTotalSize>0){p._closeRequested=!0;return}if(p._pendingPullIntos.length>0){let z=p._pendingPullIntos.peek();if(z.bytesFilled%z.elementSize!==0){let V=new TypeError("Insufficient bytes to fill elements in the given buffer");throw ni(p,V),V}}dn(p),y1(Q)}function Xn(p,Q){let z=p._controlledReadableByteStream;if(p._closeRequested||z._state!=="readable")return;let{buffer:V,byteOffset:h,byteLength:A}=Q;if(Ln(V))throw new TypeError("chunk's buffer is detached and so cannot be enqueued");let o=zn(V);if(p._pendingPullIntos.length>0){let d=p._pendingPullIntos.peek();if(Ln(d.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");if(Wi(p),d.buffer=zn(d.buffer),d.readerType==="none")Va(p,d)}if(ai(z))if(Ua(p),ri(z)===0)ba(p,o,h,A);else{if(p._pendingPullIntos.length>0)Vi(p);let d=new Uint8Array(o,h,A);Yn(z,d,!1)}else if(Pc(z))ba(p,o,h,A),Pi(p);else ba(p,o,h,A);Ya(p)}function ni(p,Q){let z=p._controlledReadableByteStream;if(z._state!=="readable")return;Ia(p),H(p),dn(p),i9(z,Q)}function ei(p,Q){let z=p._queue.shift();p._queueTotalSize-=z.byteLength,On(p);let V=new Uint8Array(z.buffer,z.byteOffset,z.byteLength);Q._chunkSteps(V)}function qn(p){if(p._byobRequest===null&&p._pendingPullIntos.length>0){let Q=p._pendingPullIntos.peek(),z=new Uint8Array(Q.buffer,Q.byteOffset+Q.bytesFilled,Q.byteLength-Q.bytesFilled),V=Object.create(N.prototype);yc(V,p,z),p._byobRequest=V}return p._byobRequest}function jv(p){let Q=p._controlledReadableByteStream._state;if(Q==="errored")return null;if(Q==="closed")return 0;return p._strategyHWM-p._queueTotalSize}function an(p,Q){let z=p._pendingPullIntos.peek();if(p._controlledReadableByteStream._state==="closed"){if(Q!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(Q===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(z.bytesFilled+Q>z.byteLength)throw new RangeError("bytesWritten out of range")}z.buffer=zn(z.buffer),Nn(p,Q)}function Rv(p,Q){let z=p._pendingPullIntos.peek();if(p._controlledReadableByteStream._state==="closed"){if(Q.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(Q.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(z.byteOffset+z.bytesFilled!==Q.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(z.bufferByteLength!==Q.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(z.bytesFilled+Q.byteLength>z.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let h=Q.byteLength;z.buffer=zn(Q.buffer),Nn(p,h)}function Ql(p,Q,z,V,h,A,o){Q._controlledReadableByteStream=p,Q._pullAgain=!1,Q._pulling=!1,Q._byobRequest=null,Q._queue=Q._queueTotalSize=void 0,H(Q),Q._closeRequested=!1,Q._started=!1,Q._strategyHWM=A,Q._pullAlgorithm=V,Q._cancelAlgorithm=h,Q._autoAllocateChunkSize=o,Q._pendingPullIntos=new O,p._readableStreamController=Q;let d=z();Y(w(d),()=>{return Q._started=!0,Ya(Q),null},(aa)=>{return ni(Q,aa),null})}function Jl(p,Q,z){let V=Object.create(S.prototype),h,A,o;if(Q.start!==void 0)h=()=>Q.start(V);else h=()=>{return};if(Q.pull!==void 0)A=()=>Q.pull(V);else A=()=>w(void 0);if(Q.cancel!==void 0)o=(aa)=>Q.cancel(aa);else o=()=>w(void 0);let d=Q.autoAllocateChunkSize;if(d===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ql(p,V,h,A,o,z,d)}function yc(p,Q,z){p._associatedReadableByteStreamController=Q,p._view=z}function tn(p){return new TypeError(`ReadableStreamBYOBRequest.prototype.${p} can only be used on a ReadableStreamBYOBRequest`)}function Kc(p){return new TypeError(`ReadableByteStreamController.prototype.${p} can only be used on a ReadableByteStreamController`)}function rc(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.mode;return{mode:z===void 0?void 0:_p(z,`${Q} has member 'mode' that`)}}function _p(p,Q){if(p=`${p}`,p!=="byob")throw new TypeError(`${Q} '${p}' is not a valid enumeration value for ReadableStreamReaderMode`);return p}function Wl(p,Q){var z;ua(p,Q);let V=(z=p===null||p===void 0?void 0:p.min)!==null&&z!==void 0?z:1;return{min:ea(V,`${Q} has member 'min' that`)}}function Yl(p){return new Mi(p)}function nn(p,Q){p._reader._readIntoRequests.push(Q)}function Fc(p,Q,z){let h=p._reader._readIntoRequests.shift();if(z)h._closeSteps(Q);else h._chunkSteps(Q)}function ov(p){return p._reader._readIntoRequests.length}function Pc(p){let Q=p._reader;if(Q===void 0)return!1;if(!Vc(Q))return!1;return!0}class Mi{constructor(p){if(pi(p,1,"ReadableStreamBYOBReader"),Pa(p,"First parameter"),Hc(p))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!na(p._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");y(this,p),this._readIntoRequests=new O}get closed(){if(!Vc(this))return m(Ev("closed"));return this._closedPromise}cancel(p=void 0){if(!Vc(this))return m(Ev("cancel"));if(this._ownerReadableStream===void 0)return m(b("cancel"));return C(this,p)}read(p,Q={}){if(!Vc(this))return m(Ev("read"));if(!ArrayBuffer.isView(p))return m(new TypeError("view must be an array buffer view"));if(p.byteLength===0)return m(new TypeError("view must have non-zero byteLength"));if(p.buffer.byteLength===0)return m(new TypeError("view's buffer must have non-zero byteLength"));if(Ln(p.buffer))return m(new TypeError("view's buffer has been detached"));let z;try{z=Wl(Q,"options")}catch(aa){return m(aa)}let V=z.min;if(V===0)return m(new TypeError("options.min must be greater than 0"));if(!B(p)){if(V>p.length)return m(new RangeError("options.min must be less than or equal to view's length"))}else if(V>p.byteLength)return m(new RangeError("options.min must be less than or equal to view's byteLength"));if(this._ownerReadableStream===void 0)return m(b("read from"));let h,A,o=f((aa,la)=>{h=aa,A=la});return en(this,p,V,{_chunkSteps:(aa)=>h({value:aa,done:!1}),_closeSteps:(aa)=>h({value:aa,done:!0}),_errorSteps:(aa)=>A(aa)}),o}releaseLock(){if(!Vc(this))throw Ev("releaseLock");if(this._ownerReadableStream===void 0)return;dc(this)}}if(Object.defineProperties(Mi.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),c(Mi.prototype.cancel,"cancel"),c(Mi.prototype.read,"read"),c(Mi.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Mi.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Vc(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_readIntoRequests"))return!1;return p instanceof Mi}function en(p,Q,z,V){let h=p._ownerReadableStream;if(h._disturbed=!0,h._state==="errored")V._errorSteps(h._storedError);else hi(h._readableStreamController,Q,z,V)}function dc(p){R(p);let Q=new TypeError("Reader was released");I1(p,Q)}function I1(p,Q){let z=p._readIntoRequests;p._readIntoRequests=new O,z.forEach((V)=>{V._errorSteps(Q)})}function Ev(p){return new TypeError(`ReadableStreamBYOBReader.prototype.${p} can only be used on a ReadableStreamBYOBReader`)}function tc(p,Q){let{highWaterMark:z}=p;if(z===void 0)return Q;if(E1(z)||z<0)throw new RangeError("Invalid highWaterMark");return z}function bv(p){let{size:Q}=p;if(!Q)return()=>1;return Q}function S1(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.highWaterMark,V=p===null||p===void 0?void 0:p.size;return{highWaterMark:z===void 0?void 0:Za(z),size:V===void 0?void 0:h2(V,`${Q} has member 'size' that`)}}function h2(p,Q){return $a(p,Q),(z)=>Za(p(z))}function L2(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.abort,V=p===null||p===void 0?void 0:p.close,h=p===null||p===void 0?void 0:p.start,A=p===null||p===void 0?void 0:p.type,o=p===null||p===void 0?void 0:p.write;return{abort:z===void 0?void 0:D2(z,p,`${Q} has member 'abort' that`),close:V===void 0?void 0:O2(V,p,`${Q} has member 'close' that`),start:h===void 0?void 0:N2(h,p,`${Q} has member 'start' that`),write:o===void 0?void 0:A2(o,p,`${Q} has member 'write' that`),type:A}}function D2(p,Q,z){return $a(p,z),(V)=>$(p,Q,[V])}function O2(p,Q,z){return $a(p,z),()=>$(p,Q,[])}function N2(p,Q,z){return $a(p,z),(V)=>L(p,Q,[V])}function A2(p,Q,z){return $a(p,z),(V,h)=>$(p,Q,[V,h])}function q2(p,Q){if(!_v(p))throw new TypeError(`${Q} is not a WritableStream.`)}function gY(p){if(typeof p!=="object"||p===null)return!1;try{return typeof p.aborted==="boolean"}catch(Q){return!1}}let IY=typeof AbortController==="function";function SY(){if(IY)return new AbortController;return}class ac{constructor(p={},Q={}){if(p===void 0)p=null;else li(p,"First parameter");let z=S1(Q,"Second parameter"),V=L2(p,"First parameter");if(R2(this),V.type!==void 0)throw new RangeError("Invalid type is specified");let A=bv(z),o=tc(z,1);vz(this,V,o,A)}get locked(){if(!_v(this))throw Fl("locked");return Zv(this)}abort(p=void 0){if(!_v(this))return m(Fl("abort"));if(Zv(this))return m(new TypeError("Cannot abort a stream that already has a writer"));return zl(this,p)}close(){if(!_v(this))return m(Fl("close"));if(Zv(this))return m(new TypeError("Cannot close a stream that already has a writer"));if(jn(this))return m(new TypeError("Cannot close an already-closing stream"));return o2(this)}getWriter(){if(!_v(this))throw Fl("getWriter");return j2(this)}}if(Object.defineProperties(ac.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),c(ac.prototype.abort,"abort"),c(ac.prototype.close,"close"),c(ac.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(ac.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function j2(p){return new Rn(p)}function TY(p,Q,z,V,h=1,A=()=>1){let o=Object.create(ac.prototype);R2(o);let d=Object.create(av.prototype);return I2(o,d,p,Q,z,V,h,A),o}function R2(p){p._state="writable",p._storedError=void 0,p._writer=void 0,p._writableStreamController=void 0,p._writeRequests=new O,p._inFlightWriteRequest=void 0,p._closeRequest=void 0,p._inFlightCloseRequest=void 0,p._pendingAbortRequest=void 0,p._backpressure=!1}function _v(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_writableStreamController"))return!1;return p instanceof ac}function Zv(p){if(p._writer===void 0)return!1;return!0}function zl(p,Q){var z;if(p._state==="closed"||p._state==="errored")return w(void 0);p._writableStreamController._abortReason=Q,(z=p._writableStreamController._abortController)===null||z===void 0||z.abort(Q);let V=p._state;if(V==="closed"||V==="errored")return w(void 0);if(p._pendingAbortRequest!==void 0)return p._pendingAbortRequest._promise;let h=!1;if(V==="erroring")h=!0,Q=void 0;let A=f((o,d)=>{p._pendingAbortRequest={_promise:void 0,_resolve:o,_reject:d,_reason:Q,_wasAlreadyErroring:h}});if(p._pendingAbortRequest._promise=A,!h)gp(p,Q);return A}function o2(p){let Q=p._state;if(Q==="closed"||Q==="errored")return m(new TypeError(`The stream (in ${Q} state) is not in the writable state and cannot be closed`));let z=f((h,A)=>{let o={_resolve:h,_reject:A};p._closeRequest=o}),V=p._writer;if(V!==void 0&&p._backpressure&&Q==="writable")rp(V);return lz(p._writableStreamController),z}function kY(p){return f((z,V)=>{let h={_resolve:z,_reject:V};p._writeRequests.push(h)})}function Zp(p,Q){if(p._state==="writable"){gp(p,Q);return}Ip(p)}function gp(p,Q){let z=p._writableStreamController;p._state="erroring",p._storedError=Q;let V=p._writer;if(V!==void 0)b2(V,Q);if(!dY(p)&&z._started)Ip(p)}function Ip(p){p._state="errored",p._writableStreamController[I]();let Q=p._storedError;if(p._writeRequests.forEach((h)=>{h._reject(Q)}),p._writeRequests=new O,p._pendingAbortRequest===void 0){Xl(p);return}let z=p._pendingAbortRequest;if(p._pendingAbortRequest=void 0,z._wasAlreadyErroring){z._reject(Q),Xl(p);return}let V=p._writableStreamController[j](z._reason);Y(V,()=>{return z._resolve(),Xl(p),null},(h)=>{return z._reject(h),Xl(p),null})}function CY(p){p._inFlightWriteRequest._resolve(void 0),p._inFlightWriteRequest=void 0}function sY(p,Q){p._inFlightWriteRequest._reject(Q),p._inFlightWriteRequest=void 0,Zp(p,Q)}function yY(p){if(p._inFlightCloseRequest._resolve(void 0),p._inFlightCloseRequest=void 0,p._state==="erroring"){if(p._storedError=void 0,p._pendingAbortRequest!==void 0)p._pendingAbortRequest._resolve(),p._pendingAbortRequest=void 0}p._state="closed";let z=p._writer;if(z!==void 0)C2(z)}function rY(p,Q){if(p._inFlightCloseRequest._reject(Q),p._inFlightCloseRequest=void 0,p._pendingAbortRequest!==void 0)p._pendingAbortRequest._reject(Q),p._pendingAbortRequest=void 0;Zp(p,Q)}function jn(p){if(p._closeRequest===void 0&&p._inFlightCloseRequest===void 0)return!1;return!0}function dY(p){if(p._inFlightWriteRequest===void 0&&p._inFlightCloseRequest===void 0)return!1;return!0}function tY(p){p._inFlightCloseRequest=p._closeRequest,p._closeRequest=void 0}function eY(p){p._inFlightWriteRequest=p._writeRequests.shift()}function Xl(p){if(p._closeRequest!==void 0)p._closeRequest._reject(p._storedError),p._closeRequest=void 0;let Q=p._writer;if(Q!==void 0)sp(Q,p._storedError)}function Sp(p,Q){let z=p._writer;if(z!==void 0&&Q!==p._backpressure)if(Q)Qz(z);else rp(z);p._backpressure=Q}class Rn{constructor(p){if(pi(p,1,"WritableStreamDefaultWriter"),q2(p,"First parameter"),Zv(p))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=p,p._writer=this;let Q=p._state;if(Q==="writable"){if(!jn(p)&&p._backpressure)Vl(this);else s2(this);Pl(this)}else if(Q==="erroring")yp(this,p._storedError),Pl(this);else if(Q==="closed")s2(this),wz(this);else{let z=p._storedError;yp(this,z),k2(this,z)}}get closed(){if(!ec(this))return m(iv("closed"));return this._closedPromise}get desiredSize(){if(!ec(this))throw iv("desiredSize");if(this._ownerWritableStream===void 0)throw k1("desiredSize");return cz(this)}get ready(){if(!ec(this))return m(iv("ready"));return this._readyPromise}abort(p=void 0){if(!ec(this))return m(iv("abort"));if(this._ownerWritableStream===void 0)return m(k1("abort"));return az(this,p)}close(){if(!ec(this))return m(iv("close"));let p=this._ownerWritableStream;if(p===void 0)return m(k1("close"));if(jn(p))return m(new TypeError("Cannot close an already-closing stream"));return E2(this)}releaseLock(){if(!ec(this))throw iv("releaseLock");if(this._ownerWritableStream===void 0)return;_2(this)}write(p=void 0){if(!ec(this))return m(iv("write"));if(this._ownerWritableStream===void 0)return m(k1("write to"));return Z2(this,p)}}if(Object.defineProperties(Rn.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),c(Rn.prototype.abort,"abort"),c(Rn.prototype.close,"close"),c(Rn.prototype.releaseLock,"releaseLock"),c(Rn.prototype.write,"write"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Rn.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function ec(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_ownerWritableStream"))return!1;return p instanceof Rn}function az(p,Q){let z=p._ownerWritableStream;return zl(z,Q)}function E2(p){let Q=p._ownerWritableStream;return o2(Q)}function iz(p){let Q=p._ownerWritableStream,z=Q._state;if(jn(Q)||z==="closed")return w(void 0);if(z==="errored")return m(Q._storedError);return E2(p)}function nz(p,Q){if(p._closedPromiseState==="pending")sp(p,Q);else mz(p,Q)}function b2(p,Q){if(p._readyPromiseState==="pending")y2(p,Q);else Jz(p,Q)}function cz(p){let Q=p._ownerWritableStream,z=Q._state;if(z==="errored"||z==="erroring")return null;if(z==="closed")return 0;return S2(Q._writableStreamController)}function _2(p){let Q=p._ownerWritableStream,z=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");b2(p,z),nz(p,z),Q._writer=void 0,p._ownerWritableStream=void 0}function Z2(p,Q){let z=p._ownerWritableStream,V=z._writableStreamController,h=pz(V,Q);if(z!==p._ownerWritableStream)return m(k1("write to"));let A=z._state;if(A==="errored")return m(z._storedError);if(jn(z)||A==="closed")return m(new TypeError("The stream is closing or closed and cannot be written to"));if(A==="erroring")return m(z._storedError);let o=kY(z);return xz(V,Q,h),o}let g2={};class av{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Tp(this))throw Cp("abortReason");return this._abortReason}get signal(){if(!Tp(this))throw Cp("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(p=void 0){if(!Tp(this))throw Cp("error");if(this._controlledWritableStream._state!=="writable")return;T2(this,p)}[j](p){let Q=this._abortAlgorithm(p);return Gl(this),Q}[I](){H(this)}}if(Object.defineProperties(av.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(av.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Tp(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_controlledWritableStream"))return!1;return p instanceof av}function I2(p,Q,z,V,h,A,o,d){Q._controlledWritableStream=p,p._writableStreamController=Q,Q._queue=void 0,Q._queueTotalSize=void 0,H(Q),Q._abortReason=void 0,Q._abortController=SY(),Q._started=!1,Q._strategySizeAlgorithm=d,Q._strategyHWM=o,Q._writeAlgorithm=V,Q._closeAlgorithm=h,Q._abortAlgorithm=A;let aa=kp(Q);Sp(p,aa);let la=z(),fa=w(la);Y(fa,()=>{return Q._started=!0,Kl(Q),null},(Ga)=>{return Q._started=!0,Zp(p,Ga),null})}function vz(p,Q,z,V){let h=Object.create(av.prototype),A,o,d,aa;if(Q.start!==void 0)A=()=>Q.start(h);else A=()=>{return};if(Q.write!==void 0)o=(la)=>Q.write(la,h);else o=()=>w(void 0);if(Q.close!==void 0)d=()=>Q.close();else d=()=>w(void 0);if(Q.abort!==void 0)aa=(la)=>Q.abort(la);else aa=()=>w(void 0);I2(p,h,A,o,d,aa,z,V)}function Gl(p){p._writeAlgorithm=void 0,p._closeAlgorithm=void 0,p._abortAlgorithm=void 0,p._strategySizeAlgorithm=void 0}function lz(p){g1(p,g2,0),Kl(p)}function pz(p,Q){try{return p._strategySizeAlgorithm(Q)}catch(z){return T1(p,z),1}}function S2(p){return p._strategyHWM-p._queueTotalSize}function xz(p,Q,z){try{g1(p,Q,z)}catch(h){T1(p,h);return}let V=p._controlledWritableStream;if(!jn(V)&&V._state==="writable"){let h=kp(p);Sp(V,h)}Kl(p)}function Kl(p){let Q=p._controlledWritableStream;if(!p._started)return;if(Q._inFlightWriteRequest!==void 0)return;if(Q._state==="erroring"){Ip(Q);return}if(p._queue.length===0)return;let V=ml(p);if(V===g2)uz(p);else fz(p,V)}function T1(p,Q){if(p._controlledWritableStream._state==="writable")T2(p,Q)}function uz(p){let Q=p._controlledWritableStream;tY(Q),qv(p);let z=p._closeAlgorithm();Gl(p),Y(z,()=>{return yY(Q),null},(V)=>{return rY(Q,V),null})}function fz(p,Q){let z=p._controlledWritableStream;eY(z);let V=p._writeAlgorithm(Q);Y(V,()=>{CY(z);let h=z._state;if(qv(p),!jn(z)&&h==="writable"){let A=kp(p);Sp(z,A)}return Kl(p),null},(h)=>{if(z._state==="writable")Gl(p);return sY(z,h),null})}function kp(p){return S2(p)<=0}function T2(p,Q){let z=p._controlledWritableStream;Gl(p),gp(z,Q)}function Fl(p){return new TypeError(`WritableStream.prototype.${p} can only be used on a WritableStream`)}function Cp(p){return new TypeError(`WritableStreamDefaultController.prototype.${p} can only be used on a WritableStreamDefaultController`)}function iv(p){return new TypeError(`WritableStreamDefaultWriter.prototype.${p} can only be used on a WritableStreamDefaultWriter`)}function k1(p){return new TypeError("Cannot "+p+" a stream using a released writer")}function Pl(p){p._closedPromise=f((Q,z)=>{p._closedPromise_resolve=Q,p._closedPromise_reject=z,p._closedPromiseState="pending"})}function k2(p,Q){Pl(p),sp(p,Q)}function wz(p){Pl(p),C2(p)}function sp(p,Q){if(p._closedPromise_reject===void 0)return;K(p._closedPromise),p._closedPromise_reject(Q),p._closedPromise_resolve=void 0,p._closedPromise_reject=void 0,p._closedPromiseState="rejected"}function mz(p,Q){k2(p,Q)}function C2(p){if(p._closedPromise_resolve===void 0)return;p._closedPromise_resolve(void 0),p._closedPromise_resolve=void 0,p._closedPromise_reject=void 0,p._closedPromiseState="resolved"}function Vl(p){p._readyPromise=f((Q,z)=>{p._readyPromise_resolve=Q,p._readyPromise_reject=z}),p._readyPromiseState="pending"}function yp(p,Q){Vl(p),y2(p,Q)}function s2(p){Vl(p),rp(p)}function y2(p,Q){if(p._readyPromise_reject===void 0)return;K(p._readyPromise),p._readyPromise_reject(Q),p._readyPromise_resolve=void 0,p._readyPromise_reject=void 0,p._readyPromiseState="rejected"}function Qz(p){Vl(p)}function Jz(p,Q){yp(p,Q)}function rp(p){if(p._readyPromise_resolve===void 0)return;p._readyPromise_resolve(void 0),p._readyPromise_resolve=void 0,p._readyPromise_reject=void 0,p._readyPromiseState="fulfilled"}function Wz(){if(typeof globalThis!=="undefined")return globalThis;else if(typeof self!=="undefined")return self;else if(typeof global!=="undefined")return global;return}let dp=Wz();function Yz(p){if(!(typeof p==="function"||typeof p==="object"))return!1;if(p.name!=="DOMException")return!1;try{return new p,!0}catch(Q){return!1}}function zz(){let p=dp===null||dp===void 0?void 0:dp.DOMException;return Yz(p)?p:void 0}function Xz(){let p=function Q(z,V){if(this.message=z||"",this.name=V||"Error",Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)};return c(p,"DOMException"),p.prototype=Object.create(Error.prototype),Object.defineProperty(p.prototype,"constructor",{value:p,writable:!0,configurable:!0}),p}let Gz=zz()||Xz();function r2(p,Q,z,V,h,A){let o=Bi(p),d=j2(Q);p._disturbed=!0;let aa=!1,la=w(void 0);return f((fa,Ga)=>{let Da;if(A!==void 0){if(Da=()=>{let ia=A.reason!==void 0?A.reason:new Gz("Aborted","AbortError"),Fa=[];if(!V)Fa.push(()=>{if(Q._state==="writable")return zl(Q,ia);return w(void 0)});if(!h)Fa.push(()=>{if(p._state==="readable")return Kn(p,ia);return w(void 0)});qi(()=>Promise.all(Fa.map((Aa)=>Aa())),!0,ia)},A.aborted){Da();return}A.addEventListener("abort",Da)}function nc(){return f((ia,Fa)=>{function Aa(_i){if(_i)ia();else W(Tv(),Aa,Fa)}Aa(!1)})}function Tv(){if(aa)return w(!0);return W(d._readyPromise,()=>{return f((ia,Fa)=>{ya(o,{_chunkSteps:(Aa)=>{la=W(Z2(d,Aa),void 0,a),ia(!1)},_closeSteps:()=>ia(!0),_errorSteps:Fa})})})}if(cc(p,o._closedPromise,(ia)=>{if(!V)qi(()=>zl(Q,ia),!0,ia);else cn(!0,ia);return null}),cc(Q,d._closedPromise,(ia)=>{if(!h)qi(()=>Kn(p,ia),!0,ia);else cn(!0,ia);return null}),Li(p,o._closedPromise,()=>{if(!z)qi(()=>iz(d));else cn();return null}),jn(Q)||Q._state==="closed"){let ia=new TypeError("the destination writable stream closed before all data could be piped to it");if(!h)qi(()=>Kn(p,ia),!0,ia);else cn(!0,ia)}K(nc());function $c(){let ia=la;return W(la,()=>ia!==la?$c():void 0)}function cc(ia,Fa,Aa){if(ia._state==="errored")Aa(ia._storedError);else X(Fa,Aa)}function Li(ia,Fa,Aa){if(ia._state==="closed")Aa();else J(Fa,Aa)}function qi(ia,Fa,Aa){if(aa)return;if(aa=!0,Q._state==="writable"&&!jn(Q))J($c(),_i);else _i();function _i(){return Y(ia(),()=>vc(Fa,Aa),(kv)=>vc(!0,kv)),null}}function cn(ia,Fa){if(aa)return;if(aa=!0,Q._state==="writable"&&!jn(Q))J($c(),()=>vc(ia,Fa));else vc(ia,Fa)}function vc(ia,Fa){if(_2(d),R(o),A!==void 0)A.removeEventListener("abort",Da);if(ia)Ga(Fa);else fa(void 0);return null}})}class on{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Ml(this))throw $l("desiredSize");return tp(this)}close(){if(!Ml(this))throw $l("close");if(!Iv(this))throw new TypeError("The stream is not in a state that permits close");nv(this)}enqueue(p=void 0){if(!Ml(this))throw $l("enqueue");if(!Iv(this))throw new TypeError("The stream is not in a state that permits enqueue");return gv(this,p)}error(p=void 0){if(!Ml(this))throw $l("error");Gn(this,p)}[g](p){H(this);let Q=this._cancelAlgorithm(p);return Hl(this),Q}[E](p){let Q=this._controlledReadableStream;if(this._queue.length>0){let z=qv(this);if(this._closeRequested&&this._queue.length===0)Hl(this),y1(Q);else C1(this);p._chunkSteps(z)}else yi(Q,p),C1(this)}[k](){}}if(Object.defineProperties(on.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),c(on.prototype.close,"close"),c(on.prototype.enqueue,"enqueue"),c(on.prototype.error,"error"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(on.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function Ml(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_controlledReadableStream"))return!1;return p instanceof on}function C1(p){if(!d2(p))return;if(p._pulling){p._pullAgain=!0;return}p._pulling=!0;let z=p._pullAlgorithm();Y(z,()=>{if(p._pulling=!1,p._pullAgain)p._pullAgain=!1,C1(p);return null},(V)=>{return Gn(p,V),null})}function d2(p){let Q=p._controlledReadableStream;if(!Iv(p))return!1;if(!p._started)return!1;if(Hc(Q)&&ri(Q)>0)return!0;if(tp(p)>0)return!0;return!1}function Hl(p){p._pullAlgorithm=void 0,p._cancelAlgorithm=void 0,p._strategySizeAlgorithm=void 0}function nv(p){if(!Iv(p))return;let Q=p._controlledReadableStream;if(p._closeRequested=!0,p._queue.length===0)Hl(p),y1(Q)}function gv(p,Q){if(!Iv(p))return;let z=p._controlledReadableStream;if(Hc(z)&&ri(z)>0)Yn(z,Q,!1);else{let V;try{V=p._strategySizeAlgorithm(Q)}catch(h){throw Gn(p,h),h}try{g1(p,Q,V)}catch(h){throw Gn(p,h),h}}C1(p)}function Gn(p,Q){let z=p._controlledReadableStream;if(z._state!=="readable")return;H(p),Hl(p),i9(z,Q)}function tp(p){let Q=p._controlledReadableStream._state;if(Q==="errored")return null;if(Q==="closed")return 0;return p._strategyHWM-p._queueTotalSize}function Kz(p){if(d2(p))return!1;return!0}function Iv(p){let Q=p._controlledReadableStream._state;if(!p._closeRequested&&Q==="readable")return!0;return!1}function t2(p,Q,z,V,h,A,o){Q._controlledReadableStream=p,Q._queue=void 0,Q._queueTotalSize=void 0,H(Q),Q._started=!1,Q._closeRequested=!1,Q._pullAgain=!1,Q._pulling=!1,Q._strategySizeAlgorithm=o,Q._strategyHWM=A,Q._pullAlgorithm=V,Q._cancelAlgorithm=h,p._readableStreamController=Q;let d=z();Y(w(d),()=>{return Q._started=!0,C1(Q),null},(aa)=>{return Gn(Q,aa),null})}function Fz(p,Q,z,V){let h=Object.create(on.prototype),A,o,d;if(Q.start!==void 0)A=()=>Q.start(h);else A=()=>{return};if(Q.pull!==void 0)o=()=>Q.pull(h);else o=()=>w(void 0);if(Q.cancel!==void 0)d=(aa)=>Q.cancel(aa);else d=()=>w(void 0);t2(p,h,A,o,d,z,V)}function $l(p){return new TypeError(`ReadableStreamDefaultController.prototype.${p} can only be used on a ReadableStreamDefaultController`)}function Pz(p,Q){if(na(p._readableStreamController))return Mz(p);return Vz(p)}function Vz(p,Q){let z=Bi(p),V=!1,h=!1,A=!1,o=!1,d,aa,la,fa,Ga,Da=f((Li)=>{Ga=Li});function nc(){if(V)return h=!0,w(void 0);return V=!0,ya(z,{_chunkSteps:(qi)=>{M(()=>{h=!1;let cn=qi,vc=qi;if(!A)gv(la._readableStreamController,cn);if(!o)gv(fa._readableStreamController,vc);if(V=!1,h)nc()})},_closeSteps:()=>{if(V=!1,!A)nv(la._readableStreamController);if(!o)nv(fa._readableStreamController);if(!A||!o)Ga(void 0)},_errorSteps:()=>{V=!1}}),w(void 0)}function Tv(Li){if(A=!0,d=Li,o){let qi=Fi([d,aa]),cn=Kn(p,qi);Ga(cn)}return Da}function $c(Li){if(o=!0,aa=Li,A){let qi=Fi([d,aa]),cn=Kn(p,qi);Ga(cn)}return Da}function cc(){}return la=s1(cc,nc,Tv),fa=s1(cc,nc,$c),X(z._closedPromise,(Li)=>{if(Gn(la._readableStreamController,Li),Gn(fa._readableStreamController,Li),!A||!o)Ga(void 0);return null}),[la,fa]}function Mz(p){let Q=Bi(p),z=!1,V=!1,h=!1,A=!1,o=!1,d,aa,la,fa,Ga,Da=f((ia)=>{Ga=ia});function nc(ia){X(ia._closedPromise,(Fa)=>{if(ia!==Q)return null;if(ni(la._readableStreamController,Fa),ni(fa._readableStreamController,Fa),!A||!o)Ga(void 0);return null})}function Tv(){if(Vc(Q))R(Q),Q=Bi(p),nc(Q);ya(Q,{_chunkSteps:(Fa)=>{M(()=>{V=!1,h=!1;let Aa=Fa,_i=Fa;if(!A&&!o)try{_i=wl(Fa)}catch(kv){ni(la._readableStreamController,kv),ni(fa._readableStreamController,kv),Ga(Kn(p,kv));return}if(!A)Xn(la._readableStreamController,Aa);if(!o)Xn(fa._readableStreamController,_i);if(z=!1,V)cc();else if(h)Li()})},_closeSteps:()=>{if(z=!1,!A)An(la._readableStreamController);if(!o)An(fa._readableStreamController);if(la._readableStreamController._pendingPullIntos.length>0)an(la._readableStreamController,0);if(fa._readableStreamController._pendingPullIntos.length>0)an(fa._readableStreamController,0);if(!A||!o)Ga(void 0)},_errorSteps:()=>{z=!1}})}function $c(ia,Fa){if(ga(Q))R(Q),Q=Yl(p),nc(Q);let Aa=Fa?fa:la,_i=Fa?la:fa;en(Q,ia,1,{_chunkSteps:(Cv)=>{M(()=>{V=!1,h=!1;let sv=Fa?o:A;if(!(Fa?A:o)){let W9;try{W9=wl(Cv)}catch(c8){ni(Aa._readableStreamController,c8),ni(_i._readableStreamController,c8),Ga(Kn(p,c8));return}if(!sv)Rv(Aa._readableStreamController,Cv);Xn(_i._readableStreamController,W9)}else if(!sv)Rv(Aa._readableStreamController,Cv);if(z=!1,V)cc();else if(h)Li()})},_closeSteps:(Cv)=>{z=!1;let sv=Fa?o:A,Dl=Fa?A:o;if(!sv)An(Aa._readableStreamController);if(!Dl)An(_i._readableStreamController);if(Cv!==void 0){if(!sv)Rv(Aa._readableStreamController,Cv);if(!Dl&&_i._readableStreamController._pendingPullIntos.length>0)an(_i._readableStreamController,0)}if(!sv||!Dl)Ga(void 0)},_errorSteps:()=>{z=!1}})}function cc(){if(z)return V=!0,w(void 0);z=!0;let ia=qn(la._readableStreamController);if(ia===null)Tv();else $c(ia._view,!1);return w(void 0)}function Li(){if(z)return h=!0,w(void 0);z=!0;let ia=qn(fa._readableStreamController);if(ia===null)Tv();else $c(ia._view,!0);return w(void 0)}function qi(ia){if(A=!0,d=ia,o){let Fa=Fi([d,aa]),Aa=Kn(p,Fa);Ga(Aa)}return Da}function cn(ia){if(o=!0,aa=ia,A){let Fa=Fi([d,aa]),Aa=Kn(p,Fa);Ga(Aa)}return Da}function vc(){return}return la=a9(vc,cc,qi),fa=a9(vc,Li,cn),nc(Q),[la,fa]}function Hz(p){return n(p)&&typeof p.getReader!=="undefined"}function $z(p){if(Hz(p))return Uz(p.getReader());return Bz(p)}function Bz(p){let Q,z=xl(p,"async"),V=a;function h(){let o;try{o=ul(z)}catch(aa){return m(aa)}let d=w(o);return F(d,(aa)=>{if(!n(aa))throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(bp(aa))nv(Q._readableStreamController);else{let fa=Z1(aa);gv(Q._readableStreamController,fa)}})}function A(o){let d=z.iterator,aa;try{aa=Av(d,"return")}catch(Ga){return m(Ga)}if(aa===void 0)return w(void 0);let la;try{la=L(aa,d,[o])}catch(Ga){return m(Ga)}let fa=w(la);return F(fa,(Ga)=>{if(!n(Ga))throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object");return})}return Q=s1(V,h,A,0),Q}function Uz(p){let Q,z=a;function V(){let A;try{A=p.read()}catch(o){return m(o)}return F(A,(o)=>{if(!n(o))throw new TypeError("The promise returned by the reader.read() method must fulfill with an object");if(o.done)nv(Q._readableStreamController);else{let d=o.value;gv(Q._readableStreamController,d)}})}function h(A){try{return w(p.cancel(A))}catch(o){return m(o)}}return Q=s1(z,V,h,0),Q}function hz(p,Q){ua(p,Q);let z=p,V=z===null||z===void 0?void 0:z.autoAllocateChunkSize,h=z===null||z===void 0?void 0:z.cancel,A=z===null||z===void 0?void 0:z.pull,o=z===null||z===void 0?void 0:z.start,d=z===null||z===void 0?void 0:z.type;return{autoAllocateChunkSize:V===void 0?void 0:ea(V,`${Q} has member 'autoAllocateChunkSize' that`),cancel:h===void 0?void 0:Lz(h,z,`${Q} has member 'cancel' that`),pull:A===void 0?void 0:Dz(A,z,`${Q} has member 'pull' that`),start:o===void 0?void 0:Oz(o,z,`${Q} has member 'start' that`),type:d===void 0?void 0:Nz(d,`${Q} has member 'type' that`)}}function Lz(p,Q,z){return $a(p,z),(V)=>$(p,Q,[V])}function Dz(p,Q,z){return $a(p,z),(V)=>$(p,Q,[V])}function Oz(p,Q,z){return $a(p,z),(V)=>L(p,Q,[V])}function Nz(p,Q){if(p=`${p}`,p!=="bytes")throw new TypeError(`${Q} '${p}' is not a valid enumeration value for ReadableStreamType`);return p}function Az(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.preventCancel;return{preventCancel:Boolean(z)}}function e2(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.preventAbort,V=p===null||p===void 0?void 0:p.preventCancel,h=p===null||p===void 0?void 0:p.preventClose,A=p===null||p===void 0?void 0:p.signal;if(A!==void 0)qz(A,`${Q} has member 'signal' that`);return{preventAbort:Boolean(z),preventCancel:Boolean(V),preventClose:Boolean(h),signal:A}}function qz(p,Q){if(!gY(p))throw new TypeError(`${Q} is not an AbortSignal.`)}function jz(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.readable;bi(z,"readable","ReadableWritablePair"),Pa(z,`${Q} has member 'readable' that`);let V=p===null||p===void 0?void 0:p.writable;return bi(V,"writable","ReadableWritablePair"),q2(V,`${Q} has member 'writable' that`),{readable:z,writable:V}}class Yi{constructor(p={},Q={}){if(p===void 0)p=null;else li(p,"First parameter");let z=S1(Q,"Second parameter"),V=hz(p,"First parameter");if(ep(this),V.type==="bytes"){if(z.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let h=tc(z,0);Jl(this,V,h)}else{let h=bv(z),A=tc(z,1);Fz(this,V,A,h)}}get locked(){if(!Mc(this))throw cv("locked");return Hc(this)}cancel(p=void 0){if(!Mc(this))return m(cv("cancel"));if(Hc(this))return m(new TypeError("Cannot cancel a stream that already has a reader"));return Kn(this,p)}getReader(p=void 0){if(!Mc(this))throw cv("getReader");if(rc(p,"First parameter").mode===void 0)return Bi(this);return Yl(this)}pipeThrough(p,Q={}){if(!Mc(this))throw cv("pipeThrough");pi(p,1,"pipeThrough");let z=jz(p,"First parameter"),V=e2(Q,"Second parameter");if(Hc(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Zv(z.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let h=r2(this,z.writable,V.preventClose,V.preventAbort,V.preventCancel,V.signal);return K(h),z.readable}pipeTo(p,Q={}){if(!Mc(this))return m(cv("pipeTo"));if(p===void 0)return m("Parameter 1 is required in 'pipeTo'.");if(!_v(p))return m(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let z;try{z=e2(Q,"Second parameter")}catch(V){return m(V)}if(Hc(this))return m(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));if(Zv(p))return m(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));return r2(this,p,z.preventClose,z.preventAbort,z.preventCancel,z.signal)}tee(){if(!Mc(this))throw cv("tee");let p=Pz(this);return Fi(p)}values(p=void 0){if(!Mc(this))throw cv("values");let Q=Az(p,"First parameter");return vl(this,Q.preventCancel)}[Dn](p){return this.values(p)}static from(p){return $z(p)}}if(Object.defineProperties(Yi,{from:{enumerable:!0}}),Object.defineProperties(Yi.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),c(Yi.from,"from"),c(Yi.prototype.cancel,"cancel"),c(Yi.prototype.getReader,"getReader"),c(Yi.prototype.pipeThrough,"pipeThrough"),c(Yi.prototype.pipeTo,"pipeTo"),c(Yi.prototype.tee,"tee"),c(Yi.prototype.values,"values"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Yi.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0});Object.defineProperty(Yi.prototype,Dn,{value:Yi.prototype.values,writable:!0,configurable:!0});function s1(p,Q,z,V=1,h=()=>1){let A=Object.create(Yi.prototype);ep(A);let o=Object.create(on.prototype);return t2(A,o,p,Q,z,V,h),A}function a9(p,Q,z){let V=Object.create(Yi.prototype);ep(V);let h=Object.create(S.prototype);return Ql(V,h,p,Q,z,0,void 0),V}function ep(p){p._state="readable",p._reader=void 0,p._storedError=void 0,p._disturbed=!1}function Mc(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_readableStreamController"))return!1;return p instanceof Yi}function Hc(p){if(p._reader===void 0)return!1;return!0}function Kn(p,Q){if(p._disturbed=!0,p._state==="closed")return w(void 0);if(p._state==="errored")return m(p._storedError);y1(p);let z=p._reader;if(z!==void 0&&Vc(z)){let h=z._readIntoRequests;z._readIntoRequests=new O,h.forEach((A)=>{A._closeSteps(void 0)})}let V=p._readableStreamController[g](Q);return F(V,a)}function y1(p){p._state="closed";let Q=p._reader;if(Q===void 0)return;if(e(Q),ga(Q)){let z=Q._readRequests;Q._readRequests=new O,z.forEach((V)=>{V._closeSteps()})}}function i9(p,Q){p._state="errored",p._storedError=Q;let z=p._reader;if(z===void 0)return;if(Ja(z,Q),ga(z))Ki(z,Q);else I1(z,Q)}function cv(p){return new TypeError(`ReadableStream.prototype.${p} can only be used on a ReadableStream`)}function n9(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.highWaterMark;return bi(z,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Za(z)}}let c9=(p)=>{return p.byteLength};c(c9,"size");class r1{constructor(p){pi(p,1,"ByteLengthQueuingStrategy"),p=n9(p,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=p.highWaterMark}get highWaterMark(){if(!l9(this))throw v9("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!l9(this))throw v9("size");return c9}}if(Object.defineProperties(r1.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(r1.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function v9(p){return new TypeError(`ByteLengthQueuingStrategy.prototype.${p} can only be used on a ByteLengthQueuingStrategy`)}function l9(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_byteLengthQueuingStrategyHighWaterMark"))return!1;return p instanceof r1}let p9=()=>{return 1};c(p9,"size");class d1{constructor(p){pi(p,1,"CountQueuingStrategy"),p=n9(p,"First parameter"),this._countQueuingStrategyHighWaterMark=p.highWaterMark}get highWaterMark(){if(!u9(this))throw x9("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!u9(this))throw x9("size");return p9}}if(Object.defineProperties(d1.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(d1.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function x9(p){return new TypeError(`CountQueuingStrategy.prototype.${p} can only be used on a CountQueuingStrategy`)}function u9(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_countQueuingStrategyHighWaterMark"))return!1;return p instanceof d1}function Rz(p,Q){ua(p,Q);let z=p===null||p===void 0?void 0:p.cancel,V=p===null||p===void 0?void 0:p.flush,h=p===null||p===void 0?void 0:p.readableType,A=p===null||p===void 0?void 0:p.start,o=p===null||p===void 0?void 0:p.transform,d=p===null||p===void 0?void 0:p.writableType;return{cancel:z===void 0?void 0:_z(z,p,`${Q} has member 'cancel' that`),flush:V===void 0?void 0:oz(V,p,`${Q} has member 'flush' that`),readableType:h,start:A===void 0?void 0:Ez(A,p,`${Q} has member 'start' that`),transform:o===void 0?void 0:bz(o,p,`${Q} has member 'transform' that`),writableType:d}}function oz(p,Q,z){return $a(p,z),(V)=>$(p,Q,[V])}function Ez(p,Q,z){return $a(p,z),(V)=>L(p,Q,[V])}function bz(p,Q,z){return $a(p,z),(V,h)=>$(p,Q,[V,h])}function _z(p,Q,z){return $a(p,z),(V)=>$(p,Q,[V])}class t1{constructor(p={},Q={},z={}){if(p===void 0)p=null;let V=S1(Q,"Second parameter"),h=S1(z,"Third parameter"),A=Rz(p,"First parameter");if(A.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(A.writableType!==void 0)throw new RangeError("Invalid writableType specified");let o=tc(h,0),d=bv(h),aa=tc(V,1),la=bv(V),fa,Ga=f((Da)=>{fa=Da});if(Zz(this,Ga,aa,la,o,d),Iz(this,A),A.start!==void 0)fa(A.start(this._transformStreamController));else fa(void 0)}get readable(){if(!f9(this))throw J9("readable");return this._readable}get writable(){if(!f9(this))throw J9("writable");return this._writable}}if(Object.defineProperties(t1.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(t1.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function Zz(p,Q,z,V,h,A){function o(){return Q}function d(Da){return kz(p,Da)}function aa(Da){return Cz(p,Da)}function la(){return sz(p)}p._writable=TY(o,d,la,aa,z,V);function fa(){return yz(p)}function Ga(Da){return rz(p,Da)}p._readable=s1(o,fa,Ga,h,A),p._backpressure=void 0,p._backpressureChangePromise=void 0,p._backpressureChangePromise_resolve=void 0,Bl(p,!0),p._transformStreamController=void 0}function f9(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_transformStreamController"))return!1;return p instanceof t1}function w9(p,Q){Gn(p._readable._readableStreamController,Q),a8(p,Q)}function a8(p,Q){hl(p._transformStreamController),T1(p._writable._writableStreamController,Q),i8(p)}function i8(p){if(p._backpressure)Bl(p,!1)}function Bl(p,Q){if(p._backpressureChangePromise!==void 0)p._backpressureChangePromise_resolve();p._backpressureChangePromise=f((z)=>{p._backpressureChangePromise_resolve=z}),p._backpressure=Q}class ic{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Ul(this))throw Ll("desiredSize");let p=this._controlledTransformStream._readable._readableStreamController;return tp(p)}enqueue(p=void 0){if(!Ul(this))throw Ll("enqueue");m9(this,p)}error(p=void 0){if(!Ul(this))throw Ll("error");Sz(this,p)}terminate(){if(!Ul(this))throw Ll("terminate");Tz(this)}}if(Object.defineProperties(ic.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),c(ic.prototype.enqueue,"enqueue"),c(ic.prototype.error,"error"),c(ic.prototype.terminate,"terminate"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(ic.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Ul(p){if(!n(p))return!1;if(!Object.prototype.hasOwnProperty.call(p,"_controlledTransformStream"))return!1;return p instanceof ic}function gz(p,Q,z,V,h){Q._controlledTransformStream=p,p._transformStreamController=Q,Q._transformAlgorithm=z,Q._flushAlgorithm=V,Q._cancelAlgorithm=h,Q._finishPromise=void 0,Q._finishPromise_resolve=void 0,Q._finishPromise_reject=void 0}function Iz(p,Q){let z=Object.create(ic.prototype),V,h,A;if(Q.transform!==void 0)V=(o)=>Q.transform(o,z);else V=(o)=>{try{return m9(z,o),w(void 0)}catch(d){return m(d)}};if(Q.flush!==void 0)h=()=>Q.flush(z);else h=()=>w(void 0);if(Q.cancel!==void 0)A=(o)=>Q.cancel(o);else A=()=>w(void 0);gz(p,z,V,h,A)}function hl(p){p._transformAlgorithm=void 0,p._flushAlgorithm=void 0,p._cancelAlgorithm=void 0}function m9(p,Q){let z=p._controlledTransformStream,V=z._readable._readableStreamController;if(!Iv(V))throw new TypeError("Readable side is not in a state that permits enqueue");try{gv(V,Q)}catch(A){throw a8(z,A),z._readable._storedError}if(Kz(V)!==z._backpressure)Bl(z,!0)}function Sz(p,Q){w9(p._controlledTransformStream,Q)}function Q9(p,Q){let z=p._transformAlgorithm(Q);return F(z,void 0,(V)=>{throw w9(p._controlledTransformStream,V),V})}function Tz(p){let Q=p._controlledTransformStream,z=Q._readable._readableStreamController;nv(z);let V=new TypeError("TransformStream terminated");a8(Q,V)}function kz(p,Q){let z=p._transformStreamController;if(p._backpressure){let V=p._backpressureChangePromise;return F(V,()=>{let h=p._writable;if(h._state==="erroring")throw h._storedError;return Q9(z,Q)})}return Q9(z,Q)}function Cz(p,Q){let z=p._transformStreamController;if(z._finishPromise!==void 0)return z._finishPromise;let V=p._readable;z._finishPromise=f((A,o)=>{z._finishPromise_resolve=A,z._finishPromise_reject=o});let h=z._cancelAlgorithm(Q);return hl(z),Y(h,()=>{if(V._state==="errored")Sv(z,V._storedError);else Gn(V._readableStreamController,Q),n8(z);return null},(A)=>{return Gn(V._readableStreamController,A),Sv(z,A),null}),z._finishPromise}function sz(p){let Q=p._transformStreamController;if(Q._finishPromise!==void 0)return Q._finishPromise;let z=p._readable;Q._finishPromise=f((h,A)=>{Q._finishPromise_resolve=h,Q._finishPromise_reject=A});let V=Q._flushAlgorithm();return hl(Q),Y(V,()=>{if(z._state==="errored")Sv(Q,z._storedError);else nv(z._readableStreamController),n8(Q);return null},(h)=>{return Gn(z._readableStreamController,h),Sv(Q,h),null}),Q._finishPromise}function yz(p){return Bl(p,!1),p._backpressureChangePromise}function rz(p,Q){let z=p._transformStreamController;if(z._finishPromise!==void 0)return z._finishPromise;let V=p._writable;z._finishPromise=f((A,o)=>{z._finishPromise_resolve=A,z._finishPromise_reject=o});let h=z._cancelAlgorithm(Q);return hl(z),Y(h,()=>{if(V._state==="errored")Sv(z,V._storedError);else T1(V._writableStreamController,Q),i8(p),n8(z);return null},(A)=>{return T1(V._writableStreamController,A),i8(p),Sv(z,A),null}),z._finishPromise}function Ll(p){return new TypeError(`TransformStreamDefaultController.prototype.${p} can only be used on a TransformStreamDefaultController`)}function n8(p){if(p._finishPromise_resolve===void 0)return;p._finishPromise_resolve(),p._finishPromise_resolve=void 0,p._finishPromise_reject=void 0}function Sv(p,Q){if(p._finishPromise_reject===void 0)return;K(p._finishPromise),p._finishPromise_reject(Q),p._finishPromise_resolve=void 0,p._finishPromise_reject=void 0}function J9(p){return new TypeError(`TransformStream.prototype.${p} can only be used on a TransformStream`)}i.ByteLengthQueuingStrategy=r1,i.CountQueuingStrategy=d1,i.ReadableByteStreamController=S,i.ReadableStream=Yi,i.ReadableStreamBYOBReader=Mi,i.ReadableStreamBYOBRequest=N,i.ReadableStreamDefaultController=on,i.ReadableStreamDefaultReader=ka,i.TransformStream=t1,i.TransformStreamDefaultController=ic,i.WritableStream=ac,i.WritableStreamDefaultController=av,i.WritableStreamDefaultWriter=Rn})});var TW=U(()=>{if(!globalThis.ReadableStream)try{let i=require("node:process"),{emitWarning:a}=i;try{i.emitWarning=()=>{},Object.assign(globalThis,require("node:stream/web")),i.emitWarning=a}catch(n){throw i.emitWarning=a,n}}catch(i){Object.assign(globalThis,SW())}try{let{Blob:i}=require("buffer");if(i&&!i.prototype.stream)i.prototype.stream=function a(n){let v=0,c=this;return new ReadableStream({type:"bytes",async pull(l){let u=await c.slice(v,Math.min(c.size,v+65536)).arrayBuffer();if(v+=u.byteLength,l.enqueue(new Uint8Array(u)),v===c.size)l.close()}})}}catch(i){}});async function*f2(i,a=!0){for(let n of i)if("stream"in n)yield*n.stream();else if(ArrayBuffer.isView(n))if(a){let v=n.byteOffset,c=n.byteOffset+n.byteLength;while(v!==c){let l=Math.min(c-v,kW),x=n.buffer.slice(v,v+l);v+=x.byteLength,yield new Uint8Array(x)}}else yield n;else{let v=0,c=n;while(v!==c.size){let x=await c.slice(v,Math.min(c.size,v+kW)).arrayBuffer();v+=x.byteLength,yield new Uint8Array(x)}}}var bo,kW=65536,CW,PD,Bn;var y0=qa(()=>{bo=ii(TW());/*! fetch-blob. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */CW=class i{#a=[];#i="";#n=0;#c="transparent";constructor(a=[],n={}){if(typeof a!=="object"||a===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof a[Symbol.iterator]!=="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof n!=="object"&&typeof n!=="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");if(n===null)n={};let v=new TextEncoder;for(let l of a){let x;if(ArrayBuffer.isView(l))x=new Uint8Array(l.buffer.slice(l.byteOffset,l.byteOffset+l.byteLength));else if(l instanceof ArrayBuffer)x=new Uint8Array(l.slice(0));else if(l instanceof i)x=l;else x=v.encode(`${l}`);this.#n+=ArrayBuffer.isView(x)?x.byteLength:x.size,this.#a.push(x)}this.#c=`${n.endings===void 0?"transparent":n.endings}`;let c=n.type===void 0?"":String(n.type);this.#i=/^[\x20-\x7E]*$/.test(c)?c:""}get size(){return this.#n}get type(){return this.#i}async text(){let a=new TextDecoder,n="";for await(let v of f2(this.#a,!1))n+=a.decode(v,{stream:!0});return n+=a.decode(),n}async arrayBuffer(){let a=new Uint8Array(this.size),n=0;for await(let v of f2(this.#a,!1))a.set(v,n),n+=v.length;return a.buffer}stream(){let a=f2(this.#a,!0);return new globalThis.ReadableStream({type:"bytes",async pull(n){let v=await a.next();v.done?n.close():n.enqueue(v.value)},async cancel(){await a.return()}})}slice(a=0,n=this.size,v=""){let{size:c}=this,l=a<0?Math.max(c+a,0):Math.min(a,c),x=n<0?Math.max(c+n,0):Math.min(n,c),u=Math.max(x-l,0),f=this.#a,w=[],m=0;for(let Y of f){if(m>=u)break;let J=ArrayBuffer.isView(Y)?Y.byteLength:Y.size;if(l&&J<=l)l-=J,x-=J;else{let X;if(ArrayBuffer.isView(Y))X=Y.subarray(l,Math.min(J,x)),m+=X.byteLength;else X=Y.slice(l,Math.min(J,x)),m+=X.size;x-=J,w.push(X),l=0}}let W=new i([],{type:String(v).toLowerCase()});return W.#n=u,W.#a=w,W}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](a){return a&&typeof a==="object"&&typeof a.constructor==="function"&&(typeof a.stream==="function"||typeof a.arrayBuffer==="function")&&/^(Blob|File)$/.test(a[Symbol.toStringTag])}};Object.defineProperties(CW.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});PD=CW,Bn=PD});var VD,MD,gc;var w2=qa(()=>{y0();VD=class i extends Bn{#a=0;#i="";constructor(a,n,v={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(a,v);if(v===null)v={};let c=v.lastModified===void 0?Date.now():Number(v.lastModified);if(!Number.isNaN(c))this.#a=c;this.#i=String(n)}get name(){return this.#i}get lastModified(){return this.#a}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](a){return!!a&&a instanceof Bn&&/^(File)$/.test(a[Symbol.toStringTag])}},MD=VD,gc=MD});function rW(i,a=Bn){var n=`${sW()}${sW()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),v=[],c=`--${n}\r
283
283
  Content-Disposition: form-data; name="`;return i.forEach((l,x)=>typeof l=="string"?v.push(c+m2(x)+`"\r
284
284
  \r
285
285
  ${l.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
@@ -317,5 +317,5 @@ ${c}. Convert the Tailwind to vanilla CSS if not already used in the codebase. D
317
317
 
318
318
  `)} Convert the Tailwind to vanilla CSS if not already used in the codebase. Do not install any dependencies.`}]}}catch(n){return SD.error("Tool execution error:",n),{content:[{type:"text",text:`Error: ${n.message}`}]}}}),i.tool("get_image","Generate an image for a given node or the currently selected node in the Figma desktop app. Use the nodeId parameter to specify a node id. If no node id is provided, the currently selected node will be used. If a URL is provided, extract the node id from the URL, for example, if given the URL https://figma.com/design/:fileKey/:fileName?node-id=1-2, the extracted nodeId would be 1:2. Also export Figma design images for visual verification and design fidelity validation. Essential for comparing generated code output against original designs, ensuring pixel-perfect implementation and catching visual discrepancies during the design-to-code process.",{fileKey:G.string().describe("Figma file identifier from the URL for accessing the design source"),ids:G.string().describe('Comma-separated node IDs to export. Use "Copy ID" from Figma context menu to get precise element references for comparison'),format:G.enum(["jpg","png","svg","pdf"]).optional().describe('Export format for verification: "png" for pixel-perfect comparison with transparency, "jpg" for quick previews, "svg" for scalable reference, "pdf" for print validation'),scale:G.number().optional().describe("Scale factor (1-4x) for high-resolution comparison. Use 2x+ for detailed fidelity checks on retina displays"),svg_include_id:G.boolean().optional().describe("Include element IDs in SVG for precise element mapping during code validation"),svg_simplify_stroke:G.boolean().optional().describe("Simplify stroke paths for cleaner reference images during visual comparison"),use_absolute_bounds:G.boolean().optional().describe("Use absolute positioning for accurate layout verification against implemented code"),version:G.string().optional().describe("Specific design version for consistent comparison baseline"),personalToken:G.string().optional().describe("Figma personal access token for authenticated access to design files")},async(a)=>{try{let n=await RY.images(a);return{content:[{type:"text",text:JSON.stringify(n)}]}}catch(n){return{content:[{type:"text",text:`Error: ${n.message}`}]}}})};var op=new u2({name:Zi.serverName,version:Zi.serverVersion},{capabilities:{logging:{}}});_W(op);ZY(op);aQ(op,3000);
319
319
 
320
- //# debugId=BB2CDE7182D3F75F64756E2164756E21
320
+ //# debugId=9EDC0143C5118C0064756E2164756E21
321
321
  //# sourceMappingURL=streamable-http.js.map