homebridge-config-ui-x 5.4.0 → 5.4.1-beta.0

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 (87) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/package.json +1 -1
  3. package/public/assets/service-icons/lock-mechanism.svg +39 -0
  4. package/public/assets/service-icons/security-system.svg +19 -0
  5. package/public/assets/service-icons/stateless-programmable-switch.svg +18 -0
  6. package/public/{chunk-M4QDQWSG.js → chunk-2C3X2ESN.js} +1 -1
  7. package/public/{chunk-WG533VX7.js → chunk-2OCOAM4A.js} +1 -1
  8. package/public/{chunk-IAVKQO7M.js → chunk-2ZNT5NFF.js} +1 -1
  9. package/public/{chunk-TOI5IERI.js → chunk-374Z43YT.js} +1 -1
  10. package/public/{chunk-U52WKM74.js → chunk-4MSMCRWY.js} +1 -1
  11. package/public/{chunk-EQHN6CPG.js → chunk-5E4D6S2D.js} +1 -1
  12. package/public/{chunk-7M4GTFPB.js → chunk-6GNRMPYG.js} +1 -1
  13. package/public/{chunk-73PB5ERF.js → chunk-6SCVQL7O.js} +1 -1
  14. package/public/{chunk-FKZEDXUZ.js → chunk-6Z4BC2RF.js} +1 -1
  15. package/public/{chunk-KYB236MX.js → chunk-7EQFLCW4.js} +1 -1
  16. package/public/{chunk-QL5UNVZO.js → chunk-A6R22QNC.js} +1 -1
  17. package/public/{chunk-3WCZQYFM.js → chunk-ABYZJSK6.js} +1 -1
  18. package/public/{chunk-5FOJUOIT.js → chunk-AVU6QUI7.js} +1 -1
  19. package/public/chunk-BFTOQBAD.js +1 -0
  20. package/public/{chunk-HO4UVRDI.js → chunk-CMOVUX6R.js} +1 -1
  21. package/public/{chunk-3QBYXJ7T.js → chunk-D7VCPH6W.js} +1 -1
  22. package/public/{chunk-EKINPADV.js → chunk-DARPEPKA.js} +1 -1
  23. package/public/{chunk-2HZOWWRB.js → chunk-DBWFIET4.js} +1 -1
  24. package/public/{chunk-6HJHVJPI.js → chunk-DFFTJVRY.js} +1 -1
  25. package/public/{chunk-2TDOLECC.js → chunk-E65H7FZB.js} +1 -1
  26. package/public/{chunk-3L7PIOD5.js → chunk-EPQYDY7D.js} +1 -1
  27. package/public/{chunk-HHGB2T2Q.js → chunk-FVKMBZOU.js} +1 -1
  28. package/public/{chunk-ULWO2VVV.js → chunk-FXJWZ2UF.js} +1 -1
  29. package/public/{chunk-LJDW32KF.js → chunk-G3NJOEY5.js} +1 -1
  30. package/public/{chunk-DYB33NRF.js → chunk-H45DK7IX.js} +1 -1
  31. package/public/{chunk-Z6DMMN6D.js → chunk-H577TIGW.js} +1 -1
  32. package/public/{chunk-V35TPDVW.js → chunk-H5WTK5UT.js} +1 -1
  33. package/public/{chunk-PPSFRNJC.js → chunk-HWAWBYVQ.js} +1 -1
  34. package/public/{chunk-HSAZV5QQ.js → chunk-ID5T5AYQ.js} +1 -1
  35. package/public/chunk-IOKYXV5M.js +4 -0
  36. package/public/{chunk-6BITWEO6.js → chunk-IVOTC2PL.js} +1 -1
  37. package/public/{chunk-R6KN5Y43.js → chunk-IVW2QO2K.js} +1 -1
  38. package/public/{chunk-FYI7RHOJ.js → chunk-IWFKJHPR.js} +1 -1
  39. package/public/{chunk-G6KV6PYE.js → chunk-J6CJ26QN.js} +1 -1
  40. package/public/{chunk-GNULJZ2P.js → chunk-JLROZUWO.js} +1 -1
  41. package/public/{chunk-4A6F5427.js → chunk-KOXOFXQT.js} +1 -1
  42. package/public/{chunk-FYDO54CR.js → chunk-KZKL7DGI.js} +1 -1
  43. package/public/{chunk-VJOMQ46T.js → chunk-LMT24EZF.js} +1 -1
  44. package/public/{chunk-DCEE4BJT.js → chunk-LUDY7LZF.js} +1 -1
  45. package/public/{chunk-BQ7Q4FRF.js → chunk-LVFD4QWO.js} +1 -1
  46. package/public/{chunk-OSQ37ZQY.js → chunk-M4MHMWN6.js} +1 -1
  47. package/public/{chunk-VRXR6ACJ.js → chunk-MDKPA3TY.js} +1 -1
  48. package/public/{chunk-V7OQR5Y4.js → chunk-MYKATCOT.js} +1 -1
  49. package/public/{chunk-QM6QRTMV.js → chunk-N6IDOKML.js} +1 -1
  50. package/public/chunk-NGOAZV2I.js +1 -0
  51. package/public/{chunk-KLQ6BEKS.js → chunk-OA7Y3E5A.js} +1 -1
  52. package/public/{chunk-QZWC7RP4.js → chunk-OTN4VCOA.js} +1 -1
  53. package/public/{chunk-OMGXHYZA.js → chunk-PEVTQRDC.js} +1 -1
  54. package/public/{chunk-6NW4EKE6.js → chunk-Q3FVCDIV.js} +1 -1
  55. package/public/{chunk-RZ4UMDVF.js → chunk-QX6BFGHZ.js} +1 -1
  56. package/public/{chunk-FIQUQJTU.js → chunk-RRR64OMY.js} +1 -1
  57. package/public/{chunk-UFFQKHXE.js → chunk-RUSXMBPM.js} +1 -1
  58. package/public/{chunk-FG5QICVJ.js → chunk-RWJLVKQ2.js} +1 -1
  59. package/public/{chunk-U4UZ4WQX.js → chunk-SXGEZIU3.js} +1 -1
  60. package/public/chunk-T2KT7MKM.js +1 -0
  61. package/public/{chunk-3JNJJOX6.js → chunk-V6JVOQNN.js} +1 -1
  62. package/public/{chunk-4I4YTNGD.js → chunk-VAECASQ2.js} +1 -1
  63. package/public/{chunk-OW6LBBVH.js → chunk-VGFL2OLU.js} +1 -1
  64. package/public/{chunk-RCYYU6LQ.js → chunk-WCOLHYTR.js} +1 -1
  65. package/public/{chunk-BLNEXUND.js → chunk-WP7COPMO.js} +1 -1
  66. package/public/chunk-WQRMVCIC.js +12 -0
  67. package/public/{chunk-JCYDPJQ5.js → chunk-WTDK2HE6.js} +1 -1
  68. package/public/{chunk-ZO74PVYQ.js → chunk-XPBU4MVM.js} +1 -1
  69. package/public/{chunk-7NWB7MN6.js → chunk-XWUCC7S4.js} +1 -1
  70. package/public/chunk-Y4MINXYD.js +1 -0
  71. package/public/{chunk-F6NZALU5.js → chunk-YU73VG73.js} +1 -1
  72. package/public/{chunk-RGXCQLZU.js → chunk-Z2T4OZ7I.js} +1 -1
  73. package/public/{chunk-YPZJFK3W.js → chunk-ZMOWQI2Q.js} +1 -1
  74. package/public/{chunk-EZQF5CUM.js → chunk-ZUTM7S4U.js} +1 -1
  75. package/public/index.html +1 -1
  76. package/public/main-KJQYL5FU.js +1 -0
  77. package/public/assets/hap-icons/security-system-active.svg +0 -103
  78. package/public/assets/hap-icons/security-system-off.svg +0 -69
  79. package/public/assets/hap-icons/security-system-triggered.svg +0 -103
  80. package/public/assets/hap-icons/stateless-programmable-switch.svg +0 -52
  81. package/public/chunk-2ZM2CO7S.js +0 -1
  82. package/public/chunk-645YHJEQ.js +0 -4
  83. package/public/chunk-BHQK7H4B.js +0 -1
  84. package/public/chunk-CLGDJPWG.js +0 -12
  85. package/public/chunk-KPOP67KE.js +0 -1
  86. package/public/chunk-O7RJ6JXM.js +0 -1
  87. package/public/main-HN6ISZGH.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as Mp}from"./chunk-OMGXHYZA.js";import{a as tl,c as Ep,d as Pp,e as Fn,f as oi,g as Xx}from"./chunk-FG5QICVJ.js";import{a as Cp}from"./chunk-M4QDQWSG.js";import{a as $p}from"./chunk-3QBYXJ7T.js";import{a as kp}from"./chunk-UFFQKHXE.js";import{a as wp,b as Ip,c as Sp}from"./chunk-HHGB2T2Q.js";import{a as xr}from"./chunk-V35TPDVW.js";import{a as Tp}from"./chunk-RCYYU6LQ.js";import{a as pa,b as ha}from"./chunk-DYB33NRF.js";import{a as fa,b as ma}from"./chunk-G6KV6PYE.js";import{a as xp}from"./chunk-EZQF5CUM.js";import{a as aa,b as sa,c as la,d as ua,e as ca,f as da,g as Nn,m as je,n as et,o as gp,p as _p,q as yp,r as bp,s as vp,t as Ai}from"./chunk-FYI7RHOJ.js";import{A as Cr,a as lp,b as Di,c as On,e as bt,f as up,h as cp,i as dp,j as pp,k as fp,l as Ni,m as mp,o as Fi,r as Dn,s as sn,t as ln,y as hp,z as Gt}from"./chunk-KYB236MX.js";import{a as ji}from"./chunk-U52WKM74.js";import{d as ri}from"./chunk-6HJHVJPI.js";import{b as Be}from"./chunk-Z6DMMN6D.js";import{k as we,m as qi,n as ve}from"./chunk-2ZM2CO7S.js";import{a as xe,b as Ve}from"./chunk-FYDO54CR.js";import{e as sp}from"./chunk-KLQ6BEKS.js";import{$a as Yd,Ac as np,Ad as ap,Bc as rp,Ca as Pi,Cc as Te,D as Wd,Da as Xd,Dc as Kt,Ec as on,Fa as Tn,Fc as At,Gc as Mn,Hb as G,Ib as E,Ic as w,Jb as P,Jc as S,Kc as Ue,Lb as dt,M as En,Mb as pt,Nb as ft,Ob as b,Pb as f,Qb as m,Rb as $,Rc as mt,Sb as ea,Sc as z,Tb as ta,Tc as Oi,Ub as ia,Vb as ep,Vc as op,Wb as tp,Xa as he,Z as Ys,_b as H,a as X,aa as vr,ab as d,b as $e,bc as j,cc as na,dc as _,e as g,fa as Kd,fb as Qo,g as Me,ga as Tt,gb as fi,h as K,ha as Pn,hc as Qs,ib as tn,ic as Zs,ja as Gd,jc as el,jd as qt,k as Ld,ka as Jd,kc as Ti,kd as an,la as k,lc as ki,ld as ht,mb as Q,mc as ip,n as Pt,nb as kn,nc as Wt,o as Xs,ob as nn,oc as Mi,pb as Qd,pc as Y,q as Ud,qc as C,ra as A,rc as U,sa as q,sb as ue,sc as B,sd as oa,tc as rn,ub as Zd,uc as ra,v as zd,vb as Zo,w as le,x as Hd,xc as Oe,yc as De,za as Yo,zc as Ne}from"./chunk-645YHJEQ.js";var Sr=g(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.regexpCode=be.getEsmExportName=be.getProperty=be.safeStringify=be.stringify=be.strConcat=be.addCodeArg=be.str=be._=be.nil=be._Code=be.Name=be.IDENTIFIER=be._CodeOrName=void 0;var wr=class{};be._CodeOrName=wr;be.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var un=class extends wr{constructor(i){if(super(),!be.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};be.Name=un;var jt=class extends wr{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,n)=>(n instanceof un&&(t[n.str]=(t[n.str]||0)+1),t),{})}};be._Code=jt;be.nil=new jt("");function Op(e,...i){let t=[e[0]],n=0;for(;n<i.length;)nl(t,i[n]),t.push(e[++n]);return new jt(t)}be._=Op;var il=new jt("+");function Dp(e,...i){let t=[Ir(e[0])],n=0;for(;n<i.length;)t.push(il),nl(t,i[n]),t.push(il,Ir(e[++n]));return Yx(t),new jt(t)}be.str=Dp;function nl(e,i){i instanceof jt?e.push(...i._items):i instanceof un?e.push(i):e.push(ew(i))}be.addCodeArg=nl;function Yx(e){let i=1;for(;i<e.length-1;){if(e[i]===il){let t=Qx(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function Qx(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof un||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof un))return`"${e}${i.slice(1)}`}function Zx(e,i){return i.emptyStr()?e:e.emptyStr()?i:Dp`${e}${i}`}be.strConcat=Zx;function ew(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ir(Array.isArray(e)?e.join(","):e)}function tw(e){return new jt(Ir(e))}be.stringify=tw;function Ir(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}be.safeStringify=Ir;function iw(e){return typeof e=="string"&&be.IDENTIFIER.test(e)?new jt(`.${e}`):Op`[${e}]`}be.getProperty=iw;function nw(e){if(typeof e=="string"&&be.IDENTIFIER.test(e))return new jt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}be.getEsmExportName=nw;function rw(e){return new jt(e.toString())}be.regexpCode=rw});var al=g(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.ValueScope=Ct.ValueScopeName=Ct.Scope=Ct.varKinds=Ct.UsedValueState=void 0;var vt=Sr(),rl=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},ga=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(ga||(Ct.UsedValueState=ga={}));Ct.varKinds={const:new vt.Name("const"),let:new vt.Name("let"),var:new vt.Name("var")};var _a=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof vt.Name?i:this.name(i)}name(i){return new vt.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,n;if(!((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0)&&n.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};Ct.Scope=_a;var ya=class extends vt.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:n}){this.value=i,this.scopePath=(0,vt._)`.${new vt.Name(t)}[${n}]`}};Ct.ValueScopeName=ya;var ow=(0,vt._)`\n`,ol=class extends _a{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=$e(X({},i),{_n:i.lines?ow:vt.nil})}get(){return this._scope}name(i){return new ya(i,this._newName(i))}value(i,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(i),{prefix:o}=r,a=(n=t.key)!==null&&n!==void 0?n:t.ref,s=this._values[o];if(s){let c=s.get(a);if(c)return c}else s=this._values[o]=new Map;s.set(a,r);let l=this._scope[o]||(this._scope[o]=[]),u=l.length;return l[u]=t.ref,r.setValue(t,{property:o,itemIndex:u}),r}getValue(i,t){let n=this._values[i];if(n)return n.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,vt._)`${i}${n.scopePath}`})}scopeCode(i=this._values,t,n){return this._reduceValues(i,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,n)}_reduceValues(i,t,n={},r){let o=vt.nil;for(let a in i){let s=i[a];if(!s)continue;let l=n[a]=n[a]||new Map;s.forEach(u=>{if(l.has(u))return;l.set(u,ga.Started);let c=t(u);if(c){let p=this.opts.es5?Ct.varKinds.var:Ct.varKinds.const;o=(0,vt._)`${o}${p} ${u} = ${c};${this.opts._n}`}else if(c=r?.(u))o=(0,vt._)`${o}${c}${this.opts._n}`;else throw new rl(u);l.set(u,ga.Completed)})}return o}};Ct.ValueScope=ol});var ee=g(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.or=ce.and=ce.not=ce.CodeGen=ce.operators=ce.varKinds=ce.ValueScopeName=ce.ValueScope=ce.Scope=ce.Name=ce.regexpCode=ce.stringify=ce.getProperty=ce.nil=ce.strConcat=ce.str=ce._=void 0;var ge=Sr(),Jt=al(),Vi=Sr();Object.defineProperty(ce,"_",{enumerable:!0,get:function(){return Vi._}});Object.defineProperty(ce,"str",{enumerable:!0,get:function(){return Vi.str}});Object.defineProperty(ce,"strConcat",{enumerable:!0,get:function(){return Vi.strConcat}});Object.defineProperty(ce,"nil",{enumerable:!0,get:function(){return Vi.nil}});Object.defineProperty(ce,"getProperty",{enumerable:!0,get:function(){return Vi.getProperty}});Object.defineProperty(ce,"stringify",{enumerable:!0,get:function(){return Vi.stringify}});Object.defineProperty(ce,"regexpCode",{enumerable:!0,get:function(){return Vi.regexpCode}});Object.defineProperty(ce,"Name",{enumerable:!0,get:function(){return Vi.Name}});var wa=al();Object.defineProperty(ce,"Scope",{enumerable:!0,get:function(){return wa.Scope}});Object.defineProperty(ce,"ValueScope",{enumerable:!0,get:function(){return wa.ValueScope}});Object.defineProperty(ce,"ValueScopeName",{enumerable:!0,get:function(){return wa.ValueScopeName}});Object.defineProperty(ce,"varKinds",{enumerable:!0,get:function(){return wa.varKinds}});ce.operators={GT:new ge._Code(">"),GTE:new ge._Code(">="),LT:new ge._Code("<"),LTE:new ge._Code("<="),EQ:new ge._Code("==="),NEQ:new ge._Code("!=="),NOT:new ge._Code("!"),OR:new ge._Code("||"),AND:new ge._Code("&&"),ADD:new ge._Code("+")};var mi=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},sl=class extends mi{constructor(i,t,n){super(),this.varKind=i,this.name=t,this.rhs=n}render({es5:i,_n:t}){let n=i?Jt.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${r};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=An(this.rhs,i,t)),this}get names(){return this.rhs instanceof ge._CodeOrName?this.rhs.names:{}}},va=class extends mi{constructor(i,t,n){super(),this.lhs=i,this.rhs=t,this.sideEffects=n}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof ge.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=An(this.rhs,i,t),this}get names(){let i=this.lhs instanceof ge.Name?{}:X({},this.lhs.names);return xa(i,this.rhs)}},ll=class extends va{constructor(i,t,n,r){super(i,n,r),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},ul=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},cl=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},dl=class extends mi{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},pl=class extends mi{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=An(this.code,i,t),this}get names(){return this.code instanceof ge._CodeOrName?this.code.names:{}}},$r=class extends mi{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,n)=>t+n.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let n=i[t].optimizeNodes();Array.isArray(n)?i.splice(t,1,...n):n?i[t]=n:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:n}=this,r=n.length;for(;r--;){let o=n[r];o.optimizeNames(i,t)||(aw(i,o.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>cn(i,t.names),{})}},hi=class extends $r{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},fl=class extends $r{},ml=(()=>{class e extends hi{}return e.kind="else",e})(),ba=(()=>{class e extends hi{constructor(t,n){super(n),this.condition=t}render(t){let n=`if(${this.condition})`+super.render(t);return this.else&&(n+="else "+this.else.render(t)),n}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let r=n.optimizeNodes();n=this.else=Array.isArray(r)?new ml(r):r}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(jp(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,n){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,n),!!(super.optimizeNames(t,n)||this.else))return this.condition=An(this.condition,t,n),this}get names(){let t=super.names;return xa(t,this.condition),this.else&&cn(t,this.else.names),t}}return e.kind="if",e})(),Ia=(()=>{class e extends hi{}return e.kind="for",e})(),hl=class extends Ia{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=An(this.iteration,i,t),this}get names(){return cn(super.names,this.iteration.names)}},gl=class extends Ia{constructor(i,t,n,r){super(),this.varKind=i,this.name=t,this.from=n,this.to=r}render(i){let t=i.es5?Jt.varKinds.var:this.varKind,{name:n,from:r,to:o}=this;return`for(${t} ${n}=${r}; ${n}<${o}; ${n}++)`+super.render(i)}get names(){let i=xa(super.names,this.from);return xa(i,this.to)}},Ca=class extends Ia{constructor(i,t,n,r){super(),this.loop=i,this.varKind=t,this.name=n,this.iterable=r}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=An(this.iterable,i,t),this}get names(){return cn(super.names,this.iterable.names)}},Np=(()=>{class e extends hi{constructor(t,n,r){super(),this.name=t,this.args=n,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),Fp=(()=>{class e extends $r{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),_l=class extends hi{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var n,r;return super.optimizeNames(i,t),(n=this.catch)===null||n===void 0||n.optimizeNames(i,t),(r=this.finally)===null||r===void 0||r.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&cn(i,this.catch.names),this.finally&&cn(i,this.finally.names),i}},Ap=(()=>{class e extends hi{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),qp=(()=>{class e extends hi{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),yl=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=$e(X({},t),{_n:t.lines?`
1
+ import{a as Mp}from"./chunk-PEVTQRDC.js";import{a as tl,c as Ep,d as Pp,e as Fn,f as oi,g as Xx}from"./chunk-RWJLVKQ2.js";import{a as Cp}from"./chunk-2C3X2ESN.js";import{a as $p}from"./chunk-D7VCPH6W.js";import{a as kp}from"./chunk-RUSXMBPM.js";import{a as wp,b as Ip,c as Sp}from"./chunk-FVKMBZOU.js";import{a as xr}from"./chunk-H5WTK5UT.js";import{a as Tp}from"./chunk-WCOLHYTR.js";import{a as pa,b as ha}from"./chunk-H45DK7IX.js";import{a as fa,b as ma}from"./chunk-J6CJ26QN.js";import{a as xp}from"./chunk-ZUTM7S4U.js";import{a as aa,b as sa,c as la,d as ua,e as ca,f as da,g as Nn,m as je,n as et,o as gp,p as _p,q as yp,r as bp,s as vp,t as Ai}from"./chunk-IWFKJHPR.js";import{A as Cr,a as lp,b as Di,c as On,e as bt,f as up,h as cp,i as dp,j as pp,k as fp,l as Ni,m as mp,o as Fi,r as Dn,s as sn,t as ln,y as hp,z as Gt}from"./chunk-7EQFLCW4.js";import{a as ji}from"./chunk-4MSMCRWY.js";import{d as ri}from"./chunk-DFFTJVRY.js";import{b as Be}from"./chunk-H577TIGW.js";import{k as we,m as qi,n as ve}from"./chunk-NGOAZV2I.js";import{a as xe,b as Ve}from"./chunk-KZKL7DGI.js";import{e as sp}from"./chunk-OA7Y3E5A.js";import{$a as Yd,Ac as np,Bc as rp,Bd as ap,Ca as Pi,Cc as Te,D as Wd,Da as Xd,Dc as Kt,Ec as on,Fa as Tn,Fc as At,Gc as Mn,Hb as G,Ib as E,Jb as P,Jc as w,Kc as S,Lb as dt,Lc as Ue,M as En,Mb as pt,Nb as ft,Ob as b,Pb as f,Qb as m,Rb as $,Sb as ea,Sc as mt,Tb as ta,Tc as z,Ub as ia,Uc as Oi,Vb as ep,Wb as tp,Wc as op,Xa as he,Z as Ys,_b as H,a as X,aa as vr,ab as d,b as $e,bc as j,cc as na,dc as _,e as g,fa as Kd,fb as Qo,g as Me,ga as Tt,gb as fi,h as K,ha as Pn,hc as Qs,ib as tn,ic as Zs,ja as Gd,jc as el,k as Ld,ka as Jd,kc as Ti,kd as qt,la as k,lc as ki,ld as an,mb as Q,mc as ip,md as ht,n as Pt,nb as kn,nc as Wt,o as Xs,ob as nn,oc as Mi,pb as Qd,pc as Y,q as Ud,qc as C,ra as A,rc as U,sa as q,sb as ue,sc as B,tc as rn,td as oa,ub as Zd,uc as ra,v as zd,vb as Zo,w as le,x as Hd,xc as Oe,yc as De,za as Yo,zc as Ne}from"./chunk-IOKYXV5M.js";var Sr=g(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.regexpCode=be.getEsmExportName=be.getProperty=be.safeStringify=be.stringify=be.strConcat=be.addCodeArg=be.str=be._=be.nil=be._Code=be.Name=be.IDENTIFIER=be._CodeOrName=void 0;var wr=class{};be._CodeOrName=wr;be.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var un=class extends wr{constructor(i){if(super(),!be.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};be.Name=un;var jt=class extends wr{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,n)=>(n instanceof un&&(t[n.str]=(t[n.str]||0)+1),t),{})}};be._Code=jt;be.nil=new jt("");function Op(e,...i){let t=[e[0]],n=0;for(;n<i.length;)nl(t,i[n]),t.push(e[++n]);return new jt(t)}be._=Op;var il=new jt("+");function Dp(e,...i){let t=[Ir(e[0])],n=0;for(;n<i.length;)t.push(il),nl(t,i[n]),t.push(il,Ir(e[++n]));return Yx(t),new jt(t)}be.str=Dp;function nl(e,i){i instanceof jt?e.push(...i._items):i instanceof un?e.push(i):e.push(ew(i))}be.addCodeArg=nl;function Yx(e){let i=1;for(;i<e.length-1;){if(e[i]===il){let t=Qx(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function Qx(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof un||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof un))return`"${e}${i.slice(1)}`}function Zx(e,i){return i.emptyStr()?e:e.emptyStr()?i:Dp`${e}${i}`}be.strConcat=Zx;function ew(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ir(Array.isArray(e)?e.join(","):e)}function tw(e){return new jt(Ir(e))}be.stringify=tw;function Ir(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}be.safeStringify=Ir;function iw(e){return typeof e=="string"&&be.IDENTIFIER.test(e)?new jt(`.${e}`):Op`[${e}]`}be.getProperty=iw;function nw(e){if(typeof e=="string"&&be.IDENTIFIER.test(e))return new jt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}be.getEsmExportName=nw;function rw(e){return new jt(e.toString())}be.regexpCode=rw});var al=g(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.ValueScope=Ct.ValueScopeName=Ct.Scope=Ct.varKinds=Ct.UsedValueState=void 0;var vt=Sr(),rl=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},ga=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(ga||(Ct.UsedValueState=ga={}));Ct.varKinds={const:new vt.Name("const"),let:new vt.Name("let"),var:new vt.Name("var")};var _a=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof vt.Name?i:this.name(i)}name(i){return new vt.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,n;if(!((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0)&&n.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};Ct.Scope=_a;var ya=class extends vt.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:n}){this.value=i,this.scopePath=(0,vt._)`.${new vt.Name(t)}[${n}]`}};Ct.ValueScopeName=ya;var ow=(0,vt._)`\n`,ol=class extends _a{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=$e(X({},i),{_n:i.lines?ow:vt.nil})}get(){return this._scope}name(i){return new ya(i,this._newName(i))}value(i,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(i),{prefix:o}=r,a=(n=t.key)!==null&&n!==void 0?n:t.ref,s=this._values[o];if(s){let c=s.get(a);if(c)return c}else s=this._values[o]=new Map;s.set(a,r);let l=this._scope[o]||(this._scope[o]=[]),u=l.length;return l[u]=t.ref,r.setValue(t,{property:o,itemIndex:u}),r}getValue(i,t){let n=this._values[i];if(n)return n.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,vt._)`${i}${n.scopePath}`})}scopeCode(i=this._values,t,n){return this._reduceValues(i,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,n)}_reduceValues(i,t,n={},r){let o=vt.nil;for(let a in i){let s=i[a];if(!s)continue;let l=n[a]=n[a]||new Map;s.forEach(u=>{if(l.has(u))return;l.set(u,ga.Started);let c=t(u);if(c){let p=this.opts.es5?Ct.varKinds.var:Ct.varKinds.const;o=(0,vt._)`${o}${p} ${u} = ${c};${this.opts._n}`}else if(c=r?.(u))o=(0,vt._)`${o}${c}${this.opts._n}`;else throw new rl(u);l.set(u,ga.Completed)})}return o}};Ct.ValueScope=ol});var ee=g(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.or=ce.and=ce.not=ce.CodeGen=ce.operators=ce.varKinds=ce.ValueScopeName=ce.ValueScope=ce.Scope=ce.Name=ce.regexpCode=ce.stringify=ce.getProperty=ce.nil=ce.strConcat=ce.str=ce._=void 0;var ge=Sr(),Jt=al(),Vi=Sr();Object.defineProperty(ce,"_",{enumerable:!0,get:function(){return Vi._}});Object.defineProperty(ce,"str",{enumerable:!0,get:function(){return Vi.str}});Object.defineProperty(ce,"strConcat",{enumerable:!0,get:function(){return Vi.strConcat}});Object.defineProperty(ce,"nil",{enumerable:!0,get:function(){return Vi.nil}});Object.defineProperty(ce,"getProperty",{enumerable:!0,get:function(){return Vi.getProperty}});Object.defineProperty(ce,"stringify",{enumerable:!0,get:function(){return Vi.stringify}});Object.defineProperty(ce,"regexpCode",{enumerable:!0,get:function(){return Vi.regexpCode}});Object.defineProperty(ce,"Name",{enumerable:!0,get:function(){return Vi.Name}});var wa=al();Object.defineProperty(ce,"Scope",{enumerable:!0,get:function(){return wa.Scope}});Object.defineProperty(ce,"ValueScope",{enumerable:!0,get:function(){return wa.ValueScope}});Object.defineProperty(ce,"ValueScopeName",{enumerable:!0,get:function(){return wa.ValueScopeName}});Object.defineProperty(ce,"varKinds",{enumerable:!0,get:function(){return wa.varKinds}});ce.operators={GT:new ge._Code(">"),GTE:new ge._Code(">="),LT:new ge._Code("<"),LTE:new ge._Code("<="),EQ:new ge._Code("==="),NEQ:new ge._Code("!=="),NOT:new ge._Code("!"),OR:new ge._Code("||"),AND:new ge._Code("&&"),ADD:new ge._Code("+")};var mi=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},sl=class extends mi{constructor(i,t,n){super(),this.varKind=i,this.name=t,this.rhs=n}render({es5:i,_n:t}){let n=i?Jt.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${r};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=An(this.rhs,i,t)),this}get names(){return this.rhs instanceof ge._CodeOrName?this.rhs.names:{}}},va=class extends mi{constructor(i,t,n){super(),this.lhs=i,this.rhs=t,this.sideEffects=n}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof ge.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=An(this.rhs,i,t),this}get names(){let i=this.lhs instanceof ge.Name?{}:X({},this.lhs.names);return xa(i,this.rhs)}},ll=class extends va{constructor(i,t,n,r){super(i,n,r),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},ul=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},cl=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},dl=class extends mi{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},pl=class extends mi{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=An(this.code,i,t),this}get names(){return this.code instanceof ge._CodeOrName?this.code.names:{}}},$r=class extends mi{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,n)=>t+n.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let n=i[t].optimizeNodes();Array.isArray(n)?i.splice(t,1,...n):n?i[t]=n:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:n}=this,r=n.length;for(;r--;){let o=n[r];o.optimizeNames(i,t)||(aw(i,o.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>cn(i,t.names),{})}},hi=class extends $r{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},fl=class extends $r{},ml=(()=>{class e extends hi{}return e.kind="else",e})(),ba=(()=>{class e extends hi{constructor(t,n){super(n),this.condition=t}render(t){let n=`if(${this.condition})`+super.render(t);return this.else&&(n+="else "+this.else.render(t)),n}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let r=n.optimizeNodes();n=this.else=Array.isArray(r)?new ml(r):r}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(jp(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,n){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,n),!!(super.optimizeNames(t,n)||this.else))return this.condition=An(this.condition,t,n),this}get names(){let t=super.names;return xa(t,this.condition),this.else&&cn(t,this.else.names),t}}return e.kind="if",e})(),Ia=(()=>{class e extends hi{}return e.kind="for",e})(),hl=class extends Ia{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=An(this.iteration,i,t),this}get names(){return cn(super.names,this.iteration.names)}},gl=class extends Ia{constructor(i,t,n,r){super(),this.varKind=i,this.name=t,this.from=n,this.to=r}render(i){let t=i.es5?Jt.varKinds.var:this.varKind,{name:n,from:r,to:o}=this;return`for(${t} ${n}=${r}; ${n}<${o}; ${n}++)`+super.render(i)}get names(){let i=xa(super.names,this.from);return xa(i,this.to)}},Ca=class extends Ia{constructor(i,t,n,r){super(),this.loop=i,this.varKind=t,this.name=n,this.iterable=r}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=An(this.iterable,i,t),this}get names(){return cn(super.names,this.iterable.names)}},Np=(()=>{class e extends hi{constructor(t,n,r){super(),this.name=t,this.args=n,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),Fp=(()=>{class e extends $r{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),_l=class extends hi{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var n,r;return super.optimizeNames(i,t),(n=this.catch)===null||n===void 0||n.optimizeNames(i,t),(r=this.finally)===null||r===void 0||r.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&cn(i,this.catch.names),this.finally&&cn(i,this.finally.names),i}},Ap=(()=>{class e extends hi{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),qp=(()=>{class e extends hi{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),yl=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=$e(X({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=i,this._scope=new Jt.Scope({parent:i}),this._nodes=[new fl]}toString(){return this._root.render(this.opts)}name(i){return this._scope.name(i)}scopeName(i){return this._extScope.name(i)}scopeValue(i,t){let n=this._extScope.value(i,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(i,t){return this._extScope.getValue(i,t)}scopeRefs(i){return this._extScope.scopeRefs(i,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(i,t,n,r){let o=this._scope.toName(t);return n!==void 0&&r&&(this._constants[o.str]=n),this._leafNode(new sl(i,o,n)),o}const(i,t,n){return this._def(Jt.varKinds.const,i,t,n)}let(i,t,n){return this._def(Jt.varKinds.let,i,t,n)}var(i,t,n){return this._def(Jt.varKinds.var,i,t,n)}assign(i,t,n){return this._leafNode(new va(i,t,n))}add(i,t){return this._leafNode(new ll(i,ce.operators.ADD,t))}code(i){return typeof i=="function"?i():i!==ge.nil&&this._leafNode(new pl(i)),this}object(...i){let t=["{"];for(let[n,r]of i)t.length>1&&t.push(","),t.push(n),(n!==r||this.opts.es5)&&(t.push(":"),(0,ge.addCodeArg)(t,r));return t.push("}"),new ge._Code(t)}if(i,t,n){if(this._blockNode(new ba(i)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(i){return this._elseNode(new ba(i))}else(){return this._elseNode(new ml)}endIf(){return this._endBlockNode(ba,ml)}_for(i,t){return this._blockNode(i),t&&this.code(t).endFor(),this}for(i,t){return this._for(new hl(i),t)}forRange(i,t,n,r,o=this.opts.es5?Jt.varKinds.var:Jt.varKinds.let){let a=this._scope.toName(i);return this._for(new gl(o,a,t,n),()=>r(a))}forOf(i,t,n,r=Jt.varKinds.const){let o=this._scope.toName(i);if(this.opts.es5){let a=t instanceof ge.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,ge._)`${a}.length`,s=>{this.var(o,(0,ge._)`${a}[${s}]`),n(o)})}return this._for(new Ca("of",r,o,t),()=>n(o))}forIn(i,t,n,r=this.opts.es5?Jt.varKinds.var:Jt.varKinds.const){if(this.opts.ownProperties)return this.forOf(i,(0,ge._)`Object.keys(${t})`,n);let o=this._scope.toName(i);return this._for(new Ca("in",r,o,t),()=>n(o))}endFor(){return this._endBlockNode(Ia)}label(i){return this._leafNode(new ul(i))}break(i){return this._leafNode(new cl(i))}return(i){let t=new Fp;if(this._blockNode(t),this.code(i),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Fp)}try(i,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new _l;if(this._blockNode(r),this.code(i),t){let o=this.name("e");this._currNode=r.catch=new Ap(o),t(o)}return n&&(this._currNode=r.finally=new qp,this.code(n)),this._endBlockNode(Ap,qp)}throw(i){return this._leafNode(new dl(i))}block(i,t){return this._blockStarts.push(this._nodes.length),i&&this.code(i).endBlock(t),this}endBlock(i){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||i!==void 0&&n!==i)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${i} expected`);return this._nodes.length=t,this}func(i,t=ge.nil,n,r){return this._blockNode(new Np(i,t,n)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(Np)}optimize(i=1){for(;i-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(i){return this._currNode.nodes.push(i),this}_blockNode(i){this._currNode.nodes.push(i),this._nodes.push(i)}_endBlockNode(i,t){let n=this._currNode;if(n instanceof i||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${i.kind}/${t.kind}`:i.kind}"`)}_elseNode(i){let t=this._currNode;if(!(t instanceof ba))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=i,this}get _root(){return this._nodes[0]}get _currNode(){let i=this._nodes;return i[i.length-1]}set _currNode(i){let t=this._nodes;t[t.length-1]=i}};ce.CodeGen=yl;function cn(e,i){for(let t in i)e[t]=(e[t]||0)+(i[t]||0);return e}function xa(e,i){return i instanceof ge._CodeOrName?cn(e,i.names):e}function An(e,i,t){if(e instanceof ge.Name)return n(e);if(!r(e))return e;return new ge._Code(e._items.reduce((o,a)=>(a instanceof ge.Name&&(a=n(a)),a instanceof ge._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=t[o.str];return a===void 0||i[o.str]!==1?o:(delete i[o.str],a)}function r(o){return o instanceof ge._Code&&o._items.some(a=>a instanceof ge.Name&&i[a.str]===1&&t[a.str]!==void 0)}}function aw(e,i){for(let t in i)e[t]=(e[t]||0)-(i[t]||0)}function jp(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ge._)`!${bl(e)}`}ce.not=jp;var sw=Vp(ce.operators.AND);function lw(...e){return e.reduce(sw)}ce.and=lw;var uw=Vp(ce.operators.OR);function cw(...e){return e.reduce(uw)}ce.or=cw;function Vp(e){return(i,t)=>i===ge.nil?t:t===ge.nil?i:(0,ge._)`${bl(i)} ${e} ${bl(t)}`}function bl(e){return e instanceof ge.Name?e:(0,ge._)`(${e})`}});var pe=g(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.checkStrictMode=de.getErrorPath=de.Type=de.useFunc=de.setEvaluated=de.evaluatedPropsToName=de.mergeEvaluated=de.eachItem=de.unescapeJsonPointer=de.escapeJsonPointer=de.escapeFragment=de.unescapeFragment=de.schemaRefOrVal=de.schemaHasRulesButRef=de.schemaHasRules=de.checkUnknownRules=de.alwaysValidSchema=de.toHash=void 0;var Ee=ee(),dw=Sr();function pw(e){let i={};for(let t of e)i[t]=!0;return i}de.toHash=pw;function fw(e,i){return typeof i=="boolean"?i:Object.keys(i).length===0?!0:(Lp(e,i),!Up(i,e.self.RULES.all))}de.alwaysValidSchema=fw;function Lp(e,i=e.schema){let{opts:t,self:n}=e;if(!t.strictSchema||typeof i=="boolean")return;let r=n.RULES.keywords;for(let o in i)r[o]||Wp(e,`unknown keyword: "${o}"`)}de.checkUnknownRules=Lp;function Up(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(i[t])return!0;return!1}de.schemaHasRules=Up;function mw(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&i.all[t])return!0;return!1}de.schemaHasRulesButRef=mw;function hw({topSchemaRef:e,schemaPath:i},t,n,r){if(!r){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Ee._)`${t}`}return(0,Ee._)`${e}${i}${(0,Ee.getProperty)(n)}`}de.schemaRefOrVal=hw;function gw(e){return zp(decodeURIComponent(e))}de.unescapeFragment=gw;function _w(e){return encodeURIComponent(Cl(e))}de.escapeFragment=_w;function Cl(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}de.escapeJsonPointer=Cl;function zp(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}de.unescapeJsonPointer=zp;function yw(e,i){if(Array.isArray(e))for(let t of e)i(t);else i(e)}de.eachItem=yw;function Bp({mergeNames:e,mergeToName:i,mergeValues:t,resultToName:n}){return(r,o,a,s)=>{let l=a===void 0?o:a instanceof Ee.Name?(o instanceof Ee.Name?e(r,o,a):i(r,o,a),a):o instanceof Ee.Name?(i(r,a,o),o):t(o,a);return s===Ee.Name&&!(l instanceof Ee.Name)?n(r,l):l}}de.mergeEvaluated={props:Bp({mergeNames:(e,i,t)=>e.if((0,Ee._)`${t} !== true && ${i} !== undefined`,()=>{e.if((0,Ee._)`${i} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Ee._)`${t} || {}`).code((0,Ee._)`Object.assign(${t}, ${i})`))}),mergeToName:(e,i,t)=>e.if((0,Ee._)`${t} !== true`,()=>{i===!0?e.assign(t,!0):(e.assign(t,(0,Ee._)`${t} || {}`),xl(e,t,i))}),mergeValues:(e,i)=>e===!0?!0:X(X({},e),i),resultToName:Hp}),items:Bp({mergeNames:(e,i,t)=>e.if((0,Ee._)`${t} !== true && ${i} !== undefined`,()=>e.assign(t,(0,Ee._)`${i} === true ? true : ${t} > ${i} ? ${t} : ${i}`)),mergeToName:(e,i,t)=>e.if((0,Ee._)`${t} !== true`,()=>e.assign(t,i===!0?!0:(0,Ee._)`${t} > ${i} ? ${t} : ${i}`)),mergeValues:(e,i)=>e===!0?!0:Math.max(e,i),resultToName:(e,i)=>e.var("items",i)})};function Hp(e,i){if(i===!0)return e.var("props",!0);let t=e.var("props",(0,Ee._)`{}`);return i!==void 0&&xl(e,t,i),t}de.evaluatedPropsToName=Hp;function xl(e,i,t){Object.keys(t).forEach(n=>e.assign((0,Ee._)`${i}${(0,Ee.getProperty)(n)}`,!0))}de.setEvaluated=xl;var Rp={};function bw(e,i){return e.scopeValue("func",{ref:i,code:Rp[i.code]||(Rp[i.code]=new dw._Code(i.code))})}de.useFunc=bw;var vl=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(vl||(de.Type=vl={}));function vw(e,i,t){if(e instanceof Ee.Name){let n=i===vl.Num;return t?n?(0,Ee._)`"[" + ${e} + "]"`:(0,Ee._)`"['" + ${e} + "']"`:n?(0,Ee._)`"/" + ${e}`:(0,Ee._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Ee.getProperty)(e).toString():"/"+Cl(e)}de.getErrorPath=vw;function Wp(e,i,t=e.opts.strictSchema){if(t){if(i=`strict mode: ${i}`,t===!0)throw new Error(i);e.self.logger.warn(i)}}de.checkStrictMode=Wp});var Vt=g(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});var ot=ee(),Cw={data:new ot.Name("data"),valCxt:new ot.Name("valCxt"),instancePath:new ot.Name("instancePath"),parentData:new ot.Name("parentData"),parentDataProperty:new ot.Name("parentDataProperty"),rootData:new ot.Name("rootData"),dynamicAnchors:new ot.Name("dynamicAnchors"),vErrors:new ot.Name("vErrors"),errors:new ot.Name("errors"),this:new ot.Name("this"),self:new ot.Name("self"),scope:new ot.Name("scope"),json:new ot.Name("json"),jsonPos:new ot.Name("jsonPos"),jsonLen:new ot.Name("jsonLen"),jsonPart:new ot.Name("jsonPart")};wl.default=Cw});var Er=g(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.extendErrors=at.resetErrorsCount=at.reportExtraError=at.reportError=at.keyword$DataError=at.keywordError=void 0;var ye=ee(),Sa=pe(),gt=Vt();at.keywordError={message:({keyword:e})=>(0,ye.str)`must pass "${e}" keyword validation`};at.keyword$DataError={message:({keyword:e,schemaType:i})=>i?(0,ye.str)`"${e}" keyword must be ${i} ($data)`:(0,ye.str)`"${e}" keyword is invalid ($data)`};function xw(e,i=at.keywordError,t,n){let{it:r}=e,{gen:o,compositeRule:a,allErrors:s}=r,l=Jp(e,i,t);n??(a||s)?Kp(o,l):Gp(r,(0,ye._)`[${l}]`)}at.reportError=xw;function ww(e,i=at.keywordError,t){let{it:n}=e,{gen:r,compositeRule:o,allErrors:a}=n,s=Jp(e,i,t);Kp(r,s),o||a||Gp(n,gt.default.vErrors)}at.reportExtraError=ww;function Iw(e,i){e.assign(gt.default.errors,i),e.if((0,ye._)`${gt.default.vErrors} !== null`,()=>e.if(i,()=>e.assign((0,ye._)`${gt.default.vErrors}.length`,i),()=>e.assign(gt.default.vErrors,null)))}at.resetErrorsCount=Iw;function Sw({gen:e,keyword:i,schemaValue:t,data:n,errsCount:r,it:o}){if(r===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",r,gt.default.errors,s=>{e.const(a,(0,ye._)`${gt.default.vErrors}[${s}]`),e.if((0,ye._)`${a}.instancePath === undefined`,()=>e.assign((0,ye._)`${a}.instancePath`,(0,ye.strConcat)(gt.default.instancePath,o.errorPath))),e.assign((0,ye._)`${a}.schemaPath`,(0,ye.str)`${o.errSchemaPath}/${i}`),o.opts.verbose&&(e.assign((0,ye._)`${a}.schema`,t),e.assign((0,ye._)`${a}.data`,n))})}at.extendErrors=Sw;function Kp(e,i){let t=e.const("err",i);e.if((0,ye._)`${gt.default.vErrors} === null`,()=>e.assign(gt.default.vErrors,(0,ye._)`[${t}]`),(0,ye._)`${gt.default.vErrors}.push(${t})`),e.code((0,ye._)`${gt.default.errors}++`)}function Gp(e,i){let{gen:t,validateName:n,schemaEnv:r}=e;r.$async?t.throw((0,ye._)`new ${e.ValidationError}(${i})`):(t.assign((0,ye._)`${n}.errors`,i),t.return(!1))}var dn={keyword:new ye.Name("keyword"),schemaPath:new ye.Name("schemaPath"),params:new ye.Name("params"),propertyName:new ye.Name("propertyName"),message:new ye.Name("message"),schema:new ye.Name("schema"),parentSchema:new ye.Name("parentSchema")};function Jp(e,i,t){let{createErrors:n}=e.it;return n===!1?(0,ye._)`{}`:$w(e,i,t)}function $w(e,i,t={}){let{gen:n,it:r}=e,o=[Ew(r,t),Pw(e,t)];return Tw(e,i,o),n.object(...o)}function Ew({errorPath:e},{instancePath:i}){let t=i?(0,ye.str)`${e}${(0,Sa.getErrorPath)(i,Sa.Type.Str)}`:e;return[gt.default.instancePath,(0,ye.strConcat)(gt.default.instancePath,t)]}function Pw({keyword:e,it:{errSchemaPath:i}},{schemaPath:t,parentSchema:n}){let r=n?i:(0,ye.str)`${i}/${e}`;return t&&(r=(0,ye.str)`${r}${(0,Sa.getErrorPath)(t,Sa.Type.Str)}`),[dn.schemaPath,r]}function Tw(e,{params:i,message:t},n){let{keyword:r,data:o,schemaValue:a,it:s}=e,{opts:l,propertyName:u,topSchemaRef:c,schemaPath:p}=s;n.push([dn.keyword,r],[dn.params,typeof i=="function"?i(e):i||(0,ye._)`{}`]),l.messages&&n.push([dn.message,typeof t=="function"?t(e):t]),l.verbose&&n.push([dn.schema,a],[dn.parentSchema,(0,ye._)`${c}${p}`],[gt.default.data,o]),u&&n.push([dn.propertyName,u])}});var Yp=g(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.boolOrEmptySchema=qn.topBoolOrEmptySchema=void 0;var kw=Er(),Mw=ee(),Ow=Vt(),Dw={message:"boolean schema is false"};function Nw(e){let{gen:i,schema:t,validateName:n}=e;t===!1?Xp(e,!1):typeof t=="object"&&t.$async===!0?i.return(Ow.default.data):(i.assign((0,Mw._)`${n}.errors`,null),i.return(!0))}qn.topBoolOrEmptySchema=Nw;function Fw(e,i){let{gen:t,schema:n}=e;n===!1?(t.var(i,!1),Xp(e)):t.var(i,!0)}qn.boolOrEmptySchema=Fw;function Xp(e,i){let{gen:t,data:n}=e,r={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,kw.reportError)(r,Dw,void 0,i)}});var Il=g(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.getRules=jn.isJSONType=void 0;var Aw=["string","number","integer","boolean","null","object","array"],qw=new Set(Aw);function jw(e){return typeof e=="string"&&qw.has(e)}jn.isJSONType=jw;function Vw(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:$e(X({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}jn.getRules=Vw});var Sl=g(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.shouldUseRule=Bi.shouldUseGroup=Bi.schemaHasRulesForType=void 0;function Bw({schema:e,self:i},t){let n=i.RULES.types[t];return n&&n!==!0&&Qp(e,n)}Bi.schemaHasRulesForType=Bw;function Qp(e,i){return i.rules.some(t=>Zp(e,t))}Bi.shouldUseGroup=Qp;function Zp(e,i){var t;return e[i.keyword]!==void 0||((t=i.definition.implements)===null||t===void 0?void 0:t.some(n=>e[n]!==void 0))}Bi.shouldUseRule=Zp});var Pr=g(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.reportTypeError=st.checkDataTypes=st.checkDataType=st.coerceAndCheckDataType=st.getJSONTypes=st.getSchemaTypes=st.DataType=void 0;var Rw=Il(),Lw=Sl(),Uw=Er(),ae=ee(),ef=pe(),Vn=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(Vn||(st.DataType=Vn={}));function zw(e){let i=tf(e.type);if(i.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!i.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&i.push("null")}return i}st.getSchemaTypes=zw;function tf(e){let i=Array.isArray(e)?e:e?[e]:[];if(i.every(Rw.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}st.getJSONTypes=tf;function Hw(e,i){let{gen:t,data:n,opts:r}=e,o=Ww(i,r.coerceTypes),a=i.length>0&&!(o.length===0&&i.length===1&&(0,Lw.schemaHasRulesForType)(e,i[0]));if(a){let s=El(i,n,r.strictNumbers,Vn.Wrong);t.if(s,()=>{o.length?Kw(e,i,o):Pl(e)})}return a}st.coerceAndCheckDataType=Hw;var nf=new Set(["string","number","integer","boolean","null"]);function Ww(e,i){return i?e.filter(t=>nf.has(t)||i==="array"&&t==="array"):[]}function Kw(e,i,t){let{gen:n,data:r,opts:o}=e,a=n.let("dataType",(0,ae._)`typeof ${r}`),s=n.let("coerced",(0,ae._)`undefined`);o.coerceTypes==="array"&&n.if((0,ae._)`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>n.assign(r,(0,ae._)`${r}[0]`).assign(a,(0,ae._)`typeof ${r}`).if(El(i,r,o.strictNumbers),()=>n.assign(s,r))),n.if((0,ae._)`${s} !== undefined`);for(let u of t)(nf.has(u)||u==="array"&&o.coerceTypes==="array")&&l(u);n.else(),Pl(e),n.endIf(),n.if((0,ae._)`${s} !== undefined`,()=>{n.assign(r,s),Gw(e,s)});function l(u){switch(u){case"string":n.elseIf((0,ae._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,ae._)`"" + ${r}`).elseIf((0,ae._)`${r} === null`).assign(s,(0,ae._)`""`);return;case"number":n.elseIf((0,ae._)`${a} == "boolean" || ${r} === null
3
3
  || (${a} == "string" && ${r} && ${r} == +${r})`).assign(s,(0,ae._)`+${r}`);return;case"integer":n.elseIf((0,ae._)`${a} === "boolean" || ${r} === null
4
4
  || (${a} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(s,(0,ae._)`+${r}`);return;case"boolean":n.elseIf((0,ae._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(s,!1).elseIf((0,ae._)`${r} === "true" || ${r} === 1`).assign(s,!0);return;case"null":n.elseIf((0,ae._)`${r} === "" || ${r} === 0 || ${r} === false`),n.assign(s,null);return;case"array":n.elseIf((0,ae._)`${a} === "string" || ${a} === "number"