@sockethub/examples 1.0.0-alpha.24 → 1.0.0-alpha.25

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.
Files changed (57) hide show
  1. package/build/_app/immutable/assets/0.qOXUWaGZ.css +1 -0
  2. package/build/_app/immutable/chunks/{Cj_plMLy.js → 1avIAF2I.js} +1 -1
  3. package/build/_app/immutable/chunks/{C5qpDfpL.js → 33lEaGXm.js} +2 -2
  4. package/build/_app/immutable/chunks/BLqyXFvH.js +1 -0
  5. package/build/_app/immutable/chunks/BSMEOyoG.js +1 -0
  6. package/build/_app/immutable/chunks/{Cql_8FxA.js → BVuLyJ7q.js} +1 -1
  7. package/build/_app/immutable/chunks/C1MOh-XY.js +9 -0
  8. package/build/_app/immutable/chunks/C7DuqNbl.js +1 -0
  9. package/build/_app/immutable/chunks/CAT4ZdDs.js +1 -0
  10. package/build/_app/immutable/chunks/{M4yGBGmj.js → CT9Y_tQ4.js} +1 -1
  11. package/build/_app/immutable/chunks/CnmpubcX.js +1 -0
  12. package/build/_app/immutable/chunks/Cs24jlvn.js +36 -0
  13. package/build/_app/immutable/chunks/DYRq57vD.js +1 -0
  14. package/build/_app/immutable/chunks/EYcEpRKU.js +2 -0
  15. package/build/_app/immutable/chunks/{CluiWps8.js → hMyUYPEq.js} +1 -1
  16. package/build/_app/immutable/chunks/lzIpFC7n.js +1 -0
  17. package/build/_app/immutable/chunks/yWT4YlSI.js +1 -0
  18. package/build/_app/immutable/entry/app.ztAFZXMv.js +2 -0
  19. package/build/_app/immutable/entry/start._QPU_uWU.js +1 -0
  20. package/build/_app/immutable/nodes/{0.CIgA3-VU.js → 0.Df5wjAcn.js} +2 -2
  21. package/build/_app/immutable/nodes/{1.C7n4GBxp.js → 1.IOrVTpza.js} +1 -1
  22. package/build/_app/immutable/nodes/2.BS3KT_lf.js +5 -0
  23. package/build/_app/immutable/nodes/3.DXNrVIwE.js +1 -0
  24. package/build/_app/immutable/nodes/{7.BdFFHD3t.js → 4.BL1-bQ7L.js} +1 -1
  25. package/build/_app/immutable/nodes/5.1YpnKe2X.js +1 -0
  26. package/build/_app/immutable/nodes/6.C9NLPLub.js +2 -0
  27. package/build/_app/immutable/nodes/{3.CXZYDGj0.js → 7.D1TuxuLE.js} +1 -1
  28. package/build/_app/immutable/nodes/{4.CPgcqwJB.js → 8.nRxJTb1X.js} +1 -1
  29. package/build/_app/immutable/nodes/{9.CO3JNyJf.js → 9.ClqrhF8-.js} +1 -1
  30. package/build/_app/version.json +1 -1
  31. package/build/caldav.html +12 -12
  32. package/build/carddav.html +12 -12
  33. package/build/dummy.html +12 -12
  34. package/build/feeds.html +12 -12
  35. package/build/index.html +12 -12
  36. package/build/irc.html +12 -12
  37. package/build/metadata.html +12 -12
  38. package/build/xmpp.html +12 -12
  39. package/package.json +4 -4
  40. package/build/_app/immutable/assets/0.C4UYQlfe.css +0 -1
  41. package/build/_app/immutable/chunks/BBWhllcJ.js +0 -1
  42. package/build/_app/immutable/chunks/BYPKMD8u.js +0 -1
  43. package/build/_app/immutable/chunks/C7RIZnpe.js +0 -1
  44. package/build/_app/immutable/chunks/CD2k2u89.js +0 -1
  45. package/build/_app/immutable/chunks/CbROi3Jn.js +0 -1
  46. package/build/_app/immutable/chunks/D-BRhX9k.js +0 -1
  47. package/build/_app/immutable/chunks/DES_NVaV.js +0 -1
  48. package/build/_app/immutable/chunks/DRQf9AgU.js +0 -1
  49. package/build/_app/immutable/chunks/Dm9HHmcs.js +0 -2
  50. package/build/_app/immutable/chunks/DtLGjLnP.js +0 -43
  51. package/build/_app/immutable/chunks/XtX2ckS1.js +0 -2
  52. package/build/_app/immutable/entry/app._k8f24KG.js +0 -2
  53. package/build/_app/immutable/entry/start.AL1ku_EU.js +0 -1
  54. package/build/_app/immutable/nodes/2.CcUlaCge.js +0 -5
  55. package/build/_app/immutable/nodes/5.C5JcmYto.js +0 -2
  56. package/build/_app/immutable/nodes/6.nHKMDGo9.js +0 -1
  57. package/build/_app/immutable/nodes/8.Dfm8aOrv.js +0 -1
@@ -0,0 +1,36 @@
1
+ var $i=Object.defineProperty;var bi=(t,e,r)=>e in t?$i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var nt=(t,e,r)=>bi(t,typeof e!="symbol"?e+"":e,r);import{b as Qn,e as Ei,f as it,a as Fe,s as et,d as Nn,c as Ht,t as Si}from"./EYcEpRKU.js";import"./BSMEOyoG.js";import{t as ft,Z as Zt,a2 as mn,A as Pi,aU as ki,_ as gn,am as ws,aM as yn,aT as Oi,aN as Ni,a7 as vn,aE as cr,X as Ti,a1 as Ri,aV as Ii,a8 as Xn,p as zt,s as qe,c as me,r as de,n as $s,a as Ft,g as ae,u as st,f as _t,aW as Ci,aX as Ai,aY as ji,aZ as Mi,z as Di,b as vt,o as tn,h as qi,d as Xt,e as rn,ah as Li}from"./lzIpFC7n.js";import{w as pr,g as Vi}from"./C7DuqNbl.js";import{i as pt}from"./CnmpubcX.js";import{e as _n,i as bs,s as Ui,a as fr,g as zi,f as Fi,C as xi,l as Bi,h as Hi}from"./C1MOh-XY.js";import{i as Es}from"./1avIAF2I.js";import{a as Ki,s as Gi,l as Rr,p as Yt,d as Wi}from"./DYRq57vD.js";function Ji(t,e,r=!1,n=!1,s=!1){var l=t,i="";ft(()=>{var c=Pi;if(i===(i=e()??"")){Zt&&mn();return}if(c.nodes!==null&&(ki(c.nodes.start,c.nodes.end),c.nodes=null),i!==""){if(Zt){gn.data;for(var a=mn(),f=a;a!==null&&(a.nodeType!==ws||a.data!=="");)f=a,a=yn(a);if(a===null)throw Oi(),Ni;Qn(gn,f),l=vn(a);return}var u=i+"";r?u=`<svg>${u}</svg>`:n&&(u=`<math>${u}</math>`);var d=Ei(u);if((r||n)&&(d=cr(d)),Qn(cr(d),d.lastChild),r||n)for(;cr(d);)l.before(cr(d));else l.before(d)}})}function Qi(t,e,r,n,s){var c;Zt&&mn();var l=(c=e.$$slots)==null?void 0:c[r],i=!1;l===!0&&(l=e.children,i=!0),l===void 0?s!==null&&s(t):l(t,i?()=>n:n)}function Xi(t,e){let r=null,n=Zt;var s;if(Zt){r=gn;for(var l=cr(document.head);l!==null&&(l.nodeType!==ws||l.data!==t);)l=yn(l);if(l===null)Xn(!1);else{var i=yn(l);l.remove(),vn(i)}}Zt||(s=document.head.appendChild(Ti()));try{Ri(()=>e(s),Ii)}finally{n&&(Xn(!0),vn(r))}}const wn=pr([]),Er=new Map;function Ss(t,e=!1){var r,n,s;if(console.log("displayMessage called:",{type:t.type,platform:Cr(t["@context"]),isResponse:e,actor:t.actor,content:(r=t.object)==null?void 0:r.content}),t.type==="send"&&((n=t.object)==null?void 0:n.type)==="message"){const l=typeof t.actor=="string"?t.actor:((s=t.actor)==null?void 0:s.name)||"",i=t.object.content||"",c=`${l}:${i}`,a=Date.now(),f=Er.get(c);if(f&&a-f<2e3){console.log("Skipping duplicate message:",c);return}Er.set(c,a);for(const[u,d]of Er)a-d>5e3&&Er.delete(u);wn.set([...Vi(wn),[l,i]]),console.log("Message displayed:",{actorName:l,content:i,isResponse:e,platform:Cr(t["@context"])})}}var Yi=it("<li> </li>"),Zi=it('<div><label for="incomingMessagesContainer" class="text-gray-900 font-bold">Incoming Messages</label> <div id="incomingMessagesContainer" class="incoming-messages-container w-full"><ui class="incoming-messages"></ui> <div class="incoming-messages-anchor"></div></div></div>');function Du(t,e){zt(e,!1);const r=()=>Ki(wn,"$messages",n),[n,s]=Gi();Es();var l=Zi(),i=qe(me(l),2),c=me(i);_n(c,5,r,bs,(a,f)=>{var u=Yi(),d=me(u);de(u),ft(()=>et(d,`${ae(f)[0]??""}: ${ae(f)[1]??""}`)),Fe(a,u)}),de(c),$s(2),de(i),de(l),Fe(t,l),Ft(),s()}function ea(t,e,r){var s,l,i;const n=((s=e[r])==null?void 0:s.requestId)??r;return{sent:(l=t[n])==null?void 0:l[0],response:(i=t[r])==null?void 0:i[1]}}var ta=it("<span> </span>");function Tn(t,e){zt(e,!0);const r=st(()=>Cr(e.entry["@context"]));var n=ta(),s=me(n);de(n),ft(()=>et(s,`[${ae(r)??"unknown"??""}:${e.entry.type??""}]`)),Fe(t,n),Ft()}var ra=it("<!> <span> </span> <span> </span>",1);function na(t,e){zt(e,!0);var r=ra(),n=_t(r);Tn(n,{get entry(){return e.entry}});var s=qe(n,2),l=me(s);de(s);var i=qe(s,2),c=me(i,!0);de(i),ft(()=>{var a,f,u;et(l,`#${e.id??""}
2
+ ${(typeof e.entry.actor=="string"?e.entry.actor:((a=e.entry.actor)==null?void 0:a.name)||((f=e.entry.actor)==null?void 0:f.id))??""}:`),et(c,((u=e.entry.object)==null?void 0:u.content)||"")}),Fe(t,r),Ft()}var sa=it('<span class="font-medium">📰 Fetched feed:</span> <span> </span> <span class="text-gray-500"> </span>',1),ia=it("<span> </span>"),aa=it('<span class="text-gray-500 text-xs italic"> </span>'),oa=it('<span class="text-gray-500"> </span> <!> <span><a rel="noreferrer" target="_blank" class="text-blue-600 hover:text-blue-800 underline"> </a></span> <!>',1),ca=it("<!> <!>",1);function la(t,e){zt(e,!0);const r=st(()=>e.entry.totalItems!==void 0),n=st(()=>{var u;return ae(r)?e.entry.summary:(u=e.entry.object)==null?void 0:u.url}),s=st(()=>{var u,d;return typeof e.entry.actor=="string"?e.entry.actor:((u=e.entry.actor)==null?void 0:u.name)||((d=e.entry.actor)==null?void 0:d.id)});var l=ca(),i=_t(l);Tn(i,{get entry(){return e.entry}});var c=qe(i,2);{var a=u=>{var d=sa(),$=qe(_t(d),2),P=me($,!0);de($);var b=qe($,2),E=me(b);de(b),ft(()=>{et(P,ae(n)),et(E,`(${e.entry.totalItems??""} ${e.entry.totalItems===1?"item":"items"})`)}),Fe(u,d)},f=u=>{var d=oa(),$=_t(d),P=me($);de($);var b=qe($,2);{var E=w=>{var g=ia(),p=me(g);de(g),ft(()=>et(p,`${ae(s)??""}:`)),Fe(w,g)};pt(b,w=>{ae(s)&&w(E)})}var _=qe(b,2),o=me(_),v=me(o,!0);de(o),de(_);var h=qe(_,2);{var y=w=>{var g=aa(),p=me(g,!0);de(g),ft(S=>et(p,S),[()=>{var S;return(S=e.entry.object)==null?void 0:S.published.split("T")[0]}]),Fe(w,g)};pt(h,w=>{var g;(g=e.entry.object)!=null&&g.published&&w(y)})}ft(()=>{var w,g,p;et(P,`#${e.id??""}`),Ui(o,"href",(w=e.entry.object)==null?void 0:w.url),et(v,((g=e.entry.object)==null?void 0:g.title)||(typeof e.entry.target=="string"?e.entry.target:(p=e.entry.target)==null?void 0:p.id))}),Fe(u,d)};pt(c,u=>{ae(r)?u(a):u(f,!1)})}Fe(t,l),Ft()}var ua=it("<!> <span> </span>",1);function fa(t,e){zt(e,!0);var r=ua(),n=_t(r);Tn(n,{get entry(){return e.entry}});var s=qe(n,2),l=me(s);de(s),ft(()=>{var i,c;return et(l,`#${e.id??""}
3
+ ${(typeof e.entry.actor=="string"?e.entry.actor:((i=e.entry.actor)==null?void 0:i.name)||((c=e.entry.actor)==null?void 0:c.id))??""}`)}),Fe(t,r),Ft()}var da=it('<span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs font-medium rounded-full"> </span>'),ha=it('<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs font-medium rounded-full"> </span>'),pa=it('<div class="mt-2 p-3 bg-red-50 border border-red-200 rounded-lg"><div class="flex items-center space-x-2"><svg class="w-4 h-4 text-red-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span class="text-red-800 font-medium text-sm">Error:</span> <span class="text-red-700 text-sm"> </span></div></div>'),ma=it('<li class="p-4 hover:bg-gray-50 transition-colors"><div class="flex items-start space-x-3"><div class="flex flex-col items-center space-y-1 mt-1"><div></div> <div class="text-xs text-gray-400 font-mono"> </div></div> <div class="flex-1 min-w-0"><div class="flex items-center justify-between mb-2"><div class="flex items-center space-x-2"><span class="text-sm font-semibold text-gray-700"> </span> <!> <!></div> <button class="px-3 py-1 text-xs font-medium text-indigo-600 hover:text-indigo-800 hover:bg-indigo-50 rounded-md transition-colors flex items-center space-x-1"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg> <span>View Details</span></button></div> <div class="text-sm text-gray-600"><!></div> <!></div></div></li>');function Yn(t,e){zt(e,!0);const r=st(()=>Cr(e.entry["@context"])),n=st(()=>e.timestamp?new Date(e.timestamp).toLocaleTimeString():""),s=st(()=>e.hasSend&&e.hasResponse?"Sent → Response OK":e.hasSend?"Sent → Awaiting response":""),l=st(()=>e.hasSend&&e.hasResponse?"bg-green-500":e.hasSend?"bg-orange-400":"bg-green-500");var i=ma(),c=me(i),a=me(c),f=me(a),u=qe(f,2),d=me(u,!0);de(u),de(a);var $=qe(a,2),P=me($),b=me(P),E=me(b),_=me(E,!0);de(E);var o=qe(E,2);{var v=V=>{var X=da(),W=me(X,!0);de(X),ft(ee=>et(W,ee),[()=>ae(r).toUpperCase()]),Fe(V,X)};pt(o,V=>{ae(r)&&V(v)})}var h=qe(o,2);{var y=V=>{var X=ha(),W=me(X,!0);de(X),ft(()=>et(W,e.entry.type)),Fe(V,X)};pt(h,V=>{e.entry.type&&V(y)})}de(b);var w=qe(b,2);w.__click=function(...V){var X;(X=e.buttonAction)==null||X.apply(this,V)},de(P);var g=qe(P,2),p=me(g);{var S=V=>{na(V,{get id(){return e.id},get entry(){return e.entry}})},O=V=>{var X=Ht(),W=_t(X);{var ee=Ee=>{la(Ee,{get id(){return e.id},get entry(){return e.entry}})},he=Ee=>{fa(Ee,{get id(){return e.id},get entry(){return e.entry}})};pt(W,Ee=>{ae(r)==="feeds"?Ee(ee):Ee(he,!1)},!0)}Fe(V,X)};pt(p,V=>{ae(r)==="dummy"?V(S):V(O,!1)})}de(g);var j=qe(g,2);{var z=V=>{var X=pa(),W=me(X),ee=qe(me(W),4),he=me(ee,!0);de(ee),de(W),de(X),ft(()=>et(he,e.entry.error)),Fe(V,X)};pt(j,V=>{e.entry.error&&V(z)})}de($),de(c),de(i),ft(()=>{fr(f,1,`w-3 h-3 ${ae(l)??""} rounded-full`),et(d,ae(n)||`#${e.id}`),et(_,ae(s))}),Fe(t,i),Ft()}Nn(["click"]);var ga=it('<div class="mt-2 p-2 bg-red-50 border border-red-200 rounded-lg"><span class="text-red-700 text-xs"> </span></div>'),ya=it('<li class="p-4 hover:bg-indigo-50/40 transition-colors"><div class="flex items-start space-x-3"><div class="flex flex-col items-center space-y-1 mt-1"><div></div> <div class="text-xs text-gray-400 font-mono"> </div></div> <div class="flex-1 min-w-0"><div class="flex items-center justify-between mb-1"><div class="flex items-center space-x-2"><span> </span></div> <button class="px-3 py-1 text-xs font-medium text-indigo-600 hover:text-indigo-800 hover:bg-indigo-50 rounded-md transition-colors flex items-center space-x-1"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg> <span>View Details</span></button></div> <p class="text-sm text-gray-600 truncate"> </p> <!></div></div></li>');function va(t,e){zt(e,!0);const r={schemas:{label:"Schemas Received",color:"text-indigo-800",bg:"bg-indigo-100"},ready:{label:"Client Ready",color:"text-emerald-800",bg:"bg-emerald-100"},init_error:{label:"Init Error",color:"text-red-800",bg:"bg-red-100"}},n=st(()=>r[e.entry._logType]??r.schemas);function s(p){if(!p||typeof p!="object")return"";const S=p;if(e.entry._logType==="schemas"){const j=(Array.isArray(S.platforms)?S.platforms:[]).map(V=>V==null?void 0:V.id).filter(Boolean);return`API v${typeof S.apiVersion=="number"?S.apiVersion:"unknown"} — ${j.length} platform${j.length!==1?"s":""}: ${j.join(", ")}`}if(e.entry._logType==="ready"){const O=typeof S.reason=="string"?S.reason:"",j=typeof S.apiVersion=="number"?S.apiVersion:"unknown",z=Array.isArray(S.platforms)?S.platforms.length:0;return`${O} — Sockethub API v${j}, ${z} platform${z!==1?"s":""}`}if(e.entry._logType==="init_error"){const O=typeof S.error=="string"?S.error:"unknown",j=typeof S.phase=="string"?S.phase:"",z=S.retrying?" (retrying)":"";return`${j}: ${O}${z}`}return JSON.stringify(p).slice(0,120)}const l=st(()=>s(e.entry.payload)),i=st(()=>new Date(e.entry._timestamp).toLocaleTimeString());var c=ya(),a=me(c),f=me(a),u=me(f),d=qe(u,2),$=me(d,!0);de(d),de(f);var P=qe(f,2),b=me(P),E=me(b),_=me(E),o=me(_,!0);de(_),de(E);var v=qe(E,2);v.__click=function(...p){var S;(S=e.buttonAction)==null||S.apply(this,p)},de(b);var h=qe(b,2),y=me(h,!0);de(h);var w=qe(h,2);{var g=p=>{var S=ga(),O=me(S),j=me(O,!0);de(O),de(S),ft(()=>{var z;return et(j,((z=e.entry.payload)==null?void 0:z.error)??"")}),Fe(p,S)};pt(w,p=>{e.entry._logType==="init_error"&&p(g)})}de(P),de(a),de(c),ft(()=>{fr(u,1,`w-3 h-3 ${e.entry._logType==="init_error"?"bg-red-500":"bg-indigo-500"} rounded-full`),et($,ae(i)),fr(_,1,`px-2 py-1 ${ae(n).bg??""} ${ae(n).color??""} text-xs font-semibold rounded-full`),et(o,ae(n).label),et(y,ae(l))}),Fe(t,c),Ft()}Nn(["click"]);var nn,Zn;function _a(){if(Zn)return nn;Zn=1;function t(q){return q instanceof Map?q.clear=q.delete=q.set=function(){throw new Error("map is read-only")}:q instanceof Set&&(q.add=q.clear=q.delete=function(){throw new Error("set is read-only")}),Object.freeze(q),Object.getOwnPropertyNames(q).forEach(Y=>{const ne=q[Y],we=typeof ne;(we==="object"||we==="function")&&!Object.isFrozen(ne)&&t(ne)}),q}class e{constructor(Y){Y.data===void 0&&(Y.data={}),this.data=Y.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(q){return q.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function n(q,...Y){const ne=Object.create(null);for(const we in q)ne[we]=q[we];return Y.forEach(function(we){for(const Je in we)ne[Je]=we[Je]}),ne}const s="</span>",l=q=>!!q.scope,i=(q,{prefix:Y})=>{if(q.startsWith("language:"))return q.replace("language:","language-");if(q.includes(".")){const ne=q.split(".");return[`${Y}${ne.shift()}`,...ne.map((we,Je)=>`${we}${"_".repeat(Je+1)}`)].join(" ")}return`${Y}${q}`};class c{constructor(Y,ne){this.buffer="",this.classPrefix=ne.classPrefix,Y.walk(this)}addText(Y){this.buffer+=r(Y)}openNode(Y){if(!l(Y))return;const ne=i(Y.scope,{prefix:this.classPrefix});this.span(ne)}closeNode(Y){l(Y)&&(this.buffer+=s)}value(){return this.buffer}span(Y){this.buffer+=`<span class="${Y}">`}}const a=(q={})=>{const Y={children:[]};return Object.assign(Y,q),Y};class f{constructor(){this.rootNode=a(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Y){this.top.children.push(Y)}openNode(Y){const ne=a({scope:Y});this.add(ne),this.stack.push(ne)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Y){return this.constructor._walk(Y,this.rootNode)}static _walk(Y,ne){return typeof ne=="string"?Y.addText(ne):ne.children&&(Y.openNode(ne),ne.children.forEach(we=>this._walk(Y,we)),Y.closeNode(ne)),Y}static _collapse(Y){typeof Y!="string"&&Y.children&&(Y.children.every(ne=>typeof ne=="string")?Y.children=[Y.children.join("")]:Y.children.forEach(ne=>{f._collapse(ne)}))}}class u extends f{constructor(Y){super(),this.options=Y}addText(Y){Y!==""&&this.add(Y)}startScope(Y){this.openNode(Y)}endScope(){this.closeNode()}__addSublanguage(Y,ne){const we=Y.root;ne&&(we.scope=`language:${ne}`),this.add(we)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(q){return q?typeof q=="string"?q:q.source:null}function $(q){return E("(?=",q,")")}function P(q){return E("(?:",q,")*")}function b(q){return E("(?:",q,")?")}function E(...q){return q.map(ne=>d(ne)).join("")}function _(q){const Y=q[q.length-1];return typeof Y=="object"&&Y.constructor===Object?(q.splice(q.length-1,1),Y):{}}function o(...q){return"("+(_(q).capture?"":"?:")+q.map(we=>d(we)).join("|")+")"}function v(q){return new RegExp(q.toString()+"|").exec("").length-1}function h(q,Y){const ne=q&&q.exec(Y);return ne&&ne.index===0}const y=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function w(q,{joinWith:Y}){let ne=0;return q.map(we=>{ne+=1;const Je=ne;let Ye=d(we),ue="";for(;Ye.length>0;){const oe=y.exec(Ye);if(!oe){ue+=Ye;break}ue+=Ye.substring(0,oe.index),Ye=Ye.substring(oe.index+oe[0].length),oe[0][0]==="\\"&&oe[1]?ue+="\\"+String(Number(oe[1])+Je):(ue+=oe[0],oe[0]==="("&&ne++)}return ue}).map(we=>`(${we})`).join(Y)}const g=/\b\B/,p="[a-zA-Z]\\w*",S="[a-zA-Z_]\\w*",O="\\b\\d+(\\.\\d+)?",j="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",z="\\b(0b[01]+)",V="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",X=(q={})=>{const Y=/^#![ ]*\//;return q.binary&&(q.begin=E(Y,/.*\b/,q.binary,/\b.*/)),n({scope:"meta",begin:Y,end:/$/,relevance:0,"on:begin":(ne,we)=>{ne.index!==0&&we.ignoreMatch()}},q)},W={begin:"\\\\[\\s\\S]",relevance:0},ee={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[W]},he={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[W]},Ee={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Ce=function(q,Y,ne={}){const we=n({scope:"comment",begin:q,end:Y,contains:[]},ne);we.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Je=o("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return we.contains.push({begin:E(/[ ]+/,"(",Je,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),we},ce=Ce("//","$"),x=Ce("/\\*","\\*/"),T=Ce("#","$"),M={scope:"number",begin:O,relevance:0},R={scope:"number",begin:j,relevance:0},m={scope:"number",begin:z,relevance:0},k={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[W,{begin:/\[/,end:/\]/,relevance:0,contains:[W]}]},A={scope:"title",begin:p,relevance:0},G={scope:"title",begin:S,relevance:0},Q={begin:"\\.\\s*"+S,relevance:0};var re=Object.freeze({__proto__:null,APOS_STRING_MODE:ee,BACKSLASH_ESCAPE:W,BINARY_NUMBER_MODE:m,BINARY_NUMBER_RE:z,COMMENT:Ce,C_BLOCK_COMMENT_MODE:x,C_LINE_COMMENT_MODE:ce,C_NUMBER_MODE:R,C_NUMBER_RE:j,END_SAME_AS_BEGIN:function(q){return Object.assign(q,{"on:begin":(Y,ne)=>{ne.data._beginMatch=Y[1]},"on:end":(Y,ne)=>{ne.data._beginMatch!==Y[1]&&ne.ignoreMatch()}})},HASH_COMMENT_MODE:T,IDENT_RE:p,MATCH_NOTHING_RE:g,METHOD_GUARD:Q,NUMBER_MODE:M,NUMBER_RE:O,PHRASAL_WORDS_MODE:Ee,QUOTE_STRING_MODE:he,REGEXP_MODE:k,RE_STARTERS_RE:V,SHEBANG:X,TITLE_MODE:A,UNDERSCORE_IDENT_RE:S,UNDERSCORE_TITLE_MODE:G});function ye(q,Y){q.input[q.index-1]==="."&&Y.ignoreMatch()}function N(q,Y){q.className!==void 0&&(q.scope=q.className,delete q.className)}function I(q,Y){Y&&q.beginKeywords&&(q.begin="\\b("+q.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",q.__beforeBegin=ye,q.keywords=q.keywords||q.beginKeywords,delete q.beginKeywords,q.relevance===void 0&&(q.relevance=0))}function L(q,Y){Array.isArray(q.illegal)&&(q.illegal=o(...q.illegal))}function F(q,Y){if(q.match){if(q.begin||q.end)throw new Error("begin & end are not supported with match");q.begin=q.match,delete q.match}}function J(q,Y){q.relevance===void 0&&(q.relevance=1)}const te=(q,Y)=>{if(!q.beforeMatch)return;if(q.starts)throw new Error("beforeMatch cannot be used with starts");const ne=Object.assign({},q);Object.keys(q).forEach(we=>{delete q[we]}),q.keywords=ne.keywords,q.begin=E(ne.beforeMatch,$(ne.begin)),q.starts={relevance:0,contains:[Object.assign(ne,{endsParent:!0})]},q.relevance=0,delete ne.beforeMatch},be=["of","and","for","in","not","or","if","then","parent","list","value"],Ue="keyword";function Te(q,Y,ne=Ue){const we=Object.create(null);return typeof q=="string"?Je(ne,q.split(" ")):Array.isArray(q)?Je(ne,q):Object.keys(q).forEach(function(Ye){Object.assign(we,Te(q[Ye],Y,Ye))}),we;function Je(Ye,ue){Y&&(ue=ue.map(oe=>oe.toLowerCase())),ue.forEach(function(oe){const ve=oe.split("|");we[ve[0]]=[Ye,Ae(ve[0],ve[1])]})}}function Ae(q,Y){return Y?Number(Y):_e(q)?0:1}function _e(q){return be.includes(q.toLowerCase())}const xe={},Re=q=>{console.error(q)},gt=(q,...Y)=>{console.log(`WARN: ${q}`,...Y)},Xe=(q,Y)=>{xe[`${q}/${Y}`]||(console.log(`Deprecated as of ${q}. ${Y}`),xe[`${q}/${Y}`]=!0)},dt=new Error;function $t(q,Y,{key:ne}){let we=0;const Je=q[ne],Ye={},ue={};for(let oe=1;oe<=Y.length;oe++)ue[oe+we]=Je[oe],Ye[oe+we]=!0,we+=v(Y[oe-1]);q[ne]=ue,q[ne]._emit=Ye,q[ne]._multi=!0}function ct(q){if(Array.isArray(q.begin)){if(q.skip||q.excludeBegin||q.returnBegin)throw Re("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),dt;if(typeof q.beginScope!="object"||q.beginScope===null)throw Re("beginScope must be object"),dt;$t(q,q.begin,{key:"beginScope"}),q.begin=w(q.begin,{joinWith:""})}}function wt(q){if(Array.isArray(q.end)){if(q.skip||q.excludeEnd||q.returnEnd)throw Re("skip, excludeEnd, returnEnd not compatible with endScope: {}"),dt;if(typeof q.endScope!="object"||q.endScope===null)throw Re("endScope must be object"),dt;$t(q,q.end,{key:"endScope"}),q.end=w(q.end,{joinWith:""})}}function mr(q){q.scope&&typeof q.scope=="object"&&q.scope!==null&&(q.beginScope=q.scope,delete q.scope)}function gr(q){mr(q),typeof q.beginScope=="string"&&(q.beginScope={_wrap:q.beginScope}),typeof q.endScope=="string"&&(q.endScope={_wrap:q.endScope}),ct(q),wt(q)}function Jt(q){function Y(ue,oe){return new RegExp(d(ue),"m"+(q.case_insensitive?"i":"")+(q.unicodeRegex?"u":"")+(oe?"g":""))}class ne{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(oe,ve){ve.position=this.position++,this.matchIndexes[this.matchAt]=ve,this.regexes.push([ve,oe]),this.matchAt+=v(oe)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const oe=this.regexes.map(ve=>ve[1]);this.matcherRe=Y(w(oe,{joinWith:"|"}),!0),this.lastIndex=0}exec(oe){this.matcherRe.lastIndex=this.lastIndex;const ve=this.matcherRe.exec(oe);if(!ve)return null;const at=ve.findIndex((C,U)=>U>0&&C!==void 0),D=this.matchIndexes[at];return ve.splice(0,at),Object.assign(ve,D)}}class we{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(oe){if(this.multiRegexes[oe])return this.multiRegexes[oe];const ve=new ne;return this.rules.slice(oe).forEach(([at,D])=>ve.addRule(at,D)),ve.compile(),this.multiRegexes[oe]=ve,ve}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(oe,ve){this.rules.push([oe,ve]),ve.type==="begin"&&this.count++}exec(oe){const ve=this.getMatcher(this.regexIndex);ve.lastIndex=this.lastIndex;let at=ve.exec(oe);if(this.resumingScanAtSamePosition()&&!(at&&at.index===this.lastIndex)){const D=this.getMatcher(0);D.lastIndex=this.lastIndex+1,at=D.exec(oe)}return at&&(this.regexIndex+=at.position+1,this.regexIndex===this.count&&this.considerAll()),at}}function Je(ue){const oe=new we;return ue.contains.forEach(ve=>oe.addRule(ve.begin,{rule:ve,type:"begin"})),ue.terminatorEnd&&oe.addRule(ue.terminatorEnd,{type:"end"}),ue.illegal&&oe.addRule(ue.illegal,{type:"illegal"}),oe}function Ye(ue,oe){const ve=ue;if(ue.isCompiled)return ve;[N,F,gr,te].forEach(D=>D(ue,oe)),q.compilerExtensions.forEach(D=>D(ue,oe)),ue.__beforeBegin=null,[I,L,J].forEach(D=>D(ue,oe)),ue.isCompiled=!0;let at=null;return typeof ue.keywords=="object"&&ue.keywords.$pattern&&(ue.keywords=Object.assign({},ue.keywords),at=ue.keywords.$pattern,delete ue.keywords.$pattern),at=at||/\w+/,ue.keywords&&(ue.keywords=Te(ue.keywords,q.case_insensitive)),ve.keywordPatternRe=Y(at,!0),oe&&(ue.begin||(ue.begin=/\B|\b/),ve.beginRe=Y(ve.begin),!ue.end&&!ue.endsWithParent&&(ue.end=/\B|\b/),ue.end&&(ve.endRe=Y(ve.end)),ve.terminatorEnd=d(ve.end)||"",ue.endsWithParent&&oe.terminatorEnd&&(ve.terminatorEnd+=(ue.end?"|":"")+oe.terminatorEnd)),ue.illegal&&(ve.illegalRe=Y(ue.illegal)),ue.contains||(ue.contains=[]),ue.contains=[].concat(...ue.contains.map(function(D){return Qr(D==="self"?ue:D)})),ue.contains.forEach(function(D){Ye(D,ve)}),ue.starts&&Ye(ue.starts,oe),ve.matcher=Je(ve),ve}if(q.compilerExtensions||(q.compilerExtensions=[]),q.contains&&q.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return q.classNameAliases=n(q.classNameAliases||{}),Ye(q)}function rr(q){return q?q.endsWithParent||rr(q.starts):!1}function Qr(q){return q.variants&&!q.cachedVariants&&(q.cachedVariants=q.variants.map(function(Y){return n(q,{variants:null},Y)})),q.cachedVariants?q.cachedVariants:rr(q)?n(q,{starts:q.starts?n(q.starts):null}):Object.isFrozen(q)?n(q):q}var yr="11.11.1";class bt extends Error{constructor(Y,ne){super(Y),this.name="HTMLInjectionError",this.html=ne}}const nr=r,vr=n,_r=Symbol("nomatch"),Xr=7,wr=function(q){const Y=Object.create(null),ne=Object.create(null),we=[];let Je=!0;const Ye="Could not find the language '{}', did you forget to load/include a language module?",ue={disableAutodetect:!0,name:"Plain text",contains:[]};let oe={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:u};function ve(Z){return oe.noHighlightRe.test(Z)}function at(Z){let le=Z.className+" ";le+=Z.parentNode?Z.parentNode.className:"";const Se=oe.languageDetectRe.exec(le);if(Se){const Me=Le(Se[1]);return Me||(gt(Ye.replace("{}",Se[1])),gt("Falling back to no-highlight mode for this block.",Z)),Me?Se[1]:"no-highlight"}return le.split(/\s+/).find(Me=>ve(Me)||Le(Me))}function D(Z,le,Se){let Me="",Qe="";typeof le=="object"?(Me=Z,Se=le.ignoreIllegals,Qe=le.language):(Xe("10.7.0","highlight(lang, code, ...args) has been deprecated."),Xe("10.7.0",`Please use highlight(code, options) instead.
4
+ https://github.com/highlightjs/highlight.js/issues/2277`),Qe=Z,Me=le),Se===void 0&&(Se=!0);const yt={code:Me,language:Qe};Ot("before:highlight",yt);const Nt=yt.result?yt.result:C(yt.language,yt.code,Se);return Nt.code=yt.code,Ot("after:highlight",Nt),Nt}function C(Z,le,Se,Me){const Qe=Object.create(null);function yt(ie,pe){return ie.keywords[pe]}function Nt(){if(!Pe.keywords){ut.addText(We);return}let ie=0;Pe.keywordPatternRe.lastIndex=0;let pe=Pe.keywordPatternRe.exec(We),Oe="";for(;pe;){Oe+=We.substring(ie,pe.index);const Be=At.case_insensitive?pe[0].toLowerCase():pe[0],ht=yt(Pe,Be);if(ht){const[Ut,_i]=ht;if(ut.addText(Oe),Oe="",Qe[Be]=(Qe[Be]||0)+1,Qe[Be]<=Xr&&(br+=_i),Ut.startsWith("_"))Oe+=pe[0];else{const wi=At.classNameAliases[Ut]||Ut;mt(pe[0],wi)}}else Oe+=pe[0];ie=Pe.keywordPatternRe.lastIndex,pe=Pe.keywordPatternRe.exec(We)}Oe+=We.substring(ie),ut.addText(Oe)}function Vt(){if(We==="")return;let ie=null;if(typeof Pe.subLanguage=="string"){if(!Y[Pe.subLanguage]){ut.addText(We);return}ie=C(Pe.subLanguage,We,!0,Jn[Pe.subLanguage]),Jn[Pe.subLanguage]=ie._top}else ie=H(We,Pe.subLanguage.length?Pe.subLanguage:null);Pe.relevance>0&&(br+=ie.relevance),ut.__addSublanguage(ie._emitter,ie.language)}function lt(){Pe.subLanguage!=null?Vt():Nt(),We=""}function mt(ie,pe){ie!==""&&(ut.startScope(pe),ut.addText(ie),ut.endScope())}function sr(ie,pe){let Oe=1;const Be=pe.length-1;for(;Oe<=Be;){if(!ie._emit[Oe]){Oe++;continue}const ht=At.classNameAliases[ie[Oe]]||ie[Oe],Ut=pe[Oe];ht?mt(Ut,ht):(We=Ut,Nt(),We=""),Oe++}}function ir(ie,pe){return ie.scope&&typeof ie.scope=="string"&&ut.openNode(At.classNameAliases[ie.scope]||ie.scope),ie.beginScope&&(ie.beginScope._wrap?(mt(We,At.classNameAliases[ie.beginScope._wrap]||ie.beginScope._wrap),We=""):ie.beginScope._multi&&(sr(ie.beginScope,pe),We="")),Pe=Object.create(ie,{parent:{value:Pe}}),Pe}function Bt(ie,pe,Oe){let Be=h(ie.endRe,Oe);if(Be){if(ie["on:end"]){const ht=new e(ie);ie["on:end"](pe,ht),ht.isMatchIgnored&&(Be=!1)}if(Be){for(;ie.endsParent&&ie.parent;)ie=ie.parent;return ie}}if(ie.endsWithParent)return Bt(ie.parent,pe,Oe)}function pi(ie){return Pe.matcher.regexIndex===0?(We+=ie[0],1):(en=!0,0)}function mi(ie){const pe=ie[0],Oe=ie.rule,Be=new e(Oe),ht=[Oe.__beforeBegin,Oe["on:begin"]];for(const Ut of ht)if(Ut&&(Ut(ie,Be),Be.isMatchIgnored))return pi(pe);return Oe.skip?We+=pe:(Oe.excludeBegin&&(We+=pe),lt(),!Oe.returnBegin&&!Oe.excludeBegin&&(We=pe)),ir(Oe,ie),Oe.returnBegin?0:pe.length}function gi(ie){const pe=ie[0],Oe=le.substring(ie.index),Be=Bt(Pe,ie,Oe);if(!Be)return _r;const ht=Pe;Pe.endScope&&Pe.endScope._wrap?(lt(),mt(pe,Pe.endScope._wrap)):Pe.endScope&&Pe.endScope._multi?(lt(),sr(Pe.endScope,ie)):ht.skip?We+=pe:(ht.returnEnd||ht.excludeEnd||(We+=pe),lt(),ht.excludeEnd&&(We=pe));do Pe.scope&&ut.closeNode(),!Pe.skip&&!Pe.subLanguage&&(br+=Pe.relevance),Pe=Pe.parent;while(Pe!==Be.parent);return Be.starts&&ir(Be.starts,ie),ht.returnEnd?0:pe.length}function yi(){const ie=[];for(let pe=Pe;pe!==At;pe=pe.parent)pe.scope&&ie.unshift(pe.scope);ie.forEach(pe=>ut.openNode(pe))}let $r={};function Wn(ie,pe){const Oe=pe&&pe[0];if(We+=ie,Oe==null)return lt(),0;if($r.type==="begin"&&pe.type==="end"&&$r.index===pe.index&&Oe===""){if(We+=le.slice(pe.index,pe.index+1),!Je){const Be=new Error(`0 width match regex (${Z})`);throw Be.languageName=Z,Be.badRule=$r.rule,Be}return 1}if($r=pe,pe.type==="begin")return mi(pe);if(pe.type==="illegal"&&!Se){const Be=new Error('Illegal lexeme "'+Oe+'" for mode "'+(Pe.scope||"<unnamed>")+'"');throw Be.mode=Pe,Be}else if(pe.type==="end"){const Be=gi(pe);if(Be!==_r)return Be}if(pe.type==="illegal"&&Oe==="")return We+=`
5
+ `,1;if(Zr>1e5&&Zr>pe.index*3)throw new Error("potential infinite loop, way more iterations than matches");return We+=Oe,Oe.length}const At=Le(Z);if(!At)throw Re(Ye.replace("{}",Z)),new Error('Unknown language: "'+Z+'"');const vi=Jt(At);let Yr="",Pe=Me||vi;const Jn={},ut=new oe.__emitter(oe);yi();let We="",br=0,Qt=0,Zr=0,en=!1;try{if(At.__emitTokens)At.__emitTokens(le,ut);else{for(Pe.matcher.considerAll();;){Zr++,en?en=!1:Pe.matcher.considerAll(),Pe.matcher.lastIndex=Qt;const ie=Pe.matcher.exec(le);if(!ie)break;const pe=le.substring(Qt,ie.index),Oe=Wn(pe,ie);Qt=ie.index+Oe}Wn(le.substring(Qt))}return ut.finalize(),Yr=ut.toHTML(),{language:Z,value:Yr,relevance:br,illegal:!1,_emitter:ut,_top:Pe}}catch(ie){if(ie.message&&ie.message.includes("Illegal"))return{language:Z,value:nr(le),illegal:!0,relevance:0,_illegalBy:{message:ie.message,index:Qt,context:le.slice(Qt-100,Qt+100),mode:ie.mode,resultSoFar:Yr},_emitter:ut};if(Je)return{language:Z,value:nr(le),illegal:!1,relevance:0,errorRaised:ie,_emitter:ut,_top:Pe};throw ie}}function U(Z){const le={value:nr(Z),illegal:!1,relevance:0,_top:ue,_emitter:new oe.__emitter(oe)};return le._emitter.addText(Z),le}function H(Z,le){le=le||oe.languages||Object.keys(Y);const Se=U(Z),Me=le.filter(Le).filter(Ge).map(lt=>C(lt,Z,!1));Me.unshift(Se);const Qe=Me.sort((lt,mt)=>{if(lt.relevance!==mt.relevance)return mt.relevance-lt.relevance;if(lt.language&&mt.language){if(Le(lt.language).supersetOf===mt.language)return 1;if(Le(mt.language).supersetOf===lt.language)return-1}return 0}),[yt,Nt]=Qe,Vt=yt;return Vt.secondBest=Nt,Vt}function K(Z,le,Se){const Me=le&&ne[le]||Se;Z.classList.add("hljs"),Z.classList.add(`language-${Me}`)}function fe(Z){let le=null;const Se=at(Z);if(ve(Se))return;if(Ot("before:highlightElement",{el:Z,language:Se}),Z.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Z);return}if(Z.children.length>0&&(oe.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Z)),oe.throwUnescapedHTML))throw new bt("One of your code blocks includes unescaped HTML.",Z.innerHTML);le=Z;const Me=le.textContent,Qe=Se?D(Me,{language:Se,ignoreIllegals:!0}):H(Me);Z.innerHTML=Qe.value,Z.dataset.highlighted="yes",K(Z,Se,Qe.language),Z.result={language:Qe.language,re:Qe.relevance,relevance:Qe.relevance},Qe.secondBest&&(Z.secondBest={language:Qe.secondBest.language,relevance:Qe.secondBest.relevance}),Ot("after:highlightElement",{el:Z,result:Qe,text:Me})}function ge(Z){oe=vr(oe,Z)}const je=()=>{ke(),Xe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ke(){ke(),Xe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Ze=!1;function ke(){function Z(){ke()}if(document.readyState==="loading"){Ze||window.addEventListener("DOMContentLoaded",Z,!1),Ze=!0;return}document.querySelectorAll(oe.cssSelector).forEach(fe)}function He(Z,le){let Se=null;try{Se=le(q)}catch(Me){if(Re("Language definition for '{}' could not be registered.".replace("{}",Z)),Je)Re(Me);else throw Me;Se=ue}Se.name||(Se.name=Z),Y[Z]=Se,Se.rawDefinition=le.bind(null,q),Se.aliases&&rt(Se.aliases,{languageName:Z})}function tt(Z){delete Y[Z];for(const le of Object.keys(ne))ne[le]===Z&&delete ne[le]}function $e(){return Object.keys(Y)}function Le(Z){return Z=(Z||"").toLowerCase(),Y[Z]||Y[ne[Z]]}function rt(Z,{languageName:le}){typeof Z=="string"&&(Z=[Z]),Z.forEach(Se=>{ne[Se.toLowerCase()]=le})}function Ge(Z){const le=Le(Z);return le&&!le.disableAutodetect}function Ct(Z){Z["before:highlightBlock"]&&!Z["before:highlightElement"]&&(Z["before:highlightElement"]=le=>{Z["before:highlightBlock"](Object.assign({block:le.el},le))}),Z["after:highlightBlock"]&&!Z["after:highlightElement"]&&(Z["after:highlightElement"]=le=>{Z["after:highlightBlock"](Object.assign({block:le.el},le))})}function Et(Z){Ct(Z),we.push(Z)}function St(Z){const le=we.indexOf(Z);le!==-1&&we.splice(le,1)}function Ot(Z,le){const Se=Z;we.forEach(function(Me){Me[Se]&&Me[Se](le)})}function Lt(Z){return Xe("10.7.0","highlightBlock will be removed entirely in v12.0"),Xe("10.7.0","Please use highlightElement now."),fe(Z)}Object.assign(q,{highlight:D,highlightAuto:H,highlightAll:ke,highlightElement:fe,highlightBlock:Lt,configure:ge,initHighlighting:je,initHighlightingOnLoad:Ke,registerLanguage:He,unregisterLanguage:tt,listLanguages:$e,getLanguage:Le,registerAliases:rt,autoDetection:Ge,inherit:vr,addPlugin:Et,removePlugin:St}),q.debugMode=function(){Je=!1},q.safeMode=function(){Je=!0},q.versionString=yr,q.regex={concat:E,lookahead:$,either:o,optional:b,anyNumberOfTimes:P};for(const Z in re)typeof re[Z]=="object"&&t(re[Z]);return Object.assign(q,re),q},xt=wr({});return xt.newInstance=()=>wr({}),nn=xt,xt.HighlightJS=xt,xt.default=xt,nn}var wa=_a();const es=zi(wa);var $a=it("<pre><code><!></code></pre>");function ba(t,e){const r=Rr(e,["children","$$slots","$$events","$$legacy"]),n=Rr(r,["code","highlighted","languageName","langtag"]);let s=Yt(e,"code",8),l=Yt(e,"highlighted",8),i=Yt(e,"languageName",8,"plaintext"),c=Yt(e,"langtag",8,!1);var a=$a();Fi(a,()=>({"data-language":i(),...n,[xi]:{langtag:c()}}),void 0,void 0,void 0,"svelte-4jgeki");var f=me(a);fr(f,1,"",null,{},{hljs:!0});var u=me(f);{var d=P=>{var b=Ht(),E=_t(b);Ji(E,l),Fe(P,b)},$=P=>{var b=Si();ft(()=>et(b,s())),Fe(P,b)};pt(u,P=>{l()?P(d):P($,!1)})}de(f),de(a),Fe(t,a)}function ts(t,e){const r=Rr(e,["children","$$slots","$$events","$$legacy"]),n=Rr(r,["language","code","langtag"]);zt(e,!1);let s=Yt(e,"language",8),l=Yt(e,"code",8),i=Yt(e,"langtag",8,!1);const c=Ci();let a=Di("");Ai(()=>{ae(a)&&c("highlight",{highlighted:ae(a)})}),ji(()=>(tn(s()),tn(l())),()=>{es.registerLanguage(s().name,s().register),vt(a,es.highlight(l(),{language:s().name}).value)}),Mi(),Es();var f=Ht(),u=_t(f);Qi(u,e,"default",{get highlighted(){return ae(a)}},d=>{ba(d,Wi(()=>n,{get languageName(){return tn(s()),qi(()=>s().name)},get langtag(){return i()},get highlighted(){return ae(a)},get code(){return l()}}))}),Fe(t,f),Ft()}function Ea(t){const e={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},n=["true","false","null"],s={scope:"literal",beginKeywords:n.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:n},contains:[e,r,t.QUOTE_STRING_MODE,s,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}const rs={name:"json",register:Ea},Ps=pr({}),ks=pr({});let Ir=0;function sn(t,e,r=!1,n){let s;const l=++Ir;e.id?s=e.id:s=`${l}`,e.id=s,r&&(s=`${s}-${++Ir}`);const i=Date.now();return ks.update(c=>(c[s]||(c[s]={timestamp:i,sortKey:l,requestId:n}),c)),Ps.update(c=>{if(!c[s])t==="SEND"?c[s]=[e,{}]:c[s]=[{},e];else{const a=t==="SEND"?0:1;c[s][a]=e}return c}),e}const Os=pr([]);function an(t,e){const r={_logType:t,_logId:`${t}-${++Ir}`,_sortKey:Ir,_timestamp:Date.now(),payload:e};Os.update(n=>[r,...n])}var Sa=it(`<style>body {
6
+ overflow: hidden;
7
+ }</style>`),Pa=it('<div class="p-8 text-center text-gray-500"><div class="text-4xl mb-2">📭</div> <p class="font-medium">No activity yet</p> <p class="text-sm">Activity will appear here when you interact with Sockethub</p></div>'),ka=it('<ul class="divide-y divide-gray-100"></ul>'),Oa=it('<div class="bg-gradient-to-r from-green-50 to-emerald-50 border border-green-200 rounded-lg p-4"><h4 class="font-semibold text-green-900 mb-3 flex items-center"><span class="mr-2">📥</span> Response from Sockethub</h4> <div class="bg-white rounded border border-green-200 overflow-hidden"><!></div></div>'),Na=it(`<div class="bg-gradient-to-r from-slate-50 to-gray-50 border border-gray-200 rounded-xl p-6 shadow-sm"><div class="flex items-center justify-between mb-4"><div><h3 class="text-xl font-bold text-gray-900 flex items-center"><span class="mr-2">📡</span> Sockethub Activity Log</h3> <p class="text-gray-600 text-sm mt-1">Real-time communication between your browser and Sockethub server</p></div> <div class="flex items-center space-x-4 text-xs"><div class="flex items-center space-x-1"><div class="w-3 h-3 bg-orange-400 rounded-full"></div> <span class="text-gray-600">Pending</span></div> <div class="flex items-center space-x-1"><div class="w-3 h-3 bg-green-500 rounded-full"></div> <span class="text-gray-600">Complete</span></div> <div class="flex items-center space-x-1"><div class="w-3 h-3 bg-indigo-500 rounded-full"></div> <span class="text-gray-600">Schema</span></div></div></div> <div class="bg-white rounded-lg border border-gray-200 shadow-sm"><div class="p-4 border-b border-gray-200 bg-gray-50 rounded-t-lg"><p class="text-sm text-gray-700">💡 <strong>How to read this log:</strong> Each entry shows messages sent to and received from Sockethub.
8
+ Click "View Details" to see the full JSON data being exchanged.</p></div> <div id="messages" class="max-h-96 overflow-y-auto"><!></div></div></div> <div><div class="bg-white rounded-xl shadow-2xl max-w-4xl w-full max-h-[90vh] overflow-hidden flex flex-col"><div class="bg-gradient-to-r from-indigo-50 to-purple-50 px-6 py-4 border-b border-gray-200"><div class="flex items-center justify-between"><h3 class="text-lg font-bold text-gray-900 flex items-center"><span class="mr-2">🔍</span> </h3> <button type="button" aria-label="Close activity log details" class="text-gray-400 hover:text-gray-600 transition-colors"><svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div> <p class="text-gray-600 text-sm mt-1">Raw JSON data showing the ActivityStreams message exchange with Sockethub</p></div> <div class="flex-1 overflow-auto p-6 space-y-6"><div class="bg-gradient-to-r from-blue-50 to-cyan-50 border border-blue-200 rounded-lg p-4"><h4 class="font-semibold text-blue-900 mb-3 flex items-center"><span class="mr-2"> </span> </h4> <div class="bg-white rounded border border-blue-200 overflow-hidden"><!></div></div> <!></div> <div class="bg-gray-50 px-6 py-4 border-t border-gray-200 flex justify-end"><button class="px-6 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors font-medium">Close</button></div></div></div>`,1);function qu(t,e){zt(e,!0);let r=Xt(rn({})),n=Xt(rn({})),s=Xt(rn([])),l=Xt(!1),i=Xt(""),c=Xt(""),a=Xt("ActivityStreams Data Exchange");Ps.subscribe(M=>{vt(r,M,!0)}),ks.subscribe(M=>{vt(n,M,!0)}),Os.subscribe(M=>{vt(s,M,!0)});const f=st(()=>{const M=[];for(const[R,m]of Object.entries(ae(r)??{})){const k=ae(n)[R];M.push({kind:"activity",id:R,sortKey:(k==null?void 0:k.sortKey)??0,tuple:m,timestamp:(k==null?void 0:k.timestamp)??0})}for(const R of ae(s))M.push({kind:"schema",sortKey:R._sortKey,entry:R});return M.sort((R,m)=>m.sortKey-R.sortKey),M});function u(M){return()=>{const{sent:R,response:m}=ea(ae(r),ae(n),M);vt(a,"ActivityStreams Data Exchange"),vt(l,!0),vt(i,R?JSON.stringify(R,null,2):"",!0),vt(c,m&&Object.keys(m).length>0?JSON.stringify(m,null,2):"",!0)}}function d(M){return()=>{vt(a,`Schema Event: ${M._logType}`),vt(l,!0),vt(i,JSON.stringify(M.payload,null,2),!0),vt(c,"")}}var $=Na();Xi("asm1x0",M=>{var R=Ht(),m=_t(R);{var k=A=>{var G=Sa();Fe(A,G)};pt(m,A=>{ae(l)&&A(k)})}Fe(M,R)});var P=_t($),b=qe(me(P),2),E=qe(me(b),2),_=me(E);{var o=M=>{var R=Pa();Fe(M,R)},v=M=>{var R=ka();_n(R,21,()=>ae(f),m=>m.kind==="schema"?m.entry._logId:m.id,(m,k)=>{var A=Ht(),G=_t(A);{var Q=re=>{{let ye=st(()=>d(ae(k).entry));va(re,{get entry(){return ae(k).entry},get buttonAction(){return ae(ye)}})}},se=re=>{var ye=Ht(),N=_t(ye);{var I=F=>{var J=Ht(),te=_t(J);_n(te,17,()=>Object.entries(ae(k).tuple[ae(k).tuple.length-1]),bs,(be,Ue)=>{var Te=st(()=>Li(ae(Ue),2));let Ae=()=>ae(Te)[0],_e=()=>ae(Te)[1];var xe=Ht(),Re=_t(xe);{var gt=Xe=>{{let dt=st(()=>u(`${ae(k).id}-${Ae()}`)),$t=st(()=>Object.prototype.hasOwnProperty.call(ae(k).tuple[0],"@context")),ct=st(()=>typeof ae(r)[ae(k).id][1]<"u"),wt=st(()=>`${ae(k).id}-${Ae()}`);Yn(Xe,{get buttonAction(){return ae(dt)},get hasSend(){return ae($t)},get hasResponse(){return ae(ct)},get id(){return ae(wt)},get entry(){return _e()},get timestamp(){return ae(k).timestamp}})}};pt(Re,Xe=>{_e()&&Xe(gt)})}Fe(be,xe)}),Fe(F,J)},L=F=>{const J=st(()=>Object.prototype.hasOwnProperty.call(ae(k).tuple[0],"@context")),te=st(()=>Object.prototype.hasOwnProperty.call(ae(k).tuple[1],"@context"));{let be=st(()=>u(ae(k).id)),Ue=st(()=>ae(te)?ae(k).tuple[1]:ae(k).tuple[0]);Yn(F,{get buttonAction(){return ae(be)},get id(){return ae(k).id},get hasSend(){return ae(J)},get hasResponse(){return ae(te)},get entry(){return ae(Ue)},get timestamp(){return ae(k).timestamp}})}};pt(N,F=>{Array.isArray(ae(k).tuple[ae(k).tuple.length-1])?F(I):F(L,!1)},!0)}Fe(re,ye)};pt(G,re=>{ae(k).kind==="schema"?re(Q):re(se,!1)})}Fe(m,A)}),de(R),Fe(M,R)};pt(_,M=>{ae(f).length===0?M(o):M(v,!1)})}de(E),de(b),de(P);var h=qe(P,2),y=me(h),w=me(y),g=me(w),p=me(g),S=qe(me(p));de(p);var O=qe(p,2);O.__click=()=>vt(l,!1),de(g),$s(2),de(w);var j=qe(w,2),z=me(j),V=me(z),X=me(V),W=me(X,!0);de(X);var ee=qe(X);de(V);var he=qe(V,2),Ee=me(he);ts(Ee,{get language(){return rs},get code(){return ae(i)}}),de(he),de(z);var Ce=qe(z,2);{var ce=M=>{var R=Oa(),m=qe(me(R),2),k=me(m);ts(k,{get language(){return rs},get code(){return ae(c)}}),de(m),de(R),Fe(M,R)};pt(Ce,M=>{ae(c)&&M(ce)})}de(j);var x=qe(j,2),T=me(x);T.__click=()=>vt(l,!1),de(x),de(y),de(h),ft(()=>{fr(h,1,`${ae(l)?"flex items-center justify-center":"hidden"} bg-black bg-opacity-50 fixed top-0 left-0 w-full h-full z-50 p-4`),et(S,` ${ae(a)??""}`),et(W,ae(c)?"📤":"📋"),et(ee,` ${ae(c)?"Sent to Sockethub":"Event Payload"}`)}),Fe(t,$),Ft()}Nn(["click"]);var ns="https://sockethub.org/ns/context/platform/";function Cr(t){if(Array.isArray(t)){for(const e of t)if(typeof e=="string"&&e.startsWith(ns)){const r=e.slice(ns.length),n=r.indexOf("/");if(n>0)return r.slice(0,n)}}}var Ta=Object.create,Ra=Object.getPrototypeOf,Ar=Object.defineProperty,Ns=Object.getOwnPropertyNames,Ia=Object.getOwnPropertyDescriptor,Ts=Object.prototype.hasOwnProperty;function Rs(t){return this[t]}var Ca,er=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var s=Ca??(Ca=new WeakMap),l=s.get(t);if(l)return l}r=t!=null?Ta(Ra(t)):{};const i=Ar(r,"default",{value:t,enumerable:!0});if(t&&typeof t=="object"||typeof t=="function")for(let c of Ns(t))Ts.call(i,c)||Ar(i,c,{get:Rs.bind(t,c),enumerable:!0});return n&&s.set(t,i),i},Aa=t=>{var e=(ss??(ss=new WeakMap)).get(t),r;if(e)return e;if(e=Ar({},"__esModule",{value:!0}),t&&typeof t=="object"||typeof t=="function")for(var n of Ns(t))Ts.call(e,n)||Ar(e,n,{get:Rs.bind(t,n),enumerable:!(r=Ia(t,n))||r.enumerable});return ss.set(t,e),e},ss,B=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ja=(t,e,r)=>()=>{if(t)try{e=t(t=0)}catch(n){r=[n]}if(r)throw r[0];return e},jr=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(v){if(super(),!t.IDENTIFIER.test(v))throw new Error("CodeGen: name must be a valid identifier");this.str=v}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(v){super(),this._items=typeof v=="string"?[v]:v}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const v=this._items[0];return v===""||v==='""'}get str(){var v;return(v=this._str)!==null&&v!==void 0?v:this._str=this._items.reduce((h,y)=>`${h}${y}`,"")}get names(){var v;return(v=this._names)!==null&&v!==void 0?v:this._names=this._items.reduce((h,y)=>(y instanceof r&&(h[y.str]=(h[y.str]||0)+1),h),{})}}t._Code=n,t.nil=new n("");function s(o,...v){const h=[o[0]];let y=0;for(;y<v.length;)c(h,v[y]),h.push(o[++y]);return new n(h)}t._=s;var l=new n("+");function i(o,...v){const h=[P(o[0])];let y=0;for(;y<v.length;)h.push(l),c(h,v[y]),h.push(l,P(o[++y]));return a(h),new n(h)}t.str=i;function c(o,v){v instanceof n?o.push(...v._items):v instanceof r?o.push(v):o.push(d(v))}t.addCodeArg=c;function a(o){let v=1;for(;v<o.length-1;){if(o[v]===l){const h=f(o[v-1],o[v+1]);if(h!==void 0){o.splice(v-1,3,h);continue}o[v++]="+"}v++}}function f(o,v){if(v==='""')return o;if(o==='""')return v;if(typeof o=="string")return v instanceof r||o[o.length-1]!=='"'?void 0:typeof v!="string"?`${o.slice(0,-1)}${v}"`:v[0]==='"'?o.slice(0,-1)+v.slice(1):void 0;if(typeof v=="string"&&v[0]==='"'&&!(o instanceof r))return`"${o}${v.slice(1)}`}function u(o,v){return v.emptyStr()?o:o.emptyStr()?v:i`${o}${v}`}t.strConcat=u;function d(o){return typeof o=="number"||typeof o=="boolean"||o===null?o:P(Array.isArray(o)?o.join(","):o)}function $(o){return new n(P(o))}t.stringify=$;function P(o){return JSON.stringify(o).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=P;function b(o){return typeof o=="string"&&t.IDENTIFIER.test(o)?new n(`.${o}`):s`[${o}]`}t.getProperty=b;function E(o){if(typeof o=="string"&&t.IDENTIFIER.test(o))return new n(`${o}`);throw new Error(`CodeGen: invalid export name: ${o}, use explicit $id name mapping`)}t.getEsmExportName=E;function _(o){return new n(o.toString())}t.regexpCode=_}),is=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=jr();class r extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var n;(function(a){a[a.Started=0]="Started",a[a.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class s{constructor({prefixes:f,parent:u}={}){this._names={},this._prefixes=f,this._parent=u}toName(f){return f instanceof e.Name?f:this.name(f)}name(f){return new e.Name(this._newName(f))}_newName(f){const u=this._names[f]||this._nameGroup(f);return`${f}${u.index++}`}_nameGroup(f){var u,d;if(!((d=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||d===void 0)&&d.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}t.Scope=s;class l extends e.Name{constructor(f,u){super(u),this.prefix=f}setValue(f,{property:u,itemIndex:d}){this.value=f,this.scopePath=(0,e._)`.${new e.Name(u)}[${d}]`}}t.ValueScopeName=l;var i=(0,e._)`\n`;class c extends s{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?i:e.nil}}get(){return this._scope}name(f){return new l(f,this._newName(f))}value(f,u){var d;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const $=this.toName(f),{prefix:P}=$,b=(d=u.key)!==null&&d!==void 0?d:u.ref;let E=this._values[P];if(E){const v=E.get(b);if(v)return v}else E=this._values[P]=new Map;E.set(b,$);const _=this._scope[P]||(this._scope[P]=[]),o=_.length;return _[o]=u.ref,$.setValue(u,{property:P,itemIndex:o}),$}getValue(f,u){const d=this._values[f];if(d)return d.get(u)}scopeRefs(f,u=this._values){return this._reduceValues(u,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e._)`${f}${d.scopePath}`})}scopeCode(f=this._values,u,d){return this._reduceValues(f,$=>{if($.value===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return $.value.code},u,d)}_reduceValues(f,u,d={},$){let P=e.nil;for(const b in f){const E=f[b];if(!E)continue;const _=d[b]=d[b]||new Map;E.forEach(o=>{if(_.has(o))return;_.set(o,n.Started);let v=u(o);if(v){const h=this.opts.es5?t.varKinds.var:t.varKinds.const;P=(0,e._)`${P}${h} ${o} = ${v};${this.opts._n}`}else if(v=$==null?void 0:$(o))P=(0,e._)`${P}${v}${this.opts._n}`;else throw new r(o);_.set(o,n.Completed)})}return P}}t.ValueScope=c}),Ie=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var e=jr(),r=is(),n=jr();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var s=is();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class l{optimizeNodes(){return this}optimizeNames(m,k){return this}}class i extends l{constructor(m,k,A){super(),this.varKind=m,this.name=k,this.rhs=A}render({es5:m,_n:k}){const A=m?r.varKinds.var:this.varKind,G=this.rhs===void 0?"":` = ${this.rhs}`;return`${A} ${this.name}${G};`+k}optimizeNames(m,k){if(m[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,m,k)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class c extends l{constructor(m,k,A){super(),this.lhs=m,this.rhs=k,this.sideEffects=A}render({_n:m}){return`${this.lhs} = ${this.rhs};`+m}optimizeNames(m,k){if(!(this.lhs instanceof e.Name&&!m[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,m,k),this}get names(){const m=this.lhs instanceof e.Name?{}:{...this.lhs.names};return X(m,this.rhs)}}class a extends c{constructor(m,k,A,G){super(m,A,G),this.op=k}render({_n:m}){return`${this.lhs} ${this.op}= ${this.rhs};`+m}}class f extends l{constructor(m){super(),this.label=m,this.names={}}render({_n:m}){return`${this.label}:`+m}}class u extends l{constructor(m){super(),this.label=m,this.names={}}render({_n:m}){return`break${this.label?` ${this.label}`:""};`+m}}class d extends l{constructor(m){super(),this.error=m}render({_n:m}){return`throw ${this.error};`+m}get names(){return this.error.names}}class $ extends l{constructor(m){super(),this.code=m}render({_n:m}){return`${this.code};`+m}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(m,k){return this.code=W(this.code,m,k),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class P extends l{constructor(m=[]){super(),this.nodes=m}render(m){return this.nodes.reduce((k,A)=>k+A.render(m),"")}optimizeNodes(){const{nodes:m}=this;let k=m.length;for(;k--;){const A=m[k].optimizeNodes();Array.isArray(A)?m.splice(k,1,...A):A?m[k]=A:m.splice(k,1)}return m.length>0?this:void 0}optimizeNames(m,k){const{nodes:A}=this;let G=A.length;for(;G--;){const Q=A[G];Q.optimizeNames(m,k)||(ee(m,Q.names),A.splice(G,1))}return A.length>0?this:void 0}get names(){return this.nodes.reduce((m,k)=>V(m,k.names),{})}}class b extends P{render(m){return"{"+m._n+super.render(m)+"}"+m._n}}class E extends P{}class _ extends b{}_.kind="else";class o extends b{constructor(m,k){super(k),this.condition=m}render(m){let k=`if(${this.condition})`+super.render(m);return this.else&&(k+="else "+this.else.render(m)),k}optimizeNodes(){super.optimizeNodes();const m=this.condition;if(m===!0)return this.nodes;let k=this.else;if(k){const A=k.optimizeNodes();k=this.else=Array.isArray(A)?new _(A):A}if(k)return m===!1?k instanceof o?k:k.nodes:this.nodes.length?this:new o(he(m),k instanceof o?[k]:k.nodes);if(!(m===!1||!this.nodes.length))return this}optimizeNames(m,k){var A;if(this.else=(A=this.else)===null||A===void 0?void 0:A.optimizeNames(m,k),!!(super.optimizeNames(m,k)||this.else))return this.condition=W(this.condition,m,k),this}get names(){const m=super.names;return X(m,this.condition),this.else&&V(m,this.else.names),m}}o.kind="if";class v extends b{}v.kind="for";class h extends v{constructor(m){super(),this.iteration=m}render(m){return`for(${this.iteration})`+super.render(m)}optimizeNames(m,k){if(super.optimizeNames(m,k))return this.iteration=W(this.iteration,m,k),this}get names(){return V(super.names,this.iteration.names)}}class y extends v{constructor(m,k,A,G){super(),this.varKind=m,this.name=k,this.from=A,this.to=G}render(m){const k=m.es5?r.varKinds.var:this.varKind,{name:A,from:G,to:Q}=this;return`for(${k} ${A}=${G}; ${A}<${Q}; ${A}++)`+super.render(m)}get names(){const m=X(super.names,this.from);return X(m,this.to)}}class w extends v{constructor(m,k,A,G){super(),this.loop=m,this.varKind=k,this.name=A,this.iterable=G}render(m){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(m)}optimizeNames(m,k){if(super.optimizeNames(m,k))return this.iterable=W(this.iterable,m,k),this}get names(){return V(super.names,this.iterable.names)}}class g extends b{constructor(m,k,A){super(),this.name=m,this.args=k,this.async=A}render(m){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(m)}}g.kind="func";class p extends P{render(m){return"return "+super.render(m)}}p.kind="return";class S extends b{render(m){let k="try"+super.render(m);return this.catch&&(k+=this.catch.render(m)),this.finally&&(k+=this.finally.render(m)),k}optimizeNodes(){var m,k;return super.optimizeNodes(),(m=this.catch)===null||m===void 0||m.optimizeNodes(),(k=this.finally)===null||k===void 0||k.optimizeNodes(),this}optimizeNames(m,k){var A,G;return super.optimizeNames(m,k),(A=this.catch)===null||A===void 0||A.optimizeNames(m,k),(G=this.finally)===null||G===void 0||G.optimizeNames(m,k),this}get names(){const m=super.names;return this.catch&&V(m,this.catch.names),this.finally&&V(m,this.finally.names),m}}class O extends b{constructor(m){super(),this.error=m}render(m){return`catch(${this.error})`+super.render(m)}}O.kind="catch";class j extends b{render(m){return"finally"+super.render(m)}}j.kind="finally";class z{constructor(m,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
9
+ `:""},this._extScope=m,this._scope=new r.Scope({parent:m}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(m){return this._scope.name(m)}scopeName(m){return this._extScope.name(m)}scopeValue(m,k){const A=this._extScope.value(m,k);return(this._values[A.prefix]||(this._values[A.prefix]=new Set)).add(A),A}getScopeValue(m,k){return this._extScope.getValue(m,k)}scopeRefs(m){return this._extScope.scopeRefs(m,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(m,k,A,G){const Q=this._scope.toName(k);return A!==void 0&&G&&(this._constants[Q.str]=A),this._leafNode(new i(m,Q,A)),Q}const(m,k,A){return this._def(r.varKinds.const,m,k,A)}let(m,k,A){return this._def(r.varKinds.let,m,k,A)}var(m,k,A){return this._def(r.varKinds.var,m,k,A)}assign(m,k,A){return this._leafNode(new c(m,k,A))}add(m,k){return this._leafNode(new a(m,t.operators.ADD,k))}code(m){return typeof m=="function"?m():m!==e.nil&&this._leafNode(new $(m)),this}object(...m){const k=["{"];for(const[A,G]of m)k.length>1&&k.push(","),k.push(A),(A!==G||this.opts.es5)&&(k.push(":"),(0,e.addCodeArg)(k,G));return k.push("}"),new e._Code(k)}if(m,k,A){if(this._blockNode(new o(m)),k&&A)this.code(k).else().code(A).endIf();else if(k)this.code(k).endIf();else if(A)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(m){return this._elseNode(new o(m))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(o,_)}_for(m,k){return this._blockNode(m),k&&this.code(k).endFor(),this}for(m,k){return this._for(new h(m),k)}forRange(m,k,A,G,Q=this.opts.es5?r.varKinds.var:r.varKinds.let){const se=this._scope.toName(m);return this._for(new y(Q,se,k,A),()=>G(se))}forOf(m,k,A,G=r.varKinds.const){const Q=this._scope.toName(m);if(this.opts.es5){const se=k instanceof e.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,e._)`${se}.length`,re=>{this.var(Q,(0,e._)`${se}[${re}]`),A(Q)})}return this._for(new w("of",G,Q,k),()=>A(Q))}forIn(m,k,A,G=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(m,(0,e._)`Object.keys(${k})`,A);const Q=this._scope.toName(m);return this._for(new w("in",G,Q,k),()=>A(Q))}endFor(){return this._endBlockNode(v)}label(m){return this._leafNode(new f(m))}break(m){return this._leafNode(new u(m))}return(m){const k=new p;if(this._blockNode(k),this.code(m),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(p)}try(m,k,A){if(!k&&!A)throw new Error('CodeGen: "try" without "catch" and "finally"');const G=new S;if(this._blockNode(G),this.code(m),k){const Q=this.name("e");this._currNode=G.catch=new O(Q),k(Q)}return A&&(this._currNode=G.finally=new j,this.code(A)),this._endBlockNode(O,j)}throw(m){return this._leafNode(new d(m))}block(m,k){return this._blockStarts.push(this._nodes.length),m&&this.code(m).endBlock(k),this}endBlock(m){const k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");const A=this._nodes.length-k;if(A<0||m!==void 0&&A!==m)throw new Error(`CodeGen: wrong number of nodes: ${A} vs ${m} expected`);return this._nodes.length=k,this}func(m,k=e.nil,A,G){return this._blockNode(new g(m,k,A)),G&&this.code(G).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(m=1){for(;m-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(m){return this._currNode.nodes.push(m),this}_blockNode(m){this._currNode.nodes.push(m),this._nodes.push(m)}_endBlockNode(m,k){const A=this._currNode;if(A instanceof m||k&&A instanceof k)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${k?`${m.kind}/${k.kind}`:m.kind}"`)}_elseNode(m){const k=this._currNode;if(!(k instanceof o))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=m,this}get _root(){return this._nodes[0]}get _currNode(){const m=this._nodes;return m[m.length-1]}set _currNode(m){const k=this._nodes;k[k.length-1]=m}}t.CodeGen=z;function V(R,m){for(const k in m)R[k]=(R[k]||0)+(m[k]||0);return R}function X(R,m){return m instanceof e._CodeOrName?V(R,m.names):R}function W(R,m,k){if(R instanceof e.Name)return A(R);if(!G(R))return R;return new e._Code(R._items.reduce((Q,se)=>(se instanceof e.Name&&(se=A(se)),se instanceof e._Code?Q.push(...se._items):Q.push(se),Q),[]));function A(Q){const se=k[Q.str];return se===void 0||m[Q.str]!==1?Q:(delete m[Q.str],se)}function G(Q){return Q instanceof e._Code&&Q._items.some(se=>se instanceof e.Name&&m[se.str]===1&&k[se.str]!==void 0)}}function ee(R,m){for(const k in m)R[k]=(R[k]||0)-(m[k]||0)}function he(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,e._)`!${M(R)}`}t.not=he;var Ee=T(t.operators.AND);function Ce(...R){return R.reduce(Ee)}t.and=Ce;var ce=T(t.operators.OR);function x(...R){return R.reduce(ce)}t.or=x;function T(R){return(m,k)=>m===e.nil?k:k===e.nil?m:(0,e._)`${M(m)} ${R} ${M(k)}`}function M(R){return R instanceof e.Name?R:(0,e._)`(${R})`}}),Ve=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;var e=Ie(),r=jr();function n(g){const p={};for(const S of g)p[S]=!0;return p}t.toHash=n;function s(g,p){return typeof p=="boolean"?p:Object.keys(p).length===0?!0:(l(g,p),!i(p,g.self.RULES.all))}t.alwaysValidSchema=s;function l(g,p=g.schema){const{opts:S,self:O}=g;if(!S.strictSchema||typeof p=="boolean")return;const j=O.RULES.keywords;for(const z in p)j[z]||w(g,`unknown keyword: "${z}"`)}t.checkUnknownRules=l;function i(g,p){if(typeof g=="boolean")return!g;for(const S in g)if(p[S])return!0;return!1}t.schemaHasRules=i;function c(g,p){if(typeof g=="boolean")return!g;for(const S in g)if(S!=="$ref"&&p.all[S])return!0;return!1}t.schemaHasRulesButRef=c;function a({topSchemaRef:g,schemaPath:p},S,O,j){if(!j){if(typeof S=="number"||typeof S=="boolean")return S;if(typeof S=="string")return(0,e._)`${S}`}return(0,e._)`${g}${p}${(0,e.getProperty)(O)}`}t.schemaRefOrVal=a;function f(g){return $(decodeURIComponent(g))}t.unescapeFragment=f;function u(g){return encodeURIComponent(d(g))}t.escapeFragment=u;function d(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=d;function $(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=$;function P(g,p){if(Array.isArray(g))for(const S of g)p(S);else p(g)}t.eachItem=P;function b({mergeNames:g,mergeToName:p,mergeValues:S,resultToName:O}){return(j,z,V,X)=>{const W=V===void 0?z:V instanceof e.Name?(z instanceof e.Name?g(j,z,V):p(j,z,V),V):z instanceof e.Name?(p(j,V,z),z):S(z,V);return X===e.Name&&!(W instanceof e.Name)?O(j,W):W}}t.mergeEvaluated={props:b({mergeNames:(g,p,S)=>g.if((0,e._)`${S} !== true && ${p} !== undefined`,()=>{g.if((0,e._)`${p} === true`,()=>g.assign(S,!0),()=>g.assign(S,(0,e._)`${S} || {}`).code((0,e._)`Object.assign(${S}, ${p})`))}),mergeToName:(g,p,S)=>g.if((0,e._)`${S} !== true`,()=>{p===!0?g.assign(S,!0):(g.assign(S,(0,e._)`${S} || {}`),_(g,S,p))}),mergeValues:(g,p)=>g===!0?!0:{...g,...p},resultToName:E}),items:b({mergeNames:(g,p,S)=>g.if((0,e._)`${S} !== true && ${p} !== undefined`,()=>g.assign(S,(0,e._)`${p} === true ? true : ${S} > ${p} ? ${S} : ${p}`)),mergeToName:(g,p,S)=>g.if((0,e._)`${S} !== true`,()=>g.assign(S,p===!0?!0:(0,e._)`${S} > ${p} ? ${S} : ${p}`)),mergeValues:(g,p)=>g===!0?!0:Math.max(g,p),resultToName:(g,p)=>g.var("items",p)})};function E(g,p){if(p===!0)return g.var("props",!0);const S=g.var("props",(0,e._)`{}`);return p!==void 0&&_(g,S,p),S}t.evaluatedPropsToName=E;function _(g,p,S){Object.keys(S).forEach(O=>g.assign((0,e._)`${p}${(0,e.getProperty)(O)}`,!0))}t.setEvaluated=_;var o={};function v(g,p){return g.scopeValue("func",{ref:p,code:o[p.code]||(o[p.code]=new r._Code(p.code))})}t.useFunc=v;var h;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(h||(t.Type=h={}));function y(g,p,S){if(g instanceof e.Name){const O=p===h.Num;return S?O?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:O?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return S?(0,e.getProperty)(g).toString():"/"+d(g)}t.getErrorPath=y;function w(g,p,S=g.opts.strictSchema){if(S){if(p=`strict mode: ${p}`,S===!0)throw new Error(p);g.self.logger.warn(p)}}t.checkStrictMode=w}),Gt=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ie(),r={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};t.default=r}),Vr=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=Ie(),r=Ve(),n=Gt();t.keywordError={message:({keyword:_})=>(0,e.str)`must pass "${_}" keyword validation`},t.keyword$DataError={message:({keyword:_,schemaType:o})=>o?(0,e.str)`"${_}" keyword must be ${o} ($data)`:(0,e.str)`"${_}" keyword is invalid ($data)`};function s(_,o=t.keywordError,v,h){const{it:y}=_,{gen:w,compositeRule:g,allErrors:p}=y,S=d(_,o,v);h??(g||p)?a(w,S):f(y,(0,e._)`[${S}]`)}t.reportError=s;function l(_,o=t.keywordError,v){const{it:h}=_,{gen:y,compositeRule:w,allErrors:g}=h,p=d(_,o,v);a(y,p),w||g||f(h,n.default.vErrors)}t.reportExtraError=l;function i(_,o){_.assign(n.default.errors,o),_.if((0,e._)`${n.default.vErrors} !== null`,()=>_.if(o,()=>_.assign((0,e._)`${n.default.vErrors}.length`,o),()=>_.assign(n.default.vErrors,null)))}t.resetErrorsCount=i;function c({gen:_,keyword:o,schemaValue:v,data:h,errsCount:y,it:w}){if(y===void 0)throw new Error("ajv implementation error");const g=_.name("err");_.forRange("i",y,n.default.errors,p=>{_.const(g,(0,e._)`${n.default.vErrors}[${p}]`),_.if((0,e._)`${g}.instancePath === undefined`,()=>_.assign((0,e._)`${g}.instancePath`,(0,e.strConcat)(n.default.instancePath,w.errorPath))),_.assign((0,e._)`${g}.schemaPath`,(0,e.str)`${w.errSchemaPath}/${o}`),w.opts.verbose&&(_.assign((0,e._)`${g}.schema`,v),_.assign((0,e._)`${g}.data`,h))})}t.extendErrors=c;function a(_,o){const v=_.const("err",o);_.if((0,e._)`${n.default.vErrors} === null`,()=>_.assign(n.default.vErrors,(0,e._)`[${v}]`),(0,e._)`${n.default.vErrors}.push(${v})`),_.code((0,e._)`${n.default.errors}++`)}function f(_,o){const{gen:v,validateName:h,schemaEnv:y}=_;y.$async?v.throw((0,e._)`new ${_.ValidationError}(${o})`):(v.assign((0,e._)`${h}.errors`,o),v.return(!1))}var u={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function d(_,o,v){const{createErrors:h}=_.it;return h===!1?(0,e._)`{}`:$(_,o,v)}function $(_,o,v={}){const{gen:h,it:y}=_,w=[P(y,v),b(_,v)];return E(_,o,w),h.object(...w)}function P({errorPath:_},{instancePath:o}){const v=o?(0,e.str)`${_}${(0,r.getErrorPath)(o,r.Type.Str)}`:_;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,v)]}function b({keyword:_,it:{errSchemaPath:o}},{schemaPath:v,parentSchema:h}){let y=h?o:(0,e.str)`${o}/${_}`;return v&&(y=(0,e.str)`${y}${(0,r.getErrorPath)(v,r.Type.Str)}`),[u.schemaPath,y]}function E(_,{params:o,message:v},h){const{keyword:y,data:w,schemaValue:g,it:p}=_,{opts:S,propertyName:O,topSchemaRef:j,schemaPath:z}=p;h.push([u.keyword,y],[u.params,typeof o=="function"?o(_):o||(0,e._)`{}`]),S.messages&&h.push([u.message,typeof v=="function"?v(_):v]),S.verbose&&h.push([u.schema,g],[u.parentSchema,(0,e._)`${j}${z}`],[n.default.data,w]),O&&h.push([u.propertyName,O])}}),Ma=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=Vr(),r=Ie(),n=Gt(),s={message:"boolean schema is false"};function l(a){const{gen:f,schema:u,validateName:d}=a;u===!1?c(a,!1):typeof u=="object"&&u.$async===!0?f.return(n.default.data):(f.assign((0,r._)`${d}.errors`,null),f.return(!0))}t.topBoolOrEmptySchema=l;function i(a,f){const{gen:u,schema:d}=a;d===!1?(u.var(f,!1),c(a)):u.var(f,!0)}t.boolOrEmptySchema=i;function c(a,f){const{gen:u,data:d}=a,$={gen:u,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)($,s,void 0,f)}}),Is=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;var e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function n(l){return typeof l=="string"&&r.has(l)}t.isJSONType=n;function s(){const l={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...l,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},l.number,l.string,l.array,l.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=s}),Cs=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:s,self:l},i){const c=l.RULES.types[i];return c&&c!==!0&&r(s,c)}t.schemaHasRulesForType=e;function r(s,l){return l.rules.some(i=>n(s,i))}t.shouldUseGroup=r;function n(s,l){var i;return s[l.keyword]!==void 0||((i=l.definition.implements)===null||i===void 0?void 0:i.some(c=>s[c]!==void 0))}t.shouldUseRule=n}),Mr=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var e=Is(),r=Cs(),n=Vr(),s=Ie(),l=Ve(),i;(function(h){h[h.Correct=0]="Correct",h[h.Wrong=1]="Wrong"})(i||(t.DataType=i={}));function c(h){const y=a(h.type);if(y.includes("null")){if(h.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!y.length&&h.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');h.nullable===!0&&y.push("null")}return y}t.getSchemaTypes=c;function a(h){const y=Array.isArray(h)?h:h?[h]:[];if(y.every(e.isJSONType))return y;throw new Error("type must be JSONType or JSONType[]: "+y.join(","))}t.getJSONTypes=a;function f(h,y){const{gen:w,data:g,opts:p}=h,S=d(y,p.coerceTypes),O=y.length>0&&!(S.length===0&&y.length===1&&(0,r.schemaHasRulesForType)(h,y[0]));if(O){const j=E(y,g,p.strictNumbers,i.Wrong);w.if(j,()=>{S.length?$(h,y,S):o(h)})}return O}t.coerceAndCheckDataType=f;var u=new Set(["string","number","integer","boolean","null"]);function d(h,y){return y?h.filter(w=>u.has(w)||y==="array"&&w==="array"):[]}function $(h,y,w){const{gen:g,data:p,opts:S}=h,O=g.let("dataType",(0,s._)`typeof ${p}`),j=g.let("coerced",(0,s._)`undefined`);S.coerceTypes==="array"&&g.if((0,s._)`${O} == 'object' && Array.isArray(${p}) && ${p}.length == 1`,()=>g.assign(p,(0,s._)`${p}[0]`).assign(O,(0,s._)`typeof ${p}`).if(E(y,p,S.strictNumbers),()=>g.assign(j,p))),g.if((0,s._)`${j} !== undefined`);for(const V of w)(u.has(V)||V==="array"&&S.coerceTypes==="array")&&z(V);g.else(),o(h),g.endIf(),g.if((0,s._)`${j} !== undefined`,()=>{g.assign(p,j),P(h,j)});function z(V){switch(V){case"string":g.elseIf((0,s._)`${O} == "number" || ${O} == "boolean"`).assign(j,(0,s._)`"" + ${p}`).elseIf((0,s._)`${p} === null`).assign(j,(0,s._)`""`);return;case"number":g.elseIf((0,s._)`${O} == "boolean" || ${p} === null
10
+ || (${O} == "string" && ${p} && ${p} == +${p})`).assign(j,(0,s._)`+${p}`);return;case"integer":g.elseIf((0,s._)`${O} === "boolean" || ${p} === null
11
+ || (${O} === "string" && ${p} && ${p} == +${p} && !(${p} % 1))`).assign(j,(0,s._)`+${p}`);return;case"boolean":g.elseIf((0,s._)`${p} === "false" || ${p} === 0 || ${p} === null`).assign(j,!1).elseIf((0,s._)`${p} === "true" || ${p} === 1`).assign(j,!0);return;case"null":g.elseIf((0,s._)`${p} === "" || ${p} === 0 || ${p} === false`),g.assign(j,null);return;case"array":g.elseIf((0,s._)`${O} === "string" || ${O} === "number"
12
+ || ${O} === "boolean" || ${p} === null`).assign(j,(0,s._)`[${p}]`)}}}function P({gen:h,parentData:y,parentDataProperty:w},g){h.if((0,s._)`${y} !== undefined`,()=>h.assign((0,s._)`${y}[${w}]`,g))}function b(h,y,w,g=i.Correct){const p=g===i.Correct?s.operators.EQ:s.operators.NEQ;let S;switch(h){case"null":return(0,s._)`${y} ${p} null`;case"array":S=(0,s._)`Array.isArray(${y})`;break;case"object":S=(0,s._)`${y} && typeof ${y} == "object" && !Array.isArray(${y})`;break;case"integer":S=O((0,s._)`!(${y} % 1) && !isNaN(${y})`);break;case"number":S=O();break;default:return(0,s._)`typeof ${y} ${p} ${h}`}return g===i.Correct?S:(0,s.not)(S);function O(j=s.nil){return(0,s.and)((0,s._)`typeof ${y} == "number"`,j,w?(0,s._)`isFinite(${y})`:s.nil)}}t.checkDataType=b;function E(h,y,w,g){if(h.length===1)return b(h[0],y,w,g);let p;const S=(0,l.toHash)(h);if(S.array&&S.object){const O=(0,s._)`typeof ${y} != "object"`;p=S.null?O:(0,s._)`!${y} || ${O}`,delete S.null,delete S.array,delete S.object}else p=s.nil;S.number&&delete S.integer;for(const O in S)p=(0,s.and)(p,b(O,y,w,g));return p}t.checkDataTypes=E;var _={message:({schema:h})=>`must be ${h}`,params:({schema:h,schemaValue:y})=>typeof h=="string"?(0,s._)`{type: ${h}}`:(0,s._)`{type: ${y}}`};function o(h){const y=v(h);(0,n.reportError)(y,_)}t.reportTypeError=o;function v(h){const{gen:y,data:w,schema:g}=h,p=(0,l.schemaRefOrVal)(h,g,"type");return{gen:y,keyword:"type",data:w,schema:g.type,schemaCode:p,schemaValue:p,parentSchema:g,params:{},it:h}}}),Da=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Ie(),r=Ve();function n(l,i){const{properties:c,items:a}=l.schema;if(i==="object"&&c)for(const f in c)s(l,f,c[f].default);else i==="array"&&Array.isArray(a)&&a.forEach((f,u)=>s(l,u,f.default))}t.assignDefaults=n;function s(l,i,c){const{gen:a,compositeRule:f,data:u,opts:d}=l;if(c===void 0)return;const $=(0,e._)`${u}${(0,e.getProperty)(i)}`;if(f){(0,r.checkStrictMode)(l,`default is ignored for: ${$}`);return}let P=(0,e._)`${$} === undefined`;d.useDefaults==="empty"&&(P=(0,e._)`${P} || ${$} === null || ${$} === ""`),a.if(P,(0,e._)`${$} = ${(0,e.stringify)(c)}`)}}),Rt=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;var e=Ie(),r=Ve(),n=Gt(),s=Ve();function l(h,y){const{gen:w,data:g,it:p}=h;w.if(d(w,g,y,p.opts.ownProperties),()=>{h.setParams({missingProperty:(0,e._)`${y}`},!0),h.error()})}t.checkReportMissingProp=l;function i({gen:h,data:y,it:{opts:w}},g,p){return(0,e.or)(...g.map(S=>(0,e.and)(d(h,y,S,w.ownProperties),(0,e._)`${p} = ${S}`)))}t.checkMissingProp=i;function c(h,y){h.setParams({missingProperty:y},!0),h.error()}t.reportMissingProp=c;function a(h){return h.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=a;function f(h,y,w){return(0,e._)`${a(h)}.call(${y}, ${w})`}t.isOwnProperty=f;function u(h,y,w,g){const p=(0,e._)`${y}${(0,e.getProperty)(w)} !== undefined`;return g?(0,e._)`${p} && ${f(h,y,w)}`:p}t.propertyInData=u;function d(h,y,w,g){const p=(0,e._)`${y}${(0,e.getProperty)(w)} === undefined`;return g?(0,e.or)(p,(0,e.not)(f(h,y,w))):p}t.noPropertyInData=d;function $(h){return h?Object.keys(h).filter(y=>y!=="__proto__"):[]}t.allSchemaProperties=$;function P(h,y){return $(y).filter(w=>!(0,r.alwaysValidSchema)(h,y[w]))}t.schemaProperties=P;function b({schemaCode:h,data:y,it:{gen:w,topSchemaRef:g,schemaPath:p,errorPath:S},it:O},j,z,V){const X=V?(0,e._)`${h}, ${y}, ${g}${p}`:y,W=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,S)],[n.default.parentData,O.parentData],[n.default.parentDataProperty,O.parentDataProperty],[n.default.rootData,n.default.rootData]];O.opts.dynamicRef&&W.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const ee=(0,e._)`${X}, ${w.object(...W)}`;return z!==e.nil?(0,e._)`${j}.call(${z}, ${ee})`:(0,e._)`${j}(${ee})`}t.callValidateCode=b;var E=(0,e._)`new RegExp`;function _({gen:h,it:{opts:y}},w){const g=y.unicodeRegExp?"u":"",{regExp:p}=y.code,S=p(w,g);return h.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,e._)`${p.code==="new RegExp"?E:(0,s.useFunc)(h,p)}(${w}, ${g})`})}t.usePattern=_;function o(h){const{gen:y,data:w,keyword:g,it:p}=h,S=y.name("valid");if(p.allErrors){const j=y.let("valid",!0);return O(()=>y.assign(j,!1)),j}return y.var(S,!0),O(()=>y.break()),S;function O(j){const z=y.const("len",(0,e._)`${w}.length`);y.forRange("i",0,z,V=>{h.subschema({keyword:g,dataProp:V,dataPropType:r.Type.Num},S),y.if((0,e.not)(S),j)})}}t.validateArray=o;function v(h){const{gen:y,schema:w,keyword:g,it:p}=h;if(!Array.isArray(w))throw new Error("ajv implementation error");if(w.some(z=>(0,r.alwaysValidSchema)(p,z))&&!p.opts.unevaluated)return;const O=y.let("valid",!1),j=y.name("_valid");y.block(()=>w.forEach((z,V)=>{const X=h.subschema({keyword:g,schemaProp:V,compositeRule:!0},j);y.assign(O,(0,e._)`${O} || ${j}`),h.mergeValidEvaluated(X,j)||y.if((0,e.not)(O))})),h.result(O,()=>h.reset(),()=>h.error(!0))}t.validateUnion=v}),qa=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Ie(),r=Gt(),n=Rt(),s=Vr();function l(P,b){const{gen:E,keyword:_,schema:o,parentSchema:v,it:h}=P,y=b.macro.call(h.self,o,v,h),w=u(E,_,y);h.opts.validateSchema!==!1&&h.self.validateSchema(y,!0);const g=E.name("valid");P.subschema({schema:y,schemaPath:e.nil,errSchemaPath:`${h.errSchemaPath}/${_}`,topSchemaRef:w,compositeRule:!0},g),P.pass(g,()=>P.error(!0))}t.macroKeywordCode=l;function i(P,b){var E;const{gen:_,keyword:o,schema:v,parentSchema:h,$data:y,it:w}=P;f(w,b);const g=!y&&b.compile?b.compile.call(w.self,v,h,w):b.validate,p=u(_,o,g),S=_.let("valid");P.block$data(S,O),P.ok((E=b.valid)!==null&&E!==void 0?E:S);function O(){if(b.errors===!1)V(),b.modifying&&c(P),X(()=>P.error());else{const W=b.async?j():z();b.modifying&&c(P),X(()=>a(P,W))}}function j(){const W=_.let("ruleErrs",null);return _.try(()=>V((0,e._)`await `),ee=>_.assign(S,!1).if((0,e._)`${ee} instanceof ${w.ValidationError}`,()=>_.assign(W,(0,e._)`${ee}.errors`),()=>_.throw(ee))),W}function z(){const W=(0,e._)`${p}.errors`;return _.assign(W,null),V(e.nil),W}function V(W=b.async?(0,e._)`await `:e.nil){const ee=w.opts.passContext?r.default.this:r.default.self,he=!("compile"in b&&!y||b.schema===!1);_.assign(S,(0,e._)`${W}${(0,n.callValidateCode)(P,p,ee,he)}`,b.modifying)}function X(W){var ee;_.if((0,e.not)((ee=b.valid)!==null&&ee!==void 0?ee:S),W)}}t.funcKeywordCode=i;function c(P){const{gen:b,data:E,it:_}=P;b.if(_.parentData,()=>b.assign(E,(0,e._)`${_.parentData}[${_.parentDataProperty}]`))}function a(P,b){const{gen:E}=P;E.if((0,e._)`Array.isArray(${b})`,()=>{E.assign(r.default.vErrors,(0,e._)`${r.default.vErrors} === null ? ${b} : ${r.default.vErrors}.concat(${b})`).assign(r.default.errors,(0,e._)`${r.default.vErrors}.length`),(0,s.extendErrors)(P)},()=>P.error())}function f({schemaEnv:P},b){if(b.async&&!P.$async)throw new Error("async keyword in sync schema")}function u(P,b,E){if(E===void 0)throw new Error(`keyword "${b}" failed to compile`);return P.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,e.stringify)(E)})}function d(P,b,E=!1){return!b.length||b.some(_=>_==="array"?Array.isArray(P):_==="object"?P&&typeof P=="object"&&!Array.isArray(P):typeof P==_||E&&typeof P>"u")}t.validSchemaType=d;function $({schema:P,opts:b,self:E,errSchemaPath:_},o,v){if(Array.isArray(o.keyword)?!o.keyword.includes(v):o.keyword!==v)throw new Error("ajv implementation error");const h=o.dependencies;if(h!=null&&h.some(y=>!Object.prototype.hasOwnProperty.call(P,y)))throw new Error(`parent schema must have dependencies of ${v}: ${h.join(",")}`);if(o.validateSchema&&!o.validateSchema(P[v])){const w=`keyword "${v}" value is invalid at path "${_}": `+E.errorsText(o.validateSchema.errors);if(b.validateSchema==="log")E.logger.error(w);else throw new Error(w)}}t.validateKeywordUsage=$}),La=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Ie(),r=Ve();function n(i,{keyword:c,schemaProp:a,schema:f,schemaPath:u,errSchemaPath:d,topSchemaRef:$}){if(c!==void 0&&f!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(c!==void 0){const P=i.schema[c];return a===void 0?{schema:P,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(c)}`,errSchemaPath:`${i.errSchemaPath}/${c}`}:{schema:P[a],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(c)}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${c}/${(0,r.escapeFragment)(a)}`}}if(f!==void 0){if(u===void 0||d===void 0||$===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:f,schemaPath:u,topSchemaRef:$,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function s(i,c,{dataProp:a,dataPropType:f,data:u,dataTypes:d,propertyName:$}){if(u!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:P}=c;if(a!==void 0){const{errorPath:E,dataPathArr:_,opts:o}=c,v=P.let("data",(0,e._)`${c.data}${(0,e.getProperty)(a)}`,!0);b(v),i.errorPath=(0,e.str)`${E}${(0,r.getErrorPath)(a,f,o.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${a}`,i.dataPathArr=[..._,i.parentDataProperty]}if(u!==void 0){const E=u instanceof e.Name?u:P.let("data",u,!0);b(E),$!==void 0&&(i.propertyName=$)}d&&(i.dataTypes=d);function b(E){i.data=E,i.dataLevel=c.dataLevel+1,i.dataTypes=[],c.definedProperties=new Set,i.parentData=c.data,i.dataNames=[...c.dataNames,E]}}t.extendSubschemaData=s;function l(i,{jtdDiscriminator:c,jtdMetadata:a,compositeRule:f,createErrors:u,allErrors:d}){f!==void 0&&(i.compositeRule=f),u!==void 0&&(i.createErrors=u),d!==void 0&&(i.allErrors=d),i.jtdDiscriminator=c,i.jtdMetadata=a}t.extendSubschemaMode=l}),Ur=B(function(t,e){e.exports=function r(n,s){if(n===s)return!0;if(n&&s&&typeof n=="object"&&typeof s=="object"){if(n.constructor!==s.constructor)return!1;var l,i,c;if(Array.isArray(n)){if(l=n.length,l!=s.length)return!1;for(i=l;i--!==0;)if(!r(n[i],s[i]))return!1;return!0}if(n.constructor===RegExp)return n.source===s.source&&n.flags===s.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===s.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===s.toString();if(c=Object.keys(n),l=c.length,l!==Object.keys(s).length)return!1;for(i=l;i--!==0;)if(!Object.prototype.hasOwnProperty.call(s,c[i]))return!1;for(i=l;i--!==0;){var a=c[i];if(!r(n[a],s[a]))return!1}return!0}return n!==n&&s!==s}}),As=B(function(t,e){var r=e.exports=function(l,i,c){typeof i=="function"&&(c=i,i={}),c=i.cb||c;var a=typeof c=="function"?c:c.pre||function(){},f=c.post||function(){};n(i,a,f,l,"",l)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.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 n(l,i,c,a,f,u,d,$,P,b){if(a&&typeof a=="object"&&!Array.isArray(a)){i(a,f,u,d,$,P,b);for(var E in a){var _=a[E];if(Array.isArray(_)){if(E in r.arrayKeywords)for(var o=0;o<_.length;o++)n(l,i,c,_[o],f+"/"+E+"/"+o,u,f,E,a,o)}else if(E in r.propsKeywords){if(_&&typeof _=="object")for(var v in _)n(l,i,c,_[v],f+"/"+E+"/"+s(v),u,f,E,a,v)}else(E in r.keywords||l.allKeys&&!(E in r.skipKeywords))&&n(l,i,c,_,f+"/"+E,u,f,E,a)}c(a,f,u,d,$,P,b)}}function s(l){return l.replace(/~/g,"~0").replace(/\//g,"~1")}}),zr=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=Ve(),r=Ur(),n=As(),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function l(_,o=!0){return typeof _=="boolean"?!0:o===!0?!c(_):o?a(_)<=o:!1}t.inlineRef=l;var i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(_){for(const o in _){if(i.has(o))return!0;const v=_[o];if(Array.isArray(v)&&v.some(c)||typeof v=="object"&&c(v))return!0}return!1}function a(_){let o=0;for(const v in _){if(v==="$ref")return 1/0;if(o++,!s.has(v)&&(typeof _[v]=="object"&&(0,e.eachItem)(_[v],h=>o+=a(h)),o===1/0))return 1/0}return o}function f(_,o="",v){v!==!1&&(o=$(o));const h=_.parse(o);return u(_,h)}t.getFullPath=f;function u(_,o){return _.serialize(o).split("#")[0]+"#"}t._getFullPath=u;var d=/#\/?$/;function $(_){return _?_.replace(d,""):""}t.normalizeId=$;function P(_,o,v){return v=$(v),_.resolve(o,v)}t.resolveUrl=P;var b=/^[a-z_][-a-z0-9._]*$/i;function E(_,o){if(typeof _=="boolean")return{};const{schemaId:v,uriResolver:h}=this.opts,y=$(_[v]||o),w={"":y},g=f(h,y,!1),p={},S=new Set;return n(_,{allKeys:!0},(z,V,X,W)=>{if(W===void 0)return;const ee=g+V;let he=w[W];typeof z[v]=="string"&&(he=Ee.call(this,z[v])),Ce.call(this,z.$anchor),Ce.call(this,z.$dynamicAnchor),w[V]=he;function Ee(ce){const x=this.opts.uriResolver.resolve;if(ce=$(he?x(he,ce):ce),S.has(ce))throw j(ce);S.add(ce);let T=this.refs[ce];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?O(z,T.schema,ce):ce!==$(ee)&&(ce[0]==="#"?(O(z,p[ce],ce),p[ce]=z):this.refs[ce]=ee),ce}function Ce(ce){if(typeof ce=="string"){if(!b.test(ce))throw new Error(`invalid anchor "${ce}"`);Ee.call(this,`#${ce}`)}}}),p;function O(z,V,X){if(V!==void 0&&!r(z,V))throw j(X)}function j(z){return new Error(`reference "${z}" resolves to more than one schema`)}}t.getSchemaRefs=E}),Fr=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=Ma(),r=Mr(),n=Cs(),s=Mr(),l=Da(),i=qa(),c=La(),a=Ie(),f=Gt(),u=zr(),d=Ve(),$=Vr();function P(N){if(g(N)&&(S(N),w(N))){o(N);return}b(N,()=>(0,e.topBoolOrEmptySchema)(N))}t.validateFunctionCode=P;function b({gen:N,validateName:I,schema:L,schemaEnv:F,opts:J},te){J.code.es5?N.func(I,(0,a._)`${f.default.data}, ${f.default.valCxt}`,F.$async,()=>{N.code((0,a._)`"use strict"; ${h(L,J)}`),_(N,J),N.code(te)}):N.func(I,(0,a._)`${f.default.data}, ${E(J)}`,F.$async,()=>N.code(h(L,J)).code(te))}function E(N){return(0,a._)`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${N.dynamicRef?(0,a._)`, ${f.default.dynamicAnchors}={}`:a.nil}}={}`}function _(N,I){N.if(f.default.valCxt,()=>{N.var(f.default.instancePath,(0,a._)`${f.default.valCxt}.${f.default.instancePath}`),N.var(f.default.parentData,(0,a._)`${f.default.valCxt}.${f.default.parentData}`),N.var(f.default.parentDataProperty,(0,a._)`${f.default.valCxt}.${f.default.parentDataProperty}`),N.var(f.default.rootData,(0,a._)`${f.default.valCxt}.${f.default.rootData}`),I.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`${f.default.valCxt}.${f.default.dynamicAnchors}`)},()=>{N.var(f.default.instancePath,(0,a._)`""`),N.var(f.default.parentData,(0,a._)`undefined`),N.var(f.default.parentDataProperty,(0,a._)`undefined`),N.var(f.default.rootData,f.default.data),I.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`{}`)})}function o(N){const{schema:I,opts:L,gen:F}=N;b(N,()=>{L.$comment&&I.$comment&&W(N),z(N),F.let(f.default.vErrors,null),F.let(f.default.errors,0),L.unevaluated&&v(N),O(N),ee(N)})}function v(N){const{gen:I,validateName:L}=N;N.evaluated=I.const("evaluated",(0,a._)`${L}.evaluated`),I.if((0,a._)`${N.evaluated}.dynamicProps`,()=>I.assign((0,a._)`${N.evaluated}.props`,(0,a._)`undefined`)),I.if((0,a._)`${N.evaluated}.dynamicItems`,()=>I.assign((0,a._)`${N.evaluated}.items`,(0,a._)`undefined`))}function h(N,I){const L=typeof N=="object"&&N[I.schemaId];return L&&(I.code.source||I.code.process)?(0,a._)`/*# sourceURL=${L} */`:a.nil}function y(N,I){if(g(N)&&(S(N),w(N))){p(N,I);return}(0,e.boolOrEmptySchema)(N,I)}function w({schema:N,self:I}){if(typeof N=="boolean")return!N;for(const L in N)if(I.RULES.all[L])return!0;return!1}function g(N){return typeof N.schema!="boolean"}function p(N,I){const{schema:L,gen:F,opts:J}=N;J.$comment&&L.$comment&&W(N),V(N),X(N);const te=F.const("_errs",f.default.errors);O(N,te),F.var(I,(0,a._)`${te} === ${f.default.errors}`)}function S(N){(0,d.checkUnknownRules)(N),j(N)}function O(N,I){if(N.opts.jtd)return Ee(N,[],!1,I);const L=(0,r.getSchemaTypes)(N.schema),F=(0,r.coerceAndCheckDataType)(N,L);Ee(N,L,!F,I)}function j(N){const{schema:I,errSchemaPath:L,opts:F,self:J}=N;I.$ref&&F.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(I,J.RULES)&&J.logger.warn(`$ref: keywords ignored in schema at path "${L}"`)}function z(N){const{schema:I,opts:L}=N;I.default!==void 0&&L.useDefaults&&L.strictSchema&&(0,d.checkStrictMode)(N,"default is ignored in the schema root")}function V(N){const I=N.schema[N.opts.schemaId];I&&(N.baseId=(0,u.resolveUrl)(N.opts.uriResolver,N.baseId,I))}function X(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}function W({gen:N,schemaEnv:I,schema:L,errSchemaPath:F,opts:J}){const te=L.$comment;if(J.$comment===!0)N.code((0,a._)`${f.default.self}.logger.log(${te})`);else if(typeof J.$comment=="function"){const be=(0,a.str)`${F}/$comment`,Ue=N.scopeValue("root",{ref:I.root});N.code((0,a._)`${f.default.self}.opts.$comment(${te}, ${be}, ${Ue}.schema)`)}}function ee(N){const{gen:I,schemaEnv:L,validateName:F,ValidationError:J,opts:te}=N;L.$async?I.if((0,a._)`${f.default.errors} === 0`,()=>I.return(f.default.data),()=>I.throw((0,a._)`new ${J}(${f.default.vErrors})`)):(I.assign((0,a._)`${F}.errors`,f.default.vErrors),te.unevaluated&&he(N),I.return((0,a._)`${f.default.errors} === 0`))}function he({gen:N,evaluated:I,props:L,items:F}){L instanceof a.Name&&N.assign((0,a._)`${I}.props`,L),F instanceof a.Name&&N.assign((0,a._)`${I}.items`,F)}function Ee(N,I,L,F){const{gen:J,schema:te,data:be,allErrors:Ue,opts:Te,self:Ae}=N,{RULES:_e}=Ae;if(te.$ref&&(Te.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(te,_e))){J.block(()=>Q(N,"$ref",_e.all.$ref.definition));return}Te.jtd||ce(N,I),J.block(()=>{for(const Re of _e.rules)xe(Re);xe(_e.post)});function xe(Re){(0,n.shouldUseGroup)(te,Re)&&(Re.type?(J.if((0,s.checkDataType)(Re.type,be,Te.strictNumbers)),Ce(N,Re),I.length===1&&I[0]===Re.type&&L&&(J.else(),(0,s.reportTypeError)(N)),J.endIf()):Ce(N,Re),Ue||J.if((0,a._)`${f.default.errors} === ${F||0}`))}}function Ce(N,I){const{gen:L,schema:F,opts:{useDefaults:J}}=N;J&&(0,l.assignDefaults)(N,I.type),L.block(()=>{for(const te of I.rules)(0,n.shouldUseRule)(F,te)&&Q(N,te.keyword,te.definition,I.type)})}function ce(N,I){N.schemaEnv.meta||!N.opts.strictTypes||(x(N,I),N.opts.allowUnionTypes||T(N,I),M(N,N.dataTypes))}function x(N,I){if(I.length){if(!N.dataTypes.length){N.dataTypes=I;return}I.forEach(L=>{m(N.dataTypes,L)||A(N,`type "${L}" not allowed by context "${N.dataTypes.join(",")}"`)}),k(N,I)}}function T(N,I){I.length>1&&!(I.length===2&&I.includes("null"))&&A(N,"use allowUnionTypes to allow union type keyword")}function M(N,I){const L=N.self.RULES.all;for(const F in L){const J=L[F];if(typeof J=="object"&&(0,n.shouldUseRule)(N.schema,J)){const{type:te}=J.definition;te.length&&!te.some(be=>R(I,be))&&A(N,`missing type "${te.join(",")}" for keyword "${F}"`)}}}function R(N,I){return N.includes(I)||I==="number"&&N.includes("integer")}function m(N,I){return N.includes(I)||I==="integer"&&N.includes("number")}function k(N,I){const L=[];for(const F of N.dataTypes)m(I,F)?L.push(F):I.includes("integer")&&F==="number"&&L.push("integer");N.dataTypes=L}function A(N,I){const L=N.schemaEnv.baseId+N.errSchemaPath;I+=` at "${L}" (strictTypes)`,(0,d.checkStrictMode)(N,I,N.opts.strictTypes)}class G{constructor(I,L,F){if((0,i.validateKeywordUsage)(I,L,F),this.gen=I.gen,this.allErrors=I.allErrors,this.keyword=F,this.data=I.data,this.schema=I.schema[F],this.$data=L.$data&&I.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(I,this.schema,F,this.$data),this.schemaType=L.schemaType,this.parentSchema=I.schema,this.params={},this.it=I,this.def=L,this.$data)this.schemaCode=I.gen.const("vSchema",ye(this.$data,I));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,L.schemaType,L.allowUndefined))throw new Error(`${F} value must be ${JSON.stringify(L.schemaType)}`);("code"in L?L.trackErrors:L.errors!==!1)&&(this.errsCount=I.gen.const("_errs",f.default.errors))}result(I,L,F){this.failResult((0,a.not)(I),L,F)}failResult(I,L,F){this.gen.if(I),F?F():this.error(),L?(this.gen.else(),L(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(I,L){this.failResult((0,a.not)(I),void 0,L)}fail(I){if(I===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(I),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(I){if(!this.$data)return this.fail(I);const{schemaCode:L}=this;this.fail((0,a._)`${L} !== undefined && (${(0,a.or)(this.invalid$data(),I)})`)}error(I,L,F){if(L){this.setParams(L),this._error(I,F),this.setParams({});return}this._error(I,F)}_error(I,L){(I?$.reportExtraError:$.reportError)(this,this.def.error,L)}$dataError(){(0,$.reportError)(this,this.def.$dataError||$.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,$.resetErrorsCount)(this.gen,this.errsCount)}ok(I){this.allErrors||this.gen.if(I)}setParams(I,L){L?Object.assign(this.params,I):this.params=I}block$data(I,L,F=a.nil){this.gen.block(()=>{this.check$data(I,F),L()})}check$data(I=a.nil,L=a.nil){if(!this.$data)return;const{gen:F,schemaCode:J,schemaType:te,def:be}=this;F.if((0,a.or)((0,a._)`${J} === undefined`,L)),I!==a.nil&&F.assign(I,!0),(te.length||be.validateSchema)&&(F.elseIf(this.invalid$data()),this.$dataError(),I!==a.nil&&F.assign(I,!1)),F.else()}invalid$data(){const{gen:I,schemaCode:L,schemaType:F,def:J,it:te}=this;return(0,a.or)(be(),Ue());function be(){if(F.length){if(!(L instanceof a.Name))throw new Error("ajv implementation error");const Te=Array.isArray(F)?F:[F];return(0,a._)`${(0,s.checkDataTypes)(Te,L,te.opts.strictNumbers,s.DataType.Wrong)}`}return a.nil}function Ue(){if(J.validateSchema){const Te=I.scopeValue("validate$data",{ref:J.validateSchema});return(0,a._)`!${Te}(${L})`}return a.nil}}subschema(I,L){const F=(0,c.getSubschema)(this.it,I);(0,c.extendSubschemaData)(F,this.it,I),(0,c.extendSubschemaMode)(F,I);const J={...this.it,...F,items:void 0,props:void 0};return y(J,L),J}mergeEvaluated(I,L){const{it:F,gen:J}=this;F.opts.unevaluated&&(F.props!==!0&&I.props!==void 0&&(F.props=d.mergeEvaluated.props(J,I.props,F.props,L)),F.items!==!0&&I.items!==void 0&&(F.items=d.mergeEvaluated.items(J,I.items,F.items,L)))}mergeValidEvaluated(I,L){const{it:F,gen:J}=this;if(F.opts.unevaluated&&(F.props!==!0||F.items!==!0))return J.if(L,()=>this.mergeEvaluated(I,a.Name)),!0}}t.KeywordCxt=G;function Q(N,I,L,F){const J=new G(N,L,I);"code"in L?L.code(J,F):J.$data&&L.validate?(0,i.funcKeywordCode)(J,L):"macro"in L?(0,i.macroKeywordCode)(J,L):(L.compile||L.validate)&&(0,i.funcKeywordCode)(J,L)}var se=/^\/(?:[^~]|~0|~1)*$/,re=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ye(N,{dataLevel:I,dataNames:L,dataPathArr:F}){let J,te;if(N==="")return f.default.rootData;if(N[0]==="/"){if(!se.test(N))throw new Error(`Invalid JSON-pointer: ${N}`);J=N,te=f.default.rootData}else{const Ae=re.exec(N);if(!Ae)throw new Error(`Invalid JSON-pointer: ${N}`);const _e=+Ae[1];if(J=Ae[2],J==="#"){if(_e>=I)throw new Error(Te("property/index",_e));return F[I-_e]}if(_e>I)throw new Error(Te("data",_e));if(te=L[I-_e],!J)return te}let be=te;const Ue=J.split("/");for(const Ae of Ue)Ae&&(te=(0,a._)`${te}${(0,a.getProperty)((0,d.unescapeJsonPointer)(Ae))}`,be=(0,a._)`${be} && ${te}`);return be;function Te(Ae,_e){return`Cannot access ${Ae} ${_e} levels up, current level is ${I}`}}t.getData=ye}),Rn=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}t.default=e}),xr=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=zr();class r extends Error{constructor(s,l,i,c){super(c||`can't resolve reference ${i} from id ${l}`),this.missingRef=(0,e.resolveUrl)(s,l,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(s,this.missingRef))}}t.default=r}),In=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Ie(),r=Rn(),n=Gt(),s=zr(),l=Ve(),i=Fr();class c{constructor(v){var h;this.refs={},this.dynamicAnchors={};let y;typeof v.schema=="object"&&(y=v.schema),this.schema=v.schema,this.schemaId=v.schemaId,this.root=v.root||this,this.baseId=(h=v.baseId)!==null&&h!==void 0?h:(0,s.normalizeId)(y==null?void 0:y[v.schemaId||"$id"]),this.schemaPath=v.schemaPath,this.localRefs=v.localRefs,this.meta=v.meta,this.$async=y==null?void 0:y.$async,this.refs={}}}t.SchemaEnv=c;function a(o){const v=d.call(this,o);if(v)return v;const h=(0,s.getFullPath)(this.opts.uriResolver,o.root.baseId),{es5:y,lines:w}=this.opts.code,{ownProperties:g}=this.opts,p=new e.CodeGen(this.scope,{es5:y,lines:w,ownProperties:g});let S;o.$async&&(S=p.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=p.scopeName("validate");o.validateName=O;const j={gen:p,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:p.scopeValue("schema",this.opts.code.source===!0?{ref:o.schema,code:(0,e.stringify)(o.schema)}:{ref:o.schema}),validateName:O,ValidationError:S,schema:o.schema,schemaEnv:o,rootId:h,baseId:o.baseId||h,schemaPath:e.nil,errSchemaPath:o.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let z;try{this._compilations.add(o),(0,i.validateFunctionCode)(j),p.optimize(this.opts.code.optimize);const V=p.toString();z=`${p.scopeRefs(n.default.scope)}return ${V}`,this.opts.code.process&&(z=this.opts.code.process(z,o));const W=new Function(`${n.default.self}`,`${n.default.scope}`,z)(this,this.scope.get());if(this.scope.value(O,{ref:W}),W.errors=null,W.schema=o.schema,W.schemaEnv=o,o.$async&&(W.$async=!0),this.opts.code.source===!0&&(W.source={validateName:O,validateCode:V,scopeValues:p._values}),this.opts.unevaluated){const{props:ee,items:he}=j;W.evaluated={props:ee instanceof e.Name?void 0:ee,items:he instanceof e.Name?void 0:he,dynamicProps:ee instanceof e.Name,dynamicItems:he instanceof e.Name},W.source&&(W.source.evaluated=(0,e.stringify)(W.evaluated))}return o.validate=W,o}catch(V){throw delete o.validate,delete o.validateName,z&&this.logger.error("Error compiling schema, function code:",z),V}finally{this._compilations.delete(o)}}t.compileSchema=a;function f(o,v,h){var y;h=(0,s.resolveUrl)(this.opts.uriResolver,v,h);const w=o.refs[h];if(w)return w;let g=P.call(this,o,h);if(g===void 0){const p=(y=o.localRefs)===null||y===void 0?void 0:y[h],{schemaId:S}=this.opts;p&&(g=new c({schema:p,schemaId:S,root:o,baseId:v}))}if(g!==void 0)return o.refs[h]=u.call(this,g)}t.resolveRef=f;function u(o){return(0,s.inlineRef)(o.schema,this.opts.inlineRefs)?o.schema:o.validate?o:a.call(this,o)}function d(o){for(const v of this._compilations)if($(v,o))return v}t.getCompilingSchema=d;function $(o,v){return o.schema===v.schema&&o.root===v.root&&o.baseId===v.baseId}function P(o,v){let h;for(;typeof(h=this.refs[v])=="string";)v=h;return h||this.schemas[v]||b.call(this,o,v)}function b(o,v){const h=this.opts.uriResolver.parse(v),y=(0,s._getFullPath)(this.opts.uriResolver,h);let w=(0,s.getFullPath)(this.opts.uriResolver,o.baseId,void 0);if(Object.keys(o.schema).length>0&&y===w)return _.call(this,h,o);const g=(0,s.normalizeId)(y),p=this.refs[g]||this.schemas[g];if(typeof p=="string"){const S=b.call(this,o,p);return typeof(S==null?void 0:S.schema)!="object"?void 0:_.call(this,h,S)}if(typeof(p==null?void 0:p.schema)=="object"){if(p.validate||a.call(this,p),g===(0,s.normalizeId)(v)){const{schema:S}=p,{schemaId:O}=this.opts,j=S[O];return j&&(w=(0,s.resolveUrl)(this.opts.uriResolver,w,j)),new c({schema:S,schemaId:O,root:o,baseId:w})}return _.call(this,h,p)}}t.resolveSchema=b;var E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function _(o,{baseId:v,schema:h,root:y}){var w;if(((w=o.fragment)===null||w===void 0?void 0:w[0])!=="/")return;for(const S of o.fragment.slice(1).split("/")){if(typeof h=="boolean")return;const O=h[(0,l.unescapeFragment)(S)];if(O===void 0)return;h=O;const j=typeof h=="object"&&h[this.opts.schemaId];!E.has(S)&&j&&(v=(0,s.resolveUrl)(this.opts.uriResolver,v,j))}let g;if(typeof h!="boolean"&&h.$ref&&!(0,l.schemaHasRulesButRef)(h,this.RULES)){const S=(0,s.resolveUrl)(this.opts.uriResolver,v,h.$ref);g=b.call(this,y,S)}const{schemaId:p}=this.opts;if(g=g||new c({schema:h,schemaId:p,root:y,baseId:v}),g.schema!==g.root.schema)return g}}),Va=B(function(t,e){e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),js=B(function(t,e){var r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),n=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function s(b){let E="",_=0,o=0;for(o=0;o<b.length;o++)if(_=b[o].charCodeAt(0),_!==48){if(!(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102))return"";E+=b[o];break}for(o+=1;o<b.length;o++){if(_=b[o].charCodeAt(0),!(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102))return"";E+=b[o]}return E}var l=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function i(b){return b.length=0,!0}function c(b,E,_){if(b.length){const o=s(b);if(o!=="")E.push(o);else return _.error=!0,!1;b.length=0}return!0}function a(b){let E=0;const _={error:!1,address:"",zone:""},o=[],v=[];let h=!1,y=!1,w=c;for(let g=0;g<b.length;g++){const p=b[g];if(!(p==="["||p==="]"))if(p===":"){if(h===!0&&(y=!0),!w(v,o,_))break;if(++E>7){_.error=!0;break}g>0&&b[g-1]===":"&&(h=!0),o.push(":");continue}else if(p==="%"){if(!w(v,o,_))break;w=i}else{v.push(p);continue}}return v.length&&(w===i?_.zone=v.join(""):y?o.push(v.join("")):o.push(s(v))),_.address=o.join(""),_}function f(b){if(u(b,":")<2)return{host:b,isIPV6:!1};const E=a(b);if(E.error)return{host:b,isIPV6:!1};{let _=E.address,o=E.address;return E.zone&&(_+="%"+E.zone,o+="%25"+E.zone),{host:_,isIPV6:!0,escapedHost:o}}}function u(b,E){let _=0;for(let o=0;o<b.length;o++)b[o]===E&&_++;return _}function d(b){let E=b;const _=[];let o=-1,v=0;for(;v=E.length;){if(v===1){if(E===".")break;if(E==="/"){_.push("/");break}else{_.push(E);break}}else if(v===2){if(E[0]==="."){if(E[1]===".")break;if(E[1]==="/"){E=E.slice(2);continue}}else if(E[0]==="/"&&(E[1]==="."||E[1]==="/")){_.push("/");break}}else if(v===3&&E==="/.."){_.length!==0&&_.pop(),_.push("/");break}if(E[0]==="."){if(E[1]==="."){if(E[2]==="/"){E=E.slice(3);continue}}else if(E[1]==="/"){E=E.slice(2);continue}}else if(E[0]==="/"&&E[1]==="."){if(E[2]==="/"){E=E.slice(2);continue}else if(E[2]==="."&&E[3]==="/"){E=E.slice(3),_.length!==0&&_.pop();continue}}if((o=E.indexOf("/",1))===-1){_.push(E);break}else _.push(E.slice(0,o)),E=E.slice(o)}return _.join("")}function $(b,E){const _=E!==!0?escape:unescape;return b.scheme!==void 0&&(b.scheme=_(b.scheme)),b.userinfo!==void 0&&(b.userinfo=_(b.userinfo)),b.host!==void 0&&(b.host=_(b.host)),b.path!==void 0&&(b.path=_(b.path)),b.query!==void 0&&(b.query=_(b.query)),b.fragment!==void 0&&(b.fragment=_(b.fragment)),b}function P(b){const E=[];if(b.userinfo!==void 0&&(E.push(b.userinfo),E.push("@")),b.host!==void 0){let _=unescape(b.host);if(!n(_)){const o=f(_);o.isIPV6===!0?_=`[${o.escapedHost}]`:_=b.host}E.push(_)}return(typeof b.port=="number"||typeof b.port=="string")&&(E.push(":"),E.push(String(b.port))),E.length?E.join(""):void 0}e.exports={nonSimpleDomain:l,recomposeAuthority:P,normalizeComponentEncoding:$,removeDotSegments:d,isIPv4:n,isUUID:r,normalizeIPv6:f,stringArrayToHexStripped:s}}),Ua=B(function(t,e){var{isUUID:r}=js(),n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,s=["http","https","ws","wss","urn","urn:uuid"];function l(p){return s.indexOf(p)!==-1}function i(p){return p.secure===!0?!0:p.secure===!1?!1:p.scheme?p.scheme.length===3&&(p.scheme[0]==="w"||p.scheme[0]==="W")&&(p.scheme[1]==="s"||p.scheme[1]==="S")&&(p.scheme[2]==="s"||p.scheme[2]==="S"):!1}function c(p){return p.host||(p.error=p.error||"HTTP URIs must have a host."),p}function a(p){const S=String(p.scheme).toLowerCase()==="https";return(p.port===(S?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}function f(p){return p.secure=i(p),p.resourceName=(p.path||"/")+(p.query?"?"+p.query:""),p.path=void 0,p.query=void 0,p}function u(p){if((p.port===(i(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){const[S,O]=p.resourceName.split("?");p.path=S&&S!=="/"?S:void 0,p.query=O,p.resourceName=void 0}return p.fragment=void 0,p}function d(p,S){if(!p.path)return p.error="URN can not be parsed",p;const O=p.path.match(n);if(O){const j=S.scheme||p.scheme||"urn";p.nid=O[1].toLowerCase(),p.nss=O[2];const z=`${j}:${S.nid||p.nid}`,V=g(z);p.path=void 0,V&&(p=V.parse(p,S))}else p.error=p.error||"URN can not be parsed.";return p}function $(p,S){if(p.nid===void 0)throw new Error("URN without nid cannot be serialized");const O=S.scheme||p.scheme||"urn",j=p.nid.toLowerCase(),z=`${O}:${S.nid||j}`,V=g(z);V&&(p=V.serialize(p,S));const X=p,W=p.nss;return X.path=`${j||S.nid}:${W}`,S.skipEscape=!0,X}function P(p,S){const O=p;return O.uuid=O.nss,O.nss=void 0,!S.tolerant&&(!O.uuid||!r(O.uuid))&&(O.error=O.error||"UUID is not valid."),O}function b(p){const S=p;return S.nss=(p.uuid||"").toLowerCase(),S}var E={scheme:"http",domainHost:!0,parse:c,serialize:a},_={scheme:"https",domainHost:E.domainHost,parse:c,serialize:a},o={scheme:"ws",domainHost:!0,parse:f,serialize:u},v={scheme:"wss",domainHost:o.domainHost,parse:o.parse,serialize:o.serialize},h={scheme:"urn",parse:d,serialize:$,skipNormalize:!0},y={scheme:"urn:uuid",parse:P,serialize:b,skipNormalize:!0},w={http:E,https:_,ws:o,wss:v,urn:h,"urn:uuid":y};Object.setPrototypeOf(w,null);function g(p){return p&&(w[p]||w[p.toLowerCase()])||void 0}e.exports={wsIsSecure:i,SCHEMES:w,isValidSchemeName:l,getSchemeHandler:g}}),za=B(function(t,e){var{normalizeIPv6:r,removeDotSegments:n,recomposeAuthority:s,normalizeComponentEncoding:l,isIPv4:i,nonSimpleDomain:c}=js(),{SCHEMES:a,getSchemeHandler:f}=Ua();function u(v,h){return typeof v=="string"?v=b(_(v,h),h):typeof v=="object"&&(v=_(b(v,h),h)),v}function d(v,h,y){const w=y?Object.assign({scheme:"null"},y):{scheme:"null"},g=$(_(v,w),_(h,w),w,!0);return w.skipEscape=!0,b(g,w)}function $(v,h,y,w){const g={};return w||(v=_(b(v,y),y),h=_(b(h,y),y)),y=y||{},!y.tolerant&&h.scheme?(g.scheme=h.scheme,g.userinfo=h.userinfo,g.host=h.host,g.port=h.port,g.path=n(h.path||""),g.query=h.query):(h.userinfo!==void 0||h.host!==void 0||h.port!==void 0?(g.userinfo=h.userinfo,g.host=h.host,g.port=h.port,g.path=n(h.path||""),g.query=h.query):(h.path?(h.path[0]==="/"?g.path=n(h.path):((v.userinfo!==void 0||v.host!==void 0||v.port!==void 0)&&!v.path?g.path="/"+h.path:v.path?g.path=v.path.slice(0,v.path.lastIndexOf("/")+1)+h.path:g.path=h.path,g.path=n(g.path)),g.query=h.query):(g.path=v.path,h.query!==void 0?g.query=h.query:g.query=v.query),g.userinfo=v.userinfo,g.host=v.host,g.port=v.port),g.scheme=v.scheme),g.fragment=h.fragment,g}function P(v,h,y){return typeof v=="string"?(v=unescape(v),v=b(l(_(v,y),!0),{...y,skipEscape:!0})):typeof v=="object"&&(v=b(l(v,!0),{...y,skipEscape:!0})),typeof h=="string"?(h=unescape(h),h=b(l(_(h,y),!0),{...y,skipEscape:!0})):typeof h=="object"&&(h=b(l(h,!0),{...y,skipEscape:!0})),v.toLowerCase()===h.toLowerCase()}function b(v,h){const y={host:v.host,scheme:v.scheme,userinfo:v.userinfo,port:v.port,path:v.path,query:v.query,nid:v.nid,nss:v.nss,uuid:v.uuid,fragment:v.fragment,reference:v.reference,resourceName:v.resourceName,secure:v.secure,error:""},w=Object.assign({},h),g=[],p=f(w.scheme||y.scheme);p&&p.serialize&&p.serialize(y,w),y.path!==void 0&&(w.skipEscape?y.path=unescape(y.path):(y.path=escape(y.path),y.scheme!==void 0&&(y.path=y.path.split("%3A").join(":")))),w.reference!=="suffix"&&y.scheme&&g.push(y.scheme,":");const S=s(y);if(S!==void 0&&(w.reference!=="suffix"&&g.push("//"),g.push(S),y.path&&y.path[0]!=="/"&&g.push("/")),y.path!==void 0){let O=y.path;!w.absolutePath&&(!p||!p.absolutePath)&&(O=n(O)),S===void 0&&O[0]==="/"&&O[1]==="/"&&(O="/%2F"+O.slice(2)),g.push(O)}return y.query!==void 0&&g.push("?",y.query),y.fragment!==void 0&&g.push("#",y.fragment),g.join("")}var E=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function _(v,h){const y=Object.assign({},h),w={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let g=!1;y.reference==="suffix"&&(y.scheme?v=y.scheme+":"+v:v="//"+v);const p=v.match(E);if(p){if(w.scheme=p[1],w.userinfo=p[3],w.host=p[4],w.port=parseInt(p[5],10),w.path=p[6]||"",w.query=p[7],w.fragment=p[8],isNaN(w.port)&&(w.port=p[5]),w.host)if(i(w.host)===!1){const j=r(w.host);w.host=j.host.toLowerCase(),g=j.isIPV6}else g=!0;w.scheme===void 0&&w.userinfo===void 0&&w.host===void 0&&w.port===void 0&&w.query===void 0&&!w.path?w.reference="same-document":w.scheme===void 0?w.reference="relative":w.fragment===void 0?w.reference="absolute":w.reference="uri",y.reference&&y.reference!=="suffix"&&y.reference!==w.reference&&(w.error=w.error||"URI is not a "+y.reference+" reference.");const S=f(y.scheme||w.scheme);if(!y.unicodeSupport&&(!S||!S.unicodeSupport)&&w.host&&(y.domainHost||S&&S.domainHost)&&g===!1&&c(w.host))try{w.host=URL.domainToASCII(w.host.toLowerCase())}catch(O){w.error=w.error||"Host's domain name can not be converted to ASCII: "+O}(!S||S&&!S.skipNormalize)&&(v.indexOf("%")!==-1&&(w.scheme!==void 0&&(w.scheme=unescape(w.scheme)),w.host!==void 0&&(w.host=unescape(w.host))),w.path&&(w.path=escape(unescape(w.path))),w.fragment&&(w.fragment=encodeURI(decodeURIComponent(w.fragment)))),S&&S.parse&&S.parse(w,y)}else w.error=w.error||"URI can not be parsed.";return w}var o={SCHEMES:a,normalize:u,resolve:d,resolveComponent:$,equal:P,serialize:b,parse:_};e.exports=o,e.exports.default=o,e.exports.fastUri=o}),Fa=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=za();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),xa=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Fr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Ie();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});var n=Rn(),s=xr(),l=Is(),i=In(),c=Ie(),a=zr(),f=Mr(),u=Ve(),d=Va(),$=Fa(),P=(x,T)=>new RegExp(x,T);P.code="new RegExp";var b=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},o={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},v=200;function h(x){var T,M,R,m,k,A,G,Q,se,re,ye,N,I,L,F,J,te,be,Ue,Te,Ae,_e,xe,Re,gt;const Xe=x.strict,dt=(T=x.code)===null||T===void 0?void 0:T.optimize,$t=dt===!0||dt===void 0?1:dt||0,ct=(R=(M=x.code)===null||M===void 0?void 0:M.regExp)!==null&&R!==void 0?R:P,wt=(m=x.uriResolver)!==null&&m!==void 0?m:$.default;return{strictSchema:(A=(k=x.strictSchema)!==null&&k!==void 0?k:Xe)!==null&&A!==void 0?A:!0,strictNumbers:(Q=(G=x.strictNumbers)!==null&&G!==void 0?G:Xe)!==null&&Q!==void 0?Q:!0,strictTypes:(re=(se=x.strictTypes)!==null&&se!==void 0?se:Xe)!==null&&re!==void 0?re:"log",strictTuples:(N=(ye=x.strictTuples)!==null&&ye!==void 0?ye:Xe)!==null&&N!==void 0?N:"log",strictRequired:(L=(I=x.strictRequired)!==null&&I!==void 0?I:Xe)!==null&&L!==void 0?L:!1,code:x.code?{...x.code,optimize:$t,regExp:ct}:{optimize:$t,regExp:ct},loopRequired:(F=x.loopRequired)!==null&&F!==void 0?F:v,loopEnum:(J=x.loopEnum)!==null&&J!==void 0?J:v,meta:(te=x.meta)!==null&&te!==void 0?te:!0,messages:(be=x.messages)!==null&&be!==void 0?be:!0,inlineRefs:(Ue=x.inlineRefs)!==null&&Ue!==void 0?Ue:!0,schemaId:(Te=x.schemaId)!==null&&Te!==void 0?Te:"$id",addUsedSchema:(Ae=x.addUsedSchema)!==null&&Ae!==void 0?Ae:!0,validateSchema:(_e=x.validateSchema)!==null&&_e!==void 0?_e:!0,validateFormats:(xe=x.validateFormats)!==null&&xe!==void 0?xe:!0,unicodeRegExp:(Re=x.unicodeRegExp)!==null&&Re!==void 0?Re:!0,int32range:(gt=x.int32range)!==null&&gt!==void 0?gt:!0,uriResolver:wt}}class y{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...h(T)};const{es5:M,lines:R}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:E,es5:M,lines:R}),this.logger=V(T.logger);const m=T.validateFormats;T.validateFormats=!1,this.RULES=(0,l.getRules)(),w.call(this,_,T,"NOT SUPPORTED"),w.call(this,o,T,"DEPRECATED","warn"),this._metaOpts=j.call(this),T.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&O.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),p.call(this),T.validateFormats=m}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:M,schemaId:R}=this.opts;let m=d;R==="id"&&(m={...d},m.id=m.$id,delete m.$id),M&&T&&this.addMetaSchema(m,m[R],!1)}defaultMeta(){const{meta:T,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[M]||T:void 0}validate(T,M){let R;if(typeof T=="string"){if(R=this.getSchema(T),!R)throw new Error(`no schema with key or ref "${T}"`)}else R=this.compile(T);const m=R(M);return"$async"in R||(this.errors=R.errors),m}compile(T,M){const R=this._addSchema(T,M);return R.validate||this._compileSchemaEnv(R)}compileAsync(T,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:R}=this.opts;return m.call(this,T,M);async function m(re,ye){await k.call(this,re.$schema);const N=this._addSchema(re,ye);return N.validate||A.call(this,N)}async function k(re){re&&!this.getSchema(re)&&await m.call(this,{$ref:re},!0)}async function A(re){try{return this._compileSchemaEnv(re)}catch(ye){if(!(ye instanceof s.default))throw ye;return G.call(this,ye),await Q.call(this,ye.missingSchema),A.call(this,re)}}function G({missingSchema:re,missingRef:ye}){if(this.refs[re])throw new Error(`AnySchema ${re} is loaded but ${ye} cannot be resolved`)}async function Q(re){const ye=await se.call(this,re);this.refs[re]||await k.call(this,ye.$schema),this.refs[re]||this.addSchema(ye,re,M)}async function se(re){const ye=this._loading[re];if(ye)return ye;try{return await(this._loading[re]=R(re))}finally{delete this._loading[re]}}}addSchema(T,M,R,m=this.opts.validateSchema){if(Array.isArray(T)){for(const A of T)this.addSchema(A,void 0,R,m);return this}let k;if(typeof T=="object"){const{schemaId:A}=this.opts;if(k=T[A],k!==void 0&&typeof k!="string")throw new Error(`schema ${A} must be string`)}return M=(0,a.normalizeId)(M||k),this._checkUnique(M),this.schemas[M]=this._addSchema(T,R,M,m,!0),this}addMetaSchema(T,M,R=this.opts.validateSchema){return this.addSchema(T,M,!0,R),this}validateSchema(T,M){if(typeof T=="boolean")return!0;let R;if(R=T.$schema,R!==void 0&&typeof R!="string")throw new Error("$schema must be a string");if(R=R||this.opts.defaultMeta||this.defaultMeta(),!R)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const m=this.validate(R,T);if(!m&&M){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return m}getSchema(T){let M;for(;typeof(M=g.call(this,T))=="string";)T=M;if(M===void 0){const{schemaId:R}=this.opts,m=new i.SchemaEnv({schema:{},schemaId:R});if(M=i.resolveSchema.call(this,m,T),!M)return;this.refs[T]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const M=g.call(this,T);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const M=T;this._cache.delete(M);let R=T[this.opts.schemaId];return R&&(R=(0,a.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const M of T)this.addKeyword(M);return this}addKeyword(T,M){let R;if(typeof T=="string")R=T,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=R);else if(typeof T=="object"&&M===void 0){if(M=T,R=M.keyword,Array.isArray(R)&&!R.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,R,M),!M)return(0,u.eachItem)(R,k=>ee.call(this,k)),this;Ee.call(this,M);const m={...M,type:(0,f.getJSONTypes)(M.type),schemaType:(0,f.getJSONTypes)(M.schemaType)};return(0,u.eachItem)(R,m.type.length===0?k=>ee.call(this,k,m):k=>m.type.forEach(A=>ee.call(this,k,m,A))),this}getKeyword(T){const M=this.RULES.all[T];return typeof M=="object"?M.definition:!!M}removeKeyword(T){const{RULES:M}=this;delete M.keywords[T],delete M.all[T];for(const R of M.rules){const m=R.rules.findIndex(k=>k.keyword===T);m>=0&&R.rules.splice(m,1)}return this}addFormat(T,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[T]=M,this}errorsText(T=this.errors,{separator:M=", ",dataVar:R="data"}={}){return!T||T.length===0?"No errors":T.map(m=>`${R}${m.instancePath} ${m.message}`).reduce((m,k)=>m+M+k)}$dataMetaSchema(T,M){const R=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const m of M){const k=m.split("/").slice(1);let A=T;for(const G of k)A=A[G];for(const G in R){const Q=R[G];if(typeof Q!="object")continue;const{$data:se}=Q.definition,re=A[G];se&&re&&(A[G]=ce(re))}}return T}_removeAllSchemas(T,M){for(const R in T){const m=T[R];(!M||M.test(R))&&(typeof m=="string"?delete T[R]:m&&!m.meta&&(this._cache.delete(m.schema),delete T[R]))}}_addSchema(T,M,R,m=this.opts.validateSchema,k=this.opts.addUsedSchema){let A;const{schemaId:G}=this.opts;if(typeof T=="object")A=T[G];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let Q=this._cache.get(T);if(Q!==void 0)return Q;R=(0,a.normalizeId)(A||R);const se=a.getSchemaRefs.call(this,T,R);return Q=new i.SchemaEnv({schema:T,schemaId:G,meta:M,baseId:R,localRefs:se}),this._cache.set(Q.schema,Q),k&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=Q),m&&this.validateSchema(T,!0),Q}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):i.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const M=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,T)}finally{this.opts=M}}}y.ValidationError=n.default,y.MissingRefError=s.default,t.default=y;function w(x,T,M,R="error"){for(const m in x){const k=m;k in T&&this.logger[R](`${M}: option ${m}. ${x[k]}`)}}function g(x){return x=(0,a.normalizeId)(x),this.schemas[x]||this.refs[x]}function p(){const x=this.opts.schemas;if(x)if(Array.isArray(x))this.addSchema(x);else for(const T in x)this.addSchema(x[T],T)}function S(){for(const x in this.opts.formats){const T=this.opts.formats[x];T&&this.addFormat(x,T)}}function O(x){if(Array.isArray(x)){this.addVocabulary(x);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in x){const M=x[T];M.keyword||(M.keyword=T),this.addKeyword(M)}}function j(){const x={...this.opts};for(const T of b)delete x[T];return x}var z={log(){},warn(){},error(){}};function V(x){if(x===!1)return z;if(x===void 0)return console;if(x.log&&x.warn&&x.error)return x;throw new Error("logger must implement log, warn and error methods")}var X=/^[a-z_$][a-z0-9_$:-]*$/i;function W(x,T){const{RULES:M}=this;if((0,u.eachItem)(x,R=>{if(M.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!X.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function ee(x,T,M){var R;const m=T==null?void 0:T.post;if(M&&m)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let A=m?k.post:k.rules.find(({type:Q})=>Q===M);if(A||(A={type:M,rules:[]},k.rules.push(A)),k.keywords[x]=!0,!T)return;const G={keyword:x,definition:{...T,type:(0,f.getJSONTypes)(T.type),schemaType:(0,f.getJSONTypes)(T.schemaType)}};T.before?he.call(this,A,G,T.before):A.rules.push(G),k.all[x]=G,(R=T.implements)===null||R===void 0||R.forEach(Q=>this.addKeyword(Q))}function he(x,T,M){const R=x.rules.findIndex(m=>m.keyword===M);R>=0?x.rules.splice(R,0,T):(x.rules.push(T),this.logger.warn(`rule ${M} is not defined`))}function Ee(x){let{metaSchema:T}=x;T!==void 0&&(x.$data&&this.opts.$data&&(T=ce(T)),x.validateSchema=this.compile(T,!0))}var Ce={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ce(x){return{anyOf:[x,Ce]}}}),Ba=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=e}),Ha=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=xr(),r=Rt(),n=Ie(),s=Gt(),l=In(),i=Ve(),c={keyword:"$ref",schemaType:"string",code(u){const{gen:d,schema:$,it:P}=u,{baseId:b,schemaEnv:E,validateName:_,opts:o,self:v}=P,{root:h}=E;if(($==="#"||$==="#/")&&b===h.baseId)return w();const y=l.resolveRef.call(v,h,b,$);if(y===void 0)throw new e.default(P.opts.uriResolver,b,$);if(y instanceof l.SchemaEnv)return g(y);return p(y);function w(){if(E===h)return f(u,_,E,E.$async);const S=d.scopeValue("root",{ref:h});return f(u,(0,n._)`${S}.validate`,h,h.$async)}function g(S){const O=a(u,S);f(u,O,S,S.$async)}function p(S){const O=d.scopeValue("schema",o.code.source===!0?{ref:S,code:(0,n.stringify)(S)}:{ref:S}),j=d.name("valid"),z=u.subschema({schema:S,dataTypes:[],schemaPath:n.nil,topSchemaRef:O,errSchemaPath:$},j);u.mergeEvaluated(z),u.ok(j)}}};function a(u,d){const{gen:$}=u;return d.validate?$.scopeValue("validate",{ref:d.validate}):(0,n._)`${$.scopeValue("wrapper",{ref:d})}.validate`}t.getValidate=a;function f(u,d,$,P){const{gen:b,it:E}=u,{allErrors:_,schemaEnv:o,opts:v}=E,h=v.passContext?s.default.this:n.nil;P?y():w();function y(){if(!o.$async)throw new Error("async schema referenced by sync schema");const S=b.let("valid");b.try(()=>{b.code((0,n._)`await ${(0,r.callValidateCode)(u,d,h)}`),p(d),_||b.assign(S,!0)},O=>{b.if((0,n._)`!(${O} instanceof ${E.ValidationError})`,()=>b.throw(O)),g(O),_||b.assign(S,!1)}),u.ok(S)}function w(){u.result((0,r.callValidateCode)(u,d,h),()=>p(d),()=>g(d))}function g(S){const O=(0,n._)`${S}.errors`;b.assign(s.default.vErrors,(0,n._)`${s.default.vErrors} === null ? ${O} : ${s.default.vErrors}.concat(${O})`),b.assign(s.default.errors,(0,n._)`${s.default.vErrors}.length`)}function p(S){var O;if(!E.opts.unevaluated)return;const j=(O=$==null?void 0:$.validate)===null||O===void 0?void 0:O.evaluated;if(E.props!==!0)if(j&&!j.dynamicProps)j.props!==void 0&&(E.props=i.mergeEvaluated.props(b,j.props,E.props));else{const z=b.var("props",(0,n._)`${S}.evaluated.props`);E.props=i.mergeEvaluated.props(b,z,E.props,n.Name)}if(E.items!==!0)if(j&&!j.dynamicItems)j.items!==void 0&&(E.items=i.mergeEvaluated.items(b,j.items,E.items));else{const z=b.var("items",(0,n._)`${S}.evaluated.items`);E.items=i.mergeEvaluated.items(b,z,E.items,n.Name)}}}t.callRef=f,t.default=c}),Ka=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ba(),r=Ha(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),Ga=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ie(),r=e.operators,n={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:i,schemaCode:c})=>(0,e.str)`must be ${n[i].okStr} ${c}`,params:({keyword:i,schemaCode:c})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${c}}`},l={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:s,code(i){const{keyword:c,data:a,schemaCode:f}=i;i.fail$data((0,e._)`${a} ${n[c].fail} ${f} || isNaN(${a})`)}};t.default=l}),Wa=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ie(),r={message:({schemaCode:s})=>(0,e.str)`must be multiple of ${s}`,params:({schemaCode:s})=>(0,e._)`{multipleOf: ${s}}`},n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:r,code(s){const{gen:l,data:i,schemaCode:c,it:a}=s,f=a.opts.multipleOfPrecision,u=l.let("res"),d=f?(0,e._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${f}`:(0,e._)`${u} !== parseInt(${u})`;s.fail$data((0,e._)`(${c} === 0 || (${u} = ${i}/${c}, ${d}))`)}};t.default=n}),Ja=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(r){const n=r.length;let s=0,l=0,i;for(;l<n;)s++,i=r.charCodeAt(l++),i>=55296&&i<=56319&&l<n&&(i=r.charCodeAt(l),(i&64512)===56320&&l++);return s}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),Qa=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ie(),r=Ve(),n=Ja(),s={message({keyword:i,schemaCode:c}){const a=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${c} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},l={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:s,code(i){const{keyword:c,data:a,schemaCode:f,it:u}=i,d=c==="maxLength"?e.operators.GT:e.operators.LT,$=u.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,r.useFunc)(i.gen,n.default)}(${a})`;i.fail$data((0,e._)`${$} ${d} ${f}`)}};t.default=l}),Xa=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Rt(),r=Ve(),n=Ie(),s={message:({schemaCode:i})=>(0,n.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,n._)`{pattern: ${i}}`},l={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:s,code(i){const{gen:c,data:a,$data:f,schema:u,schemaCode:d,it:$}=i,P=$.opts.unicodeRegExp?"u":"";if(f){const{regExp:b}=$.opts.code,E=b.code==="new RegExp"?(0,n._)`new RegExp`:(0,r.useFunc)(c,b),_=c.let("valid");c.try(()=>c.assign(_,(0,n._)`${E}(${d}, ${P}).test(${a})`),()=>c.assign(_,!1)),i.fail$data((0,n._)`!${_}`)}else{const b=(0,e.usePattern)(i,u);i.fail$data((0,n._)`!${b}.test(${a})`)}}};t.default=l}),Ya=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ie(),r={message({keyword:s,schemaCode:l}){const i=s==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${l} properties`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:i,schemaCode:c}=s,a=l==="maxProperties"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`Object.keys(${i}).length ${a} ${c}`)}};t.default=n}),Za=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Rt(),r=Ie(),n=Ve(),s={message:({params:{missingProperty:i}})=>(0,r.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,r._)`{missingProperty: ${i}}`},l={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s,code(i){const{gen:c,schema:a,schemaCode:f,data:u,$data:d,it:$}=i,{opts:P}=$;if(!d&&a.length===0)return;const b=a.length>=P.loopRequired;if($.allErrors?E():_(),P.strictRequired){const h=i.parentSchema.properties,{definedProperties:y}=i.it;for(const w of a)if((h==null?void 0:h[w])===void 0&&!y.has(w)){const g=$.schemaEnv.baseId+$.errSchemaPath,p=`required property "${w}" is not defined at "${g}" (strictRequired)`;(0,n.checkStrictMode)($,p,$.opts.strictRequired)}}function E(){if(b||d)i.block$data(r.nil,o);else for(const h of a)(0,e.checkReportMissingProp)(i,h)}function _(){const h=c.let("missing");if(b||d){const y=c.let("valid",!0);i.block$data(y,()=>v(h,y)),i.ok(y)}else c.if((0,e.checkMissingProp)(i,a,h)),(0,e.reportMissingProp)(i,h),c.else()}function o(){c.forOf("prop",f,h=>{i.setParams({missingProperty:h}),c.if((0,e.noPropertyInData)(c,u,h,P.ownProperties),()=>i.error())})}function v(h,y){i.setParams({missingProperty:h}),c.forOf(h,f,()=>{c.assign(y,(0,e.propertyInData)(c,u,h,P.ownProperties)),c.if((0,r.not)(y),()=>{i.error(),c.break()})},r.nil)}}};t.default=l}),eo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ie(),r={message({keyword:s,schemaCode:l}){const i=s==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${l} items`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:i,schemaCode:c}=s,a=l==="maxItems"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`${i}.length ${a} ${c}`)}};t.default=n}),Cn=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ur();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),to=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Mr(),r=Ie(),n=Ve(),s=Cn(),l={message:({params:{i:c,j:a}})=>(0,r.str)`must NOT have duplicate items (items ## ${a} and ${c} are identical)`,params:({params:{i:c,j:a}})=>(0,r._)`{i: ${c}, j: ${a}}`},i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:l,code(c){const{gen:a,data:f,$data:u,schema:d,parentSchema:$,schemaCode:P,it:b}=c;if(!u&&!d)return;const E=a.let("valid"),_=$.items?(0,e.getSchemaTypes)($.items):[];c.block$data(E,o,(0,r._)`${P} === false`),c.ok(E);function o(){const w=a.let("i",(0,r._)`${f}.length`),g=a.let("j");c.setParams({i:w,j:g}),a.assign(E,!0),a.if((0,r._)`${w} > 1`,()=>(v()?h:y)(w,g))}function v(){return _.length>0&&!_.some(w=>w==="object"||w==="array")}function h(w,g){const p=a.name("item"),S=(0,e.checkDataTypes)(_,p,b.opts.strictNumbers,e.DataType.Wrong),O=a.const("indices",(0,r._)`{}`);a.for((0,r._)`;${w}--;`,()=>{a.let(p,(0,r._)`${f}[${w}]`),a.if(S,(0,r._)`continue`),_.length>1&&a.if((0,r._)`typeof ${p} == "string"`,(0,r._)`${p} += "_"`),a.if((0,r._)`typeof ${O}[${p}] == "number"`,()=>{a.assign(g,(0,r._)`${O}[${p}]`),c.error(),a.assign(E,!1).break()}).code((0,r._)`${O}[${p}] = ${w}`)})}function y(w,g){const p=(0,n.useFunc)(a,s.default),S=a.name("outer");a.label(S).for((0,r._)`;${w}--;`,()=>a.for((0,r._)`${g} = ${w}; ${g}--;`,()=>a.if((0,r._)`${p}(${f}[${w}], ${f}[${g}])`,()=>{c.error(),a.assign(E,!1).break(S)})))}}};t.default=i}),ro=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ie(),r=Ve(),n=Cn(),s={message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},l={keyword:"const",$data:!0,error:s,code(i){const{gen:c,data:a,$data:f,schemaCode:u,schema:d}=i;f||d&&typeof d=="object"?i.fail$data((0,e._)`!${(0,r.useFunc)(c,n.default)}(${a}, ${u})`):i.fail((0,e._)`${d} !== ${a}`)}};t.default=l}),no=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ie(),r=Ve(),n=Cn(),s={message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},l={keyword:"enum",schemaType:"array",$data:!0,error:s,code(i){const{gen:c,data:a,$data:f,schema:u,schemaCode:d,it:$}=i;if(!f&&u.length===0)throw new Error("enum must have non-empty array");const P=u.length>=$.opts.loopEnum;let b;const E=()=>b??(b=(0,r.useFunc)(c,n.default));let _;if(P||f)_=c.let("valid"),i.block$data(_,o);else{if(!Array.isArray(u))throw new Error("ajv implementation error");const h=c.const("vSchema",d);_=(0,e.or)(...u.map((y,w)=>v(h,w)))}i.pass(_);function o(){c.assign(_,!1),c.forOf("v",d,h=>c.if((0,e._)`${E()}(${a}, ${h})`,()=>c.assign(_,!0).break()))}function v(h,y){const w=u[y];return typeof w=="object"&&w!==null?(0,e._)`${E()}(${a}, ${h}[${y}])`:(0,e._)`${a} === ${w}`}}};t.default=l}),so=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ga(),r=Wa(),n=Qa(),s=Xa(),l=Ya(),i=Za(),c=eo(),a=to(),f=ro(),u=no(),d=[e.default,r.default,n.default,s.default,l.default,i.default,c.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,u.default];t.default=d}),Ms=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Ie(),r=Ve(),n={message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(i){const{parentSchema:c,it:a}=i,{items:f}=c;if(!Array.isArray(f)){(0,r.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}l(i,f)}};function l(i,c){const{gen:a,schema:f,data:u,keyword:d,it:$}=i;$.items=!0;const P=a.const("len",(0,e._)`${u}.length`);if(f===!1)i.setParams({len:c.length}),i.pass((0,e._)`${P} <= ${c.length}`);else if(typeof f=="object"&&!(0,r.alwaysValidSchema)($,f)){const E=a.var("valid",(0,e._)`${P} <= ${c.length}`);a.if((0,e.not)(E),()=>b(E)),i.ok(E)}function b(E){a.forRange("i",c.length,P,_=>{i.subschema({keyword:d,dataProp:_,dataPropType:r.Type.Num},E),$.allErrors||a.if((0,e.not)(E),()=>a.break())})}}t.validateAdditionalItems=l,t.default=s}),Ds=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Ie(),r=Ve(),n=Rt(),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:c,it:a}=i;if(Array.isArray(c))return l(i,"additionalItems",c);a.items=!0,!(0,r.alwaysValidSchema)(a,c)&&i.ok((0,n.validateArray)(i))}};function l(i,c,a=i.schema){const{gen:f,parentSchema:u,data:d,keyword:$,it:P}=i;_(u),P.opts.unevaluated&&a.length&&P.items!==!0&&(P.items=r.mergeEvaluated.items(f,a.length,P.items));const b=f.name("valid"),E=f.const("len",(0,e._)`${d}.length`);a.forEach((o,v)=>{(0,r.alwaysValidSchema)(P,o)||(f.if((0,e._)`${E} > ${v}`,()=>i.subschema({keyword:$,schemaProp:v,dataProp:v},b)),i.ok(b))});function _(o){const{opts:v,errSchemaPath:h}=P,y=a.length,w=y===o.minItems&&(y===o.maxItems||o[c]===!1);if(v.strictTuples&&!w){const g=`"${$}" is ${y}-tuple, but minItems or maxItems/${c} are not specified or different at path "${h}"`;(0,r.checkStrictMode)(P,g,v.strictTuples)}}}t.validateTuple=l,t.default=s}),io=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ds(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),ao=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ie(),r=Ve(),n=Rt(),s=Ms(),l={message:({params:{len:c}})=>(0,e.str)`must NOT have more than ${c} items`,params:({params:{len:c}})=>(0,e._)`{limit: ${c}}`},i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:l,code(c){const{schema:a,parentSchema:f,it:u}=c,{prefixItems:d}=f;u.items=!0,!(0,r.alwaysValidSchema)(u,a)&&(d?(0,s.validateAdditionalItems)(c,d):c.ok((0,n.validateArray)(c)))}};t.default=i}),oo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ie(),r=Ve(),n={message:({params:{min:l,max:i}})=>i===void 0?(0,e.str)`must contain at least ${l} valid item(s)`:(0,e.str)`must contain at least ${l} and no more than ${i} valid item(s)`,params:({params:{min:l,max:i}})=>i===void 0?(0,e._)`{minContains: ${l}}`:(0,e._)`{minContains: ${l}, maxContains: ${i}}`},s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(l){const{gen:i,schema:c,parentSchema:a,data:f,it:u}=l;let d,$;const{minContains:P,maxContains:b}=a;u.opts.next?(d=P===void 0?1:P,$=b):d=1;const E=i.const("len",(0,e._)`${f}.length`);if(l.setParams({min:d,max:$}),$===void 0&&d===0){(0,r.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if($!==void 0&&d>$){(0,r.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),l.fail();return}if((0,r.alwaysValidSchema)(u,c)){let y=(0,e._)`${E} >= ${d}`;$!==void 0&&(y=(0,e._)`${y} && ${E} <= ${$}`),l.pass(y);return}u.items=!0;const _=i.name("valid");$===void 0&&d===1?v(_,()=>i.if(_,()=>i.break())):d===0?(i.let(_,!0),$!==void 0&&i.if((0,e._)`${f}.length > 0`,o)):(i.let(_,!1),o()),l.result(_,()=>l.reset());function o(){const y=i.name("_valid"),w=i.let("count",0);v(y,()=>i.if(y,()=>h(w)))}function v(y,w){i.forRange("i",0,E,g=>{l.subschema({keyword:"contains",dataProp:g,dataPropType:r.Type.Num,compositeRule:!0},y),w()})}function h(y){i.code((0,e._)`${y}++`),$===void 0?i.if((0,e._)`${y} >= ${d}`,()=>i.assign(_,!0).break()):(i.if((0,e._)`${y} > ${$}`,()=>i.assign(_,!1).break()),d===1?i.assign(_,!0):i.if((0,e._)`${y} >= ${d}`,()=>i.assign(_,!0)))}}};t.default=s}),co=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Ie(),r=Ve(),n=Rt();t.error={message:({params:{property:a,depsCount:f,deps:u}})=>{const d=f===1?"property":"properties";return(0,e.str)`must have ${d} ${u} when property ${a} is present`},params:({params:{property:a,depsCount:f,deps:u,missingProperty:d}})=>(0,e._)`{property: ${a},
13
+ missingProperty: ${d},
14
+ depsCount: ${f},
15
+ deps: ${u}}`};var s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(a){const[f,u]=l(a);i(a,f),c(a,u)}};function l({schema:a}){const f={},u={};for(const d in a){if(d==="__proto__")continue;const $=Array.isArray(a[d])?f:u;$[d]=a[d]}return[f,u]}function i(a,f=a.schema){const{gen:u,data:d,it:$}=a;if(Object.keys(f).length===0)return;const P=u.let("missing");for(const b in f){const E=f[b];if(E.length===0)continue;const _=(0,n.propertyInData)(u,d,b,$.opts.ownProperties);a.setParams({property:b,depsCount:E.length,deps:E.join(", ")}),$.allErrors?u.if(_,()=>{for(const o of E)(0,n.checkReportMissingProp)(a,o)}):(u.if((0,e._)`${_} && (${(0,n.checkMissingProp)(a,E,P)})`),(0,n.reportMissingProp)(a,P),u.else())}}t.validatePropertyDeps=i;function c(a,f=a.schema){const{gen:u,data:d,keyword:$,it:P}=a,b=u.name("valid");for(const E in f)(0,r.alwaysValidSchema)(P,f[E])||(u.if((0,n.propertyInData)(u,d,E,P.opts.ownProperties),()=>{const _=a.subschema({keyword:$,schemaProp:E},b);a.mergeValidEvaluated(_,b)},()=>u.var(b,!0)),a.ok(b))}t.validateSchemaDeps=c,t.default=s}),lo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ie(),r=Ve(),n={message:"property name must be valid",params:({params:l})=>(0,e._)`{propertyName: ${l.propertyName}}`},s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(l){const{gen:i,schema:c,data:a,it:f}=l;if((0,r.alwaysValidSchema)(f,c))return;const u=i.name("valid");i.forIn("key",a,d=>{l.setParams({propertyName:d}),l.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},u),i.if((0,e.not)(u),()=>{l.error(!0),f.allErrors||i.break()})}),l.ok(u)}};t.default=s}),qs=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Rt(),r=Ie(),n=Gt(),s=Ve(),l={message:"must NOT have additional properties",params:({params:c})=>(0,r._)`{additionalProperty: ${c.additionalProperty}}`},i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:l,code(c){const{gen:a,schema:f,parentSchema:u,data:d,errsCount:$,it:P}=c;if(!$)throw new Error("ajv implementation error");const{allErrors:b,opts:E}=P;if(P.props=!0,E.removeAdditional!=="all"&&(0,s.alwaysValidSchema)(P,f))return;const _=(0,e.allSchemaProperties)(u.properties),o=(0,e.allSchemaProperties)(u.patternProperties);v(),c.ok((0,r._)`${$} === ${n.default.errors}`);function v(){a.forIn("key",d,p=>{!_.length&&!o.length?w(p):a.if(h(p),()=>w(p))})}function h(p){let S;if(_.length>8){const O=(0,s.schemaRefOrVal)(P,u.properties,"properties");S=(0,e.isOwnProperty)(a,O,p)}else _.length?S=(0,r.or)(..._.map(O=>(0,r._)`${p} === ${O}`)):S=r.nil;return o.length&&(S=(0,r.or)(S,...o.map(O=>(0,r._)`${(0,e.usePattern)(c,O)}.test(${p})`))),(0,r.not)(S)}function y(p){a.code((0,r._)`delete ${d}[${p}]`)}function w(p){if(E.removeAdditional==="all"||E.removeAdditional&&f===!1){y(p);return}if(f===!1){c.setParams({additionalProperty:p}),c.error(),b||a.break();return}if(typeof f=="object"&&!(0,s.alwaysValidSchema)(P,f)){const S=a.name("valid");E.removeAdditional==="failing"?(g(p,S,!1),a.if((0,r.not)(S),()=>{c.reset(),y(p)})):(g(p,S),b||a.if((0,r.not)(S),()=>a.break()))}}function g(p,S,O){const j={keyword:"additionalProperties",dataProp:p,dataPropType:s.Type.Str};O===!1&&Object.assign(j,{compositeRule:!0,createErrors:!1,allErrors:!1}),c.subschema(j,S)}}};t.default=i}),uo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fr(),r=Rt(),n=Ve(),s=qs(),l={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:c,schema:a,parentSchema:f,data:u,it:d}=i;d.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&s.default.code(new e.KeywordCxt(d,s.default,"additionalProperties"));const $=(0,r.allSchemaProperties)(a);for(const o of $)d.definedProperties.add(o);d.opts.unevaluated&&$.length&&d.props!==!0&&(d.props=n.mergeEvaluated.props(c,(0,n.toHash)($),d.props));const P=$.filter(o=>!(0,n.alwaysValidSchema)(d,a[o]));if(P.length===0)return;const b=c.name("valid");for(const o of P)E(o)?_(o):(c.if((0,r.propertyInData)(c,u,o,d.opts.ownProperties)),_(o),d.allErrors||c.else().var(b,!0),c.endIf()),i.it.definedProperties.add(o),i.ok(b);function E(o){return d.opts.useDefaults&&!d.compositeRule&&a[o].default!==void 0}function _(o){i.subschema({keyword:"properties",schemaProp:o,dataProp:o},b)}}};t.default=l}),fo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Rt(),r=Ie(),n=Ve(),s=Ve(),l={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:c,schema:a,data:f,parentSchema:u,it:d}=i,{opts:$}=d,P=(0,e.allSchemaProperties)(a),b=P.filter(w=>(0,n.alwaysValidSchema)(d,a[w]));if(P.length===0||b.length===P.length&&(!d.opts.unevaluated||d.props===!0))return;const E=$.strictSchema&&!$.allowMatchingProperties&&u.properties,_=c.name("valid");d.props!==!0&&!(d.props instanceof r.Name)&&(d.props=(0,s.evaluatedPropsToName)(c,d.props));const{props:o}=d;v();function v(){for(const w of P)E&&h(w),d.allErrors?y(w):(c.var(_,!0),y(w),c.if(_))}function h(w){for(const g in E)new RegExp(w).test(g)&&(0,n.checkStrictMode)(d,`property ${g} matches pattern ${w} (use allowMatchingProperties)`)}function y(w){c.forIn("key",f,g=>{c.if((0,r._)`${(0,e.usePattern)(i,w)}.test(${g})`,()=>{const p=b.includes(w);p||i.subschema({keyword:"patternProperties",schemaProp:w,dataProp:g,dataPropType:s.Type.Str},_),d.opts.unevaluated&&o!==!0?c.assign((0,r._)`${o}[${g}]`,!0):!p&&!d.allErrors&&c.if((0,r.not)(_),()=>c.break())})})}}};t.default=l}),ho=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ve(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:s,schema:l,it:i}=n;if((0,e.alwaysValidSchema)(i,l)){n.fail();return}const c=s.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},c),n.failResult(c,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};t.default=r}),po=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Rt(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r}),mo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ie(),r=Ve(),n={message:"must match exactly one schema in oneOf",params:({params:l})=>(0,e._)`{passingSchemas: ${l.passing}}`},s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(l){const{gen:i,schema:c,parentSchema:a,it:f}=l;if(!Array.isArray(c))throw new Error("ajv implementation error");if(f.opts.discriminator&&a.discriminator)return;const u=c,d=i.let("valid",!1),$=i.let("passing",null),P=i.name("_valid");l.setParams({passing:$}),i.block(b),l.result(d,()=>l.reset(),()=>l.error(!0));function b(){u.forEach((E,_)=>{let o;(0,r.alwaysValidSchema)(f,E)?i.var(P,!0):o=l.subschema({keyword:"oneOf",schemaProp:_,compositeRule:!0},P),_>0&&i.if((0,e._)`${P} && ${d}`).assign(d,!1).assign($,(0,e._)`[${$}, ${_}]`).else(),i.if(P,()=>{i.assign(d,!0),i.assign($,_),o&&l.mergeEvaluated(o,e.Name)})})}}};t.default=s}),go=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ve(),r={keyword:"allOf",schemaType:"array",code(n){const{gen:s,schema:l,it:i}=n;if(!Array.isArray(l))throw new Error("ajv implementation error");const c=s.name("valid");l.forEach((a,f)=>{if((0,e.alwaysValidSchema)(i,a))return;const u=n.subschema({keyword:"allOf",schemaProp:f},c);n.ok(c),n.mergeEvaluated(u)})}};t.default=r}),yo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ie(),r=Ve(),n={message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(i){const{gen:c,parentSchema:a,it:f}=i;a.then===void 0&&a.else===void 0&&(0,r.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const u=l(f,"then"),d=l(f,"else");if(!u&&!d)return;const $=c.let("valid",!0),P=c.name("_valid");if(b(),i.reset(),u&&d){const _=c.let("ifClause");i.setParams({ifClause:_}),c.if(P,E("then",_),E("else",_))}else u?c.if(P,E("then")):c.if((0,e.not)(P),E("else"));i.pass($,()=>i.error(!0));function b(){const _=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},P);i.mergeEvaluated(_)}function E(_,o){return()=>{const v=i.subschema({keyword:_},P);c.assign($,P),i.mergeValidEvaluated(v,$),o?c.assign(o,(0,e._)`${_}`):i.setParams({ifClause:_})}}}};function l(i,c){const a=i.schema[c];return a!==void 0&&!(0,r.alwaysValidSchema)(i,a)}t.default=s}),vo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ve(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:s,it:l}){s.if===void 0&&(0,e.checkStrictMode)(l,`"${n}" without "if" is ignored`)}};t.default=r}),_o=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ms(),r=io(),n=Ds(),s=ao(),l=oo(),i=co(),c=lo(),a=qs(),f=uo(),u=fo(),d=ho(),$=po(),P=mo(),b=go(),E=yo(),_=vo();function o(v=!1){const h=[d.default,$.default,P.default,b.default,E.default,_.default,c.default,a.default,i.default,f.default,u.default];return v?h.push(r.default,s.default):h.push(e.default,n.default),h.push(l.default),h}t.default=o}),wo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ie(),r={message:({schemaCode:s})=>(0,e.str)`must match format "${s}"`,params:({schemaCode:s})=>(0,e._)`{format: ${s}}`},n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r,code(s,l){const{gen:i,data:c,$data:a,schema:f,schemaCode:u,it:d}=s,{opts:$,errSchemaPath:P,schemaEnv:b,self:E}=d;if(!$.validateFormats)return;a?_():o();function _(){const v=i.scopeValue("formats",{ref:E.formats,code:$.code.formats}),h=i.const("fDef",(0,e._)`${v}[${u}]`),y=i.let("fType"),w=i.let("format");i.if((0,e._)`typeof ${h} == "object" && !(${h} instanceof RegExp)`,()=>i.assign(y,(0,e._)`${h}.type || "string"`).assign(w,(0,e._)`${h}.validate`),()=>i.assign(y,(0,e._)`"string"`).assign(w,h)),s.fail$data((0,e.or)(g(),p()));function g(){return $.strictSchema===!1?e.nil:(0,e._)`${u} && !${w}`}function p(){const S=b.$async?(0,e._)`(${h}.async ? await ${w}(${c}) : ${w}(${c}))`:(0,e._)`${w}(${c})`,O=(0,e._)`(typeof ${w} == "function" ? ${S} : ${w}.test(${c}))`;return(0,e._)`${w} && ${w} !== true && ${y} === ${l} && !${O}`}}function o(){const v=E.formats[f];if(!v){g();return}if(v===!0)return;const[h,y,w]=p(v);h===l&&s.pass(S());function g(){if($.strictSchema===!1){E.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${f}" ignored in schema at path "${P}"`}}function p(O){const j=O instanceof RegExp?(0,e.regexpCode)(O):$.code.formats?(0,e._)`${$.code.formats}${(0,e.getProperty)(f)}`:void 0,z=i.scopeValue("formats",{key:f,ref:O,code:j});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${z}.validate`]:["string",O,z]}function S(){if(typeof v=="object"&&!(v instanceof RegExp)&&v.async){if(!b.$async)throw new Error("async format in sync schema");return(0,e._)`await ${w}(${c})`}return typeof y=="function"?(0,e._)`${w}(${c})`:(0,e._)`${w}.test(${c})`}}}};t.default=n}),$o=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=wo(),r=[e.default];t.default=r}),bo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),Eo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ka(),r=so(),n=_o(),s=$o(),l=bo(),i=[e.default,r.default,(0,n.default)(),s.default,l.metadataVocabulary,l.contentVocabulary];t.default=i}),So=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0;var e;(function(r){r.Tag="tag",r.Mapping="mapping"})(e||(t.DiscrError=e={}))}),Po=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ie(),r=So(),n=In(),s=xr(),l=Ve(),i={message:({params:{discrError:a,tagName:f}})=>a===r.DiscrError.Tag?`tag "${f}" must be string`:`value of tag "${f}" must be in oneOf`,params:({params:{discrError:a,tag:f,tagName:u}})=>(0,e._)`{error: ${a}, tag: ${u}, tagValue: ${f}}`},c={keyword:"discriminator",type:"object",schemaType:"object",error:i,code(a){const{gen:f,data:u,schema:d,parentSchema:$,it:P}=a,{oneOf:b}=$;if(!P.opts.discriminator)throw new Error("discriminator: requires discriminator option");const E=d.propertyName;if(typeof E!="string")throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!b)throw new Error("discriminator: requires oneOf keyword");const _=f.let("valid",!1),o=f.const("tag",(0,e._)`${u}${(0,e.getProperty)(E)}`);f.if((0,e._)`typeof ${o} == "string"`,()=>v(),()=>a.error(!1,{discrError:r.DiscrError.Tag,tag:o,tagName:E})),a.ok(_);function v(){const w=y();f.if(!1);for(const g in w)f.elseIf((0,e._)`${o} === ${g}`),f.assign(_,h(w[g]));f.else(),a.error(!1,{discrError:r.DiscrError.Mapping,tag:o,tagName:E}),f.endIf()}function h(w){const g=f.name("valid"),p=a.subschema({keyword:"oneOf",schemaProp:w},g);return a.mergeEvaluated(p,e.Name),g}function y(){var w;const g={},p=O($);let S=!0;for(let V=0;V<b.length;V++){let X=b[V];if(X!=null&&X.$ref&&!(0,l.schemaHasRulesButRef)(X,P.self.RULES)){const ee=X.$ref;if(X=n.resolveRef.call(P.self,P.schemaEnv.root,P.baseId,ee),X instanceof n.SchemaEnv&&(X=X.schema),X===void 0)throw new s.default(P.opts.uriResolver,P.baseId,ee)}const W=(w=X==null?void 0:X.properties)===null||w===void 0?void 0:w[E];if(typeof W!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${E}"`);S=S&&(p||O(X)),j(W,V)}if(!S)throw new Error(`discriminator: "${E}" must be required`);return g;function O({required:V}){return Array.isArray(V)&&V.includes(E)}function j(V,X){if(V.const)z(V.const,X);else if(V.enum)for(const W of V.enum)z(W,X);else throw new Error(`discriminator: "properties/${E}" must have "const" or "enum"`)}function z(V,X){if(typeof V!="string"||V in g)throw new Error(`discriminator: "${E}" values must be unique strings`);g[V]=X}}}};t.default=c}),ko=B(function(t,e){e.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}}),An=B(function(t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;var r=xa(),n=Eo(),s=Po(),l=ko(),i=["/properties"],c="http://json-schema.org/draft-07/schema";class a extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(l,i):l;this.addMetaSchema(b,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=a,e.exports=t=a,e.exports.Ajv=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var f=Fr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var u=Ie();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var d=Rn();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var $=xr();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return $.default}})}),Oo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(O,j){return{validate:O,compare:j}}t.fullFormats={date:e(l,i),time:e(a,f),"date-time":e(d,$),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:E,"uri-reference":/^(?:[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,"uri-template":/^(?:(?:[^\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,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,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:/^(?=.{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,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([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}))|:)))$/i,regex:S,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:o,int32:{type:"number",validate:y},int64:{type:"number",validate:w},float:{type:"number",validate:g},double:{type:"number",validate:g},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,i),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,f),"date-time":e(/^\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,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},t.formatNames=Object.keys(t.fullFormats);function r(O){return O%4===0&&(O%100!==0||O%400===0)}var n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function l(O){const j=n.exec(O);if(!j)return!1;const z=+j[1],V=+j[2],X=+j[3];return V>=1&&V<=12&&X>=1&&X<=(V===2&&r(z)?29:s[V])}function i(O,j){if(O&&j)return O>j?1:O<j?-1:0}var c=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function a(O,j){const z=c.exec(O);if(!z)return!1;const V=+z[1],X=+z[2],W=+z[3],ee=z[5];return(V<=23&&X<=59&&W<=59||V===23&&X===59&&W===60)&&(!j||ee!=="")}function f(O,j){if(!(O&&j))return;const z=c.exec(O),V=c.exec(j);if(z&&V)return O=z[1]+z[2]+z[3]+(z[4]||""),j=V[1]+V[2]+V[3]+(V[4]||""),O>j?1:O<j?-1:0}var u=/t|\s/i;function d(O){const j=O.split(u);return j.length===2&&l(j[0])&&a(j[1],!0)}function $(O,j){if(!(O&&j))return;const[z,V]=O.split(u),[X,W]=j.split(u),ee=i(z,X);if(ee!==void 0)return ee||f(V,W)}var P=/\/|:/,b=/^(?:[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;function E(O){return P.test(O)&&b.test(O)}var _=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function o(O){return _.lastIndex=0,_.test(O)}var v=-2147483648,h=2**31-1;function y(O){return Number.isInteger(O)&&O<=h&&O>=v}function w(O){return Number.isInteger(O)}function g(){return!0}var p=/[^\\]\\Z/;function S(O){if(p.test(O))return!1;try{return new RegExp(O),!0}catch{return!1}}}),Dr=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(v){if(super(),!t.IDENTIFIER.test(v))throw new Error("CodeGen: name must be a valid identifier");this.str=v}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(v){super(),this._items=typeof v=="string"?[v]:v}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const v=this._items[0];return v===""||v==='""'}get str(){var v;return(v=this._str)!==null&&v!==void 0?v:this._str=this._items.reduce((h,y)=>`${h}${y}`,"")}get names(){var v;return(v=this._names)!==null&&v!==void 0?v:this._names=this._items.reduce((h,y)=>(y instanceof r&&(h[y.str]=(h[y.str]||0)+1),h),{})}}t._Code=n,t.nil=new n("");function s(o,...v){const h=[o[0]];let y=0;for(;y<v.length;)c(h,v[y]),h.push(o[++y]);return new n(h)}t._=s;var l=new n("+");function i(o,...v){const h=[P(o[0])];let y=0;for(;y<v.length;)h.push(l),c(h,v[y]),h.push(l,P(o[++y]));return a(h),new n(h)}t.str=i;function c(o,v){v instanceof n?o.push(...v._items):v instanceof r?o.push(v):o.push(d(v))}t.addCodeArg=c;function a(o){let v=1;for(;v<o.length-1;){if(o[v]===l){const h=f(o[v-1],o[v+1]);if(h!==void 0){o.splice(v-1,3,h);continue}o[v++]="+"}v++}}function f(o,v){if(v==='""')return o;if(o==='""')return v;if(typeof o=="string")return v instanceof r||o[o.length-1]!=='"'?void 0:typeof v!="string"?`${o.slice(0,-1)}${v}"`:v[0]==='"'?o.slice(0,-1)+v.slice(1):void 0;if(typeof v=="string"&&v[0]==='"'&&!(o instanceof r))return`"${o}${v.slice(1)}`}function u(o,v){return v.emptyStr()?o:o.emptyStr()?v:i`${o}${v}`}t.strConcat=u;function d(o){return typeof o=="number"||typeof o=="boolean"||o===null?o:P(Array.isArray(o)?o.join(","):o)}function $(o){return new n(P(o))}t.stringify=$;function P(o){return JSON.stringify(o).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=P;function b(o){return typeof o=="string"&&t.IDENTIFIER.test(o)?new n(`.${o}`):s`[${o}]`}t.getProperty=b;function E(o){if(typeof o=="string"&&t.IDENTIFIER.test(o))return new n(`${o}`);throw new Error(`CodeGen: invalid export name: ${o}, use explicit $id name mapping`)}t.getEsmExportName=E;function _(o){return new n(o.toString())}t.regexpCode=_}),as=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=Dr();class r extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var n;(function(a){a[a.Started=0]="Started",a[a.Completed=1]="Completed"})(n=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class s{constructor({prefixes:f,parent:u}={}){this._names={},this._prefixes=f,this._parent=u}toName(f){return f instanceof e.Name?f:this.name(f)}name(f){return new e.Name(this._newName(f))}_newName(f){const u=this._names[f]||this._nameGroup(f);return`${f}${u.index++}`}_nameGroup(f){var u,d;if(!((d=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||d===void 0)&&d.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}t.Scope=s;class l extends e.Name{constructor(f,u){super(u),this.prefix=f}setValue(f,{property:u,itemIndex:d}){this.value=f,this.scopePath=(0,e._)`.${new e.Name(u)}[${d}]`}}t.ValueScopeName=l;var i=(0,e._)`\n`;class c extends s{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?i:e.nil}}get(){return this._scope}name(f){return new l(f,this._newName(f))}value(f,u){var d;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const $=this.toName(f),{prefix:P}=$,b=(d=u.key)!==null&&d!==void 0?d:u.ref;let E=this._values[P];if(E){const v=E.get(b);if(v)return v}else E=this._values[P]=new Map;E.set(b,$);const _=this._scope[P]||(this._scope[P]=[]),o=_.length;return _[o]=u.ref,$.setValue(u,{property:P,itemIndex:o}),$}getValue(f,u){const d=this._values[f];if(d)return d.get(u)}scopeRefs(f,u=this._values){return this._reduceValues(u,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e._)`${f}${d.scopePath}`})}scopeCode(f=this._values,u,d){return this._reduceValues(f,$=>{if($.value===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return $.value.code},u,d)}_reduceValues(f,u,d={},$){let P=e.nil;for(const b in f){const E=f[b];if(!E)continue;const _=d[b]=d[b]||new Map;E.forEach(o=>{if(_.has(o))return;_.set(o,n.Started);let v=u(o);if(v){const h=this.opts.es5?t.varKinds.var:t.varKinds.const;P=(0,e._)`${P}${h} ${o} = ${v};${this.opts._n}`}else if(v=$==null?void 0:$(o))P=(0,e._)`${P}${v}${this.opts._n}`;else throw new r(o);_.set(o,n.Completed)})}return P}}t.ValueScope=c}),Ne=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var e=Dr(),r=as(),n=Dr();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var s=as();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class l{optimizeNodes(){return this}optimizeNames(m,k){return this}}class i extends l{constructor(m,k,A){super(),this.varKind=m,this.name=k,this.rhs=A}render({es5:m,_n:k}){const A=m?r.varKinds.var:this.varKind,G=this.rhs===void 0?"":` = ${this.rhs}`;return`${A} ${this.name}${G};`+k}optimizeNames(m,k){if(m[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,m,k)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class c extends l{constructor(m,k,A){super(),this.lhs=m,this.rhs=k,this.sideEffects=A}render({_n:m}){return`${this.lhs} = ${this.rhs};`+m}optimizeNames(m,k){if(!(this.lhs instanceof e.Name&&!m[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,m,k),this}get names(){const m=this.lhs instanceof e.Name?{}:{...this.lhs.names};return X(m,this.rhs)}}class a extends c{constructor(m,k,A,G){super(m,A,G),this.op=k}render({_n:m}){return`${this.lhs} ${this.op}= ${this.rhs};`+m}}class f extends l{constructor(m){super(),this.label=m,this.names={}}render({_n:m}){return`${this.label}:`+m}}class u extends l{constructor(m){super(),this.label=m,this.names={}}render({_n:m}){return`break${this.label?` ${this.label}`:""};`+m}}class d extends l{constructor(m){super(),this.error=m}render({_n:m}){return`throw ${this.error};`+m}get names(){return this.error.names}}class $ extends l{constructor(m){super(),this.code=m}render({_n:m}){return`${this.code};`+m}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(m,k){return this.code=W(this.code,m,k),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class P extends l{constructor(m=[]){super(),this.nodes=m}render(m){return this.nodes.reduce((k,A)=>k+A.render(m),"")}optimizeNodes(){const{nodes:m}=this;let k=m.length;for(;k--;){const A=m[k].optimizeNodes();Array.isArray(A)?m.splice(k,1,...A):A?m[k]=A:m.splice(k,1)}return m.length>0?this:void 0}optimizeNames(m,k){const{nodes:A}=this;let G=A.length;for(;G--;){const Q=A[G];Q.optimizeNames(m,k)||(ee(m,Q.names),A.splice(G,1))}return A.length>0?this:void 0}get names(){return this.nodes.reduce((m,k)=>V(m,k.names),{})}}class b extends P{render(m){return"{"+m._n+super.render(m)+"}"+m._n}}class E extends P{}class _ extends b{}_.kind="else";class o extends b{constructor(m,k){super(k),this.condition=m}render(m){let k=`if(${this.condition})`+super.render(m);return this.else&&(k+="else "+this.else.render(m)),k}optimizeNodes(){super.optimizeNodes();const m=this.condition;if(m===!0)return this.nodes;let k=this.else;if(k){const A=k.optimizeNodes();k=this.else=Array.isArray(A)?new _(A):A}if(k)return m===!1?k instanceof o?k:k.nodes:this.nodes.length?this:new o(he(m),k instanceof o?[k]:k.nodes);if(!(m===!1||!this.nodes.length))return this}optimizeNames(m,k){var A;if(this.else=(A=this.else)===null||A===void 0?void 0:A.optimizeNames(m,k),!!(super.optimizeNames(m,k)||this.else))return this.condition=W(this.condition,m,k),this}get names(){const m=super.names;return X(m,this.condition),this.else&&V(m,this.else.names),m}}o.kind="if";class v extends b{}v.kind="for";class h extends v{constructor(m){super(),this.iteration=m}render(m){return`for(${this.iteration})`+super.render(m)}optimizeNames(m,k){if(super.optimizeNames(m,k))return this.iteration=W(this.iteration,m,k),this}get names(){return V(super.names,this.iteration.names)}}class y extends v{constructor(m,k,A,G){super(),this.varKind=m,this.name=k,this.from=A,this.to=G}render(m){const k=m.es5?r.varKinds.var:this.varKind,{name:A,from:G,to:Q}=this;return`for(${k} ${A}=${G}; ${A}<${Q}; ${A}++)`+super.render(m)}get names(){const m=X(super.names,this.from);return X(m,this.to)}}class w extends v{constructor(m,k,A,G){super(),this.loop=m,this.varKind=k,this.name=A,this.iterable=G}render(m){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(m)}optimizeNames(m,k){if(super.optimizeNames(m,k))return this.iterable=W(this.iterable,m,k),this}get names(){return V(super.names,this.iterable.names)}}class g extends b{constructor(m,k,A){super(),this.name=m,this.args=k,this.async=A}render(m){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(m)}}g.kind="func";class p extends P{render(m){return"return "+super.render(m)}}p.kind="return";class S extends b{render(m){let k="try"+super.render(m);return this.catch&&(k+=this.catch.render(m)),this.finally&&(k+=this.finally.render(m)),k}optimizeNodes(){var m,k;return super.optimizeNodes(),(m=this.catch)===null||m===void 0||m.optimizeNodes(),(k=this.finally)===null||k===void 0||k.optimizeNodes(),this}optimizeNames(m,k){var A,G;return super.optimizeNames(m,k),(A=this.catch)===null||A===void 0||A.optimizeNames(m,k),(G=this.finally)===null||G===void 0||G.optimizeNames(m,k),this}get names(){const m=super.names;return this.catch&&V(m,this.catch.names),this.finally&&V(m,this.finally.names),m}}class O extends b{constructor(m){super(),this.error=m}render(m){return`catch(${this.error})`+super.render(m)}}O.kind="catch";class j extends b{render(m){return"finally"+super.render(m)}}j.kind="finally";class z{constructor(m,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
16
+ `:""},this._extScope=m,this._scope=new r.Scope({parent:m}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(m){return this._scope.name(m)}scopeName(m){return this._extScope.name(m)}scopeValue(m,k){const A=this._extScope.value(m,k);return(this._values[A.prefix]||(this._values[A.prefix]=new Set)).add(A),A}getScopeValue(m,k){return this._extScope.getValue(m,k)}scopeRefs(m){return this._extScope.scopeRefs(m,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(m,k,A,G){const Q=this._scope.toName(k);return A!==void 0&&G&&(this._constants[Q.str]=A),this._leafNode(new i(m,Q,A)),Q}const(m,k,A){return this._def(r.varKinds.const,m,k,A)}let(m,k,A){return this._def(r.varKinds.let,m,k,A)}var(m,k,A){return this._def(r.varKinds.var,m,k,A)}assign(m,k,A){return this._leafNode(new c(m,k,A))}add(m,k){return this._leafNode(new a(m,t.operators.ADD,k))}code(m){return typeof m=="function"?m():m!==e.nil&&this._leafNode(new $(m)),this}object(...m){const k=["{"];for(const[A,G]of m)k.length>1&&k.push(","),k.push(A),(A!==G||this.opts.es5)&&(k.push(":"),(0,e.addCodeArg)(k,G));return k.push("}"),new e._Code(k)}if(m,k,A){if(this._blockNode(new o(m)),k&&A)this.code(k).else().code(A).endIf();else if(k)this.code(k).endIf();else if(A)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(m){return this._elseNode(new o(m))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(o,_)}_for(m,k){return this._blockNode(m),k&&this.code(k).endFor(),this}for(m,k){return this._for(new h(m),k)}forRange(m,k,A,G,Q=this.opts.es5?r.varKinds.var:r.varKinds.let){const se=this._scope.toName(m);return this._for(new y(Q,se,k,A),()=>G(se))}forOf(m,k,A,G=r.varKinds.const){const Q=this._scope.toName(m);if(this.opts.es5){const se=k instanceof e.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,e._)`${se}.length`,re=>{this.var(Q,(0,e._)`${se}[${re}]`),A(Q)})}return this._for(new w("of",G,Q,k),()=>A(Q))}forIn(m,k,A,G=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(m,(0,e._)`Object.keys(${k})`,A);const Q=this._scope.toName(m);return this._for(new w("in",G,Q,k),()=>A(Q))}endFor(){return this._endBlockNode(v)}label(m){return this._leafNode(new f(m))}break(m){return this._leafNode(new u(m))}return(m){const k=new p;if(this._blockNode(k),this.code(m),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(p)}try(m,k,A){if(!k&&!A)throw new Error('CodeGen: "try" without "catch" and "finally"');const G=new S;if(this._blockNode(G),this.code(m),k){const Q=this.name("e");this._currNode=G.catch=new O(Q),k(Q)}return A&&(this._currNode=G.finally=new j,this.code(A)),this._endBlockNode(O,j)}throw(m){return this._leafNode(new d(m))}block(m,k){return this._blockStarts.push(this._nodes.length),m&&this.code(m).endBlock(k),this}endBlock(m){const k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");const A=this._nodes.length-k;if(A<0||m!==void 0&&A!==m)throw new Error(`CodeGen: wrong number of nodes: ${A} vs ${m} expected`);return this._nodes.length=k,this}func(m,k=e.nil,A,G){return this._blockNode(new g(m,k,A)),G&&this.code(G).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(m=1){for(;m-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(m){return this._currNode.nodes.push(m),this}_blockNode(m){this._currNode.nodes.push(m),this._nodes.push(m)}_endBlockNode(m,k){const A=this._currNode;if(A instanceof m||k&&A instanceof k)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${k?`${m.kind}/${k.kind}`:m.kind}"`)}_elseNode(m){const k=this._currNode;if(!(k instanceof o))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=m,this}get _root(){return this._nodes[0]}get _currNode(){const m=this._nodes;return m[m.length-1]}set _currNode(m){const k=this._nodes;k[k.length-1]=m}}t.CodeGen=z;function V(R,m){for(const k in m)R[k]=(R[k]||0)+(m[k]||0);return R}function X(R,m){return m instanceof e._CodeOrName?V(R,m.names):R}function W(R,m,k){if(R instanceof e.Name)return A(R);if(!G(R))return R;return new e._Code(R._items.reduce((Q,se)=>(se instanceof e.Name&&(se=A(se)),se instanceof e._Code?Q.push(...se._items):Q.push(se),Q),[]));function A(Q){const se=k[Q.str];return se===void 0||m[Q.str]!==1?Q:(delete m[Q.str],se)}function G(Q){return Q instanceof e._Code&&Q._items.some(se=>se instanceof e.Name&&m[se.str]===1&&k[se.str]!==void 0)}}function ee(R,m){for(const k in m)R[k]=(R[k]||0)-(m[k]||0)}function he(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,e._)`!${M(R)}`}t.not=he;var Ee=T(t.operators.AND);function Ce(...R){return R.reduce(Ee)}t.and=Ce;var ce=T(t.operators.OR);function x(...R){return R.reduce(ce)}t.or=x;function T(R){return(m,k)=>m===e.nil?k:k===e.nil?m:(0,e._)`${M(m)} ${R} ${M(k)}`}function M(R){return R instanceof e.Name?R:(0,e._)`(${R})`}}),ze=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;var e=Ne(),r=Dr();function n(g){const p={};for(const S of g)p[S]=!0;return p}t.toHash=n;function s(g,p){return typeof p=="boolean"?p:Object.keys(p).length===0?!0:(l(g,p),!i(p,g.self.RULES.all))}t.alwaysValidSchema=s;function l(g,p=g.schema){const{opts:S,self:O}=g;if(!S.strictSchema||typeof p=="boolean")return;const j=O.RULES.keywords;for(const z in p)j[z]||w(g,`unknown keyword: "${z}"`)}t.checkUnknownRules=l;function i(g,p){if(typeof g=="boolean")return!g;for(const S in g)if(p[S])return!0;return!1}t.schemaHasRules=i;function c(g,p){if(typeof g=="boolean")return!g;for(const S in g)if(S!=="$ref"&&p.all[S])return!0;return!1}t.schemaHasRulesButRef=c;function a({topSchemaRef:g,schemaPath:p},S,O,j){if(!j){if(typeof S=="number"||typeof S=="boolean")return S;if(typeof S=="string")return(0,e._)`${S}`}return(0,e._)`${g}${p}${(0,e.getProperty)(O)}`}t.schemaRefOrVal=a;function f(g){return $(decodeURIComponent(g))}t.unescapeFragment=f;function u(g){return encodeURIComponent(d(g))}t.escapeFragment=u;function d(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=d;function $(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=$;function P(g,p){if(Array.isArray(g))for(const S of g)p(S);else p(g)}t.eachItem=P;function b({mergeNames:g,mergeToName:p,mergeValues:S,resultToName:O}){return(j,z,V,X)=>{const W=V===void 0?z:V instanceof e.Name?(z instanceof e.Name?g(j,z,V):p(j,z,V),V):z instanceof e.Name?(p(j,V,z),z):S(z,V);return X===e.Name&&!(W instanceof e.Name)?O(j,W):W}}t.mergeEvaluated={props:b({mergeNames:(g,p,S)=>g.if((0,e._)`${S} !== true && ${p} !== undefined`,()=>{g.if((0,e._)`${p} === true`,()=>g.assign(S,!0),()=>g.assign(S,(0,e._)`${S} || {}`).code((0,e._)`Object.assign(${S}, ${p})`))}),mergeToName:(g,p,S)=>g.if((0,e._)`${S} !== true`,()=>{p===!0?g.assign(S,!0):(g.assign(S,(0,e._)`${S} || {}`),_(g,S,p))}),mergeValues:(g,p)=>g===!0?!0:{...g,...p},resultToName:E}),items:b({mergeNames:(g,p,S)=>g.if((0,e._)`${S} !== true && ${p} !== undefined`,()=>g.assign(S,(0,e._)`${p} === true ? true : ${S} > ${p} ? ${S} : ${p}`)),mergeToName:(g,p,S)=>g.if((0,e._)`${S} !== true`,()=>g.assign(S,p===!0?!0:(0,e._)`${S} > ${p} ? ${S} : ${p}`)),mergeValues:(g,p)=>g===!0?!0:Math.max(g,p),resultToName:(g,p)=>g.var("items",p)})};function E(g,p){if(p===!0)return g.var("props",!0);const S=g.var("props",(0,e._)`{}`);return p!==void 0&&_(g,S,p),S}t.evaluatedPropsToName=E;function _(g,p,S){Object.keys(S).forEach(O=>g.assign((0,e._)`${p}${(0,e.getProperty)(O)}`,!0))}t.setEvaluated=_;var o={};function v(g,p){return g.scopeValue("func",{ref:p,code:o[p.code]||(o[p.code]=new r._Code(p.code))})}t.useFunc=v;var h;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(h=t.Type||(t.Type={}));function y(g,p,S){if(g instanceof e.Name){const O=p===h.Num;return S?O?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:O?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return S?(0,e.getProperty)(g).toString():"/"+d(g)}t.getErrorPath=y;function w(g,p,S=g.opts.strictSchema){if(S){if(p=`strict mode: ${p}`,S===!0)throw new Error(p);g.self.logger.warn(p)}}t.checkStrictMode=w}),Wt=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};t.default=r}),Br=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=Ne(),r=ze(),n=Wt();t.keywordError={message:({keyword:_})=>(0,e.str)`must pass "${_}" keyword validation`},t.keyword$DataError={message:({keyword:_,schemaType:o})=>o?(0,e.str)`"${_}" keyword must be ${o} ($data)`:(0,e.str)`"${_}" keyword is invalid ($data)`};function s(_,o=t.keywordError,v,h){const{it:y}=_,{gen:w,compositeRule:g,allErrors:p}=y,S=d(_,o,v);h??(g||p)?a(w,S):f(y,(0,e._)`[${S}]`)}t.reportError=s;function l(_,o=t.keywordError,v){const{it:h}=_,{gen:y,compositeRule:w,allErrors:g}=h,p=d(_,o,v);a(y,p),w||g||f(h,n.default.vErrors)}t.reportExtraError=l;function i(_,o){_.assign(n.default.errors,o),_.if((0,e._)`${n.default.vErrors} !== null`,()=>_.if(o,()=>_.assign((0,e._)`${n.default.vErrors}.length`,o),()=>_.assign(n.default.vErrors,null)))}t.resetErrorsCount=i;function c({gen:_,keyword:o,schemaValue:v,data:h,errsCount:y,it:w}){if(y===void 0)throw new Error("ajv implementation error");const g=_.name("err");_.forRange("i",y,n.default.errors,p=>{_.const(g,(0,e._)`${n.default.vErrors}[${p}]`),_.if((0,e._)`${g}.instancePath === undefined`,()=>_.assign((0,e._)`${g}.instancePath`,(0,e.strConcat)(n.default.instancePath,w.errorPath))),_.assign((0,e._)`${g}.schemaPath`,(0,e.str)`${w.errSchemaPath}/${o}`),w.opts.verbose&&(_.assign((0,e._)`${g}.schema`,v),_.assign((0,e._)`${g}.data`,h))})}t.extendErrors=c;function a(_,o){const v=_.const("err",o);_.if((0,e._)`${n.default.vErrors} === null`,()=>_.assign(n.default.vErrors,(0,e._)`[${v}]`),(0,e._)`${n.default.vErrors}.push(${v})`),_.code((0,e._)`${n.default.errors}++`)}function f(_,o){const{gen:v,validateName:h,schemaEnv:y}=_;y.$async?v.throw((0,e._)`new ${_.ValidationError}(${o})`):(v.assign((0,e._)`${h}.errors`,o),v.return(!1))}var u={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function d(_,o,v){const{createErrors:h}=_.it;return h===!1?(0,e._)`{}`:$(_,o,v)}function $(_,o,v={}){const{gen:h,it:y}=_,w=[P(y,v),b(_,v)];return E(_,o,w),h.object(...w)}function P({errorPath:_},{instancePath:o}){const v=o?(0,e.str)`${_}${(0,r.getErrorPath)(o,r.Type.Str)}`:_;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,v)]}function b({keyword:_,it:{errSchemaPath:o}},{schemaPath:v,parentSchema:h}){let y=h?o:(0,e.str)`${o}/${_}`;return v&&(y=(0,e.str)`${y}${(0,r.getErrorPath)(v,r.Type.Str)}`),[u.schemaPath,y]}function E(_,{params:o,message:v},h){const{keyword:y,data:w,schemaValue:g,it:p}=_,{opts:S,propertyName:O,topSchemaRef:j,schemaPath:z}=p;h.push([u.keyword,y],[u.params,typeof o=="function"?o(_):o||(0,e._)`{}`]),S.messages&&h.push([u.message,typeof v=="function"?v(_):v]),S.verbose&&h.push([u.schema,g],[u.parentSchema,(0,e._)`${j}${z}`],[n.default.data,w]),O&&h.push([u.propertyName,O])}}),No=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=Br(),r=Ne(),n=Wt(),s={message:"boolean schema is false"};function l(a){const{gen:f,schema:u,validateName:d}=a;u===!1?c(a,!1):typeof u=="object"&&u.$async===!0?f.return(n.default.data):(f.assign((0,r._)`${d}.errors`,null),f.return(!0))}t.topBoolOrEmptySchema=l;function i(a,f){const{gen:u,schema:d}=a;d===!1?(u.var(f,!1),c(a)):u.var(f,!0)}t.boolOrEmptySchema=i;function c(a,f){const{gen:u,data:d}=a,$={gen:u,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)($,s,void 0,f)}}),Ls=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;var e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function n(l){return typeof l=="string"&&r.has(l)}t.isJSONType=n;function s(){const l={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...l,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},l.number,l.string,l.array,l.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=s}),Vs=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:s,self:l},i){const c=l.RULES.types[i];return c&&c!==!0&&r(s,c)}t.schemaHasRulesForType=e;function r(s,l){return l.rules.some(i=>n(s,i))}t.shouldUseGroup=r;function n(s,l){var i;return s[l.keyword]!==void 0||((i=l.definition.implements)===null||i===void 0?void 0:i.some(c=>s[c]!==void 0))}t.shouldUseRule=n}),qr=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var e=Ls(),r=Vs(),n=Br(),s=Ne(),l=ze(),i;(function(h){h[h.Correct=0]="Correct",h[h.Wrong=1]="Wrong"})(i=t.DataType||(t.DataType={}));function c(h){const y=a(h.type);if(y.includes("null")){if(h.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!y.length&&h.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');h.nullable===!0&&y.push("null")}return y}t.getSchemaTypes=c;function a(h){const y=Array.isArray(h)?h:h?[h]:[];if(y.every(e.isJSONType))return y;throw new Error("type must be JSONType or JSONType[]: "+y.join(","))}t.getJSONTypes=a;function f(h,y){const{gen:w,data:g,opts:p}=h,S=d(y,p.coerceTypes),O=y.length>0&&!(S.length===0&&y.length===1&&(0,r.schemaHasRulesForType)(h,y[0]));if(O){const j=E(y,g,p.strictNumbers,i.Wrong);w.if(j,()=>{S.length?$(h,y,S):o(h)})}return O}t.coerceAndCheckDataType=f;var u=new Set(["string","number","integer","boolean","null"]);function d(h,y){return y?h.filter(w=>u.has(w)||y==="array"&&w==="array"):[]}function $(h,y,w){const{gen:g,data:p,opts:S}=h,O=g.let("dataType",(0,s._)`typeof ${p}`),j=g.let("coerced",(0,s._)`undefined`);S.coerceTypes==="array"&&g.if((0,s._)`${O} == 'object' && Array.isArray(${p}) && ${p}.length == 1`,()=>g.assign(p,(0,s._)`${p}[0]`).assign(O,(0,s._)`typeof ${p}`).if(E(y,p,S.strictNumbers),()=>g.assign(j,p))),g.if((0,s._)`${j} !== undefined`);for(const V of w)(u.has(V)||V==="array"&&S.coerceTypes==="array")&&z(V);g.else(),o(h),g.endIf(),g.if((0,s._)`${j} !== undefined`,()=>{g.assign(p,j),P(h,j)});function z(V){switch(V){case"string":g.elseIf((0,s._)`${O} == "number" || ${O} == "boolean"`).assign(j,(0,s._)`"" + ${p}`).elseIf((0,s._)`${p} === null`).assign(j,(0,s._)`""`);return;case"number":g.elseIf((0,s._)`${O} == "boolean" || ${p} === null
17
+ || (${O} == "string" && ${p} && ${p} == +${p})`).assign(j,(0,s._)`+${p}`);return;case"integer":g.elseIf((0,s._)`${O} === "boolean" || ${p} === null
18
+ || (${O} === "string" && ${p} && ${p} == +${p} && !(${p} % 1))`).assign(j,(0,s._)`+${p}`);return;case"boolean":g.elseIf((0,s._)`${p} === "false" || ${p} === 0 || ${p} === null`).assign(j,!1).elseIf((0,s._)`${p} === "true" || ${p} === 1`).assign(j,!0);return;case"null":g.elseIf((0,s._)`${p} === "" || ${p} === 0 || ${p} === false`),g.assign(j,null);return;case"array":g.elseIf((0,s._)`${O} === "string" || ${O} === "number"
19
+ || ${O} === "boolean" || ${p} === null`).assign(j,(0,s._)`[${p}]`)}}}function P({gen:h,parentData:y,parentDataProperty:w},g){h.if((0,s._)`${y} !== undefined`,()=>h.assign((0,s._)`${y}[${w}]`,g))}function b(h,y,w,g=i.Correct){const p=g===i.Correct?s.operators.EQ:s.operators.NEQ;let S;switch(h){case"null":return(0,s._)`${y} ${p} null`;case"array":S=(0,s._)`Array.isArray(${y})`;break;case"object":S=(0,s._)`${y} && typeof ${y} == "object" && !Array.isArray(${y})`;break;case"integer":S=O((0,s._)`!(${y} % 1) && !isNaN(${y})`);break;case"number":S=O();break;default:return(0,s._)`typeof ${y} ${p} ${h}`}return g===i.Correct?S:(0,s.not)(S);function O(j=s.nil){return(0,s.and)((0,s._)`typeof ${y} == "number"`,j,w?(0,s._)`isFinite(${y})`:s.nil)}}t.checkDataType=b;function E(h,y,w,g){if(h.length===1)return b(h[0],y,w,g);let p;const S=(0,l.toHash)(h);if(S.array&&S.object){const O=(0,s._)`typeof ${y} != "object"`;p=S.null?O:(0,s._)`!${y} || ${O}`,delete S.null,delete S.array,delete S.object}else p=s.nil;S.number&&delete S.integer;for(const O in S)p=(0,s.and)(p,b(O,y,w,g));return p}t.checkDataTypes=E;var _={message:({schema:h})=>`must be ${h}`,params:({schema:h,schemaValue:y})=>typeof h=="string"?(0,s._)`{type: ${h}}`:(0,s._)`{type: ${y}}`};function o(h){const y=v(h);(0,n.reportError)(y,_)}t.reportTypeError=o;function v(h){const{gen:y,data:w,schema:g}=h,p=(0,l.schemaRefOrVal)(h,g,"type");return{gen:y,keyword:"type",data:w,schema:g.type,schemaCode:p,schemaValue:p,parentSchema:g,params:{},it:h}}}),To=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Ne(),r=ze();function n(l,i){const{properties:c,items:a}=l.schema;if(i==="object"&&c)for(const f in c)s(l,f,c[f].default);else i==="array"&&Array.isArray(a)&&a.forEach((f,u)=>s(l,u,f.default))}t.assignDefaults=n;function s(l,i,c){const{gen:a,compositeRule:f,data:u,opts:d}=l;if(c===void 0)return;const $=(0,e._)`${u}${(0,e.getProperty)(i)}`;if(f){(0,r.checkStrictMode)(l,`default is ignored for: ${$}`);return}let P=(0,e._)`${$} === undefined`;d.useDefaults==="empty"&&(P=(0,e._)`${P} || ${$} === null || ${$} === ""`),a.if(P,(0,e._)`${$} = ${(0,e.stringify)(c)}`)}}),It=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;var e=Ne(),r=ze(),n=Wt(),s=ze();function l(h,y){const{gen:w,data:g,it:p}=h;w.if(d(w,g,y,p.opts.ownProperties),()=>{h.setParams({missingProperty:(0,e._)`${y}`},!0),h.error()})}t.checkReportMissingProp=l;function i({gen:h,data:y,it:{opts:w}},g,p){return(0,e.or)(...g.map(S=>(0,e.and)(d(h,y,S,w.ownProperties),(0,e._)`${p} = ${S}`)))}t.checkMissingProp=i;function c(h,y){h.setParams({missingProperty:y},!0),h.error()}t.reportMissingProp=c;function a(h){return h.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=a;function f(h,y,w){return(0,e._)`${a(h)}.call(${y}, ${w})`}t.isOwnProperty=f;function u(h,y,w,g){const p=(0,e._)`${y}${(0,e.getProperty)(w)} !== undefined`;return g?(0,e._)`${p} && ${f(h,y,w)}`:p}t.propertyInData=u;function d(h,y,w,g){const p=(0,e._)`${y}${(0,e.getProperty)(w)} === undefined`;return g?(0,e.or)(p,(0,e.not)(f(h,y,w))):p}t.noPropertyInData=d;function $(h){return h?Object.keys(h).filter(y=>y!=="__proto__"):[]}t.allSchemaProperties=$;function P(h,y){return $(y).filter(w=>!(0,r.alwaysValidSchema)(h,y[w]))}t.schemaProperties=P;function b({schemaCode:h,data:y,it:{gen:w,topSchemaRef:g,schemaPath:p,errorPath:S},it:O},j,z,V){const X=V?(0,e._)`${h}, ${y}, ${g}${p}`:y,W=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,S)],[n.default.parentData,O.parentData],[n.default.parentDataProperty,O.parentDataProperty],[n.default.rootData,n.default.rootData]];O.opts.dynamicRef&&W.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const ee=(0,e._)`${X}, ${w.object(...W)}`;return z!==e.nil?(0,e._)`${j}.call(${z}, ${ee})`:(0,e._)`${j}(${ee})`}t.callValidateCode=b;var E=(0,e._)`new RegExp`;function _({gen:h,it:{opts:y}},w){const g=y.unicodeRegExp?"u":"",{regExp:p}=y.code,S=p(w,g);return h.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,e._)`${p.code==="new RegExp"?E:(0,s.useFunc)(h,p)}(${w}, ${g})`})}t.usePattern=_;function o(h){const{gen:y,data:w,keyword:g,it:p}=h,S=y.name("valid");if(p.allErrors){const j=y.let("valid",!0);return O(()=>y.assign(j,!1)),j}return y.var(S,!0),O(()=>y.break()),S;function O(j){const z=y.const("len",(0,e._)`${w}.length`);y.forRange("i",0,z,V=>{h.subschema({keyword:g,dataProp:V,dataPropType:r.Type.Num},S),y.if((0,e.not)(S),j)})}}t.validateArray=o;function v(h){const{gen:y,schema:w,keyword:g,it:p}=h;if(!Array.isArray(w))throw new Error("ajv implementation error");if(w.some(z=>(0,r.alwaysValidSchema)(p,z))&&!p.opts.unevaluated)return;const O=y.let("valid",!1),j=y.name("_valid");y.block(()=>w.forEach((z,V)=>{const X=h.subschema({keyword:g,schemaProp:V,compositeRule:!0},j);y.assign(O,(0,e._)`${O} || ${j}`),h.mergeValidEvaluated(X,j)||y.if((0,e.not)(O))})),h.result(O,()=>h.reset(),()=>h.error(!0))}t.validateUnion=v}),Ro=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Ne(),r=Wt(),n=It(),s=Br();function l(P,b){const{gen:E,keyword:_,schema:o,parentSchema:v,it:h}=P,y=b.macro.call(h.self,o,v,h),w=u(E,_,y);h.opts.validateSchema!==!1&&h.self.validateSchema(y,!0);const g=E.name("valid");P.subschema({schema:y,schemaPath:e.nil,errSchemaPath:`${h.errSchemaPath}/${_}`,topSchemaRef:w,compositeRule:!0},g),P.pass(g,()=>P.error(!0))}t.macroKeywordCode=l;function i(P,b){var E;const{gen:_,keyword:o,schema:v,parentSchema:h,$data:y,it:w}=P;f(w,b);const g=!y&&b.compile?b.compile.call(w.self,v,h,w):b.validate,p=u(_,o,g),S=_.let("valid");P.block$data(S,O),P.ok((E=b.valid)!==null&&E!==void 0?E:S);function O(){if(b.errors===!1)V(),b.modifying&&c(P),X(()=>P.error());else{const W=b.async?j():z();b.modifying&&c(P),X(()=>a(P,W))}}function j(){const W=_.let("ruleErrs",null);return _.try(()=>V((0,e._)`await `),ee=>_.assign(S,!1).if((0,e._)`${ee} instanceof ${w.ValidationError}`,()=>_.assign(W,(0,e._)`${ee}.errors`),()=>_.throw(ee))),W}function z(){const W=(0,e._)`${p}.errors`;return _.assign(W,null),V(e.nil),W}function V(W=b.async?(0,e._)`await `:e.nil){const ee=w.opts.passContext?r.default.this:r.default.self,he=!("compile"in b&&!y||b.schema===!1);_.assign(S,(0,e._)`${W}${(0,n.callValidateCode)(P,p,ee,he)}`,b.modifying)}function X(W){var ee;_.if((0,e.not)((ee=b.valid)!==null&&ee!==void 0?ee:S),W)}}t.funcKeywordCode=i;function c(P){const{gen:b,data:E,it:_}=P;b.if(_.parentData,()=>b.assign(E,(0,e._)`${_.parentData}[${_.parentDataProperty}]`))}function a(P,b){const{gen:E}=P;E.if((0,e._)`Array.isArray(${b})`,()=>{E.assign(r.default.vErrors,(0,e._)`${r.default.vErrors} === null ? ${b} : ${r.default.vErrors}.concat(${b})`).assign(r.default.errors,(0,e._)`${r.default.vErrors}.length`),(0,s.extendErrors)(P)},()=>P.error())}function f({schemaEnv:P},b){if(b.async&&!P.$async)throw new Error("async keyword in sync schema")}function u(P,b,E){if(E===void 0)throw new Error(`keyword "${b}" failed to compile`);return P.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,e.stringify)(E)})}function d(P,b,E=!1){return!b.length||b.some(_=>_==="array"?Array.isArray(P):_==="object"?P&&typeof P=="object"&&!Array.isArray(P):typeof P==_||E&&typeof P>"u")}t.validSchemaType=d;function $({schema:P,opts:b,self:E,errSchemaPath:_},o,v){if(Array.isArray(o.keyword)?!o.keyword.includes(v):o.keyword!==v)throw new Error("ajv implementation error");const h=o.dependencies;if(h!=null&&h.some(y=>!Object.prototype.hasOwnProperty.call(P,y)))throw new Error(`parent schema must have dependencies of ${v}: ${h.join(",")}`);if(o.validateSchema&&!o.validateSchema(P[v])){const w=`keyword "${v}" value is invalid at path "${_}": `+E.errorsText(o.validateSchema.errors);if(b.validateSchema==="log")E.logger.error(w);else throw new Error(w)}}t.validateKeywordUsage=$}),Io=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Ne(),r=ze();function n(i,{keyword:c,schemaProp:a,schema:f,schemaPath:u,errSchemaPath:d,topSchemaRef:$}){if(c!==void 0&&f!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(c!==void 0){const P=i.schema[c];return a===void 0?{schema:P,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(c)}`,errSchemaPath:`${i.errSchemaPath}/${c}`}:{schema:P[a],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(c)}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${c}/${(0,r.escapeFragment)(a)}`}}if(f!==void 0){if(u===void 0||d===void 0||$===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:f,schemaPath:u,topSchemaRef:$,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function s(i,c,{dataProp:a,dataPropType:f,data:u,dataTypes:d,propertyName:$}){if(u!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:P}=c;if(a!==void 0){const{errorPath:E,dataPathArr:_,opts:o}=c,v=P.let("data",(0,e._)`${c.data}${(0,e.getProperty)(a)}`,!0);b(v),i.errorPath=(0,e.str)`${E}${(0,r.getErrorPath)(a,f,o.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${a}`,i.dataPathArr=[..._,i.parentDataProperty]}if(u!==void 0){const E=u instanceof e.Name?u:P.let("data",u,!0);b(E),$!==void 0&&(i.propertyName=$)}d&&(i.dataTypes=d);function b(E){i.data=E,i.dataLevel=c.dataLevel+1,i.dataTypes=[],c.definedProperties=new Set,i.parentData=c.data,i.dataNames=[...c.dataNames,E]}}t.extendSubschemaData=s;function l(i,{jtdDiscriminator:c,jtdMetadata:a,compositeRule:f,createErrors:u,allErrors:d}){f!==void 0&&(i.compositeRule=f),u!==void 0&&(i.createErrors=u),d!==void 0&&(i.allErrors=d),i.jtdDiscriminator=c,i.jtdMetadata=a}t.extendSubschemaMode=l}),Hr=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=ze(),r=Ur(),n=As(),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function l(_,o=!0){return typeof _=="boolean"?!0:o===!0?!c(_):o?a(_)<=o:!1}t.inlineRef=l;var i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(_){for(const o in _){if(i.has(o))return!0;const v=_[o];if(Array.isArray(v)&&v.some(c)||typeof v=="object"&&c(v))return!0}return!1}function a(_){let o=0;for(const v in _){if(v==="$ref")return 1/0;if(o++,!s.has(v)&&(typeof _[v]=="object"&&(0,e.eachItem)(_[v],h=>o+=a(h)),o===1/0))return 1/0}return o}function f(_,o="",v){v!==!1&&(o=$(o));const h=_.parse(o);return u(_,h)}t.getFullPath=f;function u(_,o){return _.serialize(o).split("#")[0]+"#"}t._getFullPath=u;var d=/#\/?$/;function $(_){return _?_.replace(d,""):""}t.normalizeId=$;function P(_,o,v){return v=$(v),_.resolve(o,v)}t.resolveUrl=P;var b=/^[a-z_][-a-z0-9._]*$/i;function E(_,o){if(typeof _=="boolean")return{};const{schemaId:v,uriResolver:h}=this.opts,y=$(_[v]||o),w={"":y},g=f(h,y,!1),p={},S=new Set;return n(_,{allKeys:!0},(z,V,X,W)=>{if(W===void 0)return;const ee=g+V;let he=w[W];typeof z[v]=="string"&&(he=Ee.call(this,z[v])),Ce.call(this,z.$anchor),Ce.call(this,z.$dynamicAnchor),w[V]=he;function Ee(ce){const x=this.opts.uriResolver.resolve;if(ce=$(he?x(he,ce):ce),S.has(ce))throw j(ce);S.add(ce);let T=this.refs[ce];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?O(z,T.schema,ce):ce!==$(ee)&&(ce[0]==="#"?(O(z,p[ce],ce),p[ce]=z):this.refs[ce]=ee),ce}function Ce(ce){if(typeof ce=="string"){if(!b.test(ce))throw new Error(`invalid anchor "${ce}"`);Ee.call(this,`#${ce}`)}}}),p;function O(z,V,X){if(V!==void 0&&!r(z,V))throw j(X)}function j(z){return new Error(`reference "${z}" resolves to more than one schema`)}}t.getSchemaRefs=E}),Kr=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=No(),r=qr(),n=Vs(),s=qr(),l=To(),i=Ro(),c=Io(),a=Ne(),f=Wt(),u=Hr(),d=ze(),$=Br();function P(N){if(g(N)&&(S(N),w(N))){o(N);return}b(N,()=>(0,e.topBoolOrEmptySchema)(N))}t.validateFunctionCode=P;function b({gen:N,validateName:I,schema:L,schemaEnv:F,opts:J},te){J.code.es5?N.func(I,(0,a._)`${f.default.data}, ${f.default.valCxt}`,F.$async,()=>{N.code((0,a._)`"use strict"; ${h(L,J)}`),_(N,J),N.code(te)}):N.func(I,(0,a._)`${f.default.data}, ${E(J)}`,F.$async,()=>N.code(h(L,J)).code(te))}function E(N){return(0,a._)`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${N.dynamicRef?(0,a._)`, ${f.default.dynamicAnchors}={}`:a.nil}}={}`}function _(N,I){N.if(f.default.valCxt,()=>{N.var(f.default.instancePath,(0,a._)`${f.default.valCxt}.${f.default.instancePath}`),N.var(f.default.parentData,(0,a._)`${f.default.valCxt}.${f.default.parentData}`),N.var(f.default.parentDataProperty,(0,a._)`${f.default.valCxt}.${f.default.parentDataProperty}`),N.var(f.default.rootData,(0,a._)`${f.default.valCxt}.${f.default.rootData}`),I.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`${f.default.valCxt}.${f.default.dynamicAnchors}`)},()=>{N.var(f.default.instancePath,(0,a._)`""`),N.var(f.default.parentData,(0,a._)`undefined`),N.var(f.default.parentDataProperty,(0,a._)`undefined`),N.var(f.default.rootData,f.default.data),I.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`{}`)})}function o(N){const{schema:I,opts:L,gen:F}=N;b(N,()=>{L.$comment&&I.$comment&&W(N),z(N),F.let(f.default.vErrors,null),F.let(f.default.errors,0),L.unevaluated&&v(N),O(N),ee(N)})}function v(N){const{gen:I,validateName:L}=N;N.evaluated=I.const("evaluated",(0,a._)`${L}.evaluated`),I.if((0,a._)`${N.evaluated}.dynamicProps`,()=>I.assign((0,a._)`${N.evaluated}.props`,(0,a._)`undefined`)),I.if((0,a._)`${N.evaluated}.dynamicItems`,()=>I.assign((0,a._)`${N.evaluated}.items`,(0,a._)`undefined`))}function h(N,I){const L=typeof N=="object"&&N[I.schemaId];return L&&(I.code.source||I.code.process)?(0,a._)`/*# sourceURL=${L} */`:a.nil}function y(N,I){if(g(N)&&(S(N),w(N))){p(N,I);return}(0,e.boolOrEmptySchema)(N,I)}function w({schema:N,self:I}){if(typeof N=="boolean")return!N;for(const L in N)if(I.RULES.all[L])return!0;return!1}function g(N){return typeof N.schema!="boolean"}function p(N,I){const{schema:L,gen:F,opts:J}=N;J.$comment&&L.$comment&&W(N),V(N),X(N);const te=F.const("_errs",f.default.errors);O(N,te),F.var(I,(0,a._)`${te} === ${f.default.errors}`)}function S(N){(0,d.checkUnknownRules)(N),j(N)}function O(N,I){if(N.opts.jtd)return Ee(N,[],!1,I);const L=(0,r.getSchemaTypes)(N.schema),F=(0,r.coerceAndCheckDataType)(N,L);Ee(N,L,!F,I)}function j(N){const{schema:I,errSchemaPath:L,opts:F,self:J}=N;I.$ref&&F.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(I,J.RULES)&&J.logger.warn(`$ref: keywords ignored in schema at path "${L}"`)}function z(N){const{schema:I,opts:L}=N;I.default!==void 0&&L.useDefaults&&L.strictSchema&&(0,d.checkStrictMode)(N,"default is ignored in the schema root")}function V(N){const I=N.schema[N.opts.schemaId];I&&(N.baseId=(0,u.resolveUrl)(N.opts.uriResolver,N.baseId,I))}function X(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}function W({gen:N,schemaEnv:I,schema:L,errSchemaPath:F,opts:J}){const te=L.$comment;if(J.$comment===!0)N.code((0,a._)`${f.default.self}.logger.log(${te})`);else if(typeof J.$comment=="function"){const be=(0,a.str)`${F}/$comment`,Ue=N.scopeValue("root",{ref:I.root});N.code((0,a._)`${f.default.self}.opts.$comment(${te}, ${be}, ${Ue}.schema)`)}}function ee(N){const{gen:I,schemaEnv:L,validateName:F,ValidationError:J,opts:te}=N;L.$async?I.if((0,a._)`${f.default.errors} === 0`,()=>I.return(f.default.data),()=>I.throw((0,a._)`new ${J}(${f.default.vErrors})`)):(I.assign((0,a._)`${F}.errors`,f.default.vErrors),te.unevaluated&&he(N),I.return((0,a._)`${f.default.errors} === 0`))}function he({gen:N,evaluated:I,props:L,items:F}){L instanceof a.Name&&N.assign((0,a._)`${I}.props`,L),F instanceof a.Name&&N.assign((0,a._)`${I}.items`,F)}function Ee(N,I,L,F){const{gen:J,schema:te,data:be,allErrors:Ue,opts:Te,self:Ae}=N,{RULES:_e}=Ae;if(te.$ref&&(Te.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(te,_e))){J.block(()=>Q(N,"$ref",_e.all.$ref.definition));return}Te.jtd||ce(N,I),J.block(()=>{for(const Re of _e.rules)xe(Re);xe(_e.post)});function xe(Re){(0,n.shouldUseGroup)(te,Re)&&(Re.type?(J.if((0,s.checkDataType)(Re.type,be,Te.strictNumbers)),Ce(N,Re),I.length===1&&I[0]===Re.type&&L&&(J.else(),(0,s.reportTypeError)(N)),J.endIf()):Ce(N,Re),Ue||J.if((0,a._)`${f.default.errors} === ${F||0}`))}}function Ce(N,I){const{gen:L,schema:F,opts:{useDefaults:J}}=N;J&&(0,l.assignDefaults)(N,I.type),L.block(()=>{for(const te of I.rules)(0,n.shouldUseRule)(F,te)&&Q(N,te.keyword,te.definition,I.type)})}function ce(N,I){N.schemaEnv.meta||!N.opts.strictTypes||(x(N,I),N.opts.allowUnionTypes||T(N,I),M(N,N.dataTypes))}function x(N,I){if(I.length){if(!N.dataTypes.length){N.dataTypes=I;return}I.forEach(L=>{m(N.dataTypes,L)||A(N,`type "${L}" not allowed by context "${N.dataTypes.join(",")}"`)}),k(N,I)}}function T(N,I){I.length>1&&!(I.length===2&&I.includes("null"))&&A(N,"use allowUnionTypes to allow union type keyword")}function M(N,I){const L=N.self.RULES.all;for(const F in L){const J=L[F];if(typeof J=="object"&&(0,n.shouldUseRule)(N.schema,J)){const{type:te}=J.definition;te.length&&!te.some(be=>R(I,be))&&A(N,`missing type "${te.join(",")}" for keyword "${F}"`)}}}function R(N,I){return N.includes(I)||I==="number"&&N.includes("integer")}function m(N,I){return N.includes(I)||I==="integer"&&N.includes("number")}function k(N,I){const L=[];for(const F of N.dataTypes)m(I,F)?L.push(F):I.includes("integer")&&F==="number"&&L.push("integer");N.dataTypes=L}function A(N,I){const L=N.schemaEnv.baseId+N.errSchemaPath;I+=` at "${L}" (strictTypes)`,(0,d.checkStrictMode)(N,I,N.opts.strictTypes)}class G{constructor(I,L,F){if((0,i.validateKeywordUsage)(I,L,F),this.gen=I.gen,this.allErrors=I.allErrors,this.keyword=F,this.data=I.data,this.schema=I.schema[F],this.$data=L.$data&&I.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(I,this.schema,F,this.$data),this.schemaType=L.schemaType,this.parentSchema=I.schema,this.params={},this.it=I,this.def=L,this.$data)this.schemaCode=I.gen.const("vSchema",ye(this.$data,I));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,L.schemaType,L.allowUndefined))throw new Error(`${F} value must be ${JSON.stringify(L.schemaType)}`);("code"in L?L.trackErrors:L.errors!==!1)&&(this.errsCount=I.gen.const("_errs",f.default.errors))}result(I,L,F){this.failResult((0,a.not)(I),L,F)}failResult(I,L,F){this.gen.if(I),F?F():this.error(),L?(this.gen.else(),L(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(I,L){this.failResult((0,a.not)(I),void 0,L)}fail(I){if(I===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(I),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(I){if(!this.$data)return this.fail(I);const{schemaCode:L}=this;this.fail((0,a._)`${L} !== undefined && (${(0,a.or)(this.invalid$data(),I)})`)}error(I,L,F){if(L){this.setParams(L),this._error(I,F),this.setParams({});return}this._error(I,F)}_error(I,L){(I?$.reportExtraError:$.reportError)(this,this.def.error,L)}$dataError(){(0,$.reportError)(this,this.def.$dataError||$.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,$.resetErrorsCount)(this.gen,this.errsCount)}ok(I){this.allErrors||this.gen.if(I)}setParams(I,L){L?Object.assign(this.params,I):this.params=I}block$data(I,L,F=a.nil){this.gen.block(()=>{this.check$data(I,F),L()})}check$data(I=a.nil,L=a.nil){if(!this.$data)return;const{gen:F,schemaCode:J,schemaType:te,def:be}=this;F.if((0,a.or)((0,a._)`${J} === undefined`,L)),I!==a.nil&&F.assign(I,!0),(te.length||be.validateSchema)&&(F.elseIf(this.invalid$data()),this.$dataError(),I!==a.nil&&F.assign(I,!1)),F.else()}invalid$data(){const{gen:I,schemaCode:L,schemaType:F,def:J,it:te}=this;return(0,a.or)(be(),Ue());function be(){if(F.length){if(!(L instanceof a.Name))throw new Error("ajv implementation error");const Te=Array.isArray(F)?F:[F];return(0,a._)`${(0,s.checkDataTypes)(Te,L,te.opts.strictNumbers,s.DataType.Wrong)}`}return a.nil}function Ue(){if(J.validateSchema){const Te=I.scopeValue("validate$data",{ref:J.validateSchema});return(0,a._)`!${Te}(${L})`}return a.nil}}subschema(I,L){const F=(0,c.getSubschema)(this.it,I);(0,c.extendSubschemaData)(F,this.it,I),(0,c.extendSubschemaMode)(F,I);const J={...this.it,...F,items:void 0,props:void 0};return y(J,L),J}mergeEvaluated(I,L){const{it:F,gen:J}=this;F.opts.unevaluated&&(F.props!==!0&&I.props!==void 0&&(F.props=d.mergeEvaluated.props(J,I.props,F.props,L)),F.items!==!0&&I.items!==void 0&&(F.items=d.mergeEvaluated.items(J,I.items,F.items,L)))}mergeValidEvaluated(I,L){const{it:F,gen:J}=this;if(F.opts.unevaluated&&(F.props!==!0||F.items!==!0))return J.if(L,()=>this.mergeEvaluated(I,a.Name)),!0}}t.KeywordCxt=G;function Q(N,I,L,F){const J=new G(N,L,I);"code"in L?L.code(J,F):J.$data&&L.validate?(0,i.funcKeywordCode)(J,L):"macro"in L?(0,i.macroKeywordCode)(J,L):(L.compile||L.validate)&&(0,i.funcKeywordCode)(J,L)}var se=/^\/(?:[^~]|~0|~1)*$/,re=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ye(N,{dataLevel:I,dataNames:L,dataPathArr:F}){let J,te;if(N==="")return f.default.rootData;if(N[0]==="/"){if(!se.test(N))throw new Error(`Invalid JSON-pointer: ${N}`);J=N,te=f.default.rootData}else{const Ae=re.exec(N);if(!Ae)throw new Error(`Invalid JSON-pointer: ${N}`);const _e=+Ae[1];if(J=Ae[2],J==="#"){if(_e>=I)throw new Error(Te("property/index",_e));return F[I-_e]}if(_e>I)throw new Error(Te("data",_e));if(te=L[I-_e],!J)return te}let be=te;const Ue=J.split("/");for(const Ae of Ue)Ae&&(te=(0,a._)`${te}${(0,a.getProperty)((0,d.unescapeJsonPointer)(Ae))}`,be=(0,a._)`${be} && ${te}`);return be;function Te(Ae,_e){return`Cannot access ${Ae} ${_e} levels up, current level is ${I}`}}t.getData=ye}),jn=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}t.default=e}),Mn=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Hr();class r extends Error{constructor(s,l,i,c){super(c||`can't resolve reference ${i} from id ${l}`),this.missingRef=(0,e.resolveUrl)(s,l,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(s,this.missingRef))}}t.default=r}),Dn=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Ne(),r=jn(),n=Wt(),s=Hr(),l=ze(),i=Kr();class c{constructor(v){var h;this.refs={},this.dynamicAnchors={};let y;typeof v.schema=="object"&&(y=v.schema),this.schema=v.schema,this.schemaId=v.schemaId,this.root=v.root||this,this.baseId=(h=v.baseId)!==null&&h!==void 0?h:(0,s.normalizeId)(y==null?void 0:y[v.schemaId||"$id"]),this.schemaPath=v.schemaPath,this.localRefs=v.localRefs,this.meta=v.meta,this.$async=y==null?void 0:y.$async,this.refs={}}}t.SchemaEnv=c;function a(o){const v=d.call(this,o);if(v)return v;const h=(0,s.getFullPath)(this.opts.uriResolver,o.root.baseId),{es5:y,lines:w}=this.opts.code,{ownProperties:g}=this.opts,p=new e.CodeGen(this.scope,{es5:y,lines:w,ownProperties:g});let S;o.$async&&(S=p.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=p.scopeName("validate");o.validateName=O;const j={gen:p,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:p.scopeValue("schema",this.opts.code.source===!0?{ref:o.schema,code:(0,e.stringify)(o.schema)}:{ref:o.schema}),validateName:O,ValidationError:S,schema:o.schema,schemaEnv:o,rootId:h,baseId:o.baseId||h,schemaPath:e.nil,errSchemaPath:o.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let z;try{this._compilations.add(o),(0,i.validateFunctionCode)(j),p.optimize(this.opts.code.optimize);const V=p.toString();z=`${p.scopeRefs(n.default.scope)}return ${V}`,this.opts.code.process&&(z=this.opts.code.process(z,o));const W=new Function(`${n.default.self}`,`${n.default.scope}`,z)(this,this.scope.get());if(this.scope.value(O,{ref:W}),W.errors=null,W.schema=o.schema,W.schemaEnv=o,o.$async&&(W.$async=!0),this.opts.code.source===!0&&(W.source={validateName:O,validateCode:V,scopeValues:p._values}),this.opts.unevaluated){const{props:ee,items:he}=j;W.evaluated={props:ee instanceof e.Name?void 0:ee,items:he instanceof e.Name?void 0:he,dynamicProps:ee instanceof e.Name,dynamicItems:he instanceof e.Name},W.source&&(W.source.evaluated=(0,e.stringify)(W.evaluated))}return o.validate=W,o}catch(V){throw delete o.validate,delete o.validateName,z&&this.logger.error("Error compiling schema, function code:",z),V}finally{this._compilations.delete(o)}}t.compileSchema=a;function f(o,v,h){var y;h=(0,s.resolveUrl)(this.opts.uriResolver,v,h);const w=o.refs[h];if(w)return w;let g=P.call(this,o,h);if(g===void 0){const p=(y=o.localRefs)===null||y===void 0?void 0:y[h],{schemaId:S}=this.opts;p&&(g=new c({schema:p,schemaId:S,root:o,baseId:v}))}if(g!==void 0)return o.refs[h]=u.call(this,g)}t.resolveRef=f;function u(o){return(0,s.inlineRef)(o.schema,this.opts.inlineRefs)?o.schema:o.validate?o:a.call(this,o)}function d(o){for(const v of this._compilations)if($(v,o))return v}t.getCompilingSchema=d;function $(o,v){return o.schema===v.schema&&o.root===v.root&&o.baseId===v.baseId}function P(o,v){let h;for(;typeof(h=this.refs[v])=="string";)v=h;return h||this.schemas[v]||b.call(this,o,v)}function b(o,v){const h=this.opts.uriResolver.parse(v),y=(0,s._getFullPath)(this.opts.uriResolver,h);let w=(0,s.getFullPath)(this.opts.uriResolver,o.baseId,void 0);if(Object.keys(o.schema).length>0&&y===w)return _.call(this,h,o);const g=(0,s.normalizeId)(y),p=this.refs[g]||this.schemas[g];if(typeof p=="string"){const S=b.call(this,o,p);return typeof(S==null?void 0:S.schema)!="object"?void 0:_.call(this,h,S)}if(typeof(p==null?void 0:p.schema)=="object"){if(p.validate||a.call(this,p),g===(0,s.normalizeId)(v)){const{schema:S}=p,{schemaId:O}=this.opts,j=S[O];return j&&(w=(0,s.resolveUrl)(this.opts.uriResolver,w,j)),new c({schema:S,schemaId:O,root:o,baseId:w})}return _.call(this,h,p)}}t.resolveSchema=b;var E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function _(o,{baseId:v,schema:h,root:y}){var w;if(((w=o.fragment)===null||w===void 0?void 0:w[0])!=="/")return;for(const S of o.fragment.slice(1).split("/")){if(typeof h=="boolean")return;const O=h[(0,l.unescapeFragment)(S)];if(O===void 0)return;h=O;const j=typeof h=="object"&&h[this.opts.schemaId];!E.has(S)&&j&&(v=(0,s.resolveUrl)(this.opts.uriResolver,v,j))}let g;if(typeof h!="boolean"&&h.$ref&&!(0,l.schemaHasRulesButRef)(h,this.RULES)){const S=(0,s.resolveUrl)(this.opts.uriResolver,v,h.$ref);g=b.call(this,y,S)}const{schemaId:p}=this.opts;if(g=g||new c({schema:h,schemaId:p,root:y,baseId:v}),g.schema!==g.root.schema)return g}}),Co=B(function(t,e){e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),qn=B(function(t,e){(function(r,n){typeof t=="object"&&typeof e<"u"?n(t):typeof define=="function"&&define.amd?define(["exports"],n):n(r.URI=r.URI||{})})(t,function(r){function n(){for(var D=arguments.length,C=Array(D),U=0;U<D;U++)C[U]=arguments[U];if(C.length>1){C[0]=C[0].slice(0,-1);for(var H=C.length-1,K=1;K<H;++K)C[K]=C[K].slice(1,-1);return C[H]=C[H].slice(1),C.join("")}else return C[0]}function s(D){return"(?:"+D+")"}function l(D){return D===void 0?"undefined":D===null?"null":Object.prototype.toString.call(D).split(" ").pop().split("]").shift().toLowerCase()}function i(D){return D.toUpperCase()}function c(D){return D!=null?D instanceof Array?D:typeof D.length!="number"||D.split||D.setInterval||D.call?[D]:Array.prototype.slice.call(D):[]}function a(D,C){var U=D;if(C)for(var H in C)U[H]=C[H];return U}function f(D){var C="[A-Za-z]",U="[0-9]",H=n(U,"[A-Fa-f]"),K=s(s("%[EFef]"+H+"%"+H+H+"%"+H+H)+"|"+s("%[89A-Fa-f]"+H+"%"+H+H)+"|"+s("%"+H+H)),fe="[\\:\\/\\?\\#\\[\\]\\@]",ge="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",je=n(fe,ge),Ke=D?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Ze=D?"[\\uE000-\\uF8FF]":"[]",ke=n(C,U,"[\\-\\.\\_\\~]",Ke);s(C+n(C,U,"[\\+\\-\\.]")+"*"),s(s(K+"|"+n(ke,ge,"[\\:]"))+"*");var He=s(s("25[0-5]")+"|"+s("2[0-4]"+U)+"|"+s("1"+U+U)+"|"+s("0?[1-9]"+U)+"|0?0?"+U),tt=s(He+"\\."+He+"\\."+He+"\\."+He),$e=s(H+"{1,4}"),Le=s(s($e+"\\:"+$e)+"|"+tt),rt=s(s($e+"\\:")+"{6}"+Le),Ge=s("\\:\\:"+s($e+"\\:")+"{5}"+Le),Ct=s(s($e)+"?\\:\\:"+s($e+"\\:")+"{4}"+Le),Et=s(s(s($e+"\\:")+"{0,1}"+$e)+"?\\:\\:"+s($e+"\\:")+"{3}"+Le),St=s(s(s($e+"\\:")+"{0,2}"+$e)+"?\\:\\:"+s($e+"\\:")+"{2}"+Le),Ot=s(s(s($e+"\\:")+"{0,3}"+$e)+"?\\:\\:"+$e+"\\:"+Le),Lt=s(s(s($e+"\\:")+"{0,4}"+$e)+"?\\:\\:"+Le),Z=s(s(s($e+"\\:")+"{0,5}"+$e)+"?\\:\\:"+$e),le=s(s(s($e+"\\:")+"{0,6}"+$e)+"?\\:\\:"),Se=s([rt,Ge,Ct,Et,St,Ot,Lt,Z,le].join("|")),Me=s(s(ke+"|"+K)+"+");s("[vV]"+H+"+\\."+n(ke,ge,"[\\:]")+"+"),s(s(K+"|"+n(ke,ge))+"*");var Qe=s(K+"|"+n(ke,ge,"[\\:\\@]"));return s(s(K+"|"+n(ke,ge,"[\\@]"))+"+"),s(s(Qe+"|"+n("[\\/\\?]",Ze))+"*"),{NOT_SCHEME:new RegExp(n("[^]",C,U,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",ke,ge),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",ke,ge),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",ke,ge),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",ke,ge),"g"),NOT_QUERY:new RegExp(n("[^\\%]",ke,ge,"[\\:\\@\\/\\?]",Ze),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",ke,ge,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",ke,ge),"g"),UNRESERVED:new RegExp(ke,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",ke,je),"g"),PCT_ENCODED:new RegExp(K,"g"),IPV4ADDRESS:new RegExp("^("+tt+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Se+")"+s(s("\\%25|\\%(?!"+H+"{2})")+"("+Me+")")+"?\\]?$")}}var u=f(!1),d=f(!0),$=function(){function D(C,U){var H=[],K=!0,fe=!1,ge=void 0;try{for(var je=C[Symbol.iterator](),Ke;!(K=(Ke=je.next()).done)&&(H.push(Ke.value),!(U&&H.length===U));K=!0);}catch(Ze){fe=!0,ge=Ze}finally{try{!K&&je.return&&je.return()}finally{if(fe)throw ge}}return H}return function(C,U){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return D(C,U);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),P=function(D){if(Array.isArray(D)){for(var C=0,U=Array(D.length);C<D.length;C++)U[C]=D[C];return U}else return Array.from(D)},b=2147483647,E=36,_=1,o=26,v=38,h=700,y=72,w=128,g="-",p=/^xn--/,S=/[^\0-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,j={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},z=E-_,V=Math.floor,X=String.fromCharCode;function W(D){throw new RangeError(j[D])}function ee(D,C){for(var U=[],H=D.length;H--;)U[H]=C(D[H]);return U}function he(D,C){var U=D.split("@"),H="";U.length>1&&(H=U[0]+"@",D=U[1]),D=D.replace(O,".");var K=D.split("."),fe=ee(K,C).join(".");return H+fe}function Ee(D){for(var C=[],U=0,H=D.length;U<H;){var K=D.charCodeAt(U++);if(K>=55296&&K<=56319&&U<H){var fe=D.charCodeAt(U++);(fe&64512)==56320?C.push(((K&1023)<<10)+(fe&1023)+65536):(C.push(K),U--)}else C.push(K)}return C}var Ce=function(C){return String.fromCodePoint.apply(String,P(C))},ce=function(C){return C-48<10?C-22:C-65<26?C-65:C-97<26?C-97:E},x=function(C,U){return C+22+75*(C<26)-((U!=0)<<5)},T=function(C,U,H){var K=0;for(C=H?V(C/h):C>>1,C+=V(C/U);C>z*o>>1;K+=E)C=V(C/z);return V(K+(z+1)*C/(C+v))},M=function(C){var U=[],H=C.length,K=0,fe=w,ge=y,je=C.lastIndexOf(g);je<0&&(je=0);for(var Ke=0;Ke<je;++Ke)C.charCodeAt(Ke)>=128&&W("not-basic"),U.push(C.charCodeAt(Ke));for(var Ze=je>0?je+1:0;Ze<H;){for(var ke=K,He=1,tt=E;;tt+=E){Ze>=H&&W("invalid-input");var $e=ce(C.charCodeAt(Ze++));($e>=E||$e>V((b-K)/He))&&W("overflow"),K+=$e*He;var Le=tt<=ge?_:tt>=ge+o?o:tt-ge;if($e<Le)break;var rt=E-Le;He>V(b/rt)&&W("overflow"),He*=rt}var Ge=U.length+1;ge=T(K-ke,Ge,ke==0),V(K/Ge)>b-fe&&W("overflow"),fe+=V(K/Ge),K%=Ge,U.splice(K++,0,fe)}return String.fromCodePoint.apply(String,U)},R=function(C){var U=[];C=Ee(C);var H=C.length,K=w,fe=0,ge=y,je=!0,Ke=!1,Ze=void 0;try{for(var ke=C[Symbol.iterator](),He;!(je=(He=ke.next()).done);je=!0){var tt=He.value;tt<128&&U.push(X(tt))}}catch(Bt){Ke=!0,Ze=Bt}finally{try{!je&&ke.return&&ke.return()}finally{if(Ke)throw Ze}}var $e=U.length,Le=$e;for($e&&U.push(g);Le<H;){var rt=b,Ge=!0,Ct=!1,Et=void 0;try{for(var St=C[Symbol.iterator](),Ot;!(Ge=(Ot=St.next()).done);Ge=!0){var Lt=Ot.value;Lt>=K&&Lt<rt&&(rt=Lt)}}catch(Bt){Ct=!0,Et=Bt}finally{try{!Ge&&St.return&&St.return()}finally{if(Ct)throw Et}}var Z=Le+1;rt-K>V((b-fe)/Z)&&W("overflow"),fe+=(rt-K)*Z,K=rt;var le=!0,Se=!1,Me=void 0;try{for(var Qe=C[Symbol.iterator](),yt;!(le=(yt=Qe.next()).done);le=!0){var Nt=yt.value;if(Nt<K&&++fe>b&&W("overflow"),Nt==K){for(var Vt=fe,lt=E;;lt+=E){var mt=lt<=ge?_:lt>=ge+o?o:lt-ge;if(Vt<mt)break;var sr=Vt-mt,ir=E-mt;U.push(X(x(mt+sr%ir,0))),Vt=V(sr/ir)}U.push(X(x(Vt,0))),ge=T(fe,Z,Le==$e),fe=0,++Le}}}catch(Bt){Se=!0,Me=Bt}finally{try{!le&&Qe.return&&Qe.return()}finally{if(Se)throw Me}}++fe,++K}return U.join("")},m=function(C){return he(C,function(U){return p.test(U)?M(U.slice(4).toLowerCase()):U})},k=function(C){return he(C,function(U){return S.test(U)?"xn--"+R(U):U})},A={version:"2.1.0",ucs2:{decode:Ee,encode:Ce},decode:M,encode:R,toASCII:k,toUnicode:m},G={};function Q(D){var C=D.charCodeAt(0),U=void 0;return C<16?U="%0"+C.toString(16).toUpperCase():C<128?U="%"+C.toString(16).toUpperCase():C<2048?U="%"+(C>>6|192).toString(16).toUpperCase()+"%"+(C&63|128).toString(16).toUpperCase():U="%"+(C>>12|224).toString(16).toUpperCase()+"%"+(C>>6&63|128).toString(16).toUpperCase()+"%"+(C&63|128).toString(16).toUpperCase(),U}function se(D){for(var C="",U=0,H=D.length;U<H;){var K=parseInt(D.substr(U+1,2),16);if(K<128)C+=String.fromCharCode(K),U+=3;else if(K>=194&&K<224){if(H-U>=6){var fe=parseInt(D.substr(U+4,2),16);C+=String.fromCharCode((K&31)<<6|fe&63)}else C+=D.substr(U,6);U+=6}else if(K>=224){if(H-U>=9){var ge=parseInt(D.substr(U+4,2),16),je=parseInt(D.substr(U+7,2),16);C+=String.fromCharCode((K&15)<<12|(ge&63)<<6|je&63)}else C+=D.substr(U,9);U+=9}else C+=D.substr(U,3),U+=3}return C}function re(D,C){function U(H){var K=se(H);return K.match(C.UNRESERVED)?K:H}return D.scheme&&(D.scheme=String(D.scheme).replace(C.PCT_ENCODED,U).toLowerCase().replace(C.NOT_SCHEME,"")),D.userinfo!==void 0&&(D.userinfo=String(D.userinfo).replace(C.PCT_ENCODED,U).replace(C.NOT_USERINFO,Q).replace(C.PCT_ENCODED,i)),D.host!==void 0&&(D.host=String(D.host).replace(C.PCT_ENCODED,U).toLowerCase().replace(C.NOT_HOST,Q).replace(C.PCT_ENCODED,i)),D.path!==void 0&&(D.path=String(D.path).replace(C.PCT_ENCODED,U).replace(D.scheme?C.NOT_PATH:C.NOT_PATH_NOSCHEME,Q).replace(C.PCT_ENCODED,i)),D.query!==void 0&&(D.query=String(D.query).replace(C.PCT_ENCODED,U).replace(C.NOT_QUERY,Q).replace(C.PCT_ENCODED,i)),D.fragment!==void 0&&(D.fragment=String(D.fragment).replace(C.PCT_ENCODED,U).replace(C.NOT_FRAGMENT,Q).replace(C.PCT_ENCODED,i)),D}function ye(D){return D.replace(/^0*(.*)/,"$1")||"0"}function N(D,C){var U=D.match(C.IPV4ADDRESS)||[],H=$(U,2),K=H[1];return K?K.split(".").map(ye).join("."):D}function I(D,C){var U=D.match(C.IPV6ADDRESS)||[],H=$(U,3),K=H[1],fe=H[2];if(K){for(var ge=K.toLowerCase().split("::").reverse(),je=$(ge,2),Ke=je[0],Ze=je[1],ke=Ze?Ze.split(":").map(ye):[],He=Ke.split(":").map(ye),tt=C.IPV4ADDRESS.test(He[He.length-1]),$e=tt?7:8,Le=He.length-$e,rt=Array($e),Ge=0;Ge<$e;++Ge)rt[Ge]=ke[Ge]||He[Le+Ge]||"";tt&&(rt[$e-1]=N(rt[$e-1],C));var Ct=rt.reduce(function(Z,le,Se){if(!le||le==="0"){var Me=Z[Z.length-1];Me&&Me.index+Me.length===Se?Me.length++:Z.push({index:Se,length:1})}return Z},[]),Et=Ct.sort(function(Z,le){return le.length-Z.length})[0],St=void 0;if(Et&&Et.length>1){var Ot=rt.slice(0,Et.index),Lt=rt.slice(Et.index+Et.length);St=Ot.join(":")+"::"+Lt.join(":")}else St=rt.join(":");return fe&&(St+="%"+fe),St}else return D}var L=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,F="".match(/(){0}/)[1]===void 0;function J(D){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U={},H=C.iri!==!1?d:u;C.reference==="suffix"&&(D=(C.scheme?C.scheme+":":"")+"//"+D);var K=D.match(L);if(K){F?(U.scheme=K[1],U.userinfo=K[3],U.host=K[4],U.port=parseInt(K[5],10),U.path=K[6]||"",U.query=K[7],U.fragment=K[8],isNaN(U.port)&&(U.port=K[5])):(U.scheme=K[1]||void 0,U.userinfo=D.indexOf("@")!==-1?K[3]:void 0,U.host=D.indexOf("//")!==-1?K[4]:void 0,U.port=parseInt(K[5],10),U.path=K[6]||"",U.query=D.indexOf("?")!==-1?K[7]:void 0,U.fragment=D.indexOf("#")!==-1?K[8]:void 0,isNaN(U.port)&&(U.port=D.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?K[4]:void 0)),U.host&&(U.host=I(N(U.host,H),H)),U.scheme===void 0&&U.userinfo===void 0&&U.host===void 0&&U.port===void 0&&!U.path&&U.query===void 0?U.reference="same-document":U.scheme===void 0?U.reference="relative":U.fragment===void 0?U.reference="absolute":U.reference="uri",C.reference&&C.reference!=="suffix"&&C.reference!==U.reference&&(U.error=U.error||"URI is not a "+C.reference+" reference.");var fe=G[(C.scheme||U.scheme||"").toLowerCase()];if(!C.unicodeSupport&&(!fe||!fe.unicodeSupport)){if(U.host&&(C.domainHost||fe&&fe.domainHost))try{U.host=A.toASCII(U.host.replace(H.PCT_ENCODED,se).toLowerCase())}catch(ge){U.error=U.error||"Host's domain name can not be converted to ASCII via punycode: "+ge}re(U,u)}else re(U,H);fe&&fe.parse&&fe.parse(U,C)}else U.error=U.error||"URI can not be parsed.";return U}function te(D,C){var U=C.iri!==!1?d:u,H=[];return D.userinfo!==void 0&&(H.push(D.userinfo),H.push("@")),D.host!==void 0&&H.push(I(N(String(D.host),U),U).replace(U.IPV6ADDRESS,function(K,fe,ge){return"["+fe+(ge?"%25"+ge:"")+"]"})),(typeof D.port=="number"||typeof D.port=="string")&&(H.push(":"),H.push(String(D.port))),H.length?H.join(""):void 0}var be=/^\.\.?\//,Ue=/^\/\.(\/|$)/,Te=/^\/\.\.(\/|$)/,Ae=/^\/?(?:.|\n)*?(?=\/|$)/;function _e(D){for(var C=[];D.length;)if(D.match(be))D=D.replace(be,"");else if(D.match(Ue))D=D.replace(Ue,"/");else if(D.match(Te))D=D.replace(Te,"/"),C.pop();else if(D==="."||D==="..")D="";else{var U=D.match(Ae);if(U){var H=U[0];D=D.slice(H.length),C.push(H)}else throw new Error("Unexpected dot segment condition")}return C.join("")}function xe(D){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=C.iri?d:u,H=[],K=G[(C.scheme||D.scheme||"").toLowerCase()];if(K&&K.serialize&&K.serialize(D,C),D.host&&!U.IPV6ADDRESS.test(D.host)){if(C.domainHost||K&&K.domainHost)try{D.host=C.iri?A.toUnicode(D.host):A.toASCII(D.host.replace(U.PCT_ENCODED,se).toLowerCase())}catch(je){D.error=D.error||"Host's domain name can not be converted to "+(C.iri?"Unicode":"ASCII")+" via punycode: "+je}}re(D,U),C.reference!=="suffix"&&D.scheme&&(H.push(D.scheme),H.push(":"));var fe=te(D,C);if(fe!==void 0&&(C.reference!=="suffix"&&H.push("//"),H.push(fe),D.path&&D.path.charAt(0)!=="/"&&H.push("/")),D.path!==void 0){var ge=D.path;!C.absolutePath&&(!K||!K.absolutePath)&&(ge=_e(ge)),fe===void 0&&(ge=ge.replace(/^\/\//,"/%2F")),H.push(ge)}return D.query!==void 0&&(H.push("?"),H.push(D.query)),D.fragment!==void 0&&(H.push("#"),H.push(D.fragment)),H.join("")}function Re(D,C){var U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},H=arguments[3],K={};return H||(D=J(xe(D,U),U),C=J(xe(C,U),U)),U=U||{},!U.tolerant&&C.scheme?(K.scheme=C.scheme,K.userinfo=C.userinfo,K.host=C.host,K.port=C.port,K.path=_e(C.path||""),K.query=C.query):(C.userinfo!==void 0||C.host!==void 0||C.port!==void 0?(K.userinfo=C.userinfo,K.host=C.host,K.port=C.port,K.path=_e(C.path||""),K.query=C.query):(C.path?(C.path.charAt(0)==="/"?K.path=_e(C.path):((D.userinfo!==void 0||D.host!==void 0||D.port!==void 0)&&!D.path?K.path="/"+C.path:D.path?K.path=D.path.slice(0,D.path.lastIndexOf("/")+1)+C.path:K.path=C.path,K.path=_e(K.path)),K.query=C.query):(K.path=D.path,C.query!==void 0?K.query=C.query:K.query=D.query),K.userinfo=D.userinfo,K.host=D.host,K.port=D.port),K.scheme=D.scheme),K.fragment=C.fragment,K}function gt(D,C,U){var H=a({scheme:"null"},U);return xe(Re(J(D,H),J(C,H),H,!0),H)}function Xe(D,C){return typeof D=="string"?D=xe(J(D,C),C):l(D)==="object"&&(D=J(xe(D,C),C)),D}function dt(D,C,U){return typeof D=="string"?D=xe(J(D,U),U):l(D)==="object"&&(D=xe(D,U)),typeof C=="string"?C=xe(J(C,U),U):l(C)==="object"&&(C=xe(C,U)),D===C}function $t(D,C){return D&&D.toString().replace(!C||!C.iri?u.ESCAPE:d.ESCAPE,Q)}function ct(D,C){return D&&D.toString().replace(!C||!C.iri?u.PCT_ENCODED:d.PCT_ENCODED,se)}var wt={scheme:"http",domainHost:!0,parse:function(C,U){return C.host||(C.error=C.error||"HTTP URIs must have a host."),C},serialize:function(C,U){var H=String(C.scheme).toLowerCase()==="https";return(C.port===(H?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}},mr={scheme:"https",domainHost:wt.domainHost,parse:wt.parse,serialize:wt.serialize};function gr(D){return typeof D.secure=="boolean"?D.secure:String(D.scheme).toLowerCase()==="wss"}var Jt={scheme:"ws",domainHost:!0,parse:function(C,U){var H=C;return H.secure=gr(H),H.resourceName=(H.path||"/")+(H.query?"?"+H.query:""),H.path=void 0,H.query=void 0,H},serialize:function(C,U){if((C.port===(gr(C)?443:80)||C.port==="")&&(C.port=void 0),typeof C.secure=="boolean"&&(C.scheme=C.secure?"wss":"ws",C.secure=void 0),C.resourceName){var H=C.resourceName.split("?"),K=$(H,2),fe=K[0],ge=K[1];C.path=fe&&fe!=="/"?fe:void 0,C.query=ge,C.resourceName=void 0}return C.fragment=void 0,C}},rr={scheme:"wss",domainHost:Jt.domainHost,parse:Jt.parse,serialize:Jt.serialize},Qr={},yr="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",bt="[0-9A-Fa-f]",nr=s(s("%[EFef]"+bt+"%"+bt+bt+"%"+bt+bt)+"|"+s("%[89A-Fa-f]"+bt+"%"+bt+bt)+"|"+s("%"+bt+bt)),vr="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",_r="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Xr=n(_r,'[\\"\\\\]'),wr="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",xt=new RegExp(yr,"g"),q=new RegExp(nr,"g"),Y=new RegExp(n("[^]",vr,"[\\.]",'[\\"]',Xr),"g"),ne=new RegExp(n("[^]",yr,wr),"g"),we=ne;function Je(D){var C=se(D);return C.match(xt)?C:D}var Ye={scheme:"mailto",parse:function(C,U){var H=C,K=H.to=H.path?H.path.split(","):[];if(H.path=void 0,H.query){for(var fe=!1,ge={},je=H.query.split("&"),Ke=0,Ze=je.length;Ke<Ze;++Ke){var ke=je[Ke].split("=");switch(ke[0]){case"to":for(var He=ke[1].split(","),tt=0,$e=He.length;tt<$e;++tt)K.push(He[tt]);break;case"subject":H.subject=ct(ke[1],U);break;case"body":H.body=ct(ke[1],U);break;default:fe=!0,ge[ct(ke[0],U)]=ct(ke[1],U);break}}fe&&(H.headers=ge)}H.query=void 0;for(var Le=0,rt=K.length;Le<rt;++Le){var Ge=K[Le].split("@");if(Ge[0]=ct(Ge[0]),U.unicodeSupport)Ge[1]=ct(Ge[1],U).toLowerCase();else try{Ge[1]=A.toASCII(ct(Ge[1],U).toLowerCase())}catch(Ct){H.error=H.error||"Email address's domain name can not be converted to ASCII via punycode: "+Ct}K[Le]=Ge.join("@")}return H},serialize:function(C,U){var H=C,K=c(C.to);if(K){for(var fe=0,ge=K.length;fe<ge;++fe){var je=String(K[fe]),Ke=je.lastIndexOf("@"),Ze=je.slice(0,Ke).replace(q,Je).replace(q,i).replace(Y,Q),ke=je.slice(Ke+1);try{ke=U.iri?A.toUnicode(ke):A.toASCII(ct(ke,U).toLowerCase())}catch(Le){H.error=H.error||"Email address's domain name can not be converted to "+(U.iri?"Unicode":"ASCII")+" via punycode: "+Le}K[fe]=Ze+"@"+ke}H.path=K.join(",")}var He=C.headers=C.headers||{};C.subject&&(He.subject=C.subject),C.body&&(He.body=C.body);var tt=[];for(var $e in He)He[$e]!==Qr[$e]&&tt.push($e.replace(q,Je).replace(q,i).replace(ne,Q)+"="+He[$e].replace(q,Je).replace(q,i).replace(we,Q));return tt.length&&(H.query=tt.join("&")),H}},ue=/^([^\:]+)\:(.*)/,oe={scheme:"urn",parse:function(C,U){var H=C.path&&C.path.match(ue),K=C;if(H){var fe=U.scheme||K.scheme||"urn",ge=H[1].toLowerCase(),je=H[2],Ke=fe+":"+(U.nid||ge),Ze=G[Ke];K.nid=ge,K.nss=je,K.path=void 0,Ze&&(K=Ze.parse(K,U))}else K.error=K.error||"URN can not be parsed.";return K},serialize:function(C,U){var H=U.scheme||C.scheme||"urn",K=C.nid,fe=H+":"+(U.nid||K),ge=G[fe];ge&&(C=ge.serialize(C,U));var je=C,Ke=C.nss;return je.path=(K||U.nid)+":"+Ke,je}},ve=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,at={scheme:"urn:uuid",parse:function(C,U){var H=C;return H.uuid=H.nss,H.nss=void 0,!U.tolerant&&(!H.uuid||!H.uuid.match(ve))&&(H.error=H.error||"UUID is not valid."),H},serialize:function(C,U){var H=C;return H.nss=(C.uuid||"").toLowerCase(),H}};G[wt.scheme]=wt,G[mr.scheme]=mr,G[Jt.scheme]=Jt,G[rr.scheme]=rr,G[Ye.scheme]=Ye,G[oe.scheme]=oe,G[at.scheme]=at,r.SCHEMES=G,r.pctEncChar=Q,r.pctDecChars=se,r.parse=J,r.removeDotSegments=_e,r.serialize=xe,r.resolveComponents=Re,r.resolve=gt,r.normalize=Xe,r.equal=dt,r.escapeComponent=$t,r.unescapeComponent=ct,Object.defineProperty(r,"__esModule",{value:!0})})}),Ao=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=qn();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),jo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Kr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Ne();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});var n=jn(),s=Mn(),l=Ls(),i=Dn(),c=Ne(),a=Hr(),f=qr(),u=ze(),d=Co(),$=Ao(),P=(x,T)=>new RegExp(x,T);P.code="new RegExp";var b=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},o={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},v=200;function h(x){var T,M,R,m,k,A,G,Q,se,re,ye,N,I,L,F,J,te,be,Ue,Te,Ae,_e,xe,Re,gt;const Xe=x.strict,dt=(T=x.code)===null||T===void 0?void 0:T.optimize,$t=dt===!0||dt===void 0?1:dt||0,ct=(R=(M=x.code)===null||M===void 0?void 0:M.regExp)!==null&&R!==void 0?R:P,wt=(m=x.uriResolver)!==null&&m!==void 0?m:$.default;return{strictSchema:(A=(k=x.strictSchema)!==null&&k!==void 0?k:Xe)!==null&&A!==void 0?A:!0,strictNumbers:(Q=(G=x.strictNumbers)!==null&&G!==void 0?G:Xe)!==null&&Q!==void 0?Q:!0,strictTypes:(re=(se=x.strictTypes)!==null&&se!==void 0?se:Xe)!==null&&re!==void 0?re:"log",strictTuples:(N=(ye=x.strictTuples)!==null&&ye!==void 0?ye:Xe)!==null&&N!==void 0?N:"log",strictRequired:(L=(I=x.strictRequired)!==null&&I!==void 0?I:Xe)!==null&&L!==void 0?L:!1,code:x.code?{...x.code,optimize:$t,regExp:ct}:{optimize:$t,regExp:ct},loopRequired:(F=x.loopRequired)!==null&&F!==void 0?F:v,loopEnum:(J=x.loopEnum)!==null&&J!==void 0?J:v,meta:(te=x.meta)!==null&&te!==void 0?te:!0,messages:(be=x.messages)!==null&&be!==void 0?be:!0,inlineRefs:(Ue=x.inlineRefs)!==null&&Ue!==void 0?Ue:!0,schemaId:(Te=x.schemaId)!==null&&Te!==void 0?Te:"$id",addUsedSchema:(Ae=x.addUsedSchema)!==null&&Ae!==void 0?Ae:!0,validateSchema:(_e=x.validateSchema)!==null&&_e!==void 0?_e:!0,validateFormats:(xe=x.validateFormats)!==null&&xe!==void 0?xe:!0,unicodeRegExp:(Re=x.unicodeRegExp)!==null&&Re!==void 0?Re:!0,int32range:(gt=x.int32range)!==null&&gt!==void 0?gt:!0,uriResolver:wt}}class y{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...h(T)};const{es5:M,lines:R}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:E,es5:M,lines:R}),this.logger=V(T.logger);const m=T.validateFormats;T.validateFormats=!1,this.RULES=(0,l.getRules)(),w.call(this,_,T,"NOT SUPPORTED"),w.call(this,o,T,"DEPRECATED","warn"),this._metaOpts=j.call(this),T.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&O.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),p.call(this),T.validateFormats=m}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:M,schemaId:R}=this.opts;let m=d;R==="id"&&(m={...d},m.id=m.$id,delete m.$id),M&&T&&this.addMetaSchema(m,m[R],!1)}defaultMeta(){const{meta:T,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[M]||T:void 0}validate(T,M){let R;if(typeof T=="string"){if(R=this.getSchema(T),!R)throw new Error(`no schema with key or ref "${T}"`)}else R=this.compile(T);const m=R(M);return"$async"in R||(this.errors=R.errors),m}compile(T,M){const R=this._addSchema(T,M);return R.validate||this._compileSchemaEnv(R)}compileAsync(T,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:R}=this.opts;return m.call(this,T,M);async function m(re,ye){await k.call(this,re.$schema);const N=this._addSchema(re,ye);return N.validate||A.call(this,N)}async function k(re){re&&!this.getSchema(re)&&await m.call(this,{$ref:re},!0)}async function A(re){try{return this._compileSchemaEnv(re)}catch(ye){if(!(ye instanceof s.default))throw ye;return G.call(this,ye),await Q.call(this,ye.missingSchema),A.call(this,re)}}function G({missingSchema:re,missingRef:ye}){if(this.refs[re])throw new Error(`AnySchema ${re} is loaded but ${ye} cannot be resolved`)}async function Q(re){const ye=await se.call(this,re);this.refs[re]||await k.call(this,ye.$schema),this.refs[re]||this.addSchema(ye,re,M)}async function se(re){const ye=this._loading[re];if(ye)return ye;try{return await(this._loading[re]=R(re))}finally{delete this._loading[re]}}}addSchema(T,M,R,m=this.opts.validateSchema){if(Array.isArray(T)){for(const A of T)this.addSchema(A,void 0,R,m);return this}let k;if(typeof T=="object"){const{schemaId:A}=this.opts;if(k=T[A],k!==void 0&&typeof k!="string")throw new Error(`schema ${A} must be string`)}return M=(0,a.normalizeId)(M||k),this._checkUnique(M),this.schemas[M]=this._addSchema(T,R,M,m,!0),this}addMetaSchema(T,M,R=this.opts.validateSchema){return this.addSchema(T,M,!0,R),this}validateSchema(T,M){if(typeof T=="boolean")return!0;let R;if(R=T.$schema,R!==void 0&&typeof R!="string")throw new Error("$schema must be a string");if(R=R||this.opts.defaultMeta||this.defaultMeta(),!R)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const m=this.validate(R,T);if(!m&&M){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return m}getSchema(T){let M;for(;typeof(M=g.call(this,T))=="string";)T=M;if(M===void 0){const{schemaId:R}=this.opts,m=new i.SchemaEnv({schema:{},schemaId:R});if(M=i.resolveSchema.call(this,m,T),!M)return;this.refs[T]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const M=g.call(this,T);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const M=T;this._cache.delete(M);let R=T[this.opts.schemaId];return R&&(R=(0,a.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const M of T)this.addKeyword(M);return this}addKeyword(T,M){let R;if(typeof T=="string")R=T,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=R);else if(typeof T=="object"&&M===void 0){if(M=T,R=M.keyword,Array.isArray(R)&&!R.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,R,M),!M)return(0,u.eachItem)(R,k=>ee.call(this,k)),this;Ee.call(this,M);const m={...M,type:(0,f.getJSONTypes)(M.type),schemaType:(0,f.getJSONTypes)(M.schemaType)};return(0,u.eachItem)(R,m.type.length===0?k=>ee.call(this,k,m):k=>m.type.forEach(A=>ee.call(this,k,m,A))),this}getKeyword(T){const M=this.RULES.all[T];return typeof M=="object"?M.definition:!!M}removeKeyword(T){const{RULES:M}=this;delete M.keywords[T],delete M.all[T];for(const R of M.rules){const m=R.rules.findIndex(k=>k.keyword===T);m>=0&&R.rules.splice(m,1)}return this}addFormat(T,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[T]=M,this}errorsText(T=this.errors,{separator:M=", ",dataVar:R="data"}={}){return!T||T.length===0?"No errors":T.map(m=>`${R}${m.instancePath} ${m.message}`).reduce((m,k)=>m+M+k)}$dataMetaSchema(T,M){const R=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const m of M){const k=m.split("/").slice(1);let A=T;for(const G of k)A=A[G];for(const G in R){const Q=R[G];if(typeof Q!="object")continue;const{$data:se}=Q.definition,re=A[G];se&&re&&(A[G]=ce(re))}}return T}_removeAllSchemas(T,M){for(const R in T){const m=T[R];(!M||M.test(R))&&(typeof m=="string"?delete T[R]:m&&!m.meta&&(this._cache.delete(m.schema),delete T[R]))}}_addSchema(T,M,R,m=this.opts.validateSchema,k=this.opts.addUsedSchema){let A;const{schemaId:G}=this.opts;if(typeof T=="object")A=T[G];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let Q=this._cache.get(T);if(Q!==void 0)return Q;R=(0,a.normalizeId)(A||R);const se=a.getSchemaRefs.call(this,T,R);return Q=new i.SchemaEnv({schema:T,schemaId:G,meta:M,baseId:R,localRefs:se}),this._cache.set(Q.schema,Q),k&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=Q),m&&this.validateSchema(T,!0),Q}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):i.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const M=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,T)}finally{this.opts=M}}}t.default=y,y.ValidationError=n.default,y.MissingRefError=s.default;function w(x,T,M,R="error"){for(const m in x){const k=m;k in T&&this.logger[R](`${M}: option ${m}. ${x[k]}`)}}function g(x){return x=(0,a.normalizeId)(x),this.schemas[x]||this.refs[x]}function p(){const x=this.opts.schemas;if(x)if(Array.isArray(x))this.addSchema(x);else for(const T in x)this.addSchema(x[T],T)}function S(){for(const x in this.opts.formats){const T=this.opts.formats[x];T&&this.addFormat(x,T)}}function O(x){if(Array.isArray(x)){this.addVocabulary(x);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in x){const M=x[T];M.keyword||(M.keyword=T),this.addKeyword(M)}}function j(){const x={...this.opts};for(const T of b)delete x[T];return x}var z={log(){},warn(){},error(){}};function V(x){if(x===!1)return z;if(x===void 0)return console;if(x.log&&x.warn&&x.error)return x;throw new Error("logger must implement log, warn and error methods")}var X=/^[a-z_$][a-z0-9_$:-]*$/i;function W(x,T){const{RULES:M}=this;if((0,u.eachItem)(x,R=>{if(M.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!X.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function ee(x,T,M){var R;const m=T==null?void 0:T.post;if(M&&m)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let A=m?k.post:k.rules.find(({type:Q})=>Q===M);if(A||(A={type:M,rules:[]},k.rules.push(A)),k.keywords[x]=!0,!T)return;const G={keyword:x,definition:{...T,type:(0,f.getJSONTypes)(T.type),schemaType:(0,f.getJSONTypes)(T.schemaType)}};T.before?he.call(this,A,G,T.before):A.rules.push(G),k.all[x]=G,(R=T.implements)===null||R===void 0||R.forEach(Q=>this.addKeyword(Q))}function he(x,T,M){const R=x.rules.findIndex(m=>m.keyword===M);R>=0?x.rules.splice(R,0,T):(x.rules.push(T),this.logger.warn(`rule ${M} is not defined`))}function Ee(x){let{metaSchema:T}=x;T!==void 0&&(x.$data&&this.opts.$data&&(T=ce(T)),x.validateSchema=this.compile(T,!0))}var Ce={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ce(x){return{anyOf:[x,Ce]}}}),Mo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=e}),Do=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=Mn(),r=It(),n=Ne(),s=Wt(),l=Dn(),i=ze(),c={keyword:"$ref",schemaType:"string",code(u){const{gen:d,schema:$,it:P}=u,{baseId:b,schemaEnv:E,validateName:_,opts:o,self:v}=P,{root:h}=E;if(($==="#"||$==="#/")&&b===h.baseId)return w();const y=l.resolveRef.call(v,h,b,$);if(y===void 0)throw new e.default(P.opts.uriResolver,b,$);if(y instanceof l.SchemaEnv)return g(y);return p(y);function w(){if(E===h)return f(u,_,E,E.$async);const S=d.scopeValue("root",{ref:h});return f(u,(0,n._)`${S}.validate`,h,h.$async)}function g(S){const O=a(u,S);f(u,O,S,S.$async)}function p(S){const O=d.scopeValue("schema",o.code.source===!0?{ref:S,code:(0,n.stringify)(S)}:{ref:S}),j=d.name("valid"),z=u.subschema({schema:S,dataTypes:[],schemaPath:n.nil,topSchemaRef:O,errSchemaPath:$},j);u.mergeEvaluated(z),u.ok(j)}}};function a(u,d){const{gen:$}=u;return d.validate?$.scopeValue("validate",{ref:d.validate}):(0,n._)`${$.scopeValue("wrapper",{ref:d})}.validate`}t.getValidate=a;function f(u,d,$,P){const{gen:b,it:E}=u,{allErrors:_,schemaEnv:o,opts:v}=E,h=v.passContext?s.default.this:n.nil;P?y():w();function y(){if(!o.$async)throw new Error("async schema referenced by sync schema");const S=b.let("valid");b.try(()=>{b.code((0,n._)`await ${(0,r.callValidateCode)(u,d,h)}`),p(d),_||b.assign(S,!0)},O=>{b.if((0,n._)`!(${O} instanceof ${E.ValidationError})`,()=>b.throw(O)),g(O),_||b.assign(S,!1)}),u.ok(S)}function w(){u.result((0,r.callValidateCode)(u,d,h),()=>p(d),()=>g(d))}function g(S){const O=(0,n._)`${S}.errors`;b.assign(s.default.vErrors,(0,n._)`${s.default.vErrors} === null ? ${O} : ${s.default.vErrors}.concat(${O})`),b.assign(s.default.errors,(0,n._)`${s.default.vErrors}.length`)}function p(S){var O;if(!E.opts.unevaluated)return;const j=(O=$==null?void 0:$.validate)===null||O===void 0?void 0:O.evaluated;if(E.props!==!0)if(j&&!j.dynamicProps)j.props!==void 0&&(E.props=i.mergeEvaluated.props(b,j.props,E.props));else{const z=b.var("props",(0,n._)`${S}.evaluated.props`);E.props=i.mergeEvaluated.props(b,z,E.props,n.Name)}if(E.items!==!0)if(j&&!j.dynamicItems)j.items!==void 0&&(E.items=i.mergeEvaluated.items(b,j.items,E.items));else{const z=b.var("items",(0,n._)`${S}.evaluated.items`);E.items=i.mergeEvaluated.items(b,z,E.items,n.Name)}}}t.callRef=f,t.default=c}),qo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Mo(),r=Do(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),Lo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=e.operators,n={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:i,schemaCode:c})=>(0,e.str)`must be ${n[i].okStr} ${c}`,params:({keyword:i,schemaCode:c})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${c}}`},l={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:s,code(i){const{keyword:c,data:a,schemaCode:f}=i;i.fail$data((0,e._)`${a} ${n[c].fail} ${f} || isNaN(${a})`)}};t.default=l}),Vo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r={message:({schemaCode:s})=>(0,e.str)`must be multiple of ${s}`,params:({schemaCode:s})=>(0,e._)`{multipleOf: ${s}}`},n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:r,code(s){const{gen:l,data:i,schemaCode:c,it:a}=s,f=a.opts.multipleOfPrecision,u=l.let("res"),d=f?(0,e._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${f}`:(0,e._)`${u} !== parseInt(${u})`;s.fail$data((0,e._)`(${c} === 0 || (${u} = ${i}/${c}, ${d}))`)}};t.default=n}),Uo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(r){const n=r.length;let s=0,l=0,i;for(;l<n;)s++,i=r.charCodeAt(l++),i>=55296&&i<=56319&&l<n&&(i=r.charCodeAt(l),(i&64512)===56320&&l++);return s}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),zo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=ze(),n=Uo(),s={message({keyword:i,schemaCode:c}){const a=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${c} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},l={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:s,code(i){const{keyword:c,data:a,schemaCode:f,it:u}=i,d=c==="maxLength"?e.operators.GT:e.operators.LT,$=u.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,r.useFunc)(i.gen,n.default)}(${a})`;i.fail$data((0,e._)`${$} ${d} ${f}`)}};t.default=l}),Fo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ne(),n={message:({schemaCode:l})=>(0,r.str)`must match pattern "${l}"`,params:({schemaCode:l})=>(0,r._)`{pattern: ${l}}`},s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:n,code(l){const{data:i,$data:c,schema:a,schemaCode:f,it:u}=l,d=u.opts.unicodeRegExp?"u":"",$=c?(0,r._)`(new RegExp(${f}, ${d}))`:(0,e.usePattern)(l,a);l.fail$data((0,r._)`!${$}.test(${i})`)}};t.default=s}),xo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r={message({keyword:s,schemaCode:l}){const i=s==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${l} properties`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:i,schemaCode:c}=s,a=l==="maxProperties"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`Object.keys(${i}).length ${a} ${c}`)}};t.default=n}),Bo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ne(),n=ze(),s={message:({params:{missingProperty:i}})=>(0,r.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,r._)`{missingProperty: ${i}}`},l={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s,code(i){const{gen:c,schema:a,schemaCode:f,data:u,$data:d,it:$}=i,{opts:P}=$;if(!d&&a.length===0)return;const b=a.length>=P.loopRequired;if($.allErrors?E():_(),P.strictRequired){const h=i.parentSchema.properties,{definedProperties:y}=i.it;for(const w of a)if((h==null?void 0:h[w])===void 0&&!y.has(w)){const g=$.schemaEnv.baseId+$.errSchemaPath,p=`required property "${w}" is not defined at "${g}" (strictRequired)`;(0,n.checkStrictMode)($,p,$.opts.strictRequired)}}function E(){if(b||d)i.block$data(r.nil,o);else for(const h of a)(0,e.checkReportMissingProp)(i,h)}function _(){const h=c.let("missing");if(b||d){const y=c.let("valid",!0);i.block$data(y,()=>v(h,y)),i.ok(y)}else c.if((0,e.checkMissingProp)(i,a,h)),(0,e.reportMissingProp)(i,h),c.else()}function o(){c.forOf("prop",f,h=>{i.setParams({missingProperty:h}),c.if((0,e.noPropertyInData)(c,u,h,P.ownProperties),()=>i.error())})}function v(h,y){i.setParams({missingProperty:h}),c.forOf(h,f,()=>{c.assign(y,(0,e.propertyInData)(c,u,h,P.ownProperties)),c.if((0,r.not)(y),()=>{i.error(),c.break()})},r.nil)}}};t.default=l}),Ho=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r={message({keyword:s,schemaCode:l}){const i=s==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${l} items`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:i,schemaCode:c}=s,a=l==="maxItems"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`${i}.length ${a} ${c}`)}};t.default=n}),Ln=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ur();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),Ko=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=qr(),r=Ne(),n=ze(),s=Ln(),l={message:({params:{i:c,j:a}})=>(0,r.str)`must NOT have duplicate items (items ## ${a} and ${c} are identical)`,params:({params:{i:c,j:a}})=>(0,r._)`{i: ${c}, j: ${a}}`},i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:l,code(c){const{gen:a,data:f,$data:u,schema:d,parentSchema:$,schemaCode:P,it:b}=c;if(!u&&!d)return;const E=a.let("valid"),_=$.items?(0,e.getSchemaTypes)($.items):[];c.block$data(E,o,(0,r._)`${P} === false`),c.ok(E);function o(){const w=a.let("i",(0,r._)`${f}.length`),g=a.let("j");c.setParams({i:w,j:g}),a.assign(E,!0),a.if((0,r._)`${w} > 1`,()=>(v()?h:y)(w,g))}function v(){return _.length>0&&!_.some(w=>w==="object"||w==="array")}function h(w,g){const p=a.name("item"),S=(0,e.checkDataTypes)(_,p,b.opts.strictNumbers,e.DataType.Wrong),O=a.const("indices",(0,r._)`{}`);a.for((0,r._)`;${w}--;`,()=>{a.let(p,(0,r._)`${f}[${w}]`),a.if(S,(0,r._)`continue`),_.length>1&&a.if((0,r._)`typeof ${p} == "string"`,(0,r._)`${p} += "_"`),a.if((0,r._)`typeof ${O}[${p}] == "number"`,()=>{a.assign(g,(0,r._)`${O}[${p}]`),c.error(),a.assign(E,!1).break()}).code((0,r._)`${O}[${p}] = ${w}`)})}function y(w,g){const p=(0,n.useFunc)(a,s.default),S=a.name("outer");a.label(S).for((0,r._)`;${w}--;`,()=>a.for((0,r._)`${g} = ${w}; ${g}--;`,()=>a.if((0,r._)`${p}(${f}[${w}], ${f}[${g}])`,()=>{c.error(),a.assign(E,!1).break(S)})))}}};t.default=i}),Go=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=ze(),n=Ln(),s={message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},l={keyword:"const",$data:!0,error:s,code(i){const{gen:c,data:a,$data:f,schemaCode:u,schema:d}=i;f||d&&typeof d=="object"?i.fail$data((0,e._)`!${(0,r.useFunc)(c,n.default)}(${a}, ${u})`):i.fail((0,e._)`${d} !== ${a}`)}};t.default=l}),Wo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=ze(),n=Ln(),s={message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},l={keyword:"enum",schemaType:"array",$data:!0,error:s,code(i){const{gen:c,data:a,$data:f,schema:u,schemaCode:d,it:$}=i;if(!f&&u.length===0)throw new Error("enum must have non-empty array");const P=u.length>=$.opts.loopEnum;let b;const E=()=>b??(b=(0,r.useFunc)(c,n.default));let _;if(P||f)_=c.let("valid"),i.block$data(_,o);else{if(!Array.isArray(u))throw new Error("ajv implementation error");const h=c.const("vSchema",d);_=(0,e.or)(...u.map((y,w)=>v(h,w)))}i.pass(_);function o(){c.assign(_,!1),c.forOf("v",d,h=>c.if((0,e._)`${E()}(${a}, ${h})`,()=>c.assign(_,!0).break()))}function v(h,y){const w=u[y];return typeof w=="object"&&w!==null?(0,e._)`${E()}(${a}, ${h}[${y}])`:(0,e._)`${a} === ${w}`}}};t.default=l}),Jo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Lo(),r=Vo(),n=zo(),s=Fo(),l=xo(),i=Bo(),c=Ho(),a=Ko(),f=Go(),u=Wo(),d=[e.default,r.default,n.default,s.default,l.default,i.default,c.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,u.default];t.default=d}),Us=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Ne(),r=ze(),n={message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(i){const{parentSchema:c,it:a}=i,{items:f}=c;if(!Array.isArray(f)){(0,r.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}l(i,f)}};function l(i,c){const{gen:a,schema:f,data:u,keyword:d,it:$}=i;$.items=!0;const P=a.const("len",(0,e._)`${u}.length`);if(f===!1)i.setParams({len:c.length}),i.pass((0,e._)`${P} <= ${c.length}`);else if(typeof f=="object"&&!(0,r.alwaysValidSchema)($,f)){const E=a.var("valid",(0,e._)`${P} <= ${c.length}`);a.if((0,e.not)(E),()=>b(E)),i.ok(E)}function b(E){a.forRange("i",c.length,P,_=>{i.subschema({keyword:d,dataProp:_,dataPropType:r.Type.Num},E),$.allErrors||a.if((0,e.not)(E),()=>a.break())})}}t.validateAdditionalItems=l,t.default=s}),zs=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Ne(),r=ze(),n=It(),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:c,it:a}=i;if(Array.isArray(c))return l(i,"additionalItems",c);a.items=!0,!(0,r.alwaysValidSchema)(a,c)&&i.ok((0,n.validateArray)(i))}};function l(i,c,a=i.schema){const{gen:f,parentSchema:u,data:d,keyword:$,it:P}=i;_(u),P.opts.unevaluated&&a.length&&P.items!==!0&&(P.items=r.mergeEvaluated.items(f,a.length,P.items));const b=f.name("valid"),E=f.const("len",(0,e._)`${d}.length`);a.forEach((o,v)=>{(0,r.alwaysValidSchema)(P,o)||(f.if((0,e._)`${E} > ${v}`,()=>i.subschema({keyword:$,schemaProp:v,dataProp:v},b)),i.ok(b))});function _(o){const{opts:v,errSchemaPath:h}=P,y=a.length,w=y===o.minItems&&(y===o.maxItems||o[c]===!1);if(v.strictTuples&&!w){const g=`"${$}" is ${y}-tuple, but minItems or maxItems/${c} are not specified or different at path "${h}"`;(0,r.checkStrictMode)(P,g,v.strictTuples)}}}t.validateTuple=l,t.default=s}),Qo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=zs(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),Xo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=ze(),n=It(),s=Us(),l={message:({params:{len:c}})=>(0,e.str)`must NOT have more than ${c} items`,params:({params:{len:c}})=>(0,e._)`{limit: ${c}}`},i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:l,code(c){const{schema:a,parentSchema:f,it:u}=c,{prefixItems:d}=f;u.items=!0,!(0,r.alwaysValidSchema)(u,a)&&(d?(0,s.validateAdditionalItems)(c,d):c.ok((0,n.validateArray)(c)))}};t.default=i}),Yo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=ze(),n={message:({params:{min:l,max:i}})=>i===void 0?(0,e.str)`must contain at least ${l} valid item(s)`:(0,e.str)`must contain at least ${l} and no more than ${i} valid item(s)`,params:({params:{min:l,max:i}})=>i===void 0?(0,e._)`{minContains: ${l}}`:(0,e._)`{minContains: ${l}, maxContains: ${i}}`},s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(l){const{gen:i,schema:c,parentSchema:a,data:f,it:u}=l;let d,$;const{minContains:P,maxContains:b}=a;u.opts.next?(d=P===void 0?1:P,$=b):d=1;const E=i.const("len",(0,e._)`${f}.length`);if(l.setParams({min:d,max:$}),$===void 0&&d===0){(0,r.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if($!==void 0&&d>$){(0,r.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),l.fail();return}if((0,r.alwaysValidSchema)(u,c)){let y=(0,e._)`${E} >= ${d}`;$!==void 0&&(y=(0,e._)`${y} && ${E} <= ${$}`),l.pass(y);return}u.items=!0;const _=i.name("valid");$===void 0&&d===1?v(_,()=>i.if(_,()=>i.break())):d===0?(i.let(_,!0),$!==void 0&&i.if((0,e._)`${f}.length > 0`,o)):(i.let(_,!1),o()),l.result(_,()=>l.reset());function o(){const y=i.name("_valid"),w=i.let("count",0);v(y,()=>i.if(y,()=>h(w)))}function v(y,w){i.forRange("i",0,E,g=>{l.subschema({keyword:"contains",dataProp:g,dataPropType:r.Type.Num,compositeRule:!0},y),w()})}function h(y){i.code((0,e._)`${y}++`),$===void 0?i.if((0,e._)`${y} >= ${d}`,()=>i.assign(_,!0).break()):(i.if((0,e._)`${y} > ${$}`,()=>i.assign(_,!1).break()),d===1?i.assign(_,!0):i.if((0,e._)`${y} >= ${d}`,()=>i.assign(_,!0)))}}};t.default=s}),Zo=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Ne(),r=ze(),n=It();t.error={message:({params:{property:a,depsCount:f,deps:u}})=>{const d=f===1?"property":"properties";return(0,e.str)`must have ${d} ${u} when property ${a} is present`},params:({params:{property:a,depsCount:f,deps:u,missingProperty:d}})=>(0,e._)`{property: ${a},
20
+ missingProperty: ${d},
21
+ depsCount: ${f},
22
+ deps: ${u}}`};var s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(a){const[f,u]=l(a);i(a,f),c(a,u)}};function l({schema:a}){const f={},u={};for(const d in a){if(d==="__proto__")continue;const $=Array.isArray(a[d])?f:u;$[d]=a[d]}return[f,u]}function i(a,f=a.schema){const{gen:u,data:d,it:$}=a;if(Object.keys(f).length===0)return;const P=u.let("missing");for(const b in f){const E=f[b];if(E.length===0)continue;const _=(0,n.propertyInData)(u,d,b,$.opts.ownProperties);a.setParams({property:b,depsCount:E.length,deps:E.join(", ")}),$.allErrors?u.if(_,()=>{for(const o of E)(0,n.checkReportMissingProp)(a,o)}):(u.if((0,e._)`${_} && (${(0,n.checkMissingProp)(a,E,P)})`),(0,n.reportMissingProp)(a,P),u.else())}}t.validatePropertyDeps=i;function c(a,f=a.schema){const{gen:u,data:d,keyword:$,it:P}=a,b=u.name("valid");for(const E in f)(0,r.alwaysValidSchema)(P,f[E])||(u.if((0,n.propertyInData)(u,d,E,P.opts.ownProperties),()=>{const _=a.subschema({keyword:$,schemaProp:E},b);a.mergeValidEvaluated(_,b)},()=>u.var(b,!0)),a.ok(b))}t.validateSchemaDeps=c,t.default=s}),ec=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=ze(),n={message:"property name must be valid",params:({params:l})=>(0,e._)`{propertyName: ${l.propertyName}}`},s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(l){const{gen:i,schema:c,data:a,it:f}=l;if((0,r.alwaysValidSchema)(f,c))return;const u=i.name("valid");i.forIn("key",a,d=>{l.setParams({propertyName:d}),l.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},u),i.if((0,e.not)(u),()=>{l.error(!0),f.allErrors||i.break()})}),l.ok(u)}};t.default=s}),Fs=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ne(),n=Wt(),s=ze(),l={message:"must NOT have additional properties",params:({params:c})=>(0,r._)`{additionalProperty: ${c.additionalProperty}}`},i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:l,code(c){const{gen:a,schema:f,parentSchema:u,data:d,errsCount:$,it:P}=c;if(!$)throw new Error("ajv implementation error");const{allErrors:b,opts:E}=P;if(P.props=!0,E.removeAdditional!=="all"&&(0,s.alwaysValidSchema)(P,f))return;const _=(0,e.allSchemaProperties)(u.properties),o=(0,e.allSchemaProperties)(u.patternProperties);v(),c.ok((0,r._)`${$} === ${n.default.errors}`);function v(){a.forIn("key",d,p=>{!_.length&&!o.length?w(p):a.if(h(p),()=>w(p))})}function h(p){let S;if(_.length>8){const O=(0,s.schemaRefOrVal)(P,u.properties,"properties");S=(0,e.isOwnProperty)(a,O,p)}else _.length?S=(0,r.or)(..._.map(O=>(0,r._)`${p} === ${O}`)):S=r.nil;return o.length&&(S=(0,r.or)(S,...o.map(O=>(0,r._)`${(0,e.usePattern)(c,O)}.test(${p})`))),(0,r.not)(S)}function y(p){a.code((0,r._)`delete ${d}[${p}]`)}function w(p){if(E.removeAdditional==="all"||E.removeAdditional&&f===!1){y(p);return}if(f===!1){c.setParams({additionalProperty:p}),c.error(),b||a.break();return}if(typeof f=="object"&&!(0,s.alwaysValidSchema)(P,f)){const S=a.name("valid");E.removeAdditional==="failing"?(g(p,S,!1),a.if((0,r.not)(S),()=>{c.reset(),y(p)})):(g(p,S),b||a.if((0,r.not)(S),()=>a.break()))}}function g(p,S,O){const j={keyword:"additionalProperties",dataProp:p,dataPropType:s.Type.Str};O===!1&&Object.assign(j,{compositeRule:!0,createErrors:!1,allErrors:!1}),c.subschema(j,S)}}};t.default=i}),tc=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Kr(),r=It(),n=ze(),s=Fs(),l={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:c,schema:a,parentSchema:f,data:u,it:d}=i;d.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&s.default.code(new e.KeywordCxt(d,s.default,"additionalProperties"));const $=(0,r.allSchemaProperties)(a);for(const o of $)d.definedProperties.add(o);d.opts.unevaluated&&$.length&&d.props!==!0&&(d.props=n.mergeEvaluated.props(c,(0,n.toHash)($),d.props));const P=$.filter(o=>!(0,n.alwaysValidSchema)(d,a[o]));if(P.length===0)return;const b=c.name("valid");for(const o of P)E(o)?_(o):(c.if((0,r.propertyInData)(c,u,o,d.opts.ownProperties)),_(o),d.allErrors||c.else().var(b,!0),c.endIf()),i.it.definedProperties.add(o),i.ok(b);function E(o){return d.opts.useDefaults&&!d.compositeRule&&a[o].default!==void 0}function _(o){i.subschema({keyword:"properties",schemaProp:o,dataProp:o},b)}}};t.default=l}),rc=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ne(),n=ze(),s=ze(),l={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:c,schema:a,data:f,parentSchema:u,it:d}=i,{opts:$}=d,P=(0,e.allSchemaProperties)(a),b=P.filter(w=>(0,n.alwaysValidSchema)(d,a[w]));if(P.length===0||b.length===P.length&&(!d.opts.unevaluated||d.props===!0))return;const E=$.strictSchema&&!$.allowMatchingProperties&&u.properties,_=c.name("valid");d.props!==!0&&!(d.props instanceof r.Name)&&(d.props=(0,s.evaluatedPropsToName)(c,d.props));const{props:o}=d;v();function v(){for(const w of P)E&&h(w),d.allErrors?y(w):(c.var(_,!0),y(w),c.if(_))}function h(w){for(const g in E)new RegExp(w).test(g)&&(0,n.checkStrictMode)(d,`property ${g} matches pattern ${w} (use allowMatchingProperties)`)}function y(w){c.forIn("key",f,g=>{c.if((0,r._)`${(0,e.usePattern)(i,w)}.test(${g})`,()=>{const p=b.includes(w);p||i.subschema({keyword:"patternProperties",schemaProp:w,dataProp:g,dataPropType:s.Type.Str},_),d.opts.unevaluated&&o!==!0?c.assign((0,r._)`${o}[${g}]`,!0):!p&&!d.allErrors&&c.if((0,r.not)(_),()=>c.break())})})}}};t.default=l}),nc=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ze(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:s,schema:l,it:i}=n;if((0,e.alwaysValidSchema)(i,l)){n.fail();return}const c=s.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},c),n.failResult(c,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};t.default=r}),sc=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r}),ic=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=ze(),n={message:"must match exactly one schema in oneOf",params:({params:l})=>(0,e._)`{passingSchemas: ${l.passing}}`},s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(l){const{gen:i,schema:c,parentSchema:a,it:f}=l;if(!Array.isArray(c))throw new Error("ajv implementation error");if(f.opts.discriminator&&a.discriminator)return;const u=c,d=i.let("valid",!1),$=i.let("passing",null),P=i.name("_valid");l.setParams({passing:$}),i.block(b),l.result(d,()=>l.reset(),()=>l.error(!0));function b(){u.forEach((E,_)=>{let o;(0,r.alwaysValidSchema)(f,E)?i.var(P,!0):o=l.subschema({keyword:"oneOf",schemaProp:_,compositeRule:!0},P),_>0&&i.if((0,e._)`${P} && ${d}`).assign(d,!1).assign($,(0,e._)`[${$}, ${_}]`).else(),i.if(P,()=>{i.assign(d,!0),i.assign($,_),o&&l.mergeEvaluated(o,e.Name)})})}}};t.default=s}),ac=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ze(),r={keyword:"allOf",schemaType:"array",code(n){const{gen:s,schema:l,it:i}=n;if(!Array.isArray(l))throw new Error("ajv implementation error");const c=s.name("valid");l.forEach((a,f)=>{if((0,e.alwaysValidSchema)(i,a))return;const u=n.subschema({keyword:"allOf",schemaProp:f},c);n.ok(c),n.mergeEvaluated(u)})}};t.default=r}),oc=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=ze(),n={message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(i){const{gen:c,parentSchema:a,it:f}=i;a.then===void 0&&a.else===void 0&&(0,r.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const u=l(f,"then"),d=l(f,"else");if(!u&&!d)return;const $=c.let("valid",!0),P=c.name("_valid");if(b(),i.reset(),u&&d){const _=c.let("ifClause");i.setParams({ifClause:_}),c.if(P,E("then",_),E("else",_))}else u?c.if(P,E("then")):c.if((0,e.not)(P),E("else"));i.pass($,()=>i.error(!0));function b(){const _=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},P);i.mergeEvaluated(_)}function E(_,o){return()=>{const v=i.subschema({keyword:_},P);c.assign($,P),i.mergeValidEvaluated(v,$),o?c.assign(o,(0,e._)`${_}`):i.setParams({ifClause:_})}}}};function l(i,c){const a=i.schema[c];return a!==void 0&&!(0,r.alwaysValidSchema)(i,a)}t.default=s}),cc=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ze(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:s,it:l}){s.if===void 0&&(0,e.checkStrictMode)(l,`"${n}" without "if" is ignored`)}};t.default=r}),lc=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Us(),r=Qo(),n=zs(),s=Xo(),l=Yo(),i=Zo(),c=ec(),a=Fs(),f=tc(),u=rc(),d=nc(),$=sc(),P=ic(),b=ac(),E=oc(),_=cc();function o(v=!1){const h=[d.default,$.default,P.default,b.default,E.default,_.default,c.default,a.default,i.default,f.default,u.default];return v?h.push(r.default,s.default):h.push(e.default,n.default),h.push(l.default),h}t.default=o}),uc=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r={message:({schemaCode:s})=>(0,e.str)`must match format "${s}"`,params:({schemaCode:s})=>(0,e._)`{format: ${s}}`},n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r,code(s,l){const{gen:i,data:c,$data:a,schema:f,schemaCode:u,it:d}=s,{opts:$,errSchemaPath:P,schemaEnv:b,self:E}=d;if(!$.validateFormats)return;a?_():o();function _(){const v=i.scopeValue("formats",{ref:E.formats,code:$.code.formats}),h=i.const("fDef",(0,e._)`${v}[${u}]`),y=i.let("fType"),w=i.let("format");i.if((0,e._)`typeof ${h} == "object" && !(${h} instanceof RegExp)`,()=>i.assign(y,(0,e._)`${h}.type || "string"`).assign(w,(0,e._)`${h}.validate`),()=>i.assign(y,(0,e._)`"string"`).assign(w,h)),s.fail$data((0,e.or)(g(),p()));function g(){return $.strictSchema===!1?e.nil:(0,e._)`${u} && !${w}`}function p(){const S=b.$async?(0,e._)`(${h}.async ? await ${w}(${c}) : ${w}(${c}))`:(0,e._)`${w}(${c})`,O=(0,e._)`(typeof ${w} == "function" ? ${S} : ${w}.test(${c}))`;return(0,e._)`${w} && ${w} !== true && ${y} === ${l} && !${O}`}}function o(){const v=E.formats[f];if(!v){g();return}if(v===!0)return;const[h,y,w]=p(v);h===l&&s.pass(S());function g(){if($.strictSchema===!1){E.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${f}" ignored in schema at path "${P}"`}}function p(O){const j=O instanceof RegExp?(0,e.regexpCode)(O):$.code.formats?(0,e._)`${$.code.formats}${(0,e.getProperty)(f)}`:void 0,z=i.scopeValue("formats",{key:f,ref:O,code:j});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${z}.validate`]:["string",O,z]}function S(){if(typeof v=="object"&&!(v instanceof RegExp)&&v.async){if(!b.$async)throw new Error("async format in sync schema");return(0,e._)`await ${w}(${c})`}return typeof y=="function"?(0,e._)`${w}(${c})`:(0,e._)`${w}.test(${c})`}}}};t.default=n}),fc=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=uc(),r=[e.default];t.default=r}),dc=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),hc=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=qo(),r=Jo(),n=lc(),s=fc(),l=dc(),i=[e.default,r.default,(0,n.default)(),s.default,l.metadataVocabulary,l.contentVocabulary];t.default=i}),pc=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t.DiscrError||(t.DiscrError={}))}),mc=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=pc(),n=Dn(),s=ze(),l={message:({params:{discrError:c,tagName:a}})=>c===r.DiscrError.Tag?`tag "${a}" must be string`:`value of tag "${a}" must be in oneOf`,params:({params:{discrError:c,tag:a,tagName:f}})=>(0,e._)`{error: ${c}, tag: ${f}, tagValue: ${a}}`},i={keyword:"discriminator",type:"object",schemaType:"object",error:l,code(c){const{gen:a,data:f,schema:u,parentSchema:d,it:$}=c,{oneOf:P}=d;if(!$.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=u.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!P)throw new Error("discriminator: requires oneOf keyword");const E=a.let("valid",!1),_=a.const("tag",(0,e._)`${f}${(0,e.getProperty)(b)}`);a.if((0,e._)`typeof ${_} == "string"`,()=>o(),()=>c.error(!1,{discrError:r.DiscrError.Tag,tag:_,tagName:b})),c.ok(E);function o(){const y=h();a.if(!1);for(const w in y)a.elseIf((0,e._)`${_} === ${w}`),a.assign(E,v(y[w]));a.else(),c.error(!1,{discrError:r.DiscrError.Mapping,tag:_,tagName:b}),a.endIf()}function v(y){const w=a.name("valid"),g=c.subschema({keyword:"oneOf",schemaProp:y},w);return c.mergeEvaluated(g,e.Name),w}function h(){var y;const w={},g=S(d);let p=!0;for(let z=0;z<P.length;z++){let V=P[z];V!=null&&V.$ref&&!(0,s.schemaHasRulesButRef)(V,$.self.RULES)&&(V=n.resolveRef.call($.self,$.schemaEnv.root,$.baseId,V==null?void 0:V.$ref),V instanceof n.SchemaEnv&&(V=V.schema));const X=(y=V==null?void 0:V.properties)===null||y===void 0?void 0:y[b];if(typeof X!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);p=p&&(g||S(V)),O(X,z)}if(!p)throw new Error(`discriminator: "${b}" must be required`);return w;function S({required:z}){return Array.isArray(z)&&z.includes(b)}function O(z,V){if(z.const)j(z.const,V);else if(z.enum)for(const X of z.enum)j(X,V);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function j(z,V){if(typeof z!="string"||z in w)throw new Error(`discriminator: "${b}" values must be unique strings`);w[z]=V}}}};t.default=i}),gc=B(function(t,e){e.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}}),yc=B(function(t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var r=jo(),n=hc(),s=mc(),l=gc(),i=["/properties"],c="http://json-schema.org/draft-07/schema";class a extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(l,i):l;this.addMetaSchema(b,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var f=Kr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var u=Ne();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var d=jn();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var $=Mn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return $.default}})}),vc=B(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;var e=yc(),r=Ne(),n=r.operators,s={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},l={message:({keyword:c,schemaCode:a})=>r.str`should be ${s[c].okStr} ${a}`,params:({keyword:c,schemaCode:a})=>r._`{comparison: ${s[c].okStr}, limit: ${a}}`};t.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:l,code(c){const{gen:a,data:f,schemaCode:u,keyword:d,it:$}=c,{opts:P,self:b}=$;if(!P.validateFormats)return;const E=new e.KeywordCxt($,b.RULES.all.format.definition,"format");E.$data?_():o();function _(){const h=a.scopeValue("formats",{ref:b.formats,code:P.code.formats}),y=a.const("fmt",r._`${h}[${E.schemaCode}]`);c.fail$data(r.or(r._`typeof ${y} != "object"`,r._`${y} instanceof RegExp`,r._`typeof ${y}.compare != "function"`,v(y)))}function o(){const h=E.schema,y=b.formats[h];if(!y||y===!0)return;if(typeof y!="object"||y instanceof RegExp||typeof y.compare!="function")throw new Error(`"${d}": format "${h}" does not define "compare" function`);const w=a.scopeValue("formats",{key:h,ref:y,code:P.code.formats?r._`${P.code.formats}${r.getProperty(h)}`:void 0});c.fail$data(v(w))}function v(h){return r._`${h}.compare(${f}, ${u}) ${s[d].fail} 0`}},dependencies:["format"]};var i=c=>(c.addKeyword(t.formatLimitDefinition),c);t.default=i}),_c=B(function(t,e){Object.defineProperty(t,"__esModule",{value:!0});var r=Oo(),n=vc(),s=Ne(),l=new s.Name("fullFormats"),i=new s.Name("fastFormats"),c=(f,u={keywords:!0})=>{if(Array.isArray(u))return a(f,u,r.fullFormats,l),f;const[d,$]=u.mode==="fast"?[r.fastFormats,i]:[r.fullFormats,l],P=u.formats||r.formatNames;return a(f,P,d,$),u.keywords&&n.default(f),f};c.get=(f,u="full")=>{const $=(u==="fast"?r.fastFormats:r.fullFormats)[f];if(!$)throw new Error(`Unknown format "${f}"`);return $};function a(f,u,d,$){var P,b;(P=(b=f.opts.code).formats)!==null&&P!==void 0||(b.formats=s._`require("ajv-formats/dist/formats").${$}`);for(const E of u)f.addFormat(E,d[E])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c}),wc=B(function(t,e){(function(r,n){typeof e=="object"&&e.exports?e.exports=n():r.nearley=n()})(t,function(){function r(u,d,$){return this.id=++r.highestId,this.name=u,this.symbols=d,this.postprocess=$,this}r.highestId=0,r.prototype.toString=function(u){var d=typeof u>"u"?this.symbols.map(f).join(" "):this.symbols.slice(0,u).map(f).join(" ")+" ● "+this.symbols.slice(u).map(f).join(" ");return this.name+" → "+d};function n(u,d,$,P){this.rule=u,this.dot=d,this.reference=$,this.data=[],this.wantedBy=P,this.isComplete=this.dot===u.symbols.length}n.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},n.prototype.nextState=function(u){var d=new n(this.rule,this.dot+1,this.reference,this.wantedBy);return d.left=this,d.right=u,d.isComplete&&(d.data=d.build(),d.right=void 0),d},n.prototype.build=function(){var u=[],d=this;do u.push(d.right.data),d=d.left;while(d.left);return u.reverse(),u},n.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,c.fail))};function s(u,d){this.grammar=u,this.index=d,this.states=[],this.wants={},this.scannable=[],this.completed={}}s.prototype.process=function(u){for(var d=this.states,$=this.wants,P=this.completed,b=0;b<d.length;b++){var E=d[b];if(E.isComplete){if(E.finish(),E.data!==c.fail){for(var _=E.wantedBy,o=_.length;o--;){var v=_[o];this.complete(v,E)}if(E.reference===this.index){var h=E.rule.name;(this.completed[h]=this.completed[h]||[]).push(E)}}}else{var h=E.rule.symbols[E.dot];if(typeof h!="string"){this.scannable.push(E);continue}if($[h]){if($[h].push(E),P.hasOwnProperty(h))for(var y=P[h],o=0;o<y.length;o++){var w=y[o];this.complete(E,w)}}else $[h]=[E],this.predict(h)}}},s.prototype.predict=function(u){for(var d=this.grammar.byName[u]||[],$=0;$<d.length;$++){var P=d[$],b=this.wants[u],E=new n(P,0,this.index,b);this.states.push(E)}},s.prototype.complete=function(u,d){var $=u.nextState(d);this.states.push($)};function l(u,d){this.rules=u,this.start=d||this.rules[0].name;var $=this.byName={};this.rules.forEach(function(P){$.hasOwnProperty(P.name)||($[P.name]=[]),$[P.name].push(P)})}l.fromCompiled=function(P,d){var $=P.Lexer;P.ParserStart&&(d=P.ParserStart,P=P.ParserRules);var P=P.map(function(E){return new r(E.name,E.symbols,E.postprocess)}),b=new l(P,d);return b.lexer=$,b};function i(){this.reset("")}i.prototype.reset=function(u,d){this.buffer=u,this.index=0,this.line=d?d.line:1,this.lastLineBreak=d?-d.col:0},i.prototype.next=function(){if(this.index<this.buffer.length){var u=this.buffer[this.index++];return u===`
23
+ `&&(this.line+=1,this.lastLineBreak=this.index),{value:u}}},i.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},i.prototype.formatError=function(u,d){var $=this.buffer;if(typeof $=="string"){var P=$.split(`
24
+ `).slice(Math.max(0,this.line-5),this.line),b=$.indexOf(`
25
+ `,this.index);b===-1&&(b=$.length);var E=this.index-this.lastLineBreak,_=String(this.line).length;return d+=" at line "+this.line+" col "+E+`:
26
+
27
+ `,d+=P.map(function(v,h){return o(this.line-P.length+h+1,_)+" "+v},this).join(`
28
+ `),d+=`
29
+ `+o("",_+E)+`^
30
+ `,d}else return d+" at index "+(this.index-1);function o(v,h){var y=String(v);return Array(h-y.length+1).join(" ")+y}};function c(u,d,$){if(u instanceof l)var P=u,$=d;else var P=l.fromCompiled(u,d);this.grammar=P,this.options={keepHistory:!1,lexer:P.lexer||new i};for(var b in $||{})this.options[b]=$[b];this.lexer=this.options.lexer,this.lexerState=void 0;var E=new s(P,0);this.table=[E],E.wants[P.start]=[],E.predict(P.start),E.process(),this.current=0}c.fail={},c.prototype.feed=function(u){var d=this.lexer;d.reset(u,this.lexerState);for(var $;;){try{if($=d.next(),!$)break}catch(S){var _=new s(this.grammar,this.current+1);this.table.push(_);var P=new Error(this.reportLexerError(S));throw P.offset=this.current,P.token=S.token,P}var b=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var E=this.current+1,_=new s(this.grammar,E);this.table.push(_);for(var o=$.text!==void 0?$.text:$.value,v=d.constructor===i?$.value:$,h=b.scannable,y=h.length;y--;){var w=h[y],g=w.rule.symbols[w.dot];if(g.test?g.test(v):g.type?g.type===$.type:g.literal===o){var p=w.nextState({data:v,token:$,isToken:!0,reference:E-1});_.states.push(p)}}if(_.process(),_.states.length===0){var P=new Error(this.reportError($));throw P.offset=this.current,P.token=$,P}this.options.keepHistory&&(b.lexerState=d.save()),this.current++}return b&&(this.lexerState=d.save()),this.results=this.finish(),this},c.prototype.reportLexerError=function(u){var d,$,P=u.token;return P?(d="input "+JSON.stringify(P.text[0])+" (lexer error)",$=this.lexer.formatError(P,"Syntax error")):(d="input (lexer error)",$=u.message),this.reportErrorCommon($,d)},c.prototype.reportError=function(u){var d=(u.type?u.type+" token: ":"")+JSON.stringify(u.value!==void 0?u.value:u),$=this.lexer.formatError(u,"Syntax error");return this.reportErrorCommon($,d)},c.prototype.reportErrorCommon=function(u,d){var $=[];$.push(u);var P=this.table.length-2,b=this.table[P],E=b.states.filter(function(o){var v=o.rule.symbols[o.dot];return v&&typeof v!="string"});if(E.length===0)$.push("Unexpected "+d+`. I did not expect any more input. Here is the state of my parse table:
31
+ `),this.displayStateStack(b.states,$);else{$.push("Unexpected "+d+`. Instead, I was expecting to see one of the following:
32
+ `);var _=E.map(function(o){return this.buildFirstStateStack(o,[])||[o]},this);_.forEach(function(o){var v=o[0],h=v.rule.symbols[v.dot],y=this.getSymbolDisplay(h);$.push("A "+y+" based on:"),this.displayStateStack(o,$)},this)}return $.push(""),$.join(`
33
+ `)},c.prototype.displayStateStack=function(u,d){for(var $,P=0,b=0;b<u.length;b++){var E=u[b],_=E.rule.toString(E.dot);_===$?P++:(P>0&&d.push(" ^ "+P+" more lines identical to this"),P=0,d.push(" "+_)),$=_}},c.prototype.getSymbolDisplay=function(u){return a(u)},c.prototype.buildFirstStateStack=function(u,d){if(d.indexOf(u)!==-1)return null;if(u.wantedBy.length===0)return[u];var $=u.wantedBy[0],P=[u].concat(d),b=this.buildFirstStateStack($,P);return b===null?null:[u].concat(b)},c.prototype.save=function(){var u=this.table[this.current];return u.lexerState=this.lexerState,u},c.prototype.restore=function(u){var d=u.index;this.current=d,this.table[d]=u,this.table.splice(d+1),this.lexerState=u.lexerState,this.results=this.finish()},c.prototype.rewind=function(u){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[u])},c.prototype.finish=function(){var u=[],d=this.grammar.start,$=this.table[this.table.length-1];return $.states.forEach(function(P){P.rule.name===d&&P.dot===P.rule.symbols.length&&P.reference===0&&P.data!==c.fail&&u.push(P)}),u.map(function(P){return P.data})};function a(u){var d=typeof u;if(d==="string")return u;if(d==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return"character matching "+u;if(u.type)return u.type+" token";if(u.test)return"token matching "+String(u.test);throw new Error("Unknown symbol type: "+u)}}function f(u){var d=typeof u;if(d==="string")return u;if(d==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return u.toString();if(u.type)return"%"+u.type;if(u.test)return"<"+String(u.test)+">";throw new Error("Unknown symbol type: "+u)}}return{Parser:c,Grammar:l,Rule:r}})}),$c=B(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(l){return l[0]}var r=l=>[].concat(...l.map(i=>Array.isArray(i)?r(i):i));function n(l){return l?Array.isArray(l)?r(l).join(""):l:""}var s={Lexer:void 0,ParserRules:[{name:"Reverse_path",symbols:["Path"]},{name:"Reverse_path$string$1",symbols:[{literal:"<"},{literal:">"}],postprocess:l=>l.join("")},{name:"Reverse_path",symbols:["Reverse_path$string$1"]},{name:"Forward_path$subexpression$1$subexpression$1",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:"@"}],postprocess:function(l){return l.join("")}},{name:"Forward_path$subexpression$1",symbols:["Forward_path$subexpression$1$subexpression$1","Domain",{literal:">"}]},{name:"Forward_path",symbols:["Forward_path$subexpression$1"]},{name:"Forward_path$subexpression$2",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:">"}],postprocess:function(l){return l.join("")}},{name:"Forward_path",symbols:["Forward_path$subexpression$2"]},{name:"Forward_path",symbols:["Path"]},{name:"Path$ebnf$1$subexpression$1",symbols:["A_d_l",{literal:":"}]},{name:"Path$ebnf$1",symbols:["Path$ebnf$1$subexpression$1"],postprocess:e},{name:"Path$ebnf$1",symbols:[],postprocess:()=>null},{name:"Path",symbols:[{literal:"<"},"Path$ebnf$1","Mailbox",{literal:">"}]},{name:"A_d_l$ebnf$1",symbols:[]},{name:"A_d_l$ebnf$1$subexpression$1",symbols:[{literal:","},"At_domain"]},{name:"A_d_l$ebnf$1",symbols:["A_d_l$ebnf$1","A_d_l$ebnf$1$subexpression$1"],postprocess:l=>l[0].concat([l[1]])},{name:"A_d_l",symbols:["At_domain","A_d_l$ebnf$1"]},{name:"At_domain",symbols:[{literal:"@"},"Domain"]},{name:"Domain$ebnf$1",symbols:[]},{name:"Domain$ebnf$1$subexpression$1",symbols:[{literal:"."},"sub_domain"]},{name:"Domain$ebnf$1",symbols:["Domain$ebnf$1","Domain$ebnf$1$subexpression$1"],postprocess:l=>l[0].concat([l[1]])},{name:"Domain",symbols:["sub_domain","Domain$ebnf$1"]},{name:"sub_domain",symbols:["U_label"]},{name:"Let_dig",symbols:["ALPHA_DIGIT"],postprocess:e},{name:"Ldh_str$ebnf$1",symbols:[]},{name:"Ldh_str$ebnf$1",symbols:["Ldh_str$ebnf$1","ALPHA_DIG_DASH"],postprocess:l=>l[0].concat([l[1]])},{name:"Ldh_str",symbols:["Ldh_str$ebnf$1","Let_dig"]},{name:"U_Let_dig",symbols:["ALPHA_DIGIT_U"],postprocess:e},{name:"U_Ldh_str$ebnf$1",symbols:[]},{name:"U_Ldh_str$ebnf$1",symbols:["U_Ldh_str$ebnf$1","ALPHA_DIG_DASH_U"],postprocess:l=>l[0].concat([l[1]])},{name:"U_Ldh_str",symbols:["U_Ldh_str$ebnf$1","U_Let_dig"]},{name:"U_label$ebnf$1$subexpression$1",symbols:["U_Ldh_str"]},{name:"U_label$ebnf$1",symbols:["U_label$ebnf$1$subexpression$1"],postprocess:e},{name:"U_label$ebnf$1",symbols:[],postprocess:()=>null},{name:"U_label",symbols:["U_Let_dig","U_label$ebnf$1"]},{name:"address_literal$subexpression$1",symbols:["IPv4_address_literal"]},{name:"address_literal$subexpression$1",symbols:["IPv6_address_literal"]},{name:"address_literal$subexpression$1",symbols:["General_address_literal"]},{name:"address_literal",symbols:[{literal:"["},"address_literal$subexpression$1",{literal:"]"}]},{name:"non_local_part",symbols:["Domain"],postprocess:function(l){return{DomainName:n(l[0])}}},{name:"non_local_part",symbols:["address_literal"],postprocess:function(l){return{AddressLiteral:n(l[0])}}},{name:"Mailbox",symbols:["Local_part",{literal:"@"},"non_local_part"],postprocess:function(l){return{localPart:n(l[0]),domainPart:n(l[2])}}},{name:"Local_part",symbols:["Dot_string"],postprocess:function(l){return{DotString:n(l[0])}}},{name:"Local_part",symbols:["Quoted_string"],postprocess:function(l){return{QuotedString:n(l[0])}}},{name:"Dot_string$ebnf$1",symbols:[]},{name:"Dot_string$ebnf$1$subexpression$1",symbols:[{literal:"."},"Atom"]},{name:"Dot_string$ebnf$1",symbols:["Dot_string$ebnf$1","Dot_string$ebnf$1$subexpression$1"],postprocess:l=>l[0].concat([l[1]])},{name:"Dot_string",symbols:["Atom","Dot_string$ebnf$1"]},{name:"Atom$ebnf$1",symbols:[/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/]},{name:"Atom$ebnf$1",symbols:["Atom$ebnf$1",/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/],postprocess:l=>l[0].concat([l[1]])},{name:"Atom",symbols:["Atom$ebnf$1"]},{name:"Quoted_string$ebnf$1",symbols:[]},{name:"Quoted_string$ebnf$1",symbols:["Quoted_string$ebnf$1","QcontentSMTP"],postprocess:l=>l[0].concat([l[1]])},{name:"Quoted_string",symbols:["DQUOTE","Quoted_string$ebnf$1","DQUOTE"]},{name:"QcontentSMTP",symbols:["qtextSMTP"]},{name:"QcontentSMTP",symbols:["quoted_pairSMTP"]},{name:"quoted_pairSMTP",symbols:[{literal:"\\"},/[\x20-\x7e]/]},{name:"qtextSMTP",symbols:[/[\x20-\x21\x23-\x5b\x5d-\x7e\u0080-\uFFFF]/],postprocess:e},{name:"IPv4_address_literal$macrocall$2",symbols:[{literal:"."},"Snum"]},{name:"IPv4_address_literal$macrocall$1",symbols:["IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2"]},{name:"IPv4_address_literal",symbols:["Snum","IPv4_address_literal$macrocall$1"]},{name:"IPv6_address_literal$subexpression$1",symbols:[/[iI]/,/[pP]/,/[vV]/,{literal:"6"},{literal:":"}],postprocess:function(l){return l.join("")}},{name:"IPv6_address_literal",symbols:["IPv6_address_literal$subexpression$1","IPv6_addr"]},{name:"General_address_literal$ebnf$1",symbols:["dcontent"]},{name:"General_address_literal$ebnf$1",symbols:["General_address_literal$ebnf$1","dcontent"],postprocess:l=>l[0].concat([l[1]])},{name:"General_address_literal",symbols:["Standardized_tag",{literal:":"},"General_address_literal$ebnf$1"]},{name:"Standardized_tag",symbols:["Ldh_str"]},{name:"dcontent",symbols:[/[\x21-\x5a\x5e-\x7e]/],postprocess:e},{name:"Snum",symbols:["DIGIT"]},{name:"Snum$subexpression$1",symbols:[/[1-9]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$1"]},{name:"Snum$subexpression$2",symbols:[{literal:"1"},"DIGIT","DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$2"]},{name:"Snum$subexpression$3",symbols:[{literal:"2"},/[0-4]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$3"]},{name:"Snum$subexpression$4",symbols:[{literal:"2"},{literal:"5"},/[0-5]/]},{name:"Snum",symbols:["Snum$subexpression$4"]},{name:"IPv6_addr",symbols:["IPv6_full"]},{name:"IPv6_addr",symbols:["IPv6_comp"]},{name:"IPv6_addr",symbols:["IPv6v4_full"]},{name:"IPv6_addr",symbols:["IPv6v4_comp"]},{name:"IPv6_hex",symbols:["HEXDIG"]},{name:"IPv6_hex$subexpression$1",symbols:["HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$1"]},{name:"IPv6_hex$subexpression$2",symbols:["HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$2"]},{name:"IPv6_hex$subexpression$3",symbols:["HEXDIG","HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$3"]},{name:"IPv6_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_full$macrocall$1",symbols:["IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2"]},{name:"IPv6_full",symbols:["IPv6_hex","IPv6_full$macrocall$1"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$1",symbols:["IPv6_comp$ebnf$1$subexpression$1"],postprocess:e},{name:"IPv6_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:l=>l.join("")},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$2$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$2",symbols:["IPv6_comp$ebnf$2$subexpression$1"],postprocess:e},{name:"IPv6_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6_comp",symbols:["IPv6_comp$ebnf$1","IPv6_comp$string$1","IPv6_comp$ebnf$2"]},{name:"IPv6v4_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_full$macrocall$1",symbols:["IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2"]},{name:"IPv6v4_full",symbols:["IPv6_hex","IPv6v4_full$macrocall$1",{literal:":"},"IPv4_address_literal"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6v4_comp$ebnf$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1"],postprocess:e},{name:"IPv6v4_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:l=>l.join("")},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",{literal:":"}]},{name:"IPv6v4_comp$ebnf$2",symbols:["IPv6v4_comp$ebnf$2$subexpression$1"],postprocess:e},{name:"IPv6v4_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp",symbols:["IPv6v4_comp$ebnf$1","IPv6v4_comp$string$1","IPv6v4_comp$ebnf$2","IPv4_address_literal"]},{name:"DIGIT",symbols:[/[0-9]/],postprocess:e},{name:"ALPHA_DIGIT_U",symbols:[/[0-9A-Za-z\u0080-\uFFFF]/],postprocess:e},{name:"ALPHA_DIGIT",symbols:[/[0-9A-Za-z]/],postprocess:e},{name:"ALPHA_DIG_DASH",symbols:[/[-0-9A-Za-z]/],postprocess:e},{name:"ALPHA_DIG_DASH_U",symbols:[/[-0-9A-Za-z\u0080-\uFFFF]/],postprocess:e},{name:"HEXDIG",symbols:[/[0-9A-Fa-f]/],postprocess:e},{name:"DQUOTE",symbols:[{literal:'"'}],postprocess:e}],ParserStart:"Reverse_path"};t.default=s}),Vn=B(function(t){var e=t&&t.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.canonicalize=t.canonicalize_quoted_string=t.normalize=t.normalize_dot_string=t.parse=void 0;var r=wc(),n=e($c());n.default.ParserStart="Mailbox";var s=r.Grammar.fromCompiled(n.default);function l(u){if(u.length>986)throw new Error("address too long");const $=new r.Parser(s);if($.feed(u),$.results.length!==1)throw new Error("address parsing failed: ambiguous grammar");const P=u.lastIndexOf("@"),b=u.substring(P+1);if(b[0]!=="["){if(b.length>253)throw new Error("domain too long");const E=b.split(".");if(E.length<2)throw new Error("domain not fully qualified");if(E[E.length-1].length<2)throw new Error("top level domain label too short");if(E.sort(function(_,o){return o.length-_.length}),E[0].length>63)throw new Error("domain label too long")}return $.results[0]}t.parse=l;function i(u){return function(){const P=u.indexOf("+");return P===-1?u:u.substr(0,P)}().replace(/\./g,"").toLowerCase()}t.normalize_dot_string=i;function c(u){var d,$;const P=l(u),b=(d=P.domainPart.AddressLiteral)!==null&&d!==void 0?d:P.domainPart.DomainName.toLowerCase();return`${($=P.localPart.QuotedString)!==null&&$!==void 0?$:i(P.localPart.DotString)}@${b}`}t.normalize=c;function a(u){return`"${u.substr(1).substr(0,u.length-2).replace(/(?:\\(.))/g,"$1").replace(/(?:(["\\]))/g,"\\$1")}"`}t.canonicalize_quoted_string=a;function f(u){var d;const $=l(u),P=(d=$.domainPart.AddressLiteral)!==null&&d!==void 0?d:$.domainPart.DomainName.toLowerCase();return`${$.localPart.QuotedString?a($.localPart.QuotedString):$.localPart.DotString}@${P}`}t.canonicalize=f}),bc=B(function(t,e){var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,i=function(d){return typeof Array.isArray=="function"?Array.isArray(d):n.call(d)==="[object Array]"},c=function(d){if(!d||n.call(d)!=="[object Object]")return!1;var $=r.call(d,"constructor"),P=d.constructor&&d.constructor.prototype&&r.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!$&&!P)return!1;var b;for(b in d);return typeof b>"u"||r.call(d,b)},a=function(d,$){s&&$.name==="__proto__"?s(d,$.name,{enumerable:!0,configurable:!0,value:$.newValue,writable:!0}):d[$.name]=$.newValue},f=function(d,$){if($==="__proto__")if(r.call(d,$)){if(l)return l(d,$).value}else return;return d[$]};e.exports=function u(){var d,$,P,b,E,_,o=arguments[0],v=1,h=arguments.length,y=!1;for(typeof o=="boolean"&&(y=o,o=arguments[1]||{},v=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});v<h;++v)if(d=arguments[v],d!=null)for($ in d)P=f(o,$),b=f(d,$),o!==b&&(y&&b&&(c(b)||(E=i(b)))?(E?(E=!1,_=P&&i(P)?P:[]):_=P&&c(P)?P:{},a(o,{name:$,newValue:u(y,_,b)})):typeof b<"u"&&a(o,{name:$,newValue:b}));return o}}),Ec=B(function(t,e){e.exports=[{scheme:"aaa",description:"Diameter Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6733"}]},{scheme:"aaas",description:"Diameter Protocol with Secure Transport",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6733"}]},{scheme:"about",description:"about",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6694"}]},{scheme:"acap",description:"application configuration access protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2244"}]},{scheme:"acct",description:"acct",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7565"}]},{scheme:"cap",description:"Calendar Access Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4324"}]},{scheme:"cid",description:"content identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2392"}]},{scheme:"coap",description:"coap",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7252"}]},{scheme:"coaps",description:"coaps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7252"}]},{scheme:"crid",description:"TV-Anytime Content Reference Identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4078"}]},{scheme:"data",description:"data",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2397"}]},{scheme:"dav",description:"dav",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4918"}]},{scheme:"dict",description:"dictionary service protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2229"}]},{scheme:"dns",description:"Domain Name System",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4501"}]},{scheme:"example",description:"example",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7595"}]},{scheme:"file",description:"Host-specific file names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"ftp",description:"File Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"geo",description:"Geographic Locations",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5870"}]},{scheme:"go",description:"go",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3368"}]},{scheme:"gopher",description:"The Gopher Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4266"}]},{scheme:"h323",description:"H.323",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3508"}]},{scheme:"http",description:"Hypertext Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7230"}]},{scheme:"https",description:"Hypertext Transfer Protocol Secure",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7230"}]},{scheme:"iax",description:"Inter-Asterisk eXchange Version 2",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5456"}]},{scheme:"icap",description:"Internet Content Adaptation Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3507"}]},{scheme:"im",description:"Instant Messaging",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3860"}]},{scheme:"imap",description:"internet message access protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5092"}]},{scheme:"info",description:`Information Assets with Identifiers in Public Namespaces.
34
+ (section 3) defines an "info" registry
35
+ of public namespaces, which is maintained by NISO and can be accessed
36
+ from .`,reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4452"}]},{scheme:"ipp",description:"Internet Printing Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3510"}]},{scheme:"ipps",description:"Internet Printing Protocol over HTTPS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7472"}]},{scheme:"iris",description:"Internet Registry Information Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3981"}]},{scheme:"iris.beep",description:"iris.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3983"}]},{scheme:"iris.lwz",description:"iris.lwz",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4993"}]},{scheme:"iris.xpc",description:"iris.xpc",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4992"}]},{scheme:"iris.xpcs",description:"iris.xpcs",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4992"}]},{scheme:"jabber",description:"jabber",reference:[],template:"http://www.iana.org/assignments/uri-schemes/perm/jabber"},{scheme:"ldap",description:"Lightweight Directory Access Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4516"}]},{scheme:"mailto",description:"Electronic mail address",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6068"}]},{scheme:"mid",description:"message identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2392"}]},{scheme:"msrp",description:"Message Session Relay Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4975"}]},{scheme:"msrps",description:"Message Session Relay Protocol Secure",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4975"}]},{scheme:"mtqp",description:"Message Tracking Query Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3887"}]},{scheme:"mupdate",description:"Mailbox Update (MUPDATE) Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3656"}]},{scheme:"news",description:"USENET news",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"nfs",description:"network file system protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2224"}]},{scheme:"ni",description:"ni",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6920"}]},{scheme:"nih",description:"nih",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6920"}]},{scheme:"nntp",description:"USENET news using NNTP access",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"opaquelocktoken",description:"opaquelocktokent",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4918"}]},{scheme:"pkcs11",description:"PKCS#11",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7512"}]},{scheme:"pop",description:"Post Office Protocol v3",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2384"}]},{scheme:"pres",description:"Presence",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3859"}]},{scheme:"reload",description:"reload",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6940"}]},{scheme:"rtsp",description:"Real-time Streaming Protocol (RTSP)",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"},{type:"draft",href:"http://www.iana.org/go/RFC-ietf-mmusic-rfc2326bis-40"}]},{scheme:"rtsps",description:"Real-time Streaming Protocol (RTSP) over TLS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"},{type:"draft",href:"http://www.iana.org/go/RFC-ietf-mmusic-rfc2326bis-40"}]},{scheme:"rtspu",description:"Real-time Streaming Protocol (RTSP) over unreliable datagram transport",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"}]},{scheme:"service",description:"service location",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2609"}]},{scheme:"session",description:"session",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6787"}]},{scheme:"shttp",description:"Secure Hypertext Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2660"}]},{scheme:"sieve",description:"ManageSieve Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5804"}]},{scheme:"sip",description:"session initiation protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3261"}]},{scheme:"sips",description:"secure session initiation protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3261"}]},{scheme:"sms",description:"Short Message Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5724"}]},{scheme:"snmp",description:"Simple Network Management Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4088"}]},{scheme:"soap.beep",description:"soap.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4227"}]},{scheme:"soap.beeps",description:"soap.beeps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4227"}]},{scheme:"stun",description:"stun",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7064"}]},{scheme:"stuns",description:"stuns",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7064"}]},{scheme:"tag",description:"tag",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4151"}]},{scheme:"tel",description:"telephone",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"telnet",description:"Reference to interactive sessions",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4248"}]},{scheme:"tftp",description:"Trivial File Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3617"}]},{scheme:"thismessage",description:"multipart/related relative reference resolution",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2557"}],template:"http://www.iana.org/assignments/uri-schemes/perm/thismessage"},{scheme:"tip",description:"Transaction Internet Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2371"}]},{scheme:"tn3270",description:"Interactive 3270 emulation sessions",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6270"}]},{scheme:"turn",description:"turn",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7065"}]},{scheme:"turns",description:"turns",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7065"}]},{scheme:"tv",description:"TV Broadcasts",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2838"}]},{scheme:"urn",description:"Uniform Resource Names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2141"},{type:"registry",href:"http://www.iana.org/assignments/urn-namespaces"}]},{scheme:"vemmi",description:"versatile multimedia interface",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2122"}]},{scheme:"vnc",description:"Remote Framebuffer Protocol",reference:[{type:"draft",href:"http://www.iana.org/go/RFC-warden-appsawg-vnc-scheme-10"}]},{scheme:"ws",description:"WebSocket connections",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6455"}]},{scheme:"wss",description:"Encrypted WebSocket connections",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6455"}]},{scheme:"xcon",description:"xcon",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6501"}]},{scheme:"xcon-userid",description:"xcon-userid",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6501"}]},{scheme:"xmlrpc.beep",description:"xmlrpc.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3529"}]},{scheme:"xmlrpc.beeps",description:"xmlrpc.beeps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3529"}]},{scheme:"xmpp",description:"Extensible Messaging and Presence Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5122"}]},{scheme:"z39.50r",description:"Z39.50 Retrieval",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]},{scheme:"z39.50s",description:"Z39.50 Session",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]}]}),Sc=B(function(t,e){e.exports=[{scheme:"acr",description:"acr",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/acr"},{scheme:"adiumxtra",description:"adiumxtra",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/adiumxtra"},{scheme:"afp",description:"afp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/afp"},{scheme:"afs",description:"Andrew File System global file names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"aim",description:"aim",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/aim"},{scheme:"appdata",description:"appdata",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/appdata"},{scheme:"apt",description:"apt",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/apt"},{scheme:"attachment",description:"attachment",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/attachment"},{scheme:"aw",description:"aw",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/aw"},{scheme:"barion",description:"barion",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/barion"},{scheme:"beshare",description:"beshare",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/beshare"},{scheme:"bitcoin",description:"bitcoin",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/bitcoin"},{scheme:"blob",description:"blob",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/blob"},{scheme:"bolo",description:"bolo",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/bolo"},{scheme:"callto",description:"callto",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/callto"},{scheme:"chrome",description:"chrome",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/chrome"},{scheme:"chrome-extension",description:"chrome-extension",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/chrome-extension"},{scheme:"com-eventbrite-attendee",description:"com-eventbrite-attendee",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/com-eventbrite-attendee"},{scheme:"content",description:"content",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/content"},{scheme:"cvs",description:"cvs",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/cvs"},{scheme:"dis",description:"dis",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dis"},{scheme:"dlna-playcontainer",description:"dlna-playcontainer",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dlna-playcontainer"},{scheme:"dlna-playsingle",description:"dlna-playsingle",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dlna-playsingle"},{scheme:"dntp",description:"dntp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dntp"},{scheme:"dtn",description:"DTNRG research and development",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5050"}]},{scheme:"dvb",description:"dvb",reference:[{type:"draft",href:"http://www.iana.org/go/draft-mcroberts-uri-dvb"}]},{scheme:"ed2k",description:"ed2k",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ed2k"},{scheme:"facetime",description:"facetime",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/facetime"},{scheme:"feed",description:"feed",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/feed"},{scheme:"feedready",description:"feedready",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/feedready"},{scheme:"finger",description:"finger",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/finger"},{scheme:"fish",description:"fish",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/fish"},{scheme:"gg",description:"gg",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gg"},{scheme:"git",description:"git",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/git"},{scheme:"gizmoproject",description:"gizmoproject",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gizmoproject"},{scheme:"gtalk",description:"gtalk",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gtalk"},{scheme:"ham",description:"ham",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7046"}]},{scheme:"hcp",description:"hcp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/hcp"},{scheme:"icon",description:"icon",reference:[{type:"draft",href:"http://www.iana.org/go/draft-lafayette-icon-uri-scheme"}]},{scheme:"iotdisco",description:"iotdisco",reference:[{type:"uri",href:"http://www.iana.org/assignments/uri-schemes/prov/iotdisco.pdf"}],template:"http://www.iana.org/assignments/uri-schemes/prov/iotdisco"},{scheme:"ipn",description:"ipn",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6260"}]},{scheme:"irc",description:"irc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/irc"},{scheme:"irc6",description:"irc6",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/irc6"},{scheme:"ircs",description:"ircs",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ircs"},{scheme:"isostore",description:"isostore",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/isostore"},{scheme:"itms",description:"itms",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/itms"},{scheme:"jar",description:"jar",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/jar"},{scheme:"jms",description:"Java Message Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6167"}]},{scheme:"keyparc",description:"keyparc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/keyparc"},{scheme:"lastfm",description:"lastfm",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/lastfm"},{scheme:"ldaps",description:"ldaps",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ldaps"},{scheme:"magnet",description:"magnet",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/magnet"},{scheme:"maps",description:"maps",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/maps"},{scheme:"market",description:"market",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/market"},{scheme:"message",description:"message",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/message"},{scheme:"mms",description:"mms",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mms"},{scheme:"ms-access",description:"ms-access",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-access"},{scheme:"ms-drive-to",description:"ms-drive-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-drive-to"},{scheme:"ms-enrollment",description:"ms-enrollment",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-enrollment"},{scheme:"ms-excel",description:"ms-excel",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-excel"},{scheme:"ms-getoffice",description:"ms-getoffice",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-getoffice"},{scheme:"ms-help",description:"ms-help",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-help"},{scheme:"ms-infopath",description:"ms-infopath",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-infopath"},{scheme:"ms-media-stream-id",description:"ms-media-stream-id",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-media-stream-id"},{scheme:"ms-powerpoint",description:"ms-powerpoint",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-powerpoint"},{scheme:"ms-project",description:"ms-project",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-project"},{scheme:"ms-publisher",description:"ms-publisher",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-publisher"},{scheme:"ms-search-repair",description:"ms-search-repair",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-search-repair"},{scheme:"ms-secondary-screen-controller",description:"ms-secondary-screen-controller",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-secondary-screen-controller"},{scheme:"ms-secondary-screen-setup",description:"ms-secondary-screen-setup",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-secondary-screen-setup"},{scheme:"ms-settings",description:"ms-settings",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings"},{scheme:"ms-settings-airplanemode",description:"ms-settings-airplanemode",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-airplanemode"},{scheme:"ms-settings-bluetooth",description:"ms-settings-bluetooth",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-bluetooth"},{scheme:"ms-settings-camera",description:"ms-settings-camera",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-camera"},{scheme:"ms-settings-cellular",description:"ms-settings-cellular",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-cellular"},{scheme:"ms-settings-cloudstorage",description:"ms-settings-cloudstorage",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-cloudstorage"},{scheme:"ms-settings-connectabledevices",description:"ms-settings-connectabledevices",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-connectabledevices"},{scheme:"ms-settings-displays-topology",description:"ms-settings-displays-topology",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-displays-topology"},{scheme:"ms-settings-emailandaccounts",description:"ms-settings-emailandaccounts",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-emailandaccounts"},{scheme:"ms-settings-language",description:"ms-settings-language",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-language"},{scheme:"ms-settings-location",description:"ms-settings-location",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-location"},{scheme:"ms-settings-lock",description:"ms-settings-lock",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-lock"},{scheme:"ms-settings-nfctransactions",description:"ms-settings-nfctransactions",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-nfctransactions"},{scheme:"ms-settings-notifications",description:"ms-settings-notifications",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-notifications"},{scheme:"ms-settings-power",description:"ms-settings-power",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-power"},{scheme:"ms-settings-privacy",description:"ms-settings-privacy",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-privacy"},{scheme:"ms-settings-proximity",description:"ms-settings-proximity",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-proximity"},{scheme:"ms-settings-screenrotation",description:"ms-settings-screenrotation",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-screenrotation"},{scheme:"ms-settings-wifi",description:"ms-settings-wifi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-wifi"},{scheme:"ms-settings-workplace",description:"ms-settings-workplace",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-workplace"},{scheme:"ms-spd",description:"ms-spd",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-spd"},{scheme:"ms-transit-to",description:"ms-transit-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-transit-to"},{scheme:"ms-visio",description:"ms-visio",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-visio"},{scheme:"ms-walk-to",description:"ms-walk-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-walk-to"},{scheme:"ms-word",description:"ms-word",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-word"},{scheme:"msnim",description:"msnim",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/msnim"},{scheme:"mumble",description:"mumble",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mumble"},{scheme:"mvn",description:"mvn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mvn"},{scheme:"notes",description:"notes",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/notes"},{scheme:"oid",description:"oid",reference:[{type:"draft",href:"http://www.iana.org/go/draft-larmouth-oid-iri"}],template:"http://www.iana.org/assignments/uri-schemes/prov/oid"},{scheme:"palm",description:"palm",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/palm"},{scheme:"paparazzi",description:"paparazzi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/paparazzi"},{scheme:"platform",description:"platform",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/platform"},{scheme:"proxy",description:"proxy",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/proxy"},{scheme:"psyc",description:"psyc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/psyc"},{scheme:"query",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/query"},{scheme:"redis",description:"redis",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/redis"},{scheme:"rediss",description:"rediss",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rediss"},{scheme:"res",description:"res",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/res"},{scheme:"resource",description:"resource",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/resource"},{scheme:"rmi",description:"rmi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rmi"},{scheme:"rsync",description:"rsync",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5781"}]},{scheme:"rtmfp",description:"rtmfp",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7425"}],template:"http://www.iana.org/assignments/uri-schemes/prov/rtmfp"},{scheme:"rtmp",description:"rtmp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rtmp"},{scheme:"secondlife",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/secondlife"},{scheme:"sftp",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/sftp"},{scheme:"sgn",description:"sgn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/sgn"},{scheme:"skype",description:"skype",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/skype"},{scheme:"smb",description:"smb",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/smb"},{scheme:"smtp",description:"smtp",reference:[{type:"draft",href:"http://www.iana.org/go/draft-melnikov-smime-msa-to-mda"}],template:"http://www.iana.org/assignments/uri-schemes/prov/smtp"},{scheme:"soldat",description:"soldat",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/soldat"},{scheme:"spotify",description:"spotify",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/spotify"},{scheme:"ssh",description:"ssh",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ssh"},{scheme:"steam",description:"steam",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/steam"},{scheme:"submit",description:"submit",reference:[{type:"draft",href:"http://www.iana.org/go/draft-melnikov-smime-msa-to-mda"}],template:"http://www.iana.org/assignments/uri-schemes/prov/submit"},{scheme:"svn",description:"svn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/svn"},{scheme:"teamspeak",description:"teamspeak",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/teamspeak"},{scheme:"teliaeid",description:"teliaeid",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/teliaeid"},{scheme:"things",description:"things",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/things"},{scheme:"tool",description:"tool",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/tool"},{scheme:"udp",description:"udp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/udp"},{scheme:"unreal",description:"unreal",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/unreal"},{scheme:"ut2004",description:"ut2004",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ut2004"},{scheme:"v-event",description:"v-event",reference:[{type:"draft",href:"http://www.iana.org/go/draft-menderico-v-event-uri"}],template:"http://www.iana.org/assignments/uri-schemes/prov/v-event"},{scheme:"ventrilo",description:"ventrilo",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ventrilo"},{scheme:"view-source",description:"view-source",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/view-source"},{scheme:"webcal",description:"webcal",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/webcal"},{scheme:"wpid",description:"wpid",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wpid"},{scheme:"wtai",description:"wtai",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wtai"},{scheme:"wyciwyg",description:"wyciwyg",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wyciwyg"},{scheme:"xfire",description:"xfire",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/xfire"},{scheme:"xri",description:"xri",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/xri"},{scheme:"ymsgr",description:"ymsgr",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ymsgr"}]}),Pc=B(function(t,e){e.exports=[{scheme:"fax",description:"fax",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2806"},{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"filesystem",description:"filesystem",reference:[],template:"http://www.iana.org/assignments/uri-schemes/historic/filesystem"},{scheme:"mailserver",description:"Access to data available from mail servers",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6196"}]},{scheme:"modem",description:"modem",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2806"},{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"pack",description:"pack",reference:[{type:"draft",href:"http://www.iana.org/go/draft-shur-pack-uri-scheme"}],template:"http://www.iana.org/assignments/uri-schemes/historic/pack"},{scheme:"prospero",description:"Prospero Directory Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4157"}]},{scheme:"snews",description:"NNTP over SSL/TLS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"videotex",description:"videotex",reference:[{type:"draft",href:"http://www.iana.org/go/draft-mavrakis-videotex-url-spec"},{type:"rfc",href:"http://www.iana.org/go/rfc2122"},{type:"rfc",href:"http://www.iana.org/go/rfc3986"}],template:"http://www.iana.org/assignments/uri-schemes/historic/videotex"},{scheme:"wais",description:"Wide Area Information Servers",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4156"}]},{scheme:"z39.50",description:"Z39.50 information access",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"},{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]}]}),kc=B(function(t,e){e.exports=[{scheme:"android-app"},{scheme:"webpack"},{scheme:"s3",description:"Amazon Web Services S3 bucket"},{scheme:"gs",description:"Google Cloud Storage"},{scheme:"mqtt",description:"Message Queuing Telemetry Transport Protocol"},{scheme:"modbus+tcp",description:"Modbus over TCP"}]}),xs=B(function(t,e){var r=bc(),n={permanent:Ec(),provosional:Sc(),historical:Pc()},s={};Object.keys(n).forEach(function(l){n[l].forEach(function(i){s[i.scheme]=r(i,{type:l})})}),n.unofficial=kc().filter(function(l){return!s[l.scheme]}),n.unofficial.forEach(function(l){s[l.scheme]=r(l,{type:"unofficial"})}),e.exports=r(n,{allByName:s})}),Oc=B(function(t,e){var{parse:r}=qn(),{addressParser:n}=Vn(),s=xs();function l(i){try{return n(i),!0}catch{return!1}}e.exports=i=>{const c=r(i);return!!(c.scheme==="mailto"&&c.to.every(l)||c.reference==="absolute"&&s.allByName[c.scheme])}}),Nc=B(function(t,e){e.exports=/^P(?!$)(\d+(?:\.\d+)?Y)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?W)?(\d+(?:\.\d+)?D)?(T(?=\d)(\d+(?:\.\d+)?H)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?S)?)?$/}),Tc=B(function(t,e){var{parse:r}=Vn();e.exports=n=>{try{return r(n),!0}catch{return!1}}}),Rc={};function Bs(t){return this[t]}function Ic(t,e){this[t]=Mc.bind(null,e)}var Hs,Ks,dr,Un,zn,Cc=(t,e,r)=>{var n=Un(e);for(let s of n)!zn.call(t,s)&&s!=="default"&&dr(t,s,{get:Bs.bind(e,s),enumerable:!0})},Ac,os=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var s=Ac??(Ac=new WeakMap),l=s.get(t);if(l)return l}r=t!=null?Hs(Ks(t)):{};let i=e||!t||!t.__esModule?dr(r,"default",{value:t,enumerable:!0}):r;for(let c of Un(t))zn.call(i,c)||dr(i,c,{get:Bs.bind(t,c),enumerable:!0});return n&&s.set(t,i),i},jc=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Mc=t=>t,Dc=(t,e)=>{for(var r in e)dr(t,r,{get:e[r],enumerable:!0,configurable:!0,set:Ic.bind(e,r)})},on,cn,ln,qc,Lc=ja(()=>{Hs=Object.create,{getPrototypeOf:Ks,defineProperty:dr,getOwnPropertyNames:Un}=Object,zn=Object.prototype.hasOwnProperty,on=jc((t,e)=>{var r=/^xn--/,n=/[^\0-\x7F]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},i=Math.floor,c=String.fromCharCode;function a(w){throw RangeError(l[w])}function f(w,g){let p=[],S=w.length;for(;S--;)p[S]=g(w[S]);return p}function u(w,g){let p=w.split("@"),S="";p.length>1&&(S=p[0]+"@",w=p[1]),w=w.replace(s,".");let O=w.split("."),j=f(O,g).join(".");return S+j}function d(w){let g=[],p=0,S=w.length;for(;p<S;){let O=w.charCodeAt(p++);if(O>=55296&&O<=56319&&p<S){let j=w.charCodeAt(p++);(j&64512)==56320?g.push(((O&1023)<<10)+(j&1023)+65536):(g.push(O),p--)}else g.push(O)}return g}var $=w=>String.fromCodePoint(...w),P=function(w){return w>=48&&w<58?26+(w-48):w>=65&&w<91?w-65:w>=97&&w<123?w-97:36},b=function(w,g){return w+22+75*(w<26)-((g!=0)<<5)},E=function(w,g,p){let S=0;for(w=p?i(w/700):w>>1,w+=i(w/g);w>455;S+=36)w=i(w/35);return i(S+36*w/(w+38))},_=function(w){let g=[],p=w.length,S=0,O=128,j=72,z=w.lastIndexOf("-");z<0&&(z=0);for(let V=0;V<z;++V)w.charCodeAt(V)>=128&&a("not-basic"),g.push(w.charCodeAt(V));for(let V=z>0?z+1:0;V<p;){let X=S;for(let ee=1,he=36;;he+=36){V>=p&&a("invalid-input");let Ee=P(w.charCodeAt(V++));Ee>=36&&a("invalid-input"),Ee>i((2147483647-S)/ee)&&a("overflow"),S+=Ee*ee;let Ce=he<=j?1:he>=j+26?26:he-j;if(Ee<Ce)break;let ce=36-Ce;ee>i(2147483647/ce)&&a("overflow"),ee*=ce}let W=g.length+1;j=E(S-X,W,X==0),i(S/W)>2147483647-O&&a("overflow"),O+=i(S/W),S%=W,g.splice(S++,0,O)}return String.fromCodePoint(...g)},o=function(w){let g=[];w=d(w);let p=w.length,S=128,O=0,j=72;for(let X of w)X<128&&g.push(c(X));let z=g.length,V=z;for(z&&g.push("-");V<p;){let X=2147483647;for(let ee of w)ee>=S&&ee<X&&(X=ee);let W=V+1;X-S>i((2147483647-O)/W)&&a("overflow"),O+=(X-S)*W,S=X;for(let ee of w)if(ee<S&&++O>2147483647&&a("overflow"),ee===S){let he=O;for(let Ee=36;;Ee+=36){let Ce=Ee<=j?1:Ee>=j+26?26:Ee-j;if(he<Ce)break;let ce=he-Ce,x=36-Ce;g.push(c(b(Ce+ce%x,0))),he=i(ce/x)}g.push(c(b(he,0))),j=E(O,W,V===z),O=0,++V}++O,++S}return g.join("")},v=function(w){return u(w,function(g){return r.test(g)?_(g.slice(4).toLowerCase()):g})},h=function(w){return u(w,function(g){return n.test(g)?"xn--"+o(g):g})},y={version:"2.3.1",ucs2:{decode:d,encode:$},decode:_,encode:o,toASCII:h,toUnicode:v};e.exports=y}),cn={},Dc(cn,{default:()=>ln.default}),Cc(cn,os(on(),1)),ln=os(on(),1),qc=ln.default}),Vc=B(function(t,e){var{toASCII:r}=(Lc(),Aa(Rc)),n=/^(?=.{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;e.exports=s=>{const l=r(s);return l.replace(/\.$/,"").length<=253&&n.test(l)}}),Uc=B(function(t,e){var{parse:r}=qn(),{addressParser:n}=Vn(),s=xs();function l(i){try{return n(i),!0}catch{return!1}}e.exports=i=>{const c=r(i);return c.scheme==="mailto"&&c.to.every(l)||c.reference==="absolute"&&c.path!==void 0&&s.allByName[c.scheme]?!0:c.scheme&&!s.allByName[c.scheme]?!1:c.path!==void 0&&(c.reference==="relative"||c.reference==="same-document"||c.reference==="uri")}}),zc=B(function(t,e){t.iri=Oc(),t.duration=Nc(),t["idn-email"]=Tc(),t["idn-hostname"]=Vc(),t["iri-reference"]=Uc()}),Fc=B(function(t,e){var r=zc();e.exports=(n,s={})=>{const l=Object.keys(r);let i=l;if(s.formats){if(!Array.isArray(s.formats))throw new Error("options.formats must be an array");i=s.formats}return l.filter(c=>i.includes(c)).forEach(c=>{n.addFormat(c,r[c])}),n}}),xc=B(function(t,e){var r=Object.prototype.hasOwnProperty,n="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(n=!1));function l(f,u,d){this.fn=f,this.context=u,this.once=d||!1}function i(f,u,d,$,P){if(typeof d!="function")throw new TypeError("The listener must be a function");var b=new l(d,$||f,P),E=n?n+u:u;return f._events[E]?f._events[E].fn?f._events[E]=[f._events[E],b]:f._events[E].push(b):(f._events[E]=b,f._eventsCount++),f}function c(f,u){--f._eventsCount===0?f._events=new s:delete f._events[u]}function a(){this._events=new s,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],d,$;if(this._eventsCount===0)return u;for($ in d=this._events)r.call(d,$)&&u.push(n?$.slice(1):$);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},a.prototype.listeners=function(u){var d=n?n+u:u,$=this._events[d];if(!$)return[];if($.fn)return[$.fn];for(var P=0,b=$.length,E=new Array(b);P<b;P++)E[P]=$[P].fn;return E},a.prototype.listenerCount=function(u){var d=n?n+u:u,$=this._events[d];return $?$.fn?1:$.length:0},a.prototype.emit=function(u,d,$,P,b,E){var _=n?n+u:u;if(!this._events[_])return!1;var o=this._events[_],v=arguments.length,h,y;if(o.fn){switch(o.once&&this.removeListener(u,o.fn,void 0,!0),v){case 1:return o.fn.call(o.context),!0;case 2:return o.fn.call(o.context,d),!0;case 3:return o.fn.call(o.context,d,$),!0;case 4:return o.fn.call(o.context,d,$,P),!0;case 5:return o.fn.call(o.context,d,$,P,b),!0;case 6:return o.fn.call(o.context,d,$,P,b,E),!0}for(y=1,h=new Array(v-1);y<v;y++)h[y-1]=arguments[y];o.fn.apply(o.context,h)}else{var w=o.length,g;for(y=0;y<w;y++)switch(o[y].once&&this.removeListener(u,o[y].fn,void 0,!0),v){case 1:o[y].fn.call(o[y].context);break;case 2:o[y].fn.call(o[y].context,d);break;case 3:o[y].fn.call(o[y].context,d,$);break;case 4:o[y].fn.call(o[y].context,d,$,P);break;default:if(!h)for(g=1,h=new Array(v-1);g<v;g++)h[g-1]=arguments[g];o[y].fn.apply(o[y].context,h)}}return!0},a.prototype.on=function(u,d,$){return i(this,u,d,$,!1)},a.prototype.once=function(u,d,$){return i(this,u,d,$,!0)},a.prototype.removeListener=function(u,d,$,P){var b=n?n+u:u;if(!this._events[b])return this;if(!d)return c(this,b),this;var E=this._events[b];if(E.fn)E.fn===d&&(!P||E.once)&&(!$||E.context===$)&&c(this,b);else{for(var _=0,o=[],v=E.length;_<v;_++)(E[_].fn!==d||P&&!E[_].once||$&&E[_].context!==$)&&o.push(E[_]);o.length?this._events[b]=o.length===1?o[0]:o:c(this,b)}return this},a.prototype.removeAllListeners=function(u){var d;return u?(d=n?n+u:u,this._events[d]&&c(this,d)):(this._events=new s,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,typeof e<"u"&&(e.exports=a)}),Bc="https://www.w3.org/ns/activitystreams",Hc="https://sockethub.org/ns/context/v1.jsonld",Kc="error",Gc="https://sockethub.org/ns/context/platform/error/v1.jsonld",Wc="sockethub:internal",Jc="https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld",Fn=new Map,Gs=new Map,Ws=new Map;function Qc(t){return Array.isArray(t)?t.filter(e=>typeof e=="string"):[]}function Xc(t){return Qc(t["@context"])}function Js(t,e,r,n){Fn.set(e,t),Gs.set(e,r),Ws.set(e,n)}function Gr(t){const r=Xc(t).filter(n=>Fn.has(n));return r.length!==1?null:r[0]}function Qs(t){return Fn.get(t)}function Yc(t){return Gs.get(t)}function Zc(t){return Ws.get(t)}var el=er(An());new el.default({strictTypes:!1,allErrors:!0});var Xs={feed:{required:["id","type"],additionalProperties:!0,properties:{type:{enum:["feed"]},id:{type:"string",format:"iri"},name:{type:"string"},description:{type:"string"},author:{type:"string"},favicon:{type:"string"}}},person:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["person"]},name:{type:"string"}}},room:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["room"]},name:{type:"string"}}},service:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["service"]},name:{type:"string"}}},platform:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["platform"]},name:{type:"string"}}},website:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string",format:"iri"},type:{enum:["website"]},name:{type:"string"}}},address:{required:["type"],additionalProperties:!1,properties:{type:{enum:["address"]}}},calendar:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string",format:"iri"},type:{enum:["calendar"]},name:{type:"string"},components:{type:"array",items:{enum:["event","task"]}}}},addressBook:{required:["id","type"],additionalProperties:!1,properties:{id:{type:"string",format:"iri"},type:{enum:["addressBook"]}}}},tl=Object.keys(Xs),Ys=["person","room","service","feed","website","platform"],Zs=["person","room","service","feed","website","platform","address","calendar","addressBook"],rl=Ys.map(t=>({$ref:`#/definitions/type/${t}`})),nl=Zs.map(t=>({$ref:`#/definitions/type/${t}`})),sl={type:"array",minItems:3,maxItems:3,items:{type:"string"},allOf:[{contains:{const:Bc}},{contains:{const:Hc}}]},il={type:"string"},al={$id:"https://sockethub.org/schemas/v/activity-stream.json",description:"Schema for Sockethub Activity Streams",type:"object",required:["@context","type","actor"],additionalProperties:!1,properties:{"@context":sl,id:{type:"string"},type:il,actor:{type:"object",oneOf:rl},target:{type:"object",oneOf:nl},object:{type:"object"},published:{type:"string",format:"date-time"}},definitions:{type:Xs}},ol={version:"3.0.0-alpha.25"};function cl(t,e){return t.replace("/v/",`/${e}/`)}var ll={$id:"https://sockethub.org/schemas/v/sockethub-config.json"};cl(ll.$id,ol.version);var ul=er(An());new ul.default({strictTypes:!1,allErrors:!0});var fl=er(An()),dl=er(_c()),hl=er(Fc());function pl(t){let e=`${t.instancePath?t.instancePath:"activity stream"}: ${t.message}`;return t.keyword==="additionalProperties"?e+=`: ${t.params.additionalProperty}`:t.keyword==="enum"&&(e+=`: ${t.params.allowedValues.join(", ")}`),e}function lr(t){const e=[];t!=null&&t.type&&e.push(t.type);const r=t;for(const n in r){const s=r[n];s&&typeof s=="object"&&"type"in s&&e.push(...lr(s))}return e}function ml(t){const e=t.schemaPath.match(/#\/\w+\/\w+\/([\w-]+)\//);return e?e[1]:void 0}function gl(t){const e=t.instancePath.match(/\/(\w+)/);return e?e[1]:void 0}function yl(t,e){const r=ml(t),n=gl(t);if(!n)return-1;const s=e[n];return!s||!r||!s.includes(r)?-1:t.instancePath.split("/").length}function vl(t){if(!Array.isArray(t["@context"]))return{actor:[],target:[],object:lr(t)};const e=t;return{actor:lr(e.actor),target:lr(e.target),object:e.object?lr(e.object):[]}}function _l(t,e,r){const n=vl(t);let s=0,l=-1;for(let i=0;i<e.length;i++){const c=yl(e[i],n);c>l&&(l=c,s=i)}return l>=0?pl(e[s]):$l(e[e.length-1],r)}function wl(t,e){if(!(e!=null&&e.excludeTypes)||e.excludeTypes.length===0)return t;const r=new Set(e.excludeTypes);return t.filter(n=>!r.has(n))}function $l(t,e){let r;if(t.keyword==="oneOf"){const n=t.instancePath.split("/")[1],s=n==="actor"?Ys:n==="target"?Zs:tl,l=wl(s,e),i=l.length>0?l:s;r=`${t.instancePath}: ${t.message}: ${i.join(", ")}`}else r=`${t.instancePath?t.instancePath:"activity stream"}: ${t.message}`;return"additionalProperty"in t.params&&(r+=`: ${t.params.additionalProperty}`),r}var jt=new fl.default({strictTypes:!1,allErrors:!0});dl.default(jt);hl.default(jt);var Mt="https://sockethub.org/schemas/v0",$n={},bl={},cs=!1;$n[`${Mt}/activity-stream`]=al;for(const t in $n)jt.addSchema($n[t],t);function ls(t,e){Js(t,e,`${Mt}/context/${t}/messages`,`${Mt}/context/${t}/credentials`);const r=`${Mt}/context/${t}/messages`;jt.getSchema(r)||jt.addSchema({},r);const n=`${Mt}/context/${t}/credentials`;jt.getSchema(n)||jt.addSchema({},n)}function El(){cs||(ls(Kc,Gc),ls(Wc,Jc),cs=!0)}El();function Lr(t,e){const r=jt.getSchema(t);if(!r)return`schema ${t} not found`;if(!r(e)){let s=_l(e,r.errors,bl);if(Array.isArray(e["@context"])){const l=Gr(e);if(l){const i=Qs(l);i&&(s=`[${i}] ${s}`)}}return s}return""}function Sl(t){const e=Lr(`${Mt}/activity-stream`,t);if(e)return e;const r=Gr(t);if(!r)return"activity streams must have exactly one registered platform context URL in @context";const n=Yc(r);return n?Lr(n,t):`platform context URL ${r} does not have a registered message schema`}function Pl(t){if(!Array.isArray(t["@context"]))return"credential activity streams must have an @context set";if(t.type!=="credentials")return"credential activity streams must have credentials set as type";const e=Lr(`${Mt}/activity-stream`,t);if(e)return e;const r=Gr(t);if(!r)return"credential activity streams must have exactly one registered platform context URL in @context";const n=Zc(r);return n?Lr(n,t):`platform context URL ${r} does not have a registered credentials schema`}function us(t,e){const r=`${Mt}/context/${e}`;jt.getSchema(r)||jt.addSchema(t,r)}function kl(t,e){Js(t,e,`${Mt}/context/${t}/messages`,`${Mt}/context/${t}/credentials`)}function Ol(t){const e=Gr(t);return e?Qs(e)??null:null}var fs={actor:"id",target:"id",object:"content"};function Nl(t,e){return typeof t=="string"?{[e]:t}:Array.isArray(t)?t.map(r=>typeof r=="string"?{id:r}:r):t}function un(t){const e={...t};for(const r of Object.keys(fs))r in e&&(e[r]=Nl(e[r],fs[r]));return e}var Tl=er(xc()),Rl=Tl.default,Il=/^v?(\d+)(?:\.\d+){0,2}(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;function ar(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function ds(t){return typeof t=="number"&&Number.isSafeInteger(t)&&t>=0}function hs(t){if(!t||typeof t!="object")return;const{apiVersion:e,version:r}=t;if(ds(e))return e;if(typeof r=="string"){const n=Il.exec(r.trim()),s=n?Number(n[1]):void 0;if(ds(s))return s}}class hr{constructor(e,r={}){nt(this,"events",{credentials:new Map,connect:new Map,join:new Map});nt(this,"_socket");nt(this,"socket");nt(this,"debug",!0);nt(this,"options");nt(this,"platformRegistry",new Map);nt(this,"asContextUrl");nt(this,"sockethubContextUrl");nt(this,"apiVersion");nt(this,"initState","idle");nt(this,"hasReadyOnce",!1);nt(this,"initCycle");nt(this,"initTokenCounter",0);nt(this,"initTimeoutTimer");nt(this,"waitingWarningTimer");nt(this,"waitingWarningIntervalMs",1e4);nt(this,"readyWaiters",[]);nt(this,"outboundQueue",[]);nt(this,"outboundSequence",0);nt(this,"registryFingerprint");nt(this,"latestReadyInfo");if(!e)throw new Error("SockethubClient requires a socket.io instance");this._socket=e,this.options={initTimeoutMs:r.initTimeoutMs??5e3,maxQueuedOutbound:r.maxQueuedOutbound??1e3,maxQueuedAgeMs:r.maxQueuedAgeMs??3e4},this.socket=this.createPublicEmitter(),this.registerSocketIOHandlers(),this._socket.connected&&(this.socket.connected=!0,this.socket.id=this._socket.id,this.socket._emit("connect"),this.startInitialization("initial-connect",!0))}clearCredentials(){this.events.credentials.clear()}getRegisteredPlatforms(){return Array.from(this.platformRegistry.values()).map(e=>({...e,types:[...e.types],schemas:{...e.schemas}}))}isSchemasReady(){return this.isReady()}isReady(){return this.initState==="ready"}getInitState(){return this.initState}getRegisteredBaseContexts(){if(!this.asContextUrl||!this.sockethubContextUrl)throw new Error("Schema registry not loaded yet. Wait for client ready state after connect.");return{as:this.asContextUrl,sockethub:this.sockethubContextUrl}}getPlatformSchema(e,r="messages"){var s,l;const n=e==null?void 0:e.trim();if(n)return(l=(s=this.platformRegistry.get(n))==null?void 0:s.schemas)==null?void 0:l[r]}async waitForSchemas(e=2e3){return await this.ready(e),this.buildPlatformRegistryPayload()}ready(e=this.options.initTimeoutMs){return this.isReady()&&this.latestReadyInfo?Promise.resolve(this.latestReadyInfo):new Promise((r,n)=>{const s={resolve:r,reject:n};e>0&&(s.timer=setTimeout(()=>{this.readyWaiters=this.readyWaiters.filter(l=>l!==s),n(new Error(`SockethubClient ready() timed out after ${e}ms`))},e)),this.readyWaiters.push(s),this.socket.connected&&this.initState==="idle"&&this.startInitialization(this.hasReadyOnce?"reconnect":"initial-connect",!0)})}validateActivity(e){return e.type==="credentials"?Pl(e):Sl(e)}contextFor(e){if(typeof e!="string"||e.trim().length===0)throw new Error("SockethubClient.contextFor(platform) requires a non-empty platform string");if(!this.asContextUrl||!this.sockethubContextUrl)throw new Error("Schema registry not loaded yet. Wait for client ready state after connect.");const r=e.trim(),n=this.platformRegistry.get(r);if(!n){const s=Array.from(this.platformRegistry.keys()).sort();throw new Error(`unknown platform '${r}'. Registered platforms: ${s.join(", ")}`)}return[this.asContextUrl,this.sockethubContextUrl,n.contextUrl]}createPublicEmitter(){const e=new Rl;return e._emit=e.emit,e.emit=(r,n,s)=>{this.handlePublicEmit(r,n,s)},e.connected=!1,e.disconnect=()=>{this._socket.disconnect()},e.connect=()=>{this._socket.connect()},e}requestSchemaRegistry(){"io"in this._socket&&this._socket.emit("schemas",this.registryFingerprint,r=>{this.handleSchemasPayload(r)})}applyPlatformRegistry(e){var c,a;if(!e||typeof e!="object")return;const r=e,n=(c=r.contexts)==null?void 0:c.as,s=(a=r.contexts)==null?void 0:a.sockethub;if(typeof n!="string"||typeof s!="string"||!Array.isArray(r.platforms))return;const l=hs(r);if(l===void 0)return;this.apiVersion=l,this.asContextUrl=n,this.sockethubContextUrl=s,this.platformRegistry.clear();for(const f of r.platforms){if(!f||typeof f!="object"||typeof f.id!="string"||typeof f.contextUrl!="string"||typeof f.contextVersion!="string"||typeof f.schemaVersion!="string")continue;const u=hs(f);if(u===void 0)continue;const d=ar(f.schemas)?f.schemas:{};this.platformRegistry.set(f.id,{id:f.id,apiVersion:u,contextUrl:f.contextUrl,contextVersion:f.contextVersion,schemaVersion:f.schemaVersion,types:Array.isArray(f.types)?f.types.filter($=>typeof $=="string"):[],schemas:{credentials:ar(d.credentials)?d.credentials:void 0,messages:ar(d.messages)?d.messages:void 0}}),kl(f.id,f.contextUrl);try{ar(d.credentials)&&us(d.credentials,`${f.id}/credentials`),ar(d.messages)&&us(d.messages,`${f.id}/messages`)}catch($){const P=$ instanceof Error?$.message:String($);console.warn(`[SockethubClient] Failed to register schemas for platform ${f.id}: ${P}`)}}const i=this.buildPlatformRegistryPayload();return this.registryFingerprint=typeof r.fingerprint=="string"?r.fingerprint:void 0,this.socket._emit("schemas",i),i}eventCredentials(e){e.object&&e.object.type==="credentials"&&this.events.credentials.set(hr.getKey(e),e)}eventMessage(e){if(!this._socket.connected)return;const r=hr.getKey(e);e.type==="join"||e.type==="connect"?this.events[e.type].set(r,e):e.type==="leave"?this.events.join.delete(r):e.type==="disconnect"&&this.events.connect.delete(r)}static getKey(e){var l;const r=((l=e.actor)==null?void 0:l.id)||e.actor;if(!r)throw new Error(`actor property not present for message type: ${e==null?void 0:e.type}`);const n=e.target?e.target.id||e.target:"";return`${Ol(e)??""}:${r}-${n}`}buildPlatformRegistryPayload(){return{apiVersion:this.apiVersion,contexts:this.asContextUrl&&this.sockethubContextUrl?{as:this.asContextUrl,sockethub:this.sockethubContextUrl}:void 0,platforms:this.getRegisteredPlatforms()}}buildReadyInfo(e){if(!(this.apiVersion===void 0||!this.asContextUrl||!this.sockethubContextUrl))return{state:"ready",reason:e,apiVersion:this.apiVersion,contexts:{as:this.asContextUrl,sockethub:this.sockethubContextUrl},platforms:this.getRegisteredPlatforms().map(r=>({id:r.id,apiVersion:r.apiVersion,contextUrl:r.contextUrl,contextVersion:r.contextVersion,schemaVersion:r.schemaVersion,types:[...r.types]}))}}resolveReadyWaiters(e){const r=this.readyWaiters;this.readyWaiters=[];for(const n of r)n.timer&&clearTimeout(n.timer),n.resolve(e)}rejectReadyWaiters(e){const r=this.readyWaiters;this.readyWaiters=[];for(const n of r)n.timer&&clearTimeout(n.timer),n.reject(e)}emitInitError(e,r,n){this.socket._emit("init_error",{error:e,phase:r,retrying:n})}emitClientError(e,r,n){if(typeof r=="function"){r({error:n});return}this.socket._emit("client_error",{event:e,error:n})}clearInitTimers(){this.initTimeoutTimer&&(clearTimeout(this.initTimeoutTimer),this.initTimeoutTimer=void 0),this.waitingWarningTimer&&(clearInterval(this.waitingWarningTimer),this.waitingWarningTimer=void 0)}startWaitingWarnings(){this.waitingWarningTimer||(this.waitingWarningTimer=setInterval(()=>{if(this.isReady()||this.initState==="closed"){this.clearInitTimers();return}const e=this.outboundQueue.length,r=this.outboundQueue[0],n=r?((Date.now()-r.enqueuedAt)/1e3).toFixed(1):"0.0";console.warn(`[SockethubClient] Still waiting for schemas; queued outbound messages: ${e}; oldest queued age: ${n}s.`)},this.waitingWarningIntervalMs))}startInitialization(e,r){if(!this.socket.connected||this.initState==="closed")return;const n=++this.initTokenCounter;this.initCycle={token:n,reason:e,startedAt:Date.now(),replayOnReady:r,timedOut:!1},this.initState="initializing",this.clearInitTimers(),this.initTimeoutTimer=setTimeout(()=>{if(!this.initCycle||this.initCycle.token!==n)return;this.initCycle.timedOut=!0,this.initState="init_error";const s=`Initialization timed out after ${this.options.initTimeoutMs}ms waiting for schemas`;console.warn(`[SockethubClient] ${s}; queued outbound messages: ${this.outboundQueue.length}. Waiting for schemas event from server.`),this.emitInitError(s,"timeout",!1),this.startWaitingWarnings()},this.options.initTimeoutMs);try{this.requestSchemaRegistry()}catch(s){this.initState="init_error";const l=s instanceof Error?s.message:String(s);this.emitInitError(l,"schemas-request",!1),this.startWaitingWarnings()}}markReady(e){const r=this.initCycle,n=!!(r!=null&&r.replayOnReady);this.initCycle=void 0,this.clearInitTimers(),this.initState="ready",this.hasReadyOnce=!0;const s=this.buildReadyInfo(e);if(!s){const l=new Error("Failed to build ready payload");this.initState="init_error",this.emitInitError(l.message,"schemas-apply",!0),this.rejectReadyWaiters(l);return}this.socket._emit("ready",s),this.latestReadyInfo=s,this.resolveReadyWaiters(s),n&&(this.replay("credentials",this.events.credentials),this.replay("message",this.events.connect),this.replay("message",this.events.join)),this.flushOutboundQueue()}handleSchemasPayload(e){if(!e||typeof e!="object")return;if(e.unchanged===!0&&typeof this.registryFingerprint=="string"&&this.platformRegistry.size>0){this.initCycle?this.markReady(this.initCycle.reason):this.initState!=="ready"&&this.markReady("schemas-update");return}const r=e.fingerprint;if(this.initState==="ready"&&!this.initCycle&&r&&r===this.registryFingerprint)return;if(this.initState==="ready"&&!this.initCycle&&(this.initState="initializing"),!this.applyPlatformRegistry(e)){this.initState="init_error",this.emitInitError("Received invalid schemas payload from server","schemas-apply",!0),this.startWaitingWarnings();return}if(this.initCycle){this.markReady(this.initCycle.reason);return}this.markReady("schemas-update")}handlePublicEmit(e,r,n){const s={event:e,content:r,callback:n,enqueuedAt:Date.now(),sequence:this.outboundSequence++};if(!this.isReady()){this.enqueueOutbound(s);return}this.sendOutbound(s)}enqueueOutbound(e){if(this.outboundQueue.push(e),this.outboundQueue.length<=this.options.maxQueuedOutbound)return;const r=this.outboundQueue.shift();r&&this.emitClientError(r.event,r.callback,"SockethubClient queue overflow before ready")}flushOutboundQueue(){if(!this.isReady()||this.outboundQueue.length===0)return;const e=Date.now(),r=this.outboundQueue.sort((n,s)=>n.sequence-s.sequence);this.outboundQueue=[];for(const n of r){if(e-n.enqueuedAt>this.options.maxQueuedAgeMs){this.emitClientError(n.event,n.callback,`SockethubClient queued message expired after ${this.options.maxQueuedAgeMs}ms before initialization`);continue}this.sendOutbound(n)}}sendOutbound(e){let r=e.content;try{if(e.event==="credentials"||e.event==="message"){if(r=un(e.content),r&&typeof r=="object"){const n=r;e.event==="credentials"&&!n.type&&(n.type="credentials"),n.actor&&typeof n.actor=="object"&&!n.actor.type&&(n.actor.type="person")}if(this.platformRegistry.size>0){const n=this.validateActivity(r);if(n){this.emitClientError(e.event,e.callback,`SockethubClient validation failed: ${n}`);return}}}e.event==="credentials"?this.eventCredentials(r):e.event==="message"&&this.eventMessage(r),this._socket.emit(e.event,r,e.callback)}catch(n){const s=n instanceof Error?n.message:String(n);this.emitClientError(e.event,e.callback,s)}}log(e,r){this.debug&&console.log(e,r)}registerSocketIOHandlers(){this._socket.on("connect",()=>{this.socket.id=this._socket.id,this.socket.connected=!0,this.socket._emit("connect"),this.startInitialization(this.hasReadyOnce?"reconnect":"initial-connect",!0)}),this._socket.on("connect_error",e=>{this.socket._emit("connect_error",e)}),this._socket.on("disconnect",e=>{this.socket.connected=!1,this.initState!=="closed"&&(this.initState="idle"),this.clearInitTimers(),this.socket._emit("disconnect",e)}),this._socket.on("schemas",e=>{this.handleSchemasPayload(e)}),this._socket.on("message",e=>{this.socket._emit("message",un(e))})}hasActorId(e){return"actor"in e&&e.actor!==null&&typeof e.actor=="object"&&"id"in e.actor&&typeof e.actor.id=="string"}replay(e,r){for(const n of r.values()){const s=un(n);let l=s==null?void 0:s.id;if(this.hasActorId(s)){const i=s.actor;l=typeof i=="string"?i:i.id}this.log(`replaying ${e} for ${l}`),this._socket.emit(e,s)}}}(t=>{t.SockethubClient=hr})(typeof globalThis=="object"?globalThis:{});const qt=Object.create(null);qt.open="0";qt.close="1";qt.ping="2";qt.pong="3";qt.message="4";qt.upgrade="5";qt.noop="6";const kr=Object.create(null);Object.keys(qt).forEach(t=>{kr[qt[t]]=t});const bn={type:"error",data:"parser error"},ei=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ti=typeof ArrayBuffer=="function",ri=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,xn=({type:t,data:e},r,n)=>ei&&e instanceof Blob?r?n(e):ps(e,n):ti&&(e instanceof ArrayBuffer||ri(e))?r?n(e):ps(new Blob([e]),n):n(qt[t]+(e||"")),ps=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function ms(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let fn;function Cl(t,e){if(ei&&t.data instanceof Blob)return t.data.arrayBuffer().then(ms).then(e);if(ti&&(t.data instanceof ArrayBuffer||ri(t.data)))return e(ms(t.data));xn(t,!1,r=>{fn||(fn=new TextEncoder),e(fn.encode(r))})}const gs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ur=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<gs.length;t++)ur[gs.charCodeAt(t)]=t;const Al=t=>{let e=t.length*.75,r=t.length,n,s=0,l,i,c,a;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const f=new ArrayBuffer(e),u=new Uint8Array(f);for(n=0;n<r;n+=4)l=ur[t.charCodeAt(n)],i=ur[t.charCodeAt(n+1)],c=ur[t.charCodeAt(n+2)],a=ur[t.charCodeAt(n+3)],u[s++]=l<<2|i>>4,u[s++]=(i&15)<<4|c>>2,u[s++]=(c&3)<<6|a&63;return f},jl=typeof ArrayBuffer=="function",Bn=(t,e)=>{if(typeof t!="string")return{type:"message",data:ni(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:Ml(t.substring(1),e)}:kr[r]?t.length>1?{type:kr[r],data:t.substring(1)}:{type:kr[r]}:bn},Ml=(t,e)=>{if(jl){const r=Al(t);return ni(r,e)}else return{base64:!0,data:t}},ni=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},si="",Dl=(t,e)=>{const r=t.length,n=new Array(r);let s=0;t.forEach((l,i)=>{xn(l,!1,c=>{n[i]=c,++s===r&&e(n.join(si))})})},ql=(t,e)=>{const r=t.split(si),n=[];for(let s=0;s<r.length;s++){const l=Bn(r[s],e);if(n.push(l),l.type==="error")break}return n};function Ll(){return new TransformStream({transform(t,e){Cl(t,r=>{const n=r.length;let s;if(n<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,n);else if(n<65536){s=new Uint8Array(3);const l=new DataView(s.buffer);l.setUint8(0,126),l.setUint16(1,n)}else{s=new Uint8Array(9);const l=new DataView(s.buffer);l.setUint8(0,127),l.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(s[0]|=128),e.enqueue(s),e.enqueue(r)})}})}let dn;function Sr(t){return t.reduce((e,r)=>e+r.length,0)}function Pr(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let s=0;s<e;s++)r[s]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function Vl(t,e){dn||(dn=new TextDecoder);const r=[];let n=0,s=-1,l=!1;return new TransformStream({transform(i,c){for(r.push(i);;){if(n===0){if(Sr(r)<1)break;const a=Pr(r,1);l=(a[0]&128)===128,s=a[0]&127,s<126?n=3:s===126?n=1:n=2}else if(n===1){if(Sr(r)<2)break;const a=Pr(r,2);s=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),n=3}else if(n===2){if(Sr(r)<8)break;const a=Pr(r,8),f=new DataView(a.buffer,a.byteOffset,a.length),u=f.getUint32(0);if(u>Math.pow(2,21)-1){c.enqueue(bn);break}s=u*Math.pow(2,32)+f.getUint32(4),n=3}else{if(Sr(r)<s)break;const a=Pr(r,s);c.enqueue(Bn(l?a:dn.decode(a),e)),n=0}if(s===0||s>t){c.enqueue(bn);break}}}})}const ii=4;function ot(t){if(t)return Ul(t)}function Ul(t){for(var e in ot.prototype)t[e]=ot.prototype[e];return t}ot.prototype.on=ot.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};ot.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};ot.prototype.off=ot.prototype.removeListener=ot.prototype.removeAllListeners=ot.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,s=0;s<r.length;s++)if(n=r[s],n===e||n.fn===e){r.splice(s,1);break}return r.length===0&&delete this._callbacks["$"+t],this};ot.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,s=r.length;n<s;++n)r[n].apply(this,e)}return this};ot.prototype.emitReserved=ot.prototype.emit;ot.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};ot.prototype.hasListeners=function(t){return!!this.listeners(t).length};const Wr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),kt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),zl="arraybuffer";function ai(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const Fl=kt.setTimeout,xl=kt.clearTimeout;function Jr(t,e){e.useNativeTimers?(t.setTimeoutFn=Fl.bind(kt),t.clearTimeoutFn=xl.bind(kt)):(t.setTimeoutFn=kt.setTimeout.bind(kt),t.clearTimeoutFn=kt.clearTimeout.bind(kt))}const Bl=1.33;function Hl(t){return typeof t=="string"?Kl(t):Math.ceil((t.byteLength||t.size)*Bl)}function Kl(t){let e=0,r=0;for(let n=0,s=t.length;n<s;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function oi(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Gl(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function Wl(t){let e={},r=t.split("&");for(let n=0,s=r.length;n<s;n++){let l=r[n].split("=");e[decodeURIComponent(l[0])]=decodeURIComponent(l[1])}return e}class Jl extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class Hn extends ot{constructor(e){super(),this.writable=!1,Jr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,n){return super.emitReserved("error",new Jl(e,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const r=Bn(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const r=Gl(e);return r.length?"?"+r:""}}class Ql extends Hn{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};ql(e,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Dl(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=oi()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}}let ci=!1;try{ci=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Xl=ci;function Yl(){}class Zl extends Ql{constructor(e){if(super(e),typeof location<"u"){const r=location.protocol==="https:";let n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,r){const n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(s,l)=>{this.onError("xhr post error",s,l)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}class Dt extends ot{constructor(e,r,n){super(),this.createRequest=e,Jr(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const r=ai(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&n.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var s;n.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=Dt.requestsCount++,Dt.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Yl,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Dt.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Dt.requestsCount=0;Dt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ys);else if(typeof addEventListener=="function"){const t="onpagehide"in kt?"pagehide":"unload";addEventListener(t,ys,!1)}}function ys(){for(let t in Dt.requests)Dt.requests.hasOwnProperty(t)&&Dt.requests[t].abort()}const eu=function(){const t=li({xdomain:!1});return t&&t.responseType!==null}();class tu extends Zl{constructor(e){super(e);const r=e&&e.forceBase64;this.supportsBinary=eu&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Dt(li,this.uri(),e)}}function li(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Xl))return new XMLHttpRequest}catch{}if(!e)try{return new kt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const ui=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ru extends Hn{get name(){return"websocket"}doOpen(){const e=this.uri(),r=this.opts.protocols,n=ui?{}:ai(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,n)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],s=r===e.length-1;xn(n,this.supportsBinary,l=>{try{this.doWrite(n,l)}catch{}s&&Wr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=oi()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}}const hn=kt.WebSocket||kt.MozWebSocket;class nu extends ru{createSocket(e,r,n){return ui?new hn(e,r,n):r?new hn(e,r):new hn(e)}doWrite(e,r){this.ws.send(r)}}class su extends Hn{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const r=Vl(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),s=Ll();s.readable.pipeTo(e.writable),this._writer=s.writable.getWriter();const l=()=>{n.read().then(({done:c,value:a})=>{c||(this.onPacket(a),l())}).catch(c=>{})};l();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],s=r===e.length-1;this._writer.write(n).then(()=>{s&&Wr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const iu={websocket:nu,webtransport:su,polling:tu},au=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ou=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function En(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let s=au.exec(t||""),l={},i=14;for(;i--;)l[ou[i]]=s[i]||"";return r!=-1&&n!=-1&&(l.source=e,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=cu(l,l.path),l.queryKey=lu(l,l.query),l}function cu(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function lu(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,s,l){s&&(r[s]=l)}),r}const Sn=typeof addEventListener=="function"&&typeof removeEventListener=="function",Or=[];Sn&&addEventListener("offline",()=>{Or.forEach(t=>t())},!1);class Kt extends ot{constructor(e,r){if(super(),this.binaryType=zl,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){const n=En(e);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=En(r.host).host);Jr(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const s=n.prototype.name;this.transports.push(s),this._transportsByName[s]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Wl(this.opts.query)),Sn&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Or.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=ii,r.transport=e,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Kt.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Kt.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const s=this.writeBuffer[n].data;if(s&&(r+=Hl(s)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Wr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,n){return this._sendPacket("message",e,r,n),this}send(e,r,n){return this._sendPacket("message",e,r,n),this}_sendPacket(e,r,n,s){if(typeof r=="function"&&(s=r,r=void 0),typeof n=="function"&&(s=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const l={type:e,data:r,options:n};this.emitReserved("packetCreate",l),this.writeBuffer.push(l),s&&this.once("flush",s),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(Kt.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Sn&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=Or.indexOf(this._offlineEventListener);n!==-1&&Or.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}}Kt.protocol=ii;class uu extends Kt{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let r=this.createTransport(e),n=!1;Kt.priorWebsocketSuccess=!1;const s=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",d=>{if(!n)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Kt.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(u(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const $=new Error("probe error");$.transport=r.name,this.emitReserved("upgradeError",$)}}))};function l(){n||(n=!0,u(),r.close(),r=null)}const i=d=>{const $=new Error("probe error: "+d);$.transport=r.name,l(),this.emitReserved("upgradeError",$)};function c(){i("transport closed")}function a(){i("socket closed")}function f(d){r&&d.name!==r.name&&l()}const u=()=>{r.removeListener("open",s),r.removeListener("error",i),r.removeListener("close",c),this.off("close",a),this.off("upgrading",f)};r.once("open",s),r.once("error",i),r.once("close",c),this.once("close",a),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const r=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}}let fu=class extends uu{constructor(e,r={}){const n=typeof e=="object"?e:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(s=>iu[s]).filter(s=>!!s)),super(e,n)}};function du(t,e="",r){let n=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),n=En(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const l=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+l+":"+n.port+e,n.href=n.protocol+"://"+l+(r&&r.port===n.port?"":":"+n.port),n}const hu=typeof ArrayBuffer=="function",pu=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,fi=Object.prototype.toString,mu=typeof Blob=="function"||typeof Blob<"u"&&fi.call(Blob)==="[object BlobConstructor]",gu=typeof File=="function"||typeof File<"u"&&fi.call(File)==="[object FileConstructor]";function Kn(t){return hu&&(t instanceof ArrayBuffer||pu(t))||mu&&t instanceof Blob||gu&&t instanceof File}function Nr(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(Nr(t[r]))return!0;return!1}if(Kn(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Nr(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Nr(t[r]))return!0;return!1}function yu(t){const e=[],r=t.data,n=t;return n.data=Pn(r,e),n.attachments=e.length,{packet:n,buffers:e}}function Pn(t,e){if(!t)return t;if(Kn(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=Pn(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=Pn(t[n],e));return r}return t}function vu(t,e){return t.data=kn(t.data,e),delete t.attachments,t}function kn(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=kn(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=kn(t[r],e));return t}const _u=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],wu=5;var De;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(De||(De={}));class $u{constructor(e){this.replacer=e}encode(e){return(e.type===De.EVENT||e.type===De.ACK)&&Nr(e)?this.encodeAsBinary({type:e.type===De.EVENT?De.BINARY_EVENT:De.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===De.BINARY_EVENT||e.type===De.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),r}encodeAsBinary(e){const r=yu(e),n=this.encodeAsString(r.packet),s=r.buffers;return s.unshift(n),s}}function vs(t){return Object.prototype.toString.call(t)==="[object Object]"}class Gn extends ot{constructor(e){super(),this.reviver=e}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);const n=r.type===De.BINARY_EVENT;n||r.type===De.BINARY_ACK?(r.type=n?De.EVENT:De.ACK,this.reconstructor=new bu(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Kn(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0;const n={type:Number(e.charAt(0))};if(De[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===De.BINARY_EVENT||n.type===De.BINARY_ACK){const l=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const i=e.substring(l,r);if(i!=Number(i)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(i)}if(e.charAt(r+1)==="/"){const l=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(l,r)}else n.nsp="/";const s=e.charAt(r+1);if(s!==""&&Number(s)==s){const l=r+1;for(;++r;){const i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}n.id=Number(e.substring(l,r+1))}if(e.charAt(++r)){const l=this.tryParse(e.substr(r));if(Gn.isPayloadValid(n.type,l))n.data=l;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case De.CONNECT:return vs(r);case De.DISCONNECT:return r===void 0;case De.CONNECT_ERROR:return typeof r=="string"||vs(r);case De.EVENT:case De.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&_u.indexOf(r[0])===-1);case De.ACK:case De.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class bu{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const r=vu(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Eu=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Gn,Encoder:$u,get PacketType(){return De},protocol:wu},Symbol.toStringTag,{value:"Module"}));function Tt(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const Su=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class di extends ot{constructor(e,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Tt(e,"open",this.onopen.bind(this)),Tt(e,"packet",this.onpacket.bind(this)),Tt(e,"error",this.onerror.bind(this)),Tt(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var n,s,l;if(Su.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const i={type:De.EVENT,data:r};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const u=this.ids++,d=r.pop();this._registerAckCallback(u,d),i.id=u}const c=(s=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||s===void 0?void 0:s.writable,a=this.connected&&!(!((l=this.io.engine)===null||l===void 0)&&l._hasPingExpired());return this.flags.volatile&&!c||(a?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,r){var n;const s=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(s===void 0){this.acks[e]=r;return}const l=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===e&&this.sendBuffer.splice(c,1);r.call(this,new Error("operation has timed out"))},s),i=(...c)=>{this.io.clearTimeoutFn(l),r.apply(this,c)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((n,s)=>{const l=(i,c)=>i?s(i):n(c);l.withError=!0,r.push(l),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((s,...l)=>(this._queue[0],s!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(s)):(this._queue.shift(),r&&r(null,...l)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:De.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case De.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case De.EVENT:case De.BINARY_EVENT:this.onevent(e);break;case De.ACK:case De.BINARY_ACK:this.onack(e);break;case De.DISCONNECT:this.ondisconnect();break;case De.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const r=this;let n=!1;return function(...s){n||(n=!0,r.packet({type:De.ACK,id:e,data:s}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:De.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const r=this._anyListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,e.data)}}}function tr(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}tr.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};tr.prototype.reset=function(){this.attempts=0};tr.prototype.setMin=function(t){this.ms=t};tr.prototype.setMax=function(t){this.max=t};tr.prototype.setJitter=function(t){this.jitter=t};class On extends ot{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Jr(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new tr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const s=r.parser||Eu;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new fu(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const s=Tt(r,"open",function(){n.onopen(),e&&e()}),l=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),e?e(c):this.maybeReconnectOnOpen()},i=Tt(r,"error",l);if(this._timeout!==!1){const c=this._timeout,a=this.setTimeoutFn(()=>{s(),l(new Error("timeout")),r.close()},c);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(s),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Tt(e,"ping",this.onping.bind(this)),Tt(e,"data",this.ondata.bind(this)),Tt(e,"error",this.onerror.bind(this)),Tt(e,"close",this.onclose.bind(this)),Tt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){Wr(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new di(this,e,r),this.nsps[e]=n),n}_destroy(e){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(s=>{s?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",s)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const or={};function Tr(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=du(t,e.path||"/socket.io"),n=r.source,s=r.id,l=r.path,i=or[s]&&l in or[s].nsps,c=e.forceNew||e["force new connection"]||e.multiplex===!1||i;let a;return c?a=new On(n,e):(or[s]||(or[s]=new On(n,e)),a=or[s]),r.query&&!e.query&&(e.query=r.queryKey),a.socket(r.path,e)}Object.assign(Tr,{Manager:On,Socket:di,io:Tr,connect:Tr});let Pt;const Pu=pr(!1);async function hi(){if(!Pt)throw new Error("Sockethub client is not initialized yet");await Pt.ready()}async function Vu(t){return await hi(),Pt.contextFor(t)}function Uu(t){return{id:t.id,type:t.type,name:t.name??t.id}}async function zu(t){return await hi(),console.log("sending ->",t),new Promise((e,r)=>{const n=sn("SEND",t);Pt.socket.emit("message",n,s=>{if(console.log("received <-",s),sn("RESP",s),s.totalItems&&s.items)for(const l of s.items.reverse())sn("RESP",l,!0,n.id);Ss(s,!0),s.error?r(s.error):e(s)})})}function pn(t){return e=>{const r=t==="connect";Pu.update(()=>r),console.log(`sockethub ${t} [connected: ${r}]`,e||"")}}function ku(t){console.log("handle incoming: ",t),Ss(t,!1)}function _s(t=Hi){Pt=new hr(Tr(`${t.public.protocol}://${t.public.host}:${t.public.port}`,{path:t.sockethub.path}),{initTimeoutMs:1e4}),Pt.socket.on("connect",pn("connect")),Pt.socket.on("error",pn("error")),Pt.socket.on("disconnect",pn("disconnect")),Pt.socket.on("message",ku),Pt.socket.on("schemas",e=>{console.log("schemas received:",e),an("schemas",e)}),Pt.socket.on("ready",e=>{console.log("client ready:",e),an("ready",e)}),Pt.socket.on("init_error",e=>{console.error("client init error:",e),an("init_error",e)})}typeof globalThis=="object"&&"window"in globalThis&&(console.log("connecting to sockethub"),Bi().then(_s).catch(()=>_s()));export{Du as I,qu as L,Uu as a,Pt as b,Vu as c,Pu as d,hi as e,Ji as f,Xi as h,zu as s};