homebridge-config-ui-x 5.3.1-beta.13 → 5.3.1-beta.14

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 (79) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/dist/modules/platform-tools/terminal/terminal.service.js +26 -26
  3. package/dist/modules/platform-tools/terminal/terminal.service.js.map +1 -1
  4. package/package.json +1 -1
  5. package/public/3rdpartylicenses.txt +52 -78
  6. package/public/{chunk-7KOOVJKG.js → chunk-3PLKDJKM.js} +1 -1
  7. package/public/{chunk-MPW2CV3F.js → chunk-3SHS6C6Z.js} +2 -2
  8. package/public/{chunk-KXS3TLYQ.js → chunk-43DI3B3O.js} +1 -1
  9. package/public/chunk-4TPABB7T.js +1 -0
  10. package/public/{chunk-3DSPE7GJ.js → chunk-5COKJREM.js} +1 -1
  11. package/public/{chunk-HJHH7Y7A.js → chunk-5QILBOA3.js} +1 -1
  12. package/public/chunk-5UXLX3K4.js +1 -0
  13. package/public/chunk-6A25XFPQ.js +1 -0
  14. package/public/{chunk-AI2E5XQJ.js → chunk-6XEKSROZ.js} +1 -1
  15. package/public/chunk-73TPLA7O.js +1 -0
  16. package/public/{chunk-VCWU3EQT.js → chunk-AMGDPEW7.js} +1 -1
  17. package/public/chunk-AVSRRFMR.js +4 -0
  18. package/public/{chunk-PF7WC27K.js → chunk-C5XLOMK4.js} +1 -1
  19. package/public/chunk-CRQDEVG2.js +1 -0
  20. package/public/{chunk-UIMHMEZF.js → chunk-DCKXHWKB.js} +1 -1
  21. package/public/chunk-EC7RI7GH.js +30 -0
  22. package/public/{chunk-PL62KZEB.js → chunk-EJX334DN.js} +2 -2
  23. package/public/{chunk-M76NCR73.js → chunk-ELO2ZKUD.js} +2 -2
  24. package/public/{chunk-CJUCE7Y6.js → chunk-F64MNBRR.js} +1 -1
  25. package/public/chunk-G2UVHSWB.js +1 -0
  26. package/public/{chunk-Y7SBCRZV.js → chunk-HA7GNI6P.js} +2 -2
  27. package/public/{chunk-CUH5VGTG.js → chunk-HEGAVIXM.js} +1 -1
  28. package/public/{chunk-X52P3KFH.js → chunk-HX2NWXCF.js} +1 -1
  29. package/public/chunk-I72ZUCVM.js +1 -0
  30. package/public/{chunk-VG3QEH5O.js → chunk-ILQJFVTN.js} +1 -1
  31. package/public/chunk-J2VULP3G.js +1 -0
  32. package/public/{chunk-CXEQVJNG.js → chunk-K5H75Q3X.js} +1 -1
  33. package/public/chunk-KHB6HEVX.js +12 -0
  34. package/public/{chunk-QQPSHTC2.js → chunk-KN4IZH5E.js} +1 -1
  35. package/public/{chunk-7JSZLOAR.js → chunk-MG7TXSFH.js} +1 -1
  36. package/public/{chunk-F27XTST6.js → chunk-MJK6N6PA.js} +1 -1
  37. package/public/{chunk-NVZBF2L7.js → chunk-MTJGQHMY.js} +1 -1
  38. package/public/{chunk-TYTYQHIZ.js → chunk-MZPWMXRT.js} +1 -1
  39. package/public/{chunk-NG6DMWDO.js → chunk-OHT6RZO3.js} +1 -1
  40. package/public/{chunk-PJMVE7ND.js → chunk-OMK3IIQD.js} +1 -1
  41. package/public/{chunk-UBQOKDSO.js → chunk-OYMXAOLG.js} +1 -1
  42. package/public/chunk-PDPWQVAP.js +1 -0
  43. package/public/chunk-R2AVTLHS.js +1 -0
  44. package/public/{chunk-E5SQGHQ5.js → chunk-RHCMG64A.js} +1 -1
  45. package/public/chunk-RM4R2O4L.js +23 -0
  46. package/public/{chunk-M3BLV5IG.js → chunk-S22CMLCR.js} +1 -1
  47. package/public/{chunk-NO7RIAKI.js → chunk-SAJVBPRK.js} +1 -1
  48. package/public/chunk-SVT6UTHY.js +1 -0
  49. package/public/{chunk-WEQ2PIH6.js → chunk-TG6IASVY.js} +1 -1
  50. package/public/{chunk-6KZ73TWH.js → chunk-TN4JS7TA.js} +1 -1
  51. package/public/{chunk-HCBFHEMF.js → chunk-UCQVH5VK.js} +1 -1
  52. package/public/chunk-VPU5FNT3.js +1 -0
  53. package/public/chunk-XOMCL27N.js +1 -0
  54. package/public/{chunk-G7T7KOJA.js → chunk-XSFS7STY.js} +1 -1
  55. package/public/{chunk-EA6YVIQU.js → chunk-YAK2JO2P.js} +1 -1
  56. package/public/{chunk-QXQRV4WW.js → chunk-YM5OTGZR.js} +1 -1
  57. package/public/{chunk-5EOVZCNY.js → chunk-Z33E2HC2.js} +1 -1
  58. package/public/{chunk-V2JQMGNW.js → chunk-Z4C74VQT.js} +1 -1
  59. package/public/{chunk-R42SJDLQ.js → chunk-ZMIWCT7J.js} +1 -1
  60. package/public/{chunk-4FCAJYAY.js → chunk-ZZHP3OJM.js} +1 -1
  61. package/public/index.html +1 -1
  62. package/public/{main-LEWM4WGX.js → main-4DTROQMK.js} +1 -1
  63. package/public/chunk-2X6JIXBJ.js +0 -12
  64. package/public/chunk-5CXUHYYU.js +0 -1
  65. package/public/chunk-7K45YNNW.js +0 -1
  66. package/public/chunk-7LN6QR4H.js +0 -49
  67. package/public/chunk-AM5BQOZR.js +0 -1
  68. package/public/chunk-AP3T467N.js +0 -1
  69. package/public/chunk-F4YE22QV.js +0 -4
  70. package/public/chunk-K2Y5ABFE.js +0 -1
  71. package/public/chunk-K6MSIPN4.js +0 -1
  72. package/public/chunk-KUNMS7VX.js +0 -1
  73. package/public/chunk-LNH65L44.js +0 -1
  74. package/public/chunk-PDQ4VVCA.js +0 -1
  75. package/public/chunk-TGW72B3Y.js +0 -4
  76. package/public/chunk-VYIG4YRS.js +0 -1
  77. package/public/chunk-WBJOO4V7.js +0 -1
  78. package/public/chunk-Z2JFLSVB.js +0 -1
  79. package/public/chunk-ZC53O5GD.js +0 -1
@@ -1,49 +0,0 @@
1
- import{a as W1}from"./chunk-NG6DMWDO.js";import{a as $p,c as L1,d as z1,e as ua,f as Bi,g as jq}from"./chunk-MPW2CV3F.js";import{a as F1}from"./chunk-7JSZLOAR.js";import{a as B1}from"./chunk-AKD24HZC.js";import{a as H1}from"./chunk-VG3QEH5O.js";import{a as V1,b as j1,c as R1}from"./chunk-H337OZRD.js";import{a as $s}from"./chunk-IMT3YYMD.js";import{a as U1}from"./chunk-UKEZ5GGN.js";import{a as lc,b as dc}from"./chunk-RPRM66DV.js";import{a as uc,b as cc}from"./chunk-S7AIVWKK.js";import{a as q1}from"./chunk-Z2JFLSVB.js";import{a as nc,b as ic,c as rc,d as oc,e as ac,f as sc,g as la,m as Et,n as en,o as M1,p as k1,q as A1,r as D1,s as N1,t as jr}from"./chunk-F27XTST6.js";import{A as O1,B as Ii,C as Ss,a as C1,b as qr,c as yo,e as In,f as x1,h as w1,i as I1,j as S1,k as $1,l as wi,m as E1,o as T1,p as Vr,s as sa,t as vo,u as P1,v as bo}from"./chunk-KUNMS7VX.js";import{a as Br}from"./chunk-G7T7KOJA.js";import{d as Ri}from"./chunk-25NXLXGL.js";import{b as Pt}from"./chunk-UBQOKDSO.js";import{k as pt,m as Rr,n as rt}from"./chunk-CXEQVJNG.js";import{a as ft,b as Tt}from"./chunk-CPAHENLQ.js";import{e as b1}from"./chunk-RJOGO4M5.js";import{$a as f1,Ac as g1,Bc as _1,Ca as kr,Cc as dt,D as s1,Da as d1,Dc as xi,Ec as go,Fa as ra,Fc as ai,Gc as aa,Hb as me,Hc as A,Ib as j,Ic as V,Jb as R,Jc as At,Lb as vn,M as na,Mb as bn,Nb as Cn,Ob as E,Pb as y,Qb as v,Qc as xn,Rb as q,Rc as le,Sb as Yu,Sc as Fr,Tb as Xu,Ub as Zu,Uc as y1,Vb as ws,Wb as Is,Xa as Ke,Z as xp,_b as ue,a as ye,aa as xs,ab as m,b as at,bc as Z,cc as Qu,dc as S,e as I,fa as l1,fb as Ku,g as st,ga as Kn,gb as ur,h as pe,ha as ia,hc as wp,ib as po,ic as Ip,id as si,ja as u1,jc as Sp,jd as _o,k as i1,ka as c1,kc as Ar,kd as wn,la as L,lc as Dr,mb as Ce,mc as h1,n as Gn,nb as oa,nc as Ci,o as Cp,ob as mo,oc as Nr,pb as p1,pc as ve,q as r1,qc as M,ra as Y,rc as se,rd as tc,sa as X,sb as Me,sc as ie,tc as ho,ub as m1,uc as ec,v as o1,vb as Ju,w as je,x as a1,xc as lt,yc as ut,za as Gu,zc as ct,zd as v1}from"./chunk-WEVBEUAJ.js";var ev=I(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.formatNames=zi.fastFormats=zi.fullFormats=void 0;function Li(e,n){return{validate:e,compare:n}}zi.fullFormats={date:Li(Y1,Op),time:Li(Tp(!0),Mp),"date-time":Li(G1(!0),Z1),"iso-time":Li(Tp(),X1),"iso-date-time":Li(G1(),Q1),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:Hq,"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:Zq,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:Wq,int32:{type:"number",validate:Jq},int64:{type:"number",validate:Yq},float:{type:"number",validate:J1},double:{type:"number",validate:J1},password:!0,binary:!0};zi.fastFormats=at(ye({},zi.fullFormats),{date:Li(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Op),time:Li(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Mp),"date-time":Li(/^\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,Z1),"iso-time":Li(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,X1),"iso-date-time":Li(/^\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,Q1),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});zi.formatNames=Object.keys(zi.fullFormats);function Rq(e){return e%4===0&&(e%100!==0||e%400===0)}var Bq=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Lq=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Y1(e){let n=Bq.exec(e);if(!n)return!1;let t=+n[1],i=+n[2],r=+n[3];return i>=1&&i<=12&&r>=1&&r<=(i===2&&Rq(t)?29:Lq[i])}function Op(e,n){if(e&&n)return e>n?1:e<n?-1:0}var Ep=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Tp(e){return function(t){let i=Ep.exec(t);if(!i)return!1;let r=+i[1],a=+i[2],l=+i[3],u=i[4],d=i[5]==="-"?-1:1,p=+(i[6]||0),h=+(i[7]||0);if(p>23||h>59||e&&!u)return!1;if(r<=23&&a<=59&&l<60)return!0;let _=a-h*d,C=r-p*d-(_<0?1:0);return(C===23||C===-1)&&(_===59||_===-1)&&l<61}}function Mp(e,n){if(!(e&&n))return;let t=new Date("2020-01-01T"+e).valueOf(),i=new Date("2020-01-01T"+n).valueOf();if(t&&i)return t-i}function X1(e,n){if(!(e&&n))return;let t=Ep.exec(e),i=Ep.exec(n);if(t&&i)return e=t[1]+t[2]+t[3],n=i[1]+i[2]+i[3],e>n?1:e<n?-1:0}var Pp=/t|\s/i;function G1(e){let n=Tp(e);return function(i){let r=i.split(Pp);return r.length===2&&Y1(r[0])&&n(r[1])}}function Z1(e,n){if(!(e&&n))return;let t=new Date(e).valueOf(),i=new Date(n).valueOf();if(t&&i)return t-i}function Q1(e,n){if(!(e&&n))return;let[t,i]=e.split(Pp),[r,a]=n.split(Pp),l=Op(t,r);if(l!==void 0)return l||Mp(i,a)}var zq=/\/|:/,Uq=/^(?:[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 Hq(e){return zq.test(e)&&Uq.test(e)}var K1=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function Wq(e){return K1.lastIndex=0,K1.test(e)}var Gq=-(2**31),Kq=2**31-1;function Jq(e){return Number.isInteger(e)&&e<=Kq&&e>=Gq}function Yq(e){return Number.isInteger(e)}function J1(){return!0}var Xq=/[^\\]\\Z/;function Zq(e){if(Xq.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Ps=I(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 Es=class{};et._CodeOrName=Es;et.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Co=class extends Es{constructor(n){if(super(),!et.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};et.Name=Co;var li=class extends Es{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((t,i)=>(i instanceof Co&&(t[i.str]=(t[i.str]||0)+1),t),{})}};et._Code=li;et.nil=new li("");function tv(e,...n){let t=[e[0]],i=0;for(;i<n.length;)Ap(t,n[i]),t.push(e[++i]);return new li(t)}et._=tv;var kp=new li("+");function nv(e,...n){let t=[Ts(e[0])],i=0;for(;i<n.length;)t.push(kp),Ap(t,n[i]),t.push(kp,Ts(e[++i]));return Qq(t),new li(t)}et.str=nv;function Ap(e,n){n instanceof li?e.push(...n._items):n instanceof Co?e.push(n):e.push(nV(n))}et.addCodeArg=Ap;function Qq(e){let n=1;for(;n<e.length-1;){if(e[n]===kp){let t=eV(e[n-1],e[n+1]);if(t!==void 0){e.splice(n-1,3,t);continue}e[n++]="+"}n++}}function eV(e,n){if(n==='""')return e;if(e==='""')return n;if(typeof e=="string")return n instanceof Co||e[e.length-1]!=='"'?void 0:typeof n!="string"?`${e.slice(0,-1)}${n}"`:n[0]==='"'?e.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(e instanceof Co))return`"${e}${n.slice(1)}`}function tV(e,n){return n.emptyStr()?e:e.emptyStr()?n:nv`${e}${n}`}et.strConcat=tV;function nV(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ts(Array.isArray(e)?e.join(","):e)}function iV(e){return new li(Ts(e))}et.stringify=iV;function Ts(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}et.safeStringify=Ts;function rV(e){return typeof e=="string"&&et.IDENTIFIER.test(e)?new li(`.${e}`):tv`[${e}]`}et.getProperty=rV;function oV(e){if(typeof e=="string"&&et.IDENTIFIER.test(e))return new li(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}et.getEsmExportName=oV;function aV(e){return new li(e.toString())}et.regexpCode=aV});var Fp=I(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.ValueScope=Dn.ValueScopeName=Dn.Scope=Dn.varKinds=Dn.UsedValueState=void 0;var An=Ps(),Dp=class extends Error{constructor(n){super(`CodeGen: "code" for ${n} not defined`),this.value=n.value}},fc=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(fc||(Dn.UsedValueState=fc={}));Dn.varKinds={const:new An.Name("const"),let:new An.Name("let"),var:new An.Name("var")};var pc=class{constructor({prefixes:n,parent:t}={}){this._names={},this._prefixes=n,this._parent=t}toName(n){return n instanceof An.Name?n:this.name(n)}name(n){return new An.Name(this._newName(n))}_newName(n){let t=this._names[n]||this._nameGroup(n);return`${n}${t.index++}`}_nameGroup(n){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(n)||this._prefixes&&!this._prefixes.has(n))throw new Error(`CodeGen: prefix "${n}" is not allowed in this scope`);return this._names[n]={prefix:n,index:0}}};Dn.Scope=pc;var mc=class extends An.Name{constructor(n,t){super(t),this.prefix=n}setValue(n,{property:t,itemIndex:i}){this.value=n,this.scopePath=(0,An._)`.${new An.Name(t)}[${i}]`}};Dn.ValueScopeName=mc;var sV=(0,An._)`\n`,Np=class extends pc{constructor(n){super(n),this._values={},this._scope=n.scope,this.opts=at(ye({},n),{_n:n.lines?sV:An.nil})}get(){return this._scope}name(n){return new mc(n,this._newName(n))}value(n,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(n),{prefix:a}=r,l=(i=t.key)!==null&&i!==void 0?i:t.ref,u=this._values[a];if(u){let h=u.get(l);if(h)return h}else u=this._values[a]=new Map;u.set(l,r);let d=this._scope[a]||(this._scope[a]=[]),p=d.length;return d[p]=t.ref,r.setValue(t,{property:a,itemIndex:p}),r}getValue(n,t){let i=this._values[n];if(i)return i.get(t)}scopeRefs(n,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,An._)`${n}${i.scopePath}`})}scopeCode(n=this._values,t,i){return this._reduceValues(n,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,i)}_reduceValues(n,t,i={},r){let a=An.nil;for(let l in n){let u=n[l];if(!u)continue;let d=i[l]=i[l]||new Map;u.forEach(p=>{if(d.has(p))return;d.set(p,fc.Started);let h=t(p);if(h){let _=this.opts.es5?Dn.varKinds.var:Dn.varKinds.const;a=(0,An._)`${a}${_} ${p} = ${h};${this.opts._n}`}else if(h=r?.(p))a=(0,An._)`${a}${h}${this.opts._n}`;else throw new Dp(p);d.set(p,fc.Completed)})}return a}};Dn.ValueScope=Np});var xe=I(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.or=Le.and=Le.not=Le.CodeGen=Le.operators=Le.varKinds=Le.ValueScopeName=Le.ValueScope=Le.Scope=Le.Name=Le.regexpCode=Le.stringify=Le.getProperty=Le.nil=Le.strConcat=Le.str=Le._=void 0;var Xe=Ps(),Si=Fp(),Lr=Ps();Object.defineProperty(Le,"_",{enumerable:!0,get:function(){return Lr._}});Object.defineProperty(Le,"str",{enumerable:!0,get:function(){return Lr.str}});Object.defineProperty(Le,"strConcat",{enumerable:!0,get:function(){return Lr.strConcat}});Object.defineProperty(Le,"nil",{enumerable:!0,get:function(){return Lr.nil}});Object.defineProperty(Le,"getProperty",{enumerable:!0,get:function(){return Lr.getProperty}});Object.defineProperty(Le,"stringify",{enumerable:!0,get:function(){return Lr.stringify}});Object.defineProperty(Le,"regexpCode",{enumerable:!0,get:function(){return Lr.regexpCode}});Object.defineProperty(Le,"Name",{enumerable:!0,get:function(){return Lr.Name}});var vc=Fp();Object.defineProperty(Le,"Scope",{enumerable:!0,get:function(){return vc.Scope}});Object.defineProperty(Le,"ValueScope",{enumerable:!0,get:function(){return vc.ValueScope}});Object.defineProperty(Le,"ValueScopeName",{enumerable:!0,get:function(){return vc.ValueScopeName}});Object.defineProperty(Le,"varKinds",{enumerable:!0,get:function(){return vc.varKinds}});Le.operators={GT:new Xe._Code(">"),GTE:new Xe._Code(">="),LT:new Xe._Code("<"),LTE:new Xe._Code("<="),EQ:new Xe._Code("==="),NEQ:new Xe._Code("!=="),NOT:new Xe._Code("!"),OR:new Xe._Code("||"),AND:new Xe._Code("&&"),ADD:new Xe._Code("+")};var cr=class{optimizeNodes(){return this}optimizeNames(n,t){return this}},qp=class extends cr{constructor(n,t,i){super(),this.varKind=n,this.name=t,this.rhs=i}render({es5:n,_n:t}){let i=n?Si.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${r};`+t}optimizeNames(n,t){if(n[this.name.str])return this.rhs&&(this.rhs=ca(this.rhs,n,t)),this}get names(){return this.rhs instanceof Xe._CodeOrName?this.rhs.names:{}}},gc=class extends cr{constructor(n,t,i){super(),this.lhs=n,this.rhs=t,this.sideEffects=i}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,t){if(!(this.lhs instanceof Xe.Name&&!n[this.lhs.str]&&!this.sideEffects))return this.rhs=ca(this.rhs,n,t),this}get names(){let n=this.lhs instanceof Xe.Name?{}:ye({},this.lhs.names);return yc(n,this.rhs)}},Vp=class extends gc{constructor(n,t,i,r){super(n,i,r),this.op=t}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}},jp=class extends cr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}},Rp=class extends cr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}},Bp=class extends cr{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}},Lp=class extends cr{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,t){return this.code=ca(this.code,n,t),this}get names(){return this.code instanceof Xe._CodeOrName?this.code.names:{}}},Os=class extends cr{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce((t,i)=>t+i.render(n),"")}optimizeNodes(){let{nodes:n}=this,t=n.length;for(;t--;){let i=n[t].optimizeNodes();Array.isArray(i)?n.splice(t,1,...i):i?n[t]=i:n.splice(t,1)}return n.length>0?this:void 0}optimizeNames(n,t){let{nodes:i}=this,r=i.length;for(;r--;){let a=i[r];a.optimizeNames(n,t)||(lV(n,a.names),i.splice(r,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((n,t)=>xo(n,t.names),{})}},dr=class extends Os{render(n){return"{"+n._n+super.render(n)+"}"+n._n}},zp=class extends Os{},Up=(()=>{class e extends dr{}return e.kind="else",e})(),hc=(()=>{class e extends dr{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let r=i.optimizeNodes();i=this.else=Array.isArray(r)?new Up(r):r}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(sv(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=ca(this.condition,t,i),this}get names(){let t=super.names;return yc(t,this.condition),this.else&&xo(t,this.else.names),t}}return e.kind="if",e})(),bc=(()=>{class e extends dr{}return e.kind="for",e})(),Hp=class extends bc{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iteration=ca(this.iteration,n,t),this}get names(){return xo(super.names,this.iteration.names)}},Wp=class extends bc{constructor(n,t,i,r){super(),this.varKind=n,this.name=t,this.from=i,this.to=r}render(n){let t=n.es5?Si.varKinds.var:this.varKind,{name:i,from:r,to:a}=this;return`for(${t} ${i}=${r}; ${i}<${a}; ${i}++)`+super.render(n)}get names(){let n=yc(super.names,this.from);return yc(n,this.to)}},_c=class extends bc{constructor(n,t,i,r){super(),this.loop=n,this.varKind=t,this.name=i,this.iterable=r}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iterable=ca(this.iterable,n,t),this}get names(){return xo(super.names,this.iterable.names)}},iv=(()=>{class e extends dr{constructor(t,i,r){super(),this.name=t,this.args=i,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),rv=(()=>{class e extends Os{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Gp=class extends dr{render(n){let t="try"+super.render(n);return this.catch&&(t+=this.catch.render(n)),this.finally&&(t+=this.finally.render(n)),t}optimizeNodes(){var n,t;return super.optimizeNodes(),(n=this.catch)===null||n===void 0||n.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(n,t){var i,r;return super.optimizeNames(n,t),(i=this.catch)===null||i===void 0||i.optimizeNames(n,t),(r=this.finally)===null||r===void 0||r.optimizeNames(n,t),this}get names(){let n=super.names;return this.catch&&xo(n,this.catch.names),this.finally&&xo(n,this.finally.names),n}},ov=(()=>{class e extends dr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),av=(()=>{class e extends dr{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Kp=class{constructor(n,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=at(ye({},t),{_n:t.lines?`
2
- `:""}),this._extScope=n,this._scope=new Si.Scope({parent:n}),this._nodes=[new zp]}toString(){return this._root.render(this.opts)}name(n){return this._scope.name(n)}scopeName(n){return this._extScope.name(n)}scopeValue(n,t){let i=this._extScope.value(n,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(n,t){return this._extScope.getValue(n,t)}scopeRefs(n){return this._extScope.scopeRefs(n,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(n,t,i,r){let a=this._scope.toName(t);return i!==void 0&&r&&(this._constants[a.str]=i),this._leafNode(new qp(n,a,i)),a}const(n,t,i){return this._def(Si.varKinds.const,n,t,i)}let(n,t,i){return this._def(Si.varKinds.let,n,t,i)}var(n,t,i){return this._def(Si.varKinds.var,n,t,i)}assign(n,t,i){return this._leafNode(new gc(n,t,i))}add(n,t){return this._leafNode(new Vp(n,Le.operators.ADD,t))}code(n){return typeof n=="function"?n():n!==Xe.nil&&this._leafNode(new Lp(n)),this}object(...n){let t=["{"];for(let[i,r]of n)t.length>1&&t.push(","),t.push(i),(i!==r||this.opts.es5)&&(t.push(":"),(0,Xe.addCodeArg)(t,r));return t.push("}"),new Xe._Code(t)}if(n,t,i){if(this._blockNode(new hc(n)),t&&i)this.code(t).else().code(i).endIf();else if(t)this.code(t).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(n){return this._elseNode(new hc(n))}else(){return this._elseNode(new Up)}endIf(){return this._endBlockNode(hc,Up)}_for(n,t){return this._blockNode(n),t&&this.code(t).endFor(),this}for(n,t){return this._for(new Hp(n),t)}forRange(n,t,i,r,a=this.opts.es5?Si.varKinds.var:Si.varKinds.let){let l=this._scope.toName(n);return this._for(new Wp(a,l,t,i),()=>r(l))}forOf(n,t,i,r=Si.varKinds.const){let a=this._scope.toName(n);if(this.opts.es5){let l=t instanceof Xe.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Xe._)`${l}.length`,u=>{this.var(a,(0,Xe._)`${l}[${u}]`),i(a)})}return this._for(new _c("of",r,a,t),()=>i(a))}forIn(n,t,i,r=this.opts.es5?Si.varKinds.var:Si.varKinds.const){if(this.opts.ownProperties)return this.forOf(n,(0,Xe._)`Object.keys(${t})`,i);let a=this._scope.toName(n);return this._for(new _c("in",r,a,t),()=>i(a))}endFor(){return this._endBlockNode(bc)}label(n){return this._leafNode(new jp(n))}break(n){return this._leafNode(new Rp(n))}return(n){let t=new rv;if(this._blockNode(t),this.code(n),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(rv)}try(n,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new Gp;if(this._blockNode(r),this.code(n),t){let a=this.name("e");this._currNode=r.catch=new ov(a),t(a)}return i&&(this._currNode=r.finally=new av,this.code(i)),this._endBlockNode(ov,av)}throw(n){return this._leafNode(new Bp(n))}block(n,t){return this._blockStarts.push(this._nodes.length),n&&this.code(n).endBlock(t),this}endBlock(n){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let i=this._nodes.length-t;if(i<0||n!==void 0&&i!==n)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${n} expected`);return this._nodes.length=t,this}func(n,t=Xe.nil,i,r){return this._blockNode(new iv(n,t,i)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(iv)}optimize(n=1){for(;n-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(n){return this._currNode.nodes.push(n),this}_blockNode(n){this._currNode.nodes.push(n),this._nodes.push(n)}_endBlockNode(n,t){let i=this._currNode;if(i instanceof n||t&&i instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${n.kind}/${t.kind}`:n.kind}"`)}_elseNode(n){let t=this._currNode;if(!(t instanceof hc))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=n,this}get _root(){return this._nodes[0]}get _currNode(){let n=this._nodes;return n[n.length-1]}set _currNode(n){let t=this._nodes;t[t.length-1]=n}};Le.CodeGen=Kp;function xo(e,n){for(let t in n)e[t]=(e[t]||0)+(n[t]||0);return e}function yc(e,n){return n instanceof Xe._CodeOrName?xo(e,n.names):e}function ca(e,n,t){if(e instanceof Xe.Name)return i(e);if(!r(e))return e;return new Xe._Code(e._items.reduce((a,l)=>(l instanceof Xe.Name&&(l=i(l)),l instanceof Xe._Code?a.push(...l._items):a.push(l),a),[]));function i(a){let l=t[a.str];return l===void 0||n[a.str]!==1?a:(delete n[a.str],l)}function r(a){return a instanceof Xe._Code&&a._items.some(l=>l instanceof Xe.Name&&n[l.str]===1&&t[l.str]!==void 0)}}function lV(e,n){for(let t in n)e[t]=(e[t]||0)-(n[t]||0)}function sv(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Xe._)`!${Jp(e)}`}Le.not=sv;var uV=lv(Le.operators.AND);function cV(...e){return e.reduce(uV)}Le.and=cV;var dV=lv(Le.operators.OR);function fV(...e){return e.reduce(dV)}Le.or=fV;function lv(e){return(n,t)=>n===Xe.nil?t:t===Xe.nil?n:(0,Xe._)`${Jp(n)} ${e} ${Jp(t)}`}function Jp(e){return e instanceof Xe.Name?e:(0,Xe._)`(${e})`}});var We=I(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.checkStrictMode=ze.getErrorPath=ze.Type=ze.useFunc=ze.setEvaluated=ze.evaluatedPropsToName=ze.mergeEvaluated=ze.eachItem=ze.unescapeJsonPointer=ze.escapeJsonPointer=ze.escapeFragment=ze.unescapeFragment=ze.schemaRefOrVal=ze.schemaHasRulesButRef=ze.schemaHasRules=ze.checkUnknownRules=ze.alwaysValidSchema=ze.toHash=void 0;var _t=xe(),pV=Ps();function mV(e){let n={};for(let t of e)n[t]=!0;return n}ze.toHash=mV;function hV(e,n){return typeof n=="boolean"?n:Object.keys(n).length===0?!0:(dv(e,n),!fv(n,e.self.RULES.all))}ze.alwaysValidSchema=hV;function dv(e,n=e.schema){let{opts:t,self:i}=e;if(!t.strictSchema||typeof n=="boolean")return;let r=i.RULES.keywords;for(let a in n)r[a]||hv(e,`unknown keyword: "${a}"`)}ze.checkUnknownRules=dv;function fv(e,n){if(typeof e=="boolean")return!e;for(let t in e)if(n[t])return!0;return!1}ze.schemaHasRules=fv;function gV(e,n){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&n.all[t])return!0;return!1}ze.schemaHasRulesButRef=gV;function _V({topSchemaRef:e,schemaPath:n},t,i,r){if(!r){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,_t._)`${t}`}return(0,_t._)`${e}${n}${(0,_t.getProperty)(i)}`}ze.schemaRefOrVal=_V;function yV(e){return pv(decodeURIComponent(e))}ze.unescapeFragment=yV;function vV(e){return encodeURIComponent(Xp(e))}ze.escapeFragment=vV;function Xp(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ze.escapeJsonPointer=Xp;function pv(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ze.unescapeJsonPointer=pv;function bV(e,n){if(Array.isArray(e))for(let t of e)n(t);else n(e)}ze.eachItem=bV;function uv({mergeNames:e,mergeToName:n,mergeValues:t,resultToName:i}){return(r,a,l,u)=>{let d=l===void 0?a:l instanceof _t.Name?(a instanceof _t.Name?e(r,a,l):n(r,a,l),l):a instanceof _t.Name?(n(r,l,a),a):t(a,l);return u===_t.Name&&!(d instanceof _t.Name)?i(r,d):d}}ze.mergeEvaluated={props:uv({mergeNames:(e,n,t)=>e.if((0,_t._)`${t} !== true && ${n} !== undefined`,()=>{e.if((0,_t._)`${n} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,_t._)`${t} || {}`).code((0,_t._)`Object.assign(${t}, ${n})`))}),mergeToName:(e,n,t)=>e.if((0,_t._)`${t} !== true`,()=>{n===!0?e.assign(t,!0):(e.assign(t,(0,_t._)`${t} || {}`),Zp(e,t,n))}),mergeValues:(e,n)=>e===!0?!0:ye(ye({},e),n),resultToName:mv}),items:uv({mergeNames:(e,n,t)=>e.if((0,_t._)`${t} !== true && ${n} !== undefined`,()=>e.assign(t,(0,_t._)`${n} === true ? true : ${t} > ${n} ? ${t} : ${n}`)),mergeToName:(e,n,t)=>e.if((0,_t._)`${t} !== true`,()=>e.assign(t,n===!0?!0:(0,_t._)`${t} > ${n} ? ${t} : ${n}`)),mergeValues:(e,n)=>e===!0?!0:Math.max(e,n),resultToName:(e,n)=>e.var("items",n)})};function mv(e,n){if(n===!0)return e.var("props",!0);let t=e.var("props",(0,_t._)`{}`);return n!==void 0&&Zp(e,t,n),t}ze.evaluatedPropsToName=mv;function Zp(e,n,t){Object.keys(t).forEach(i=>e.assign((0,_t._)`${n}${(0,_t.getProperty)(i)}`,!0))}ze.setEvaluated=Zp;var cv={};function CV(e,n){return e.scopeValue("func",{ref:n,code:cv[n.code]||(cv[n.code]=new pV._Code(n.code))})}ze.useFunc=CV;var Yp=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(Yp||(ze.Type=Yp={}));function xV(e,n,t){if(e instanceof _t.Name){let i=n===Yp.Num;return t?i?(0,_t._)`"[" + ${e} + "]"`:(0,_t._)`"['" + ${e} + "']"`:i?(0,_t._)`"/" + ${e}`:(0,_t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,_t.getProperty)(e).toString():"/"+Xp(e)}ze.getErrorPath=xV;function hv(e,n,t=e.opts.strictSchema){if(t){if(n=`strict mode: ${n}`,t===!0)throw new Error(n);e.self.logger.warn(n)}}ze.checkStrictMode=hv});var ui=I(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});var un=xe(),wV={data:new un.Name("data"),valCxt:new un.Name("valCxt"),instancePath:new un.Name("instancePath"),parentData:new un.Name("parentData"),parentDataProperty:new un.Name("parentDataProperty"),rootData:new un.Name("rootData"),dynamicAnchors:new un.Name("dynamicAnchors"),vErrors:new un.Name("vErrors"),errors:new un.Name("errors"),this:new un.Name("this"),self:new un.Name("self"),scope:new un.Name("scope"),json:new un.Name("json"),jsonPos:new un.Name("jsonPos"),jsonLen:new un.Name("jsonLen"),jsonPart:new un.Name("jsonPart")};Qp.default=wV});var Ms=I(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.extendErrors=cn.resetErrorsCount=cn.reportExtraError=cn.reportError=cn.keyword$DataError=cn.keywordError=void 0;var Qe=xe(),Cc=We(),Sn=ui();cn.keywordError={message:({keyword:e})=>(0,Qe.str)`must pass "${e}" keyword validation`};cn.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,Qe.str)`"${e}" keyword must be ${n} ($data)`:(0,Qe.str)`"${e}" keyword is invalid ($data)`};function IV(e,n=cn.keywordError,t,i){let{it:r}=e,{gen:a,compositeRule:l,allErrors:u}=r,d=yv(e,n,t);i??(l||u)?gv(a,d):_v(r,(0,Qe._)`[${d}]`)}cn.reportError=IV;function SV(e,n=cn.keywordError,t){let{it:i}=e,{gen:r,compositeRule:a,allErrors:l}=i,u=yv(e,n,t);gv(r,u),a||l||_v(i,Sn.default.vErrors)}cn.reportExtraError=SV;function $V(e,n){e.assign(Sn.default.errors,n),e.if((0,Qe._)`${Sn.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,Qe._)`${Sn.default.vErrors}.length`,n),()=>e.assign(Sn.default.vErrors,null)))}cn.resetErrorsCount=$V;function EV({gen:e,keyword:n,schemaValue:t,data:i,errsCount:r,it:a}){if(r===void 0)throw new Error("ajv implementation error");let l=e.name("err");e.forRange("i",r,Sn.default.errors,u=>{e.const(l,(0,Qe._)`${Sn.default.vErrors}[${u}]`),e.if((0,Qe._)`${l}.instancePath === undefined`,()=>e.assign((0,Qe._)`${l}.instancePath`,(0,Qe.strConcat)(Sn.default.instancePath,a.errorPath))),e.assign((0,Qe._)`${l}.schemaPath`,(0,Qe.str)`${a.errSchemaPath}/${n}`),a.opts.verbose&&(e.assign((0,Qe._)`${l}.schema`,t),e.assign((0,Qe._)`${l}.data`,i))})}cn.extendErrors=EV;function gv(e,n){let t=e.const("err",n);e.if((0,Qe._)`${Sn.default.vErrors} === null`,()=>e.assign(Sn.default.vErrors,(0,Qe._)`[${t}]`),(0,Qe._)`${Sn.default.vErrors}.push(${t})`),e.code((0,Qe._)`${Sn.default.errors}++`)}function _v(e,n){let{gen:t,validateName:i,schemaEnv:r}=e;r.$async?t.throw((0,Qe._)`new ${e.ValidationError}(${n})`):(t.assign((0,Qe._)`${i}.errors`,n),t.return(!1))}var wo={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 yv(e,n,t){let{createErrors:i}=e.it;return i===!1?(0,Qe._)`{}`:TV(e,n,t)}function TV(e,n,t={}){let{gen:i,it:r}=e,a=[PV(r,t),OV(e,t)];return MV(e,n,a),i.object(...a)}function PV({errorPath:e},{instancePath:n}){let t=n?(0,Qe.str)`${e}${(0,Cc.getErrorPath)(n,Cc.Type.Str)}`:e;return[Sn.default.instancePath,(0,Qe.strConcat)(Sn.default.instancePath,t)]}function OV({keyword:e,it:{errSchemaPath:n}},{schemaPath:t,parentSchema:i}){let r=i?n:(0,Qe.str)`${n}/${e}`;return t&&(r=(0,Qe.str)`${r}${(0,Cc.getErrorPath)(t,Cc.Type.Str)}`),[wo.schemaPath,r]}function MV(e,{params:n,message:t},i){let{keyword:r,data:a,schemaValue:l,it:u}=e,{opts:d,propertyName:p,topSchemaRef:h,schemaPath:_}=u;i.push([wo.keyword,r],[wo.params,typeof n=="function"?n(e):n||(0,Qe._)`{}`]),d.messages&&i.push([wo.message,typeof t=="function"?t(e):t]),d.verbose&&i.push([wo.schema,l],[wo.parentSchema,(0,Qe._)`${h}${_}`],[Sn.default.data,a]),p&&i.push([wo.propertyName,p])}});var bv=I(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.boolOrEmptySchema=da.topBoolOrEmptySchema=void 0;var kV=Ms(),AV=xe(),DV=ui(),NV={message:"boolean schema is false"};function FV(e){let{gen:n,schema:t,validateName:i}=e;t===!1?vv(e,!1):typeof t=="object"&&t.$async===!0?n.return(DV.default.data):(n.assign((0,AV._)`${i}.errors`,null),n.return(!0))}da.topBoolOrEmptySchema=FV;function qV(e,n){let{gen:t,schema:i}=e;i===!1?(t.var(n,!1),vv(e)):t.var(n,!0)}da.boolOrEmptySchema=qV;function vv(e,n){let{gen:t,data:i}=e,r={gen:t,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,kV.reportError)(r,NV,void 0,n)}});var em=I(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.getRules=fa.isJSONType=void 0;var VV=["string","number","integer","boolean","null","object","array"],jV=new Set(VV);function RV(e){return typeof e=="string"&&jV.has(e)}fa.isJSONType=RV;function BV(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:at(ye({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}fa.getRules=BV});var tm=I(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.shouldUseRule=zr.shouldUseGroup=zr.schemaHasRulesForType=void 0;function LV({schema:e,self:n},t){let i=n.RULES.types[t];return i&&i!==!0&&Cv(e,i)}zr.schemaHasRulesForType=LV;function Cv(e,n){return n.rules.some(t=>xv(e,t))}zr.shouldUseGroup=Cv;function xv(e,n){var t;return e[n.keyword]!==void 0||((t=n.definition.implements)===null||t===void 0?void 0:t.some(i=>e[i]!==void 0))}zr.shouldUseRule=xv});var ks=I(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.reportTypeError=dn.checkDataTypes=dn.checkDataType=dn.coerceAndCheckDataType=dn.getJSONTypes=dn.getSchemaTypes=dn.DataType=void 0;var zV=em(),UV=tm(),HV=Ms(),qe=xe(),wv=We(),pa=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(pa||(dn.DataType=pa={}));function WV(e){let n=Iv(e.type);if(n.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!n.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&n.push("null")}return n}dn.getSchemaTypes=WV;function Iv(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(zV.isJSONType))return n;throw new Error("type must be JSONType or JSONType[]: "+n.join(","))}dn.getJSONTypes=Iv;function GV(e,n){let{gen:t,data:i,opts:r}=e,a=KV(n,r.coerceTypes),l=n.length>0&&!(a.length===0&&n.length===1&&(0,UV.schemaHasRulesForType)(e,n[0]));if(l){let u=im(n,i,r.strictNumbers,pa.Wrong);t.if(u,()=>{a.length?JV(e,n,a):rm(e)})}return l}dn.coerceAndCheckDataType=GV;var Sv=new Set(["string","number","integer","boolean","null"]);function KV(e,n){return n?e.filter(t=>Sv.has(t)||n==="array"&&t==="array"):[]}function JV(e,n,t){let{gen:i,data:r,opts:a}=e,l=i.let("dataType",(0,qe._)`typeof ${r}`),u=i.let("coerced",(0,qe._)`undefined`);a.coerceTypes==="array"&&i.if((0,qe._)`${l} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>i.assign(r,(0,qe._)`${r}[0]`).assign(l,(0,qe._)`typeof ${r}`).if(im(n,r,a.strictNumbers),()=>i.assign(u,r))),i.if((0,qe._)`${u} !== undefined`);for(let p of t)(Sv.has(p)||p==="array"&&a.coerceTypes==="array")&&d(p);i.else(),rm(e),i.endIf(),i.if((0,qe._)`${u} !== undefined`,()=>{i.assign(r,u),YV(e,u)});function d(p){switch(p){case"string":i.elseIf((0,qe._)`${l} == "number" || ${l} == "boolean"`).assign(u,(0,qe._)`"" + ${r}`).elseIf((0,qe._)`${r} === null`).assign(u,(0,qe._)`""`);return;case"number":i.elseIf((0,qe._)`${l} == "boolean" || ${r} === null
3
- || (${l} == "string" && ${r} && ${r} == +${r})`).assign(u,(0,qe._)`+${r}`);return;case"integer":i.elseIf((0,qe._)`${l} === "boolean" || ${r} === null
4
- || (${l} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(u,(0,qe._)`+${r}`);return;case"boolean":i.elseIf((0,qe._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(u,!1).elseIf((0,qe._)`${r} === "true" || ${r} === 1`).assign(u,!0);return;case"null":i.elseIf((0,qe._)`${r} === "" || ${r} === 0 || ${r} === false`),i.assign(u,null);return;case"array":i.elseIf((0,qe._)`${l} === "string" || ${l} === "number"
5
- || ${l} === "boolean" || ${r} === null`).assign(u,(0,qe._)`[${r}]`)}}}function YV({gen:e,parentData:n,parentDataProperty:t},i){e.if((0,qe._)`${n} !== undefined`,()=>e.assign((0,qe._)`${n}[${t}]`,i))}function nm(e,n,t,i=pa.Correct){let r=i===pa.Correct?qe.operators.EQ:qe.operators.NEQ,a;switch(e){case"null":return(0,qe._)`${n} ${r} null`;case"array":a=(0,qe._)`Array.isArray(${n})`;break;case"object":a=(0,qe._)`${n} && typeof ${n} == "object" && !Array.isArray(${n})`;break;case"integer":a=l((0,qe._)`!(${n} % 1) && !isNaN(${n})`);break;case"number":a=l();break;default:return(0,qe._)`typeof ${n} ${r} ${e}`}return i===pa.Correct?a:(0,qe.not)(a);function l(u=qe.nil){return(0,qe.and)((0,qe._)`typeof ${n} == "number"`,u,t?(0,qe._)`isFinite(${n})`:qe.nil)}}dn.checkDataType=nm;function im(e,n,t,i){if(e.length===1)return nm(e[0],n,t,i);let r,a=(0,wv.toHash)(e);if(a.array&&a.object){let l=(0,qe._)`typeof ${n} != "object"`;r=a.null?l:(0,qe._)`!${n} || ${l}`,delete a.null,delete a.array,delete a.object}else r=qe.nil;a.number&&delete a.integer;for(let l in a)r=(0,qe.and)(r,nm(l,n,t,i));return r}dn.checkDataTypes=im;var XV={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:n})=>typeof e=="string"?(0,qe._)`{type: ${e}}`:(0,qe._)`{type: ${n}}`};function rm(e){let n=ZV(e);(0,HV.reportError)(n,XV)}dn.reportTypeError=rm;function ZV(e){let{gen:n,data:t,schema:i}=e,r=(0,wv.schemaRefOrVal)(e,i,"type");return{gen:n,keyword:"type",data:t,schema:i.type,schemaCode:r,schemaValue:r,parentSchema:i,params:{},it:e}}});var Ev=I(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.assignDefaults=void 0;var ma=xe(),QV=We();function ej(e,n){let{properties:t,items:i}=e.schema;if(n==="object"&&t)for(let r in t)$v(e,r,t[r].default);else n==="array"&&Array.isArray(i)&&i.forEach((r,a)=>$v(e,a,r.default))}xc.assignDefaults=ej;function $v(e,n,t){let{gen:i,compositeRule:r,data:a,opts:l}=e;if(t===void 0)return;let u=(0,ma._)`${a}${(0,ma.getProperty)(n)}`;if(r){(0,QV.checkStrictMode)(e,`default is ignored for: ${u}`);return}let d=(0,ma._)`${u} === undefined`;l.useDefaults==="empty"&&(d=(0,ma._)`${d} || ${u} === null || ${u} === ""`),i.if(d,(0,ma._)`${u} = ${(0,ma.stringify)(t)}`)}});var ci=I(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.validateUnion=mt.validateArray=mt.usePattern=mt.callValidateCode=mt.schemaProperties=mt.allSchemaProperties=mt.noPropertyInData=mt.propertyInData=mt.isOwnProperty=mt.hasPropFunc=mt.reportMissingProp=mt.checkMissingProp=mt.checkReportMissingProp=void 0;var xt=xe(),om=We(),Ur=ui(),tj=We();function nj(e,n){let{gen:t,data:i,it:r}=e;t.if(sm(t,i,n,r.opts.ownProperties),()=>{e.setParams({missingProperty:(0,xt._)`${n}`},!0),e.error()})}mt.checkReportMissingProp=nj;function ij({gen:e,data:n,it:{opts:t}},i,r){return(0,xt.or)(...i.map(a=>(0,xt.and)(sm(e,n,a,t.ownProperties),(0,xt._)`${r} = ${a}`)))}mt.checkMissingProp=ij;function rj(e,n){e.setParams({missingProperty:n},!0),e.error()}mt.reportMissingProp=rj;function Tv(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,xt._)`Object.prototype.hasOwnProperty`})}mt.hasPropFunc=Tv;function am(e,n,t){return(0,xt._)`${Tv(e)}.call(${n}, ${t})`}mt.isOwnProperty=am;function oj(e,n,t,i){let r=(0,xt._)`${n}${(0,xt.getProperty)(t)} !== undefined`;return i?(0,xt._)`${r} && ${am(e,n,t)}`:r}mt.propertyInData=oj;function sm(e,n,t,i){let r=(0,xt._)`${n}${(0,xt.getProperty)(t)} === undefined`;return i?(0,xt.or)(r,(0,xt.not)(am(e,n,t))):r}mt.noPropertyInData=sm;function Pv(e){return e?Object.keys(e).filter(n=>n!=="__proto__"):[]}mt.allSchemaProperties=Pv;function aj(e,n){return Pv(n).filter(t=>!(0,om.alwaysValidSchema)(e,n[t]))}mt.schemaProperties=aj;function sj({schemaCode:e,data:n,it:{gen:t,topSchemaRef:i,schemaPath:r,errorPath:a},it:l},u,d,p){let h=p?(0,xt._)`${e}, ${n}, ${i}${r}`:n,_=[[Ur.default.instancePath,(0,xt.strConcat)(Ur.default.instancePath,a)],[Ur.default.parentData,l.parentData],[Ur.default.parentDataProperty,l.parentDataProperty],[Ur.default.rootData,Ur.default.rootData]];l.opts.dynamicRef&&_.push([Ur.default.dynamicAnchors,Ur.default.dynamicAnchors]);let C=(0,xt._)`${h}, ${t.object(..._)}`;return d!==xt.nil?(0,xt._)`${u}.call(${d}, ${C})`:(0,xt._)`${u}(${C})`}mt.callValidateCode=sj;var lj=(0,xt._)`new RegExp`;function uj({gen:e,it:{opts:n}},t){let i=n.unicodeRegExp?"u":"",{regExp:r}=n.code,a=r(t,i);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,xt._)`${r.code==="new RegExp"?lj:(0,tj.useFunc)(e,r)}(${t}, ${i})`})}mt.usePattern=uj;function cj(e){let{gen:n,data:t,keyword:i,it:r}=e,a=n.name("valid");if(r.allErrors){let u=n.let("valid",!0);return l(()=>n.assign(u,!1)),u}return n.var(a,!0),l(()=>n.break()),a;function l(u){let d=n.const("len",(0,xt._)`${t}.length`);n.forRange("i",0,d,p=>{e.subschema({keyword:i,dataProp:p,dataPropType:om.Type.Num},a),n.if((0,xt.not)(a),u)})}}mt.validateArray=cj;function dj(e){let{gen:n,schema:t,keyword:i,it:r}=e;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(d=>(0,om.alwaysValidSchema)(r,d))&&!r.opts.unevaluated)return;let l=n.let("valid",!1),u=n.name("_valid");n.block(()=>t.forEach((d,p)=>{let h=e.subschema({keyword:i,schemaProp:p,compositeRule:!0},u);n.assign(l,(0,xt._)`${l} || ${u}`),e.mergeValidEvaluated(h,u)||n.if((0,xt.not)(l))})),e.result(l,()=>e.reset(),()=>e.error(!0))}mt.validateUnion=dj});var kv=I(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.validateKeywordUsage=Ui.validSchemaType=Ui.funcKeywordCode=Ui.macroKeywordCode=void 0;var $n=xe(),Io=ui(),fj=ci(),pj=Ms();function mj(e,n){let{gen:t,keyword:i,schema:r,parentSchema:a,it:l}=e,u=n.macro.call(l.self,r,a,l),d=Mv(t,i,u);l.opts.validateSchema!==!1&&l.self.validateSchema(u,!0);let p=t.name("valid");e.subschema({schema:u,schemaPath:$n.nil,errSchemaPath:`${l.errSchemaPath}/${i}`,topSchemaRef:d,compositeRule:!0},p),e.pass(p,()=>e.error(!0))}Ui.macroKeywordCode=mj;function hj(e,n){var t;let{gen:i,keyword:r,schema:a,parentSchema:l,$data:u,it:d}=e;_j(d,n);let p=!u&&n.compile?n.compile.call(d.self,a,l,d):n.validate,h=Mv(i,r,p),_=i.let("valid");e.block$data(_,C),e.ok((t=n.valid)!==null&&t!==void 0?t:_);function C(){if(n.errors===!1)O(),n.modifying&&Ov(e),F(()=>e.error());else{let z=n.async?T():x();n.modifying&&Ov(e),F(()=>gj(e,z))}}function T(){let z=i.let("ruleErrs",null);return i.try(()=>O((0,$n._)`await `),ne=>i.assign(_,!1).if((0,$n._)`${ne} instanceof ${d.ValidationError}`,()=>i.assign(z,(0,$n._)`${ne}.errors`),()=>i.throw(ne))),z}function x(){let z=(0,$n._)`${h}.errors`;return i.assign(z,null),O($n.nil),z}function O(z=n.async?(0,$n._)`await `:$n.nil){let ne=d.opts.passContext?Io.default.this:Io.default.self,re=!("compile"in n&&!u||n.schema===!1);i.assign(_,(0,$n._)`${z}${(0,fj.callValidateCode)(e,h,ne,re)}`,n.modifying)}function F(z){var ne;i.if((0,$n.not)((ne=n.valid)!==null&&ne!==void 0?ne:_),z)}}Ui.funcKeywordCode=hj;function Ov(e){let{gen:n,data:t,it:i}=e;n.if(i.parentData,()=>n.assign(t,(0,$n._)`${i.parentData}[${i.parentDataProperty}]`))}function gj(e,n){let{gen:t}=e;t.if((0,$n._)`Array.isArray(${n})`,()=>{t.assign(Io.default.vErrors,(0,$n._)`${Io.default.vErrors} === null ? ${n} : ${Io.default.vErrors}.concat(${n})`).assign(Io.default.errors,(0,$n._)`${Io.default.vErrors}.length`),(0,pj.extendErrors)(e)},()=>e.error())}function _j({schemaEnv:e},n){if(n.async&&!e.$async)throw new Error("async keyword in sync schema")}function Mv(e,n,t){if(t===void 0)throw new Error(`keyword "${n}" failed to compile`);return e.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,$n.stringify)(t)})}function yj(e,n,t=!1){return!n.length||n.some(i=>i==="array"?Array.isArray(e):i==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==i||t&&typeof e>"u")}Ui.validSchemaType=yj;function vj({schema:e,opts:n,self:t,errSchemaPath:i},r,a){if(Array.isArray(r.keyword)?!r.keyword.includes(a):r.keyword!==a)throw new Error("ajv implementation error");let l=r.dependencies;if(l?.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${a}: ${l.join(",")}`);if(r.validateSchema&&!r.validateSchema(e[a])){let d=`keyword "${a}" value is invalid at path "${i}": `+t.errorsText(r.validateSchema.errors);if(n.validateSchema==="log")t.logger.error(d);else throw new Error(d)}}Ui.validateKeywordUsage=vj});var Dv=I(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.extendSubschemaMode=Hr.extendSubschemaData=Hr.getSubschema=void 0;var Hi=xe(),Av=We();function bj(e,{keyword:n,schemaProp:t,schema:i,schemaPath:r,errSchemaPath:a,topSchemaRef:l}){if(n!==void 0&&i!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(n!==void 0){let u=e.schema[n];return t===void 0?{schema:u,schemaPath:(0,Hi._)`${e.schemaPath}${(0,Hi.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${n}`}:{schema:u[t],schemaPath:(0,Hi._)`${e.schemaPath}${(0,Hi.getProperty)(n)}${(0,Hi.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${n}/${(0,Av.escapeFragment)(t)}`}}if(i!==void 0){if(r===void 0||a===void 0||l===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:r,topSchemaRef:l,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}Hr.getSubschema=bj;function Cj(e,n,{dataProp:t,dataPropType:i,data:r,dataTypes:a,propertyName:l}){if(r!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=n;if(t!==void 0){let{errorPath:p,dataPathArr:h,opts:_}=n,C=u.let("data",(0,Hi._)`${n.data}${(0,Hi.getProperty)(t)}`,!0);d(C),e.errorPath=(0,Hi.str)`${p}${(0,Av.getErrorPath)(t,i,_.jsPropertySyntax)}`,e.parentDataProperty=(0,Hi._)`${t}`,e.dataPathArr=[...h,e.parentDataProperty]}if(r!==void 0){let p=r instanceof Hi.Name?r:u.let("data",r,!0);d(p),l!==void 0&&(e.propertyName=l)}a&&(e.dataTypes=a);function d(p){e.data=p,e.dataLevel=n.dataLevel+1,e.dataTypes=[],n.definedProperties=new Set,e.parentData=n.data,e.dataNames=[...n.dataNames,p]}}Hr.extendSubschemaData=Cj;function xj(e,{jtdDiscriminator:n,jtdMetadata:t,compositeRule:i,createErrors:r,allErrors:a}){i!==void 0&&(e.compositeRule=i),r!==void 0&&(e.createErrors=r),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=n,e.jtdMetadata=t}Hr.extendSubschemaMode=xj});var wc=I((gre,Nv)=>{"use strict";Nv.exports=function e(n,t){if(n===t)return!0;if(n&&t&&typeof n=="object"&&typeof t=="object"){if(n.constructor!==t.constructor)return!1;var i,r,a;if(Array.isArray(n)){if(i=n.length,i!=t.length)return!1;for(r=i;r--!==0;)if(!e(n[r],t[r]))return!1;return!0}if(n.constructor===RegExp)return n.source===t.source&&n.flags===t.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===t.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===t.toString();if(a=Object.keys(n),i=a.length,i!==Object.keys(t).length)return!1;for(r=i;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[r]))return!1;for(r=i;r--!==0;){var l=a[r];if(!e(n[l],t[l]))return!1}return!0}return n!==n&&t!==t}});var qv=I((_re,Fv)=>{"use strict";var Wr=Fv.exports=function(e,n,t){typeof n=="function"&&(t=n,n={}),t=n.cb||t;var i=typeof t=="function"?t:t.pre||function(){},r=t.post||function(){};Ic(n,i,r,e,"",e)};Wr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Wr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Wr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Wr.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Ic(e,n,t,i,r,a,l,u,d,p){if(i&&typeof i=="object"&&!Array.isArray(i)){n(i,r,a,l,u,d,p);for(var h in i){var _=i[h];if(Array.isArray(_)){if(h in Wr.arrayKeywords)for(var C=0;C<_.length;C++)Ic(e,n,t,_[C],r+"/"+h+"/"+C,a,r,h,i,C)}else if(h in Wr.propsKeywords){if(_&&typeof _=="object")for(var T in _)Ic(e,n,t,_[T],r+"/"+h+"/"+wj(T),a,r,h,i,T)}else(h in Wr.keywords||e.allKeys&&!(h in Wr.skipKeywords))&&Ic(e,n,t,_,r+"/"+h,a,r,h,i)}t(i,r,a,l,u,d,p)}}function wj(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var As=I(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.getSchemaRefs=Nn.resolveUrl=Nn.normalizeId=Nn._getFullPath=Nn.getFullPath=Nn.inlineRef=void 0;var Ij=We(),Sj=wc(),$j=qv(),Ej=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Tj(e,n=!0){return typeof e=="boolean"?!0:n===!0?!lm(e):n?Vv(e)<=n:!1}Nn.inlineRef=Tj;var Pj=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function lm(e){for(let n in e){if(Pj.has(n))return!0;let t=e[n];if(Array.isArray(t)&&t.some(lm)||typeof t=="object"&&lm(t))return!0}return!1}function Vv(e){let n=0;for(let t in e){if(t==="$ref")return 1/0;if(n++,!Ej.has(t)&&(typeof e[t]=="object"&&(0,Ij.eachItem)(e[t],i=>n+=Vv(i)),n===1/0))return 1/0}return n}function jv(e,n="",t){t!==!1&&(n=ha(n));let i=e.parse(n);return Rv(e,i)}Nn.getFullPath=jv;function Rv(e,n){return e.serialize(n).split("#")[0]+"#"}Nn._getFullPath=Rv;var Oj=/#\/?$/;function ha(e){return e?e.replace(Oj,""):""}Nn.normalizeId=ha;function Mj(e,n,t){return t=ha(t),e.resolve(n,t)}Nn.resolveUrl=Mj;var kj=/^[a-z_][-a-z0-9._]*$/i;function Aj(e,n){if(typeof e=="boolean")return{};let{schemaId:t,uriResolver:i}=this.opts,r=ha(e[t]||n),a={"":r},l=jv(i,r,!1),u={},d=new Set;return $j(e,{allKeys:!0},(_,C,T,x)=>{if(x===void 0)return;let O=l+C,F=a[x];typeof _[t]=="string"&&(F=z.call(this,_[t])),ne.call(this,_.$anchor),ne.call(this,_.$dynamicAnchor),a[C]=F;function z(re){let Q=this.opts.uriResolver.resolve;if(re=ha(F?Q(F,re):re),d.has(re))throw h(re);d.add(re);let J=this.refs[re];return typeof J=="string"&&(J=this.refs[J]),typeof J=="object"?p(_,J.schema,re):re!==ha(O)&&(re[0]==="#"?(p(_,u[re],re),u[re]=_):this.refs[re]=O),re}function ne(re){if(typeof re=="string"){if(!kj.test(re))throw new Error(`invalid anchor "${re}"`);z.call(this,`#${re}`)}}}),u;function p(_,C,T){if(C!==void 0&&!Sj(_,C))throw h(T)}function h(_){return new Error(`reference "${_}" resolves to more than one schema`)}}Nn.getSchemaRefs=Aj});var ga=I(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.getData=Gr.KeywordCxt=Gr.validateFunctionCode=void 0;var Hv=bv(),Bv=ks(),cm=tm(),Sc=ks(),Dj=Ev(),Ns=kv(),um=Dv(),be=xe(),Pe=ui(),Nj=As(),fr=We(),Ds=Ms();function Fj(e){if(Kv(e)&&(Jv(e),Gv(e))){jj(e);return}Wv(e,()=>(0,Hv.topBoolOrEmptySchema)(e))}Gr.validateFunctionCode=Fj;function Wv({gen:e,validateName:n,schema:t,schemaEnv:i,opts:r},a){r.code.es5?e.func(n,(0,be._)`${Pe.default.data}, ${Pe.default.valCxt}`,i.$async,()=>{e.code((0,be._)`"use strict"; ${Lv(t,r)}`),Vj(e,r),e.code(a)}):e.func(n,(0,be._)`${Pe.default.data}, ${qj(r)}`,i.$async,()=>e.code(Lv(t,r)).code(a))}function qj(e){return(0,be._)`{${Pe.default.instancePath}="", ${Pe.default.parentData}, ${Pe.default.parentDataProperty}, ${Pe.default.rootData}=${Pe.default.data}${e.dynamicRef?(0,be._)`, ${Pe.default.dynamicAnchors}={}`:be.nil}}={}`}function Vj(e,n){e.if(Pe.default.valCxt,()=>{e.var(Pe.default.instancePath,(0,be._)`${Pe.default.valCxt}.${Pe.default.instancePath}`),e.var(Pe.default.parentData,(0,be._)`${Pe.default.valCxt}.${Pe.default.parentData}`),e.var(Pe.default.parentDataProperty,(0,be._)`${Pe.default.valCxt}.${Pe.default.parentDataProperty}`),e.var(Pe.default.rootData,(0,be._)`${Pe.default.valCxt}.${Pe.default.rootData}`),n.dynamicRef&&e.var(Pe.default.dynamicAnchors,(0,be._)`${Pe.default.valCxt}.${Pe.default.dynamicAnchors}`)},()=>{e.var(Pe.default.instancePath,(0,be._)`""`),e.var(Pe.default.parentData,(0,be._)`undefined`),e.var(Pe.default.parentDataProperty,(0,be._)`undefined`),e.var(Pe.default.rootData,Pe.default.data),n.dynamicRef&&e.var(Pe.default.dynamicAnchors,(0,be._)`{}`)})}function jj(e){let{schema:n,opts:t,gen:i}=e;Wv(e,()=>{t.$comment&&n.$comment&&Xv(e),Uj(e),i.let(Pe.default.vErrors,null),i.let(Pe.default.errors,0),t.unevaluated&&Rj(e),Yv(e),Gj(e)})}function Rj(e){let{gen:n,validateName:t}=e;e.evaluated=n.const("evaluated",(0,be._)`${t}.evaluated`),n.if((0,be._)`${e.evaluated}.dynamicProps`,()=>n.assign((0,be._)`${e.evaluated}.props`,(0,be._)`undefined`)),n.if((0,be._)`${e.evaluated}.dynamicItems`,()=>n.assign((0,be._)`${e.evaluated}.items`,(0,be._)`undefined`))}function Lv(e,n){let t=typeof e=="object"&&e[n.schemaId];return t&&(n.code.source||n.code.process)?(0,be._)`/*# sourceURL=${t} */`:be.nil}function Bj(e,n){if(Kv(e)&&(Jv(e),Gv(e))){Lj(e,n);return}(0,Hv.boolOrEmptySchema)(e,n)}function Gv({schema:e,self:n}){if(typeof e=="boolean")return!e;for(let t in e)if(n.RULES.all[t])return!0;return!1}function Kv(e){return typeof e.schema!="boolean"}function Lj(e,n){let{schema:t,gen:i,opts:r}=e;r.$comment&&t.$comment&&Xv(e),Hj(e),Wj(e);let a=i.const("_errs",Pe.default.errors);Yv(e,a),i.var(n,(0,be._)`${a} === ${Pe.default.errors}`)}function Jv(e){(0,fr.checkUnknownRules)(e),zj(e)}function Yv(e,n){if(e.opts.jtd)return zv(e,[],!1,n);let t=(0,Bv.getSchemaTypes)(e.schema),i=(0,Bv.coerceAndCheckDataType)(e,t);zv(e,t,!i,n)}function zj(e){let{schema:n,errSchemaPath:t,opts:i,self:r}=e;n.$ref&&i.ignoreKeywordsWithRef&&(0,fr.schemaHasRulesButRef)(n,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function Uj(e){let{schema:n,opts:t}=e;n.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,fr.checkStrictMode)(e,"default is ignored in the schema root")}function Hj(e){let n=e.schema[e.opts.schemaId];n&&(e.baseId=(0,Nj.resolveUrl)(e.opts.uriResolver,e.baseId,n))}function Wj(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Xv({gen:e,schemaEnv:n,schema:t,errSchemaPath:i,opts:r}){let a=t.$comment;if(r.$comment===!0)e.code((0,be._)`${Pe.default.self}.logger.log(${a})`);else if(typeof r.$comment=="function"){let l=(0,be.str)`${i}/$comment`,u=e.scopeValue("root",{ref:n.root});e.code((0,be._)`${Pe.default.self}.opts.$comment(${a}, ${l}, ${u}.schema)`)}}function Gj(e){let{gen:n,schemaEnv:t,validateName:i,ValidationError:r,opts:a}=e;t.$async?n.if((0,be._)`${Pe.default.errors} === 0`,()=>n.return(Pe.default.data),()=>n.throw((0,be._)`new ${r}(${Pe.default.vErrors})`)):(n.assign((0,be._)`${i}.errors`,Pe.default.vErrors),a.unevaluated&&Kj(e),n.return((0,be._)`${Pe.default.errors} === 0`))}function Kj({gen:e,evaluated:n,props:t,items:i}){t instanceof be.Name&&e.assign((0,be._)`${n}.props`,t),i instanceof be.Name&&e.assign((0,be._)`${n}.items`,i)}function zv(e,n,t,i){let{gen:r,schema:a,data:l,allErrors:u,opts:d,self:p}=e,{RULES:h}=p;if(a.$ref&&(d.ignoreKeywordsWithRef||!(0,fr.schemaHasRulesButRef)(a,h))){r.block(()=>Qv(e,"$ref",h.all.$ref.definition));return}d.jtd||Jj(e,n),r.block(()=>{for(let C of h.rules)_(C);_(h.post)});function _(C){(0,cm.shouldUseGroup)(a,C)&&(C.type?(r.if((0,Sc.checkDataType)(C.type,l,d.strictNumbers)),Uv(e,C),n.length===1&&n[0]===C.type&&t&&(r.else(),(0,Sc.reportTypeError)(e)),r.endIf()):Uv(e,C),u||r.if((0,be._)`${Pe.default.errors} === ${i||0}`))}}function Uv(e,n){let{gen:t,schema:i,opts:{useDefaults:r}}=e;r&&(0,Dj.assignDefaults)(e,n.type),t.block(()=>{for(let a of n.rules)(0,cm.shouldUseRule)(i,a)&&Qv(e,a.keyword,a.definition,n.type)})}function Jj(e,n){e.schemaEnv.meta||!e.opts.strictTypes||(Yj(e,n),e.opts.allowUnionTypes||Xj(e,n),Zj(e,e.dataTypes))}function Yj(e,n){if(n.length){if(!e.dataTypes.length){e.dataTypes=n;return}n.forEach(t=>{Zv(e.dataTypes,t)||dm(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),eR(e,n)}}function Xj(e,n){n.length>1&&!(n.length===2&&n.includes("null"))&&dm(e,"use allowUnionTypes to allow union type keyword")}function Zj(e,n){let t=e.self.RULES.all;for(let i in t){let r=t[i];if(typeof r=="object"&&(0,cm.shouldUseRule)(e.schema,r)){let{type:a}=r.definition;a.length&&!a.some(l=>Qj(n,l))&&dm(e,`missing type "${a.join(",")}" for keyword "${i}"`)}}}function Qj(e,n){return e.includes(n)||n==="number"&&e.includes("integer")}function Zv(e,n){return e.includes(n)||n==="integer"&&e.includes("number")}function eR(e,n){let t=[];for(let i of e.dataTypes)Zv(n,i)?t.push(i):n.includes("integer")&&i==="number"&&t.push("integer");e.dataTypes=t}function dm(e,n){let t=e.schemaEnv.baseId+e.errSchemaPath;n+=` at "${t}" (strictTypes)`,(0,fr.checkStrictMode)(e,n,e.opts.strictTypes)}var $c=class{constructor(n,t,i){if((0,Ns.validateKeywordUsage)(n,t,i),this.gen=n.gen,this.allErrors=n.allErrors,this.keyword=i,this.data=n.data,this.schema=n.schema[i],this.$data=t.$data&&n.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,fr.schemaRefOrVal)(n,this.schema,i,this.$data),this.schemaType=t.schemaType,this.parentSchema=n.schema,this.params={},this.it=n,this.def=t,this.$data)this.schemaCode=n.gen.const("vSchema",eb(this.$data,n));else if(this.schemaCode=this.schemaValue,!(0,Ns.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${i} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=n.gen.const("_errs",Pe.default.errors))}result(n,t,i){this.failResult((0,be.not)(n),t,i)}failResult(n,t,i){this.gen.if(n),i?i():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(n,t){this.failResult((0,be.not)(n),void 0,t)}fail(n){if(n===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(n),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(n){if(!this.$data)return this.fail(n);let{schemaCode:t}=this;this.fail((0,be._)`${t} !== undefined && (${(0,be.or)(this.invalid$data(),n)})`)}error(n,t,i){if(t){this.setParams(t),this._error(n,i),this.setParams({});return}this._error(n,i)}_error(n,t){(n?Ds.reportExtraError:Ds.reportError)(this,this.def.error,t)}$dataError(){(0,Ds.reportError)(this,this.def.$dataError||Ds.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ds.resetErrorsCount)(this.gen,this.errsCount)}ok(n){this.allErrors||this.gen.if(n)}setParams(n,t){t?Object.assign(this.params,n):this.params=n}block$data(n,t,i=be.nil){this.gen.block(()=>{this.check$data(n,i),t()})}check$data(n=be.nil,t=be.nil){if(!this.$data)return;let{gen:i,schemaCode:r,schemaType:a,def:l}=this;i.if((0,be.or)((0,be._)`${r} === undefined`,t)),n!==be.nil&&i.assign(n,!0),(a.length||l.validateSchema)&&(i.elseIf(this.invalid$data()),this.$dataError(),n!==be.nil&&i.assign(n,!1)),i.else()}invalid$data(){let{gen:n,schemaCode:t,schemaType:i,def:r,it:a}=this;return(0,be.or)(l(),u());function l(){if(i.length){if(!(t instanceof be.Name))throw new Error("ajv implementation error");let d=Array.isArray(i)?i:[i];return(0,be._)`${(0,Sc.checkDataTypes)(d,t,a.opts.strictNumbers,Sc.DataType.Wrong)}`}return be.nil}function u(){if(r.validateSchema){let d=n.scopeValue("validate$data",{ref:r.validateSchema});return(0,be._)`!${d}(${t})`}return be.nil}}subschema(n,t){let i=(0,um.getSubschema)(this.it,n);(0,um.extendSubschemaData)(i,this.it,n),(0,um.extendSubschemaMode)(i,n);let r=at(ye(ye({},this.it),i),{items:void 0,props:void 0});return Bj(r,t),r}mergeEvaluated(n,t){let{it:i,gen:r}=this;i.opts.unevaluated&&(i.props!==!0&&n.props!==void 0&&(i.props=fr.mergeEvaluated.props(r,n.props,i.props,t)),i.items!==!0&&n.items!==void 0&&(i.items=fr.mergeEvaluated.items(r,n.items,i.items,t)))}mergeValidEvaluated(n,t){let{it:i,gen:r}=this;if(i.opts.unevaluated&&(i.props!==!0||i.items!==!0))return r.if(t,()=>this.mergeEvaluated(n,be.Name)),!0}};Gr.KeywordCxt=$c;function Qv(e,n,t,i){let r=new $c(e,t,n);"code"in t?t.code(r,i):r.$data&&t.validate?(0,Ns.funcKeywordCode)(r,t):"macro"in t?(0,Ns.macroKeywordCode)(r,t):(t.compile||t.validate)&&(0,Ns.funcKeywordCode)(r,t)}var tR=/^\/(?:[^~]|~0|~1)*$/,nR=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function eb(e,{dataLevel:n,dataNames:t,dataPathArr:i}){let r,a;if(e==="")return Pe.default.rootData;if(e[0]==="/"){if(!tR.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);r=e,a=Pe.default.rootData}else{let p=nR.exec(e);if(!p)throw new Error(`Invalid JSON-pointer: ${e}`);let h=+p[1];if(r=p[2],r==="#"){if(h>=n)throw new Error(d("property/index",h));return i[n-h]}if(h>n)throw new Error(d("data",h));if(a=t[n-h],!r)return a}let l=a,u=r.split("/");for(let p of u)p&&(a=(0,be._)`${a}${(0,be.getProperty)((0,fr.unescapeJsonPointer)(p))}`,l=(0,be._)`${l} && ${a}`);return l;function d(p,h){return`Cannot access ${p} ${h} levels up, current level is ${n}`}}Gr.getData=eb});var Fs=I(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});var fm=class extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}};pm.default=fm});var _a=I(gm=>{"use strict";Object.defineProperty(gm,"__esModule",{value:!0});var mm=As(),hm=class extends Error{constructor(n,t,i,r){super(r||`can't resolve reference ${i} from id ${t}`),this.missingRef=(0,mm.resolveUrl)(n,t,i),this.missingSchema=(0,mm.normalizeId)((0,mm.getFullPath)(n,this.missingRef))}};gm.default=hm});var qs=I(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.resolveSchema=di.getCompilingSchema=di.resolveRef=di.compileSchema=di.SchemaEnv=void 0;var $i=xe(),iR=Fs(),So=ui(),Ei=As(),tb=We(),rR=ga(),ya=class{constructor(n){var t;this.refs={},this.dynamicAnchors={};let i;typeof n.schema=="object"&&(i=n.schema),this.schema=n.schema,this.schemaId=n.schemaId,this.root=n.root||this,this.baseId=(t=n.baseId)!==null&&t!==void 0?t:(0,Ei.normalizeId)(i?.[n.schemaId||"$id"]),this.schemaPath=n.schemaPath,this.localRefs=n.localRefs,this.meta=n.meta,this.$async=i?.$async,this.refs={}}};di.SchemaEnv=ya;function ym(e){let n=nb.call(this,e);if(n)return n;let t=(0,Ei.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:i,lines:r}=this.opts.code,{ownProperties:a}=this.opts,l=new $i.CodeGen(this.scope,{es5:i,lines:r,ownProperties:a}),u;e.$async&&(u=l.scopeValue("Error",{ref:iR.default,code:(0,$i._)`require("ajv/dist/runtime/validation_error").default`}));let d=l.scopeName("validate");e.validateName=d;let p={gen:l,allErrors:this.opts.allErrors,data:So.default.data,parentData:So.default.parentData,parentDataProperty:So.default.parentDataProperty,dataNames:[So.default.data],dataPathArr:[$i.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,$i.stringify)(e.schema)}:{ref:e.schema}),validateName:d,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:t,baseId:e.baseId||t,schemaPath:$i.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,$i._)`""`,opts:this.opts,self:this},h;try{this._compilations.add(e),(0,rR.validateFunctionCode)(p),l.optimize(this.opts.code.optimize);let _=l.toString();h=`${l.scopeRefs(So.default.scope)}return ${_}`,this.opts.code.process&&(h=this.opts.code.process(h,e));let T=new Function(`${So.default.self}`,`${So.default.scope}`,h)(this,this.scope.get());if(this.scope.value(d,{ref:T}),T.errors=null,T.schema=e.schema,T.schemaEnv=e,e.$async&&(T.$async=!0),this.opts.code.source===!0&&(T.source={validateName:d,validateCode:_,scopeValues:l._values}),this.opts.unevaluated){let{props:x,items:O}=p;T.evaluated={props:x instanceof $i.Name?void 0:x,items:O instanceof $i.Name?void 0:O,dynamicProps:x instanceof $i.Name,dynamicItems:O instanceof $i.Name},T.source&&(T.source.evaluated=(0,$i.stringify)(T.evaluated))}return e.validate=T,e}catch(_){throw delete e.validate,delete e.validateName,h&&this.logger.error("Error compiling schema, function code:",h),_}finally{this._compilations.delete(e)}}di.compileSchema=ym;function oR(e,n,t){var i;t=(0,Ei.resolveUrl)(this.opts.uriResolver,n,t);let r=e.refs[t];if(r)return r;let a=lR.call(this,e,t);if(a===void 0){let l=(i=e.localRefs)===null||i===void 0?void 0:i[t],{schemaId:u}=this.opts;l&&(a=new ya({schema:l,schemaId:u,root:e,baseId:n}))}if(a!==void 0)return e.refs[t]=aR.call(this,a)}di.resolveRef=oR;function aR(e){return(0,Ei.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:ym.call(this,e)}function nb(e){for(let n of this._compilations)if(sR(n,e))return n}di.getCompilingSchema=nb;function sR(e,n){return e.schema===n.schema&&e.root===n.root&&e.baseId===n.baseId}function lR(e,n){let t;for(;typeof(t=this.refs[n])=="string";)n=t;return t||this.schemas[n]||Ec.call(this,e,n)}function Ec(e,n){let t=this.opts.uriResolver.parse(n),i=(0,Ei._getFullPath)(this.opts.uriResolver,t),r=(0,Ei.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===r)return _m.call(this,t,e);let a=(0,Ei.normalizeId)(i),l=this.refs[a]||this.schemas[a];if(typeof l=="string"){let u=Ec.call(this,e,l);return typeof u?.schema!="object"?void 0:_m.call(this,t,u)}if(typeof l?.schema=="object"){if(l.validate||ym.call(this,l),a===(0,Ei.normalizeId)(n)){let{schema:u}=l,{schemaId:d}=this.opts,p=u[d];return p&&(r=(0,Ei.resolveUrl)(this.opts.uriResolver,r,p)),new ya({schema:u,schemaId:d,root:e,baseId:r})}return _m.call(this,t,l)}}di.resolveSchema=Ec;var uR=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function _m(e,{baseId:n,schema:t,root:i}){var r;if(((r=e.fragment)===null||r===void 0?void 0:r[0])!=="/")return;for(let u of e.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let d=t[(0,tb.unescapeFragment)(u)];if(d===void 0)return;t=d;let p=typeof t=="object"&&t[this.opts.schemaId];!uR.has(u)&&p&&(n=(0,Ei.resolveUrl)(this.opts.uriResolver,n,p))}let a;if(typeof t!="boolean"&&t.$ref&&!(0,tb.schemaHasRulesButRef)(t,this.RULES)){let u=(0,Ei.resolveUrl)(this.opts.uriResolver,n,t.$ref);a=Ec.call(this,i,u)}let{schemaId:l}=this.opts;if(a=a||new ya({schema:t,schemaId:l,root:i,baseId:n}),a.schema!==a.root.schema)return a}});var ib=I((Ire,cR)=>{cR.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var ob=I((Sre,rb)=>{"use strict";var dR={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};rb.exports={HEX:dR}});var pb=I(($re,fb)=>{"use strict";var{HEX:fR}=ob(),pR=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function ub(e){if(db(e,".")<3)return{host:e,isIPV4:!1};let n=e.match(pR)||[],[t]=n;return t?{host:hR(t,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function vm(e,n=!1){let t="",i=!0;for(let r of e){if(fR[r]===void 0)return;r!=="0"&&i===!0&&(i=!1),i||(t+=r)}return n&&t.length===0&&(t="0"),t}function mR(e){let n=0,t={error:!1,address:"",zone:""},i=[],r=[],a=!1,l=!1,u=!1;function d(){if(r.length){if(a===!1){let p=vm(r);if(p!==void 0)i.push(p);else return t.error=!0,!1}r.length=0}return!0}for(let p=0;p<e.length;p++){let h=e[p];if(!(h==="["||h==="]"))if(h===":"){if(l===!0&&(u=!0),!d())break;if(n++,i.push(":"),n>7){t.error=!0;break}p-1>=0&&e[p-1]===":"&&(l=!0);continue}else if(h==="%"){if(!d())break;a=!0}else{r.push(h);continue}}return r.length&&(a?t.zone=r.join(""):u?i.push(r.join("")):i.push(vm(r))),t.address=i.join(""),t}function cb(e){if(db(e,":")<2)return{host:e,isIPV6:!1};let n=mR(e);if(n.error)return{host:e,isIPV6:!1};{let t=n.address,i=n.address;return n.zone&&(t+="%"+n.zone,i+="%25"+n.zone),{host:t,escapedHost:i,isIPV6:!0}}}function hR(e,n){let t="",i=!0,r=e.length;for(let a=0;a<r;a++){let l=e[a];l==="0"&&i?(a+1<=r&&e[a+1]===n||a+1===r)&&(t+=l,i=!1):(l===n?i=!0:i=!1,t+=l)}return t}function db(e,n){let t=0;for(let i=0;i<e.length;i++)e[i]===n&&t++;return t}var ab=/^\.\.?\//u,sb=/^\/\.(?:\/|$)/u,lb=/^\/\.\.(?:\/|$)/u,gR=/^\/?(?:.|\n)*?(?=\/|$)/u;function _R(e){let n=[];for(;e.length;)if(e.match(ab))e=e.replace(ab,"");else if(e.match(sb))e=e.replace(sb,"/");else if(e.match(lb))e=e.replace(lb,"/"),n.pop();else if(e==="."||e==="..")e="";else{let t=e.match(gR);if(t){let i=t[0];e=e.slice(i.length),n.push(i)}else throw new Error("Unexpected dot segment condition")}return n.join("")}function yR(e,n){let t=n!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=t(e.scheme)),e.userinfo!==void 0&&(e.userinfo=t(e.userinfo)),e.host!==void 0&&(e.host=t(e.host)),e.path!==void 0&&(e.path=t(e.path)),e.query!==void 0&&(e.query=t(e.query)),e.fragment!==void 0&&(e.fragment=t(e.fragment)),e}function vR(e){let n=[];if(e.userinfo!==void 0&&(n.push(e.userinfo),n.push("@")),e.host!==void 0){let t=unescape(e.host),i=ub(t);if(i.isIPV4)t=i.host;else{let r=cb(i.host);r.isIPV6===!0?t=`[${r.escapedHost}]`:t=e.host}n.push(t)}return(typeof e.port=="number"||typeof e.port=="string")&&(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}fb.exports={recomposeAuthority:vR,normalizeComponentEncoding:yR,removeDotSegments:_R,normalizeIPv4:ub,normalizeIPv6:cb,stringArrayToHexStripped:vm}});var vb=I((Ere,yb)=>{"use strict";var bR=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,CR=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function mb(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function hb(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function gb(e){let n=String(e.scheme).toLowerCase()==="https";return(e.port===(n?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function xR(e){return e.secure=mb(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function wR(e){if((e.port===(mb(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[n,t]=e.resourceName.split("?");e.path=n&&n!=="/"?n:void 0,e.query=t,e.resourceName=void 0}return e.fragment=void 0,e}function IR(e,n){if(!e.path)return e.error="URN can not be parsed",e;let t=e.path.match(CR);if(t){let i=n.scheme||e.scheme||"urn";e.nid=t[1].toLowerCase(),e.nss=t[2];let r=`${i}:${n.nid||e.nid}`,a=bm[r];e.path=void 0,a&&(e=a.parse(e,n))}else e.error=e.error||"URN can not be parsed.";return e}function SR(e,n){let t=n.scheme||e.scheme||"urn",i=e.nid.toLowerCase(),r=`${t}:${n.nid||i}`,a=bm[r];a&&(e=a.serialize(e,n));let l=e,u=e.nss;return l.path=`${i||n.nid}:${u}`,n.skipEscape=!0,l}function $R(e,n){let t=e;return t.uuid=t.nss,t.nss=void 0,!n.tolerant&&(!t.uuid||!bR.test(t.uuid))&&(t.error=t.error||"UUID is not valid."),t}function ER(e){let n=e;return n.nss=(e.uuid||"").toLowerCase(),n}var _b={scheme:"http",domainHost:!0,parse:hb,serialize:gb},TR={scheme:"https",domainHost:_b.domainHost,parse:hb,serialize:gb},Tc={scheme:"ws",domainHost:!0,parse:xR,serialize:wR},PR={scheme:"wss",domainHost:Tc.domainHost,parse:Tc.parse,serialize:Tc.serialize},OR={scheme:"urn",parse:IR,serialize:SR,skipNormalize:!0},MR={scheme:"urn:uuid",parse:$R,serialize:ER,skipNormalize:!0},bm={http:_b,https:TR,ws:Tc,wss:PR,urn:OR,"urn:uuid":MR};yb.exports=bm});var Cb=I((Tre,Oc)=>{"use strict";var{normalizeIPv6:kR,normalizeIPv4:AR,removeDotSegments:Vs,recomposeAuthority:DR,normalizeComponentEncoding:Pc}=pb(),Cm=vb();function NR(e,n){return typeof e=="string"?e=Wi(pr(e,n),n):typeof e=="object"&&(e=pr(Wi(e,n),n)),e}function FR(e,n,t){let i=Object.assign({scheme:"null"},t),r=bb(pr(e,i),pr(n,i),i,!0);return Wi(r,at(ye({},i),{skipEscape:!0}))}function bb(e,n,t,i){let r={};return i||(e=pr(Wi(e,t),t),n=pr(Wi(n,t),t)),t=t||{},!t.tolerant&&n.scheme?(r.scheme=n.scheme,r.userinfo=n.userinfo,r.host=n.host,r.port=n.port,r.path=Vs(n.path||""),r.query=n.query):(n.userinfo!==void 0||n.host!==void 0||n.port!==void 0?(r.userinfo=n.userinfo,r.host=n.host,r.port=n.port,r.path=Vs(n.path||""),r.query=n.query):(n.path?(n.path.charAt(0)==="/"?r.path=Vs(n.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?r.path="/"+n.path:e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+n.path:r.path=n.path,r.path=Vs(r.path)),r.query=n.query):(r.path=e.path,n.query!==void 0?r.query=n.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=n.fragment,r}function qR(e,n,t){return typeof e=="string"?(e=unescape(e),e=Wi(Pc(pr(e,t),!0),at(ye({},t),{skipEscape:!0}))):typeof e=="object"&&(e=Wi(Pc(e,!0),at(ye({},t),{skipEscape:!0}))),typeof n=="string"?(n=unescape(n),n=Wi(Pc(pr(n,t),!0),at(ye({},t),{skipEscape:!0}))):typeof n=="object"&&(n=Wi(Pc(n,!0),at(ye({},t),{skipEscape:!0}))),e.toLowerCase()===n.toLowerCase()}function Wi(e,n){let t={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},i=Object.assign({},n),r=[],a=Cm[(i.scheme||t.scheme||"").toLowerCase()];a&&a.serialize&&a.serialize(t,i),t.path!==void 0&&(i.skipEscape?t.path=unescape(t.path):(t.path=escape(t.path),t.scheme!==void 0&&(t.path=t.path.split("%3A").join(":")))),i.reference!=="suffix"&&t.scheme&&r.push(t.scheme,":");let l=DR(t);if(l!==void 0&&(i.reference!=="suffix"&&r.push("//"),r.push(l),t.path&&t.path.charAt(0)!=="/"&&r.push("/")),t.path!==void 0){let u=t.path;!i.absolutePath&&(!a||!a.absolutePath)&&(u=Vs(u)),l===void 0&&(u=u.replace(/^\/\//u,"/%2F")),r.push(u)}return t.query!==void 0&&r.push("?",t.query),t.fragment!==void 0&&r.push("#",t.fragment),r.join("")}var VR=Array.from({length:127},(e,n)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(n)));function jR(e){let n=0;for(let t=0,i=e.length;t<i;++t)if(n=e.charCodeAt(t),n>126||VR[n])return!0;return!1}var RR=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function pr(e,n){let t=Object.assign({},n),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},r=e.indexOf("%")!==-1,a=!1;t.reference==="suffix"&&(e=(t.scheme?t.scheme+":":"")+"//"+e);let l=e.match(RR);if(l){if(i.scheme=l[1],i.userinfo=l[3],i.host=l[4],i.port=parseInt(l[5],10),i.path=l[6]||"",i.query=l[7],i.fragment=l[8],isNaN(i.port)&&(i.port=l[5]),i.host){let d=AR(i.host);if(d.isIPV4===!1){let p=kR(d.host);i.host=p.host.toLowerCase(),a=p.isIPV6}else i.host=d.host,a=!0}i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference="same-document":i.scheme===void 0?i.reference="relative":i.fragment===void 0?i.reference="absolute":i.reference="uri",t.reference&&t.reference!=="suffix"&&t.reference!==i.reference&&(i.error=i.error||"URI is not a "+t.reference+" reference.");let u=Cm[(t.scheme||i.scheme||"").toLowerCase()];if(!t.unicodeSupport&&(!u||!u.unicodeSupport)&&i.host&&(t.domainHost||u&&u.domainHost)&&a===!1&&jR(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(d){i.error=i.error||"Host's domain name can not be converted to ASCII: "+d}(!u||u&&!u.skipNormalize)&&(r&&i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),r&&i.host!==void 0&&(i.host=unescape(i.host)),i.path&&(i.path=escape(unescape(i.path))),i.fragment&&(i.fragment=encodeURI(decodeURIComponent(i.fragment)))),u&&u.parse&&u.parse(i,t)}else i.error=i.error||"URI can not be parsed.";return i}var xm={SCHEMES:Cm,normalize:NR,resolve:FR,resolveComponents:bb,equal:qR,serialize:Wi,parse:pr};Oc.exports=xm;Oc.exports.default=xm;Oc.exports.fastUri=xm});var wb=I(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});var xb=Cb();xb.code='require("ajv/dist/runtime/uri").default';wm.default=xb});var $m=I(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.CodeGen=nn.Name=nn.nil=nn.stringify=nn.str=nn._=nn.KeywordCxt=void 0;var BR=ga();Object.defineProperty(nn,"KeywordCxt",{enumerable:!0,get:function(){return BR.KeywordCxt}});var va=xe();Object.defineProperty(nn,"_",{enumerable:!0,get:function(){return va._}});Object.defineProperty(nn,"str",{enumerable:!0,get:function(){return va.str}});Object.defineProperty(nn,"stringify",{enumerable:!0,get:function(){return va.stringify}});Object.defineProperty(nn,"nil",{enumerable:!0,get:function(){return va.nil}});Object.defineProperty(nn,"Name",{enumerable:!0,get:function(){return va.Name}});Object.defineProperty(nn,"CodeGen",{enumerable:!0,get:function(){return va.CodeGen}});var LR=Fs(),Tb=_a(),zR=em(),js=qs(),UR=xe(),Rs=As(),Mc=ks(),Sm=We(),Ib=ib(),HR=wb(),Pb=(e,n)=>new RegExp(e,n);Pb.code="new RegExp";var WR=["removeAdditional","useDefaults","coerceTypes"],GR=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),KR={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},JR={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Sb=200;function YR(e){var n,t,i,r,a,l,u,d,p,h,_,C,T,x,O,F,z,ne,re,Q,J,oe,ae,fe,ge;let Ne=e.strict,Ue=(n=e.code)===null||n===void 0?void 0:n.optimize,Xt=Ue===!0||Ue===void 0?1:Ue||0,Ft=(i=(t=e.code)===null||t===void 0?void 0:t.regExp)!==null&&i!==void 0?i:Pb,Tn=(r=e.uriResolver)!==null&&r!==void 0?r:HR.default;return{strictSchema:(l=(a=e.strictSchema)!==null&&a!==void 0?a:Ne)!==null&&l!==void 0?l:!0,strictNumbers:(d=(u=e.strictNumbers)!==null&&u!==void 0?u:Ne)!==null&&d!==void 0?d:!0,strictTypes:(h=(p=e.strictTypes)!==null&&p!==void 0?p:Ne)!==null&&h!==void 0?h:"log",strictTuples:(C=(_=e.strictTuples)!==null&&_!==void 0?_:Ne)!==null&&C!==void 0?C:"log",strictRequired:(x=(T=e.strictRequired)!==null&&T!==void 0?T:Ne)!==null&&x!==void 0?x:!1,code:e.code?at(ye({},e.code),{optimize:Xt,regExp:Ft}):{optimize:Xt,regExp:Ft},loopRequired:(O=e.loopRequired)!==null&&O!==void 0?O:Sb,loopEnum:(F=e.loopEnum)!==null&&F!==void 0?F:Sb,meta:(z=e.meta)!==null&&z!==void 0?z:!0,messages:(ne=e.messages)!==null&&ne!==void 0?ne:!0,inlineRefs:(re=e.inlineRefs)!==null&&re!==void 0?re:!0,schemaId:(Q=e.schemaId)!==null&&Q!==void 0?Q:"$id",addUsedSchema:(J=e.addUsedSchema)!==null&&J!==void 0?J:!0,validateSchema:(oe=e.validateSchema)!==null&&oe!==void 0?oe:!0,validateFormats:(ae=e.validateFormats)!==null&&ae!==void 0?ae:!0,unicodeRegExp:(fe=e.unicodeRegExp)!==null&&fe!==void 0?fe:!0,int32range:(ge=e.int32range)!==null&&ge!==void 0?ge:!0,uriResolver:Tn}}var Bs=class{constructor(n={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,n=this.opts=ye(ye({},n),YR(n));let{es5:t,lines:i}=this.opts.code;this.scope=new UR.ValueScope({scope:{},prefixes:GR,es5:t,lines:i}),this.logger=nB(n.logger);let r=n.validateFormats;n.validateFormats=!1,this.RULES=(0,zR.getRules)(),$b.call(this,KR,n,"NOT SUPPORTED"),$b.call(this,JR,n,"DEPRECATED","warn"),this._metaOpts=eB.call(this),n.formats&&ZR.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),n.keywords&&QR.call(this,n.keywords),typeof n.meta=="object"&&this.addMetaSchema(n.meta),XR.call(this),n.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:n,meta:t,schemaId:i}=this.opts,r=Ib;i==="id"&&(r=ye({},Ib),r.id=r.$id,delete r.$id),t&&n&&this.addMetaSchema(r,r[i],!1)}defaultMeta(){let{meta:n,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof n=="object"?n[t]||n:void 0}validate(n,t){let i;if(typeof n=="string"){if(i=this.getSchema(n),!i)throw new Error(`no schema with key or ref "${n}"`)}else i=this.compile(n);let r=i(t);return"$async"in i||(this.errors=i.errors),r}compile(n,t){let i=this._addSchema(n,t);return i.validate||this._compileSchemaEnv(i)}compileAsync(n,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:i}=this.opts;return r.call(this,n,t);function r(h,_){return pe(this,null,function*(){yield a.call(this,h.$schema);let C=this._addSchema(h,_);return C.validate||l.call(this,C)})}function a(h){return pe(this,null,function*(){h&&!this.getSchema(h)&&(yield r.call(this,{$ref:h},!0))})}function l(h){return pe(this,null,function*(){try{return this._compileSchemaEnv(h)}catch(_){if(!(_ instanceof Tb.default))throw _;return u.call(this,_),yield d.call(this,_.missingSchema),l.call(this,h)}})}function u({missingSchema:h,missingRef:_}){if(this.refs[h])throw new Error(`AnySchema ${h} is loaded but ${_} cannot be resolved`)}function d(h){return pe(this,null,function*(){let _=yield p.call(this,h);this.refs[h]||(yield a.call(this,_.$schema)),this.refs[h]||this.addSchema(_,h,t)})}function p(h){return pe(this,null,function*(){let _=this._loading[h];if(_)return _;try{return yield this._loading[h]=i(h)}finally{delete this._loading[h]}})}}addSchema(n,t,i,r=this.opts.validateSchema){if(Array.isArray(n)){for(let l of n)this.addSchema(l,void 0,i,r);return this}let a;if(typeof n=="object"){let{schemaId:l}=this.opts;if(a=n[l],a!==void 0&&typeof a!="string")throw new Error(`schema ${l} must be string`)}return t=(0,Rs.normalizeId)(t||a),this._checkUnique(t),this.schemas[t]=this._addSchema(n,i,t,r,!0),this}addMetaSchema(n,t,i=this.opts.validateSchema){return this.addSchema(n,t,!0,i),this}validateSchema(n,t){if(typeof n=="boolean")return!0;let i;if(i=n.$schema,i!==void 0&&typeof i!="string")throw new Error("$schema must be a string");if(i=i||this.opts.defaultMeta||this.defaultMeta(),!i)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let r=this.validate(i,n);if(!r&&t){let a="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(a);else throw new Error(a)}return r}getSchema(n){let t;for(;typeof(t=Eb.call(this,n))=="string";)n=t;if(t===void 0){let{schemaId:i}=this.opts,r=new js.SchemaEnv({schema:{},schemaId:i});if(t=js.resolveSchema.call(this,r,n),!t)return;this.refs[n]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(n){if(n instanceof RegExp)return this._removeAllSchemas(this.schemas,n),this._removeAllSchemas(this.refs,n),this;switch(typeof n){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=Eb.call(this,n);return typeof t=="object"&&this._cache.delete(t.schema),delete this.schemas[n],delete this.refs[n],this}case"object":{let t=n;this._cache.delete(t);let i=n[this.opts.schemaId];return i&&(i=(0,Rs.normalizeId)(i),delete this.schemas[i],delete this.refs[i]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(n){for(let t of n)this.addKeyword(t);return this}addKeyword(n,t){let i;if(typeof n=="string")i=n,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=i);else if(typeof n=="object"&&t===void 0){if(t=n,i=t.keyword,Array.isArray(i)&&!i.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(rB.call(this,i,t),!t)return(0,Sm.eachItem)(i,a=>Im.call(this,a)),this;aB.call(this,t);let r=at(ye({},t),{type:(0,Mc.getJSONTypes)(t.type),schemaType:(0,Mc.getJSONTypes)(t.schemaType)});return(0,Sm.eachItem)(i,r.type.length===0?a=>Im.call(this,a,r):a=>r.type.forEach(l=>Im.call(this,a,r,l))),this}getKeyword(n){let t=this.RULES.all[n];return typeof t=="object"?t.definition:!!t}removeKeyword(n){let{RULES:t}=this;delete t.keywords[n],delete t.all[n];for(let i of t.rules){let r=i.rules.findIndex(a=>a.keyword===n);r>=0&&i.rules.splice(r,1)}return this}addFormat(n,t){return typeof t=="string"&&(t=new RegExp(t)),this.formats[n]=t,this}errorsText(n=this.errors,{separator:t=", ",dataVar:i="data"}={}){return!n||n.length===0?"No errors":n.map(r=>`${i}${r.instancePath} ${r.message}`).reduce((r,a)=>r+t+a)}$dataMetaSchema(n,t){let i=this.RULES.all;n=JSON.parse(JSON.stringify(n));for(let r of t){let a=r.split("/").slice(1),l=n;for(let u of a)l=l[u];for(let u in i){let d=i[u];if(typeof d!="object")continue;let{$data:p}=d.definition,h=l[u];p&&h&&(l[u]=Ob(h))}}return n}_removeAllSchemas(n,t){for(let i in n){let r=n[i];(!t||t.test(i))&&(typeof r=="string"?delete n[i]:r&&!r.meta&&(this._cache.delete(r.schema),delete n[i]))}}_addSchema(n,t,i,r=this.opts.validateSchema,a=this.opts.addUsedSchema){let l,{schemaId:u}=this.opts;if(typeof n=="object")l=n[u];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof n!="boolean")throw new Error("schema must be object or boolean")}let d=this._cache.get(n);if(d!==void 0)return d;i=(0,Rs.normalizeId)(l||i);let p=Rs.getSchemaRefs.call(this,n,i);return d=new js.SchemaEnv({schema:n,schemaId:u,meta:t,baseId:i,localRefs:p}),this._cache.set(d.schema,d),a&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=d),r&&this.validateSchema(n,!0),d}_checkUnique(n){if(this.schemas[n]||this.refs[n])throw new Error(`schema with key or id "${n}" already exists`)}_compileSchemaEnv(n){if(n.meta?this._compileMetaSchema(n):js.compileSchema.call(this,n),!n.validate)throw new Error("ajv implementation error");return n.validate}_compileMetaSchema(n){let t=this.opts;this.opts=this._metaOpts;try{js.compileSchema.call(this,n)}finally{this.opts=t}}};Bs.ValidationError=LR.default;Bs.MissingRefError=Tb.default;nn.default=Bs;function $b(e,n,t,i="error"){for(let r in e){let a=r;a in n&&this.logger[i](`${t}: option ${r}. ${e[a]}`)}}function Eb(e){return e=(0,Rs.normalizeId)(e),this.schemas[e]||this.refs[e]}function XR(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let n in e)this.addSchema(e[n],n)}function ZR(){for(let e in this.opts.formats){let n=this.opts.formats[e];n&&this.addFormat(e,n)}}function QR(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let n in e){let t=e[n];t.keyword||(t.keyword=n),this.addKeyword(t)}}function eB(){let e=ye({},this.opts);for(let n of WR)delete e[n];return e}var tB={log(){},warn(){},error(){}};function nB(e){if(e===!1)return tB;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var iB=/^[a-z_$][a-z0-9_$:-]*$/i;function rB(e,n){let{RULES:t}=this;if((0,Sm.eachItem)(e,i=>{if(t.keywords[i])throw new Error(`Keyword ${i} is already defined`);if(!iB.test(i))throw new Error(`Keyword ${i} has invalid name`)}),!!n&&n.$data&&!("code"in n||"validate"in n))throw new Error('$data keyword must have "code" or "validate" function')}function Im(e,n,t){var i;let r=n?.post;if(t&&r)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:a}=this,l=r?a.post:a.rules.find(({type:d})=>d===t);if(l||(l={type:t,rules:[]},a.rules.push(l)),a.keywords[e]=!0,!n)return;let u={keyword:e,definition:at(ye({},n),{type:(0,Mc.getJSONTypes)(n.type),schemaType:(0,Mc.getJSONTypes)(n.schemaType)})};n.before?oB.call(this,l,u,n.before):l.rules.push(u),a.all[e]=u,(i=n.implements)===null||i===void 0||i.forEach(d=>this.addKeyword(d))}function oB(e,n,t){let i=e.rules.findIndex(r=>r.keyword===t);i>=0?e.rules.splice(i,0,n):(e.rules.push(n),this.logger.warn(`rule ${t} is not defined`))}function aB(e){let{metaSchema:n}=e;n!==void 0&&(e.$data&&this.opts.$data&&(n=Ob(n)),e.validateSchema=this.compile(n,!0))}var sB={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ob(e){return{anyOf:[e,sB]}}});var Mb=I(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});var lB={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Em.default=lB});var Dc=I($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.callRef=$o.getValidate=void 0;var uB=_a(),kb=ci(),Fn=xe(),ba=ui(),Ab=qs(),kc=We(),cB={keyword:"$ref",schemaType:"string",code(e){let{gen:n,schema:t,it:i}=e,{baseId:r,schemaEnv:a,validateName:l,opts:u,self:d}=i,{root:p}=a;if((t==="#"||t==="#/")&&r===p.baseId)return _();let h=Ab.resolveRef.call(d,p,r,t);if(h===void 0)throw new uB.default(i.opts.uriResolver,r,t);if(h instanceof Ab.SchemaEnv)return C(h);return T(h);function _(){if(a===p)return Ac(e,l,a,a.$async);let x=n.scopeValue("root",{ref:p});return Ac(e,(0,Fn._)`${x}.validate`,p,p.$async)}function C(x){let O=Db(e,x);Ac(e,O,x,x.$async)}function T(x){let O=n.scopeValue("schema",u.code.source===!0?{ref:x,code:(0,Fn.stringify)(x)}:{ref:x}),F=n.name("valid"),z=e.subschema({schema:x,dataTypes:[],schemaPath:Fn.nil,topSchemaRef:O,errSchemaPath:t},F);e.mergeEvaluated(z),e.ok(F)}}};function Db(e,n){let{gen:t}=e;return n.validate?t.scopeValue("validate",{ref:n.validate}):(0,Fn._)`${t.scopeValue("wrapper",{ref:n})}.validate`}$o.getValidate=Db;function Ac(e,n,t,i){let{gen:r,it:a}=e,{allErrors:l,schemaEnv:u,opts:d}=a,p=d.passContext?ba.default.this:Fn.nil;i?h():_();function h(){if(!u.$async)throw new Error("async schema referenced by sync schema");let x=r.let("valid");r.try(()=>{r.code((0,Fn._)`await ${(0,kb.callValidateCode)(e,n,p)}`),T(n),l||r.assign(x,!0)},O=>{r.if((0,Fn._)`!(${O} instanceof ${a.ValidationError})`,()=>r.throw(O)),C(O),l||r.assign(x,!1)}),e.ok(x)}function _(){e.result((0,kb.callValidateCode)(e,n,p),()=>T(n),()=>C(n))}function C(x){let O=(0,Fn._)`${x}.errors`;r.assign(ba.default.vErrors,(0,Fn._)`${ba.default.vErrors} === null ? ${O} : ${ba.default.vErrors}.concat(${O})`),r.assign(ba.default.errors,(0,Fn._)`${ba.default.vErrors}.length`)}function T(x){var O;if(!a.opts.unevaluated)return;let F=(O=t?.validate)===null||O===void 0?void 0:O.evaluated;if(a.props!==!0)if(F&&!F.dynamicProps)F.props!==void 0&&(a.props=kc.mergeEvaluated.props(r,F.props,a.props));else{let z=r.var("props",(0,Fn._)`${x}.evaluated.props`);a.props=kc.mergeEvaluated.props(r,z,a.props,Fn.Name)}if(a.items!==!0)if(F&&!F.dynamicItems)F.items!==void 0&&(a.items=kc.mergeEvaluated.items(r,F.items,a.items));else{let z=r.var("items",(0,Fn._)`${x}.evaluated.items`);a.items=kc.mergeEvaluated.items(r,z,a.items,Fn.Name)}}}$o.callRef=Ac;$o.default=cB});var Nb=I(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});var dB=Mb(),fB=Dc(),pB=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",dB.default,fB.default];Tm.default=pB});var Fb=I(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var Nc=xe(),Kr=Nc.operators,Fc={maximum:{okStr:"<=",ok:Kr.LTE,fail:Kr.GT},minimum:{okStr:">=",ok:Kr.GTE,fail:Kr.LT},exclusiveMaximum:{okStr:"<",ok:Kr.LT,fail:Kr.GTE},exclusiveMinimum:{okStr:">",ok:Kr.GT,fail:Kr.LTE}},mB={message:({keyword:e,schemaCode:n})=>(0,Nc.str)`must be ${Fc[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,Nc._)`{comparison: ${Fc[e].okStr}, limit: ${n}}`},hB={keyword:Object.keys(Fc),type:"number",schemaType:"number",$data:!0,error:mB,code(e){let{keyword:n,data:t,schemaCode:i}=e;e.fail$data((0,Nc._)`${t} ${Fc[n].fail} ${i} || isNaN(${t})`)}};Pm.default=hB});var qb=I(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});var Ls=xe(),gB={message:({schemaCode:e})=>(0,Ls.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Ls._)`{multipleOf: ${e}}`},_B={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:gB,code(e){let{gen:n,data:t,schemaCode:i,it:r}=e,a=r.opts.multipleOfPrecision,l=n.let("res"),u=a?(0,Ls._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${a}`:(0,Ls._)`${l} !== parseInt(${l})`;e.fail$data((0,Ls._)`(${i} === 0 || (${l} = ${t}/${i}, ${u}))`)}};Om.default=_B});var jb=I(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});function Vb(e){let n=e.length,t=0,i=0,r;for(;i<n;)t++,r=e.charCodeAt(i++),r>=55296&&r<=56319&&i<n&&(r=e.charCodeAt(i),(r&64512)===56320&&i++);return t}Mm.default=Vb;Vb.code='require("ajv/dist/runtime/ucs2length").default'});var Rb=I(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});var Eo=xe(),yB=We(),vB=jb(),bB={message({keyword:e,schemaCode:n}){let t=e==="maxLength"?"more":"fewer";return(0,Eo.str)`must NOT have ${t} than ${n} characters`},params:({schemaCode:e})=>(0,Eo._)`{limit: ${e}}`},CB={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:bB,code(e){let{keyword:n,data:t,schemaCode:i,it:r}=e,a=n==="maxLength"?Eo.operators.GT:Eo.operators.LT,l=r.opts.unicode===!1?(0,Eo._)`${t}.length`:(0,Eo._)`${(0,yB.useFunc)(e.gen,vB.default)}(${t})`;e.fail$data((0,Eo._)`${l} ${a} ${i}`)}};km.default=CB});var Bb=I(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});var xB=ci(),qc=xe(),wB={message:({schemaCode:e})=>(0,qc.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,qc._)`{pattern: ${e}}`},IB={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:wB,code(e){let{data:n,$data:t,schema:i,schemaCode:r,it:a}=e,l=a.opts.unicodeRegExp?"u":"",u=t?(0,qc._)`(new RegExp(${r}, ${l}))`:(0,xB.usePattern)(e,i);e.fail$data((0,qc._)`!${u}.test(${n})`)}};Am.default=IB});var Lb=I(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var zs=xe(),SB={message({keyword:e,schemaCode:n}){let t=e==="maxProperties"?"more":"fewer";return(0,zs.str)`must NOT have ${t} than ${n} properties`},params:({schemaCode:e})=>(0,zs._)`{limit: ${e}}`},$B={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:SB,code(e){let{keyword:n,data:t,schemaCode:i}=e,r=n==="maxProperties"?zs.operators.GT:zs.operators.LT;e.fail$data((0,zs._)`Object.keys(${t}).length ${r} ${i}`)}};Dm.default=$B});var zb=I(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var Us=ci(),Hs=xe(),EB=We(),TB={message:({params:{missingProperty:e}})=>(0,Hs.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Hs._)`{missingProperty: ${e}}`},PB={keyword:"required",type:"object",schemaType:"array",$data:!0,error:TB,code(e){let{gen:n,schema:t,schemaCode:i,data:r,$data:a,it:l}=e,{opts:u}=l;if(!a&&t.length===0)return;let d=t.length>=u.loopRequired;if(l.allErrors?p():h(),u.strictRequired){let T=e.parentSchema.properties,{definedProperties:x}=e.it;for(let O of t)if(T?.[O]===void 0&&!x.has(O)){let F=l.schemaEnv.baseId+l.errSchemaPath,z=`required property "${O}" is not defined at "${F}" (strictRequired)`;(0,EB.checkStrictMode)(l,z,l.opts.strictRequired)}}function p(){if(d||a)e.block$data(Hs.nil,_);else for(let T of t)(0,Us.checkReportMissingProp)(e,T)}function h(){let T=n.let("missing");if(d||a){let x=n.let("valid",!0);e.block$data(x,()=>C(T,x)),e.ok(x)}else n.if((0,Us.checkMissingProp)(e,t,T)),(0,Us.reportMissingProp)(e,T),n.else()}function _(){n.forOf("prop",i,T=>{e.setParams({missingProperty:T}),n.if((0,Us.noPropertyInData)(n,r,T,u.ownProperties),()=>e.error())})}function C(T,x){e.setParams({missingProperty:T}),n.forOf(T,i,()=>{n.assign(x,(0,Us.propertyInData)(n,r,T,u.ownProperties)),n.if((0,Hs.not)(x),()=>{e.error(),n.break()})},Hs.nil)}}};Nm.default=PB});var Ub=I(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});var Ws=xe(),OB={message({keyword:e,schemaCode:n}){let t=e==="maxItems"?"more":"fewer";return(0,Ws.str)`must NOT have ${t} than ${n} items`},params:({schemaCode:e})=>(0,Ws._)`{limit: ${e}}`},MB={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:OB,code(e){let{keyword:n,data:t,schemaCode:i}=e,r=n==="maxItems"?Ws.operators.GT:Ws.operators.LT;e.fail$data((0,Ws._)`${t}.length ${r} ${i}`)}};Fm.default=MB});var Vc=I(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0});var Hb=wc();Hb.code='require("ajv/dist/runtime/equal").default';qm.default=Hb});var Wb=I(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});var Vm=ks(),rn=xe(),kB=We(),AB=Vc(),DB={message:({params:{i:e,j:n}})=>(0,rn.str)`must NOT have duplicate items (items ## ${n} and ${e} are identical)`,params:({params:{i:e,j:n}})=>(0,rn._)`{i: ${e}, j: ${n}}`},NB={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:DB,code(e){let{gen:n,data:t,$data:i,schema:r,parentSchema:a,schemaCode:l,it:u}=e;if(!i&&!r)return;let d=n.let("valid"),p=a.items?(0,Vm.getSchemaTypes)(a.items):[];e.block$data(d,h,(0,rn._)`${l} === false`),e.ok(d);function h(){let x=n.let("i",(0,rn._)`${t}.length`),O=n.let("j");e.setParams({i:x,j:O}),n.assign(d,!0),n.if((0,rn._)`${x} > 1`,()=>(_()?C:T)(x,O))}function _(){return p.length>0&&!p.some(x=>x==="object"||x==="array")}function C(x,O){let F=n.name("item"),z=(0,Vm.checkDataTypes)(p,F,u.opts.strictNumbers,Vm.DataType.Wrong),ne=n.const("indices",(0,rn._)`{}`);n.for((0,rn._)`;${x}--;`,()=>{n.let(F,(0,rn._)`${t}[${x}]`),n.if(z,(0,rn._)`continue`),p.length>1&&n.if((0,rn._)`typeof ${F} == "string"`,(0,rn._)`${F} += "_"`),n.if((0,rn._)`typeof ${ne}[${F}] == "number"`,()=>{n.assign(O,(0,rn._)`${ne}[${F}]`),e.error(),n.assign(d,!1).break()}).code((0,rn._)`${ne}[${F}] = ${x}`)})}function T(x,O){let F=(0,kB.useFunc)(n,AB.default),z=n.name("outer");n.label(z).for((0,rn._)`;${x}--;`,()=>n.for((0,rn._)`${O} = ${x}; ${O}--;`,()=>n.if((0,rn._)`${F}(${t}[${x}], ${t}[${O}])`,()=>{e.error(),n.assign(d,!1).break(z)})))}}};jm.default=NB});var Gb=I(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});var Rm=xe(),FB=We(),qB=Vc(),VB={message:"must be equal to constant",params:({schemaCode:e})=>(0,Rm._)`{allowedValue: ${e}}`},jB={keyword:"const",$data:!0,error:VB,code(e){let{gen:n,data:t,$data:i,schemaCode:r,schema:a}=e;i||a&&typeof a=="object"?e.fail$data((0,Rm._)`!${(0,FB.useFunc)(n,qB.default)}(${t}, ${r})`):e.fail((0,Rm._)`${a} !== ${t}`)}};Bm.default=jB});var Kb=I(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});var Gs=xe(),RB=We(),BB=Vc(),LB={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Gs._)`{allowedValues: ${e}}`},zB={keyword:"enum",schemaType:"array",$data:!0,error:LB,code(e){let{gen:n,data:t,$data:i,schema:r,schemaCode:a,it:l}=e;if(!i&&r.length===0)throw new Error("enum must have non-empty array");let u=r.length>=l.opts.loopEnum,d,p=()=>d??(d=(0,RB.useFunc)(n,BB.default)),h;if(u||i)h=n.let("valid"),e.block$data(h,_);else{if(!Array.isArray(r))throw new Error("ajv implementation error");let T=n.const("vSchema",a);h=(0,Gs.or)(...r.map((x,O)=>C(T,O)))}e.pass(h);function _(){n.assign(h,!1),n.forOf("v",a,T=>n.if((0,Gs._)`${p()}(${t}, ${T})`,()=>n.assign(h,!0).break()))}function C(T,x){let O=r[x];return typeof O=="object"&&O!==null?(0,Gs._)`${p()}(${t}, ${T}[${x}])`:(0,Gs._)`${t} === ${O}`}}};Lm.default=zB});var Jb=I(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});var UB=Fb(),HB=qb(),WB=Rb(),GB=Bb(),KB=Lb(),JB=zb(),YB=Ub(),XB=Wb(),ZB=Gb(),QB=Kb(),e4=[UB.default,HB.default,WB.default,GB.default,KB.default,JB.default,YB.default,XB.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},ZB.default,QB.default];zm.default=e4});var Hm=I(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.validateAdditionalItems=void 0;var To=xe(),Um=We(),t4={message:({params:{len:e}})=>(0,To.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,To._)`{limit: ${e}}`},n4={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:t4,code(e){let{parentSchema:n,it:t}=e,{items:i}=n;if(!Array.isArray(i)){(0,Um.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}Yb(e,i)}};function Yb(e,n){let{gen:t,schema:i,data:r,keyword:a,it:l}=e;l.items=!0;let u=t.const("len",(0,To._)`${r}.length`);if(i===!1)e.setParams({len:n.length}),e.pass((0,To._)`${u} <= ${n.length}`);else if(typeof i=="object"&&!(0,Um.alwaysValidSchema)(l,i)){let p=t.var("valid",(0,To._)`${u} <= ${n.length}`);t.if((0,To.not)(p),()=>d(p)),e.ok(p)}function d(p){t.forRange("i",n.length,u,h=>{e.subschema({keyword:a,dataProp:h,dataPropType:Um.Type.Num},p),l.allErrors||t.if((0,To.not)(p),()=>t.break())})}}Ks.validateAdditionalItems=Yb;Ks.default=n4});var Wm=I(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Js.validateTuple=void 0;var Xb=xe(),jc=We(),i4=ci(),r4={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:n,it:t}=e;if(Array.isArray(n))return Zb(e,"additionalItems",n);t.items=!0,!(0,jc.alwaysValidSchema)(t,n)&&e.ok((0,i4.validateArray)(e))}};function Zb(e,n,t=e.schema){let{gen:i,parentSchema:r,data:a,keyword:l,it:u}=e;h(r),u.opts.unevaluated&&t.length&&u.items!==!0&&(u.items=jc.mergeEvaluated.items(i,t.length,u.items));let d=i.name("valid"),p=i.const("len",(0,Xb._)`${a}.length`);t.forEach((_,C)=>{(0,jc.alwaysValidSchema)(u,_)||(i.if((0,Xb._)`${p} > ${C}`,()=>e.subschema({keyword:l,schemaProp:C,dataProp:C},d)),e.ok(d))});function h(_){let{opts:C,errSchemaPath:T}=u,x=t.length,O=x===_.minItems&&(x===_.maxItems||_[n]===!1);if(C.strictTuples&&!O){let F=`"${l}" is ${x}-tuple, but minItems or maxItems/${n} are not specified or different at path "${T}"`;(0,jc.checkStrictMode)(u,F,C.strictTuples)}}}Js.validateTuple=Zb;Js.default=r4});var Qb=I(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0});var o4=Wm(),a4={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,o4.validateTuple)(e,"items")};Gm.default=a4});var tC=I(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});var eC=xe(),s4=We(),l4=ci(),u4=Hm(),c4={message:({params:{len:e}})=>(0,eC.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,eC._)`{limit: ${e}}`},d4={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:c4,code(e){let{schema:n,parentSchema:t,it:i}=e,{prefixItems:r}=t;i.items=!0,!(0,s4.alwaysValidSchema)(i,n)&&(r?(0,u4.validateAdditionalItems)(e,r):e.ok((0,l4.validateArray)(e)))}};Km.default=d4});var nC=I(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});var fi=xe(),Rc=We(),f4={message:({params:{min:e,max:n}})=>n===void 0?(0,fi.str)`must contain at least ${e} valid item(s)`:(0,fi.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,fi._)`{minContains: ${e}}`:(0,fi._)`{minContains: ${e}, maxContains: ${n}}`},p4={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:f4,code(e){let{gen:n,schema:t,parentSchema:i,data:r,it:a}=e,l,u,{minContains:d,maxContains:p}=i;a.opts.next?(l=d===void 0?1:d,u=p):l=1;let h=n.const("len",(0,fi._)`${r}.length`);if(e.setParams({min:l,max:u}),u===void 0&&l===0){(0,Rc.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&l>u){(0,Rc.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Rc.alwaysValidSchema)(a,t)){let O=(0,fi._)`${h} >= ${l}`;u!==void 0&&(O=(0,fi._)`${O} && ${h} <= ${u}`),e.pass(O);return}a.items=!0;let _=n.name("valid");u===void 0&&l===1?T(_,()=>n.if(_,()=>n.break())):l===0?(n.let(_,!0),u!==void 0&&n.if((0,fi._)`${r}.length > 0`,C)):(n.let(_,!1),C()),e.result(_,()=>e.reset());function C(){let O=n.name("_valid"),F=n.let("count",0);T(O,()=>n.if(O,()=>x(F)))}function T(O,F){n.forRange("i",0,h,z=>{e.subschema({keyword:"contains",dataProp:z,dataPropType:Rc.Type.Num,compositeRule:!0},O),F()})}function x(O){n.code((0,fi._)`${O}++`),u===void 0?n.if((0,fi._)`${O} >= ${l}`,()=>n.assign(_,!0).break()):(n.if((0,fi._)`${O} > ${u}`,()=>n.assign(_,!1).break()),l===1?n.assign(_,!0):n.if((0,fi._)`${O} >= ${l}`,()=>n.assign(_,!0)))}}};Jm.default=p4});var Bc=I(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.validateSchemaDeps=Gi.validatePropertyDeps=Gi.error=void 0;var Ym=xe(),m4=We(),Ys=ci();Gi.error={message:({params:{property:e,depsCount:n,deps:t}})=>{let i=n===1?"property":"properties";return(0,Ym.str)`must have ${i} ${t} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:t,missingProperty:i}})=>(0,Ym._)`{property: ${e},
6
- missingProperty: ${i},
7
- depsCount: ${n},
8
- deps: ${t}}`};var h4={keyword:"dependencies",type:"object",schemaType:"object",error:Gi.error,code(e){let[n,t]=g4(e);iC(e,n),rC(e,t)}};function g4({schema:e}){let n={},t={};for(let i in e){if(i==="__proto__")continue;let r=Array.isArray(e[i])?n:t;r[i]=e[i]}return[n,t]}function iC(e,n=e.schema){let{gen:t,data:i,it:r}=e;if(Object.keys(n).length===0)return;let a=t.let("missing");for(let l in n){let u=n[l];if(u.length===0)continue;let d=(0,Ys.propertyInData)(t,i,l,r.opts.ownProperties);e.setParams({property:l,depsCount:u.length,deps:u.join(", ")}),r.allErrors?t.if(d,()=>{for(let p of u)(0,Ys.checkReportMissingProp)(e,p)}):(t.if((0,Ym._)`${d} && (${(0,Ys.checkMissingProp)(e,u,a)})`),(0,Ys.reportMissingProp)(e,a),t.else())}}Gi.validatePropertyDeps=iC;function rC(e,n=e.schema){let{gen:t,data:i,keyword:r,it:a}=e,l=t.name("valid");for(let u in n)(0,m4.alwaysValidSchema)(a,n[u])||(t.if((0,Ys.propertyInData)(t,i,u,a.opts.ownProperties),()=>{let d=e.subschema({keyword:r,schemaProp:u},l);e.mergeValidEvaluated(d,l)},()=>t.var(l,!0)),e.ok(l))}Gi.validateSchemaDeps=rC;Gi.default=h4});var aC=I(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});var oC=xe(),_4=We(),y4={message:"property name must be valid",params:({params:e})=>(0,oC._)`{propertyName: ${e.propertyName}}`},v4={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:y4,code(e){let{gen:n,schema:t,data:i,it:r}=e;if((0,_4.alwaysValidSchema)(r,t))return;let a=n.name("valid");n.forIn("key",i,l=>{e.setParams({propertyName:l}),e.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:!0},a),n.if((0,oC.not)(a),()=>{e.error(!0),r.allErrors||n.break()})}),e.ok(a)}};Xm.default=v4});var Qm=I(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});var Lc=ci(),Ti=xe(),b4=ui(),zc=We(),C4={message:"must NOT have additional properties",params:({params:e})=>(0,Ti._)`{additionalProperty: ${e.additionalProperty}}`},x4={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:C4,code(e){let{gen:n,schema:t,parentSchema:i,data:r,errsCount:a,it:l}=e;if(!a)throw new Error("ajv implementation error");let{allErrors:u,opts:d}=l;if(l.props=!0,d.removeAdditional!=="all"&&(0,zc.alwaysValidSchema)(l,t))return;let p=(0,Lc.allSchemaProperties)(i.properties),h=(0,Lc.allSchemaProperties)(i.patternProperties);_(),e.ok((0,Ti._)`${a} === ${b4.default.errors}`);function _(){n.forIn("key",r,F=>{!p.length&&!h.length?x(F):n.if(C(F),()=>x(F))})}function C(F){let z;if(p.length>8){let ne=(0,zc.schemaRefOrVal)(l,i.properties,"properties");z=(0,Lc.isOwnProperty)(n,ne,F)}else p.length?z=(0,Ti.or)(...p.map(ne=>(0,Ti._)`${F} === ${ne}`)):z=Ti.nil;return h.length&&(z=(0,Ti.or)(z,...h.map(ne=>(0,Ti._)`${(0,Lc.usePattern)(e,ne)}.test(${F})`))),(0,Ti.not)(z)}function T(F){n.code((0,Ti._)`delete ${r}[${F}]`)}function x(F){if(d.removeAdditional==="all"||d.removeAdditional&&t===!1){T(F);return}if(t===!1){e.setParams({additionalProperty:F}),e.error(),u||n.break();return}if(typeof t=="object"&&!(0,zc.alwaysValidSchema)(l,t)){let z=n.name("valid");d.removeAdditional==="failing"?(O(F,z,!1),n.if((0,Ti.not)(z),()=>{e.reset(),T(F)})):(O(F,z),u||n.if((0,Ti.not)(z),()=>n.break()))}}function O(F,z,ne){let re={keyword:"additionalProperties",dataProp:F,dataPropType:zc.Type.Str};ne===!1&&Object.assign(re,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(re,z)}}};Zm.default=x4});var uC=I(th=>{"use strict";Object.defineProperty(th,"__esModule",{value:!0});var w4=ga(),sC=ci(),eh=We(),lC=Qm(),I4={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:n,schema:t,parentSchema:i,data:r,it:a}=e;a.opts.removeAdditional==="all"&&i.additionalProperties===void 0&&lC.default.code(new w4.KeywordCxt(a,lC.default,"additionalProperties"));let l=(0,sC.allSchemaProperties)(t);for(let _ of l)a.definedProperties.add(_);a.opts.unevaluated&&l.length&&a.props!==!0&&(a.props=eh.mergeEvaluated.props(n,(0,eh.toHash)(l),a.props));let u=l.filter(_=>!(0,eh.alwaysValidSchema)(a,t[_]));if(u.length===0)return;let d=n.name("valid");for(let _ of u)p(_)?h(_):(n.if((0,sC.propertyInData)(n,r,_,a.opts.ownProperties)),h(_),a.allErrors||n.else().var(d,!0),n.endIf()),e.it.definedProperties.add(_),e.ok(d);function p(_){return a.opts.useDefaults&&!a.compositeRule&&t[_].default!==void 0}function h(_){e.subschema({keyword:"properties",schemaProp:_,dataProp:_},d)}}};th.default=I4});var pC=I(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0});var cC=ci(),Uc=xe(),dC=We(),fC=We(),S4={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:n,schema:t,data:i,parentSchema:r,it:a}=e,{opts:l}=a,u=(0,cC.allSchemaProperties)(t),d=u.filter(O=>(0,dC.alwaysValidSchema)(a,t[O]));if(u.length===0||d.length===u.length&&(!a.opts.unevaluated||a.props===!0))return;let p=l.strictSchema&&!l.allowMatchingProperties&&r.properties,h=n.name("valid");a.props!==!0&&!(a.props instanceof Uc.Name)&&(a.props=(0,fC.evaluatedPropsToName)(n,a.props));let{props:_}=a;C();function C(){for(let O of u)p&&T(O),a.allErrors?x(O):(n.var(h,!0),x(O),n.if(h))}function T(O){for(let F in p)new RegExp(O).test(F)&&(0,dC.checkStrictMode)(a,`property ${F} matches pattern ${O} (use allowMatchingProperties)`)}function x(O){n.forIn("key",i,F=>{n.if((0,Uc._)`${(0,cC.usePattern)(e,O)}.test(${F})`,()=>{let z=d.includes(O);z||e.subschema({keyword:"patternProperties",schemaProp:O,dataProp:F,dataPropType:fC.Type.Str},h),a.opts.unevaluated&&_!==!0?n.assign((0,Uc._)`${_}[${F}]`,!0):!z&&!a.allErrors&&n.if((0,Uc.not)(h),()=>n.break())})})}}};nh.default=S4});var mC=I(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});var $4=We(),E4={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:n,schema:t,it:i}=e;if((0,$4.alwaysValidSchema)(i,t)){e.fail();return}let r=n.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),e.failResult(r,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};ih.default=E4});var hC=I(rh=>{"use strict";Object.defineProperty(rh,"__esModule",{value:!0});var T4=ci(),P4={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:T4.validateUnion,error:{message:"must match a schema in anyOf"}};rh.default=P4});var gC=I(oh=>{"use strict";Object.defineProperty(oh,"__esModule",{value:!0});var Hc=xe(),O4=We(),M4={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Hc._)`{passingSchemas: ${e.passing}}`},k4={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:M4,code(e){let{gen:n,schema:t,parentSchema:i,it:r}=e;if(!Array.isArray(t))throw new Error("ajv implementation error");if(r.opts.discriminator&&i.discriminator)return;let a=t,l=n.let("valid",!1),u=n.let("passing",null),d=n.name("_valid");e.setParams({passing:u}),n.block(p),e.result(l,()=>e.reset(),()=>e.error(!0));function p(){a.forEach((h,_)=>{let C;(0,O4.alwaysValidSchema)(r,h)?n.var(d,!0):C=e.subschema({keyword:"oneOf",schemaProp:_,compositeRule:!0},d),_>0&&n.if((0,Hc._)`${d} && ${l}`).assign(l,!1).assign(u,(0,Hc._)`[${u}, ${_}]`).else(),n.if(d,()=>{n.assign(l,!0),n.assign(u,_),C&&e.mergeEvaluated(C,Hc.Name)})})}}};oh.default=k4});var _C=I(ah=>{"use strict";Object.defineProperty(ah,"__esModule",{value:!0});var A4=We(),D4={keyword:"allOf",schemaType:"array",code(e){let{gen:n,schema:t,it:i}=e;if(!Array.isArray(t))throw new Error("ajv implementation error");let r=n.name("valid");t.forEach((a,l)=>{if((0,A4.alwaysValidSchema)(i,a))return;let u=e.subschema({keyword:"allOf",schemaProp:l},r);e.ok(r),e.mergeEvaluated(u)})}};ah.default=D4});var bC=I(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0});var Wc=xe(),vC=We(),N4={message:({params:e})=>(0,Wc.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Wc._)`{failingKeyword: ${e.ifClause}}`},F4={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:N4,code(e){let{gen:n,parentSchema:t,it:i}=e;t.then===void 0&&t.else===void 0&&(0,vC.checkStrictMode)(i,'"if" without "then" and "else" is ignored');let r=yC(i,"then"),a=yC(i,"else");if(!r&&!a)return;let l=n.let("valid",!0),u=n.name("_valid");if(d(),e.reset(),r&&a){let h=n.let("ifClause");e.setParams({ifClause:h}),n.if(u,p("then",h),p("else",h))}else r?n.if(u,p("then")):n.if((0,Wc.not)(u),p("else"));e.pass(l,()=>e.error(!0));function d(){let h=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(h)}function p(h,_){return()=>{let C=e.subschema({keyword:h},u);n.assign(l,u),e.mergeValidEvaluated(C,l),_?n.assign(_,(0,Wc._)`${h}`):e.setParams({ifClause:h})}}}};function yC(e,n){let t=e.schema[n];return t!==void 0&&!(0,vC.alwaysValidSchema)(e,t)}sh.default=F4});var CC=I(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});var q4=We(),V4={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:n,it:t}){n.if===void 0&&(0,q4.checkStrictMode)(t,`"${e}" without "if" is ignored`)}};lh.default=V4});var xC=I(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});var j4=Hm(),R4=Qb(),B4=Wm(),L4=tC(),z4=nC(),U4=Bc(),H4=aC(),W4=Qm(),G4=uC(),K4=pC(),J4=mC(),Y4=hC(),X4=gC(),Z4=_C(),Q4=bC(),eL=CC();function tL(e=!1){let n=[J4.default,Y4.default,X4.default,Z4.default,Q4.default,eL.default,H4.default,W4.default,U4.default,G4.default,K4.default];return e?n.push(R4.default,L4.default):n.push(j4.default,B4.default),n.push(z4.default),n}uh.default=tL});var wC=I(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});var zt=xe(),nL={message:({schemaCode:e})=>(0,zt.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,zt._)`{format: ${e}}`},iL={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:nL,code(e,n){let{gen:t,data:i,$data:r,schema:a,schemaCode:l,it:u}=e,{opts:d,errSchemaPath:p,schemaEnv:h,self:_}=u;if(!d.validateFormats)return;r?C():T();function C(){let x=t.scopeValue("formats",{ref:_.formats,code:d.code.formats}),O=t.const("fDef",(0,zt._)`${x}[${l}]`),F=t.let("fType"),z=t.let("format");t.if((0,zt._)`typeof ${O} == "object" && !(${O} instanceof RegExp)`,()=>t.assign(F,(0,zt._)`${O}.type || "string"`).assign(z,(0,zt._)`${O}.validate`),()=>t.assign(F,(0,zt._)`"string"`).assign(z,O)),e.fail$data((0,zt.or)(ne(),re()));function ne(){return d.strictSchema===!1?zt.nil:(0,zt._)`${l} && !${z}`}function re(){let Q=h.$async?(0,zt._)`(${O}.async ? await ${z}(${i}) : ${z}(${i}))`:(0,zt._)`${z}(${i})`,J=(0,zt._)`(typeof ${z} == "function" ? ${Q} : ${z}.test(${i}))`;return(0,zt._)`${z} && ${z} !== true && ${F} === ${n} && !${J}`}}function T(){let x=_.formats[a];if(!x){ne();return}if(x===!0)return;let[O,F,z]=re(x);O===n&&e.pass(Q());function ne(){if(d.strictSchema===!1){_.logger.warn(J());return}throw new Error(J());function J(){return`unknown format "${a}" ignored in schema at path "${p}"`}}function re(J){let oe=J instanceof RegExp?(0,zt.regexpCode)(J):d.code.formats?(0,zt._)`${d.code.formats}${(0,zt.getProperty)(a)}`:void 0,ae=t.scopeValue("formats",{key:a,ref:J,code:oe});return typeof J=="object"&&!(J instanceof RegExp)?[J.type||"string",J.validate,(0,zt._)`${ae}.validate`]:["string",J,ae]}function Q(){if(typeof x=="object"&&!(x instanceof RegExp)&&x.async){if(!h.$async)throw new Error("async format in sync schema");return(0,zt._)`await ${z}(${i})`}return typeof F=="function"?(0,zt._)`${z}(${i})`:(0,zt._)`${z}.test(${i})`}}}};ch.default=iL});var IC=I(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});var rL=wC(),oL=[rL.default];dh.default=oL});var SC=I(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.contentVocabulary=Ca.metadataVocabulary=void 0;Ca.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ca.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var ph=I(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});var aL=Nb(),sL=Jb(),lL=xC(),uL=IC(),$C=SC(),cL=[aL.default,sL.default,(0,lL.default)(),uL.default,$C.metadataVocabulary,$C.contentVocabulary];fh.default=cL});var TC=I(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.DiscrError=void 0;var EC=function(e){return e.Tag="tag",e.Mapping="mapping",e}(EC||(Gc.DiscrError=EC={}))});var gh=I(hh=>{"use strict";Object.defineProperty(hh,"__esModule",{value:!0});var xa=xe(),mh=TC(),PC=qs(),dL=_a(),fL=We(),pL={message:({params:{discrError:e,tagName:n}})=>e===mh.DiscrError.Tag?`tag "${n}" must be string`:`value of tag "${n}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:t}})=>(0,xa._)`{error: ${e}, tag: ${t}, tagValue: ${n}}`},mL={keyword:"discriminator",type:"object",schemaType:"object",error:pL,code(e){let{gen:n,data:t,schema:i,parentSchema:r,it:a}=e,{oneOf:l}=r;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");let u=i.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");let d=n.let("valid",!1),p=n.const("tag",(0,xa._)`${t}${(0,xa.getProperty)(u)}`);n.if((0,xa._)`typeof ${p} == "string"`,()=>h(),()=>e.error(!1,{discrError:mh.DiscrError.Tag,tag:p,tagName:u})),e.ok(d);function h(){let T=C();n.if(!1);for(let x in T)n.elseIf((0,xa._)`${p} === ${x}`),n.assign(d,_(T[x]));n.else(),e.error(!1,{discrError:mh.DiscrError.Mapping,tag:p,tagName:u}),n.endIf()}function _(T){let x=n.name("valid"),O=e.subschema({keyword:"oneOf",schemaProp:T},x);return e.mergeEvaluated(O,xa.Name),x}function C(){var T;let x={},O=z(r),F=!0;for(let Q=0;Q<l.length;Q++){let J=l[Q];if(J?.$ref&&!(0,fL.schemaHasRulesButRef)(J,a.self.RULES)){let ae=J.$ref;if(J=PC.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,ae),J instanceof PC.SchemaEnv&&(J=J.schema),J===void 0)throw new dL.default(a.opts.uriResolver,a.baseId,ae)}let oe=(T=J?.properties)===null||T===void 0?void 0:T[u];if(typeof oe!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);F=F&&(O||z(J)),ne(oe,Q)}if(!F)throw new Error(`discriminator: "${u}" must be required`);return x;function z({required:Q}){return Array.isArray(Q)&&Q.includes(u)}function ne(Q,J){if(Q.const)re(Q.const,J);else if(Q.enum)for(let oe of Q.enum)re(oe,J);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function re(Q,J){if(typeof Q!="string"||Q in x)throw new Error(`discriminator: "${u}" values must be unique strings`);x[Q]=J}}}};hh.default=mL});var OC=I((yoe,hL)=>{hL.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var kC=I((wt,_h)=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.MissingRefError=wt.ValidationError=wt.CodeGen=wt.Name=wt.nil=wt.stringify=wt.str=wt._=wt.KeywordCxt=wt.Ajv=void 0;var gL=$m(),_L=ph(),yL=gh(),MC=OC(),vL=["/properties"],Kc="http://json-schema.org/draft-07/schema",wa=class extends gL.default{_addVocabularies(){super._addVocabularies(),_L.default.forEach(n=>this.addVocabulary(n)),this.opts.discriminator&&this.addKeyword(yL.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let n=this.opts.$data?this.$dataMetaSchema(MC,vL):MC;this.addMetaSchema(n,Kc,!1),this.refs["http://json-schema.org/schema"]=Kc}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Kc)?Kc:void 0)}};wt.Ajv=wa;_h.exports=wt=wa;_h.exports.Ajv=wa;Object.defineProperty(wt,"__esModule",{value:!0});wt.default=wa;var bL=ga();Object.defineProperty(wt,"KeywordCxt",{enumerable:!0,get:function(){return bL.KeywordCxt}});var Ia=xe();Object.defineProperty(wt,"_",{enumerable:!0,get:function(){return Ia._}});Object.defineProperty(wt,"str",{enumerable:!0,get:function(){return Ia.str}});Object.defineProperty(wt,"stringify",{enumerable:!0,get:function(){return Ia.stringify}});Object.defineProperty(wt,"nil",{enumerable:!0,get:function(){return Ia.nil}});Object.defineProperty(wt,"Name",{enumerable:!0,get:function(){return Ia.Name}});Object.defineProperty(wt,"CodeGen",{enumerable:!0,get:function(){return Ia.CodeGen}});var CL=Fs();Object.defineProperty(wt,"ValidationError",{enumerable:!0,get:function(){return CL.default}});var xL=_a();Object.defineProperty(wt,"MissingRefError",{enumerable:!0,get:function(){return xL.default}})});var AC=I(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});Sa.formatLimitDefinition=void 0;var wL=kC(),Pi=xe(),Jr=Pi.operators,Jc={formatMaximum:{okStr:"<=",ok:Jr.LTE,fail:Jr.GT},formatMinimum:{okStr:">=",ok:Jr.GTE,fail:Jr.LT},formatExclusiveMaximum:{okStr:"<",ok:Jr.LT,fail:Jr.GTE},formatExclusiveMinimum:{okStr:">",ok:Jr.GT,fail:Jr.LTE}},IL={message:({keyword:e,schemaCode:n})=>(0,Pi.str)`should be ${Jc[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,Pi._)`{comparison: ${Jc[e].okStr}, limit: ${n}}`};Sa.formatLimitDefinition={keyword:Object.keys(Jc),type:"string",schemaType:"string",$data:!0,error:IL,code(e){let{gen:n,data:t,schemaCode:i,keyword:r,it:a}=e,{opts:l,self:u}=a;if(!l.validateFormats)return;let d=new wL.KeywordCxt(a,u.RULES.all.format.definition,"format");d.$data?p():h();function p(){let C=n.scopeValue("formats",{ref:u.formats,code:l.code.formats}),T=n.const("fmt",(0,Pi._)`${C}[${d.schemaCode}]`);e.fail$data((0,Pi.or)((0,Pi._)`typeof ${T} != "object"`,(0,Pi._)`${T} instanceof RegExp`,(0,Pi._)`typeof ${T}.compare != "function"`,_(T)))}function h(){let C=d.schema,T=u.formats[C];if(!T||T===!0)return;if(typeof T!="object"||T instanceof RegExp||typeof T.compare!="function")throw new Error(`"${r}": format "${C}" does not define "compare" function`);let x=n.scopeValue("formats",{key:C,ref:T,code:l.code.formats?(0,Pi._)`${l.code.formats}${(0,Pi.getProperty)(C)}`:void 0});e.fail$data(_(x))}function _(C){return(0,Pi._)`${C}.compare(${t}, ${i}) ${Jc[r].fail} 0`}},dependencies:["format"]};var SL=e=>(e.addKeyword(Sa.formatLimitDefinition),e);Sa.default=SL});var qC=I((Xs,FC)=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});var $a=ev(),$L=AC(),yh=xe(),DC=new yh.Name("fullFormats"),EL=new yh.Name("fastFormats"),vh=(e,n={keywords:!0})=>{if(Array.isArray(n))return NC(e,n,$a.fullFormats,DC),e;let[t,i]=n.mode==="fast"?[$a.fastFormats,EL]:[$a.fullFormats,DC],r=n.formats||$a.formatNames;return NC(e,r,t,i),n.keywords&&(0,$L.default)(e),e};vh.get=(e,n="full")=>{let i=(n==="fast"?$a.fastFormats:$a.fullFormats)[e];if(!i)throw new Error(`Unknown format "${e}"`);return i};function NC(e,n,t,i){var r,a;(r=(a=e.opts.code).formats)!==null&&r!==void 0||(a.formats=(0,yh._)`require("ajv-formats/dist/formats").${i}`);for(let l of n)e.addFormat(l,t[l])}FC.exports=Xs=vh;Object.defineProperty(Xs,"__esModule",{value:!0});Xs.default=vh});var Ch=I(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.dynamicAnchor=void 0;var bh=xe(),TL=ui(),VC=qs(),PL=Dc(),OL={keyword:"$dynamicAnchor",schemaType:"string",code:e=>jC(e,e.schema)};function jC(e,n){let{gen:t,it:i}=e;i.schemaEnv.root.dynamicAnchors[n]=!0;let r=(0,bh._)`${TL.default.dynamicAnchors}${(0,bh.getProperty)(n)}`,a=i.errSchemaPath==="#"?i.validateName:ML(e);t.if((0,bh._)`!${r}`,()=>t.assign(r,a))}Zs.dynamicAnchor=jC;function ML(e){let{schemaEnv:n,schema:t,self:i}=e.it,{root:r,baseId:a,localRefs:l,meta:u}=n.root,{schemaId:d}=i.opts,p=new VC.SchemaEnv({schema:t,schemaId:d,root:r,baseId:a,localRefs:l,meta:u});return VC.compileSchema.call(i,p),(0,PL.getValidate)(e,p)}Zs.default=OL});var xh=I(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});Qs.dynamicRef=void 0;var RC=xe(),kL=ui(),BC=Dc(),AL={keyword:"$dynamicRef",schemaType:"string",code:e=>LC(e,e.schema)};function LC(e,n){let{gen:t,keyword:i,it:r}=e;if(n[0]!=="#")throw new Error(`"${i}" only supports hash fragment reference`);let a=n.slice(1);if(r.allErrors)l();else{let d=t.let("valid",!1);l(d),e.ok(d)}function l(d){if(r.schemaEnv.root.dynamicAnchors[a]){let p=t.let("_v",(0,RC._)`${kL.default.dynamicAnchors}${(0,RC.getProperty)(a)}`);t.if(p,u(p,d),u(r.validateName,d))}else u(r.validateName,d)()}function u(d,p){return p?()=>t.block(()=>{(0,BC.callRef)(e,d),t.let(p,!0)}):()=>(0,BC.callRef)(e,d)}}Qs.dynamicRef=LC;Qs.default=AL});var zC=I(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});var DL=Ch(),NL=We(),FL={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,DL.dynamicAnchor)(e,""):(0,NL.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};wh.default=FL});var UC=I(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var qL=xh(),VL={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,qL.dynamicRef)(e,e.schema)};Ih.default=VL});var HC=I(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});var jL=Ch(),RL=xh(),BL=zC(),LL=UC(),zL=[jL.default,RL.default,BL.default,LL.default];Sh.default=zL});var GC=I($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});var WC=Bc(),UL={keyword:"dependentRequired",type:"object",schemaType:"object",error:WC.error,code:e=>(0,WC.validatePropertyDeps)(e)};$h.default=UL});var KC=I(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});var HL=Bc(),WL={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,HL.validateSchemaDeps)(e)};Eh.default=WL});var JC=I(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});var GL=We(),KL={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:n,it:t}){n.contains===void 0&&(0,GL.checkStrictMode)(t,`"${e}" without "contains" is ignored`)}};Th.default=KL});var YC=I(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});var JL=GC(),YL=KC(),XL=JC(),ZL=[JL.default,YL.default,XL.default];Ph.default=ZL});var ZC=I(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var Yr=xe(),XC=We(),QL=ui(),e9={message:"must NOT have unevaluated properties",params:({params:e})=>(0,Yr._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},t9={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:e9,code(e){let{gen:n,schema:t,data:i,errsCount:r,it:a}=e;if(!r)throw new Error("ajv implementation error");let{allErrors:l,props:u}=a;u instanceof Yr.Name?n.if((0,Yr._)`${u} !== true`,()=>n.forIn("key",i,_=>n.if(p(u,_),()=>d(_)))):u!==!0&&n.forIn("key",i,_=>u===void 0?d(_):n.if(h(u,_),()=>d(_))),a.props=!0,e.ok((0,Yr._)`${r} === ${QL.default.errors}`);function d(_){if(t===!1){e.setParams({unevaluatedProperty:_}),e.error(),l||n.break();return}if(!(0,XC.alwaysValidSchema)(a,t)){let C=n.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:_,dataPropType:XC.Type.Str},C),l||n.if((0,Yr.not)(C),()=>n.break())}}function p(_,C){return(0,Yr._)`!${_} || !${_}[${C}]`}function h(_,C){let T=[];for(let x in _)_[x]===!0&&T.push((0,Yr._)`${C} !== ${x}`);return(0,Yr.and)(...T)}}};Oh.default=t9});var ex=I(Mh=>{"use strict";Object.defineProperty(Mh,"__esModule",{value:!0});var Po=xe(),QC=We(),n9={message:({params:{len:e}})=>(0,Po.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Po._)`{limit: ${e}}`},i9={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:n9,code(e){let{gen:n,schema:t,data:i,it:r}=e,a=r.items||0;if(a===!0)return;let l=n.const("len",(0,Po._)`${i}.length`);if(t===!1)e.setParams({len:a}),e.fail((0,Po._)`${l} > ${a}`);else if(typeof t=="object"&&!(0,QC.alwaysValidSchema)(r,t)){let d=n.var("valid",(0,Po._)`${l} <= ${a}`);n.if((0,Po.not)(d),()=>u(d,a)),e.ok(d)}r.items=!0;function u(d,p){n.forRange("i",p,l,h=>{e.subschema({keyword:"unevaluatedItems",dataProp:h,dataPropType:QC.Type.Num},d),r.allErrors||n.if((0,Po.not)(d),()=>n.break())})}}};Mh.default=i9});var tx=I(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});var r9=ZC(),o9=ex(),a9=[r9.default,o9.default];kh.default=a9});var nx=I((koe,s9)=>{s9.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}}});var ix=I((Aoe,l9)=>{l9.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}}});var rx=I((Doe,u9)=>{u9.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}}});var ox=I((Noe,c9)=>{c9.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}}});var ax=I((Foe,d9)=>{d9.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}}});var sx=I((qoe,f9)=>{f9.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var lx=I((Voe,p9)=>{p9.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var ux=I(Ah=>{"use strict";Object.defineProperty(Ah,"__esModule",{value:!0});var m9=nx(),h9=ix(),g9=rx(),_9=ox(),y9=ax(),v9=sx(),b9=lx(),C9=["/properties"];function x9(e){return[m9,h9,g9,_9,n(this,y9),v9,n(this,b9)].forEach(t=>this.addMetaSchema(t,void 0,!1)),this;function n(t,i){return e?t.$dataMetaSchema(i,C9):i}}Ah.default=x9});var cx=I((It,Nh)=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.MissingRefError=It.ValidationError=It.CodeGen=It.Name=It.nil=It.stringify=It.str=It._=It.KeywordCxt=It.Ajv2019=void 0;var w9=$m(),I9=ph(),S9=HC(),$9=YC(),E9=tx(),T9=gh(),P9=ux(),Dh="https://json-schema.org/draft/2019-09/schema",Ea=class extends w9.default{constructor(n={}){super(at(ye({},n),{dynamicRef:!0,next:!0,unevaluated:!0}))}_addVocabularies(){super._addVocabularies(),this.addVocabulary(S9.default),I9.default.forEach(n=>this.addVocabulary(n)),this.addVocabulary($9.default),this.addVocabulary(E9.default),this.opts.discriminator&&this.addKeyword(T9.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:n,meta:t}=this.opts;t&&(P9.default.call(this,n),this.refs["http://json-schema.org/schema"]=Dh)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Dh)?Dh:void 0)}};It.Ajv2019=Ea;Nh.exports=It=Ea;Nh.exports.Ajv2019=Ea;Object.defineProperty(It,"__esModule",{value:!0});It.default=Ea;var O9=ga();Object.defineProperty(It,"KeywordCxt",{enumerable:!0,get:function(){return O9.KeywordCxt}});var Ta=xe();Object.defineProperty(It,"_",{enumerable:!0,get:function(){return Ta._}});Object.defineProperty(It,"str",{enumerable:!0,get:function(){return Ta.str}});Object.defineProperty(It,"stringify",{enumerable:!0,get:function(){return Ta.stringify}});Object.defineProperty(It,"nil",{enumerable:!0,get:function(){return Ta.nil}});Object.defineProperty(It,"Name",{enumerable:!0,get:function(){return Ta.Name}});Object.defineProperty(It,"CodeGen",{enumerable:!0,get:function(){return Ta.CodeGen}});var M9=Fs();Object.defineProperty(It,"ValidationError",{enumerable:!0,get:function(){return M9.default}});var k9=_a();Object.defineProperty(It,"MissingRefError",{enumerable:!0,get:function(){return k9.default}})});var fx=I((zoe,dx)=>{function N9(){this.__data__=[],this.size=0}dx.exports=N9});var Yc=I((Uoe,px)=>{function F9(e,n){return e===n||e!==e&&n!==n}px.exports=F9});var el=I((Hoe,mx)=>{var q9=Yc();function V9(e,n){for(var t=e.length;t--;)if(q9(e[t][0],n))return t;return-1}mx.exports=V9});var gx=I((Woe,hx)=>{var j9=el(),R9=Array.prototype,B9=R9.splice;function L9(e){var n=this.__data__,t=j9(n,e);if(t<0)return!1;var i=n.length-1;return t==i?n.pop():B9.call(n,t,1),--this.size,!0}hx.exports=L9});var yx=I((Goe,_x)=>{var z9=el();function U9(e){var n=this.__data__,t=z9(n,e);return t<0?void 0:n[t][1]}_x.exports=U9});var bx=I((Koe,vx)=>{var H9=el();function W9(e){return H9(this.__data__,e)>-1}vx.exports=W9});var xx=I((Joe,Cx)=>{var G9=el();function K9(e,n){var t=this.__data__,i=G9(t,e);return i<0?(++this.size,t.push([e,n])):t[i][1]=n,this}Cx.exports=K9});var tl=I((Yoe,wx)=>{var J9=fx(),Y9=gx(),X9=yx(),Z9=bx(),Q9=xx();function Pa(e){var n=-1,t=e==null?0:e.length;for(this.clear();++n<t;){var i=e[n];this.set(i[0],i[1])}}Pa.prototype.clear=J9;Pa.prototype.delete=Y9;Pa.prototype.get=X9;Pa.prototype.has=Z9;Pa.prototype.set=Q9;wx.exports=Pa});var Sx=I((Xoe,Ix)=>{var e5=tl();function t5(){this.__data__=new e5,this.size=0}Ix.exports=t5});var Ex=I((Zoe,$x)=>{function n5(e){var n=this.__data__,t=n.delete(e);return this.size=n.size,t}$x.exports=n5});var Px=I((Qoe,Tx)=>{function i5(e){return this.__data__.get(e)}Tx.exports=i5});var Mx=I((eae,Ox)=>{function r5(e){return this.__data__.has(e)}Ox.exports=r5});var Vh=I((tae,kx)=>{var o5=typeof global=="object"&&global&&global.Object===Object&&global;kx.exports=o5});var Oi=I((nae,Ax)=>{var a5=Vh(),s5=typeof self=="object"&&self&&self.Object===Object&&self,l5=a5||s5||Function("return this")();Ax.exports=l5});var Oo=I((iae,Dx)=>{var u5=Oi(),c5=u5.Symbol;Dx.exports=c5});var Vx=I((rae,qx)=>{var Nx=Oo(),Fx=Object.prototype,d5=Fx.hasOwnProperty,f5=Fx.toString,nl=Nx?Nx.toStringTag:void 0;function p5(e){var n=d5.call(e,nl),t=e[nl];try{e[nl]=void 0;var i=!0}catch{}var r=f5.call(e);return i&&(n?e[nl]=t:delete e[nl]),r}qx.exports=p5});var Rx=I((oae,jx)=>{var m5=Object.prototype,h5=m5.toString;function g5(e){return h5.call(e)}jx.exports=g5});var Mo=I((aae,zx)=>{var Bx=Oo(),_5=Vx(),y5=Rx(),v5="[object Null]",b5="[object Undefined]",Lx=Bx?Bx.toStringTag:void 0;function C5(e){return e==null?e===void 0?b5:v5:Lx&&Lx in Object(e)?_5(e):y5(e)}zx.exports=C5});var ko=I((sae,Ux)=>{function x5(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}Ux.exports=x5});var jh=I((lae,Hx)=>{var w5=Mo(),I5=ko(),S5="[object AsyncFunction]",$5="[object Function]",E5="[object GeneratorFunction]",T5="[object Proxy]";function P5(e){if(!I5(e))return!1;var n=w5(e);return n==$5||n==E5||n==S5||n==T5}Hx.exports=P5});var Gx=I((uae,Wx)=>{var O5=Oi(),M5=O5["__core-js_shared__"];Wx.exports=M5});var Yx=I((cae,Jx)=>{var Rh=Gx(),Kx=function(){var e=/[^.]+$/.exec(Rh&&Rh.keys&&Rh.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function k5(e){return!!Kx&&Kx in e}Jx.exports=k5});var Bh=I((dae,Xx)=>{var A5=Function.prototype,D5=A5.toString;function N5(e){if(e!=null){try{return D5.call(e)}catch{}try{return e+""}catch{}}return""}Xx.exports=N5});var Qx=I((fae,Zx)=>{var F5=jh(),q5=Yx(),V5=ko(),j5=Bh(),R5=/[\\^$.*+?()[\]{}|]/g,B5=/^\[object .+?Constructor\]$/,L5=Function.prototype,z5=Object.prototype,U5=L5.toString,H5=z5.hasOwnProperty,W5=RegExp("^"+U5.call(H5).replace(R5,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function G5(e){if(!V5(e)||q5(e))return!1;var n=F5(e)?W5:B5;return n.test(j5(e))}Zx.exports=G5});var tw=I((pae,ew)=>{function K5(e,n){return e?.[n]}ew.exports=K5});var Xr=I((mae,nw)=>{var J5=Qx(),Y5=tw();function X5(e,n){var t=Y5(e,n);return J5(t)?t:void 0}nw.exports=X5});var Xc=I((hae,iw)=>{var Z5=Xr(),Q5=Oi(),e6=Z5(Q5,"Map");iw.exports=e6});var il=I((gae,rw)=>{var t6=Xr(),n6=t6(Object,"create");rw.exports=n6});var sw=I((_ae,aw)=>{var ow=il();function i6(){this.__data__=ow?ow(null):{},this.size=0}aw.exports=i6});var uw=I((yae,lw)=>{function r6(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}lw.exports=r6});var dw=I((vae,cw)=>{var o6=il(),a6="__lodash_hash_undefined__",s6=Object.prototype,l6=s6.hasOwnProperty;function u6(e){var n=this.__data__;if(o6){var t=n[e];return t===a6?void 0:t}return l6.call(n,e)?n[e]:void 0}cw.exports=u6});var pw=I((bae,fw)=>{var c6=il(),d6=Object.prototype,f6=d6.hasOwnProperty;function p6(e){var n=this.__data__;return c6?n[e]!==void 0:f6.call(n,e)}fw.exports=p6});var hw=I((Cae,mw)=>{var m6=il(),h6="__lodash_hash_undefined__";function g6(e,n){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=m6&&n===void 0?h6:n,this}mw.exports=g6});var _w=I((xae,gw)=>{var _6=sw(),y6=uw(),v6=dw(),b6=pw(),C6=hw();function Oa(e){var n=-1,t=e==null?0:e.length;for(this.clear();++n<t;){var i=e[n];this.set(i[0],i[1])}}Oa.prototype.clear=_6;Oa.prototype.delete=y6;Oa.prototype.get=v6;Oa.prototype.has=b6;Oa.prototype.set=C6;gw.exports=Oa});var bw=I((wae,vw)=>{var yw=_w(),x6=tl(),w6=Xc();function I6(){this.size=0,this.__data__={hash:new yw,map:new(w6||x6),string:new yw}}vw.exports=I6});var xw=I((Iae,Cw)=>{function S6(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}Cw.exports=S6});var rl=I((Sae,ww)=>{var $6=xw();function E6(e,n){var t=e.__data__;return $6(n)?t[typeof n=="string"?"string":"hash"]:t.map}ww.exports=E6});var Sw=I(($ae,Iw)=>{var T6=rl();function P6(e){var n=T6(this,e).delete(e);return this.size-=n?1:0,n}Iw.exports=P6});var Ew=I((Eae,$w)=>{var O6=rl();function M6(e){return O6(this,e).get(e)}$w.exports=M6});var Pw=I((Tae,Tw)=>{var k6=rl();function A6(e){return k6(this,e).has(e)}Tw.exports=A6});var Mw=I((Pae,Ow)=>{var D6=rl();function N6(e,n){var t=D6(this,e),i=t.size;return t.set(e,n),this.size+=t.size==i?0:1,this}Ow.exports=N6});var Zc=I((Oae,kw)=>{var F6=bw(),q6=Sw(),V6=Ew(),j6=Pw(),R6=Mw();function Ma(e){var n=-1,t=e==null?0:e.length;for(this.clear();++n<t;){var i=e[n];this.set(i[0],i[1])}}Ma.prototype.clear=F6;Ma.prototype.delete=q6;Ma.prototype.get=V6;Ma.prototype.has=j6;Ma.prototype.set=R6;kw.exports=Ma});var Dw=I((Mae,Aw)=>{var B6=tl(),L6=Xc(),z6=Zc(),U6=200;function H6(e,n){var t=this.__data__;if(t instanceof B6){var i=t.__data__;if(!L6||i.length<U6-1)return i.push([e,n]),this.size=++t.size,this;t=this.__data__=new z6(i)}return t.set(e,n),this.size=t.size,this}Aw.exports=H6});var Qc=I((kae,Nw)=>{var W6=tl(),G6=Sx(),K6=Ex(),J6=Px(),Y6=Mx(),X6=Dw();function ka(e){var n=this.__data__=new W6(e);this.size=n.size}ka.prototype.clear=G6;ka.prototype.delete=K6;ka.prototype.get=J6;ka.prototype.has=Y6;ka.prototype.set=X6;Nw.exports=ka});var qw=I((Aae,Fw)=>{function Z6(e,n){for(var t=-1,i=e==null?0:e.length;++t<i&&n(e[t],t,e)!==!1;);return e}Fw.exports=Z6});var Lh=I((Dae,Vw)=>{var Q6=Xr(),ez=function(){try{var e=Q6(Object,"defineProperty");return e({},"",{}),e}catch{}}();Vw.exports=ez});var zh=I((Nae,Rw)=>{var jw=Lh();function tz(e,n,t){n=="__proto__"&&jw?jw(e,n,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[n]=t}Rw.exports=tz});var Uh=I((Fae,Bw)=>{var nz=zh(),iz=Yc(),rz=Object.prototype,oz=rz.hasOwnProperty;function az(e,n,t){var i=e[n];(!(oz.call(e,n)&&iz(i,t))||t===void 0&&!(n in e))&&nz(e,n,t)}Bw.exports=az});var Aa=I((qae,Lw)=>{var sz=Uh(),lz=zh();function uz(e,n,t,i){var r=!t;t||(t={});for(var a=-1,l=n.length;++a<l;){var u=n[a],d=i?i(t[u],e[u],u,t,e):void 0;d===void 0&&(d=e[u]),r?lz(t,u,d):sz(t,u,d)}return t}Lw.exports=uz});var Uw=I((Vae,zw)=>{function cz(e,n){for(var t=-1,i=Array(e);++t<e;)i[t]=n(t);return i}zw.exports=cz});var mr=I((jae,Hw)=>{function dz(e){return e!=null&&typeof e=="object"}Hw.exports=dz});var Gw=I((Rae,Ww)=>{var fz=Mo(),pz=mr(),mz="[object Arguments]";function hz(e){return pz(e)&&fz(e)==mz}Ww.exports=hz});var ed=I((Bae,Yw)=>{var Kw=Gw(),gz=mr(),Jw=Object.prototype,_z=Jw.hasOwnProperty,yz=Jw.propertyIsEnumerable,vz=Kw(function(){return arguments}())?Kw:function(e){return gz(e)&&_z.call(e,"callee")&&!yz.call(e,"callee")};Yw.exports=vz});var qn=I((Lae,Xw)=>{var bz=Array.isArray;Xw.exports=bz});var Qw=I((zae,Zw)=>{function Cz(){return!1}Zw.exports=Cz});var td=I((ol,Da)=>{var xz=Oi(),wz=Qw(),nI=typeof ol=="object"&&ol&&!ol.nodeType&&ol,eI=nI&&typeof Da=="object"&&Da&&!Da.nodeType&&Da,Iz=eI&&eI.exports===nI,tI=Iz?xz.Buffer:void 0,Sz=tI?tI.isBuffer:void 0,$z=Sz||wz;Da.exports=$z});var Hh=I((Uae,iI)=>{var Ez=9007199254740991,Tz=/^(?:0|[1-9]\d*)$/;function Pz(e,n){var t=typeof e;return n=n??Ez,!!n&&(t=="number"||t!="symbol"&&Tz.test(e))&&e>-1&&e%1==0&&e<n}iI.exports=Pz});var nd=I((Hae,rI)=>{var Oz=9007199254740991;function Mz(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Oz}rI.exports=Mz});var aI=I((Wae,oI)=>{var kz=Mo(),Az=nd(),Dz=mr(),Nz="[object Arguments]",Fz="[object Array]",qz="[object Boolean]",Vz="[object Date]",jz="[object Error]",Rz="[object Function]",Bz="[object Map]",Lz="[object Number]",zz="[object Object]",Uz="[object RegExp]",Hz="[object Set]",Wz="[object String]",Gz="[object WeakMap]",Kz="[object ArrayBuffer]",Jz="[object DataView]",Yz="[object Float32Array]",Xz="[object Float64Array]",Zz="[object Int8Array]",Qz="[object Int16Array]",eU="[object Int32Array]",tU="[object Uint8Array]",nU="[object Uint8ClampedArray]",iU="[object Uint16Array]",rU="[object Uint32Array]",St={};St[Yz]=St[Xz]=St[Zz]=St[Qz]=St[eU]=St[tU]=St[nU]=St[iU]=St[rU]=!0;St[Nz]=St[Fz]=St[Kz]=St[qz]=St[Jz]=St[Vz]=St[jz]=St[Rz]=St[Bz]=St[Lz]=St[zz]=St[Uz]=St[Hz]=St[Wz]=St[Gz]=!1;function oU(e){return Dz(e)&&Az(e.length)&&!!St[kz(e)]}oI.exports=oU});var id=I((Gae,sI)=>{function aU(e){return function(n){return e(n)}}sI.exports=aU});var rd=I((al,Na)=>{var sU=Vh(),lI=typeof al=="object"&&al&&!al.nodeType&&al,sl=lI&&typeof Na=="object"&&Na&&!Na.nodeType&&Na,lU=sl&&sl.exports===lI,Wh=lU&&sU.process,uU=function(){try{var e=sl&&sl.require&&sl.require("util").types;return e||Wh&&Wh.binding&&Wh.binding("util")}catch{}}();Na.exports=uU});var Gh=I((Kae,dI)=>{var cU=aI(),dU=id(),uI=rd(),cI=uI&&uI.isTypedArray,fU=cI?dU(cI):cU;dI.exports=fU});var Kh=I((Jae,fI)=>{var pU=Uw(),mU=ed(),hU=qn(),gU=td(),_U=Hh(),yU=Gh(),vU=Object.prototype,bU=vU.hasOwnProperty;function CU(e,n){var t=hU(e),i=!t&&mU(e),r=!t&&!i&&gU(e),a=!t&&!i&&!r&&yU(e),l=t||i||r||a,u=l?pU(e.length,String):[],d=u.length;for(var p in e)(n||bU.call(e,p))&&!(l&&(p=="length"||r&&(p=="offset"||p=="parent")||a&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||_U(p,d)))&&u.push(p);return u}fI.exports=CU});var od=I((Yae,pI)=>{var xU=Object.prototype;function wU(e){var n=e&&e.constructor,t=typeof n=="function"&&n.prototype||xU;return e===t}pI.exports=wU});var Jh=I((Xae,mI)=>{function IU(e,n){return function(t){return e(n(t))}}mI.exports=IU});var gI=I((Zae,hI)=>{var SU=Jh(),$U=SU(Object.keys,Object);hI.exports=$U});var yI=I((Qae,_I)=>{var EU=od(),TU=gI(),PU=Object.prototype,OU=PU.hasOwnProperty;function MU(e){if(!EU(e))return TU(e);var n=[];for(var t in Object(e))OU.call(e,t)&&t!="constructor"&&n.push(t);return n}_I.exports=MU});var ll=I((ese,vI)=>{var kU=jh(),AU=nd();function DU(e){return e!=null&&AU(e.length)&&!kU(e)}vI.exports=DU});var Fa=I((tse,bI)=>{var NU=Kh(),FU=yI(),qU=ll();function VU(e){return qU(e)?NU(e):FU(e)}bI.exports=VU});var xI=I((nse,CI)=>{var jU=Aa(),RU=Fa();function BU(e,n){return e&&jU(n,RU(n),e)}CI.exports=BU});var II=I((ise,wI)=>{function LU(e){var n=[];if(e!=null)for(var t in Object(e))n.push(t);return n}wI.exports=LU});var $I=I((rse,SI)=>{var zU=ko(),UU=od(),HU=II(),WU=Object.prototype,GU=WU.hasOwnProperty;function KU(e){if(!zU(e))return HU(e);var n=UU(e),t=[];for(var i in e)i=="constructor"&&(n||!GU.call(e,i))||t.push(i);return t}SI.exports=KU});var ad=I((ose,EI)=>{var JU=Kh(),YU=$I(),XU=ll();function ZU(e){return XU(e)?JU(e,!0):YU(e)}EI.exports=ZU});var PI=I((ase,TI)=>{var QU=Aa(),e7=ad();function t7(e,n){return e&&QU(n,e7(n),e)}TI.exports=t7});var DI=I((ul,qa)=>{var n7=Oi(),AI=typeof ul=="object"&&ul&&!ul.nodeType&&ul,OI=AI&&typeof qa=="object"&&qa&&!qa.nodeType&&qa,i7=OI&&OI.exports===AI,MI=i7?n7.Buffer:void 0,kI=MI?MI.allocUnsafe:void 0;function r7(e,n){if(n)return e.slice();var t=e.length,i=kI?kI(t):new e.constructor(t);return e.copy(i),i}qa.exports=r7});var FI=I((sse,NI)=>{function o7(e,n){var t=-1,i=e.length;for(n||(n=Array(i));++t<i;)n[t]=e[t];return n}NI.exports=o7});var Yh=I((lse,qI)=>{function a7(e,n){for(var t=-1,i=e==null?0:e.length,r=0,a=[];++t<i;){var l=e[t];n(l,t,e)&&(a[r++]=l)}return a}qI.exports=a7});var Xh=I((use,VI)=>{function s7(){return[]}VI.exports=s7});var sd=I((cse,RI)=>{var l7=Yh(),u7=Xh(),c7=Object.prototype,d7=c7.propertyIsEnumerable,jI=Object.getOwnPropertySymbols,f7=jI?function(e){return e==null?[]:(e=Object(e),l7(jI(e),function(n){return d7.call(e,n)}))}:u7;RI.exports=f7});var LI=I((dse,BI)=>{var p7=Aa(),m7=sd();function h7(e,n){return p7(e,m7(e),n)}BI.exports=h7});var ld=I((fse,zI)=>{function g7(e,n){for(var t=-1,i=n.length,r=e.length;++t<i;)e[r+t]=n[t];return e}zI.exports=g7});var ud=I((pse,UI)=>{var _7=Jh(),y7=_7(Object.getPrototypeOf,Object);UI.exports=y7});var Zh=I((mse,HI)=>{var v7=ld(),b7=ud(),C7=sd(),x7=Xh(),w7=Object.getOwnPropertySymbols,I7=w7?function(e){for(var n=[];e;)v7(n,C7(e)),e=b7(e);return n}:x7;HI.exports=I7});var GI=I((hse,WI)=>{var S7=Aa(),$7=Zh();function E7(e,n){return S7(e,$7(e),n)}WI.exports=E7});var Qh=I((gse,KI)=>{var T7=ld(),P7=qn();function O7(e,n,t){var i=n(e);return P7(e)?i:T7(i,t(e))}KI.exports=O7});var eg=I((_se,JI)=>{var M7=Qh(),k7=sd(),A7=Fa();function D7(e){return M7(e,A7,k7)}JI.exports=D7});var tg=I((yse,YI)=>{var N7=Qh(),F7=Zh(),q7=ad();function V7(e){return N7(e,q7,F7)}YI.exports=V7});var ZI=I((vse,XI)=>{var j7=Xr(),R7=Oi(),B7=j7(R7,"DataView");XI.exports=B7});var eS=I((bse,QI)=>{var L7=Xr(),z7=Oi(),U7=L7(z7,"Promise");QI.exports=U7});var nS=I((Cse,tS)=>{var H7=Xr(),W7=Oi(),G7=H7(W7,"Set");tS.exports=G7});var rS=I((xse,iS)=>{var K7=Xr(),J7=Oi(),Y7=K7(J7,"WeakMap");iS.exports=Y7});var cl=I((wse,dS)=>{var ng=ZI(),ig=Xc(),rg=eS(),og=nS(),ag=rS(),cS=Mo(),Va=Bh(),oS="[object Map]",X7="[object Object]",aS="[object Promise]",sS="[object Set]",lS="[object WeakMap]",uS="[object DataView]",Z7=Va(ng),Q7=Va(ig),e8=Va(rg),t8=Va(og),n8=Va(ag),Ao=cS;(ng&&Ao(new ng(new ArrayBuffer(1)))!=uS||ig&&Ao(new ig)!=oS||rg&&Ao(rg.resolve())!=aS||og&&Ao(new og)!=sS||ag&&Ao(new ag)!=lS)&&(Ao=function(e){var n=cS(e),t=n==X7?e.constructor:void 0,i=t?Va(t):"";if(i)switch(i){case Z7:return uS;case Q7:return oS;case e8:return aS;case t8:return sS;case n8:return lS}return n});dS.exports=Ao});var pS=I((Ise,fS)=>{var i8=Object.prototype,r8=i8.hasOwnProperty;function o8(e){var n=e.length,t=new e.constructor(n);return n&&typeof e[0]=="string"&&r8.call(e,"index")&&(t.index=e.index,t.input=e.input),t}fS.exports=o8});var sg=I((Sse,mS)=>{var a8=Oi(),s8=a8.Uint8Array;mS.exports=s8});var cd=I(($se,gS)=>{var hS=sg();function l8(e){var n=new e.constructor(e.byteLength);return new hS(n).set(new hS(e)),n}gS.exports=l8});var yS=I((Ese,_S)=>{var u8=cd();function c8(e,n){var t=n?u8(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}_S.exports=c8});var bS=I((Tse,vS)=>{var d8=/\w*$/;function f8(e){var n=new e.constructor(e.source,d8.exec(e));return n.lastIndex=e.lastIndex,n}vS.exports=f8});var SS=I((Pse,IS)=>{var CS=Oo(),xS=CS?CS.prototype:void 0,wS=xS?xS.valueOf:void 0;function p8(e){return wS?Object(wS.call(e)):{}}IS.exports=p8});var ES=I((Ose,$S)=>{var m8=cd();function h8(e,n){var t=n?m8(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}$S.exports=h8});var PS=I((Mse,TS)=>{var g8=cd(),_8=yS(),y8=bS(),v8=SS(),b8=ES(),C8="[object Boolean]",x8="[object Date]",w8="[object Map]",I8="[object Number]",S8="[object RegExp]",$8="[object Set]",E8="[object String]",T8="[object Symbol]",P8="[object ArrayBuffer]",O8="[object DataView]",M8="[object Float32Array]",k8="[object Float64Array]",A8="[object Int8Array]",D8="[object Int16Array]",N8="[object Int32Array]",F8="[object Uint8Array]",q8="[object Uint8ClampedArray]",V8="[object Uint16Array]",j8="[object Uint32Array]";function R8(e,n,t){var i=e.constructor;switch(n){case P8:return g8(e);case C8:case x8:return new i(+e);case O8:return _8(e,t);case M8:case k8:case A8:case D8:case N8:case F8:case q8:case V8:case j8:return b8(e,t);case w8:return new i;case I8:case E8:return new i(e);case S8:return y8(e);case $8:return new i;case T8:return v8(e)}}TS.exports=R8});var kS=I((kse,MS)=>{var B8=ko(),OS=Object.create,L8=function(){function e(){}return function(n){if(!B8(n))return{};if(OS)return OS(n);e.prototype=n;var t=new e;return e.prototype=void 0,t}}();MS.exports=L8});var DS=I((Ase,AS)=>{var z8=kS(),U8=ud(),H8=od();function W8(e){return typeof e.constructor=="function"&&!H8(e)?z8(U8(e)):{}}AS.exports=W8});var FS=I((Dse,NS)=>{var G8=cl(),K8=mr(),J8="[object Map]";function Y8(e){return K8(e)&&G8(e)==J8}NS.exports=Y8});var RS=I((Nse,jS)=>{var X8=FS(),Z8=id(),qS=rd(),VS=qS&&qS.isMap,Q8=VS?Z8(VS):X8;jS.exports=Q8});var LS=I((Fse,BS)=>{var eH=cl(),tH=mr(),nH="[object Set]";function iH(e){return tH(e)&&eH(e)==nH}BS.exports=iH});var WS=I((qse,HS)=>{var rH=LS(),oH=id(),zS=rd(),US=zS&&zS.isSet,aH=US?oH(US):rH;HS.exports=aH});var lg=I((Vse,YS)=>{var sH=Qc(),lH=qw(),uH=Uh(),cH=xI(),dH=PI(),fH=DI(),pH=FI(),mH=LI(),hH=GI(),gH=eg(),_H=tg(),yH=cl(),vH=pS(),bH=PS(),CH=DS(),xH=qn(),wH=td(),IH=RS(),SH=ko(),$H=WS(),EH=Fa(),TH=ad(),PH=1,OH=2,MH=4,GS="[object Arguments]",kH="[object Array]",AH="[object Boolean]",DH="[object Date]",NH="[object Error]",KS="[object Function]",FH="[object GeneratorFunction]",qH="[object Map]",VH="[object Number]",JS="[object Object]",jH="[object RegExp]",RH="[object Set]",BH="[object String]",LH="[object Symbol]",zH="[object WeakMap]",UH="[object ArrayBuffer]",HH="[object DataView]",WH="[object Float32Array]",GH="[object Float64Array]",KH="[object Int8Array]",JH="[object Int16Array]",YH="[object Int32Array]",XH="[object Uint8Array]",ZH="[object Uint8ClampedArray]",QH="[object Uint16Array]",eW="[object Uint32Array]",bt={};bt[GS]=bt[kH]=bt[UH]=bt[HH]=bt[AH]=bt[DH]=bt[WH]=bt[GH]=bt[KH]=bt[JH]=bt[YH]=bt[qH]=bt[VH]=bt[JS]=bt[jH]=bt[RH]=bt[BH]=bt[LH]=bt[XH]=bt[ZH]=bt[QH]=bt[eW]=!0;bt[NH]=bt[KS]=bt[zH]=!1;function dd(e,n,t,i,r,a){var l,u=n&PH,d=n&OH,p=n&MH;if(t&&(l=r?t(e,i,r,a):t(e)),l!==void 0)return l;if(!SH(e))return e;var h=xH(e);if(h){if(l=vH(e),!u)return pH(e,l)}else{var _=yH(e),C=_==KS||_==FH;if(wH(e))return fH(e,u);if(_==JS||_==GS||C&&!r){if(l=d||C?{}:CH(e),!u)return d?hH(e,dH(l,e)):mH(e,cH(l,e))}else{if(!bt[_])return r?e:{};l=bH(e,_,u)}}a||(a=new sH);var T=a.get(e);if(T)return T;a.set(e,l),$H(e)?e.forEach(function(F){l.add(dd(F,n,t,F,e,a))}):IH(e)&&e.forEach(function(F,z){l.set(z,dd(F,n,t,z,e,a))});var x=p?d?_H:gH:d?TH:EH,O=h?void 0:x(e);return lH(O||e,function(F,z){O&&(z=F,F=e[z]),uH(l,z,dd(F,n,t,z,e,a))}),l}YS.exports=dd});var ZS=I((jse,XS)=>{var tW=lg(),nW=1,iW=4;function rW(e){return tW(e,nW|iW)}XS.exports=rW});var QS=I((ja,dl)=>{(function(){var e,n="4.17.21",t=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",r="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",p=1,h=2,_=4,C=1,T=2,x=1,O=2,F=4,z=8,ne=16,re=32,Q=64,J=128,oe=256,ae=512,fe=30,ge="...",Ne=800,Ue=16,Xt=1,Ft=2,Tn=3,Kt=1/0,ht=9007199254740991,Zi=17976931348623157e292,hn=NaN,qt=4294967295,eu=qt-1,jo=qt>>>1,Ro=[["ary",J],["bind",x],["bindKey",O],["curry",z],["curryRight",ne],["flip",ae],["partial",re],["partialRight",Q],["rearg",oe]],Bo="[object Arguments]",tu="[object Array]",eM="[object AsyncFunction]",es="[object Boolean]",ts="[object Date]",tM="[object DOMException]",nu="[object Error]",iu="[object Function]",$0="[object GeneratorFunction]",hi="[object Map]",ns="[object Number]",nM="[object Null]",Qi="[object Object]",E0="[object Promise]",iM="[object Proxy]",is="[object RegExp]",gi="[object Set]",rs="[object String]",ru="[object Symbol]",rM="[object Undefined]",os="[object WeakMap]",oM="[object WeakSet]",as="[object ArrayBuffer]",Lo="[object DataView]",Qd="[object Float32Array]",ef="[object Float64Array]",tf="[object Int8Array]",nf="[object Int16Array]",rf="[object Int32Array]",of="[object Uint8Array]",af="[object Uint8ClampedArray]",sf="[object Uint16Array]",lf="[object Uint32Array]",aM=/\b__p \+= '';/g,sM=/\b(__p \+=) '' \+/g,lM=/(__e\(.*?\)|\b__t\)) \+\n'';/g,T0=/&(?:amp|lt|gt|quot|#39);/g,P0=/[&<>"']/g,uM=RegExp(T0.source),cM=RegExp(P0.source),dM=/<%-([\s\S]+?)%>/g,fM=/<%([\s\S]+?)%>/g,O0=/<%=([\s\S]+?)%>/g,pM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mM=/^\w*$/,hM=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,uf=/[\\^$.*+?()[\]{}|]/g,gM=RegExp(uf.source),cf=/^\s+/,_M=/\s/,yM=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,vM=/\{\n\/\* \[wrapped with (.+)\] \*/,bM=/,? & /,CM=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,xM=/[()=,{}\[\]\/\s]/,wM=/\\(\\)?/g,IM=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,M0=/\w*$/,SM=/^[-+]0x[0-9a-f]+$/i,$M=/^0b[01]+$/i,EM=/^\[object .+?Constructor\]$/,TM=/^0o[0-7]+$/i,PM=/^(?:0|[1-9]\d*)$/,OM=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ou=/($^)/,MM=/['\n\r\u2028\u2029\\]/g,au="\\ud800-\\udfff",kM="\\u0300-\\u036f",AM="\\ufe20-\\ufe2f",DM="\\u20d0-\\u20ff",k0=kM+AM+DM,A0="\\u2700-\\u27bf",D0="a-z\\xdf-\\xf6\\xf8-\\xff",NM="\\xac\\xb1\\xd7\\xf7",FM="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qM="\\u2000-\\u206f",VM=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",N0="A-Z\\xc0-\\xd6\\xd8-\\xde",F0="\\ufe0e\\ufe0f",q0=NM+FM+qM+VM,df="['\u2019]",jM="["+au+"]",V0="["+q0+"]",su="["+k0+"]",j0="\\d+",RM="["+A0+"]",R0="["+D0+"]",B0="[^"+au+q0+j0+A0+D0+N0+"]",ff="\\ud83c[\\udffb-\\udfff]",BM="(?:"+su+"|"+ff+")",L0="[^"+au+"]",pf="(?:\\ud83c[\\udde6-\\uddff]){2}",mf="[\\ud800-\\udbff][\\udc00-\\udfff]",zo="["+N0+"]",z0="\\u200d",U0="(?:"+R0+"|"+B0+")",LM="(?:"+zo+"|"+B0+")",H0="(?:"+df+"(?:d|ll|m|re|s|t|ve))?",W0="(?:"+df+"(?:D|LL|M|RE|S|T|VE))?",G0=BM+"?",K0="["+F0+"]?",zM="(?:"+z0+"(?:"+[L0,pf,mf].join("|")+")"+K0+G0+")*",UM="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",HM="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",J0=K0+G0+zM,WM="(?:"+[RM,pf,mf].join("|")+")"+J0,GM="(?:"+[L0+su+"?",su,pf,mf,jM].join("|")+")",KM=RegExp(df,"g"),JM=RegExp(su,"g"),hf=RegExp(ff+"(?="+ff+")|"+GM+J0,"g"),YM=RegExp([zo+"?"+R0+"+"+H0+"(?="+[V0,zo,"$"].join("|")+")",LM+"+"+W0+"(?="+[V0,zo+U0,"$"].join("|")+")",zo+"?"+U0+"+"+H0,zo+"+"+W0,HM,UM,j0,WM].join("|"),"g"),XM=RegExp("["+z0+au+k0+F0+"]"),ZM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,QM=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ek=-1,Ct={};Ct[Qd]=Ct[ef]=Ct[tf]=Ct[nf]=Ct[rf]=Ct[of]=Ct[af]=Ct[sf]=Ct[lf]=!0,Ct[Bo]=Ct[tu]=Ct[as]=Ct[es]=Ct[Lo]=Ct[ts]=Ct[nu]=Ct[iu]=Ct[hi]=Ct[ns]=Ct[Qi]=Ct[is]=Ct[gi]=Ct[rs]=Ct[os]=!1;var vt={};vt[Bo]=vt[tu]=vt[as]=vt[Lo]=vt[es]=vt[ts]=vt[Qd]=vt[ef]=vt[tf]=vt[nf]=vt[rf]=vt[hi]=vt[ns]=vt[Qi]=vt[is]=vt[gi]=vt[rs]=vt[ru]=vt[of]=vt[af]=vt[sf]=vt[lf]=!0,vt[nu]=vt[iu]=vt[os]=!1;var tk={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},nk={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ik={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},rk={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ok=parseFloat,ak=parseInt,Y0=typeof global=="object"&&global&&global.Object===Object&&global,sk=typeof self=="object"&&self&&self.Object===Object&&self,Zt=Y0||sk||Function("return this")(),gf=typeof ja=="object"&&ja&&!ja.nodeType&&ja,io=gf&&typeof dl=="object"&&dl&&!dl.nodeType&&dl,X0=io&&io.exports===gf,_f=X0&&Y0.process,Zn=function(){try{var k=io&&io.require&&io.require("util").types;return k||_f&&_f.binding&&_f.binding("util")}catch{}}(),Z0=Zn&&Zn.isArrayBuffer,Q0=Zn&&Zn.isDate,e_=Zn&&Zn.isMap,t_=Zn&&Zn.isRegExp,n_=Zn&&Zn.isSet,i_=Zn&&Zn.isTypedArray;function Bn(k,U,B){switch(B.length){case 0:return k.call(U);case 1:return k.call(U,B[0]);case 2:return k.call(U,B[0],B[1]);case 3:return k.call(U,B[0],B[1],B[2])}return k.apply(U,B)}function lk(k,U,B,he){for(var Oe=-1,tt=k==null?0:k.length;++Oe<tt;){var Jt=k[Oe];U(he,Jt,B(Jt),k)}return he}function Qn(k,U){for(var B=-1,he=k==null?0:k.length;++B<he&&U(k[B],B,k)!==!1;);return k}function uk(k,U){for(var B=k==null?0:k.length;B--&&U(k[B],B,k)!==!1;);return k}function r_(k,U){for(var B=-1,he=k==null?0:k.length;++B<he;)if(!U(k[B],B,k))return!1;return!0}function xr(k,U){for(var B=-1,he=k==null?0:k.length,Oe=0,tt=[];++B<he;){var Jt=k[B];U(Jt,B,k)&&(tt[Oe++]=Jt)}return tt}function lu(k,U){var B=k==null?0:k.length;return!!B&&Uo(k,U,0)>-1}function yf(k,U,B){for(var he=-1,Oe=k==null?0:k.length;++he<Oe;)if(B(U,k[he]))return!0;return!1}function $t(k,U){for(var B=-1,he=k==null?0:k.length,Oe=Array(he);++B<he;)Oe[B]=U(k[B],B,k);return Oe}function wr(k,U){for(var B=-1,he=U.length,Oe=k.length;++B<he;)k[Oe+B]=U[B];return k}function vf(k,U,B,he){var Oe=-1,tt=k==null?0:k.length;for(he&&tt&&(B=k[++Oe]);++Oe<tt;)B=U(B,k[Oe],Oe,k);return B}function ck(k,U,B,he){var Oe=k==null?0:k.length;for(he&&Oe&&(B=k[--Oe]);Oe--;)B=U(B,k[Oe],Oe,k);return B}function bf(k,U){for(var B=-1,he=k==null?0:k.length;++B<he;)if(U(k[B],B,k))return!0;return!1}var dk=Cf("length");function fk(k){return k.split("")}function pk(k){return k.match(CM)||[]}function o_(k,U,B){var he;return B(k,function(Oe,tt,Jt){if(U(Oe,tt,Jt))return he=tt,!1}),he}function uu(k,U,B,he){for(var Oe=k.length,tt=B+(he?1:-1);he?tt--:++tt<Oe;)if(U(k[tt],tt,k))return tt;return-1}function Uo(k,U,B){return U===U?Sk(k,U,B):uu(k,a_,B)}function mk(k,U,B,he){for(var Oe=B-1,tt=k.length;++Oe<tt;)if(he(k[Oe],U))return Oe;return-1}function a_(k){return k!==k}function s_(k,U){var B=k==null?0:k.length;return B?wf(k,U)/B:hn}function Cf(k){return function(U){return U==null?e:U[k]}}function xf(k){return function(U){return k==null?e:k[U]}}function l_(k,U,B,he,Oe){return Oe(k,function(tt,Jt,gt){B=he?(he=!1,tt):U(B,tt,Jt,gt)}),B}function hk(k,U){var B=k.length;for(k.sort(U);B--;)k[B]=k[B].value;return k}function wf(k,U){for(var B,he=-1,Oe=k.length;++he<Oe;){var tt=U(k[he]);tt!==e&&(B=B===e?tt:B+tt)}return B}function If(k,U){for(var B=-1,he=Array(k);++B<k;)he[B]=U(B);return he}function gk(k,U){return $t(U,function(B){return[B,k[B]]})}function u_(k){return k&&k.slice(0,p_(k)+1).replace(cf,"")}function Ln(k){return function(U){return k(U)}}function Sf(k,U){return $t(U,function(B){return k[B]})}function ss(k,U){return k.has(U)}function c_(k,U){for(var B=-1,he=k.length;++B<he&&Uo(U,k[B],0)>-1;);return B}function d_(k,U){for(var B=k.length;B--&&Uo(U,k[B],0)>-1;);return B}function _k(k,U){for(var B=k.length,he=0;B--;)k[B]===U&&++he;return he}var yk=xf(tk),vk=xf(nk);function bk(k){return"\\"+rk[k]}function Ck(k,U){return k==null?e:k[U]}function Ho(k){return XM.test(k)}function xk(k){return ZM.test(k)}function wk(k){for(var U,B=[];!(U=k.next()).done;)B.push(U.value);return B}function $f(k){var U=-1,B=Array(k.size);return k.forEach(function(he,Oe){B[++U]=[Oe,he]}),B}function f_(k,U){return function(B){return k(U(B))}}function Ir(k,U){for(var B=-1,he=k.length,Oe=0,tt=[];++B<he;){var Jt=k[B];(Jt===U||Jt===d)&&(k[B]=d,tt[Oe++]=B)}return tt}function cu(k){var U=-1,B=Array(k.size);return k.forEach(function(he){B[++U]=he}),B}function Ik(k){var U=-1,B=Array(k.size);return k.forEach(function(he){B[++U]=[he,he]}),B}function Sk(k,U,B){for(var he=B-1,Oe=k.length;++he<Oe;)if(k[he]===U)return he;return-1}function $k(k,U,B){for(var he=B+1;he--;)if(k[he]===U)return he;return he}function Wo(k){return Ho(k)?Tk(k):dk(k)}function _i(k){return Ho(k)?Pk(k):fk(k)}function p_(k){for(var U=k.length;U--&&_M.test(k.charAt(U)););return U}var Ek=xf(ik);function Tk(k){for(var U=hf.lastIndex=0;hf.test(k);)++U;return U}function Pk(k){return k.match(hf)||[]}function Ok(k){return k.match(YM)||[]}var Mk=function k(U){U=U==null?Zt:Sr.defaults(Zt.Object(),U,Sr.pick(Zt,QM));var B=U.Array,he=U.Date,Oe=U.Error,tt=U.Function,Jt=U.Math,gt=U.Object,Ef=U.RegExp,kk=U.String,ei=U.TypeError,du=B.prototype,Ak=tt.prototype,Go=gt.prototype,fu=U["__core-js_shared__"],pu=Ak.toString,ot=Go.hasOwnProperty,Dk=0,m_=function(){var o=/[^.]+$/.exec(fu&&fu.keys&&fu.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),mu=Go.toString,Nk=pu.call(gt),Fk=Zt._,qk=Ef("^"+pu.call(ot).replace(uf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hu=X0?U.Buffer:e,$r=U.Symbol,gu=U.Uint8Array,h_=hu?hu.allocUnsafe:e,_u=f_(gt.getPrototypeOf,gt),g_=gt.create,__=Go.propertyIsEnumerable,yu=du.splice,y_=$r?$r.isConcatSpreadable:e,ls=$r?$r.iterator:e,ro=$r?$r.toStringTag:e,vu=function(){try{var o=uo(gt,"defineProperty");return o({},"",{}),o}catch{}}(),Vk=U.clearTimeout!==Zt.clearTimeout&&U.clearTimeout,jk=he&&he.now!==Zt.Date.now&&he.now,Rk=U.setTimeout!==Zt.setTimeout&&U.setTimeout,bu=Jt.ceil,Cu=Jt.floor,Tf=gt.getOwnPropertySymbols,Bk=hu?hu.isBuffer:e,v_=U.isFinite,Lk=du.join,zk=f_(gt.keys,gt),Yt=Jt.max,sn=Jt.min,Uk=he.now,Hk=U.parseInt,b_=Jt.random,Wk=du.reverse,Pf=uo(U,"DataView"),us=uo(U,"Map"),Of=uo(U,"Promise"),Ko=uo(U,"Set"),cs=uo(U,"WeakMap"),ds=uo(gt,"create"),xu=cs&&new cs,Jo={},Gk=co(Pf),Kk=co(us),Jk=co(Of),Yk=co(Ko),Xk=co(cs),wu=$r?$r.prototype:e,fs=wu?wu.valueOf:e,C_=wu?wu.toString:e;function b(o){if(Vt(o)&&!De(o)&&!(o instanceof Ge)){if(o instanceof ti)return o;if(ot.call(o,"__wrapped__"))return xy(o)}return new ti(o)}var Yo=function(){function o(){}return function(s){if(!kt(s))return{};if(g_)return g_(s);o.prototype=s;var c=new o;return o.prototype=e,c}}();function Iu(){}function ti(o,s){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=e}b.templateSettings={escape:dM,evaluate:fM,interpolate:O0,variable:"",imports:{_:b}},b.prototype=Iu.prototype,b.prototype.constructor=b,ti.prototype=Yo(Iu.prototype),ti.prototype.constructor=ti;function Ge(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=qt,this.__views__=[]}function Zk(){var o=new Ge(this.__wrapped__);return o.__actions__=Pn(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=Pn(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=Pn(this.__views__),o}function Qk(){if(this.__filtered__){var o=new Ge(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function eA(){var o=this.__wrapped__.value(),s=this.__dir__,c=De(o),f=s<0,g=c?o.length:0,w=f3(0,g,this.__views__),$=w.start,P=w.end,D=P-$,G=f?P:$-1,K=this.__iteratees__,ee=K.length,de=0,_e=sn(D,this.__takeCount__);if(!c||!f&&g==D&&_e==D)return H_(o,this.__actions__);var Se=[];e:for(;D--&&de<_e;){G+=s;for(var Ve=-1,$e=o[G];++Ve<ee;){var He=K[Ve],Ye=He.iteratee,Hn=He.type,yn=Ye($e);if(Hn==Ft)$e=yn;else if(!yn){if(Hn==Xt)continue e;break e}}Se[de++]=$e}return Se}Ge.prototype=Yo(Iu.prototype),Ge.prototype.constructor=Ge;function oo(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var f=o[s];this.set(f[0],f[1])}}function tA(){this.__data__=ds?ds(null):{},this.size=0}function nA(o){var s=this.has(o)&&delete this.__data__[o];return this.size-=s?1:0,s}function iA(o){var s=this.__data__;if(ds){var c=s[o];return c===l?e:c}return ot.call(s,o)?s[o]:e}function rA(o){var s=this.__data__;return ds?s[o]!==e:ot.call(s,o)}function oA(o,s){var c=this.__data__;return this.size+=this.has(o)?0:1,c[o]=ds&&s===e?l:s,this}oo.prototype.clear=tA,oo.prototype.delete=nA,oo.prototype.get=iA,oo.prototype.has=rA,oo.prototype.set=oA;function er(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var f=o[s];this.set(f[0],f[1])}}function aA(){this.__data__=[],this.size=0}function sA(o){var s=this.__data__,c=Su(s,o);if(c<0)return!1;var f=s.length-1;return c==f?s.pop():yu.call(s,c,1),--this.size,!0}function lA(o){var s=this.__data__,c=Su(s,o);return c<0?e:s[c][1]}function uA(o){return Su(this.__data__,o)>-1}function cA(o,s){var c=this.__data__,f=Su(c,o);return f<0?(++this.size,c.push([o,s])):c[f][1]=s,this}er.prototype.clear=aA,er.prototype.delete=sA,er.prototype.get=lA,er.prototype.has=uA,er.prototype.set=cA;function tr(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var f=o[s];this.set(f[0],f[1])}}function dA(){this.size=0,this.__data__={hash:new oo,map:new(us||er),string:new oo}}function fA(o){var s=qu(this,o).delete(o);return this.size-=s?1:0,s}function pA(o){return qu(this,o).get(o)}function mA(o){return qu(this,o).has(o)}function hA(o,s){var c=qu(this,o),f=c.size;return c.set(o,s),this.size+=c.size==f?0:1,this}tr.prototype.clear=dA,tr.prototype.delete=fA,tr.prototype.get=pA,tr.prototype.has=mA,tr.prototype.set=hA;function ao(o){var s=-1,c=o==null?0:o.length;for(this.__data__=new tr;++s<c;)this.add(o[s])}function gA(o){return this.__data__.set(o,l),this}function _A(o){return this.__data__.has(o)}ao.prototype.add=ao.prototype.push=gA,ao.prototype.has=_A;function yi(o){var s=this.__data__=new er(o);this.size=s.size}function yA(){this.__data__=new er,this.size=0}function vA(o){var s=this.__data__,c=s.delete(o);return this.size=s.size,c}function bA(o){return this.__data__.get(o)}function CA(o){return this.__data__.has(o)}function xA(o,s){var c=this.__data__;if(c instanceof er){var f=c.__data__;if(!us||f.length<t-1)return f.push([o,s]),this.size=++c.size,this;c=this.__data__=new tr(f)}return c.set(o,s),this.size=c.size,this}yi.prototype.clear=yA,yi.prototype.delete=vA,yi.prototype.get=bA,yi.prototype.has=CA,yi.prototype.set=xA;function x_(o,s){var c=De(o),f=!c&&fo(o),g=!c&&!f&&Mr(o),w=!c&&!f&&!g&&ea(o),$=c||f||g||w,P=$?If(o.length,kk):[],D=P.length;for(var G in o)(s||ot.call(o,G))&&!($&&(G=="length"||g&&(G=="offset"||G=="parent")||w&&(G=="buffer"||G=="byteLength"||G=="byteOffset")||or(G,D)))&&P.push(G);return P}function w_(o){var s=o.length;return s?o[Bf(0,s-1)]:e}function wA(o,s){return Vu(Pn(o),so(s,0,o.length))}function IA(o){return Vu(Pn(o))}function Mf(o,s,c){(c!==e&&!vi(o[s],c)||c===e&&!(s in o))&&nr(o,s,c)}function ps(o,s,c){var f=o[s];(!(ot.call(o,s)&&vi(f,c))||c===e&&!(s in o))&&nr(o,s,c)}function Su(o,s){for(var c=o.length;c--;)if(vi(o[c][0],s))return c;return-1}function SA(o,s,c,f){return Er(o,function(g,w,$){s(f,g,c(g),$)}),f}function I_(o,s){return o&&Vi(s,Qt(s),o)}function $A(o,s){return o&&Vi(s,Mn(s),o)}function nr(o,s,c){s=="__proto__"&&vu?vu(o,s,{configurable:!0,enumerable:!0,value:c,writable:!0}):o[s]=c}function kf(o,s){for(var c=-1,f=s.length,g=B(f),w=o==null;++c<f;)g[c]=w?e:fp(o,s[c]);return g}function so(o,s,c){return o===o&&(c!==e&&(o=o<=c?o:c),s!==e&&(o=o>=s?o:s)),o}function ni(o,s,c,f,g,w){var $,P=s&p,D=s&h,G=s&_;if(c&&($=g?c(o,f,g,w):c(o)),$!==e)return $;if(!kt(o))return o;var K=De(o);if(K){if($=m3(o),!P)return Pn(o,$)}else{var ee=ln(o),de=ee==iu||ee==$0;if(Mr(o))return K_(o,P);if(ee==Qi||ee==Bo||de&&!g){if($=D||de?{}:py(o),!P)return D?i3(o,$A($,o)):n3(o,I_($,o))}else{if(!vt[ee])return g?o:{};$=h3(o,ee,P)}}w||(w=new yi);var _e=w.get(o);if(_e)return _e;w.set(o,$),Ly(o)?o.forEach(function($e){$.add(ni($e,s,c,$e,o,w))}):Ry(o)&&o.forEach(function($e,He){$.set(He,ni($e,s,c,He,o,w))});var Se=G?D?Zf:Xf:D?Mn:Qt,Ve=K?e:Se(o);return Qn(Ve||o,function($e,He){Ve&&(He=$e,$e=o[He]),ps($,He,ni($e,s,c,He,o,w))}),$}function EA(o){var s=Qt(o);return function(c){return S_(c,o,s)}}function S_(o,s,c){var f=c.length;if(o==null)return!f;for(o=gt(o);f--;){var g=c[f],w=s[g],$=o[g];if($===e&&!(g in o)||!w($))return!1}return!0}function $_(o,s,c){if(typeof o!="function")throw new ei(r);return bs(function(){o.apply(e,c)},s)}function ms(o,s,c,f){var g=-1,w=lu,$=!0,P=o.length,D=[],G=s.length;if(!P)return D;c&&(s=$t(s,Ln(c))),f?(w=yf,$=!1):s.length>=t&&(w=ss,$=!1,s=new ao(s));e:for(;++g<P;){var K=o[g],ee=c==null?K:c(K);if(K=f||K!==0?K:0,$&&ee===ee){for(var de=G;de--;)if(s[de]===ee)continue e;D.push(K)}else w(s,ee,f)||D.push(K)}return D}var Er=Q_(qi),E_=Q_(Df,!0);function TA(o,s){var c=!0;return Er(o,function(f,g,w){return c=!!s(f,g,w),c}),c}function $u(o,s,c){for(var f=-1,g=o.length;++f<g;){var w=o[f],$=s(w);if($!=null&&(P===e?$===$&&!Un($):c($,P)))var P=$,D=w}return D}function PA(o,s,c,f){var g=o.length;for(c=Fe(c),c<0&&(c=-c>g?0:g+c),f=f===e||f>g?g:Fe(f),f<0&&(f+=g),f=c>f?0:Uy(f);c<f;)o[c++]=s;return o}function T_(o,s){var c=[];return Er(o,function(f,g,w){s(f,g,w)&&c.push(f)}),c}function tn(o,s,c,f,g){var w=-1,$=o.length;for(c||(c=_3),g||(g=[]);++w<$;){var P=o[w];s>0&&c(P)?s>1?tn(P,s-1,c,f,g):wr(g,P):f||(g[g.length]=P)}return g}var Af=ey(),P_=ey(!0);function qi(o,s){return o&&Af(o,s,Qt)}function Df(o,s){return o&&P_(o,s,Qt)}function Eu(o,s){return xr(s,function(c){return ar(o[c])})}function lo(o,s){s=Pr(s,o);for(var c=0,f=s.length;o!=null&&c<f;)o=o[ji(s[c++])];return c&&c==f?o:e}function O_(o,s,c){var f=s(o);return De(o)?f:wr(f,c(o))}function gn(o){return o==null?o===e?rM:nM:ro&&ro in gt(o)?d3(o):I3(o)}function Nf(o,s){return o>s}function OA(o,s){return o!=null&&ot.call(o,s)}function MA(o,s){return o!=null&&s in gt(o)}function kA(o,s,c){return o>=sn(s,c)&&o<Yt(s,c)}function Ff(o,s,c){for(var f=c?yf:lu,g=o[0].length,w=o.length,$=w,P=B(w),D=1/0,G=[];$--;){var K=o[$];$&&s&&(K=$t(K,Ln(s))),D=sn(K.length,D),P[$]=!c&&(s||g>=120&&K.length>=120)?new ao($&&K):e}K=o[0];var ee=-1,de=P[0];e:for(;++ee<g&&G.length<D;){var _e=K[ee],Se=s?s(_e):_e;if(_e=c||_e!==0?_e:0,!(de?ss(de,Se):f(G,Se,c))){for($=w;--$;){var Ve=P[$];if(!(Ve?ss(Ve,Se):f(o[$],Se,c)))continue e}de&&de.push(Se),G.push(_e)}}return G}function AA(o,s,c,f){return qi(o,function(g,w,$){s(f,c(g),w,$)}),f}function hs(o,s,c){s=Pr(s,o),o=_y(o,s);var f=o==null?o:o[ji(ri(s))];return f==null?e:Bn(f,o,c)}function M_(o){return Vt(o)&&gn(o)==Bo}function DA(o){return Vt(o)&&gn(o)==as}function NA(o){return Vt(o)&&gn(o)==ts}function gs(o,s,c,f,g){return o===s?!0:o==null||s==null||!Vt(o)&&!Vt(s)?o!==o&&s!==s:FA(o,s,c,f,gs,g)}function FA(o,s,c,f,g,w){var $=De(o),P=De(s),D=$?tu:ln(o),G=P?tu:ln(s);D=D==Bo?Qi:D,G=G==Bo?Qi:G;var K=D==Qi,ee=G==Qi,de=D==G;if(de&&Mr(o)){if(!Mr(s))return!1;$=!0,K=!1}if(de&&!K)return w||(w=new yi),$||ea(o)?cy(o,s,c,f,g,w):u3(o,s,D,c,f,g,w);if(!(c&C)){var _e=K&&ot.call(o,"__wrapped__"),Se=ee&&ot.call(s,"__wrapped__");if(_e||Se){var Ve=_e?o.value():o,$e=Se?s.value():s;return w||(w=new yi),g(Ve,$e,c,f,w)}}return de?(w||(w=new yi),c3(o,s,c,f,g,w)):!1}function qA(o){return Vt(o)&&ln(o)==hi}function qf(o,s,c,f){var g=c.length,w=g,$=!f;if(o==null)return!w;for(o=gt(o);g--;){var P=c[g];if($&&P[2]?P[1]!==o[P[0]]:!(P[0]in o))return!1}for(;++g<w;){P=c[g];var D=P[0],G=o[D],K=P[1];if($&&P[2]){if(G===e&&!(D in o))return!1}else{var ee=new yi;if(f)var de=f(G,K,D,o,s,ee);if(!(de===e?gs(K,G,C|T,f,ee):de))return!1}}return!0}function k_(o){if(!kt(o)||v3(o))return!1;var s=ar(o)?qk:EM;return s.test(co(o))}function VA(o){return Vt(o)&&gn(o)==is}function jA(o){return Vt(o)&&ln(o)==gi}function RA(o){return Vt(o)&&Uu(o.length)&&!!Ct[gn(o)]}function A_(o){return typeof o=="function"?o:o==null?kn:typeof o=="object"?De(o)?F_(o[0],o[1]):N_(o):t1(o)}function Vf(o){if(!vs(o))return zk(o);var s=[];for(var c in gt(o))ot.call(o,c)&&c!="constructor"&&s.push(c);return s}function BA(o){if(!kt(o))return w3(o);var s=vs(o),c=[];for(var f in o)f=="constructor"&&(s||!ot.call(o,f))||c.push(f);return c}function jf(o,s){return o<s}function D_(o,s){var c=-1,f=On(o)?B(o.length):[];return Er(o,function(g,w,$){f[++c]=s(g,w,$)}),f}function N_(o){var s=ep(o);return s.length==1&&s[0][2]?hy(s[0][0],s[0][1]):function(c){return c===o||qf(c,o,s)}}function F_(o,s){return np(o)&&my(s)?hy(ji(o),s):function(c){var f=fp(c,o);return f===e&&f===s?pp(c,o):gs(s,f,C|T)}}function Tu(o,s,c,f,g){o!==s&&Af(s,function(w,$){if(g||(g=new yi),kt(w))LA(o,s,$,c,Tu,f,g);else{var P=f?f(rp(o,$),w,$+"",o,s,g):e;P===e&&(P=w),Mf(o,$,P)}},Mn)}function LA(o,s,c,f,g,w,$){var P=rp(o,c),D=rp(s,c),G=$.get(D);if(G){Mf(o,c,G);return}var K=w?w(P,D,c+"",o,s,$):e,ee=K===e;if(ee){var de=De(D),_e=!de&&Mr(D),Se=!de&&!_e&&ea(D);K=D,de||_e||Se?De(P)?K=P:Bt(P)?K=Pn(P):_e?(ee=!1,K=K_(D,!0)):Se?(ee=!1,K=J_(D,!0)):K=[]:Cs(D)||fo(D)?(K=P,fo(P)?K=Hy(P):(!kt(P)||ar(P))&&(K=py(D))):ee=!1}ee&&($.set(D,K),g(K,D,f,w,$),$.delete(D)),Mf(o,c,K)}function q_(o,s){var c=o.length;if(c)return s+=s<0?c:0,or(s,c)?o[s]:e}function V_(o,s,c){s.length?s=$t(s,function(w){return De(w)?function($){return lo($,w.length===1?w[0]:w)}:w}):s=[kn];var f=-1;s=$t(s,Ln(we()));var g=D_(o,function(w,$,P){var D=$t(s,function(G){return G(w)});return{criteria:D,index:++f,value:w}});return hk(g,function(w,$){return t3(w,$,c)})}function zA(o,s){return j_(o,s,function(c,f){return pp(o,f)})}function j_(o,s,c){for(var f=-1,g=s.length,w={};++f<g;){var $=s[f],P=lo(o,$);c(P,$)&&_s(w,Pr($,o),P)}return w}function UA(o){return function(s){return lo(s,o)}}function Rf(o,s,c,f){var g=f?mk:Uo,w=-1,$=s.length,P=o;for(o===s&&(s=Pn(s)),c&&(P=$t(o,Ln(c)));++w<$;)for(var D=0,G=s[w],K=c?c(G):G;(D=g(P,K,D,f))>-1;)P!==o&&yu.call(P,D,1),yu.call(o,D,1);return o}function R_(o,s){for(var c=o?s.length:0,f=c-1;c--;){var g=s[c];if(c==f||g!==w){var w=g;or(g)?yu.call(o,g,1):Uf(o,g)}}return o}function Bf(o,s){return o+Cu(b_()*(s-o+1))}function HA(o,s,c,f){for(var g=-1,w=Yt(bu((s-o)/(c||1)),0),$=B(w);w--;)$[f?w:++g]=o,o+=c;return $}function Lf(o,s){var c="";if(!o||s<1||s>ht)return c;do s%2&&(c+=o),s=Cu(s/2),s&&(o+=o);while(s);return c}function Be(o,s){return op(gy(o,s,kn),o+"")}function WA(o){return w_(ta(o))}function GA(o,s){var c=ta(o);return Vu(c,so(s,0,c.length))}function _s(o,s,c,f){if(!kt(o))return o;s=Pr(s,o);for(var g=-1,w=s.length,$=w-1,P=o;P!=null&&++g<w;){var D=ji(s[g]),G=c;if(D==="__proto__"||D==="constructor"||D==="prototype")return o;if(g!=$){var K=P[D];G=f?f(K,D,P):e,G===e&&(G=kt(K)?K:or(s[g+1])?[]:{})}ps(P,D,G),P=P[D]}return o}var B_=xu?function(o,s){return xu.set(o,s),o}:kn,KA=vu?function(o,s){return vu(o,"toString",{configurable:!0,enumerable:!1,value:hp(s),writable:!0})}:kn;function JA(o){return Vu(ta(o))}function ii(o,s,c){var f=-1,g=o.length;s<0&&(s=-s>g?0:g+s),c=c>g?g:c,c<0&&(c+=g),g=s>c?0:c-s>>>0,s>>>=0;for(var w=B(g);++f<g;)w[f]=o[f+s];return w}function YA(o,s){var c;return Er(o,function(f,g,w){return c=s(f,g,w),!c}),!!c}function Pu(o,s,c){var f=0,g=o==null?f:o.length;if(typeof s=="number"&&s===s&&g<=jo){for(;f<g;){var w=f+g>>>1,$=o[w];$!==null&&!Un($)&&(c?$<=s:$<s)?f=w+1:g=w}return g}return zf(o,s,kn,c)}function zf(o,s,c,f){var g=0,w=o==null?0:o.length;if(w===0)return 0;s=c(s);for(var $=s!==s,P=s===null,D=Un(s),G=s===e;g<w;){var K=Cu((g+w)/2),ee=c(o[K]),de=ee!==e,_e=ee===null,Se=ee===ee,Ve=Un(ee);if($)var $e=f||Se;else G?$e=Se&&(f||de):P?$e=Se&&de&&(f||!_e):D?$e=Se&&de&&!_e&&(f||!Ve):_e||Ve?$e=!1:$e=f?ee<=s:ee<s;$e?g=K+1:w=K}return sn(w,eu)}function L_(o,s){for(var c=-1,f=o.length,g=0,w=[];++c<f;){var $=o[c],P=s?s($):$;if(!c||!vi(P,D)){var D=P;w[g++]=$===0?0:$}}return w}function z_(o){return typeof o=="number"?o:Un(o)?hn:+o}function zn(o){if(typeof o=="string")return o;if(De(o))return $t(o,zn)+"";if(Un(o))return C_?C_.call(o):"";var s=o+"";return s=="0"&&1/o==-Kt?"-0":s}function Tr(o,s,c){var f=-1,g=lu,w=o.length,$=!0,P=[],D=P;if(c)$=!1,g=yf;else if(w>=t){var G=s?null:s3(o);if(G)return cu(G);$=!1,g=ss,D=new ao}else D=s?[]:P;e:for(;++f<w;){var K=o[f],ee=s?s(K):K;if(K=c||K!==0?K:0,$&&ee===ee){for(var de=D.length;de--;)if(D[de]===ee)continue e;s&&D.push(ee),P.push(K)}else g(D,ee,c)||(D!==P&&D.push(ee),P.push(K))}return P}function Uf(o,s){return s=Pr(s,o),o=_y(o,s),o==null||delete o[ji(ri(s))]}function U_(o,s,c,f){return _s(o,s,c(lo(o,s)),f)}function Ou(o,s,c,f){for(var g=o.length,w=f?g:-1;(f?w--:++w<g)&&s(o[w],w,o););return c?ii(o,f?0:w,f?w+1:g):ii(o,f?w+1:0,f?g:w)}function H_(o,s){var c=o;return c instanceof Ge&&(c=c.value()),vf(s,function(f,g){return g.func.apply(g.thisArg,wr([f],g.args))},c)}function Hf(o,s,c){var f=o.length;if(f<2)return f?Tr(o[0]):[];for(var g=-1,w=B(f);++g<f;)for(var $=o[g],P=-1;++P<f;)P!=g&&(w[g]=ms(w[g]||$,o[P],s,c));return Tr(tn(w,1),s,c)}function W_(o,s,c){for(var f=-1,g=o.length,w=s.length,$={};++f<g;){var P=f<w?s[f]:e;c($,o[f],P)}return $}function Wf(o){return Bt(o)?o:[]}function Gf(o){return typeof o=="function"?o:kn}function Pr(o,s){return De(o)?o:np(o,s)?[o]:Cy(it(o))}var XA=Be;function Or(o,s,c){var f=o.length;return c=c===e?f:c,!s&&c>=f?o:ii(o,s,c)}var G_=Vk||function(o){return Zt.clearTimeout(o)};function K_(o,s){if(s)return o.slice();var c=o.length,f=h_?h_(c):new o.constructor(c);return o.copy(f),f}function Kf(o){var s=new o.constructor(o.byteLength);return new gu(s).set(new gu(o)),s}function ZA(o,s){var c=s?Kf(o.buffer):o.buffer;return new o.constructor(c,o.byteOffset,o.byteLength)}function QA(o){var s=new o.constructor(o.source,M0.exec(o));return s.lastIndex=o.lastIndex,s}function e3(o){return fs?gt(fs.call(o)):{}}function J_(o,s){var c=s?Kf(o.buffer):o.buffer;return new o.constructor(c,o.byteOffset,o.length)}function Y_(o,s){if(o!==s){var c=o!==e,f=o===null,g=o===o,w=Un(o),$=s!==e,P=s===null,D=s===s,G=Un(s);if(!P&&!G&&!w&&o>s||w&&$&&D&&!P&&!G||f&&$&&D||!c&&D||!g)return 1;if(!f&&!w&&!G&&o<s||G&&c&&g&&!f&&!w||P&&c&&g||!$&&g||!D)return-1}return 0}function t3(o,s,c){for(var f=-1,g=o.criteria,w=s.criteria,$=g.length,P=c.length;++f<$;){var D=Y_(g[f],w[f]);if(D){if(f>=P)return D;var G=c[f];return D*(G=="desc"?-1:1)}}return o.index-s.index}function X_(o,s,c,f){for(var g=-1,w=o.length,$=c.length,P=-1,D=s.length,G=Yt(w-$,0),K=B(D+G),ee=!f;++P<D;)K[P]=s[P];for(;++g<$;)(ee||g<w)&&(K[c[g]]=o[g]);for(;G--;)K[P++]=o[g++];return K}function Z_(o,s,c,f){for(var g=-1,w=o.length,$=-1,P=c.length,D=-1,G=s.length,K=Yt(w-P,0),ee=B(K+G),de=!f;++g<K;)ee[g]=o[g];for(var _e=g;++D<G;)ee[_e+D]=s[D];for(;++$<P;)(de||g<w)&&(ee[_e+c[$]]=o[g++]);return ee}function Pn(o,s){var c=-1,f=o.length;for(s||(s=B(f));++c<f;)s[c]=o[c];return s}function Vi(o,s,c,f){var g=!c;c||(c={});for(var w=-1,$=s.length;++w<$;){var P=s[w],D=f?f(c[P],o[P],P,c,o):e;D===e&&(D=o[P]),g?nr(c,P,D):ps(c,P,D)}return c}function n3(o,s){return Vi(o,tp(o),s)}function i3(o,s){return Vi(o,dy(o),s)}function Mu(o,s){return function(c,f){var g=De(c)?lk:SA,w=s?s():{};return g(c,o,we(f,2),w)}}function Xo(o){return Be(function(s,c){var f=-1,g=c.length,w=g>1?c[g-1]:e,$=g>2?c[2]:e;for(w=o.length>3&&typeof w=="function"?(g--,w):e,$&&_n(c[0],c[1],$)&&(w=g<3?e:w,g=1),s=gt(s);++f<g;){var P=c[f];P&&o(s,P,f,w)}return s})}function Q_(o,s){return function(c,f){if(c==null)return c;if(!On(c))return o(c,f);for(var g=c.length,w=s?g:-1,$=gt(c);(s?w--:++w<g)&&f($[w],w,$)!==!1;);return c}}function ey(o){return function(s,c,f){for(var g=-1,w=gt(s),$=f(s),P=$.length;P--;){var D=$[o?P:++g];if(c(w[D],D,w)===!1)break}return s}}function r3(o,s,c){var f=s&x,g=ys(o);function w(){var $=this&&this!==Zt&&this instanceof w?g:o;return $.apply(f?c:this,arguments)}return w}function ty(o){return function(s){s=it(s);var c=Ho(s)?_i(s):e,f=c?c[0]:s.charAt(0),g=c?Or(c,1).join(""):s.slice(1);return f[o]()+g}}function Zo(o){return function(s){return vf(Qy(Zy(s).replace(KM,"")),o,"")}}function ys(o){return function(){var s=arguments;switch(s.length){case 0:return new o;case 1:return new o(s[0]);case 2:return new o(s[0],s[1]);case 3:return new o(s[0],s[1],s[2]);case 4:return new o(s[0],s[1],s[2],s[3]);case 5:return new o(s[0],s[1],s[2],s[3],s[4]);case 6:return new o(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new o(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var c=Yo(o.prototype),f=o.apply(c,s);return kt(f)?f:c}}function o3(o,s,c){var f=ys(o);function g(){for(var w=arguments.length,$=B(w),P=w,D=Qo(g);P--;)$[P]=arguments[P];var G=w<3&&$[0]!==D&&$[w-1]!==D?[]:Ir($,D);if(w-=G.length,w<c)return ay(o,s,ku,g.placeholder,e,$,G,e,e,c-w);var K=this&&this!==Zt&&this instanceof g?f:o;return Bn(K,this,$)}return g}function ny(o){return function(s,c,f){var g=gt(s);if(!On(s)){var w=we(c,3);s=Qt(s),c=function(P){return w(g[P],P,g)}}var $=o(s,c,f);return $>-1?g[w?s[$]:$]:e}}function iy(o){return rr(function(s){var c=s.length,f=c,g=ti.prototype.thru;for(o&&s.reverse();f--;){var w=s[f];if(typeof w!="function")throw new ei(r);if(g&&!$&&Fu(w)=="wrapper")var $=new ti([],!0)}for(f=$?f:c;++f<c;){w=s[f];var P=Fu(w),D=P=="wrapper"?Qf(w):e;D&&ip(D[0])&&D[1]==(J|z|re|oe)&&!D[4].length&&D[9]==1?$=$[Fu(D[0])].apply($,D[3]):$=w.length==1&&ip(w)?$[P]():$.thru(w)}return function(){var G=arguments,K=G[0];if($&&G.length==1&&De(K))return $.plant(K).value();for(var ee=0,de=c?s[ee].apply(this,G):K;++ee<c;)de=s[ee].call(this,de);return de}})}function ku(o,s,c,f,g,w,$,P,D,G){var K=s&J,ee=s&x,de=s&O,_e=s&(z|ne),Se=s&ae,Ve=de?e:ys(o);function $e(){for(var He=arguments.length,Ye=B(He),Hn=He;Hn--;)Ye[Hn]=arguments[Hn];if(_e)var yn=Qo($e),Wn=_k(Ye,yn);if(f&&(Ye=X_(Ye,f,g,_e)),w&&(Ye=Z_(Ye,w,$,_e)),He-=Wn,_e&&He<G){var Lt=Ir(Ye,yn);return ay(o,s,ku,$e.placeholder,c,Ye,Lt,P,D,G-He)}var bi=ee?c:this,lr=de?bi[o]:o;return He=Ye.length,P?Ye=S3(Ye,P):Se&&He>1&&Ye.reverse(),K&&D<He&&(Ye.length=D),this&&this!==Zt&&this instanceof $e&&(lr=Ve||ys(lr)),lr.apply(bi,Ye)}return $e}function ry(o,s){return function(c,f){return AA(c,o,s(f),{})}}function Au(o,s){return function(c,f){var g;if(c===e&&f===e)return s;if(c!==e&&(g=c),f!==e){if(g===e)return f;typeof c=="string"||typeof f=="string"?(c=zn(c),f=zn(f)):(c=z_(c),f=z_(f)),g=o(c,f)}return g}}function Jf(o){return rr(function(s){return s=$t(s,Ln(we())),Be(function(c){var f=this;return o(s,function(g){return Bn(g,f,c)})})})}function Du(o,s){s=s===e?" ":zn(s);var c=s.length;if(c<2)return c?Lf(s,o):s;var f=Lf(s,bu(o/Wo(s)));return Ho(s)?Or(_i(f),0,o).join(""):f.slice(0,o)}function a3(o,s,c,f){var g=s&x,w=ys(o);function $(){for(var P=-1,D=arguments.length,G=-1,K=f.length,ee=B(K+D),de=this&&this!==Zt&&this instanceof $?w:o;++G<K;)ee[G]=f[G];for(;D--;)ee[G++]=arguments[++P];return Bn(de,g?c:this,ee)}return $}function oy(o){return function(s,c,f){return f&&typeof f!="number"&&_n(s,c,f)&&(c=f=e),s=sr(s),c===e?(c=s,s=0):c=sr(c),f=f===e?s<c?1:-1:sr(f),HA(s,c,f,o)}}function Nu(o){return function(s,c){return typeof s=="string"&&typeof c=="string"||(s=oi(s),c=oi(c)),o(s,c)}}function ay(o,s,c,f,g,w,$,P,D,G){var K=s&z,ee=K?$:e,de=K?e:$,_e=K?w:e,Se=K?e:w;s|=K?re:Q,s&=~(K?Q:re),s&F||(s&=~(x|O));var Ve=[o,s,g,_e,ee,Se,de,P,D,G],$e=c.apply(e,Ve);return ip(o)&&yy($e,Ve),$e.placeholder=f,vy($e,o,s)}function Yf(o){var s=Jt[o];return function(c,f){if(c=oi(c),f=f==null?0:sn(Fe(f),292),f&&v_(c)){var g=(it(c)+"e").split("e"),w=s(g[0]+"e"+(+g[1]+f));return g=(it(w)+"e").split("e"),+(g[0]+"e"+(+g[1]-f))}return s(c)}}var s3=Ko&&1/cu(new Ko([,-0]))[1]==Kt?function(o){return new Ko(o)}:yp;function sy(o){return function(s){var c=ln(s);return c==hi?$f(s):c==gi?Ik(s):gk(s,o(s))}}function ir(o,s,c,f,g,w,$,P){var D=s&O;if(!D&&typeof o!="function")throw new ei(r);var G=f?f.length:0;if(G||(s&=~(re|Q),f=g=e),$=$===e?$:Yt(Fe($),0),P=P===e?P:Fe(P),G-=g?g.length:0,s&Q){var K=f,ee=g;f=g=e}var de=D?e:Qf(o),_e=[o,s,c,f,g,K,ee,w,$,P];if(de&&x3(_e,de),o=_e[0],s=_e[1],c=_e[2],f=_e[3],g=_e[4],P=_e[9]=_e[9]===e?D?0:o.length:Yt(_e[9]-G,0),!P&&s&(z|ne)&&(s&=~(z|ne)),!s||s==x)var Se=r3(o,s,c);else s==z||s==ne?Se=o3(o,s,P):(s==re||s==(x|re))&&!g.length?Se=a3(o,s,c,f):Se=ku.apply(e,_e);var Ve=de?B_:yy;return vy(Ve(Se,_e),o,s)}function ly(o,s,c,f){return o===e||vi(o,Go[c])&&!ot.call(f,c)?s:o}function uy(o,s,c,f,g,w){return kt(o)&&kt(s)&&(w.set(s,o),Tu(o,s,e,uy,w),w.delete(s)),o}function l3(o){return Cs(o)?e:o}function cy(o,s,c,f,g,w){var $=c&C,P=o.length,D=s.length;if(P!=D&&!($&&D>P))return!1;var G=w.get(o),K=w.get(s);if(G&&K)return G==s&&K==o;var ee=-1,de=!0,_e=c&T?new ao:e;for(w.set(o,s),w.set(s,o);++ee<P;){var Se=o[ee],Ve=s[ee];if(f)var $e=$?f(Ve,Se,ee,s,o,w):f(Se,Ve,ee,o,s,w);if($e!==e){if($e)continue;de=!1;break}if(_e){if(!bf(s,function(He,Ye){if(!ss(_e,Ye)&&(Se===He||g(Se,He,c,f,w)))return _e.push(Ye)})){de=!1;break}}else if(!(Se===Ve||g(Se,Ve,c,f,w))){de=!1;break}}return w.delete(o),w.delete(s),de}function u3(o,s,c,f,g,w,$){switch(c){case Lo:if(o.byteLength!=s.byteLength||o.byteOffset!=s.byteOffset)return!1;o=o.buffer,s=s.buffer;case as:return!(o.byteLength!=s.byteLength||!w(new gu(o),new gu(s)));case es:case ts:case ns:return vi(+o,+s);case nu:return o.name==s.name&&o.message==s.message;case is:case rs:return o==s+"";case hi:var P=$f;case gi:var D=f&C;if(P||(P=cu),o.size!=s.size&&!D)return!1;var G=$.get(o);if(G)return G==s;f|=T,$.set(o,s);var K=cy(P(o),P(s),f,g,w,$);return $.delete(o),K;case ru:if(fs)return fs.call(o)==fs.call(s)}return!1}function c3(o,s,c,f,g,w){var $=c&C,P=Xf(o),D=P.length,G=Xf(s),K=G.length;if(D!=K&&!$)return!1;for(var ee=D;ee--;){var de=P[ee];if(!($?de in s:ot.call(s,de)))return!1}var _e=w.get(o),Se=w.get(s);if(_e&&Se)return _e==s&&Se==o;var Ve=!0;w.set(o,s),w.set(s,o);for(var $e=$;++ee<D;){de=P[ee];var He=o[de],Ye=s[de];if(f)var Hn=$?f(Ye,He,de,s,o,w):f(He,Ye,de,o,s,w);if(!(Hn===e?He===Ye||g(He,Ye,c,f,w):Hn)){Ve=!1;break}$e||($e=de=="constructor")}if(Ve&&!$e){var yn=o.constructor,Wn=s.constructor;yn!=Wn&&"constructor"in o&&"constructor"in s&&!(typeof yn=="function"&&yn instanceof yn&&typeof Wn=="function"&&Wn instanceof Wn)&&(Ve=!1)}return w.delete(o),w.delete(s),Ve}function rr(o){return op(gy(o,e,Sy),o+"")}function Xf(o){return O_(o,Qt,tp)}function Zf(o){return O_(o,Mn,dy)}var Qf=xu?function(o){return xu.get(o)}:yp;function Fu(o){for(var s=o.name+"",c=Jo[s],f=ot.call(Jo,s)?c.length:0;f--;){var g=c[f],w=g.func;if(w==null||w==o)return g.name}return s}function Qo(o){var s=ot.call(b,"placeholder")?b:o;return s.placeholder}function we(){var o=b.iteratee||gp;return o=o===gp?A_:o,arguments.length?o(arguments[0],arguments[1]):o}function qu(o,s){var c=o.__data__;return y3(s)?c[typeof s=="string"?"string":"hash"]:c.map}function ep(o){for(var s=Qt(o),c=s.length;c--;){var f=s[c],g=o[f];s[c]=[f,g,my(g)]}return s}function uo(o,s){var c=Ck(o,s);return k_(c)?c:e}function d3(o){var s=ot.call(o,ro),c=o[ro];try{o[ro]=e;var f=!0}catch{}var g=mu.call(o);return f&&(s?o[ro]=c:delete o[ro]),g}var tp=Tf?function(o){return o==null?[]:(o=gt(o),xr(Tf(o),function(s){return __.call(o,s)}))}:vp,dy=Tf?function(o){for(var s=[];o;)wr(s,tp(o)),o=_u(o);return s}:vp,ln=gn;(Pf&&ln(new Pf(new ArrayBuffer(1)))!=Lo||us&&ln(new us)!=hi||Of&&ln(Of.resolve())!=E0||Ko&&ln(new Ko)!=gi||cs&&ln(new cs)!=os)&&(ln=function(o){var s=gn(o),c=s==Qi?o.constructor:e,f=c?co(c):"";if(f)switch(f){case Gk:return Lo;case Kk:return hi;case Jk:return E0;case Yk:return gi;case Xk:return os}return s});function f3(o,s,c){for(var f=-1,g=c.length;++f<g;){var w=c[f],$=w.size;switch(w.type){case"drop":o+=$;break;case"dropRight":s-=$;break;case"take":s=sn(s,o+$);break;case"takeRight":o=Yt(o,s-$);break}}return{start:o,end:s}}function p3(o){var s=o.match(vM);return s?s[1].split(bM):[]}function fy(o,s,c){s=Pr(s,o);for(var f=-1,g=s.length,w=!1;++f<g;){var $=ji(s[f]);if(!(w=o!=null&&c(o,$)))break;o=o[$]}return w||++f!=g?w:(g=o==null?0:o.length,!!g&&Uu(g)&&or($,g)&&(De(o)||fo(o)))}function m3(o){var s=o.length,c=new o.constructor(s);return s&&typeof o[0]=="string"&&ot.call(o,"index")&&(c.index=o.index,c.input=o.input),c}function py(o){return typeof o.constructor=="function"&&!vs(o)?Yo(_u(o)):{}}function h3(o,s,c){var f=o.constructor;switch(s){case as:return Kf(o);case es:case ts:return new f(+o);case Lo:return ZA(o,c);case Qd:case ef:case tf:case nf:case rf:case of:case af:case sf:case lf:return J_(o,c);case hi:return new f;case ns:case rs:return new f(o);case is:return QA(o);case gi:return new f;case ru:return e3(o)}}function g3(o,s){var c=s.length;if(!c)return o;var f=c-1;return s[f]=(c>1?"& ":"")+s[f],s=s.join(c>2?", ":" "),o.replace(yM,`{
9
- /* [wrapped with `+s+`] */
10
- `)}function _3(o){return De(o)||fo(o)||!!(y_&&o&&o[y_])}function or(o,s){var c=typeof o;return s=s??ht,!!s&&(c=="number"||c!="symbol"&&PM.test(o))&&o>-1&&o%1==0&&o<s}function _n(o,s,c){if(!kt(c))return!1;var f=typeof s;return(f=="number"?On(c)&&or(s,c.length):f=="string"&&s in c)?vi(c[s],o):!1}function np(o,s){if(De(o))return!1;var c=typeof o;return c=="number"||c=="symbol"||c=="boolean"||o==null||Un(o)?!0:mM.test(o)||!pM.test(o)||s!=null&&o in gt(s)}function y3(o){var s=typeof o;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?o!=="__proto__":o===null}function ip(o){var s=Fu(o),c=b[s];if(typeof c!="function"||!(s in Ge.prototype))return!1;if(o===c)return!0;var f=Qf(c);return!!f&&o===f[0]}function v3(o){return!!m_&&m_ in o}var b3=fu?ar:bp;function vs(o){var s=o&&o.constructor,c=typeof s=="function"&&s.prototype||Go;return o===c}function my(o){return o===o&&!kt(o)}function hy(o,s){return function(c){return c==null?!1:c[o]===s&&(s!==e||o in gt(c))}}function C3(o){var s=Lu(o,function(f){return c.size===u&&c.clear(),f}),c=s.cache;return s}function x3(o,s){var c=o[1],f=s[1],g=c|f,w=g<(x|O|J),$=f==J&&c==z||f==J&&c==oe&&o[7].length<=s[8]||f==(J|oe)&&s[7].length<=s[8]&&c==z;if(!(w||$))return o;f&x&&(o[2]=s[2],g|=c&x?0:F);var P=s[3];if(P){var D=o[3];o[3]=D?X_(D,P,s[4]):P,o[4]=D?Ir(o[3],d):s[4]}return P=s[5],P&&(D=o[5],o[5]=D?Z_(D,P,s[6]):P,o[6]=D?Ir(o[5],d):s[6]),P=s[7],P&&(o[7]=P),f&J&&(o[8]=o[8]==null?s[8]:sn(o[8],s[8])),o[9]==null&&(o[9]=s[9]),o[0]=s[0],o[1]=g,o}function w3(o){var s=[];if(o!=null)for(var c in gt(o))s.push(c);return s}function I3(o){return mu.call(o)}function gy(o,s,c){return s=Yt(s===e?o.length-1:s,0),function(){for(var f=arguments,g=-1,w=Yt(f.length-s,0),$=B(w);++g<w;)$[g]=f[s+g];g=-1;for(var P=B(s+1);++g<s;)P[g]=f[g];return P[s]=c($),Bn(o,this,P)}}function _y(o,s){return s.length<2?o:lo(o,ii(s,0,-1))}function S3(o,s){for(var c=o.length,f=sn(s.length,c),g=Pn(o);f--;){var w=s[f];o[f]=or(w,c)?g[w]:e}return o}function rp(o,s){if(!(s==="constructor"&&typeof o[s]=="function")&&s!="__proto__")return o[s]}var yy=by(B_),bs=Rk||function(o,s){return Zt.setTimeout(o,s)},op=by(KA);function vy(o,s,c){var f=s+"";return op(o,g3(f,$3(p3(f),c)))}function by(o){var s=0,c=0;return function(){var f=Uk(),g=Ue-(f-c);if(c=f,g>0){if(++s>=Ne)return arguments[0]}else s=0;return o.apply(e,arguments)}}function Vu(o,s){var c=-1,f=o.length,g=f-1;for(s=s===e?f:s;++c<s;){var w=Bf(c,g),$=o[w];o[w]=o[c],o[c]=$}return o.length=s,o}var Cy=C3(function(o){var s=[];return o.charCodeAt(0)===46&&s.push(""),o.replace(hM,function(c,f,g,w){s.push(g?w.replace(wM,"$1"):f||c)}),s});function ji(o){if(typeof o=="string"||Un(o))return o;var s=o+"";return s=="0"&&1/o==-Kt?"-0":s}function co(o){if(o!=null){try{return pu.call(o)}catch{}try{return o+""}catch{}}return""}function $3(o,s){return Qn(Ro,function(c){var f="_."+c[0];s&c[1]&&!lu(o,f)&&o.push(f)}),o.sort()}function xy(o){if(o instanceof Ge)return o.clone();var s=new ti(o.__wrapped__,o.__chain__);return s.__actions__=Pn(o.__actions__),s.__index__=o.__index__,s.__values__=o.__values__,s}function E3(o,s,c){(c?_n(o,s,c):s===e)?s=1:s=Yt(Fe(s),0);var f=o==null?0:o.length;if(!f||s<1)return[];for(var g=0,w=0,$=B(bu(f/s));g<f;)$[w++]=ii(o,g,g+=s);return $}function T3(o){for(var s=-1,c=o==null?0:o.length,f=0,g=[];++s<c;){var w=o[s];w&&(g[f++]=w)}return g}function P3(){var o=arguments.length;if(!o)return[];for(var s=B(o-1),c=arguments[0],f=o;f--;)s[f-1]=arguments[f];return wr(De(c)?Pn(c):[c],tn(s,1))}var O3=Be(function(o,s){return Bt(o)?ms(o,tn(s,1,Bt,!0)):[]}),M3=Be(function(o,s){var c=ri(s);return Bt(c)&&(c=e),Bt(o)?ms(o,tn(s,1,Bt,!0),we(c,2)):[]}),k3=Be(function(o,s){var c=ri(s);return Bt(c)&&(c=e),Bt(o)?ms(o,tn(s,1,Bt,!0),e,c):[]});function A3(o,s,c){var f=o==null?0:o.length;return f?(s=c||s===e?1:Fe(s),ii(o,s<0?0:s,f)):[]}function D3(o,s,c){var f=o==null?0:o.length;return f?(s=c||s===e?1:Fe(s),s=f-s,ii(o,0,s<0?0:s)):[]}function N3(o,s){return o&&o.length?Ou(o,we(s,3),!0,!0):[]}function F3(o,s){return o&&o.length?Ou(o,we(s,3),!0):[]}function q3(o,s,c,f){var g=o==null?0:o.length;return g?(c&&typeof c!="number"&&_n(o,s,c)&&(c=0,f=g),PA(o,s,c,f)):[]}function wy(o,s,c){var f=o==null?0:o.length;if(!f)return-1;var g=c==null?0:Fe(c);return g<0&&(g=Yt(f+g,0)),uu(o,we(s,3),g)}function Iy(o,s,c){var f=o==null?0:o.length;if(!f)return-1;var g=f-1;return c!==e&&(g=Fe(c),g=c<0?Yt(f+g,0):sn(g,f-1)),uu(o,we(s,3),g,!0)}function Sy(o){var s=o==null?0:o.length;return s?tn(o,1):[]}function V3(o){var s=o==null?0:o.length;return s?tn(o,Kt):[]}function j3(o,s){var c=o==null?0:o.length;return c?(s=s===e?1:Fe(s),tn(o,s)):[]}function R3(o){for(var s=-1,c=o==null?0:o.length,f={};++s<c;){var g=o[s];f[g[0]]=g[1]}return f}function $y(o){return o&&o.length?o[0]:e}function B3(o,s,c){var f=o==null?0:o.length;if(!f)return-1;var g=c==null?0:Fe(c);return g<0&&(g=Yt(f+g,0)),Uo(o,s,g)}function L3(o){var s=o==null?0:o.length;return s?ii(o,0,-1):[]}var z3=Be(function(o){var s=$t(o,Wf);return s.length&&s[0]===o[0]?Ff(s):[]}),U3=Be(function(o){var s=ri(o),c=$t(o,Wf);return s===ri(c)?s=e:c.pop(),c.length&&c[0]===o[0]?Ff(c,we(s,2)):[]}),H3=Be(function(o){var s=ri(o),c=$t(o,Wf);return s=typeof s=="function"?s:e,s&&c.pop(),c.length&&c[0]===o[0]?Ff(c,e,s):[]});function W3(o,s){return o==null?"":Lk.call(o,s)}function ri(o){var s=o==null?0:o.length;return s?o[s-1]:e}function G3(o,s,c){var f=o==null?0:o.length;if(!f)return-1;var g=f;return c!==e&&(g=Fe(c),g=g<0?Yt(f+g,0):sn(g,f-1)),s===s?$k(o,s,g):uu(o,a_,g,!0)}function K3(o,s){return o&&o.length?q_(o,Fe(s)):e}var J3=Be(Ey);function Ey(o,s){return o&&o.length&&s&&s.length?Rf(o,s):o}function Y3(o,s,c){return o&&o.length&&s&&s.length?Rf(o,s,we(c,2)):o}function X3(o,s,c){return o&&o.length&&s&&s.length?Rf(o,s,e,c):o}var Z3=rr(function(o,s){var c=o==null?0:o.length,f=kf(o,s);return R_(o,$t(s,function(g){return or(g,c)?+g:g}).sort(Y_)),f});function Q3(o,s){var c=[];if(!(o&&o.length))return c;var f=-1,g=[],w=o.length;for(s=we(s,3);++f<w;){var $=o[f];s($,f,o)&&(c.push($),g.push(f))}return R_(o,g),c}function ap(o){return o==null?o:Wk.call(o)}function eD(o,s,c){var f=o==null?0:o.length;return f?(c&&typeof c!="number"&&_n(o,s,c)?(s=0,c=f):(s=s==null?0:Fe(s),c=c===e?f:Fe(c)),ii(o,s,c)):[]}function tD(o,s){return Pu(o,s)}function nD(o,s,c){return zf(o,s,we(c,2))}function iD(o,s){var c=o==null?0:o.length;if(c){var f=Pu(o,s);if(f<c&&vi(o[f],s))return f}return-1}function rD(o,s){return Pu(o,s,!0)}function oD(o,s,c){return zf(o,s,we(c,2),!0)}function aD(o,s){var c=o==null?0:o.length;if(c){var f=Pu(o,s,!0)-1;if(vi(o[f],s))return f}return-1}function sD(o){return o&&o.length?L_(o):[]}function lD(o,s){return o&&o.length?L_(o,we(s,2)):[]}function uD(o){var s=o==null?0:o.length;return s?ii(o,1,s):[]}function cD(o,s,c){return o&&o.length?(s=c||s===e?1:Fe(s),ii(o,0,s<0?0:s)):[]}function dD(o,s,c){var f=o==null?0:o.length;return f?(s=c||s===e?1:Fe(s),s=f-s,ii(o,s<0?0:s,f)):[]}function fD(o,s){return o&&o.length?Ou(o,we(s,3),!1,!0):[]}function pD(o,s){return o&&o.length?Ou(o,we(s,3)):[]}var mD=Be(function(o){return Tr(tn(o,1,Bt,!0))}),hD=Be(function(o){var s=ri(o);return Bt(s)&&(s=e),Tr(tn(o,1,Bt,!0),we(s,2))}),gD=Be(function(o){var s=ri(o);return s=typeof s=="function"?s:e,Tr(tn(o,1,Bt,!0),e,s)});function _D(o){return o&&o.length?Tr(o):[]}function yD(o,s){return o&&o.length?Tr(o,we(s,2)):[]}function vD(o,s){return s=typeof s=="function"?s:e,o&&o.length?Tr(o,e,s):[]}function sp(o){if(!(o&&o.length))return[];var s=0;return o=xr(o,function(c){if(Bt(c))return s=Yt(c.length,s),!0}),If(s,function(c){return $t(o,Cf(c))})}function Ty(o,s){if(!(o&&o.length))return[];var c=sp(o);return s==null?c:$t(c,function(f){return Bn(s,e,f)})}var bD=Be(function(o,s){return Bt(o)?ms(o,s):[]}),CD=Be(function(o){return Hf(xr(o,Bt))}),xD=Be(function(o){var s=ri(o);return Bt(s)&&(s=e),Hf(xr(o,Bt),we(s,2))}),wD=Be(function(o){var s=ri(o);return s=typeof s=="function"?s:e,Hf(xr(o,Bt),e,s)}),ID=Be(sp);function SD(o,s){return W_(o||[],s||[],ps)}function $D(o,s){return W_(o||[],s||[],_s)}var ED=Be(function(o){var s=o.length,c=s>1?o[s-1]:e;return c=typeof c=="function"?(o.pop(),c):e,Ty(o,c)});function Py(o){var s=b(o);return s.__chain__=!0,s}function TD(o,s){return s(o),o}function ju(o,s){return s(o)}var PD=rr(function(o){var s=o.length,c=s?o[0]:0,f=this.__wrapped__,g=function(w){return kf(w,o)};return s>1||this.__actions__.length||!(f instanceof Ge)||!or(c)?this.thru(g):(f=f.slice(c,+c+(s?1:0)),f.__actions__.push({func:ju,args:[g],thisArg:e}),new ti(f,this.__chain__).thru(function(w){return s&&!w.length&&w.push(e),w}))});function OD(){return Py(this)}function MD(){return new ti(this.value(),this.__chain__)}function kD(){this.__values__===e&&(this.__values__=zy(this.value()));var o=this.__index__>=this.__values__.length,s=o?e:this.__values__[this.__index__++];return{done:o,value:s}}function AD(){return this}function DD(o){for(var s,c=this;c instanceof Iu;){var f=xy(c);f.__index__=0,f.__values__=e,s?g.__wrapped__=f:s=f;var g=f;c=c.__wrapped__}return g.__wrapped__=o,s}function ND(){var o=this.__wrapped__;if(o instanceof Ge){var s=o;return this.__actions__.length&&(s=new Ge(this)),s=s.reverse(),s.__actions__.push({func:ju,args:[ap],thisArg:e}),new ti(s,this.__chain__)}return this.thru(ap)}function FD(){return H_(this.__wrapped__,this.__actions__)}var qD=Mu(function(o,s,c){ot.call(o,c)?++o[c]:nr(o,c,1)});function VD(o,s,c){var f=De(o)?r_:TA;return c&&_n(o,s,c)&&(s=e),f(o,we(s,3))}function jD(o,s){var c=De(o)?xr:T_;return c(o,we(s,3))}var RD=ny(wy),BD=ny(Iy);function LD(o,s){return tn(Ru(o,s),1)}function zD(o,s){return tn(Ru(o,s),Kt)}function UD(o,s,c){return c=c===e?1:Fe(c),tn(Ru(o,s),c)}function Oy(o,s){var c=De(o)?Qn:Er;return c(o,we(s,3))}function My(o,s){var c=De(o)?uk:E_;return c(o,we(s,3))}var HD=Mu(function(o,s,c){ot.call(o,c)?o[c].push(s):nr(o,c,[s])});function WD(o,s,c,f){o=On(o)?o:ta(o),c=c&&!f?Fe(c):0;var g=o.length;return c<0&&(c=Yt(g+c,0)),Hu(o)?c<=g&&o.indexOf(s,c)>-1:!!g&&Uo(o,s,c)>-1}var GD=Be(function(o,s,c){var f=-1,g=typeof s=="function",w=On(o)?B(o.length):[];return Er(o,function($){w[++f]=g?Bn(s,$,c):hs($,s,c)}),w}),KD=Mu(function(o,s,c){nr(o,c,s)});function Ru(o,s){var c=De(o)?$t:D_;return c(o,we(s,3))}function JD(o,s,c,f){return o==null?[]:(De(s)||(s=s==null?[]:[s]),c=f?e:c,De(c)||(c=c==null?[]:[c]),V_(o,s,c))}var YD=Mu(function(o,s,c){o[c?0:1].push(s)},function(){return[[],[]]});function XD(o,s,c){var f=De(o)?vf:l_,g=arguments.length<3;return f(o,we(s,4),c,g,Er)}function ZD(o,s,c){var f=De(o)?ck:l_,g=arguments.length<3;return f(o,we(s,4),c,g,E_)}function QD(o,s){var c=De(o)?xr:T_;return c(o,zu(we(s,3)))}function eN(o){var s=De(o)?w_:WA;return s(o)}function tN(o,s,c){(c?_n(o,s,c):s===e)?s=1:s=Fe(s);var f=De(o)?wA:GA;return f(o,s)}function nN(o){var s=De(o)?IA:JA;return s(o)}function iN(o){if(o==null)return 0;if(On(o))return Hu(o)?Wo(o):o.length;var s=ln(o);return s==hi||s==gi?o.size:Vf(o).length}function rN(o,s,c){var f=De(o)?bf:YA;return c&&_n(o,s,c)&&(s=e),f(o,we(s,3))}var oN=Be(function(o,s){if(o==null)return[];var c=s.length;return c>1&&_n(o,s[0],s[1])?s=[]:c>2&&_n(s[0],s[1],s[2])&&(s=[s[0]]),V_(o,tn(s,1),[])}),Bu=jk||function(){return Zt.Date.now()};function aN(o,s){if(typeof s!="function")throw new ei(r);return o=Fe(o),function(){if(--o<1)return s.apply(this,arguments)}}function ky(o,s,c){return s=c?e:s,s=o&&s==null?o.length:s,ir(o,J,e,e,e,e,s)}function Ay(o,s){var c;if(typeof s!="function")throw new ei(r);return o=Fe(o),function(){return--o>0&&(c=s.apply(this,arguments)),o<=1&&(s=e),c}}var lp=Be(function(o,s,c){var f=x;if(c.length){var g=Ir(c,Qo(lp));f|=re}return ir(o,f,s,c,g)}),Dy=Be(function(o,s,c){var f=x|O;if(c.length){var g=Ir(c,Qo(Dy));f|=re}return ir(s,f,o,c,g)});function Ny(o,s,c){s=c?e:s;var f=ir(o,z,e,e,e,e,e,s);return f.placeholder=Ny.placeholder,f}function Fy(o,s,c){s=c?e:s;var f=ir(o,ne,e,e,e,e,e,s);return f.placeholder=Fy.placeholder,f}function qy(o,s,c){var f,g,w,$,P,D,G=0,K=!1,ee=!1,de=!0;if(typeof o!="function")throw new ei(r);s=oi(s)||0,kt(c)&&(K=!!c.leading,ee="maxWait"in c,w=ee?Yt(oi(c.maxWait)||0,s):w,de="trailing"in c?!!c.trailing:de);function _e(Lt){var bi=f,lr=g;return f=g=e,G=Lt,$=o.apply(lr,bi),$}function Se(Lt){return G=Lt,P=bs(He,s),K?_e(Lt):$}function Ve(Lt){var bi=Lt-D,lr=Lt-G,n1=s-bi;return ee?sn(n1,w-lr):n1}function $e(Lt){var bi=Lt-D,lr=Lt-G;return D===e||bi>=s||bi<0||ee&&lr>=w}function He(){var Lt=Bu();if($e(Lt))return Ye(Lt);P=bs(He,Ve(Lt))}function Ye(Lt){return P=e,de&&f?_e(Lt):(f=g=e,$)}function Hn(){P!==e&&G_(P),G=0,f=D=g=P=e}function yn(){return P===e?$:Ye(Bu())}function Wn(){var Lt=Bu(),bi=$e(Lt);if(f=arguments,g=this,D=Lt,bi){if(P===e)return Se(D);if(ee)return G_(P),P=bs(He,s),_e(D)}return P===e&&(P=bs(He,s)),$}return Wn.cancel=Hn,Wn.flush=yn,Wn}var sN=Be(function(o,s){return $_(o,1,s)}),lN=Be(function(o,s,c){return $_(o,oi(s)||0,c)});function uN(o){return ir(o,ae)}function Lu(o,s){if(typeof o!="function"||s!=null&&typeof s!="function")throw new ei(r);var c=function(){var f=arguments,g=s?s.apply(this,f):f[0],w=c.cache;if(w.has(g))return w.get(g);var $=o.apply(this,f);return c.cache=w.set(g,$)||w,$};return c.cache=new(Lu.Cache||tr),c}Lu.Cache=tr;function zu(o){if(typeof o!="function")throw new ei(r);return function(){var s=arguments;switch(s.length){case 0:return!o.call(this);case 1:return!o.call(this,s[0]);case 2:return!o.call(this,s[0],s[1]);case 3:return!o.call(this,s[0],s[1],s[2])}return!o.apply(this,s)}}function cN(o){return Ay(2,o)}var dN=XA(function(o,s){s=s.length==1&&De(s[0])?$t(s[0],Ln(we())):$t(tn(s,1),Ln(we()));var c=s.length;return Be(function(f){for(var g=-1,w=sn(f.length,c);++g<w;)f[g]=s[g].call(this,f[g]);return Bn(o,this,f)})}),up=Be(function(o,s){var c=Ir(s,Qo(up));return ir(o,re,e,s,c)}),Vy=Be(function(o,s){var c=Ir(s,Qo(Vy));return ir(o,Q,e,s,c)}),fN=rr(function(o,s){return ir(o,oe,e,e,e,s)});function pN(o,s){if(typeof o!="function")throw new ei(r);return s=s===e?s:Fe(s),Be(o,s)}function mN(o,s){if(typeof o!="function")throw new ei(r);return s=s==null?0:Yt(Fe(s),0),Be(function(c){var f=c[s],g=Or(c,0,s);return f&&wr(g,f),Bn(o,this,g)})}function hN(o,s,c){var f=!0,g=!0;if(typeof o!="function")throw new ei(r);return kt(c)&&(f="leading"in c?!!c.leading:f,g="trailing"in c?!!c.trailing:g),qy(o,s,{leading:f,maxWait:s,trailing:g})}function gN(o){return ky(o,1)}function _N(o,s){return up(Gf(s),o)}function yN(){if(!arguments.length)return[];var o=arguments[0];return De(o)?o:[o]}function vN(o){return ni(o,_)}function bN(o,s){return s=typeof s=="function"?s:e,ni(o,_,s)}function CN(o){return ni(o,p|_)}function xN(o,s){return s=typeof s=="function"?s:e,ni(o,p|_,s)}function wN(o,s){return s==null||S_(o,s,Qt(s))}function vi(o,s){return o===s||o!==o&&s!==s}var IN=Nu(Nf),SN=Nu(function(o,s){return o>=s}),fo=M_(function(){return arguments}())?M_:function(o){return Vt(o)&&ot.call(o,"callee")&&!__.call(o,"callee")},De=B.isArray,$N=Z0?Ln(Z0):DA;function On(o){return o!=null&&Uu(o.length)&&!ar(o)}function Bt(o){return Vt(o)&&On(o)}function EN(o){return o===!0||o===!1||Vt(o)&&gn(o)==es}var Mr=Bk||bp,TN=Q0?Ln(Q0):NA;function PN(o){return Vt(o)&&o.nodeType===1&&!Cs(o)}function ON(o){if(o==null)return!0;if(On(o)&&(De(o)||typeof o=="string"||typeof o.splice=="function"||Mr(o)||ea(o)||fo(o)))return!o.length;var s=ln(o);if(s==hi||s==gi)return!o.size;if(vs(o))return!Vf(o).length;for(var c in o)if(ot.call(o,c))return!1;return!0}function MN(o,s){return gs(o,s)}function kN(o,s,c){c=typeof c=="function"?c:e;var f=c?c(o,s):e;return f===e?gs(o,s,e,c):!!f}function cp(o){if(!Vt(o))return!1;var s=gn(o);return s==nu||s==tM||typeof o.message=="string"&&typeof o.name=="string"&&!Cs(o)}function AN(o){return typeof o=="number"&&v_(o)}function ar(o){if(!kt(o))return!1;var s=gn(o);return s==iu||s==$0||s==eM||s==iM}function jy(o){return typeof o=="number"&&o==Fe(o)}function Uu(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=ht}function kt(o){var s=typeof o;return o!=null&&(s=="object"||s=="function")}function Vt(o){return o!=null&&typeof o=="object"}var Ry=e_?Ln(e_):qA;function DN(o,s){return o===s||qf(o,s,ep(s))}function NN(o,s,c){return c=typeof c=="function"?c:e,qf(o,s,ep(s),c)}function FN(o){return By(o)&&o!=+o}function qN(o){if(b3(o))throw new Oe(i);return k_(o)}function VN(o){return o===null}function jN(o){return o==null}function By(o){return typeof o=="number"||Vt(o)&&gn(o)==ns}function Cs(o){if(!Vt(o)||gn(o)!=Qi)return!1;var s=_u(o);if(s===null)return!0;var c=ot.call(s,"constructor")&&s.constructor;return typeof c=="function"&&c instanceof c&&pu.call(c)==Nk}var dp=t_?Ln(t_):VA;function RN(o){return jy(o)&&o>=-ht&&o<=ht}var Ly=n_?Ln(n_):jA;function Hu(o){return typeof o=="string"||!De(o)&&Vt(o)&&gn(o)==rs}function Un(o){return typeof o=="symbol"||Vt(o)&&gn(o)==ru}var ea=i_?Ln(i_):RA;function BN(o){return o===e}function LN(o){return Vt(o)&&ln(o)==os}function zN(o){return Vt(o)&&gn(o)==oM}var UN=Nu(jf),HN=Nu(function(o,s){return o<=s});function zy(o){if(!o)return[];if(On(o))return Hu(o)?_i(o):Pn(o);if(ls&&o[ls])return wk(o[ls]());var s=ln(o),c=s==hi?$f:s==gi?cu:ta;return c(o)}function sr(o){if(!o)return o===0?o:0;if(o=oi(o),o===Kt||o===-Kt){var s=o<0?-1:1;return s*Zi}return o===o?o:0}function Fe(o){var s=sr(o),c=s%1;return s===s?c?s-c:s:0}function Uy(o){return o?so(Fe(o),0,qt):0}function oi(o){if(typeof o=="number")return o;if(Un(o))return hn;if(kt(o)){var s=typeof o.valueOf=="function"?o.valueOf():o;o=kt(s)?s+"":s}if(typeof o!="string")return o===0?o:+o;o=u_(o);var c=$M.test(o);return c||TM.test(o)?ak(o.slice(2),c?2:8):SM.test(o)?hn:+o}function Hy(o){return Vi(o,Mn(o))}function WN(o){return o?so(Fe(o),-ht,ht):o===0?o:0}function it(o){return o==null?"":zn(o)}var GN=Xo(function(o,s){if(vs(s)||On(s)){Vi(s,Qt(s),o);return}for(var c in s)ot.call(s,c)&&ps(o,c,s[c])}),Wy=Xo(function(o,s){Vi(s,Mn(s),o)}),Wu=Xo(function(o,s,c,f){Vi(s,Mn(s),o,f)}),KN=Xo(function(o,s,c,f){Vi(s,Qt(s),o,f)}),JN=rr(kf);function YN(o,s){var c=Yo(o);return s==null?c:I_(c,s)}var XN=Be(function(o,s){o=gt(o);var c=-1,f=s.length,g=f>2?s[2]:e;for(g&&_n(s[0],s[1],g)&&(f=1);++c<f;)for(var w=s[c],$=Mn(w),P=-1,D=$.length;++P<D;){var G=$[P],K=o[G];(K===e||vi(K,Go[G])&&!ot.call(o,G))&&(o[G]=w[G])}return o}),ZN=Be(function(o){return o.push(e,uy),Bn(Gy,e,o)});function QN(o,s){return o_(o,we(s,3),qi)}function eF(o,s){return o_(o,we(s,3),Df)}function tF(o,s){return o==null?o:Af(o,we(s,3),Mn)}function nF(o,s){return o==null?o:P_(o,we(s,3),Mn)}function iF(o,s){return o&&qi(o,we(s,3))}function rF(o,s){return o&&Df(o,we(s,3))}function oF(o){return o==null?[]:Eu(o,Qt(o))}function aF(o){return o==null?[]:Eu(o,Mn(o))}function fp(o,s,c){var f=o==null?e:lo(o,s);return f===e?c:f}function sF(o,s){return o!=null&&fy(o,s,OA)}function pp(o,s){return o!=null&&fy(o,s,MA)}var lF=ry(function(o,s,c){s!=null&&typeof s.toString!="function"&&(s=mu.call(s)),o[s]=c},hp(kn)),uF=ry(function(o,s,c){s!=null&&typeof s.toString!="function"&&(s=mu.call(s)),ot.call(o,s)?o[s].push(c):o[s]=[c]},we),cF=Be(hs);function Qt(o){return On(o)?x_(o):Vf(o)}function Mn(o){return On(o)?x_(o,!0):BA(o)}function dF(o,s){var c={};return s=we(s,3),qi(o,function(f,g,w){nr(c,s(f,g,w),f)}),c}function fF(o,s){var c={};return s=we(s,3),qi(o,function(f,g,w){nr(c,g,s(f,g,w))}),c}var pF=Xo(function(o,s,c){Tu(o,s,c)}),Gy=Xo(function(o,s,c,f){Tu(o,s,c,f)}),mF=rr(function(o,s){var c={};if(o==null)return c;var f=!1;s=$t(s,function(w){return w=Pr(w,o),f||(f=w.length>1),w}),Vi(o,Zf(o),c),f&&(c=ni(c,p|h|_,l3));for(var g=s.length;g--;)Uf(c,s[g]);return c});function hF(o,s){return Ky(o,zu(we(s)))}var gF=rr(function(o,s){return o==null?{}:zA(o,s)});function Ky(o,s){if(o==null)return{};var c=$t(Zf(o),function(f){return[f]});return s=we(s),j_(o,c,function(f,g){return s(f,g[0])})}function _F(o,s,c){s=Pr(s,o);var f=-1,g=s.length;for(g||(g=1,o=e);++f<g;){var w=o==null?e:o[ji(s[f])];w===e&&(f=g,w=c),o=ar(w)?w.call(o):w}return o}function yF(o,s,c){return o==null?o:_s(o,s,c)}function vF(o,s,c,f){return f=typeof f=="function"?f:e,o==null?o:_s(o,s,c,f)}var Jy=sy(Qt),Yy=sy(Mn);function bF(o,s,c){var f=De(o),g=f||Mr(o)||ea(o);if(s=we(s,4),c==null){var w=o&&o.constructor;g?c=f?new w:[]:kt(o)?c=ar(w)?Yo(_u(o)):{}:c={}}return(g?Qn:qi)(o,function($,P,D){return s(c,$,P,D)}),c}function CF(o,s){return o==null?!0:Uf(o,s)}function xF(o,s,c){return o==null?o:U_(o,s,Gf(c))}function wF(o,s,c,f){return f=typeof f=="function"?f:e,o==null?o:U_(o,s,Gf(c),f)}function ta(o){return o==null?[]:Sf(o,Qt(o))}function IF(o){return o==null?[]:Sf(o,Mn(o))}function SF(o,s,c){return c===e&&(c=s,s=e),c!==e&&(c=oi(c),c=c===c?c:0),s!==e&&(s=oi(s),s=s===s?s:0),so(oi(o),s,c)}function $F(o,s,c){return s=sr(s),c===e?(c=s,s=0):c=sr(c),o=oi(o),kA(o,s,c)}function EF(o,s,c){if(c&&typeof c!="boolean"&&_n(o,s,c)&&(s=c=e),c===e&&(typeof s=="boolean"?(c=s,s=e):typeof o=="boolean"&&(c=o,o=e)),o===e&&s===e?(o=0,s=1):(o=sr(o),s===e?(s=o,o=0):s=sr(s)),o>s){var f=o;o=s,s=f}if(c||o%1||s%1){var g=b_();return sn(o+g*(s-o+ok("1e-"+((g+"").length-1))),s)}return Bf(o,s)}var TF=Zo(function(o,s,c){return s=s.toLowerCase(),o+(c?Xy(s):s)});function Xy(o){return mp(it(o).toLowerCase())}function Zy(o){return o=it(o),o&&o.replace(OM,yk).replace(JM,"")}function PF(o,s,c){o=it(o),s=zn(s);var f=o.length;c=c===e?f:so(Fe(c),0,f);var g=c;return c-=s.length,c>=0&&o.slice(c,g)==s}function OF(o){return o=it(o),o&&cM.test(o)?o.replace(P0,vk):o}function MF(o){return o=it(o),o&&gM.test(o)?o.replace(uf,"\\$&"):o}var kF=Zo(function(o,s,c){return o+(c?"-":"")+s.toLowerCase()}),AF=Zo(function(o,s,c){return o+(c?" ":"")+s.toLowerCase()}),DF=ty("toLowerCase");function NF(o,s,c){o=it(o),s=Fe(s);var f=s?Wo(o):0;if(!s||f>=s)return o;var g=(s-f)/2;return Du(Cu(g),c)+o+Du(bu(g),c)}function FF(o,s,c){o=it(o),s=Fe(s);var f=s?Wo(o):0;return s&&f<s?o+Du(s-f,c):o}function qF(o,s,c){o=it(o),s=Fe(s);var f=s?Wo(o):0;return s&&f<s?Du(s-f,c)+o:o}function VF(o,s,c){return c||s==null?s=0:s&&(s=+s),Hk(it(o).replace(cf,""),s||0)}function jF(o,s,c){return(c?_n(o,s,c):s===e)?s=1:s=Fe(s),Lf(it(o),s)}function RF(){var o=arguments,s=it(o[0]);return o.length<3?s:s.replace(o[1],o[2])}var BF=Zo(function(o,s,c){return o+(c?"_":"")+s.toLowerCase()});function LF(o,s,c){return c&&typeof c!="number"&&_n(o,s,c)&&(s=c=e),c=c===e?qt:c>>>0,c?(o=it(o),o&&(typeof s=="string"||s!=null&&!dp(s))&&(s=zn(s),!s&&Ho(o))?Or(_i(o),0,c):o.split(s,c)):[]}var zF=Zo(function(o,s,c){return o+(c?" ":"")+mp(s)});function UF(o,s,c){return o=it(o),c=c==null?0:so(Fe(c),0,o.length),s=zn(s),o.slice(c,c+s.length)==s}function HF(o,s,c){var f=b.templateSettings;c&&_n(o,s,c)&&(s=e),o=it(o),s=Wu({},s,f,ly);var g=Wu({},s.imports,f.imports,ly),w=Qt(g),$=Sf(g,w),P,D,G=0,K=s.interpolate||ou,ee="__p += '",de=Ef((s.escape||ou).source+"|"+K.source+"|"+(K===O0?IM:ou).source+"|"+(s.evaluate||ou).source+"|$","g"),_e="//# sourceURL="+(ot.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ek+"]")+`
11
- `;o.replace(de,function($e,He,Ye,Hn,yn,Wn){return Ye||(Ye=Hn),ee+=o.slice(G,Wn).replace(MM,bk),He&&(P=!0,ee+=`' +
12
- __e(`+He+`) +
13
- '`),yn&&(D=!0,ee+=`';
14
- `+yn+`;
15
- __p += '`),Ye&&(ee+=`' +
16
- ((__t = (`+Ye+`)) == null ? '' : __t) +
17
- '`),G=Wn+$e.length,$e}),ee+=`';
18
- `;var Se=ot.call(s,"variable")&&s.variable;if(!Se)ee=`with (obj) {
19
- `+ee+`
20
- }
21
- `;else if(xM.test(Se))throw new Oe(a);ee=(D?ee.replace(aM,""):ee).replace(sM,"$1").replace(lM,"$1;"),ee="function("+(Se||"obj")+`) {
22
- `+(Se?"":`obj || (obj = {});
23
- `)+"var __t, __p = ''"+(P?", __e = _.escape":"")+(D?`, __j = Array.prototype.join;
24
- function print() { __p += __j.call(arguments, '') }
25
- `:`;
26
- `)+ee+`return __p
27
- }`;var Ve=e1(function(){return tt(w,_e+"return "+ee).apply(e,$)});if(Ve.source=ee,cp(Ve))throw Ve;return Ve}function WF(o){return it(o).toLowerCase()}function GF(o){return it(o).toUpperCase()}function KF(o,s,c){if(o=it(o),o&&(c||s===e))return u_(o);if(!o||!(s=zn(s)))return o;var f=_i(o),g=_i(s),w=c_(f,g),$=d_(f,g)+1;return Or(f,w,$).join("")}function JF(o,s,c){if(o=it(o),o&&(c||s===e))return o.slice(0,p_(o)+1);if(!o||!(s=zn(s)))return o;var f=_i(o),g=d_(f,_i(s))+1;return Or(f,0,g).join("")}function YF(o,s,c){if(o=it(o),o&&(c||s===e))return o.replace(cf,"");if(!o||!(s=zn(s)))return o;var f=_i(o),g=c_(f,_i(s));return Or(f,g).join("")}function XF(o,s){var c=fe,f=ge;if(kt(s)){var g="separator"in s?s.separator:g;c="length"in s?Fe(s.length):c,f="omission"in s?zn(s.omission):f}o=it(o);var w=o.length;if(Ho(o)){var $=_i(o);w=$.length}if(c>=w)return o;var P=c-Wo(f);if(P<1)return f;var D=$?Or($,0,P).join(""):o.slice(0,P);if(g===e)return D+f;if($&&(P+=D.length-P),dp(g)){if(o.slice(P).search(g)){var G,K=D;for(g.global||(g=Ef(g.source,it(M0.exec(g))+"g")),g.lastIndex=0;G=g.exec(K);)var ee=G.index;D=D.slice(0,ee===e?P:ee)}}else if(o.indexOf(zn(g),P)!=P){var de=D.lastIndexOf(g);de>-1&&(D=D.slice(0,de))}return D+f}function ZF(o){return o=it(o),o&&uM.test(o)?o.replace(T0,Ek):o}var QF=Zo(function(o,s,c){return o+(c?" ":"")+s.toUpperCase()}),mp=ty("toUpperCase");function Qy(o,s,c){return o=it(o),s=c?e:s,s===e?xk(o)?Ok(o):pk(o):o.match(s)||[]}var e1=Be(function(o,s){try{return Bn(o,e,s)}catch(c){return cp(c)?c:new Oe(c)}}),eq=rr(function(o,s){return Qn(s,function(c){c=ji(c),nr(o,c,lp(o[c],o))}),o});function tq(o){var s=o==null?0:o.length,c=we();return o=s?$t(o,function(f){if(typeof f[1]!="function")throw new ei(r);return[c(f[0]),f[1]]}):[],Be(function(f){for(var g=-1;++g<s;){var w=o[g];if(Bn(w[0],this,f))return Bn(w[1],this,f)}})}function nq(o){return EA(ni(o,p))}function hp(o){return function(){return o}}function iq(o,s){return o==null||o!==o?s:o}var rq=iy(),oq=iy(!0);function kn(o){return o}function gp(o){return A_(typeof o=="function"?o:ni(o,p))}function aq(o){return N_(ni(o,p))}function sq(o,s){return F_(o,ni(s,p))}var lq=Be(function(o,s){return function(c){return hs(c,o,s)}}),uq=Be(function(o,s){return function(c){return hs(o,c,s)}});function _p(o,s,c){var f=Qt(s),g=Eu(s,f);c==null&&!(kt(s)&&(g.length||!f.length))&&(c=s,s=o,o=this,g=Eu(s,Qt(s)));var w=!(kt(c)&&"chain"in c)||!!c.chain,$=ar(o);return Qn(g,function(P){var D=s[P];o[P]=D,$&&(o.prototype[P]=function(){var G=this.__chain__;if(w||G){var K=o(this.__wrapped__),ee=K.__actions__=Pn(this.__actions__);return ee.push({func:D,args:arguments,thisArg:o}),K.__chain__=G,K}return D.apply(o,wr([this.value()],arguments))})}),o}function cq(){return Zt._===this&&(Zt._=Fk),this}function yp(){}function dq(o){return o=Fe(o),Be(function(s){return q_(s,o)})}var fq=Jf($t),pq=Jf(r_),mq=Jf(bf);function t1(o){return np(o)?Cf(ji(o)):UA(o)}function hq(o){return function(s){return o==null?e:lo(o,s)}}var gq=oy(),_q=oy(!0);function vp(){return[]}function bp(){return!1}function yq(){return{}}function vq(){return""}function bq(){return!0}function Cq(o,s){if(o=Fe(o),o<1||o>ht)return[];var c=qt,f=sn(o,qt);s=we(s),o-=qt;for(var g=If(f,s);++c<o;)s(c);return g}function xq(o){return De(o)?$t(o,ji):Un(o)?[o]:Pn(Cy(it(o)))}function wq(o){var s=++Dk;return it(o)+s}var Iq=Au(function(o,s){return o+s},0),Sq=Yf("ceil"),$q=Au(function(o,s){return o/s},1),Eq=Yf("floor");function Tq(o){return o&&o.length?$u(o,kn,Nf):e}function Pq(o,s){return o&&o.length?$u(o,we(s,2),Nf):e}function Oq(o){return s_(o,kn)}function Mq(o,s){return s_(o,we(s,2))}function kq(o){return o&&o.length?$u(o,kn,jf):e}function Aq(o,s){return o&&o.length?$u(o,we(s,2),jf):e}var Dq=Au(function(o,s){return o*s},1),Nq=Yf("round"),Fq=Au(function(o,s){return o-s},0);function qq(o){return o&&o.length?wf(o,kn):0}function Vq(o,s){return o&&o.length?wf(o,we(s,2)):0}return b.after=aN,b.ary=ky,b.assign=GN,b.assignIn=Wy,b.assignInWith=Wu,b.assignWith=KN,b.at=JN,b.before=Ay,b.bind=lp,b.bindAll=eq,b.bindKey=Dy,b.castArray=yN,b.chain=Py,b.chunk=E3,b.compact=T3,b.concat=P3,b.cond=tq,b.conforms=nq,b.constant=hp,b.countBy=qD,b.create=YN,b.curry=Ny,b.curryRight=Fy,b.debounce=qy,b.defaults=XN,b.defaultsDeep=ZN,b.defer=sN,b.delay=lN,b.difference=O3,b.differenceBy=M3,b.differenceWith=k3,b.drop=A3,b.dropRight=D3,b.dropRightWhile=N3,b.dropWhile=F3,b.fill=q3,b.filter=jD,b.flatMap=LD,b.flatMapDeep=zD,b.flatMapDepth=UD,b.flatten=Sy,b.flattenDeep=V3,b.flattenDepth=j3,b.flip=uN,b.flow=rq,b.flowRight=oq,b.fromPairs=R3,b.functions=oF,b.functionsIn=aF,b.groupBy=HD,b.initial=L3,b.intersection=z3,b.intersectionBy=U3,b.intersectionWith=H3,b.invert=lF,b.invertBy=uF,b.invokeMap=GD,b.iteratee=gp,b.keyBy=KD,b.keys=Qt,b.keysIn=Mn,b.map=Ru,b.mapKeys=dF,b.mapValues=fF,b.matches=aq,b.matchesProperty=sq,b.memoize=Lu,b.merge=pF,b.mergeWith=Gy,b.method=lq,b.methodOf=uq,b.mixin=_p,b.negate=zu,b.nthArg=dq,b.omit=mF,b.omitBy=hF,b.once=cN,b.orderBy=JD,b.over=fq,b.overArgs=dN,b.overEvery=pq,b.overSome=mq,b.partial=up,b.partialRight=Vy,b.partition=YD,b.pick=gF,b.pickBy=Ky,b.property=t1,b.propertyOf=hq,b.pull=J3,b.pullAll=Ey,b.pullAllBy=Y3,b.pullAllWith=X3,b.pullAt=Z3,b.range=gq,b.rangeRight=_q,b.rearg=fN,b.reject=QD,b.remove=Q3,b.rest=pN,b.reverse=ap,b.sampleSize=tN,b.set=yF,b.setWith=vF,b.shuffle=nN,b.slice=eD,b.sortBy=oN,b.sortedUniq=sD,b.sortedUniqBy=lD,b.split=LF,b.spread=mN,b.tail=uD,b.take=cD,b.takeRight=dD,b.takeRightWhile=fD,b.takeWhile=pD,b.tap=TD,b.throttle=hN,b.thru=ju,b.toArray=zy,b.toPairs=Jy,b.toPairsIn=Yy,b.toPath=xq,b.toPlainObject=Hy,b.transform=bF,b.unary=gN,b.union=mD,b.unionBy=hD,b.unionWith=gD,b.uniq=_D,b.uniqBy=yD,b.uniqWith=vD,b.unset=CF,b.unzip=sp,b.unzipWith=Ty,b.update=xF,b.updateWith=wF,b.values=ta,b.valuesIn=IF,b.without=bD,b.words=Qy,b.wrap=_N,b.xor=CD,b.xorBy=xD,b.xorWith=wD,b.zip=ID,b.zipObject=SD,b.zipObjectDeep=$D,b.zipWith=ED,b.entries=Jy,b.entriesIn=Yy,b.extend=Wy,b.extendWith=Wu,_p(b,b),b.add=Iq,b.attempt=e1,b.camelCase=TF,b.capitalize=Xy,b.ceil=Sq,b.clamp=SF,b.clone=vN,b.cloneDeep=CN,b.cloneDeepWith=xN,b.cloneWith=bN,b.conformsTo=wN,b.deburr=Zy,b.defaultTo=iq,b.divide=$q,b.endsWith=PF,b.eq=vi,b.escape=OF,b.escapeRegExp=MF,b.every=VD,b.find=RD,b.findIndex=wy,b.findKey=QN,b.findLast=BD,b.findLastIndex=Iy,b.findLastKey=eF,b.floor=Eq,b.forEach=Oy,b.forEachRight=My,b.forIn=tF,b.forInRight=nF,b.forOwn=iF,b.forOwnRight=rF,b.get=fp,b.gt=IN,b.gte=SN,b.has=sF,b.hasIn=pp,b.head=$y,b.identity=kn,b.includes=WD,b.indexOf=B3,b.inRange=$F,b.invoke=cF,b.isArguments=fo,b.isArray=De,b.isArrayBuffer=$N,b.isArrayLike=On,b.isArrayLikeObject=Bt,b.isBoolean=EN,b.isBuffer=Mr,b.isDate=TN,b.isElement=PN,b.isEmpty=ON,b.isEqual=MN,b.isEqualWith=kN,b.isError=cp,b.isFinite=AN,b.isFunction=ar,b.isInteger=jy,b.isLength=Uu,b.isMap=Ry,b.isMatch=DN,b.isMatchWith=NN,b.isNaN=FN,b.isNative=qN,b.isNil=jN,b.isNull=VN,b.isNumber=By,b.isObject=kt,b.isObjectLike=Vt,b.isPlainObject=Cs,b.isRegExp=dp,b.isSafeInteger=RN,b.isSet=Ly,b.isString=Hu,b.isSymbol=Un,b.isTypedArray=ea,b.isUndefined=BN,b.isWeakMap=LN,b.isWeakSet=zN,b.join=W3,b.kebabCase=kF,b.last=ri,b.lastIndexOf=G3,b.lowerCase=AF,b.lowerFirst=DF,b.lt=UN,b.lte=HN,b.max=Tq,b.maxBy=Pq,b.mean=Oq,b.meanBy=Mq,b.min=kq,b.minBy=Aq,b.stubArray=vp,b.stubFalse=bp,b.stubObject=yq,b.stubString=vq,b.stubTrue=bq,b.multiply=Dq,b.nth=K3,b.noConflict=cq,b.noop=yp,b.now=Bu,b.pad=NF,b.padEnd=FF,b.padStart=qF,b.parseInt=VF,b.random=EF,b.reduce=XD,b.reduceRight=ZD,b.repeat=jF,b.replace=RF,b.result=_F,b.round=Nq,b.runInContext=k,b.sample=eN,b.size=iN,b.snakeCase=BF,b.some=rN,b.sortedIndex=tD,b.sortedIndexBy=nD,b.sortedIndexOf=iD,b.sortedLastIndex=rD,b.sortedLastIndexBy=oD,b.sortedLastIndexOf=aD,b.startCase=zF,b.startsWith=UF,b.subtract=Fq,b.sum=qq,b.sumBy=Vq,b.template=HF,b.times=Cq,b.toFinite=sr,b.toInteger=Fe,b.toLength=Uy,b.toLower=WF,b.toNumber=oi,b.toSafeInteger=WN,b.toString=it,b.toUpper=GF,b.trim=KF,b.trimEnd=JF,b.trimStart=YF,b.truncate=XF,b.unescape=ZF,b.uniqueId=wq,b.upperCase=QF,b.upperFirst=mp,b.each=Oy,b.eachRight=My,b.first=$y,_p(b,function(){var o={};return qi(b,function(s,c){ot.call(b.prototype,c)||(o[c]=s)}),o}(),{chain:!1}),b.VERSION=n,Qn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){b[o].placeholder=b}),Qn(["drop","take"],function(o,s){Ge.prototype[o]=function(c){c=c===e?1:Yt(Fe(c),0);var f=this.__filtered__&&!s?new Ge(this):this.clone();return f.__filtered__?f.__takeCount__=sn(c,f.__takeCount__):f.__views__.push({size:sn(c,qt),type:o+(f.__dir__<0?"Right":"")}),f},Ge.prototype[o+"Right"]=function(c){return this.reverse()[o](c).reverse()}}),Qn(["filter","map","takeWhile"],function(o,s){var c=s+1,f=c==Xt||c==Tn;Ge.prototype[o]=function(g){var w=this.clone();return w.__iteratees__.push({iteratee:we(g,3),type:c}),w.__filtered__=w.__filtered__||f,w}}),Qn(["head","last"],function(o,s){var c="take"+(s?"Right":"");Ge.prototype[o]=function(){return this[c](1).value()[0]}}),Qn(["initial","tail"],function(o,s){var c="drop"+(s?"":"Right");Ge.prototype[o]=function(){return this.__filtered__?new Ge(this):this[c](1)}}),Ge.prototype.compact=function(){return this.filter(kn)},Ge.prototype.find=function(o){return this.filter(o).head()},Ge.prototype.findLast=function(o){return this.reverse().find(o)},Ge.prototype.invokeMap=Be(function(o,s){return typeof o=="function"?new Ge(this):this.map(function(c){return hs(c,o,s)})}),Ge.prototype.reject=function(o){return this.filter(zu(we(o)))},Ge.prototype.slice=function(o,s){o=Fe(o);var c=this;return c.__filtered__&&(o>0||s<0)?new Ge(c):(o<0?c=c.takeRight(-o):o&&(c=c.drop(o)),s!==e&&(s=Fe(s),c=s<0?c.dropRight(-s):c.take(s-o)),c)},Ge.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Ge.prototype.toArray=function(){return this.take(qt)},qi(Ge.prototype,function(o,s){var c=/^(?:filter|find|map|reject)|While$/.test(s),f=/^(?:head|last)$/.test(s),g=b[f?"take"+(s=="last"?"Right":""):s],w=f||/^find/.test(s);g&&(b.prototype[s]=function(){var $=this.__wrapped__,P=f?[1]:arguments,D=$ instanceof Ge,G=P[0],K=D||De($),ee=function(He){var Ye=g.apply(b,wr([He],P));return f&&de?Ye[0]:Ye};K&&c&&typeof G=="function"&&G.length!=1&&(D=K=!1);var de=this.__chain__,_e=!!this.__actions__.length,Se=w&&!de,Ve=D&&!_e;if(!w&&K){$=Ve?$:new Ge(this);var $e=o.apply($,P);return $e.__actions__.push({func:ju,args:[ee],thisArg:e}),new ti($e,de)}return Se&&Ve?o.apply(this,P):($e=this.thru(ee),Se?f?$e.value()[0]:$e.value():$e)})}),Qn(["pop","push","shift","sort","splice","unshift"],function(o){var s=du[o],c=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",f=/^(?:pop|shift)$/.test(o);b.prototype[o]=function(){var g=arguments;if(f&&!this.__chain__){var w=this.value();return s.apply(De(w)?w:[],g)}return this[c](function($){return s.apply(De($)?$:[],g)})}}),qi(Ge.prototype,function(o,s){var c=b[s];if(c){var f=c.name+"";ot.call(Jo,f)||(Jo[f]=[]),Jo[f].push({name:s,func:c})}}),Jo[ku(e,O).name]=[{name:"wrapper",func:e}],Ge.prototype.clone=Zk,Ge.prototype.reverse=Qk,Ge.prototype.value=eA,b.prototype.at=PD,b.prototype.chain=OD,b.prototype.commit=MD,b.prototype.next=kD,b.prototype.plant=DD,b.prototype.reverse=ND,b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=FD,b.prototype.first=b.prototype.head,ls&&(b.prototype[ls]=AD),b},Sr=Mk();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Zt._=Sr,define(function(){return Sr})):io?((io.exports=Sr)._=Sr,gf._=Sr):Zt._=Sr}).call(ja)});var t2=I((Rse,e2)=>{var oW="__lodash_hash_undefined__";function aW(e){return this.__data__.set(e,oW),this}e2.exports=aW});var i2=I((Bse,n2)=>{function sW(e){return this.__data__.has(e)}n2.exports=sW});var o2=I((Lse,r2)=>{var lW=Zc(),uW=t2(),cW=i2();function fd(e){var n=-1,t=e==null?0:e.length;for(this.__data__=new lW;++n<t;)this.add(e[n])}fd.prototype.add=fd.prototype.push=uW;fd.prototype.has=cW;r2.exports=fd});var s2=I((zse,a2)=>{function dW(e,n){for(var t=-1,i=e==null?0:e.length;++t<i;)if(n(e[t],t,e))return!0;return!1}a2.exports=dW});var u2=I((Use,l2)=>{function fW(e,n){return e.has(n)}l2.exports=fW});var ug=I((Hse,c2)=>{var pW=o2(),mW=s2(),hW=u2(),gW=1,_W=2;function yW(e,n,t,i,r,a){var l=t&gW,u=e.length,d=n.length;if(u!=d&&!(l&&d>u))return!1;var p=a.get(e),h=a.get(n);if(p&&h)return p==n&&h==e;var _=-1,C=!0,T=t&_W?new pW:void 0;for(a.set(e,n),a.set(n,e);++_<u;){var x=e[_],O=n[_];if(i)var F=l?i(O,x,_,n,e,a):i(x,O,_,e,n,a);if(F!==void 0){if(F)continue;C=!1;break}if(T){if(!mW(n,function(z,ne){if(!hW(T,ne)&&(x===z||r(x,z,t,i,a)))return T.push(ne)})){C=!1;break}}else if(!(x===O||r(x,O,t,i,a))){C=!1;break}}return a.delete(e),a.delete(n),C}c2.exports=yW});var f2=I((Wse,d2)=>{function vW(e){var n=-1,t=Array(e.size);return e.forEach(function(i,r){t[++n]=[r,i]}),t}d2.exports=vW});var m2=I((Gse,p2)=>{function bW(e){var n=-1,t=Array(e.size);return e.forEach(function(i){t[++n]=i}),t}p2.exports=bW});var v2=I((Kse,y2)=>{var h2=Oo(),g2=sg(),CW=Yc(),xW=ug(),wW=f2(),IW=m2(),SW=1,$W=2,EW="[object Boolean]",TW="[object Date]",PW="[object Error]",OW="[object Map]",MW="[object Number]",kW="[object RegExp]",AW="[object Set]",DW="[object String]",NW="[object Symbol]",FW="[object ArrayBuffer]",qW="[object DataView]",_2=h2?h2.prototype:void 0,cg=_2?_2.valueOf:void 0;function VW(e,n,t,i,r,a,l){switch(t){case qW:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case FW:return!(e.byteLength!=n.byteLength||!a(new g2(e),new g2(n)));case EW:case TW:case MW:return CW(+e,+n);case PW:return e.name==n.name&&e.message==n.message;case kW:case DW:return e==n+"";case OW:var u=wW;case AW:var d=i&SW;if(u||(u=IW),e.size!=n.size&&!d)return!1;var p=l.get(e);if(p)return p==n;i|=$W,l.set(e,n);var h=xW(u(e),u(n),i,r,a,l);return l.delete(e),h;case NW:if(cg)return cg.call(e)==cg.call(n)}return!1}y2.exports=VW});var x2=I((Jse,C2)=>{var b2=eg(),jW=1,RW=Object.prototype,BW=RW.hasOwnProperty;function LW(e,n,t,i,r,a){var l=t&jW,u=b2(e),d=u.length,p=b2(n),h=p.length;if(d!=h&&!l)return!1;for(var _=d;_--;){var C=u[_];if(!(l?C in n:BW.call(n,C)))return!1}var T=a.get(e),x=a.get(n);if(T&&x)return T==n&&x==e;var O=!0;a.set(e,n),a.set(n,e);for(var F=l;++_<d;){C=u[_];var z=e[C],ne=n[C];if(i)var re=l?i(ne,z,C,n,e,a):i(z,ne,C,e,n,a);if(!(re===void 0?z===ne||r(z,ne,t,i,a):re)){O=!1;break}F||(F=C=="constructor")}if(O&&!F){var Q=e.constructor,J=n.constructor;Q!=J&&"constructor"in e&&"constructor"in n&&!(typeof Q=="function"&&Q instanceof Q&&typeof J=="function"&&J instanceof J)&&(O=!1)}return a.delete(e),a.delete(n),O}C2.exports=LW});var O2=I((Yse,P2)=>{var dg=Qc(),zW=ug(),UW=v2(),HW=x2(),w2=cl(),I2=qn(),S2=td(),WW=Gh(),GW=1,$2="[object Arguments]",E2="[object Array]",pd="[object Object]",KW=Object.prototype,T2=KW.hasOwnProperty;function JW(e,n,t,i,r,a){var l=I2(e),u=I2(n),d=l?E2:w2(e),p=u?E2:w2(n);d=d==$2?pd:d,p=p==$2?pd:p;var h=d==pd,_=p==pd,C=d==p;if(C&&S2(e)){if(!S2(n))return!1;l=!0,h=!1}if(C&&!h)return a||(a=new dg),l||WW(e)?zW(e,n,t,i,r,a):UW(e,n,d,t,i,r,a);if(!(t&GW)){var T=h&&T2.call(e,"__wrapped__"),x=_&&T2.call(n,"__wrapped__");if(T||x){var O=T?e.value():e,F=x?n.value():n;return a||(a=new dg),r(O,F,t,i,a)}}return C?(a||(a=new dg),HW(e,n,t,i,r,a)):!1}P2.exports=JW});var md=I((Xse,A2)=>{var YW=O2(),M2=mr();function k2(e,n,t,i,r){return e===n?!0:e==null||n==null||!M2(e)&&!M2(n)?e!==e&&n!==n:YW(e,n,t,i,k2,r)}A2.exports=k2});var N2=I((Zse,D2)=>{var XW=md();function ZW(e,n){return XW(e,n)}D2.exports=ZW});var hd=I((Qse,F2)=>{function QW(e,n){for(var t=-1,i=e==null?0:e.length,r=Array(i);++t<i;)r[t]=n(e[t],t,e);return r}F2.exports=QW});var gd=I((ele,q2)=>{var eG=Mo(),tG=mr(),nG="[object Symbol]";function iG(e){return typeof e=="symbol"||tG(e)&&eG(e)==nG}q2.exports=iG});var _d=I((tle,V2)=>{var rG=qn(),oG=gd(),aG=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sG=/^\w*$/;function lG(e,n){if(rG(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||oG(e)?!0:sG.test(e)||!aG.test(e)||n!=null&&e in Object(n)}V2.exports=lG});var B2=I((nle,R2)=>{var j2=Zc(),uG="Expected a function";function fg(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(uG);var t=function(){var i=arguments,r=n?n.apply(this,i):i[0],a=t.cache;if(a.has(r))return a.get(r);var l=e.apply(this,i);return t.cache=a.set(r,l)||a,l};return t.cache=new(fg.Cache||j2),t}fg.Cache=j2;R2.exports=fg});var z2=I((ile,L2)=>{var cG=B2(),dG=500;function fG(e){var n=cG(e,function(i){return t.size===dG&&t.clear(),i}),t=n.cache;return n}L2.exports=fG});var H2=I((rle,U2)=>{var pG=z2(),mG=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hG=/\\(\\)?/g,gG=pG(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(mG,function(t,i,r,a){n.push(r?a.replace(hG,"$1"):i||t)}),n});U2.exports=gG});var X2=I((ole,Y2)=>{var W2=Oo(),_G=hd(),yG=qn(),vG=gd(),bG=1/0,G2=W2?W2.prototype:void 0,K2=G2?G2.toString:void 0;function J2(e){if(typeof e=="string")return e;if(yG(e))return _G(e,J2)+"";if(vG(e))return K2?K2.call(e):"";var n=e+"";return n=="0"&&1/e==-bG?"-0":n}Y2.exports=J2});var pg=I((ale,Z2)=>{var CG=X2();function xG(e){return e==null?"":CG(e)}Z2.exports=xG});var fl=I((sle,Q2)=>{var wG=qn(),IG=_d(),SG=H2(),$G=pg();function EG(e,n){return wG(e)?e:IG(e,n)?[e]:SG($G(e))}Q2.exports=EG});var t$=I((lle,e$)=>{function TG(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}e$.exports=TG});var Ra=I((ule,n$)=>{var PG=gd(),OG=1/0;function MG(e){if(typeof e=="string"||PG(e))return e;var n=e+"";return n=="0"&&1/e==-OG?"-0":n}n$.exports=MG});var yd=I((cle,i$)=>{var kG=fl(),AG=Ra();function DG(e,n){n=kG(n,e);for(var t=0,i=n.length;e!=null&&t<i;)e=e[AG(n[t++])];return t&&t==i?e:void 0}i$.exports=DG});var o$=I((dle,r$)=>{function NG(e,n,t){var i=-1,r=e.length;n<0&&(n=-n>r?0:r+n),t=t>r?r:t,t<0&&(t+=r),r=n>t?0:t-n>>>0,n>>>=0;for(var a=Array(r);++i<r;)a[i]=e[i+n];return a}r$.exports=NG});var s$=I((fle,a$)=>{var FG=yd(),qG=o$();function VG(e,n){return n.length<2?e:FG(e,qG(n,0,-1))}a$.exports=VG});var u$=I((ple,l$)=>{var jG=fl(),RG=t$(),BG=s$(),LG=Ra();function zG(e,n){return n=jG(n,e),e=BG(e,n),e==null||delete e[LG(RG(n))]}l$.exports=zG});var mg=I((mle,d$)=>{var UG=Mo(),HG=ud(),WG=mr(),GG="[object Object]",KG=Function.prototype,JG=Object.prototype,c$=KG.toString,YG=JG.hasOwnProperty,XG=c$.call(Object);function ZG(e){if(!WG(e)||UG(e)!=GG)return!1;var n=HG(e);if(n===null)return!0;var t=YG.call(n,"constructor")&&n.constructor;return typeof t=="function"&&t instanceof t&&c$.call(t)==XG}d$.exports=ZG});var p$=I((hle,f$)=>{var QG=mg();function eK(e){return QG(e)?void 0:e}f$.exports=eK});var _$=I((gle,g$)=>{var m$=Oo(),tK=ed(),nK=qn(),h$=m$?m$.isConcatSpreadable:void 0;function iK(e){return nK(e)||tK(e)||!!(h$&&e&&e[h$])}g$.exports=iK});var b$=I((_le,v$)=>{var rK=ld(),oK=_$();function y$(e,n,t,i,r){var a=-1,l=e.length;for(t||(t=oK),r||(r=[]);++a<l;){var u=e[a];n>0&&t(u)?n>1?y$(u,n-1,t,i,r):rK(r,u):i||(r[r.length]=u)}return r}v$.exports=y$});var x$=I((yle,C$)=>{var aK=b$();function sK(e){var n=e==null?0:e.length;return n?aK(e,1):[]}C$.exports=sK});var I$=I((vle,w$)=>{function lK(e,n,t){switch(t.length){case 0:return e.call(n);case 1:return e.call(n,t[0]);case 2:return e.call(n,t[0],t[1]);case 3:return e.call(n,t[0],t[1],t[2])}return e.apply(n,t)}w$.exports=lK});var E$=I((ble,$$)=>{var uK=I$(),S$=Math.max;function cK(e,n,t){return n=S$(n===void 0?e.length-1:n,0),function(){for(var i=arguments,r=-1,a=S$(i.length-n,0),l=Array(a);++r<a;)l[r]=i[n+r];r=-1;for(var u=Array(n+1);++r<n;)u[r]=i[r];return u[n]=t(l),uK(e,this,u)}}$$.exports=cK});var P$=I((Cle,T$)=>{function dK(e){return function(){return e}}T$.exports=dK});var hg=I((xle,O$)=>{function fK(e){return e}O$.exports=fK});var A$=I((wle,k$)=>{var pK=P$(),M$=Lh(),mK=hg(),hK=M$?function(e,n){return M$(e,"toString",{configurable:!0,enumerable:!1,value:pK(n),writable:!0})}:mK;k$.exports=hK});var N$=I((Ile,D$)=>{var gK=800,_K=16,yK=Date.now;function vK(e){var n=0,t=0;return function(){var i=yK(),r=_K-(i-t);if(t=i,r>0){if(++n>=gK)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}D$.exports=vK});var q$=I((Sle,F$)=>{var bK=A$(),CK=N$(),xK=CK(bK);F$.exports=xK});var j$=I(($le,V$)=>{var wK=x$(),IK=E$(),SK=q$();function $K(e){return SK(IK(e,void 0,wK),e+"")}V$.exports=$K});var B$=I((Ele,R$)=>{var EK=hd(),TK=lg(),PK=u$(),OK=fl(),MK=Aa(),kK=p$(),AK=j$(),DK=tg(),NK=1,FK=2,qK=4,VK=AK(function(e,n){var t={};if(e==null)return t;var i=!1;n=EK(n,function(a){return a=OK(a,e),i||(i=a.length>1),a}),MK(e,DK(e),t),i&&(t=TK(t,NK|FK|qK,kK));for(var r=n.length;r--;)PK(t,n[r]);return t});R$.exports=VK});var z$=I((Tle,L$)=>{function jK(e){return function(n,t,i){for(var r=-1,a=Object(n),l=i(n),u=l.length;u--;){var d=l[e?u:++r];if(t(a[d],d,a)===!1)break}return n}}L$.exports=jK});var H$=I((Ple,U$)=>{var RK=z$(),BK=RK();U$.exports=BK});var G$=I((Ole,W$)=>{var LK=H$(),zK=Fa();function UK(e,n){return e&&LK(e,n,zK)}W$.exports=UK});var J$=I((Mle,K$)=>{var HK=ll();function WK(e,n){return function(t,i){if(t==null)return t;if(!HK(t))return e(t,i);for(var r=t.length,a=n?r:-1,l=Object(t);(n?a--:++a<r)&&i(l[a],a,l)!==!1;);return t}}K$.exports=WK});var gg=I((kle,Y$)=>{var GK=G$(),KK=J$(),JK=KK(GK);Y$.exports=JK});var Z$=I((Ale,X$)=>{var YK=gg();function XK(e,n){var t=[];return YK(e,function(i,r,a){n(i,r,a)&&t.push(i)}),t}X$.exports=XK});var eE=I((Dle,Q$)=>{var ZK=Qc(),QK=md(),eJ=1,tJ=2;function nJ(e,n,t,i){var r=t.length,a=r,l=!i;if(e==null)return!a;for(e=Object(e);r--;){var u=t[r];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++r<a;){u=t[r];var d=u[0],p=e[d],h=u[1];if(l&&u[2]){if(p===void 0&&!(d in e))return!1}else{var _=new ZK;if(i)var C=i(p,h,d,e,n,_);if(!(C===void 0?QK(h,p,eJ|tJ,i,_):C))return!1}}return!0}Q$.exports=nJ});var _g=I((Nle,tE)=>{var iJ=ko();function rJ(e){return e===e&&!iJ(e)}tE.exports=rJ});var iE=I((Fle,nE)=>{var oJ=_g(),aJ=Fa();function sJ(e){for(var n=aJ(e),t=n.length;t--;){var i=n[t],r=e[i];n[t]=[i,r,oJ(r)]}return n}nE.exports=sJ});var yg=I((qle,rE)=>{function lJ(e,n){return function(t){return t==null?!1:t[e]===n&&(n!==void 0||e in Object(t))}}rE.exports=lJ});var aE=I((Vle,oE)=>{var uJ=eE(),cJ=iE(),dJ=yg();function fJ(e){var n=cJ(e);return n.length==1&&n[0][2]?dJ(n[0][0],n[0][1]):function(t){return t===e||uJ(t,e,n)}}oE.exports=fJ});var lE=I((jle,sE)=>{var pJ=yd();function mJ(e,n,t){var i=e==null?void 0:pJ(e,n);return i===void 0?t:i}sE.exports=mJ});var cE=I((Rle,uE)=>{function hJ(e,n){return e!=null&&n in Object(e)}uE.exports=hJ});var fE=I((Ble,dE)=>{var gJ=fl(),_J=ed(),yJ=qn(),vJ=Hh(),bJ=nd(),CJ=Ra();function xJ(e,n,t){n=gJ(n,e);for(var i=-1,r=n.length,a=!1;++i<r;){var l=CJ(n[i]);if(!(a=e!=null&&t(e,l)))break;e=e[l]}return a||++i!=r?a:(r=e==null?0:e.length,!!r&&bJ(r)&&vJ(l,r)&&(yJ(e)||_J(e)))}dE.exports=xJ});var mE=I((Lle,pE)=>{var wJ=cE(),IJ=fE();function SJ(e,n){return e!=null&&IJ(e,n,wJ)}pE.exports=SJ});var gE=I((zle,hE)=>{var $J=md(),EJ=lE(),TJ=mE(),PJ=_d(),OJ=_g(),MJ=yg(),kJ=Ra(),AJ=1,DJ=2;function NJ(e,n){return PJ(e)&&OJ(n)?MJ(kJ(e),n):function(t){var i=EJ(t,e);return i===void 0&&i===n?TJ(t,e):$J(n,i,AJ|DJ)}}hE.exports=NJ});var yE=I((Ule,_E)=>{function FJ(e){return function(n){return n?.[e]}}_E.exports=FJ});var bE=I((Hle,vE)=>{var qJ=yd();function VJ(e){return function(n){return qJ(n,e)}}vE.exports=VJ});var xE=I((Wle,CE)=>{var jJ=yE(),RJ=bE(),BJ=_d(),LJ=Ra();function zJ(e){return BJ(e)?jJ(LJ(e)):RJ(e)}CE.exports=zJ});var vg=I((Gle,wE)=>{var UJ=aE(),HJ=gE(),WJ=hg(),GJ=qn(),KJ=xE();function JJ(e){return typeof e=="function"?e:e==null?WJ:typeof e=="object"?GJ(e)?HJ(e[0],e[1]):UJ(e):KJ(e)}wE.exports=JJ});var SE=I((Kle,IE)=>{var YJ=Yh(),XJ=Z$(),ZJ=vg(),QJ=qn();function eY(e,n){var t=QJ(e)?YJ:XJ;return t(e,ZJ(n,3))}IE.exports=eY});var EE=I((Jle,$E)=>{var tY=gg(),nY=ll();function iY(e,n){var t=-1,i=nY(e)?Array(e.length):[];return tY(e,function(r,a,l){i[++t]=n(r,a,l)}),i}$E.exports=iY});var PE=I((Yle,TE)=>{var rY=hd(),oY=vg(),aY=EE(),sY=qn();function lY(e,n){var t=sY(e)?rY:aY;return t(e,oY(n,3))}TE.exports=lY});var ME=I((Xle,OE)=>{var uY=pg(),cY=0;function dY(e){var n=++cY;return uY(e)+n}OE.exports=dY});var lT=I((Rg,sT)=>{"use strict";Object.defineProperty(Rg,"__esModule",{value:!0});var rT=xe(),oT=["undefined","string","number","object","function","boolean","symbol"];function aT(){return{keyword:"typeof",schemaType:["string","array"],code(e){let{data:n,schema:t,schemaValue:i}=e;e.fail(typeof t=="string"?(0,rT._)`typeof ${n} != ${t}`:(0,rT._)`${i}.indexOf(typeof ${n}) < 0`)},metaSchema:{anyOf:[{type:"string",enum:oT},{type:"array",items:{type:"string",enum:oT}}]}}}Rg.default=aT;sT.exports=aT});var dT=I((Il,cT)=>{"use strict";var jY=Il&&Il.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Il,"__esModule",{value:!0});var RY=jY(lT()),uT=e=>e.addKeyword((0,RY.default)());Il.default=uT;cT.exports=uT});var hT=I((Bg,mT)=>{"use strict";Object.defineProperty(Bg,"__esModule",{value:!0});var Dd={Object,Array,Function,Number,String,Date,RegExp};typeof Buffer<"u"&&(Dd.Buffer=Buffer);typeof Promise<"u"&&(Dd.Promise=Promise);var pT=Object.assign(BY,{CONSTRUCTORS:Dd});function BY(){return{keyword:"instanceof",schemaType:["string","array"],compile(e){if(typeof e=="string"){let n=fT(e);return t=>t instanceof n}if(Array.isArray(e)){let n=e.map(fT);return t=>{for(let i of n)if(t instanceof i)return!0;return!1}}throw new Error("ajv implementation error")},metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}}function fT(e){let n=Dd[e];if(n)return n;throw new Error(`invalid "instanceof" keyword value ${e}`)}Bg.default=pT;mT.exports=pT});var yT=I((Sl,_T)=>{"use strict";var LY=Sl&&Sl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sl,"__esModule",{value:!0});var zY=LY(hT()),gT=e=>e.addKeyword((0,zY.default)());Sl.default=gT;_T.exports=gT});var zg=I(Lg=>{"use strict";Object.defineProperty(Lg,"__esModule",{value:!0});function UY(e){return()=>({keyword:e,type:"number",schemaType:"array",macro:function([t,i]){return n(t,i),e==="range"?{minimum:t,maximum:i}:{exclusiveMinimum:t,exclusiveMaximum:i}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function n(t,i){if(t>i||e==="exclusiveRange"&&t===i)throw new Error("There are no numbers in range")}}Lg.default=UY});var CT=I(($l,bT)=>{"use strict";var HY=$l&&$l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($l,"__esModule",{value:!0});var WY=HY(zg()),vT=(0,WY.default)("range");$l.default=vT;bT.exports=vT});var IT=I((El,wT)=>{"use strict";var GY=El&&El.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(El,"__esModule",{value:!0});var KY=GY(CT()),xT=e=>e.addKeyword((0,KY.default)());El.default=xT;wT.exports=xT});var ET=I((Tl,$T)=>{"use strict";var JY=Tl&&Tl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tl,"__esModule",{value:!0});var YY=JY(zg()),ST=(0,YY.default)("exclusiveRange");Tl.default=ST;$T.exports=ST});var OT=I((Pl,PT)=>{"use strict";var XY=Pl&&Pl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pl,"__esModule",{value:!0});var ZY=XY(ET()),TT=e=>e.addKeyword((0,ZY.default)());Pl.default=TT;PT.exports=TT});var Ol=I(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.usePattern=Ga.metaSchemaRef=void 0;var QY=xe(),eX="http://json-schema.org/schema";function tX({defaultMeta:e}={}){return e===!1?{}:{$ref:e||eX}}Ga.metaSchemaRef=tX;function nX({gen:e,it:{opts:n}},t,i=n.unicodeRegExp?"u":""){let r=new RegExp(t,i);return e.scopeValue("pattern",{key:r.toString(),ref:r,code:(0,QY._)`new RegExp(${t}, ${i})`})}Ga.usePattern=nX});var DT=I((Ug,AT)=>{"use strict";Object.defineProperty(Ug,"__esModule",{value:!0});var iX=xe(),MT=Ol(),rX={type:"object",properties:{pattern:{type:"string"},flags:{type:"string",nullable:!0}},required:["pattern"],additionalProperties:!1},oX=/^\/(.*)\/([gimuy]*)$/;function kT(){return{keyword:"regexp",type:"string",schemaType:["string","object"],code(e){let{data:n,schema:t}=e,i=r(t);e.pass((0,iX._)`${i}.test(${n})`);function r(a){if(typeof a=="object")return(0,MT.usePattern)(e,a.pattern,a.flags);let l=oX.exec(a);if(l)return(0,MT.usePattern)(e,l[1],l[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},rX]}}}Ug.default=kT;AT.exports=kT});var qT=I((Ml,FT)=>{"use strict";var aX=Ml&&Ml.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ml,"__esModule",{value:!0});var sX=aX(DT()),NT=e=>e.addKeyword((0,sX.default)());Ml.default=NT;FT.exports=NT});var BT=I((Hg,RT)=>{"use strict";Object.defineProperty(Hg,"__esModule",{value:!0});var qo=xe(),Nd={trimStart:e=>e.trimStart(),trimEnd:e=>e.trimEnd(),trimLeft:e=>e.trimStart(),trimRight:e=>e.trimEnd(),trim:e=>e.trim(),toLowerCase:e=>e.toLowerCase(),toUpperCase:e=>e.toUpperCase(),toEnumCase:(e,n)=>n?.hash[jT(e)]||e},VT=Object.assign(lX,{transform:Nd});function lX(){return{keyword:"transform",schemaType:"array",before:"enum",code(e){let{gen:n,data:t,schema:i,parentSchema:r,it:a}=e,{parentData:l,parentDataProperty:u}=a,d=i;if(!d.length)return;let p;if(d.includes("toEnumCase")){let _=uX(r);p=n.scopeValue("obj",{ref:_,code:(0,qo.stringify)(_)})}n.if((0,qo._)`typeof ${t} == "string" && ${l} !== undefined`,()=>{n.assign(t,h(d.slice())),n.assign((0,qo._)`${l}[${u}]`,t)});function h(_){if(!_.length)return t;let C=_.pop();if(!(C in Nd))throw new Error(`transform: unknown transformation ${C}`);let T=n.scopeValue("func",{ref:Nd[C],code:(0,qo._)`require("ajv-keywords/dist/definitions/transform").transform${(0,qo.getProperty)(C)}`}),x=h(_);return p&&C==="toEnumCase"?(0,qo._)`${T}(${x}, ${p})`:(0,qo._)`${T}(${x})`}},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(Nd)}}}}function uX(e){let n={hash:{}};if(!e.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(let t of e.enum){if(typeof t!="string")continue;let i=jT(t);if(n.hash[i])throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique');n.hash[i]=t}return n}function jT(e){return e.toLowerCase()}Hg.default=VT;RT.exports=VT});var UT=I((kl,zT)=>{"use strict";var cX=kl&&kl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kl,"__esModule",{value:!0});var dX=cX(BT()),LT=e=>e.addKeyword((0,dX.default)());kl.default=LT;zT.exports=LT});var GT=I((Wg,WT)=>{"use strict";Object.defineProperty(Wg,"__esModule",{value:!0});var fX=wc(),pX=["number","integer","string","boolean","null"];function HT(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(e,n){let t=mX(e,n);return i=>{if(i.length<=1)return!0;for(let r=0;r<e.length;r++){let a=e[r];if(t[r]){let l={};for(let u of i){if(!u||typeof u!="object")continue;let d=u[a];if(!(d&&typeof d=="object")){if(typeof d=="string"&&(d='"'+d),l[d])return!1;l[d]=!0}}}else for(let l=i.length;l--;){let u=i[l];if(!(!u||typeof u!="object"))for(let d=l;d--;){let p=i[d];if(p&&typeof p=="object"&&fX(u[a],p[a]))return!1}}}return!0}},metaSchema:{type:"array",items:{type:"string"}}}}Wg.default=HT;function mX(e,n){return e.map(t=>{var i,r,a;let l=(a=(r=(i=n.items)===null||i===void 0?void 0:i.properties)===null||r===void 0?void 0:r[t])===null||a===void 0?void 0:a.type;return Array.isArray(l)?!l.includes("object")&&!l.includes("array"):pX.includes(l)})}WT.exports=HT});var YT=I((Al,JT)=>{"use strict";var hX=Al&&Al.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Al,"__esModule",{value:!0});var gX=hX(GT()),KT=e=>e.addKeyword((0,gX.default)());Al.default=KT;JT.exports=KT});var QT=I((Gg,ZT)=>{"use strict";Object.defineProperty(Gg,"__esModule",{value:!0});function XT(){return{keyword:"allRequired",type:"object",schemaType:"boolean",macro(e,n){if(!e)return!0;let t=Object.keys(n.properties);return t.length===0?!0:{required:t}},dependencies:["properties"]}}Gg.default=XT;ZT.exports=XT});var nP=I((Dl,tP)=>{"use strict";var _X=Dl&&Dl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Dl,"__esModule",{value:!0});var yX=_X(QT()),eP=e=>e.addKeyword((0,yX.default)());Dl.default=eP;tP.exports=eP});var Jg=I(Kg=>{"use strict";Object.defineProperty(Kg,"__esModule",{value:!0});function vX(e){return()=>({keyword:e,type:"object",schemaType:"array",macro(n){return n.length===0?!0:n.length===1?{required:n}:{[e==="anyRequired"?"anyOf":"oneOf"]:n.map(i=>({required:[i]}))}},metaSchema:{type:"array",items:{type:"string"}}})}Kg.default=vX});var oP=I((Nl,rP)=>{"use strict";var bX=Nl&&Nl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nl,"__esModule",{value:!0});var CX=bX(Jg()),iP=(0,CX.default)("anyRequired");Nl.default=iP;rP.exports=iP});var lP=I((Fl,sP)=>{"use strict";var xX=Fl&&Fl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fl,"__esModule",{value:!0});var wX=xX(oP()),aP=e=>e.addKeyword((0,wX.default)());Fl.default=aP;sP.exports=aP});var dP=I((ql,cP)=>{"use strict";var IX=ql&&ql.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ql,"__esModule",{value:!0});var SX=IX(Jg()),uP=(0,SX.default)("oneRequired");ql.default=uP;cP.exports=uP});var mP=I((Vl,pP)=>{"use strict";var $X=Vl&&Vl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vl,"__esModule",{value:!0});var EX=$X(dP()),fP=e=>e.addKeyword((0,EX.default)());Vl.default=fP;pP.exports=fP});var _P=I((Yg,gP)=>{"use strict";Object.defineProperty(Yg,"__esModule",{value:!0});var Fd=xe(),TX=Ol(),PX={message:({params:{missingPattern:e}})=>(0,Fd.str)`should have property matching pattern '${e}'`,params:({params:{missingPattern:e}})=>(0,Fd._)`{missingPattern: ${e}}`};function hP(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:PX,code(e){let{gen:n,schema:t,data:i}=e;if(t.length===0)return;let r=n.let("valid",!0);for(let l of t)a(l);function a(l){let u=n.let("matched",!1);n.forIn("key",i,d=>{n.assign(u,(0,Fd._)`${(0,TX.usePattern)(e,l)}.test(${d})`),n.if(u,()=>n.break())}),e.setParams({missingPattern:l}),n.assign(r,(0,Fd.and)(r,u)),e.pass(r)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}Yg.default=hP;gP.exports=hP});var bP=I((jl,vP)=>{"use strict";var OX=jl&&jl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jl,"__esModule",{value:!0});var MX=OX(_P()),yP=e=>e.addKeyword((0,MX.default)());jl.default=yP;vP.exports=yP});var wP=I((Xg,xP)=>{"use strict";Object.defineProperty(Xg,"__esModule",{value:!0});function CP(){return{keyword:"prohibited",type:"object",schemaType:"array",macro:function(e){return e.length===0?!0:e.length===1?{not:{required:e}}:{not:{anyOf:e.map(n=>({required:[n]}))}}},metaSchema:{type:"array",items:{type:"string"}}}}Xg.default=CP;xP.exports=CP});var $P=I((Rl,SP)=>{"use strict";var kX=Rl&&Rl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rl,"__esModule",{value:!0});var AX=kX(wP()),IP=e=>e.addKeyword((0,AX.default)());Rl.default=IP;SP.exports=IP});var PP=I((Zg,TP)=>{"use strict";Object.defineProperty(Zg,"__esModule",{value:!0});var DX=Ol();function EP(e){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(n){let t=[];for(let i in n)t.push(NX(i,n[i]));return{allOf:t}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,DX.metaSchemaRef)(e)}}}Zg.default=EP;function NX(e,n){let t=e.split("/"),i={},r=i;for(let a=1;a<t.length;a++){let l=t[a],u=a===t.length-1;l=FX(l);let d=r.properties={},p;if(/[0-9]+/.test(l)){let h=+l;for(p=r.items=[],r.type=["object","array"];h--;)p.push({})}else r.type="object";r=u?n:{},d[l]=r,p&&p.push(r)}return i}function FX(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}TP.exports=EP});var kP=I((Bl,MP)=>{"use strict";var qX=Bl&&Bl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bl,"__esModule",{value:!0});var VX=qX(PP()),OP=(e,n)=>e.addKeyword((0,VX.default)(n));Bl.default=OP;MP.exports=OP});var NP=I((Qg,DP)=>{"use strict";Object.defineProperty(Qg,"__esModule",{value:!0});var Ll=xe();function AP(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(e){let{schema:n,data:t}=e,i=n.map(a=>(0,Ll._)`(${r(a)}) === undefined`);e.fail((0,Ll.or)(...i));function r(a){if(a==="")throw new Error("empty JSON pointer not allowed");let l=a.split("/"),u=t,d=l.map((p,h)=>h?u=(0,Ll._)`${u}${(0,Ll.getProperty)(jX(p))}`:u);return(0,Ll.and)(...d)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}Qg.default=AP;function jX(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}DP.exports=AP});var VP=I((zl,qP)=>{"use strict";var RX=zl&&zl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zl,"__esModule",{value:!0});var BX=RX(NP()),FP=e=>e.addKeyword((0,BX.default)());zl.default=FP;qP.exports=FP});var LP=I((n0,BP)=>{"use strict";Object.defineProperty(n0,"__esModule",{value:!0});var e0={},t0={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:e=>{var n;let t=(n=e?.max)!==null&&n!==void 0?n:2;return()=>Math.floor(Math.random()*t)},seq:e=>{var n;let t=(n=e?.name)!==null&&n!==void 0?n:"";return e0[t]||(e0[t]=0),()=>e0[t]++}},jP=Object.assign(LX,{DEFAULTS:t0});function LX(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(e,n,t){if(!t.opts.useDefaults||t.compositeRule)return()=>!0;let i={};for(let a in e)i[a]=zX(e[a]);let r=t.opts.useDefaults==="empty";return a=>{for(let l in e)(a[l]===void 0||r&&(a[l]===null||a[l]===""))&&(a[l]=i[l]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function zX(e){return typeof e=="object"?UX(e):HX(e)}function UX({func:e,args:n}){let t=t0[e];return RP(e,t),t(n)}function HX(e=""){let n=t0[e];return RP(e,n),n()}function RP(e,n){if(!n)throw new Error(`invalid "dynamicDefaults" keyword property value: ${e}`)}n0.default=jP;BP.exports=jP});var HP=I((Ul,UP)=>{"use strict";var WX=Ul&&Ul.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ul,"__esModule",{value:!0});var GX=WX(LP()),zP=e=>e.addKeyword((0,GX.default)());Ul.default=zP;UP.exports=zP});var KP=I((i0,GP)=>{"use strict";Object.defineProperty(i0,"__esModule",{value:!0});var yr=xe(),KX=Ol(),JX={message:({params:{schemaProp:e}})=>e?(0,yr.str)`should match case "${e}" schema`:(0,yr.str)`should match default case schema`,params:({params:{schemaProp:e}})=>e?(0,yr._)`{failingCase: ${e}}`:(0,yr._)`{failingDefault: true}`};function WP(e){let n=(0,KX.metaSchemaRef)(e);return[{keyword:"select",schemaType:["string","number","boolean","null"],$data:!0,error:JX,dependencies:["selectCases"],code(t){let{gen:i,schemaCode:r,parentSchema:a}=t;t.block$data(yr.nil,()=>{let l=i.let("valid",!0),u=i.name("_valid"),d=i.const("value",(0,yr._)`${r} === null ? "null" : ${r}`);i.if(!1);for(let p in a.selectCases){t.setParams({schemaProp:p}),i.elseIf((0,yr._)`"" + ${d} == ${p}`);let h=t.subschema({keyword:"selectCases",schemaProp:p},u);t.mergeEvaluated(h,yr.Name),i.assign(l,u)}if(i.else(),a.selectDefault!==void 0){t.setParams({schemaProp:void 0});let p=t.subschema({keyword:"selectDefault"},u);t.mergeEvaluated(p,yr.Name),i.assign(l,u)}i.endIf(),t.pass(l)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:n}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:n}]}i0.default=WP;GP.exports=WP});var XP=I((Hl,YP)=>{"use strict";var YX=Hl&&Hl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hl,"__esModule",{value:!0});var XX=YX(KP()),JP=(e,n)=>((0,XX.default)(n).forEach(t=>e.addKeyword(t)),e);Hl.default=JP;YP.exports=JP});var eO=I((Wl,QP)=>{"use strict";var pn=Wl&&Wl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wl,"__esModule",{value:!0});var ZX=pn(dT()),QX=pn(yT()),eZ=pn(IT()),tZ=pn(OT()),nZ=pn(qT()),iZ=pn(UT()),rZ=pn(YT()),oZ=pn(nP()),aZ=pn(lP()),sZ=pn(mP()),lZ=pn(bP()),uZ=pn($P()),cZ=pn(kP()),dZ=pn(VP()),fZ=pn(HP()),pZ=pn(XP()),ZP={typeof:ZX.default,instanceof:QX.default,range:eZ.default,exclusiveRange:tZ.default,regexp:nZ.default,transform:iZ.default,uniqueItemProperties:rZ.default,allRequired:oZ.default,anyRequired:aZ.default,oneRequired:sZ.default,patternRequired:lZ.default,prohibited:uZ.default,deepProperties:cZ.default,deepRequired:dZ.default,dynamicDefaults:fZ.default,select:pZ.default};Wl.default=ZP;QP.exports=ZP});var nO=I((Gl,r0)=>{"use strict";var mZ=Gl&&Gl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gl,"__esModule",{value:!0});var tO=mZ(eO()),Vd=(e,n)=>{if(Array.isArray(n)){for(let t of n)qd(t)(e);return e}if(n)return qd(n)(e),e;for(n in tO.default)qd(n)(e);return e};Vd.get=qd;function qd(e){let n=tO.default[e];if(!n)throw new Error("Unknown keyword "+e);return n}Gl.default=Vd;r0.exports=Vd;r0.exports.default=Vd});var Qa=st(lc(),1);var s0=st(qC(),1),l0=st(cx(),1);var Fh={$schema:"http://json-schema.org/draft-06/schema#",$id:"http://json-schema.org/draft-06/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},title:{type:"string"},description:{type:"string"},default:{},examples:{type:"array",items:{}},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:{},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:{}};var qh={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var Re=st(ZS(),1);var Xi=st(QS(),1),Ni=st(N2(),1);var aO=st(B$(),1),sO=st(SE(),1),lO=st(PE(),1),Ld=st(qn(),1),uO=st(mg(),1),br=st(ME(),1);function kE(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Ji(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?kE(Object(t),!0).forEach(function(i){fY(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kE(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function wd(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wd=function(n){return typeof n}:wd=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wd(e)}function fY(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function gr(){return gr=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},gr.apply(this,arguments)}function pY(e,n){if(e==null)return{};var t={},i=Object.keys(e),r,a;for(a=0;a<i.length;a++)r=i[a],!(n.indexOf(r)>=0)&&(t[r]=e[r]);return t}function mY(e,n){if(e==null)return{};var t=pY(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)i=a[r],!(n.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}var hY="1.15.6";function hr(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var _r=hr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Cl=hr(/Edge/i),AE=hr(/firefox/i),gl=hr(/safari/i)&&!hr(/chrome/i)&&!hr(/android/i),Ag=hr(/iP(ad|od|hone)/i),BE=hr(/chrome/i)&&hr(/android/i),LE={capture:!1,passive:!1};function Ze(e,n,t){e.addEventListener(n,t,!_r&&LE)}function Je(e,n,t){e.removeEventListener(n,t,!_r&&LE)}function Td(e,n){if(n){if(n[0]===">"&&(n=n.substring(1)),e)try{if(e.matches)return e.matches(n);if(e.msMatchesSelector)return e.msMatchesSelector(n);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(n)}catch{return!1}return!1}}function zE(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ki(e,n,t,i){if(e){t=t||document;do{if(n!=null&&(n[0]===">"?e.parentNode===t&&Td(e,n):Td(e,n))||i&&e===t)return e;if(e===t)break}while(e=zE(e))}return null}var DE=/\s+/g;function Jn(e,n,t){if(e&&n)if(e.classList)e.classList[t?"add":"remove"](n);else{var i=(" "+e.className+" ").replace(DE," ").replace(" "+n+" "," ");e.className=(i+(t?" "+n:"")).replace(DE," ")}}function Ee(e,n,t){var i=e&&e.style;if(i){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(t=e.currentStyle),n===void 0?t:t[n];!(n in i)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),i[n]=t+(typeof t=="string"?"":"px")}}function Ha(e,n){var t="";if(typeof e=="string")t=e;else do{var i=Ee(e,"transform");i&&i!=="none"&&(t=i+" "+t)}while(!n&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function UE(e,n,t){if(e){var i=e.getElementsByTagName(n),r=0,a=i.length;if(t)for(;r<a;r++)t(i[r],r);return i}return[]}function Ki(){var e=document.scrollingElement;return e||document.documentElement}function Ht(e,n,t,i,r){if(!(!e.getBoundingClientRect&&e!==window)){var a,l,u,d,p,h,_;if(e!==window&&e.parentNode&&e!==Ki()?(a=e.getBoundingClientRect(),l=a.top,u=a.left,d=a.bottom,p=a.right,h=a.height,_=a.width):(l=0,u=0,d=window.innerHeight,p=window.innerWidth,h=window.innerHeight,_=window.innerWidth),(n||t)&&e!==window&&(r=r||e.parentNode,!_r))do if(r&&r.getBoundingClientRect&&(Ee(r,"transform")!=="none"||t&&Ee(r,"position")!=="static")){var C=r.getBoundingClientRect();l-=C.top+parseInt(Ee(r,"border-top-width")),u-=C.left+parseInt(Ee(r,"border-left-width")),d=l+a.height,p=u+a.width;break}while(r=r.parentNode);if(i&&e!==window){var T=Ha(r||e),x=T&&T.a,O=T&&T.d;T&&(l/=O,u/=x,_/=x,h/=O,d=l+h,p=u+_)}return{top:l,left:u,bottom:d,right:p,width:_,height:h}}}function NE(e,n,t){for(var i=eo(e,!0),r=Ht(e)[n];i;){var a=Ht(i)[t],l=void 0;if(t==="top"||t==="left"?l=r>=a:l=r<=a,!l)return i;if(i===Ki())break;i=eo(i,!1)}return!1}function Wa(e,n,t,i){for(var r=0,a=0,l=e.children;a<l.length;){if(l[a].style.display!=="none"&&l[a]!==Te.ghost&&(i||l[a]!==Te.dragged)&&ki(l[a],t.draggable,e,!1)){if(r===n)return l[a];r++}a++}return null}function Dg(e,n){for(var t=e.lastElementChild;t&&(t===Te.ghost||Ee(t,"display")==="none"||n&&!Td(t,n));)t=t.previousElementSibling;return t||null}function pi(e,n){var t=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==Te.clone&&(!n||Td(e,n))&&t++;return t}function FE(e){var n=0,t=0,i=Ki();if(e)do{var r=Ha(e),a=r.a,l=r.d;n+=e.scrollLeft*a,t+=e.scrollTop*l}while(e!==i&&(e=e.parentNode));return[n,t]}function gY(e,n){for(var t in e)if(e.hasOwnProperty(t)){for(var i in n)if(n.hasOwnProperty(i)&&n[i]===e[t][i])return Number(t)}return-1}function eo(e,n){if(!e||!e.getBoundingClientRect)return Ki();var t=e,i=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=Ee(t);if(t.clientWidth<t.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Ki();if(i||n)return t;i=!0}}while(t=t.parentNode);return Ki()}function _Y(e,n){if(e&&n)for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function bg(e,n){return Math.round(e.top)===Math.round(n.top)&&Math.round(e.left)===Math.round(n.left)&&Math.round(e.height)===Math.round(n.height)&&Math.round(e.width)===Math.round(n.width)}var _l;function HE(e,n){return function(){if(!_l){var t=arguments,i=this;t.length===1?e.call(i,t[0]):e.apply(i,t),_l=setTimeout(function(){_l=void 0},n)}}}function yY(){clearTimeout(_l),_l=void 0}function WE(e,n,t){e.scrollLeft+=n,e.scrollTop+=t}function GE(e){var n=window.Polymer,t=window.jQuery||window.Zepto;return n&&n.dom?n.dom(e).cloneNode(!0):t?t(e).clone(!0)[0]:e.cloneNode(!0)}function KE(e,n,t){var i={};return Array.from(e.children).forEach(function(r){var a,l,u,d;if(!(!ki(r,n.draggable,e,!1)||r.animated||r===t)){var p=Ht(r);i.left=Math.min((a=i.left)!==null&&a!==void 0?a:1/0,p.left),i.top=Math.min((l=i.top)!==null&&l!==void 0?l:1/0,p.top),i.right=Math.max((u=i.right)!==null&&u!==void 0?u:-1/0,p.right),i.bottom=Math.max((d=i.bottom)!==null&&d!==void 0?d:-1/0,p.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var jn="Sortable"+new Date().getTime();function vY(){var e=[],n;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(r){if(!(Ee(r,"display")==="none"||r===Te.ghost)){e.push({target:r,rect:Ht(r)});var a=Ji({},e[e.length-1].rect);if(r.thisAnimationDuration){var l=Ha(r,!0);l&&(a.top-=l.f,a.left-=l.e)}r.fromRect=a}})}},addAnimationState:function(i){e.push(i)},removeAnimationState:function(i){e.splice(gY(e,{target:i}),1)},animateAll:function(i){var r=this;if(!this.options.animation){clearTimeout(n),typeof i=="function"&&i();return}var a=!1,l=0;e.forEach(function(u){var d=0,p=u.target,h=p.fromRect,_=Ht(p),C=p.prevFromRect,T=p.prevToRect,x=u.rect,O=Ha(p,!0);O&&(_.top-=O.f,_.left-=O.e),p.toRect=_,p.thisAnimationDuration&&bg(C,_)&&!bg(h,_)&&(x.top-_.top)/(x.left-_.left)===(h.top-_.top)/(h.left-_.left)&&(d=CY(x,C,T,r.options)),bg(_,h)||(p.prevFromRect=h,p.prevToRect=_,d||(d=r.options.animation),r.animate(p,x,_,d)),d&&(a=!0,l=Math.max(l,d),clearTimeout(p.animationResetTimer),p.animationResetTimer=setTimeout(function(){p.animationTime=0,p.prevFromRect=null,p.fromRect=null,p.prevToRect=null,p.thisAnimationDuration=null},d),p.thisAnimationDuration=d)}),clearTimeout(n),a?n=setTimeout(function(){typeof i=="function"&&i()},l):typeof i=="function"&&i(),e=[]},animate:function(i,r,a,l){if(l){Ee(i,"transition",""),Ee(i,"transform","");var u=Ha(this.el),d=u&&u.a,p=u&&u.d,h=(r.left-a.left)/(d||1),_=(r.top-a.top)/(p||1);i.animatingX=!!h,i.animatingY=!!_,Ee(i,"transform","translate3d("+h+"px,"+_+"px,0)"),this.forRepaintDummy=bY(i),Ee(i,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),Ee(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){Ee(i,"transition",""),Ee(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},l)}}}}function bY(e){return e.offsetWidth}function CY(e,n,t,i){return Math.sqrt(Math.pow(n.top-e.top,2)+Math.pow(n.left-e.left,2))/Math.sqrt(Math.pow(n.top-t.top,2)+Math.pow(n.left-t.left,2))*i.animation}var Ba=[],Cg={initializeByDefault:!0},xl={mount:function(n){for(var t in Cg)Cg.hasOwnProperty(t)&&!(t in n)&&(n[t]=Cg[t]);Ba.forEach(function(i){if(i.pluginName===n.pluginName)throw"Sortable: Cannot mount plugin ".concat(n.pluginName," more than once")}),Ba.push(n)},pluginEvent:function(n,t,i){var r=this;this.eventCanceled=!1,i.cancel=function(){r.eventCanceled=!0};var a=n+"Global";Ba.forEach(function(l){t[l.pluginName]&&(t[l.pluginName][a]&&t[l.pluginName][a](Ji({sortable:t},i)),t.options[l.pluginName]&&t[l.pluginName][n]&&t[l.pluginName][n](Ji({sortable:t},i)))})},initializePlugins:function(n,t,i,r){Ba.forEach(function(u){var d=u.pluginName;if(!(!n.options[d]&&!u.initializeByDefault)){var p=new u(n,t,n.options);p.sortable=n,p.options=n.options,n[d]=p,gr(i,p.defaults)}});for(var a in n.options)if(n.options.hasOwnProperty(a)){var l=this.modifyOption(n,a,n.options[a]);typeof l<"u"&&(n.options[a]=l)}},getEventProperties:function(n,t){var i={};return Ba.forEach(function(r){typeof r.eventProperties=="function"&&gr(i,r.eventProperties.call(t[r.pluginName],n))}),i},modifyOption:function(n,t,i){var r;return Ba.forEach(function(a){n[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[t]=="function"&&(r=a.optionListeners[t].call(n[a.pluginName],i))}),r}};function xY(e){var n=e.sortable,t=e.rootEl,i=e.name,r=e.targetEl,a=e.cloneEl,l=e.toEl,u=e.fromEl,d=e.oldIndex,p=e.newIndex,h=e.oldDraggableIndex,_=e.newDraggableIndex,C=e.originalEvent,T=e.putSortable,x=e.extraEventProperties;if(n=n||t&&t[jn],!!n){var O,F=n.options,z="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!_r&&!Cl?O=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(O=document.createEvent("Event"),O.initEvent(i,!0,!0)),O.to=l||t,O.from=u||t,O.item=r||t,O.clone=a,O.oldIndex=d,O.newIndex=p,O.oldDraggableIndex=h,O.newDraggableIndex=_,O.originalEvent=C,O.pullMode=T?T.lastPutMode:void 0;var ne=Ji(Ji({},x),xl.getEventProperties(i,n));for(var re in ne)O[re]=ne[re];t&&t.dispatchEvent(O),F[z]&&F[z].call(n,O)}}var wY=["evt"],Vn=function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=i.evt,a=mY(i,wY);xl.pluginEvent.bind(Te)(n,t,Ji({dragEl:ce,parentEl:jt,ghostEl:ke,rootEl:Ot,nextEl:Fo,lastDownEl:Id,cloneEl:Dt,cloneHidden:Qr,dragStarted:pl,putSortable:on,activeSortable:Te.active,originalEvent:r,oldIndex:Ua,oldDraggableIndex:yl,newIndex:Yn,newDraggableIndex:Zr,hideGhostForTarget:ZE,unhideGhostForTarget:QE,cloneNowHidden:function(){Qr=!0},cloneNowShown:function(){Qr=!1},dispatchSortableEvent:function(u){En({sortable:t,name:u,originalEvent:r})}},a))};function En(e){xY(Ji({putSortable:on,cloneEl:Dt,targetEl:ce,rootEl:Ot,oldIndex:Ua,oldDraggableIndex:yl,newIndex:Yn,newDraggableIndex:Zr},e))}var ce,jt,ke,Ot,Fo,Id,Dt,Qr,Ua,Yn,yl,Zr,vd,on,za=!1,Pd=!1,Od=[],Do,Mi,xg,wg,qE,VE,pl,La,vl,bl=!1,bd=!1,Sd,fn,Ig=[],Pg=!1,Md=[],Ad=typeof document<"u",Cd=Ag,jE=Cl||_r?"cssFloat":"float",IY=Ad&&!BE&&!Ag&&"draggable"in document.createElement("div"),JE=function(){if(Ad){if(_r)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),YE=function(n,t){var i=Ee(n),r=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),a=Wa(n,0,t),l=Wa(n,1,t),u=a&&Ee(a),d=l&&Ee(l),p=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+Ht(a).width,h=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+Ht(l).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&u.float&&u.float!=="none"){var _=u.float==="left"?"left":"right";return l&&(d.clear==="both"||d.clear===_)?"vertical":"horizontal"}return a&&(u.display==="block"||u.display==="flex"||u.display==="table"||u.display==="grid"||p>=r&&i[jE]==="none"||l&&i[jE]==="none"&&p+h>r)?"vertical":"horizontal"},SY=function(n,t,i){var r=i?n.left:n.top,a=i?n.right:n.bottom,l=i?n.width:n.height,u=i?t.left:t.top,d=i?t.right:t.bottom,p=i?t.width:t.height;return r===u||a===d||r+l/2===u+p/2},$Y=function(n,t){var i;return Od.some(function(r){var a=r[jn].options.emptyInsertThreshold;if(!(!a||Dg(r))){var l=Ht(r),u=n>=l.left-a&&n<=l.right+a,d=t>=l.top-a&&t<=l.bottom+a;if(u&&d)return i=r}}),i},XE=function(n){function t(a,l){return function(u,d,p,h){var _=u.options.group.name&&d.options.group.name&&u.options.group.name===d.options.group.name;if(a==null&&(l||_))return!0;if(a==null||a===!1)return!1;if(l&&a==="clone")return a;if(typeof a=="function")return t(a(u,d,p,h),l)(u,d,p,h);var C=(l?u:d).options.group.name;return a===!0||typeof a=="string"&&a===C||a.join&&a.indexOf(C)>-1}}var i={},r=n.group;(!r||wd(r)!="object")&&(r={name:r}),i.name=r.name,i.checkPull=t(r.pull,!0),i.checkPut=t(r.put),i.revertClone=r.revertClone,n.group=i},ZE=function(){!JE&&ke&&Ee(ke,"display","none")},QE=function(){!JE&&ke&&Ee(ke,"display","")};Ad&&!BE&&document.addEventListener("click",function(e){if(Pd)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Pd=!1,!1},!0);var No=function(n){if(ce){n=n.touches?n.touches[0]:n;var t=$Y(n.clientX,n.clientY);if(t){var i={};for(var r in n)n.hasOwnProperty(r)&&(i[r]=n[r]);i.target=i.rootEl=t,i.preventDefault=void 0,i.stopPropagation=void 0,t[jn]._onDragOver(i)}}},EY=function(n){ce&&ce.parentNode[jn]._isOutsideThisEl(n.target)};function Te(e,n){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=n=gr({},n),e[jn]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return YE(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,u){l.setData("Text",u.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Te.supportPointer!==!1&&"PointerEvent"in window&&(!gl||Ag),emptyInsertThreshold:5};xl.initializePlugins(this,e,t);for(var i in t)!(i in n)&&(n[i]=t[i]);XE(n);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=n.forceFallback?!1:IY,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?Ze(e,"pointerdown",this._onTapStart):(Ze(e,"mousedown",this._onTapStart),Ze(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ze(e,"dragover",this),Ze(e,"dragenter",this)),Od.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),gr(this,vY())}Te.prototype={constructor:Te,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(La=null)},_getDirection:function(n,t){return typeof this.options.direction=="function"?this.options.direction.call(this,n,t,ce):this.options.direction},_onTapStart:function(n){if(n.cancelable){var t=this,i=this.el,r=this.options,a=r.preventOnFilter,l=n.type,u=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,d=(u||n).target,p=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||d,h=r.filter;if(NY(i),!ce&&!(/mousedown|pointerdown/.test(l)&&n.button!==0||r.disabled)&&!p.isContentEditable&&!(!this.nativeDraggable&&gl&&d&&d.tagName.toUpperCase()==="SELECT")&&(d=ki(d,r.draggable,i,!1),!(d&&d.animated)&&Id!==d)){if(Ua=pi(d),yl=pi(d,r.draggable),typeof h=="function"){if(h.call(this,n,d,this)){En({sortable:t,rootEl:p,name:"filter",targetEl:d,toEl:i,fromEl:i}),Vn("filter",t,{evt:n}),a&&n.preventDefault();return}}else if(h&&(h=h.split(",").some(function(_){if(_=ki(p,_.trim(),i,!1),_)return En({sortable:t,rootEl:_,name:"filter",targetEl:d,fromEl:i,toEl:i}),Vn("filter",t,{evt:n}),!0}),h)){a&&n.preventDefault();return}r.handle&&!ki(p,r.handle,i,!1)||this._prepareDragStart(n,u,d)}}},_prepareDragStart:function(n,t,i){var r=this,a=r.el,l=r.options,u=a.ownerDocument,d;if(i&&!ce&&i.parentNode===a){var p=Ht(i);if(Ot=a,ce=i,jt=ce.parentNode,Fo=ce.nextSibling,Id=i,vd=l.group,Te.dragged=ce,Do={target:ce,clientX:(t||n).clientX,clientY:(t||n).clientY},qE=Do.clientX-p.left,VE=Do.clientY-p.top,this._lastX=(t||n).clientX,this._lastY=(t||n).clientY,ce.style["will-change"]="all",d=function(){if(Vn("delayEnded",r,{evt:n}),Te.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!AE&&r.nativeDraggable&&(ce.draggable=!0),r._triggerDragStart(n,t),En({sortable:r,name:"choose",originalEvent:n}),Jn(ce,l.chosenClass,!0)},l.ignore.split(",").forEach(function(h){UE(ce,h.trim(),Sg)}),Ze(u,"dragover",No),Ze(u,"mousemove",No),Ze(u,"touchmove",No),l.supportPointer?(Ze(u,"pointerup",r._onDrop),!this.nativeDraggable&&Ze(u,"pointercancel",r._onDrop)):(Ze(u,"mouseup",r._onDrop),Ze(u,"touchend",r._onDrop),Ze(u,"touchcancel",r._onDrop)),AE&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ce.draggable=!0),Vn("delayStart",this,{evt:n}),l.delay&&(!l.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Cl||_r))){if(Te.eventCanceled){this._onDrop();return}l.supportPointer?(Ze(u,"pointerup",r._disableDelayedDrag),Ze(u,"pointercancel",r._disableDelayedDrag)):(Ze(u,"mouseup",r._disableDelayedDrag),Ze(u,"touchend",r._disableDelayedDrag),Ze(u,"touchcancel",r._disableDelayedDrag)),Ze(u,"mousemove",r._delayedDragTouchMoveHandler),Ze(u,"touchmove",r._delayedDragTouchMoveHandler),l.supportPointer&&Ze(u,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(d,l.delay)}else d()}},_delayedDragTouchMoveHandler:function(n){var t=n.touches?n.touches[0]:n;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ce&&Sg(ce),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;Je(n,"mouseup",this._disableDelayedDrag),Je(n,"touchend",this._disableDelayedDrag),Je(n,"touchcancel",this._disableDelayedDrag),Je(n,"pointerup",this._disableDelayedDrag),Je(n,"pointercancel",this._disableDelayedDrag),Je(n,"mousemove",this._delayedDragTouchMoveHandler),Je(n,"touchmove",this._delayedDragTouchMoveHandler),Je(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,t){t=t||n.pointerType=="touch"&&n,!this.nativeDraggable||t?this.options.supportPointer?Ze(document,"pointermove",this._onTouchMove):t?Ze(document,"touchmove",this._onTouchMove):Ze(document,"mousemove",this._onTouchMove):(Ze(ce,"dragend",this),Ze(Ot,"dragstart",this._onDragStart));try{document.selection?$d(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,t){if(za=!1,Ot&&ce){Vn("dragStarted",this,{evt:t}),this.nativeDraggable&&Ze(document,"dragover",EY);var i=this.options;!n&&Jn(ce,i.dragClass,!1),Jn(ce,i.ghostClass,!0),Te.active=this,n&&this._appendGhost(),En({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Mi){this._lastX=Mi.clientX,this._lastY=Mi.clientY,ZE();for(var n=document.elementFromPoint(Mi.clientX,Mi.clientY),t=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(Mi.clientX,Mi.clientY),n!==t);)t=n;if(ce.parentNode[jn]._isOutsideThisEl(n),t)do{if(t[jn]){var i=void 0;if(i=t[jn]._onDragOver({clientX:Mi.clientX,clientY:Mi.clientY,target:n,rootEl:t}),i&&!this.options.dragoverBubble)break}n=t}while(t=zE(t));QE()}},_onTouchMove:function(n){if(Do){var t=this.options,i=t.fallbackTolerance,r=t.fallbackOffset,a=n.touches?n.touches[0]:n,l=ke&&Ha(ke,!0),u=ke&&l&&l.a,d=ke&&l&&l.d,p=Cd&&fn&&FE(fn),h=(a.clientX-Do.clientX+r.x)/(u||1)+(p?p[0]-Ig[0]:0)/(u||1),_=(a.clientY-Do.clientY+r.y)/(d||1)+(p?p[1]-Ig[1]:0)/(d||1);if(!Te.active&&!za){if(i&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<i)return;this._onDragStart(n,!0)}if(ke){l?(l.e+=h-(xg||0),l.f+=_-(wg||0)):l={a:1,b:0,c:0,d:1,e:h,f:_};var C="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");Ee(ke,"webkitTransform",C),Ee(ke,"mozTransform",C),Ee(ke,"msTransform",C),Ee(ke,"transform",C),xg=h,wg=_,Mi=a}n.cancelable&&n.preventDefault()}},_appendGhost:function(){if(!ke){var n=this.options.fallbackOnBody?document.body:Ot,t=Ht(ce,!0,Cd,!0,n),i=this.options;if(Cd){for(fn=n;Ee(fn,"position")==="static"&&Ee(fn,"transform")==="none"&&fn!==document;)fn=fn.parentNode;fn!==document.body&&fn!==document.documentElement?(fn===document&&(fn=Ki()),t.top+=fn.scrollTop,t.left+=fn.scrollLeft):fn=Ki(),Ig=FE(fn)}ke=ce.cloneNode(!0),Jn(ke,i.ghostClass,!1),Jn(ke,i.fallbackClass,!0),Jn(ke,i.dragClass,!0),Ee(ke,"transition",""),Ee(ke,"transform",""),Ee(ke,"box-sizing","border-box"),Ee(ke,"margin",0),Ee(ke,"top",t.top),Ee(ke,"left",t.left),Ee(ke,"width",t.width),Ee(ke,"height",t.height),Ee(ke,"opacity","0.8"),Ee(ke,"position",Cd?"absolute":"fixed"),Ee(ke,"zIndex","100000"),Ee(ke,"pointerEvents","none"),Te.ghost=ke,n.appendChild(ke),Ee(ke,"transform-origin",qE/parseInt(ke.style.width)*100+"% "+VE/parseInt(ke.style.height)*100+"%")}},_onDragStart:function(n,t){var i=this,r=n.dataTransfer,a=i.options;if(Vn("dragStart",this,{evt:n}),Te.eventCanceled){this._onDrop();return}Vn("setupClone",this),Te.eventCanceled||(Dt=GE(ce),Dt.removeAttribute("id"),Dt.draggable=!1,Dt.style["will-change"]="",this._hideClone(),Jn(Dt,this.options.chosenClass,!1),Te.clone=Dt),i.cloneId=$d(function(){Vn("clone",i),!Te.eventCanceled&&(i.options.removeCloneOnHide||Ot.insertBefore(Dt,ce),i._hideClone(),En({sortable:i,name:"clone"}))}),!t&&Jn(ce,a.dragClass,!0),t?(Pd=!0,i._loopId=setInterval(i._emulateDragOver,50)):(Je(document,"mouseup",i._onDrop),Je(document,"touchend",i._onDrop),Je(document,"touchcancel",i._onDrop),r&&(r.effectAllowed="move",a.setData&&a.setData.call(i,r,ce)),Ze(document,"drop",i),Ee(ce,"transform","translateZ(0)")),za=!0,i._dragStartId=$d(i._dragStarted.bind(i,t,n)),Ze(document,"selectstart",i),pl=!0,window.getSelection().removeAllRanges(),gl&&Ee(document.body,"user-select","none")},_onDragOver:function(n){var t=this.el,i=n.target,r,a,l,u=this.options,d=u.group,p=Te.active,h=vd===d,_=u.sort,C=on||p,T,x=this,O=!1;if(Pg)return;function F(hn,qt){Vn(hn,x,Ji({evt:n,isOwner:h,axis:T?"vertical":"horizontal",revert:l,dragRect:r,targetRect:a,canSort:_,fromSortable:C,target:i,completed:ne,onMove:function(jo,Ro){return xd(Ot,t,ce,r,jo,Ht(jo),n,Ro)},changed:re},qt))}function z(){F("dragOverAnimationCapture"),x.captureAnimationState(),x!==C&&C.captureAnimationState()}function ne(hn){return F("dragOverCompleted",{insertion:hn}),hn&&(h?p._hideClone():p._showClone(x),x!==C&&(Jn(ce,on?on.options.ghostClass:p.options.ghostClass,!1),Jn(ce,u.ghostClass,!0)),on!==x&&x!==Te.active?on=x:x===Te.active&&on&&(on=null),C===x&&(x._ignoreWhileAnimating=i),x.animateAll(function(){F("dragOverAnimationComplete"),x._ignoreWhileAnimating=null}),x!==C&&(C.animateAll(),C._ignoreWhileAnimating=null)),(i===ce&&!ce.animated||i===t&&!i.animated)&&(La=null),!u.dragoverBubble&&!n.rootEl&&i!==document&&(ce.parentNode[jn]._isOutsideThisEl(n.target),!hn&&No(n)),!u.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),O=!0}function re(){Yn=pi(ce),Zr=pi(ce,u.draggable),En({sortable:x,name:"change",toEl:t,newIndex:Yn,newDraggableIndex:Zr,originalEvent:n})}if(n.preventDefault!==void 0&&n.cancelable&&n.preventDefault(),i=ki(i,u.draggable,t,!0),F("dragOver"),Te.eventCanceled)return O;if(ce.contains(n.target)||i.animated&&i.animatingX&&i.animatingY||x._ignoreWhileAnimating===i)return ne(!1);if(Pd=!1,p&&!u.disabled&&(h?_||(l=jt!==Ot):on===this||(this.lastPutMode=vd.checkPull(this,p,ce,n))&&d.checkPut(this,p,ce,n))){if(T=this._getDirection(n,i)==="vertical",r=Ht(ce),F("dragOverValid"),Te.eventCanceled)return O;if(l)return jt=Ot,z(),this._hideClone(),F("revert"),Te.eventCanceled||(Fo?Ot.insertBefore(ce,Fo):Ot.appendChild(ce)),ne(!0);var Q=Dg(t,u.draggable);if(!Q||MY(n,T,this)&&!Q.animated){if(Q===ce)return ne(!1);if(Q&&t===n.target&&(i=Q),i&&(a=Ht(i)),xd(Ot,t,ce,r,i,a,n,!!i)!==!1)return z(),Q&&Q.nextSibling?t.insertBefore(ce,Q.nextSibling):t.appendChild(ce),jt=t,re(),ne(!0)}else if(Q&&OY(n,T,this)){var J=Wa(t,0,u,!0);if(J===ce)return ne(!1);if(i=J,a=Ht(i),xd(Ot,t,ce,r,i,a,n,!1)!==!1)return z(),t.insertBefore(ce,J),jt=t,re(),ne(!0)}else if(i.parentNode===t){a=Ht(i);var oe=0,ae,fe=ce.parentNode!==t,ge=!SY(ce.animated&&ce.toRect||r,i.animated&&i.toRect||a,T),Ne=T?"top":"left",Ue=NE(i,"top","top")||NE(ce,"top","top"),Xt=Ue?Ue.scrollTop:void 0;La!==i&&(ae=a[Ne],bl=!1,bd=!ge&&u.invertSwap||fe),oe=kY(n,i,a,T,ge?1:u.swapThreshold,u.invertedSwapThreshold==null?u.swapThreshold:u.invertedSwapThreshold,bd,La===i);var Ft;if(oe!==0){var Tn=pi(ce);do Tn-=oe,Ft=jt.children[Tn];while(Ft&&(Ee(Ft,"display")==="none"||Ft===ke))}if(oe===0||Ft===i)return ne(!1);La=i,vl=oe;var Kt=i.nextElementSibling,ht=!1;ht=oe===1;var Zi=xd(Ot,t,ce,r,i,a,n,ht);if(Zi!==!1)return(Zi===1||Zi===-1)&&(ht=Zi===1),Pg=!0,setTimeout(PY,30),z(),ht&&!Kt?t.appendChild(ce):i.parentNode.insertBefore(ce,ht?Kt:i),Ue&&WE(Ue,0,Xt-Ue.scrollTop),jt=ce.parentNode,ae!==void 0&&!bd&&(Sd=Math.abs(ae-Ht(i)[Ne])),re(),ne(!0)}if(t.contains(ce))return ne(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Je(document,"mousemove",this._onTouchMove),Je(document,"touchmove",this._onTouchMove),Je(document,"pointermove",this._onTouchMove),Je(document,"dragover",No),Je(document,"mousemove",No),Je(document,"touchmove",No)},_offUpEvents:function(){var n=this.el.ownerDocument;Je(n,"mouseup",this._onDrop),Je(n,"touchend",this._onDrop),Je(n,"pointerup",this._onDrop),Je(n,"pointercancel",this._onDrop),Je(n,"touchcancel",this._onDrop),Je(document,"selectstart",this)},_onDrop:function(n){var t=this.el,i=this.options;if(Yn=pi(ce),Zr=pi(ce,i.draggable),Vn("drop",this,{evt:n}),jt=ce&&ce.parentNode,Yn=pi(ce),Zr=pi(ce,i.draggable),Te.eventCanceled){this._nulling();return}za=!1,bd=!1,bl=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Og(this.cloneId),Og(this._dragStartId),this.nativeDraggable&&(Je(document,"drop",this),Je(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),gl&&Ee(document.body,"user-select",""),Ee(ce,"transform",""),n&&(pl&&(n.cancelable&&n.preventDefault(),!i.dropBubble&&n.stopPropagation()),ke&&ke.parentNode&&ke.parentNode.removeChild(ke),(Ot===jt||on&&on.lastPutMode!=="clone")&&Dt&&Dt.parentNode&&Dt.parentNode.removeChild(Dt),ce&&(this.nativeDraggable&&Je(ce,"dragend",this),Sg(ce),ce.style["will-change"]="",pl&&!za&&Jn(ce,on?on.options.ghostClass:this.options.ghostClass,!1),Jn(ce,this.options.chosenClass,!1),En({sortable:this,name:"unchoose",toEl:jt,newIndex:null,newDraggableIndex:null,originalEvent:n}),Ot!==jt?(Yn>=0&&(En({rootEl:jt,name:"add",toEl:jt,fromEl:Ot,originalEvent:n}),En({sortable:this,name:"remove",toEl:jt,originalEvent:n}),En({rootEl:jt,name:"sort",toEl:jt,fromEl:Ot,originalEvent:n}),En({sortable:this,name:"sort",toEl:jt,originalEvent:n})),on&&on.save()):Yn!==Ua&&Yn>=0&&(En({sortable:this,name:"update",toEl:jt,originalEvent:n}),En({sortable:this,name:"sort",toEl:jt,originalEvent:n})),Te.active&&((Yn==null||Yn===-1)&&(Yn=Ua,Zr=yl),En({sortable:this,name:"end",toEl:jt,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){Vn("nulling",this),Ot=ce=jt=ke=Fo=Dt=Id=Qr=Do=Mi=pl=Yn=Zr=Ua=yl=La=vl=on=vd=Te.dragged=Te.ghost=Te.clone=Te.active=null,Md.forEach(function(n){n.checked=!0}),Md.length=xg=wg=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":ce&&(this._onDragOver(n),TY(n));break;case"selectstart":n.preventDefault();break}},toArray:function(){for(var n=[],t,i=this.el.children,r=0,a=i.length,l=this.options;r<a;r++)t=i[r],ki(t,l.draggable,this.el,!1)&&n.push(t.getAttribute(l.dataIdAttr)||DY(t));return n},sort:function(n,t){var i={},r=this.el;this.toArray().forEach(function(a,l){var u=r.children[l];ki(u,this.options.draggable,r,!1)&&(i[a]=u)},this),t&&this.captureAnimationState(),n.forEach(function(a){i[a]&&(r.removeChild(i[a]),r.appendChild(i[a]))}),t&&this.animateAll()},save:function(){var n=this.options.store;n&&n.set&&n.set(this)},closest:function(n,t){return ki(n,t||this.options.draggable,this.el,!1)},option:function(n,t){var i=this.options;if(t===void 0)return i[n];var r=xl.modifyOption(this,n,t);typeof r<"u"?i[n]=r:i[n]=t,n==="group"&&XE(i)},destroy:function(){Vn("destroy",this);var n=this.el;n[jn]=null,Je(n,"mousedown",this._onTapStart),Je(n,"touchstart",this._onTapStart),Je(n,"pointerdown",this._onTapStart),this.nativeDraggable&&(Je(n,"dragover",this),Je(n,"dragenter",this)),Array.prototype.forEach.call(n.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Od.splice(Od.indexOf(this.el),1),this.el=n=null},_hideClone:function(){if(!Qr){if(Vn("hideClone",this),Te.eventCanceled)return;Ee(Dt,"display","none"),this.options.removeCloneOnHide&&Dt.parentNode&&Dt.parentNode.removeChild(Dt),Qr=!0}},_showClone:function(n){if(n.lastPutMode!=="clone"){this._hideClone();return}if(Qr){if(Vn("showClone",this),Te.eventCanceled)return;ce.parentNode==Ot&&!this.options.group.revertClone?Ot.insertBefore(Dt,ce):Fo?Ot.insertBefore(Dt,Fo):Ot.appendChild(Dt),this.options.group.revertClone&&this.animate(ce,Dt),Ee(Dt,"display",""),Qr=!1}}};function TY(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function xd(e,n,t,i,r,a,l,u){var d,p=e[jn],h=p.options.onMove,_;return window.CustomEvent&&!_r&&!Cl?d=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(d=document.createEvent("Event"),d.initEvent("move",!0,!0)),d.to=n,d.from=e,d.dragged=t,d.draggedRect=i,d.related=r||n,d.relatedRect=a||Ht(n),d.willInsertAfter=u,d.originalEvent=l,e.dispatchEvent(d),h&&(_=h.call(p,d,l)),_}function Sg(e){e.draggable=!1}function PY(){Pg=!1}function OY(e,n,t){var i=Ht(Wa(t.el,0,t.options,!0)),r=KE(t.el,t.options,ke),a=10;return n?e.clientX<r.left-a||e.clientY<i.top&&e.clientX<i.right:e.clientY<r.top-a||e.clientY<i.bottom&&e.clientX<i.left}function MY(e,n,t){var i=Ht(Dg(t.el,t.options.draggable)),r=KE(t.el,t.options,ke),a=10;return n?e.clientX>r.right+a||e.clientY>i.bottom&&e.clientX>i.left:e.clientY>r.bottom+a||e.clientX>i.right&&e.clientY>i.top}function kY(e,n,t,i,r,a,l,u){var d=i?e.clientY:e.clientX,p=i?t.height:t.width,h=i?t.top:t.left,_=i?t.bottom:t.right,C=!1;if(!l){if(u&&Sd<p*r){if(!bl&&(vl===1?d>h+p*a/2:d<_-p*a/2)&&(bl=!0),bl)C=!0;else if(vl===1?d<h+Sd:d>_-Sd)return-vl}else if(d>h+p*(1-r)/2&&d<_-p*(1-r)/2)return AY(n)}return C=C||l,C&&(d<h+p*a/2||d>_-p*a/2)?d>h+p/2?1:-1:0}function AY(e){return pi(ce)<pi(e)?1:-1}function DY(e){for(var n=e.tagName+e.className+e.src+e.href+e.textContent,t=n.length,i=0;t--;)i+=n.charCodeAt(t);return i.toString(36)}function NY(e){Md.length=0;for(var n=e.getElementsByTagName("input"),t=n.length;t--;){var i=n[t];i.checked&&Md.push(i)}}function $d(e){return setTimeout(e,0)}function Og(e){return clearTimeout(e)}Ad&&Ze(document,"touchmove",function(e){(Te.active||za)&&e.cancelable&&e.preventDefault()});Te.utils={on:Ze,off:Je,css:Ee,find:UE,is:function(n,t){return!!ki(n,t,n,!1)},extend:_Y,throttle:HE,closest:ki,toggleClass:Jn,clone:GE,index:pi,nextTick:$d,cancelNextTick:Og,detectDirection:YE,getChild:Wa,expando:jn};Te.get=function(e){return e[jn]};Te.mount=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];n[0].constructor===Array&&(n=n[0]),n.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(Te.utils=Ji(Ji({},Te.utils),i.utils)),xl.mount(i)})};Te.create=function(e,n){return new Te(e,n)};Te.version=hY;var Ut=[],ml,Mg,kg=!1,$g,Eg,kd,hl;function FY(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}return e.prototype={dragStarted:function(t){var i=t.originalEvent;this.sortable.nativeDraggable?Ze(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ze(document,"pointermove",this._handleFallbackAutoScroll):i.touches?Ze(document,"touchmove",this._handleFallbackAutoScroll):Ze(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var i=t.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?Je(document,"dragover",this._handleAutoScroll):(Je(document,"pointermove",this._handleFallbackAutoScroll),Je(document,"touchmove",this._handleFallbackAutoScroll),Je(document,"mousemove",this._handleFallbackAutoScroll)),RE(),Ed(),yY()},nulling:function(){kd=Mg=ml=kg=hl=$g=Eg=null,Ut.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,i){var r=this,a=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,u=document.elementFromPoint(a,l);if(kd=t,i||this.options.forceAutoScrollFallback||Cl||_r||gl){Tg(t,this.options,u,i);var d=eo(u,!0);kg&&(!hl||a!==$g||l!==Eg)&&(hl&&RE(),hl=setInterval(function(){var p=eo(document.elementFromPoint(a,l),!0);p!==d&&(d=p,Ed()),Tg(t,r.options,p,i)},10),$g=a,Eg=l)}else{if(!this.options.bubbleScroll||eo(u,!0)===Ki()){Ed();return}Tg(t,this.options,eo(u,!1),!1)}}},gr(e,{pluginName:"scroll",initializeByDefault:!0})}function Ed(){Ut.forEach(function(e){clearInterval(e.pid)}),Ut=[]}function RE(){clearInterval(hl)}var Tg=HE(function(e,n,t,i){if(n.scroll){var r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,l=n.scrollSensitivity,u=n.scrollSpeed,d=Ki(),p=!1,h;Mg!==t&&(Mg=t,Ed(),ml=n.scroll,h=n.scrollFn,ml===!0&&(ml=eo(t,!0)));var _=0,C=ml;do{var T=C,x=Ht(T),O=x.top,F=x.bottom,z=x.left,ne=x.right,re=x.width,Q=x.height,J=void 0,oe=void 0,ae=T.scrollWidth,fe=T.scrollHeight,ge=Ee(T),Ne=T.scrollLeft,Ue=T.scrollTop;T===d?(J=re<ae&&(ge.overflowX==="auto"||ge.overflowX==="scroll"||ge.overflowX==="visible"),oe=Q<fe&&(ge.overflowY==="auto"||ge.overflowY==="scroll"||ge.overflowY==="visible")):(J=re<ae&&(ge.overflowX==="auto"||ge.overflowX==="scroll"),oe=Q<fe&&(ge.overflowY==="auto"||ge.overflowY==="scroll"));var Xt=J&&(Math.abs(ne-r)<=l&&Ne+re<ae)-(Math.abs(z-r)<=l&&!!Ne),Ft=oe&&(Math.abs(F-a)<=l&&Ue+Q<fe)-(Math.abs(O-a)<=l&&!!Ue);if(!Ut[_])for(var Tn=0;Tn<=_;Tn++)Ut[Tn]||(Ut[Tn]={});(Ut[_].vx!=Xt||Ut[_].vy!=Ft||Ut[_].el!==T)&&(Ut[_].el=T,Ut[_].vx=Xt,Ut[_].vy=Ft,clearInterval(Ut[_].pid),(Xt!=0||Ft!=0)&&(p=!0,Ut[_].pid=setInterval((function(){i&&this.layer===0&&Te.active._onTouchMove(kd);var Kt=Ut[this.layer].vy?Ut[this.layer].vy*u:0,ht=Ut[this.layer].vx?Ut[this.layer].vx*u:0;typeof h=="function"&&h.call(Te.dragged.parentNode[jn],ht,Kt,e,kd,Ut[this.layer].el)!=="continue"||WE(Ut[this.layer].el,ht,Kt)}).bind({layer:_}),24))),_++}while(n.bubbleScroll&&C!==d&&(C=eo(C,!1)));kg=p}},30),eT=function(n){var t=n.originalEvent,i=n.putSortable,r=n.dragEl,a=n.activeSortable,l=n.dispatchSortableEvent,u=n.hideGhostForTarget,d=n.unhideGhostForTarget;if(t){var p=i||a;u();var h=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,_=document.elementFromPoint(h.clientX,h.clientY);d(),p&&!p.el.contains(_)&&(l("spill"),this.onSpill({dragEl:r,putSortable:i}))}};function Ng(){}Ng.prototype={startIndex:null,dragStart:function(n){var t=n.oldDraggableIndex;this.startIndex=t},onSpill:function(n){var t=n.dragEl,i=n.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var r=Wa(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),i&&i.animateAll()},drop:eT};gr(Ng,{pluginName:"revertOnSpill"});function Fg(){}Fg.prototype={onSpill:function(n){var t=n.dragEl,i=n.putSortable,r=i||this.sortable;r.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),r.animateAll()},drop:eT};gr(Fg,{pluginName:"removeOnSpill"});Te.mount(new FY);Te.mount(Fg,Ng);var qg=Te;var tT=new u1("Global config for sortablejs");function Vg(e){return!!e.at&&!!e.insert&&!!e.reset}var jg=class{constructor(n){this.target=n}insert(n,t){Vg(this.target)?this.target.insert(n,t):this.target.splice(n,0,t)}get(n){return Vg(this.target)?this.target.at(n):this.target[n]}remove(n){let t;return Vg(this.target)?(t=this.target.at(n),this.target.removeAt(n)):t=this.target.splice(n,1)[0],t}},wl=class{constructor(n){this.bindings=n.map(t=>new jg(t))}injectIntoEvery(n,t){this.bindings.forEach((i,r)=>i.insert(n,t[r]))}getFromEvery(n){return this.bindings.map(t=>t.get(n))}extractFromEvery(n){return this.bindings.map(t=>t.remove(n))}get provided(){return!!this.bindings.length}},qY=(()=>{let n=class n{};n.\u0275fac=function(r){return new(r||n)},n.\u0275prov=Kn({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})(),nT=(()=>{let n=class n{constructor(i,r,a,l,u){this.globalConfig=i,this.service=r,this.element=a,this.zone=l,this.renderer=u,this.init=new m1}ngAfterViewInit(){qg?.create&&this.create()}ngOnChanges(i){let r=i.config;if(r&&!r.isFirstChange()){let a=r.previousValue,l=r.currentValue;Object.keys(l).forEach(u=>{l[u]!==a[u]&&this.sortableInstance?.option(u,this.options[u])})}}ngOnDestroy(){this.sortableInstance&&this.sortableInstance.destroy()}create(){let i=this.sortablejsContainer?this.element.nativeElement.querySelector(this.sortablejsContainer):this.element.nativeElement;setTimeout(()=>{typeof window<"u"&&(this.sortableInstance=qg.create(i,this.options),this.init.emit(this.sortableInstance))},0)}getBindings(){return this.data?this.data instanceof wl?this.data:new wl([this.data]):new wl([])}get options(){return ye(ye({},this.optionsWithoutEvents),this.overridenOptions)}get optionsWithoutEvents(){return ye(ye({},this.globalConfig||{}),this.config||{})}proxyEvent(i,...r){this.zone.run(()=>{this.optionsWithoutEvents?.[i]&&this.optionsWithoutEvents[i](...r)})}get isCloning(){let i=this.sortableInstance?.options.group;return i&&typeof i!="string"?i.checkPull?.(this.sortableInstance,this.sortableInstance,null,null)==="clone":i==="clone"}clone(i){return(this.cloneFunction||(r=>r))(i)}get overridenOptions(){return{onAdd:i=>{this.service.transfer=r=>{this.getBindings().injectIntoEvery(i.newIndex,r),this.proxyEvent("onAdd",i)},this.proxyEvent("onAddOriginal",i)},onRemove:i=>{let r=this.getBindings();r.provided&&(this.isCloning?(this.service.transfer?.(r.getFromEvery(i.oldIndex).map(a=>this.clone(a))),this.renderer.removeChild(i.item.parentNode,i.item),this.renderer.insertBefore(i.clone.parentNode,i.item,i.clone),this.renderer.removeChild(i.clone.parentNode,i.clone)):this.service.transfer?.(r.extractFromEvery(i.oldIndex)),this.service.transfer=void 0),this.proxyEvent("onRemove",i)},onUpdate:i=>{let r=this.getBindings();r.injectIntoEvery(i.newIndex,r.extractFromEvery(i.oldIndex)),this.proxyEvent("onUpdate",i)}}}};n.\u0275fac=function(r){return new(r||n)(ur(tT,8),ur(qY),ur(ra),ur(Ju),ur(Ku))},n.\u0275dir=mo({type:n,selectors:[["","nxtSortablejs",""]],inputs:{data:[0,"nxtSortablejs","data"],sortablejsContainer:"sortablejsContainer",config:"config",cloneFunction:"cloneFunction"},outputs:{init:"init"},standalone:!1,features:[kr]});let e=n;return e})(),iT=(()=>{let n=class n{static forRoot(i){return{ngModule:n,providers:[{provide:tT,useValue:i}]}}};n.\u0275fac=function(r){return new(r||n)},n.\u0275mod=oa({type:n}),n.\u0275inj=ia({});let e=n;return e})();var cO=st(nO(),1);var g0=["widgetContainer"];function hZ(e,n){if(e&1&&q(0,"span"),e&2){let t=S(2);ve(t.options==null?null:t.options.icon)}}function gZ(e,n){if(e&1&&q(0,"span",5),e&2){let t=S(2);E("innerHTML",t.buttonText,Ke)}}function _Z(e,n){if(e&1){let t=ue();y(0,"button",2),Z("click",function(r){Y(t);let a=S();return X(a.addItem(r))}),Me(1,hZ,1,2,"span",3)(2,gZ,1,1,"span",4),v()}if(e&2){let t=S();ve((t.options==null?null:t.options.fieldHtmlClass)||""),E("disabled",t.options==null?null:t.options.readonly),m(),E("ngIf",t.options==null?null:t.options.icon),m(),E("ngIf",t.options==null?null:t.options.title)}}function yZ(e,n){if(e&1&&q(0,"span",2),e&2){let t=S();ve(t.options==null?null:t.options.icon),E("innerHTML",t.options==null?null:t.options.title,Ke)}}function vZ(e,n){if(e&1&&q(0,"input",4),e&2){let t,i,r=S();ve(((r.options==null?null:r.options.fieldHtmlClass)||"")+(r.isChecked?" "+((r.options==null?null:r.options.activeClass)||"")+" "+((r.options==null||r.options.style==null?null:r.options.style.selected)||""):" "+((r.options==null||r.options.style==null?null:r.options.style.unselected)||""))),E("formControl",r.formControl)("id","control"+((t=r.layoutNode())==null?null:t._id))("name",r.controlName)("readonly",r.options!=null&&r.options.readonly?"readonly":null),me("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")}}function bZ(e,n){if(e&1){let t=ue();y(0,"input",5),Z("change",function(r){Y(t);let a=S();return X(a.updateValue(r))}),v()}if(e&2){let t,i,r=S();ve(((r.options==null?null:r.options.fieldHtmlClass)||"")+(r.isChecked?" "+((r.options==null?null:r.options.activeClass)||"")+" "+((r.options==null||r.options.style==null?null:r.options.style.selected)||""):" "+((r.options==null||r.options.style==null?null:r.options.style.unselected)||""))),E("checked",r.isChecked?"checked":null)("disabled",r.controlDisabled)("id","control"+((t=r.layoutNode())==null?null:t._id))("name",r.controlName)("readonly",r.options!=null&&r.options.readonly?"readonly":null)("value",r.controlValue),me("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")}}function CZ(e,n){if(e&1&&q(0,"span",6),e&2){let t=S();Ci("display",t.options!=null&&t.options.notitle?"none":""),E("innerHTML",t.options==null?null:t.options.title,Ke)}}function xZ(e,n){if(e&1&&q(0,"label",3),e&2){let t=S();ve((t.options==null?null:t.options.labelHtmlClass)||""),Ci("display",t.options!=null&&t.options.notitle?"none":""),E("innerHTML",t.options==null?null:t.options.title,Ke)}}function wZ(e,n){if(e&1){let t=ue();y(0,"label")(1,"input",5),Z("change",function(r){Y(t);let a=S(2);return X(a.updateValue(r))}),v(),q(2,"span",3)(3,"span",6),v()}if(e&2){let t,i,r=n.$implicit,a=S(2);ve(((a.options==null?null:a.options.itemLabelHtmlClass)||"hb-uix-switch ")+(r.checked?" "+((a.options==null?null:a.options.activeClass)||"")+" "+((a.options==null||a.options.style==null?null:a.options.style.selected)||""):" "+((a.options==null||a.options.style==null?null:a.options.style.unselected)||" hb-uix-switch"))),me("for","control"+((t=a.layoutNode())==null?null:t._id)+"/"+r.value),m(),ve((a.options==null?null:a.options.fieldHtmlClass)||""),E("checked",r.checked)("disabled",a.controlDisabled)("id","control"+((i=a.layoutNode())==null?null:i._id)+"/"+r.value)("name",r==null?null:r.name)("readonly",a.options!=null&&a.options.readonly?"readonly":null)("value",r.value),me("required",a.options==null?null:a.options.required),m(),E("innerHTML",r.name,Ke)}}function IZ(e,n){if(e&1&&(y(0,"div"),Me(1,wZ,4,13,"label",4),v()),e&2){let t=S();ve((t.options==null?null:t.options.htmlClass)||""),m(),E("ngForOf",t.checkboxList)}}function SZ(e,n){if(e&1){let t=ue();y(0,"div")(1,"label")(2,"input",5),Z("change",function(r){Y(t);let a=S(2);return X(a.updateValue(r))}),v(),q(3,"span",3)(4,"span",6),v()()}if(e&2){let t,i,r=n.$implicit,a=S(2);ve((a.options==null?null:a.options.htmlClass)||""),m(),ve(((a.options==null?null:a.options.itemLabelHtmlClass)||"hb-uix-switch ")+(r.checked?" "+((a.options==null?null:a.options.activeClass)||"")+" "+((a.options==null||a.options.style==null?null:a.options.style.selected)||""):" "+((a.options==null||a.options.style==null?null:a.options.style.unselected)||" hb-uix-switch"))),me("for","control"+((t=a.layoutNode())==null?null:t._id)+"/"+r.value),m(),ve((a.options==null?null:a.options.fieldHtmlClass)||""),E("checked",r.checked)("disabled",a.controlDisabled)("id","control"+((i=a.layoutNode())==null?null:i._id)+"/"+r.value)("name",r==null?null:r.name)("readonly",a.options!=null&&a.options.readonly?"readonly":null)("value",r.value),me("required",a.options==null?null:a.options.required),m(),E("innerHTML",r==null?null:r.name,Ke)}}function $Z(e,n){if(e&1&&(y(0,"div"),Me(1,SZ,5,15,"div",4),v()),e&2){let t=S();m(),E("ngForOf",t.checkboxList)}}function EZ(e,n){if(e&1&&q(0,"label",5),e&2){let t,i=S();ve((i.options==null?null:i.options.labelHtmlClass)||""),Ci("display",i.options!=null&&i.options.notitle?"none":""),E("innerHTML",i.options==null?null:i.options.title,Ke),me("for","control"+((t=i.layoutNode())==null?null:t._id))}}function TZ(e,n){if(e&1&&q(0,"input",6),e&2){let t,i,r,a,l=S();ve((l.options==null?null:l.options.fieldHtmlClass)||""),E("formControl",l.formControl)("id","control"+((t=l.layoutNode())==null?null:t._id))("name",l.controlName)("readonly",l.options!=null&&l.options.readonly?"readonly":null)("type",(i=l.layoutNode())==null?null:i.type)("attributes",l.inputAttributes),me("aria-describedby","control"+((r=l.layoutNode())==null?null:r._id)+"Status")("list","control"+((a=l.layoutNode())==null?null:a._id)+"Autocomplete")("maxlength",l.options==null?null:l.options.maxLength)("minlength",l.options==null?null:l.options.minLength)("pattern",l.options==null?null:l.options.pattern)("placeholder",l.options==null?null:l.options.placeholder)("required",l.options==null?null:l.options.required)}}function PZ(e,n){if(e&1){let t=ue();y(0,"input",7),Z("input",function(r){Y(t);let a=S();return X(a.updateValue(r))}),v()}if(e&2){let t,i,r,a,l=S();ve((l.options==null?null:l.options.fieldHtmlClass)||""),E("disabled",l.controlDisabled)("id","control"+((t=l.layoutNode())==null?null:t._id))("name",l.controlName)("readonly",l.options!=null&&l.options.readonly?"readonly":null)("type",(i=l.layoutNode())==null?null:i.type)("value",l.controlValue)("attributes",l.inputAttributes),me("aria-describedby","control"+((r=l.layoutNode())==null?null:r._id)+"Status")("list","control"+((a=l.layoutNode())==null?null:a._id)+"Autocomplete")("maxlength",l.options==null?null:l.options.maxLength)("minlength",l.options==null?null:l.options.minLength)("pattern",l.options==null?null:l.options.pattern)("placeholder",l.options==null?null:l.options.placeholder)("required",l.options==null?null:l.options.required)}}function OZ(e,n){if(e&1&&q(0,"option",10),e&2){let t=n.$implicit;E("value",t)}}function MZ(e,n){if(e&1&&(y(0,"datalist",8),Me(1,OZ,1,1,"option",9),v()),e&2){let t,i=S();E("id","control"+((t=i.layoutNode())==null?null:t._id)+"Autocomplete"),m(),E("ngForOf",i.options==null||i.options.typeahead==null?null:i.options.typeahead.source)}}function kZ(e,n){if(e&1&&q(0,"span",1),e&2){let t=S();ve((t.options==null?null:t.options.labelHtmlClass)||""),E("innerHTML",t.message,Ke)}}var AZ=["inputControl"],DZ=["divElt"];function NZ(e,n){if(e&1&&q(0,"label",7),e&2){let t,i=S();ve((i.options==null?null:i.options.labelHtmlClass)||""),Ci("display",i.options!=null&&i.options.notitle?"none":""),E("innerHTML",i.options==null?null:i.options.title,Ke),me("for","control"+((t=i.layoutNode())==null?null:t._id))}}function FZ(e,n){if(e&1&&q(0,"input",8,1),e&2){let t,i,r,a=S();ve((a.options==null?null:a.options.fieldHtmlClass)||""),E("formControl",a.formControl)("id","control"+((t=a.layoutNode())==null?null:t._id))("name",a.controlName)("readonly",a.options!=null&&a.options.readonly?"readonly":null)("title",a.lastValidNumber)("type",((i=a.layoutNode())==null?null:i.type)==="range"?"range":"number")("attributes",a.inputAttributes),me("aria-describedby","control"+((r=a.layoutNode())==null?null:r._id)+"Status")("max",a.options==null?null:a.options.maximum)("min",a.options==null?null:a.options.minimum)("placeholder",a.options==null?null:a.options.placeholder)("required",a.options==null?null:a.options.required)("readonly",a.options!=null&&a.options.readonly?"readonly":null)("step",(a.options==null?null:a.options.multipleOf)||(a.options==null?null:a.options.step)||"any")}}function qZ(e,n){if(e&1){let t=ue();y(0,"input",9,1),Z("input",function(r){Y(t);let a=S();return X(a.updateValue(r))}),v()}if(e&2){let t,i,r,a=S();ve((a.options==null?null:a.options.fieldHtmlClass)||""),E("disabled",a.controlDisabled)("id","control"+((t=a.layoutNode())==null?null:t._id))("name",a.controlName)("readonly",a.options!=null&&a.options.readonly?"readonly":null)("title",a.lastValidNumber)("type",((i=a.layoutNode())==null?null:i.type)==="range"?"range":"number")("value",a.controlValue)("attributes",a.inputAttributes),me("aria-describedby","control"+((r=a.layoutNode())==null?null:r._id)+"Status")("max",a.options==null?null:a.options.maximum)("min",a.options==null?null:a.options.minimum)("placeholder",a.options==null?null:a.options.placeholder)("required",a.options==null?null:a.options.required)("readonly",a.options!=null&&a.options.readonly?"readonly":null)("step",(a.options==null?null:a.options.multipleOf)||(a.options==null?null:a.options.step)||"any")}}function VZ(e,n){if(e&1&&q(0,"span",7),e&2){let t=S();E("innerHTML",t.controlValue,Ke)}}var Yi=()=>[];function jZ(e,n){if(e&1){let t=ue();y(0,"input",6),ct("ngModelChange",function(r){Y(t);let a=S(3);return ut(a.selectedItem,r)||(a.selectedItem=r),X(r)}),Z("change",function(){Y(t);let r=S(2).index,a=S();return X(a.select(r))}),v()}if(e&2){let t=S(2).index,i=S();ve((i.options==null?null:i.options.widget_radioClass)||""),E("value",t),lt("ngModel",i.selectedItem),E("value",t)}}function RZ(e,n){if(e&1){let t=ue();y(0,"a",4),Z("click",function(){Y(t);let r=S().index,a=S();return X(a.select(r))}),Me(1,jZ,1,5,"input",5),M(2),v()}if(e&2){let t=S(),i=t.$implicit,r=t.index,a=S();ve("nav-link"+(a.selectedItem===r?" "+(a.options==null?null:a.options.activeClass)+" "+(a.options==null||a.options.style==null?null:a.options.style.selected):" "+(a.options==null||a.options.style==null?null:a.options.style.unselected))),m(),E("ngIf",(a.options==null?null:a.options.tabMode)=="oneOfMode"),m(),ie(" ",a.setTabTitle(i,r)," ")}}function BZ(e,n){if(e&1&&(y(0,"li",2),Me(1,RZ,3,4,"a",3),v()),e&2){let t=n.$implicit,i=n.index,r=S();ve(((r.options==null?null:r.options.itemLabelHtmlClass)||"")+(r.selectedItem===i?" "+((r.options==null?null:r.options.activeClass)||"")+" "+((r.options==null||r.options.style==null?null:r.options.style.selected)||""):" "+(r.options==null||r.options.style==null?null:r.options.style.unselected))),m(),E("ngIf",r.showAddTab||t.type!=="$ref")}}function LZ(e,n){if(e&1&&q(0,"select-framework-widget",9),e&2){let t,i=S(2),r=i.$implicit,a=i.index,l=S();ve(((l.options==null?null:l.options.fieldHtmlClass)||"")+" "+((l.options==null?null:l.options.activeClass)||"")+" "+((l.options==null||l.options.style==null?null:l.options.style.selected)||"")),E("dataIndex",((t=l.layoutNode())==null?null:t.dataType)==="array"?(l.dataIndex()||dt(5,Yi)).concat(a):l.dataIndex())("layoutIndex",(l.layoutIndex()||dt(6,Yi)).concat(a))("layoutNode",r)}}function zZ(e,n){if(e&1&&(ws(0),Me(1,LZ,1,7,"select-framework-widget",8),Is()),e&2){let t=S().index,i=S();m(),E("ngIf",i.selectedItem===t)}}function UZ(e,n){if(e&1&&(ws(0),q(1,"select-framework-widget",9),Is()),e&2){let t,i=S(),r=i.$implicit,a=i.index,l=S();m(),ve(((l.options==null?null:l.options.fieldHtmlClass)||"")+" "+((l.options==null?null:l.options.activeClass)||"")+" "+((l.options==null||l.options.style==null?null:l.options.style.selected)||"")),E("dataIndex",((t=l.layoutNode())==null?null:t.dataType)==="array"?(l.dataIndex()||dt(5,Yi)).concat(a):l.dataIndex())("layoutIndex",(l.layoutIndex()||dt(6,Yi)).concat(a))("layoutNode",r)}}function HZ(e,n){if(e&1&&(y(0,"div"),Me(1,zZ,2,1,"ng-container",7)(2,UZ,2,7,"ng-container",7),v()),e&2){let t=n.index,i=S();ve(((i.options==null?null:i.options.htmlClass)||"")+(i.selectedItem!=t?" ngf-hidden":"")),m(),E("ngIf",(i.options==null?null:i.options.tabMode)=="oneOfMode"),m(),E("ngIf",(i.options==null?null:i.options.tabMode)!="oneOfMode")}}function WZ(e,n){if(e&1&&q(0,"label",3),e&2){let t,i=S();ve((i.options==null?null:i.options.labelHtmlClass)||""),Ci("display",i.options!=null&&i.options.notitle?"none":""),E("innerHTML",i.options==null?null:i.options.title,Ke),me("for","control"+((t=i.layoutNode())==null?null:t._id))}}function GZ(e,n){if(e&1){let t=ue();y(0,"label")(1,"input",5),Z("change",function(r){Y(t);let a=S(2);return X(a.updateValue(r))}),v(),q(2,"span",3),v()}if(e&2){let t,i,r,a=n.$implicit,l=S(2);ve(((l.options==null?null:l.options.itemLabelHtmlClass)||"")+(l.controlValue+""==(a==null?null:a.value)+""?" "+((l.options==null?null:l.options.activeClass)||"")+" "+((l.options==null||l.options.style==null?null:l.options.style.selected)||""):" "+((l.options==null||l.options.style==null?null:l.options.style.unselected)||" hb-uix-switch"))),me("for","control"+((t=l.layoutNode())==null?null:t._id)+"/"+(a==null?null:a.value)),m(),ve((l.options==null?null:l.options.fieldHtmlClass)||""),E("checked",(a==null?null:a.value)===l.controlValue)("disabled",l.controlDisabled)("id","control"+((i=l.layoutNode())==null?null:i._id)+"/"+(a==null?null:a.value))("name",l.controlName)("value",a==null?null:a.value),me("aria-describedby","control"+((r=l.layoutNode())==null?null:r._id)+"Status")("readonly",l.options!=null&&l.options.readonly?"readonly":null)("required",l.options==null?null:l.options.required),m(),E("innerHTML",a==null?null:a.name,Ke)}}function KZ(e,n){if(e&1&&(y(0,"div"),Me(1,GZ,3,14,"label",4),v()),e&2){let t=S();ve((t.options==null?null:t.options.htmlClass)||""),m(),E("ngForOf",t.radiosList)}}function JZ(e,n){if(e&1){let t=ue();y(0,"div")(1,"label")(2,"input",5),Z("change",function(r){Y(t);let a=S(2);return X(a.updateValue(r))}),v(),q(3,"span",3),v()()}if(e&2){let t,i,r,a=n.$implicit,l=S(2);ve((l.options==null?null:l.options.htmlClass)||""),m(),ve(((l.options==null?null:l.options.itemLabelHtmlClass)||"")+(l.controlValue+""==(a==null?null:a.value)+""?" "+((l.options==null?null:l.options.activeClass)||"")+" "+((l.options==null||l.options.style==null?null:l.options.style.selected)||""):" "+((l.options==null||l.options.style==null?null:l.options.style.unselected)||" hb-uix-switch"))),me("for","control"+((t=l.layoutNode())==null?null:t._id)+"/"+(a==null?null:a.value)),m(),ve((l.options==null?null:l.options.fieldHtmlClass)||""),E("checked",(a==null?null:a.value)===l.controlValue)("disabled",l.controlDisabled)("id","control"+((i=l.layoutNode())==null?null:i._id)+"/"+(a==null?null:a.value))("name",l.controlName)("value",a==null?null:a.value),me("aria-describedby","control"+((r=l.layoutNode())==null?null:r._id)+"Status")("readonly",l.options!=null&&l.options.readonly?"readonly":null)("required",l.options==null?null:l.options.required),m(),E("innerHTML",a==null?null:a.name,Ke)}}function YZ(e,n){if(e&1&&(y(0,"div"),Me(1,JZ,4,16,"div",4),v()),e&2){let t=S();m(),E("ngForOf",t.radiosList)}}var iO=()=>({});function XZ(e,n){if(e&1&&q(0,"select-framework-widget",5),e&2){let t=S(),i=t.$implicit,r=t.index,a=S();E("dataIndex",i!=null&&i.arrayItem?(a.dataIndex()||dt(3,Yi)).concat(r):a.dataIndex()||dt(4,Yi))("layoutIndex",(a.layoutIndex()||dt(5,Yi)).concat(r))("layoutNode",i)}}function ZZ(e,n){if(e&1&&(y(0,"div")(1,"div",3),Me(2,XZ,1,6,"select-framework-widget",4),v()()),e&2){let t=n.$implicit,i=n.index,r=S();Ci("align-self",(t.options||dt(25,iO))["align-self"])("flex-basis",r.getFlexAttribute(t,"flex-basis"))("flex-grow",r.getFlexAttribute(t,"flex-grow"))("flex-shrink",r.getFlexAttribute(t,"flex-shrink"))("order",(t.options||dt(26,iO)).order),Nr("form-flex-item",r.isFlexItem())("sortable-filter",!r.isDraggable(t))("sortable-fixed",r.isFixed(t)),m(),Nr("sortable-filter",!r.isDraggable(t))("sortable-fixed",r.isFixed(t)),E("dataIndex",t!=null&&t.arrayItem?(r.dataIndex()||dt(27,Yi)).concat(i):r.dataIndex()||dt(28,Yi))("layoutIndex",(r.layoutIndex()||dt(29,Yi)).concat(i))("layoutNode",t)("orderable",!1),m(),E("ngIf",r.showWidget(t))}}function QZ(e,n){if(e&1){let t=ue();y(0,"label",4),Z("click",function(){Y(t);let r=S(2);return X(r.toggleExpanded())}),v()}if(e&2){let t=S(2);ve((t.options==null?null:t.options.labelHtmlClass)||""),E("innerHTML",t.sectionTitle,Ke)}}function eQ(e,n){if(e&1&&(y(0,"div"),Me(1,QZ,1,3,"label",2),q(2,"root-widget",3),v()),e&2){let t=S();ve((t.options==null?null:t.options.htmlClass)||""),Nr("expandable",(t.options==null?null:t.options.expandable)&&!t.expanded)("expanded",(t.options==null?null:t.options.expandable)&&t.expanded),m(),E("ngIf",t.sectionTitle),m(),Ci("align-content",t.getFlexAttribute("align-content"))("align-items",t.getFlexAttribute("align-items"))("display",t.expanded?t.getFlexAttribute("display"):"none")("flex-direction",t.getFlexAttribute("flex-direction"))("flex-wrap",t.getFlexAttribute("flex-wrap"))("justify-content",t.getFlexAttribute("justify-content")),Nr("form-flex-column",t.getFlexAttribute("flex-direction")==="column")("form-flex-row",t.getFlexAttribute("flex-direction")==="row"),E("dataIndex",t.dataIndex())("layout",t.layoutNode().items)("layoutIndex",t.layoutIndex())("isFlexItem",t.getFlexAttribute("is-flex"))("isOrderable",t.options==null?null:t.options.orderable)}}function tQ(e,n){if(e&1){let t=ue();y(0,"legend",4),Z("click",function(){Y(t);let r=S(2);return X(r.toggleExpanded())}),v()}if(e&2){let t=S(2);ve((t.options==null?null:t.options.labelHtmlClass)||""),E("innerHTML",t.sectionTitle,Ke)}}function nQ(e,n){if(e&1&&q(0,"p",8),e&2){let t=S(3);ve((t.options==null?null:t.options.labelHelpBlockClass)||""),E("innerHTML",t.options==null?null:t.options.description,Ke)}}function iQ(e,n){if(e&1&&(y(0,"div"),Me(1,nQ,1,3,"p",7),v()),e&2){let t=S(2);m(),E("ngIf",t.options==null?null:t.options.description)}}function rQ(e,n){if(e&1&&q(0,"p",8),e&2){let t=S(3);ve((t.options==null?null:t.options.labelHelpBlockClass)||""),E("innerHTML",t.options==null?null:t.options.description,Ke)}}function oQ(e,n){if(e&1&&(y(0,"div"),Me(1,rQ,1,3,"p",7),v()),e&2){let t=S(2);m(),E("ngIf",t.options==null?null:t.options.description)}}function aQ(e,n){if(e&1&&(y(0,"fieldset",5),Me(1,tQ,1,3,"legend",2)(2,iQ,2,1,"div",6),q(3,"root-widget",3),Me(4,oQ,2,1,"div",6),v()),e&2){let t=S();ve((t.options==null?null:t.options.htmlClass)||""),Nr("expandable",(t.options==null?null:t.options.expandable)&&!t.expanded)("expanded",(t.options==null?null:t.options.expandable)&&t.expanded),E("disabled",t.options==null?null:t.options.readonly),m(),E("ngIf",t.sectionTitle),m(),E("ngIf",(t.options==null?null:t.options.messageLocation)!=="bottom"),m(),Ci("align-content",t.getFlexAttribute("align-content"))("align-items",t.getFlexAttribute("align-items"))("display",t.expanded?t.getFlexAttribute("display"):"none")("flex-direction",t.getFlexAttribute("flex-direction"))("flex-wrap",t.getFlexAttribute("flex-wrap"))("justify-content",t.getFlexAttribute("justify-content")),Nr("form-flex-column",t.getFlexAttribute("flex-direction")==="column")("form-flex-row",t.getFlexAttribute("flex-direction")==="row"),E("dataIndex",t.dataIndex())("layout",t.layoutNode().items)("layoutIndex",t.layoutIndex())("isFlexItem",t.getFlexAttribute("is-flex"))("isOrderable",t.options==null?null:t.options.orderable),m(),E("ngIf",(t.options==null?null:t.options.messageLocation)==="bottom")}}function sQ(e,n){if(e&1&&q(0,"label",4),e&2){let t,i=S();ve((i.options==null?null:i.options.labelHtmlClass)||""),Ci("display",i.options!=null&&i.options.notitle?"none":""),E("innerHTML",i.options==null?null:i.options.title,Ke),me("for","control"+((t=i.layoutNode())==null?null:t._id))}}function lQ(e,n){if(e&1&&(y(0,"option",9),q(1,"span",4),v()),e&2){let t=S().$implicit;E("value",t==null?null:t.value),m(),E("innerHTML",t==null?null:t.name,Ke)}}function uQ(e,n){if(e&1&&(y(0,"option",9),q(1,"span",4),v()),e&2){let t=n.$implicit;E("value",t==null?null:t.value),m(),E("innerHTML",t==null?null:t.name,Ke)}}function cQ(e,n){if(e&1&&(y(0,"optgroup",10),Me(1,uQ,2,2,"option",11),v()),e&2){let t=S().$implicit;E("label",t==null?null:t.group),m(),E("ngForOf",t.items)}}function dQ(e,n){if(e&1&&Me(0,lQ,2,2,"option",7)(1,cQ,2,2,"optgroup",8),e&2){let t=n.$implicit,i=S(2);E("ngIf",!i.isArray(t==null?null:t.items)),m(),E("ngIf",i.isArray(t==null?null:t.items))}}function fQ(e,n){if(e&1&&(y(0,"select",5),Me(1,dQ,2,2,"ng-template",6),v()),e&2){let t,i,r=S();ve((r.options==null?null:r.options.fieldHtmlClass)||""),E("formControl",r.formControl)("id","control"+((t=r.layoutNode())==null?null:t._id))("name",r.controlName),me("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")("readonly",r.options!=null&&r.options.readonly?"readonly":null)("required",r.options==null?null:r.options.required),m(),E("ngForOf",r.selectList)}}function pQ(e,n){if(e&1&&(y(0,"option",14),q(1,"span",4),v()),e&2){let t=S().$implicit,i=S(2);E("selected",(t==null?null:t.value)===i.controlValue)("value",t==null?null:t.value),m(),E("innerHTML",t==null?null:t.name,Ke)}}function mQ(e,n){if(e&1&&(y(0,"option",9),q(1,"span",4),v()),e&2){let t=n.$implicit,i=S(4);E("value",t==null?null:t.value),me("selected",(t==null?null:t.value)===i.controlValue),m(),E("innerHTML",t==null?null:t.name,Ke)}}function hQ(e,n){if(e&1&&(y(0,"optgroup",10),Me(1,mQ,2,3,"option",11),v()),e&2){let t=S().$implicit;E("label",t==null?null:t.group),m(),E("ngForOf",t.items)}}function gQ(e,n){if(e&1&&Me(0,pQ,2,3,"option",13)(1,hQ,2,2,"optgroup",8),e&2){let t=n.$implicit,i=S(2);E("ngIf",!i.isArray(t==null?null:t.items)),m(),E("ngIf",i.isArray(t==null?null:t.items))}}function _Q(e,n){if(e&1){let t=ue();y(0,"select",12),Z("change",function(r){Y(t);let a=S();return X(a.updateValue(r))}),Me(1,gQ,2,2,"ng-template",6),v()}if(e&2){let t,i,r=S();ve((r.options==null?null:r.options.fieldHtmlClass)||""),E("disabled",r.controlDisabled)("id","control"+((t=r.layoutNode())==null?null:t._id))("name",r.controlName),me("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")("readonly",r.options!=null&&r.options.readonly?"readonly":null)("required",r.options==null?null:r.options.required),m(),E("ngForOf",r.selectList)}}function yQ(e,n){if(e&1&&(y(0,"option",14),q(1,"span",4),v()),e&2){let t=S().$implicit,i=S(2);E("selected",(t==null?null:t.value)===i.controlValue)("value",t==null?null:t.value),m(),E("innerHTML",t==null?null:t.name,Ke)}}function vQ(e,n){if(e&1&&(y(0,"option",9),q(1,"span",4),v()),e&2){let t=n.$implicit,i=S(4);E("value",t==null?null:t.value),me("selected",(t==null?null:t.value)===i.controlValue),m(),E("innerHTML",t==null?null:t.name,Ke)}}function bQ(e,n){if(e&1&&(y(0,"optgroup",10),Me(1,vQ,2,3,"option",11),v()),e&2){let t=S().$implicit;E("label",t==null?null:t.group),m(),E("ngForOf",t.items)}}function CQ(e,n){if(e&1&&Me(0,yQ,2,3,"option",13)(1,bQ,2,2,"optgroup",8),e&2){let t=n.$implicit,i=S(2);E("ngIf",!i.isArray(t==null?null:t.items)),m(),E("ngIf",i.isArray(t==null?null:t.items))}}function xQ(e,n){if(e&1){let t=ue();y(0,"select",15),ct("ngModelChange",function(r){Y(t);let a=S();return ut(a.controlValue,r)||(a.controlValue=r),X(r)}),Z("change",function(r){Y(t);let a=S();return X(a.updateValue(r))}),Me(1,CQ,2,2,"ng-template",6),v()}if(e&2){let t,i,r=S();ve((r.options==null?null:r.options.fieldHtmlClass)||""),E("disabled",r.controlDisabled)("id","control"+((t=r.layoutNode())==null?null:t._id))("multiple",r.options==null?null:r.options.multiple)("name",r.controlName),lt("ngModel",r.controlValue),me("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")("readonly",r.options!=null&&r.options.readonly?"readonly":null)("required",r.options==null?null:r.options.required),m(),E("ngForOf",r.selectList)}}function wQ(e,n){if(e&1&&q(0,"label",3),e&2){let t,i=S();ve((i.options==null?null:i.options.labelHtmlClass)||""),Ci("display",i.options!=null&&i.options.notitle?"none":""),E("innerHTML",i.options==null?null:i.options.title,Ke),me("for","control"+((t=i.layoutNode())==null?null:t._id))}}function IQ(e,n){if(e&1&&q(0,"textarea",4),e&2){let t,i,r=S();ve((r.options==null?null:r.options.fieldHtmlClass)||""),E("formControl",r.formControl)("id","control"+((t=r.layoutNode())==null?null:t._id))("name",r.controlName),me("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")("maxlength",r.options==null?null:r.options.maxLength)("minlength",r.options==null?null:r.options.minLength)("pattern",r.options==null?null:r.options.pattern)("placeholder",r.options==null?null:r.options.placeholder)("readonly",r.options!=null&&r.options.readonly?"readonly":null)("required",r.options==null?null:r.options.required)}}function SQ(e,n){if(e&1){let t=ue();y(0,"textarea",5),Z("input",function(r){Y(t);let a=S();return X(a.updateValue(r))}),M(1),v()}if(e&2){let t,i,r=S();ve((r.options==null?null:r.options.fieldHtmlClass)||""),E("disabled",r.controlDisabled)("id","control"+((t=r.layoutNode())==null?null:t._id))("name",r.controlName)("value",r.controlValue),me("aria-describedby","control"+((i=r.layoutNode())==null?null:i._id)+"Status")("maxlength",r.options==null?null:r.options.maxLength)("minlength",r.options==null?null:r.options.minLength)("pattern",r.options==null?null:r.options.pattern)("placeholder",r.options==null?null:r.options.placeholder)("readonly",r.options!=null&&r.options.readonly?"readonly":null)("required",r.options==null?null:r.options.required),m(),se(r.controlValue)}}function $Q(e,n){if(e&1&&(y(0,"div"),M(1," Debug output: "),y(2,"pre"),M(3),v()()),e&2){let t=S();m(3),se(t.debugOutput)}}var _0=(()=>{let n=class n{constructor(){this.widgets={},this.stylesheets=[],this.scripts=[]}};n.\u0275fac=function(r){return new(r||n)},n.\u0275prov=Kn({token:n,factory:n.\u0275fac});let e=n;return e})(),EQ={required:"Darf nicht leer sein",minLength:"Mindestens {{minimumLength}} Zeichen ben\xF6tigt (aktuell: {{currentLength}})",maxLength:"Maximal {{maximumLength}} Zeichen erlaubt (aktuell: {{currentLength}})",pattern:"Entspricht nicht diesem regul\xE4ren Ausdruck: {{requiredPattern}}",format:function(e){switch(e.requiredFormat){case"date":return'Muss ein Datum sein, z. B. "2000-12-31"';case"time":return'Muss eine Zeitangabe sein, z. B. "16:20" oder "03:14:15.9265"';case"date-time":return'Muss Datum mit Zeit beinhalten, z. B. "2000-03-14T01:59" oder "2000-03-14T01:59:26.535Z"';case"email":return'Keine g\xFCltige E-Mail-Adresse (z. B. "name@example.com")';case"hostname":return'Kein g\xFCltiger Hostname (z. B. "example.com")';case"ipv4":return'Keine g\xFCltige IPv4-Adresse (z. B. "127.0.0.1")';case"ipv6":return'Keine g\xFCltige IPv6-Adresse (z. B. "1234:5678:9ABC:DEF0:1234:5678:9ABC:DEF0")';case"url":return'Keine g\xFCltige URL (z. B. "http://www.example.com/page.html")';case"uuid":return'Keine g\xFCltige UUID (z. B. "12345678-9ABC-DEF0-1234-56789ABCDEF0")';case"color":return'Kein g\xFCltiger Farbwert (z. B. "#FFFFFF")';case"json-pointer":return'Kein g\xFCltiger JSON-Pointer (z. B. "/pointer/to/something")';case"relative-json-pointer":return'Kein g\xFCltiger relativer JSON-Pointer (z. B. "2/pointer/to/something")';case"regex":return'Kein g\xFCltiger regul\xE4rer Ausdruck (z. B. "(1-)?\\d{3}-\\d{3}-\\d{4}")';case"duration":return"Muss eine g\xFCltige ISO 8601-Dauer sein (z.\u202FB. 'PT1H30M')";default:return"Muss diesem Format entsprechen: "+e.requiredFormat}},minimum:"Muss mindestens {{minimumValue}} sein",exclusiveMinimum:"Muss gr\xF6\xDFer als {{exclusiveMinimumValue}} sein",maximum:"Darf maximal {{maximumValue}} sein",exclusiveMaximum:"Muss kleiner als {{exclusiveMaximumValue}} sein",multipleOf:function(e){return 1/e.multipleOfValue%10===0?`Maximal ${Math.log10(1/e.multipleOfValue)} Dezimalstellen erlaubt`:`Muss ein Vielfaches von ${e.multipleOfValue} sein`},minProperties:"Mindestens {{minimumProperties}} Attribute erforderlich (aktuell: {{currentProperties}})",maxProperties:"Maximal {{maximumProperties}} Attribute erlaubt (aktuell: {{currentProperties}})",minItems:"Mindestens {{minimumItems}} Werte erforderlich (aktuell: {{currentItems}})",maxItems:"Maximal {{maximumItems}} Werte erlaubt (aktuell: {{currentItems}})",uniqueItems:"Alle Werte m\xFCssen eindeutig sein"},TQ={required:"This field is required.",minLength:"Must be {{minimumLength}} characters or longer (current length: {{currentLength}})",maxLength:"Must be {{maximumLength}} characters or shorter (current length: {{currentLength}})",pattern:"Must match pattern: {{requiredPattern}}",format:function(e){switch(e.requiredFormat){case"date":return'Must be a date, like "2000-12-31"';case"time":return'Must be a time, like "16:20" or "03:14:15.9265"';case"date-time":return'Must be a date-time, like "2000-03-14T01:59" or "2000-03-14T01:59:26.535Z"';case"email":return'Must be an email address, like "name@example.com"';case"hostname":return'Must be a hostname, like "example.com"';case"ipv4":return'Must be an IPv4 address, like "127.0.0.1"';case"ipv6":return'Must be an IPv6 address, like "1234:5678:9ABC:DEF0:1234:5678:9ABC:DEF0"';case"url":return'Must be a url, like "http://www.example.com/page.html"';case"uuid":return'Must be a uuid, like "12345678-9ABC-DEF0-1234-56789ABCDEF0"';case"color":return'Must be a color, like "#FFFFFF"';case"json-pointer":return'Must be a JSON Pointer, like "/pointer/to/something"';case"relative-json-pointer":return'Must be a relative JSON Pointer, like "2/pointer/to/something"';case"regex":return'Must be a regular expression, like "(1-)?\\d{3}-\\d{3}-\\d{4}"';case"duration":return"Must be a valid ISO 8601 duration (e.g., 'PT1H30M')";default:return"Must be a correctly formatted "+e.requiredFormat}},minimum:"Must be {{minimumValue}} or more",exclusiveMinimum:"Must be more than {{exclusiveMinimumValue}}",maximum:"Must be {{maximumValue}} or less",exclusiveMaximum:"Must be less than {{exclusiveMaximumValue}}",multipleOf:function(e){return 1/e.multipleOfValue%10===0?`Must have ${Math.log10(1/e.multipleOfValue)} or fewer decimal places.`:`Must be a multiple of ${e.multipleOfValue}.`},minProperties:"Must have {{minimumProperties}} or more items (current items: {{currentProperties}})",maxProperties:"Must have {{maximumProperties}} or fewer items (current items: {{currentProperties}})",minItems:"Must have {{minimumItems}} or more items (current items: {{currentItems}})",maxItems:"Must have {{maximumItems}} or fewer items (current items: {{currentItems}})",uniqueItems:"All items must be unique"},PQ={required:"Este campo est\xE1 requerido.",minLength:"Debe tener {{minimumLength}} caracteres o m\xE1s longitud (longitud actual: {{currentLength}})",maxLength:"Debe tener {{maximumLength}} caracteres o menos longitud (longitud actual: {{currentLength}})",pattern:"Must match pattern: {{requiredPattern}}",format:function(e){switch(e.requiredFormat){case"date":return'Debe tener una fecha, ej "2000-12-31"';case"time":return'Debe tener una hora, ej "16:20" o "03:14:15.9265"';case"date-time":return'Debe tener fecha y hora, ej "2000-03-14T01:59" o "2000-03-14T01:59:26.535Z"';case"email":return'No hay direcci\xF3n de correo electr\xF3nico v\xE1lida, ej "name@example.com"';case"hostname":return'Debe ser un nombre de host v\xE1lido, ej "example.com"';case"ipv4":return'Debe ser una direcci\xF3n de IPv4, ej "127.0.0.1"';case"ipv6":return'Debe ser una direcci\xF3n de IPv6, ej "1234:5678:9ABC:DEF0:1234:5678:9ABC:DEF0"';case"url":return'Debe ser una URL, ej "http://www.example.com/page.html"';case"uuid":return'Debe ser un UUID, ej "12345678-9ABC-DEF0-1234-56789ABCDEF0"';case"color":return'Debe ser un color, ej "#FFFFFF"';case"json-pointer":return'Debe ser un JSON Pointer, ej "/pointer/to/something"';case"relative-json-pointer":return'Debe ser un JSON Pointer relativo, ej "2/pointer/to/something"';case"regex":return'Debe ser una expresi\xF3n regular, ej "(1-)?\\d{3}-\\d{3}-\\d{4}"';case"duration":return"Debe ser una duraci\xF3n v\xE1lida en formato ISO 8601 (p. ej., 'PT1H30M')";default:return"Debe tener el formato correcto "+e.requiredFormat}},minimum:"Debe ser {{minimumValue}} o m\xE1s",exclusiveMinimum:"Debe ser superior a {{exclusiveMinimumValue}}",maximum:"Debe ser {{maximumValue}} o menos",exclusiveMaximum:"Debe ser menor que {{exclusiveMaximumValue}}",multipleOf:function(e){return 1/e.multipleOfValue%10===0?`Se permite un m\xE1ximo de ${Math.log10(1/e.multipleOfValue)} decimales`:`Debe ser m\xFAltiplo de ${e.multipleOfValue}.`},minProperties:"Debe tener {{minimumProperties}} o m\xE1s elementos (elementos actuales: {{currentProperties}})",maxProperties:"Debe tener {{maximumProperties}} o menos elementos (elementos actuales: {{currentProperties}})",minItems:"Debe tener {{minimumItems}} o m\xE1s elementos (elementos actuales: {{currentItems}})",maxItems:"Debe tener {{maximumItems}} o menos elementos (elementos actuales: {{currentItems}})",uniqueItems:"Todos los elementos deben ser \xFAnicos"},OQ={required:"Est obligatoire.",minLength:"Doit avoir minimum {{minimumLength}} caract\xE8res (actuellement: {{currentLength}})",maxLength:"Doit avoir maximum {{maximumLength}} caract\xE8res (actuellement: {{currentLength}})",pattern:"Doit respecter: {{requiredPattern}}",format:function(e){switch(e.requiredFormat){case"date":return'Doit \xEAtre une date, tel que "2000-12-31"';case"time":return'Doit \xEAtre une heure, tel que "16:20" ou "03:14:15.9265"';case"date-time":return'Doit \xEAtre une date et une heure, tel que "2000-03-14T01:59" ou "2000-03-14T01:59:26.535Z"';case"email":return'Doit \xEAtre une adresse e-mail, tel que "name@example.com"';case"hostname":return'Doit \xEAtre un nom de domaine, tel que "example.com"';case"ipv4":return'Doit \xEAtre une adresse IPv4, tel que "127.0.0.1"';case"ipv6":return'Doit \xEAtre une adresse IPv6, tel que "1234:5678:9ABC:DEF0:1234:5678:9ABC:DEF0"';case"url":return'Doit \xEAtre une URL, tel que "http://www.example.com/page.html"';case"uuid":return'Doit \xEAtre un UUID, tel que "12345678-9ABC-DEF0-1234-56789ABCDEF0"';case"color":return'Doit \xEAtre une couleur, tel que "#FFFFFF"';case"json-pointer":return'Doit \xEAtre un JSON Pointer, tel que "/pointer/to/something"';case"relative-json-pointer":return'Doit \xEAtre un relative JSON Pointer, tel que "2/pointer/to/something"';case"regex":return'Doit \xEAtre une expression r\xE9guli\xE8re, tel que "(1-)?\\d{3}-\\d{3}-\\d{4}"';case"duration":return"Doit \xEAtre une dur\xE9e valide au format ISO 8601 (par ex., 'PT1H30M')";default:return"Doit \xEAtre avoir le format correct: "+e.requiredFormat}},minimum:"Doit \xEAtre sup\xE9rieur \xE0 {{minimumValue}}",exclusiveMinimum:"Doit avoir minimum {{exclusiveMinimumValue}} charact\xE8res",maximum:"Doit \xEAtre inf\xE9rieur \xE0 {{maximumValue}}",exclusiveMaximum:"Doit avoir maximum {{exclusiveMaximumValue}} charact\xE8res",multipleOf:function(e){return 1/e.multipleOfValue%10===0?`Doit comporter ${Math.log10(1/e.multipleOfValue)} ou moins de decimales.`:`Doit \xEAtre un multiple de ${e.multipleOfValue}.`},minProperties:"Doit comporter au minimum {{minimumProperties}} \xE9l\xE9ments",maxProperties:"Doit comporter au maximum {{maximumProperties}} \xE9l\xE9ments",minItems:"Doit comporter au minimum {{minimumItems}} \xE9l\xE9ments",maxItems:"Doit comporter au maximum {{minimumItems}} \xE9l\xE9ments",uniqueItems:"Tous les \xE9l\xE9ments doivent \xEAtre uniques"},MQ={required:"Il campo \xE8 obbligatorio",minLength:"Deve inserire almeno {{minimumLength}} caratteri (lunghezza corrente: {{currentLength}})",maxLength:"Il numero massimo di caratteri consentito \xE8 {{maximumLength}} (lunghezza corrente: {{currentLength}})",pattern:"Devi rispettare il pattern : {{requiredPattern}}",format:function(e){switch(e.requiredFormat){case"date":return'Deve essere una data, come "31-12-2000"';case"time":return'Deve essere un orario, come "16:20" o "03:14:15.9265"';case"date-time":return'Deve essere data-orario, come "14-03-2000T01:59" or "14-03-2000T01:59:26.535Z"';case"email":return'Deve essere un indirzzo email, come "name@example.com"';case"hostname":return'Deve essere un hostname, come "example.com"';case"ipv4":return'Deve essere un indirizzo IPv4, come "127.0.0.1"';case"ipv6":return'Deve essere un indirizzo IPv6, come "1234:5678:9ABC:DEF0:1234:5678:9ABC:DEF0"';case"url":return'Deve essere un url, come "http://www.example.com/page.html"';case"uuid":return'Deve essere un uuid, come "12345678-9ABC-DEF0-1234-56789ABCDEF0"';case"color":return'Deve essere un colore, come "#FFFFFF"';case"json-pointer":return'Deve essere un JSON Pointer, come "/pointer/to/something"';case"relative-json-pointer":return'Deve essere un JSON Pointer relativo, come "2/pointer/to/something"';case"regex":return'Deve essere una regular expression, come "(1-)?\\d{3}-\\d{3}-\\d{4}"';case"duration":return"Deve essere una durata valida nel formato ISO 8601 (es. 'PT1H30M')";default:return"Deve essere formattato correttamente "+e.requiredFormat}},minimum:"Deve essere {{minimumValue}} o pi\xF9",exclusiveMinimum:"Deve essere pi\xF9 di {{exclusiveMinimumValue}}",maximum:"Deve essere {{maximumValue}} o meno",exclusiveMaximum:"Deve essere minore di {{exclusiveMaximumValue}}",multipleOf:function(e){return 1/e.multipleOfValue%10===0?`Deve avere ${Math.log10(1/e.multipleOfValue)} o meno decimali.`:`Deve essere multiplo di ${e.multipleOfValue}.`},minProperties:"Deve avere {{minimumProperties}} o pi\xF9 elementi (elementi correnti: {{currentProperties}})",maxProperties:"Deve avere {{maximumProperties}} o meno elementi (elementi correnti: {{currentProperties}})",minItems:"Deve avere {{minimumItems}} o pi\xF9 elementi (elementi correnti: {{currentItems}})",maxItems:"Deve avere {{maximumItems}} o meno elementi (elementi correnti: {{currentItems}})",uniqueItems:"Tutti gli elementi devono essere unici"},kQ={required:"Este campo \xE9 obrigat\xF3rio.",minLength:"\xC9 preciso no m\xEDnimo {{minimumLength}} caracteres ou mais (tamanho atual: {{currentLength}})",maxLength:"\xC9 preciso no m\xE1ximo {{maximumLength}} caracteres ou menos (tamanho atual: {{currentLength}})",pattern:"Tem que ajustar ao formato: {{requiredPattern}}",format:function(e){switch(e.requiredFormat){case"date":return'Tem que ser uma data, por exemplo "2000-12-31"';case"time":return'Tem que ser hor\xE1rio, por exemplo "16:20" ou "03:14:15.9265"';case"date-time":return'Tem que ser data e hora, por exemplo "2000-03-14T01:59" ou "2000-03-14T01:59:26.535Z"';case"email":return'Tem que ser um email, por exemplo "fulano@exemplo.com.br"';case"hostname":return'Tem que ser uma nome de dom\xEDnio, por exemplo "exemplo.com.br"';case"ipv4":return'Tem que ser um endere\xE7o IPv4, por exemplo "127.0.0.1"';case"ipv6":return'Tem que ser um endere\xE7o IPv6, por exemplo "1234:5678:9ABC:DEF0:1234:5678:9ABC:DEF0"';case"url":return'Tem que ser uma URL, por exemplo "http://www.exemplo.com.br/pagina.html"';case"uuid":return'Tem que ser um uuid, por exemplo "12345678-9ABC-DEF0-1234-56789ABCDEF0"';case"color":return'Tem que ser uma cor, por exemplo "#FFFFFF"';case"json-pointer":return'Tem que ser um JSON Pointer, por exemplo "/referencia/para/algo"';case"relative-json-pointer":return'Tem que ser um JSON Pointer relativo, por exemplo "2/referencia/para/algo"';case"regex":return'Tem que ser uma express\xE3o regular, por exemplo "(1-)?\\d{3}-\\d{3}-\\d{4}"';case"duration":return"Deve ser uma dura\xE7\xE3o v\xE1lida no formato ISO 8601 (ex.: 'PT1H30M')";default:return"Tem que ser no formato: "+e.requiredFormat}},minimum:"Tem que ser {{minimumValue}} ou mais",exclusiveMinimum:"Tem que ser mais que {{exclusiveMinimumValue}}",maximum:"Tem que ser {{maximumValue}} ou menos",exclusiveMaximum:"Tem que ser menor que {{exclusiveMaximumValue}}",multipleOf:function(e){return 1/e.multipleOfValue%10===0?`Tem que ter ${Math.log10(1/e.multipleOfValue)} ou menos casas decimais.`:`Tem que ser um m\xFAltiplo de ${e.multipleOfValue}.`},minProperties:"Deve ter {{minimumProperties}} ou mais itens (itens at\xE9 o momento: {{currentProperties}})",maxProperties:"Deve ter {{maximumProperties}} ou menos intens (itens at\xE9 o momento: {{currentProperties}})",minItems:"Deve ter {{minimumItems}} ou mais itens (itens at\xE9 o momento: {{currentItems}})",maxItems:"Deve ter {{maximumItems}} ou menos itens (itens at\xE9 o momento: {{currentItems}})",uniqueItems:"Todos os itens devem ser \xFAnicos"},AQ={required:"\u5FC5\u586B\u5B57\u6BB5.",minLength:"\u5B57\u7B26\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u6216\u8005\u7B49\u4E8E {{minimumLength}} (\u5F53\u524D\u957F\u5EA6: {{currentLength}})",maxLength:"\u5B57\u7B26\u957F\u5EA6\u5FC5\u987B\u5C0F\u4E8E\u6216\u8005\u7B49\u4E8E {{maximumLength}} (\u5F53\u524D\u957F\u5EA6: {{currentLength}})",pattern:"\u5FC5\u987B\u5339\u914D\u6B63\u5219\u8868\u8FBE\u5F0F: {{requiredPattern}}",format:function(e){switch(e.requiredFormat){case"date":return'\u5FC5\u987B\u4E3A\u65E5\u671F\u683C\u5F0F, \u6BD4\u5982 "2000-12-31"';case"time":return'\u5FC5\u987B\u4E3A\u65F6\u95F4\u683C\u5F0F, \u6BD4\u5982 "16:20" \u6216\u8005 "03:14:15.9265"';case"date-time":return'\u5FC5\u987B\u4E3A\u65E5\u671F\u65F6\u95F4\u683C\u5F0F, \u6BD4\u5982 "2000-03-14T01:59" \u6216\u8005 "2000-03-14T01:59:26.535Z"';case"email":return'\u5FC5\u987B\u4E3A\u90AE\u7BB1\u5730\u5740, \u6BD4\u5982 "name@example.com"';case"hostname":return'\u5FC5\u987B\u4E3A\u4E3B\u673A\u540D, \u6BD4\u5982 "example.com"';case"ipv4":return'\u5FC5\u987B\u4E3A IPv4 \u5730\u5740, \u6BD4\u5982 "127.0.0.1"';case"ipv6":return'\u5FC5\u987B\u4E3A IPv6 \u5730\u5740, \u6BD4\u5982 "1234:5678:9ABC:DEF0:1234:5678:9ABC:DEF0"';case"url":return'\u5FC5\u987B\u4E3A url, \u6BD4\u5982 "http://www.example.com/page.html"';case"uuid":return'\u5FC5\u987B\u4E3A uuid, \u6BD4\u5982 "12345678-9ABC-DEF0-1234-56789ABCDEF0"';case"color":return'\u5FC5\u987B\u4E3A\u989C\u8272\u503C, \u6BD4\u5982 "#FFFFFF"';case"json-pointer":return'\u5FC5\u987B\u4E3A JSON Pointer, \u6BD4\u5982 "/pointer/to/something"';case"relative-json-pointer":return'\u5FC5\u987B\u4E3A\u76F8\u5BF9\u7684 JSON Pointer, \u6BD4\u5982 "2/pointer/to/something"';case"regex":return'\u5FC5\u987B\u4E3A\u6B63\u5219\u8868\u8FBE\u5F0F, \u6BD4\u5982 "(1-)?\\d{3}-\\d{3}-\\d{4}"';case"duration":return"\u5FC5\u987B\u662F\u6709\u6548\u7684 ISO 8601 \u6301\u7EED\u65F6\u95F4\uFF08\u4F8B\u5982\uFF1A'PT1H30M'\uFF09";default:return"\u5FC5\u987B\u4E3A\u683C\u5F0F\u6B63\u786E\u7684 "+e.requiredFormat}},minimum:"\u5FC5\u987B\u5927\u4E8E\u6216\u8005\u7B49\u4E8E\u6700\u5C0F\u503C: {{minimumValue}}",exclusiveMinimum:"\u5FC5\u987B\u5927\u4E8E\u6700\u5C0F\u503C: {{exclusiveMinimumValue}}",maximum:"\u5FC5\u987B\u5C0F\u4E8E\u6216\u8005\u7B49\u4E8E\u6700\u5927\u503C: {{maximumValue}}",exclusiveMaximum:"\u5FC5\u987B\u5C0F\u4E8E\u6700\u5927\u503C: {{exclusiveMaximumValue}}",multipleOf:function(e){return 1/e.multipleOfValue%10===0?`\u5FC5\u987B\u6709 ${Math.log10(1/e.multipleOfValue)} \u4F4D\u6216\u66F4\u5C11\u7684\u5C0F\u6570\u4F4D`:`\u5FC5\u987B\u4E3A ${e.multipleOfValue} \u7684\u500D\u6570`},minProperties:"\u9879\u76EE\u6570\u5FC5\u987B\u5927\u4E8E\u6216\u8005\u7B49\u4E8E {{minimumProperties}} (\u5F53\u524D\u9879\u76EE\u6570: {{currentProperties}})",maxProperties:"\u9879\u76EE\u6570\u5FC5\u987B\u5C0F\u4E8E\u6216\u8005\u7B49\u4E8E {{maximumProperties}} (\u5F53\u524D\u9879\u76EE\u6570: {{currentProperties}})",minItems:"\u9879\u76EE\u6570\u5FC5\u987B\u5927\u4E8E\u6216\u8005\u7B49\u4E8E {{minimumItems}} (\u5F53\u524D\u9879\u76EE\u6570: {{currentItems}})",maxItems:"\u9879\u76EE\u6570\u5FC5\u987B\u5C0F\u4E8E\u6216\u8005\u7B49\u4E8E {{maximumItems}} (\u5F53\u524D\u9879\u76EE\u6570: {{currentItems}})",uniqueItems:"\u6240\u6709\u9879\u76EE\u5FC5\u987B\u662F\u552F\u4E00\u7684"};function Kl(e,n,t=!1){return n.map(i=>i(e,t))}function DQ(e,n,t=!1){return n.map(i=>i(e,t))}function vr(...e){let n={};for(let t of e)if(te(t))for(let i of Object.keys(t)){let r=t[i],a=n[i];n[i]=nt(a)?i==="not"&&Fi(a,"strict")&&Fi(r,"strict")?Mt(a,r):Ya(a)==="object"&&Ya(r)==="object"?vr(a,r):r:r}return n}function o0(e){let n=vr(...e);return Ae(n)?null:n}function nt(e){return e!=null}function Ie(e){return e!=null&&e!==""}function Ae(e){return W(e)?!e.length:te(e)?!Object.keys(e).length:e==null||e===""}function yt(e){return typeof e=="string"}function Nt(e,n=!1){return n&&typeof e!="number"?!1:!isNaN(e)&&e!==e/0}function Wd(e,n=!1){return n&&typeof e!="number"?!1:!isNaN(e)&&e!==e/0&&e%1===0}function Fi(e,n=null){return n==="strict"?e===!0||e===!1:n===!0?e===!0||e===1||e==="true"||e==="1":n===!1?e===!1||e===0||e==="false"||e==="0":e===!0||e===1||e==="true"||e==="1"||e===!1||e===0||e==="false"||e==="0"}function te(e){return e!==null&&typeof e=="object"}function W(e){return Array.isArray(e)}function Xa(e){return!!e&&Object.prototype.toString.call(e)==="[object Date]"}function mi(e){return!!e&&Object.prototype.toString.call(e)==="[object Map]"}function Ja(e){return!!e&&Object.prototype.toString.call(e)==="[object Set]"}function Ya(e,n=!1){return nt(e)?W(e)?"array":te(e)?"object":Fi(e,"strict")?"boolean":Wd(e,n)?"integer":Nt(e,n)?"number":yt(e)||!n&&Xa(e)?"string":null:"null"}function rO(e,n){switch(n){case"string":return yt(e)||Xa(e);case"number":return Nt(e);case"integer":return Wd(e);case"boolean":return Fi(e);case"null":return!Ie(e);default:return console.error(`isType error: "${n}" is not a recognized type.`),null}}function NQ(e){return yt(e)||Nt(e)||Fi(e,"strict")||e===null}var FQ=e=>{let n=e.getDate(),t=e.getMonth()+1;return`${e.getFullYear()}-${t<10?"0"+t:t}-${n<10?"0"+n:n}`};function to(e,n,t=!0){if(!nt(e))return null;if(yt(n)&&(n=[n]),t&&Gt("integer",n)){if(Wd(e,"strict"))return e;if(Wd(e))return parseInt(e,10)}if(Gt("number",n)||!t&&Gt("integer",n)){if(Nt(e,"strict"))return e;if(Nt(e))return parseFloat(e)}if(Gt("string",n)){if(yt(e))return e;if(Xa(e))return FQ(e);if(Nt(e))return e.toString()}if(Xa(e)&&(Gt("integer",n)||Gt("number",n)))return e.getTime();if(Gt("boolean",n)){if(Fi(e,!0))return!0;if(Fi(e,!1))return!1}return null}function qQ(e,n){if(W(n)||(n=[n]),n.includes("null")&&!Ie(e))return null;if(n.includes("boolean")&&!Fi(e,"strict"))return e;if(n.includes("integer")){let t=to(e,"integer");if(t!==null)return+t}if(n.includes("number")){let t=to(e,"number");if(t!==null)return+t}if((yt(e)||Nt(e,"strict"))&&n.includes("string"))return to(e,"string");if(n.includes("boolean")&&Fi(e))return to(e,"boolean");if(n.includes("string")){if(e===null)return"";let t=to(e,"string");if(t!==null)return t}if(n.includes("number")||n.includes("integer")){if(e===!0)return 1;if(e===!1||e===null||e==="")return 0}if(n.includes("number")){let t=parseFloat(e);if(t)return t}if(n.includes("integer")){let t=parseInt(e,10);if(t)return t}if(n.includes("boolean"))return!!e;if((n.includes("number")||n.includes("integer"))&&!n.includes("null"))return 0}function VQ(e){return!!e&&typeof e.then=="function"}function jQ(e){return!!e&&typeof e.subscribe=="function"}function RQ(e){let n=VQ(e)?r1(e):e;return jQ(n)?n:(console.error("toObservable error: Expected validator to return Promise or Observable."),new i1)}function Gt(e,n,t=!1){return!nt(e)||!W(n)?!1:W(e)?e[t?"every":"some"](i=>n.includes(i)):n.includes(e)}function Mt(e,n){return!!e&&!n||!e&&!!n}function Oue(e,n){let t=l=>!Ja(l)&&!W(l)&&!yt(l);if(t(n))return e;t(e)&&(e="");let i=l=>Ja(l)?l:W(l)?new Set(l):new Set(l.split(" ")),r=i(e);return i(n).forEach(l=>r.add(l)),Ja(e)?r:W(e)?Array.from(r):Array.from(r).join(" ")}function zd(e,n=!1){return typeof e!="object"||e===null?e:mi(e)?new Map(e):Ja(e)?new Set(e):W(e)?[...e]:te(e)?ye({},e):(n&&console.error("copy error: Object to copy must be a JavaScript object or value."),e)}function Rn(e,n,t=!1,i=e,r=!1){if(!Ae(e)){if((te(e)||W(e))&&typeof n=="function")for(let a of Object.keys(e)){let l=e[a];t==="bottom-up"&&(te(l)||W(l))&&Rn(l,n,t,i),n(l,a,e,i),t==="top-down"&&(te(l)||W(l))&&Rn(l,n,t,i)}r&&(typeof n!="function"&&(console.error("forEach error: Iterator must be a function."),console.error("function",n)),!te(e)&&!W(e)&&(console.error("forEach error: Input object must be an object or array."),console.error("object",e)))}}function a0(e,n,t=!1){if(Ie(e)){if((te(e)||W(e))&&typeof e!="function"){let i=W(e)?[]:{};for(let r of Object.keys(e))i[r]=n(e[r],r,e);return i}t&&(typeof n!="function"&&(console.error("forEachCopy error: Iterator must be a function."),console.error("function",n)),!te(e)&&!W(e)&&(console.error("forEachCopy error: Input object must be an object or array."),console.error("object",e)))}}function N(e,n){if(!e||!["number","string","symbol"].includes(typeof n)||!te(e)&&!W(e)&&!mi(e)&&!Ja(e))return!1;if(mi(e)||Ja(e))return e.has(n);if(typeof n=="number"){if(W(e))return e[n];n=n+""}return e.hasOwnProperty(n)}var Vo=function(e){return e[e.EQUALS=0]="EQUALS",e[e.NOT_EQUALS=1]="NOT_EQUALS",e[e.NOT_AN_EXPRESSION=2]="NOT_AN_EXPRESSION",e}(Vo||{});function BQ(e){return e.indexOf("==")!==-1?Vo.EQUALS:e.toString().indexOf("!=")!==-1?Vo.NOT_EQUALS:Vo.NOT_AN_EXPRESSION}function u0(e){return e===Vo.EQUALS}function c0(e){return e===Vo.NOT_EQUALS}function LQ(e){return e===Vo.NOT_AN_EXPRESSION}function zQ(e,n){return u0(e)?n.split("==",2):c0(e)?n.split("!=",2):null}function UQ(e){return e.charAt(0)==="'"&&e.charAt(e.length-1)==="'"?e.replace("'","").replace("'",""):e}function oO(e,n,t=[],i=a=>a,r=a=>a){if(!te(n))return e;te(e)||(e={});for(let a of Object.keys(n))!Gt(a,t)&&nt(n[a])&&(e[i(a)]=r(n[a]));return e}function jd(...e){let n=[];for(let t of e)n.includes(t)||n.push(t);return n}function HQ(...e){let n=null;for(let t of e)if(yt(t)&&(t=[t]),n=n===null?[...t]:n.filter(i=>t.includes(i)),!n.length)return[];return n}function Cr(e){return e&&dO(e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," "))}function dO(e,n){if(!yt(e))return e;let t=["a","an","and","as","at","but","by","en","for","if","in","nor","of","on","or","per","the","to","v","v.","vs","vs.","via"];yt(n)&&(n=n.split("|")),W(n)&&(t=t.concat(n));let i=t.map(l=>l.toLowerCase()),r=e===e.toUpperCase()||e===e.toLowerCase(),a="";return e=e.trim(),e.replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,(l,u)=>{if(!r&&l.slice(1).search(/[A-Z]|\../)!==-1)return l;{let d,p=t[i.indexOf(l.toLowerCase())];return p?p===p.toLowerCase()&&(u===0||u+l.length===e.length||a===":"||e[u-1].search(/[^\s-]/)!==-1||e[u-1]!=="-"&&e[u+l.length]==="-")?d=p[0].toUpperCase()+p.slice(1):d=p:r?l.slice(1).search(/\../)!==-1?d=l.toLowerCase():d=l[0].toUpperCase()+l.slice(1).toLowerCase():d=l[0].toUpperCase()+l.slice(1),a=l.slice(-1),d}})}function fO(e){return e===null||typeof e!="object"?!1:(0,Xi.some)(e,n=>te(n)?fO(n):!(0,Xi.isNil)(n))}var H=(()=>{let n=class n{static get(i,r,a=0,l=null,u=!1,d=!1){if(i===null)return u?!1:void 0;let p=this.parse(r,d);if(typeof i=="object"&&p!==null){let h=i;if(a>=p.length||l<=-p.length)return i;a<=-p.length&&(a=0),(!nt(l)||l>=p.length)&&(l=p.length),p=p.slice(a,l);for(let _ of p)if(_==="-"&&W(h)&&h.length&&(_=h.length-1),mi(h)&&h.has(_))h=h.get(_);else if(typeof h=="object"&&h!==null&&N(h,_))h=h[_];else{let C=n.evaluateExpression(h,_);if(C.passed)h=C.key?h[C.key]:h;else return this.logErrors(d,_,r,i),u?!1:void 0}return u?!0:h}return d&&p===null&&console.error(`get error: Invalid JSON Pointer: ${r}`),d&&typeof i!="object"&&(console.error("get error: Invalid object:"),console.error(i)),u?!1:void 0}static logErrors(i,r,a,l){i&&(console.error(`get error: "${r}" key not found in object.`),console.error(a),console.error(l))}static evaluateExpression(i,r){let a={passed:!1,key:r},l=this.parseKeysAndExpression(r,i);if(!l)return a;let u=this.doOwnCheckResult(i,l);if(u)return u;let d=UQ(l.keyAndValue[1]),p=this.performExpressionOnValue(l,d,i);return p||a}static performExpressionOnValue(i,r,a){let l=a[i.keyAndValue[0]];return this.doComparisonByExpressionType(i.expressionType,l,r)?{passed:!0,key:i.keyAndValue[0]}:null}static doComparisonByExpressionType(i,r,a){return u0(i)?r===a:c0(i)?r!==a:!1}static doOwnCheckResult(i,r){let a=null;return N(i,r.keyAndValue[0])||(u0(r.expressionType)&&(a={passed:!1,key:null}),c0(r.expressionType)&&(a={passed:!0,key:null})),a}static parseKeysAndExpression(i,r){if(this.keyOrSubObjEmpty(i,r))return null;let a=BQ(i.toString());if(LQ(a))return null;let l=zQ(a,i);return!l||!l[0]||!l[1]?null:{expressionType:a,keyAndValue:l}}static keyOrSubObjEmpty(i,r){return!i||!r}static getCopy(i,r,a=0,l=null,u=!1,d=!1){let p=this.get(i,r,a,l,u,d);return this.forEachDeepCopy(p)}static getFirst(i,r=null,a=!1){if(!Ae(i)){if(W(i)){for(let l of i)if(!Ae(l)){if(W(l)&&l.length>=2){if(Ae(l[0])||Ae(l[1]))continue;let u=a?this.getCopy(l[0],l[1]):this.get(l[0],l[1]);if(u)return u;continue}console.error(`getFirst error: Input not in correct format.
28
- Should be: [ [ object1, pointer1 ], [ object 2, pointer2 ], etc... ]`);return}return r}if(mi(i)){for(let[l,u]of i){if(l===null||!this.isJsonPointer(u))continue;let d=a?this.getCopy(l,u):this.get(l,u);if(d)return d}return r}return console.error(`getFirst error: Input not in correct format.
29
- Should be: [ [ object1, pointer1 ], [ object 2, pointer2 ], etc... ]`),r}}static getFirstCopy(i,r=null){return this.getFirst(i,r,!0)}static set(i,r,a,l=!1){let u=this.parse(r);if(u!==null&&u.length){let d=i;for(let h=0;h<u.length-1;++h){let _=u[h];_==="-"&&W(d)&&(_=d.length),mi(d)&&d.has(_)?d=d.get(_):(N(d,_)||(d[_]=u[h+1].match(/^(\d+|-)$/)?[]:{}),d=d[_])}let p=u[u.length-1];return W(d)&&p==="-"?d.push(a):l&&W(d)&&!isNaN(+p)?d.splice(p,0,a):mi(d)?d.set(p,a):d[p]=a,i}return console.error(`set error: Invalid JSON Pointer: ${r}`),i}static setCopy(i,r,a,l=!1){let u=this.parse(r);if(u!==null){let d=zd(i),p=d;for(let _=0;_<u.length-1;++_){let C=u[_];C==="-"&&W(p)&&(C=p.length),mi(p)&&p.has(C)?(p.set(C,zd(p.get(C))),p=p.get(C)):(N(p,C)||(p[C]=u[_+1].match(/^(\d+|-)$/)?[]:{}),p[C]=zd(p[C]),p=p[C])}let h=u[u.length-1];return W(p)&&h==="-"?p.push(a):l&&W(p)&&!isNaN(+h)?p.splice(h,0,a):mi(p)?p.set(h,a):p[h]=a,d}return console.error(`setCopy error: Invalid JSON Pointer: ${r}`),i}static insert(i,r,a){return this.set(i,r,a,!0)}static insertCopy(i,r,a){return this.setCopy(i,r,a,!0)}static remove(i,r){let a=this.parse(r);if(a!==null&&a.length){let l=a.pop(),u=this.get(i,a);return W(u)?(l==="-"&&(l=u.length-1),u.splice(l,1)):te(u)&&delete u[l],i}return console.error(`remove error: Invalid JSON Pointer: ${r}`),i}static has(i,r){return this.get(i,r,0,null,!0)}static dict(i){let r={};return this.forEachDeep(i,(a,l)=>{typeof a!="object"&&(r[l]=a)}),r}static forEachDeep(i,r=d=>d,a=!1,l="",u=i){if(typeof r!="function"){console.error("forEachDeep error: Iterator is not a function:",r);return}if(a||r(i,l,u),te(i)||W(i))for(let d of Object.keys(i)){let p=l+"/"+this.escape(d);this.forEachDeep(i[d],r,a,p,u)}a&&r(i,l,u)}static forEachDeepCopy(i,r=d=>d,a=!1,l="",u=i){if(typeof r!="function")return console.error("forEachDeepCopy error: Iterator is not a function:",r),null;if(te(i)||W(i)){let d=W(i)?[...i]:ye({},i);a||(d=r(d,l,u));for(let p of Object.keys(d)){let h=l+"/"+this.escape(p);d[p]=this.forEachDeepCopy(d[p],r,a,h,u)}return a&&(d=r(d,l,u)),d}else return r(i,l,u)}static escape(i){return i.toString().replace(/~/g,"~0").replace(/\//g,"~1")}static unescape(i){return i.toString().replace(/~1/g,"/").replace(/~0/g,"~")}static parse(i,r=!1){if(!this.isJsonPointer(i))return r&&console.error(`parse error: Invalid JSON Pointer: ${i}`),null;if(W(i))return i;if(typeof i=="string")return i[0]==="#"&&(i=i.slice(1)),i===""||i==="/"?[]:i.slice(1).split("/").map(this.unescape)}static compile(i,r="",a=!1){if(i==="#")return"";if(!this.isJsonPointer(i))return a&&console.error(`compile error: Invalid JSON Pointer: ${i}`),null;if(W(i))return i.length===0?"":"/"+i.map(l=>l===""?r:this.escape(l)).join("/");if(typeof i=="string")return i[0]==="#"&&(i=i.slice(1)),i}static toKey(i,r=!1){let a=this.parse(i,r);return a===null?null:a.length?a[a.length-1]:""}static isJsonPointer(i){if(W(i))return i.every(r=>typeof r=="string");if(yt(i)){if(i===""||i==="#")return!0;if(i[0]==="/"||i.slice(0,2)==="#/")return!/(~[^01]|~$)/g.test(i)}return!1}static isSubPointer(i,r,a=!1,l=!1){if(!this.isJsonPointer(i)||!this.isJsonPointer(r)){if(l){let u="";this.isJsonPointer(i)||(u+=` 1: ${i}`),this.isJsonPointer(r)||(u+=` 2: ${r}`),console.error(`isSubPointer error: Invalid JSON Pointer ${u}`)}return}return i=this.compile(i,"",l),r=this.compile(r,"",l),i===r?a:`${i}/`===r.slice(0,i.length+1)}static toIndexedPointer(i,r,a=null){if(this.isJsonPointer(i)&&W(r)){let l=this.compile(i);if(mi(a)){let u=0;return l.replace(/\/\-(?=\/|$)/g,(d,p)=>a.has(l.slice(0,p))?"/"+r[u++]:d)}else{for(let u of r)l=l.replace("/-","/"+u);return l}}this.isJsonPointer(i)||console.error(`toIndexedPointer error: Invalid JSON Pointer: ${i}`),W(r)||console.error(`toIndexedPointer error: Invalid indexArray: ${r}`)}static toGenericPointer(i,r=new Map){if(this.isJsonPointer(i)&&mi(r)){let a=this.parse(i);for(let l=1;l<a.length;l++){let u=this.compile(a.slice(0,l));r.has(u)&&r.get(u)<=+a[l]&&(a[l]="-")}return this.compile(a)}this.isJsonPointer(i)||console.error(`toGenericPointer error: invalid JSON Pointer: ${i}`),mi(r)||console.error(`toGenericPointer error: invalid arrayMap: ${r}`)}static toControlPointer(i,r,a=!1){let l=this.parse(i),u=[],d=r;if(l!==null){for(let p of l)if(N(d,"controls")&&(u.push("controls"),d=d.controls),W(d)&&p==="-")u.push((d.length-1).toString()),d=d[d.length-1];else if(N(d,p))u.push(p),d=d[p];else if(a){console.error(`toControlPointer error: Unable to find "${p}" item in FormGroup.`),console.error(i),console.error(r);return}else u.push(p),d={controls:{}};return this.compile(u)}console.error(`toControlPointer error: Invalid JSON Pointer: ${i}`)}static toSchemaPointer(i,r){if(this.isJsonPointer(i)&&typeof r=="object"){let a=this.parse(i);if(!a.length)return"";let l=a.shift();if(r.type==="object"||r.properties||r.additionalProperties){if((r.properties||{})[l])return`/properties/${this.escape(l)}`+this.toSchemaPointer(a,r.properties[l]);if(r.additionalProperties)return"/additionalProperties"+this.toSchemaPointer(a,r.additionalProperties)}if((r.type==="array"||r.items)&&(Nt(l)||l==="-"||l==="")){let u=l==="-"||l===""?0:+l;if(W(r.items)){if(u<r.items.length)return"/items/"+u+this.toSchemaPointer(a,r.items[u]);if(r.additionalItems)return"/additionalItems"+this.toSchemaPointer(a,r.additionalItems)}else{if(te(r.items))return"/items"+this.toSchemaPointer(a,r.items);if(te(r.additionalItems))return"/additionalItems"+this.toSchemaPointer(a,r.additionalItems)}}return console.error(`toSchemaPointer error: Data pointer ${i} not compatible with schema ${r}`),null}return this.isJsonPointer(i)||console.error(`toSchemaPointer error: Invalid JSON Pointer: ${i}`),typeof r!="object"&&console.error(`toSchemaPointer error: Invalid JSON Schema: ${r}`),null}static toDataPointer(i,r,a=!1){if(this.isJsonPointer(i)&&typeof r=="object"&&this.has(r,i)){let l=this.parse(i);if(!l.length)return"";let u=l.shift();if(u==="properties"||u==="items"&&W(r.items)){let d=l.shift(),p=this.toDataPointer(l,r[u][d]);return p===null?null:"/"+d+p}else if(u==="additionalItems"||u==="items"&&te(r.items)){let d=this.toDataPointer(l,r[u]);return d===null?null:"/-"+d}else if(["allOf","anyOf","oneOf"].includes(u)){let d=l.shift();return this.toDataPointer(l,r[u][d])}else{if(u==="not")return this.toDataPointer(l,r[u]);["contains","definitions","dependencies","additionalItems","additionalProperties","patternProperties","propertyNames"].includes(u)&&a&&console.error("toDataPointer error: Ambiguous location")}return""}return a&&(this.isJsonPointer(i)||console.error(`toDataPointer error: Invalid JSON Pointer: ${i}`),typeof r!="object"&&console.error(`toDataPointer error: Invalid JSON Schema: ${r}`),typeof r!="object"&&console.error(`toDataPointer error: Pointer ${i} invalid for Schema: ${r}`)),null}static parseObjectPath(i){if(W(i))return i;if(this.isJsonPointer(i))return this.parse(i);if(typeof i=="string"){let r=0,a=[];for(;r<i.length;){let l=i.indexOf(".",r),u=i.indexOf("[",r);if(l===-1&&u===-1)a.push(i.slice(r)),r=i.length;else if(l!==-1&&(l<u||u===-1))a.push(i.slice(r,l)),r=l+1;else{u>r&&(a.push(i.slice(r,u)),r=u);let d=i.charAt(u+1);if(d==='"'||d==="'"){let p=i.indexOf(d+"]",u);for(;p!==-1&&i.charAt(p-1)==="\\";)p=i.indexOf(d+"]",p+2);p===-1&&(p=i.length),a.push(i.slice(r+2,p).replace(new RegExp("\\"+d,"g"),d)),r=p+2}else{let p=i.indexOf("]",u);p===-1&&(p=i.length),a.push(i.slice(r+1,p)),r=p+1}i.charAt(r)==="."&&r++}}return a}console.error("parseObjectPath error: Input object path must be a string.")}};n.\u0275fac=function(r){return new(r||n)},n.\u0275prov=Kn({token:n,factory:n.\u0275fac});let e=n;return e})(),WQ={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d(?::[0-5]\d)?(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/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,hostname:/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,uri:/^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/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:/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,color:/^\s*(#(?:[\da-f]{3}){1,2}|rgb\((?:\d{1,3},\s*){2}\d{1,3}\)|rgba\((?:\d{1,3},\s*){3}\d*\.?\d+\)|hsl\(\d{1,3}(?:,\s*\d{1,3}%){2}\)|hsla\(\d{1,3}(?:,\s*\d{1,3}%){2},\s*\d*\.?\d+\))\s*$/gi,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,duration:/^P(?!$)(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+S)?)?$/,regex:function(e){if(/[^\\]\\Z/.test(e))return!1;try{return!0}catch{return!1}}},Yl=class e{static required(n){switch(n===void 0&&(n=!0),n){case!0:return(t,i=!1)=>i||Ie(t.value)?null:{required:!0};case!1:return e.nullValidator;default:return Ie(n.value)?null:{required:!0}}}static type(n){return Ie(n)?(t,i=!1)=>{if(Ae(t.value))return null;let r=t.value,a=W(n)?n.some(l=>rO(r,l)):rO(r,n);return Mt(a,i)?null:{type:{requiredType:n,currentValue:r}}}:e.nullValidator}static enum(n){return W(n)?(t,i=!1)=>{if(Ae(t.value))return null;let r=t.value,a=(u,d)=>u===d||Nt(u)&&+d==+u||Fi(u,"strict")&&to(d,"boolean")===u||u===null&&!Ie(d)||(0,Ni.default)(u,d),l=W(r)?r.every(u=>n.some(d=>a(d,u))):n.some(u=>a(u,r));return Mt(l,i)?null:{enum:{allowedValues:n,currentValue:r}}}:e.nullValidator}static const(n){return Ie(n)?(t,i=!1)=>{if(Ae(t.value))return null;let r=t.value,l=((u,d)=>u===d||Nt(u)&&+d==+u||Fi(u,"strict")&&to(d,"boolean")===u||u===null&&!Ie(d))(n,r);return Mt(l,i)?null:{const:{requiredValue:n,currentValue:r}}}:e.nullValidator}static minLength(n){return Ie(n)?(t,i=!1)=>{if(Ae(t.value))return null;let r=yt(t.value)?t.value.length:0,a=r>=n;return Mt(a,i)?null:{minLength:{minimumLength:n,currentLength:r}}}:e.nullValidator}static maxLength(n){return Ie(n)?(t,i=!1)=>{let r=yt(t.value)?t.value.length:0,a=r<=n;return Mt(a,i)?null:{maxLength:{maximumLength:n,currentLength:r}}}:e.nullValidator}static pattern(n,t=!1){return Ie(n)?(i,r=!1)=>{if(Ae(i.value))return null;let a,l;typeof n=="string"?(l=t?`^${n}$`:n,a=new RegExp(l)):(l=n.toString(),a=n);let u=i.value,d=yt(u)?a.test(u):!1;return Mt(d,r)?null:{pattern:{requiredPattern:l,currentValue:u}}}:e.nullValidator}static format(n){return Ie(n)?(t,i=!1)=>{if(Ae(t.value))return null;let r,a=t.value;if(yt(a)){let l=WQ[n];typeof l=="object"?r=new RegExp(l.source,l.flags).test(a):typeof l=="function"?r=l(a):(console.error(`format validator error: "${n}" is not a recognized format.`),r=!0)}else r=["date","time","date-time"].includes(n)&&Object.prototype.toString.call(a)==="[object Date]";return Mt(r,i)?null:{format:{requiredFormat:n,currentValue:a}}}:e.nullValidator}static minimum(n){return Ie(n)?(t,i=!1)=>{if(Ae(t.value))return null;let r=t.value,a=!Nt(r)||r>=n;return Mt(a,i)?null:{minimum:{minimumValue:n,currentValue:r}}}:e.nullValidator}static exclusiveMinimum(n){return Ie(n)?(t,i=!1)=>{if(Ae(t.value))return null;let r=t.value,a=!Nt(r)||+r<n;return Mt(a,i)?null:{exclusiveMinimum:{exclusiveMinimumValue:n,currentValue:r}}}:e.nullValidator}static maximum(n){return Ie(n)?(t,i=!1)=>{if(Ae(t.value))return null;let r=t.value,a=!Nt(r)||+r<=n;return Mt(a,i)?null:{maximum:{maximumValue:n,currentValue:r}}}:e.nullValidator}static exclusiveMaximum(n){return Ie(n)?(t,i=!1)=>{if(Ae(t.value))return null;let r=t.value,a=!Nt(r)||+r<n;return Mt(a,i)?null:{exclusiveMaximum:{exclusiveMaximumValue:n,currentValue:r}}}:e.nullValidator}static multipleOf(n){return Ie(n)?(t,i=!1)=>{if(Ae(t.value))return null;let r=t.value,a=Nt(r)&&r%n===0;return Mt(a,i)?null:{multipleOf:{multipleOfValue:n,currentValue:r}}}:e.nullValidator}static minProperties(n){return Ie(n)?(t,i=!1)=>{if(Ae(t.value))return null;let r=Object.keys(t.value).length||0,a=r>=n;return Mt(a,i)?null:{minProperties:{minimumProperties:n,currentProperties:r}}}:e.nullValidator}static maxProperties(n){return Ie(n)?(t,i=!1)=>{let r=Object.keys(t.value).length||0,a=r<=n;return Mt(a,i)?null:{maxProperties:{maximumProperties:n,currentProperties:r}}}:e.nullValidator}static dependencies(n){return Ya(n)!=="object"||Ae(n)?e.nullValidator:(t,i=!1)=>{if(Ae(t.value))return null;let r=vr(a0(n,(a,l)=>{if(!Ie(t.value[l]))return null;let u={},d,p={};Ya(n[l])==="array"?d=n[l]:Ya(n[l])==="object"&&(d=n[l].required||[],p=n[l].properties||{});for(let h of d)Mt(!Ie(t.value[h]),i)&&(u[h]={required:!0});return u=vr(u,a0(p,(h,_)=>{let C=vr(a0(h,(T,x)=>{let O=null;if(T==="maximum"||T==="minimum"){let F=!!h["exclusiveM"+T.slice(1)];O=e[T](x,F)}else typeof e[T]=="function"&&(O=e[T](x));return nt(O)?O(t.value[_]):null}));return Ae(C)?null:{[_]:C}})),Ae(u)?null:{[l]:u}}));return Ae(r)?null:r}}static minItems(n){return Ie(n)?(t,i=!1)=>{if(Ae(t.value))return null;let r=W(t.value)?t.value.length:0,a=r>=n;return Mt(a,i)?null:{minItems:{minimumItems:n,currentItems:r}}}:e.nullValidator}static maxItems(n){return Ie(n)?(t,i=!1)=>{let r=W(t.value)?t.value.length:0,a=r<=n;return Mt(a,i)?null:{maxItems:{maximumItems:n,currentItems:r}}}:e.nullValidator}static uniqueItems(n=!0){return n?(t,i=!1)=>{if(Ae(t.value))return null;let r=t.value.slice().sort(),a=[];for(let u=1;u<r.length;u++)r[u-1]===r[u]&&a.includes(r[u])&&a.push(r[u]);let l=!a.length;return Mt(l,i)?null:{uniqueItems:{duplicateItems:a}}}:e.nullValidator}static contains(n=!0){return n?(t,i=!1)=>{if(Ae(t.value)||!W(t.value))return null;let r=t.value;return Mt(!0,i)?null:{contains:{requiredItem:n,currentItems:r}}}:e.nullValidator}static nullValidator(n){return null}static composeAnyOf(n){if(!n)return null;let t=n.filter(nt);return t.length===0?null:(i,r=!1)=>{let a=Kl(i,t,r).filter(nt),l=n.length>a.length;return Mt(l,r)?null:vr(...a,{anyOf:!r})}}static composeOneOf(n){if(!n)return null;let t=n.filter(nt);return t.length===0?null:(i,r=!1)=>{let a=Kl(i,t),u=n.length-a.filter(nt).length===1;if(Mt(u,r))return null;let d=Kl(i,t,r);return vr(...a,...d,{oneOf:!r})}}static composeAllOf(n){if(!n)return null;let t=n.filter(nt);return t.length===0?null:(i,r=!1)=>{let a=o0(Kl(i,t,r));return Mt(a===null,r)?null:vr(a,{allOf:!r})}}static composeNot(n){return n?(t,i=!1)=>{if(Ae(t.value))return null;let r=n(t,!i);return Mt(r===null,i)?null:vr(r,{not:!i})}:null}static compose(n){if(!n)return null;let t=n.filter(nt);return t.length===0?null:(i,r=!1)=>o0(Kl(i,t,r))}static composeAsync(n){if(!n)return null;let t=n.filter(nt);return t.length===0?null:i=>{let r=DQ(i,t).map(RQ);return a1.call(s1(r),o0)}}static min(n){return Ie(n)?t=>{if(Ae(t.value)||Ae(n))return null;let i=parseFloat(t.value),r=t.value;return isNaN(i)||i>=n?null:{min:{min:n,actual:r}}}:e.nullValidator}static max(n){return Ie(n)?t=>{if(Ae(t.value)||Ae(n))return null;let i=parseFloat(t.value),r=t.value;return isNaN(i)||i<=n?null:{max:{max:n,actual:r}}}:e.nullValidator}static requiredTrue(n){return n?n.value===!0?null:{required:!0}:e.nullValidator}static email(n){return n?/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/.test(n.value)?null:{email:!0}:e.nullValidator}};function Xn(...e){if(e=e.filter(t=>!Ae(t)),e.some(t=>!te(t)))return null;let n={};for(let t of e)for(let i of Object.keys(t)){let r=n[i],a=t[i];if(!N(n,i)||(0,Ni.default)(r,a))n[i]=a;else switch(i){case"allOf":if(W(r)&&W(a))n.allOf=Xn(...r,...a);else return{allOf:[...e]};break;case"additionalItems":case"additionalProperties":case"contains":case"propertyNames":if(te(r)&&te(a))n[i]=Xn(r,a);else if(i==="additionalProperties"&&(r===!1||a===!1))n.combinedSchema=!1;else return{allOf:[...e]};break;case"anyOf":case"oneOf":case"enum":if(W(r)&&W(a)){if(n[i]=r.filter(l=>a.findIndex(u=>(0,Ni.default)(l,u))>-1),!n[i].length)return{allOf:[...e]}}else return{allOf:[...e]};break;case"definitions":if(te(r)&&te(a)){let l=ye({},r);for(let u of Object.keys(a))if(!N(l,u)||(0,Ni.default)(l[u],a[u]))l[u]=a[u];else return{allOf:[...e]};n.definitions=l}else return{allOf:[...e]};break;case"dependencies":if(te(r)&&te(a)){let l=ye({},r);for(let u of Object.keys(a))if(!N(l,u)||(0,Ni.default)(l[u],a[u]))l[u]=a[u];else if(W(a[u])&&W(l[u]))l[u]=jd(...l[u],...a[u]);else if((W(a[u])||te(a[u]))&&(W(l[u])||te(l[u]))){let d=W(n.required)?n.required:[],p=W(l[u])?{required:jd(...d,l[u])}:l[u],h=W(a[u])?{required:jd(...d,a[u])}:a[u];l[u]=Xn(p,h)}else return{allOf:[...e]};n.dependencies=l}else return{allOf:[...e]};break;case"items":if(W(r)&&W(a)){if(n.items=r.filter(l=>a.findIndex(u=>(0,Ni.default)(l,u))>-1),!n.items.length)return{allOf:[...e]}}else if(te(r)&&te(a))n.items=Xn(r,a);else if(W(r)&&te(a))n.items=r.map(l=>Xn(l,a));else if(te(r)&&W(a))n.items=a.map(l=>Xn(l,r));else return{allOf:[...e]};break;case"multipleOf":if(Nt(r)&&Nt(a)){let l=(d,p)=>p?l(p,d%p):d,u=(d,p)=>d*p/l(d,p);n.multipleOf=u(r,a)}else return{allOf:[...e]};break;case"maximum":case"exclusiveMaximum":case"maxLength":case"maxItems":case"maxProperties":if(Nt(r)&&Nt(a))n[i]=Math.min(r,a);else return{allOf:[...e]};break;case"minimum":case"exclusiveMinimum":case"minLength":case"minItems":case"minProperties":if(Nt(r)&&Nt(a))n[i]=Math.max(r,a);else return{allOf:[...e]};break;case"not":if(te(r)&&te(a)){let l=[r,a].reduce((u,d)=>W(d.anyOf)&&Object.keys(d).length===1?[...u,...d.anyOf]:[...u,d],[]);n.not={anyOf:l}}else return{allOf:[...e]};break;case"patternProperties":if(te(r)&&te(a)){let l=ye({},r);for(let u of Object.keys(a))if(!N(l,u)||(0,Ni.default)(l[u],a[u]))l[u]=a[u];else if(te(a[u])&&te(l[u]))l[u]=Xn(l[u],a[u]);else return{allOf:[...e]};n.patternProperties=l}else return{allOf:[...e]};break;case"properties":if(te(r)&&te(a)){let l=ye({},r);N(a,"additionalProperties")&&Object.keys(r).filter(u=>!Object.keys(a).includes(u)).forEach(u=>{a.additionalProperties===!1?delete l[u]:te(a.additionalProperties)&&(l[u]=Xn(l[u],a.additionalProperties))});for(let u of Object.keys(a))if((0,Ni.default)(l[u],a[u])||!N(l,u)&&!N(l,"additionalProperties"))l[u]=a[u];else if(!N(l,u)&&N(l,"additionalProperties"))te(l.additionalProperties)&&(l[u]=Xn(l.additionalProperties,a[u]));else if(te(a[u])&&te(l[u]))l[u]=Xn(l[u],a[u]);else return{allOf:[...e]};n.properties=l}else return{allOf:[...e]};break;case"required":if(W(r)&&W(a))n.required=jd(...r,...a);else if(typeof a=="boolean"&&typeof r=="boolean")n.required=!!r||!!a;else return{allOf:[...e]};break;case"$schema":case"$id":case"id":break;case"title":case"description":case"$comment":n[i]=a;break;case"type":if((W(a)||yt(a))&&(W(r)||yt(r))){let l=HQ(r,a);if(!l.length)return{allOf:[...e]};n.type=l.length>1?l:l[0]}else return{allOf:[...e]};break;case"uniqueItems":n.uniqueItems=!!r||!!a;break;default:return{allOf:[...e]}}}return n}function d0(e,n=!1,t=!0){let i={},r=l=>{let u=Ya(l,"strict");return{integer:"number",null:"string"}[u]||u},a=l=>d0(l,n,!1);if(t&&(i.$schema="http://json-schema.org/draft-06/schema#"),i.type=r(e),i.type==="object"){i.properties={},n&&(i.required=[]);for(let l of Object.keys(e))i.properties[l]=a(e[l]),n&&i.required.push(l)}else i.type==="array"&&(i.items=e.map(a),new Set(e.map(r)).size===1&&(i.items=i.items.reduce((l,u)=>ye(ye({},l),u),{})),n&&(i.minItems=1));return i}function GQ(e,n,t="schema"){let i=H.parse(n);if(i===null)return console.error(`getFromSchema error: Invalid JSON Pointer: ${n}`),null;let r=e,a=[],l=i.length;t.slice(0,6)==="parent"&&i.length--;for(let u=0;u<l;++u){let d=r,p=i[u],h=!1;if(typeof r!="object")return console.error(`getFromSchema error: Unable to find "${p}" key in schema.`),console.error(e),console.error(n),null;if(r.type==="array"&&(!isNaN(p)||p==="-")?(N(r,"items")&&(te(r.items)?(h=!0,r=r.items,a.push("items")):W(r.items)&&!isNaN(p)&&r.items.length>=+p&&(h=!0,r=r.items[+p],a.push("items",p))),!h&&te(r.additionalItems)?(h=!0,r=r.additionalItems,a.push("additionalItems")):r.additionalItems!==!1&&(h=!0,r={},a.push("additionalItems"))):r.type==="object"&&(te(r.properties)&&N(r.properties,p)?(h=!0,r=r.properties[p],a.push("properties",p)):te(r.additionalProperties)?(h=!0,r=r.additionalProperties,a.push("additionalProperties")):r.additionalProperties!==!1&&(h=!0,r={},a.push("additionalProperties"))),!h){console.error(`getFromSchema error: Unable to find "${p}" item in schema.`),console.error(e),console.error(n);return}}return t.slice(-7)==="Pointer"?a:r}function mn(e,n,t=new Map){if(!e)return"";let i=H.toGenericPointer(H.compile(e),t);if(i.indexOf("/")===-1)return i;let r=!0;for(;r;)r=!1,n.forEach((a,l)=>{if(H.isSubPointer(a,l))for(;H.isSubPointer(l,i,!0);)i=H.toGenericPointer(a+i.slice(l.length),t),r=!0});return i}function f0(e,n=null){let t=H.getFirst([[e,"/x-schema-form/type"],[e,"/x-schema-form/widget/component"],[e,"/x-schema-form/widget"],[e,"/widget/component"],[e,"/widget"]]);if(yt(t))return p0(t,e,n);let i=e.type;if(i){if(W(i)&&(i=Gt("object",i)&&N(e,"properties")?"object":Gt("array",i)&&N(e,"items")||Gt("array",i)&&N(e,"additionalItems")?"array":Gt("string",i)?"string":Gt("number",i)?"number":Gt("integer",i)?"integer":Gt("boolean",i)?"boolean":"unknown"),i==="boolean")return"checkbox";if(i==="object"){if(N(e,"properties")||N(e,"additionalProperties"))return"section";if(N(e,"$ref"))return"$ref"}if(i==="array"){let r=H.getFirst([[e,"/items"],[e,"/additionalItems"]])||{};return N(r,"enum")&&e.maxItems!==1?p0("checkboxes",e,n):"array"}if(i==="null")return"none";if(H.has(n,"/options/titleMap")||N(e,"enum")||m0(e,null,!0))return"select";if(i==="number"||i==="integer")return(i==="integer"||N(e,"multipleOf"))&&N(e,"maximum")&&N(e,"minimum")?"range":i;if(i==="string")return{color:"color",date:"date","date-time":"datetime-local",email:"email",uri:"url"}[e.format]||"text"}return N(e,"$ref")?"$ref":W(e.oneOf)?"one-of":N(e,"if")?"if":N(e,"then")?"then":N(e,"else")?"else":(console.error(`getInputType error: Unable to determine input type for ${i}`),console.error("schema",e),n&&console.error("layoutNode",n),"none")}function p0(e,n,t=null){return!yt(e)||e.slice(0,8)!=="checkbox"&&e.slice(0,5)!=="radio"?e:H.getFirst([[t,"/inline"],[t,"/options/inline"],[n,"/inline"],[n,"/x-schema-form/inline"],[n,"/x-schema-form/options/inline"],[n,"/x-schema-form/widget/inline"],[n,"/x-schema-form/widget/component/inline"],[n,"/x-schema-form/widget/component/options/inline"],[n,"/widget/inline"],[n,"/widget/component/inline"],[n,"/widget/component/options/inline"]])===!0?e.slice(0,5)==="radio"?"radios-inline":"checkboxes-inline":e}function Ud(e,n){if(!te(e))return console.error("isInputRequired error: Input schema must be an object."),!1;let t=H.parse(n);if(W(t)){if(!t.length)return e.required===!0;let i=t.pop(),r=t[t.length-1];["properties","additionalProperties","patternProperties","items","additionalItems"].includes(r)&&t.pop();let a=H.get(e,t)||{};if(W(a.required))return a.required.includes(i);if(a.type==="array")return N(a,"minItems")&&Nt(i)&&+a.minItems>+i}return!1}function Jl(e,n,t){if(!te(e)||!te(e.options))return;let i={},r=a=>a.slice(0,3).toLowerCase()==="ui:"?a.slice(3):a;if(oO(i,t.formOptions.defaultWidgetOptions,[],r),[[H.get(n,"/ui:widget/options"),[]],[H.get(n,"/ui:widget"),[]],[n,["additionalProperties","additionalItems","properties","items","required","type","x-schema-form","$ref"]],[H.get(n,"/x-schema-form/options"),[]],[H.get(n,"/x-schema-form"),["items","options"]],[e,["_id","$ref","arrayItem","arrayItemType","dataPointer","dataType","items","key","name","options","recursiveReference","type","widget"]],[e.options,[]]].forEach(([a,l])=>oO(i,a,l,r)),!N(i,"titleMap")){let a=null;a=m0(n,i.flatList),a&&(i.titleMap=a),!N(i,"titleMap")&&!N(i,"enum")&&N(n,"items")&&(H.has(n,"/items/titleMap")?i.titleMap=n.items.titleMap:H.has(n,"/items/enum")?(i.enum=n.items.enum,!N(i,"enumNames")&&H.has(n,"/items/enumNames")&&(i.enumNames=n.items.enumNames)):H.has(n,"/items/oneOf")&&(a=m0(n.items,i.flatList),a&&(i.titleMap=a)))}n.type==="integer"&&!Ie(i.multipleOf)&&(i.multipleOf=1),H.has(i,"/autocomplete/source")?i.typeahead=i.autocomplete:H.has(i,"/tagsinput/source")?i.typeahead=i.tagsinput:H.has(i,"/tagsinput/typeahead/source")&&(i.typeahead=i.tagsinput.typeahead),e.options=i}function m0(e={},n=null,t=!1){let i=null,r=e.oneOf||e.anyOf||null;if(W(r)&&r.every(a=>a.title)){if(r.every(a=>W(a.enum)&&a.enum.length===1)){if(t)return!0;i=r.map(a=>({name:a.title,value:a.enum[0]}))}else if(r.every(a=>a.const)){if(t)return!0;i=r.map(a=>({name:a.title,value:a.const}))}if(n!==!1&&(i||[]).filter(a=>((a||{}).name||"").indexOf(": ")).length>1){let a=i.map(l=>{let[u,d]=l.name.split(/: (.+)/);return u&&d?at(ye({},l),{group:u,name:d}):l});(n===!0||a.some((l,u)=>u&&N(l,"group")&&l.group===a[u-1].group))&&(i=a)}}return t?!1:i}function KQ(e){if(!te(e))return null;let n={};if(N(e,"type"))switch(e.type){case"string":Rn(["pattern","format","minLength","maxLength"],t=>{N(e,t)&&(n[t]=[e[t]])});break;case"number":case"integer":Rn(["Minimum","Maximum"],t=>{let i="exclusive"+t,r=t.toLowerCase();if(N(e,r)){let a=N(e,i)&&e[i]===!0;n[r]=[e[r],a]}}),Rn(["multipleOf","type"],t=>{N(e,t)&&(n[t]=[e[t]])});break;case"object":Rn(["minProperties","maxProperties","dependencies"],t=>{N(e,t)&&(n[t]=[e[t]])});break;case"array":Rn(["minItems","maxItems","uniqueItems"],t=>{N(e,t)&&(n[t]=[e[t]])});break}return N(e,"enum")&&(n.enum=[e.enum]),n}function JQ(e,n,t,i,r){if(!te(e)){console.error("resolveSchemaReferences error: schema must be an object.");return}let a=new Set,l=new Set,u=new Map,d=new Map,p={};H.forEachDeep(e,(C,T)=>{if(N(C,"$ref")&&yt(C.$ref)){let x=H.compile(C.$ref);a.add(x),l.add(T+"~~"+x),u.set(T,x)}}),a.forEach(C=>p[C]=Hd(e,C));let h=!0;for(;h;)h=!1,Array.from(u).forEach(([C,T])=>Array.from(u).filter(([x,O])=>H.isSubPointer(T,x,!0)&&!H.isSubPointer(O,T,!0)&&!l.has(C+x.slice(T.length)+"~~"+O)).forEach(([x,O])=>{l.add(C+x.slice(T.length)+"~~"+O),h=!0}));Array.from(l).map(C=>C.split("~~")).filter(([C,T])=>H.isSubPointer(T,C)).forEach(([C,T])=>d.set(C,T)),Array.from(u).filter(([C,T])=>Array.from(d.keys()).every(x=>!H.isSubPointer(C,x,!0))).forEach(([C,T])=>Array.from(d).filter(([x,O])=>!d.has(C+x.slice(T.length))&&H.isSubPointer(T,x,!0)&&!H.isSubPointer(T,C,!0)).forEach(([x,O])=>d.set(C+x.slice(T.length),C+O.slice(T.length))));let _=ye({},e);return delete _.definitions,_=Hd(_,"",p,d),H.forEachDeep(_,(C,T)=>{if(yt(C.$ref)){let x=H.compile(C.$ref);H.isSubPointer(x,T,!0)||(x=mn(T,d),H.set(_,T,{$ref:`#${x}`})),N(n,"refPointer")||(n[x]=x.length?Hd(_,x,n,d):_),t.has(T)||t.set(T,x);let O=H.toDataPointer(T,_);if(!i.has(O)){let F=H.toDataPointer(x,_);i.set(O,F)}}if(C.type==="array"&&(N(C,"items")||N(C,"additionalItems"))){let x=H.toDataPointer(T,_);if(!r.has(x)){let O=W(C.items)?C.items.length:0;r.set(x,O)}}},!0),_}function Hd(e,n,t=null,i=null,r=[]){if(!t||!i)return H.getCopy(e,n);typeof n!="string"&&(n=H.compile(n)),r=[...r,n];let a=null;if(n==="")a=(0,Re.default)(e);else{let l=mn(n,i);l!==n&&(r=[...r,l]),a=H.getFirstCopy([[t,[l]],[e,n],[e,l]])}return H.forEachDeepCopy(a,(l,u)=>{if(te(l)){if(yt(l.$ref)){let d=H.compile(l.$ref);if(d.length&&r.every(p=>!H.isSubPointer(d,p,!0))){let p=Hd(e,d,t,i,r);if(Object.keys(l).length===1)return p;{let h=ye({},l);return delete h.$ref,Xn(p,h)}}}if(W(l.allOf))return XQ(l);if(l.type==="array"&&W(l.required))return ZQ(l)}return l},!0,n)}function YQ(e,n){return e.map(t=>(0,aO.default)(t,n))}function XQ(e){if(!te(e)||!W(e.allOf))return e;let n=e.allOf.map(r=>r.if&&r).filter(r=>!(0,Xi.isEmpty)(r)),t=YQ(e.allOf,["if","then","else"]),i=Xn(...t);if(Object.keys(e).length>1){let r=ye({},e);delete r.allOf,i=Xn(r,i),n&&n.length>0&&(i.allOf=i.allOf||[],i.allOf.push(...n))}return i}function ZQ(e){if(e.type==="array"&&W(e.required)){let n=N(e.items,"properties")?"items":N(e.additionalItems,"properties")?"additionalItems":null;n&&!N(e[n],"required")&&(N(e[n],"additionalProperties")||e.required.every(t=>N(e[n].properties,t)))&&(e=(0,Re.default)(e),e[n].required=e.required,delete e.required)}return e}function Rd(e,n=!1){let t="",i={},r=n?"!":"";return e.if&&Object.keys(e.if.properties).forEach((a,l)=>{let u=l>0?"&":"";t+=`${u}model.${a}+""=='${e.if.properties[a].const}'`}),i.functionBody=`return ${r}(${t})`,i}function Ka(e,n={}){let t=n.draft||null,i=n.changed||!1;if(typeof e!="object")return e;if(typeof e.map=="function")return[...e.map(l=>Ka(l,{changed:i,draft:t}))];let r=ye({},e),a=["array","boolean","integer","null","number","object","string"];if(typeof r.$schema=="string"&&/http\:\/\/json\-schema\.org\/draft\-0\d\/schema\#/.test(r.$schema)&&(t=r.$schema[30]),r.contentEncoding&&(r.media={binaryEncoding:r.contentEncoding},delete r.contentEncoding,i=!0),typeof r.extends=="object"&&(r.allOf=typeof r.extends.map=="function"?r.extends.map(l=>Ka(l,{changed:i,draft:t})):[Ka(r.extends,{changed:i,draft:t})],delete r.extends,i=!0),r.disallow&&(typeof r.disallow=="string"?r.not={type:r.disallow}:typeof r.disallow.map=="function"&&(r.not={anyOf:r.disallow.map(l=>typeof l=="object"?l:{type:l})}),delete r.disallow,i=!0),typeof r.dependencies=="object"&&Object.keys(r.dependencies).some(l=>typeof r.dependencies[l]=="string")&&(r.dependencies=ye({},r.dependencies),Object.keys(r.dependencies).filter(l=>typeof r.dependencies[l]=="string").forEach(l=>r.dependencies[l]=[r.dependencies[l]]),i=!0),typeof r.maxDecimal=="number"&&(r.multipleOf=1/Math.pow(10,r.maxDecimal),delete r.divisibleBy,i=!0,(!t||t===2)&&(t=1)),typeof r.divisibleBy=="number"&&(r.multipleOf=r.divisibleBy,delete r.divisibleBy,i=!0),typeof r.minimum=="number"&&r.minimumCanEqual===!1?(r.exclusiveMinimum=r.minimum,delete r.minimum,i=!0,t||(t=2)):typeof r.minimumCanEqual=="boolean"&&(delete r.minimumCanEqual,i=!0,t||(t=2)),typeof r.minimum=="number"&&r.exclusiveMinimum===!0?(r.exclusiveMinimum=r.minimum,delete r.minimum,i=!0):typeof r.exclusiveMinimum=="boolean"&&(delete r.exclusiveMinimum,i=!0),typeof r.maximum=="number"&&r.maximumCanEqual===!1?(r.exclusiveMaximum=r.maximum,delete r.maximum,i=!0,t||(t=2)):typeof r.maximumCanEqual=="boolean"&&(delete r.maximumCanEqual,i=!0,t||(t=2)),typeof r.maximum=="number"&&r.exclusiveMaximum===!0?(r.exclusiveMaximum=r.maximum,delete r.maximum,i=!0):typeof r.exclusiveMaximum=="boolean"&&(delete r.exclusiveMaximum,i=!0),typeof r.properties=="object"){let l=ye({},r.properties),u=Array.isArray(r.required)?new Set(r.required):new Set;if((t===1||t===2||Object.keys(l).some(d=>l[d].optional===!0))&&(Object.keys(l).filter(d=>l[d].optional!==!0).forEach(d=>u.add(d)),i=!0,t||(t=2)),Object.keys(l).some(d=>l[d].required===!0)&&(Object.keys(l).filter(d=>l[d].required===!0).forEach(d=>u.add(d)),i=!0),u.size&&(r.required=Array.from(u)),Object.keys(l).some(d=>l[d].requires)){let d=typeof r.dependencies=="object"?ye({},r.dependencies):{};Object.keys(l).filter(p=>l[p].requires).forEach(p=>d[p]=typeof l[p].requires=="string"?[l[p].requires]:l[p].requires),r.dependencies=d,i=!0,t||(t=2)}r.properties=l}if(typeof r.optional=="boolean"&&(delete r.optional,i=!0,t||(t=2)),r.requires&&delete r.requires,typeof r.required=="boolean"&&delete r.required,typeof r.id=="string"&&!r.$id&&(r.id.slice(-1)==="#"&&(r.id=r.id.slice(0,-1)),r.$id=r.id+"-CONVERTED-TO-DRAFT-06#",delete r.id,i=!0),r.type&&(typeof r.type.every=="function"?!r.type.every(l=>a.includes(l)):!a.includes(r.type))&&(i=!0),typeof r.$schema=="string"&&/http\:\/\/json\-schema\.org\/draft\-0[1-4]\/schema\#/.test(r.$schema))r.$schema="http://json-schema.org/draft-06/schema#",i=!0;else if(i&&typeof r.$schema=="string"){let l="Converted to draft 6 from "+r.$schema;typeof r.description=="string"&&r.description.length?r.description+=`
30
- `+l:r.description=l,delete r.$schema}if(r.type&&(typeof r.type.every=="function"?!r.type.every(l=>a.includes(l)):!a.includes(r.type)))if(r.type.length===1&&(r.type=r.type[0]),typeof r.type=="string")r.type==="any"?r.type=a:delete r.type;else if(typeof r.type=="object"){if(typeof r.type.every=="function")if(r.type.every(l=>typeof l=="string"))r.type=r.type.some(l=>l==="any")?r.type=a:r.type.filter(l=>a.includes(l));else if(r.type.length>1){let l=["additionalItems","items","maxItems","minItems","uniqueItems","contains"],u=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"],d=["maxProperties","minProperties","required","additionalProperties","properties","patternProperties","dependencies","propertyNames"],p=["maxLength","minLength","pattern","format"],h={array:[...u,...d,...p],integer:[...l,...d,...p],number:[...l,...d,...p],object:[...l,...u,...p],string:[...l,...u,...d],all:[...l,...u,...d,...p]},_=[];for(let C of r.type){let T=typeof C=="string"?{type:C}:ye({},C);Object.keys(r).filter(x=>!T.hasOwnProperty(x)&&![...h[T.type]||h.all,"type","default"].includes(x)).forEach(x=>T[x]=r[x]),_.push(T)}r=r.hasOwnProperty("default")?{anyOf:_,default:r.default}:{anyOf:_}}else{let l=r.type;delete r.type,Object.assign(r,l)}}else delete r.type;return Object.keys(r).filter(l=>typeof r[l]=="object").forEach(l=>{if(["definitions","dependencies","properties","patternProperties"].includes(l)&&typeof r[l].map!="function"){let u={};Object.keys(r[l]).forEach(d=>u[d]=Ka(r[l][d],{changed:i,draft:t})),r[l]=u}else["items","additionalItems","additionalProperties","allOf","anyOf","oneOf","not"].includes(l)?r[l]=Ka(r[l],{changed:i,draft:t}):r[l]=(0,Re.default)(r[l])}),r}function Zl(e){return e.replace(/\//g,"$")}function Ai(e,n=null,t=!0,i="",r="",a=""){let l=H.get(e.schema,i);t?!nt(n)&&(e.formOptions.setSchemaDefaults===!0||e.formOptions.setSchemaDefaults==="auto"&&Ae(e.formValues))&&(n=H.get(e.schema,i+"/default")):n=null;let u=H.get(l,"/type"),p=(N(l,"if")||N(l,"then")||N(l,"else"))&&!u?"IfThenElse":(N(l,"properties")||N(l,"additionalProperties"))&&u==="object"?"FormGroup":(N(l,"items")||N(l,"additionalItems"))&&u==="array"?"FormArray":!u&&N(l,"$ref")?"$ref":"FormControl",h=mn(r,e.dataRecursiveRefMap,e.arrayMap);e.dataMap.has(h)||e.dataMap.set(h,new Map);let _=e.dataMap.get(h);_.has("schemaType")||(_.set("schemaPointer",i),_.set("schemaType",l.type),l.format&&(_.set("schemaFormat",l.format),l.type||_.set("schemaType","string")),p&&(_.set("templatePointer",a),_.set("templateType",p)));let C,T=KQ(l);switch(p){case"FormGroup":if(C={},N(l,"ui:order")||N(l,"properties")){let oe=l["ui:order"]||Object.keys(l.properties);if(oe.includes("*")&&!N(l.properties,"*")){let fe=Object.keys(l.properties).filter(ge=>!oe.includes(ge));for(let ge=oe.length-1;ge>=0;ge--)oe[ge]==="*"&&oe.splice(ge,1,...fe)}oe.filter(fe=>N(l.properties,fe)||N(l,"additionalProperties")).forEach(fe=>{C[fe]=Ai(e,H.get(n,[fe]),t,i+(N(l.properties,fe)?"/properties/"+fe:"/additionalProperties"),r+"/"+fe,a+"/controls/"+fe),["allOf","anyOf","oneOf"].forEach(ge=>{C[fe].controls&&C[fe].controls[`_${ge}`]&&(Object.keys(C[fe].controls[`_${ge}`]).forEach(Ne=>{C[Ne]=C[fe].controls[`_${ge}`][Ne],delete C[fe].controls[Ne]}),delete C[fe].controls[`_${ge}`])})}),N(l,"if")&&["then","else"].forEach(fe=>{if(N(l,fe)){let ge=`/${fe}`,Ne=Ai(e,n,!1,i+ge,r,a+`/controls/${fe}`);Object.assign(C,Ne.controls)}});let ae=["allOf","anyOf","oneOf","if","then","else","type","properties","items"];["allOf","anyOf","oneOf"].forEach(fe=>{N(l,fe)&&W(l[fe])&&l[fe].forEach((ge,Ne)=>{let Ue=Object.keys(ge),Xt=ae.filter(Ft=>Ue.includes(Ft));if(Xt&&Xt.length>0){let Ft=`/${fe}/${Ne}`,Tn=H.get(n,Ft);fe=="oneOf"&&(Tn=n);let Kt=Ai(e,Tn,t,i+Ft,r,a+"/controls/"+Ne);Kt.controls&&Object.keys(Kt.controls).forEach(ht=>{let Zi=N(l,"properties")?"/properties/"+ht:ht,hn=Kt.controls[ht].schemaPointer||`${i}${Ft}${Zi}`;hn=Zl(hn);let qt=(0,Re.default)(Kt.controls[ht]);qt.key=ht,qt.schemaPointer=qt.schemaPointer||`${i}${Ft}${Zi}`,C[hn]=qt;let eu=ht.startsWith("$oneOf")?qt.schemaPointer:Ft,jo=H.get(l,eu),Ro={};Ro[ht]=qt.value?.value,qt.value&&!e.ajv.validate(jo,Ro)&&(qt.value.value=null),C[ht]=(0,Re.default)(Kt.controls[ht]),C[`_${fe}`]=C[`_${fe}`]||{},C[`_${fe}`][hn]=qt})}})}),e.formOptions.fieldsRequired=QQ(l,C)}return{controlType:p,controls:C,validators:T};case"FormArray":C=[];let x=Math.max(l.minItems||0,_.get("minItems")||0),O=Math.min(l.maxItems||1e3,_.get("maxItems")||1e3),F=null;if(W(l.items)){let oe=_.get("tupleItems")||(W(l.items)?Math.min(l.items.length,O):0);for(let ae=0;ae<oe;ae++)if(ae<x)C.push(Ai(e,W(n)?n[ae]:n,t,i+"/items/"+ae,r+"/"+ae,a+"/controls/"+ae));else{let fe=mn(i+"/items/"+ae,e.schemaRecursiveRefMap),ge=mn(h+"/"+ae,e.dataRecursiveRefMap,e.arrayMap),Ne=ge!==h+"/"+ae;N(e.templateRefLibrary,ge)||(e.templateRefLibrary[ge]=null,e.templateRefLibrary[ge]=Ai(e,null,t,fe,ge,a+"/controls/"+ae)),C.push(W(n)?Ai(e,n[ae],t,i+"/items/"+ae,r+"/"+ae,a+"/controls/"+ae):Ne?null:(0,Re.default)(e.templateRefLibrary[ge]))}l.items.length<O&&te(l.additionalItems)&&(F=i+"/additionalItems")}else F=i+"/items";if(F){let oe=mn(F,e.schemaRecursiveRefMap),ae=mn(h+"/-",e.dataRecursiveRefMap,e.arrayMap),fe=ae!==h+"/-";N(e.templateRefLibrary,ae)||(e.templateRefLibrary[ae]=null,e.templateRefLibrary[ae]=Ai(e,null,t,oe,ae,a+"/controls/-"));let ge=_;if(!fe||N(T,"required")){let Ne=Math.min(Math.max(fe?0:ge.get("tupleItems")+ge.get("listItems")||0,W(n)?n.length:0),O);for(let Ue=C.length;Ue<Ne;Ue++)C.push(W(n)?Ai(e,n[Ue],t,oe,r+"/-",a+"/controls/-"):fe?null:(0,Re.default)(e.templateRefLibrary[ae]))}}return{controlType:p,controls:C,validators:T};case"$ref":let z=H.compile(l.$ref),ne=H.toDataPointer(z,l),re=mn(ne,e.dataRecursiveRefMap,e.arrayMap);if(re&&!N(e.templateRefLibrary,re)){e.templateRefLibrary[re]=null;let oe=Ai(e,t,t,z);oe?e.templateRefLibrary[re]=oe:delete e.templateRefLibrary[re]}return null;case"FormControl":let Q={value:t&&NQ(n)?n:null,disabled:_.get("disabled")||!1};return{controlType:p,value:Q,validators:T};case"IfThenElse":C={};let J;return N(l,"if")&&["then","else"].forEach(oe=>{if(N(l,oe)){let ae=`/${oe}`,fe=Ai(e,n,!1,i+ae,r,a+`/controls/${oe}`);Object.keys(fe.controls).forEach(ge=>{let Ne=fe.controls[ge].schemaPointer||`${i}${ae}/${ge}`;Ne=Zl(Ne);let Ue=Object.assign({},fe.controls[ge]);Ue.schemaPointer=`${i}${ae}/${ge}`,C[Ne]=Ue})}}),{controlType:p,controls:C,validators:T};default:return null}}function Xl(e){let n=[],t=null;if(N(e,"validators")&&(Rn(e.validators,(i,r)=>{typeof Yl[r]=="function"&&n.push(Yl[r].apply(null,i))}),n.length&&Gt(e.controlType,["FormGroup","FormArray"])&&(t=n.length>1?Yl.compose(n):n[0])),N(e,"controlType"))switch(e.controlType){case"FormGroup":let i={};return Rn(e.controls,(r,a)=>{let l=Xl(r);l&&(i[a]=l)}),new w1(i,t);case"FormArray":return new O1((0,sO.default)((0,lO.default)(e.controls,r=>Xl(r))),t);case"FormControl":return new $1(e.value,n)}return null}function QQ(e,n){let t=!1;if(N(e,"required")&&!Ae(e.required)){t=!0;let i=W(e.required)?e.required:[e.required];i=Rn(i,r=>H.set(n,"/"+r+"/validators/required",[]))}return t}function eee(e,n,t,i,r=!1,a=!1){if(e===null||typeof e!="object")return e;let l=W(e)?[]:{};return H.forEachDeep(e,(u,d)=>{if(r&&W(u))H.set(l,d,[]);else if(r&&te(u)&&!Xa(u))H.set(l,d,{});else{let p=H.has(n,[d,"schemaType"])?d:mn(d,t,i);if(H.has(n,[p,"schemaType"])){let h=n.get(p).get("schemaType");if(h==="null")H.set(l,d,null);else if((Ie(u)||r)&&Gt(h,["string","integer","number","boolean"])){let _=a||u===null&&r?qQ(u,h):to(u,h);(nt(_)||r)&&H.set(l,d,_)}}else if(typeof u!="object"||Xa(u)||u===null&&r){if(p.substring(0,2)=="/$")return l;console.error(`formatFormData error: Schema type not found for form value at ${p}`),console.error("dataMap",n),console.error("recursiveRefMap",t),console.error("genericPointer",p)}}}),l}function Bd(e,n,t=!1,i){if(!te(e)||!H.isJsonPointer(n)){if(!H.isJsonPointer(n)){if(typeof n=="string"){let l=e.get(Zl(i||""))||e.get(n);if(l)return l}console.error(`getControl error: Invalid JSON Pointer: ${n}`)}return te(e)||console.error(`getControl error: Invalid formGroup: ${e}`),null}let r=H.parse(n);if(t&&(r=r.slice(0,-1)),typeof e.get=="function"&&r.every(l=>l.indexOf(".")===-1)){let l=e.get(Zl(i||""))||e.get(r.join("."));if(l)return l}let a=e;for(let l of r)if(N(a,"controls")&&(a=a.controls),W(a)&&l==="-")a=a[a.length-1];else if(N(a,l))a=a[l];else{console.error(`getControl error: Unable to find "${l}" item in FormGroup.`),console.error(n),console.error(e);return}return a}function tee(e,n,t,i){let r=H.parse(n),a=e;for(let u=0;u<r.length-1;u++)if(a=a.get(r[u]),typeof a.setControl!="function")throw new Error(`Path '${r[u]}' is not a valid FormGroup or FormArray.`);let l=r[r.length-1];a.setControl(l,t)}function nee(e,n){let t=!H.get(e,"/formOptions/addSubmit"),i=pO(e.layout,(r,a,l)=>{let u={_id:(0,br.default)(),options:{}};if(te(r))Object.assign(u,r),Object.keys(u).filter(p=>!Gt(p,["_id","$ref","arrayItem","arrayItemType","dataPointer","dataType","items","key","name","options","recursiveReference","type","widget"])).forEach(p=>{u.options[p]=u[p],delete u[p]}),!N(u,"type")&&yt(u.widget)&&(u.type=u.widget,delete u.widget),N(u.options,"title")||N(u.options,"legend")&&(u.options.title=u.options.legend,delete u.options.legend),N(u.options,"validationMessages")||(N(u.options,"errorMessages")?(u.options.validationMessages=u.options.errorMessages,delete u.options.errorMessages):N(u.options,"validationMessage")&&(typeof u.options.validationMessage=="string"?u.options.validationMessages=u.options.validationMessage:(u.options.validationMessages={},Object.keys(u.options.validationMessage).forEach(p=>{let h=p+"",_=h==="0"?"type":h==="1"?"enum":h==="100"?"multipleOf":h==="101"?"minimum":h==="102"?"exclusiveMinimum":h==="103"?"maximum":h==="104"?"exclusiveMaximum":h==="200"?"minLength":h==="201"?"maxLength":h==="202"?"pattern":h==="300"?"minProperties":h==="301"?"maxProperties":h==="302"?"required":h==="304"?"dependencies":h==="400"?"minItems":h==="401"?"maxItems":h==="402"?"uniqueItems":h==="500"?"format":h+"";u.options.validationMessages[_]=u.options.validationMessage[p]})),delete u.options.validationMessage));else if(H.isJsonPointer(r))u.dataPointer=r;else if(yt(r))u.key=r;else return console.error("buildLayout error: Form layout element not recognized:"),console.error(r),null;let d=null;if(!N(u,"dataPointer")){if(N(u,"key"))u.dataPointer=u.key==="*"?u.key:H.compile(H.parseObjectPath(u.key),"-"),delete u.key;else if(N(u,"type")&&u.type.slice(-5)==="array"){let p=_=>{if(!(_===null||typeof _!="object")){if(N(_,"dataPointer"))return _.dataPointer;if(W(_.items))for(let C of _.items){if(N(C,"dataPointer")&&C.dataPointer.indexOf("/-")!==-1)return C.dataPointer;if(N(C,"items")){let T=p(C);if(T)return T}}}},h=p(u);h&&(u.dataPointer=h.slice(0,h.lastIndexOf("/-")))}}if(N(u,"dataPointer")){if(u.dataPointer==="*")return Di(e,n,e.formValues);let p=H.get(e.formValues,u.dataPointer.replace(/\/-/g,"/1"));u.dataPointer=H.toGenericPointer(u.dataPointer,e.arrayMap);let h=H.toKey(u.dataPointer);!u.name&&yt(h)&&h!=="-"&&(u.name=h);let _=mn(u.dataPointer,e.dataRecursiveRefMap,e.arrayMap),C=!_.length||_!==u.dataPointer,T;e.dataMap.has(_)||e.dataMap.set(_,new Map);let x=e.dataMap.get(_);if(x.has("schemaPointer")?T=x.get("schemaPointer"):(T=H.toSchemaPointer(_,e.schema),x.set("schemaPointer",T)),x.set("disabled",!!u.options.disabled),d=H.get(e.schema,T),d){if(!N(u,"type"))u.type=f0(d,u);else if(n.hasWidget(u.type))u.type=p0(u.type,d,u);else{let O=u.type;u.type=f0(d,u),console.error(`error: widget type "${O}" not found in library. Replacing with "${u.type}".`)}d.type==="object"&&W(d.required)&&x.set("required",d.required),u.dataType=d.type||(N(d,"$ref")?"$ref":null),Jl(u,d,e),u.type==="checkboxes"&&N(d,"items")?Jl(u,d.items,e):u.dataType==="array"&&(u.options.maxItems=Math.min(d.maxItems||1e3,u.options.maxItems||1e3),u.options.minItems=Math.max(d.minItems||0,u.options.minItems||0),u.options.listItems=Math.max(u.options.listItems||0,W(p)?p.length:0),u.options.tupleItems=W(d.items)?d.items.length:0,u.options.maxItems<u.options.tupleItems?(u.options.tupleItems=u.options.maxItems,u.options.listItems=0):u.options.maxItems<u.options.tupleItems+u.options.listItems?u.options.listItems=u.options.maxItems-u.options.tupleItems:u.options.minItems>u.options.tupleItems+u.options.listItems&&(u.options.listItems=u.options.minItems-u.options.tupleItems),x.has("maxItems")||(x.set("maxItems",u.options.maxItems),x.set("minItems",u.options.minItems),x.set("tupleItems",u.options.tupleItems),x.set("listItems",u.options.listItems)),e.arrayMap.has(_)||e.arrayMap.set(_,u.options.tupleItems)),Ud(e.schema,T)&&(u.options.required=!0,e.fieldsRequired=!0)}else Jl(u,{},e);if(!u.options.title&&!/^\d+$/.test(u.name)&&(u.options.title=Cr(u.name)),N(u.options,"copyValueTo")&&(typeof u.options.copyValueTo=="string"&&(u.options.copyValueTo=[u.options.copyValueTo]),W(u.options.copyValueTo)&&(u.options.copyValueTo=u.options.copyValueTo.map(O=>H.compile(H.parseObjectPath(O),"-")))),u.widget=n.getWidget(u.type),x.set("inputType",u.type),x.set("widget",u.widget),u.dataType==="array"&&(N(u,"items")||N(u,"additionalItems"))){let O=mn(u.dataPointer+"/-",e.dataRecursiveRefMap,e.arrayMap);if(e.dataMap.has(O)||e.dataMap.set(O,new Map),e.dataMap.get(O).set("inputType","section"),u.items.length>1){let F=[];for(let z=u.items.length-1;z>=0;z--){let ne=u.items[z];if(N(ne,"dataPointer")&&ne.dataPointer.slice(0,O.length)===O){let re=u.items.splice(z,1)[0];re.dataPointer=u.dataPointer+"/-"+re.dataPointer.slice(O.length),F.unshift(re)}else ne.arrayItem=!0,ne.arrayItemType="list",ne.removable=u.options.removable!==!1}F.length&&u.items.push({_id:(0,br.default)(),arrayItem:!0,arrayItemType:u.options.tupleItems>u.items.length?"tuple":"list",items:F,options:{removable:u.options.removable!==!1},dataPointer:u.dataPointer+"/-",type:"section",widget:n.getWidget("section")})}else u.items[0].arrayItem=!0,u.items[0].dataPointer||(u.items[0].dataPointer=H.toGenericPointer(O,e.arrayMap)),H.has(u,"/items/0/options/removable")||(u.items[0].options.removable=!0),u.options.orderable===!1&&(u.items[0].options.orderable=!1),u.items[0].arrayItemType=u.options.tupleItems?"tuple":"list";if(W(u.items)){let F=u.items.filter(z=>z.type!=="$ref").length-u.options.tupleItems;F>u.options.listItems&&(u.options.listItems=F,x.set("listItems",F))}if(N(e.layoutRefLibrary,O)||(e.layoutRefLibrary[O]=(0,Re.default)(u.items[u.items.length-1]),C&&(e.layoutRefLibrary[O].recursiveReference=!0),Rn(e.layoutRefLibrary[O],(F,z)=>{N(F,"_id")&&(F._id=null),C&&N(F,"dataPointer")&&(F.dataPointer=F.dataPointer.slice(O.length))},"top-down")),!u.recursiveReference||u.options.required){let F=Math.min(Math.max(u.options.tupleItems+u.options.listItems,W(p)?p.length:0),u.options.maxItems);for(let z=u.items.length;z<F;z++)u.items.push(Gd({$ref:O,dataPointer:u.dataPointer,recursiveReference:u.recursiveReference},e,n))}if(u.options.addable!==!1&&u.options.minItems<u.options.maxItems&&(u.items[u.items.length-1]||{}).type!=="$ref"){let F="Add";if(u.options.title)/^add\b/i.test(u.options.title)?F=u.options.title:F+=" "+u.options.title;else if(u.name&&!/^\d+$/.test(u.name))/^add\b/i.test(u.name)?F+=" "+Cr(u.name):F=Cr(u.name);else{let z=GQ(e.schema,u.dataPointer,"parentSchema");if(N(z,"title"))F+=" to "+z.title;else{let ne=H.parse(u.dataPointer);F+=" to "+Cr(ne[ne.length-2])}}u.items.push({_id:(0,br.default)(),arrayItem:!0,arrayItemType:"list",dataPointer:u.dataPointer+"/-",options:{listItems:u.options.listItems,maxItems:u.options.maxItems,minItems:u.options.minItems,removable:!1,title:F,tupleItems:u.options.tupleItems},recursiveReference:C,type:"$ref",widget:n.getWidget("$ref"),$ref:O}),yt(H.get(u,"/style/add"))&&(u.items[u.items.length-1].options.fieldStyle=u.style.add,delete u.style.add,Ae(u.style)&&delete u.style)}}else u.arrayItem=!1}else if(N(u,"type")||N(u,"items")){let p=H.get(e.layout,l,0,-2).type;N(u,"type")||(u.type=Gt(p,["tabs","tabarray"])?"tab":"array"),u.arrayItem=p==="array",u.widget=n.getWidget(u.type),Jl(u,{},e)}return u.type==="submit"&&(t=!0),u});if(e.hasRootReference){let r=(0,Re.default)(i);r[r.length-1].type==="submit"&&r.pop(),e.layoutRefLibrary[""]={_id:null,dataPointer:"",dataType:"object",items:r,name:"",options:(0,Re.default)(e.formOptions.defaultWidgetOptions),recursiveReference:!0,required:!1,type:"section",widget:n.getWidget("section")}}return t||i.push({_id:(0,br.default)(),options:{title:"Submit"},type:"submit",widget:n.getWidget("submit")}),i}function iee(e,n){let t=nee(e,n);if(e.formValues){let i=ree({builtLayout:t,formData:e.formValues})}return t}function ree(e){let{builtLayout:n,formData:t}=e,i={},r=function(p,h,_){if((0,Ld.default)(p)){_&&_(p,h),p.forEach((C,T)=>{_&&_(C,h+"/"+T),r(C,h+"/"+T,_)});return}if((0,uO.default)(p)){_&&_(p,h),Object.keys(p).forEach(C=>{_&&_(p[C],h+"/"+C),r(p[C],h+"/"+C,_)});return}};r(t,"",(p,h)=>{(0,Ld.default)(p)&&(i[h]=i[h]||p.length)});let a=p=>{let{data:h,dataPointer:_,indexArray:C}=p,T=0,x=_.substring(1).split("/").map((F,z)=>F=="-"&&C[T]!=null?C[T++]:F).join("/");return x="/"+x,i[x]},l=p=>{let h={type:"section",recursiveReference:!1,items:[]};return(0,Re.default)(p)},u=p=>{let{builtLayout:h,indices:_,parentDataPointer:C,indexPos:T}=p;if(_=_||[],T=T??(T=-1),(0,Ld.default)(h)){h.forEach((O,F)=>{u({builtLayout:O,indices:_,indexPos:T,parentDataPointer:C})});return}let x=["array"];if(h.items&&x.indexOf(h.dataType)>=0&&h.dataPointer&&!h.recursiveReference){let O=a({data:t,dataPointer:h.dataPointer,indexArray:_}),F=h.items.length;if(h.items.forEach(z=>{z.type&&z.type=="$ref"&&F--}),F=Math.max(F,0),F<O){let z=O-F;F==0&&h.items[0].recursiveReference&&(z=0);for(let ne=0;ne<z;ne++){let Q=h.items[0].type&&h.items[0].type=="$ref"?l(h.items[0]):(0,Re.default)(h.items[0]);Q._id=(0,br.default)("new_"),h.items.unshift(Q)}h.options.listItems&&(h.options.listItems=O)}_[h.dataPointer]=_[h.dataPointer]||-1,T++,h.items.forEach((z,ne)=>{_[T]=ne,u({builtLayout:z,indices:_,parentDataPointer:h.dataPointer,indexPos:T})}),T--}else h.items&&h.items.forEach((O,F)=>{u({builtLayout:O,indices:_,parentDataPointer:C,indexPos:T})})};return u({builtLayout:n}),n}function Di(e,n,t=null,i="",r="",a=!1,l=null,u=null,d=!1,p="",h){let _=h||e.schema,C=H.get(_,i);if(!N(C,"type")&&!N(C,"$ref")&&!N(C,"x-schema-form")&&!N(C,"if")&&!N(C,"then")&&!N(C,"else"))return null;let T=f0(C);!nt(t)&&(e.formOptions.setSchemaDefaults===!0||e.formOptions.setSchemaDefaults==="auto"&&Ae(e.formValues))&&(t=H.get(_,i+"/default"));let x={_id:d?null:(0,br.default)(),arrayItem:a,dataPointer:H.toGenericPointer(r,e.arrayMap),dataType:C.type||(N(C,"$ref")?"$ref":null),options:{},required:Ud(_,i),type:T,widget:n.getWidget(T)},O=H.toKey(x.dataPointer);O!=="-"&&(x.name=O),x.arrayItem&&(x.arrayItemType=l,x.options.removable=u!==!1);let F=mn(p+r,e.dataRecursiveRefMap,e.arrayMap),z=!F.length||F!==p+r;e.dataMap.has(F)||e.dataMap.set(F,new Map);let ne=e.dataMap.get(F);if(ne.has("inputType")||(ne.set("schemaPointer",i),ne.set("inputType",x.type),ne.set("widget",x.widget),ne.set("disabled",!!x.options.disabled)),Jl(x,C,e),!x.options.title&&x.name&&!/^\d+$/.test(x.name)&&(x.options.title=Cr(x.name)),x.dataType==="object"){if(W(C.required)&&!ne.has("required")&&ne.set("required",C.required),te(C.properties)){let re=[],Q=C["ui:order"]||Object.keys(C.properties);if(Q.includes("*")&&!N(C.properties,"*")){let J=Object.keys(C.properties).filter(oe=>!Q.includes(oe));for(let oe=Q.length-1;oe>=0;oe--)Q[oe]==="*"&&Q.splice(oe,1,...J)}Q.filter(J=>N(C.properties,J)||N(C,"additionalProperties")).forEach(J=>{let oe=N(C.properties,J)?"/properties/"+J:"/additionalProperties",ae=Di(e,n,te(t)?t[J]:null,i+oe,r+"/"+J,!1,null,null,d,p);ae&&(Ud(C,"/"+J)&&(ae.options.required=!0,e.fieldsRequired=!0),re.push(ae))}),["allOf","anyOf","oneOf"].forEach(J=>{if(N(C,J)&&W(C[J])){let oe;J=="oneOf"&&(oe=Di(e,n,C.oneOf,"/",r,!1,null,null,d,p,{type:"one-of",items:C.oneOf,oneOf:C.oneOf}),re.push(oe)),C[J].forEach((ae,fe)=>{let ge=`/${J}/${fe}`,Ne=Di(e,n,ae,i+ge,r,!1,null,null,d,p);Ne&&(Ne.items&&Ne.items.forEach(Ue=>{let Xt=N(ae,"properties")?"/properties/"+Ue.name:Ue.name;Ue.oneOfPointer=i+ge+Xt,Ue.schemaPointer=Ue.oneOfPointer}),W(Ne)?Ne.forEach(Ue=>{let Xt=N(ae,"properties")?"/properties/"+Ue.name:Ue.name;oe?(Ue.oneOfPointer=i+ge+Xt,Ue.schemaPointer=Ue.oneOfPointer,oe.items=oe.items||[],oe.items.push(Ue)):re.push(Ue)}):oe?(Ne.oneOfPointer=i+ge,Ne.schemaPointer=Ne.oneOfPointer,oe.items=oe.items||[],oe.items.push(Ne)):re.push(Ne))})}}),N(C,"if")&&["then","else"].forEach(J=>{if(N(C,J)){let oe=`/${J}`,ae=J=="else",fe=Di(e,n,t.then,i+oe,r,!1,null,null,d,p);fe&&(W(fe)?fe.forEach(ge=>{ge.schemaPointer=i+oe+ge.dataPointer,ge.options.condition=Rd(C,ae),re.push(ge)}):(fe.schemaPointer=i+oe+fe.dataPointer,fe.options.condition=Rd(C,ae),re.push(fe)))}}),r===""&&!d?x=re:x.items=re}}else if(x.dataType==="array"){x.items=[],x.options.maxItems=Math.min(C.maxItems||1e3,x.options.maxItems||1e3),x.options.minItems=Math.max(C.minItems||0,x.options.minItems||0),!x.options.minItems&&Ud(_,i)&&(x.options.minItems=1),N(x.options,"listItems")||(x.options.listItems=1),x.options.tupleItems=W(C.items)?C.items.length:0,x.options.maxItems<=x.options.tupleItems?(x.options.tupleItems=x.options.maxItems,x.options.listItems=0):x.options.maxItems<x.options.tupleItems+x.options.listItems?x.options.listItems=x.options.maxItems-x.options.tupleItems:x.options.minItems>x.options.tupleItems+x.options.listItems&&(x.options.listItems=x.options.minItems-x.options.tupleItems),ne.has("maxItems")||(ne.set("maxItems",x.options.maxItems),ne.set("minItems",x.options.minItems),ne.set("tupleItems",x.options.tupleItems),ne.set("listItems",x.options.listItems)),e.arrayMap.has(F)||e.arrayMap.set(F,x.options.tupleItems),u=x.options.removable!==!1;let re=null;if(W(C.items)){x.items=[];for(let Q=0;Q<x.options.tupleItems;Q++){let J,oe=mn(F+"/"+Q,e.dataRecursiveRefMap,e.arrayMap),ae=!oe.length||oe!==F+"/"+Q;u&&Q>=x.options.minItems?(N(e.layoutRefLibrary,oe)||(e.layoutRefLibrary[oe]=null,e.layoutRefLibrary[oe]=Di(e,n,W(t)?t[Q]:null,i+"/items/"+Q,ae?"":r+"/"+Q,!0,"tuple",!0,!0,ae?r+"/"+Q:""),ae&&(e.layoutRefLibrary[oe].recursiveReference=!0)),J=Gd({$ref:oe,dataPointer:r+"/"+Q,recursiveReference:ae},e,n,W(t)?t[Q]:null)):J=Di(e,n,W(t)?t[Q]:null,i+"/items/"+Q,r+"/"+Q,!0,"tuple",!1,d,p),J&&x.items.push(J)}te(C.additionalItems)&&(re=i+"/additionalItems")}else te(C.items)&&(re=i+"/items");if(re){let Q=mn(F+"/-",e.dataRecursiveRefMap,e.arrayMap),J=!Q.length||Q!==F+"/-",oe=mn(re,e.schemaRecursiveRefMap,e.arrayMap);if(Q.length&&!N(e.layoutRefLibrary,Q)&&(e.layoutRefLibrary[Q]=null,e.layoutRefLibrary[Q]=Di(e,n,null,oe,J?"":r+"/-",!0,"list",u,!0,J?r+"/-":""),J&&(e.layoutRefLibrary[Q].recursiveReference=!0)),!J||x.options.required){let ae=Math.min(Math.max(J?0:x.options.tupleItems+x.options.listItems,W(t)?t.length:0),x.options.maxItems);if(x.items.length<ae)for(let fe=x.items.length;fe<ae;fe++)x.items.push(Gd({$ref:Q,dataPointer:r+"/-",recursiveReference:J},e,n,W(t)?t[fe]:null))}if(x.options.addable!==!1&&x.options.minItems<x.options.maxItems&&(x.items[x.items.length-1]||{}).type!=="$ref"){let ae=((e.layoutRefLibrary[Q]||{}).options||{}).title,fe=ae?"Add ":"Add to ";ae||(ae=C.title||Cr(H.toKey(r))),/^add\b/i.test(ae)||(ae=fe+ae),x.items.push({_id:(0,br.default)(),arrayItem:!0,arrayItemType:"list",dataPointer:x.dataPointer+"/-",options:{listItems:x.options.listItems,maxItems:x.options.maxItems,minItems:x.options.minItems,removable:!1,title:ae,tupleItems:x.options.tupleItems},recursiveReference:J,type:"$ref",widget:n.getWidget("$ref"),$ref:Q})}}}else if(x.dataType==="$ref"){let re=H.compile(C.$ref),Q=H.toDataPointer(re,_),J="";if(x.options.add)J=x.options.add;else if(x.name&&!/^\d+$/.test(x.name))J=(/^add\b/i.test(x.name)?"":"Add ")+Cr(x.name);else{let oe=H.get(_,i,0,-1);if(N(oe,"title"))J="Add to "+oe.title;else{let ae=H.parse(x.dataPointer);J="Add to "+Cr(ae[ae.length-2])}}if(Object.assign(x,{recursiveReference:!0,widget:n.getWidget("$ref"),$ref:Q}),Object.assign(x.options,{removable:!1,title:J}),Nt(H.get(_,i,0,-1).maxItems)&&(x.options.maxItems=H.get(_,i,0,-1).maxItems),Q.length)if(N(e.layoutRefLibrary,Q))e.layoutRefLibrary[Q].recursiveReference||(e.layoutRefLibrary[Q].recursiveReference=!0);else{e.layoutRefLibrary[Q]=null;let oe=Di(e,n,null,re,"",x.arrayItem,x.arrayItemType,!0,!0,r);oe?(oe.recursiveReference=!0,e.layoutRefLibrary[Q]=oe):delete e.layoutRefLibrary[Q]}}else if(x.type==="if"){let re=[];["then","else"].forEach(Q=>{if(N(C,Q)){let J=`/${Q}`,oe=Q=="else",ae=Di(e,n,t.then,i+J,r,!1,null,null,d,p);ae&&(W(ae)?ae.forEach(fe=>{fe.schemaPointer=i+J+fe.dataPointer,fe.options.condition=Rd(C,oe),re.push(fe),x=re}):(ae.schemaPointer=i+J+ae.dataPointer,ae.options.condition=Rd(C,oe),x=ae))}})}return x}function pO(e,n,t="",i=e){let r=0,a=[];return Rn(e,(l,u)=>{let d=+u+r,p=t+"/"+d,h=zd(l),_=[];te(l)&&(N(l,"tabs")&&(l.items=l.tabs,delete l.tabs),N(l,"items")&&(_=W(l.items)?l.items:[l.items])),_.length&&(h.items=pO(_,n,p+"/items",i)),h=n(h,d,p,i),nt(h)?(W(h)&&(r+=h.length-1),a=a.concat(h)):r--}),a}function Gd(e,n,t=null,i=null){if(e.recursiveReference&&t){let r=(0,Re.default)(e);return r.options||(r.options={}),Object.assign(r,{recursiveReference:!0,widget:t.getWidget("$ref")}),Object.assign(r.options,{removable:!1,title:"Add "+r.$ref}),r}else{let r=n.layoutRefLibrary[e.$ref];return nt(i)?r=Di(n,t,i,H.toSchemaPointer(e.$ref,n.schema),e.$ref,r.arrayItem,r.arrayItemType,r.options.removable,!1):(r=(0,Re.default)(r),H.forEachDeep(r,(a,l)=>{N(a,"_id")&&(a._id=(0,br.default)()),e.recursiveReference&&N(a,"dataPointer")&&(a.dataPointer=e.dataPointer+a.dataPointer)})),r}}function Kd(e,n,t=!0,i=!0){let r=[],a=!1;if(e)if(W(e))if(n){for(let l of Object.keys(e))if(te(e[l])){let u=e[l].value;if(n.includes(u)){let d=e[l].name;r.push({name:d,value:u}),u==null&&(a=!0)}}else if(yt(e[l])&&l<n.length){let u=e[l],d=n[l];r.push({name:u,value:d}),d==null&&(a=!0)}}else r=e,t||(a=!!r.filter(l=>l.value===void 0||l.value===null).length);else if(n)for(let l of Object.keys(n)){let u=n[l];if(N(e,u)){let d=e[u];r.push({name:d,value:u}),u==null&&(a=!0)}}else for(let l of Object.keys(e)){let u=e[l];r.push({name:u,value:l}),l==null&&(a=!0)}else if(n)for(let l of Object.keys(n)){let u=n[l],d=n[l];r.push({name:u,value:d}),d==null&&(a=!0)}else r=[{name:"True",value:!0},{name:"False",value:!1}];return r.some(l=>N(l,"group"))&&(a=!1,i?r=r.reduce((l,u)=>(N(u,"group")?(W(u.items)&&(l=[...l,...u.items.map(d=>at(ye({},d),{name:`${u.group}: ${d.name}`}))],u.items.some(d=>d.value===void 0||d.value===null)&&(a=!0)),N(u,"name")&&N(u,"value")&&(u.name=`${u.group}: ${u.name}`,delete u.group,l.push(u),(u.value===void 0||u.value===null)&&(a=!0))):(l.push(u),(u.value===void 0||u.value===null)&&(a=!0)),l),[]):r=r.reduce((l,u)=>(N(u,"group")?(u.group!==(l[l.length-1]||{}).group&&l.push({group:u.group,items:u.items||[]}),N(u,"name")&&N(u,"value")&&(l[l.length-1].items.push({name:u.name,value:u.value}),(u.value===void 0||u.value===null)&&(a=!0))):(l.push(u),(u.value===void 0||u.value===null)&&(a=!0)),l),[])),!t&&!a&&r.unshift({name:"<em>None</em>",value:null}),r}var Rt=(()=>{let n=class n{setDraggableState(i){this.draggableStateSubject.next(i)}setSortableOptions(i){this.sortableOptionsSubject.next(i)}createAjvInstance(i){let r=new l0.default(i);return r.addMetaSchema(Fh),r.addMetaSchema(qh),(0,s0.default)(r),r}createAndRegisterAjvInstance(i,r){let a=r||`ajv_${Date.now()}`;if(this.ajvRegistry[a])throw new Error(`ajv instance with name:'${a}' has already been registered`);let l=this.createAjvInstance(i);return this.ajvRegistry[a]={name:a,ajvInstance:l,ajvValidator:null},this.ajvRegistry[a]}getAjvInstance(i="default"){return this.ajvRegistry[i].ajvInstance}getAjvValidator(i="default"){return this.ajvRegistry[i]?.ajvValidator}constructor(){this.JsonFormCompatibility=!1,this.ReactJsonSchemaFormCompatibility=!1,this.AngularSchemaFormCompatibility=!1,this.tpldata={},this.ajvOptions={allErrors:!0,strict:!1},this.ajv=(0,cO.default)(new l0.default(this.ajvOptions),["uniqueItemProperties"]),this.validateFormData=null,this.formValues={},this.data={},this.schema={},this.layout=[],this.formGroupTemplate={},this.formGroup=null,this.framework=null,this.validData=null,this.isValid=null,this.ajvErrors=null,this.validationErrors=null,this.dataErrors=new Map,this.formValueSubscription=null,this.dataChanges=new Gn,this.isValidChanges=new Gn,this.validationErrorChanges=new Gn,this.arrayMap=new Map,this.dataMap=new Map,this.dataRecursiveRefMap=new Map,this.schemaRecursiveRefMap=new Map,this.schemaRefLibrary={},this.layoutRefLibrary={"":null},this.templateRefLibrary={},this.hasRootReference=!1,this.language="en-US",this.defaultFormOptions={autocomplete:!0,addSubmit:"auto",debug:!1,disableInvalidSubmit:!0,formDisabled:!1,formReadonly:!1,fieldsRequired:!1,framework:"no-framework",loadExternalAssets:!1,pristine:{errors:!0,success:!0},supressPropertyTitles:!1,setSchemaDefaults:"auto",setLayoutDefaults:"auto",validateOnRender:"auto",widgets:{},defaultWidgetOptions:{listItems:1,addable:!0,orderable:!0,removable:!0,enableErrorState:!0,enableSuccessState:!0,feedback:!1,feedbackOnRender:!1,notitle:!1,disabled:!1,readonly:!1,returnEmptyFields:!0,validationMessages:{}}},this.draggableStateSubject=new Cp(!0),this.draggableState$=this.draggableStateSubject.asObservable(),this.sortableOptionsSubject=new Cp({disabled:!1}),this.sortableOptions$=this.sortableOptionsSubject.asObservable(),this.ajvRegistry={},this.setLanguage(this.language),this.ajv.addMetaSchema(Fh),this.ajv.addMetaSchema(qh),(0,s0.default)(this.ajv),this.ajvRegistry.default={name:"default",ajvInstance:this.ajv,ajvValidator:null}}ngOnDestroy(){this.fcValueChangesSubs?.unsubscribe(),this.fcStatusChangesSubs?.unsubscribe(),this.formValueSubscription?.unsubscribe(),this.fcValueChangesSubs=null,this.fcStatusChangesSubs=null,this.formValueSubscription=null}setLanguage(i="en-US"){this.language=i;let r={de:EQ,en:TQ,es:PQ,fr:OQ,it:MQ,pt:kQ,zh:AQ},a=i.slice(0,2),l=r[a];this.defaultFormOptions.defaultWidgetOptions.validationMessages=(0,Re.default)(l)}getData(){return this.data}getSchema(){return this.schema}getLayout(){return this.layout}resetAllValues(){this.JsonFormCompatibility=!1,this.ReactJsonSchemaFormCompatibility=!1,this.AngularSchemaFormCompatibility=!1,this.tpldata={},this.validateFormData=null,this.formValues={},this.schema={},this.layout=[],this.formGroupTemplate={},this.formGroup=null,this.framework=null,this.data={},this.validData=null,this.isValid=null,this.validationErrors=null,this.arrayMap=new Map,this.dataMap=new Map,this.dataRecursiveRefMap=new Map,this.schemaRecursiveRefMap=new Map,this.layoutRefLibrary={},this.schemaRefLibrary={},this.templateRefLibrary={},this.formOptions=(0,Re.default)(this.defaultFormOptions),this.ajvRegistry={},this.ajvRegistry.default={name:"default",ajvInstance:this.ajv,ajvValidator:null}}buildRemoteError(i){Rn(i,(r,a)=>{if(a in this.formGroup.controls)for(let l of r){let u={};u[l.code]=l.message,this.formGroup.get(a).setErrors(u,{emitEvent:!0})}})}validateData(i,r=!0,a="default"){this.data=eee(i,this.dataMap,this.dataRecursiveRefMap,this.arrayMap,this.formOptions.returnEmptyFields),this.isValid=this.getAjvValidator(a)(this.data),this.validData=this.isValid?this.data:null;let l=u=>{let d={};return(u||[]).forEach(p=>{let h=p.instancePath||"ROOT";d[h]||(d[h]=[]),d[h].push(p.message)}),d};this.ajvErrors=this.getAjvValidator(a).errors,this.validationErrors=l(this.ajvErrors),r&&(this.dataChanges.next(this.data),this.isValidChanges.next(this.isValid),this.validationErrorChanges.next(this.ajvErrors))}buildFormGroupTemplate(i=null,r=!0){this.formGroupTemplate=Ai(this,i,r)}buildFormGroup(i){this.formGroup=Xl(this.formGroupTemplate),this.formGroup&&(this.compileAjvSchema(i),this.validateData(this.formGroup.value,!0,i),this.formValueSubscription&&this.formValueSubscription.unsubscribe(),this.formValueSubscription=this.formGroup.valueChanges.subscribe(r=>this.validateData(r,!0,i)))}buildLayout(i){this.layout=iee(this,i)}setOptions(i){if(te(i)){let r=(0,Re.default)(i);te(r.defaultOptions)&&(Object.assign(this.formOptions.defaultWidgetOptions,r.defaultOptions),delete r.defaultOptions),te(r.defaultWidgetOptions)&&(Object.assign(this.formOptions.defaultWidgetOptions,r.defaultWidgetOptions),delete r.defaultWidgetOptions),Object.assign(this.formOptions,r);let a=this.formOptions.defaultWidgetOptions;["ErrorState","SuccessState"].filter(l=>N(a,"disable"+l)).forEach(l=>{a["enable"+l]=!a["disable"+l],delete a["disable"+l]})}}compileAjvSchema(i="default"){let r=this.getAjvValidator(i);r||(Array.isArray(this.schema.properties["ui:order"])&&(this.schema["ui:order"]=this.schema.properties["ui:order"],delete this.schema.properties["ui:order"]),this.getAjvInstance(i).removeSchema(this.schema),r=this.getAjvInstance(i).compile(this.schema),this.ajvRegistry[i].ajvValidator=r)}buildSchemaFromData(i,r=!1){if(i)return d0(i,r);this.schema=d0(this.formValues,r)}buildSchemaFromLayout(i){if(i)return void 0;this.schema=(this.layout,void 0)}setTpldata(i={}){this.tpldata=i}parseText(i="",r={},a={},l=null){return!i||!/{{.+?}}/.test(i)?i:i.replace(/{{(.+?)}}/g,(...u)=>this.parseExpression(u[1],r,a,l,this.tpldata))}parseExpression(i="",r={},a={},l=null,u=null){if(typeof i!="string")return"";let d=typeof l=="number"?l+1+"":l||"";if(i=i.trim(),(i[0]==="'"||i[0]==='"')&&i[0]===i[i.length-1]&&i.slice(1,i.length-1).indexOf(i[0])===-1)return i.slice(1,i.length-1);if(i==="idx"||i==="$index")return d;if(i==="value"&&!N(a,"value"))return r;if(['"',"'"," ","||","&&","+"].every(p=>i.indexOf(p)===-1)){let p=H.parseObjectPath(i);return p[0]==="value"&&H.has(r,p.slice(1))?H.get(r,p.slice(1)):p[0]==="values"&&H.has(a,p.slice(1))?H.get(a,p.slice(1)):p[0]==="tpldata"&&H.has(u,p.slice(1))?H.get(u,p.slice(1)):H.has(a,p)?H.get(a,p):""}return i.indexOf("[idx]")>-1&&(i=i.replace(/\[idx\]/g,d)),i.indexOf("[$index]")>-1&&(i=i.replace(/\[$index\]/g,d)),i.indexOf("||")>-1?i.split("||").reduce((p,h)=>p||this.parseExpression(h,r,a,l,u),""):i.indexOf("&&")>-1?i.split("&&").reduce((p,h)=>p&&this.parseExpression(h,r,a,l,u)," ").trim():i.indexOf("+")>-1?i.split("+").map(p=>this.parseExpression(p,r,a,l,u)).join(""):""}setArrayItemTitle(i={},r=null,a=null){let l={layoutNode:()=>te(i.layoutNode)?i.layoutNode:i.layoutNode(),dataIndex:()=>te(i.dataIndex)?i.dataIndex:i.dataIndex()},u=l.layoutNode();if(u.options.buttonText)return u.options.buttonText;let d=this.getFormControlValue(l),p=(u.type||"").slice(-5)==="array"&&W(d),h=H.getFirst(p&&r.type!=="$ref"?[[r,"/options/legend"],[r,"/options/title"],[u,"/options/title"],[u,"/options/legend"]]:[[r,"/options/title"],[r,"/options/legend"],[u,"/options/title"],[u,"/options/legend"]]);if(!h)return h;let _=W(d)&&a<d.length?d[a]:d;return this.parseText(h,_,d,a)}setItemTitle(i){return!i.options.title&&/^(\d+|-)$/.test(i.layoutNode().name)?null:this.parseText(i.options.title||dO(i.layoutNode().name),this.getFormControlValue(i),(this.getFormControlGroup(i)||{}).value,i.dataIndex()[i.dataIndex().length-1])}evaluateCondition(i,r){let a=r&&r[r.length-1],l=!0;if(Ie((i.options||{}).condition)){if(typeof i.options.condition=="string"){let u=i.options.condition;Ie(a)&&(u=u.replace("[arrayIndex]",`[${a}]`)),u=H.parseObjectPath(u),l=!!H.get(this.data,u),!l&&u[0]==="model"&&(l=!!H.get({model:this.data},u))}else if(typeof i.options.condition=="function")l=i.options.condition(this.data);else if(typeof i.options.condition.functionBody=="string")try{l=new Function("model","arrayIndices",i.options.condition.functionBody)(this.data,r)}catch{l=!0,console.error("condition functionBody errored out on evaluation: "+i.options.condition.functionBody)}}return l}initializeControl(i,r=!0){if(!te(i))return!1;let a=i.layoutNode();if(Ae(i.options)&&(i.options=Ae((a||{}).options)?(0,Re.default)(this.formOptions):a.options),i.formControl=this.getFormControl(i),a?.schemaPointer&&(this.dataMap.get(a?.dataPointer).get("schemaType")!=a.dataType&&this.dataMap.get(a?.dataPointer).set("schemaType",a.dataType),this.setFormControl(i,i.formControl)),i.boundControl=r&&!!i.formControl,i.formControl)i.controlName=this.getFormControlName(i),i.controlValue=i.formControl.value,i.controlDisabled=i.formControl.disabled,i.options.errorMessage=i.formControl.status==="VALID"?null:this.formatErrors(i.formControl.errors,i.options.validationMessages),i.options.showErrors=this.formOptions.validateOnRender===!0||this.formOptions.validateOnRender==="auto"&&Ie(i.controlValue),this.fcStatusChangesSubs=i.formControl.statusChanges.subscribe(l=>i.options.errorMessage=l==="VALID"?null:this.formatErrors(i.formControl.errors,i.options.validationMessages)),this.fcValueChangesSubs=i.formControl.valueChanges.subscribe(l=>{(0,Ni.default)(i.controlValue,l)||(i.controlValue=l)});else{i.controlName=a.name,i.controlValue=a.value||null;let l=this.getDataPointer(i);r&&l&&console.error(`warning: control "${l}" is not bound to the Angular FormGroup.`)}if(i.options?.condition){let l=H.has(this.formValues,a.dataPointer)?H.get(this.formValues,a.dataPointer):i.options?.default;i.formControl?.setValue(l)}return i.boundControl}formatErrors(i,r={}){if(Ae(i))return null;te(r)||(r={});let a=d=>d[0].toUpperCase()+(d.slice(1)||"").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," "),l=d=>typeof d=="object"?Object.keys(d).map(p=>d[p]===!0?a(p):d[p]===!1?"Not "+a(p):a(p)+": "+l(d[p])).join(", "):a(d.toString()),u=[];return Object.keys(i).filter(d=>d!=="required"||Object.keys(i).length===1).map(d=>typeof r=="string"?r:typeof r[d]=="function"?r[d](i[d]):typeof r[d]=="string"?/{{.+?}}/.test(r[d])?Object.keys(i[d]).reduce((p,h)=>p.replace(new RegExp("{{"+h+"}}","g"),i[d][h]),r[d]):r[d]:a(d)+" Error: "+l(i[d])).join("<br>")}updateValue(i,r){if(i.controlValue=r,i.boundControl&&(i.formControl.setValue(r),i.formControl.markAsDirty()),i.layoutNode().value=r,W(i.options.copyValueTo))for(let a of i.options.copyValueTo){let l=Bd(this.formGroup,a);te(l)&&typeof l.setValue=="function"&&(l.setValue(r),l.markAsDirty())}}updateArrayCheckboxList(i,r){let a=this.getFormControl(i);for(;a.value.length;)a.removeAt(0);let l=mn(i.layoutNode().dataPointer+"/-",this.dataRecursiveRefMap,this.arrayMap);for(let u of r)if(u.checked){let d=Xl(this.templateRefLibrary[l]);d.setValue(u.value),a.push(d)}a.markAsDirty()}updateArrayMultiSelectList(i,r){this.updateArrayCheckboxList(i,r)}getFormControl(i){return!i||!i.layoutNode||!nt(i.layoutNode().dataPointer)||i.layoutNode().type==="$ref"?null:Bd(this.formGroup,this.getDataPointer(i),!1,i.layoutNode()?.schemaPointer)}setFormControl(i,r){return!i||!i.layoutNode||!nt(i.layoutNode().dataPointer)||i.layoutNode().type==="$ref"?null:tee(this.formGroup,this.getDataPointer(i),r)}getFormControlValue(i){if(!i||!i.layoutNode||!nt(i.layoutNode().dataPointer)||i.layoutNode().type==="$ref")return null;let r=Bd(this.formGroup,this.getDataPointer(i));return r?r.value:null}getFormControlGroup(i){return!i||!i.layoutNode||!nt(i.layoutNode().dataPointer)?null:Bd(this.formGroup,this.getDataPointer(i),!0,i.layoutNode()?.schemaPointer)}getFormControlName(i){return!i||!i.layoutNode||!nt(i.layoutNode().dataPointer)||!Ie(i.dataIndex())?null:H.toKey(this.getDataPointer(i))}getLayoutArray(i){return H.get(this.layout,this.getLayoutPointer(i),0,-1)}getParentNode(i){return H.get(this.layout,this.getLayoutPointer(i),0,-2)}getDataPointer(i){return!i||!i.layoutNode||!nt(i.layoutNode().dataPointer)||!Ie(i.dataIndex())?null:H.toIndexedPointer(i.layoutNode().dataPointer,i.dataIndex(),this.arrayMap)}getLayoutPointer(i){return Ie(i.layoutIndex())?"/"+i.layoutIndex().join("/items/"):null}isControlBound(i){if(!i||!i.layoutNode||!nt(i.layoutNode().dataPointer)||!Ie(i.dataIndex()))return!1;let r=this.getFormControlGroup(i),a=this.getFormControlName(i);return r?N(r.controls,a):!1}addItem(i,r){if(!i||!i.layoutNode||!nt(i.layoutNode().$ref)||!Ie(i.dataIndex())||!Ie(i.layoutIndex()))return!1;let a=Xl(this.templateRefLibrary[i.layoutNode().$ref]);i.layoutNode().arrayItem?this.getFormControlGroup(i).push(a):this.getFormControlGroup(i).addControl(r||this.getFormControlName(i),a);let l=Gd(i.layoutNode(),this);return l.arrayItem=i.layoutNode().arrayItem,i.layoutNode().arrayItemType?l.arrayItemType=i.layoutNode().arrayItemType:delete l.arrayItemType,r&&(l.name=r,l.dataPointer+="/"+H.escape(r),l.options.title=Cr(r)),H.insert(this.layout,this.getLayoutPointer(i),l),!0}moveArrayItem(i,r,a,l=!0){if(!i||!i.layoutNode||!nt(i.layoutNode().dataPointer)||!Ie(i.dataIndex())||!Ie(i.layoutIndex())||!nt(r)||!nt(a)||r===a)return!1;let u=this.getFormControlGroup(i),d=u.at(r);if(u.removeAt(r),u.insert(a,d),u.updateValueAndValidity(),l){let p=this.getLayoutArray(i);p.splice(a,0,p.splice(r,1)[0])}return!0}removeItem(i){return!i||!i.layoutNode||!nt(i.layoutNode().dataPointer)||!Ie(i.dataIndex())||!Ie(i.layoutIndex())?!1:(i.layoutNode().arrayItem?this.getFormControlGroup(i).removeAt(i.dataIndex()[i.dataIndex().length-1]):this.getFormControlGroup(i).removeControl(this.getFormControlName(i)),H.remove(this.layout,this.getLayoutPointer(i)),!0)}};n.\u0275fac=function(r){return new(r||n)},n.\u0275prov=Kn({token:n,factory:n.\u0275fac});let e=n;return e})(),mO=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.newComponent=null,this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0),this.widgetContainer=Fr("widgetContainer",{read:po})}ngOnInit(){this.updateComponent()}ngOnChanges(){this.updateComponent()}updateComponent(){let i=this.widgetContainer();if(i&&!this.newComponent&&(this.layoutNode()||{}).widget&&(this.newComponent=i.createComponent(this.layoutNode().widget)),this.newComponent)for(let r of["layoutNode","layoutIndex","dataIndex"])this.newComponent.instance[r]=this[r]}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["select-widget-widget"]],viewQuery:function(r,a){r&1&&Ar(a.widgetContainer,g0,5,po),r&2&&Dr()},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[kr],decls:2,vars:0,consts:[["widgetContainer",""]],template:function(r,a){r&1&&q(0,"div",null,0)},encapsulation:2});let e=n;return e})(),oee=(()=>{let n=class n{constructor(){this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["no-framework"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:1,vars:3,consts:[[3,"dataIndex","layoutIndex","layoutNode"]],template:function(r,a){r&1&&q(0,"select-widget-widget",0),r&2&&E("dataIndex",a.dataIndex())("layoutIndex",a.layoutIndex())("layoutNode",a.layoutNode())},dependencies:[mO],encapsulation:2});let e=n;return e})(),aee=(()=>{let n=class n extends _0{constructor(){super(...arguments),this.name="no-framework",this.text="None (plain HTML)",this.framework=oee}};n.\u0275fac=(()=>{let i;return function(a){return(i||(i=d1(n)))(a||n)}})(),n.\u0275prov=Kn({token:n,factory:n.\u0275fac});let e=n;return e})(),hO=(()=>{let n=class n{constructor(i,r){this.renderer=i,this.elementRef=r}ngOnChanges(i){if(i.attributes)for(let r in this.attributes){let a=this.attributes[r];a?this.renderer.setAttribute(this.elementRef.nativeElement,r,a):this.renderer.removeAttribute(this.elementRef.nativeElement,r)}}};n.\u0275fac=function(r){return new(r||n)(ur(Ku),ur(ra))},n.\u0275dir=mo({type:n,selectors:[["","attributes",""]],inputs:{attributes:"attributes"},standalone:!1,features:[kr]});let e=n;return e})(),see=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}ngOnInit(){this.options=this.layoutNode().options||{}}get showAddButton(){return!this.layoutNode().arrayItem||this.layoutIndex()[this.layoutIndex().length-1]<this.options.maxItems}addItem(i){i.preventDefault(),this.jsf.addItem(this)}get buttonText(){let i={dataIndex:this.dataIndex().slice(0,-1),layoutIndex:this.layoutIndex().slice(0,-1),layoutNode:this.jsf.getParentNode(this)};return i.layoutNode.add||this.jsf.setArrayItemTitle(i,this.layoutNode(),this.itemCount)}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["add-reference-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:2,vars:3,consts:[["align","end"],["class","sortable-filter sortable-fixed",3,"class","disabled","click",4,"ngIf"],[1,"sortable-filter","sortable-fixed",3,"click","disabled"],[3,"class",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"]],template:function(r,a){r&1&&(y(0,"section",0),Me(1,_Z,3,5,"button",1),v()),r&2&&(ve((a.options==null?null:a.options.htmlClass)||""),m(),E("ngIf",a.showAddButton))},dependencies:[wn],encapsulation:2});let e=n;return e})(),lee=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this)}updateValue(i){typeof this.options.onClick=="function"?this.options.onClick(i):this.jsf.updateValue(this,i.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["button-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:11,consts:[[3,"click","disabled","name","type","value"],[3,"class","innerHTML",4,"ngIf"],[3,"innerHTML"]],template:function(r,a){if(r&1&&(y(0,"div")(1,"button",0),Z("click",function(u){return a.updateValue(u)}),Me(2,yZ,1,3,"span",1),v()()),r&2){let l,u;ve((a.options==null?null:a.options.htmlClass)||""),m(),ve((a.options==null?null:a.options.fieldHtmlClass)||""),E("disabled",a.controlDisabled)("name",a.controlName)("type",(l=a.layoutNode())==null?null:l.type)("value",a.controlValue),me("readonly",a.options!=null&&a.options.readonly?"readonly":null)("aria-describedby","control"+((u=a.layoutNode())==null?null:u._id)+"Status"),m(),E("ngIf",(a.options==null?null:a.options.icon)||(a.options==null?null:a.options.title))}},dependencies:[wn],encapsulation:2});let e=n;return e})(),uee=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.controlDisabled=!1,this.boundControl=!1,this.trueValue=!0,this.falseValue=!1,this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this),(this.controlValue===null||this.controlValue===void 0)&&(this.controlValue=this.options.title)}updateValue(i){i.preventDefault(),this.jsf.updateValue(this,i.target.checked?this.trueValue:this.falseValue)}get isChecked(){return this.jsf.getFormControlValue(this)===this.trueValue}ngOnDestroy(){this.jsf.updateValue(this,null)}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["checkbox-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:5,vars:6,consts:[["type","checkbox",3,"formControl","class","id","name","readonly",4,"ngIf"],["type","checkbox",3,"checked","class","disabled","id","name","readonly","value","change",4,"ngIf"],[3,"display","innerHTML",4,"ngIf"],[1,"hb-uix-slider","hb-uix-round"],["type","checkbox",3,"formControl","id","name","readonly"],["type","checkbox",3,"change","checked","disabled","id","name","readonly","value"],[3,"innerHTML"]],template:function(r,a){if(r&1&&(y(0,"label"),Me(1,vZ,1,7,"input",0)(2,bZ,1,9,"input",1)(3,CZ,1,3,"span",2),q(4,"span",3),v()),r&2){let l;ve((a.options==null?null:a.options.itemLabelHtmlClass)||" hb-uix-switch"),me("for","control"+((l=a.layoutNode())==null?null:l._id)),m(),E("ngIf",a.boundControl),m(),E("ngIf",!a.boundControl),m(),E("ngIf",a.options==null?null:a.options.title)}},dependencies:[wn,qr,In,Vr],encapsulation:2});let e=n;return e})(),cee=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.controlDisabled=!1,this.boundControl=!1,this.checkboxList=[],this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}ngOnInit(){this.options=this.layoutNode().options||{};let i=this.layoutNode();if(this.layoutOrientation=i.type==="checkboxes-inline"||i.type==="checkboxbuttons"?"horizontal":"vertical",this.jsf.initializeControl(this),this.checkboxList=Kd(this.options.titleMap||this.options.enumNames,this.options.enum,!0),this.boundControl){let r=this.jsf.getFormControl(this);this.checkboxList.forEach(a=>a.checked=r.value.includes(a.value))}}updateValue(i){for(let r of this.checkboxList)i.target.value===r.value&&(r.checked=i.target.checked);this.boundControl&&this.jsf.updateArrayCheckboxList(this,this.checkboxList)}ngOnDestroy(){let i=[];this.formControl.reset(i),this.controlValue=null}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["checkboxes-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:3,consts:[[3,"class","display","innerHTML",4,"ngIf"],[3,"class",4,"ngIf"],[4,"ngIf"],[3,"innerHTML"],[3,"class",4,"ngFor","ngForOf"],["type","checkbox",3,"change","checked","disabled","id","name","readonly","value"],[1,"hb-uix-slider","hb-uix-round"]],template:function(r,a){r&1&&Me(0,xZ,1,5,"label",0)(1,IZ,2,3,"div",1)(2,$Z,2,1,"div",2),r&2&&(E("ngIf",a.options==null?null:a.options.title),m(),E("ngIf",a.layoutOrientation==="horizontal"),m(),E("ngIf",a.layoutOrientation==="vertical"))},dependencies:[_o,wn],encapsulation:2});let e=n;return e})(),dee=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this)}updateValue(i){this.jsf.updateValue(this,i.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["file-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:0,vars:0,template:function(r,a){},encapsulation:2});let e=n;return e})();var fee=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.controlDisabled=!1,this.boundControl=!1,this.autoCompleteList=[],this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}get inputAttributes(){return this.options?.["x-inputAttributes"]}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this)}updateValue(i){this.jsf.updateValue(this,i.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["input-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:5,vars:6,consts:[[1,"sortable-filter"],[3,"class","display","innerHTML",4,"ngIf"],[3,"formControl","class","id","name","readonly","type","attributes",4,"ngIf"],[3,"class","disabled","id","name","readonly","type","value","attributes","input",4,"ngIf"],[3,"id",4,"ngIf"],[3,"innerHTML"],[3,"formControl","id","name","readonly","type","attributes"],[3,"input","disabled","id","name","readonly","type","value","attributes"],[3,"id"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(r,a){r&1&&(y(0,"div",0),Me(1,EZ,1,6,"label",1)(2,TZ,1,15,"input",2)(3,PZ,1,16,"input",3)(4,MZ,2,2,"datalist",4),v()),r&2&&(ve((a.options==null?null:a.options.htmlClass)||""),m(),E("ngIf",a.options==null?null:a.options.title),m(),E("ngIf",a.boundControl),m(),E("ngIf",!a.boundControl),m(),E("ngIf",a.options==null||a.options.typeahead==null?null:a.options.typeahead.source))},dependencies:[_o,wn,vo,bo,yo,In,Vr,hO],encapsulation:2});let e=n;return e})(),pee=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.message=null,this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.message=this.options.help||this.options.helpvalue||this.options.msg||this.options.message}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["message-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:1,vars:1,consts:[[3,"class","innerHTML",4,"ngIf"],[3,"innerHTML"]],template:function(r,a){r&1&&Me(0,kZ,1,3,"span",0),r&2&&E("ngIf",a.message)},dependencies:[wn],encapsulation:2});let e=n;return e})(),mee=(()=>{let n=class n{constructor(){this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["none-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:0,vars:0,template:function(r,a){},encapsulation:2});let e=n;return e})(),hee=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.controlDisabled=!1,this.boundControl=!1,this.allowNegative=!0,this.allowDecimal=!0,this.allowExponents=!1,this.lastValidNumber="",this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}get inputAttributes(){return this.options?.["x-inputAttributes"]}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this),this.layoutNode().dataType==="integer"&&(this.allowDecimal=!1)}updateValue(i){this.jsf.updateValue(this,i.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["number-widget"]],viewQuery:function(r,a){if(r&1&&(wp(AZ,5),wp(DZ,5)),r&2){let l;Ip(l=Sp())&&(a.inputControl=l.first),Ip(l=Sp())&&(a.div=l.first)}},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:6,vars:6,consts:[["divElt",""],["inputControl",""],[1,"sortable-filter"],[3,"class","display","innerHTML",4,"ngIf"],[3,"formControl","class","id","name","readonly","title","type","attributes",4,"ngIf"],[3,"class","disabled","id","name","readonly","title","type","value","attributes","input",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"],[3,"formControl","id","name","readonly","title","type","attributes"],[3,"input","disabled","id","name","readonly","title","type","value","attributes"]],template:function(r,a){if(r&1&&(y(0,"div",2,0),Me(2,NZ,1,6,"label",3)(3,FZ,2,16,"input",4)(4,qZ,2,17,"input",5)(5,VZ,1,1,"span",6),v()),r&2){let l;ve((a.options==null?null:a.options.htmlClass)||""),m(2),E("ngIf",a.options==null?null:a.options.title),m(),E("ngIf",a.boundControl),m(),E("ngIf",!a.boundControl),m(),E("ngIf",((l=a.layoutNode())==null?null:l.type)==="range")}},dependencies:[wn,yo,In,Vr,hO],encapsulation:2});let e=n;return e})(),y0=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.newComponent=null,this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0),this.widgetContainer=Fr("widgetContainer",{read:po})}ngOnInit(){this.updateComponent()}ngOnChanges(){this.updateComponent()}updateComponent(){let i=this.widgetContainer();if(i&&!this.newComponent&&this.jsf.framework&&(this.newComponent=i.createComponent(this.jsf.framework)),this.newComponent)for(let r of["layoutNode","layoutIndex","dataIndex"])this.newComponent.instance[r]=this[r]}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["select-framework-widget"]],viewQuery:function(r,a){r&1&&Ar(a.widgetContainer,g0,5,po),r&2&&Dr()},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[kr],decls:2,vars:0,consts:[["widgetContainer",""]],template:function(r,a){r&1&&q(0,"div",null,0)},encapsulation:2});let e=n;return e})(),gO=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.selectedItem=0,this.showAddTab=!0,this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.options.selectedTab&&(this.selectedItem=this.options.selectedTab),this.itemCount=this.layoutNode().items.length-1,this.updateControl()}select(i){let r=this.layoutNode();r.items[i].type==="$ref"&&(this.itemCount=r.items.length,this.jsf.addItem({layoutNode:Gu(r.items[i]),layoutIndex:Gu(this.layoutIndex().concat(i)),dataIndex:Gu(this.dataIndex().concat(i))}),this.updateControl()),this.selectedItem=i}updateControl(){let i=this.layoutNode().items[this.layoutNode().items.length-1];i.type==="$ref"&&this.itemCount>=(i.options.maxItems||1e3)&&(this.showAddTab=!1)}setTabTitle(i,r){return this.jsf.setArrayItemTitle(this,i,r)}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["tabs-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:4,consts:[["role","presentation","data-tabs","",3,"class",4,"ngFor","ngForOf"],[3,"class",4,"ngFor","ngForOf"],["role","presentation","data-tabs",""],[3,"class","click",4,"ngIf"],[3,"click"],["type","radio","name","tabSelection",3,"value","ngModel","class","ngModelChange","change",4,"ngIf"],["type","radio","name","tabSelection",3,"ngModelChange","change","value","ngModel"],[4,"ngIf"],[3,"class","dataIndex","layoutIndex","layoutNode",4,"ngIf"],[3,"dataIndex","layoutIndex","layoutNode"]],template:function(r,a){if(r&1&&(y(0,"ul"),Me(1,BZ,2,3,"li",0),v(),Me(2,HZ,3,4,"div",1)),r&2){let l,u;ve((a.options==null?null:a.options.labelHtmlClass)||""),m(),E("ngForOf",(l=a.layoutNode())==null?null:l.items),m(),E("ngForOf",(u=a.layoutNode())==null?null:u.items)}},dependencies:[_o,wn,yo,T1,In,wi,y0],styles:["a[_ngcontent-%COMP%]{cursor:pointer}.ngf-hidden[_ngcontent-%COMP%]{display:none}"]});let e=n;return e})(),gee=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.options.tabMode="oneOfMode",this.options.selectedTab=this.findSelectedTab(),this.jsf.initializeControl(this)}findSelectedTab(){let i=-1;return this.layoutNode().items&&this.layoutNode().items.forEach((r,a)=>{let l=H.get(this.jsf.formValues,r.dataPointer);if(r.oneOfPointer){let u=Zl(r.oneOfPointer),d=r.name;N(this.jsf.formGroup.controls,u)&&(l||fO(this.jsf.formGroup.controls[u].value))&&(i=a),i==-1&&Object.keys(this.jsf.formGroup.controls).filter(h=>h.startsWith(u)).forEach(h=>{let _=h.split("$"),C=_[_.length-1],T=this.jsf.formGroup.controls[h].value;((0,Xi.isObject)(l)&&N(l,C)&&l[C]==T||(0,Xi.isEqual)(l,T))&&(i=a)})}}),Math.max(i,0)}updateValue(i){this.jsf.updateValue(this,i.target.value)}ngOnDestroy(){}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["one-of-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:4,vars:4,consts:[["tabs",""],[3,"layoutNode","layoutIndex","dataIndex"]],template:function(r,a){r&1&&(y(0,"h4"),M(1),v(),q(2,"tabs-widget",1,0)),r&2&&(m(),se(a.options==null?null:a.options.description),m(),E("layoutNode",a.layoutNode())("layoutIndex",a.layoutIndex())("dataIndex",a.dataIndex()))},dependencies:[gO],encapsulation:2});let e=n;return e})(),_ee=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.controlDisabled=!1,this.boundControl=!1,this.layoutOrientation="vertical",this.radiosList=[],this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}ngOnInit(){this.options=this.layoutNode().options||{};let i=this.layoutNode();(i.type==="radios-inline"||i.type==="radiobuttons")&&(this.layoutOrientation="horizontal"),this.radiosList=Kd(this.options.titleMap||this.options.enumNames,this.options.enum,!0),this.jsf.initializeControl(this)}updateValue(i){this.jsf.updateValue(this,i.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["radios-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:3,vars:3,consts:[[3,"class","display","innerHTML",4,"ngIf"],[3,"class",4,"ngIf"],[4,"ngIf"],[3,"innerHTML"],[3,"class",4,"ngFor","ngForOf"],["type","radio",3,"change","checked","disabled","id","name","value"]],template:function(r,a){r&1&&Me(0,WZ,1,6,"label",0)(1,KZ,2,3,"div",1)(2,YZ,2,1,"div",2),r&2&&(E("ngIf",a.options==null?null:a.options.title),m(),E("ngIf",a.layoutOrientation==="horizontal"),m(),E("ngIf",a.layoutOrientation!=="horizontal"))},dependencies:[_o,wn],encapsulation:2});let e=n;return e})(),yee=(()=>{let n=class n{constructor(){this.elementRef=L(ra),this.jsf=L(Rt),this.ngZone=L(Ju),this.overParentElement=!1,this.overChildElement=!1,this.orderable=le(void 0),this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}ngOnInit(){let i=this.layoutIndex();this.orderable()&&this.layoutNode()&&i&&this.dataIndex()&&(this.element=this.elementRef.nativeElement,this.element.draggable=!0,this.arrayLayoutIndex="move:"+i.slice(0,-1).toString(),this.ngZone.runOutsideAngular(()=>{this.element.addEventListener("dragstart",r=>{r.dataTransfer.effectAllowed="move",r.dataTransfer.setData("text","");let a=this.dataIndex()[this.dataIndex().length-1];sessionStorage.setItem(this.arrayLayoutIndex,a+"")}),this.element.addEventListener("dragover",r=>(r.preventDefault&&r.preventDefault(),r.dataTransfer.dropEffect="move",!1)),this.element.addEventListener("dragenter",r=>{if(this.overParentElement)return this.overChildElement=!0;this.overParentElement=!0;let a=sessionStorage.getItem(this.arrayLayoutIndex);a!==null&&(this.dataIndex()[this.dataIndex().length-1]<+a?this.element.classList.add("drag-target-top"):this.dataIndex()[this.dataIndex().length-1]>+a&&this.element.classList.add("drag-target-bottom"))}),this.element.addEventListener("dragleave",r=>{this.overChildElement?this.overChildElement=!1:this.overParentElement&&(this.overParentElement=!1);let a=sessionStorage.getItem(this.arrayLayoutIndex);!this.overParentElement&&!this.overChildElement&&a!==null&&(this.element.classList.remove("drag-target-top"),this.element.classList.remove("drag-target-bottom"))}),this.element.addEventListener("drop",r=>{this.element.classList.remove("drag-target-top"),this.element.classList.remove("drag-target-bottom");let a=sessionStorage.getItem(this.arrayLayoutIndex),l=this.dataIndex()[this.dataIndex().length-1];return a!==null&&+a!==l&&this.jsf.moveArrayItem(this,+a,l),sessionStorage.removeItem(this.arrayLayoutIndex),!1})}),this.draggableStateSubscription=this.jsf.draggableState$.subscribe(r=>{this.element.draggable=r}))}ngOnDestroy(){this.draggableStateSubscription&&this.draggableStateSubscription.unsubscribe()}};n.\u0275fac=function(r){return new(r||n)},n.\u0275dir=mo({type:n,selectors:[["","orderable",""]],inputs:{orderable:[1,"orderable"],layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1});let e=n;return e})(),v0=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.dataIndex=le(void 0),this.layoutIndex=le(void 0),this.layout=le(void 0),this.isOrderable=le(void 0),this.isFlexItem=le(!1),this.sortableConfig={filter:".sortable-filter",preventOnFilter:!1,delay:1e3,delayOnTouchOnly:!0,onEnd:i=>{i.newIndex;let r=i.oldIndex,a=i.newIndex,l=this.layout()[a],u=l?.arrayItem?(this.dataIndex()||[]).concat(a):this.dataIndex()||[],d=(this.layoutIndex()||[]).concat(a),p={dataIndex:()=>u,layoutIndex:()=>d,layoutNode:()=>l};this.jsf.moveArrayItem(p,i.oldIndex,i.newIndex,!1)},onMove:function(i,r){if(i.related.classList.contains("sortable-fixed"))return!1}}}sortableInit(i){this.sortableObj=i}isDraggable(i){let r=i.arrayItem&&i.type!=="$ref"&&i.arrayItemType==="list"&&this.isOrderable()!==!1;return this.sortableObj,r}isFixed(i){return i.type=="$ref"}getFlexAttribute(i,r){let a=["flex-grow","flex-shrink","flex-basis"].indexOf(r);return((i.options||{}).flex||"").split(/\s+/)[a]||(i.options||{})[r]||["1","1","auto"][a]}showWidget(i){return this.jsf.evaluateCondition(i,this.dataIndex())}ngOnInit(){this.sortableOptionsSubscription=this.jsf.sortableOptions$.subscribe(i=>{this.sortableObj&&Object.keys(i).forEach(r=>{let a=i[r];this.sortableObj.option(r,a)})})}ngOnDestroy(){this.sortableOptionsSubscription&&this.sortableOptionsSubscription.unsubscribe()}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["root-widget"]],inputs:{dataIndex:[1,"dataIndex"],layoutIndex:[1,"layoutIndex"],layout:[1,"layout"],isOrderable:[1,"isOrderable"],isFlexItem:[1,"isFlexItem"]},standalone:!1,decls:3,vars:5,consts:[["sortableContainter",""],[3,"init","nxtSortablejs","config"],[3,"form-flex-item","align-self","flex-basis","flex-grow","flex-shrink","order","sortable-filter","sortable-fixed",4,"ngFor","ngForOf"],[3,"dataIndex","layoutIndex","layoutNode","orderable"],[3,"dataIndex","layoutIndex","layoutNode",4,"ngIf"],[3,"dataIndex","layoutIndex","layoutNode"]],template:function(r,a){if(r&1){let l=ue();y(0,"div",1,0),Z("init",function(d){return Y(l),X(a.sortableInit(d))}),Me(2,ZZ,3,30,"div",2),v()}r&2&&(Nr("flex-inherit",!0),E("nxtSortablejs",a.layout())("config",a.sortableConfig),m(2),E("ngForOf",a.layout()))},dependencies:[_o,wn,nT,y0,yee],styles:["[draggable=true][_ngcontent-%COMP%]{transition:all .15s cubic-bezier(.4,0,.2,1)}[draggable=true][_ngcontent-%COMP%]:hover{cursor:move;box-shadow:2px 2px 4px #0003;position:relative;z-index:10;margin:-1px 1px 1px -1px}[draggable=true].drag-target-top[_ngcontent-%COMP%]{box-shadow:0 -2px #000;position:relative;z-index:20}[draggable=true].drag-target-bottom[_ngcontent-%COMP%]{box-shadow:0 2px #000;position:relative;z-index:20}.flex-inherit[_ngcontent-%COMP%]{display:inherit;flex-flow:inherit;flex-wrap:inherit;flex-direction:inherit;width:100%}"]});let e=n;return e})(),vee=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.expanded=!0,this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}get sectionTitle(){return this.options.notitle?null:this.jsf.setItemTitle(this)}ngOnInit(){switch(this.jsf.initializeControl(this),this.options=this.layoutNode().options||{},this.expanded=typeof this.options.expanded=="boolean"?this.options.expanded:!this.options.expandable,this.layoutNode().type){case"fieldset":case"array":case"tab":case"advancedfieldset":case"authfieldset":case"optionfieldset":case"selectfieldset":this.containerType="fieldset";break;default:this.containerType="div";break}}toggleExpanded(){this.options.expandable&&(this.expanded=!this.expanded)}getFlexAttribute(i){let r=this.layoutNode().type==="flex"||!!this.options.displayFlex||this.options.display==="flex";if(i!=="flex"&&!r)return null;switch(i){case"is-flex":return r;case"display":return r?"flex":"initial";case"flex-direction":case"flex-wrap":let a=["flex-direction","flex-wrap"].indexOf(i);return(this.options["flex-flow"]||"").split(/\s+/)[a]||this.options[i]||["column","nowrap"][a];case"justify-content":case"align-items":case"align-content":return this.options[i]}}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["section-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:2,vars:2,consts:[[3,"class","expandable","expanded",4,"ngIf"],[3,"class","expandable","expanded","disabled",4,"ngIf"],["class","legend",3,"class","innerHTML","click",4,"ngIf"],[3,"dataIndex","layout","layoutIndex","isFlexItem","isOrderable"],[1,"legend",3,"click","innerHTML"],[3,"disabled"],[4,"ngIf"],["class","help-block",3,"class","innerHTML",4,"ngIf"],[1,"help-block",3,"innerHTML"]],template:function(r,a){r&1&&Me(0,eQ,3,28,"div",0)(1,aQ,5,31,"fieldset",1),r&2&&(E("ngIf",a.containerType==="div"),m(),E("ngIf",a.containerType==="fieldset"))},dependencies:[wn,v0],styles:[".legend[_ngcontent-%COMP%]{font-weight:700}.expandable[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%], .expandable[_ngcontent-%COMP%] > label[_ngcontent-%COMP%], .expanded[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%], .expanded[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{cursor:pointer;}.expandable[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%]:before, .expandable[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]:before{font-weight:900;font-family:'Font Awesome 5 Free';content:'\\f054';padding-right:.3em;}.expanded[_ngcontent-%COMP%] > legend[_ngcontent-%COMP%]:before, .expanded[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]:before{font-weight:900;font-family:'Font Awesome 5 Free';content:'\\f078';padding-right:.2em;}"]});let e=n;return e})(),bee=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.controlDisabled=!1,this.boundControl=!1,this.selectList=[],this.selectListFlatGroup=[],this.isArray=W,this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.selectList=Kd(this.options.titleMap||this.options.enumNames,this.options.enum,!!this.options.required,!!this.options.flatList),this.selectListFlatGroup=Kd(this.options.titleMap||this.options.enumNames,this.options.enum,!!this.options.required,!0),this.jsf.initializeControl(this),this.valueChanges=this.formControl.valueChanges.subscribe(i=>{i==="null"&&this.formControl.setValue(null)})}deselectAll(){this.selectListFlatGroup.forEach(i=>{i.checked=!1})}updateValue(i){if(this.options.showErrors=!0,this.options.multiple){this.controlValue?.includes(null)?(this.deselectAll(),this.jsf.updateArrayMultiSelectList(this,[])):(this.selectListFlatGroup.forEach(r=>{r.checked=this.controlValue?.indexOf(r.value)>=0}),this.jsf.updateArrayMultiSelectList(this,this.selectListFlatGroup));return}this.jsf.updateValue(this,this.controlValue)}ngOnDestroy(){this.valueChanges&&this.valueChanges.unsubscribe();let i=this.options.multiple?[null]:null;this.formControl.reset(i),this.controlValue=null}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["select-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:5,vars:6,consts:[[3,"class","display","innerHTML",4,"ngIf"],[3,"formControl","class","id","name",4,"ngIf"],[3,"class","disabled","id","name","change",4,"ngIf"],[3,"class","disabled","id","multiple","name","ngModel","ngModelChange","change",4,"ngIf"],[3,"innerHTML"],[3,"formControl","id","name"],["ngFor","",3,"ngForOf"],[3,"value",4,"ngIf"],[3,"label",4,"ngIf"],[3,"value"],[3,"label"],[3,"value",4,"ngFor","ngForOf"],[3,"change","disabled","id","name"],[3,"selected","value",4,"ngIf"],[3,"selected","value"],[3,"ngModelChange","change","disabled","id","multiple","name","ngModel"]],template:function(r,a){r&1&&(y(0,"div"),Me(1,sQ,1,6,"label",0)(2,fQ,2,9,"select",1)(3,_Q,2,9,"select",2)(4,xQ,2,11,"select",3),v()),r&2&&(ve((a.options==null?null:a.options.htmlClass)||""),m(),E("ngIf",a.options==null?null:a.options.title),m(),E("ngIf",a.boundControl&&!(a.options!=null&&a.options.multiple)),m(),E("ngIf",!a.boundControl),m(),E("ngIf",a.boundControl&&(a.options==null?null:a.options.multiple)))},dependencies:[_o,wn,vo,bo,sa,P1,In,wi,Vr],encapsulation:2});let e=n;return e})(),Cee=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}ngOnDestroy(){this.isValidChangesSubs?.unsubscribe(),this.isValidChangesSubs=null,this.updateValue({target:{value:null}})}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this),N(this.options,"disabled")?this.controlDisabled=this.options.disabled:this.jsf.formOptions.disableInvalidSubmit&&(this.controlDisabled=!this.jsf.isValid,this.isValidChangesSubs=this.jsf.isValidChanges.subscribe(i=>this.controlDisabled=!i)),(this.controlValue===null||this.controlValue===void 0)&&(this.controlValue=this.options.title)}updateValue(i){typeof this.options.onClick=="function"?this.options.onClick(i):this.jsf.updateValue(this,i.target.value)}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["submit-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:2,vars:12,consts:[[3,"click","disabled","id","name","type","value"]],template:function(r,a){if(r&1&&(y(0,"div")(1,"input",0),Z("click",function(u){return a.updateValue(u)}),v()()),r&2){let l,u,d;ve((a.options==null?null:a.options.htmlClass)||""),m(),ve((a.options==null?null:a.options.fieldHtmlClass)||""),E("disabled",a.controlDisabled)("id","control"+((l=a.layoutNode())==null?null:l._id))("name",a.controlName)("type",(u=a.layoutNode())==null?null:u.type)("value",a.controlValue),me("aria-describedby","control"+((d=a.layoutNode())==null?null:d._id)+"Status")("readonly",a.options!=null&&a.options.readonly?"readonly":null)("required",a.options==null?null:a.options.required)}},encapsulation:2});let e=n;return e})();var xee=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.newComponent=null,this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0),this.widgetContainer=Fr("widgetContainer",{read:po})}ngOnInit(){this.updateComponent()}ngOnChanges(){this.updateComponent()}updateComponent(){let i=this.layoutNode(),r=this.widgetContainer();if(r&&!this.newComponent&&i.options.template&&(this.newComponent=r.createComponent(i.options.template)),this.newComponent)for(let a of["layoutNode","layoutIndex","dataIndex"])this.newComponent.instance[a]=this[a]}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["template-widget"]],viewQuery:function(r,a){r&1&&Ar(a.widgetContainer,g0,5,po),r&2&&Dr()},inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,features:[kr],decls:2,vars:0,consts:[["widgetContainer",""]],template:function(r,a){r&1&&q(0,"div",null,0)},encapsulation:2});let e=n;return e})(),wee=(()=>{let n=class n{constructor(){this.jsf=L(Rt),this.controlDisabled=!1,this.boundControl=!1,this.layoutNode=le(void 0),this.layoutIndex=le(void 0),this.dataIndex=le(void 0)}ngOnInit(){this.options=this.layoutNode().options||{},this.jsf.initializeControl(this)}updateValue(i){this.jsf.updateValue(this,i.target.value)}ngOnDestroy(){this.jsf.updateValue(this,null)}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["textarea-widget"]],inputs:{layoutNode:[1,"layoutNode"],layoutIndex:[1,"layoutIndex"],dataIndex:[1,"dataIndex"]},standalone:!1,decls:4,vars:5,consts:[[3,"class","display","innerHTML",4,"ngIf"],[3,"formControl","class","id","name",4,"ngIf"],[3,"class","disabled","id","name","value","input",4,"ngIf"],[3,"innerHTML"],[3,"formControl","id","name"],[3,"input","disabled","id","name","value"]],template:function(r,a){r&1&&(y(0,"div"),Me(1,wQ,1,6,"label",0)(2,IQ,1,12,"textarea",1)(3,SQ,2,14,"textarea",2),v()),r&2&&(ve((a.options==null?null:a.options.htmlClass)||""),m(),E("ngIf",a.options==null?null:a.options.title),m(),E("ngIf",a.boundControl),m(),E("ngIf",!a.boundControl))},dependencies:[wn,yo,In,Vr],encapsulation:2});let e=n;return e})(),_O=(()=>{let n=class n{constructor(){this.defaultWidget="text",this.widgetLibrary={none:mee,root:v0,"select-framework":y0,"select-widget":mO,$ref:see,email:"text",integer:"number",number:hee,password:"text",search:"text",tel:"text",text:fee,url:"text",color:"text",date:"text",datetime:"text","datetime-local":"text",month:"text",range:"number",time:"text",week:"text",checkbox:uee,file:dee,hidden:"text",image:"text",radio:"radios",reset:"submit",submit:Cee,button:lee,select:bee,textarea:wee,checkboxes:cee,"checkboxes-inline":"checkboxes",checkboxbuttons:"checkboxes",radios:_ee,"radios-inline":"radios",radiobuttons:"radios",section:vee,div:"section",fieldset:"section",flex:"section","one-of":gee,array:"section",tabarray:"tabs",tab:"section",tabs:gO,message:pee,help:"message",msg:"message",html:"message",template:xee,advancedfieldset:"section",authfieldset:"section",optionfieldset:"one-of",selectfieldset:"one-of",conditional:"section",actions:"section",tagsinput:"section",updown:"number","date-time":"datetime-local","alt-datetime":"datetime-local","alt-date":"date",wizard:"section",textline:"text"},this.registeredWidgets={},this.frameworkWidgets={},this.activeWidgets={},this.setActiveWidgets()}setActiveWidgets(){this.activeWidgets=Object.assign({},this.widgetLibrary,this.frameworkWidgets,this.registeredWidgets);for(let i of Object.keys(this.activeWidgets)){let r=this.activeWidgets[i];if(typeof r=="string"){let a=[];for(;typeof r=="string"&&!a.includes(r);)a.push(r),r=this.activeWidgets[r];typeof r!="string"&&(this.activeWidgets[i]=r)}}return!0}setDefaultWidget(i){return this.hasWidget(i)?(this.defaultWidget=i,!0):!1}hasWidget(i,r="activeWidgets"){return!i||typeof i!="string"?!1:N(this[r],i)}hasDefaultWidget(i){return this.hasWidget(i,"widgetLibrary")}registerWidget(i,r){return!i||!r||typeof i!="string"?!1:(this.registeredWidgets[i]=r,this.setActiveWidgets())}unRegisterWidget(i){return N(this.registeredWidgets,i)?(delete this.registeredWidgets[i],this.setActiveWidgets()):!1}unRegisterAllWidgets(i=!0){return this.registeredWidgets={},i&&(this.frameworkWidgets={}),this.setActiveWidgets()}registerFrameworkWidgets(i){return(i===null||typeof i!="object")&&(i={}),this.frameworkWidgets=i,this.setActiveWidgets()}unRegisterFrameworkWidgets(){return Object.keys(this.frameworkWidgets).length?(this.frameworkWidgets={},this.setActiveWidgets()):!1}getWidget(i,r="activeWidgets"){return this.hasWidget(i,r)?this[r][i]:this.hasWidget(this.defaultWidget,r)?this[r][this.defaultWidget]:null}getAllWidgets(){return{widgetLibrary:this.widgetLibrary,registeredWidgets:this.registeredWidgets,frameworkWidgets:this.frameworkWidgets,activeWidgets:this.activeWidgets}}};n.\u0275fac=function(r){return new(r||n)},n.\u0275prov=Kn({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})();var h0=(()=>{let n=class n{};n.\u0275fac=function(r){return new(r||n)},n.\u0275mod=oa({type:n}),n.\u0275inj=ia({imports:[tc,Ii,Ss,iT.forRoot({filter:".sortable-filter",preventOnFilter:!1,onMove:function(i,r){if(i.related.classList.contains("sortable-fixed"))return!1}})]});let e=n;return e})(),Iee=(()=>{let n=class n{};n.\u0275fac=function(r){return new(r||n)},n.\u0275mod=oa({type:n}),n.\u0275inj=ia({providers:[{provide:_0,useClass:aee,multi:!0}],imports:[tc,h0]});let e=n;return e})(),See=(()=>{let n=class n{constructor(i){this.frameworks=i,this.widgetLibrary=L(_O),this.http=L(b1),this.activeFramework=null,this.loadExternalAssets=!1,this.frameworkLibrary={},this.frameworks.forEach(r=>this.frameworkLibrary[r.name]=r),this.defaultFramework=this.frameworks[0].name,this.activeFrameworkName=this.defaultFramework,this.activeFrameworkNameSubject=new Gn,this.activeFrameworkName$=this.activeFrameworkNameSubject.asObservable(),this.setFramework(this.defaultFramework)}setLoadExternalAssets(i=!0){this.loadExternalAssets=!!i}setFramework(i=this.defaultFramework,r=this.loadExternalAssets){return this.activeFramework=typeof i=="string"&&this.hasFramework(i)?this.frameworkLibrary[i]:typeof i=="object"&&N(i,"framework")?i:this.frameworkLibrary[this.defaultFramework],this.activeFramework.name!=this.activeFrameworkName&&(this.activeFrameworkName=this.activeFramework.name,this.activeFrameworkNameSubject.next(this.activeFrameworkName)),this.registerFrameworkWidgets(this.activeFramework)}registerFrameworkWidgets(i){return N(i,"widgets")?this.widgetLibrary.registerFrameworkWidgets(i.widgets):this.widgetLibrary.unRegisterFrameworkWidgets()}hasFramework(i){return N(this.frameworkLibrary,i)}getFramework(){return this.activeFramework||this.setFramework("default",!0),this.activeFramework.framework}getFrameworkList(){return this.frameworks.map(i=>({name:i.name,text:i.text}))}getFrameworkWidgets(){return this.activeFramework.widgets||{}}getFrameworkStylesheets(i=this.loadExternalAssets){return i&&this.activeFramework.stylesheets||[]}getFrameworkScripts(i=this.loadExternalAssets){return i&&this.activeFramework.scripts||[]}getFrameworkConfig(i){return(i||this.activeFramework).config}getFrameworkAssetConfig(i,r=!0){let l=`assets/${(i||this.activeFramework).name}/cssframework`,u=`${l}/assets.json`,d=this.http.get(u,{responseType:"text"});return o1(d).then(p=>{let h=JSON.parse(p);return r&&(h.stylesheets=h.stylesheets.map(_=>{let C=["/","//","http:","https:"],T=!1;return C.forEach(x=>{T=T||_.indexOf(x)==0}),T?_:`${l}/${_}`}),h.scripts=h.scripts.map(_=>`${l}/${_}`)),h})}getFrameworkThemes(){let i=this.getFrameworkConfig(),r;return i&&(r=i?.widgetstyles?.__themes__||[]),r}requestThemeChange(i,r=!1,a){let l=a||this.activeFramework;if(l.requestThemeChange){if(r){let d=this.getFrameworkThemes().filter(p=>p.name==i);if(!d||d.length==0)return!1}return l.requestThemeChange(i),!0}}getActiveTheme(i){let r=i||this.activeFramework;if(r.getActiveTheme)return r.getActiveTheme()}registerTheme(i,r){let a=r||this.activeFramework;if(a.registerTheme)return a.registerTheme(i)}unregisterTheme(i,r){let a=r||this.activeFramework;if(a.registerTheme)return a.unregisterTheme(i)}};n.\u0275fac=function(r){return new(r||n)(c1(_0))},n.\u0275prov=Kn({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})(),$ee={provide:C1,useExisting:l1(()=>Ql),multi:!0},Ql=(()=>{let n=class n{constructor(){this.changeDetector=L(y1),this.frameworkLibrary=L(See),this.widgetLibrary=L(_O),this.jsf=L(Rt),this.unsubscribeOnActivateForm$=new Gn,this.formValueSubscription=null,this.formInitialized=!1,this.objectWrap=!1,this.previousInputs={schema:null,layout:null,data:null,options:null,framework:null,widgets:null,form:null,model:null,JSONSchema:null,UISchema:null,formData:null,loadExternalAssets:null,debug:null,ajvOptions:null},this.schema=le(void 0),this.layout=le(void 0),this.data=le(void 0),this.options=le(void 0),this.framework=le(void 0),this.widgets=le(void 0),this.form=le(void 0),this.model=le(void 0),this.JSONSchema=le(void 0),this.UISchema=le(void 0),this.formData=le(void 0),this.ngModel=le(void 0),this.language=le(void 0),this.loadExternalAssets=le(void 0),this.debug=le(void 0),this.theme=le(void 0),this.ajvOptions=le(void 0),this.onChanges=xn(),this.onSubmit=xn(),this.isValid=xn(),this.validationErrors=xn(),this.formSchema=xn(),this.formLayout=xn(),this.dataChange=xn(),this.modelChange=xn(),this.formDataChange=xn(),this.ngModelChange=xn()}get value(){return this.objectWrap?this.jsf.data[1]:this.jsf.data}set value(i){this.setFormValues(i,!1)}ngOnDestroy(){this.dataChangesSubs?.unsubscribe(),this.statusChangesSubs?.unsubscribe(),this.isValidChangesSubs?.unsubscribe(),this.validationErrorChangesSubs?.unsubscribe(),this.dataChangesSubs=null,this.statusChangesSubs=null,this.isValidChangesSubs=null,this.validationErrorChangesSubs=null}getInputValue(i){return typeof this[i]=="function"?this[i]():this[i]}resetScriptsAndStyleSheets(){document.querySelectorAll(".ajsf").forEach(i=>i.remove())}loadScripts(i){(i||this.frameworkLibrary.getFrameworkScripts()).map(a=>{let l=document.createElement("script");l.src=a,l.type="text/javascript",l.async=!0,l.setAttribute("class","ajsf"),document.getElementsByTagName("head")[0].appendChild(l)})}loadStyleSheets(i){(i||this.frameworkLibrary.getFrameworkStylesheets()).map(a=>{let l=document.createElement("link");l.rel="stylesheet",l.href=a,l.setAttribute("class","ajsf"),document.getElementsByTagName("head")[0].appendChild(l)})}loadAssets(){this.frameworkLibrary.getFrameworkAssetConfig().then(i=>{this.resetScriptsAndStyleSheets(),this.loadScripts(i.scripts),this.loadStyleSheets(i.stylesheets)}).catch(i=>{console.log(i),this.resetScriptsAndStyleSheets(),this.loadScripts(),this.loadStyleSheets()})}ngOnInit(){this.updateForm(),this.loadAssets()}ngOnChanges(i){this.updateForm(),i.framework&&!i.framework.isFirstChange()&&i.framework.previousValue!==i.framework.currentValue&&this.loadAssets()}writeValue(i){this.setFormValues(i,!1),this.formValuesInput||(this.formValuesInput="ngModel")}registerOnChange(i){this.onChange=i}registerOnTouched(i){this.onTouched=i}setDisabledState(i){this.jsf.formOptions.formDisabled!==!!i&&(this.jsf.formOptions.formDisabled=!!i,this.initializeForm())}updateForm(){let i,r=this.language();if(!this.formInitialized||!this.formValuesInput||r&&r!==this.jsf.language)this.initializeForm();else{r&&r!==this.jsf.language&&this.jsf.setLanguage(r);let a=Object.keys(this.previousInputs).filter(d=>this.previousInputs[d]!==this.getInputValue(d)),l=!0;if(a.length===1&&a[0]==="form"&&this.formValuesInput.startsWith("form.")&&(a=Object.keys(this.previousInputs.form||{}).filter(d=>!(0,Ni.default)(this.previousInputs.form[d],this.form()[d])).map(d=>`form.${d}`),l=!1),a.length===1&&a[0]===this.formValuesInput)if(this.formValuesInput.indexOf(".")===-1)i=this.getInputValue(this.formValuesInput),this.setFormValues(i,l);else{let[d,p]=this.formValuesInput.split(".");i=this.getInputValue(d)[p],this.setFormValues(i,l)}else a.length&&(this.initializeForm(i),this.onChange&&this.onChange(this.jsf.formValues),this.onTouched&&this.onTouched(this.jsf.formValues));let u=this.theme();u&&u!==this.frameworkLibrary.getActiveTheme()?.name&&this.frameworkLibrary.requestThemeChange(u),Object.keys(this.previousInputs).filter(d=>this.previousInputs[d]!==this.getInputValue(d)).forEach(d=>this.previousInputs[d]=this.getInputValue(d))}}setFormValues(i,r=!0){if(i){let a=this.objectWrap?i[1]:i;this.jsf.formGroup?r&&this.jsf.formGroup.reset({},{emitEvent:!1}):(this.jsf.formValues=i,this.activateForm()),this.jsf.formGroup&&this.jsf.formGroup.patchValue(a,{emitEvent:!1}),this.onChange&&this.onChange(a),this.onTouched&&this.onTouched(a)}else this.jsf.formGroup.reset()}submitForm(){let i=this.jsf.validData;this.onSubmit.emit(this.objectWrap?i[1]:i)}initializeForm(i){if(this.schema()||this.layout()||this.data()||this.form()||this.model()||this.JSONSchema()||this.UISchema()||this.formData()||this.ngModel()||this.jsf.data){if(this.jsf.resetAllValues(),this.initializeAjv(),this.initializeOptions(),this.initializeSchema(),this.initializeLayout(),this.initializeData(),i&&(this.jsf.formValues=i),this.activateForm(),this.debug()||this.jsf.formOptions.debug){let r=[];this.debugOutput=r.map(a=>JSON.stringify(a,null,2)).join(`
31
- `)}this.formInitialized=!0}}initializeAjv(){let i=this.form(),r=(0,Re.default)(this.ajvOptions())||(i?(0,Re.default)(i.ajvOptions):null);r&&(this.ajvInstanceName=this.jsf.createAndRegisterAjvInstance(r).name)}initializeOptions(){let i=this.language();i&&i!==this.jsf.language&&this.jsf.setLanguage(i),this.jsf.setOptions({debug:!!this.debug()});let r=this.loadExternalAssets()||!1,a=this.framework()||"default",l=this.options();te(l)&&(this.jsf.setOptions(l),r=l.loadExternalAssets||r,a=l.framework||a);let u=this.form();te(u)&&te(u.options)&&(this.jsf.setOptions(u.options),r=u.options.loadExternalAssets||r,a=u.options.framework||a);let d=this.widgets();if(te(d)&&this.jsf.setOptions({widgets:d}),this.frameworkLibrary.setLoadExternalAssets(r),this.frameworkLibrary.setFramework(a),this.jsf.framework=this.frameworkLibrary.getFramework(),te(this.jsf.formOptions.widgets))for(let h of Object.keys(this.jsf.formOptions.widgets))this.widgetLibrary.registerWidget(h,this.jsf.formOptions.widgets[h]);te(u)&&te(u.tpldata)&&this.jsf.setTpldata(u.tpldata);let p=this.theme();p&&this.frameworkLibrary.requestThemeChange(p)}initializeSchema(){let i=this.form(),r=this.schema(),a=this.JSONSchema();te(r)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.schema=(0,Re.default)(r)):N(i,"schema")&&te(i.schema)?this.jsf.schema=(0,Re.default)(i.schema):te(a)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.schema=(0,Re.default)(a)):N(i,"JSONSchema")&&te(i.JSONSchema)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.schema=(0,Re.default)(i.JSONSchema)):N(i,"properties")&&te(i.properties)?this.jsf.schema=(0,Re.default)(i):te(i),Ae(this.jsf.schema)||(Gt("object",this.jsf.schema.type)&&(this.jsf.schema.type="object"),N(this.jsf.schema,"type")&&this.jsf.schema.type!=="object"?(this.jsf.schema={type:"object",properties:{1:this.jsf.schema}},this.objectWrap=!0):N(this.jsf.schema,"type")||(te(this.jsf.schema.properties)||te(this.jsf.schema.patternProperties)||te(this.jsf.schema.additionalProperties)?this.jsf.schema.type="object":(this.jsf.JsonFormCompatibility=!0,this.jsf.schema={type:"object",properties:this.jsf.schema})),this.jsf.schema=Ka(this.jsf.schema),this.jsf.schema=JQ(this.jsf.schema,this.jsf.schemaRefLibrary,this.jsf.schemaRecursiveRefMap,this.jsf.dataRecursiveRefMap,this.jsf.arrayMap),N(this.jsf.schemaRefLibrary,"")&&(this.jsf.hasRootReference=!0))}initializeData(){let i=this.form(),r=this.data(),a=this.model(),l=this.ngModel();Ie(r)?(this.jsf.formValues=(0,Re.default)(r),this.formValuesInput="data"):Ie(a)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.formValues=(0,Re.default)(a),this.formValuesInput="model"):Ie(l)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.formValues=(0,Re.default)(l),this.formValuesInput="ngModel"):te(i)&&Ie(i.value)?(this.jsf.JsonFormCompatibility=!0,this.jsf.formValues=(0,Re.default)(i.value),this.formValuesInput="form.value"):te(i)&&Ie(i.data)?(this.jsf.formValues=(0,Re.default)(i.data),this.formValuesInput="form.data"):Ie(this.formData())?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.formValuesInput="formData"):N(i,"formData")&&Ie(i.formData)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.formValues=(0,Re.default)(i.formData),this.formValuesInput="form.formData"):this.formValuesInput="data"}initializeLayout(){let i=p=>((te(p)||W(p))&&Rn(p,(h,_)=>{N(h,"options")&&te(h.options)&&(h.titleMap=h.options,delete h.options)},"top-down"),p),r=this.form(),a=this.layout();W(a)?this.jsf.layout=(0,Re.default)(a):W(r)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.layout=(0,Re.default)(r)):r&&W(r.form)?(this.jsf.JsonFormCompatibility=!0,this.jsf.layout=i((0,Re.default)(r.form))):r&&W(r.layout)?this.jsf.layout=(0,Re.default)(r.layout):this.jsf.layout=["*"];let l=null,u=this.form(),d=this.UISchema();te(d)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,l=(0,Re.default)(d)):N(u,"UISchema")?(this.jsf.ReactJsonSchemaFormCompatibility=!0,l=(0,Re.default)(u.UISchema)):N(u,"uiSchema")?(this.jsf.ReactJsonSchemaFormCompatibility=!0,l=(0,Re.default)(u.uiSchema)):N(u,"customFormItems")&&(this.jsf.JsonFormCompatibility=!0,l=i((0,Re.default)(u.customFormItems))),l&&H.forEachDeep(l,(p,h)=>{let _=h.replace(/\//g,"/properties/").replace(/\/properties\/items\/properties\//g,"/items/properties/").replace(/\/properties\/titleMap\/properties\//g,"/titleMap/properties/");if(Ie(p)&&Ie(h)){let C=H.toKey(h),T=(H.parse(_)||[]).slice(0,-2),x;C.toLowerCase()==="ui:order"?x=[...T,"ui:order"]:(C.slice(0,3).toLowerCase()==="ui:"&&(C=C.slice(3)),x=[...T,"x-schema-form",C]),H.has(this.jsf.schema,T)&&!H.has(this.jsf.schema,x)&&H.set(this.jsf.schema,x,p)}})}activateForm(){if(this.unsubscribeOnActivateForm$.next(),Ae(this.jsf.schema)&&(Ae(this.jsf.formValues)||this.jsf.buildSchemaFromData()),Ae(this.jsf.schema)||(this.jsf.buildLayout(this.widgetLibrary),this.jsf.buildFormGroupTemplate(this.jsf.formValues),this.jsf.buildFormGroup(this.ajvInstanceName)),this.jsf.formGroup){!Ae(this.jsf.formValues)&&this.jsf.formOptions.setSchemaDefaults!==!0&&this.jsf.formOptions.setLayoutDefaults!==!0&&this.setFormValues(this.jsf.formValues),this.dataChangesSubs=this.jsf.dataChanges.pipe(xs(this.unsubscribeOnActivateForm$)).subscribe(r=>{this.onChanges.emit(this.objectWrap?r[1]:r),this.formValuesInput&&this.formValuesInput.indexOf(".")===-1&&this[`${this.formValuesInput}Change`].emit(this.objectWrap?r[1]:r)}),this.statusChangesSubs=this.jsf.formGroup.statusChanges.pipe(xs(this.unsubscribeOnActivateForm$)).subscribe(()=>this.changeDetector.markForCheck()),this.isValidChangesSubs=this.jsf.isValidChanges.pipe(xs(this.unsubscribeOnActivateForm$)).subscribe(r=>this.isValid.emit(r)),this.validationErrorChangesSubs=this.jsf.validationErrorChanges.pipe(xs(this.unsubscribeOnActivateForm$)).subscribe(r=>this.validationErrors.emit(r)),this.formSchema.emit(this.jsf.schema),this.formLayout.emit(this.jsf.layout),this.onChanges.emit(this.objectWrap?this.jsf.data[1]:this.jsf.data);let i=H.get(this.jsf,"/formOptions/validateOnRender");if(i){let r=a=>{(i===!0||Ie(a.value))&&a.markAsTouched(),Object.keys(a.controls||{}).forEach(l=>r(a.controls[l]))};r(this.jsf.formGroup),this.isValid.emit(this.jsf.isValid),this.validationErrors.emit(this.jsf.ajvErrors)}}}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=Ce({type:n,selectors:[["json-schema-form"]],inputs:{schema:[1,"schema"],layout:[1,"layout"],data:[1,"data"],options:[1,"options"],framework:[1,"framework"],widgets:[1,"widgets"],form:[1,"form"],model:[1,"model"],JSONSchema:[1,"JSONSchema"],UISchema:[1,"UISchema"],formData:[1,"formData"],ngModel:[1,"ngModel"],language:[1,"language"],loadExternalAssets:[1,"loadExternalAssets"],debug:[1,"debug"],theme:[1,"theme"],ajvOptions:[1,"ajvOptions"],value:"value"},outputs:{onChanges:"onChanges",onSubmit:"onSubmit",isValid:"isValid",validationErrors:"validationErrors",formSchema:"formSchema",formLayout:"formLayout",dataChange:"dataChange",modelChange:"modelChange",formDataChange:"formDataChange",ngModelChange:"ngModelChange"},standalone:!1,features:[_1([Rt,$ee]),kr],decls:3,vars:3,consts:[[1,"json-schema-form",3,"ngSubmit","autocomplete"],[3,"layout"],[4,"ngIf"]],template:function(r,a){r&1&&(y(0,"form",0),Z("ngSubmit",function(){return a.submitForm()}),q(1,"root-widget",1),v(),Me(2,$Q,4,1,"div",2)),r&2&&(E("autocomplete",!(a.jsf==null||a.jsf.formOptions==null)&&a.jsf.formOptions.autocomplete?"on":"off"),m(),E("layout",a.jsf==null?null:a.jsf.layout),m(),E("ngIf",a.debug()||(a.jsf==null||a.jsf.formOptions==null?null:a.jsf.formOptions.debug)))},dependencies:[wn,E1,x1,I1,v0],encapsulation:2,changeDetection:0});let e=n;return e})(),yO=(()=>{let n=class n{};n.\u0275fac=function(r){return new(r||n)},n.\u0275mod=oa({type:n}),n.\u0275inj=ia({imports:[tc,Ii,Ss,h0,Iee,h0]});let e=n;return e})();var vO=(()=>{class e{jsonSchemaForm=L(Ql,{host:!0,self:!0,optional:!0});jsfPatch=!1;constructor(){let t=this.jsonSchemaForm,i=t.jsf.buildLayout.bind(t.jsf);t.jsf.buildLayout=r=>{if(i(r),t.jsf.formValues&&this.jsfPatch)return this.fixNestedArrayLayout(t.jsf.layout,t.jsf.formValues)}}fixNestedArrayLayout(t,i){return this.fixArray(t,i,""),t}fixArray(t,i,r){if(Array.isArray(t)){let a=t.filter(d=>d.name!=="_bridge"),l=a.filter(d=>d.items&&Array.isArray(d.items)).flatMap(d=>d.items).filter(d=>d.dataType==="array"||d.arrayItem);a.concat(l).filter(d=>d.dataType==="array"||d.arrayItem).forEach(d=>{this.fixNestedArray(d,i,r)})}else this.fixNestedArray(t,i,r)}fixNestedArray(t,i,r){if(t.items&&Array.isArray(t.items)){let a=t.items.find(l=>l.type==="$ref");if(a){let l=t.items.filter(p=>p.type==="section"||p.type==="div"),u=l.length>0?l.reduce((p,h)=>p.id>h.id?p:h):this.getItemTemplateFromRef(a),d=this.getDataFromPointer(i,a.dataPointer.replace(r,""));if(d===null)return;if(Array.isArray(d)){for(;t.items.length-1<d.length;){let p=$p(u);p._id=z1("new_"),t.items.unshift(p)}d.forEach((p,h)=>{this.fixArray(t.items[h],p,a.dataPointer)})}else this.fixArray(t.items,i,a.dataPointer)}else this.fixArray(t.items,i,r);t.items.filter(l=>l.items&&Array.isArray(l.items)).forEach(l=>{this.fixArray(l.items,i,r)})}}getDataFromPointer(t,i){let r=t;return i.substring(1).split(/\//).filter(a=>a!=="-").forEach(a=>{try{r=r[a]}catch{r=null}}),r}getItemTemplateFromRef(t){let i={type:"section",items:[]},r=$p(t);return L1(r,i),r}static \u0275fac=function(i){return new(i||e)};static \u0275dir=mo({type:e,selectors:[["","jsfPatch",""]],inputs:{jsfPatch:"jsfPatch"}})}return e})();function Tee(e,n){if(e&1){let t=ue();y(0,"json-schema-form",1),Z("onChanges",function(r){Y(t);let a=S();return X(a.onChanges(r))})("isValid",function(r){Y(t);let a=S();return X(a.validChange(r))})("validationErrors",function(r){Y(t);let a=S();return X(a.validationErrors(r))}),v()}if(e&2){let t=S();E("jsfPatch",t.configSchema.fixArrays)("options",t.jsonFormOptions)("schema",t.configSchema.schema)("UISchema",t.configSchema.uiSchema)("layout",t.configSchema.layout)("form",t.configSchema.form)("data",t.currentData)("language",t.language)}}var Yd=(()=>{class e{$settings=L(Pt);availableLanguages=["de","en","es","fr","it","pt","zh"];configSchema;data;dataChange=xn();dataChanged=xn();isValid=xn();currentData;language="en";jsonFormOptions={addSubmit:!1,loadExternalAssets:!1,returnEmptyFields:!1,setSchemaDefaults:!0,autocomplete:!1};ngOnInit(){let t=this.$settings.env.lang.split("-")[0];this.availableLanguages.includes(t)&&(this.language=t),this.currentData=this.data}onChanges(t){this.dataChange.emit(t),this.dataChanged.emit(t)}validChange(t){this.isValid.emit(t)}validationErrors(t){t&&t.forEach(i=>console.error(i.instancePath,i.message))}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ce({type:e,selectors:[["app-schema-form"]],inputs:{configSchema:"configSchema",data:"data"},outputs:{dataChange:"dataChange",dataChanged:"dataChanged",isValid:"isValid"},decls:2,vars:1,consts:[["framework","bootstrap-5",1,"ng-bs5-validate",3,"jsfPatch","options","schema","UISchema","layout","form","data","language"],["framework","bootstrap-5",1,"ng-bs5-validate",3,"onChanges","isValid","validationErrors","jsfPatch","options","schema","UISchema","layout","form","data","language"]],template:function(i,r){i&1&&(ws(0),j(1,Tee,1,8,"json-schema-form",0),Is()),i&2&&(m(),R(r.configSchema.schema?1:-1))},dependencies:[yO,Ql,vO],encapsulation:2})}return e})();var Pee=["custompluginui"];function Oee(e,n){e&1&&(y(0,"div",6),q(1,"i",18),v())}function Mee(e,n){if(e&1){let t=ue();y(0,"div",8)(1,"app-schema-form",19),ct("dataChange",function(r){Y(t);let a=S();return ut(a.pluginConfig[0],r)||(a.pluginConfig[0]=r),X(r)}),Z("dataChanged",function(r){Y(t);let a=S();return X(a.schemaFormUpdatedSubject.next(r))})("isValid",function(r){Y(t);let a=S();return X(a.onIsValid(r))}),v()()}if(e&2){let t=S();m(),E("configSchema",t.schema),lt("data",t.pluginConfig[0])}}function kee(e,n){if(e&1){let t=ue();y(0,"button",23),Z("click",function(){Y(t);let r=S(2);return X(r.formActionSubject.next("cancel"))}),M(1),v()}if(e&2){let t=S(2);m(),se(t.formCancelButtonLabel)}}function Aee(e,n){if(e&1){let t=ue();y(0,"button",24),Z("click",function(){Y(t);let r=S(2);return X(r.formActionSubject.next("submit"))}),M(1),v()}if(e&2){let t=S(2);E("disabled",!t.formValid),m(),ie(" ",t.formSubmitButtonLabel," ")}}function Dee(e,n){if(e&1){let t=ue();y(0,"div",8)(1,"app-schema-form",19),ct("dataChange",function(r){Y(t);let a=S();return ut(a.formData,r)||(a.formData=r),X(r)}),Z("dataChanged",function(r){Y(t);let a=S();return X(a.formUpdatedSubject.next(r))})("isValid",function(r){Y(t);let a=S();return X(a.formValidEvent(r))}),v(),y(2,"div",20),j(3,kee,2,1,"button",21),j(4,Aee,2,2,"button",22),v()()}if(e&2){let t=S();m(),E("configSchema",t.formSchema),lt("data",t.formData),m(2),R(t.formCancelButtonLabel?3:-1),m(),R(t.formSubmitButtonLabel?4:-1)}}function Nee(e,n){e&1&&(y(0,"div",9),q(1,"i",18),v())}function Fee(e,n){if(e&1&&(q(0,"i",15),A(1,"translate")),e&2){let t=S();E("ngClass",t.formIsValid?"fa-circle-check green-text":t.strictValidation?"fa-circle-exclamation red-text":"fa-circle-exclamation orange-text")("ngbTooltip",V(1,3,t.formIsValid?"form.label_valid":t.strictValidation?"form.label_invalid_strict":"form.label_invalid"))("openDelay",150)}}function qee(e,n){e&1&&(M(0),A(1,"translate")),e&2&&ie(" ",V(1,1,"form.button_save")," ")}function Vee(e,n){e&1&&q(0,"i",17)}var bO=(()=>{class e{$activeModal=L(Et);$api=L(rt);$modal=L(en);$plugin=L(no);$settings=L(Pt);$toastr=L(pt);$translate=L(ft);$ws=L(Br);customPluginUiElementTarget=Fr("custompluginui");plugin;schema;pluginConfig;pluginAlias;pluginType;loading=!0;saveInProgress=!1;pluginSpinner=!1;saveButtonDisabled=!1;uiLoaded=!1;showSchemaForm=!1;schemaFormUpdatedSubject=new Gn;formId;formSchema;formData;formSubmitButtonLabel;formCancelButtonLabel;formValid=!0;formUpdatedSubject=new Gn;formActionSubject=new Gn;childBridges=[];isFirstSave=!1;formIsValid=!0;strictValidation=!1;io;basePath;iframe;schemaFormRecentlyUpdated=!1;schemaFormRecentlyRefreshed=!1;schemaFormRefreshSubject=new Gn;ngOnInit(){this.io=this.$ws.connectToNamespace("plugins/settings-ui"),this.pluginAlias=this.schema.pluginAlias,this.pluginType=this.schema.pluginType,this.strictValidation=this.schema.strictValidation,this.pluginConfig.length===0&&(this.isFirstSave=!0),this.io.connected?(this.io.socket.emit("start",this.plugin.name),setTimeout(()=>{this.io.connected.subscribe(()=>{this.io.socket.emit("start",this.plugin.name)})},1e3)):this.io.connected.subscribe(()=>{this.io.socket.emit("start",this.plugin.name)}),this.io.socket.on("response",t=>{t.action="response",this.iframe.contentWindow.postMessage(t,Rr.api.origin)}),this.io.socket.on("stream",t=>{t.action="stream",this.iframe.contentWindow.postMessage(t,Rr.api.origin)}),this.io.socket.on("ready",()=>{this.loading=!1,this.loadUi()}),this.schemaFormRefreshSubject.pipe(na(250)).subscribe(this.schemaFormRefresh.bind(this)),this.schemaFormUpdatedSubject.pipe(na(250),xp(1)).subscribe(this.schemaFormUpdated.bind(this)),this.formUpdatedSubject.pipe(na(100),xp(1)).subscribe(this.formUpdated.bind(this)),this.formActionSubject.subscribe(this.formActionEvent.bind(this)),this.basePath=`/plugins/settings-ui/${encodeURIComponent(this.plugin.name)}`,window.addEventListener("message",this.handleMessage,!1)}onIsValid(t){this.formIsValid=t}formValidEvent(t){this.formValid=t}savePluginConfig(t=!1){return pe(this,null,function*(){this.saveInProgress=!0;try{let i=yield je(this.$api.post(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`,this.pluginConfig));if(this.saveInProgress=!1,t){if(this.isFirstSave&&this.$settings.env.recommendChildBridges&&i[0]?.platform){this.$activeModal.close(),this.$plugin.bridgeSettings(this.plugin,!0);return}if(!["homebridge","homebridge-config-ui-x"].includes(this.plugin.name)&&(yield this.getChildBridges(),this.childBridges.length>0)){this.$activeModal.close();let r=this.$modal.open(ua,{size:"lg",backdrop:"static"});r.componentInstance.bridges=this.childBridges.map(a=>({name:a.name,username:a.username}));return}this.$activeModal.close(),this.$modal.open(Bi,{size:"lg",backdrop:"static"})}}catch(i){this.saveInProgress=!1,console.error(i),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}ngOnDestroy(){window.removeEventListener("message",this.handleMessage),this.io.end(),this.schemaFormRefreshSubject.complete(),this.schemaFormUpdatedSubject.complete(),this.formUpdatedSubject.complete()}loadUi(){this.iframe=this.customPluginUiElementTarget().nativeElement,this.iframe.src=`${Rr.api.base+this.basePath}/index.html?origin=${encodeURIComponent(location.origin)}&v=${encodeURIComponent(this.plugin.installedVersion)}`}handleMessage=t=>{if(t.origin===Rr.api.origin||t.origin===window.origin)switch(t.data.action){case"loaded":this.injectDefaultStyles(t),this.confirmReady(t);break;case"request":{this.handleRequest(t);break}case"scrollHeight":this.setiFrameHeight(t),this.uiLoaded=!0;break;case"config.get":{this.requestResponse(t,this.getConfigBlocks());break}case"config.save":{this.requestResponse(t,this.savePluginConfig());break}case"config.update":{this.handleUpdateConfig(t,t.data.pluginConfig);break}case"config.schema":{this.requestResponse(t,this.schema);break}case"cachedAccessories.get":{this.handleGetCachedAccessories(t);break}case"schema.show":{this.formEnd(),this.showSchemaForm=!0;break}case"schema.hide":{this.showSchemaForm=!1;break}case"form.create":{this.showSchemaForm=!1,this.formCreate(t.data.formId,t.data.schema,t.data.data,t.data.submitButton,t.data.cancelButton);break}case"form.end":{this.formEnd();break}case"user.lightingMode":{this.requestResponse(t,this.$settings.actualLightingMode);break}case"i18n.lang":{this.requestResponse(t,this.$translate.currentLang);break}case"i18n.translations":{this.requestResponse(t,this.$translate.store.translations[this.$translate.currentLang]);break}case"close":{this.$activeModal.close();break}case"toast.success":this.$toastr.success(t.data.message,t.data.title);break;case"toast.error":this.$toastr.error(t.data.message,t.data.title);break;case"toast.warning":this.$toastr.warning(t.data.message,t.data.title);break;case"toast.info":this.$toastr.info(t.data.message,t.data.title);break;case"spinner.show":this.pluginSpinner=!0;break;case"spinner.hide":this.pluginSpinner=!1;break;case"button.save.disabled":this.saveButtonDisabled=!0;break;case"button.save.enabled":this.saveButtonDisabled=!1;break;default:console.log(t)}};confirmReady(t){t.source.postMessage({action:"ready"},t.origin)}setiFrameHeight(t){this.iframe.style.height=`${t.data.scrollHeight+10}px`}handleRequest(t){this.io.socket.emit("request",t.data)}handleUpdateConfig(t,i){if(this.schemaFormRefreshSubject.next(void 0),!Array.isArray(i))return this.$toastr.error(this.$translate.instant("plugins.config.must_be_array"),this.$translate.instant("toast.title_error")),this.requestResponse(t,{message:this.$translate.instant("plugins.config.must_be_array")},!1);for(let r of i)if(typeof r!="object"||Array.isArray(r))return this.$toastr.error(this.$translate.instant("plugins.config.must_be_array_objects"),this.$translate.instant("toast.title_error")),this.requestResponse(t,{message:this.$translate.instant("plugins.config.must_be_array_objects")},!1);return this.updateConfigBlocks(i),this.requestResponse(t,this.getConfigBlocks())}requestResponse(t,i,r=!0){t.source.postMessage({action:"response",requestId:t.data.requestId,success:r,data:i},t.origin)}injectDefaultStyles(t){return pe(this,null,function*(){let i=Array.from(window.document.body.classList).find(d=>d.startsWith("config-ui-x-")),r=window.document.body.classList.contains("dark-mode");t.source.postMessage({action:"body-class",class:i},t.origin),t.source.postMessage({action:"body-class",class:"modal-content"},t.origin),r&&t.source.postMessage({action:"body-class",class:"dark-mode"},t.origin);let a=Array.from(document.querySelectorAll("link"));for(let d of a)if(d.getAttribute("rel")==="stylesheet"){let p=d.getAttribute("href"),h=document.baseURI+(p.startsWith("/")?p.substring(1):p);t.source.postMessage({action:"link-element",href:h,rel:"stylesheet"},t.origin)}let l=Array.from(document.querySelectorAll("style"));for(let d of l)t.source.postMessage({action:"inline-style",style:d.innerHTML},t.origin);let u=`
32
- body {
33
- height: unset !important;
34
- background-color: ${r?"#242424":"#FFFFFF"} !important;
35
- color: ${r?"#FFFFFF":"#000000"} !important;
36
- }
37
- `;t.source.postMessage({action:"inline-style",style:u},t.origin)})}getConfigBlocks(){return this.pluginConfig}updateConfigBlocks(t){for(let i of t)i[this.pluginType]=this.pluginAlias;this.pluginConfig=t}schemaFormUpdated(){if(!(!this.iframe||!this.iframe.contentWindow)){if(this.schemaFormRecentlyRefreshed){this.schemaFormRecentlyRefreshed=!1;return}this.schemaFormRecentlyUpdated=!0,this.iframe.contentWindow.postMessage({action:"stream",event:"configChanged",data:this.pluginConfig},Rr.api.origin)}}schemaFormRefresh(){if(this.schemaFormRecentlyUpdated){this.schemaFormRecentlyUpdated=!1;return}this.schemaFormRecentlyRefreshed=!0,this.showSchemaForm&&(this.showSchemaForm=!1,setTimeout(()=>{this.showSchemaForm=!0}))}formCreate(t,i,r,a,l){return pe(this,null,function*(){yield this.formEnd(),this.formId=t,this.formSchema=i,this.formData=r,this.formSubmitButtonLabel=a,this.formCancelButtonLabel=l})}formEnd(){return pe(this,null,function*(){this.formId&&(this.formId=void 0,this.formSchema=void 0,this.formData=void 0,this.formSubmitButtonLabel=void 0,this.formCancelButtonLabel=void 0,yield new Promise(t=>setTimeout(t)))})}formUpdated(t){this.iframe.contentWindow.postMessage({action:"stream",event:this.formId,data:{formEvent:"change",formData:t}},Rr.api.origin)}formActionEvent(t){this.iframe.contentWindow.postMessage({action:"stream",event:this.formId,data:{formEvent:t,formData:this.formData}},Rr.api.origin)}handleGetCachedAccessories(t){return pe(this,null,function*(){let i=yield je(this.$api.get("/server/cached-accessories"));return this.requestResponse(t,i.filter(r=>r.plugin===this.plugin.name))})}getChildBridges(){return pe(this,null,function*(){try{(yield je(this.$api.get("/status/homebridge/child-bridges"))).forEach(i=>{this.plugin.name===i.plugin&&this.childBridges.push(i)})}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error")),this.childBridges=[]}})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ce({type:e,selectors:[["ng-component"]],viewQuery:function(i,r){i&1&&Ar(r.customPluginUiElementTarget,Pee,5),i&2&&Dr()},inputs:{plugin:"plugin",schema:"schema",pluginConfig:"pluginConfig"},decls:24,vars:17,consts:[["custompluginui",""],[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body","pb-0",2,"min-height","110px"],[1,"text-center","primary-text"],["width","100%","height","1px;","sandbox","allow-same-origin allow-scripts allow-popups allow-popups-to-escape-sandbox allow-downloads allow-forms",2,"border","0"],[1,"card","card-body"],[1,"loading-overlay","text-center","primary-text","d-flex","align-items-center","justify-content-center"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-center"],[1,"text-end","d-flex","align-items-center","justify-content-end"],["container","modal","placement","top","triggers","hover",1,"fa","fa-fw","fa-xl","me-2",3,"ngClass","ngbTooltip","openDelay"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[3,"dataChange","dataChanged","isValid","configSchema","data"],[1,"text-end","custom-form-action-buttons"],[1,"btn","btn-elegant"],[1,"btn","btn-primary",3,"disabled"],[1,"btn","btn-elegant",3,"click"],[1,"btn","btn-primary",3,"click","disabled"]],template:function(i,r){if(i&1){let a=ue();y(0,"div",1)(1,"div",2)(2,"h5",3),M(3),v(),y(4,"button",4),A(5,"translate"),Z("click",function(){return Y(a),X(r.dismissModal())}),v()(),y(6,"div",5),j(7,Oee,2,0,"div",6),q(8,"iframe",7,0),j(10,Mee,2,2,"div",8),j(11,Dee,5,4,"div",8),j(12,Nee,2,0,"div",9),v(),y(13,"div",10)(14,"div",11)(15,"button",12),Z("click",function(){return Y(a),X(r.dismissModal())}),M(16),A(17,"translate"),v()(),q(18,"div",13),y(19,"div",14),j(20,Fee,2,5,"i",15),y(21,"button",16),Z("click",function(){return Y(a),X(r.savePluginConfig(!0))}),j(22,qee,2,3),j(23,Vee,1,0,"i",17),v()()()()}i&2&&(m(3),se(r.plugin.displayName||r.plugin.name),m(),E("disabled",r.saveInProgress),me("aria-label",V(5,13,"form.button_close")),m(3),R(r.loading?7:-1),m(3),R(r.uiLoaded&&r.pluginConfig.length&&r.schema.singular&&r.showSchemaForm?10:-1),m(),R(r.formId?11:-1),m(),R(r.pluginSpinner?12:-1),m(3),E("disabled",r.saveInProgress),m(),ie(" ",V(17,15,"form.button_close")," "),m(4),R(r.saveButtonDisabled?-1:20),m(),E("disabled",r.saveInProgress||r.saveButtonDisabled),m(),R(r.saveInProgress?-1:22),m(),R(r.saveInProgress?23:-1))},dependencies:[Yd,jr,si,Tt],styles:[".manage-plugin-config-external-icons[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:700;line-height:1;color:#000;opacity:.5;background-color:transparent;border:0}.loading-overlay[_ngcontent-%COMP%]{position:absolute;inset:16px;background-color:#ffffffb3} body.dark-mode .loading-overlay{background-color:#242424b3}.custom-form-action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:last-child{margin-right:2px}"]})}return e})();var CO=(()=>{class e{$api=L(rt);$modal=L(en);plugins={};openSettings(t,i){return pe(this,null,function*(){let r=yield this.loadPluginConfig(t.name),a=this.$modal.open(this.plugins[t.name],{size:"lg",backdrop:"static"});return a.componentInstance.plugin=t,a.componentInstance.schema=i,a.componentInstance.pluginConfig=r,a.result.catch(()=>{})})}openCustomSettingsUi(t,i){return pe(this,null,function*(){let r=yield this.loadPluginConfig(t.name),a=this.$modal.open(bO,{size:"lg",backdrop:"static"});return a.componentInstance.plugin=t,a.componentInstance.schema=i,a.componentInstance.pluginConfig=r,a.result.catch(()=>{})})}loadPluginConfig(t){return pe(this,null,function*(){return je(this.$api.get(`/config-editor/plugin/${encodeURIComponent(t)}`))})}static \u0275fac=function(i){return new(i||e)};static \u0275prov=Kn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var $O=st(V1(),1),EO=st(j1(),1),TO=st(R1(),1),PO=st($s(),1);var xO=st($s(),1);var jee=["pluginlogoutput"];function Ree(e,n){if(e&1){let t=ue();y(0,"button",15),A(1,"translate"),A(2,"translate"),Z("click",function(){Y(t);let r=S();return X(r.restartChildBridges())}),q(3,"i",16),v()}if(e&2){let t=S();E("ngbTooltip",V(1,4,t.childBridges.length>1?"child_bridge.restart_plural":"child_bridge.restart"))("openDelay",150)("disabled",t.midAction),me("aria-label",V(2,6,t.childBridges.length>1?"child_bridge.restart_plural":"child_bridge.restart"))}}var wO=(()=>{class e{$activeModal=L(Et);$api=L(rt);$log=L(H1);$modal=L(en);$toastr=L(pt);$translate=L(ft);resizeEvent=new Gn;pluginAlias;plugin;childBridges=[];termTarget=Fr("pluginlogoutput");midAction=!1;onWindowResize(){this.resizeEvent.next(void 0)}ngOnInit(){this.getPluginLog()}restartChildBridges(){return pe(this,null,function*(){this.midAction=!0;try{for(let t of this.childBridges)yield je(this.$api.put(`/server/restart/${t.username}`,{}));this.$toastr.success(this.$translate.instant("plugins.manage.child_bridge_restart"),this.$translate.instant("toast.title_success")),this.midAction=!1}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("plugins.manage.child_bridge_restart_failed"),this.$translate.instant("toast.title_error")),this.midAction=!1}})}downloadLogFile(){this.midAction=!0;let t=this.$modal.open(q1,{size:"lg",backdrop:"static"});t.componentInstance.title=this.$translate.instant("logs.title_download_log_file"),t.componentInstance.message=this.$translate.instant("logs.download_warning"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_download"),t.componentInstance.faIconClass="fas fa-fw fa-user-secret primary-text",t.result.then(()=>{this.$api.get("/platform-tools/hb-service/log/download?colour=yes",{observe:"response",responseType:"text"}).subscribe({next:i=>{if(!i.body)return;let r=i.body.split(`
38
- `),a="",l=!1;r.forEach(u=>{if(u){if(l)if(u.match(/36m\[.*?\]/))l=!1;else{a+=`${u.replace(/\x1B\[(\d{1,3}(;\d{1,2})?)?[mGK]/g,"")}\r
39
- `;return}u.includes(`36m[${this.pluginAlias}]`)&&(a+=`${u.replace(/\x1B\[(\d{1,3}(;\d{1,2})?)?[mGK]/g,"")}\r
40
- `,l=!0)}}),(0,xO.saveAs)(new Blob([a],{type:"text/plain;charset=utf-8"}),`${this.plugin.name}.log.txt`),this.midAction=!1},error:i=>pe(this,null,function*(){let r;try{r=JSON.parse(yield i.error.text()).message}catch(a){console.error(a)}this.$toastr.error(r||this.$translate.instant("logs.download.error"),this.$translate.instant("toast.title_error")),this.midAction=!1})})}).catch(()=>{this.midAction=!1})}ngOnDestroy(){this.$log.destroyTerminal()}dismissModal(){this.$activeModal.dismiss("Dismiss")}getPluginLog(){this.$api.get(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`).subscribe({next:t=>{this.pluginAlias=this.plugin.name==="homebridge-config-ui-x"?"Homebridge UI":t[0]?.name||this.plugin.name,this.$log.startTerminal(this.termTarget(),{},this.resizeEvent,this.pluginAlias)},error:t=>{console.error(t),this.$toastr.error(t.error?.message||t.message,this.$translate.instant("toast.title_error")),this.$activeModal.dismiss()}})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ce({type:e,selectors:[["ng-component"]],viewQuery:function(i,r){i&1&&Ar(r.termTarget,jee,5),i&2&&Dr()},hostBindings:function(i,r){i&1&&Z("resize",function(l){return r.onWindowResize(l)},f1)},inputs:{plugin:"plugin",childBridges:"childBridges"},decls:22,vars:21,consts:[["pluginlogoutput",""],[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body","d-flex","flex-row","flex-grow-1","w-100","p-0"],[1,"w-100","bg-black","plugin-log-output","terminal","align-self-end","w-100","h-100","mb-0","p-2"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-center"],[1,"text-end"],["container","modal","placement","top","triggers","hover",1,"btn","btn-primary",3,"ngbTooltip","openDelay","disabled"],["container","modal","placement","top","triggers","hover",1,"btn","btn-primary","ms-2",3,"click","ngbTooltip","openDelay","disabled"],[1,"fas","fa-fw","fa-download"],["container","modal","placement","top","triggers","hover",1,"btn","btn-primary",3,"click","ngbTooltip","openDelay","disabled"],[1,"fas","fa-fw","fa-power-off"]],template:function(i,r){if(i&1){let a=ue();y(0,"div",1)(1,"div",2)(2,"h5",3),M(3),v(),y(4,"button",4),A(5,"translate"),Z("click",function(){return Y(a),X(r.dismissModal())}),v()(),y(6,"div",5),q(7,"div",6,0),v(),y(9,"div",7)(10,"div",8)(11,"button",9),A(12,"translate"),Z("click",function(){return Y(a),X(r.dismissModal())}),M(13),A(14,"translate"),v()(),q(15,"div",10),y(16,"div",11),j(17,Ree,4,8,"button",12),y(18,"button",13),A(19,"translate"),A(20,"translate"),Z("click",function(){return Y(a),X(r.downloadLogFile())}),q(21,"i",14),v()()()()}i&2&&(m(3),se(r.plugin.displayName||r.plugin.name),m(),E("disabled",r.midAction),me("aria-label",V(5,11,"form.button_close")),m(7),E("disabled",r.midAction),me("aria-label",V(12,13,"form.button_close")),m(2),ie(" ",V(14,15,"form.button_close")," "),m(4),R(r.childBridges.length?17:-1),m(),E("ngbTooltip",V(19,17,"logs.title_download_log_file"))("openDelay",150)("disabled",r.midAction),me("aria-label",V(20,19,"logs.title_download_log_file")))},dependencies:[jr,Tt],encapsulation:2})}return e})();var IO=st(lc(),1);var b0=()=>({app:"Homebridge v2"});function Bee(e,n){e&1&&(y(0,"div",5),q(1,"i",12),v())}function Lee(e,n){e&1&&(y(0,"p",9),M(1,"All your plugins are marked as compatible with Homebridge v2."),v())}function zee(e,n){e&1&&(y(0,"p",9),M(1,"To ignore this warning and continue with the update, click continue below."),v())}function Uee(e,n){if(e&1&&(y(0,"p",9),M(1," Some of your plugins are not explicitly marked as compatible with Homebridge v2. This does "),y(2,"span",17),M(3,"not"),v(),M(4," necessarily mean that they won't work. We just can't guarantee that they will. "),v(),y(5,"p",9),M(6," For more information about this update, please see the "),y(7,"a",18),M(8,"wiki page"),v(),M(9,". "),v(),j(10,zee,2,0,"p",9)),e&2){let t=S(2);m(10),R(t.isUpdating?10:-1)}}function Hee(e,n){e&1&&(y(0,"div",19),M(1," Node.js Version"),q(2,"br"),y(3,"span",20),M(4),A(5,"translate"),v()(),y(6,"div",21),q(7,"i",22),v()),e&2&&(m(4),se(At(5,1,"status.readiness.node_yes",dt(4,b0))))}function Wee(e,n){e&1&&(y(0,"div",19),M(1," Node.js Version"),q(2,"br"),y(3,"span",20),M(4),A(5,"translate"),v(),q(6,"br"),y(7,"a",23),M(8),A(9,"translate"),q(10,"i",24),v()(),y(11,"div",21),q(12,"i",25),v()),e&2&&(m(4),se(At(5,2,"status.readiness.node_no",dt(7,b0))),m(4),ie(" ",V(9,5,"plugins.compat.node_link")," "))}function Gee(e,n){e&1&&q(0,"i",26)}function Kee(e,n){e&1&&q(0,"i",27)}function Jee(e,n){if(e&1&&(y(0,"li",16)(1,"div",19),M(2),v(),y(3,"div",21),j(4,Gee,1,0,"i",26),j(5,Kee,1,0,"i",27),v()()),e&2){let t=n.$implicit;m(2),se(t.displayName),m(2),R(t.hb2Ready==="supported"?4:-1),m(),R(t.hb2Ready==="unknown"?5:-1)}}function Yee(e,n){if(e&1&&(y(0,"div",13),q(1,"img",14),v(),j(2,Lee,2,0,"p",9),j(3,Uee,11,1),y(4,"ul",15)(5,"li",16),j(6,Hee,8,5)(7,Wee,13,8),v(),bn(8,Jee,6,3,"li",16,vn),v()),e&2){let t=S();m(2),R(t.allPluginsSupported?2:-1),m(),R(t.allPluginsSupported?-1:3),m(3),R(t.nodeReady?6:7),m(2),Cn(t.installedPlugins)}}function Xee(e,n){if(e&1){let t=ue();y(0,"button",28),A(1,"translate"),Z("click",function(){Y(t);let r=S();return X(r.closeModal("Dismiss"))}),M(2),A(3,"translate"),v()}e&2&&(me("aria-label",V(1,2,"form.button_close")),m(2),ie(" ",V(3,4,"form.button_close")," "))}function Zee(e,n){if(e&1){let t=ue();y(0,"button",28),A(1,"translate"),Z("click",function(){Y(t);let r=S();return X(r.closeModal("Dismiss"))}),M(2),A(3,"translate"),v()}e&2&&(me("aria-label",V(1,2,"form.button_close")),m(2),ie(" ",V(3,4,"form.button_close")," "))}function Qee(e,n){if(e&1){let t=ue();y(0,"button",29),Z("click",function(){Y(t);let r=S();return X(r.closeModal("update"))}),M(1),A(2,"translate"),v()}if(e&2){let t=S();E("disabled",t.loading),m(),ie(" ",V(2,2,"form.button_continue")," ")}}var SO=(()=>{class e{$activeModal=L(Et);$api=L(rt);$settings=L(Pt);$toastr=L(pt);$translate=L(ft);$ws=L(Br);io;isUpdating=!1;skipIfCompatible=!0;loading=!0;installedPlugins=[];allPluginsSupported=!0;nodeReady=!1;ngOnInit(){return pe(this,null,function*(){this.io=this.$ws.getExistingNamespace("status"),this.io.socket.connected&&(yield this.checkHomebridgeUiVersion()),yield this.loadInstalledPlugins(),this.loading=!1})}checkHomebridgeUiVersion(){return pe(this,null,function*(){try{let{nodeVersion:t}=yield je(this.io.request("get-homebridge-server-info"));this.nodeReady=(0,IO.satisfies)(t,">=20")}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}loadInstalledPlugins(){return pe(this,null,function*(){this.installedPlugins=[],this.loading=!0;let t=this.$settings.env.homebridgeVersion.split(".")[0];try{let i=yield je(this.$api.get("/plugins"));this.installedPlugins=i.filter(r=>r.name!=="homebridge-config-ui-x").map(r=>{let a=r.engines?.homebridge?.split("||").map(u=>u.trim())||[],l=t==="2"?"hide":a.some(u=>u.startsWith("^2")||u.startsWith(">=2"))?"supported":"unknown";return l==="unknown"&&(this.allPluginsSupported=!1),at(ye({},r),{hb2Ready:l})}).sort((r,a)=>r.name.localeCompare(a.name)),this.skipIfCompatible&&this.installedPlugins.length===0&&this.$activeModal.close("update")}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("plugins.toast_failed_to_load_plugins"),this.$translate.instant("toast.title_error"))}})}closeModal(t){this.$activeModal.close(t)}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ce({type:e,selectors:[["ng-component"]],inputs:{isUpdating:"isUpdating",skipIfCompatible:"skipIfCompatible"},decls:17,vars:12,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,"w-100","text-center","primary-text"],[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,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[1,"text-center","mb-3"],["ngSrc","assets/hb-icon.png","alt","","height","100","width","100",1,"plugin-icon-card"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"fw-bold"],["href","https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0","target","_blank"],[1,"text-start","flex-grow-1"],[1,"grey-text"],[1,"ms-3"],[1,"fas","fa-check-circle","green-text","fa-xl"],["href","https://github.com/homebridge/homebridge/wiki/How-To-Update-Node.js","target","_blank","rel","noopener noreferrer",1,"small"],[1,"fa","fa-fw","fa-external-link-alt"],[1,"fas","fa-exclamation-circle","orange-text","fa-xl"],["aria-label","The developer has specifically marked this plugin as compatible with Homebridge v2.",1,"fas","fa-check-circle","green-text","fa-xl"],["aria-label","The developer has not specifically marked this plugin as compatible with Homebridge v2, but it may still work.",1,"fas","fa-question-circle","orange-text","fa-xl"],["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(i,r){i&1&&(y(0,"div",0)(1,"div",1)(2,"h5",2),M(3),A(4,"translate"),v(),y(5,"button",3),A(6,"translate"),Z("click",function(){return r.closeModal("Dismiss")}),v()(),y(7,"div",4),j(8,Bee,2,0,"div",5)(9,Yee,10,3),v(),y(10,"div",6)(11,"div",7),j(12,Xee,4,6,"button",8),v(),y(13,"div",9),j(14,Zee,4,6,"button",8),v(),y(15,"div",10),j(16,Qee,3,4,"button",11),v()()()),i&2&&(m(3),se(At(4,6,"status.readiness.title",dt(11,b0))),m(2),me("aria-label",V(6,9,"form.button_close")),m(3),R(r.loading?8:9),m(4),R(r.isUpdating?12:-1),m(2),R(r.isUpdating?-1:14),m(2),R(r.isUpdating?16:-1))},dependencies:[v1,Tt],encapsulation:2})}return e})();var tte=(e,n)=>({iconStar:e,iconThumbsUp:n}),OO=(e,n,t,i)=>({"fa-arrow-alt-circle-down":e,"fa-code-compare":n,"fa-arrow-alt-circle-up":t,"fa-trash":i}),nte=()=>["homebridge","homebridge-config-ui-x"],ite=e=>({pluginName:e});function rte(e,n){e&1&&(y(0,"p",13),M(1),A(2,"translate"),v()),e&2&&(m(),se(V(2,1,"plugins.settings.restart_required")))}function ote(e,n){e&1&&(y(0,"p",13),M(1),A(2,"translate"),v()),e&2&&(m(),se(V(2,1,"restart.child_bridges")))}function ate(e,n){if(e&1&&(q(0,"p",12),A(1,"translate"),j(2,rte,3,3,"p",13),j(3,ote,3,3,"p",13)),e&2){let t=S(3);E("innerHTML",At(1,3,"plugins.manage.github_support",go(6,tte,t.iconStar,t.iconThumbsUp)),Ke),m(2),R(t.childBridges.length===0?2:-1),m(),R(t.childBridges.length>0?3:-1)}}function ste(e,n){if(e&1&&(y(0,"div",9),q(1,"i",10),v(),y(2,"h5",11),M(3),v(),j(4,ate,4,9)),e&2){let t=S(2);m(3),ec("",t.pastTenseVerb,": ",t.pluginDisplayName," (",t.targetVersionPretty,")"),m(),R(t.isDisabled?-1:4)}}function lte(e,n){if(e&1&&(y(0,"div",6),j(1,ste,5,4),v()),e&2){let t=S();m(),R(t.justUpdatedPlugin?1:-1)}}function ute(e,n){if(e&1&&(y(0,"div",7)(1,"div",9),q(2,"i",14),v(),y(3,"ul",15)(4,"li"),M(5),A(6,"translate"),v(),y(7,"li"),M(8),A(9,"translate"),v()(),y(10,"pre",16),M(11),v()()),e&2){let t=S();m(2),E("ngClass",aa(9,OO,t.action==="Install",t.action==="Update"&&t.installedVersion,t.action==="Update"&&!t.installedVersion,t.action==="Uninstall")),m(3),se(V(6,5,"plugins.manage.online_updates")),m(3),se(V(9,7,"plugins.manage.manual_update_command")),m(3),ho(`hb-service stop
41
- npm install -g `,t.pluginName,"@",t.targetVersion,`
42
- hb-service start`)}}function cte(e,n){if(e&1&&(y(0,"span"),M(1),v()),e&2){let t=S(3);m(),ie("v",t.installedVersion," \u2192 ")}}function dte(e,n){if(e&1&&(y(0,"h5",18),j(1,cte,2,1,"span"),M(2),v()),e&2){let t=S(2);m(),R(t.installedVersion?1:-1),m(),ie(" ",t.targetVersionPretty," ")}}function fte(e,n){e&1&&(y(0,"div",26),q(1,"i",27),v())}function pte(e,n){if(e&1&&q(0,"markdown",28),e&2){let t=S(4);E("data",t.versionNotes)}}function mte(e,n){e&1&&(y(0,"div",29),M(1),A(2,"translate"),v()),e&2&&(m(),se(V(2,1,"plugins.manage.notes_none")))}function hte(e,n){if(e&1&&(y(0,"div",29),M(1),A(2,"translate"),q(3,"br"),M(4),A(5,"translate"),q(6,"br"),M(7),A(8,"translate"),q(9,"br"),v()),e&2){let t=S(6);m(),ie(" ",At(2,3,"plugins.manage.notes_beta_1",xi(10,ite,t.pluginDisplayName))),m(3),ie(" ",V(5,6,"plugins.manage.notes_beta_2")),m(3),ie(" ",V(8,8,"plugins.manage.notes_beta_3"))}}function gte(e,n){e&1&&(y(0,"div",29),M(1),A(2,"translate"),v()),e&2&&(m(),se(V(2,1,"plugins.manage.notes_latest")))}function _te(e,n){if(e&1&&j(0,hte,10,12,"div",29)(1,gte,3,3,"div",29),e&2){let t=S(5);R(t.targetVersion.includes("beta")||t.targetVersion.includes("alpha")||t.targetVersion.includes("next")?0:1)}}function yte(e,n){if(e&1&&j(0,mte,3,3,"div",29)(1,_te,2,1),e&2){let t=S(4);R(t.versionNotesShow?0:1)}}function vte(e,n){if(e&1&&j(0,pte,1,1,"markdown",28)(1,yte,2,1),e&2){let t=S(3);R(t.versionNotes?0:1)}}function bte(e,n){if(e&1&&(y(0,"div",25),j(1,fte,2,0,"div",26)(2,vte,2,1),v()),e&2){let t=S(2);m(),R(t.action==="Update"&&!t.versionNotesLoaded?1:2)}}function Cte(e,n){e&1&&(y(0,"div",26),q(1,"i",27),v())}function xte(e,n){if(e&1&&q(0,"markdown",28),e&2){let t=S(4);E("data",t.fullChangelog)}}function wte(e,n){e&1&&(q(0,"div",31),A(1,"translate")),e&2&&E("innerHTML",V(1,1,"plugins.manage.changelog_none"),Ke)}function Ite(e,n){if(e&1&&j(0,xte,1,1,"markdown",28)(1,wte,2,3,"div",31),e&2){let t=S(3);R(t.fullChangelog?0:1)}}function Ste(e,n){if(e&1&&(y(0,"div",30),j(1,Cte,2,0,"div",26)(2,Ite,2,1),v()),e&2){let t=S(2);m(),R(t.action==="Update"&&!t.fullChangelogLoaded?1:2)}}function $te(e,n){if(e&1){let t=ue();y(0,"div",24)(1,"p",32)(2,"span",33),M(3),A(4,"translate"),v(),y(5,"a",34),Z("click",function(){Y(t);let r=S(2);return X(r.downloadBackupFile())}),q(6,"i",35),v()(),y(7,"p",36),M(8),A(9,"translate"),v()()}e&2&&(m(3),se(V(4,2,"plugins.manage.backup")),m(5),se(V(9,4,"plugins.manage.hb_restart")))}function Ete(e,n){if(e&1){let t=ue();y(0,"div",6)(1,"div",9),q(2,"i",17),v(),j(3,dte,3,2,"h5",18),y(4,"ul",19,0),ct("activeIdChange",function(r){Y(t);let a=S();return ut(a.releaseNotesTab,r)||(a.releaseNotesTab=r),X(r)}),y(6,"li",20)(7,"button",21),M(8),A(9,"translate"),v(),Me(10,bte,3,1,"ng-template",22),v(),y(11,"li",20)(12,"button",21),M(13),A(14,"translate"),v(),Me(15,Ste,3,1,"ng-template",22),v()(),q(16,"div",23),j(17,$te,10,6,"div",24),v()}if(e&2){let t=h1(5),i=S();m(2),E("ngClass",aa(13,OO,i.action==="Install"&&!i.installedVersion,i.action==="Install"&&i.installedVersion,i.action==="Update",i.action==="Uninstall")),m(),R(i.latestVersion?3:-1),m(),lt("activeId",i.releaseNotesTab),m(2),E("ngbNavItem",1),m(2),se(V(9,9,"plugins.manage.notes")),m(3),E("ngbNavItem",2),m(2),se(V(14,11,"plugins.manage.changelog")),m(3),E("ngbNavOutlet",t),m(),R(dt(18,nte).includes(i.pluginName)?17:-1)}}function Tte(e,n){if(e&1){let t=ue();y(0,"button",43),A(1,"translate"),Z("click",function(){Y(t);let r=S(2);return X(r.dismissModal())}),M(2),A(3,"translate"),v()}e&2&&(me("aria-label",V(1,2,"form.button_close")),m(2),ie(" ",V(3,4,"form.button_close")," "))}function Pte(e,n){if(e&1){let t=ue();y(0,"button",43),A(1,"translate"),Z("click",function(){Y(t);let r=S(2);return X(r.dismissModal())}),M(2),A(3,"translate"),v()}e&2&&(me("aria-label",V(1,2,"form.button_close")),m(2),ie(" ",V(3,4,"form.button_close")," "))}function Ote(e,n){if(e&1){let t=ue();y(0,"button",44),Z("click",function(){Y(t);let r=S(2);return X(r.update())}),M(1),A(2,"translate"),v()}e&2&&(m(),se(V(2,1,"form.button_continue")))}function Mte(e,n){if(e&1){let t=ue();y(0,"button",44),Z("click",function(){Y(t);let r=S(2);return X(r.childBridges.length>0?r.onRestartChildBridgeClick():r.onRestartHomebridgeClick())}),M(1),A(2,"translate"),v()}e&2&&(m(),ie(" ",V(2,1,"menu.tooltip_restart")," "))}function kte(e,n){if(e&1){let t=ue();y(0,"button",45),Z("click",function(){Y(t);let r=S(2);return X(r.downloadLogFile())}),M(1),A(2,"translate"),v()}e&2&&(m(),se(V(2,1,"form.button_download")))}function Ate(e,n){if(e&1&&(y(0,"div",8)(1,"div",37),j(2,Tte,4,6,"button",38),v(),y(3,"div",39),j(4,Pte,4,6,"button",38),v(),y(5,"div",40),j(6,Ote,3,3,"button",41),j(7,Mte,3,3,"button",41),j(8,kte,3,3,"button",42),v()()),e&2){let t=S();m(2),R(!t.justUpdatedPlugin&&t.onlineUpdateOk||t.justUpdatedPlugin&&(!t.isDisabled||t.actionFailed)?2:-1),m(2),R(t.justUpdatedPlugin&&t.isDisabled&&!t.actionFailed||!t.onlineUpdateOk?4:-1),m(2),R(t.onlineUpdateOk&&t.releaseNotesShow?6:-1),m(),R(t.justUpdatedPlugin&&!t.isDisabled?7:-1),m(),R(t.actionFailed?8:-1)}}var Za=(()=>{class e{$activeModal=L(Et);$api=L(rt);$backup=L(W1);$modal=L(en);$router=L(Ri);$settings=L(Pt);$toastr=L(pt);$translate=L(ft);$ws=L(Br);io;toastSuccess;term=new TO.Terminal;termTarget;fitAddon=new $O.FitAddon;webLinksAddon=new EO.WebLinksAddon;errorLog="";pluginName;pluginDisplayName;targetVersion;latestVersion;installedVersion;isDisabled;action;targetVersionPretty="";actionComplete=!1;actionFailed=!1;justUpdatedPlugin=!1;updateToBeta=!1;childBridges=[];presentTenseVerb;pastTenseVerb;onlineUpdateOk;iconStar='<i class="fas fa-fw fa-star primary-text"></i>';iconThumbsUp='<i class="fas fa-fw fa-thumbs-up primary-text"></i>';versionNotes;versionNotesLoaded=!1;versionNotesShow=!1;fullChangelog;fullChangelogLoaded=!1;releaseNotesShow=!1;releaseNotesTab=1;constructor(){this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}ngOnInit(){switch(this.targetVersionPretty=this.targetVersion==="latest"?`v${this.latestVersion}`:/^\d/.test(this.targetVersion)?`v${this.targetVersion}`:this.targetVersion,this.io=this.$ws.connectToNamespace("plugins"),this.termTarget=document.getElementById("plugin-log-output"),this.term.open(this.termTarget),this.fitAddon.fit(),this.io.socket.on("stdout",t=>{this.term.write(t);let i=t.toString().replace(/\x1B\[(\d{1,3}(;\d{1,2})?)?[mGK]/g,"").trimEnd();i&&(this.errorLog+=`${i}\r
43
- `)}),this.toastSuccess=this.$translate.instant("toast.title_success"),this.onlineUpdateOk=!(["homebridge","homebridge-config-ui-x"].includes(this.pluginName)&&this.$settings.env.platform==="win32"),this.action){case"Install":this.install(),this.presentTenseVerb=this.$translate.instant("plugins.manage.install"),this.pastTenseVerb=this.$translate.instant("plugins.manage.installed");break;case"Uninstall":this.uninstall(),this.presentTenseVerb=this.$translate.instant("plugins.manage.uninstall"),this.pastTenseVerb=this.$translate.instant("plugins.manage.uninstalled");break;case"Update":switch(this.targetVersion){case"latest":this.updateToBeta=!1;break;case"alpha":case"beta":case"test":this.updateToBeta=!0;break}this.presentTenseVerb=this.$translate.instant("plugins.manage.update"),this.pastTenseVerb=this.$translate.instant("plugins.manage.updated"),this.getVersionNotes();break}}update(){if(this.releaseNotesShow=!1,this.versionNotes="",this.fullChangelog="",!!this.onlineUpdateOk){if(this.pluginName==="homebridge")return this.upgradeHomebridge();this.io.request("update",{name:this.pluginName,version:this.targetVersion,termCols:this.term.cols,termRows:this.term.rows}).subscribe({next:()=>pe(this,null,function*(){if(this.pluginName==="homebridge-config-ui-x"){this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>{window.location.href="/restart"},error:t=>{console.error(t),window.location.href="/restart"}});return}try{yield this.getChildBridges()}catch(t){console.error(t)}this.actionComplete=!0,this.justUpdatedPlugin=!0,this.$router.navigate(["/plugins"])}),error:t=>{this.actionFailed=!0,console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}}onRestartHomebridgeClick(){this.$router.navigate(["/restart"]),this.$activeModal.close()}onRestartChildBridgeClick(){return pe(this,null,function*(){try{for(let i of this.childBridges)yield je(this.$api.put(`/server/restart/${i.username}`,{}));let t=this.$modal.open(wO,{size:"xl",backdrop:"static"});t.componentInstance.plugin={name:this.pluginName,displayName:this.pluginDisplayName},t.componentInstance.childBridges=this.childBridges}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("plugins.manage.child_bridge_restart_failed"),this.$translate.instant("toast.title_error"))}finally{this.$activeModal.close()}})}downloadLogFile(){let t=new Blob([this.errorLog],{type:"text/plain;charset=utf-8"});(0,PO.saveAs)(t,`${this.pluginName}-error.log`)}downloadBackupFile(){return pe(this,null,function*(){try{yield this.$backup.downloadBackup()}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end()}dismissModal(){this.$activeModal.dismiss("Dismiss")}install(){if(this.onlineUpdateOk){if(this.pluginName==="homebridge")return this.upgradeHomebridge();this.io.request("install",{name:this.pluginName,version:this.targetVersion,termCols:this.term.cols,termRows:this.term.rows}).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(`${this.pastTenseVerb} ${this.pluginName}`,this.toastSuccess),window.location.href=`/plugins?action=just-installed&plugin=${this.pluginName}`},error:t=>{this.actionFailed=!0,console.error(t),this.$router.navigate(["/plugins"]),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}}uninstall(){this.io.request("uninstall",{name:this.pluginName,termCols:this.term.cols,termRows:this.term.rows}).subscribe({next:()=>{this.$activeModal.close(),this.$router.navigate(["/plugins"]),this.$modal.open(Bi,{size:"lg",backdrop:"static"})},error:t=>{this.actionFailed=!0,console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}upgradeHomebridge(){return pe(this,null,function*(){let t="update";if(Number(this.installedVersion.split(".")[0])<2&&["2","alpha","beta"].includes(this.targetVersion.split(".")[0])){let i=this.$modal.open(SO,{size:"lg",backdrop:"static"});i.componentInstance.isUpdating=!0,t=yield i.result}t==="update"?this.io.request("homebridge-update",{version:this.targetVersion,termCols:this.term.cols,termRows:this.term.rows}).subscribe({next:()=>{this.$activeModal.close(),this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>{this.$router.navigate(["/restart"])},error:i=>{console.error(i),this.$router.navigate(["/restart"])}})},error:i=>{this.actionFailed=!0,console.error(i),this.$toastr.error(i.message,this.$translate.instant("toast.title_error")),this.$activeModal.close()}}):this.$activeModal.close()})}getVersionNotes(){return pe(this,null,function*(){this.releaseNotesShow=!0;try{let t=yield je(this.$api.get(`/plugins/release/${encodeURIComponent(this.pluginName)}`));this.fullChangelog=t.changelog,t.latestVersion&&(this.latestVersion=t.latestVersion),this.targetVersion==="latest"||this.targetVersion===this.latestVersion?(this.versionNotesShow=!0,t.notes&&(this.versionNotes=t.notes)):(this.versionNotesShow=!1,this.versionNotesLoaded=!0)}catch(t){console.error("Error loading release notes:",t)}this.fullChangelogLoaded=!0,this.versionNotesLoaded=!0})}getChildBridges(){return pe(this,null,function*(){(yield je(this.$api.get("/status/homebridge/child-bridges"))).forEach(i=>{this.pluginName===i.plugin&&this.childBridges.push(i)})})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ce({type:e,selectors:[["ng-component"]],inputs:{pluginName:"pluginName",pluginDisplayName:"pluginDisplayName",targetVersion:"targetVersion",latestVersion:"latestVersion",installedVersion:"installedVersion",isDisabled:"isDisabled",action:"action"},decls:11,vars:9,consts:[["nav","ngbNav"],[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],["id","plugin-log-output",1,"modal-body",3,"hidden"],[1,"modal-body","plugin-modal-body"],[1,"modal-body"],[1,"modal-footer","justify-content-between"],[1,"mb-3","text-center"],[1,"far","fa-fw","fa-check-circle","primary-text",2,"font-size","75px"],[1,"text-center","mb-3"],[1,"mb-3","text-center","grey-text",3,"innerHTML"],[1,"text-center","mb-0"],[1,"fas","fa-fw","primary-text",2,"font-size","75px",3,"ngClass"],[1,"mb-3"],[1,"p-2","mb-0"],[1,"far","fa-fw","primary-text",2,"font-size","75px",3,"ngClass"],[1,"mb-4","text-center"],["ngbNav","",1,"nav-tabs","px-0",3,"activeIdChange","activeId"],[1,"w-50","m-0",3,"ngbNavItem"],["ngbNavLink","",1,"w-100","release-tab"],["ngbNavContent",""],[1,"mt-2",3,"ngbNavOutlet"],[1,"mt-4","mb-0"],[1,"alert","release-notes","p-3","pb-1","my-0"],[1,"w-100","text-center","primary-text","mt-3","mb-4"],[1,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[1,"plugin-md",3,"data"],[1,"w-100","text-center","grey-text","mt-3","mb-4"],[1,"alert","release-notes","p-3","pb-1","my-0",2,"border-top-left-radius","0","border-top-right-radius","0"],[1,"w-100","text-center","grey-text","mt-3","mb-4",3,"innerHTML"],[1,"w-100","text-center","mb-1","small"],[1,"grey-text"],["href","javascript:void(0)",3,"click"],[1,"fa","fa-fw","fa-download","mx-1"],[1,"w-100","text-center","mb-0","small","grey-text"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button",1,"btn","btn-primary"],[1,"btn","btn-primary"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button",1,"btn","btn-primary",3,"click"],[1,"btn","btn-primary",3,"click"]],template:function(i,r){i&1&&(y(0,"div",1)(1,"div",2)(2,"h5",3),M(3),v(),y(4,"button",4),A(5,"translate"),Z("click",function(){return r.dismissModal()}),v()(),q(6,"div",5),j(7,lte,2,1,"div",6),j(8,ute,12,14,"div",7),j(9,Ete,18,19,"div",6),j(10,Ate,9,5,"div",8),v()),i&2&&(m(3),se(r.pluginDisplayName),m(),me("aria-label",V(5,7,"form.button_close")),m(2),E("hidden",!r.onlineUpdateOk||r.actionComplete||r.releaseNotesShow),m(),R(r.actionComplete?7:-1),m(),R(r.onlineUpdateOk?-1:8),m(),R(r.releaseNotesShow&&!r.actionComplete&&r.onlineUpdateOk?9:-1),m(),R(!r.onlineUpdateOk||r.actionComplete||r.releaseNotesShow||r.actionFailed?10:-1))},dependencies:[cc,uc,dc,si,N1,A1,k1,M1,D1,Tt],styles:[".plugin-modal-body[_ngcontent-%COMP%] .release-notes[_ngcontent-%COMP%]{box-shadow:none;max-height:39vh;overflow:auto;border:0;border-top-left-radius:0;border-top-right-radius:0}.plugin-modal-body[_ngcontent-%COMP%] .release-tab[_ngcontent-%COMP%]{font-size:1rem;color:#d3d3d3}.plugin-modal-body[_ngcontent-%COMP%] .tab-content[_ngcontent-%COMP%]{border-radius:0 0 20px 20px} .nav-tabs{--bs-nav-tabs-border-width: 0} .plugin-md{text-align:left;font-size:.85rem;word-wrap:break-word} .plugin-md img{max-width:100%} .plugin-md h1{font-size:1.3rem;font-weight:300} .plugin-md h2{font-size:1.2rem;font-weight:300} .plugin-md h3{font-size:1.1rem;font-weight:300} .plugin-md h4{font-size:1rem;font-weight:300} .plugin-md h5{font-size:.9rem;font-weight:300} .plugin-md pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f6f8fa;border-radius:3px}"]})}return e})();var MO=st(lc(),1);var Dte=()=>["homebridge","homebridge-config-ui-x"];function Nte(e,n){e&1&&(y(0,"div",5),q(1,"i",12),v())}function Fte(e,n){if(e&1&&(q(0,"i",20),y(1,"h6",21),M(2),A(3,"translate"),v(),y(4,"p",21),M(5),A(6,"translate"),y(7,"span",22),M(8),v()()),e&2){let t=S(2);m(2),se(V(3,3,"plugins.manage.select_version")),m(3),ie(" ",V(6,5,"plugins.status_installed"),": "),m(3),ie("v",t.plugin.installedVersion)}}function qte(e,n){e&1&&(q(0,"i",23),y(1,"h6",21),M(2),A(3,"translate"),v()),e&2&&(m(2),se(V(3,1,"plugins.manage.select_version")))}function Vte(e,n){e&1&&q(0,"i",26)}function jte(e,n){e&1&&q(0,"i",27)}function Rte(e,n){if(e&1){let t=ue();y(0,"li",14)(1,"span",8),M(2),q(3,"br"),y(4,"small",24),M(5),v()(),y(6,"button",25),Z("click",function(){let r=Y(t).$implicit,a=S(2);return X(a.doInstall(r.version))}),j(7,Vte,1,0,"i",26)(8,jte,1,0,"i",27),v()()}if(e&2){let t=n.$implicit,i=S(2);m(2),ie(" ",t.tag," "),m(3),ie("v",t.version),m(2),R(i.plugin.installedVersion===t.version?7:8)}}function Bte(e,n){e&1&&M(0," \u2713 ")}function Lte(e,n){if(e&1&&(y(0,"option",17),M(1),j(2,Bte,1,0),v()),e&2){let t=n.$implicit,i=S(2);E("value",t.version)("selected",i.versionSelect==t.version),m(),ie(" v",t.version," "),m(),R(t.version==i.plugin.installedVersion?2:-1)}}function zte(e,n){e&1&&q(0,"i",26)}function Ute(e,n){e&1&&q(0,"i",27)}function Hte(e,n){if(e&1){let t=ue();y(0,"button",25),Z("click",function(){Y(t);let r=S(2);return X(r.doInstall(r.versionSelect))}),j(1,zte,1,0,"i",26)(2,Ute,1,0,"i",27),v()}if(e&2){let t=S(2);m(),R(t.plugin.installedVersion===t.versionSelect?1:2)}}function Wte(e,n){if(e&1&&(y(0,"ul",19)(1,"li",28)(2,"div",8),M(3),A(4,"translate"),q(5,"br"),y(6,"span",29),M(7),A(8,"translate"),v()(),y(9,"div",30),q(10,"input",31),A(11,"translate"),q(12,"label",32),v()()()),e&2){let t=S(2);m(3),ie(" ",V(4,4,"plugins.manage.hide_updates")),m(4),se(V(8,6,"plugins.manage.hide_updates_desc")),m(3),E("formControl",t.hideUpdatesFormControl),me("aria-label",V(11,8,"plugins.manage.hide_updates"))}}function Gte(e,n){if(e&1){let t=ue();y(0,"div",6),j(1,Fte,9,7)(2,qte,4,3),y(3,"ul",13),bn(4,Rte,9,3,"li",14,vn),y(6,"li",14)(7,"div",15),M(8),A(9,"translate"),q(10,"br"),y(11,"select",16),ct("ngModelChange",function(r){Y(t);let a=S();return ut(a.versionSelect,r)||(a.versionSelect=r),X(r)}),bn(12,Lte,3,4,"option",17,vn),v()(),j(14,Hte,3,1,"button",18),v()(),j(15,Wte,13,10,"ul",19),v()}if(e&2){let t=S();m(),R(t.plugin.installedVersion?1:2),m(3),Cn(t.versionsWithTags),m(4),ie(" ",V(9,5,"plugins.manage.all_versions")," "),m(3),lt("ngModel",t.versionSelect),m(),Cn(t.versions),m(2),R(t.versionSelect?14:-1),m(),R(t.plugin.installedVersion&&!dt(7,Dte).includes(t.plugin.name)?15:-1)}}var kO=(()=>{class e{$activeModal=L(Et);$api=L(rt);$settings=L(Pt);$toastr=L(pt);$translate=L(ft);plugin;isUpdateHidden=!1;hideUpdatesFormControl=new S1(!1);loading=!0;versions=[];versionsWithTags=[];versionSelect;ngOnInit(){this.versionSelect=this.plugin.installedVersion||this.plugin.latestVersion,this.lookupVersions(),this.isUpdateHidden=this.$settings.env.plugins.hideUpdatesFor&&this.$settings.env.plugins.hideUpdatesFor.includes(this.plugin.name),this.hideUpdatesFormControl.patchValue(this.isUpdateHidden),this.hideUpdatesFormControl.valueChanges.pipe(na(750)).subscribe(t=>this.toggleHideUpdates(t))}doInstall(t){this.$activeModal.close({name:this.plugin.name,version:t,engines:this.versions.find(i=>i.version===t).engines,action:this.plugin.installedVersion?"alternate":"install"})}toggleHideUpdates(t){return pe(this,null,function*(){let i=this.$settings.env.plugins?.hideUpdatesFor||[];t?i.includes(this.plugin.name)||(i=[...i,this.plugin.name].sort((r,a)=>r.localeCompare(a))):i=i.filter(r=>r!==this.plugin.name);try{yield je(this.$api.put("/config-editor/ui/plugins/hide-updates-for",{body:i})),this.$settings.setEnvItem("plugins.hideUpdatesFor",i),window.location.href=`/plugins?action=open-manage-version&plugin=${this.plugin.name}`}catch(r){this.hideUpdatesFormControl.patchValue(this.isUpdateHidden,{emitEvent:!1}),console.error(r),this.$toastr.error(r.message,this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}lookupVersions(){this.$api.get(`/plugins/lookup/${encodeURIComponent(this.plugin.name)}/versions`).subscribe({next:t=>{for(let[i,r]of Object.entries(t.versions))this.versions.push({version:i,engines:r.engines||null}),Object.keys(t.tags).filter(a=>t.tags[a]===i).forEach(a=>{this.versionsWithTags.push({version:i,tag:a})});this.plugin.installedVersion&&!this.versions.find(i=>i.version===this.plugin.installedVersion)&&this.versions.push({version:this.plugin.installedVersion,engines:this.plugin.engines||null}),this.versions.sort((i,r)=>(0,MO.rcompare)(i.version,r.version)),this.versionsWithTags.sort((i,r)=>{let a=["latest","next","beta","alpha"],l=a.includes(i.tag)?a.indexOf(i.tag):999,u=a.includes(r.tag)?a.indexOf(r.tag):999;return l-u}),!this.versions.find(i=>i.version===this.versionSelect)&&t.tags.latest&&(this.versionSelect=t.tags.latest),this.loading=!1},error:t=>{console.error(t),this.$toastr.error(t.error?.message||t.message,this.$translate.instant("toast.title_error")),this.$activeModal.dismiss()}})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ce({type:e,selectors:[["ng-component"]],inputs:{plugin:"plugin"},decls:17,vars:11,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","d-flex","flex-row","flex-grow-1","w-100"],[1,"w-100","text-center","primary-text"],[1,"w-100","text-center"],[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"],[1,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"text-start",2,"min-width","50%"],[1,"custom-select","w-100",2,"font-size","0.875rem",3,"ngModelChange","ngModel"],[3,"value","selected"],[1,"btn","btn-primary","m-0","ms-3"],[1,"list-group","list-group-box","mt-3","mb-0"],[1,"fas","fa-fw","fa-code-compare","primary-text","mb-3",2,"font-size","75px"],[1,"mb-3"],[1,"font-monospace"],[1,"far","fa-fw","fa-arrow-alt-circle-down","primary-text","mb-3",2,"font-size","75px"],[1,"grey-text","font-monospace"],[1,"btn","btn-primary","m-0","ms-3",3,"click"],[1,"fas","fa-fw","fa-rotate-right"],[1,"fas","fa-fw","fa-arrow-alt-circle-down"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"grey-text","small"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","id","hidePluginUpdates",1,"rendux-input",3,"formControl"],["for","hidePluginUpdates",1,"rendux-label","ms-3"]],template:function(i,r){i&1&&(y(0,"div",0)(1,"div",1)(2,"h5",2),M(3),v(),y(4,"button",3),A(5,"translate"),Z("click",function(){return r.dismissModal()}),v()(),y(6,"div",4),j(7,Nte,2,0,"div",5)(8,Gte,16,8,"div",6),v(),y(9,"div",7),q(10,"div",8),y(11,"div",9)(12,"button",10),A(13,"translate"),Z("click",function(){return r.dismissModal()}),M(14),A(15,"translate"),v()(),q(16,"div",11),v()()),i&2&&(m(3),se(r.plugin.displayName||r.plugin.name),m(),me("aria-label",V(5,5,"form.button_close")),m(3),R(r.loading?7:8),m(5),me("aria-label",V(13,7,"form.button_close")),m(2),ie(" ",V(15,9,"form.button_close")," "))},dependencies:[Ii,vo,bo,qr,sa,In,wi,Ss,Vr,Tt],encapsulation:2})}return e})();var AO=st(jq(),1);function Kte(e,n){e&1&&(y(0,"div",5),q(1,"i",14),v())}function Jte(e,n){e&1&&(y(0,"div",6),M(1),A(2,"translate"),A(3,"translate"),v()),e&2&&(m(),ho(" ",V(2,2,"plugins.settings.message_manual_config_required")," ",V(3,4,"plugins.settings.message_consult_documentation")," "))}function Yte(e,n){if(e&1){let t=ue();y(0,"button",25),A(1,"translate"),Z("click",function(){Y(t);let r=S(2).$index,a=S(2);return X(a.removeBlock(r))}),q(2,"i",26),v()}e&2&&E("ngbTooltip",V(1,2,"form.button_delete"))("openDelay",150)}function Xte(e,n){if(e&1&&j(0,Yte,3,4,"button",24),e&2){let t=S(3);R(!(t.schema!=null&&t.schema.singular)||t.pluginConfig.length>1?0:-1)}}function Zte(e,n){if(e&1){let t=ue();y(0,"div",15)(1,"div",16)(2,"div",17)(3,"h5",18),M(4),v(),y(5,"div"),j(6,Xte,1,1),y(7,"button",19),A(8,"translate"),Z("click",function(){let r=Y(t).$index,a=S(2);return X(a.editBlock(r))}),q(9,"i",20),v()()()(),y(10,"div",21)(11,"div",22)(12,"ngx-monaco-editor",23),ct("ngModelChange",function(r){Y(t);let a=S(2);return ut(a.currentBlock,r)||(a.currentBlock=r),X(r)}),Z("onInit",function(r){Y(t);let a=S(2);return X(a.onEditorInit(r))}),v()()()()}if(e&2){let t=n.$implicit,i=n.$index,r=S(2);E("ngbAccordionItem","configBlock."+i)("collapsed",r.show!=="configBlock."+i)("id","configBlock."+i),m(4),se(t.name||r.pluginAlias),m(2),R(r.show==="configBlock."+i?6:-1),m(),E("ngbTooltip",V(8,9,"form.button_edit"))("openDelay",150),m(5),E("options",r.editorOptions),lt("ngModel",r.currentBlock)}}function Qte(e,n){if(e&1&&(y(0,"div",7),bn(1,Zte,13,11,"div",15,vn),v()),e&2){let t=S();E("closeOthers",!0),m(),Cn(t.pluginConfig)}}function ene(e,n){if(e&1){let t=ue();y(0,"button",30),Z("click",function(){Y(t);let r=S(2);return X(r.addBlock())}),q(1,"i",31),v()}}function tne(e,n){e&1&&(M(0),A(1,"translate")),e&2&&ie(" ",V(1,1,"form.button_save")," ")}function nne(e,n){e&1&&q(0,"i",29)}function ine(e,n){if(e&1){let t=ue();j(0,ene,2,0,"button",27),y(1,"button",28),Z("click",function(){Y(t);let r=S();return X(r.save())}),j(2,tne,2,3),j(3,nne,1,0,"i",29),v()}if(e&2){let t=S();R(t.schema!=null&&t.schema.singular?-1:0),m(),E("disabled",t.saveInProgress),m(),R(t.saveInProgress?-1:2),m(),R(t.saveInProgress?3:-1)}}function rne(e,n){if(e&1){let t=ue();y(0,"button",32),Z("click",function(){Y(t);let r=S();return X(r.openFullConfigEditor())}),M(1),A(2,"translate"),v()}e&2&&(m(),ie(" ",V(2,1,"plugins.settings.label_open_config_editor")," "))}var C0=(()=>{class e{$activeModal=L(Et);$api=L(rt);$md=L(B1);$modal=L(en);$plugin=L(no);$router=L(Ri);$settings=L(Pt);$toastr=L(pt);$translate=L(ft);plugin;schema;pluginAlias;pluginType;loading=!0;canConfigure=!1;show="";pluginConfig;currentBlock;currentBlockIndex=null;saveInProgress=!1;childBridges=[];isFirstSave=!1;monacoEditor;editorOptions;get arrayKey(){return this.pluginType==="accessory"?"accessories":"platforms"}ngOnInit(){this.editorOptions={language:"json",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",automaticLayout:!0},this.$md.detect.mobile()?(this.loading=!1,this.canConfigure=!1):this.loadPluginAlias()}onEditorInit(t){return pe(this,null,function*(){window.editor=t,this.monacoEditor=t,yield this.monacoEditor.getModel().setValue(this.currentBlock),yield this.monacoEditor.getAction("editor.action.formatDocument").run()})}addBlock(){if(!this.saveCurrentBlock()){this.$toastr.error(this.$translate.instant("plugins.config.please_fix"),this.$translate.instant("toast.title_error"));return}this.pluginConfig.push({[this.pluginType]:this.pluginAlias,name:this.pluginAlias}),this.editBlock(this.pluginConfig.length-1)}editBlock(t){this.saveCurrentBlock()&&(this.show=`configBlock.${t}`,this.currentBlockIndex=t,this.currentBlock=JSON.stringify(this.pluginConfig[this.currentBlockIndex],null,4))}removeBlock(t){let i=this.pluginConfig[t],r=this.pluginConfig.findIndex(a=>a===i);r>-1&&this.pluginConfig.splice(r,1),this.currentBlockIndex=null,this.currentBlock=void 0,this.show=""}save(){return pe(this,null,function*(){if(this.saveInProgress=!0,!this.saveCurrentBlock()){this.saveInProgress=!1;return}try{let t=yield je(this.$api.post(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`,this.pluginConfig));if(this.$activeModal.close(),this.isFirstSave&&this.$settings.env.recommendChildBridges&&t[0]?.platform){this.$activeModal.close(),this.$plugin.bridgeSettings(this.plugin,!0);return}if(!["homebridge","homebridge-config-ui-x"].includes(this.plugin.name)&&(yield this.getChildBridges(),this.childBridges.length>0)){this.$activeModal.close();let i=this.$modal.open(ua,{size:"lg",backdrop:"static"});i.componentInstance.bridges=this.childBridges.map(r=>({name:r.name,username:r.username}));return}this.$activeModal.close(),this.$modal.open(Bi,{size:"lg",backdrop:"static"})}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error")),this.saveInProgress=!1}})}openFullConfigEditor(){this.$router.navigate(["/config"]),this.$activeModal.close()}closeModal(){this.$activeModal.close()}loadPluginAlias(){this.$api.get(`/plugins/alias/${encodeURIComponent(this.plugin.name)}`).subscribe({next:t=>{t.pluginAlias&&t.pluginType?(this.pluginAlias=t.pluginAlias,this.pluginType=t.pluginType,this.loadHomebridgeConfig()):this.loading=!1},error:()=>{this.loading=!1}})}loadHomebridgeConfig(){this.$api.get(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`).subscribe(t=>{this.pluginConfig=t,this.canConfigure=!0,this.loading=!1,this.pluginConfig.length?this.editBlock(0):(this.isFirstSave=!0,this.addBlock())})}saveCurrentBlock(){if(this.currentBlockIndex!==null&&this.monacoEditor){let t=this.monacoEditor.getModel().getValue().trim(),i;t.charAt(0)==='"'&&t.charAt(t.length-1)==="]"&&(t=`{${t}}`);try{i=AO.default.parse(t)}catch(a){return console.error(a),this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error")),!1}if(Array.isArray(i)||typeof i!="object")return this.$toastr.error(this.$translate.instant("plugins.config.must_be_object"),this.$translate.instant("toast.title_error")),!1;if(!i[this.pluginType]&&Array.isArray(i[this.arrayKey])&&i[this.arrayKey].length&&Object.keys(i).length===1&&(i=i[this.arrayKey][0]),this.pluginType==="accessory"&&(!i.name||typeof i.name!="string"))return this.$toastr.error(this.$translate.instant("plugins.config.name_property"),this.$translate.instant("toast.title_error")),i.name="",this.monacoEditor.getModel().setValue(JSON.stringify(i,null,4)),!1;let r=this.pluginConfig[this.currentBlockIndex];Object.keys(r).forEach(a=>delete r[a]),Object.assign(r,i),r[this.pluginType]=this.pluginAlias}return!0}getChildBridges(){return pe(this,null,function*(){try{(yield je(this.$api.get("/status/homebridge/child-bridges"))).forEach(i=>{this.plugin.name===i.plugin&&this.childBridges.push(i)})}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error")),this.childBridges=[]}})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ce({type:e,selectors:[["ng-component"]],inputs:{plugin:"plugin",schema:"schema"},decls:19,vars:14,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body","pb-0"],[1,"text-center","primary-text"],[1,"alert","alert-warning","mb-0"],["ngbAccordion","",3,"closeOthers"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-center"],[1,"text-end"],[1,"btn","btn-primary"],[1,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[1,"card",3,"ngbAccordionItem","collapsed","id"],["ngbAccordionHeader","",1,"card-header"],[1,"d-flex","align-items-center","justify-content-between"],[1,"m-0"],["ngbAccordionToggle","","container","modal","triggers","hover",1,"btn","btn-primary","m-0","ms-2",3,"click","ngbTooltip","openDelay"],[1,"fa","fa-fw","fa-edit"],["ngbAccordionCollapse",""],["ngbAccordionBody","",1,"card-body","p-0",2,"height","400px"],[1,"flex-grow-1","h-100","w-100","mb-0","pb-0",3,"ngModelChange","onInit","options","ngModel"],["container","modal","triggers","hover",1,"btn","btn-danger","m-0","ms-3",3,"ngbTooltip","openDelay"],["container","modal","triggers","hover",1,"btn","btn-danger","m-0","ms-3",3,"click","ngbTooltip","openDelay"],[1,"fa","fa-fw","fa-trash"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant","me-2"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant","me-2",3,"click"],[1,"fa","fa-fw","fa-plus"],[1,"btn","btn-primary",3,"click"]],template:function(i,r){i&1&&(y(0,"div",0)(1,"div",1)(2,"h5",2),M(3),v(),y(4,"button",3),A(5,"translate"),Z("click",function(){return r.closeModal()}),v()(),y(6,"div",4),j(7,Kte,2,0,"div",5),j(8,Jte,4,6,"div",6),j(9,Qte,3,1,"div",7),v(),y(10,"div",8)(11,"div",9)(12,"button",10),Z("click",function(){return r.closeModal()}),M(13),A(14,"translate"),v()(),q(15,"div",11),y(16,"div",12),j(17,ine,4,4),j(18,rne,3,3,"button",13),v()()()),i&2&&(m(3),se(r.plugin.displayName||r.plugin.name),m(),E("disabled",r.saveInProgress),me("aria-label",V(5,10,"form.button_close")),m(3),R(r.loading?7:-1),m(),R(!r.loading&&!r.canConfigure?8:-1),m(),R(!r.loading&&r.canConfigure?9:-1),m(3),E("disabled",r.saveInProgress),m(),ie(" ",V(14,12,"form.button_close")," "),m(4),R(r.canConfigure?17:-1),m(),R(r.canConfigure?-1:18))},dependencies:[sc,ac,oc,jr,ic,nc,F1,Ii,In,wi,rc,Tt],styles:[".no-padding-card-body .card-body{padding:0!important} body.dark-mode .no-padding-card-body .card-body{background-color:#1e1e1e}.manage-plugin-config-external-icons[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:700;line-height:1;color:#000;opacity:.5;background-color:transparent;border:0}"]})}return e})();var DO=e=>({link:e}),one=(e,n)=>({"green-text":e,"grey-text":n});function ane(e,n){if(e&1){let t=ue();y(0,"button",13),A(1,"translate"),Z("click",function(){Y(t);let r=S();return X(r.closeModal())}),v()}if(e&2){let t=S();E("disabled",t.saveInProgress),me("aria-label",V(1,2,"form.button_close"))}}function sne(e,n){e&1&&(y(0,"div",5),q(1,"i",14),v())}function lne(e,n){e&1&&(y(0,"li"),M(1),A(2,"translate"),v()),e&2&&(m(),se(V(2,1,"child_bridge.bridges_paired_2")))}function une(e,n){e&1&&(y(0,"li"),M(1),A(2,"translate"),v()),e&2&&(m(),ie("",V(2,1,"child_bridge.select_type"),":"))}function cne(e,n){if(e&1&&(y(0,"li"),M(1),A(2,"translate"),v(),j(3,lne,3,3,"li"),j(4,une,3,3,"li")),e&2){let t=S(2);m(),se(V(2,3,"child_bridge.bridges_paired")),m(2),R(t.configBlocks.length===1&&!t.deviceInfo[t.configBlocks[0]._bridge==null?null:t.configBlocks[0]._bridge.username]&&t.originalBridges.length===0?3:-1),m(),R(t.canConfigure?4:-1)}}function dne(e,n){if(e&1&&(y(0,"option",29),M(1),v()),e&2){let t=n.$implicit,i=n.$index;E("value",i),m(),se(t.name||t.platform||t.accessory)}}function fne(e,n){if(e&1){let t=ue();y(0,"li",25),M(1),A(2,"translate"),v(),y(3,"li",23)(4,"label",26),M(5),A(6,"translate"),v(),y(7,"div",27)(8,"select",28),ct("ngModelChange",function(r){Y(t);let a=S(3);return ut(a.selectedBlock,r)||(a.selectedBlock=r),X(r)}),Z("change",function(r){Y(t);let a=S(3);return X(a.onBlockChange(r.target.value))}),bn(9,dne,2,2,"option",29,vn),v()()()}if(e&2){let t=S(3);m(),se(V(2,3,"form.label.changes_kept")),m(4),ie(" ",V(6,5,t.isPlatform?"child_bridge.config.platform":"child_bridge.config.accessory")," "),m(3),lt("ngModel",t.selectedBlock),m(),Cn(t.configBlocks)}}function pne(e,n){if(e&1&&(y(0,"li",23)(1,"label",30),M(2),A(3,"translate"),v(),y(4,"div",31),M(5),v()()),e&2){let t=S(3);m(2),ie(" ",V(3,2,t.isPlatform?"child_bridge.config.platform":"child_bridge.config.accessory")," "),m(3),ie(" ",t.configBlocks[t.selectedBlock].name||t.configBlocks[t.selectedBlock].platform||t.configBlocks[t.selectedBlock].accessory," ")}}function mne(e,n){e&1&&(y(0,"li",23)(1,"label",30),M(2),A(3,"translate"),v(),y(4,"div",32),M(5),A(6,"translate"),v()()),e&2&&(m(2),se(V(3,2,"child_bridge.config.use")),m(3),ie(" ",V(6,4,"child_bridge.config.prevent")," "))}function hne(e,n){if(e&1&&(y(0,"option",29),M(1),v()),e&2){let t=n.$implicit;E("value",t.username),m(),ho("",t.name," (",t.username,")")}}function gne(e,n){if(e&1){let t=ue();y(0,"li",23)(1,"label",37),M(2),A(3,"translate"),v(),y(4,"div",27)(5,"select",38),Z("change",function(r){Y(t);let a=S(4);return X(a.onLinkBridgeChange(r.target.value))}),y(6,"option",29),M(7),A(8,"translate"),v(),bn(9,hne,2,3,"option",29,vn),v()()()}if(e&2){let t=S(4);m(2),se(V(3,2,"child_bridge.config.or_link")),m(5),se(V(8,4,"child_bridge.config.select_existing")),m(2),Cn(t.bridgesAvailableForLink)}}function _ne(e,n){if(e&1){let t=ue();y(0,"li",33)(1,"span",7),M(2),A(3,"translate"),v(),y(4,"div",34)(5,"input",35),Z("change",function(){Y(t);let r=S(3);return X(r.toggleExternalBridge(r.configBlocks[r.selectedBlock],r.enabledBlocks[r.selectedBlock],r.selectedBlock))}),ct("ngModelChange",function(r){Y(t);let a=S(3);return ut(a.enabledBlocks[a.selectedBlock],r)||(a.enabledBlocks[a.selectedBlock]=r),X(r)}),v(),q(6,"label",36),v()(),j(7,gne,11,6,"li",23)}if(e&2){let t=S(3);m(2),se(V(3,5,"child_bridge.config.use")),m(3),E("id","toggleExternalBridgeInput_"+t.selectedBlock),lt("ngModel",t.enabledBlocks[t.selectedBlock]),m(),E("for","toggleExternalBridgeInput_"+t.selectedBlock),m(),R(!(t.configBlocks[t.selectedBlock]._bridge!=null&&t.configBlocks[t.selectedBlock]._bridge.username)&&t.bridgesAvailableForLink.length?7:-1)}}function yne(e,n){if(e&1&&(y(0,"li",23)(1,"label",30),M(2),A(3,"translate"),v(),y(4,"div",31),M(5),v()(),y(6,"li",23)(7,"label",30),M(8),A(9,"translate"),v(),y(10,"div",31),M(11),v()(),y(12,"li",23)(13,"label",30),M(14),A(15,"translate"),v(),y(16,"div",31),M(17),v()()),e&2){let t=S(3);m(2),se(V(3,6,"accessories.bridge_link_username")),m(3),ie(" ",t.currentlySelectedLink.username," "),m(3),se(V(9,8,"accessories.bridge_link_port")),m(3),ie(" ",t.currentlySelectedLink.port," "),m(3),se(V(15,10,"accessories.bridge_link_name")),m(3),ie(" ",t.currentlySelectedLink.name," ")}}function vne(e,n){e&1&&(y(0,"span"),M(1),A(2,"translate"),v()),e&2&&(m(),ie(" \xB7 ",V(2,1,"status.code_scan")," "))}function bne(e,n){if(e&1){let t=ue();y(0,"li",33)(1,"span",7),M(2),A(3,"translate"),y(4,"code"),M(5,"-D"),v()(),y(6,"div",34)(7,"input",51),A(8,"translate"),ct("ngModelChange",function(r){Y(t);let a=S(5);return ut(a.configBlocks[a.selectedBlock]._bridge.debugModeEnabled,r)||(a.configBlocks[a.selectedBlock]._bridge.debugModeEnabled=r),X(r)}),v(),q(9,"label",36),v()()}if(e&2){let t=S(5);m(2),ie("",V(3,5,"child_bridge.config.debug")," "),m(5),E("id","homebridgeDebugMode_"+t.selectedBlock),lt("ngModel",t.configBlocks[t.selectedBlock]._bridge.debugModeEnabled),me("aria-label",V(8,7,"settings.startup.debug")),m(2),E("for","homebridgeDebugMode_"+t.selectedBlock)}}function Cne(e,n){if(e&1){let t=ue();y(0,"li",39)(1,"div",40),q(2,"app-qrcode",41),y(3,"p",42),M(4),v(),y(5,"p",43),q(6,"i",44),M(7),A(8,"translate"),j(9,vne,3,3,"span"),v()()(),y(10,"li",23)(11,"label",30),M(12),A(13,"translate"),v(),y(14,"div",31),M(15),v()(),y(16,"li",23)(17,"label",30),M(18),A(19,"translate"),v(),y(20,"div",31),M(21),v()(),y(22,"li",23)(23,"label",30),M(24),A(25,"translate"),v(),y(26,"div",27)(27,"input",45),ct("ngModelChange",function(r){Y(t);let a=S(4);return ut(a.configBlocks[a.selectedBlock]._bridge.name,r)||(a.configBlocks[a.selectedBlock]._bridge.name=r),X(r)}),v()()(),y(28,"li",23)(29,"label",30),M(30),A(31,"translate"),v(),y(32,"div",27)(33,"input",45),ct("ngModelChange",function(r){Y(t);let a=S(4);return ut(a.configBlocks[a.selectedBlock]._bridge.manufacturer,r)||(a.configBlocks[a.selectedBlock]._bridge.manufacturer=r),X(r)}),v()()(),y(34,"li",23)(35,"label",30),M(36),A(37,"translate"),v(),y(38,"div",27)(39,"input",45),ct("ngModelChange",function(r){Y(t);let a=S(4);return ut(a.configBlocks[a.selectedBlock]._bridge.model,r)||(a.configBlocks[a.selectedBlock]._bridge.model=r),X(r)}),v()()(),y(40,"li",23)(41,"label",30),M(42),A(43,"translate"),v(),y(44,"div",27)(45,"input",45),ct("ngModelChange",function(r){Y(t);let a=S(4);return ut(a.configBlocks[a.selectedBlock]._bridge.firmwareRevision,r)||(a.configBlocks[a.selectedBlock]._bridge.firmwareRevision=r),X(r)}),v()()(),j(46,bne,10,9,"li",33),y(47,"li",23)(48,"label",30)(49,"span",46),M(50,"DEBUG"),v(),q(51,"br")(52,"small",47),A(53,"translate"),v(),y(54,"div",27)(55,"input",48),ct("ngModelChange",function(r){Y(t);let a=S(4);return ut(a.configBlocks[a.selectedBlock]._bridge.env.DEBUG,r)||(a.configBlocks[a.selectedBlock]._bridge.env.DEBUG=r),X(r)}),v()()(),y(56,"li",23)(57,"label",30)(58,"span",46),M(59,"NODE_OPTIONS"),v(),q(60,"br"),y(61,"small",49),M(62),A(63,"translate"),v()(),y(64,"div",27)(65,"input",50),ct("ngModelChange",function(r){Y(t);let a=S(4);return ut(a.configBlocks[a.selectedBlock]._bridge.env.NODE_OPTIONS,r)||(a.configBlocks[a.selectedBlock]._bridge.env.NODE_OPTIONS=r),X(r)}),v()()()}if(e&2){let t=S(4);m(2),E("data",t.deviceInfo[t.configBlocks[t.selectedBlock]._bridge==null?null:t.configBlocks[t.selectedBlock]._bridge.username]._setupCode),m(2),se(t.deviceInfo[t.configBlocks[t.selectedBlock]._bridge==null?null:t.configBlocks[t.selectedBlock]._bridge.username].pincode),m(2),E("ngClass",go(41,one,t.deviceInfo[t.configBlocks[t.selectedBlock]._bridge==null?null:t.configBlocks[t.selectedBlock]._bridge.username]._isPaired,!t.deviceInfo[t.configBlocks[t.selectedBlock]._bridge==null?null:t.configBlocks[t.selectedBlock]._bridge.username]._isPaired)),m(),ie(" ",V(8,22,t.deviceInfo[t.configBlocks[t.selectedBlock]._bridge==null?null:t.configBlocks[t.selectedBlock]._bridge.username]._isPaired?"status.widget.qr_paired":"status.widget.qr_unpaired")," "),m(2),R(t.deviceInfo[t.configBlocks[t.selectedBlock]._bridge==null?null:t.configBlocks[t.selectedBlock]._bridge.username]._isPaired?-1:9),m(3),se(V(13,24,"accessories.bridge_username")),m(3),ie(" ",t.configBlocks[t.selectedBlock]._bridge.username," "),m(3),se(V(19,26,"accessories.bridge_port")),m(3),ie(" ",t.configBlocks[t.selectedBlock]._bridge.port," "),m(3),se(V(25,28,"child_bridge.config.name")),m(3),lt("ngModel",t.configBlocks[t.selectedBlock]._bridge.name),m(3),se(V(31,30,"child_bridge.config.manufacturer")),m(3),lt("ngModel",t.configBlocks[t.selectedBlock]._bridge.manufacturer),m(3),se(V(37,32,"child_bridge.config.model")),m(3),lt("ngModel",t.configBlocks[t.selectedBlock]._bridge.model),m(3),se(V(43,34,"child_bridge.config.firmware")),m(3),lt("ngModel",t.configBlocks[t.selectedBlock]._bridge.firmwareRevision),m(),R(t.canShowBridgeDebug?46:-1),m(6),E("innerHTML",At(53,36,"settings.service.debug_tooltip",xi(44,DO,t.linkDebug)),Ke),m(3),lt("ngModel",t.configBlocks[t.selectedBlock]._bridge.env.DEBUG),m(7),se(V(63,39,"settings.service.node_tooltip")),m(3),lt("ngModel",t.configBlocks[t.selectedBlock]._bridge.env.NODE_OPTIONS)}}function xne(e,n){if(e&1&&j(0,Cne,66,46),e&2){let t=S(3);R(t.deviceInfo[t.configBlocks[t.selectedBlock]._bridge==null?null:t.configBlocks[t.selectedBlock]._bridge.username]?0:-1)}}function wne(e,n){e&1&&(y(0,"ngb-alert",24),M(1),A(2,"translate"),q(3,"br"),M(4),A(5,"translate"),v()),e&2&&(E("dismissible",!1),m(),ie(" ",V(2,3,"child_bridge.restart_homebridge")," "),m(3),ie("",V(5,5,"child_bridge.return_to_pair")," "))}function Ine(e,n){if(e&1&&(y(0,"ul",22),j(1,fne,11,7),j(2,pne,6,4,"li",23),j(3,mne,7,6,"li",23),j(4,_ne,8,7),j(5,yne,18,12),j(6,xne,1,1),v(),j(7,wne,6,7,"ngb-alert",24)),e&2){let t=S(2);m(),R(t.configBlocks.length>1?1:-1),m(),R(t.configBlocks.length===1?2:-1),m(),R(t.currentBridgeHasLinks?3:-1),m(),R(t.currentBridgeHasLinks?-1:4),m(),R(t.currentlySelectedLink?5:-1),m(),R(!t.currentlySelectedLink&&(t.configBlocks[t.selectedBlock]._bridge!=null&&t.configBlocks[t.selectedBlock]._bridge.username)?6:-1),m(),R(t.configBlocks[t.selectedBlock]._bridge!=null&&t.configBlocks[t.selectedBlock]._bridge.username&&t.deviceInfo[t.configBlocks[t.selectedBlock]._bridge==null?null:t.configBlocks[t.selectedBlock]._bridge.username]===!1?7:-1)}}function Sne(e,n){e&1&&(M(0),A(1,"translate")),e&2&&ie(" ",V(1,1,"child_bridge.confirm_delete_2")," ")}function $ne(e,n){if(e&1&&(y(0,"li"),M(1),y(2,"span",46),M(3),v(),M(4,") "),v()),e&2){let t=n.$implicit,i=S(3);m(),ie(" ",t.bridgeName||(i.deviceInfo[t.id]==null?null:i.deviceInfo[t.id].displayName)," ("),m(2),se(t.id)}}function Ene(e,n){if(e&1&&(y(0,"ngb-alert",19)(1,"p"),M(2),A(3,"translate"),j(4,Sne,2,3),v(),y(5,"div",9)(6,"ul",52),bn(7,$ne,5,2,"li",null,vn),v()()()),e&2){let t=S(2);E("dismissible",!1),m(2),ie(" ",V(3,3,"child_bridge.confirm_delete_1")," "),m(2),R(t.deletingPairedBridge?4:-1),m(3),Cn(t.deleteBridges)}}function Tne(e,n){e&1&&(y(0,"ngb-alert",20),M(1),A(2,"translate"),v()),e&2&&(E("dismissible",!1),m(),ie(" ",V(2,2,"child_bridge.must_configure_plugin")," "))}function Pne(e,n){if(e&1){let t=ue();y(0,"ngb-alert",21)(1,"div",17),M(2),A(3,"translate"),A(4,"translate"),v(),y(5,"button",53),Z("click",function(){Y(t);let r=S(2);return X(r.openFullConfigEditor())}),M(6),A(7,"translate"),v()()}e&2&&(E("dismissible",!1),m(2),ho(" ",V(3,4,"plugins.settings.message_manual_config_required")," ",V(4,6,"plugins.settings.message_consult_documentation")," "),m(4),ie(" ",V(7,8,"plugins.settings.label_open_config_editor")," "))}function One(e,n){if(e&1&&(y(0,"div",15),q(1,"i",16),v(),y(2,"ul",17),q(3,"li",18),A(4,"translate"),j(5,cne,5,5),v(),j(6,Ine,8,7),j(7,Ene,9,5,"ngb-alert",19),j(8,Tne,3,4,"ngb-alert",20),j(9,Pne,8,10,"ngb-alert",21)),e&2){let t=S();m(3),E("innerHTML",At(4,6,"child_bridge.about",xi(9,DO,t.linkChildBridges)),Ke),m(2),R(t.configBlocks.length?5:-1),m(),R(t.canConfigure&&t.configBlocks.length?6:-1),m(),R(t.deleteBridges.length?7:-1),m(),R(!t.configBlocks.length&&t.canConfigure?8:-1),m(),R(t.canConfigure?-1:9)}}function Mne(e,n){if(e&1){let t=ue();y(0,"button",54),Z("click",function(){Y(t);let r=S();return X(r.closeModal())}),M(1),A(2,"translate"),v()}if(e&2){let t=S();E("disabled",t.saveInProgress),m(),ie(" ",V(2,2,"form.button_close")," ")}}function kne(e,n){e&1&&q(0,"i",56)}function Ane(e,n){if(e&1){let t=ue();y(0,"button",55),Z("click",function(){Y(t);let r=S();return X(r.save())}),M(1),A(2,"translate"),j(3,kne,1,0,"i",56),v()}if(e&2){let t=S();E("disabled",t.saveInProgress),m(),ie(" ",V(2,3,"form.button_save")," "),m(2),R(t.saveInProgress?3:-1)}}function Dne(e,n){if(e&1){let t=ue();y(0,"button",57),Z("click",function(){Y(t);let r=S();return X(r.closeModal())}),M(1),A(2,"translate"),v()}e&2&&(m(),ie(" ",V(2,1,"form.button_close")," "))}function Nne(e,n){e&1&&(M(0),A(1,"translate")),e&2&&ie(" ",V(1,1,"form.button_save")," ")}function Fne(e,n){e&1&&q(0,"i",56)}function qne(e,n){if(e&1){let t=ue();y(0,"button",55),Z("click",function(){Y(t);let r=S(2);return X(r.save())}),j(1,Nne,2,3),j(2,Fne,1,0,"i",56),v()}if(e&2){let t=S(2);E("disabled",t.saveInProgress||t.loading),m(),R(t.saveInProgress?-1:1),m(),R(t.saveInProgress?2:-1)}}function Vne(e,n){if(e&1){let t=ue();y(0,"button",59),Z("click",function(){Y(t);let r=S(2);return X(r.openPluginConfig())}),M(1),A(2,"translate"),v()}e&2&&(m(),ie(" ",V(2,1,"plugins.button_settings")," "))}function jne(e,n){if(e&1&&(j(0,qne,3,3,"button",10),j(1,Vne,3,3,"button",58)),e&2){let t=S();R(t.configBlocks.length?0:-1),m(),R(t.configBlocks.length?-1:1)}}var NO=(()=>{class e{$activeModal=L(Et);$api=L(rt);$modal=L(en);$plugin=L(no);$router=L(Ri);$settings=L(Pt);$toastr=L(pt);$translate=L(ft);plugin;schema;justInstalled=!1;loading=!0;canConfigure=!0;configBlocks=[];selectedBlock="0";isPlatform;enabledBlocks={};bridgeCache=new Map;originalBridges=[];deviceInfo=new Map;saveInProgress=!1;canShowBridgeDebug=!1;deleteBridges=[];deletingPairedBridge=!1;accessoryBridgeLinks=[];bridgesAvailableForLink=[];currentlySelectedLink=null;currentBridgeHasLinks=!1;linkChildBridges='<a href="https://github.com/homebridge/homebridge/wiki/Child-Bridges" target="_blank"><i class="fas fa-fw fa-external-link-alt primary-text"></i></a>';linkDebug='<a href="https://github.com/homebridge/homebridge-config-ui-x/wiki/Debug-Common-Values" target="_blank"><i class="fa fa-fw fa-external-link-alt primary-text"></i></a>';ngOnInit(){return pe(this,null,function*(){yield Promise.all([this.getPluginType(),this.loadPluginConfig()]),this.canShowBridgeDebug=this.$settings.env.homebridgeVersion.startsWith("2"),this.loading=!1})}onBlockChange(t){if(this.selectedBlock=t,this.currentlySelectedLink=this.accessoryBridgeLinks.find(i=>i.index===t)||null,this.currentBridgeHasLinks=this.accessoryBridgeLinks.some(i=>i.usesIndex===t),this.bridgesAvailableForLink=[],this.configBlocks[Number(t)].accessory)for(let[i,r]of Array.from(this.bridgeCache.entries()))this.deleteBridges.some(a=>a.id===r.username)||i<Number(t)&&this.bridgesAvailableForLink.push({index:i.toString(),usesIndex:t,name:r.name,port:r.port,username:r.username})}onLinkBridgeChange(t){if(t){let i=this.configBlocks.findIndex(a=>a._bridge?.username===t);this.accessoryBridgeLinks.push({index:this.selectedBlock,usesIndex:i.toString(),name:this.bridgeCache.get(i)?.name,port:this.bridgeCache.get(i)?.port,username:t}),this.currentlySelectedLink=this.accessoryBridgeLinks.find(a=>a.index===this.selectedBlock)||null,this.enabledBlocks[Number(this.selectedBlock)]=!0;let r=this.configBlocks[Number(this.selectedBlock)];r._bridge={username:t}}}getPluginType(){return pe(this,null,function*(){try{let t=yield je(this.$api.get(`/plugins/alias/${encodeURIComponent(this.plugin.name)}`));this.isPlatform=t.pluginType==="platform"}catch(t){this.$toastr.error(this.$translate.instant("plugins.config.load_error"),this.$translate.instant("toast.title_error")),this.$activeModal.close(),console.error(t)}})}loadPluginConfig(){return pe(this,null,function*(){try{this.configBlocks=yield je(this.$api.get(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`));for(let[i,r]of this.configBlocks.entries())if(r._bridge&&r._bridge.username){this.enabledBlocks[i]=!0;let a=Array.from(this.bridgeCache.values()).findIndex(u=>u.username===r._bridge.username),l=a!==-1?Array.from(this.bridgeCache.values())[a]:void 0;l?(r._bridge.env={},this.accessoryBridgeLinks.push({index:i.toString(),usesIndex:a.toString(),name:l.name,port:l.port,username:r._bridge.username})):(r._bridge.env=r._bridge.env||{},this.bridgeCache.set(i,r._bridge),yield this.getDeviceInfo(r._bridge.username),r._bridge.name||(r._bridge.name=this.deviceInfo[r._bridge.username]?.displayName),this.originalBridges.push(r._bridge))}this.justInstalled&&this.bridgeCache.size===0&&this.configBlocks.forEach((i,r)=>{this.enabledBlocks[r]=!0,this.toggleExternalBridge(i,!0,r.toString())}),this.accessoryBridgeLinks.find(i=>i.username===this.bridgeCache.get(Number(this.selectedBlock))?.username)&&(this.currentBridgeHasLinks=!0)}catch(t){this.canConfigure=!1,console.error(t)}})}toggleExternalBridge(t,i,r){return pe(this,null,function*(){if(i){let a=this.bridgeCache.get(Number(r));t._bridge={username:a?a.username:this.generateUsername(),port:yield this.getUnusedPort(),name:a?.name,model:a?.model,manufacturer:a?.manufacturer,firmwareRevision:a?.firmwareRevision,debugModeEnabled:a?.debugModeEnabled,env:a?.env},this.deleteBridges.some(l=>l.id===t._bridge.username)&&(this.deleteBridges=this.deleteBridges.filter(l=>l.id!==t._bridge.username)),this.bridgeCache.set(Number(r),t._bridge),yield this.getDeviceInfo(t._bridge.username)}else{if(this.accessoryBridgeLinks.some(a=>a.index===r))this.accessoryBridgeLinks=this.accessoryBridgeLinks.filter(a=>a.index!==r),this.currentlySelectedLink=null;else{let a=this.originalBridges.find(l=>l.username===t._bridge.username);a&&this.deleteBridges.push({id:t._bridge.username,bridgeName:t._bridge.name||a.displayName,paired:this.deviceInfo[t._bridge.username]?._isPaired})}delete t._bridge}this.deletingPairedBridge=this.deleteBridges.some(a=>a.paired)})}getUnusedPort(){return pe(this,null,function*(){this.saveInProgress=!0;try{return(yield je(this.$api.get("/server/port/new"))).port}catch{return Math.floor(Math.random()*30001+3e4)}finally{this.saveInProgress=!1}})}getDeviceInfo(t){return pe(this,null,function*(){try{this.deviceInfo[t]=yield je(this.$api.get(`/server/pairings/${t.replace(/:/g,"")}`))}catch(i){console.error(i),this.deviceInfo[t]=!1}})}save(){return pe(this,null,function*(){this.saveInProgress=!0;try{yield je(this.$api.post(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`,this.configBlocks));for(let t of this.deleteBridges)try{yield je(this.$api.delete(`/server/pairings/${t.id.replace(/:/g,"")}`))}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("settings.reset_bridge.error"),this.$translate.instant("toast.title_error"))}this.$activeModal.close(),this.$modal.open(Bi,{size:"lg",backdrop:"static"})}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error"))}finally{this.saveInProgress=!1}})}openPluginConfig(){this.$activeModal.close(),this.$plugin.settings({name:this.plugin.name,settingsSchema:!0,links:{}})}generateUsername(){let t="0123456789ABCDEF",i="0E:";for(let r=0;r<5;r++)i+=t.charAt(Math.round(Math.random()*15)),i+=t.charAt(Math.round(Math.random()*15)),r!==4&&(i+=":");return i}openFullConfigEditor(){this.$router.navigate(["/config"]),this.$activeModal.close()}dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(){this.$activeModal.close("Dismiss")}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ce({type:e,selectors:[["ng-component"]],inputs:{plugin:"plugin",schema:"schema",justInstalled:"justInstalled"},decls:16,vars:8,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"disabled"],[1,"modal-body"],[1,"text-center","primary-text"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],["type","button",1,"btn","btn-primary",3,"disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[1,"mb-3","text-center"],[1,"fas","fa-fw","fa-bridge","primary-text",2,"font-size","75px"],[1,"mb-3"],[3,"innerHTML"],["type","error",1,"mt-3","mb-0",3,"dismissible"],["type","info",3,"dismissible"],["type","info",1,"mb-0",3,"dismissible"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["type","info",1,"mt-3","mb-0",3,"dismissible"],[1,"list-group-item","text-center","grey-text","small"],["for","bridgeSelect",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["id","bridgeSelect",1,"custom-select",3,"ngModelChange","change","ngModel"],[3,"value"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50","grey-text","font-monospace"],[1,"text-start","text-md-end","w-100","w-md-50","grey-text"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox",1,"rendux-input",3,"change","ngModelChange","id","ngModel"],[1,"rendux-label",3,"for"],["for","bridgeLink",1,"mb-2","mb-md-0","w-100","w-md-50"],["id","bridgeLink",1,"custom-select",3,"change"],[1,"list-group-item","text-center"],[1,"w-100","d-flex","flex-column","text-center"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[1,"mx-auto","mt-3","mb-1"],[1,"grey-text","mx-auto","small","mb-1",2,"max-width","400px"],[1,"fas","fa-fw","fa-link",3,"ngClass"],["type","text",1,"form-control","custom-input",3,"ngModelChange","ngModel"],[1,"font-monospace"],[1,"grey-text",3,"innerHTML"],["type","text","placeholder","HAP-NodeJS:Advertiser,HAP-NodeJS:Service",1,"form-control","custom-input",3,"ngModelChange","ngModel"],[1,"grey-text"],["type","text","placeholder","--max-old-space-size=512 --max-http-header-size=8192",1,"form-control","custom-input",3,"ngModelChange","ngModel"],["type","checkbox",1,"rendux-input",3,"ngModelChange","id","ngModel"],[1,"d-inline-block","text-start","mb-0"],[1,"btn","btn-primary","mb-0",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],["type","button",1,"btn","btn-primary",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click"]],template:function(i,r){i&1&&(y(0,"div",0)(1,"div",1)(2,"h5",2),M(3),v(),j(4,ane,2,4,"button",3),v(),y(5,"div",4),j(6,sne,2,0,"div",5),j(7,One,10,11),v(),y(8,"div",6)(9,"div",7),j(10,Mne,3,4,"button",8),v(),y(11,"div",9),j(12,Ane,4,5,"button",10),j(13,Dne,3,3,"button",11),v(),y(14,"div",12),j(15,jne,2,2),v()()()),i&2&&(m(3),se(r.plugin.displayName||r.plugin.name),m(),R(r.justInstalled?-1:4),m(2),R(r.loading?6:-1),m(),R(r.loading?-1:7),m(3),R(r.canConfigure&&!r.justInstalled?10:-1),m(2),R(r.justInstalled?12:-1),m(),R(r.canConfigure?-1:13),m(2),R(r.canConfigure&&!r.justInstalled?15:-1))},dependencies:[Ii,vo,bo,yo,qr,sa,In,wi,la,U1,si,Tt],styles:[".manage-plugin-config-external-icons[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:700;line-height:1;color:#000;opacity:.5;background-color:transparent;border:0}"]})}return e})();var x0=st(lc(),1);var Xd=()=>["homebridge","homebridge-config-ui-x"],FO=(e,n,t)=>({pluginName:e,minVersion:n,installedVersion:t}),Rne=(e,n,t)=>({minVersion:e,installedVersion:n,latestVersion:t,packageName:"Homebridge"}),Bne=()=>({packageName:"Homebridge"}),Lne=(e,n,t)=>({minVersion:e,installedVersion:n,latestVersion:t,packageName:"Homebridge UI"}),zne=()=>({packageName:"Homebridge UI"});function Une(e,n){if(e&1&&(y(0,"li",14)(1,"div",17),q(2,"i",18),v(),y(3,"div",19),M(4),A(5,"translate"),v()()),e&2){let t=S(2);m(4),ie(" ",At(5,1,"plugins.compat.node_too_low",ai(4,FO,t.plugin.displayName,t.nodeMinVersion,t.nodeInstalledVersion))," ")}}function Hne(e,n){if(e&1&&(y(0,"li",14)(1,"div",17),q(2,"i",18),v(),y(3,"div",19),M(4),A(5,"translate"),v()()),e&2){let t=S(2);m(4),ie(" ",At(5,1,"plugins.compat.hb_too_low",ai(4,FO,t.plugin.displayName,t.hbMinVersion,t.hbInstalledVersion))," ")}}function Wne(e,n){if(e&1&&(y(0,"div",11),q(1,"i",12),v(),y(2,"ul",13),j(3,Une,6,8,"li",14),j(4,Hne,6,8,"li",14),v(),y(5,"ngb-alert",15)(6,"p",16),M(7),A(8,"translate"),v()()),e&2){let t=S();m(),ve(g1("",t.action==="install"?"far fa-fw fa-arrow-alt-circle-down":t.action==="update"?"far fa-fw fa-arrow-alt-circle-up":"fas fa-fw fa-code-compare"," primary-text")),m(2),R(t.isValidNode?-1:3),m(),R(t.isValidHb?-1:4),m(),E("dismissible",!1),m(2),se(V(8,7,"common.phrases.are_you_sure"))}}function Gne(e,n){if(e&1&&(y(0,"div",11),q(1,"i",20),v(),y(2,"ul",13)(3,"li",14)(4,"div",17),q(5,"i",18),v(),y(6,"div",19),M(7),A(8,"translate"),v()()(),y(9,"ngb-alert",15)(10,"p",21),M(11),A(12,"translate"),v(),y(13,"p",16)(14,"a",22),M(15),A(16,"translate"),q(17,"i",23),v()()()),e&2){let t=S();m(7),ie(" ",At(8,4,"plugins.compat.hb_node_too_low",ai(12,Rne,t.nodeMinVersion,t.nodeInstalledVersion,t.plugin.latestVersion))," "),m(2),E("dismissible",!1),m(2),se(At(12,7,"plugins.compat.node_first",dt(16,Bne))),m(4),ie(" ",V(16,10,"plugins.compat.node_link")," ")}}function Kne(e,n){if(e&1&&(y(0,"div",11),q(1,"i",20),v(),y(2,"ul",13)(3,"li",14)(4,"div",17),q(5,"i",18),v(),y(6,"div",19),M(7),A(8,"translate"),v()()(),y(9,"ngb-alert",15)(10,"p",21),M(11),A(12,"translate"),v(),y(13,"p",16)(14,"a",22),M(15),A(16,"translate"),q(17,"i",23),v()()()),e&2){let t=S();m(7),ie(" ",At(8,4,"plugins.compat.hb_node_too_low",ai(12,Lne,t.nodeMinVersion,t.nodeInstalledVersion,t.plugin.latestVersion))," "),m(2),E("dismissible",!1),m(2),se(At(12,7,"plugins.compat.node_first",dt(16,zne))),m(4),ie(" ",V(16,10,"plugins.compat.node_link")," ")}}function Jne(e,n){if(e&1){let t=ue();y(0,"button",24),Z("click",function(){Y(t);let r=S();return X(r.dismissModal())}),M(1),A(2,"translate"),v()}e&2&&(m(),ie(" ",V(2,1,"form.button_close")," "))}function Yne(e,n){if(e&1){let t=ue();y(0,"button",24),Z("click",function(){Y(t);let r=S();return X(r.dismissModal())}),M(1),A(2,"translate"),v()}e&2&&(m(),ie(" ",V(2,1,"form.button_close")," "))}function Xne(e,n){if(e&1){let t=ue();y(0,"button",25),Z("click",function(){Y(t);let r=S();return X(r.closeModal())}),M(1),A(2,"translate"),v()}e&2&&(m(),ie(" ",V(2,1,"form.button_continue")," "))}var qO=(()=>{class e{$activeModal=L(Et);$settings=L(Pt);plugin;isValidNode;isValidHb;action;nodeMinVersion;nodeInstalledVersion;hbMinVersion;hbInstalledVersion;ngOnInit(){this.nodeMinVersion=(0,x0.minVersion)(this.plugin.updateEngines?.node),this.nodeInstalledVersion=this.$settings.env.nodeVersion,this.hbMinVersion=(0,x0.minVersion)(this.plugin.updateEngines?.homebridge),this.hbInstalledVersion=this.$settings.env.homebridgeVersion}dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(){this.$activeModal.close(!0)}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ce({type:e,selectors:[["ng-component"]],inputs:{plugin:"plugin",isValidNode:"isValidNode",isValidHb:"isValidHb",action:"action"},decls:18,vars:16,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,"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-danger"],[1,"text-center","mb-3"],[2,"font-size","75px"],[1,"list-group","list-group-box","mb-3","text-start"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],["type","warning",1,"mb-0",3,"dismissible"],[1,"text-center","mb-0"],[1,"me-3"],[1,"fas","fa-exclamation-circle","orange-text","fa-xl"],[1,"text-start","flex-grow-1"],[1,"fab","fa-fw","fa-node-js","primary-text",2,"font-size","75px"],[1,"text-center","mb-1"],["href","https://homebridge.io/w/JTKEF","target","_blank","rel","noopener noreferrer"],[1,"fa","fa-fw","fa-external-link-alt"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click"]],template:function(i,r){i&1&&(y(0,"div",0)(1,"div",1)(2,"h5",2),M(3),A(4,"translate"),v(),y(5,"button",3),A(6,"translate"),Z("click",function(){return r.dismissModal()}),v()(),y(7,"div",4),j(8,Wne,9,9),j(9,Gne,18,17),j(10,Kne,18,17),v(),y(11,"div",5)(12,"div",6),j(13,Jne,3,3,"button",7),v(),y(14,"div",8),j(15,Yne,3,3,"button",7),v(),y(16,"div",9),j(17,Xne,3,3,"button",10),v()()()),i&2&&(m(3),se(V(4,8,"plugins.compat.title")),m(2),me("aria-label",V(6,10,"form.button_close")),m(3),R(dt(12,Xd).includes(r.plugin.name)?-1:8),m(),R(r.plugin.name==="homebridge"?9:-1),m(),R(r.plugin.name==="homebridge-config-ui-x"?10:-1),m(3),R(dt(13,Xd).includes(r.plugin.name)?-1:13),m(2),R(dt(14,Xd).includes(r.plugin.name)?15:-1),m(2),R(dt(15,Xd).includes(r.plugin.name)?-1:17))},dependencies:[la,Tt],encapsulation:2})}return e})();var an=[];for(let e=0;e<256;++e)an.push((e+256).toString(16).slice(1));function VO(e,n=0){return(an[e[n+0]]+an[e[n+1]]+an[e[n+2]]+an[e[n+3]]+"-"+an[e[n+4]]+an[e[n+5]]+"-"+an[e[n+6]]+an[e[n+7]]+"-"+an[e[n+8]]+an[e[n+9]]+"-"+an[e[n+10]]+an[e[n+11]]+an[e[n+12]]+an[e[n+13]]+an[e[n+14]]+an[e[n+15]]).toLowerCase()}var w0,Zne=new Uint8Array(16);function I0(){if(!w0){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");w0=crypto.getRandomValues.bind(crypto)}return w0(Zne)}var Qne=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),S0={randomUUID:Qne};function eie(e,n,t){if(S0.randomUUID&&!n&&!e)return S0.randomUUID();e=e||{};let i=e.random??e.rng?.()??I0();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,n){if(t=t||0,t<0||t+16>n.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let r=0;r<16;++r)n[t+r]=i[r];return n}return VO(i)}var Zd=eie;var jO=st($s(),1);var RO=(()=>{class e{$api=L(rt);$toastr=L(pt);$translate=L(ft);downloadDumpFile(){this.$api.get("/plugins/custom-plugins/homebridge-deconz/dump-file",{observe:"response",responseType:"blob"}).subscribe({next:t=>{(0,jO.saveAs)(t.body,"homebridge-deconz.json.gz")},error:t=>{console.error(t),this.$toastr.error(this.$translate.instant("plugins.settings.deconz.dump_no_exist"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ce({type:e,selectors:[["app-homebridge-deconz"]],decls:3,vars:0,consts:[["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-fw","fa-download"]],template:function(i,r){i&1&&(Yu(0,"button",0),Qu("click",function(){return r.downloadDumpFile()}),Zu(1,"i",1),M(2,` Download Dump File
44
- `),Xu())},encapsulation:2})}return e})();var BO=st($s(),1);var LO=(()=>{class e{$api=L(rt);$translate=L(ft);$toastr=L(pt);downloadDumpFile(){this.$api.get("/plugins/custom-plugins/homebridge-hue/dump-file",{observe:"response",responseType:"blob"}).subscribe({next:t=>{(0,BO.saveAs)(t.body,"homebridge-hue.json.gz")},error:t=>{console.error(t),this.$toastr.error(this.$translate.instant("plugins.settings.hue.dump_no_exist"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ce({type:e,selectors:[["app-homebridge-hue"]],decls:3,vars:0,consts:[["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-fw","fa-download"]],template:function(i,r){i&1&&(Yu(0,"button",0),Qu("click",function(){return r.downloadDumpFile()}),Zu(1,"i",1),M(2,` Download Dump File
45
- `),Xu())},encapsulation:2})}return e})();var zO=(()=>{class e{transform(t){return t.replace(/\$\{\{HOSTNAME\}\}/g,location.hostname)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=p1({name:"interpolateMd",type:e,pure:!0})}return e})();var UO=(e,n,t)=>({"fa-circle-check green-text":e,"fa-circle-exclamation red-text":n,"fa-circle-exclamation orange-text":t});function tie(e,n){if(e&1&&(q(0,"markdown",5),A(1,"interpolateMd")),e&2){let t=S();E("data",V(1,1,t.schema.headerDisplay))}}function nie(e,n){if(e&1){let t=ue();y(0,"button",31),A(1,"translate"),Z("click",function(){Y(t);let r=S().$implicit,a=S(2);return X(a.removeBlock(r.__uuid__))}),q(2,"i",32),v()}e&2&&E("ngbTooltip",V(1,2,"form.button_delete"))("openDelay",150)}function iie(e,n){if(e&1){let t=ue();y(0,"div",19)(1,"div",20)(2,"div",21)(3,"h5",22),M(4),v(),y(5,"div",23),j(6,nie,3,4,"button",24),y(7,"button",25),A(8,"translate"),q(9,"i",26),v(),q(10,"i",27),A(11,"translate"),v()()(),y(12,"div",28)(13,"div",29)(14,"app-schema-form",30),ct("dataChange",function(r){let a=Y(t).$implicit;return ut(a.config,r)||(a.config=r),X(r)}),Z("isValid",function(r){let a=Y(t).$index,l=S(2);return X(l.onIsValid(r,a))}),v()()()()}if(e&2){let t=n.$implicit,i=n.$index,r=S(2);E("ngbAccordionItem",t.__uuid__)("collapsed",r.show!==t.__uuid__)("id",t.__uuid__),m(4),se(t.name),m(2),R(r.plugin.name!=="homebridge-config-ui-x"&&r.show===t.__uuid__?6:-1),m(),E("ngbTooltip",V(8,12,"form.button_edit"))("openDelay",150),m(3),E("ngClass",ai(16,UO,r.formBlocksValid[i],r.strictValidation&&!r.formBlocksValid[i],!r.strictValidation&&!r.formBlocksValid[i]))("ngbTooltip",V(11,14,r.formBlocksValid[i]?"form.label_valid":r.strictValidation?"form.label_invalid_strict":"form.label_invalid"))("openDelay",150),m(4),E("configSchema",r.schema),lt("data",t.config)}}function rie(e,n){if(e&1){let t=ue();y(0,"div",18),Z("show",function(r){Y(t);let a=S();return X(a.blockShown(r))})("hide",function(r){Y(t);let a=S();return X(a.blockHidden(r))}),bn(1,iie,15,20,"div",19,vn),v()}if(e&2){let t=S();E("closeOthers",!0),m(),Cn(t.pluginConfig)}}function oie(e,n){e&1&&q(0,"app-homebridge-deconz")}function aie(e,n){e&1&&q(0,"app-homebridge-hue")}function sie(e,n){if(e&1){let t=ue();y(0,"div",7)(1,"app-schema-form",30),ct("dataChange",function(r){Y(t);let a=S();return ut(a.pluginConfig[0].config,r)||(a.pluginConfig[0].config=r),X(r)}),Z("isValid",function(r){Y(t);let a=S();return X(a.onIsValid(r,0))}),v(),j(2,oie,1,0,"app-homebridge-deconz"),j(3,aie,1,0,"app-homebridge-hue"),v()}if(e&2){let t=S();m(),E("configSchema",t.schema),lt("data",t.pluginConfig[0].config),m(),R(t.plugin.name==="homebridge-deconz"?2:-1),m(),R(t.plugin.name==="homebridge-hue"?3:-1)}}function lie(e,n){if(e&1&&(q(0,"markdown",5),A(1,"interpolateMd")),e&2){let t=S();E("data",V(1,1,t.schema.footerDisplay))}}function uie(e,n){if(e&1&&(q(0,"i",14),A(1,"translate")),e&2){let t=S();E("ngClass",ai(5,UO,t.formIsValid,t.strictValidation&&!t.formIsValid,!t.strictValidation&&!t.formIsValid))("ngbTooltip",V(1,3,t.formIsValid?"form.label_valid":t.strictValidation?"form.label_invalid_strict":"form.label_invalid"))("openDelay",150)}}function cie(e,n){if(e&1){let t=ue();y(0,"button",33),Z("click",function(){Y(t);let r=S();return X(r.addBlock())}),q(1,"i",34),v()}}function die(e,n){e&1&&(y(0,"span"),M(1),A(2,"translate"),v()),e&2&&(m(),se(V(2,1,"form.button_save")))}function fie(e,n){e&1&&q(0,"i",17)}var HO=(()=>{class e{$activeModal=L(Et);$api=L(rt);$plugin=L(no);$modal=L(en);$settings=L(Pt);$toastr=L(pt);$translate=L(ft);plugin;schema;pluginAlias;pluginType;pluginConfig=[];form={};show="";saveInProgress;childBridges=[];isFirstSave=!1;formBlocksValid={};formIsValid=!0;strictValidation=!1;ngOnInit(){this.pluginAlias=this.schema.pluginAlias,this.pluginType=this.schema.pluginType,this.strictValidation=this.schema.strictValidation,this.loadPluginConfig()}save(){return pe(this,null,function*(){this.saveInProgress=!0;let t=this.pluginConfig.map(i=>i.config);try{let i=yield je(this.$api.post(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`,t));if(this.saveInProgress=!1,this.plugin.name==="homebridge-config-ui-x")this.$settings.getAppSettings().catch(()=>{});else if(this.isFirstSave&&this.$settings.env.recommendChildBridges&&i[0]?.platform){this.$activeModal.close(),this.$plugin.bridgeSettings(this.plugin,!0);return}if(!["homebridge","homebridge-config-ui-x"].includes(this.plugin.name)&&(yield this.getChildBridges(),this.childBridges.length>0)){this.$activeModal.close();let r=this.$modal.open(ua,{size:"lg",backdrop:"static"});r.componentInstance.bridges=this.childBridges.map(a=>({name:a.name,username:a.username}));return}this.$activeModal.close(),this.$modal.open(Bi,{size:"lg",backdrop:"static"})}catch(i){this.saveInProgress=!1,console.error(i),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error"))}})}blockShown(t){this.show=t;for(let i of this.pluginConfig)i.name=i.config.name||i.name}blockHidden(t){this.show===t&&(this.show="")}addBlock(){let t=Zd();this.pluginConfig.push({__uuid__:t,name:this.schema.pluginAlias,config:{[this.pluginType]:this.schema.pluginAlias}}),this.formBlocksValid[this.pluginConfig.length-1]=!1,this.blockShown(t)}removeBlock(t){let i=this.pluginConfig.findIndex(r=>r.__uuid__===t);this.pluginConfig.splice(i,1),delete this.formBlocksValid[i],Object.keys(this.formBlocksValid).length||(this.formIsValid=!0)}onIsValid(t,i){this.formBlocksValid[i]=t,this.formIsValid=Object.values(this.formBlocksValid).every(r=>r)}dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(){this.$activeModal.close()}loadPluginConfig(){this.$api.get(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`).subscribe({next:t=>{for(let i of t){let r={__uuid__:Zd(),name:i.name||this.schema.pluginAlias,config:i};this.pluginConfig.push(r)}this.pluginConfig.length?this.show=this.pluginConfig[0].__uuid__:(this.isFirstSave=!0,this.addBlock()),this.plugin.name==="homebridge-hue"&&this.pluginConfig.length&&this.homebridgeHueFix(this.pluginConfig[0].config)},error:t=>{console.error(t),this.$toastr.error(t.error?.message||this.$translate.instant("plugins.config.load_error"),this.$translate.instant("toast.title_error"))}})}homebridgeHueFix(t){if(this.schema.schema.properties.users={type:"object",properties:{}},!(!t.users||typeof t.users!="object"))for(let i of Object.keys(t.users))this.schema.schema.properties.users.properties[i]={type:"string"}}getChildBridges(){return pe(this,null,function*(){try{(yield je(this.$api.get("/status/homebridge/child-bridges"))).forEach(i=>{this.plugin.name===i.plugin&&this.childBridges.push(i)})}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error")),this.childBridges=[]}})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ce({type:e,selectors:[["ng-component"]],inputs:{plugin:"plugin",schema:"schema"},decls:24,vars:18,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body","pb-0"],[1,"plugin-md",3,"data"],["ngbAccordion","",3,"closeOthers"],[1,"card","card-body"],[1,"mt-3"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-center"],[1,"text-end","d-flex","align-items-center","justify-content-end"],["container","modal","placement","top","triggers","hover",1,"fa","fa-fw","fa-xl","me-2",3,"ngClass","ngbTooltip","openDelay"],["type","button","data-dismiss","modal",1,"btn","btn-elegant","me-2"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],["ngbAccordion","",3,"show","hide","closeOthers"],[1,"card",3,"ngbAccordionItem","collapsed","id"],["ngbAccordionHeader","",1,"card-header"],[1,"d-flex","align-items-center","justify-content-between"],[1,"m-0"],[1,"d-flex","align-items-center"],["container","modal","placement","left","triggers","hover",1,"btn","btn-danger","ms-2",3,"ngbTooltip","openDelay"],["ngbAccordionToggle","","container","modal","placement","left","triggers","hover",1,"btn","btn-primary","ms-2","me-2",3,"ngbTooltip","openDelay"],[1,"fa","fa-fw","fa-edit"],["container","modal","placement","left","triggers","hover",1,"fa","fa-fw","fa-xl",3,"ngClass","ngbTooltip","openDelay"],["ngbAccordionCollapse",""],["ngbAccordionBody","",1,"card-body"],[3,"dataChange","isValid","configSchema","data"],["container","modal","placement","left","triggers","hover",1,"btn","btn-danger","ms-2",3,"click","ngbTooltip","openDelay"],[1,"fa","fa-fw","fa-trash"],["type","button","data-dismiss","modal",1,"btn","btn-elegant","me-2",3,"click"],[1,"fa","fa-fw","fa-plus"]],template:function(i,r){i&1&&(y(0,"div",0)(1,"div",1)(2,"h5",2),M(3),v(),y(4,"button",3),A(5,"translate"),Z("click",function(){return r.dismissModal()}),v()(),y(6,"div",4),j(7,tie,2,3,"markdown",5),j(8,rie,3,1,"div",6),j(9,sie,4,4,"div",7),y(10,"div",8),j(11,lie,2,3,"markdown",5),v()(),y(12,"div",9)(13,"div",10)(14,"button",11),Z("click",function(){return r.closeModal()}),M(15),A(16,"translate"),v()(),q(17,"div",12),y(18,"div",13),j(19,uie,2,9,"i",14),j(20,cie,2,0,"button",15),y(21,"button",16),Z("click",function(){return r.save()}),j(22,die,3,3,"span"),j(23,fie,1,0,"i",17),v()()()()),i&2&&(m(3),se(r.plugin.displayName||r.plugin.name),m(),E("disabled",r.saveInProgress),me("aria-label",V(5,14,"form.button_close")),m(3),R(r.schema.headerDisplay?7:-1),m(),R(r.pluginConfig.length&&!r.schema.singular?8:-1),m(),R(r.pluginConfig.length&&r.schema.singular?9:-1),m(2),R(r.schema.footerDisplay?11:-1),m(3),E("disabled",r.saveInProgress),m(),ie(" ",V(16,16,"form.button_close")," "),m(4),R(r.schema.singular?19:-1),m(),R(r.schema.singular?-1:20),m(),E("disabled",r.saveInProgress||!r.formIsValid&&r.strictValidation),m(),R(r.saveInProgress?-1:22),m(),R(r.saveInProgress?23:-1))},dependencies:[cc,uc,dc,sc,ac,oc,jr,ic,nc,si,Yd,RO,LO,rc,Tt,zO],styles:[".manage-plugin-config-external-icons[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:700;line-height:1;color:#000;opacity:.5;background-color:transparent;border:0}"]})}return e})();var pie=(e,n)=>({"green-text":e,"grey-text":n}),mie=(e,n)=>({"btn-danger":e,"btn-elegant":n}),hie=(e,n,t)=>({"fa-broom":e,"fa-undo":n,"fa-spinner fa-pulse":t});function gie(e,n){e&1&&(y(0,"div",12),q(1,"i",13),v(),y(2,"p",14),M(3),A(4,"translate"),v()),e&2&&(m(3),se(V(4,1,"reset.bridge_accessories.empty")))}function _ie(e,n){if(e&1){let t=ue();y(0,"li",18)(1,"span"),M(2),q(3,"br"),y(4,"small",19),q(5,"i",20),M(6),A(7,"translate"),y(8,"span",21),M(9),v()()(),y(10,"button",22),A(11,"translate"),Z("click",function(){let r=Y(t).$implicit,a=S(2);return X(a.toggleList(r._id))}),q(12,"i",23),v()()}if(e&2){let t=n.$implicit,i=S(2);m(2),ie(" ",t.name," "),m(3),E("ngClass",go(12,pie,t._isPaired,!t._isPaired)),m(),ie(" ",V(7,8,t._isPaired?"status.widget.qr_paired":"status.widget.qr_unpaired")," \xB7 "),m(3),se(t._username),m(),E("disabled",i.clicked)("ngClass",go(15,mie,!i.toDelete.includes(t._id),i.toDelete.includes(t._id))),me("aria-label",V(11,10,"form.button_delete")),m(2),E("ngClass",ai(18,hie,!i.toDelete.includes(t._id),i.toDelete.includes(t._id)&&!i.clicked,i.toDelete.includes(t._id)&&i.clicked))}}function yie(e,n){if(e&1&&(y(0,"div",12),q(1,"i",15),v(),y(2,"ul",16)(3,"li"),M(4),A(5,"translate"),v(),y(6,"li"),M(7),A(8,"translate"),v()(),y(9,"ul",17),bn(10,_ie,13,22,"li",18,vn),v()),e&2){let t=S();m(4),se(V(5,2,"reset.bridge_accessories.list_1")),m(3),se(V(8,4,"reset.clear_cache_single.list_3")),m(3),Cn(t.pairings)}}function vie(e,n){if(e&1){let t=ue();y(0,"button",24),Z("click",function(){Y(t);let r=S();return X(r.dismissModal())}),M(1),A(2,"translate"),v()}if(e&2){let t=S();E("disabled",t.clicked),m(),ie(" ",V(2,2,"form.button_close")," ")}}function bie(e,n){if(e&1){let t=ue();y(0,"button",25),Z("click",function(){Y(t);let r=S();return X(r.dismissModal())}),M(1),A(2,"translate"),v()}e&2&&(m(),ie(" ",V(2,1,"form.button_close")," "))}function Cie(e,n){if(e&1&&M(0),e&2){let t=S(3);ie(" (",t.toDelete.length,") ")}}function xie(e,n){if(e&1&&(M(0),A(1,"translate"),j(2,Cie,1,1)),e&2){let t=S(2);ie(" ",V(1,2,"form.button_reset")," "),m(2),R(t.toDelete.length>0?2:-1)}}function wie(e,n){e&1&&q(0,"i",27)}function Iie(e,n){if(e&1){let t=ue();y(0,"button",26),Z("click",function(){Y(t);let r=S();return X(r.cleanBridges())}),j(1,xie,3,4),j(2,wie,1,0,"i",27),v()}if(e&2){let t=S();E("disabled",!t.toDelete.length||t.clicked),m(),R(t.clicked?-1:1),m(),R(t.clicked?2:-1)}}var WO=(()=>{class e{$activeModal=L(Et);$api=L(rt);$router=L(Ri);$toastr=L(pt);$translate=L(ft);childBridges=[];clicked=!1;pairings=[];toDelete=[];ngOnInit(){this.loadPairings()}toggleList(t){this.toDelete.includes(t)?this.toDelete=this.toDelete.filter(i=>i!==t):this.toDelete.push(t)}cleanBridges(){return this.clicked=!0,this.$api.delete("/server/pairings/accessories",{body:this.toDelete.map(t=>({id:t}))}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("reset.accessory_ind.done"),this.$translate.instant("toast.title_success")),this.$activeModal.close(),this.$router.navigate(["/restart"],{queryParams:{restarting:!0}})},error:t=>{this.clicked=!1,console.error(t),this.$toastr.error(this.$translate.instant("reset.accessory_ind.fail"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadPairings(){return pe(this,null,function*(){try{this.pairings=(yield je(this.$api.get("/server/pairings"))).filter(t=>t._category==="bridge"&&!t._main&&this.childBridges.find(i=>i.username===t._username)).sort((t,i)=>t.name.localeCompare(i.name))}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("settings.unpair_bridge.load_error"),this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ce({type:e,selectors:[["ng-component"]],inputs:{childBridges:"childBridges"},decls:17,vars:12,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"disabled"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-circle-check","primary-text",2,"font-size","75px"],[1,"mb-0","text-center"],[1,"fas","fa-fw","fa-broom","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"grey-text"],[1,"fas","fa-fw","fa-link",3,"ngClass"],[1,"font-monospace"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled","ngClass"],[1,"fas","fa-fw",3,"ngClass"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"]],template:function(i,r){i&1&&(y(0,"div",0)(1,"div",1)(2,"h5",2),M(3),A(4,"translate"),v(),y(5,"button",3),A(6,"translate"),Z("click",function(){return r.dismissModal()}),v()(),y(7,"div",4),j(8,gie,5,3),j(9,yie,12,6),v(),y(10,"div",5)(11,"div",6),j(12,vie,3,4,"button",7),v(),y(13,"div",8),j(14,bie,3,3,"button",9),v(),y(15,"div",10),j(16,Iie,3,3,"button",11),v()()()),i&2&&(m(3),se(V(4,8,"child_bridge.reset_accessories")),m(2),E("disabled",r.clicked),me("aria-label",V(6,10,"form.button_close")),m(3),R(r.pairings.length===0?8:-1),m(),R(r.pairings.length>0?9:-1),m(3),R(r.pairings.length>0?12:-1),m(2),R(r.pairings.length===0?14:-1),m(2),R(r.pairings.length>0?16:-1))},dependencies:[si,Tt],encapsulation:2})}return e})();var KO=st(V1(),1),JO=st(j1(),1),YO=st(R1(),1),XO=st($s(),1);var Sie=e=>({prefix:e}),$ie=e=>({link:e}),GO=(e,n,t,i)=>({"fa-circle-o":e,"fa-spinner fa-pulse":n,"fa-check-circle green-text":t,"fa-times-circle red-text":i}),Eie=(e,n,t)=>({"fa-circle-o":e,"fa-spinner fa-pulse":n,"fa-times-circle red-text":t});function Tie(e,n){e&1&&(y(0,"li"),M(1),A(2,"translate"),v()),e&2&&(m(),se(V(2,1,"plugins.manage.scoped.process")))}function Pie(e,n){e&1&&(q(0,"li",8),A(1,"translate"),y(2,"li"),M(3),A(4,"translate"),v()),e&2&&(E("innerHTML",V(1,2,"plugins.manage.scoped.windows"),Ke),m(3),se(V(4,4,"plugins.manage.manual_update_command")))}function Oie(e,n){if(e&1&&(y(0,"pre",9),M(1),v()),e&2){let t=S();m(),ec(`hb-service stop
46
- npm install -g `,t.plugin.newHbScope.to,"@",t.plugin.newHbScope.switch,`
47
- npm uninstall -g `,t.plugin.newHbScope.from,`
48
- hb-service start`)}}function Mie(e,n){if(e&1&&(y(0,"div",10)(1,"ul",18)(2,"li"),q(3,"i",19),M(4),A(5,"translate"),y(6,"span",20),M(7),v()(),y(8,"li"),q(9,"i",19),M(10),A(11,"translate"),y(12,"span",20),M(13),v()(),y(14,"li"),q(15,"i",19),M(16),A(17,"translate"),v()()()),e&2){let t=S();m(3),E("ngClass",aa(14,GO,!t.installing&&!t.installed&&!t.failure,t.installing,t.installed&&!t.failure,!t.installed&&t.failure)),m(),ie(" ",V(5,8,"plugins.manage.install")," "),m(3),se(t.plugin.newHbScope.to),m(2),E("ngClass",aa(19,GO,!t.uninstalling&&!t.uninstalled&&!t.failure,t.uninstalling,t.uninstalled&&!t.failure,!t.uninstalled&&t.failure)),m(),ie(" ",V(11,10,"plugins.manage.uninstall")," "),m(3),se(t.plugin.newHbScope.from),m(2),E("ngClass",ai(24,Eie,!t.restarting&&!t.failure,t.restarting,t.failure)),m(),ie(" ",V(17,12,"menu.hbrestart.title")," ")}}function kie(e,n){if(e&1){let t=ue();y(0,"div",11)(1,"p"),M(2),A(3,"translate"),v(),y(4,"p",20),M(5),v(),y(6,"button",21),Z("click",function(){Y(t);let r=S();return X(r.downloadLogFile())}),M(7),A(8,"translate"),v()()}if(e&2){let t=S();m(2),se(V(3,3,"plugins.manage.scoped.error")),m(3),se(t.failure),m(2),se(V(8,5,"form.button_download"))}}function Aie(e,n){if(e&1){let t=ue();y(0,"button",22),A(1,"translate"),Z("click",function(){Y(t);let r=S();return X(r.dismissModal())}),M(2),A(3,"translate"),v()}if(e&2){let t=S();E("disabled",t.installing||t.uninstalling||t.restarting),me("aria-label",V(1,3,"form.button_close")),m(2),ie(" ",V(3,5,"form.button_close")," ")}}function Die(e,n){if(e&1){let t=ue();y(0,"button",22),A(1,"translate"),Z("click",function(){Y(t);let r=S();return X(r.dismissModal())}),M(2),A(3,"translate"),v()}if(e&2){let t=S();E("disabled",t.installing||t.uninstalling||t.restarting),me("aria-label",V(1,3,"form.button_close")),m(2),ie(" ",V(3,5,"form.button_close")," ")}}function Nie(e,n){e&1&&(y(0,"span"),M(1),A(2,"translate"),v()),e&2&&(m(),ie(" ",V(2,1,"form.button_continue")," "))}function Fie(e,n){e&1&&q(0,"i",24)}function qie(e,n){if(e&1){let t=ue();y(0,"button",23),Z("click",function(){Y(t);let r=S();return X(r.doSwitch())}),j(1,Nie,3,3,"span"),j(2,Fie,1,0,"i",24),v()}if(e&2){let t=S();E("disabled",t.installing||t.uninstalling||t.restarting||!t.onlineUpdateOk||t.failure),m(),R(!t.installing&&!t.uninstalling&&!t.restarting?1:-1),m(),R((t.installing||t.uninstalling||t.restarting)&&!t.failure?2:-1)}}var ZO=(()=>{class e{$activeModal=L(Et);$api=L(rt);$router=L(Ri);$settings=L(Pt);$toastr=L(pt);$translate=L(ft);$ws=L(Br);io;term;termTarget;fitAddon=new KO.FitAddon;webLinksAddon=new JO.WebLinksAddon;errorLog="";plugin;installing=!1;installed=!1;uninstalling=!1;uninstalled=!1;restarting=!1;failure="";onlineUpdateOk;moreInfo='<a href="https://github.com/homebridge/plugins/wiki/Scoped-Plugins" target="_blank"><i class="fa fa-fw fa-external-link-alt primary-text"></i></a>';prefix='<span class="font-monospace">@homebridge-plugins/</span>';constructor(){this.term=new YO.Terminal({theme:{background:"#00000000",foreground:this.$settings.actualLightingMode==="light"?"#333333":"#eeeeee",cursor:"#d2d2d2",selectionBackground:"#d2d2d2"},allowTransparency:!0,allowProposedApi:!0}),this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}ngOnInit(){this.onlineUpdateOk=this.$settings.env.platform!=="win32",this.io=this.$ws.connectToNamespace("plugins"),this.termTarget=document.getElementById("plugin-output"),this.term.open(this.termTarget),this.fitAddon.fit(),this.io.socket.on("stdout",t=>{this.term.write(t);let i=t.toString().replace(/\x1B\[(\d{1,3}(;\d{1,2})?)?[mGK]/g,"").trimEnd();i&&(this.errorLog+=`${i}\r
49
- `)})}doSwitch(){this.installing=!0,this.io.request("install",{name:this.plugin.newHbScope.to,version:this.plugin.newHbScope.switch,termCols:this.term.cols,termRows:this.term.rows}).subscribe({next:()=>{this.installing=!1,this.installed=!0,this.uninstalling=!0,this.io.request("uninstall",{name:this.plugin.newHbScope.from,termCols:this.term.cols,termRows:this.term.rows}).subscribe({next:()=>{this.uninstalling=!1,this.uninstalled=!0,this.restarting=!0,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>{this.$activeModal.close(),this.$router.navigate(["/restart"])},error:t=>{this.restarting=!1,this.failure=t.message,console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})},error:t=>{this.uninstalling=!1,this.failure=t.message,console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})},error:t=>{this.installing=!1,this.failure=t.message,console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}downloadLogFile(){let t=new Blob([this.errorLog],{type:"text/plain;charset=utf-8"});(0,XO.saveAs)(t,`${this.plugin.name}-error.log`)}ngOnDestroy(){this.io.end(),this.term.dispose()}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ce({type:e,selectors:[["ng-component"]],inputs:{plugin:"plugin"},decls:31,vars:31,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"mb-3","text-center"],[1,"fas","fa-fw","fa-arrow-right-arrow-left","primary-text",2,"font-size","75px"],[1,"mb-0"],[3,"innerHTML"],[1,"mt-3","mb-0"],[1,"text-center"],[1,"alert","alert-error","mb-0"],["id","plugin-output",1,"mb-0",3,"hidden"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"d-inline-block","text-start","mt-3","mb-3",2,"list-style-type","none"],[1,"fa","fa-fw",3,"ngClass"],[1,"font-monospace"],[1,"btn","btn-primary","mb-0",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"]],template:function(i,r){i&1&&(y(0,"div",0)(1,"div",1)(2,"h5",2),M(3),A(4,"translate"),v(),y(5,"button",3),A(6,"translate"),Z("click",function(){return r.dismissModal()}),v()(),y(7,"div",4)(8,"div",5),q(9,"i",6),v(),y(10,"ul",7),q(11,"li",8),A(12,"translate"),y(13,"li"),M(14),A(15,"translate"),v(),q(16,"li",8),A(17,"translate"),j(18,Tie,3,3,"li"),j(19,Pie,5,6),v(),j(20,Oie,2,3,"pre",9),j(21,Mie,18,28,"div",10),j(22,kie,9,7,"div",11),q(23,"div",12),v(),y(24,"div",13)(25,"div",14),j(26,Aie,4,7,"button",15),v(),y(27,"div",10),j(28,Die,4,7,"button",15),v(),y(29,"div",16),j(30,qie,3,3,"button",17),v()()()),i&2&&(m(3),se(V(4,15,"plugins.manage.scoped.switch")),m(2),E("disabled",r.installing||r.uninstalling||r.restarting),me("aria-label",V(6,17,"form.button_close")),m(6),E("innerHTML",At(12,19,"plugins.manage.scoped.info_1",xi(27,Sie,r.prefix)),Ke),m(3),se(V(15,22,"plugins.manage.scoped_message")),m(2),E("innerHTML",At(17,24,"plugins.manage.scoped.info_2",xi(29,$ie,r.moreInfo)),Ke),m(2),R(r.onlineUpdateOk?18:-1),m(),R(r.onlineUpdateOk?-1:19),m(),R(r.onlineUpdateOk?-1:20),m(),R(r.onlineUpdateOk?21:-1),m(),R(r.failure?22:-1),m(),E("hidden",!r.onlineUpdateOk||r.failure),m(3),R(r.onlineUpdateOk?26:-1),m(2),R(r.onlineUpdateOk?-1:28),m(2),R(r.onlineUpdateOk?30:-1))},dependencies:[si,Tt],styles:["#plugin-output[_ngcontent-%COMP%]{height:150px;overflow-y:auto;overflow-x:hidden}"]})}return e})();var Vie=e=>({pluginName:e}),jie=e=>({count:e});function Rie(e,n){e&1&&(y(0,"div",5),q(1,"i",13),v())}function Bie(e,n){e&1&&(M(0),A(1,"translate")),e&2&&ie(" ",V(1,1,"plugins.uninstall_remove_child_bridge")," ")}function Lie(e,n){if(e&1&&(M(0),A(1,"translate")),e&2){let t=S(4);ie(" ",At(1,1,"plugins.uninstall_remove_child_bridges",xi(4,jie,t.childBridges.length))," ")}}function zie(e,n){if(e&1){let t=ue();y(0,"label",24)(1,"input",25),ct("ngModelChange",function(r){Y(t);let a=S(3);return ut(a.removeChildBridges,r)||(a.removeChildBridges=r),X(r)}),v(),j(2,Bie,2,3),j(3,Lie,2,6),q(4,"span",23),v()}if(e&2){let t=S(3);m(),lt("ngModel",t.removeChildBridges),m(),R(t.childBridges.length===1?2:-1),m(),R(t.childBridges.length>1?3:-1)}}function Uie(e,n){if(e&1){let t=ue();y(0,"p",16)(1,"label",21)(2,"input",22),ct("ngModelChange",function(r){Y(t);let a=S(2);return ut(a.removeConfig,r)||(a.removeConfig=r),X(r)}),v(),M(3),A(4,"translate"),q(5,"span",23),v(),j(6,zie,5,3,"label",24),v()}if(e&2){let t=S(2);m(2),lt("ngModel",t.removeConfig),m(),ie(" ",V(4,3,"plugins.uninstall_remove_plugin_config")," "),m(3),R(t.hasChildBridges?6:-1)}}function Hie(e,n){e&1&&(y(0,"ul",17)(1,"li"),M(2),A(3,"translate"),v(),y(4,"li"),M(5),A(6,"translate"),v()()),e&2&&(m(2),se(V(3,2,"plugins.uninstall_warn_1")),m(3),se(V(6,4,"plugins.uninstall_warn_2")))}function Wie(e,n){e&1&&(y(0,"ngb-alert",18),M(1),A(2,"translate"),v()),e&2&&(E("dismissible",!1),m(),ie(" ",V(2,2,"plugins.uninstall_remove_config_required")," "))}function Gie(e,n){if(e&1&&(y(0,"div",14),q(1,"i",15),v(),y(2,"div",9),j(3,Uie,7,5,"p",16),v(),j(4,Hie,7,6,"ul",17),j(5,Wie,3,4,"ngb-alert",18),y(6,"ngb-alert",19)(7,"p",20),M(8),A(9,"translate"),v()()),e&2){let t=S();m(3),R(t.isConfigured?3:-1),m(),R(t.hasChildBridges&&t.removeChildBridges?4:-1),m(),R(t.isConfigured&&(!t.pluginAlias||!t.pluginType)?5:-1),m(),E("dismissible",!1),m(2),se(At(9,5,"plugins.uninstall_remove_confirmation",xi(8,Vie,t.plugin.displayName)))}}function Kie(e,n){e&1&&(M(0),A(1,"translate")),e&2&&ie(" ",V(1,1,"plugins.manage.uninstall")," ")}function Jie(e,n){e&1&&q(0,"i",12)}var QO=(()=>{class e{$activeModal=L(Et);$api=L(rt);$modal=L(en);$settings=L(Pt);$toastr=L(pt);$translate=L(ft);plugin;childBridges;action;loading=!0;uninstalling=!1;removeConfig=!0;removeChildBridges=!0;hasChildBridges=!1;isConfigured=!1;pluginType;pluginAlias;ngOnInit(){return pe(this,null,function*(){try{this.childBridges.length&&(this.hasChildBridges=!0);let t=yield this.getAlias();this.pluginType=t.pluginType,this.pluginAlias=t.pluginAlias,(yield je(this.$api.get(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`))).length&&(this.isConfigured=!0)}finally{this.loading=!1}})}doUninstall(){return pe(this,null,function*(){if(this.uninstalling=!0,this.removeConfig&&this.isConfigured)try{yield this.removePluginConfig()}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("plugins.config.remove_error"),this.$translate.instant("toast.title_error"))}if(this.hasChildBridges&&this.removeChildBridges)try{yield Promise.all(this.childBridges.map(i=>this.removeChildBridge(i.username.replace(/:/g,""))))}catch(i){console.error(i)}this.$activeModal.dismiss();let t=this.$modal.open(Za,{size:"lg",backdrop:"static"});t.componentInstance.action="Uninstall",t.componentInstance.pluginName=this.plugin.name,t.componentInstance.pluginDisplayName=this.plugin.displayName})}dismissModal(){this.$activeModal.dismiss("Dismiss")}getAlias(){return pe(this,null,function*(){return je(this.$api.get(`/plugins/alias/${encodeURIComponent(this.plugin.name)}`))})}removePluginConfig(){return pe(this,null,function*(){yield je(this.$api.post(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`,[])),yield je(this.$api.put(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}/enable`,{})),this.$toastr.success(this.$translate.instant("plugins.settings.plugin_config_saved"),this.$translate.instant("toast.title_success"))})}removeChildBridge(t){return pe(this,null,function*(){try{yield je(this.$api.delete(`/server/pairings/${t}`))}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("plugins.uninstall_bridge_error"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Ce({type:e,selectors:[["ng-component"]],inputs:{plugin:"plugin",childBridges:"childBridges",action:"action"},decls:20,vars:17,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","disabled"],[1,"modal-body"],[1,"text-center","primary-text"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-trash","primary-text",2,"font-size","75px"],[1,"d-inline-block","text-start","mb-1"],[1,"mb-3","text-start"],["type","info",1,"mb-3",3,"dismissible"],["type","warning",1,"mb-0",3,"dismissible"],[1,"mb-0"],["for","remove-plugin-config",1,"hb-uix-switch","d-block"],["id","remove-plugin-config","type","checkbox",3,"ngModelChange","ngModel"],[1,"hb-uix-slider","hb-uix-round"],["for","remove-plugin-child-bridges",1,"hb-uix-switch","d-block"],["id","remove-plugin-child-bridges","type","checkbox",3,"ngModelChange","ngModel"]],template:function(i,r){i&1&&(y(0,"div",0)(1,"div",1)(2,"h5",2),M(3),v(),y(4,"button",3),A(5,"translate"),Z("click",function(){return r.dismissModal()}),v()(),y(6,"div",4),j(7,Rie,2,0,"div",5),j(8,Gie,10,10),v(),y(9,"div",6)(10,"div",7)(11,"button",8),A(12,"translate"),Z("click",function(){return r.dismissModal()}),M(13),A(14,"translate"),v()(),q(15,"div",9),y(16,"div",10)(17,"button",11),Z("click",function(){return r.doUninstall()}),j(18,Kie,2,3),j(19,Jie,1,0,"i",12),v()()()()),i&2&&(m(3),se(r.plugin.displayName||r.plugin.name),m(),E("disabled",r.uninstalling),me("aria-label",V(5,11,"form.button_close")),m(3),R(r.loading?7:-1),m(),R(r.loading?-1:8),m(3),E("disabled",r.uninstalling),me("aria-label",V(12,13,"form.button_close")),m(2),ie(" ",V(14,15,"form.button_close")," "),m(4),E("disabled",r.loading||r.uninstalling),m(),R(r.uninstalling?-1:18),m(),R(r.uninstalling?19:-1))},dependencies:[Ii,qr,In,wi,la,Tt],encapsulation:2})}return e})();var no=(()=>{class e{$api=L(rt);$modal=L(en);$customPluginsService=L(CO);$settings=L(Pt);$toastr=L(pt);$translate=L(ft);installPlugin(t,i){let r=this.$modal.open(Za,{size:"lg",backdrop:"static"});r.componentInstance.action="Install",r.componentInstance.pluginName=t.name,r.componentInstance.pluginDisplayName=t.displayName,r.componentInstance.targetVersion=i}uninstallPlugin(t,i){let r=this.$modal.open(QO,{size:"lg",backdrop:"static"});r.componentInstance.action="Uninstall",r.componentInstance.plugin=t,r.componentInstance.childBridges=i}checkAndUpdatePlugin(t,i){return pe(this,null,function*(){(yield this.checkHbAndNodeVersion(t,"update"))&&(yield this.updatePlugin(t,i))})}updatePlugin(t,i){return pe(this,null,function*(){let r=this.$modal.open(Za,{size:"lg",backdrop:"static"});r.componentInstance.action="Update",r.componentInstance.pluginName=t.name,r.componentInstance.pluginDisplayName=t.displayName,r.componentInstance.targetVersion=i,r.componentInstance.latestVersion=t.latestVersion,r.componentInstance.installedVersion=t.installedVersion,r.componentInstance.isDisabled=t.disabled})}upgradeHomebridge(t,i){return pe(this,null,function*(){if(!(yield this.checkHbAndNodeVersion(t,"update")))return;let r=this.$modal.open(Za,{size:"lg",backdrop:"static"});r.componentInstance.action="Update",r.componentInstance.pluginName=t.name,r.componentInstance.pluginDisplayName=t.displayName,r.componentInstance.targetVersion=i,r.componentInstance.latestVersion=t.latestVersion,r.componentInstance.installedVersion=t.installedVersion})}installAlternateVersion(t){return pe(this,null,function*(){let i=this.$modal.open(kO,{size:"lg",backdrop:"static"});i.componentInstance.plugin=t;try{let{action:r,version:a,engines:l}=yield i.result;return(yield this.checkHbAndNodeVersion(at(ye({},t),{updateEngines:l}),r))?t.name==="homebridge"?yield this.upgradeHomebridge(t,a):t.installedVersion?yield this.updatePlugin(t,a):this.installPlugin(t,a):void 0}catch{}})}bridgeSettings(t,i=!1){return pe(this,null,function*(){let r;if(t.settingsSchema)try{r=yield this.loadConfigSchema(t.name)}catch(l){console.error(l),this.$toastr.error(this.$translate.instant("plugins.toast_failed_to_load_plugin_schema"),this.$translate.instant("toast.title_error"));return}let a=this.$modal.open(NO,{size:"lg",backdrop:"static"});a.componentInstance.schema=r,a.componentInstance.plugin=t,a.componentInstance.justInstalled=i})}settings(t){return pe(this,null,function*(){let i;if(t.settingsSchema)try{i=yield this.loadConfigSchema(t.name)}catch(a){console.error(a),this.$toastr.error(this.$translate.instant("plugins.toast_failed_to_load_plugin_schema"),this.$translate.instant("toast.title_error"));return}if(i&&i.customUi)return this.$customPluginsService.openCustomSettingsUi(t,i);if(this.$customPluginsService.plugins[t.name])return this.$customPluginsService.openSettings(t,i);let r=this.$modal.open(t.settingsSchema?HO:C0,{size:"lg",backdrop:"static"});return r.componentInstance.schema=i,r.componentInstance.plugin=t,r.result.catch(()=>{})})}jsonEditor(t){return pe(this,null,function*(){let i;if(t.settingsSchema)try{i=yield this.loadConfigSchema(t.name)}catch(a){console.error(a)}let r=this.$modal.open(C0,{size:"lg",backdrop:"static"});return r.componentInstance.schema=i,r.componentInstance.plugin=t,r.result.catch(a=>console.error(a))})}checkHbAndNodeVersion(t,i){return pe(this,null,function*(){let r=!0,a=!0;try{t.updateEngines?.node&&(0,Qa.lt)(this.$settings.env.nodeVersion,(0,Qa.minVersion)(t.updateEngines.node))&&(r=!1),t.updateEngines?.homebridge&&(0,Qa.lt)(this.$settings.env.homebridgeVersion,(0,Qa.minVersion)(t.updateEngines.homebridge))&&(a=!1)}catch(l){return console.error(l),this.$toastr.error(l.message,this.$translate.instant("toast.title_error")),!1}if(!r||!a)try{let l=this.$modal.open(qO,{size:"lg",backdrop:"static"});return l.componentInstance.plugin=t,l.componentInstance.isValidNode=r,l.componentInstance.isValidHb=a,l.componentInstance.action=i,yield l.result}catch{return!1}return!0})}loadConfigSchema(t){return pe(this,null,function*(){return je(this.$api.get(`/plugins/config-schema/${encodeURIComponent(t)}`))})}resetChildBridges(t){return pe(this,null,function*(){let i=this.$modal.open(WO,{size:"lg",backdrop:"static"});i.componentInstance.childBridges=t})}switchToScoped(t){return pe(this,null,function*(){let i=this.$modal.open(ZO,{size:"lg",backdrop:"static"});i.componentInstance.plugin=t})}static \u0275fac=function(i){return new(i||e)};static \u0275prov=Kn({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{QS as a,_0 as b,Gt as c,Oue as d,Rt as e,mO as f,_O as g,h0 as h,See as i,yO as j,CO as k,wO as l,SO as m,no as n};