homebridge-config-ui-x 5.6.2-beta.2 → 5.6.2-beta.3

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 (67) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/dist/modules/server/server.controller.js +0 -1
  3. package/dist/modules/server/server.controller.js.map +1 -1
  4. package/package.json +5 -5
  5. package/public/{chunk-WR5TGG72.js → chunk-2AKQTDK2.js} +1 -1
  6. package/public/chunk-2EXPOLE6.js +1 -0
  7. package/public/{chunk-IW6DT2SE.js → chunk-36W6YTL5.js} +2 -2
  8. package/public/{chunk-ZB7TQGBZ.js → chunk-3F5BIND2.js} +1 -1
  9. package/public/{chunk-5SWVVJSC.js → chunk-3GHYGIKS.js} +1 -1
  10. package/public/{chunk-BDTKGTOE.js → chunk-4SBLGP5S.js} +1 -1
  11. package/public/{chunk-RQKVW2ZC.js → chunk-546OL3I5.js} +1 -1
  12. package/public/{chunk-UIQOZHHM.js → chunk-55Q6EZGV.js} +1 -1
  13. package/public/{chunk-C6C3NP6I.js → chunk-57USPN63.js} +1 -1
  14. package/public/chunk-5HTOQ66O.js +1 -0
  15. package/public/{chunk-EB7E45SR.js → chunk-5U6QEGMI.js} +1 -1
  16. package/public/{chunk-Y5HOKHBZ.js → chunk-72ARQWTQ.js} +1 -1
  17. package/public/chunk-7VJ7U6KC.js +1 -0
  18. package/public/{chunk-ZPG7UZ7W.js → chunk-A36BWWK3.js} +1 -1
  19. package/public/{chunk-RSBMRMAW.js → chunk-AA4REKSK.js} +1 -1
  20. package/public/{chunk-OJQXN3QX.js → chunk-AGEX2BP6.js} +1 -1
  21. package/public/chunk-ARORIS5Y.js +1 -0
  22. package/public/chunk-AYY2VA7S.js +1 -0
  23. package/public/{chunk-WKFLDFR6.js → chunk-B3WZBAWL.js} +1 -1
  24. package/public/{chunk-2FUA6DPF.js → chunk-BOFQVJNK.js} +1 -1
  25. package/public/chunk-BYLMWAKC.js +1 -0
  26. package/public/{chunk-LTPFSY7M.js → chunk-DJERPV5R.js} +1 -1
  27. package/public/{chunk-AFWEHAAR.js → chunk-DVZ3YL7I.js} +1 -1
  28. package/public/{chunk-RGEY72RU.js → chunk-E762XFMI.js} +1 -1
  29. package/public/{chunk-JUWNIIQD.js → chunk-EDO563GI.js} +1 -1
  30. package/public/{chunk-PTNHSUBI.js → chunk-HIPMWDXV.js} +1 -1
  31. package/public/{chunk-IN3J6C7O.js → chunk-HOXTULXI.js} +1 -1
  32. package/public/{chunk-PBVR4TJQ.js → chunk-J743S3EV.js} +1 -1
  33. package/public/{chunk-RICW3V5D.js → chunk-JF53BTNR.js} +1 -1
  34. package/public/{chunk-OOIVZDCG.js → chunk-JUVYAPCW.js} +1 -1
  35. package/public/{chunk-NRZKPX6L.js → chunk-JXYRZXHD.js} +1 -1
  36. package/public/{chunk-B4KF62VC.js → chunk-KT5YSOXO.js} +1 -1
  37. package/public/{chunk-VX4IHYYQ.js → chunk-N3CNSNVN.js} +1 -1
  38. package/public/chunk-O3NFPA75.js +1 -0
  39. package/public/{chunk-OMEIYK6R.js → chunk-OA6WLAM2.js} +1 -1
  40. package/public/{chunk-NFRK43GL.js → chunk-OVARMF6W.js} +2 -2
  41. package/public/{chunk-ESIPDXUL.js → chunk-QDMF6BOL.js} +1 -1
  42. package/public/{chunk-ICDOBRQN.js → chunk-QO4FJH55.js} +1 -1
  43. package/public/{chunk-R6V2O5RO.js → chunk-RM6ZRRFA.js} +1 -1
  44. package/public/{chunk-H2GZVBSI.js → chunk-SO446G3M.js} +1 -1
  45. package/public/{chunk-ZZUUTANK.js → chunk-SOOM4MXN.js} +1 -1
  46. package/public/{chunk-FD5UNC3T.js → chunk-U7F7IBMH.js} +1 -1
  47. package/public/{chunk-GHUPITEM.js → chunk-V6PG2WY3.js} +1 -1
  48. package/public/{chunk-AXNZKZGU.js → chunk-VW52SC3D.js} +1 -1
  49. package/public/chunk-WSDYJWQD.js +1 -0
  50. package/public/{chunk-Y4NVDTD6.js → chunk-WXWGOW2V.js} +1 -1
  51. package/public/chunk-X3WPXPQW.js +1 -0
  52. package/public/{chunk-PCBKUYD2.js → chunk-YNCF23QK.js} +1 -1
  53. package/public/{chunk-ECKD2Q3W.js → chunk-YO25OOIG.js} +1 -1
  54. package/public/{chunk-SDW7ATDJ.js → chunk-Z23NNQSY.js} +1 -1
  55. package/public/{chunk-FFMVREJO.js → chunk-ZPVJRQ5M.js} +1 -1
  56. package/public/{chunk-VIEDDNZ4.js → chunk-ZZ3RKEVV.js} +1 -1
  57. package/public/index.html +1 -1
  58. package/public/{main-KP5N7IBR.js → main-YNYFOLF2.js} +1 -1
  59. package/public/chunk-5HU6AHKM.js +0 -1
  60. package/public/chunk-5ZZ7J4SL.js +0 -1
  61. package/public/chunk-DDPZULEU.js +0 -1
  62. package/public/chunk-DEBBH3A3.js +0 -1
  63. package/public/chunk-FUZA2OVQ.js +0 -1
  64. package/public/chunk-KKZJALOM.js +0 -1
  65. package/public/chunk-TXTVM2G5.js +0 -1
  66. package/public/chunk-VY7CS3VD.js +0 -1
  67. package/public/chunk-XGRVEK24.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as Qv}from"./chunk-IN3J6C7O.js";import{a as Pp,c as Gv,d as Wv,e as Zv,f as pn,g as _R,h as zp}from"./chunk-Y5HOKHBZ.js";import{a as Fv}from"./chunk-NR4KD4TZ.js";import{a as Lv}from"./chunk-WIZAF6OS.js";import{a as Jv}from"./chunk-PCBKUYD2.js";import{a as qv,b as Kv,c as $v}from"./chunk-MO7W4MOJ.js";import{a as ja}from"./chunk-BU6Y5VTM.js";import{a as Yv}from"./chunk-XOZXV7OE.js";import{a as pd,b as gn}from"./chunk-Y276Q4AC.js";import{a as dn,b as un}from"./chunk-2XYBM4MH.js";import{a as Vv}from"./chunk-RGEY72RU.js";import{a as ad,b as ld,c as cd,d as dd,e as ud,f as gd,g as cn,m as zt,n as Di,o as Ev,p as Mv,q as Uv,r as Rv,s as Ov,t as Ko}from"./chunk-3ZU7ZAMP.js";import{A as Bv,B as xs,C as Aa,a as Iv,b as Oo,c as wr,e as li,f as Tv,h as Pv,i as zv,j as Av,k as jv,l as cs,m as Nv,o as Dv,p as Fo,s as ln,t as Vo,u as Tp,v as qo}from"./chunk-MCPFJTIS.js";import{a as Lo}from"./chunk-FFMVREJO.js";import{d as Fs}from"./chunk-6LB7WDKS.js";import{b as jt}from"./chunk-AFWEHAAR.js";import{k as nt,l as At,n as at,p as $o,q as tt}from"./chunk-DEBBH3A3.js";import{$ as Ta,$c as Cv,Ac as rd,Ba as rn,D as mv,Db as ae,Ga as Ve,Gb as Q,Hb as sd,Ib as x,Ka as yv,Kc as Ni,La as m,Lc as Ro,M as sn,Mb as xp,Mc as ai,Nb as Cp,Ob as Ip,Pa as Qc,Pb as Bo,Qa as co,Qb as Eo,Rb as kv,Sa as br,Sb as Hs,Tb as Os,Tc as nd,Ub as fe,Vb as A,Wa as we,Wb as le,Xa as nn,Xb as ie,Xc as xv,Y as Sp,Ya as yr,Yb as Mo,Za as vv,Zb as od,a as be,ab as Ie,ac as dt,b as Xe,bb as wv,bc as ut,c as cv,cb as Xc,cc as gt,da as _v,dc as Hv,e as w,ea as vi,ec as Sv,fa as on,fc as pt,g as ct,gc as Ss,h as _e,ha as hv,hc as vr,ia as fv,ic as Si,ja as V,jc as an,k as dv,kb as pe,lb as R,mb as O,mc as N,n as Yi,nc as M,o as Hp,oa as J,ob as wi,oc as Et,pa as Z,pb as ki,q as uv,qb as Hi,rb as I,sb as y,tb as b,ub as E,v as gv,vb as ed,vc as xi,w as Ue,wa as Zc,wb as td,wc as re,x as pv,xb as id,xc as Uo,ya as Do,yb as Pa,za as bv,zb as za}from"./chunk-WWMJUVLA.js";var nw=w(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.formatNames=qs.fastFormats=qs.fullFormats=void 0;function Vs(e,i){return{validate:e,compare:i}}qs.fullFormats={date:Vs(iw,Dp),time:Vs(jp(!0),Bp),"date-time":Vs(Xv(!0),ow),"iso-time":Vs(jp(),sw),"iso-date-time":Vs(Xv(),rw),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:wR,"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|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\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:TR,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:kR,int32:{type:"number",validate:xR},int64:{type:"number",validate:CR},float:{type:"number",validate:tw},double:{type:"number",validate:tw},password:!0,binary:!0};qs.fastFormats=Xe(be({},qs.fullFormats),{date:Vs(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Dp),time:Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Bp),"date-time":Vs(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,ow),"iso-time":Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,sw),"iso-date-time":Vs(/^\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,rw),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});qs.formatNames=Object.keys(qs.fullFormats);function hR(e){return e%4===0&&(e%100!==0||e%400===0)}var fR=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,bR=[0,31,28,31,30,31,30,31,31,30,31,30,31];function iw(e){let i=fR.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],o=+i[3];return s>=1&&s<=12&&o>=1&&o<=(s===2&&hR(t)?29:bR[s])}function Dp(e,i){if(e&&i)return e>i?1:e<i?-1:0}var Ap=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function jp(e){return function(t){let s=Ap.exec(t);if(!s)return!1;let o=+s[1],n=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,p=+(s[6]||0),_=+(s[7]||0);if(p>23||_>59||e&&!c)return!1;if(o<=23&&n<=59&&l<60)return!0;let f=n-_*u,S=o-p*u-(f<0?1:0);return(S===23||S===-1)&&(f===59||f===-1)&&l<61}}function Bp(e,i){if(!(e&&i))return;let t=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+i).valueOf();if(t&&s)return t-s}function sw(e,i){if(!(e&&i))return;let t=Ap.exec(e),s=Ap.exec(i);if(t&&s)return e=t[1]+t[2]+t[3],i=s[1]+s[2]+s[3],e>i?1:e<i?-1:0}var Np=/t|\s/i;function Xv(e){let i=jp(e);return function(s){let o=s.split(Np);return o.length===2&&iw(o[0])&&i(o[1])}}function ow(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function rw(e,i){if(!(e&&i))return;let[t,s]=e.split(Np),[o,n]=i.split(Np),l=Dp(t,o);if(l!==void 0)return l||Bp(s,n)}var yR=/\/|:/,vR=/^(?:[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 wR(e){return yR.test(e)&&vR.test(e)}var ew=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function kR(e){return ew.lastIndex=0,ew.test(e)}var HR=-(2**31),SR=2**31-1;function xR(e){return Number.isInteger(e)&&e<=SR&&e>=HR}function CR(e){return Number.isInteger(e)}function tw(){return!0}var IR=/[^\\]\\Z/;function TR(e){if(IR.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Ba=w(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.regexpCode=et.getEsmExportName=et.getProperty=et.safeStringify=et.stringify=et.strConcat=et.addCodeArg=et.str=et._=et.nil=et._Code=et.Name=et.IDENTIFIER=et._CodeOrName=void 0;var Na=class{};et._CodeOrName=Na;et.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var kr=class extends Na{constructor(i){if(super(),!et.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}}};et.Name=kr;var ds=class extends Na{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,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof kr&&(t[s.str]=(t[s.str]||0)+1),t),{})}};et._Code=ds;et.nil=new ds("");function aw(e,...i){let t=[e[0]],s=0;for(;s<i.length;)Mp(t,i[s]),t.push(e[++s]);return new ds(t)}et._=aw;var Ep=new ds("+");function lw(e,...i){let t=[Da(e[0])],s=0;for(;s<i.length;)t.push(Ep),Mp(t,i[s]),t.push(Ep,Da(e[++s]));return PR(t),new ds(t)}et.str=lw;function Mp(e,i){i instanceof ds?e.push(...i._items):i instanceof kr?e.push(i):e.push(jR(i))}et.addCodeArg=Mp;function PR(e){let i=1;for(;i<e.length-1;){if(e[i]===Ep){let t=zR(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function zR(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof kr||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 kr))return`"${e}${i.slice(1)}`}function AR(e,i){return i.emptyStr()?e:e.emptyStr()?i:lw`${e}${i}`}et.strConcat=AR;function jR(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Da(Array.isArray(e)?e.join(","):e)}function NR(e){return new ds(Da(e))}et.stringify=NR;function Da(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}et.safeStringify=Da;function DR(e){return typeof e=="string"&&et.IDENTIFIER.test(e)?new ds(`.${e}`):aw`[${e}]`}et.getProperty=DR;function BR(e){if(typeof e=="string"&&et.IDENTIFIER.test(e))return new ds(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}et.getEsmExportName=BR;function ER(e){return new ds(e.toString())}et.regexpCode=ER});var Op=w(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.ValueScope=Ei.ValueScopeName=Ei.Scope=Ei.varKinds=Ei.UsedValueState=void 0;var Bi=Ba(),Up=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},md=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(md||(Ei.UsedValueState=md={}));Ei.varKinds={const:new Bi.Name("const"),let:new Bi.Name("let"),var:new Bi.Name("var")};var _d=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof Bi.Name?i:this.name(i)}name(i){return new Bi.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.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}}};Ei.Scope=_d;var hd=class extends Bi.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,Bi._)`.${new Bi.Name(t)}[${s}]`}};Ei.ValueScopeName=hd;var MR=(0,Bi._)`\n`,Rp=class extends _d{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=Xe(be({},i),{_n:i.lines?MR:Bi.nil})}get(){return this._scope}name(i){return new hd(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:n}=o,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[n];if(c){let _=c.get(l);if(_)return _}else c=this._values[n]=new Map;c.set(l,o);let u=this._scope[n]||(this._scope[n]=[]),p=u.length;return u[p]=t.ref,o.setValue(t,{property:n,itemIndex:p}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,Bi._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let n=Bi.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(p=>{if(u.has(p))return;u.set(p,md.Started);let _=t(p);if(_){let f=this.opts.es5?Ei.varKinds.var:Ei.varKinds.const;n=(0,Bi._)`${n}${f} ${p} = ${_};${this.opts._n}`}else if(_=o?.(p))n=(0,Bi._)`${n}${_}${this.opts._n}`;else throw new Up(p);u.set(p,md.Completed)})}return n}};Ei.ValueScope=Rp});var ke=w(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.or=Fe.and=Fe.not=Fe.CodeGen=Fe.operators=Fe.varKinds=Fe.ValueScopeName=Fe.ValueScope=Fe.Scope=Fe.Name=Fe.regexpCode=Fe.stringify=Fe.getProperty=Fe.nil=Fe.strConcat=Fe.str=Fe._=void 0;var Je=Ba(),Cs=Op(),Go=Ba();Object.defineProperty(Fe,"_",{enumerable:!0,get:function(){return Go._}});Object.defineProperty(Fe,"str",{enumerable:!0,get:function(){return Go.str}});Object.defineProperty(Fe,"strConcat",{enumerable:!0,get:function(){return Go.strConcat}});Object.defineProperty(Fe,"nil",{enumerable:!0,get:function(){return Go.nil}});Object.defineProperty(Fe,"getProperty",{enumerable:!0,get:function(){return Go.getProperty}});Object.defineProperty(Fe,"stringify",{enumerable:!0,get:function(){return Go.stringify}});Object.defineProperty(Fe,"regexpCode",{enumerable:!0,get:function(){return Go.regexpCode}});Object.defineProperty(Fe,"Name",{enumerable:!0,get:function(){return Go.Name}});var wd=Op();Object.defineProperty(Fe,"Scope",{enumerable:!0,get:function(){return wd.Scope}});Object.defineProperty(Fe,"ValueScope",{enumerable:!0,get:function(){return wd.ValueScope}});Object.defineProperty(Fe,"ValueScopeName",{enumerable:!0,get:function(){return wd.ValueScopeName}});Object.defineProperty(Fe,"varKinds",{enumerable:!0,get:function(){return wd.varKinds}});Fe.operators={GT:new Je._Code(">"),GTE:new Je._Code(">="),LT:new Je._Code("<"),LTE:new Je._Code("<="),EQ:new Je._Code("==="),NEQ:new Je._Code("!=="),NOT:new Je._Code("!"),OR:new Je._Code("||"),AND:new Je._Code("&&"),ADD:new Je._Code("+")};var uo=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},Fp=class extends uo{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?Cs.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=_n(this.rhs,i,t)),this}get names(){return this.rhs instanceof Je._CodeOrName?this.rhs.names:{}}},bd=class extends uo{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof Je.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=_n(this.rhs,i,t),this}get names(){let i=this.lhs instanceof Je.Name?{}:be({},this.lhs.names);return vd(i,this.rhs)}},Vp=class extends bd{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},qp=class extends uo{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},Kp=class extends uo{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},$p=class extends uo{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},Lp=class extends uo{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=_n(this.code,i,t),this}get names(){return this.code instanceof Je._CodeOrName?this.code.names:{}}},Ea=class extends uo{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let n=s[o];n.optimizeNames(i,t)||(UR(i,n.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>Hr(i,t.names),{})}},go=class extends Ea{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},Gp=class extends Ea{},Wp=(()=>{class e extends go{}return e.kind="else",e})(),fd=(()=>{class e extends go{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new Wp(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(pw(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=_n(this.condition,t,s),this}get names(){let t=super.names;return vd(t,this.condition),this.else&&Hr(t,this.else.names),t}}return e.kind="if",e})(),kd=(()=>{class e extends go{}return e.kind="for",e})(),Yp=class extends kd{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=_n(this.iteration,i,t),this}get names(){return Hr(super.names,this.iteration.names)}},Jp=class extends kd{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?Cs.varKinds.var:this.varKind,{name:s,from:o,to:n}=this;return`for(${t} ${s}=${o}; ${s}<${n}; ${s}++)`+super.render(i)}get names(){let i=vd(super.names,this.from);return vd(i,this.to)}},yd=class extends kd{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}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=_n(this.iterable,i,t),this}get names(){return Hr(super.names,this.iterable.names)}},cw=(()=>{class e extends go{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),dw=(()=>{class e extends Ea{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Zp=class extends go{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 s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&Hr(i,this.catch.names),this.finally&&Hr(i,this.finally.names),i}},uw=(()=>{class e extends go{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),gw=(()=>{class e extends go{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Qp=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Xe(be({},t),{_n:t.lines?`
1
+ import{a as Qv}from"./chunk-HOXTULXI.js";import{a as Pp,c as Gv,d as Wv,e as Zv,f as pn,g as _R,h as zp}from"./chunk-72ARQWTQ.js";import{a as Fv}from"./chunk-NR4KD4TZ.js";import{a as Lv}from"./chunk-WIZAF6OS.js";import{a as Jv}from"./chunk-YNCF23QK.js";import{a as qv,b as Kv,c as $v}from"./chunk-MO7W4MOJ.js";import{a as ja}from"./chunk-BU6Y5VTM.js";import{a as Yv}from"./chunk-XOZXV7OE.js";import{a as pd,b as gn}from"./chunk-Y276Q4AC.js";import{a as dn,b as un}from"./chunk-2XYBM4MH.js";import{a as Vv}from"./chunk-E762XFMI.js";import{a as ad,b as ld,c as cd,d as dd,e as ud,f as gd,g as cn,m as zt,n as Di,o as Ev,p as Mv,q as Uv,r as Rv,s as Ov,t as Ko}from"./chunk-3ZU7ZAMP.js";import{A as Bv,B as xs,C as Aa,a as Iv,b as Oo,c as wr,e as li,f as Tv,h as Pv,i as zv,j as Av,k as jv,l as cs,m as Nv,o as Dv,p as Fo,s as ln,t as Vo,u as Tp,v as qo}from"./chunk-MCPFJTIS.js";import{a as Lo}from"./chunk-ZPVJRQ5M.js";import{d as Fs}from"./chunk-6LB7WDKS.js";import{b as jt}from"./chunk-DVZ3YL7I.js";import{k as nt,l as At,n as at,p as $o,q as tt}from"./chunk-O3NFPA75.js";import{$ as Ta,$c as Cv,Ac as rd,Ba as rn,D as mv,Db as ae,Ga as Ve,Gb as Q,Hb as sd,Ib as x,Ka as yv,Kc as Ni,La as m,Lc as Ro,M as sn,Mb as xp,Mc as ai,Nb as Cp,Ob as Ip,Pa as Qc,Pb as Bo,Qa as co,Qb as Eo,Rb as kv,Sa as br,Sb as Hs,Tb as Os,Tc as nd,Ub as fe,Vb as A,Wa as we,Wb as le,Xa as nn,Xb as ie,Xc as xv,Y as Sp,Ya as yr,Yb as Mo,Za as vv,Zb as od,a as be,ab as Ie,ac as dt,b as Xe,bb as wv,bc as ut,c as cv,cb as Xc,cc as gt,da as _v,dc as Hv,e as w,ea as vi,ec as Sv,fa as on,fc as pt,g as ct,gc as Ss,h as _e,ha as hv,hc as vr,ia as fv,ic as Si,ja as V,jc as an,k as dv,kb as pe,lb as R,mb as O,mc as N,n as Yi,nc as M,o as Hp,oa as J,ob as wi,oc as Et,pa as Z,pb as ki,q as uv,qb as Hi,rb as I,sb as y,tb as b,ub as E,v as gv,vb as ed,vc as xi,w as Ue,wa as Zc,wb as td,wc as re,x as pv,xb as id,xc as Uo,ya as Do,yb as Pa,za as bv,zb as za}from"./chunk-WWMJUVLA.js";var nw=w(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.formatNames=qs.fastFormats=qs.fullFormats=void 0;function Vs(e,i){return{validate:e,compare:i}}qs.fullFormats={date:Vs(iw,Dp),time:Vs(jp(!0),Bp),"date-time":Vs(Xv(!0),ow),"iso-time":Vs(jp(),sw),"iso-date-time":Vs(Xv(),rw),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:wR,"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|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\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:TR,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:kR,int32:{type:"number",validate:xR},int64:{type:"number",validate:CR},float:{type:"number",validate:tw},double:{type:"number",validate:tw},password:!0,binary:!0};qs.fastFormats=Xe(be({},qs.fullFormats),{date:Vs(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Dp),time:Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Bp),"date-time":Vs(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,ow),"iso-time":Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,sw),"iso-date-time":Vs(/^\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,rw),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});qs.formatNames=Object.keys(qs.fullFormats);function hR(e){return e%4===0&&(e%100!==0||e%400===0)}var fR=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,bR=[0,31,28,31,30,31,30,31,31,30,31,30,31];function iw(e){let i=fR.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],o=+i[3];return s>=1&&s<=12&&o>=1&&o<=(s===2&&hR(t)?29:bR[s])}function Dp(e,i){if(e&&i)return e>i?1:e<i?-1:0}var Ap=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function jp(e){return function(t){let s=Ap.exec(t);if(!s)return!1;let o=+s[1],n=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,p=+(s[6]||0),_=+(s[7]||0);if(p>23||_>59||e&&!c)return!1;if(o<=23&&n<=59&&l<60)return!0;let f=n-_*u,S=o-p*u-(f<0?1:0);return(S===23||S===-1)&&(f===59||f===-1)&&l<61}}function Bp(e,i){if(!(e&&i))return;let t=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+i).valueOf();if(t&&s)return t-s}function sw(e,i){if(!(e&&i))return;let t=Ap.exec(e),s=Ap.exec(i);if(t&&s)return e=t[1]+t[2]+t[3],i=s[1]+s[2]+s[3],e>i?1:e<i?-1:0}var Np=/t|\s/i;function Xv(e){let i=jp(e);return function(s){let o=s.split(Np);return o.length===2&&iw(o[0])&&i(o[1])}}function ow(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function rw(e,i){if(!(e&&i))return;let[t,s]=e.split(Np),[o,n]=i.split(Np),l=Dp(t,o);if(l!==void 0)return l||Bp(s,n)}var yR=/\/|:/,vR=/^(?:[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 wR(e){return yR.test(e)&&vR.test(e)}var ew=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function kR(e){return ew.lastIndex=0,ew.test(e)}var HR=-(2**31),SR=2**31-1;function xR(e){return Number.isInteger(e)&&e<=SR&&e>=HR}function CR(e){return Number.isInteger(e)}function tw(){return!0}var IR=/[^\\]\\Z/;function TR(e){if(IR.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Ba=w(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.regexpCode=et.getEsmExportName=et.getProperty=et.safeStringify=et.stringify=et.strConcat=et.addCodeArg=et.str=et._=et.nil=et._Code=et.Name=et.IDENTIFIER=et._CodeOrName=void 0;var Na=class{};et._CodeOrName=Na;et.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var kr=class extends Na{constructor(i){if(super(),!et.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}}};et.Name=kr;var ds=class extends Na{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,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof kr&&(t[s.str]=(t[s.str]||0)+1),t),{})}};et._Code=ds;et.nil=new ds("");function aw(e,...i){let t=[e[0]],s=0;for(;s<i.length;)Mp(t,i[s]),t.push(e[++s]);return new ds(t)}et._=aw;var Ep=new ds("+");function lw(e,...i){let t=[Da(e[0])],s=0;for(;s<i.length;)t.push(Ep),Mp(t,i[s]),t.push(Ep,Da(e[++s]));return PR(t),new ds(t)}et.str=lw;function Mp(e,i){i instanceof ds?e.push(...i._items):i instanceof kr?e.push(i):e.push(jR(i))}et.addCodeArg=Mp;function PR(e){let i=1;for(;i<e.length-1;){if(e[i]===Ep){let t=zR(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function zR(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof kr||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 kr))return`"${e}${i.slice(1)}`}function AR(e,i){return i.emptyStr()?e:e.emptyStr()?i:lw`${e}${i}`}et.strConcat=AR;function jR(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Da(Array.isArray(e)?e.join(","):e)}function NR(e){return new ds(Da(e))}et.stringify=NR;function Da(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}et.safeStringify=Da;function DR(e){return typeof e=="string"&&et.IDENTIFIER.test(e)?new ds(`.${e}`):aw`[${e}]`}et.getProperty=DR;function BR(e){if(typeof e=="string"&&et.IDENTIFIER.test(e))return new ds(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}et.getEsmExportName=BR;function ER(e){return new ds(e.toString())}et.regexpCode=ER});var Op=w(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.ValueScope=Ei.ValueScopeName=Ei.Scope=Ei.varKinds=Ei.UsedValueState=void 0;var Bi=Ba(),Up=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},md=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(md||(Ei.UsedValueState=md={}));Ei.varKinds={const:new Bi.Name("const"),let:new Bi.Name("let"),var:new Bi.Name("var")};var _d=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof Bi.Name?i:this.name(i)}name(i){return new Bi.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.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}}};Ei.Scope=_d;var hd=class extends Bi.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,Bi._)`.${new Bi.Name(t)}[${s}]`}};Ei.ValueScopeName=hd;var MR=(0,Bi._)`\n`,Rp=class extends _d{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=Xe(be({},i),{_n:i.lines?MR:Bi.nil})}get(){return this._scope}name(i){return new hd(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:n}=o,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[n];if(c){let _=c.get(l);if(_)return _}else c=this._values[n]=new Map;c.set(l,o);let u=this._scope[n]||(this._scope[n]=[]),p=u.length;return u[p]=t.ref,o.setValue(t,{property:n,itemIndex:p}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,Bi._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let n=Bi.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(p=>{if(u.has(p))return;u.set(p,md.Started);let _=t(p);if(_){let f=this.opts.es5?Ei.varKinds.var:Ei.varKinds.const;n=(0,Bi._)`${n}${f} ${p} = ${_};${this.opts._n}`}else if(_=o?.(p))n=(0,Bi._)`${n}${_}${this.opts._n}`;else throw new Up(p);u.set(p,md.Completed)})}return n}};Ei.ValueScope=Rp});var ke=w(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.or=Fe.and=Fe.not=Fe.CodeGen=Fe.operators=Fe.varKinds=Fe.ValueScopeName=Fe.ValueScope=Fe.Scope=Fe.Name=Fe.regexpCode=Fe.stringify=Fe.getProperty=Fe.nil=Fe.strConcat=Fe.str=Fe._=void 0;var Je=Ba(),Cs=Op(),Go=Ba();Object.defineProperty(Fe,"_",{enumerable:!0,get:function(){return Go._}});Object.defineProperty(Fe,"str",{enumerable:!0,get:function(){return Go.str}});Object.defineProperty(Fe,"strConcat",{enumerable:!0,get:function(){return Go.strConcat}});Object.defineProperty(Fe,"nil",{enumerable:!0,get:function(){return Go.nil}});Object.defineProperty(Fe,"getProperty",{enumerable:!0,get:function(){return Go.getProperty}});Object.defineProperty(Fe,"stringify",{enumerable:!0,get:function(){return Go.stringify}});Object.defineProperty(Fe,"regexpCode",{enumerable:!0,get:function(){return Go.regexpCode}});Object.defineProperty(Fe,"Name",{enumerable:!0,get:function(){return Go.Name}});var wd=Op();Object.defineProperty(Fe,"Scope",{enumerable:!0,get:function(){return wd.Scope}});Object.defineProperty(Fe,"ValueScope",{enumerable:!0,get:function(){return wd.ValueScope}});Object.defineProperty(Fe,"ValueScopeName",{enumerable:!0,get:function(){return wd.ValueScopeName}});Object.defineProperty(Fe,"varKinds",{enumerable:!0,get:function(){return wd.varKinds}});Fe.operators={GT:new Je._Code(">"),GTE:new Je._Code(">="),LT:new Je._Code("<"),LTE:new Je._Code("<="),EQ:new Je._Code("==="),NEQ:new Je._Code("!=="),NOT:new Je._Code("!"),OR:new Je._Code("||"),AND:new Je._Code("&&"),ADD:new Je._Code("+")};var uo=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},Fp=class extends uo{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?Cs.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=_n(this.rhs,i,t)),this}get names(){return this.rhs instanceof Je._CodeOrName?this.rhs.names:{}}},bd=class extends uo{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof Je.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=_n(this.rhs,i,t),this}get names(){let i=this.lhs instanceof Je.Name?{}:be({},this.lhs.names);return vd(i,this.rhs)}},Vp=class extends bd{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},qp=class extends uo{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},Kp=class extends uo{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},$p=class extends uo{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},Lp=class extends uo{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=_n(this.code,i,t),this}get names(){return this.code instanceof Je._CodeOrName?this.code.names:{}}},Ea=class extends uo{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let n=s[o];n.optimizeNames(i,t)||(UR(i,n.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>Hr(i,t.names),{})}},go=class extends Ea{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},Gp=class extends Ea{},Wp=(()=>{class e extends go{}return e.kind="else",e})(),fd=(()=>{class e extends go{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new Wp(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(pw(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=_n(this.condition,t,s),this}get names(){let t=super.names;return vd(t,this.condition),this.else&&Hr(t,this.else.names),t}}return e.kind="if",e})(),kd=(()=>{class e extends go{}return e.kind="for",e})(),Yp=class extends kd{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=_n(this.iteration,i,t),this}get names(){return Hr(super.names,this.iteration.names)}},Jp=class extends kd{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?Cs.varKinds.var:this.varKind,{name:s,from:o,to:n}=this;return`for(${t} ${s}=${o}; ${s}<${n}; ${s}++)`+super.render(i)}get names(){let i=vd(super.names,this.from);return vd(i,this.to)}},yd=class extends kd{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}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=_n(this.iterable,i,t),this}get names(){return Hr(super.names,this.iterable.names)}},cw=(()=>{class e extends go{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),dw=(()=>{class e extends Ea{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Zp=class extends go{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 s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&Hr(i,this.catch.names),this.finally&&Hr(i,this.finally.names),i}},uw=(()=>{class e extends go{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),gw=(()=>{class e extends go{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Qp=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Xe(be({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=i,this._scope=new Cs.Scope({parent:i}),this._nodes=[new Gp]}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 s=this._extScope.value(i,t);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}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,s,o){let n=this._scope.toName(t);return s!==void 0&&o&&(this._constants[n.str]=s),this._leafNode(new Fp(i,n,s)),n}const(i,t,s){return this._def(Cs.varKinds.const,i,t,s)}let(i,t,s){return this._def(Cs.varKinds.let,i,t,s)}var(i,t,s){return this._def(Cs.varKinds.var,i,t,s)}assign(i,t,s){return this._leafNode(new bd(i,t,s))}add(i,t){return this._leafNode(new Vp(i,Fe.operators.ADD,t))}code(i){return typeof i=="function"?i():i!==Je.nil&&this._leafNode(new Lp(i)),this}object(...i){let t=["{"];for(let[s,o]of i)t.length>1&&t.push(","),t.push(s),(s!==o||this.opts.es5)&&(t.push(":"),(0,Je.addCodeArg)(t,o));return t.push("}"),new Je._Code(t)}if(i,t,s){if(this._blockNode(new fd(i)),t&&s)this.code(t).else().code(s).endIf();else if(t)this.code(t).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(i){return this._elseNode(new fd(i))}else(){return this._elseNode(new Wp)}endIf(){return this._endBlockNode(fd,Wp)}_for(i,t){return this._blockNode(i),t&&this.code(t).endFor(),this}for(i,t){return this._for(new Yp(i),t)}forRange(i,t,s,o,n=this.opts.es5?Cs.varKinds.var:Cs.varKinds.let){let l=this._scope.toName(i);return this._for(new Jp(n,l,t,s),()=>o(l))}forOf(i,t,s,o=Cs.varKinds.const){let n=this._scope.toName(i);if(this.opts.es5){let l=t instanceof Je.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Je._)`${l}.length`,c=>{this.var(n,(0,Je._)`${l}[${c}]`),s(n)})}return this._for(new yd("of",o,n,t),()=>s(n))}forIn(i,t,s,o=this.opts.es5?Cs.varKinds.var:Cs.varKinds.const){if(this.opts.ownProperties)return this.forOf(i,(0,Je._)`Object.keys(${t})`,s);let n=this._scope.toName(i);return this._for(new yd("in",o,n,t),()=>s(n))}endFor(){return this._endBlockNode(kd)}label(i){return this._leafNode(new qp(i))}break(i){return this._leafNode(new Kp(i))}return(i){let t=new dw;if(this._blockNode(t),this.code(i),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(dw)}try(i,t,s){if(!t&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new Zp;if(this._blockNode(o),this.code(i),t){let n=this.name("e");this._currNode=o.catch=new uw(n),t(n)}return s&&(this._currNode=o.finally=new gw,this.code(s)),this._endBlockNode(uw,gw)}throw(i){return this._leafNode(new $p(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 s=this._nodes.length-t;if(s<0||i!==void 0&&s!==i)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${i} expected`);return this._nodes.length=t,this}func(i,t=Je.nil,s,o){return this._blockNode(new cw(i,t,s)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(cw)}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 s=this._currNode;if(s instanceof i||t&&s 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 fd))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}};Fe.CodeGen=Qp;function Hr(e,i){for(let t in i)e[t]=(e[t]||0)+(i[t]||0);return e}function vd(e,i){return i instanceof Je._CodeOrName?Hr(e,i.names):e}function _n(e,i,t){if(e instanceof Je.Name)return s(e);if(!o(e))return e;return new Je._Code(e._items.reduce((n,l)=>(l instanceof Je.Name&&(l=s(l)),l instanceof Je._Code?n.push(...l._items):n.push(l),n),[]));function s(n){let l=t[n.str];return l===void 0||i[n.str]!==1?n:(delete i[n.str],l)}function o(n){return n instanceof Je._Code&&n._items.some(l=>l instanceof Je.Name&&i[l.str]===1&&t[l.str]!==void 0)}}function UR(e,i){for(let t in i)e[t]=(e[t]||0)-(i[t]||0)}function pw(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Je._)`!${Xp(e)}`}Fe.not=pw;var RR=mw(Fe.operators.AND);function OR(...e){return e.reduce(RR)}Fe.and=OR;var FR=mw(Fe.operators.OR);function VR(...e){return e.reduce(FR)}Fe.or=VR;function mw(e){return(i,t)=>i===Je.nil?t:t===Je.nil?i:(0,Je._)`${Xp(i)} ${e} ${Xp(t)}`}function Xp(e){return e instanceof Je.Name?e:(0,Je._)`(${e})`}});var $e=w(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.checkStrictMode=qe.getErrorPath=qe.Type=qe.useFunc=qe.setEvaluated=qe.evaluatedPropsToName=qe.mergeEvaluated=qe.eachItem=qe.unescapeJsonPointer=qe.escapeJsonPointer=qe.escapeFragment=qe.unescapeFragment=qe.schemaRefOrVal=qe.schemaHasRulesButRef=qe.schemaHasRules=qe.checkUnknownRules=qe.alwaysValidSchema=qe.toHash=void 0;var ft=ke(),qR=Ba();function KR(e){let i={};for(let t of e)i[t]=!0;return i}qe.toHash=KR;function $R(e,i){return typeof i=="boolean"?i:Object.keys(i).length===0?!0:(fw(e,i),!bw(i,e.self.RULES.all))}qe.alwaysValidSchema=$R;function fw(e,i=e.schema){let{opts:t,self:s}=e;if(!t.strictSchema||typeof i=="boolean")return;let o=s.RULES.keywords;for(let n in i)o[n]||ww(e,`unknown keyword: "${n}"`)}qe.checkUnknownRules=fw;function bw(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(i[t])return!0;return!1}qe.schemaHasRules=bw;function LR(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&i.all[t])return!0;return!1}qe.schemaHasRulesButRef=LR;function GR({topSchemaRef:e,schemaPath:i},t,s,o){if(!o){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,ft._)`${t}`}return(0,ft._)`${e}${i}${(0,ft.getProperty)(s)}`}qe.schemaRefOrVal=GR;function WR(e){return yw(decodeURIComponent(e))}qe.unescapeFragment=WR;function YR(e){return encodeURIComponent(tm(e))}qe.escapeFragment=YR;function tm(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}qe.escapeJsonPointer=tm;function yw(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}qe.unescapeJsonPointer=yw;function JR(e,i){if(Array.isArray(e))for(let t of e)i(t);else i(e)}qe.eachItem=JR;function _w({mergeNames:e,mergeToName:i,mergeValues:t,resultToName:s}){return(o,n,l,c)=>{let u=l===void 0?n:l instanceof ft.Name?(n instanceof ft.Name?e(o,n,l):i(o,n,l),l):n instanceof ft.Name?(i(o,l,n),n):t(n,l);return c===ft.Name&&!(u instanceof ft.Name)?s(o,u):u}}qe.mergeEvaluated={props:_w({mergeNames:(e,i,t)=>e.if((0,ft._)`${t} !== true && ${i} !== undefined`,()=>{e.if((0,ft._)`${i} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,ft._)`${t} || {}`).code((0,ft._)`Object.assign(${t}, ${i})`))}),mergeToName:(e,i,t)=>e.if((0,ft._)`${t} !== true`,()=>{i===!0?e.assign(t,!0):(e.assign(t,(0,ft._)`${t} || {}`),im(e,t,i))}),mergeValues:(e,i)=>e===!0?!0:be(be({},e),i),resultToName:vw}),items:_w({mergeNames:(e,i,t)=>e.if((0,ft._)`${t} !== true && ${i} !== undefined`,()=>e.assign(t,(0,ft._)`${i} === true ? true : ${t} > ${i} ? ${t} : ${i}`)),mergeToName:(e,i,t)=>e.if((0,ft._)`${t} !== true`,()=>e.assign(t,i===!0?!0:(0,ft._)`${t} > ${i} ? ${t} : ${i}`)),mergeValues:(e,i)=>e===!0?!0:Math.max(e,i),resultToName:(e,i)=>e.var("items",i)})};function vw(e,i){if(i===!0)return e.var("props",!0);let t=e.var("props",(0,ft._)`{}`);return i!==void 0&&im(e,t,i),t}qe.evaluatedPropsToName=vw;function im(e,i,t){Object.keys(t).forEach(s=>e.assign((0,ft._)`${i}${(0,ft.getProperty)(s)}`,!0))}qe.setEvaluated=im;var hw={};function ZR(e,i){return e.scopeValue("func",{ref:i,code:hw[i.code]||(hw[i.code]=new qR._Code(i.code))})}qe.useFunc=ZR;var em=(function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e})(em||(qe.Type=em={}));function QR(e,i,t){if(e instanceof ft.Name){let s=i===em.Num;return t?s?(0,ft._)`"[" + ${e} + "]"`:(0,ft._)`"['" + ${e} + "']"`:s?(0,ft._)`"/" + ${e}`:(0,ft._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,ft.getProperty)(e).toString():"/"+tm(e)}qe.getErrorPath=QR;function ww(e,i,t=e.opts.strictSchema){if(t){if(i=`strict mode: ${i}`,t===!0)throw new Error(i);e.self.logger.warn(i)}}qe.checkStrictMode=ww});var us=w(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});var ci=ke(),XR={data:new ci.Name("data"),valCxt:new ci.Name("valCxt"),instancePath:new ci.Name("instancePath"),parentData:new ci.Name("parentData"),parentDataProperty:new ci.Name("parentDataProperty"),rootData:new ci.Name("rootData"),dynamicAnchors:new ci.Name("dynamicAnchors"),vErrors:new ci.Name("vErrors"),errors:new ci.Name("errors"),this:new ci.Name("this"),self:new ci.Name("self"),scope:new ci.Name("scope"),json:new ci.Name("json"),jsonPos:new ci.Name("jsonPos"),jsonLen:new ci.Name("jsonLen"),jsonPart:new ci.Name("jsonPart")};sm.default=XR});var Ma=w(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.extendErrors=di.resetErrorsCount=di.reportExtraError=di.reportError=di.keyword$DataError=di.keywordError=void 0;var Qe=ke(),Hd=$e(),Ci=us();di.keywordError={message:({keyword:e})=>(0,Qe.str)`must pass "${e}" keyword validation`};di.keyword$DataError={message:({keyword:e,schemaType:i})=>i?(0,Qe.str)`"${e}" keyword must be ${i} ($data)`:(0,Qe.str)`"${e}" keyword is invalid ($data)`};function eO(e,i=di.keywordError,t,s){let{it:o}=e,{gen:n,compositeRule:l,allErrors:c}=o,u=Sw(e,i,t);s??(l||c)?kw(n,u):Hw(o,(0,Qe._)`[${u}]`)}di.reportError=eO;function tO(e,i=di.keywordError,t){let{it:s}=e,{gen:o,compositeRule:n,allErrors:l}=s,c=Sw(e,i,t);kw(o,c),n||l||Hw(s,Ci.default.vErrors)}di.reportExtraError=tO;function iO(e,i){e.assign(Ci.default.errors,i),e.if((0,Qe._)`${Ci.default.vErrors} !== null`,()=>e.if(i,()=>e.assign((0,Qe._)`${Ci.default.vErrors}.length`,i),()=>e.assign(Ci.default.vErrors,null)))}di.resetErrorsCount=iO;function sO({gen:e,keyword:i,schemaValue:t,data:s,errsCount:o,it:n}){if(o===void 0)throw new Error("ajv implementation error");let l=e.name("err");e.forRange("i",o,Ci.default.errors,c=>{e.const(l,(0,Qe._)`${Ci.default.vErrors}[${c}]`),e.if((0,Qe._)`${l}.instancePath === undefined`,()=>e.assign((0,Qe._)`${l}.instancePath`,(0,Qe.strConcat)(Ci.default.instancePath,n.errorPath))),e.assign((0,Qe._)`${l}.schemaPath`,(0,Qe.str)`${n.errSchemaPath}/${i}`),n.opts.verbose&&(e.assign((0,Qe._)`${l}.schema`,t),e.assign((0,Qe._)`${l}.data`,s))})}di.extendErrors=sO;function kw(e,i){let t=e.const("err",i);e.if((0,Qe._)`${Ci.default.vErrors} === null`,()=>e.assign(Ci.default.vErrors,(0,Qe._)`[${t}]`),(0,Qe._)`${Ci.default.vErrors}.push(${t})`),e.code((0,Qe._)`${Ci.default.errors}++`)}function Hw(e,i){let{gen:t,validateName:s,schemaEnv:o}=e;o.$async?t.throw((0,Qe._)`new ${e.ValidationError}(${i})`):(t.assign((0,Qe._)`${s}.errors`,i),t.return(!1))}var Sr={keyword:new Qe.Name("keyword"),schemaPath:new Qe.Name("schemaPath"),params:new Qe.Name("params"),propertyName:new Qe.Name("propertyName"),message:new Qe.Name("message"),schema:new Qe.Name("schema"),parentSchema:new Qe.Name("parentSchema")};function Sw(e,i,t){let{createErrors:s}=e.it;return s===!1?(0,Qe._)`{}`:oO(e,i,t)}function oO(e,i,t={}){let{gen:s,it:o}=e,n=[rO(o,t),nO(e,t)];return aO(e,i,n),s.object(...n)}function rO({errorPath:e},{instancePath:i}){let t=i?(0,Qe.str)`${e}${(0,Hd.getErrorPath)(i,Hd.Type.Str)}`:e;return[Ci.default.instancePath,(0,Qe.strConcat)(Ci.default.instancePath,t)]}function nO({keyword:e,it:{errSchemaPath:i}},{schemaPath:t,parentSchema:s}){let o=s?i:(0,Qe.str)`${i}/${e}`;return t&&(o=(0,Qe.str)`${o}${(0,Hd.getErrorPath)(t,Hd.Type.Str)}`),[Sr.schemaPath,o]}function aO(e,{params:i,message:t},s){let{keyword:o,data:n,schemaValue:l,it:c}=e,{opts:u,propertyName:p,topSchemaRef:_,schemaPath:f}=c;s.push([Sr.keyword,o],[Sr.params,typeof i=="function"?i(e):i||(0,Qe._)`{}`]),u.messages&&s.push([Sr.message,typeof t=="function"?t(e):t]),u.verbose&&s.push([Sr.schema,l],[Sr.parentSchema,(0,Qe._)`${_}${f}`],[Ci.default.data,n]),p&&s.push([Sr.propertyName,p])}});var Cw=w(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.boolOrEmptySchema=hn.topBoolOrEmptySchema=void 0;var lO=Ma(),cO=ke(),dO=us(),uO={message:"boolean schema is false"};function gO(e){let{gen:i,schema:t,validateName:s}=e;t===!1?xw(e,!1):typeof t=="object"&&t.$async===!0?i.return(dO.default.data):(i.assign((0,cO._)`${s}.errors`,null),i.return(!0))}hn.topBoolOrEmptySchema=gO;function pO(e,i){let{gen:t,schema:s}=e;s===!1?(t.var(i,!1),xw(e)):t.var(i,!0)}hn.boolOrEmptySchema=pO;function xw(e,i){let{gen:t,data:s}=e,o={gen:t,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,lO.reportError)(o,uO,void 0,i)}});var om=w(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.getRules=fn.isJSONType=void 0;var mO=["string","number","integer","boolean","null","object","array"],_O=new Set(mO);function hO(e){return typeof e=="string"&&_O.has(e)}fn.isJSONType=hO;function fO(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Xe(be({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}fn.getRules=fO});var rm=w(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.shouldUseRule=Wo.shouldUseGroup=Wo.schemaHasRulesForType=void 0;function bO({schema:e,self:i},t){let s=i.RULES.types[t];return s&&s!==!0&&Iw(e,s)}Wo.schemaHasRulesForType=bO;function Iw(e,i){return i.rules.some(t=>Tw(e,t))}Wo.shouldUseGroup=Iw;function Tw(e,i){var t;return e[i.keyword]!==void 0||((t=i.definition.implements)===null||t===void 0?void 0:t.some(s=>e[s]!==void 0))}Wo.shouldUseRule=Tw});var Ua=w(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.reportTypeError=ui.checkDataTypes=ui.checkDataType=ui.coerceAndCheckDataType=ui.getJSONTypes=ui.getSchemaTypes=ui.DataType=void 0;var yO=om(),vO=rm(),wO=Ma(),Ee=ke(),Pw=$e(),bn=(function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e})(bn||(ui.DataType=bn={}));function kO(e){let i=zw(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}ui.getSchemaTypes=kO;function zw(e){let i=Array.isArray(e)?e:e?[e]:[];if(i.every(yO.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}ui.getJSONTypes=zw;function HO(e,i){let{gen:t,data:s,opts:o}=e,n=SO(i,o.coerceTypes),l=i.length>0&&!(n.length===0&&i.length===1&&(0,vO.schemaHasRulesForType)(e,i[0]));if(l){let c=am(i,s,o.strictNumbers,bn.Wrong);t.if(c,()=>{n.length?xO(e,i,n):lm(e)})}return l}ui.coerceAndCheckDataType=HO;var Aw=new Set(["string","number","integer","boolean","null"]);function SO(e,i){return i?e.filter(t=>Aw.has(t)||i==="array"&&t==="array"):[]}function xO(e,i,t){let{gen:s,data:o,opts:n}=e,l=s.let("dataType",(0,Ee._)`typeof ${o}`),c=s.let("coerced",(0,Ee._)`undefined`);n.coerceTypes==="array"&&s.if((0,Ee._)`${l} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>s.assign(o,(0,Ee._)`${o}[0]`).assign(l,(0,Ee._)`typeof ${o}`).if(am(i,o,n.strictNumbers),()=>s.assign(c,o))),s.if((0,Ee._)`${c} !== undefined`);for(let p of t)(Aw.has(p)||p==="array"&&n.coerceTypes==="array")&&u(p);s.else(),lm(e),s.endIf(),s.if((0,Ee._)`${c} !== undefined`,()=>{s.assign(o,c),CO(e,c)});function u(p){switch(p){case"string":s.elseIf((0,Ee._)`${l} == "number" || ${l} == "boolean"`).assign(c,(0,Ee._)`"" + ${o}`).elseIf((0,Ee._)`${o} === null`).assign(c,(0,Ee._)`""`);return;case"number":s.elseIf((0,Ee._)`${l} == "boolean" || ${o} === null
3
3
  || (${l} == "string" && ${o} && ${o} == +${o})`).assign(c,(0,Ee._)`+${o}`);return;case"integer":s.elseIf((0,Ee._)`${l} === "boolean" || ${o} === null
4
4
  || (${l} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(c,(0,Ee._)`+${o}`);return;case"boolean":s.elseIf((0,Ee._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(c,!1).elseIf((0,Ee._)`${o} === "true" || ${o} === 1`).assign(c,!0);return;case"null":s.elseIf((0,Ee._)`${o} === "" || ${o} === 0 || ${o} === false`),s.assign(c,null);return;case"array":s.elseIf((0,Ee._)`${l} === "string" || ${l} === "number"
@@ -0,0 +1 @@
1
+ import{b as C}from"./chunk-DVZ3YL7I.js";import{k as I,l as y,p as S}from"./chunk-O3NFPA75.js";import{Gb as x,Ha as _,Ib as B,Kc as E,La as e,Vb as r,Wa as k,Wb as m,Xb as l,hc as w,ja as g,kb as s,lb as f,mb as h,mc as i,nc as n,rb as v,sb as t,tb as a,ub as p}from"./chunk-WWMJUVLA.js";var F=(o,b)=>({"fa-chevron-down":o,"fa-chevron-right":b});function $(o,b){o&1&&(t(0,"ul",6)(1,"li",9)(2,"span",10),r(3),i(4,"translate"),p(5,"br"),t(6,"small",11),r(7),i(8,"translate"),a()(),t(9,"a",12),i(10,"translate"),p(11,"i",13),a()(),t(12,"li",9)(13,"span",10),r(14),i(15,"translate"),p(16,"br"),t(17,"small",11),r(18),i(19,"translate"),a()(),t(20,"a",14),i(21,"translate"),p(22,"i",13),a()(),t(23,"li",9)(24,"span",10),r(25),i(26,"translate"),p(27,"br"),t(28,"small",11),r(29),i(30,"translate"),a()(),t(31,"a",15),i(32,"translate"),p(33,"i",13),a()(),t(34,"li",9)(35,"span",10),r(36),i(37,"translate"),p(38,"br"),t(39,"small",11),r(40),i(41,"translate"),a()(),t(42,"a",16),i(43,"translate"),p(44,"i",13),a()()()),o&2&&(e(3),l(" ",n(4,12,"support.links.documentation")),e(4),m(n(8,14,"support.links.documentation_sub")),e(2),s("aria-label",n(10,16,"support.links.documentation")),e(5),l(" ",n(15,18,"support.links.issue")),e(4),m(n(19,20,"support.links.issue_sub")),e(2),s("aria-label",n(21,22,"support.links.issue")),e(5),l(" ",n(26,24,"support.links.discord")),e(4),m(n(30,26,"support.links.discord_sub")),e(2),s("aria-label",n(32,28,"support.links.discord")),e(5),l(" ",n(37,30,"support.links.reddit")),e(4),m(n(41,32,"support.links.reddit_sub")),e(2),s("aria-label",n(43,34,"support.links.reddit")))}function P(o,b){if(o&1&&(t(0,"ul",8)(1,"li",9)(2,"span",10),r(3),i(4,"translate"),p(5,"br"),t(6,"small",11),r(7),i(8,"translate"),a()(),t(9,"a",17),i(10,"translate"),p(11,"i",13),a()(),t(12,"li",9)(13,"span",10),r(14),i(15,"translate"),p(16,"br"),t(17,"small",11),r(18),i(19,"translate"),a()(),t(20,"a",18),i(21,"translate"),p(22,"i",13),a()(),t(23,"li",9)(24,"span",10),r(25),i(26,"translate"),p(27,"br"),t(28,"small",11),r(29),i(30,"translate"),a()(),t(31,"a",19),i(32,"translate"),p(33,"i",13),a()(),t(34,"li",9)(35,"span",10),r(36),i(37,"translate"),p(38,"br"),t(39,"small",11),r(40),i(41,"translate"),a()(),t(42,"a",20),i(43,"translate"),p(44,"i",13),a()(),t(45,"li",9)(46,"span",10),r(47),i(48,"translate"),p(49,"br"),t(50,"small",11),r(51),i(52,"translate"),a()(),t(53,"a",21),i(54,"translate"),p(55,"i",13),a()()()),o&2){let u=B();e(3),l(" ",n(4,16,"support.dev.item_swagger")),e(4),l(" ",n(8,18,"support.dev.item_swagger_sub")," "),e(2),v("href",u.swaggerUrl,_),s("aria-label",n(10,20,"support.dev.item_swagger")),e(5),l(" ",n(15,22,"support.dev.api")),e(4),m(n(19,24,"support.dev.api_sub")),e(2),s("aria-label",n(21,26,"support.dev.api")),e(5),l(" ",n(26,28,"support.dev.api_hap")),e(4),m(n(30,30,"support.dev.api_hap_sub")),e(2),s("aria-label",n(32,32,"support.dev.api_hap")),e(5),l(" ",n(37,34,"support.dev.template")),e(4),l(" ",n(41,36,"support.dev.template_sub")," "),e(2),s("aria-label",n(43,38,"support.dev.template")),e(5),l(" ",n(48,40,"support.dev.verified")),e(4),m(n(52,42,"support.dev.verified_sub")),e(2),s("aria-label",n(54,44,"support.dev.verified"))}}var z=(()=>{class o{$settings=g(C);$translate=g(I);swaggerEndpoint="/swagger";showFields={general:!0,dev:!0};ngOnInit(){let u=this.$translate.instant("support.title");this.$settings.setPageTitle(u)}get swaggerUrl(){return S.production?this.swaggerEndpoint:`${S.api.origin}${this.swaggerEndpoint}`}toggleSection(u){this.showFields[u]=!this.showFields[u]}static \u0275fac=function(c){return new(c||o)};static \u0275cmp=k({type:o,selectors:[["ng-component"]],decls:18,vars:23,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"mb-4"],["role","button","tabindex","0",1,"mt-3","hover-pointer",3,"click"],[1,"primary-text"],[1,"fa",3,"ngClass"],["id","fieldsGeneral",1,"list-group","list-group-box","mt-2","mx-0"],[1,"pb-3"],["id","fieldsDev",1,"list-group","list-group-box","mt-2","mx-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"pe-2"],[1,"grey-text","pe-2"],["href","https://github.com/homebridge/homebridge/wiki","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],[1,"fas","fa-external-link-alt"],["href","https://github.com/homebridge/homebridge-config-ui-x/issues/new/choose","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://discord.gg/C87Pvq3","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://www.reddit.com/r/homebridge/","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px",3,"href"],["href","https://developers.homebridge.io/#/","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://developers.homebridge.io/HAP-NodeJS/","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://github.com/homebridge/homebridge-plugin-template","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"],["href","https://github.com/homebridge/homebridge/wiki/Verified-Plugins","target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","waves-effect","m-0",2,"min-width","50px"]],template:function(c,d){c&1&&(t(0,"div",0)(1,"h3",1),r(2),i(3,"translate"),a()(),t(4,"div",2)(5,"div",3),x("click",function(){return d.toggleSection("general")}),t(6,"h5",4),p(7,"i",5),r(8),i(9,"translate"),a()(),f(10,$,45,36,"ul",6),a(),t(11,"div",7)(12,"div",3),x("click",function(){return d.toggleSection("dev")}),t(13,"h5",4),p(14,"i",5),r(15),i(16,"translate"),a()(),f(17,P,56,46,"ul",8),a()),c&2&&(e(2),m(n(3,11,"support.title")),e(3),s("aria-expanded",d.showFields.general?"true":"false")("aria-controls","fieldsGeneral"),e(2),v("ngClass",w(17,F,d.showFields.general,!d.showFields.general)),e(),l(" ",n(9,13,"support.links.title")," "),e(2),h(d.showFields.general?10:-1),e(2),s("aria-expanded",d.showFields.dev?"true":"false")("aria-controls","fieldsDev"),e(2),v("ngClass",w(20,F,d.showFields.dev,!d.showFields.dev)),e(),l(" ",n(16,15,"support.dev.title")," "),e(2),h(d.showFields.dev?17:-1))},dependencies:[E,y],encapsulation:2})}return o})();export{z as SupportComponent};
@@ -1,4 +1,4 @@
1
- import{a as z,b,c as k}from"./chunk-MO7W4MOJ.js";import{a as u}from"./chunk-FFMVREJO.js";import{q as f}from"./chunk-DEBBH3A3.js";import{M as t,ea as p,g as n,h as c,ja as a,n as h}from"./chunk-WWMJUVLA.js";var d=n(z(),1),l=n(b(),1),m=n(k(),1);var v=(()=>{class o{$ws=a(u);$api=a(f);io;fitAddon;webLinksAddon;resize;elementResize;dataDisposable=null;isInitializing=!1;hasUserTyped=!1;term;destroyTerminal(){this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.io&&this.io.end(),this.term&&(this.term.dispose(),this.term=null),this.resize&&this.resize.complete(),this.elementResize&&this.elementResize.complete(),this.isInitializing=!1,this.hasUserTyped=!1}destroyPersistentSession(){this.destroyTerminal(),this.$api.post("/platform-tools/terminal/destroy-persistent-session",{}).subscribe({error:s=>console.error("Failed to destroy persistent session:",s)})}detachTerminal(){this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.term&&this.term.dispose(),this.resize&&this.resize.complete(),this.elementResize&&this.elementResize.complete(),this.isInitializing=!1}hasActiveSession(){return this.io&&this.io.socket&&this.io.socket.connected}checkBackendPersistentSession(){return c(this,null,function*(){try{return(yield this.$api.get("/platform-tools/terminal/has-persistent-session").toPromise()).hasPersistentSession}catch(s){return console.error("Failed to check backend persistent session:",s),!1}})}hasUserTypedInSession(){return this.hasUserTyped}isTerminalReady(){return this.term&&!this.isInitializing}reconnectTerminal(s,e={},r){if(this.isInitializing)return!1;this.isInitializing=!0,this.elementResize=r,this.io&&this.io.socket&&this.io.socket.connected?(this.term=new m.Terminal(e),this.fitAddon=new d.FitAddon,this.webLinksAddon=new l.WebLinksAddon,setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.resize=new h,this.term.open(s.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.socket.removeAllListeners("stdout"),this.io.socket.removeAllListeners("process-exit"),this.io.socket.on("stdout",i=>{this.term.write(i)}),this.io.socket.on("process-exit",()=>{this.startSession()}),this.dataDisposable&&this.dataDisposable.dispose(),this.dataDisposable=this.term.onData(i=>{this.hasUserTyped=!0,this.io.socket.emit("stdin",i)}),this.term.onResize(i=>{this.resize.next(i)}),this.resize.pipe(t(500)).subscribe(i=>{this.io.socket.emit("resize",i)}),this.elementResize&&this.elementResize.pipe(t(100)).subscribe({next:()=>{this.fitAddon.fit()}}),this.io.socket.emit("start-session",{cols:this.term.cols,rows:this.term.rows}),this.isInitializing=!1):this.startTerminal(s,e,r)}startTerminal(s,e={},r){return this.isInitializing?!1:(this.isInitializing=!0,this.elementResize=r,this.io=this.$ws.connectToNamespace("platform-tools/terminal"),this.term=new m.Terminal(e),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new d.FitAddon,this.webLinksAddon=new l.WebLinksAddon,this.resize=new h,this.term.open(s.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.pipe(t(200)).subscribe(()=>{this.startSession()}),this.io.socket.on("disconnect",()=>{this.term.write(`
1
+ import{a as z,b,c as k}from"./chunk-MO7W4MOJ.js";import{a as u}from"./chunk-ZPVJRQ5M.js";import{q as f}from"./chunk-O3NFPA75.js";import{M as t,ea as p,g as n,h as c,ja as a,n as h}from"./chunk-WWMJUVLA.js";var d=n(z(),1),l=n(b(),1),m=n(k(),1);var v=(()=>{class o{$ws=a(u);$api=a(f);io;fitAddon;webLinksAddon;resize;elementResize;dataDisposable=null;isInitializing=!1;hasUserTyped=!1;term;destroyTerminal(){this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.io&&this.io.end(),this.term&&(this.term.dispose(),this.term=null),this.resize&&this.resize.complete(),this.elementResize&&this.elementResize.complete(),this.isInitializing=!1,this.hasUserTyped=!1}destroyPersistentSession(){this.destroyTerminal(),this.$api.post("/platform-tools/terminal/destroy-persistent-session",{}).subscribe({error:s=>console.error("Failed to destroy persistent session:",s)})}detachTerminal(){this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.term&&this.term.dispose(),this.resize&&this.resize.complete(),this.elementResize&&this.elementResize.complete(),this.isInitializing=!1}hasActiveSession(){return this.io&&this.io.socket&&this.io.socket.connected}checkBackendPersistentSession(){return c(this,null,function*(){try{return(yield this.$api.get("/platform-tools/terminal/has-persistent-session").toPromise()).hasPersistentSession}catch(s){return console.error("Failed to check backend persistent session:",s),!1}})}hasUserTypedInSession(){return this.hasUserTyped}isTerminalReady(){return this.term&&!this.isInitializing}reconnectTerminal(s,e={},r){if(this.isInitializing)return!1;this.isInitializing=!0,this.elementResize=r,this.io&&this.io.socket&&this.io.socket.connected?(this.term=new m.Terminal(e),this.fitAddon=new d.FitAddon,this.webLinksAddon=new l.WebLinksAddon,setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.resize=new h,this.term.open(s.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.socket.removeAllListeners("stdout"),this.io.socket.removeAllListeners("process-exit"),this.io.socket.on("stdout",i=>{this.term.write(i)}),this.io.socket.on("process-exit",()=>{this.startSession()}),this.dataDisposable&&this.dataDisposable.dispose(),this.dataDisposable=this.term.onData(i=>{this.hasUserTyped=!0,this.io.socket.emit("stdin",i)}),this.term.onResize(i=>{this.resize.next(i)}),this.resize.pipe(t(500)).subscribe(i=>{this.io.socket.emit("resize",i)}),this.elementResize&&this.elementResize.pipe(t(100)).subscribe({next:()=>{this.fitAddon.fit()}}),this.io.socket.emit("start-session",{cols:this.term.cols,rows:this.term.rows}),this.isInitializing=!1):this.startTerminal(s,e,r)}startTerminal(s,e={},r){return this.isInitializing?!1:(this.isInitializing=!0,this.elementResize=r,this.io=this.$ws.connectToNamespace("platform-tools/terminal"),this.term=new m.Terminal(e),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new d.FitAddon,this.webLinksAddon=new l.WebLinksAddon,this.resize=new h,this.term.open(s.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.pipe(t(200)).subscribe(()=>{this.startSession()}),this.io.socket.on("disconnect",()=>{this.term.write(`
2
2
  \r
3
3
  \rTerminal disconnected. Is the server running?
4
4
  \r
@@ -0,0 +1 @@
1
+ import{a as me}from"./chunk-KT5YSOXO.js";import{a as le}from"./chunk-XOZXV7OE.js";import{g as Q,m as k,n as ae}from"./chunk-3ZU7ZAMP.js";import{B as A,C as G,b as q,c as F,d as g,e as V,f as z,g as N,j as S,m as R,p as O,q as L,r as J,z as re}from"./chunk-MCPFJTIS.js";import{b as H}from"./chunk-QDMF6BOL.js";import{b as oe}from"./chunk-6LB7WDKS.js";import{a as Ce,b as se}from"./chunk-DVZ3YL7I.js";import{k as T,l as E,n as B,q as M}from"./chunk-O3NFPA75.js";import{Ac as ne,Db as I,Gb as f,Ib as _,Kc as j,La as e,Vb as m,Wa as y,Wb as d,Xb as x,Yb as ee,g as xe,gc as D,h as W,hc as te,ja as c,kb as u,lb as w,mb as h,mc as a,nc as o,oa as $,ob as X,oc as ie,pa as U,pb as Y,qb as Z,rb as b,sb as i,tb as t,ub as p}from"./chunk-WWMJUVLA.js";function we(r,C){r&1&&(i(0,"ngb-alert",13)(1,"p",20),m(2),a(3,"translate"),t()()),r&2&&(b("dismissible",!1),e(2),d(o(3,2,"login.invalid_password")))}var pe=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);invalidCredentials=!1;formGroup=new N({password:new S("",[g.required])});disable2fa(){this.invalidCredentials=!1,this.$api.post("/users/otp/deactivate",this.formGroup.value).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.setup_2fa_disable_success"),this.$translate.instant("toast.title_success"))},error:()=>{this.formGroup.setValue({password:""}),this.invalidCredentials=!0}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:34,vars:27,consts:[[1,"modal-content",2,"min-height","300px"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","password","autocomplete","current-password",1,"form-control","custom-input",3,"formControl","placeholder"],["type","error",1,"mt-3","mb-0",3,"dismissible"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"mb-0"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),a(4,"translate"),t(),i(5,"button",3),a(6,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(7,"div",4)(8,"div",5),p(9,"i",6),t(),i(10,"ul",7)(11,"li"),m(12),a(13,"translate"),t()(),i(14,"ul",8)(15,"li",9)(16,"label",10),m(17),a(18,"translate"),t(),i(19,"div",11),p(20,"input",12),a(21,"translate"),t()()(),w(22,we,4,4,"ngb-alert",13),t(),i(23,"div",14)(24,"div",15)(25,"button",16),a(26,"translate"),f("click",function(){return l.dismissModal()}),m(27),a(28,"translate"),t()(),p(29,"div",17),i(30,"div",18)(31,"button",19),f("click",function(){return l.disable2fa()}),m(32),a(33,"translate"),t()()()()),s&2&&(e(3),d(o(4,11,"users.setup_2fa_disable")),e(2),u("aria-label",o(6,13,"form.button_close")),e(7),d(o(13,15,"users.setup_2fa_disable_current_password")),e(5),d(o(18,17,"users.label_password")),e(3),b("formControl",l.formGroup.controls.password)("placeholder",o(21,19,"users.label_password")),e(2),h(l.invalidCredentials&&!l.formGroup.controls.password.value?22:-1),e(3),u("aria-label",o(26,21,"form.button_close")),e(2),x(" ",o(28,23,"form.button_close")," "),e(4),b("disabled",l.formGroup.invalid),e(),x(" ",o(33,25,"form.button_disable")," "))},dependencies:[A,F,V,G,O,Q,E],encapsulation:2})}return r})();var de=xe(Ce(),1);var he=r=>({timeDiffError:r});function ge(r,C){r&1&&(i(0,"li"),m(1),a(2,"translate"),t()),r&2&&(e(),d(o(2,1,"users.setup_2fa_scan_qr_code")))}function Se(r,C){if(r&1&&(i(0,"ngb-alert",8)(1,"p",16),m(2),a(3,"translate"),t(),i(4,"p",17),m(5),a(6,"translate"),t()()),r&2){let n=_();b("dismissible",!1),e(2),d(o(3,3,"users.setup_2fa_cannot_setup_2fa")),e(3),d(ie(6,5,"users.setup_2fa_server_time_out",D(8,he,n.timeDiffError)))}}function ye(r,C){r&1&&p(0,"i",27)}function Ee(r,C){r&1&&p(0,"i",28)}function $e(r,C){if(r&1){let n=I();i(0,"div",21),m(1),a(2,"translate"),p(3,"br"),m(4),i(5,"a",26),f("click",function(){$(n);let l=_(2);return U(l.copySecretToClipboard())}),w(6,ye,1,0,"i",27)(7,Ee,1,0,"i",28),t()()}if(r&2){let n=_(2);e(),x(" ",o(2,3,"users.setup_2fa_scan_qr_manual")),e(3),x(" ",n.otpSecret," "),e(2),h(n.secretCopied?6:7)}}function Ue(r,C){if(r&1&&(i(0,"ul",9)(1,"li",18)(2,"div",19),p(3,"app-qrcode",20),t(),w(4,$e,8,5,"div",21),t(),i(5,"li",22)(6,"label",23),m(7),a(8,"translate"),t(),i(9,"div",24),p(10,"input",25),t()()()),r&2){let n=_();e(3),b("data",n.otpString),e(),h(n.otpSecret?4:-1),e(3),d(o(8,4,"users.setup_2fa_enter_code")),e(3),b("formControl",n.formGroup.controls.code)}}function ke(r,C){if(r&1){let n=I();i(0,"button",29),a(1,"translate"),f("click",function(){$(n);let l=_();return U(l.dismissModal())}),m(2),a(3,"translate"),t()}r&2&&(u("aria-label",o(1,2,"form.button_close")),e(2),x(" ",o(3,4,"form.button_close")," "))}function Te(r,C){if(r&1){let n=I();i(0,"button",29),a(1,"translate"),f("click",function(){$(n);let l=_();return U(l.dismissModal())}),m(2),a(3,"translate"),t()}r&2&&(u("aria-label",o(1,2,"form.button_close")),e(2),x(" ",o(3,4,"form.button_close")," "))}function Be(r,C){if(r&1){let n=I();i(0,"button",30),f("click",function(){$(n);let l=_();return U(l.enable2fa())}),m(1),a(2,"translate"),t()}if(r&2){let n=_();b("disabled",n.formGroup.invalid),e(),x(" ",o(2,2,"form.button_enable")," ")}}var ce=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);copyTimeout=null;user;timeDiffError=null;otpString;otpSecret;secretCopied=!1;formGroup=new N({code:new S("",[g.required,g.minLength(6),g.maxLength(6)])});ngOnInit(){this.$api.post("/users/otp/setup",{}).subscribe({next:n=>{this.checkTimeDiff(n.timestamp),this.timeDiffError||(this.otpString=n.otpauth,this.otpSecret=new URL(this.otpString).searchParams.get("secret")||"")},error:n=>{this.$activeModal.dismiss(),console.error(n),this.$toastr.error(this.$translate.instant("users.setup_2fa_enable_error"),this.$translate.instant("toast.title_error"))}})}enable2fa(){this.$api.post("/users/otp/activate",this.formGroup.value).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.setup_2fa_enabled_success"),this.$translate.instant("toast.title_success")),this.$activeModal.close()},error:n=>{console.error(n),this.$toastr.error(this.$translate.instant("users.setup_2fa_activate_error"),this.$translate.instant("toast.title_error"))}})}copySecretToClipboard(){return W(this,null,function*(){yield navigator.clipboard.writeText(this.otpSecret),this.secretCopied=!0,this.copyTimeout&&clearTimeout(this.copyTimeout),this.copyTimeout=setTimeout(()=>{this.secretCopied=!1},3e3)})}dismissModal(){this.$activeModal.dismiss("Dismiss")}checkTimeDiff(n){let s=(0,de.default)(n).diff(new Date,"millisecond");s<-5e3||s>5e3?this.timeDiffError=s:this.timeDiffError=null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:24,vars:15,consts:[[1,"modal-content","setup2fa"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"list-group","list-group-box","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"fw-bold","mb-1"],[1,"mb-0"],[1,"list-group-item","text-center"],[1,"text-center","w-100","d-flex","justify-content-center","my-2"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[1,"grey-text","small","mt-0","mb-1"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","placeholder","eg. 123456","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*",1,"form-control","custom-input",3,"formControl"],["href","javascript:void(0)",1,"ms-1","text-primary",3,"click"],[1,"fas","fa-check","green-text"],[1,"fas","fa-copy"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),a(4,"translate"),t(),i(5,"button",3),a(6,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(7,"div",4)(8,"div",5),p(9,"i",6),t(),i(10,"ul",7)(11,"li"),m(12),a(13,"translate"),t(),w(14,ge,3,3,"li"),t(),w(15,Se,7,10,"ngb-alert",8),w(16,Ue,11,6,"ul",9),t(),i(17,"div",10)(18,"div",11),w(19,ke,4,6,"button",12),t(),i(20,"div",13),w(21,Te,4,6,"button",12),t(),i(22,"div",14),w(23,Be,3,4,"button",15),t()()()),s&2&&(e(3),d(o(4,9,"users.setup_2fa")),e(2),u("aria-label",o(6,11,"form.button_close")),e(7),d(o(13,13,"users.setup_2fa_warning")),e(2),h(l.timeDiffError?-1:14),e(),h(l.timeDiffError?15:-1),e(),h(l.timeDiffError?-1:16),e(3),h(l.timeDiffError?-1:19),e(2),h(l.timeDiffError?21:-1),e(2),h(l.timeDiffError?-1:23))},dependencies:[Q,le,A,F,V,re,G,O,E],encapsulation:2})}return r})();var ue=r=>({"is-invalid":r}),fe=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);form=new N({username:new S("",[g.required]),name:new S("",[g.required]),password:new S("",[g.compose([g.required,g.minLength(4)])]),passwordConfirm:new S("",[g.required]),admin:new S(!0)},this.matchPassword);onSubmit({value:n}){this.$api.post("/users",n).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_added_new_user"),this.$translate.instant("toast.title_success"))},error:s=>{this.$toastr.error(s.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(n){let s=n.get("password").value,l=n.get("passwordConfirm").value;if(s!==l)n.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:58,vars:50,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-user-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["formControlName","admin","type","checkbox","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form",1),f("ngSubmit",function(){return l.onSubmit(l.form)}),i(2,"div",2)(3,"h5",3),m(4),a(5,"translate"),t(),i(6,"button",4),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",5)(9,"div",6),p(10,"i",7),t(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),a(15,"translate"),t(),i(16,"div",11),p(17,"input",12),a(18,"translate"),t()(),i(19,"li",9)(20,"label",13),m(21),a(22,"translate"),t(),i(23,"div",11),p(24,"input",14),a(25,"translate"),t()(),i(26,"li",9)(27,"label",15),m(28),a(29,"translate"),t(),i(30,"div",11),p(31,"input",16),a(32,"translate"),t()(),i(33,"li",9)(34,"label",17),m(35),a(36,"translate"),t(),i(37,"div",11),p(38,"input",18),a(39,"translate"),t()(),i(40,"li",19)(41,"span",20),m(42),a(43,"translate"),t(),i(44,"div",21),p(45,"input",22),a(46,"translate"),p(47,"label",23),t()()()(),i(48,"div",24)(49,"div",20)(50,"button",25),f("click",function(){return l.dismissModal()}),m(51),a(52,"translate"),t()(),p(53,"div",26),i(54,"div",27)(55,"button",28),m(56),a(57,"translate"),t()()()()()),s&2&&(e(),b("formGroup",l.form),e(3),d(o(5,18,"users.title_add_user")),e(2),u("aria-label",o(7,20,"form.button_close")),e(8),d(o(15,22,"users.label_username")),e(3),u("aria-label",o(18,24,"users.label_username")),e(4),d(o(22,26,"users.label_full_name")),e(3),u("aria-label",o(25,28,"users.label_full_name")),e(4),d(o(29,30,"users.label_password")),e(3),b("ngClass",D(46,ue,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",o(32,32,"users.label_password")),e(4),d(o(36,34,"users.label_confirm_password")),e(3),b("ngClass",D(48,ue,l.form.controls.passwordConfirm.dirty&&l.form.controls.passwordConfirm.errors)),u("aria-label",o(39,36,"users.label_confirm_password")),e(4),d(o(43,38,"users.label_admin_user")),e(3),u("aria-label",o(46,40,"users.label_admin_user")),e(6),x(" ",o(52,42,"form.button_close")," "),e(4),b("disabled",!l.form.valid),e(),x(" ",o(57,44,"form.button_save")," "))},dependencies:[A,R,F,q,V,z,G,L,J,j,E],encapsulation:2})}return r})();var be=r=>({"is-invalid":r});function Me(r,C){if(r&1&&(i(0,"li",9)(1,"label",27),m(2),a(3,"translate"),t(),i(4,"div",11),p(5,"input",28),a(6,"translate"),t()()),r&2){let n=_();e(2),d(o(3,3,"users.label_confirm_password")),e(3),b("ngClass",D(7,be,n.form.controls.passwordConfirm.dirty&&n.form.controls.passwordConfirm.errors)),u("aria-label",o(6,5,"users.label_confirm_password"))}}var _e=(()=>{class r{$activeModal=c(k);$api=c(M);$auth=c(H);$cdr=c(ne);$toastr=c(B);$translate=c(T);initialFormValue={};user;isCurrentUser=!1;form=new N({username:new S("",[g.required]),name:new S("",[g.required]),password:new S(""),passwordConfirm:new S(""),admin:new S(!0)},this.matchPassword);ngOnInit(){this.isCurrentUser=this.$auth.user.username===this.user.username,this.form.patchValue(this.user),this.initialFormValue=this.form.getRawValue(),this.form.valueChanges.subscribe(()=>this.$cdr.detectChanges())}onSubmit({value:n}){this.$api.patch(`/users/${this.user.id}`,n).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_updated_user"),this.$translate.instant("toast.title_success")),this.isCurrentUser&&n.username!==this.$auth.user.username&&this.$auth.logout()},error:s=>{console.error(s),this.$toastr.error(s.error?.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}isFormUnchanged(){return this.form.controls.password.value?!1:JSON.stringify(this.form.getRawValue())===JSON.stringify(this.initialFormValue)}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(n){let s=n.get("password").value,l=n.get("passwordConfirm").value;if(s!==l)n.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:52,vars:42,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-user-pen","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","off","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form",1),f("ngSubmit",function(){return l.onSubmit(l.form)}),i(2,"div",2)(3,"h5",3),m(4),a(5,"translate"),t(),i(6,"button",4),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",5)(9,"div",6),p(10,"i",7),t(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),a(15,"translate"),t(),i(16,"div",11),p(17,"input",12),a(18,"translate"),t()(),i(19,"li",9)(20,"label",13),m(21),a(22,"translate"),t(),i(23,"div",11),p(24,"input",14),a(25,"translate"),t()(),i(26,"li",9)(27,"label",15),m(28),a(29,"translate"),t(),i(30,"div",11),p(31,"input",16),a(32,"translate"),t()(),w(33,Me,7,9,"li",9),i(34,"li",17)(35,"span",18),m(36),a(37,"translate"),t(),i(38,"div",19),p(39,"input",20),a(40,"translate"),p(41,"label",21),t()()()(),i(42,"div",22)(43,"div",18)(44,"button",23),f("click",function(){return l.dismissModal()}),m(45),a(46,"translate"),t()(),p(47,"div",24),i(48,"div",25)(49,"button",26),m(50),a(51,"translate"),t()()()()()),s&2&&(e(),b("formGroup",l.form),e(3),d(o(5,16,"users.title_edit_user")),e(2),u("aria-label",o(7,18,"form.button_close")),e(8),d(o(15,20,"users.label_username")),e(3),u("aria-label",o(18,22,"users.label_username")),e(4),d(o(22,24,"users.label_full_name")),e(3),u("aria-label",o(25,26,"users.label_full_name")),e(4),d(o(29,28,"users.label_new_password")),e(3),b("ngClass",D(40,be,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",o(32,30,"users.label_new_password")),e(2),h(l.form.controls.password.value?33:-1),e(3),d(o(37,32,"users.label_admin_user")),e(3),u("aria-label",o(40,34,"users.label_admin_user")),e(6),x(" ",o(46,36,"form.button_close")," "),e(4),b("disabled",!l.form.valid||l.isFormUnchanged()),e(),x(" ",o(51,38,"form.button_save")," "))},dependencies:[A,R,F,q,V,z,G,L,J,j,E],encapsulation:2})}return r})();var ve=(()=>{class r{$activeModal=c(k);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:46,vars:36,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"ms-2"],[1,"mb-0"],[1,"mb-2","grey-text"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),m(4),a(5,"translate"),t(),i(6,"button",3),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",4)(9,"div",5),p(10,"i",6),t(),i(11,"h5",7),m(12),a(13,"translate"),t(),i(14,"ul",8)(15,"li"),m(16),a(17,"translate"),t(),i(18,"ul",9)(19,"li"),m(20),a(21,"translate"),t(),i(22,"li"),m(23),a(24,"translate"),t(),i(25,"li"),m(26),a(27,"translate"),a(28,"translate"),t(),i(29,"li"),m(30),a(31,"translate"),t(),i(32,"li"),m(33),a(34,"translate"),t()(),i(35,"li"),m(36),a(37,"translate"),t()(),p(38,"app-support-banner"),t(),i(39,"div",10),p(40,"div",11),i(41,"div",12)(42,"button",13),f("click",function(){return l.dismissModal()}),m(43),a(44,"translate"),t()(),p(45,"div",14),t()()()),s&2&&(e(4),d(o(5,12,"support.title")),e(2),u("aria-label",o(7,14,"form.button_close")),e(6),d(o(13,16,"users.title_users")),e(4),d(o(17,18,"users.support.acc_1")),e(4),d(o(21,20,"menu.label_status")),e(3),d(o(24,22,"menu.label_plugins")),e(3),ee("",o(27,24,"menu.label_accessories")," (",o(28,26,"users.support.control"),")"),e(4),d(o(31,28,"menu.linux.label_logs")),e(3),d(o(34,30,"support.title")),e(3),d(o(37,32,"users.support.acc_2")),e(7),x(" ",o(44,34,"form.button_close")," "))},dependencies:[me,E],encapsulation:2})}return r})();var Ie=(r,C)=>({"fa-user-secret":r,"fa-user":C});function De(r,C){if(r&1){let n=I();i(0,"button",23),f("click",function(){$(n);let l=_(2).$implicit,v=_();return U(v.disable2fa(l))}),m(1),a(2,"translate"),t()}if(r&2){let n=_(2).$implicit,s=_();b("disabled",n.username!==s.username),e(),x(" ",o(2,2,"users.setup_2fa_disable")," ")}}function Fe(r,C){if(r&1){let n=I();i(0,"button",24),f("click",function(){$(n);let l=_(2).$implicit,v=_();return U(v.setup2fa(l))}),m(1),a(2,"translate"),t()}if(r&2){let n=_(2).$implicit,s=_();b("disabled",n.username!==s.username),e(),x(" ",o(2,2,"users.setup_2fa")," ")}}function Ve(r,C){if(r&1&&w(0,De,3,4,"button",21)(1,Fe,3,4,"button",22),r&2){let n=_().$implicit;h(n.otpActive?0:1)}}function Ne(r,C){r&1&&p(0,"div")}function Ae(r,C){if(r&1){let n=I();i(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"span",13)(5,"h4"),m(6),t(),i(7,"h5",14),p(8,"i",15),m(9),t()()(),i(10,"div",16),w(11,Ve,2,1)(12,Ne,1,0,"div"),i(13,"div")(14,"button",17),a(15,"translate"),f("click",function(){let l=$(n).$implicit,v=_();return U(v.openEditUser(l))}),p(16,"i",18),t(),i(17,"button",19),a(18,"translate"),f("click",function(){let l=$(n).$implicit,v=_();return U(v.deleteUser(l.id))}),p(19,"i",20),t()()()()()()}if(r&2){let n=C.$implicit,s=_();e(6),d(n.name),e(2),b("ngClass",te(11,Ie,n.admin,!n.admin)),e(),x(" ",n.username," "),e(2),h(n.admin?11:12),e(3),u("aria-label",o(15,7,"form.button_edit")),e(3),b("disabled",s.username===n.username),u("aria-label",o(18,9,"form.button_delete"))}}var Ot=(()=>{class r{$api=c(M);$auth=c(H);$modal=c(ae);$route=c(oe);$settings=c(se);$toastr=c(B);$translate=c(T);homebridgeUsers=[];username=this.$auth.user.username;isAdmin=this.$auth.user.admin;ngOnInit(){let n=this.$translate.instant("users.title_users");this.$settings.setPageTitle(n),this.$route.data.subscribe(s=>{this.homebridgeUsers=s.homebridgeUsers})}reloadUsers(){return this.$api.get("/users").subscribe(n=>{this.homebridgeUsers=n})}openAddNewUser(){this.$modal.open(fe,{size:"lg",backdrop:"static"}).result.finally(()=>{this.reloadUsers()})}openEditUser(n){let s=this.$modal.open(_e,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}deleteUser(n){this.$api.delete(`/users/${n}`).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.toast_user_deleted"),this.$translate.instant("toast.title_success")),this.reloadUsers()},error:s=>{console.error(s),this.$toastr.error(s.error?.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(n){let s=this.$modal.open(ce,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}disable2fa(n){let s=this.$modal.open(pe,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}openSupport(){this.$modal.open(ve,{size:"lg",backdrop:"static"})}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["app-users"]],decls:15,vars:9,consts:[[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],[1,"btn","btn-elegant","waves-effect","m-0","me-2",3,"click"],[1,"fas","fa-user-plus"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-question-circle-o"],[1,"row"],[1,"col-md-6","mb-4"],[1,"card","card-body"],[1,"d-flex","flex-column"],[1,"d-flex","flex-row","mb-3"],[1,"me-auto","my-0"],[1,"small","text-truncate","grey-text"],[1,"fas",3,"ngClass"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-user-pen"],[1,"btn","btn-danger","m-0","ms-2",3,"click","disabled"],[1,"fas","fa-trash"],[1,"btn","btn-elegant","m-0",3,"disabled"],[1,"btn","btn-primary","m-0",3,"disabled"],[1,"btn","btn-elegant","m-0",3,"click","disabled"],[1,"btn","btn-primary","m-0",3,"click","disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h3",2),m(3),a(4,"translate"),t()(),i(5,"div",3)(6,"button",4),a(7,"translate"),f("click",function(){return l.openAddNewUser()}),p(8,"i",5),t(),i(9,"button",6),a(10,"translate"),f("click",function(){return l.openSupport()}),p(11,"i",7),t()()(),i(12,"div",8),Y(13,Ae,20,14,"div",9,X),t()),s&2&&(e(3),d(o(4,3,"users.title_users")),e(3),u("aria-label",o(7,5,"users.button_add_user")),e(3),u("aria-label",o(10,7,"support.title")),e(4),Z(l.homebridgeUsers))},dependencies:[j,E],encapsulation:2})}return r})();export{Ot as UsersComponent};
@@ -1,4 +1,4 @@
1
- import{a as z,b as A,c as k}from"./chunk-MO7W4MOJ.js";import{a as l}from"./chunk-FFMVREJO.js";import{M as n,ea as c,g as r,ja as d,n as h}from"./chunk-WWMJUVLA.js";var f=r(z(),1),a=r(A(),1),p=r(k(),1);var $=(()=>{class t{$ws=d(l);io;fitAddon;webLinksAddon;resize;elementResize;pluginName;term;startTerminal(m,s={},u,w){this.pluginName=w,this.elementResize=u,this.io=this.$ws.connectToNamespace("log"),this.term=new p.Terminal(s),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new f.FitAddon,this.webLinksAddon=new a.WebLinksAddon,this.resize=new h,this.term.open(m.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.subscribe(()=>{this.term.reset(),this.io.socket.emit("tail-log",{cols:this.term.cols,rows:this.term.rows})}),this.io.socket.on("disconnect",()=>{this.term.write(`
1
+ import{a as z,b as A,c as k}from"./chunk-MO7W4MOJ.js";import{a as l}from"./chunk-ZPVJRQ5M.js";import{M as n,ea as c,g as r,ja as d,n as h}from"./chunk-WWMJUVLA.js";var f=r(z(),1),a=r(A(),1),p=r(k(),1);var $=(()=>{class t{$ws=d(l);io;fitAddon;webLinksAddon;resize;elementResize;pluginName;term;startTerminal(m,s={},u,w){this.pluginName=w,this.elementResize=u,this.io=this.$ws.connectToNamespace("log"),this.term=new p.Terminal(s),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new f.FitAddon,this.webLinksAddon=new a.WebLinksAddon,this.resize=new h,this.term.open(m.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.subscribe(()=>{this.term.reset(),this.io.socket.emit("tail-log",{cols:this.term.cols,rows:this.term.rows})}),this.io.socket.on("disconnect",()=>{this.term.write(`
2
2
  \r
3
3
  \rWebsocket failed to connect. Is the server running?
4
4
  \r
@@ -1 +1 @@
1
- import{a as P}from"./chunk-FFMVREJO.js";import"./chunk-ESIPDXUL.js";import{d as D}from"./chunk-6LB7WDKS.js";import{b as F}from"./chunk-AFWEHAAR.js";import{k as E,l as R,n as B,q as U}from"./chunk-DEBBH3A3.js";import{Db as S,Gb as T,Ib as u,Kc as O,La as r,Vb as a,Wa as y,Wb as p,Xb as x,gc as k,h as b,hc as g,ja as d,lb as h,mb as _,mc as l,nc as c,oa as $,pa as w,rb as f,sb as s,tb as n,ub as v,w as C,zc as I}from"./chunk-WWMJUVLA.js";var W=(e,m)=>({"fas fa-spinner fa-spin":e,"far fa-check-circle":m}),M=e=>({"grey-text":e}),V=(e,m)=>({"far fa-circle":e,"fas fa-spinner fa-spin":m});function j(e,m){if(e&1&&(s(0,"div",7),a(1),n()),e&2){let t=u();r(),p(t.error)}}function q(e,m){if(e&1&&(s(0,"p",9),a(1),l(2,"translate"),n(),s(3,"div",10)(4,"div",11)(5,"span"),v(6,"i",12),a(7),l(8,"translate"),n()(),s(9,"div",11)(10,"span",12),v(11,"i",12),a(12),l(13,"translate"),n()()()),e&2){let t=u();r(),p(c(2,6,"restart.please_wait_while_server_restarts")),r(5),f("ngClass",g(12,W,!t.uiOnline,t.uiOnline)),r(),x(" ",c(8,8,"restart.ui_online")," "),r(3),f("ngClass",k(15,M,!t.uiOnline)),r(),f("ngClass",g(17,V,!t.uiOnline,t.uiOnline)),r(),x(" ",c(13,10,"restart.service_ready")," ")}}function z(e,m){if(e&1){let t=S();s(0,"p",15)(1,"button",16),T("click",function(){$(t);let o=u(2);return w(o.viewLogs())}),a(2),l(3,"translate"),n()()}e&2&&(r(2),p(c(3,1,"menu.tooltip_view_logs")))}function A(e,m){if(e&1&&(s(0,"div",8)(1,"p"),a(2),l(3,"translate"),n(),s(4,"p",13),a(5),l(6,"translate"),s(7,"span",14),a(8),n()(),h(9,z,4,3,"p",15),n()),e&2){let t=u();r(2),p(c(3,4,"restart.server_is_taking_long_time_to_restart")),r(3),x(" ",c(6,6,"restart.label_restart_command_executed"),": "),r(3),p(t.resp.command||"End Process"),r(),_(t.uiOnline?9:-1)}}var et=(()=>{class e{$api=d(U);$router=d(D);$settings=d(F);$toastr=d(B);$translate=d(E);$ws=d(P);checkTimeout;checkDelay;io;webrootChanged=!1;uiOnline=!1;error=!1;resp={};timeout=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$router.parseUrl(this.$router.url).queryParams.restarting==="true"?(this.uiOnline=!0,this.checkIfServerUp()):this.performRestart()}viewLogs(){this.$router.navigate(["/logs"])}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}performRestart(){return b(this,null,function*(){try{let t=this.$settings.originalWebroot||"",i=this.$settings.webroot||"";this.webrootChanged=t!==i&&t!==globalThis.webroot.errorCode,this.webrootChanged&&(yield C(this.$api.put("/server/webroot",{webroot:i}))),this.$api.put("/server/restart",{}).subscribe({next:o=>{this.resp=o,this.checkIfServerUp(),o.restartingUI||(this.uiOnline=!0)},error:o=>{console.error(o),this.error=this.$translate.instant("restart.toast_server_restart_error"),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}catch(t){console.error("Failed to update webroot:",t),this.$api.put("/server/restart",{}).subscribe({next:i=>{this.resp=i,this.checkIfServerUp(),i.restartingUI||(this.uiOnline=!0)},error:i=>{console.error(i),this.error=this.$translate.instant("restart.toast_server_restart_error"),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}})}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",t=>{if(this.uiOnline=!0,t.status==="up"||t.status==="pending")if(this.$toastr.success(this.$translate.instant("restart.toast_server_restarted"),this.$translate.instant("toast.title_success")),this.webrootChanged&&!I()){let i=this.$settings.webroot?.replace(/^\/+|\/+$/g,"")||"";window.location.href=i?`/${i}/`:"/"}else this.$router.navigate(["/"])})},7e3),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},4e4)}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=y({type:e,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[3,"ngClass"],[1,"grey-text","mb-0"],[1,"font-monospace"],[1,"mt-2","mb-0"],[1,"btn","btn-primary","mb-0",3,"click"]],template:function(i,o){i&1&&(s(0,"div",0)(1,"h3",1),a(2),l(3,"translate"),n()(),s(4,"div",2)(5,"div",3),v(6,"i",4),n(),s(7,"div",5)(8,"h4",6),a(9),l(10,"translate"),n(),h(11,j,2,1,"div",7)(12,q,14,20),h(13,A,10,8,"div",8),n()()),i&2&&(r(2),p(c(3,4,"menu.restart.title")),r(7),p(c(10,6,"restart.title_restart")),r(2),_(o.error?11:12),r(2),_(o.timeout?13:-1))},dependencies:[O,R],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return e})();export{et as RestartComponent};
1
+ import{a as P}from"./chunk-ZPVJRQ5M.js";import"./chunk-QDMF6BOL.js";import{d as D}from"./chunk-6LB7WDKS.js";import{b as F}from"./chunk-DVZ3YL7I.js";import{k as E,l as R,n as B,q as U}from"./chunk-O3NFPA75.js";import{Db as S,Gb as T,Ib as u,Kc as O,La as r,Vb as a,Wa as y,Wb as p,Xb as x,gc as k,h as b,hc as g,ja as d,lb as h,mb as _,mc as l,nc as c,oa as $,pa as w,rb as f,sb as s,tb as n,ub as v,w as C,zc as I}from"./chunk-WWMJUVLA.js";var W=(e,m)=>({"fas fa-spinner fa-spin":e,"far fa-check-circle":m}),M=e=>({"grey-text":e}),V=(e,m)=>({"far fa-circle":e,"fas fa-spinner fa-spin":m});function j(e,m){if(e&1&&(s(0,"div",7),a(1),n()),e&2){let t=u();r(),p(t.error)}}function q(e,m){if(e&1&&(s(0,"p",9),a(1),l(2,"translate"),n(),s(3,"div",10)(4,"div",11)(5,"span"),v(6,"i",12),a(7),l(8,"translate"),n()(),s(9,"div",11)(10,"span",12),v(11,"i",12),a(12),l(13,"translate"),n()()()),e&2){let t=u();r(),p(c(2,6,"restart.please_wait_while_server_restarts")),r(5),f("ngClass",g(12,W,!t.uiOnline,t.uiOnline)),r(),x(" ",c(8,8,"restart.ui_online")," "),r(3),f("ngClass",k(15,M,!t.uiOnline)),r(),f("ngClass",g(17,V,!t.uiOnline,t.uiOnline)),r(),x(" ",c(13,10,"restart.service_ready")," ")}}function z(e,m){if(e&1){let t=S();s(0,"p",15)(1,"button",16),T("click",function(){$(t);let o=u(2);return w(o.viewLogs())}),a(2),l(3,"translate"),n()()}e&2&&(r(2),p(c(3,1,"menu.tooltip_view_logs")))}function A(e,m){if(e&1&&(s(0,"div",8)(1,"p"),a(2),l(3,"translate"),n(),s(4,"p",13),a(5),l(6,"translate"),s(7,"span",14),a(8),n()(),h(9,z,4,3,"p",15),n()),e&2){let t=u();r(2),p(c(3,4,"restart.server_is_taking_long_time_to_restart")),r(3),x(" ",c(6,6,"restart.label_restart_command_executed"),": "),r(3),p(t.resp.command||"End Process"),r(),_(t.uiOnline?9:-1)}}var et=(()=>{class e{$api=d(U);$router=d(D);$settings=d(F);$toastr=d(B);$translate=d(E);$ws=d(P);checkTimeout;checkDelay;io;webrootChanged=!1;uiOnline=!1;error=!1;resp={};timeout=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$router.parseUrl(this.$router.url).queryParams.restarting==="true"?(this.uiOnline=!0,this.checkIfServerUp()):this.performRestart()}viewLogs(){this.$router.navigate(["/logs"])}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}performRestart(){return b(this,null,function*(){try{let t=this.$settings.originalWebroot||"",i=this.$settings.webroot||"";this.webrootChanged=t!==i&&t!==globalThis.webroot.errorCode,this.webrootChanged&&(yield C(this.$api.put("/server/webroot",{webroot:i}))),this.$api.put("/server/restart",{}).subscribe({next:o=>{this.resp=o,this.checkIfServerUp(),o.restartingUI||(this.uiOnline=!0)},error:o=>{console.error(o),this.error=this.$translate.instant("restart.toast_server_restart_error"),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}catch(t){console.error("Failed to update webroot:",t),this.$api.put("/server/restart",{}).subscribe({next:i=>{this.resp=i,this.checkIfServerUp(),i.restartingUI||(this.uiOnline=!0)},error:i=>{console.error(i),this.error=this.$translate.instant("restart.toast_server_restart_error"),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}})}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",t=>{if(this.uiOnline=!0,t.status==="up"||t.status==="pending")if(this.$toastr.success(this.$translate.instant("restart.toast_server_restarted"),this.$translate.instant("toast.title_success")),this.webrootChanged&&!I()){let i=this.$settings.webroot?.replace(/^\/+|\/+$/g,"")||"";window.location.href=i?`/${i}/`:"/"}else this.$router.navigate(["/"])})},7e3),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},4e4)}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=y({type:e,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[3,"ngClass"],[1,"grey-text","mb-0"],[1,"font-monospace"],[1,"mt-2","mb-0"],[1,"btn","btn-primary","mb-0",3,"click"]],template:function(i,o){i&1&&(s(0,"div",0)(1,"h3",1),a(2),l(3,"translate"),n()(),s(4,"div",2)(5,"div",3),v(6,"i",4),n(),s(7,"div",5)(8,"h4",6),a(9),l(10,"translate"),n(),h(11,j,2,1,"div",7)(12,q,14,20),h(13,A,10,8,"div",8),n()()),i&2&&(r(2),p(c(3,4,"menu.restart.title")),r(7),p(c(10,6,"restart.title_restart")),r(2),_(o.error?11:12),r(2),_(o.timeout?13:-1))},dependencies:[O,R],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return e})();export{et as RestartComponent};