homebridge-config-ui-x 5.0.0-beta.3 → 5.0.0-beta.5
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.
- package/CHANGELOG.md +8 -5
- package/README.md +6 -8
- package/package.json +2 -3
- package/public/assets/plugin-ui-utils/ui.js +38 -19
- package/public/assets/plugin-ui-utils/ui.js.map +1 -1
- package/public/{chunk-AVJ6EUEE.js → chunk-3YKYXC2T.js} +1 -1
- package/public/{chunk-I7ZKPCIW.js → chunk-4DLA2ICF.js} +1 -1
- package/public/{chunk-LDPCT3YF.js → chunk-4WTXJHZA.js} +1 -1
- package/public/chunk-5HCG4CER.js +1 -0
- package/public/{chunk-ASX35H47.js → chunk-5S4H26Y6.js} +1 -1
- package/public/{chunk-JL6S5IIU.js → chunk-5XU3C2P2.js} +1 -1
- package/public/{chunk-KO3WJGGG.js → chunk-6I6PSM5Y.js} +1 -1
- package/public/{chunk-KTDJZCFW.js → chunk-72QXF2GF.js} +1 -1
- package/public/{chunk-UYZI56PX.js → chunk-74VT5JYS.js} +1 -1
- package/public/{chunk-O75YP3SB.js → chunk-7DTAFWJ7.js} +1 -1
- package/public/{chunk-VMXGERJT.js → chunk-7JR63ERC.js} +1 -1
- package/public/{chunk-U6ORTLYL.js → chunk-7K5J3AOO.js} +1 -1
- package/public/{chunk-WMB35VCS.js → chunk-A7YWFX6I.js} +1 -1
- package/public/{chunk-S6EMLS5Q.js → chunk-BIDQZJXT.js} +1 -1
- package/public/{chunk-7L7RZCFC.js → chunk-BNVAYTYZ.js} +1 -1
- package/public/{chunk-2OBHR63W.js → chunk-BVDMEFSJ.js} +1 -1
- package/public/chunk-BVK7NCGF.js +1 -0
- package/public/{chunk-AZXQ73I5.js → chunk-CNJMINEX.js} +1 -1
- package/public/{chunk-VOBHY2IH.js → chunk-D6RX5SPU.js} +1 -1
- package/public/chunk-DNLDZVVB.js +1 -0
- package/public/{chunk-RHB2T3FE.js → chunk-F3EORWUJ.js} +1 -1
- package/public/{chunk-IPZ4P5DE.js → chunk-G4CGNDAD.js} +1 -1
- package/public/{chunk-ZLPCX4R4.js → chunk-G4TRVUCL.js} +1 -1
- package/public/{chunk-6PHMBMFU.js → chunk-GETFKFI6.js} +1 -1
- package/public/chunk-I544XQGS.js +1 -0
- package/public/{chunk-ZY7HKZ4P.js → chunk-J26JMISE.js} +1 -1
- package/public/chunk-J3XWQZ5N.js +1 -0
- package/public/{chunk-MHYIZZN4.js → chunk-JBM7KQHD.js} +1 -1
- package/public/{chunk-UZU6PLTW.js → chunk-KJHDP3ZC.js} +1 -1
- package/public/{chunk-5ALXJOLQ.js → chunk-KPVA6CSL.js} +1 -1
- package/public/{chunk-S62KH3FN.js → chunk-LBTLF3MZ.js} +1 -1
- package/public/{chunk-3C6WVST7.js → chunk-LQ6YDB4A.js} +1 -1
- package/public/chunk-M3N7PSSC.js +1 -0
- package/public/{chunk-RWZRB2OY.js → chunk-MP3LZHQU.js} +1 -1
- package/public/chunk-MSXXP7RE.js +1 -0
- package/public/{chunk-76S7LYCL.js → chunk-OZ6IXX3E.js} +1 -1
- package/public/{chunk-77A3OZ74.js → chunk-QOKEWT7C.js} +1 -1
- package/public/chunk-RD4QIA6H.js +1 -0
- package/public/{chunk-XH6GEPB6.js → chunk-RN75UMGP.js} +1 -1
- package/public/{chunk-AX23H5TL.js → chunk-S3XAJEVU.js} +1 -1
- package/public/{chunk-UZW3DWH4.js → chunk-SIQ2FHQL.js} +1 -1
- package/public/{chunk-BFDVOBTQ.js → chunk-SJHJKPSQ.js} +1 -1
- package/public/chunk-TWQP6XJT.js +1 -0
- package/public/{chunk-SVFFEV36.js → chunk-UC2NMLJ6.js} +1 -1
- package/public/chunk-UCB7UE24.js +1 -0
- package/public/{chunk-NF4NIS42.js → chunk-UFDZ4SFB.js} +1 -1
- package/public/{chunk-IW3EPSTZ.js → chunk-W4MTVPF3.js} +1 -1
- package/public/{chunk-DZY2Q3FG.js → chunk-WJNSNBGE.js} +1 -1
- package/public/chunk-WRDG5DTE.js +1 -0
- package/public/chunk-XDGJOFX2.js +1 -0
- package/public/{chunk-T2YVB4SI.js → chunk-XEVIOBJR.js} +1 -1
- package/public/{chunk-MOV2HTCQ.js → chunk-XNCOF5TV.js} +1 -1
- package/public/{chunk-Q5URFHBE.js → chunk-XXJO3JY3.js} +1 -1
- package/public/chunk-YJ7ICNKX.js +1 -0
- package/public/{chunk-RO4QXVDE.js → chunk-Z7AUXG5E.js} +1 -1
- package/public/chunk-ZBNZILWV.js +1 -0
- package/public/{chunk-QRZNMAFL.js → chunk-ZHMC7KSZ.js} +1 -1
- package/public/{chunk-FX4GQIE4.js → chunk-ZJ4LBIOD.js} +3 -3
- package/public/{chunk-DNOJWLVY.js → chunk-ZYZBMA5E.js} +1 -1
- package/public/index.html +2 -2
- package/public/main-TQOXBTSD.js +1 -0
- package/public/media/fa-brands-400-6PJPV6JM.woff2 +0 -0
- package/public/media/{fa-brands-400-MVB2B5XM.ttf → fa-brands-400-KOKGDU7E.ttf} +0 -0
- package/public/media/{fa-regular-400-EGQOOADX.ttf → fa-regular-400-IPMAEX5Y.ttf} +0 -0
- package/public/media/fa-regular-400-OHB6J4OK.woff2 +0 -0
- package/public/media/fa-solid-900-ABTK6BNK.woff2 +0 -0
- package/public/media/{fa-solid-900-ZUDIWQL5.ttf → fa-solid-900-SRFFQLRM.ttf} +0 -0
- package/public/styles-EG5MFQEM.css +1 -0
- package/public/chunk-5LVGHH2N.js +0 -1
- package/public/chunk-7456RB3C.js +0 -1
- package/public/chunk-7EANS226.js +0 -1
- package/public/chunk-BMXAHMY6.js +0 -1
- package/public/chunk-CW7Q7WEJ.js +0 -1
- package/public/chunk-DDXIRKVB.js +0 -1
- package/public/chunk-GVDR7ZRB.js +0 -1
- package/public/chunk-IWYEH4T6.js +0 -1
- package/public/chunk-KIJWUGXX.js +0 -1
- package/public/chunk-ODPTCLGS.js +0 -1
- package/public/chunk-QLWY5NWN.js +0 -1
- package/public/chunk-RMI35HIS.js +0 -1
- package/public/chunk-UJU3NPS7.js +0 -1
- package/public/chunk-WT2GX4NS.js +0 -1
- package/public/main-ILTX7GFO.js +0 -1
- package/public/media/fa-brands-400-6U3GU5Y7.woff2 +0 -0
- package/public/media/fa-regular-400-R5EOMW4H.woff2 +0 -0
- package/public/media/fa-solid-900-W65KEJAS.woff2 +0 -0
- package/public/styles-GDLSHXGD.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as At,b as GF}from"./chunk-VMXGERJT.js";import{a as Is}from"./chunk-7EUQWCP5.js";import{a as Qu,b as Xu}from"./chunk-WNWWUCCZ.js";import{a as As,b as Qi}from"./chunk-7L7RZCFC.js";import{a as ws}from"./chunk-QE7DO6J3.js";import{a as ys,b as vs}from"./chunk-BKUGARB4.js";import{a as io}from"./chunk-WHJOLAED.js";import{a as xs}from"./chunk-JZZQRLNW.js";import{a as Bs}from"./chunk-KQJ7ONUG.js";import{a as an,b as sn,c as ln,d as dn,e as cn,f as pn,g as Ju,m as he,n as Re,o as Zu}from"./chunk-ORPWYWCL.js";import{a as Fs,b as Uu,c as Wu,e as Dt,f as Cs,h as hs,i as gs,k as Es,l as fu,m as bs,o as Gu,r as Dn,s as Ji,t as Zi,x as _s,y as wt,z as uo}from"./chunk-QHPDGSZ6.js";import{a as Ku}from"./chunk-6PHMBMFU.js";import{d as iu}from"./chunk-NZNNTHFQ.js";import{a as ms}from"./chunk-BFDVOBTQ.js";import{b as ke}from"./chunk-SVFFEV36.js";import{a as uu,b as oe,j as de}from"./chunk-CW7Q7WEJ.js";import{e as ps}from"./chunk-UG5DK2RQ.js";import{a as le,b as Ce}from"./chunk-3IX3CLER.js";import{$b as H,Aa as fs,Ac as to,Bc as y,Cc as B,D as us,Dc as ot,Eb as Xf,Fa as et,Ga as ns,Gb as Yf,Hc as cs,Ja as Jf,Kb as $,Lb as U,M as Wf,Mb as h,Nb as xt,Ob as zu,Pb as J,Qb as Ds,Rb as A,Tb as tt,Ub as ut,Vb as it,Wb as d,Xb as c,Yb as w,Zb as as,_ as eo,_b as ss,a as Q,ad as jt,b as ve,ba as Wi,bd as wu,cc as O,cd as ft,db as Fe,dc as C,e as F,g as Oe,ga as is,gb as rs,h as W,ha as Bt,hc as en,ia as Gf,ib as s,ic as tn,id as rn,jb as ce,jc as un,k as Xa,kc as fn,lc as nn,ma as Kf,mb as Zf,md as on,n as mt,na as S,nc as E,oc as z,pc as V,q as Ya,qc as Me,rb as K,rc as ls,sb as Qf,sc as Ie,tb as Lu,tc as Se,ub as os,uc as $e,v as es,vc as ds,w as ne,wa as Gi,wc as qe,x as ts,xa as N,xc as Ki,ya as q,yc as Hu,zc as xu}from"./chunk-TXOB7R5K.js";var $s=F((tN,Ss)=>{function JF(){this.__data__=[],this.size=0}Ss.exports=JF});var mn=F((uN,ks)=>{function ZF(e,u){return e===u||e!==e&&u!==u}ks.exports=ZF});var Xi=F((iN,Ts)=>{var QF=mn();function XF(e,u){for(var t=e.length;t--;)if(QF(e[t][0],u))return t;return-1}Ts.exports=XF});var Os=F((fN,Ps)=>{var YF=Xi(),eC=Array.prototype,tC=eC.splice;function uC(e){var u=this.__data__,t=YF(u,e);if(t<0)return!1;var i=u.length-1;return t==i?u.pop():tC.call(u,t,1),--this.size,!0}Ps.exports=uC});var js=F((nN,Ms)=>{var iC=Xi();function fC(e){var u=this.__data__,t=iC(u,e);return t<0?void 0:u[t][1]}Ms.exports=fC});var qs=F((rN,Ns)=>{var nC=Xi();function rC(e){return nC(this.__data__,e)>-1}Ns.exports=rC});var Rs=F((oN,Vs)=>{var oC=Xi();function DC(e,u){var t=this.__data__,i=oC(t,e);return i<0?(++this.size,t.push([e,u])):t[i][1]=u,this}Vs.exports=DC});var Yi=F((DN,Ls)=>{var aC=$s(),sC=Os(),lC=js(),dC=qs(),cC=Rs();function Yu(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}Yu.prototype.clear=aC;Yu.prototype.delete=sC;Yu.prototype.get=lC;Yu.prototype.has=dC;Yu.prototype.set=cC;Ls.exports=Yu});var Hs=F((aN,zs)=>{var pC=Yi();function mC(){this.__data__=new pC,this.size=0}zs.exports=mC});var Ws=F((sN,Us)=>{function FC(e){var u=this.__data__,t=u.delete(e);return this.size=u.size,t}Us.exports=FC});var Ks=F((lN,Gs)=>{function CC(e){return this.__data__.get(e)}Gs.exports=CC});var Zs=F((dN,Js)=>{function hC(e){return this.__data__.has(e)}Js.exports=hC});var fo=F((cN,Qs)=>{var gC=typeof global=="object"&&global&&global.Object===Object&&global;Qs.exports=gC});var It=F((pN,Xs)=>{var EC=fo(),bC=typeof self=="object"&&self&&self.Object===Object&&self,_C=EC||bC||Function("return this")();Xs.exports=_C});var ei=F((mN,Ys)=>{var yC=It(),vC=yC.Symbol;Ys.exports=vC});var i0=F((FN,u0)=>{var e0=ei(),t0=Object.prototype,BC=t0.hasOwnProperty,xC=t0.toString,ef=e0?e0.toStringTag:void 0;function wC(e){var u=BC.call(e,ef),t=e[ef];try{e[ef]=void 0;var i=!0}catch{}var f=xC.call(e);return i&&(u?e[ef]=t:delete e[ef]),f}u0.exports=wC});var n0=F((CN,f0)=>{var AC=Object.prototype,IC=AC.toString;function SC(e){return IC.call(e)}f0.exports=SC});var Au=F((hN,D0)=>{var r0=ei(),$C=i0(),kC=n0(),TC="[object Null]",PC="[object Undefined]",o0=r0?r0.toStringTag:void 0;function OC(e){return e==null?e===void 0?PC:TC:o0&&o0 in Object(e)?$C(e):kC(e)}D0.exports=OC});var Iu=F((gN,a0)=>{function MC(e){var u=typeof e;return e!=null&&(u=="object"||u=="function")}a0.exports=MC});var no=F((EN,s0)=>{var jC=Au(),NC=Iu(),qC="[object AsyncFunction]",VC="[object Function]",RC="[object GeneratorFunction]",LC="[object Proxy]";function zC(e){if(!NC(e))return!1;var u=jC(e);return u==VC||u==RC||u==qC||u==LC}s0.exports=zC});var d0=F((bN,l0)=>{var HC=It(),UC=HC["__core-js_shared__"];l0.exports=UC});var m0=F((_N,p0)=>{var ro=d0(),c0=function(){var e=/[^.]+$/.exec(ro&&ro.keys&&ro.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function WC(e){return!!c0&&c0 in e}p0.exports=WC});var oo=F((yN,F0)=>{var GC=Function.prototype,KC=GC.toString;function JC(e){if(e!=null){try{return KC.call(e)}catch{}try{return e+""}catch{}}return""}F0.exports=JC});var h0=F((vN,C0)=>{var ZC=no(),QC=m0(),XC=Iu(),YC=oo(),e4=/[\\^$.*+?()[\]{}|]/g,t4=/^\[object .+?Constructor\]$/,u4=Function.prototype,i4=Object.prototype,f4=u4.toString,n4=i4.hasOwnProperty,r4=RegExp("^"+f4.call(n4).replace(e4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function o4(e){if(!XC(e)||QC(e))return!1;var u=ZC(e)?r4:t4;return u.test(YC(e))}C0.exports=o4});var E0=F((BN,g0)=>{function D4(e,u){return e==null?void 0:e[u]}g0.exports=D4});var ru=F((xN,b0)=>{var a4=h0(),s4=E0();function l4(e,u){var t=s4(e,u);return a4(t)?t:void 0}b0.exports=l4});var Fn=F((wN,_0)=>{var d4=ru(),c4=It(),p4=d4(c4,"Map");_0.exports=p4});var tf=F((AN,y0)=>{var m4=ru(),F4=m4(Object,"create");y0.exports=F4});var x0=F((IN,B0)=>{var v0=tf();function C4(){this.__data__=v0?v0(null):{},this.size=0}B0.exports=C4});var A0=F((SN,w0)=>{function h4(e){var u=this.has(e)&&delete this.__data__[e];return this.size-=u?1:0,u}w0.exports=h4});var S0=F(($N,I0)=>{var g4=tf(),E4="__lodash_hash_undefined__",b4=Object.prototype,_4=b4.hasOwnProperty;function y4(e){var u=this.__data__;if(g4){var t=u[e];return t===E4?void 0:t}return _4.call(u,e)?u[e]:void 0}I0.exports=y4});var k0=F((kN,$0)=>{var v4=tf(),B4=Object.prototype,x4=B4.hasOwnProperty;function w4(e){var u=this.__data__;return v4?u[e]!==void 0:x4.call(u,e)}$0.exports=w4});var P0=F((TN,T0)=>{var A4=tf(),I4="__lodash_hash_undefined__";function S4(e,u){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=A4&&u===void 0?I4:u,this}T0.exports=S4});var M0=F((PN,O0)=>{var $4=x0(),k4=A0(),T4=S0(),P4=k0(),O4=P0();function ti(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}ti.prototype.clear=$4;ti.prototype.delete=k4;ti.prototype.get=T4;ti.prototype.has=P4;ti.prototype.set=O4;O0.exports=ti});var q0=F((ON,N0)=>{var j0=M0(),M4=Yi(),j4=Fn();function N4(){this.size=0,this.__data__={hash:new j0,map:new(j4||M4),string:new j0}}N0.exports=N4});var R0=F((MN,V0)=>{function q4(e){var u=typeof e;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?e!=="__proto__":e===null}V0.exports=q4});var uf=F((jN,L0)=>{var V4=R0();function R4(e,u){var t=e.__data__;return V4(u)?t[typeof u=="string"?"string":"hash"]:t.map}L0.exports=R4});var H0=F((NN,z0)=>{var L4=uf();function z4(e){var u=L4(this,e).delete(e);return this.size-=u?1:0,u}z0.exports=z4});var W0=F((qN,U0)=>{var H4=uf();function U4(e){return H4(this,e).get(e)}U0.exports=U4});var K0=F((VN,G0)=>{var W4=uf();function G4(e){return W4(this,e).has(e)}G0.exports=G4});var Z0=F((RN,J0)=>{var K4=uf();function J4(e,u){var t=K4(this,e),i=t.size;return t.set(e,u),this.size+=t.size==i?0:1,this}J0.exports=J4});var Cn=F((LN,Q0)=>{var Z4=q0(),Q4=H0(),X4=W0(),Y4=K0(),e5=Z0();function ui(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}ui.prototype.clear=Z4;ui.prototype.delete=Q4;ui.prototype.get=X4;ui.prototype.has=Y4;ui.prototype.set=e5;Q0.exports=ui});var Y0=F((zN,X0)=>{var t5=Yi(),u5=Fn(),i5=Cn(),f5=200;function n5(e,u){var t=this.__data__;if(t instanceof t5){var i=t.__data__;if(!u5||i.length<f5-1)return i.push([e,u]),this.size=++t.size,this;t=this.__data__=new i5(i)}return t.set(e,u),this.size=t.size,this}X0.exports=n5});var hn=F((HN,e1)=>{var r5=Yi(),o5=Hs(),D5=Ws(),a5=Ks(),s5=Zs(),l5=Y0();function ii(e){var u=this.__data__=new r5(e);this.size=u.size}ii.prototype.clear=o5;ii.prototype.delete=D5;ii.prototype.get=a5;ii.prototype.has=s5;ii.prototype.set=l5;e1.exports=ii});var u1=F((UN,t1)=>{function d5(e,u){for(var t=-1,i=e==null?0:e.length;++t<i&&u(e[t],t,e)!==!1;);return e}t1.exports=d5});var f1=F((WN,i1)=>{var c5=ru(),p5=function(){try{var e=c5(Object,"defineProperty");return e({},"",{}),e}catch{}}();i1.exports=p5});var Do=F((GN,r1)=>{var n1=f1();function m5(e,u,t){u=="__proto__"&&n1?n1(e,u,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[u]=t}r1.exports=m5});var ao=F((KN,o1)=>{var F5=Do(),C5=mn(),h5=Object.prototype,g5=h5.hasOwnProperty;function E5(e,u,t){var i=e[u];(!(g5.call(e,u)&&C5(i,t))||t===void 0&&!(u in e))&&F5(e,u,t)}o1.exports=E5});var ff=F((JN,D1)=>{var b5=ao(),_5=Do();function y5(e,u,t,i){var f=!t;t||(t={});for(var n=-1,r=u.length;++n<r;){var o=u[n],D=i?i(t[o],e[o],o,t,e):void 0;D===void 0&&(D=e[o]),f?_5(t,o,D):b5(t,o,D)}return t}D1.exports=y5});var s1=F((ZN,a1)=>{function v5(e,u){for(var t=-1,i=Array(e);++t<e;)i[t]=u(t);return i}a1.exports=v5});var Ht=F((QN,l1)=>{function B5(e){return e!=null&&typeof e=="object"}l1.exports=B5});var c1=F((XN,d1)=>{var x5=Au(),w5=Ht(),A5="[object Arguments]";function I5(e){return w5(e)&&x5(e)==A5}d1.exports=I5});var so=F((YN,F1)=>{var p1=c1(),S5=Ht(),m1=Object.prototype,$5=m1.hasOwnProperty,k5=m1.propertyIsEnumerable,T5=p1(function(){return arguments}())?p1:function(e){return S5(e)&&$5.call(e,"callee")&&!k5.call(e,"callee")};F1.exports=T5});var Ft=F((eq,C1)=>{var P5=Array.isArray;C1.exports=P5});var g1=F((tq,h1)=>{function O5(){return!1}h1.exports=O5});var gn=F((nf,fi)=>{var M5=It(),j5=g1(),_1=typeof nf=="object"&&nf&&!nf.nodeType&&nf,E1=_1&&typeof fi=="object"&&fi&&!fi.nodeType&&fi,N5=E1&&E1.exports===_1,b1=N5?M5.Buffer:void 0,q5=b1?b1.isBuffer:void 0,V5=q5||j5;fi.exports=V5});var lo=F((uq,y1)=>{var R5=9007199254740991,L5=/^(?:0|[1-9]\d*)$/;function z5(e,u){var t=typeof e;return u=u==null?R5:u,!!u&&(t=="number"||t!="symbol"&&L5.test(e))&&e>-1&&e%1==0&&e<u}y1.exports=z5});var En=F((iq,v1)=>{var H5=9007199254740991;function U5(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=H5}v1.exports=U5});var x1=F((fq,B1)=>{var W5=Au(),G5=En(),K5=Ht(),J5="[object Arguments]",Z5="[object Array]",Q5="[object Boolean]",X5="[object Date]",Y5="[object Error]",eh="[object Function]",th="[object Map]",uh="[object Number]",ih="[object Object]",fh="[object RegExp]",nh="[object Set]",rh="[object String]",oh="[object WeakMap]",Dh="[object ArrayBuffer]",ah="[object DataView]",sh="[object Float32Array]",lh="[object Float64Array]",dh="[object Int8Array]",ch="[object Int16Array]",ph="[object Int32Array]",mh="[object Uint8Array]",Fh="[object Uint8ClampedArray]",Ch="[object Uint16Array]",hh="[object Uint32Array]",Be={};Be[sh]=Be[lh]=Be[dh]=Be[ch]=Be[ph]=Be[mh]=Be[Fh]=Be[Ch]=Be[hh]=!0;Be[J5]=Be[Z5]=Be[Dh]=Be[Q5]=Be[ah]=Be[X5]=Be[Y5]=Be[eh]=Be[th]=Be[uh]=Be[ih]=Be[fh]=Be[nh]=Be[rh]=Be[oh]=!1;function gh(e){return K5(e)&&G5(e.length)&&!!Be[W5(e)]}B1.exports=gh});var bn=F((nq,w1)=>{function Eh(e){return function(u){return e(u)}}w1.exports=Eh});var _n=F((rf,ni)=>{var bh=fo(),A1=typeof rf=="object"&&rf&&!rf.nodeType&&rf,of=A1&&typeof ni=="object"&&ni&&!ni.nodeType&&ni,_h=of&&of.exports===A1,co=_h&&bh.process,yh=function(){try{var e=of&&of.require&&of.require("util").types;return e||co&&co.binding&&co.binding("util")}catch{}}();ni.exports=yh});var po=F((rq,$1)=>{var vh=x1(),Bh=bn(),I1=_n(),S1=I1&&I1.isTypedArray,xh=S1?Bh(S1):vh;$1.exports=xh});var mo=F((oq,k1)=>{var wh=s1(),Ah=so(),Ih=Ft(),Sh=gn(),$h=lo(),kh=po(),Th=Object.prototype,Ph=Th.hasOwnProperty;function Oh(e,u){var t=Ih(e),i=!t&&Ah(e),f=!t&&!i&&Sh(e),n=!t&&!i&&!f&&kh(e),r=t||i||f||n,o=r?wh(e.length,String):[],D=o.length;for(var a in e)(u||Ph.call(e,a))&&!(r&&(a=="length"||f&&(a=="offset"||a=="parent")||n&&(a=="buffer"||a=="byteLength"||a=="byteOffset")||$h(a,D)))&&o.push(a);return o}k1.exports=Oh});var yn=F((Dq,T1)=>{var Mh=Object.prototype;function jh(e){var u=e&&e.constructor,t=typeof u=="function"&&u.prototype||Mh;return e===t}T1.exports=jh});var Fo=F((aq,P1)=>{function Nh(e,u){return function(t){return e(u(t))}}P1.exports=Nh});var M1=F((sq,O1)=>{var qh=Fo(),Vh=qh(Object.keys,Object);O1.exports=Vh});var N1=F((lq,j1)=>{var Rh=yn(),Lh=M1(),zh=Object.prototype,Hh=zh.hasOwnProperty;function Uh(e){if(!Rh(e))return Lh(e);var u=[];for(var t in Object(e))Hh.call(e,t)&&t!="constructor"&&u.push(t);return u}j1.exports=Uh});var Df=F((dq,q1)=>{var Wh=no(),Gh=En();function Kh(e){return e!=null&&Gh(e.length)&&!Wh(e)}q1.exports=Kh});var ri=F((cq,V1)=>{var Jh=mo(),Zh=N1(),Qh=Df();function Xh(e){return Qh(e)?Jh(e):Zh(e)}V1.exports=Xh});var L1=F((pq,R1)=>{var Yh=ff(),eg=ri();function tg(e,u){return e&&Yh(u,eg(u),e)}R1.exports=tg});var H1=F((mq,z1)=>{function ug(e){var u=[];if(e!=null)for(var t in Object(e))u.push(t);return u}z1.exports=ug});var W1=F((Fq,U1)=>{var ig=Iu(),fg=yn(),ng=H1(),rg=Object.prototype,og=rg.hasOwnProperty;function Dg(e){if(!ig(e))return ng(e);var u=fg(e),t=[];for(var i in e)i=="constructor"&&(u||!og.call(e,i))||t.push(i);return t}U1.exports=Dg});var vn=F((Cq,G1)=>{var ag=mo(),sg=W1(),lg=Df();function dg(e){return lg(e)?ag(e,!0):sg(e)}G1.exports=dg});var J1=F((hq,K1)=>{var cg=ff(),pg=vn();function mg(e,u){return e&&cg(u,pg(u),e)}K1.exports=mg});var el=F((af,oi)=>{var Fg=It(),Y1=typeof af=="object"&&af&&!af.nodeType&&af,Z1=Y1&&typeof oi=="object"&&oi&&!oi.nodeType&&oi,Cg=Z1&&Z1.exports===Y1,Q1=Cg?Fg.Buffer:void 0,X1=Q1?Q1.allocUnsafe:void 0;function hg(e,u){if(u)return e.slice();var t=e.length,i=X1?X1(t):new e.constructor(t);return e.copy(i),i}oi.exports=hg});var ul=F((gq,tl)=>{function gg(e,u){var t=-1,i=e.length;for(u||(u=Array(i));++t<i;)u[t]=e[t];return u}tl.exports=gg});var Co=F((Eq,il)=>{function Eg(e,u){for(var t=-1,i=e==null?0:e.length,f=0,n=[];++t<i;){var r=e[t];u(r,t,e)&&(n[f++]=r)}return n}il.exports=Eg});var ho=F((bq,fl)=>{function bg(){return[]}fl.exports=bg});var Bn=F((_q,rl)=>{var _g=Co(),yg=ho(),vg=Object.prototype,Bg=vg.propertyIsEnumerable,nl=Object.getOwnPropertySymbols,xg=nl?function(e){return e==null?[]:(e=Object(e),_g(nl(e),function(u){return Bg.call(e,u)}))}:yg;rl.exports=xg});var Dl=F((yq,ol)=>{var wg=ff(),Ag=Bn();function Ig(e,u){return wg(e,Ag(e),u)}ol.exports=Ig});var go=F((vq,al)=>{function Sg(e,u){for(var t=-1,i=u.length,f=e.length;++t<i;)e[f+t]=u[t];return e}al.exports=Sg});var xn=F((Bq,sl)=>{var $g=Fo(),kg=$g(Object.getPrototypeOf,Object);sl.exports=kg});var Eo=F((xq,ll)=>{var Tg=go(),Pg=xn(),Og=Bn(),Mg=ho(),jg=Object.getOwnPropertySymbols,Ng=jg?function(e){for(var u=[];e;)Tg(u,Og(e)),e=Pg(e);return u}:Mg;ll.exports=Ng});var cl=F((wq,dl)=>{var qg=ff(),Vg=Eo();function Rg(e,u){return qg(e,Vg(e),u)}dl.exports=Rg});var bo=F((Aq,pl)=>{var Lg=go(),zg=Ft();function Hg(e,u,t){var i=u(e);return zg(e)?i:Lg(i,t(e))}pl.exports=Hg});var _o=F((Iq,ml)=>{var Ug=bo(),Wg=Bn(),Gg=ri();function Kg(e){return Ug(e,Gg,Wg)}ml.exports=Kg});var Cl=F((Sq,Fl)=>{var Jg=bo(),Zg=Eo(),Qg=vn();function Xg(e){return Jg(e,Qg,Zg)}Fl.exports=Xg});var gl=F(($q,hl)=>{var Yg=ru(),e6=It(),t6=Yg(e6,"DataView");hl.exports=t6});var bl=F((kq,El)=>{var u6=ru(),i6=It(),f6=u6(i6,"Promise");El.exports=f6});var yl=F((Tq,_l)=>{var n6=ru(),r6=It(),o6=n6(r6,"Set");_l.exports=o6});var Bl=F((Pq,vl)=>{var D6=ru(),a6=It(),s6=D6(a6,"WeakMap");vl.exports=s6});var sf=F((Oq,kl)=>{var yo=gl(),vo=Fn(),Bo=bl(),xo=yl(),wo=Bl(),$l=Au(),Di=oo(),xl="[object Map]",l6="[object Object]",wl="[object Promise]",Al="[object Set]",Il="[object WeakMap]",Sl="[object DataView]",d6=Di(yo),c6=Di(vo),p6=Di(Bo),m6=Di(xo),F6=Di(wo),Su=$l;(yo&&Su(new yo(new ArrayBuffer(1)))!=Sl||vo&&Su(new vo)!=xl||Bo&&Su(Bo.resolve())!=wl||xo&&Su(new xo)!=Al||wo&&Su(new wo)!=Il)&&(Su=function(e){var u=$l(e),t=u==l6?e.constructor:void 0,i=t?Di(t):"";if(i)switch(i){case d6:return Sl;case c6:return xl;case p6:return wl;case m6:return Al;case F6:return Il}return u});kl.exports=Su});var Pl=F((Mq,Tl)=>{var C6=Object.prototype,h6=C6.hasOwnProperty;function g6(e){var u=e.length,t=new e.constructor(u);return u&&typeof e[0]=="string"&&h6.call(e,"index")&&(t.index=e.index,t.input=e.input),t}Tl.exports=g6});var Ao=F((jq,Ol)=>{var E6=It(),b6=E6.Uint8Array;Ol.exports=b6});var wn=F((Nq,jl)=>{var Ml=Ao();function _6(e){var u=new e.constructor(e.byteLength);return new Ml(u).set(new Ml(e)),u}jl.exports=_6});var ql=F((qq,Nl)=>{var y6=wn();function v6(e,u){var t=u?y6(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}Nl.exports=v6});var Rl=F((Vq,Vl)=>{var B6=/\w*$/;function x6(e){var u=new e.constructor(e.source,B6.exec(e));return u.lastIndex=e.lastIndex,u}Vl.exports=x6});var Wl=F((Rq,Ul)=>{var Ll=ei(),zl=Ll?Ll.prototype:void 0,Hl=zl?zl.valueOf:void 0;function w6(e){return Hl?Object(Hl.call(e)):{}}Ul.exports=w6});var Kl=F((Lq,Gl)=>{var A6=wn();function I6(e,u){var t=u?A6(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}Gl.exports=I6});var Zl=F((zq,Jl)=>{var S6=wn(),$6=ql(),k6=Rl(),T6=Wl(),P6=Kl(),O6="[object Boolean]",M6="[object Date]",j6="[object Map]",N6="[object Number]",q6="[object RegExp]",V6="[object Set]",R6="[object String]",L6="[object Symbol]",z6="[object ArrayBuffer]",H6="[object DataView]",U6="[object Float32Array]",W6="[object Float64Array]",G6="[object Int8Array]",K6="[object Int16Array]",J6="[object Int32Array]",Z6="[object Uint8Array]",Q6="[object Uint8ClampedArray]",X6="[object Uint16Array]",Y6="[object Uint32Array]";function eE(e,u,t){var i=e.constructor;switch(u){case z6:return S6(e);case O6:case M6:return new i(+e);case H6:return $6(e,t);case U6:case W6:case G6:case K6:case J6:case Z6:case Q6:case X6:case Y6:return P6(e,t);case j6:return new i;case N6:case R6:return new i(e);case q6:return k6(e);case V6:return new i;case L6:return T6(e)}}Jl.exports=eE});var Yl=F((Hq,Xl)=>{var tE=Iu(),Ql=Object.create,uE=function(){function e(){}return function(u){if(!tE(u))return{};if(Ql)return Ql(u);e.prototype=u;var t=new e;return e.prototype=void 0,t}}();Xl.exports=uE});var t3=F((Uq,e3)=>{var iE=Yl(),fE=xn(),nE=yn();function rE(e){return typeof e.constructor=="function"&&!nE(e)?iE(fE(e)):{}}e3.exports=rE});var i3=F((Wq,u3)=>{var oE=sf(),DE=Ht(),aE="[object Map]";function sE(e){return DE(e)&&oE(e)==aE}u3.exports=sE});var o3=F((Gq,r3)=>{var lE=i3(),dE=bn(),f3=_n(),n3=f3&&f3.isMap,cE=n3?dE(n3):lE;r3.exports=cE});var a3=F((Kq,D3)=>{var pE=sf(),mE=Ht(),FE="[object Set]";function CE(e){return mE(e)&&pE(e)==FE}D3.exports=CE});var c3=F((Jq,d3)=>{var hE=a3(),gE=bn(),s3=_n(),l3=s3&&s3.isSet,EE=l3?gE(l3):hE;d3.exports=EE});var h3=F((Zq,C3)=>{var bE=hn(),_E=u1(),yE=ao(),vE=L1(),BE=J1(),xE=el(),wE=ul(),AE=Dl(),IE=cl(),SE=_o(),$E=Cl(),kE=sf(),TE=Pl(),PE=Zl(),OE=t3(),ME=Ft(),jE=gn(),NE=o3(),qE=Iu(),VE=c3(),RE=ri(),LE=vn(),zE=1,HE=2,UE=4,p3="[object Arguments]",WE="[object Array]",GE="[object Boolean]",KE="[object Date]",JE="[object Error]",m3="[object Function]",ZE="[object GeneratorFunction]",QE="[object Map]",XE="[object Number]",F3="[object Object]",YE="[object RegExp]",eb="[object Set]",tb="[object String]",ub="[object Symbol]",ib="[object WeakMap]",fb="[object ArrayBuffer]",nb="[object DataView]",rb="[object Float32Array]",ob="[object Float64Array]",Db="[object Int8Array]",ab="[object Int16Array]",sb="[object Int32Array]",lb="[object Uint8Array]",db="[object Uint8ClampedArray]",cb="[object Uint16Array]",pb="[object Uint32Array]",_e={};_e[p3]=_e[WE]=_e[fb]=_e[nb]=_e[GE]=_e[KE]=_e[rb]=_e[ob]=_e[Db]=_e[ab]=_e[sb]=_e[QE]=_e[XE]=_e[F3]=_e[YE]=_e[eb]=_e[tb]=_e[ub]=_e[lb]=_e[db]=_e[cb]=_e[pb]=!0;_e[JE]=_e[m3]=_e[ib]=!1;function An(e,u,t,i,f,n){var r,o=u&zE,D=u&HE,a=u&UE;if(t&&(r=f?t(e,i,f,n):t(e)),r!==void 0)return r;if(!qE(e))return e;var l=ME(e);if(l){if(r=TE(e),!o)return wE(e,r)}else{var m=kE(e),p=m==m3||m==ZE;if(jE(e))return xE(e,o);if(m==F3||m==p3||p&&!f){if(r=D||p?{}:OE(e),!o)return D?IE(e,BE(r,e)):AE(e,vE(r,e))}else{if(!_e[m])return f?e:{};r=PE(e,m,o)}}n||(n=new bE);var b=n.get(e);if(b)return b;n.set(e,r),VE(e)?e.forEach(function(v){r.add(An(v,u,t,v,e,n))}):NE(e)&&e.forEach(function(v,I){r.set(I,An(v,u,t,I,e,n))});var g=a?D?$E:SE:D?LE:RE,_=l?void 0:g(e);return _E(_||e,function(v,I){_&&(I=v,v=e[I]),yE(r,I,An(v,u,t,I,e,n))}),r}C3.exports=An});var E3=F((Qq,g3)=>{var mb=h3(),Fb=1,Cb=4;function hb(e){return mb(e,Fb|Cb)}g3.exports=hb});var _3=F((Xq,b3)=>{var gb="__lodash_hash_undefined__";function Eb(e){return this.__data__.set(e,gb),this}b3.exports=Eb});var v3=F((Yq,y3)=>{function bb(e){return this.__data__.has(e)}y3.exports=bb});var x3=F((eV,B3)=>{var _b=Cn(),yb=_3(),vb=v3();function In(e){var u=-1,t=e==null?0:e.length;for(this.__data__=new _b;++u<t;)this.add(e[u])}In.prototype.add=In.prototype.push=yb;In.prototype.has=vb;B3.exports=In});var A3=F((tV,w3)=>{function Bb(e,u){for(var t=-1,i=e==null?0:e.length;++t<i;)if(u(e[t],t,e))return!0;return!1}w3.exports=Bb});var S3=F((uV,I3)=>{function xb(e,u){return e.has(u)}I3.exports=xb});var Io=F((iV,$3)=>{var wb=x3(),Ab=A3(),Ib=S3(),Sb=1,$b=2;function kb(e,u,t,i,f,n){var r=t&Sb,o=e.length,D=u.length;if(o!=D&&!(r&&D>o))return!1;var a=n.get(e),l=n.get(u);if(a&&l)return a==u&&l==e;var m=-1,p=!0,b=t&$b?new wb:void 0;for(n.set(e,u),n.set(u,e);++m<o;){var g=e[m],_=u[m];if(i)var v=r?i(_,g,m,u,e,n):i(g,_,m,e,u,n);if(v!==void 0){if(v)continue;p=!1;break}if(b){if(!Ab(u,function(I,P){if(!Ib(b,P)&&(g===I||f(g,I,t,i,n)))return b.push(P)})){p=!1;break}}else if(!(g===_||f(g,_,t,i,n))){p=!1;break}}return n.delete(e),n.delete(u),p}$3.exports=kb});var T3=F((fV,k3)=>{function Tb(e){var u=-1,t=Array(e.size);return e.forEach(function(i,f){t[++u]=[f,i]}),t}k3.exports=Tb});var O3=F((nV,P3)=>{function Pb(e){var u=-1,t=Array(e.size);return e.forEach(function(i){t[++u]=i}),t}P3.exports=Pb});var V3=F((rV,q3)=>{var M3=ei(),j3=Ao(),Ob=mn(),Mb=Io(),jb=T3(),Nb=O3(),qb=1,Vb=2,Rb="[object Boolean]",Lb="[object Date]",zb="[object Error]",Hb="[object Map]",Ub="[object Number]",Wb="[object RegExp]",Gb="[object Set]",Kb="[object String]",Jb="[object Symbol]",Zb="[object ArrayBuffer]",Qb="[object DataView]",N3=M3?M3.prototype:void 0,So=N3?N3.valueOf:void 0;function Xb(e,u,t,i,f,n,r){switch(t){case Qb:if(e.byteLength!=u.byteLength||e.byteOffset!=u.byteOffset)return!1;e=e.buffer,u=u.buffer;case Zb:return!(e.byteLength!=u.byteLength||!n(new j3(e),new j3(u)));case Rb:case Lb:case Ub:return Ob(+e,+u);case zb:return e.name==u.name&&e.message==u.message;case Wb:case Kb:return e==u+"";case Hb:var o=jb;case Gb:var D=i&qb;if(o||(o=Nb),e.size!=u.size&&!D)return!1;var a=r.get(e);if(a)return a==u;i|=Vb,r.set(e,u);var l=Mb(o(e),o(u),i,f,n,r);return r.delete(e),l;case Jb:if(So)return So.call(e)==So.call(u)}return!1}q3.exports=Xb});var z3=F((oV,L3)=>{var R3=_o(),Yb=1,e_=Object.prototype,t_=e_.hasOwnProperty;function u_(e,u,t,i,f,n){var r=t&Yb,o=R3(e),D=o.length,a=R3(u),l=a.length;if(D!=l&&!r)return!1;for(var m=D;m--;){var p=o[m];if(!(r?p in u:t_.call(u,p)))return!1}var b=n.get(e),g=n.get(u);if(b&&g)return b==u&&g==e;var _=!0;n.set(e,u),n.set(u,e);for(var v=r;++m<D;){p=o[m];var I=e[p],P=u[p];if(i)var R=r?i(P,I,p,u,e,n):i(I,P,p,e,u,n);if(!(R===void 0?I===P||f(I,P,t,i,n):R)){_=!1;break}v||(v=p=="constructor")}if(_&&!v){var L=e.constructor,M=u.constructor;L!=M&&"constructor"in e&&"constructor"in u&&!(typeof L=="function"&&L instanceof L&&typeof M=="function"&&M instanceof M)&&(_=!1)}return n.delete(e),n.delete(u),_}L3.exports=u_});var Q3=F((DV,Z3)=>{var $o=hn(),i_=Io(),f_=V3(),n_=z3(),H3=sf(),U3=Ft(),W3=gn(),r_=po(),o_=1,G3="[object Arguments]",K3="[object Array]",Sn="[object Object]",D_=Object.prototype,J3=D_.hasOwnProperty;function a_(e,u,t,i,f,n){var r=U3(e),o=U3(u),D=r?K3:H3(e),a=o?K3:H3(u);D=D==G3?Sn:D,a=a==G3?Sn:a;var l=D==Sn,m=a==Sn,p=D==a;if(p&&W3(e)){if(!W3(u))return!1;r=!0,l=!1}if(p&&!l)return n||(n=new $o),r||r_(e)?i_(e,u,t,i,f,n):f_(e,u,D,t,i,f,n);if(!(t&o_)){var b=l&&J3.call(e,"__wrapped__"),g=m&&J3.call(u,"__wrapped__");if(b||g){var _=b?e.value():e,v=g?u.value():u;return n||(n=new $o),f(_,v,t,i,n)}}return p?(n||(n=new $o),n_(e,u,t,i,f,n)):!1}Z3.exports=a_});var $n=F((aV,ed)=>{var s_=Q3(),X3=Ht();function Y3(e,u,t,i,f){return e===u?!0:e==null||u==null||!X3(e)&&!X3(u)?e!==e&&u!==u:s_(e,u,t,i,Y3,f)}ed.exports=Y3});var ud=F((sV,td)=>{var l_=$n();function d_(e,u){return l_(e,u)}td.exports=d_});var cf=F(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.regexpCode=ae.getEsmExportName=ae.getProperty=ae.safeStringify=ae.stringify=ae.strConcat=ae.addCodeArg=ae.str=ae._=ae.nil=ae._Code=ae.Name=ae.IDENTIFIER=ae._CodeOrName=void 0;var lf=class{};ae._CodeOrName=lf;ae.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var $u=class extends lf{constructor(u){if(super(),!ae.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ae.Name=$u;var gt=class extends lf{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((t,i)=>(i instanceof $u&&(t[i.str]=(t[i.str]||0)+1),t),{})}};ae._Code=gt;ae.nil=new gt("");function id(e,...u){let t=[e[0]],i=0;for(;i<u.length;)To(t,u[i]),t.push(e[++i]);return new gt(t)}ae._=id;var ko=new gt("+");function fd(e,...u){let t=[df(e[0])],i=0;for(;i<u.length;)t.push(ko),To(t,u[i]),t.push(ko,df(e[++i]));return c_(t),new gt(t)}ae.str=fd;function To(e,u){u instanceof gt?e.push(...u._items):u instanceof $u?e.push(u):e.push(F_(u))}ae.addCodeArg=To;function c_(e){let u=1;for(;u<e.length-1;){if(e[u]===ko){let t=p_(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function p_(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof $u||e[e.length-1]!=='"'?void 0:typeof u!="string"?`${e.slice(0,-1)}${u}"`:u[0]==='"'?e.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(e instanceof $u))return`"${e}${u.slice(1)}`}function m_(e,u){return u.emptyStr()?e:e.emptyStr()?u:fd`${e}${u}`}ae.strConcat=m_;function F_(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:df(Array.isArray(e)?e.join(","):e)}function C_(e){return new gt(df(e))}ae.stringify=C_;function df(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ae.safeStringify=df;function h_(e){return typeof e=="string"&&ae.IDENTIFIER.test(e)?new gt(`.${e}`):id`[${e}]`}ae.getProperty=h_;function g_(e){if(typeof e=="string"&&ae.IDENTIFIER.test(e))return new gt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ae.getEsmExportName=g_;function E_(e){return new gt(e.toString())}ae.regexpCode=E_});var Mo=F(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.ValueScope=st.ValueScopeName=st.Scope=st.varKinds=st.UsedValueState=void 0;var at=cf(),Po=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},kn=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(kn||(st.UsedValueState=kn={}));st.varKinds={const:new at.Name("const"),let:new at.Name("let"),var:new at.Name("var")};var Tn=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof at.Name?u:this.name(u)}name(u){return new at.Name(this._newName(u))}_newName(u){let t=this._names[u]||this._nameGroup(u);return`${u}${t.index++}`}_nameGroup(u){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}};st.Scope=Tn;var Pn=class extends at.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,at._)`.${new at.Name(t)}[${i}]`}};st.ValueScopeName=Pn;var b_=(0,at._)`\n`,Oo=class extends Tn{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=ve(Q({},u),{_n:u.lines?b_:at.nil})}get(){return this._scope}name(u){return new Pn(u,this._newName(u))}value(u,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let f=this.toName(u),{prefix:n}=f,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[n];if(o){let l=o.get(r);if(l)return l}else o=this._values[n]=new Map;o.set(r,f);let D=this._scope[n]||(this._scope[n]=[]),a=D.length;return D[a]=t.ref,f.setValue(t,{property:n,itemIndex:a}),f}getValue(u,t){let i=this._values[u];if(i)return i.get(t)}scopeRefs(u,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,at._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,f=>{if(f.value===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return f.value.code},t,i)}_reduceValues(u,t,i={},f){let n=at.nil;for(let r in u){let o=u[r];if(!o)continue;let D=i[r]=i[r]||new Map;o.forEach(a=>{if(D.has(a))return;D.set(a,kn.Started);let l=t(a);if(l){let m=this.opts.es5?st.varKinds.var:st.varKinds.const;n=(0,at._)`${n}${m} ${a} = ${l};${this.opts._n}`}else if(l=f==null?void 0:f(a))n=(0,at._)`${n}${l}${this.opts._n}`;else throw new Po(a);D.set(a,kn.Completed)})}return n}};st.ValueScope=Oo});var ue=F(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.or=te.and=te.not=te.CodeGen=te.operators=te.varKinds=te.ValueScopeName=te.ValueScope=te.Scope=te.Name=te.regexpCode=te.stringify=te.getProperty=te.nil=te.strConcat=te.str=te._=void 0;var re=cf(),St=Mo(),ou=cf();Object.defineProperty(te,"_",{enumerable:!0,get:function(){return ou._}});Object.defineProperty(te,"str",{enumerable:!0,get:function(){return ou.str}});Object.defineProperty(te,"strConcat",{enumerable:!0,get:function(){return ou.strConcat}});Object.defineProperty(te,"nil",{enumerable:!0,get:function(){return ou.nil}});Object.defineProperty(te,"getProperty",{enumerable:!0,get:function(){return ou.getProperty}});Object.defineProperty(te,"stringify",{enumerable:!0,get:function(){return ou.stringify}});Object.defineProperty(te,"regexpCode",{enumerable:!0,get:function(){return ou.regexpCode}});Object.defineProperty(te,"Name",{enumerable:!0,get:function(){return ou.Name}});var qn=Mo();Object.defineProperty(te,"Scope",{enumerable:!0,get:function(){return qn.Scope}});Object.defineProperty(te,"ValueScope",{enumerable:!0,get:function(){return qn.ValueScope}});Object.defineProperty(te,"ValueScopeName",{enumerable:!0,get:function(){return qn.ValueScopeName}});Object.defineProperty(te,"varKinds",{enumerable:!0,get:function(){return qn.varKinds}});te.operators={GT:new re._Code(">"),GTE:new re._Code(">="),LT:new re._Code("<"),LTE:new re._Code("<="),EQ:new re._Code("==="),NEQ:new re._Code("!=="),NOT:new re._Code("!"),OR:new re._Code("||"),AND:new re._Code("&&"),ADD:new re._Code("+")};var Ut=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},jo=class extends Ut{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?St.varKinds.var:this.varKind,f=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${f};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=ai(this.rhs,u,t)),this}get names(){return this.rhs instanceof re._CodeOrName?this.rhs.names:{}}},Mn=class extends Ut{constructor(u,t,i){super(),this.lhs=u,this.rhs=t,this.sideEffects=i}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,t){if(!(this.lhs instanceof re.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=ai(this.rhs,u,t),this}get names(){let u=this.lhs instanceof re.Name?{}:Q({},this.lhs.names);return Nn(u,this.rhs)}},No=class extends Mn{constructor(u,t,i,f){super(u,i,f),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},qo=class extends Ut{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},Vo=class extends Ut{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},Ro=class extends Ut{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},Lo=class extends Ut{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,t){return this.code=ai(this.code,u,t),this}get names(){return this.code instanceof re._CodeOrName?this.code.names:{}}},pf=class extends Ut{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((t,i)=>t+i.render(u),"")}optimizeNodes(){let{nodes:u}=this,t=u.length;for(;t--;){let i=u[t].optimizeNodes();Array.isArray(i)?u.splice(t,1,...i):i?u[t]=i:u.splice(t,1)}return u.length>0?this:void 0}optimizeNames(u,t){let{nodes:i}=this,f=i.length;for(;f--;){let n=i[f];n.optimizeNames(u,t)||(__(u,n.names),i.splice(f,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>ku(u,t.names),{})}},Wt=class extends pf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},zo=class extends pf{},Ho=(()=>{class e extends Wt{}return e.kind="else",e})(),On=(()=>{class e extends Wt{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 f=i.optimizeNodes();i=this.else=Array.isArray(f)?new Ho(f):f}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(ad(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var f;if(this.else=(f=this.else)===null||f===void 0?void 0:f.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=ai(this.condition,t,i),this}get names(){let t=super.names;return Nn(t,this.condition),this.else&&ku(t,this.else.names),t}}return e.kind="if",e})(),Vn=(()=>{class e extends Wt{}return e.kind="for",e})(),Uo=class extends Vn{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iteration=ai(this.iteration,u,t),this}get names(){return ku(super.names,this.iteration.names)}},Wo=class extends Vn{constructor(u,t,i,f){super(),this.varKind=u,this.name=t,this.from=i,this.to=f}render(u){let t=u.es5?St.varKinds.var:this.varKind,{name:i,from:f,to:n}=this;return`for(${t} ${i}=${f}; ${i}<${n}; ${i}++)`+super.render(u)}get names(){let u=Nn(super.names,this.from);return Nn(u,this.to)}},jn=class extends Vn{constructor(u,t,i,f){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=f}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iterable=ai(this.iterable,u,t),this}get names(){return ku(super.names,this.iterable.names)}},nd=(()=>{class e extends Wt{constructor(t,i,f){super(),this.name=t,this.args=i,this.async=f}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),rd=(()=>{class e extends pf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Go=class extends Wt{render(u){let t="try"+super.render(u);return this.catch&&(t+=this.catch.render(u)),this.finally&&(t+=this.finally.render(u)),t}optimizeNodes(){var u,t;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(u,t){var i,f;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(f=this.finally)===null||f===void 0||f.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&ku(u,this.catch.names),this.finally&&ku(u,this.finally.names),u}},od=(()=>{class e extends Wt{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),Dd=(()=>{class e extends Wt{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Ko=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=ve(Q({},t),{_n:t.lines?`
|
|
1
|
+
import{a as At,b as GF}from"./chunk-7JR63ERC.js";import{a as Is}from"./chunk-7EUQWCP5.js";import{a as Qu,b as Xu}from"./chunk-WNWWUCCZ.js";import{a as As,b as Qi}from"./chunk-BNVAYTYZ.js";import{a as ws}from"./chunk-QE7DO6J3.js";import{a as ys,b as vs}from"./chunk-BKUGARB4.js";import{a as io}from"./chunk-WHJOLAED.js";import{a as xs}from"./chunk-JZZQRLNW.js";import{a as Bs}from"./chunk-KQJ7ONUG.js";import{a as an,b as sn,c as ln,d as dn,e as cn,f as pn,g as Ju,m as he,n as Re,o as Zu}from"./chunk-ORPWYWCL.js";import{a as Fs,b as Uu,c as Wu,e as Dt,f as Cs,h as hs,i as gs,k as Es,l as fu,m as bs,o as Gu,r as Dn,s as Ji,t as Zi,x as _s,y as wt,z as uo}from"./chunk-QHPDGSZ6.js";import{a as Ku}from"./chunk-GETFKFI6.js";import{d as iu}from"./chunk-NZNNTHFQ.js";import{a as ms}from"./chunk-SJHJKPSQ.js";import{b as ke}from"./chunk-UC2NMLJ6.js";import{a as uu,b as oe,j as de}from"./chunk-M3N7PSSC.js";import{e as ps}from"./chunk-UG5DK2RQ.js";import{a as le,b as Ce}from"./chunk-3IX3CLER.js";import{$b as H,Aa as fs,Ac as to,Bc as y,Cc as B,D as us,Dc as ot,Eb as Xf,Fa as et,Ga as ns,Gb as Yf,Hc as cs,Ja as Jf,Kb as $,Lb as U,M as Wf,Mb as h,Nb as xt,Ob as zu,Pb as J,Qb as Ds,Rb as A,Tb as tt,Ub as ut,Vb as it,Wb as d,Xb as c,Yb as w,Zb as as,_ as eo,_b as ss,a as Q,ad as jt,b as ve,ba as Wi,bd as wu,cc as O,cd as ft,db as Fe,dc as C,e as F,g as Oe,ga as is,gb as rs,h as W,ha as Bt,hc as en,ia as Gf,ib as s,ic as tn,id as rn,jb as ce,jc as un,k as Xa,kc as fn,lc as nn,ma as Kf,mb as Zf,md as on,n as mt,na as S,nc as E,oc as z,pc as V,q as Ya,qc as Me,rb as K,rc as ls,sb as Qf,sc as Ie,tb as Lu,tc as Se,ub as os,uc as $e,v as es,vc as ds,w as ne,wa as Gi,wc as qe,x as ts,xa as N,xc as Ki,ya as q,yc as Hu,zc as xu}from"./chunk-TXOB7R5K.js";var $s=F((tN,Ss)=>{function JF(){this.__data__=[],this.size=0}Ss.exports=JF});var mn=F((uN,ks)=>{function ZF(e,u){return e===u||e!==e&&u!==u}ks.exports=ZF});var Xi=F((iN,Ts)=>{var QF=mn();function XF(e,u){for(var t=e.length;t--;)if(QF(e[t][0],u))return t;return-1}Ts.exports=XF});var Os=F((fN,Ps)=>{var YF=Xi(),eC=Array.prototype,tC=eC.splice;function uC(e){var u=this.__data__,t=YF(u,e);if(t<0)return!1;var i=u.length-1;return t==i?u.pop():tC.call(u,t,1),--this.size,!0}Ps.exports=uC});var js=F((nN,Ms)=>{var iC=Xi();function fC(e){var u=this.__data__,t=iC(u,e);return t<0?void 0:u[t][1]}Ms.exports=fC});var qs=F((rN,Ns)=>{var nC=Xi();function rC(e){return nC(this.__data__,e)>-1}Ns.exports=rC});var Rs=F((oN,Vs)=>{var oC=Xi();function DC(e,u){var t=this.__data__,i=oC(t,e);return i<0?(++this.size,t.push([e,u])):t[i][1]=u,this}Vs.exports=DC});var Yi=F((DN,Ls)=>{var aC=$s(),sC=Os(),lC=js(),dC=qs(),cC=Rs();function Yu(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}Yu.prototype.clear=aC;Yu.prototype.delete=sC;Yu.prototype.get=lC;Yu.prototype.has=dC;Yu.prototype.set=cC;Ls.exports=Yu});var Hs=F((aN,zs)=>{var pC=Yi();function mC(){this.__data__=new pC,this.size=0}zs.exports=mC});var Ws=F((sN,Us)=>{function FC(e){var u=this.__data__,t=u.delete(e);return this.size=u.size,t}Us.exports=FC});var Ks=F((lN,Gs)=>{function CC(e){return this.__data__.get(e)}Gs.exports=CC});var Zs=F((dN,Js)=>{function hC(e){return this.__data__.has(e)}Js.exports=hC});var fo=F((cN,Qs)=>{var gC=typeof global=="object"&&global&&global.Object===Object&&global;Qs.exports=gC});var It=F((pN,Xs)=>{var EC=fo(),bC=typeof self=="object"&&self&&self.Object===Object&&self,_C=EC||bC||Function("return this")();Xs.exports=_C});var ei=F((mN,Ys)=>{var yC=It(),vC=yC.Symbol;Ys.exports=vC});var i0=F((FN,u0)=>{var e0=ei(),t0=Object.prototype,BC=t0.hasOwnProperty,xC=t0.toString,ef=e0?e0.toStringTag:void 0;function wC(e){var u=BC.call(e,ef),t=e[ef];try{e[ef]=void 0;var i=!0}catch{}var f=xC.call(e);return i&&(u?e[ef]=t:delete e[ef]),f}u0.exports=wC});var n0=F((CN,f0)=>{var AC=Object.prototype,IC=AC.toString;function SC(e){return IC.call(e)}f0.exports=SC});var Au=F((hN,D0)=>{var r0=ei(),$C=i0(),kC=n0(),TC="[object Null]",PC="[object Undefined]",o0=r0?r0.toStringTag:void 0;function OC(e){return e==null?e===void 0?PC:TC:o0&&o0 in Object(e)?$C(e):kC(e)}D0.exports=OC});var Iu=F((gN,a0)=>{function MC(e){var u=typeof e;return e!=null&&(u=="object"||u=="function")}a0.exports=MC});var no=F((EN,s0)=>{var jC=Au(),NC=Iu(),qC="[object AsyncFunction]",VC="[object Function]",RC="[object GeneratorFunction]",LC="[object Proxy]";function zC(e){if(!NC(e))return!1;var u=jC(e);return u==VC||u==RC||u==qC||u==LC}s0.exports=zC});var d0=F((bN,l0)=>{var HC=It(),UC=HC["__core-js_shared__"];l0.exports=UC});var m0=F((_N,p0)=>{var ro=d0(),c0=function(){var e=/[^.]+$/.exec(ro&&ro.keys&&ro.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function WC(e){return!!c0&&c0 in e}p0.exports=WC});var oo=F((yN,F0)=>{var GC=Function.prototype,KC=GC.toString;function JC(e){if(e!=null){try{return KC.call(e)}catch{}try{return e+""}catch{}}return""}F0.exports=JC});var h0=F((vN,C0)=>{var ZC=no(),QC=m0(),XC=Iu(),YC=oo(),e4=/[\\^$.*+?()[\]{}|]/g,t4=/^\[object .+?Constructor\]$/,u4=Function.prototype,i4=Object.prototype,f4=u4.toString,n4=i4.hasOwnProperty,r4=RegExp("^"+f4.call(n4).replace(e4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function o4(e){if(!XC(e)||QC(e))return!1;var u=ZC(e)?r4:t4;return u.test(YC(e))}C0.exports=o4});var E0=F((BN,g0)=>{function D4(e,u){return e==null?void 0:e[u]}g0.exports=D4});var ru=F((xN,b0)=>{var a4=h0(),s4=E0();function l4(e,u){var t=s4(e,u);return a4(t)?t:void 0}b0.exports=l4});var Fn=F((wN,_0)=>{var d4=ru(),c4=It(),p4=d4(c4,"Map");_0.exports=p4});var tf=F((AN,y0)=>{var m4=ru(),F4=m4(Object,"create");y0.exports=F4});var x0=F((IN,B0)=>{var v0=tf();function C4(){this.__data__=v0?v0(null):{},this.size=0}B0.exports=C4});var A0=F((SN,w0)=>{function h4(e){var u=this.has(e)&&delete this.__data__[e];return this.size-=u?1:0,u}w0.exports=h4});var S0=F(($N,I0)=>{var g4=tf(),E4="__lodash_hash_undefined__",b4=Object.prototype,_4=b4.hasOwnProperty;function y4(e){var u=this.__data__;if(g4){var t=u[e];return t===E4?void 0:t}return _4.call(u,e)?u[e]:void 0}I0.exports=y4});var k0=F((kN,$0)=>{var v4=tf(),B4=Object.prototype,x4=B4.hasOwnProperty;function w4(e){var u=this.__data__;return v4?u[e]!==void 0:x4.call(u,e)}$0.exports=w4});var P0=F((TN,T0)=>{var A4=tf(),I4="__lodash_hash_undefined__";function S4(e,u){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=A4&&u===void 0?I4:u,this}T0.exports=S4});var M0=F((PN,O0)=>{var $4=x0(),k4=A0(),T4=S0(),P4=k0(),O4=P0();function ti(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}ti.prototype.clear=$4;ti.prototype.delete=k4;ti.prototype.get=T4;ti.prototype.has=P4;ti.prototype.set=O4;O0.exports=ti});var q0=F((ON,N0)=>{var j0=M0(),M4=Yi(),j4=Fn();function N4(){this.size=0,this.__data__={hash:new j0,map:new(j4||M4),string:new j0}}N0.exports=N4});var R0=F((MN,V0)=>{function q4(e){var u=typeof e;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?e!=="__proto__":e===null}V0.exports=q4});var uf=F((jN,L0)=>{var V4=R0();function R4(e,u){var t=e.__data__;return V4(u)?t[typeof u=="string"?"string":"hash"]:t.map}L0.exports=R4});var H0=F((NN,z0)=>{var L4=uf();function z4(e){var u=L4(this,e).delete(e);return this.size-=u?1:0,u}z0.exports=z4});var W0=F((qN,U0)=>{var H4=uf();function U4(e){return H4(this,e).get(e)}U0.exports=U4});var K0=F((VN,G0)=>{var W4=uf();function G4(e){return W4(this,e).has(e)}G0.exports=G4});var Z0=F((RN,J0)=>{var K4=uf();function J4(e,u){var t=K4(this,e),i=t.size;return t.set(e,u),this.size+=t.size==i?0:1,this}J0.exports=J4});var Cn=F((LN,Q0)=>{var Z4=q0(),Q4=H0(),X4=W0(),Y4=K0(),e5=Z0();function ui(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}ui.prototype.clear=Z4;ui.prototype.delete=Q4;ui.prototype.get=X4;ui.prototype.has=Y4;ui.prototype.set=e5;Q0.exports=ui});var Y0=F((zN,X0)=>{var t5=Yi(),u5=Fn(),i5=Cn(),f5=200;function n5(e,u){var t=this.__data__;if(t instanceof t5){var i=t.__data__;if(!u5||i.length<f5-1)return i.push([e,u]),this.size=++t.size,this;t=this.__data__=new i5(i)}return t.set(e,u),this.size=t.size,this}X0.exports=n5});var hn=F((HN,e1)=>{var r5=Yi(),o5=Hs(),D5=Ws(),a5=Ks(),s5=Zs(),l5=Y0();function ii(e){var u=this.__data__=new r5(e);this.size=u.size}ii.prototype.clear=o5;ii.prototype.delete=D5;ii.prototype.get=a5;ii.prototype.has=s5;ii.prototype.set=l5;e1.exports=ii});var u1=F((UN,t1)=>{function d5(e,u){for(var t=-1,i=e==null?0:e.length;++t<i&&u(e[t],t,e)!==!1;);return e}t1.exports=d5});var f1=F((WN,i1)=>{var c5=ru(),p5=function(){try{var e=c5(Object,"defineProperty");return e({},"",{}),e}catch{}}();i1.exports=p5});var Do=F((GN,r1)=>{var n1=f1();function m5(e,u,t){u=="__proto__"&&n1?n1(e,u,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[u]=t}r1.exports=m5});var ao=F((KN,o1)=>{var F5=Do(),C5=mn(),h5=Object.prototype,g5=h5.hasOwnProperty;function E5(e,u,t){var i=e[u];(!(g5.call(e,u)&&C5(i,t))||t===void 0&&!(u in e))&&F5(e,u,t)}o1.exports=E5});var ff=F((JN,D1)=>{var b5=ao(),_5=Do();function y5(e,u,t,i){var f=!t;t||(t={});for(var n=-1,r=u.length;++n<r;){var o=u[n],D=i?i(t[o],e[o],o,t,e):void 0;D===void 0&&(D=e[o]),f?_5(t,o,D):b5(t,o,D)}return t}D1.exports=y5});var s1=F((ZN,a1)=>{function v5(e,u){for(var t=-1,i=Array(e);++t<e;)i[t]=u(t);return i}a1.exports=v5});var Ht=F((QN,l1)=>{function B5(e){return e!=null&&typeof e=="object"}l1.exports=B5});var c1=F((XN,d1)=>{var x5=Au(),w5=Ht(),A5="[object Arguments]";function I5(e){return w5(e)&&x5(e)==A5}d1.exports=I5});var so=F((YN,F1)=>{var p1=c1(),S5=Ht(),m1=Object.prototype,$5=m1.hasOwnProperty,k5=m1.propertyIsEnumerable,T5=p1(function(){return arguments}())?p1:function(e){return S5(e)&&$5.call(e,"callee")&&!k5.call(e,"callee")};F1.exports=T5});var Ft=F((eq,C1)=>{var P5=Array.isArray;C1.exports=P5});var g1=F((tq,h1)=>{function O5(){return!1}h1.exports=O5});var gn=F((nf,fi)=>{var M5=It(),j5=g1(),_1=typeof nf=="object"&&nf&&!nf.nodeType&&nf,E1=_1&&typeof fi=="object"&&fi&&!fi.nodeType&&fi,N5=E1&&E1.exports===_1,b1=N5?M5.Buffer:void 0,q5=b1?b1.isBuffer:void 0,V5=q5||j5;fi.exports=V5});var lo=F((uq,y1)=>{var R5=9007199254740991,L5=/^(?:0|[1-9]\d*)$/;function z5(e,u){var t=typeof e;return u=u==null?R5:u,!!u&&(t=="number"||t!="symbol"&&L5.test(e))&&e>-1&&e%1==0&&e<u}y1.exports=z5});var En=F((iq,v1)=>{var H5=9007199254740991;function U5(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=H5}v1.exports=U5});var x1=F((fq,B1)=>{var W5=Au(),G5=En(),K5=Ht(),J5="[object Arguments]",Z5="[object Array]",Q5="[object Boolean]",X5="[object Date]",Y5="[object Error]",eh="[object Function]",th="[object Map]",uh="[object Number]",ih="[object Object]",fh="[object RegExp]",nh="[object Set]",rh="[object String]",oh="[object WeakMap]",Dh="[object ArrayBuffer]",ah="[object DataView]",sh="[object Float32Array]",lh="[object Float64Array]",dh="[object Int8Array]",ch="[object Int16Array]",ph="[object Int32Array]",mh="[object Uint8Array]",Fh="[object Uint8ClampedArray]",Ch="[object Uint16Array]",hh="[object Uint32Array]",Be={};Be[sh]=Be[lh]=Be[dh]=Be[ch]=Be[ph]=Be[mh]=Be[Fh]=Be[Ch]=Be[hh]=!0;Be[J5]=Be[Z5]=Be[Dh]=Be[Q5]=Be[ah]=Be[X5]=Be[Y5]=Be[eh]=Be[th]=Be[uh]=Be[ih]=Be[fh]=Be[nh]=Be[rh]=Be[oh]=!1;function gh(e){return K5(e)&&G5(e.length)&&!!Be[W5(e)]}B1.exports=gh});var bn=F((nq,w1)=>{function Eh(e){return function(u){return e(u)}}w1.exports=Eh});var _n=F((rf,ni)=>{var bh=fo(),A1=typeof rf=="object"&&rf&&!rf.nodeType&&rf,of=A1&&typeof ni=="object"&&ni&&!ni.nodeType&&ni,_h=of&&of.exports===A1,co=_h&&bh.process,yh=function(){try{var e=of&&of.require&&of.require("util").types;return e||co&&co.binding&&co.binding("util")}catch{}}();ni.exports=yh});var po=F((rq,$1)=>{var vh=x1(),Bh=bn(),I1=_n(),S1=I1&&I1.isTypedArray,xh=S1?Bh(S1):vh;$1.exports=xh});var mo=F((oq,k1)=>{var wh=s1(),Ah=so(),Ih=Ft(),Sh=gn(),$h=lo(),kh=po(),Th=Object.prototype,Ph=Th.hasOwnProperty;function Oh(e,u){var t=Ih(e),i=!t&&Ah(e),f=!t&&!i&&Sh(e),n=!t&&!i&&!f&&kh(e),r=t||i||f||n,o=r?wh(e.length,String):[],D=o.length;for(var a in e)(u||Ph.call(e,a))&&!(r&&(a=="length"||f&&(a=="offset"||a=="parent")||n&&(a=="buffer"||a=="byteLength"||a=="byteOffset")||$h(a,D)))&&o.push(a);return o}k1.exports=Oh});var yn=F((Dq,T1)=>{var Mh=Object.prototype;function jh(e){var u=e&&e.constructor,t=typeof u=="function"&&u.prototype||Mh;return e===t}T1.exports=jh});var Fo=F((aq,P1)=>{function Nh(e,u){return function(t){return e(u(t))}}P1.exports=Nh});var M1=F((sq,O1)=>{var qh=Fo(),Vh=qh(Object.keys,Object);O1.exports=Vh});var N1=F((lq,j1)=>{var Rh=yn(),Lh=M1(),zh=Object.prototype,Hh=zh.hasOwnProperty;function Uh(e){if(!Rh(e))return Lh(e);var u=[];for(var t in Object(e))Hh.call(e,t)&&t!="constructor"&&u.push(t);return u}j1.exports=Uh});var Df=F((dq,q1)=>{var Wh=no(),Gh=En();function Kh(e){return e!=null&&Gh(e.length)&&!Wh(e)}q1.exports=Kh});var ri=F((cq,V1)=>{var Jh=mo(),Zh=N1(),Qh=Df();function Xh(e){return Qh(e)?Jh(e):Zh(e)}V1.exports=Xh});var L1=F((pq,R1)=>{var Yh=ff(),eg=ri();function tg(e,u){return e&&Yh(u,eg(u),e)}R1.exports=tg});var H1=F((mq,z1)=>{function ug(e){var u=[];if(e!=null)for(var t in Object(e))u.push(t);return u}z1.exports=ug});var W1=F((Fq,U1)=>{var ig=Iu(),fg=yn(),ng=H1(),rg=Object.prototype,og=rg.hasOwnProperty;function Dg(e){if(!ig(e))return ng(e);var u=fg(e),t=[];for(var i in e)i=="constructor"&&(u||!og.call(e,i))||t.push(i);return t}U1.exports=Dg});var vn=F((Cq,G1)=>{var ag=mo(),sg=W1(),lg=Df();function dg(e){return lg(e)?ag(e,!0):sg(e)}G1.exports=dg});var J1=F((hq,K1)=>{var cg=ff(),pg=vn();function mg(e,u){return e&&cg(u,pg(u),e)}K1.exports=mg});var el=F((af,oi)=>{var Fg=It(),Y1=typeof af=="object"&&af&&!af.nodeType&&af,Z1=Y1&&typeof oi=="object"&&oi&&!oi.nodeType&&oi,Cg=Z1&&Z1.exports===Y1,Q1=Cg?Fg.Buffer:void 0,X1=Q1?Q1.allocUnsafe:void 0;function hg(e,u){if(u)return e.slice();var t=e.length,i=X1?X1(t):new e.constructor(t);return e.copy(i),i}oi.exports=hg});var ul=F((gq,tl)=>{function gg(e,u){var t=-1,i=e.length;for(u||(u=Array(i));++t<i;)u[t]=e[t];return u}tl.exports=gg});var Co=F((Eq,il)=>{function Eg(e,u){for(var t=-1,i=e==null?0:e.length,f=0,n=[];++t<i;){var r=e[t];u(r,t,e)&&(n[f++]=r)}return n}il.exports=Eg});var ho=F((bq,fl)=>{function bg(){return[]}fl.exports=bg});var Bn=F((_q,rl)=>{var _g=Co(),yg=ho(),vg=Object.prototype,Bg=vg.propertyIsEnumerable,nl=Object.getOwnPropertySymbols,xg=nl?function(e){return e==null?[]:(e=Object(e),_g(nl(e),function(u){return Bg.call(e,u)}))}:yg;rl.exports=xg});var Dl=F((yq,ol)=>{var wg=ff(),Ag=Bn();function Ig(e,u){return wg(e,Ag(e),u)}ol.exports=Ig});var go=F((vq,al)=>{function Sg(e,u){for(var t=-1,i=u.length,f=e.length;++t<i;)e[f+t]=u[t];return e}al.exports=Sg});var xn=F((Bq,sl)=>{var $g=Fo(),kg=$g(Object.getPrototypeOf,Object);sl.exports=kg});var Eo=F((xq,ll)=>{var Tg=go(),Pg=xn(),Og=Bn(),Mg=ho(),jg=Object.getOwnPropertySymbols,Ng=jg?function(e){for(var u=[];e;)Tg(u,Og(e)),e=Pg(e);return u}:Mg;ll.exports=Ng});var cl=F((wq,dl)=>{var qg=ff(),Vg=Eo();function Rg(e,u){return qg(e,Vg(e),u)}dl.exports=Rg});var bo=F((Aq,pl)=>{var Lg=go(),zg=Ft();function Hg(e,u,t){var i=u(e);return zg(e)?i:Lg(i,t(e))}pl.exports=Hg});var _o=F((Iq,ml)=>{var Ug=bo(),Wg=Bn(),Gg=ri();function Kg(e){return Ug(e,Gg,Wg)}ml.exports=Kg});var Cl=F((Sq,Fl)=>{var Jg=bo(),Zg=Eo(),Qg=vn();function Xg(e){return Jg(e,Qg,Zg)}Fl.exports=Xg});var gl=F(($q,hl)=>{var Yg=ru(),e6=It(),t6=Yg(e6,"DataView");hl.exports=t6});var bl=F((kq,El)=>{var u6=ru(),i6=It(),f6=u6(i6,"Promise");El.exports=f6});var yl=F((Tq,_l)=>{var n6=ru(),r6=It(),o6=n6(r6,"Set");_l.exports=o6});var Bl=F((Pq,vl)=>{var D6=ru(),a6=It(),s6=D6(a6,"WeakMap");vl.exports=s6});var sf=F((Oq,kl)=>{var yo=gl(),vo=Fn(),Bo=bl(),xo=yl(),wo=Bl(),$l=Au(),Di=oo(),xl="[object Map]",l6="[object Object]",wl="[object Promise]",Al="[object Set]",Il="[object WeakMap]",Sl="[object DataView]",d6=Di(yo),c6=Di(vo),p6=Di(Bo),m6=Di(xo),F6=Di(wo),Su=$l;(yo&&Su(new yo(new ArrayBuffer(1)))!=Sl||vo&&Su(new vo)!=xl||Bo&&Su(Bo.resolve())!=wl||xo&&Su(new xo)!=Al||wo&&Su(new wo)!=Il)&&(Su=function(e){var u=$l(e),t=u==l6?e.constructor:void 0,i=t?Di(t):"";if(i)switch(i){case d6:return Sl;case c6:return xl;case p6:return wl;case m6:return Al;case F6:return Il}return u});kl.exports=Su});var Pl=F((Mq,Tl)=>{var C6=Object.prototype,h6=C6.hasOwnProperty;function g6(e){var u=e.length,t=new e.constructor(u);return u&&typeof e[0]=="string"&&h6.call(e,"index")&&(t.index=e.index,t.input=e.input),t}Tl.exports=g6});var Ao=F((jq,Ol)=>{var E6=It(),b6=E6.Uint8Array;Ol.exports=b6});var wn=F((Nq,jl)=>{var Ml=Ao();function _6(e){var u=new e.constructor(e.byteLength);return new Ml(u).set(new Ml(e)),u}jl.exports=_6});var ql=F((qq,Nl)=>{var y6=wn();function v6(e,u){var t=u?y6(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}Nl.exports=v6});var Rl=F((Vq,Vl)=>{var B6=/\w*$/;function x6(e){var u=new e.constructor(e.source,B6.exec(e));return u.lastIndex=e.lastIndex,u}Vl.exports=x6});var Wl=F((Rq,Ul)=>{var Ll=ei(),zl=Ll?Ll.prototype:void 0,Hl=zl?zl.valueOf:void 0;function w6(e){return Hl?Object(Hl.call(e)):{}}Ul.exports=w6});var Kl=F((Lq,Gl)=>{var A6=wn();function I6(e,u){var t=u?A6(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}Gl.exports=I6});var Zl=F((zq,Jl)=>{var S6=wn(),$6=ql(),k6=Rl(),T6=Wl(),P6=Kl(),O6="[object Boolean]",M6="[object Date]",j6="[object Map]",N6="[object Number]",q6="[object RegExp]",V6="[object Set]",R6="[object String]",L6="[object Symbol]",z6="[object ArrayBuffer]",H6="[object DataView]",U6="[object Float32Array]",W6="[object Float64Array]",G6="[object Int8Array]",K6="[object Int16Array]",J6="[object Int32Array]",Z6="[object Uint8Array]",Q6="[object Uint8ClampedArray]",X6="[object Uint16Array]",Y6="[object Uint32Array]";function eE(e,u,t){var i=e.constructor;switch(u){case z6:return S6(e);case O6:case M6:return new i(+e);case H6:return $6(e,t);case U6:case W6:case G6:case K6:case J6:case Z6:case Q6:case X6:case Y6:return P6(e,t);case j6:return new i;case N6:case R6:return new i(e);case q6:return k6(e);case V6:return new i;case L6:return T6(e)}}Jl.exports=eE});var Yl=F((Hq,Xl)=>{var tE=Iu(),Ql=Object.create,uE=function(){function e(){}return function(u){if(!tE(u))return{};if(Ql)return Ql(u);e.prototype=u;var t=new e;return e.prototype=void 0,t}}();Xl.exports=uE});var t3=F((Uq,e3)=>{var iE=Yl(),fE=xn(),nE=yn();function rE(e){return typeof e.constructor=="function"&&!nE(e)?iE(fE(e)):{}}e3.exports=rE});var i3=F((Wq,u3)=>{var oE=sf(),DE=Ht(),aE="[object Map]";function sE(e){return DE(e)&&oE(e)==aE}u3.exports=sE});var o3=F((Gq,r3)=>{var lE=i3(),dE=bn(),f3=_n(),n3=f3&&f3.isMap,cE=n3?dE(n3):lE;r3.exports=cE});var a3=F((Kq,D3)=>{var pE=sf(),mE=Ht(),FE="[object Set]";function CE(e){return mE(e)&&pE(e)==FE}D3.exports=CE});var c3=F((Jq,d3)=>{var hE=a3(),gE=bn(),s3=_n(),l3=s3&&s3.isSet,EE=l3?gE(l3):hE;d3.exports=EE});var h3=F((Zq,C3)=>{var bE=hn(),_E=u1(),yE=ao(),vE=L1(),BE=J1(),xE=el(),wE=ul(),AE=Dl(),IE=cl(),SE=_o(),$E=Cl(),kE=sf(),TE=Pl(),PE=Zl(),OE=t3(),ME=Ft(),jE=gn(),NE=o3(),qE=Iu(),VE=c3(),RE=ri(),LE=vn(),zE=1,HE=2,UE=4,p3="[object Arguments]",WE="[object Array]",GE="[object Boolean]",KE="[object Date]",JE="[object Error]",m3="[object Function]",ZE="[object GeneratorFunction]",QE="[object Map]",XE="[object Number]",F3="[object Object]",YE="[object RegExp]",eb="[object Set]",tb="[object String]",ub="[object Symbol]",ib="[object WeakMap]",fb="[object ArrayBuffer]",nb="[object DataView]",rb="[object Float32Array]",ob="[object Float64Array]",Db="[object Int8Array]",ab="[object Int16Array]",sb="[object Int32Array]",lb="[object Uint8Array]",db="[object Uint8ClampedArray]",cb="[object Uint16Array]",pb="[object Uint32Array]",_e={};_e[p3]=_e[WE]=_e[fb]=_e[nb]=_e[GE]=_e[KE]=_e[rb]=_e[ob]=_e[Db]=_e[ab]=_e[sb]=_e[QE]=_e[XE]=_e[F3]=_e[YE]=_e[eb]=_e[tb]=_e[ub]=_e[lb]=_e[db]=_e[cb]=_e[pb]=!0;_e[JE]=_e[m3]=_e[ib]=!1;function An(e,u,t,i,f,n){var r,o=u&zE,D=u&HE,a=u&UE;if(t&&(r=f?t(e,i,f,n):t(e)),r!==void 0)return r;if(!qE(e))return e;var l=ME(e);if(l){if(r=TE(e),!o)return wE(e,r)}else{var m=kE(e),p=m==m3||m==ZE;if(jE(e))return xE(e,o);if(m==F3||m==p3||p&&!f){if(r=D||p?{}:OE(e),!o)return D?IE(e,BE(r,e)):AE(e,vE(r,e))}else{if(!_e[m])return f?e:{};r=PE(e,m,o)}}n||(n=new bE);var b=n.get(e);if(b)return b;n.set(e,r),VE(e)?e.forEach(function(v){r.add(An(v,u,t,v,e,n))}):NE(e)&&e.forEach(function(v,I){r.set(I,An(v,u,t,I,e,n))});var g=a?D?$E:SE:D?LE:RE,_=l?void 0:g(e);return _E(_||e,function(v,I){_&&(I=v,v=e[I]),yE(r,I,An(v,u,t,I,e,n))}),r}C3.exports=An});var E3=F((Qq,g3)=>{var mb=h3(),Fb=1,Cb=4;function hb(e){return mb(e,Fb|Cb)}g3.exports=hb});var _3=F((Xq,b3)=>{var gb="__lodash_hash_undefined__";function Eb(e){return this.__data__.set(e,gb),this}b3.exports=Eb});var v3=F((Yq,y3)=>{function bb(e){return this.__data__.has(e)}y3.exports=bb});var x3=F((eV,B3)=>{var _b=Cn(),yb=_3(),vb=v3();function In(e){var u=-1,t=e==null?0:e.length;for(this.__data__=new _b;++u<t;)this.add(e[u])}In.prototype.add=In.prototype.push=yb;In.prototype.has=vb;B3.exports=In});var A3=F((tV,w3)=>{function Bb(e,u){for(var t=-1,i=e==null?0:e.length;++t<i;)if(u(e[t],t,e))return!0;return!1}w3.exports=Bb});var S3=F((uV,I3)=>{function xb(e,u){return e.has(u)}I3.exports=xb});var Io=F((iV,$3)=>{var wb=x3(),Ab=A3(),Ib=S3(),Sb=1,$b=2;function kb(e,u,t,i,f,n){var r=t&Sb,o=e.length,D=u.length;if(o!=D&&!(r&&D>o))return!1;var a=n.get(e),l=n.get(u);if(a&&l)return a==u&&l==e;var m=-1,p=!0,b=t&$b?new wb:void 0;for(n.set(e,u),n.set(u,e);++m<o;){var g=e[m],_=u[m];if(i)var v=r?i(_,g,m,u,e,n):i(g,_,m,e,u,n);if(v!==void 0){if(v)continue;p=!1;break}if(b){if(!Ab(u,function(I,P){if(!Ib(b,P)&&(g===I||f(g,I,t,i,n)))return b.push(P)})){p=!1;break}}else if(!(g===_||f(g,_,t,i,n))){p=!1;break}}return n.delete(e),n.delete(u),p}$3.exports=kb});var T3=F((fV,k3)=>{function Tb(e){var u=-1,t=Array(e.size);return e.forEach(function(i,f){t[++u]=[f,i]}),t}k3.exports=Tb});var O3=F((nV,P3)=>{function Pb(e){var u=-1,t=Array(e.size);return e.forEach(function(i){t[++u]=i}),t}P3.exports=Pb});var V3=F((rV,q3)=>{var M3=ei(),j3=Ao(),Ob=mn(),Mb=Io(),jb=T3(),Nb=O3(),qb=1,Vb=2,Rb="[object Boolean]",Lb="[object Date]",zb="[object Error]",Hb="[object Map]",Ub="[object Number]",Wb="[object RegExp]",Gb="[object Set]",Kb="[object String]",Jb="[object Symbol]",Zb="[object ArrayBuffer]",Qb="[object DataView]",N3=M3?M3.prototype:void 0,So=N3?N3.valueOf:void 0;function Xb(e,u,t,i,f,n,r){switch(t){case Qb:if(e.byteLength!=u.byteLength||e.byteOffset!=u.byteOffset)return!1;e=e.buffer,u=u.buffer;case Zb:return!(e.byteLength!=u.byteLength||!n(new j3(e),new j3(u)));case Rb:case Lb:case Ub:return Ob(+e,+u);case zb:return e.name==u.name&&e.message==u.message;case Wb:case Kb:return e==u+"";case Hb:var o=jb;case Gb:var D=i&qb;if(o||(o=Nb),e.size!=u.size&&!D)return!1;var a=r.get(e);if(a)return a==u;i|=Vb,r.set(e,u);var l=Mb(o(e),o(u),i,f,n,r);return r.delete(e),l;case Jb:if(So)return So.call(e)==So.call(u)}return!1}q3.exports=Xb});var z3=F((oV,L3)=>{var R3=_o(),Yb=1,e_=Object.prototype,t_=e_.hasOwnProperty;function u_(e,u,t,i,f,n){var r=t&Yb,o=R3(e),D=o.length,a=R3(u),l=a.length;if(D!=l&&!r)return!1;for(var m=D;m--;){var p=o[m];if(!(r?p in u:t_.call(u,p)))return!1}var b=n.get(e),g=n.get(u);if(b&&g)return b==u&&g==e;var _=!0;n.set(e,u),n.set(u,e);for(var v=r;++m<D;){p=o[m];var I=e[p],P=u[p];if(i)var R=r?i(P,I,p,u,e,n):i(I,P,p,e,u,n);if(!(R===void 0?I===P||f(I,P,t,i,n):R)){_=!1;break}v||(v=p=="constructor")}if(_&&!v){var L=e.constructor,M=u.constructor;L!=M&&"constructor"in e&&"constructor"in u&&!(typeof L=="function"&&L instanceof L&&typeof M=="function"&&M instanceof M)&&(_=!1)}return n.delete(e),n.delete(u),_}L3.exports=u_});var Q3=F((DV,Z3)=>{var $o=hn(),i_=Io(),f_=V3(),n_=z3(),H3=sf(),U3=Ft(),W3=gn(),r_=po(),o_=1,G3="[object Arguments]",K3="[object Array]",Sn="[object Object]",D_=Object.prototype,J3=D_.hasOwnProperty;function a_(e,u,t,i,f,n){var r=U3(e),o=U3(u),D=r?K3:H3(e),a=o?K3:H3(u);D=D==G3?Sn:D,a=a==G3?Sn:a;var l=D==Sn,m=a==Sn,p=D==a;if(p&&W3(e)){if(!W3(u))return!1;r=!0,l=!1}if(p&&!l)return n||(n=new $o),r||r_(e)?i_(e,u,t,i,f,n):f_(e,u,D,t,i,f,n);if(!(t&o_)){var b=l&&J3.call(e,"__wrapped__"),g=m&&J3.call(u,"__wrapped__");if(b||g){var _=b?e.value():e,v=g?u.value():u;return n||(n=new $o),f(_,v,t,i,n)}}return p?(n||(n=new $o),n_(e,u,t,i,f,n)):!1}Z3.exports=a_});var $n=F((aV,ed)=>{var s_=Q3(),X3=Ht();function Y3(e,u,t,i,f){return e===u?!0:e==null||u==null||!X3(e)&&!X3(u)?e!==e&&u!==u:s_(e,u,t,i,Y3,f)}ed.exports=Y3});var ud=F((sV,td)=>{var l_=$n();function d_(e,u){return l_(e,u)}td.exports=d_});var cf=F(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.regexpCode=ae.getEsmExportName=ae.getProperty=ae.safeStringify=ae.stringify=ae.strConcat=ae.addCodeArg=ae.str=ae._=ae.nil=ae._Code=ae.Name=ae.IDENTIFIER=ae._CodeOrName=void 0;var lf=class{};ae._CodeOrName=lf;ae.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var $u=class extends lf{constructor(u){if(super(),!ae.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ae.Name=$u;var gt=class extends lf{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((t,i)=>(i instanceof $u&&(t[i.str]=(t[i.str]||0)+1),t),{})}};ae._Code=gt;ae.nil=new gt("");function id(e,...u){let t=[e[0]],i=0;for(;i<u.length;)To(t,u[i]),t.push(e[++i]);return new gt(t)}ae._=id;var ko=new gt("+");function fd(e,...u){let t=[df(e[0])],i=0;for(;i<u.length;)t.push(ko),To(t,u[i]),t.push(ko,df(e[++i]));return c_(t),new gt(t)}ae.str=fd;function To(e,u){u instanceof gt?e.push(...u._items):u instanceof $u?e.push(u):e.push(F_(u))}ae.addCodeArg=To;function c_(e){let u=1;for(;u<e.length-1;){if(e[u]===ko){let t=p_(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function p_(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof $u||e[e.length-1]!=='"'?void 0:typeof u!="string"?`${e.slice(0,-1)}${u}"`:u[0]==='"'?e.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(e instanceof $u))return`"${e}${u.slice(1)}`}function m_(e,u){return u.emptyStr()?e:e.emptyStr()?u:fd`${e}${u}`}ae.strConcat=m_;function F_(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:df(Array.isArray(e)?e.join(","):e)}function C_(e){return new gt(df(e))}ae.stringify=C_;function df(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ae.safeStringify=df;function h_(e){return typeof e=="string"&&ae.IDENTIFIER.test(e)?new gt(`.${e}`):id`[${e}]`}ae.getProperty=h_;function g_(e){if(typeof e=="string"&&ae.IDENTIFIER.test(e))return new gt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ae.getEsmExportName=g_;function E_(e){return new gt(e.toString())}ae.regexpCode=E_});var Mo=F(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.ValueScope=st.ValueScopeName=st.Scope=st.varKinds=st.UsedValueState=void 0;var at=cf(),Po=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},kn=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(kn||(st.UsedValueState=kn={}));st.varKinds={const:new at.Name("const"),let:new at.Name("let"),var:new at.Name("var")};var Tn=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof at.Name?u:this.name(u)}name(u){return new at.Name(this._newName(u))}_newName(u){let t=this._names[u]||this._nameGroup(u);return`${u}${t.index++}`}_nameGroup(u){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}};st.Scope=Tn;var Pn=class extends at.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,at._)`.${new at.Name(t)}[${i}]`}};st.ValueScopeName=Pn;var b_=(0,at._)`\n`,Oo=class extends Tn{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=ve(Q({},u),{_n:u.lines?b_:at.nil})}get(){return this._scope}name(u){return new Pn(u,this._newName(u))}value(u,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let f=this.toName(u),{prefix:n}=f,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[n];if(o){let l=o.get(r);if(l)return l}else o=this._values[n]=new Map;o.set(r,f);let D=this._scope[n]||(this._scope[n]=[]),a=D.length;return D[a]=t.ref,f.setValue(t,{property:n,itemIndex:a}),f}getValue(u,t){let i=this._values[u];if(i)return i.get(t)}scopeRefs(u,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,at._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,f=>{if(f.value===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return f.value.code},t,i)}_reduceValues(u,t,i={},f){let n=at.nil;for(let r in u){let o=u[r];if(!o)continue;let D=i[r]=i[r]||new Map;o.forEach(a=>{if(D.has(a))return;D.set(a,kn.Started);let l=t(a);if(l){let m=this.opts.es5?st.varKinds.var:st.varKinds.const;n=(0,at._)`${n}${m} ${a} = ${l};${this.opts._n}`}else if(l=f==null?void 0:f(a))n=(0,at._)`${n}${l}${this.opts._n}`;else throw new Po(a);D.set(a,kn.Completed)})}return n}};st.ValueScope=Oo});var ue=F(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.or=te.and=te.not=te.CodeGen=te.operators=te.varKinds=te.ValueScopeName=te.ValueScope=te.Scope=te.Name=te.regexpCode=te.stringify=te.getProperty=te.nil=te.strConcat=te.str=te._=void 0;var re=cf(),St=Mo(),ou=cf();Object.defineProperty(te,"_",{enumerable:!0,get:function(){return ou._}});Object.defineProperty(te,"str",{enumerable:!0,get:function(){return ou.str}});Object.defineProperty(te,"strConcat",{enumerable:!0,get:function(){return ou.strConcat}});Object.defineProperty(te,"nil",{enumerable:!0,get:function(){return ou.nil}});Object.defineProperty(te,"getProperty",{enumerable:!0,get:function(){return ou.getProperty}});Object.defineProperty(te,"stringify",{enumerable:!0,get:function(){return ou.stringify}});Object.defineProperty(te,"regexpCode",{enumerable:!0,get:function(){return ou.regexpCode}});Object.defineProperty(te,"Name",{enumerable:!0,get:function(){return ou.Name}});var qn=Mo();Object.defineProperty(te,"Scope",{enumerable:!0,get:function(){return qn.Scope}});Object.defineProperty(te,"ValueScope",{enumerable:!0,get:function(){return qn.ValueScope}});Object.defineProperty(te,"ValueScopeName",{enumerable:!0,get:function(){return qn.ValueScopeName}});Object.defineProperty(te,"varKinds",{enumerable:!0,get:function(){return qn.varKinds}});te.operators={GT:new re._Code(">"),GTE:new re._Code(">="),LT:new re._Code("<"),LTE:new re._Code("<="),EQ:new re._Code("==="),NEQ:new re._Code("!=="),NOT:new re._Code("!"),OR:new re._Code("||"),AND:new re._Code("&&"),ADD:new re._Code("+")};var Ut=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},jo=class extends Ut{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?St.varKinds.var:this.varKind,f=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${f};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=ai(this.rhs,u,t)),this}get names(){return this.rhs instanceof re._CodeOrName?this.rhs.names:{}}},Mn=class extends Ut{constructor(u,t,i){super(),this.lhs=u,this.rhs=t,this.sideEffects=i}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,t){if(!(this.lhs instanceof re.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=ai(this.rhs,u,t),this}get names(){let u=this.lhs instanceof re.Name?{}:Q({},this.lhs.names);return Nn(u,this.rhs)}},No=class extends Mn{constructor(u,t,i,f){super(u,i,f),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},qo=class extends Ut{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},Vo=class extends Ut{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},Ro=class extends Ut{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},Lo=class extends Ut{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,t){return this.code=ai(this.code,u,t),this}get names(){return this.code instanceof re._CodeOrName?this.code.names:{}}},pf=class extends Ut{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((t,i)=>t+i.render(u),"")}optimizeNodes(){let{nodes:u}=this,t=u.length;for(;t--;){let i=u[t].optimizeNodes();Array.isArray(i)?u.splice(t,1,...i):i?u[t]=i:u.splice(t,1)}return u.length>0?this:void 0}optimizeNames(u,t){let{nodes:i}=this,f=i.length;for(;f--;){let n=i[f];n.optimizeNames(u,t)||(__(u,n.names),i.splice(f,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>ku(u,t.names),{})}},Wt=class extends pf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},zo=class extends pf{},Ho=(()=>{class e extends Wt{}return e.kind="else",e})(),On=(()=>{class e extends Wt{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 f=i.optimizeNodes();i=this.else=Array.isArray(f)?new Ho(f):f}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(ad(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var f;if(this.else=(f=this.else)===null||f===void 0?void 0:f.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=ai(this.condition,t,i),this}get names(){let t=super.names;return Nn(t,this.condition),this.else&&ku(t,this.else.names),t}}return e.kind="if",e})(),Vn=(()=>{class e extends Wt{}return e.kind="for",e})(),Uo=class extends Vn{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iteration=ai(this.iteration,u,t),this}get names(){return ku(super.names,this.iteration.names)}},Wo=class extends Vn{constructor(u,t,i,f){super(),this.varKind=u,this.name=t,this.from=i,this.to=f}render(u){let t=u.es5?St.varKinds.var:this.varKind,{name:i,from:f,to:n}=this;return`for(${t} ${i}=${f}; ${i}<${n}; ${i}++)`+super.render(u)}get names(){let u=Nn(super.names,this.from);return Nn(u,this.to)}},jn=class extends Vn{constructor(u,t,i,f){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=f}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iterable=ai(this.iterable,u,t),this}get names(){return ku(super.names,this.iterable.names)}},nd=(()=>{class e extends Wt{constructor(t,i,f){super(),this.name=t,this.args=i,this.async=f}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),rd=(()=>{class e extends pf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Go=class extends Wt{render(u){let t="try"+super.render(u);return this.catch&&(t+=this.catch.render(u)),this.finally&&(t+=this.finally.render(u)),t}optimizeNodes(){var u,t;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(u,t){var i,f;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(f=this.finally)===null||f===void 0||f.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&ku(u,this.catch.names),this.finally&&ku(u,this.finally.names),u}},od=(()=>{class e extends Wt{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),Dd=(()=>{class e extends Wt{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Ko=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=ve(Q({},t),{_n:t.lines?`
|
|
2
2
|
`:""}),this._extScope=u,this._scope=new St.Scope({parent:u}),this._nodes=[new zo]}toString(){return this._root.render(this.opts)}name(u){return this._scope.name(u)}scopeName(u){return this._extScope.name(u)}scopeValue(u,t){let i=this._extScope.value(u,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(u,t){return this._extScope.getValue(u,t)}scopeRefs(u){return this._extScope.scopeRefs(u,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(u,t,i,f){let n=this._scope.toName(t);return i!==void 0&&f&&(this._constants[n.str]=i),this._leafNode(new jo(u,n,i)),n}const(u,t,i){return this._def(St.varKinds.const,u,t,i)}let(u,t,i){return this._def(St.varKinds.let,u,t,i)}var(u,t,i){return this._def(St.varKinds.var,u,t,i)}assign(u,t,i){return this._leafNode(new Mn(u,t,i))}add(u,t){return this._leafNode(new No(u,te.operators.ADD,t))}code(u){return typeof u=="function"?u():u!==re.nil&&this._leafNode(new Lo(u)),this}object(...u){let t=["{"];for(let[i,f]of u)t.length>1&&t.push(","),t.push(i),(i!==f||this.opts.es5)&&(t.push(":"),(0,re.addCodeArg)(t,f));return t.push("}"),new re._Code(t)}if(u,t,i){if(this._blockNode(new On(u)),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(u){return this._elseNode(new On(u))}else(){return this._elseNode(new Ho)}endIf(){return this._endBlockNode(On,Ho)}_for(u,t){return this._blockNode(u),t&&this.code(t).endFor(),this}for(u,t){return this._for(new Uo(u),t)}forRange(u,t,i,f,n=this.opts.es5?St.varKinds.var:St.varKinds.let){let r=this._scope.toName(u);return this._for(new Wo(n,r,t,i),()=>f(r))}forOf(u,t,i,f=St.varKinds.const){let n=this._scope.toName(u);if(this.opts.es5){let r=t instanceof re.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,re._)`${r}.length`,o=>{this.var(n,(0,re._)`${r}[${o}]`),i(n)})}return this._for(new jn("of",f,n,t),()=>i(n))}forIn(u,t,i,f=this.opts.es5?St.varKinds.var:St.varKinds.const){if(this.opts.ownProperties)return this.forOf(u,(0,re._)`Object.keys(${t})`,i);let n=this._scope.toName(u);return this._for(new jn("in",f,n,t),()=>i(n))}endFor(){return this._endBlockNode(Vn)}label(u){return this._leafNode(new qo(u))}break(u){return this._leafNode(new Vo(u))}return(u){let t=new rd;if(this._blockNode(t),this.code(u),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(rd)}try(u,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let f=new Go;if(this._blockNode(f),this.code(u),t){let n=this.name("e");this._currNode=f.catch=new od(n),t(n)}return i&&(this._currNode=f.finally=new Dd,this.code(i)),this._endBlockNode(od,Dd)}throw(u){return this._leafNode(new Ro(u))}block(u,t){return this._blockStarts.push(this._nodes.length),u&&this.code(u).endBlock(t),this}endBlock(u){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||u!==void 0&&i!==u)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${u} expected`);return this._nodes.length=t,this}func(u,t=re.nil,i,f){return this._blockNode(new nd(u,t,i)),f&&this.code(f).endFunc(),this}endFunc(){return this._endBlockNode(nd)}optimize(u=1){for(;u-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(u){return this._currNode.nodes.push(u),this}_blockNode(u){this._currNode.nodes.push(u),this._nodes.push(u)}_endBlockNode(u,t){let i=this._currNode;if(i instanceof u||t&&i instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${u.kind}/${t.kind}`:u.kind}"`)}_elseNode(u){let t=this._currNode;if(!(t instanceof On))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=u,this}get _root(){return this._nodes[0]}get _currNode(){let u=this._nodes;return u[u.length-1]}set _currNode(u){let t=this._nodes;t[t.length-1]=u}};te.CodeGen=Ko;function ku(e,u){for(let t in u)e[t]=(e[t]||0)+(u[t]||0);return e}function Nn(e,u){return u instanceof re._CodeOrName?ku(e,u.names):e}function ai(e,u,t){if(e instanceof re.Name)return i(e);if(!f(e))return e;return new re._Code(e._items.reduce((n,r)=>(r instanceof re.Name&&(r=i(r)),r instanceof re._Code?n.push(...r._items):n.push(r),n),[]));function i(n){let r=t[n.str];return r===void 0||u[n.str]!==1?n:(delete u[n.str],r)}function f(n){return n instanceof re._Code&&n._items.some(r=>r instanceof re.Name&&u[r.str]===1&&t[r.str]!==void 0)}}function __(e,u){for(let t in u)e[t]=(e[t]||0)-(u[t]||0)}function ad(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,re._)`!${Jo(e)}`}te.not=ad;var y_=sd(te.operators.AND);function v_(...e){return e.reduce(y_)}te.and=v_;var B_=sd(te.operators.OR);function x_(...e){return e.reduce(B_)}te.or=x_;function sd(e){return(u,t)=>u===re.nil?t:t===re.nil?u:(0,re._)`${Jo(u)} ${e} ${Jo(t)}`}function Jo(e){return e instanceof re.Name?e:(0,re._)`(${e})`}});var se=F(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.checkStrictMode=ie.getErrorPath=ie.Type=ie.useFunc=ie.setEvaluated=ie.evaluatedPropsToName=ie.mergeEvaluated=ie.eachItem=ie.unescapeJsonPointer=ie.escapeJsonPointer=ie.escapeFragment=ie.unescapeFragment=ie.schemaRefOrVal=ie.schemaHasRulesButRef=ie.schemaHasRules=ie.checkUnknownRules=ie.alwaysValidSchema=ie.toHash=void 0;var Ee=ue(),w_=cf();function A_(e){let u={};for(let t of e)u[t]=!0;return u}ie.toHash=A_;function I_(e,u){return typeof u=="boolean"?u:Object.keys(u).length===0?!0:(cd(e,u),!pd(u,e.self.RULES.all))}ie.alwaysValidSchema=I_;function cd(e,u=e.schema){let{opts:t,self:i}=e;if(!t.strictSchema||typeof u=="boolean")return;let f=i.RULES.keywords;for(let n in u)f[n]||Cd(e,`unknown keyword: "${n}"`)}ie.checkUnknownRules=cd;function pd(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(u[t])return!0;return!1}ie.schemaHasRules=pd;function S_(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&u.all[t])return!0;return!1}ie.schemaHasRulesButRef=S_;function $_({topSchemaRef:e,schemaPath:u},t,i,f){if(!f){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Ee._)`${t}`}return(0,Ee._)`${e}${u}${(0,Ee.getProperty)(i)}`}ie.schemaRefOrVal=$_;function k_(e){return md(decodeURIComponent(e))}ie.unescapeFragment=k_;function T_(e){return encodeURIComponent(Qo(e))}ie.escapeFragment=T_;function Qo(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ie.escapeJsonPointer=Qo;function md(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ie.unescapeJsonPointer=md;function P_(e,u){if(Array.isArray(e))for(let t of e)u(t);else u(e)}ie.eachItem=P_;function ld({mergeNames:e,mergeToName:u,mergeValues:t,resultToName:i}){return(f,n,r,o)=>{let D=r===void 0?n:r instanceof Ee.Name?(n instanceof Ee.Name?e(f,n,r):u(f,n,r),r):n instanceof Ee.Name?(u(f,r,n),n):t(n,r);return o===Ee.Name&&!(D instanceof Ee.Name)?i(f,D):D}}ie.mergeEvaluated={props:ld({mergeNames:(e,u,t)=>e.if((0,Ee._)`${t} !== true && ${u} !== undefined`,()=>{e.if((0,Ee._)`${u} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Ee._)`${t} || {}`).code((0,Ee._)`Object.assign(${t}, ${u})`))}),mergeToName:(e,u,t)=>e.if((0,Ee._)`${t} !== true`,()=>{u===!0?e.assign(t,!0):(e.assign(t,(0,Ee._)`${t} || {}`),Xo(e,t,u))}),mergeValues:(e,u)=>e===!0?!0:Q(Q({},e),u),resultToName:Fd}),items:ld({mergeNames:(e,u,t)=>e.if((0,Ee._)`${t} !== true && ${u} !== undefined`,()=>e.assign(t,(0,Ee._)`${u} === true ? true : ${t} > ${u} ? ${t} : ${u}`)),mergeToName:(e,u,t)=>e.if((0,Ee._)`${t} !== true`,()=>e.assign(t,u===!0?!0:(0,Ee._)`${t} > ${u} ? ${t} : ${u}`)),mergeValues:(e,u)=>e===!0?!0:Math.max(e,u),resultToName:(e,u)=>e.var("items",u)})};function Fd(e,u){if(u===!0)return e.var("props",!0);let t=e.var("props",(0,Ee._)`{}`);return u!==void 0&&Xo(e,t,u),t}ie.evaluatedPropsToName=Fd;function Xo(e,u,t){Object.keys(t).forEach(i=>e.assign((0,Ee._)`${u}${(0,Ee.getProperty)(i)}`,!0))}ie.setEvaluated=Xo;var dd={};function O_(e,u){return e.scopeValue("func",{ref:u,code:dd[u.code]||(dd[u.code]=new w_._Code(u.code))})}ie.useFunc=O_;var Zo=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(Zo||(ie.Type=Zo={}));function M_(e,u,t){if(e instanceof Ee.Name){let i=u===Zo.Num;return t?i?(0,Ee._)`"[" + ${e} + "]"`:(0,Ee._)`"['" + ${e} + "']"`:i?(0,Ee._)`"/" + ${e}`:(0,Ee._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Ee.getProperty)(e).toString():"/"+Qo(e)}ie.getErrorPath=M_;function Cd(e,u,t=e.opts.strictSchema){if(t){if(u=`strict mode: ${u}`,t===!0)throw new Error(u);e.self.logger.warn(u)}}ie.checkStrictMode=Cd});var Gt=F(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});var Ke=ue(),j_={data:new Ke.Name("data"),valCxt:new Ke.Name("valCxt"),instancePath:new Ke.Name("instancePath"),parentData:new Ke.Name("parentData"),parentDataProperty:new Ke.Name("parentDataProperty"),rootData:new Ke.Name("rootData"),dynamicAnchors:new Ke.Name("dynamicAnchors"),vErrors:new Ke.Name("vErrors"),errors:new Ke.Name("errors"),this:new Ke.Name("this"),self:new Ke.Name("self"),scope:new Ke.Name("scope"),json:new Ke.Name("json"),jsonPos:new Ke.Name("jsonPos"),jsonLen:new Ke.Name("jsonLen"),jsonPart:new Ke.Name("jsonPart")};Yo.default=j_});var mf=F(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.extendErrors=Je.resetErrorsCount=Je.reportExtraError=Je.reportError=Je.keyword$DataError=Je.keywordError=void 0;var De=ue(),Rn=se(),nt=Gt();Je.keywordError={message:({keyword:e})=>(0,De.str)`must pass "${e}" keyword validation`};Je.keyword$DataError={message:({keyword:e,schemaType:u})=>u?(0,De.str)`"${e}" keyword must be ${u} ($data)`:(0,De.str)`"${e}" keyword is invalid ($data)`};function N_(e,u=Je.keywordError,t,i){let{it:f}=e,{gen:n,compositeRule:r,allErrors:o}=f,D=Ed(e,u,t);(i!=null?i:r||o)?hd(n,D):gd(f,(0,De._)`[${D}]`)}Je.reportError=N_;function q_(e,u=Je.keywordError,t){let{it:i}=e,{gen:f,compositeRule:n,allErrors:r}=i,o=Ed(e,u,t);hd(f,o),n||r||gd(i,nt.default.vErrors)}Je.reportExtraError=q_;function V_(e,u){e.assign(nt.default.errors,u),e.if((0,De._)`${nt.default.vErrors} !== null`,()=>e.if(u,()=>e.assign((0,De._)`${nt.default.vErrors}.length`,u),()=>e.assign(nt.default.vErrors,null)))}Je.resetErrorsCount=V_;function R_({gen:e,keyword:u,schemaValue:t,data:i,errsCount:f,it:n}){if(f===void 0)throw new Error("ajv implementation error");let r=e.name("err");e.forRange("i",f,nt.default.errors,o=>{e.const(r,(0,De._)`${nt.default.vErrors}[${o}]`),e.if((0,De._)`${r}.instancePath === undefined`,()=>e.assign((0,De._)`${r}.instancePath`,(0,De.strConcat)(nt.default.instancePath,n.errorPath))),e.assign((0,De._)`${r}.schemaPath`,(0,De.str)`${n.errSchemaPath}/${u}`),n.opts.verbose&&(e.assign((0,De._)`${r}.schema`,t),e.assign((0,De._)`${r}.data`,i))})}Je.extendErrors=R_;function hd(e,u){let t=e.const("err",u);e.if((0,De._)`${nt.default.vErrors} === null`,()=>e.assign(nt.default.vErrors,(0,De._)`[${t}]`),(0,De._)`${nt.default.vErrors}.push(${t})`),e.code((0,De._)`${nt.default.errors}++`)}function gd(e,u){let{gen:t,validateName:i,schemaEnv:f}=e;f.$async?t.throw((0,De._)`new ${e.ValidationError}(${u})`):(t.assign((0,De._)`${i}.errors`,u),t.return(!1))}var Tu={keyword:new De.Name("keyword"),schemaPath:new De.Name("schemaPath"),params:new De.Name("params"),propertyName:new De.Name("propertyName"),message:new De.Name("message"),schema:new De.Name("schema"),parentSchema:new De.Name("parentSchema")};function Ed(e,u,t){let{createErrors:i}=e.it;return i===!1?(0,De._)`{}`:L_(e,u,t)}function L_(e,u,t={}){let{gen:i,it:f}=e,n=[z_(f,t),H_(e,t)];return U_(e,u,n),i.object(...n)}function z_({errorPath:e},{instancePath:u}){let t=u?(0,De.str)`${e}${(0,Rn.getErrorPath)(u,Rn.Type.Str)}`:e;return[nt.default.instancePath,(0,De.strConcat)(nt.default.instancePath,t)]}function H_({keyword:e,it:{errSchemaPath:u}},{schemaPath:t,parentSchema:i}){let f=i?u:(0,De.str)`${u}/${e}`;return t&&(f=(0,De.str)`${f}${(0,Rn.getErrorPath)(t,Rn.Type.Str)}`),[Tu.schemaPath,f]}function U_(e,{params:u,message:t},i){let{keyword:f,data:n,schemaValue:r,it:o}=e,{opts:D,propertyName:a,topSchemaRef:l,schemaPath:m}=o;i.push([Tu.keyword,f],[Tu.params,typeof u=="function"?u(e):u||(0,De._)`{}`]),D.messages&&i.push([Tu.message,typeof t=="function"?t(e):t]),D.verbose&&i.push([Tu.schema,r],[Tu.parentSchema,(0,De._)`${l}${m}`],[nt.default.data,n]),a&&i.push([Tu.propertyName,a])}});var _d=F(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.boolOrEmptySchema=si.topBoolOrEmptySchema=void 0;var W_=mf(),G_=ue(),K_=Gt(),J_={message:"boolean schema is false"};function Z_(e){let{gen:u,schema:t,validateName:i}=e;t===!1?bd(e,!1):typeof t=="object"&&t.$async===!0?u.return(K_.default.data):(u.assign((0,G_._)`${i}.errors`,null),u.return(!0))}si.topBoolOrEmptySchema=Z_;function Q_(e,u){let{gen:t,schema:i}=e;i===!1?(t.var(u,!1),bd(e)):t.var(u,!0)}si.boolOrEmptySchema=Q_;function bd(e,u){let{gen:t,data:i}=e,f={gen:t,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,W_.reportError)(f,J_,void 0,u)}});var eD=F(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.getRules=li.isJSONType=void 0;var X_=["string","number","integer","boolean","null","object","array"],Y_=new Set(X_);function e9(e){return typeof e=="string"&&Y_.has(e)}li.isJSONType=e9;function t9(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:ve(Q({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}li.getRules=t9});var tD=F(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.shouldUseRule=Du.shouldUseGroup=Du.schemaHasRulesForType=void 0;function u9({schema:e,self:u},t){let i=u.RULES.types[t];return i&&i!==!0&&yd(e,i)}Du.schemaHasRulesForType=u9;function yd(e,u){return u.rules.some(t=>vd(e,t))}Du.shouldUseGroup=yd;function vd(e,u){var t;return e[u.keyword]!==void 0||((t=u.definition.implements)===null||t===void 0?void 0:t.some(i=>e[i]!==void 0))}Du.shouldUseRule=vd});var Ff=F(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.reportTypeError=Ze.checkDataTypes=Ze.checkDataType=Ze.coerceAndCheckDataType=Ze.getJSONTypes=Ze.getSchemaTypes=Ze.DataType=void 0;var i9=eD(),f9=tD(),n9=mf(),ee=ue(),Bd=se(),di=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(di||(Ze.DataType=di={}));function r9(e){let u=xd(e.type);if(u.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!u.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&u.push("null")}return u}Ze.getSchemaTypes=r9;function xd(e){let u=Array.isArray(e)?e:e?[e]:[];if(u.every(i9.isJSONType))return u;throw new Error("type must be JSONType or JSONType[]: "+u.join(","))}Ze.getJSONTypes=xd;function o9(e,u){let{gen:t,data:i,opts:f}=e,n=D9(u,f.coerceTypes),r=u.length>0&&!(n.length===0&&u.length===1&&(0,f9.schemaHasRulesForType)(e,u[0]));if(r){let o=iD(u,i,f.strictNumbers,di.Wrong);t.if(o,()=>{n.length?a9(e,u,n):fD(e)})}return r}Ze.coerceAndCheckDataType=o9;var wd=new Set(["string","number","integer","boolean","null"]);function D9(e,u){return u?e.filter(t=>wd.has(t)||u==="array"&&t==="array"):[]}function a9(e,u,t){let{gen:i,data:f,opts:n}=e,r=i.let("dataType",(0,ee._)`typeof ${f}`),o=i.let("coerced",(0,ee._)`undefined`);n.coerceTypes==="array"&&i.if((0,ee._)`${r} == 'object' && Array.isArray(${f}) && ${f}.length == 1`,()=>i.assign(f,(0,ee._)`${f}[0]`).assign(r,(0,ee._)`typeof ${f}`).if(iD(u,f,n.strictNumbers),()=>i.assign(o,f))),i.if((0,ee._)`${o} !== undefined`);for(let a of t)(wd.has(a)||a==="array"&&n.coerceTypes==="array")&&D(a);i.else(),fD(e),i.endIf(),i.if((0,ee._)`${o} !== undefined`,()=>{i.assign(f,o),s9(e,o)});function D(a){switch(a){case"string":i.elseIf((0,ee._)`${r} == "number" || ${r} == "boolean"`).assign(o,(0,ee._)`"" + ${f}`).elseIf((0,ee._)`${f} === null`).assign(o,(0,ee._)`""`);return;case"number":i.elseIf((0,ee._)`${r} == "boolean" || ${f} === null
|
|
3
3
|
|| (${r} == "string" && ${f} && ${f} == +${f})`).assign(o,(0,ee._)`+${f}`);return;case"integer":i.elseIf((0,ee._)`${r} === "boolean" || ${f} === null
|
|
4
4
|
|| (${r} === "string" && ${f} && ${f} == +${f} && !(${f} % 1))`).assign(o,(0,ee._)`+${f}`);return;case"boolean":i.elseIf((0,ee._)`${f} === "false" || ${f} === 0 || ${f} === null`).assign(o,!1).elseIf((0,ee._)`${f} === "true" || ${f} === 1`).assign(o,!0);return;case"null":i.elseIf((0,ee._)`${f} === "" || ${f} === 0 || ${f} === false`),i.assign(o,null);return;case"array":i.elseIf((0,ee._)`${r} === "string" || ${r} === "number"
|
|
@@ -10,14 +10,14 @@ import{a as At,b as GF}from"./chunk-VMXGERJT.js";import{a as Is}from"./chunk-7EU
|
|
|
10
10
|
Should be: [ [ object1, pointer1 ], [ object 2, pointer2 ], etc... ]`);return}return f}if(yt(i)){for(let[r,o]of i){if(r===null||!this.isJsonPointer(o))continue;let D=n?this.getCopy(r,o):this.get(r,o);if(D)return D}return f}return console.error(`getFirst error: Input not in correct format.
|
|
11
11
|
Should be: [ [ object1, pointer1 ], [ object 2, pointer2 ], etc... ]`),f}}static getFirstCopy(i,f=null){return this.getFirst(i,f,!0)}static set(i,f,n,r=!1){let o=this.parse(f);if(o!==null&&o.length){let D=i;for(let l=0;l<o.length-1;++l){let m=o[l];m==="-"&&T(D)&&(m=D.length),yt(D)&&D.has(m)?D=D.get(m):(x(D,m)||(D[m]=o[l+1].match(/^(\d+|-)$/)?[]:{}),D=D[m])}let a=o[o.length-1];return T(D)&&a==="-"?D.push(n):r&&T(D)&&!isNaN(+a)?D.splice(a,0,n):yt(D)?D.set(a,n):D[a]=n,i}return console.error(`set error: Invalid JSON Pointer: ${f}`),i}static setCopy(i,f,n,r=!1){let o=this.parse(f);if(o!==null){let D=gr(i),a=D;for(let m=0;m<o.length-1;++m){let p=o[m];p==="-"&&T(a)&&(p=a.length),yt(a)&&a.has(p)?(a.set(p,gr(a.get(p))),a=a.get(p)):(x(a,p)||(a[p]=o[m+1].match(/^(\d+|-)$/)?[]:{}),a[p]=gr(a[p]),a=a[p])}let l=o[o.length-1];return T(a)&&l==="-"?a.push(n):r&&T(a)&&!isNaN(+l)?a.splice(l,0,n):yt(a)?a.set(l,n):a[l]=n,D}return console.error(`setCopy error: Invalid JSON Pointer: ${f}`),i}static insert(i,f,n){return this.set(i,f,n,!0)}static insertCopy(i,f,n){return this.setCopy(i,f,n,!0)}static remove(i,f){let n=this.parse(f);if(n!==null&&n.length){let r=n.pop(),o=this.get(i,n);return T(o)?(r==="-"&&(r=o.length-1),o.splice(r,1)):j(o)&&delete o[r],i}return console.error(`remove error: Invalid JSON Pointer: ${f}`),i}static has(i,f){return this.get(i,f,0,null,!0)}static dict(i){let f={};return this.forEachDeep(i,(n,r)=>{typeof n!="object"&&(f[r]=n)}),f}static forEachDeep(i,f=D=>D,n=!1,r="",o=i){if(typeof f!="function"){console.error("forEachDeep error: Iterator is not a function:",f);return}if(n||f(i,r,o),j(i)||T(i))for(let D of Object.keys(i)){let a=r+"/"+this.escape(D);this.forEachDeep(i[D],f,n,a,o)}n&&f(i,r,o)}static forEachDeepCopy(i,f=D=>D,n=!1,r="",o=i){if(typeof f!="function")return console.error("forEachDeepCopy error: Iterator is not a function:",f),null;if(j(i)||T(i)){let D=T(i)?[...i]:Q({},i);n||(D=f(D,r,o));for(let a of Object.keys(D)){let l=r+"/"+this.escape(a);D[a]=this.forEachDeepCopy(D[a],f,n,l,o)}return n&&(D=f(D,r,o)),D}else return f(i,r,o)}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,f=!1){if(!this.isJsonPointer(i))return f&&console.error(`parse error: Invalid JSON Pointer: ${i}`),null;if(T(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,f="",n=!1){if(i==="#")return"";if(!this.isJsonPointer(i))return n&&console.error(`compile error: Invalid JSON Pointer: ${i}`),null;if(T(i))return i.length===0?"":"/"+i.map(r=>r===""?f:this.escape(r)).join("/");if(typeof i=="string")return i[0]==="#"&&(i=i.slice(1)),i}static toKey(i,f=!1){let n=this.parse(i,f);return n===null?null:n.length?n[n.length-1]:""}static isJsonPointer(i){if(T(i))return i.every(f=>typeof f=="string");if(be(i)){if(i===""||i==="#")return!0;if(i[0]==="/"||i.slice(0,2)==="#/")return!/(~[^01]|~$)/g.test(i)}return!1}static isSubPointer(i,f,n=!1,r=!1){if(!this.isJsonPointer(i)||!this.isJsonPointer(f)){if(r){let o="";this.isJsonPointer(i)||(o+=` 1: ${i}`),this.isJsonPointer(f)||(o+=` 2: ${f}`),console.error(`isSubPointer error: Invalid JSON Pointer ${o}`)}return}return i=this.compile(i,"",r),f=this.compile(f,"",r),i===f?n:`${i}/`===f.slice(0,i.length+1)}static toIndexedPointer(i,f,n=null){if(this.isJsonPointer(i)&&T(f)){let r=this.compile(i);if(yt(n)){let o=0;return r.replace(/\/\-(?=\/|$)/g,(D,a)=>n.has(r.slice(0,a))?"/"+f[o++]:D)}else{for(let o of f)r=r.replace("/-","/"+o);return r}}this.isJsonPointer(i)||console.error(`toIndexedPointer error: Invalid JSON Pointer: ${i}`),T(f)||console.error(`toIndexedPointer error: Invalid indexArray: ${f}`)}static toGenericPointer(i,f=new Map){if(this.isJsonPointer(i)&&yt(f)){let n=this.parse(i);for(let r=1;r<n.length;r++){let o=this.compile(n.slice(0,r));f.has(o)&&f.get(o)<=+n[r]&&(n[r]="-")}return this.compile(n)}this.isJsonPointer(i)||console.error(`toGenericPointer error: invalid JSON Pointer: ${i}`),yt(f)||console.error(`toGenericPointer error: invalid arrayMap: ${f}`)}static toControlPointer(i,f,n=!1){let r=this.parse(i),o=[],D=f;if(r!==null){for(let a of r)if(x(D,"controls")&&(o.push("controls"),D=D.controls),T(D)&&a==="-")o.push((D.length-1).toString()),D=D[D.length-1];else if(x(D,a))o.push(a),D=D[a];else if(n){console.error(`toControlPointer error: Unable to find "${a}" item in FormGroup.`),console.error(i),console.error(f);return}else o.push(a),D={controls:{}};return this.compile(o)}console.error(`toControlPointer error: Invalid JSON Pointer: ${i}`)}static toSchemaPointer(i,f){if(this.isJsonPointer(i)&&typeof f=="object"){let n=this.parse(i);if(!n.length)return"";let r=n.shift();if(f.type==="object"||f.properties||f.additionalProperties){if((f.properties||{})[r])return`/properties/${this.escape(r)}`+this.toSchemaPointer(n,f.properties[r]);if(f.additionalProperties)return"/additionalProperties"+this.toSchemaPointer(n,f.additionalProperties)}if((f.type==="array"||f.items)&&(Pe(r)||r==="-"||r==="")){let o=r==="-"||r===""?0:+r;if(T(f.items)){if(o<f.items.length)return"/items/"+o+this.toSchemaPointer(n,f.items[o]);if(f.additionalItems)return"/additionalItems"+this.toSchemaPointer(n,f.additionalItems)}else{if(j(f.items))return"/items"+this.toSchemaPointer(n,f.items);if(j(f.additionalItems))return"/additionalItems"+this.toSchemaPointer(n,f.additionalItems)}}return console.error(`toSchemaPointer error: Data pointer ${i} not compatible with schema ${f}`),null}return this.isJsonPointer(i)||console.error(`toSchemaPointer error: Invalid JSON Pointer: ${i}`),typeof f!="object"&&console.error(`toSchemaPointer error: Invalid JSON Schema: ${f}`),null}static toDataPointer(i,f,n=!1){if(this.isJsonPointer(i)&&typeof f=="object"&&this.has(f,i)){let r=this.parse(i);if(!r.length)return"";let o=r.shift();if(o==="properties"||o==="items"&&T(f.items)){let D=r.shift(),a=this.toDataPointer(r,f[o][D]);return a===null?null:"/"+D+a}else if(o==="additionalItems"||o==="items"&&j(f.items)){let D=this.toDataPointer(r,f[o]);return D===null?null:"/-"+D}else if(["allOf","anyOf","oneOf"].includes(o)){let D=r.shift();return this.toDataPointer(r,f[o][D])}else{if(o==="not")return this.toDataPointer(r,f[o]);["contains","definitions","dependencies","additionalItems","additionalProperties","patternProperties","propertyNames"].includes(o)&&n&&console.error("toDataPointer error: Ambiguous location")}return""}return n&&(this.isJsonPointer(i)||console.error(`toDataPointer error: Invalid JSON Pointer: ${i}`),typeof f!="object"&&console.error(`toDataPointer error: Invalid JSON Schema: ${f}`),typeof f!="object"&&console.error(`toDataPointer error: Pointer ${i} invalid for Schema: ${f}`)),null}static parseObjectPath(i){if(T(i))return i;if(this.isJsonPointer(i))return this.parse(i);if(typeof i=="string"){let f=0,n=[];for(;f<i.length;){let r=i.indexOf(".",f),o=i.indexOf("[",f);if(r===-1&&o===-1)n.push(i.slice(f)),f=i.length;else if(r!==-1&&(r<o||o===-1))n.push(i.slice(f,r)),f=r+1;else{o>f&&(n.push(i.slice(f,o)),f=o);let D=i.charAt(o+1);if(D==='"'||D==="'"){let a=i.indexOf(D+"]",o);for(;a!==-1&&i.charAt(a-1)==="\\";)a=i.indexOf(D+"]",a+2);a===-1&&(a=i.length),n.push(i.slice(f+2,a).replace(new RegExp("\\"+D,"g"),D)),f=a+2}else{let a=i.indexOf("]",o);a===-1&&(a=i.length),n.push(i.slice(f+1,a)),f=a+1}i.charAt(f)==="."&&f++}}return n}console.error("parseObjectPath error: Input object path must be a string.")}};u.\u0275fac=function(f){return new(f||u)},u.\u0275prov=Bt({token:u,factory:u.\u0275fac});let e=u;return e})(),vI={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)*)*)$/,regex:function(e){if(/[^\\]\\Z/.test(e))return!1;try{return!0}catch{return!1}}},Nf=class e{static required(u){switch(u===void 0&&(u=!0),u){case!0:return(t,i=!1)=>i||Z(t.value)?null:{required:!0};case!1:return e.nullValidator;default:return Z(u.value)?null:{required:!0}}}static type(u){return Z(u)?(t,i=!1)=>{if(Y(t.value))return null;let f=t.value,n=T(u)?u.some(r=>im(f,r)):im(f,u);return Te(n,i)?null:{type:{requiredType:u,currentValue:f}}}:e.nullValidator}static enum(u){return T(u)?(t,i=!1)=>{if(Y(t.value))return null;let f=t.value,n=(o,D)=>o===D||Pe(o)&&+D==+o||Ot(o,"strict")&&mu(D,"boolean")===o||o===null&&!Z(D)||(0,Pt.default)(o,D),r=T(f)?f.every(o=>u.some(D=>n(D,o))):u.some(o=>n(o,f));return Te(r,i)?null:{enum:{allowedValues:u,currentValue:f}}}:e.nullValidator}static const(u){return Z(u)?(t,i=!1)=>{if(Y(t.value))return null;let f=t.value,r=((o,D)=>o===D||Pe(o)&&+D==+o||Ot(o,"strict")&&mu(D,"boolean")===o||o===null&&!Z(D))(u,f);return Te(r,i)?null:{const:{requiredValue:u,currentValue:f}}}:e.nullValidator}static minLength(u){return Z(u)?(t,i=!1)=>{if(Y(t.value))return null;let f=be(t.value)?t.value.length:0,n=f>=u;return Te(n,i)?null:{minLength:{minimumLength:u,currentLength:f}}}:e.nullValidator}static maxLength(u){return Z(u)?(t,i=!1)=>{let f=be(t.value)?t.value.length:0,n=f<=u;return Te(n,i)?null:{maxLength:{maximumLength:u,currentLength:f}}}:e.nullValidator}static pattern(u,t=!1){return Z(u)?(i,f=!1)=>{if(Y(i.value))return null;let n,r;typeof u=="string"?(r=t?`^${u}$`:u,n=new RegExp(r)):(r=u.toString(),n=u);let o=i.value,D=be(o)?n.test(o):!1;return Te(D,f)?null:{pattern:{requiredPattern:r,currentValue:o}}}:e.nullValidator}static format(u){return Z(u)?(t,i=!1)=>{if(Y(t.value))return null;let f,n=t.value;if(be(n)){let r=vI[u];typeof r=="object"?f=r.test(n):typeof r=="function"?f=r(n):(console.error(`format validator error: "${u}" is not a recognized format.`),f=!0)}else f=["date","time","date-time"].includes(u)&&Object.prototype.toString.call(n)==="[object Date]";return Te(f,i)?null:{format:{requiredFormat:u,currentValue:n}}}:e.nullValidator}static minimum(u){return Z(u)?(t,i=!1)=>{if(Y(t.value))return null;let f=t.value,n=!Pe(f)||f>=u;return Te(n,i)?null:{minimum:{minimumValue:u,currentValue:f}}}:e.nullValidator}static exclusiveMinimum(u){return Z(u)?(t,i=!1)=>{if(Y(t.value))return null;let f=t.value,n=!Pe(f)||+f<u;return Te(n,i)?null:{exclusiveMinimum:{exclusiveMinimumValue:u,currentValue:f}}}:e.nullValidator}static maximum(u){return Z(u)?(t,i=!1)=>{if(Y(t.value))return null;let f=t.value,n=!Pe(f)||+f<=u;return Te(n,i)?null:{maximum:{maximumValue:u,currentValue:f}}}:e.nullValidator}static exclusiveMaximum(u){return Z(u)?(t,i=!1)=>{if(Y(t.value))return null;let f=t.value,n=!Pe(f)||+f<u;return Te(n,i)?null:{exclusiveMaximum:{exclusiveMaximumValue:u,currentValue:f}}}:e.nullValidator}static multipleOf(u){return Z(u)?(t,i=!1)=>{if(Y(t.value))return null;let f=t.value,n=Pe(f)&&f%u===0;return Te(n,i)?null:{multipleOf:{multipleOfValue:u,currentValue:f}}}:e.nullValidator}static minProperties(u){return Z(u)?(t,i=!1)=>{if(Y(t.value))return null;let f=Object.keys(t.value).length||0,n=f>=u;return Te(n,i)?null:{minProperties:{minimumProperties:u,currentProperties:f}}}:e.nullValidator}static maxProperties(u){return Z(u)?(t,i=!1)=>{let f=Object.keys(t.value).length||0,n=f<=u;return Te(n,i)?null:{maxProperties:{maximumProperties:u,currentProperties:f}}}:e.nullValidator}static dependencies(u){return vi(u)!=="object"||Y(u)?e.nullValidator:(t,i=!1)=>{if(Y(t.value))return null;let f=Zt(xa(u,(n,r)=>{if(!Z(t.value[r]))return null;let o={},D,a={};vi(u[r])==="array"?D=u[r]:vi(u[r])==="object"&&(D=u[r].required||[],a=u[r].properties||{});for(let l of D)Te(!Z(t.value[l]),i)&&(o[l]={required:!0});return o=Zt(o,xa(a,(l,m)=>{let p=Zt(xa(l,(b,g)=>{let _=null;if(b==="maximum"||b==="minimum"){let v=!!l["exclusiveM"+b.slice(1)];_=e[b](g,v)}else typeof e[b]=="function"&&(_=e[b](g));return pe(_)?_(t.value[m]):null}));return Y(p)?null:{[m]:p}})),Y(o)?null:{[r]:o}}));return Y(f)?null:f}}static minItems(u){return Z(u)?(t,i=!1)=>{if(Y(t.value))return null;let f=T(t.value)?t.value.length:0,n=f>=u;return Te(n,i)?null:{minItems:{minimumItems:u,currentItems:f}}}:e.nullValidator}static maxItems(u){return Z(u)?(t,i=!1)=>{let f=T(t.value)?t.value.length:0,n=f<=u;return Te(n,i)?null:{maxItems:{maximumItems:u,currentItems:f}}}:e.nullValidator}static uniqueItems(u=!0){return u?(t,i=!1)=>{if(Y(t.value))return null;let f=t.value.slice().sort(),n=[];for(let o=1;o<f.length;o++)f[o-1]===f[o]&&n.includes(f[o])&&n.push(f[o]);let r=!n.length;return Te(r,i)?null:{uniqueItems:{duplicateItems:n}}}:e.nullValidator}static contains(u=!0){return u?(t,i=!1)=>{if(Y(t.value)||!T(t.value))return null;let f=t.value;return Te(!0,i)?null:{contains:{requiredItem:u,currentItems:f}}}:e.nullValidator}static nullValidator(u){return null}static composeAnyOf(u){if(!u)return null;let t=u.filter(pe);return t.length===0?null:(i,f=!1)=>{let n=Mf(i,t,f).filter(pe),r=u.length>n.length;return Te(r,f)?null:Zt(...n,{anyOf:!f})}}static composeOneOf(u){if(!u)return null;let t=u.filter(pe);return t.length===0?null:(i,f=!1)=>{let n=Mf(i,t),o=u.length-n.filter(pe).length===1;if(Te(o,f))return null;let D=Mf(i,t,f);return Zt(...n,...D,{oneOf:!f})}}static composeAllOf(u){if(!u)return null;let t=u.filter(pe);return t.length===0?null:(i,f=!1)=>{let n=Ba(Mf(i,t,f));return Te(n===null,f)?null:Zt(n,{allOf:!f})}}static composeNot(u){return u?(t,i=!1)=>{if(Y(t.value))return null;let f=u(t,!i);return Te(f===null,i)?null:Zt(f,{not:!i})}:null}static compose(u){if(!u)return null;let t=u.filter(pe);return t.length===0?null:(i,f=!1)=>Ba(Mf(i,t,f))}static composeAsync(u){if(!u)return null;let t=u.filter(pe);return t.length===0?null:i=>{let f=dI(i,t).map(hI);return ts.call(us(f),Ba)}}static min(u){return Z(u)?t=>{if(Y(t.value)||Y(u))return null;let i=parseFloat(t.value),f=t.value;return isNaN(i)||i>=u?null:{min:{min:u,actual:f}}}:e.nullValidator}static max(u){return Z(u)?t=>{if(Y(t.value)||Y(u))return null;let i=parseFloat(t.value),f=t.value;return isNaN(i)||i<=u?null:{max:{max:u,actual:f}}}:e.nullValidator}static requiredTrue(u){return u?u.value===!0?null:{required:!0}:e.nullValidator}static email(u){return u?/^(?=.{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(u.value)?null:{email:!0}:e.nullValidator}};function Ct(...e){if(e=e.filter(t=>!Y(t)),e.some(t=>!j(t)))return null;let u={};for(let t of e)for(let i of Object.keys(t)){let f=u[i],n=t[i];if(!x(u,i)||(0,Pt.default)(f,n))u[i]=n;else switch(i){case"allOf":if(T(f)&&T(n))u.allOf=Ct(...f,...n);else return{allOf:[...e]};break;case"additionalItems":case"additionalProperties":case"contains":case"propertyNames":if(j(f)&&j(n))u[i]=Ct(f,n);else if(i==="additionalProperties"&&(f===!1||n===!1))u.combinedSchema=!1;else return{allOf:[...e]};break;case"anyOf":case"oneOf":case"enum":if(T(f)&&T(n)){if(u[i]=f.filter(r=>n.findIndex(o=>(0,Pt.default)(r,o))>-1),!u[i].length)return{allOf:[...e]}}else return{allOf:[...e]};break;case"definitions":if(j(f)&&j(n)){let r=Q({},f);for(let o of Object.keys(n))if(!x(r,o)||(0,Pt.default)(r[o],n[o]))r[o]=n[o];else return{allOf:[...e]};u.definitions=r}else return{allOf:[...e]};break;case"dependencies":if(j(f)&&j(n)){let r=Q({},f);for(let o of Object.keys(n))if(!x(r,o)||(0,Pt.default)(r[o],n[o]))r[o]=n[o];else if(T(n[o])&&T(r[o]))r[o]=Fr(...r[o],...n[o]);else if((T(n[o])||j(n[o]))&&(T(r[o])||j(r[o]))){let D=T(u.required)?u.required:[],a=T(r[o])?{required:Fr(...D,r[o])}:r[o],l=T(n[o])?{required:Fr(...D,n[o])}:n[o];r[o]=Ct(a,l)}else return{allOf:[...e]};u.dependencies=r}else return{allOf:[...e]};break;case"items":if(T(f)&&T(n)){if(u.items=f.filter(r=>n.findIndex(o=>(0,Pt.default)(r,o))>-1),!u.items.length)return{allOf:[...e]}}else if(j(f)&&j(n))u.items=Ct(f,n);else if(T(f)&&j(n))u.items=f.map(r=>Ct(r,n));else if(j(f)&&T(n))u.items=n.map(r=>Ct(r,f));else return{allOf:[...e]};break;case"multipleOf":if(Pe(f)&&Pe(n)){let r=(D,a)=>a?r(a,D%a):D,o=(D,a)=>D*a/r(D,a);u.multipleOf=o(f,n)}else return{allOf:[...e]};break;case"maximum":case"exclusiveMaximum":case"maxLength":case"maxItems":case"maxProperties":if(Pe(f)&&Pe(n))u[i]=Math.min(f,n);else return{allOf:[...e]};break;case"minimum":case"exclusiveMinimum":case"minLength":case"minItems":case"minProperties":if(Pe(f)&&Pe(n))u[i]=Math.max(f,n);else return{allOf:[...e]};break;case"not":if(j(f)&&j(n)){let r=[f,n].reduce((o,D)=>T(D.anyOf)&&Object.keys(D).length===1?[...o,...D.anyOf]:[...o,D],[]);u.not={anyOf:r}}else return{allOf:[...e]};break;case"patternProperties":if(j(f)&&j(n)){let r=Q({},f);for(let o of Object.keys(n))if(!x(r,o)||(0,Pt.default)(r[o],n[o]))r[o]=n[o];else if(j(n[o])&&j(r[o]))r[o]=Ct(r[o],n[o]);else return{allOf:[...e]};u.patternProperties=r}else return{allOf:[...e]};break;case"properties":if(j(f)&&j(n)){let r=Q({},f);x(n,"additionalProperties")&&Object.keys(f).filter(o=>!Object.keys(n).includes(o)).forEach(o=>{n.additionalProperties===!1?delete r[o]:j(n.additionalProperties)&&(r[o]=Ct(r[o],n.additionalProperties))});for(let o of Object.keys(n))if((0,Pt.default)(r[o],n[o])||!x(r,o)&&!x(r,"additionalProperties"))r[o]=n[o];else if(!x(r,o)&&x(r,"additionalProperties"))j(r.additionalProperties)&&(r[o]=Ct(r.additionalProperties,n[o]));else if(j(n[o])&&j(r[o]))r[o]=Ct(r[o],n[o]);else return{allOf:[...e]};u.properties=r}else return{allOf:[...e]};break;case"required":if(T(f)&&T(n))u.required=Fr(...f,...n);else if(typeof n=="boolean"&&typeof f=="boolean")u.required=!!f||!!n;else return{allOf:[...e]};break;case"$schema":case"$id":case"id":break;case"title":case"description":case"$comment":u[i]=n;break;case"type":if((T(n)||be(n))&&(T(f)||be(f))){let r=yI(f,n);if(!r.length)return{allOf:[...e]};u.type=r.length>1?r:r[0]}else return{allOf:[...e]};break;case"uniqueItems":u.uniqueItems=!!f||!!n;break;default:return{allOf:[...e]}}}return u}function Ia(e,u=!1,t=!0){let i={},f=r=>{let o=vi(r,"strict");return{integer:"number",null:"string"}[o]||o},n=r=>Ia(r,u,!1);if(t&&(i.$schema="http://json-schema.org/draft-06/schema#"),i.type=f(e),i.type==="object"){i.properties={},u&&(i.required=[]);for(let r of Object.keys(e))i.properties[r]=n(e[r]),u&&i.required.push(r)}else i.type==="array"&&(i.items=e.map(n),new Set(e.map(f)).size===1&&(i.items=i.items.reduce((r,o)=>Q(Q({},r),o),{})),u&&(i.minItems=1));return i}function BI(e,u,t="schema"){let i=k.parse(u);if(i===null)return console.error(`getFromSchema error: Invalid JSON Pointer: ${u}`),null;let f=e,n=[],r=i.length;t.slice(0,6)==="parent"&&i.length--;for(let o=0;o<r;++o){let D=f,a=i[o],l=!1;if(typeof f!="object")return console.error(`getFromSchema error: Unable to find "${a}" key in schema.`),console.error(e),console.error(u),null;if(f.type==="array"&&(!isNaN(a)||a==="-")?(x(f,"items")&&(j(f.items)?(l=!0,f=f.items,n.push("items")):T(f.items)&&!isNaN(a)&&f.items.length>=+a&&(l=!0,f=f.items[+a],n.push("items",a))),!l&&j(f.additionalItems)?(l=!0,f=f.additionalItems,n.push("additionalItems")):f.additionalItems!==!1&&(l=!0,f={},n.push("additionalItems"))):f.type==="object"&&(j(f.properties)&&x(f.properties,a)?(l=!0,f=f.properties[a],n.push("properties",a)):j(f.additionalProperties)?(l=!0,f=f.additionalProperties,n.push("additionalProperties")):f.additionalProperties!==!1&&(l=!0,f={},n.push("additionalProperties"))),!l){console.error(`getFromSchema error: Unable to find "${a}" item in schema.`),console.error(e),console.error(u);return}}return t.slice(-7)==="Pointer"?n:f}function Qe(e,u,t=new Map){if(!e)return"";let i=k.toGenericPointer(k.compile(e),t);if(i.indexOf("/")===-1)return i;let f=!0;for(;f;)f=!1,u.forEach((n,r)=>{if(k.isSubPointer(n,r))for(;k.isSubPointer(r,i,!0);)i=k.toGenericPointer(n+i.slice(r.length),t),f=!0});return i}function Sa(e,u=null){let t=k.getFirst([[e,"/x-schema-form/type"],[e,"/x-schema-form/widget/component"],[e,"/x-schema-form/widget"],[e,"/widget/component"],[e,"/widget"]]);if(be(t))return $a(t,e,u);let i=e.type;if(i){if(T(i)&&(i=Le("object",i)&&x(e,"properties")?"object":Le("array",i)&&x(e,"items")||Le("array",i)&&x(e,"additionalItems")?"array":Le("string",i)?"string":Le("number",i)?"number":Le("integer",i)?"integer":Le("boolean",i)?"boolean":"unknown"),i==="boolean")return"checkbox";if(i==="object"){if(x(e,"properties")||x(e,"additionalProperties"))return"section";if(x(e,"$ref"))return"$ref"}if(i==="array"){let f=k.getFirst([[e,"/items"],[e,"/additionalItems"]])||{};return x(f,"enum")&&e.maxItems!==1?$a("checkboxes",e,u):"array"}if(i==="null")return"none";if(k.has(u,"/options/titleMap")||x(e,"enum")||ka(e,null,!0))return"select";if(i==="number"||i==="integer")return(i==="integer"||x(e,"multipleOf"))&&x(e,"maximum")&&x(e,"minimum")?"range":i;if(i==="string")return{color:"color",date:"date","date-time":"datetime-local",email:"email",uri:"url"}[e.format]||"text"}return x(e,"$ref")?"$ref":T(e.oneOf)||T(e.anyOf)?"one-of":(console.error(`getInputType error: Unable to determine input type for ${i}`),console.error("schema",e),u&&console.error("layoutNode",u),"none")}function $a(e,u,t=null){return!be(e)||e.slice(0,8)!=="checkbox"&&e.slice(0,5)!=="radio"?e:k.getFirst([[t,"/inline"],[t,"/options/inline"],[u,"/inline"],[u,"/x-schema-form/inline"],[u,"/x-schema-form/options/inline"],[u,"/x-schema-form/widget/inline"],[u,"/x-schema-form/widget/component/inline"],[u,"/x-schema-form/widget/component/options/inline"],[u,"/widget/inline"],[u,"/widget/component/inline"],[u,"/widget/component/options/inline"]])===!0?e.slice(0,5)==="radio"?"radios-inline":"checkboxes-inline":e}function Er(e,u){if(!j(e))return console.error("isInputRequired error: Input schema must be an object."),!1;let t=k.parse(u);if(T(t)){if(!t.length)return e.required===!0;let i=t.pop(),f=t[t.length-1];["properties","additionalProperties","patternProperties","items","additionalItems"].includes(f)&&t.pop();let n=k.get(e,t)||{};if(T(n.required))return n.required.includes(i);if(n.type==="array")return x(n,"minItems")&&Pe(i)&&+n.minItems>+i}return!1}function jf(e,u,t){if(!j(e)||!j(e.options))return;let i={},f=n=>n.slice(0,3).toLowerCase()==="ui:"?n.slice(3):n;if(fm(i,t.formOptions.defaultWidgetOptions,[],f),[[k.get(u,"/ui:widget/options"),[]],[k.get(u,"/ui:widget"),[]],[u,["additionalProperties","additionalItems","properties","items","required","type","x-schema-form","$ref"]],[k.get(u,"/x-schema-form/options"),[]],[k.get(u,"/x-schema-form"),["items","options"]],[e,["_id","$ref","arrayItem","arrayItemType","dataPointer","dataType","items","key","name","options","recursiveReference","type","widget"]],[e.options,[]]].forEach(([n,r])=>fm(i,n,r,f)),!x(i,"titleMap")){let n=null;n=ka(u,i.flatList),n&&(i.titleMap=n),!x(i,"titleMap")&&!x(i,"enum")&&x(u,"items")&&(k.has(u,"/items/titleMap")?i.titleMap=u.items.titleMap:k.has(u,"/items/enum")?(i.enum=u.items.enum,!x(i,"enumNames")&&k.has(u,"/items/enumNames")&&(i.enumNames=u.items.enumNames)):k.has(u,"/items/oneOf")&&(n=ka(u.items,i.flatList),n&&(i.titleMap=n)))}u.type==="integer"&&!Z(i.multipleOf)&&(i.multipleOf=1),k.has(i,"/autocomplete/source")?i.typeahead=i.autocomplete:k.has(i,"/tagsinput/source")?i.typeahead=i.tagsinput:k.has(i,"/tagsinput/typeahead/source")&&(i.typeahead=i.tagsinput.typeahead),e.options=i}function ka(e={},u=null,t=!1){let i=null,f=e.oneOf||e.anyOf||null;if(T(f)&&f.every(n=>n.title)){if(f.every(n=>T(n.enum)&&n.enum.length===1)){if(t)return!0;i=f.map(n=>({name:n.title,value:n.enum[0]}))}else if(f.every(n=>n.const)){if(t)return!0;i=f.map(n=>({name:n.title,value:n.const}))}if(u!==!1&&(i||[]).filter(n=>((n||{}).name||"").indexOf(": ")).length>1){let n=i.map(r=>{let[o,D]=r.name.split(/: (.+)/);return o&&D?ve(Q({},r),{group:o,name:D}):r});(u===!0||n.some((r,o)=>o&&x(r,"group")&&r.group===n[o-1].group))&&(i=n)}}return t?!1:i}function xI(e){if(!j(e))return null;let u={};if(x(e,"type"))switch(e.type){case"string":ct(["pattern","format","minLength","maxLength"],t=>{x(e,t)&&(u[t]=[e[t]])});break;case"number":case"integer":ct(["Minimum","Maximum"],t=>{let i="exclusive"+t,f=t.toLowerCase();if(x(e,f)){let n=x(e,i)&&e[i]===!0;u[f]=[e[f],n]}}),ct(["multipleOf","type"],t=>{x(e,t)&&(u[t]=[e[t]])});break;case"object":ct(["minProperties","maxProperties","dependencies"],t=>{x(e,t)&&(u[t]=[e[t]])});break;case"array":ct(["minItems","maxItems","uniqueItems"],t=>{x(e,t)&&(u[t]=[e[t]])});break}return x(e,"enum")&&(u.enum=[e.enum]),u}function wI(e,u,t,i,f){if(!j(e)){console.error("resolveSchemaReferences error: schema must be an object.");return}let n=new Set,r=new Set,o=new Map,D=new Map,a={};k.forEachDeep(e,(p,b)=>{if(x(p,"$ref")&&be(p.$ref)){let g=k.compile(p.$ref);n.add(g),r.add(b+"~~"+g),o.set(b,g)}}),n.forEach(p=>a[p]=br(e,p));let l=!0;for(;l;)l=!1,Array.from(o).forEach(([p,b])=>Array.from(o).filter(([g,_])=>k.isSubPointer(b,g,!0)&&!k.isSubPointer(_,b,!0)&&!r.has(p+g.slice(b.length)+"~~"+_)).forEach(([g,_])=>{r.add(p+g.slice(b.length)+"~~"+_),l=!0}));Array.from(r).map(p=>p.split("~~")).filter(([p,b])=>k.isSubPointer(b,p)).forEach(([p,b])=>D.set(p,b)),Array.from(o).filter(([p,b])=>Array.from(D.keys()).every(g=>!k.isSubPointer(p,g,!0))).forEach(([p,b])=>Array.from(D).filter(([g,_])=>!D.has(p+g.slice(b.length))&&k.isSubPointer(b,g,!0)&&!k.isSubPointer(b,p,!0)).forEach(([g,_])=>D.set(p+g.slice(b.length),p+_.slice(b.length))));let m=Q({},e);return delete m.definitions,m=br(m,"",a,D),k.forEachDeep(m,(p,b)=>{if(be(p.$ref)){let g=k.compile(p.$ref);k.isSubPointer(g,b,!0)||(g=Qe(b,D),k.set(m,b,{$ref:`#${g}`})),x(u,"refPointer")||(u[g]=g.length?br(m,g,u,D):m),t.has(b)||t.set(b,g);let _=k.toDataPointer(b,m);if(!i.has(_)){let v=k.toDataPointer(g,m);i.set(_,v)}}if(p.type==="array"&&(x(p,"items")||x(p,"additionalItems"))){let g=k.toDataPointer(b,m);if(!f.has(g)){let _=T(p.items)?p.items.length:0;f.set(g,_)}}},!0),m}function br(e,u,t=null,i=null,f=[]){if(!t||!i)return k.getCopy(e,u);typeof u!="string"&&(u=k.compile(u)),f=[...f,u];let n=null;if(u==="")n=(0,fe.default)(e);else{let r=Qe(u,i);r!==u&&(f=[...f,r]),n=k.getFirstCopy([[t,[r]],[e,u],[e,r]])}return k.forEachDeepCopy(n,(r,o)=>{if(j(r)){if(be(r.$ref)){let D=k.compile(r.$ref);if(D.length&&f.every(a=>!k.isSubPointer(D,a,!0))){let a=br(e,D,t,i,f);if(Object.keys(r).length===1)return a;{let l=Q({},r);return delete l.$ref,Ct(a,l)}}}if(T(r.allOf))return AI(r);if(r.type==="array"&&T(r.required))return II(r)}return r},!0,u)}function AI(e){if(!j(e)||!T(e.allOf))return e;let u=Ct(...e.allOf);if(Object.keys(e).length>1){let t=Q({},e);delete t.allOf,u=Ct(u,t)}return u}function II(e){if(e.type==="array"&&T(e.required)){let u=x(e.items,"properties")?"items":x(e.additionalItems,"properties")?"additionalItems":null;u&&!x(e[u],"required")&&(x(e[u],"additionalProperties")||e.required.every(t=>x(e[u].properties,t)))&&(e=(0,fe.default)(e),e[u].required=e.required,delete e.required)}return e}function _i(e,u={}){let t=u.draft||null,i=u.changed||!1;if(typeof e!="object")return e;if(typeof e.map=="function")return[...e.map(r=>_i(r,{changed:i,draft:t}))];let f=Q({},e),n=["array","boolean","integer","null","number","object","string"];if(typeof f.$schema=="string"&&/http\:\/\/json\-schema\.org\/draft\-0\d\/schema\#/.test(f.$schema)&&(t=f.$schema[30]),f.contentEncoding&&(f.media={binaryEncoding:f.contentEncoding},delete f.contentEncoding,i=!0),typeof f.extends=="object"&&(f.allOf=typeof f.extends.map=="function"?f.extends.map(r=>_i(r,{changed:i,draft:t})):[_i(f.extends,{changed:i,draft:t})],delete f.extends,i=!0),f.disallow&&(typeof f.disallow=="string"?f.not={type:f.disallow}:typeof f.disallow.map=="function"&&(f.not={anyOf:f.disallow.map(r=>typeof r=="object"?r:{type:r})}),delete f.disallow,i=!0),typeof f.dependencies=="object"&&Object.keys(f.dependencies).some(r=>typeof f.dependencies[r]=="string")&&(f.dependencies=Q({},f.dependencies),Object.keys(f.dependencies).filter(r=>typeof f.dependencies[r]=="string").forEach(r=>f.dependencies[r]=[f.dependencies[r]]),i=!0),typeof f.maxDecimal=="number"&&(f.multipleOf=1/Math.pow(10,f.maxDecimal),delete f.divisibleBy,i=!0,(!t||t===2)&&(t=1)),typeof f.divisibleBy=="number"&&(f.multipleOf=f.divisibleBy,delete f.divisibleBy,i=!0),typeof f.minimum=="number"&&f.minimumCanEqual===!1?(f.exclusiveMinimum=f.minimum,delete f.minimum,i=!0,t||(t=2)):typeof f.minimumCanEqual=="boolean"&&(delete f.minimumCanEqual,i=!0,t||(t=2)),typeof f.minimum=="number"&&f.exclusiveMinimum===!0?(f.exclusiveMinimum=f.minimum,delete f.minimum,i=!0):typeof f.exclusiveMinimum=="boolean"&&(delete f.exclusiveMinimum,i=!0),typeof f.maximum=="number"&&f.maximumCanEqual===!1?(f.exclusiveMaximum=f.maximum,delete f.maximum,i=!0,t||(t=2)):typeof f.maximumCanEqual=="boolean"&&(delete f.maximumCanEqual,i=!0,t||(t=2)),typeof f.maximum=="number"&&f.exclusiveMaximum===!0?(f.exclusiveMaximum=f.maximum,delete f.maximum,i=!0):typeof f.exclusiveMaximum=="boolean"&&(delete f.exclusiveMaximum,i=!0),typeof f.properties=="object"){let r=Q({},f.properties),o=Array.isArray(f.required)?new Set(f.required):new Set;if((t===1||t===2||Object.keys(r).some(D=>r[D].optional===!0))&&(Object.keys(r).filter(D=>r[D].optional!==!0).forEach(D=>o.add(D)),i=!0,t||(t=2)),Object.keys(r).some(D=>r[D].required===!0)&&(Object.keys(r).filter(D=>r[D].required===!0).forEach(D=>o.add(D)),i=!0),o.size&&(f.required=Array.from(o)),Object.keys(r).some(D=>r[D].requires)){let D=typeof f.dependencies=="object"?Q({},f.dependencies):{};Object.keys(r).filter(a=>r[a].requires).forEach(a=>D[a]=typeof r[a].requires=="string"?[r[a].requires]:r[a].requires),f.dependencies=D,i=!0,t||(t=2)}f.properties=r}if(typeof f.optional=="boolean"&&(delete f.optional,i=!0,t||(t=2)),f.requires&&delete f.requires,typeof f.required=="boolean"&&delete f.required,typeof f.id=="string"&&!f.$id&&(f.id.slice(-1)==="#"&&(f.id=f.id.slice(0,-1)),f.$id=f.id+"-CONVERTED-TO-DRAFT-06#",delete f.id,i=!0),f.type&&(typeof f.type.every=="function"?!f.type.every(r=>n.includes(r)):!n.includes(f.type))&&(i=!0),typeof f.$schema=="string"&&/http\:\/\/json\-schema\.org\/draft\-0[1-4]\/schema\#/.test(f.$schema))f.$schema="http://json-schema.org/draft-06/schema#",i=!0;else if(i&&typeof f.$schema=="string"){let r="Converted to draft 6 from "+f.$schema;typeof f.description=="string"&&f.description.length?f.description+=`
|
|
12
12
|
`+r:f.description=r,delete f.$schema}if(f.type&&(typeof f.type.every=="function"?!f.type.every(r=>n.includes(r)):!n.includes(f.type)))if(f.type.length===1&&(f.type=f.type[0]),typeof f.type=="string")f.type==="any"?f.type=n:delete f.type;else if(typeof f.type=="object"){if(typeof f.type.every=="function")if(f.type.every(r=>typeof r=="string"))f.type=f.type.some(r=>r==="any")?f.type=n:f.type.filter(r=>n.includes(r));else if(f.type.length>1){let r=["additionalItems","items","maxItems","minItems","uniqueItems","contains"],o=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"],D=["maxProperties","minProperties","required","additionalProperties","properties","patternProperties","dependencies","propertyNames"],a=["maxLength","minLength","pattern","format"],l={array:[...o,...D,...a],integer:[...r,...D,...a],number:[...r,...D,...a],object:[...r,...o,...a],string:[...r,...o,...D],all:[...r,...o,...D,...a]},m=[];for(let p of f.type){let b=typeof p=="string"?{type:p}:Q({},p);Object.keys(f).filter(g=>!b.hasOwnProperty(g)&&![...l[b.type]||l.all,"type","default"].includes(g)).forEach(g=>b[g]=f[g]),m.push(b)}f=f.hasOwnProperty("default")?{anyOf:m,default:f.default}:{anyOf:m}}else{let r=f.type;delete f.type,Object.assign(f,r)}}else delete f.type;return Object.keys(f).filter(r=>typeof f[r]=="object").forEach(r=>{if(["definitions","dependencies","properties","patternProperties"].includes(r)&&typeof f[r].map!="function"){let o={};Object.keys(f[r]).forEach(D=>o[D]=_i(f[r][D],{changed:i,draft:t})),f[r]=o}else["items","additionalItems","additionalProperties","allOf","anyOf","oneOf","not"].includes(r)?f[r]=_i(f[r],{changed:i,draft:t}):f[r]=(0,fe.default)(f[r])}),f}function pu(e,u=null,t=!0,i="",f="",n=""){let r=k.get(e.schema,i);t?!pe(u)&&(e.formOptions.setSchemaDefaults===!0||e.formOptions.setSchemaDefaults==="auto"&&Y(e.formValues))&&(u=k.get(e.schema,i+"/default")):u=null;let o=k.get(r,"/type"),D=(x(r,"properties")||x(r,"additionalProperties"))&&o==="object"?"FormGroup":(x(r,"items")||x(r,"additionalItems"))&&o==="array"?"FormArray":!o&&x(r,"$ref")?"$ref":"FormControl",a=Qe(f,e.dataRecursiveRefMap,e.arrayMap);e.dataMap.has(a)||e.dataMap.set(a,new Map);let l=e.dataMap.get(a);l.has("schemaType")||(l.set("schemaPointer",i),l.set("schemaType",r.type),r.format&&(l.set("schemaFormat",r.format),r.type||l.set("schemaType","string")),D&&(l.set("templatePointer",n),l.set("templateType",D)));let m,p=xI(r);switch(D){case"FormGroup":if(m={},x(r,"ui:order")||x(r,"properties")){let L=r["ui:order"]||Object.keys(r.properties);if(L.includes("*")&&!x(r.properties,"*")){let M=Object.keys(r.properties).filter(me=>!L.includes(me));for(let me=L.length-1;me>=0;me--)L[me]==="*"&&L.splice(me,1,...M)}L.filter(M=>x(r.properties,M)||x(r,"additionalProperties")).forEach(M=>m[M]=pu(e,k.get(u,[M]),t,i+(x(r.properties,M)?"/properties/"+M:"/additionalProperties"),f+"/"+M,n+"/controls/"+M)),e.formOptions.fieldsRequired=SI(r,m)}return{controlType:D,controls:m,validators:p};case"FormArray":m=[];let b=Math.max(r.minItems||0,l.get("minItems")||0),g=Math.min(r.maxItems||1e3,l.get("maxItems")||1e3),_=null;if(T(r.items)){let L=l.get("tupleItems")||(T(r.items)?Math.min(r.items.length,g):0);for(let M=0;M<L;M++)if(M<b)m.push(pu(e,T(u)?u[M]:u,t,i+"/items/"+M,f+"/"+M,n+"/controls/"+M));else{let me=Qe(i+"/items/"+M,e.schemaRecursiveRefMap),He=Qe(a+"/"+M,e.dataRecursiveRefMap,e.arrayMap),vu=He!==a+"/"+M;x(e.templateRefLibrary,He)||(e.templateRefLibrary[He]=null,e.templateRefLibrary[He]=pu(e,null,t,me,He,n+"/controls/"+M)),m.push(T(u)?pu(e,u[M],t,i+"/items/"+M,f+"/"+M,n+"/controls/"+M):vu?null:(0,fe.default)(e.templateRefLibrary[He]))}r.items.length<g&&j(r.additionalItems)&&(_=i+"/additionalItems")}else _=i+"/items";if(_){let L=Qe(_,e.schemaRecursiveRefMap),M=Qe(a+"/-",e.dataRecursiveRefMap,e.arrayMap),me=M!==a+"/-";x(e.templateRefLibrary,M)||(e.templateRefLibrary[M]=null,e.templateRefLibrary[M]=pu(e,null,t,L,M,n+"/controls/-"));let He=l;if(!me||x(p,"required")){let vu=Math.min(Math.max(me?0:He.get("tupleItems")+He.get("listItems")||0,T(u)?u.length:0),g);for(let Bu=m.length;Bu<vu;Bu++)m.push(T(u)?pu(e,u[Bu],t,L,f+"/-",n+"/controls/-"):me?null:(0,fe.default)(e.templateRefLibrary[M]))}}return{controlType:D,controls:m,validators:p};case"$ref":let v=k.compile(r.$ref),I=k.toDataPointer(v,r),P=Qe(I,e.dataRecursiveRefMap,e.arrayMap);if(P&&!x(e.templateRefLibrary,P)){e.templateRefLibrary[P]=null;let L=pu(e,t,t,v);L?e.templateRefLibrary[P]=L:delete e.templateRefLibrary[P]}return null;case"FormControl":let R={value:t&&cI(u)?u:null,disabled:l.get("disabled")||!1};return{controlType:D,value:R,validators:p};default:return null}}function qf(e){let u=[],t=null;if(x(e,"validators")&&(ct(e.validators,(i,f)=>{typeof Nf[f]=="function"&&u.push(Nf[f].apply(null,i))}),u.length&&Le(e.controlType,["FormGroup","FormArray"])&&(t=u.length>1?Nf.compose(u):u[0])),x(e,"controlType"))switch(e.controlType){case"FormGroup":let i={};return ct(e.controls,(f,n)=>{let r=qf(f);r&&(i[n]=r)}),new hs(i,t);case"FormArray":return new _s((0,rm.default)((0,om.default)(e.controls,f=>qf(f))),t);case"FormControl":return new Es(e.value,u)}return null}function SI(e,u){let t=!1;if(x(e,"required")&&!Y(e.required)){t=!0;let i=T(e.required)?e.required:[e.required];i=ct(i,f=>k.set(u,"/"+f+"/validators/required",[]))}return t}function $I(e,u,t,i,f=!1,n=!1){if(e===null||typeof e!="object")return e;let r=T(e)?[]:{};return k.forEachDeep(e,(o,D)=>{if(f&&T(o))k.set(r,D,[]);else if(f&&j(o)&&!Bi(o))k.set(r,D,{});else{let a=k.has(u,[D,"schemaType"])?D:Qe(D,t,i);if(k.has(u,[a,"schemaType"])){let l=u.get(a).get("schemaType");if(l==="null")k.set(r,D,null);else if((Z(o)||f)&&Le(l,["string","integer","number","boolean"])){let m=n||o===null&&f?mI(o,l):mu(o,l);(pe(m)||f)&&k.set(r,D,m)}u.get(a).get("schemaFormat")==="date-time"&&(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?$/i.test(o)?k.set(r,D,`${o}Z`):/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d$/i.test(o)?k.set(r,D,`${o}:00Z`):n&&/^\d\d\d\d-[0-1]\d-[0-3]\d$/i.test(o)&&k.set(r,D,`${o}:00:00:00Z`))}else(typeof o!="object"||Bi(o)||o===null&&f)&&(console.error(`formatFormData error: Schema type not found for form value at ${a}`),console.error("dataMap",u),console.error("recursiveRefMap",t),console.error("genericPointer",a))}}),r}function Cr(e,u,t=!1){if(!j(e)||!k.isJsonPointer(u)){if(!k.isJsonPointer(u)){if(typeof u=="string"){let n=e.get(u);if(n)return n}console.error(`getControl error: Invalid JSON Pointer: ${u}`)}return j(e)||console.error(`getControl error: Invalid formGroup: ${e}`),null}let i=k.parse(u);if(t&&(i=i.slice(0,-1)),typeof e.get=="function"&&i.every(n=>n.indexOf(".")===-1)){let n=e.get(i.join("."));if(n)return n}let f=e;for(let n of i)if(x(f,"controls")&&(f=f.controls),T(f)&&n==="-")f=f[f.length-1];else if(x(f,n))f=f[n];else{console.error(`getControl error: Unable to find "${n}" item in FormGroup.`),console.error(u),console.error(e);return}return f}function kI(e,u){let t=!k.get(e,"/formOptions/addSubmit"),i=sm(e.layout,(f,n,r)=>{let o={_id:(0,Qt.default)(),options:{}};if(j(f))Object.assign(o,f),Object.keys(o).filter(a=>!Le(a,["_id","$ref","arrayItem","arrayItemType","dataPointer","dataType","items","key","name","options","recursiveReference","type","widget"])).forEach(a=>{o.options[a]=o[a],delete o[a]}),!x(o,"type")&&be(o.widget)&&(o.type=o.widget,delete o.widget),x(o.options,"title")||x(o.options,"legend")&&(o.options.title=o.options.legend,delete o.options.legend),x(o.options,"validationMessages")||(x(o.options,"errorMessages")?(o.options.validationMessages=o.options.errorMessages,delete o.options.errorMessages):x(o.options,"validationMessage")&&(typeof o.options.validationMessage=="string"?o.options.validationMessages=o.options.validationMessage:(o.options.validationMessages={},Object.keys(o.options.validationMessage).forEach(a=>{let l=a+"",m=l==="0"?"type":l==="1"?"enum":l==="100"?"multipleOf":l==="101"?"minimum":l==="102"?"exclusiveMinimum":l==="103"?"maximum":l==="104"?"exclusiveMaximum":l==="200"?"minLength":l==="201"?"maxLength":l==="202"?"pattern":l==="300"?"minProperties":l==="301"?"maxProperties":l==="302"?"required":l==="304"?"dependencies":l==="400"?"minItems":l==="401"?"maxItems":l==="402"?"uniqueItems":l==="500"?"format":l+"";o.options.validationMessages[m]=o.options.validationMessage[a]})),delete o.options.validationMessage));else if(k.isJsonPointer(f))o.dataPointer=f;else if(be(f))o.key=f;else return console.error("buildLayout error: Form layout element not recognized:"),console.error(f),null;let D=null;if(!x(o,"dataPointer")){if(x(o,"key"))o.dataPointer=o.key==="*"?o.key:k.compile(k.parseObjectPath(o.key),"-"),delete o.key;else if(x(o,"type")&&o.type.slice(-5)==="array"){let a=m=>{if(!(m===null||typeof m!="object")){if(x(m,"dataPointer"))return m.dataPointer;if(T(m.items))for(let p of m.items){if(x(p,"dataPointer")&&p.dataPointer.indexOf("/-")!==-1)return p.dataPointer;if(x(p,"items")){let b=a(p);if(b)return b}}}},l=a(o);l&&(o.dataPointer=l.slice(0,l.lastIndexOf("/-")))}}if(x(o,"dataPointer")){if(o.dataPointer==="*")return qu(e,u,e.formValues);let a=k.get(e.formValues,o.dataPointer.replace(/\/-/g,"/1"));o.dataPointer=k.toGenericPointer(o.dataPointer,e.arrayMap);let l=k.toKey(o.dataPointer);!o.name&&be(l)&&l!=="-"&&(o.name=l);let m=Qe(o.dataPointer,e.dataRecursiveRefMap,e.arrayMap),p=!m.length||m!==o.dataPointer,b;e.dataMap.has(m)||e.dataMap.set(m,new Map);let g=e.dataMap.get(m);if(g.has("schemaPointer")?b=g.get("schemaPointer"):(b=k.toSchemaPointer(m,e.schema),g.set("schemaPointer",b)),g.set("disabled",!!o.options.disabled),D=k.get(e.schema,b),D){if(!x(o,"type"))o.type=Sa(D,o);else if(u.hasWidget(o.type))o.type=$a(o.type,D,o);else{let _=o.type;o.type=Sa(D,o),console.error(`error: widget type "${_}" not found in library. Replacing with "${o.type}".`)}D.type==="object"&&T(D.required)&&g.set("required",D.required),o.dataType=D.type||(x(D,"$ref")?"$ref":null),jf(o,D,e),o.type==="checkboxes"&&x(D,"items")?jf(o,D.items,e):o.dataType==="array"&&(o.options.maxItems=Math.min(D.maxItems||1e3,o.options.maxItems||1e3),o.options.minItems=Math.max(D.minItems||0,o.options.minItems||0),o.options.listItems=Math.max(o.options.listItems||0,T(a)?a.length:0),o.options.tupleItems=T(D.items)?D.items.length:0,o.options.maxItems<o.options.tupleItems?(o.options.tupleItems=o.options.maxItems,o.options.listItems=0):o.options.maxItems<o.options.tupleItems+o.options.listItems?o.options.listItems=o.options.maxItems-o.options.tupleItems:o.options.minItems>o.options.tupleItems+o.options.listItems&&(o.options.listItems=o.options.minItems-o.options.tupleItems),g.has("maxItems")||(g.set("maxItems",o.options.maxItems),g.set("minItems",o.options.minItems),g.set("tupleItems",o.options.tupleItems),g.set("listItems",o.options.listItems)),e.arrayMap.has(m)||e.arrayMap.set(m,o.options.tupleItems)),Er(e.schema,b)&&(o.options.required=!0,e.fieldsRequired=!0)}else jf(o,{},e);if(!o.options.title&&!/^\d+$/.test(o.name)&&(o.options.title=Xt(o.name)),x(o.options,"copyValueTo")&&(typeof o.options.copyValueTo=="string"&&(o.options.copyValueTo=[o.options.copyValueTo]),T(o.options.copyValueTo)&&(o.options.copyValueTo=o.options.copyValueTo.map(_=>k.compile(k.parseObjectPath(_),"-")))),o.widget=u.getWidget(o.type),g.set("inputType",o.type),g.set("widget",o.widget),o.dataType==="array"&&(x(o,"items")||x(o,"additionalItems"))){let _=Qe(o.dataPointer+"/-",e.dataRecursiveRefMap,e.arrayMap);if(e.dataMap.has(_)||e.dataMap.set(_,new Map),e.dataMap.get(_).set("inputType","section"),o.items.length>1){let v=[];for(let I=o.items.length-1;I>=0;I--){let P=o.items[I];if(x(P,"dataPointer")&&P.dataPointer.slice(0,_.length)===_){let R=o.items.splice(I,1)[0];R.dataPointer=o.dataPointer+"/-"+R.dataPointer.slice(_.length),v.unshift(R)}else P.arrayItem=!0,P.arrayItemType="list",P.removable=o.options.removable!==!1}v.length&&o.items.push({_id:(0,Qt.default)(),arrayItem:!0,arrayItemType:o.options.tupleItems>o.items.length?"tuple":"list",items:v,options:{removable:o.options.removable!==!1},dataPointer:o.dataPointer+"/-",type:"section",widget:u.getWidget("section")})}else o.items[0].arrayItem=!0,o.items[0].dataPointer||(o.items[0].dataPointer=k.toGenericPointer(_,e.arrayMap)),k.has(o,"/items/0/options/removable")||(o.items[0].options.removable=!0),o.options.orderable===!1&&(o.items[0].options.orderable=!1),o.items[0].arrayItemType=o.options.tupleItems?"tuple":"list";if(T(o.items)){let v=o.items.filter(I=>I.type!=="$ref").length-o.options.tupleItems;v>o.options.listItems&&(o.options.listItems=v,g.set("listItems",v))}if(x(e.layoutRefLibrary,_)||(e.layoutRefLibrary[_]=(0,fe.default)(o.items[o.items.length-1]),p&&(e.layoutRefLibrary[_].recursiveReference=!0),ct(e.layoutRefLibrary[_],(v,I)=>{x(v,"_id")&&(v._id=null),p&&x(v,"dataPointer")&&(v.dataPointer=v.dataPointer.slice(_.length))},"top-down")),!o.recursiveReference||o.options.required){let v=Math.min(Math.max(o.options.tupleItems+o.options.listItems,T(a)?a.length:0),o.options.maxItems);for(let I=o.items.length;I<v;I++)o.items.push(yr({$ref:_,dataPointer:o.dataPointer,recursiveReference:o.recursiveReference},e,u))}if(o.options.addable!==!1&&o.options.minItems<o.options.maxItems&&(o.items[o.items.length-1]||{}).type!=="$ref"){let v="Add";if(o.options.title)/^add\b/i.test(o.options.title)?v=o.options.title:v+=" "+o.options.title;else if(o.name&&!/^\d+$/.test(o.name))/^add\b/i.test(o.name)?v+=" "+Xt(o.name):v=Xt(o.name);else{let I=BI(e.schema,o.dataPointer,"parentSchema");if(x(I,"title"))v+=" to "+I.title;else{let P=k.parse(o.dataPointer);v+=" to "+Xt(P[P.length-2])}}o.items.push({_id:(0,Qt.default)(),arrayItem:!0,arrayItemType:"list",dataPointer:o.dataPointer+"/-",options:{listItems:o.options.listItems,maxItems:o.options.maxItems,minItems:o.options.minItems,removable:!1,title:v,tupleItems:o.options.tupleItems},recursiveReference:p,type:"$ref",widget:u.getWidget("$ref"),$ref:_}),be(k.get(o,"/style/add"))&&(o.items[o.items.length-1].options.fieldStyle=o.style.add,delete o.style.add,Y(o.style)&&delete o.style)}}else o.arrayItem=!1}else if(x(o,"type")||x(o,"items")){let a=k.get(e.layout,r,0,-2).type;x(o,"type")||(o.type=Le(a,["tabs","tabarray"])?"tab":"array"),o.arrayItem=a==="array",o.widget=u.getWidget(o.type),jf(o,{},e)}return o.type==="submit"&&(t=!0),o});if(e.hasRootReference){let f=(0,fe.default)(i);f[f.length-1].type==="submit"&&f.pop(),e.layoutRefLibrary[""]={_id:null,dataPointer:"",dataType:"object",items:f,name:"",options:(0,fe.default)(e.formOptions.defaultWidgetOptions),recursiveReference:!0,required:!1,type:"section",widget:u.getWidget("section")}}return t||i.push({_id:(0,Qt.default)(),options:{title:"Submit"},type:"submit",widget:u.getWidget("submit")}),i}function TI(e,u){let t=kI(e,u);if(e.formValues){let i=PI({builtLayout:t,formData:e.formValues})}return t}function PI(e){let{builtLayout:u,formData:t}=e,i={},f=function(a,l,m){if((0,hr.default)(a)){m&&m(a,l),a.forEach((p,b)=>{m&&m(p,l+"/"+b),f(p,l+"/"+b,m)});return}if((0,Dm.default)(a)){m&&m(a,l),Object.keys(a).forEach(p=>{m&&m(a[p],l+"/"+p),f(a[p],l+"/"+p,m)});return}};f(t,"",(a,l)=>{(0,hr.default)(a)&&(i[l]=i[l]||a.length)});let n=a=>{let{data:l,dataPointer:m,indexArray:p}=a,b=0,g=m.substring(1).split("/").map((v,I)=>v=="-"&&p[b]!=null?p[b++]:v).join("/");return g="/"+g,i[g]},r=a=>{let l={type:"section",recursiveReference:!1,items:[]};return(0,fe.default)(a)},o=a=>{let{builtLayout:l,indices:m,parentDataPointer:p,indexPos:b}=a;if(m=m||[],b=b==null?b=-1:b,(0,hr.default)(l)){l.forEach((_,v)=>{o({builtLayout:_,indices:m,indexPos:b,parentDataPointer:p})});return}let g=["array"];if(l.items&&g.indexOf(l.dataType)>=0&&l.dataPointer&&!l.recursiveReference){let _=n({data:t,dataPointer:l.dataPointer,indexArray:m}),v=l.items.length;if(l.items.forEach(I=>{I.type&&I.type=="$ref"&&v--}),v=Math.max(v,0),v<_){let I=_-v;v==0&&l.items[0].recursiveReference&&(I=0);for(let P=0;P<I;P++){let L=l.items[0].type&&l.items[0].type=="$ref"?r(l.items[0]):(0,fe.default)(l.items[0]);L._id=(0,Qt.default)("new_"),l.items.unshift(L)}l.options.listItems&&(l.options.listItems=_)}m[l.dataPointer]=m[l.dataPointer]||-1,b++,l.items.forEach((I,P)=>{m[b]=P,o({builtLayout:I,indices:m,parentDataPointer:l.dataPointer,indexPos:b})}),b--}else l.items&&l.items.forEach((_,v)=>{o({builtLayout:_,indices:m,parentDataPointer:p,indexPos:b})})};return o({builtLayout:u}),u}function qu(e,u,t=null,i="",f="",n=!1,r=null,o=null,D=!1,a=""){let l=k.get(e.schema,i);if(!x(l,"type")&&!x(l,"$ref")&&!x(l,"x-schema-form"))return null;let m=Sa(l);!pe(t)&&(e.formOptions.setSchemaDefaults===!0||e.formOptions.setSchemaDefaults==="auto"&&Y(e.formValues))&&(t=k.get(e.schema,i+"/default"));let p={_id:D?null:(0,Qt.default)(),arrayItem:n,dataPointer:k.toGenericPointer(f,e.arrayMap),dataType:l.type||(x(l,"$ref")?"$ref":null),options:{},required:Er(e.schema,i),type:m,widget:u.getWidget(m)},b=k.toKey(p.dataPointer);b!=="-"&&(p.name=b),p.arrayItem&&(p.arrayItemType=r,p.options.removable=o!==!1);let g=Qe(a+f,e.dataRecursiveRefMap,e.arrayMap),_=!g.length||g!==a+f;e.dataMap.has(g)||e.dataMap.set(g,new Map);let v=e.dataMap.get(g);if(v.has("inputType")||(v.set("schemaPointer",i),v.set("inputType",p.type),v.set("widget",p.widget),v.set("disabled",!!p.options.disabled)),jf(p,l,e),!p.options.title&&p.name&&!/^\d+$/.test(p.name)&&(p.options.title=Xt(p.name)),p.dataType==="object"){if(T(l.required)&&!v.has("required")&&v.set("required",l.required),j(l.properties)){let I=[],P=l["ui:order"]||Object.keys(l.properties);if(P.includes("*")&&!x(l.properties,"*")){let R=Object.keys(l.properties).filter(L=>!P.includes(L));for(let L=P.length-1;L>=0;L--)P[L]==="*"&&P.splice(L,1,...R)}P.filter(R=>x(l.properties,R)||x(l,"additionalProperties")).forEach(R=>{let L=x(l.properties,R)?"/properties/"+R:"/additionalProperties",M=qu(e,u,j(t)?t[R]:null,i+L,f+"/"+R,!1,null,null,D,a);M&&(Er(l,"/"+R)&&(M.options.required=!0,e.fieldsRequired=!0),I.push(M))}),f===""&&!D?p=I:p.items=I}}else if(p.dataType==="array"){p.items=[],p.options.maxItems=Math.min(l.maxItems||1e3,p.options.maxItems||1e3),p.options.minItems=Math.max(l.minItems||0,p.options.minItems||0),!p.options.minItems&&Er(e.schema,i)&&(p.options.minItems=1),x(p.options,"listItems")||(p.options.listItems=1),p.options.tupleItems=T(l.items)?l.items.length:0,p.options.maxItems<=p.options.tupleItems?(p.options.tupleItems=p.options.maxItems,p.options.listItems=0):p.options.maxItems<p.options.tupleItems+p.options.listItems?p.options.listItems=p.options.maxItems-p.options.tupleItems:p.options.minItems>p.options.tupleItems+p.options.listItems&&(p.options.listItems=p.options.minItems-p.options.tupleItems),v.has("maxItems")||(v.set("maxItems",p.options.maxItems),v.set("minItems",p.options.minItems),v.set("tupleItems",p.options.tupleItems),v.set("listItems",p.options.listItems)),e.arrayMap.has(g)||e.arrayMap.set(g,p.options.tupleItems),o=p.options.removable!==!1;let I=null;if(T(l.items)){p.items=[];for(let P=0;P<p.options.tupleItems;P++){let R,L=Qe(g+"/"+P,e.dataRecursiveRefMap,e.arrayMap),M=!L.length||L!==g+"/"+P;o&&P>=p.options.minItems?(x(e.layoutRefLibrary,L)||(e.layoutRefLibrary[L]=null,e.layoutRefLibrary[L]=qu(e,u,T(t)?t[P]:null,i+"/items/"+P,M?"":f+"/"+P,!0,"tuple",!0,!0,M?f+"/"+P:""),M&&(e.layoutRefLibrary[L].recursiveReference=!0)),R=yr({$ref:L,dataPointer:f+"/"+P,recursiveReference:M},e,u,T(t)?t[P]:null)):R=qu(e,u,T(t)?t[P]:null,i+"/items/"+P,f+"/"+P,!0,"tuple",!1,D,a),R&&p.items.push(R)}j(l.additionalItems)&&(I=i+"/additionalItems")}else j(l.items)&&(I=i+"/items");if(I){let P=Qe(g+"/-",e.dataRecursiveRefMap,e.arrayMap),R=!P.length||P!==g+"/-",L=Qe(I,e.schemaRecursiveRefMap,e.arrayMap);if(P.length&&!x(e.layoutRefLibrary,P)&&(e.layoutRefLibrary[P]=null,e.layoutRefLibrary[P]=qu(e,u,null,L,R?"":f+"/-",!0,"list",o,!0,R?f+"/-":""),R&&(e.layoutRefLibrary[P].recursiveReference=!0)),!R||p.options.required){let M=Math.min(Math.max(R?0:p.options.tupleItems+p.options.listItems,T(t)?t.length:0),p.options.maxItems);if(p.items.length<M)for(let me=p.items.length;me<M;me++)p.items.push(yr({$ref:P,dataPointer:f+"/-",recursiveReference:R},e,u,T(t)?t[me]:null))}if(p.options.addable!==!1&&p.options.minItems<p.options.maxItems&&(p.items[p.items.length-1]||{}).type!=="$ref"){let M=((e.layoutRefLibrary[P]||{}).options||{}).title,me=M?"Add ":"Add to ";M||(M=l.title||Xt(k.toKey(f))),/^add\b/i.test(M)||(M=me+M),p.items.push({_id:(0,Qt.default)(),arrayItem:!0,arrayItemType:"list",dataPointer:p.dataPointer+"/-",options:{listItems:p.options.listItems,maxItems:p.options.maxItems,minItems:p.options.minItems,removable:!1,title:M,tupleItems:p.options.tupleItems},recursiveReference:R,type:"$ref",widget:u.getWidget("$ref"),$ref:P})}}}else if(p.dataType==="$ref"){let I=k.compile(l.$ref),P=k.toDataPointer(I,e.schema),R="";if(p.options.add)R=p.options.add;else if(p.name&&!/^\d+$/.test(p.name))R=(/^add\b/i.test(p.name)?"":"Add ")+Xt(p.name);else{let L=k.get(e.schema,i,0,-1);if(x(L,"title"))R="Add to "+L.title;else{let M=k.parse(p.dataPointer);R="Add to "+Xt(M[M.length-2])}}if(Object.assign(p,{recursiveReference:!0,widget:u.getWidget("$ref"),$ref:P}),Object.assign(p.options,{removable:!1,title:R}),Pe(k.get(e.schema,i,0,-1).maxItems)&&(p.options.maxItems=k.get(e.schema,i,0,-1).maxItems),P.length)if(x(e.layoutRefLibrary,P))e.layoutRefLibrary[P].recursiveReference||(e.layoutRefLibrary[P].recursiveReference=!0);else{e.layoutRefLibrary[P]=null;let L=qu(e,u,null,I,"",p.arrayItem,p.arrayItemType,!0,!0,f);L?(L.recursiveReference=!0,e.layoutRefLibrary[P]=L):delete e.layoutRefLibrary[P]}}return p}function sm(e,u,t="",i=e){let f=0,n=[];return ct(e,(r,o)=>{let D=+o+f,a=t+"/"+D,l=gr(r),m=[];j(r)&&(x(r,"tabs")&&(r.items=r.tabs,delete r.tabs),x(r,"items")&&(m=T(r.items)?r.items:[r.items])),m.length&&(l.items=sm(m,u,a+"/items",i)),l=u(l,D,a,i),pe(l)?(T(l)&&(f+=l.length-1),n=n.concat(l)):f--}),n}function yr(e,u,t=null,i=null){if(e.recursiveReference&&t){let f=(0,fe.default)(e);return f.options||(f.options={}),Object.assign(f,{recursiveReference:!0,widget:t.getWidget("$ref")}),Object.assign(f.options,{removable:!1,title:"Add "+f.$ref}),f}else{let f=u.layoutRefLibrary[e.$ref];return pe(i)?f=qu(u,t,i,k.toSchemaPointer(e.$ref,u.schema),e.$ref,f.arrayItem,f.arrayItemType,f.options.removable,!1):(f=(0,fe.default)(f),k.forEachDeep(f,(n,r)=>{x(n,"_id")&&(n._id=(0,Qt.default)()),e.recursiveReference&&x(n,"dataPointer")&&(n.dataPointer=e.dataPointer+n.dataPointer)})),f}}function Oa(e,u,t=!0,i=!0){let f=[],n=!1;if(e)if(T(e))if(u){for(let r of Object.keys(e))if(j(e[r])){let o=e[r].value;if(u.includes(o)){let D=e[r].name;f.push({name:D,value:o}),o==null&&(n=!0)}}else if(be(e[r])&&r<u.length){let o=e[r],D=u[r];f.push({name:o,value:D}),D==null&&(n=!0)}}else f=e,t||(n=!!f.filter(r=>r.value===void 0||r.value===null).length);else if(u)for(let r of Object.keys(u)){let o=u[r];if(x(e,o)){let D=e[o];f.push({name:D,value:o}),o==null&&(n=!0)}}else for(let r of Object.keys(e)){let o=e[r];f.push({name:o,value:r}),r==null&&(n=!0)}else if(u)for(let r of Object.keys(u)){let o=u[r],D=u[r];f.push({name:o,value:D}),D==null&&(n=!0)}else f=[{name:"True",value:!0},{name:"False",value:!1}];return f.some(r=>x(r,"group"))&&(n=!1,i?f=f.reduce((r,o)=>(x(o,"group")?(T(o.items)&&(r=[...r,...o.items.map(D=>ve(Q({},D),{name:`${o.group}: ${D.name}`}))],o.items.some(D=>D.value===void 0||D.value===null)&&(n=!0)),x(o,"name")&&x(o,"value")&&(o.name=`${o.group}: ${o.name}`,delete o.group,r.push(o),(o.value===void 0||o.value===null)&&(n=!0))):(r.push(o),(o.value===void 0||o.value===null)&&(n=!0)),r),[]):f=f.reduce((r,o)=>(x(o,"group")?(o.group!==(r[r.length-1]||{}).group&&r.push({group:o.group,items:o.items||[]}),x(o,"name")&&x(o,"value")&&(r[r.length-1].items.push({name:o.name,value:o.value}),(o.value===void 0||o.value===null)&&(n=!0))):(r.push(o),(o.value===void 0||o.value===null)&&(n=!0)),r),[])),!t&&!n&&f.unshift({name:"<em>None</em>",value:null}),f}var Ne=(()=>{let u=class u{constructor(){this.JsonFormCompatibility=!1,this.ReactJsonSchemaFormCompatibility=!1,this.AngularSchemaFormCompatibility=!1,this.tpldata={},this.ajvOptions={allErrors:!0,validateFormats:!1,strict:!1},this.ajv=new nm.default(this.ajvOptions),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 mt,this.isValidChanges=new mt,this.validationErrorChanges=new mt,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.setLanguage(this.language),this.ajv.addMetaSchema(V2)}ngOnDestroy(){var i,f,n;(i=this.fcValueChangesSubs)==null||i.unsubscribe(),(f=this.fcStatusChangesSubs)==null||f.unsubscribe(),(n=this.formValueSubscription)==null||n.unsubscribe(),this.fcValueChangesSubs=null,this.fcStatusChangesSubs=null,this.formValueSubscription=null}setLanguage(i="en-US"){this.language=i;let f={de:nI,en:rI,es:oI,fr:DI,it:aI,pt:sI,zh:lI},n=i.slice(0,2),r=f[n];this.defaultFormOptions.defaultWidgetOptions.validationMessages=(0,fe.default)(r)}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,fe.default)(this.defaultFormOptions)}buildRemoteError(i){ct(i,(f,n)=>{if(n in this.formGroup.controls)for(let r of f){let o={};o[r.code]=r.message,this.formGroup.get(n).setErrors(o,{emitEvent:!0})}})}validateData(i,f=!0){this.data=$I(i,this.dataMap,this.dataRecursiveRefMap,this.arrayMap,this.formOptions.returnEmptyFields),this.isValid=this.validateFormData(this.data),this.validData=this.isValid?this.data:null;let n=r=>{let o={};return(r||[]).forEach(D=>{let a=D.instancePath||"ROOT";o[a]||(o[a]=[]),o[a].push(D.message)}),o};this.ajvErrors=this.validateFormData.errors,this.validationErrors=n(this.validateFormData.errors),f&&(this.dataChanges.next(this.data),this.isValidChanges.next(this.isValid),this.validationErrorChanges.next(this.ajvErrors))}buildFormGroupTemplate(i=null,f=!0){this.formGroupTemplate=pu(this,i,f)}buildFormGroup(){this.formGroup=qf(this.formGroupTemplate),this.formGroup&&(this.compileAjvSchema(),this.validateData(this.formGroup.value),this.formValueSubscription&&this.formValueSubscription.unsubscribe(),this.formValueSubscription=this.formGroup.valueChanges.subscribe(i=>this.validateData(i)))}buildLayout(i){this.layout=TI(this,i)}setOptions(i){if(j(i)){let f=(0,fe.default)(i);j(f.defaultOptions)&&(Object.assign(this.formOptions.defaultWidgetOptions,f.defaultOptions),delete f.defaultOptions),j(f.defaultWidgetOptions)&&(Object.assign(this.formOptions.defaultWidgetOptions,f.defaultWidgetOptions),delete f.defaultWidgetOptions),Object.assign(this.formOptions,f);let n=this.formOptions.defaultWidgetOptions;["ErrorState","SuccessState"].filter(r=>x(n,"disable"+r)).forEach(r=>{n["enable"+r]=!n["disable"+r],delete n["disable"+r]})}}compileAjvSchema(){this.validateFormData||(Array.isArray(this.schema.properties["ui:order"])&&(this.schema["ui:order"]=this.schema.properties["ui:order"],delete this.schema.properties["ui:order"]),this.ajv.removeSchema(this.schema),this.validateFormData=this.ajv.compile(this.schema))}buildSchemaFromData(i,f=!1){if(i)return Ia(i,f);this.schema=Ia(this.formValues,f)}buildSchemaFromLayout(i){if(i)return void 0;this.schema=(this.layout,void 0)}setTpldata(i={}){this.tpldata=i}parseText(i="",f={},n={},r=null){return!i||!/{{.+?}}/.test(i)?i:i.replace(/{{(.+?)}}/g,(...o)=>this.parseExpression(o[1],f,n,r,this.tpldata))}parseExpression(i="",f={},n={},r=null,o=null){if(typeof i!="string")return"";let D=typeof r=="number"?r+1+"":r||"";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"&&!x(n,"value"))return f;if(['"',"'"," ","||","&&","+"].every(a=>i.indexOf(a)===-1)){let a=k.parseObjectPath(i);return a[0]==="value"&&k.has(f,a.slice(1))?k.get(f,a.slice(1)):a[0]==="values"&&k.has(n,a.slice(1))?k.get(n,a.slice(1)):a[0]==="tpldata"&&k.has(o,a.slice(1))?k.get(o,a.slice(1)):k.has(n,a)?k.get(n,a):""}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((a,l)=>a||this.parseExpression(l,f,n,r,o),""):i.indexOf("&&")>-1?i.split("&&").reduce((a,l)=>a&&this.parseExpression(l,f,n,r,o)," ").trim():i.indexOf("+")>-1?i.split("+").map(a=>this.parseExpression(a,f,n,r,o)).join(""):""}setArrayItemTitle(i={},f=null,n=null){let r=i.layoutNode;if(r.options.buttonText)return r.options.buttonText;let o=this.getFormControlValue(i),D=(r.type||"").slice(-5)==="array"&&T(o),a=k.getFirst(D&&f.type!=="$ref"?[[f,"/options/legend"],[f,"/options/title"],[r,"/options/title"],[r,"/options/legend"]]:[[f,"/options/title"],[f,"/options/legend"],[r,"/options/title"],[r,"/options/legend"]]);if(!a)return a;let l=T(o)&&n<o.length?o[n]:o;return this.parseText(a,l,o,n)}setItemTitle(i){return!i.options.title&&/^(\d+|-)$/.test(i.layoutNode.name)?null:this.parseText(i.options.title||am(i.layoutNode.name),this.getFormControlValue(this),(this.getFormControlGroup(this)||{}).value,i.dataIndex[i.dataIndex.length-1])}evaluateCondition(i,f){let n=f&&f[f.length-1],r=!0;if(Z((i.options||{}).condition)){if(typeof i.options.condition=="string"){let o=i.options.condition;Z(n)&&(o=o.replace("[arrayIndex]",`[${n}]`)),o=k.parseObjectPath(o),r=!!k.get(this.data,o),!r&&o[0]==="model"&&(r=!!k.get({model:this.data},o))}else if(typeof i.options.condition=="function")r=i.options.condition(this.data);else if(typeof i.options.condition.functionBody=="string")try{r=new Function("model","arrayIndices",i.options.condition.functionBody)(this.data,f)}catch{r=!0,console.error("condition functionBody errored out on evaluation: "+i.options.condition.functionBody)}}return r}initializeControl(i,f=!0){if(!j(i))return!1;if(Y(i.options)&&(i.options=Y((i.layoutNode||{}).options)?(0,fe.default)(this.formOptions):i.layoutNode.options),i.formControl=this.getFormControl(i),i.boundControl=f&&!!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"&&Z(i.controlValue),this.fcStatusChangesSubs=i.formControl.statusChanges.subscribe(n=>i.options.errorMessage=n==="VALID"?null:this.formatErrors(i.formControl.errors,i.options.validationMessages)),this.fcValueChangesSubs=i.formControl.valueChanges.subscribe(n=>{(0,Pt.default)(i.controlValue,n)||(i.controlValue=n)});else{i.controlName=i.layoutNode.name,i.controlValue=i.layoutNode.value||null;let n=this.getDataPointer(i);f&&n&&console.error(`warning: control "${n}" is not bound to the Angular FormGroup.`)}return i.boundControl}formatErrors(i,f={}){if(Y(i))return null;j(f)||(f={});let n=D=>D[0].toUpperCase()+(D.slice(1)||"").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," "),r=D=>typeof D=="object"?Object.keys(D).map(a=>D[a]===!0?n(a):D[a]===!1?"Not "+n(a):n(a)+": "+r(D[a])).join(", "):n(D.toString()),o=[];return Object.keys(i).filter(D=>D!=="required"||Object.keys(i).length===1).map(D=>typeof f=="string"?f:typeof f[D]=="function"?f[D](i[D]):typeof f[D]=="string"?/{{.+?}}/.test(f[D])?Object.keys(i[D]).reduce((a,l)=>a.replace(new RegExp("{{"+l+"}}","g"),i[D][l]),f[D]):f[D]:n(D)+" Error: "+r(i[D])).join("<br>")}updateValue(i,f){if(i.controlValue=f,i.boundControl&&(i.formControl.setValue(f),i.formControl.markAsDirty()),i.layoutNode.value=f,T(i.options.copyValueTo))for(let n of i.options.copyValueTo){let r=Cr(this.formGroup,n);j(r)&&typeof r.setValue=="function"&&(r.setValue(f),r.markAsDirty())}}updateArrayCheckboxList(i,f){let n=this.getFormControl(i);for(;n.value.length;)n.removeAt(0);let r=Qe(i.layoutNode.dataPointer+"/-",this.dataRecursiveRefMap,this.arrayMap);for(let o of f)if(o.checked){let D=qf(this.templateRefLibrary[r]);D.setValue(o.value),n.push(D)}n.markAsDirty()}getFormControl(i){return!i.layoutNode||!pe(i.layoutNode.dataPointer)||i.layoutNode.type==="$ref"?null:Cr(this.formGroup,this.getDataPointer(i))}getFormControlValue(i){if(!i.layoutNode||!pe(i.layoutNode.dataPointer)||i.layoutNode.type==="$ref")return null;let f=Cr(this.formGroup,this.getDataPointer(i));return f?f.value:null}getFormControlGroup(i){return!i.layoutNode||!pe(i.layoutNode.dataPointer)?null:Cr(this.formGroup,this.getDataPointer(i),!0)}getFormControlName(i){return!i.layoutNode||!pe(i.layoutNode.dataPointer)||!Z(i.dataIndex)?null:k.toKey(this.getDataPointer(i))}getLayoutArray(i){return k.get(this.layout,this.getLayoutPointer(i),0,-1)}getParentNode(i){return k.get(this.layout,this.getLayoutPointer(i),0,-2)}getDataPointer(i){return!i.layoutNode||!pe(i.layoutNode.dataPointer)||!Z(i.dataIndex)?null:k.toIndexedPointer(i.layoutNode.dataPointer,i.dataIndex,this.arrayMap)}getLayoutPointer(i){return Z(i.layoutIndex)?"/"+i.layoutIndex.join("/items/"):null}isControlBound(i){if(!i.layoutNode||!pe(i.layoutNode.dataPointer)||!Z(i.dataIndex))return!1;let f=this.getFormControlGroup(i),n=this.getFormControlName(i);return f?x(f.controls,n):!1}addItem(i,f){if(!i.layoutNode||!pe(i.layoutNode.$ref)||!Z(i.dataIndex)||!Z(i.layoutIndex))return!1;let n=qf(this.templateRefLibrary[i.layoutNode.$ref]);i.layoutNode.arrayItem?this.getFormControlGroup(i).push(n):this.getFormControlGroup(i).addControl(f||this.getFormControlName(i),n);let r=yr(i.layoutNode,this);return r.arrayItem=i.layoutNode.arrayItem,i.layoutNode.arrayItemType?r.arrayItemType=i.layoutNode.arrayItemType:delete r.arrayItemType,f&&(r.name=f,r.dataPointer+="/"+k.escape(f),r.options.title=Xt(f)),k.insert(this.layout,this.getLayoutPointer(i),r),!0}moveArrayItem(i,f,n){if(!i.layoutNode||!pe(i.layoutNode.dataPointer)||!Z(i.dataIndex)||!Z(i.layoutIndex)||!pe(f)||!pe(n)||f===n)return!1;let r=this.getFormControlGroup(i),o=r.at(f);r.removeAt(f),r.insert(n,o),r.updateValueAndValidity();let D=this.getLayoutArray(i);return D.splice(n,0,D.splice(f,1)[0]),!0}removeItem(i){return!i.layoutNode||!pe(i.layoutNode.dataPointer)||!Z(i.dataIndex)||!Z(i.layoutIndex)?!1:(i.layoutNode.arrayItem?this.getFormControlGroup(i).removeAt(i.dataIndex[i.dataIndex.length-1]):this.getFormControlGroup(i).removeControl(this.getFormControlName(i)),k.remove(this.layout,this.getLayoutPointer(i)),!0)}};u.\u0275fac=function(f){return new(f||u)},u.\u0275prov=Bt({token:u,factory:u.\u0275fac});let e=u;return e})(),OI=(()=>{let u=class u{constructor(i){this.jsf=i}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)}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["add-reference-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"dataIndex"},standalone:!1,decls:1,vars:1,consts:[[3,"class","disabled","click",4,"ngIf"],[3,"click","disabled"],[3,"class",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"]],template:function(f,n){f&1&&$(0,iA,3,5,"button",0),f&2&&h("ngIf",n.showAddButton)},dependencies:[ft],encapsulation:2});let e=u;return e})(),MI=(()=>{let u=class u{constructor(i){this.jsf=i,this.controlDisabled=!1,this.boundControl=!1}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)}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["button-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"dataIndex"},standalone:!1,decls:3,vars:11,consts:[[3,"click","disabled","name","type","value"],[3,"class","innerHTML",4,"ngIf"],[3,"innerHTML"]],template:function(f,n){f&1&&(d(0,"div")(1,"button",0),O("click",function(o){return n.updateValue(o)}),$(2,fA,1,3,"span",1),c()()),f&2&&(J((n.options==null?null:n.options.htmlClass)||""),s(),J((n.options==null?null:n.options.fieldHtmlClass)||""),h("disabled",n.controlDisabled)("name",n.controlName)("type",n.layoutNode==null?null:n.layoutNode.type)("value",n.controlValue),U("readonly",n.options!=null&&n.options.readonly?"readonly":null)("aria-describedby","control"+(n.layoutNode==null?null:n.layoutNode._id)+"Status"),s(),h("ngIf",(n.options==null?null:n.options.icon)||(n.options==null?null:n.options.title)))},dependencies:[ft],encapsulation:2});let e=u;return e})(),jI=(()=>{let u=class u{constructor(i){this.jsf=i,this.controlDisabled=!1,this.boundControl=!1,this.trueValue=!0,this.falseValue=!1}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}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["checkbox-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"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(f,n){f&1&&(d(0,"label"),$(1,nA,1,7,"input",0)(2,rA,1,9,"input",1)(3,oA,1,3,"span",2),w(4,"span",3),c()),f&2&&(J((n.options==null?null:n.options.itemLabelHtmlClass)||" hb-uix-switch"),U("for","control"+(n.layoutNode==null?null:n.layoutNode._id)),s(),h("ngIf",n.boundControl),s(),h("ngIf",!n.boundControl),s(),h("ngIf",n.options==null?null:n.options.title))},dependencies:[ft,Uu,Dt,Gu],encapsulation:2});let e=u;return e})(),NI=(()=>{let u=class u{constructor(i){this.jsf=i,this.controlDisabled=!1,this.boundControl=!1,this.checkboxList=[]}ngOnInit(){if(this.options=this.layoutNode.options||{},this.layoutOrientation=this.layoutNode.type==="checkboxes-inline"||this.layoutNode.type==="checkboxbuttons"?"horizontal":"vertical",this.jsf.initializeControl(this),this.checkboxList=Oa(this.options.titleMap||this.options.enumNames,this.options.enum,!0),this.boundControl){let i=this.jsf.getFormControl(this);this.checkboxList.forEach(f=>f.checked=i.value.includes(f.value))}}updateValue(i){for(let f of this.checkboxList)i.target.value===f.value&&(f.checked=i.target.checked);this.boundControl&&this.jsf.updateArrayCheckboxList(this,this.checkboxList)}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["checkboxes-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"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(f,n){f&1&&$(0,DA,1,5,"label",0)(1,sA,2,3,"div",1)(2,dA,2,1,"div",2),f&2&&(h("ngIf",n.options==null?null:n.options.title),s(),h("ngIf",n.layoutOrientation==="horizontal"),s(),h("ngIf",n.layoutOrientation==="vertical"))},dependencies:[wu,ft],encapsulation:2});let e=u;return e})(),qI=(()=>{let u=class u{constructor(i){this.jsf=i,this.controlDisabled=!1,this.boundControl=!1}ngOnInit(){this.options=this.layoutNode.options||{},this.jsf.initializeControl(this)}updateValue(i){this.jsf.updateValue(this,i.target.value)}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["file-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"dataIndex"},standalone:!1,decls:0,vars:0,template:function(f,n){},encapsulation:2});let e=u;return e})(),VI=(()=>{let u=class u{constructor(i){this.jsf=i,this.controlDisabled=!1,this.boundControl=!1,this.autoCompleteList=[]}ngOnInit(){this.options=this.layoutNode.options||{},this.jsf.initializeControl(this)}updateValue(i){this.jsf.updateValue(this,i.target.value)}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["input-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"dataIndex"},standalone:!1,decls:5,vars:6,consts:[[3,"class","display","innerHTML",4,"ngIf"],[3,"formControl","class","id","name","readonly","type",4,"ngIf"],[3,"class","disabled","id","name","readonly","type","value","input",4,"ngIf"],[3,"id",4,"ngIf"],[3,"innerHTML"],[3,"formControl","id","name","readonly","type"],[3,"input","disabled","id","name","readonly","type","value"],[3,"id"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(f,n){f&1&&(d(0,"div"),$(1,cA,1,6,"label",0)(2,pA,1,14,"input",1)(3,mA,1,15,"input",2)(4,CA,2,2,"datalist",3),c()),f&2&&(J((n.options==null?null:n.options.htmlClass)||""),s(),h("ngIf",n.options==null?null:n.options.title),s(),h("ngIf",n.boundControl),s(),h("ngIf",!n.boundControl),s(),h("ngIf",n.options==null||n.options.typeahead==null?null:n.options.typeahead.source))},dependencies:[wu,ft,Ji,Zi,Wu,Dt,Gu],encapsulation:2});let e=u;return e})(),RI=(()=>{let u=class u{constructor(i){this.jsf=i,this.message=null}ngOnInit(){this.options=this.layoutNode.options||{},this.message=this.options.help||this.options.helpvalue||this.options.msg||this.options.message}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["message-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"dataIndex"},standalone:!1,decls:1,vars:1,consts:[[3,"class","innerHTML",4,"ngIf"],[3,"innerHTML"]],template:function(f,n){f&1&&$(0,hA,1,3,"span",0),f&2&&h("ngIf",n.message)},dependencies:[ft],encapsulation:2});let e=u;return e})(),LI=(()=>{let u=class u{};u.\u0275fac=function(f){return new(f||u)},u.\u0275cmp=K({type:u,selectors:[["none-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"dataIndex"},standalone:!1,decls:0,vars:0,template:function(f,n){},encapsulation:2});let e=u;return e})(),zI=(()=>{let u=class u{constructor(i){this.jsf=i,this.controlDisabled=!1,this.boundControl=!1,this.allowNegative=!0,this.allowDecimal=!0,this.allowExponents=!1,this.lastValidNumber=""}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)}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["number-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"dataIndex"},standalone:!1,decls:5,vars:6,consts:[[3,"class","display","innerHTML",4,"ngIf"],[3,"formControl","class","id","name","readonly","title","type",4,"ngIf"],[3,"class","disabled","id","name","readonly","title","type","value","input",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"],[3,"formControl","id","name","readonly","title","type"],[3,"input","disabled","id","name","readonly","title","type","value"]],template:function(f,n){f&1&&(d(0,"div"),$(1,gA,1,6,"label",0)(2,EA,1,15,"input",1)(3,bA,1,16,"input",2)(4,_A,1,1,"span",3),c()),f&2&&(J((n.options==null?null:n.options.htmlClass)||""),s(),h("ngIf",n.options==null?null:n.options.title),s(),h("ngIf",n.boundControl),s(),h("ngIf",!n.boundControl),s(),h("ngIf",(n.layoutNode==null?null:n.layoutNode.type)==="range"))},dependencies:[ft,Wu,Dt,Gu],encapsulation:2});let e=u;return e})(),HI=(()=>{let u=class u{constructor(i){this.jsf=i,this.controlDisabled=!1,this.boundControl=!1}ngOnInit(){this.options=this.layoutNode.options||{},this.jsf.initializeControl(this)}updateValue(i){this.jsf.updateValue(this,i.target.value)}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["one-of-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"dataIndex"},standalone:!1,decls:0,vars:0,template:function(f,n){},encapsulation:2});let e=u;return e})(),UI=(()=>{let u=class u{constructor(i){this.jsf=i,this.controlDisabled=!1,this.boundControl=!1,this.layoutOrientation="vertical",this.radiosList=[]}ngOnInit(){this.options=this.layoutNode.options||{},(this.layoutNode.type==="radios-inline"||this.layoutNode.type==="radiobuttons")&&(this.layoutOrientation="horizontal"),this.radiosList=Oa(this.options.titleMap||this.options.enumNames,this.options.enum,!0),this.jsf.initializeControl(this)}updateValue(i){this.jsf.updateValue(this,i.target.value)}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["radios-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"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(f,n){f&1&&$(0,yA,1,6,"label",0)(1,BA,2,3,"div",1)(2,wA,2,1,"div",2),f&2&&(h("ngIf",n.options==null?null:n.options.title),s(),h("ngIf",n.layoutOrientation==="horizontal"),s(),h("ngIf",n.layoutOrientation!=="horizontal"))},dependencies:[wu,ft],encapsulation:2});let e=u;return e})(),Ma=(()=>{let u=class u{constructor(i,f){this.componentFactory=i,this.jsf=f,this.newComponent=null}ngOnInit(){this.updateComponent()}ngOnChanges(){this.updateComponent()}updateComponent(){if(this.widgetContainer&&!this.newComponent&&this.jsf.framework&&(this.newComponent=this.widgetContainer.createComponent(this.componentFactory.resolveComponentFactory(this.jsf.framework))),this.newComponent)for(let i of["layoutNode","layoutIndex","dataIndex"])this.newComponent.instance[i]=this[i]}};u.\u0275fac=function(f){return new(f||u)(ce(Zf),ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["select-framework-widget"]],viewQuery:function(f,n){if(f&1&&en(Pa,7,Xf),f&2){let r;tn(r=un())&&(n.widgetContainer=r.first)}},inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"dataIndex"},standalone:!1,features:[Gi],decls:2,vars:0,consts:[["widgetContainer",""]],template:function(f,n){f&1&&w(0,"div",null,0)},encapsulation:2});let e=u;return e})(),WI=(()=>{let u=class u{constructor(i,f,n){this.elementRef=i,this.jsf=f,this.ngZone=n,this.overParentElement=!1,this.overChildElement=!1}ngOnInit(){this.orderable&&this.layoutNode&&this.layoutIndex&&this.dataIndex&&(this.element=this.elementRef.nativeElement,this.element.draggable=!0,this.arrayLayoutIndex="move:"+this.layoutIndex.slice(0,-1).toString(),this.ngZone.runOutsideAngular(()=>{this.element.addEventListener("dragstart",i=>{i.dataTransfer.effectAllowed="move",i.dataTransfer.setData("text","");let f=this.dataIndex[this.dataIndex.length-1];sessionStorage.setItem(this.arrayLayoutIndex,f+"")}),this.element.addEventListener("dragover",i=>(i.preventDefault&&i.preventDefault(),i.dataTransfer.dropEffect="move",!1)),this.element.addEventListener("dragenter",i=>{if(this.overParentElement)return this.overChildElement=!0;this.overParentElement=!0;let f=sessionStorage.getItem(this.arrayLayoutIndex);f!==null&&(this.dataIndex[this.dataIndex.length-1]<+f?this.element.classList.add("drag-target-top"):this.dataIndex[this.dataIndex.length-1]>+f&&this.element.classList.add("drag-target-bottom"))}),this.element.addEventListener("dragleave",i=>{this.overChildElement?this.overChildElement=!1:this.overParentElement&&(this.overParentElement=!1);let f=sessionStorage.getItem(this.arrayLayoutIndex);!this.overParentElement&&!this.overChildElement&&f!==null&&(this.element.classList.remove("drag-target-top"),this.element.classList.remove("drag-target-bottom"))}),this.element.addEventListener("drop",i=>{this.element.classList.remove("drag-target-top"),this.element.classList.remove("drag-target-bottom");let f=sessionStorage.getItem(this.arrayLayoutIndex),n=this.dataIndex[this.dataIndex.length-1];return f!==null&&+f!==n&&this.jsf.moveArrayItem(this,+f,n),sessionStorage.removeItem(this.arrayLayoutIndex),!1})}))}};u.\u0275fac=function(f){return new(f||u)(ce(Jf),ce(Ne),ce(ns))},u.\u0275dir=Lu({type:u,selectors:[["","orderable",""]],inputs:{orderable:"orderable",layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"dataIndex"},standalone:!1});let e=u;return e})(),ja=(()=>{let u=class u{constructor(i){this.jsf=i,this.isFlexItem=!1}isDraggable(i){return i.arrayItem&&i.type!=="$ref"&&i.arrayItemType==="list"&&this.isOrderable!==!1}getFlexAttribute(i,f){let n=["flex-grow","flex-shrink","flex-basis"].indexOf(f);return((i.options||{}).flex||"").split(/\s+/)[n]||(i.options||{})[f]||["1","1","auto"][n]}showWidget(i){return this.jsf.evaluateCondition(i,this.dataIndex)}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["root-widget"]],inputs:{dataIndex:"dataIndex",layoutIndex:"layoutIndex",layout:"layout",isOrderable:"isOrderable",isFlexItem:"isFlexItem"},standalone:!1,decls:1,vars:1,consts:[[3,"form-flex-item","align-self","flex-basis","flex-grow","flex-shrink","order",4,"ngFor","ngForOf"],[3,"dataIndex","layoutIndex","layoutNode","orderable"],[3,"dataIndex","layoutIndex","layoutNode",4,"ngIf"],[3,"dataIndex","layoutIndex","layoutNode"]],template:function(f,n){f&1&&$(0,IA,3,22,"div",0),f&2&&h("ngForOf",n.layout)},dependencies:[wu,ft,Ma,WI],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}"]});let e=u;return e})(),GI=(()=>{let u=class u{constructor(i){this.jsf=i,this.expanded=!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 f=this.layoutNode.type==="flex"||!!this.options.displayFlex||this.options.display==="flex";if(i!=="flex"&&!f)return null;switch(i){case"is-flex":return f;case"display":return f?"flex":"initial";case"flex-direction":case"flex-wrap":let n=["flex-direction","flex-wrap"].indexOf(i);return(this.options["flex-flow"]||"").split(/\s+/)[n]||this.options[i]||["column","nowrap"][n];case"justify-content":case"align-items":case"align-content":return this.options[i]}}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["section-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"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","form-flex-column","form-flex-row","align-content","align-items","display","flex-direction","flex-wrap","justify-content",4,"ngIf"],[1,"legend",3,"click","innerHTML"],[3,"dataIndex","layout","layoutIndex","isFlexItem","isOrderable"],[3,"disabled"],[4,"ngIf"],["class","help-block",3,"class","innerHTML",4,"ngIf"],[1,"help-block",3,"innerHTML"]],template:function(f,n){f&1&&$(0,kA,3,8,"div",0)(1,qA,5,11,"fieldset",1),f&2&&(h("ngIf",n.containerType==="div"),s(),h("ngIf",n.containerType==="fieldset"))},dependencies:[ft,ja],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=u;return e})(),KI=(()=>{let u=class u{constructor(i){this.jsf=i,this.controlDisabled=!1,this.boundControl=!1,this.selectList=[],this.isArray=T}ngOnInit(){this.options=this.layoutNode.options||{},this.selectList=Oa(this.options.titleMap||this.options.enumNames,this.options.enum,!!this.options.required,!!this.options.flatList),this.jsf.initializeControl(this),this.valueChanges=this.formControl.valueChanges.subscribe(i=>{i==="null"&&this.formControl.setValue(null)})}ngOnDestroy(){this.valueChanges&&this.valueChanges.unsubscribe()}updateValue(i){this.jsf.updateValue(this,i.target.value)}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["select-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"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","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"]],template:function(f,n){f&1&&(d(0,"div"),$(1,VA,1,6,"label",0)(2,UA,2,9,"select",1)(3,ZA,2,9,"select",2),c()),f&2&&(J((n.options==null?null:n.options.htmlClass)||""),s(),h("ngIf",n.options==null?null:n.options.title),s(),h("ngIf",n.boundControl),s(),h("ngIf",!n.boundControl))},dependencies:[wu,ft,Ji,Zi,Dn,Dt,Gu],encapsulation:2});let e=u;return e})(),lm=(()=>{let u=class u{constructor(i,f){this.componentFactory=i,this.jsf=f,this.newComponent=null}ngOnInit(){this.updateComponent()}ngOnChanges(){this.updateComponent()}updateComponent(){if(this.widgetContainer&&!this.newComponent&&(this.layoutNode||{}).widget&&(this.newComponent=this.widgetContainer.createComponent(this.componentFactory.resolveComponentFactory(this.layoutNode.widget))),this.newComponent)for(let i of["layoutNode","layoutIndex","dataIndex"])this.newComponent.instance[i]=this[i]}};u.\u0275fac=function(f){return new(f||u)(ce(Zf),ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["select-widget-widget"]],viewQuery:function(f,n){if(f&1&&en(Pa,7,Xf),f&2){let r;tn(r=un())&&(n.widgetContainer=r.first)}},inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"dataIndex"},standalone:!1,features:[Gi],decls:2,vars:0,consts:[["widgetContainer",""]],template:function(f,n){f&1&&w(0,"div",null,0)},encapsulation:2});let e=u;return e})(),JI=(()=>{let u=class u{constructor(i){this.jsf=i,this.controlDisabled=!1,this.boundControl=!1}ngOnDestroy(){var i;(i=this.isValidChangesSubs)==null||i.unsubscribe(),this.isValidChangesSubs=null}ngOnInit(){this.options=this.layoutNode.options||{},this.jsf.initializeControl(this),x(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)}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["submit-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"dataIndex"},standalone:!1,decls:2,vars:12,consts:[[3,"click","disabled","id","name","type","value"]],template:function(f,n){f&1&&(d(0,"div")(1,"input",0),O("click",function(o){return n.updateValue(o)}),c()()),f&2&&(J((n.options==null?null:n.options.htmlClass)||""),s(),J((n.options==null?null:n.options.fieldHtmlClass)||""),h("disabled",n.controlDisabled)("id","control"+(n.layoutNode==null?null:n.layoutNode._id))("name",n.controlName)("type",n.layoutNode==null?null:n.layoutNode.type)("value",n.controlValue),U("aria-describedby","control"+(n.layoutNode==null?null:n.layoutNode._id)+"Status")("readonly",n.options!=null&&n.options.readonly?"readonly":null)("required",n.options==null?null:n.options.required))},encapsulation:2});let e=u;return e})(),ZI=(()=>{let u=class u{constructor(i){this.jsf=i,this.selectedItem=0,this.showAddTab=!0}ngOnInit(){this.options=this.layoutNode.options||{},this.itemCount=this.layoutNode.items.length-1,this.updateControl()}select(i){this.layoutNode.items[i].type==="$ref"&&(this.itemCount=this.layoutNode.items.length,this.jsf.addItem({layoutNode:this.layoutNode.items[i],layoutIndex:this.layoutIndex.concat(i),dataIndex: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,f){return this.jsf.setArrayItemTitle(this,i,f)}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["tabs-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"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","innerHTML","click",4,"ngIf"],[3,"click","innerHTML"],[3,"class","dataIndex","layoutIndex","layoutNode",4,"ngIf"],[3,"dataIndex","layoutIndex","layoutNode"]],template:function(f,n){f&1&&(d(0,"ul"),$(1,XA,2,3,"li",0),c(),$(2,eI,2,3,"div",1)),f&2&&(J((n.options==null?null:n.options.labelHtmlClass)||""),s(),h("ngForOf",n.layoutNode==null?null:n.layoutNode.items),s(),h("ngForOf",n.layoutNode==null?null:n.layoutNode.items))},dependencies:[wu,ft,Ma],styles:["a[_ngcontent-%COMP%]{cursor:pointer}"]});let e=u;return e})(),QI=(()=>{let u=class u{constructor(i,f){this.componentFactory=i,this.jsf=f,this.newComponent=null}ngOnInit(){this.updateComponent()}ngOnChanges(){this.updateComponent()}updateComponent(){if(this.widgetContainer&&!this.newComponent&&this.layoutNode.options.template&&(this.newComponent=this.widgetContainer.createComponent(this.componentFactory.resolveComponentFactory(this.layoutNode.options.template))),this.newComponent)for(let i of["layoutNode","layoutIndex","dataIndex"])this.newComponent.instance[i]=this[i]}};u.\u0275fac=function(f){return new(f||u)(ce(Zf),ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["template-widget"]],viewQuery:function(f,n){if(f&1&&en(Pa,7,Xf),f&2){let r;tn(r=un())&&(n.widgetContainer=r.first)}},inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"dataIndex"},standalone:!1,features:[Gi],decls:2,vars:0,consts:[["widgetContainer",""]],template:function(f,n){f&1&&w(0,"div",null,0)},encapsulation:2});let e=u;return e})(),XI=(()=>{let u=class u{constructor(i){this.jsf=i,this.controlDisabled=!1,this.boundControl=!1}ngOnInit(){this.options=this.layoutNode.options||{},this.jsf.initializeControl(this)}updateValue(i){this.jsf.updateValue(this,i.target.value)}};u.\u0275fac=function(f){return new(f||u)(ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["textarea-widget"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"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(f,n){f&1&&(d(0,"div"),$(1,tI,1,6,"label",0)(2,uI,1,12,"textarea",1)(3,iI,2,14,"textarea",2),c()),f&2&&(J((n.options==null?null:n.options.htmlClass)||""),s(),h("ngIf",n.options==null?null:n.options.title),s(),h("ngIf",n.boundControl),s(),h("ngIf",!n.boundControl))},dependencies:[ft,Wu,Dt,Gu],encapsulation:2});let e=u;return e})(),dm=(()=>{let u=class u{constructor(){this.defaultWidget="text",this.widgetLibrary={none:LI,root:ja,"select-framework":Ma,"select-widget":lm,$ref:OI,email:"text",integer:"number",number:zI,password:"text",search:"text",tel:"text",text:VI,url:"text",color:"text",date:"text",datetime:"text","datetime-local":"text",month:"text",range:"number",time:"text",week:"text",checkbox:jI,file:qI,hidden:"text",image:"text",radio:"radios",reset:"submit",submit:JI,button:MI,select:KI,textarea:XI,checkboxes:NI,"checkboxes-inline":"checkboxes",checkboxbuttons:"checkboxes",radios:UI,"radios-inline":"radios",radiobuttons:"radios",section:GI,div:"section",fieldset:"section",flex:"section","one-of":HI,array:"section",tabarray:"tabs",tab:"section",tabs:ZI,message:RI,help:"message",msg:"message",html:"message",template:QI,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 f=this.activeWidgets[i];if(typeof f=="string"){let n=[];for(;typeof f=="string"&&!n.includes(f);)n.push(f),f=this.activeWidgets[f];typeof f!="string"&&(this.activeWidgets[i]=f)}}return!0}setDefaultWidget(i){return this.hasWidget(i)?(this.defaultWidget=i,!0):!1}hasWidget(i,f="activeWidgets"){return!i||typeof i!="string"?!1:x(this[f],i)}hasDefaultWidget(i){return this.hasWidget(i,"widgetLibrary")}registerWidget(i,f){return!i||!f||typeof i!="string"?!1:(this.registeredWidgets[i]=f,this.setActiveWidgets())}unRegisterWidget(i){return x(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,f="activeWidgets"){return this.hasWidget(i,f)?this[f][i]:this.hasWidget(this.defaultWidget,f)?this[f][this.defaultWidget]:null}getAllWidgets(){return{widgetLibrary:this.widgetLibrary,registeredWidgets:this.registeredWidgets,frameworkWidgets:this.frameworkWidgets,activeWidgets:this.activeWidgets}}};u.\u0275fac=function(f){return new(f||u)},u.\u0275prov=Bt({token:u,factory:u.\u0275fac,providedIn:"root"});let e=u;return e})(),Na=(()=>{let u=class u{constructor(){this.widgets={},this.stylesheets=[],this.scripts=[]}};u.\u0275fac=function(f){return new(f||u)},u.\u0275prov=Bt({token:u,factory:u.\u0275fac});let e=u;return e})(),YI=(()=>{let u=class u{constructor(i,f,n){this.frameworks=i,this.widgetLibrary=f,this.http=n,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 mt,this.activeFrameworkName$=this.activeFrameworkNameSubject.asObservable(),this.setFramework(this.defaultFramework)}setLoadExternalAssets(i=!0){this.loadExternalAssets=!!i}setFramework(i=this.defaultFramework,f=this.loadExternalAssets){return this.activeFramework=typeof i=="string"&&this.hasFramework(i)?this.frameworkLibrary[i]:typeof i=="object"&&x(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 x(i,"widgets")?this.widgetLibrary.registerFrameworkWidgets(i.widgets):this.widgetLibrary.unRegisterFrameworkWidgets()}hasFramework(i){return x(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,f=!0){let r=`assets/${(i||this.activeFramework).name}/cssframework`,o=`${r}/assets.json`,D=this.http.get(o,{responseType:"text"});return es(D).then(a=>{let l=JSON.parse(a);return f&&(l.stylesheets=l.stylesheets.map(m=>{let p=["/","//","http:","https:"],b=!1;return p.forEach(g=>{b=b||m.indexOf(g)==0}),b?m:`${r}/${m}`}),l.scripts=l.scripts.map(m=>`${r}/${m}`)),l})}getFrameworkThemes(){var n;let i=this.getFrameworkConfig(),f;return i&&(f=((n=i==null?void 0:i.widgetstyles)==null?void 0:n.__themes__)||[]),f}requestThemeChange(i,f=!1,n){let r=n||this.activeFramework;if(r.requestThemeChange){if(f){let D=this.getFrameworkThemes().filter(a=>a.name==i);if(!D||D.length==0)return!1}return r.requestThemeChange(i),!0}}getActiveTheme(i){let f=i||this.activeFramework;if(f.getActiveTheme)return f.getActiveTheme()}registerTheme(i,f){let n=f||this.activeFramework;if(n.registerTheme)return n.registerTheme(i)}unregisterTheme(i,f){let n=f||this.activeFramework;if(n.registerTheme)return n.unregisterTheme(i)}};u.\u0275fac=function(f){return new(f||u)(Kf(Na),Kf(dm),Kf(ps))},u.\u0275prov=Bt({token:u,factory:u.\u0275fac,providedIn:"root"});let e=u;return e})(),eS={provide:Fs,useExisting:is(()=>Vf),multi:!0},Vf=(()=>{let u=class u{get value(){return this.objectWrap?this.jsf.data[1]:this.jsf.data}set value(i){this.setFormValues(i,!1)}constructor(i,f,n,r){this.changeDetector=i,this.frameworkLibrary=f,this.widgetLibrary=n,this.jsf=r,this.unsubscribeOnActivateForm$=new mt,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},this.onChanges=new et,this.onSubmit=new et,this.isValid=new et,this.validationErrors=new et,this.formSchema=new et,this.formLayout=new et,this.dataChange=new et,this.modelChange=new et,this.formDataChange=new et,this.ngModelChange=new et}ngOnDestroy(){var i,f,n,r;(i=this.dataChangesSubs)==null||i.unsubscribe(),(f=this.statusChangesSubs)==null||f.unsubscribe(),(n=this.isValidChangesSubs)==null||n.unsubscribe(),(r=this.validationErrorChangesSubs)==null||r.unsubscribe(),this.dataChangesSubs=null,this.statusChangesSubs=null,this.isValidChangesSubs=null,this.validationErrorChangesSubs=null}resetScriptsAndStyleSheets(){document.querySelectorAll(".ajsf").forEach(i=>i.remove())}loadScripts(i){(i||this.frameworkLibrary.getFrameworkScripts()).map(n=>{let r=document.createElement("script");r.src=n,r.type="text/javascript",r.async=!0,r.setAttribute("class","ajsf"),document.getElementsByTagName("head")[0].appendChild(r)})}loadStyleSheets(i){(i||this.frameworkLibrary.getFrameworkStylesheets()).map(n=>{let r=document.createElement("link");r.rel="stylesheet",r.href=n,r.setAttribute("class","ajsf"),document.getElementsByTagName("head")[0].appendChild(r)})}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(){var f;let i;if(!this.formInitialized||!this.formValuesInput||this.language&&this.language!==this.jsf.language)this.initializeForm();else{this.language&&this.language!==this.jsf.language&&this.jsf.setLanguage(this.language);let n=Object.keys(this.previousInputs).filter(o=>this.previousInputs[o]!==this[o]),r=!0;if(n.length===1&&n[0]==="form"&&this.formValuesInput.startsWith("form.")&&(n=Object.keys(this.previousInputs.form||{}).filter(o=>!(0,Pt.default)(this.previousInputs.form[o],this.form[o])).map(o=>`form.${o}`),r=!1),n.length===1&&n[0]===this.formValuesInput)if(this.formValuesInput.indexOf(".")===-1)i=this[this.formValuesInput],this.setFormValues(i,r);else{let[o,D]=this.formValuesInput.split(".");i=this[o][D],this.setFormValues(i,r)}else n.length&&(this.initializeForm(i),this.onChange&&this.onChange(this.jsf.formValues),this.onTouched&&this.onTouched(this.jsf.formValues));this.theme&&this.theme!==((f=this.frameworkLibrary.getActiveTheme())==null?void 0:f.name)&&this.frameworkLibrary.requestThemeChange(this.theme),Object.keys(this.previousInputs).filter(o=>this.previousInputs[o]!==this[o]).forEach(o=>this.previousInputs[o]=this[o])}}setFormValues(i,f=!0){if(i){let n=this.objectWrap?i[1]:i;this.jsf.formGroup?f&&this.jsf.formGroup.reset({},{emitEvent:!1}):(this.jsf.formValues=i,this.activateForm()),this.jsf.formGroup&&this.jsf.formGroup.patchValue(n,{emitEvent:!1}),this.onChange&&this.onChange(n),this.onTouched&&this.onTouched(n)}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.initializeOptions(),this.initializeSchema(),this.initializeLayout(),this.initializeData(),i&&(this.jsf.formValues=i),this.activateForm(),this.debug||this.jsf.formOptions.debug){let f=[];this.debugOutput=f.map(n=>JSON.stringify(n,null,2)).join(`
|
|
13
|
-
`)}this.formInitialized=!0}}initializeOptions(){this.language&&this.language!==this.jsf.language&&this.jsf.setLanguage(this.language),this.jsf.setOptions({debug:!!this.debug});let i=this.loadExternalAssets||!1,f=this.framework||"default";if(j(this.options)&&(this.jsf.setOptions(this.options),i=this.options.loadExternalAssets||i,f=this.options.framework||f),j(this.form)&&j(this.form.options)&&(this.jsf.setOptions(this.form.options),i=this.form.options.loadExternalAssets||i,f=this.form.options.framework||f),j(this.widgets)&&this.jsf.setOptions({widgets:this.widgets}),this.frameworkLibrary.setLoadExternalAssets(i),this.frameworkLibrary.setFramework(f),this.jsf.framework=this.frameworkLibrary.getFramework(),j(this.jsf.formOptions.widgets))for(let n of Object.keys(this.jsf.formOptions.widgets))this.widgetLibrary.registerWidget(n,this.jsf.formOptions.widgets[n]);j(this.form)&&j(this.form.tpldata)&&this.jsf.setTpldata(this.form.tpldata),this.theme&&this.frameworkLibrary.requestThemeChange(this.theme)}initializeSchema(){j(this.schema)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.schema=(0,fe.default)(this.schema)):x(this.form,"schema")&&j(this.form.schema)?this.jsf.schema=(0,fe.default)(this.form.schema):j(this.JSONSchema)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.schema=(0,fe.default)(this.JSONSchema)):x(this.form,"JSONSchema")&&j(this.form.JSONSchema)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.schema=(0,fe.default)(this.form.JSONSchema)):x(this.form,"properties")&&j(this.form.properties)?this.jsf.schema=(0,fe.default)(this.form):j(this.form),Y(this.jsf.schema)||(Le("object",this.jsf.schema.type)&&(this.jsf.schema.type="object"),x(this.jsf.schema,"type")&&this.jsf.schema.type!=="object"?(this.jsf.schema={type:"object",properties:{1:this.jsf.schema}},this.objectWrap=!0):x(this.jsf.schema,"type")||(j(this.jsf.schema.properties)||j(this.jsf.schema.patternProperties)||j(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=_i(this.jsf.schema),this.jsf.compileAjvSchema(),this.jsf.schema=wI(this.jsf.schema,this.jsf.schemaRefLibrary,this.jsf.schemaRecursiveRefMap,this.jsf.dataRecursiveRefMap,this.jsf.arrayMap),x(this.jsf.schemaRefLibrary,"")&&(this.jsf.hasRootReference=!0))}initializeData(){Z(this.data)?(this.jsf.formValues=(0,fe.default)(this.data),this.formValuesInput="data"):Z(this.model)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.formValues=(0,fe.default)(this.model),this.formValuesInput="model"):Z(this.ngModel)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.formValues=(0,fe.default)(this.ngModel),this.formValuesInput="ngModel"):j(this.form)&&Z(this.form.value)?(this.jsf.JsonFormCompatibility=!0,this.jsf.formValues=(0,fe.default)(this.form.value),this.formValuesInput="form.value"):j(this.form)&&Z(this.form.data)?(this.jsf.formValues=(0,fe.default)(this.form.data),this.formValuesInput="form.data"):Z(this.formData)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.formValuesInput="formData"):x(this.form,"formData")&&Z(this.form.formData)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.formValues=(0,fe.default)(this.form.formData),this.formValuesInput="form.formData"):this.formValuesInput="data"}initializeLayout(){let i=n=>((j(n)||T(n))&&ct(n,(r,o)=>{x(r,"options")&&j(r.options)&&(r.titleMap=r.options,delete r.options)},"top-down"),n);T(this.layout)?this.jsf.layout=(0,fe.default)(this.layout):T(this.form)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.layout=(0,fe.default)(this.form)):this.form&&T(this.form.form)?(this.jsf.JsonFormCompatibility=!0,this.jsf.layout=i((0,fe.default)(this.form.form))):this.form&&T(this.form.layout)?this.jsf.layout=(0,fe.default)(this.form.layout):this.jsf.layout=["*"];let f=null;j(this.UISchema)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,f=(0,fe.default)(this.UISchema)):x(this.form,"UISchema")?(this.jsf.ReactJsonSchemaFormCompatibility=!0,f=(0,fe.default)(this.form.UISchema)):x(this.form,"uiSchema")?(this.jsf.ReactJsonSchemaFormCompatibility=!0,f=(0,fe.default)(this.form.uiSchema)):x(this.form,"customFormItems")&&(this.jsf.JsonFormCompatibility=!0,f=i((0,fe.default)(this.form.customFormItems))),f&&k.forEachDeep(f,(n,r)=>{let o=r.replace(/\//g,"/properties/").replace(/\/properties\/items\/properties\//g,"/items/properties/").replace(/\/properties\/titleMap\/properties\//g,"/titleMap/properties/");if(Z(n)&&Z(r)){let D=k.toKey(r),a=(k.parse(o)||[]).slice(0,-2),l;D.toLowerCase()==="ui:order"?l=[...a,"ui:order"]:(D.slice(0,3).toLowerCase()==="ui:"&&(D=D.slice(3)),l=[...a,"x-schema-form",D]),k.has(this.jsf.schema,a)&&!k.has(this.jsf.schema,l)&&k.set(this.jsf.schema,l,n)}})}activateForm(){if(this.unsubscribeOnActivateForm$.next(),Y(this.jsf.schema)&&(Y(this.jsf.formValues)||this.jsf.buildSchemaFromData()),Y(this.jsf.schema)||(this.jsf.compileAjvSchema(),this.jsf.buildLayout(this.widgetLibrary),this.jsf.buildFormGroupTemplate(this.jsf.formValues),this.jsf.buildFormGroup()),this.jsf.formGroup){!Y(this.jsf.formValues)&&this.jsf.formOptions.setSchemaDefaults!==!0&&this.jsf.formOptions.setLayoutDefaults!==!0&&this.setFormValues(this.jsf.formValues),this.dataChangesSubs=this.jsf.dataChanges.pipe(Wi(this.unsubscribeOnActivateForm$)).subscribe(f=>{this.onChanges.emit(this.objectWrap?f[1]:f),this.formValuesInput&&this.formValuesInput.indexOf(".")===-1&&this[`${this.formValuesInput}Change`].emit(this.objectWrap?f[1]:f)}),this.statusChangesSubs=this.jsf.formGroup.statusChanges.pipe(Wi(this.unsubscribeOnActivateForm$)).subscribe(()=>this.changeDetector.markForCheck()),this.isValidChangesSubs=this.jsf.isValidChanges.pipe(Wi(this.unsubscribeOnActivateForm$)).subscribe(f=>this.isValid.emit(f)),this.validationErrorChangesSubs=this.jsf.validationErrorChanges.pipe(Wi(this.unsubscribeOnActivateForm$)).subscribe(f=>this.validationErrors.emit(f)),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=k.get(this.jsf,"/formOptions/validateOnRender");if(i){let f=n=>{(i===!0||Z(n.value))&&n.markAsTouched(),Object.keys(n.controls||{}).forEach(r=>f(n.controls[r]))};f(this.jsf.formGroup),this.isValid.emit(this.jsf.isValid),this.validationErrors.emit(this.jsf.ajvErrors)}}}};u.\u0275fac=function(f){return new(f||u)(ce(cs),ce(YI),ce(dm),ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["json-schema-form"]],inputs:{schema:"schema",layout:"layout",data:"data",options:"options",framework:"framework",widgets:"widgets",form:"form",model:"model",JSONSchema:"JSONSchema",UISchema:"UISchema",formData:"formData",ngModel:"ngModel",language:"language",loadExternalAssets:"loadExternalAssets",debug:"debug",theme:"theme",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:[ds([Ne,eS]),Gi],decls:3,vars:3,consts:[[1,"json-schema-form",3,"ngSubmit","autocomplete"],[3,"layout"],[4,"ngIf"]],template:function(f,n){f&1&&(d(0,"form",0),O("ngSubmit",function(){return n.submitForm()}),w(1,"root-widget",1),c(),$(2,fI,4,1,"div",2)),f&2&&(h("autocomplete",!(n.jsf==null||n.jsf.formOptions==null)&&n.jsf.formOptions.autocomplete?"on":"off"),s(),h("layout",n.jsf==null?null:n.jsf.layout),s(),h("ngIf",n.debug||(n.jsf==null||n.jsf.formOptions==null?null:n.jsf.formOptions.debug)))},dependencies:[ft,bs,Cs,gs,ja],encapsulation:2,changeDetection:0});let e=u;return e})(),tS=(()=>{let u=class u{};u.\u0275fac=function(f){return new(f||u)},u.\u0275cmp=K({type:u,selectors:[["no-framework"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"dataIndex"},standalone:!1,decls:1,vars:3,consts:[[3,"dataIndex","layoutIndex","layoutNode"]],template:function(f,n){f&1&&w(0,"select-widget-widget",0),f&2&&h("dataIndex",n.dataIndex)("layoutIndex",n.layoutIndex)("layoutNode",n.layoutNode)},dependencies:[lm],encapsulation:2});let e=u;return e})(),uS=(()=>{let u=class u extends Na{constructor(){super(...arguments),this.name="no-framework",this.text="None (plain HTML)",this.framework=tS}};u.\u0275fac=(()=>{let i;return function(n){return(i||(i=fs(u)))(n||u)}})(),u.\u0275prov=Bt({token:u,factory:u.\u0275fac});let e=u;return e})();var Ta=(()=>{let u=class u{};u.\u0275fac=function(f){return new(f||u)},u.\u0275mod=Qf({type:u}),u.\u0275inj=Gf({imports:[on,wt,uo]});let e=u;return e})(),iS=(()=>{let u=class u{};u.\u0275fac=function(f){return new(f||u)},u.\u0275mod=Qf({type:u}),u.\u0275inj=Gf({providers:[{provide:Na,useClass:uS,multi:!0}],imports:[on,Ta]});let e=u;return e})(),cm=(()=>{let u=class u{};u.\u0275fac=function(f){return new(f||u)},u.\u0275mod=Qf({type:u}),u.\u0275inj=Gf({imports:[on,wt,uo,Ta,iS,Ta]});let e=u;return e})();var nS=typeof global=="object"&&global&&global.Object===Object&&global,Br=nS;var rS=typeof self=="object"&&self&&self.Object===Object&&self,oS=Br||rS||Function("return this")(),ze=oS;var DS=ze.Symbol,vt=DS;var pm=Object.prototype,aS=pm.hasOwnProperty,sS=pm.toString,Rf=vt?vt.toStringTag:void 0;function lS(e){var u=aS.call(e,Rf),t=e[Rf];try{e[Rf]=void 0;var i=!0}catch{}var f=sS.call(e);return i&&(u?e[Rf]=t:delete e[Rf]),f}var mm=lS;var dS=Object.prototype,cS=dS.toString;function pS(e){return cS.call(e)}var Fm=pS;var mS="[object Null]",FS="[object Undefined]",Cm=vt?vt.toStringTag:void 0;function CS(e){return e==null?e===void 0?FS:mS:Cm&&Cm in Object(e)?mm(e):Fm(e)}var ht=CS;function hS(e){return e!=null&&typeof e=="object"}var Xe=hS;var gS="[object Symbol]";function ES(e){return typeof e=="symbol"||Xe(e)&&ht(e)==gS}var hm=ES;function bS(e,u){for(var t=-1,i=e==null?0:e.length,f=Array(i);++t<i;)f[t]=u(e[t],t,e);return f}var gm=bS;var _S=Array.isArray,Mt=_S;var yS=1/0,Em=vt?vt.prototype:void 0,bm=Em?Em.toString:void 0;function _m(e){if(typeof e=="string")return e;if(Mt(e))return gm(e,_m)+"";if(hm(e))return bm?bm.call(e):"";var u=e+"";return u=="0"&&1/e==-yS?"-0":u}var ym=_m;function vS(e){var u=typeof e;return e!=null&&(u=="object"||u=="function")}var Ye=vS;function BS(e){return e}var xr=BS;var xS="[object AsyncFunction]",wS="[object Function]",AS="[object GeneratorFunction]",IS="[object Proxy]";function SS(e){if(!Ye(e))return!1;var u=ht(e);return u==wS||u==AS||u==xS||u==IS}var xi=SS;var $S=ze["__core-js_shared__"],wr=$S;var vm=function(){var e=/[^.]+$/.exec(wr&&wr.keys&&wr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function kS(e){return!!vm&&vm in e}var Bm=kS;var TS=Function.prototype,PS=TS.toString;function OS(e){if(e!=null){try{return PS.call(e)}catch{}try{return e+""}catch{}}return""}var Yt=OS;var MS=/[\\^$.*+?()[\]{}|]/g,jS=/^\[object .+?Constructor\]$/,NS=Function.prototype,qS=Object.prototype,VS=NS.toString,RS=qS.hasOwnProperty,LS=RegExp("^"+VS.call(RS).replace(MS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zS(e){if(!Ye(e)||Bm(e))return!1;var u=xi(e)?LS:jS;return u.test(Yt(e))}var xm=zS;function HS(e,u){return e==null?void 0:e[u]}var wm=HS;function US(e,u){var t=wm(e,u);return xm(t)?t:void 0}var pt=US;var WS=pt(ze,"WeakMap"),Ar=WS;var Am=Object.create,GS=function(){function e(){}return function(u){if(!Ye(u))return{};if(Am)return Am(u);e.prototype=u;var t=new e;return e.prototype=void 0,t}}(),Im=GS;function KS(e,u,t){switch(t.length){case 0:return e.call(u);case 1:return e.call(u,t[0]);case 2:return e.call(u,t[0],t[1]);case 3:return e.call(u,t[0],t[1],t[2])}return e.apply(u,t)}var Sm=KS;function JS(e,u){var t=-1,i=e.length;for(u||(u=Array(i));++t<i;)u[t]=e[t];return u}var Ir=JS;var ZS=800,QS=16,XS=Date.now;function YS(e){var u=0,t=0;return function(){var i=XS(),f=QS-(i-t);if(t=i,f>0){if(++u>=ZS)return arguments[0]}else u=0;return e.apply(void 0,arguments)}}var $m=YS;function e$(e){return function(){return e}}var km=e$;var t$=function(){try{var e=pt(Object,"defineProperty");return e({},"",{}),e}catch{}}(),wi=t$;var u$=wi?function(e,u){return wi(e,"toString",{configurable:!0,enumerable:!1,value:km(u),writable:!0})}:xr,Tm=u$;var i$=$m(Tm),Pm=i$;function f$(e,u){for(var t=-1,i=e==null?0:e.length;++t<i&&u(e[t],t,e)!==!1;);return e}var Om=f$;var n$=9007199254740991,r$=/^(?:0|[1-9]\d*)$/;function o$(e,u){var t=typeof e;return u=u==null?n$:u,!!u&&(t=="number"||t!="symbol"&&r$.test(e))&&e>-1&&e%1==0&&e<u}var Sr=o$;function D$(e,u,t){u=="__proto__"&&wi?wi(e,u,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[u]=t}var Ai=D$;function a$(e,u){return e===u||e!==e&&u!==u}var Cu=a$;var s$=Object.prototype,l$=s$.hasOwnProperty;function d$(e,u,t){var i=e[u];(!(l$.call(e,u)&&Cu(i,t))||t===void 0&&!(u in e))&&Ai(e,u,t)}var $r=d$;function c$(e,u,t,i){var f=!t;t||(t={});for(var n=-1,r=u.length;++n<r;){var o=u[n],D=i?i(t[o],e[o],o,t,e):void 0;D===void 0&&(D=e[o]),f?Ai(t,o,D):$r(t,o,D)}return t}var Lt=c$;var Mm=Math.max;function p$(e,u,t){return u=Mm(u===void 0?e.length-1:u,0),function(){for(var i=arguments,f=-1,n=Mm(i.length-u,0),r=Array(n);++f<n;)r[f]=i[u+f];f=-1;for(var o=Array(u+1);++f<u;)o[f]=i[f];return o[u]=t(r),Sm(e,this,o)}}var jm=p$;function m$(e,u){return Pm(jm(e,u,xr),e+"")}var Nm=m$;var F$=9007199254740991;function C$(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=F$}var kr=C$;function h$(e){return e!=null&&kr(e.length)&&!xi(e)}var hu=h$;function g$(e,u,t){if(!Ye(t))return!1;var i=typeof u;return(i=="number"?hu(t)&&Sr(u,t.length):i=="string"&&u in t)?Cu(t[u],e):!1}var qm=g$;function E$(e){return Nm(function(u,t){var i=-1,f=t.length,n=f>1?t[f-1]:void 0,r=f>2?t[2]:void 0;for(n=e.length>3&&typeof n=="function"?(f--,n):void 0,r&&qm(t[0],t[1],r)&&(n=f<3?void 0:n,f=1),u=Object(u);++i<f;){var o=t[i];o&&e(u,o,i,n)}return u})}var Vm=E$;var b$=Object.prototype;function _$(e){var u=e&&e.constructor,t=typeof u=="function"&&u.prototype||b$;return e===t}var Ii=_$;function y$(e,u){for(var t=-1,i=Array(e);++t<e;)i[t]=u(t);return i}var Rm=y$;var v$="[object Arguments]";function B$(e){return Xe(e)&&ht(e)==v$}var qa=B$;var Lm=Object.prototype,x$=Lm.hasOwnProperty,w$=Lm.propertyIsEnumerable,A$=qa(function(){return arguments}())?qa:function(e){return Xe(e)&&x$.call(e,"callee")&&!w$.call(e,"callee")},Lf=A$;function I$(){return!1}var zm=I$;var Wm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hm=Wm&&typeof module=="object"&&module&&!module.nodeType&&module,S$=Hm&&Hm.exports===Wm,Um=S$?ze.Buffer:void 0,$$=Um?Um.isBuffer:void 0,k$=$$||zm,Si=k$;var T$="[object Arguments]",P$="[object Array]",O$="[object Boolean]",M$="[object Date]",j$="[object Error]",N$="[object Function]",q$="[object Map]",V$="[object Number]",R$="[object Object]",L$="[object RegExp]",z$="[object Set]",H$="[object String]",U$="[object WeakMap]",W$="[object ArrayBuffer]",G$="[object DataView]",K$="[object Float32Array]",J$="[object Float64Array]",Z$="[object Int8Array]",Q$="[object Int16Array]",X$="[object Int32Array]",Y$="[object Uint8Array]",ek="[object Uint8ClampedArray]",tk="[object Uint16Array]",uk="[object Uint32Array]",Ae={};Ae[K$]=Ae[J$]=Ae[Z$]=Ae[Q$]=Ae[X$]=Ae[Y$]=Ae[ek]=Ae[tk]=Ae[uk]=!0;Ae[T$]=Ae[P$]=Ae[W$]=Ae[O$]=Ae[G$]=Ae[M$]=Ae[j$]=Ae[N$]=Ae[q$]=Ae[V$]=Ae[R$]=Ae[L$]=Ae[z$]=Ae[H$]=Ae[U$]=!1;function ik(e){return Xe(e)&&kr(e.length)&&!!Ae[ht(e)]}var Gm=ik;function fk(e){return function(u){return e(u)}}var $i=fk;var Km=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zf=Km&&typeof module=="object"&&module&&!module.nodeType&&module,nk=zf&&zf.exports===Km,Va=nk&&Br.process,rk=function(){try{var e=zf&&zf.require&&zf.require("util").types;return e||Va&&Va.binding&&Va.binding("util")}catch{}}(),eu=rk;var Jm=eu&&eu.isTypedArray,ok=Jm?$i(Jm):Gm,Tr=ok;var Dk=Object.prototype,ak=Dk.hasOwnProperty;function sk(e,u){var t=Mt(e),i=!t&&Lf(e),f=!t&&!i&&Si(e),n=!t&&!i&&!f&&Tr(e),r=t||i||f||n,o=r?Rm(e.length,String):[],D=o.length;for(var a in e)(u||ak.call(e,a))&&!(r&&(a=="length"||f&&(a=="offset"||a=="parent")||n&&(a=="buffer"||a=="byteLength"||a=="byteOffset")||Sr(a,D)))&&o.push(a);return o}var Pr=sk;function lk(e,u){return function(t){return e(u(t))}}var Or=lk;var dk=Or(Object.keys,Object),Zm=dk;var ck=Object.prototype,pk=ck.hasOwnProperty;function mk(e){if(!Ii(e))return Zm(e);var u=[];for(var t in Object(e))pk.call(e,t)&&t!="constructor"&&u.push(t);return u}var Qm=mk;function Fk(e){return hu(e)?Pr(e):Qm(e)}var ki=Fk;function Ck(e){var u=[];if(e!=null)for(var t in Object(e))u.push(t);return u}var Xm=Ck;var hk=Object.prototype,gk=hk.hasOwnProperty;function Ek(e){if(!Ye(e))return Xm(e);var u=Ii(e),t=[];for(var i in e)i=="constructor"&&(u||!gk.call(e,i))||t.push(i);return t}var Ym=Ek;function bk(e){return hu(e)?Pr(e,!0):Ym(e)}var zt=bk;var _k=pt(Object,"create"),tu=_k;function yk(){this.__data__=tu?tu(null):{},this.size=0}var e8=yk;function vk(e){var u=this.has(e)&&delete this.__data__[e];return this.size-=u?1:0,u}var t8=vk;var Bk="__lodash_hash_undefined__",xk=Object.prototype,wk=xk.hasOwnProperty;function Ak(e){var u=this.__data__;if(tu){var t=u[e];return t===Bk?void 0:t}return wk.call(u,e)?u[e]:void 0}var u8=Ak;var Ik=Object.prototype,Sk=Ik.hasOwnProperty;function $k(e){var u=this.__data__;return tu?u[e]!==void 0:Sk.call(u,e)}var i8=$k;var kk="__lodash_hash_undefined__";function Tk(e,u){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=tu&&u===void 0?kk:u,this}var f8=Tk;function Ti(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}Ti.prototype.clear=e8;Ti.prototype.delete=t8;Ti.prototype.get=u8;Ti.prototype.has=i8;Ti.prototype.set=f8;var Ra=Ti;function Pk(){this.__data__=[],this.size=0}var n8=Pk;function Ok(e,u){for(var t=e.length;t--;)if(Cu(e[t][0],u))return t;return-1}var gu=Ok;var Mk=Array.prototype,jk=Mk.splice;function Nk(e){var u=this.__data__,t=gu(u,e);if(t<0)return!1;var i=u.length-1;return t==i?u.pop():jk.call(u,t,1),--this.size,!0}var r8=Nk;function qk(e){var u=this.__data__,t=gu(u,e);return t<0?void 0:u[t][1]}var o8=qk;function Vk(e){return gu(this.__data__,e)>-1}var D8=Vk;function Rk(e,u){var t=this.__data__,i=gu(t,e);return i<0?(++this.size,t.push([e,u])):t[i][1]=u,this}var a8=Rk;function Pi(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}Pi.prototype.clear=n8;Pi.prototype.delete=r8;Pi.prototype.get=o8;Pi.prototype.has=D8;Pi.prototype.set=a8;var Eu=Pi;var Lk=pt(ze,"Map"),bu=Lk;function zk(){this.size=0,this.__data__={hash:new Ra,map:new(bu||Eu),string:new Ra}}var s8=zk;function Hk(e){var u=typeof e;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?e!=="__proto__":e===null}var l8=Hk;function Uk(e,u){var t=e.__data__;return l8(u)?t[typeof u=="string"?"string":"hash"]:t.map}var _u=Uk;function Wk(e){var u=_u(this,e).delete(e);return this.size-=u?1:0,u}var d8=Wk;function Gk(e){return _u(this,e).get(e)}var c8=Gk;function Kk(e){return _u(this,e).has(e)}var p8=Kk;function Jk(e,u){var t=_u(this,e),i=t.size;return t.set(e,u),this.size+=t.size==i?0:1,this}var m8=Jk;function Oi(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}Oi.prototype.clear=s8;Oi.prototype.delete=d8;Oi.prototype.get=c8;Oi.prototype.has=p8;Oi.prototype.set=m8;var F8=Oi;function Zk(e){return e==null?"":ym(e)}var C8=Zk;function Qk(e,u){for(var t=-1,i=u.length,f=e.length;++t<i;)e[f+t]=u[t];return e}var Mr=Qk;var Xk=Or(Object.getPrototypeOf,Object),Mi=Xk;var Yk="[object Object]",eT=Function.prototype,tT=Object.prototype,h8=eT.toString,uT=tT.hasOwnProperty,iT=h8.call(Object);function fT(e){if(!Xe(e)||ht(e)!=Yk)return!1;var u=Mi(e);if(u===null)return!0;var t=uT.call(u,"constructor")&&u.constructor;return typeof t=="function"&&t instanceof t&&h8.call(t)==iT}var g8=fT;function nT(){this.__data__=new Eu,this.size=0}var E8=nT;function rT(e){var u=this.__data__,t=u.delete(e);return this.size=u.size,t}var b8=rT;function oT(e){return this.__data__.get(e)}var _8=oT;function DT(e){return this.__data__.has(e)}var y8=DT;var aT=200;function sT(e,u){var t=this.__data__;if(t instanceof Eu){var i=t.__data__;if(!bu||i.length<aT-1)return i.push([e,u]),this.size=++t.size,this;t=this.__data__=new F8(i)}return t.set(e,u),this.size=t.size,this}var v8=sT;function ji(e){var u=this.__data__=new Eu(e);this.size=u.size}ji.prototype.clear=E8;ji.prototype.delete=b8;ji.prototype.get=_8;ji.prototype.has=y8;ji.prototype.set=v8;var jr=ji;function lT(e,u){return e&&Lt(u,ki(u),e)}var B8=lT;function dT(e,u){return e&&Lt(u,zt(u),e)}var x8=dT;var S8=typeof exports=="object"&&exports&&!exports.nodeType&&exports,w8=S8&&typeof module=="object"&&module&&!module.nodeType&&module,cT=w8&&w8.exports===S8,A8=cT?ze.Buffer:void 0,I8=A8?A8.allocUnsafe:void 0;function pT(e,u){if(u)return e.slice();var t=e.length,i=I8?I8(t):new e.constructor(t);return e.copy(i),i}var Nr=pT;function mT(e,u){for(var t=-1,i=e==null?0:e.length,f=0,n=[];++t<i;){var r=e[t];u(r,t,e)&&(n[f++]=r)}return n}var $8=mT;function FT(){return[]}var qr=FT;var CT=Object.prototype,hT=CT.propertyIsEnumerable,k8=Object.getOwnPropertySymbols,gT=k8?function(e){return e==null?[]:(e=Object(e),$8(k8(e),function(u){return hT.call(e,u)}))}:qr,Ni=gT;function ET(e,u){return Lt(e,Ni(e),u)}var T8=ET;var bT=Object.getOwnPropertySymbols,_T=bT?function(e){for(var u=[];e;)Mr(u,Ni(e)),e=Mi(e);return u}:qr,Vr=_T;function yT(e,u){return Lt(e,Vr(e),u)}var P8=yT;function vT(e,u,t){var i=u(e);return Mt(e)?i:Mr(i,t(e))}var Rr=vT;function BT(e){return Rr(e,ki,Ni)}var O8=BT;function xT(e){return Rr(e,zt,Vr)}var M8=xT;var wT=pt(ze,"DataView"),Lr=wT;var AT=pt(ze,"Promise"),zr=AT;var IT=pt(ze,"Set"),Hr=IT;var j8="[object Map]",ST="[object Object]",N8="[object Promise]",q8="[object Set]",V8="[object WeakMap]",R8="[object DataView]",$T=Yt(Lr),kT=Yt(bu),TT=Yt(zr),PT=Yt(Hr),OT=Yt(Ar),Ru=ht;(Lr&&Ru(new Lr(new ArrayBuffer(1)))!=R8||bu&&Ru(new bu)!=j8||zr&&Ru(zr.resolve())!=N8||Hr&&Ru(new Hr)!=q8||Ar&&Ru(new Ar)!=V8)&&(Ru=function(e){var u=ht(e),t=u==ST?e.constructor:void 0,i=t?Yt(t):"";if(i)switch(i){case $T:return R8;case kT:return j8;case TT:return N8;case PT:return q8;case OT:return V8}return u});var qi=Ru;var MT=Object.prototype,jT=MT.hasOwnProperty;function NT(e){var u=e.length,t=new e.constructor(u);return u&&typeof e[0]=="string"&&jT.call(e,"index")&&(t.index=e.index,t.input=e.input),t}var L8=NT;var qT=ze.Uint8Array,La=qT;function VT(e){var u=new e.constructor(e.byteLength);return new La(u).set(new La(e)),u}var Vi=VT;function RT(e,u){var t=u?Vi(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}var z8=RT;var LT=/\w*$/;function zT(e){var u=new e.constructor(e.source,LT.exec(e));return u.lastIndex=e.lastIndex,u}var H8=zT;var U8=vt?vt.prototype:void 0,W8=U8?U8.valueOf:void 0;function HT(e){return W8?Object(W8.call(e)):{}}var G8=HT;function UT(e,u){var t=u?Vi(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var Ur=UT;var WT="[object Boolean]",GT="[object Date]",KT="[object Map]",JT="[object Number]",ZT="[object RegExp]",QT="[object Set]",XT="[object String]",YT="[object Symbol]",eP="[object ArrayBuffer]",tP="[object DataView]",uP="[object Float32Array]",iP="[object Float64Array]",fP="[object Int8Array]",nP="[object Int16Array]",rP="[object Int32Array]",oP="[object Uint8Array]",DP="[object Uint8ClampedArray]",aP="[object Uint16Array]",sP="[object Uint32Array]";function lP(e,u,t){var i=e.constructor;switch(u){case eP:return Vi(e);case WT:case GT:return new i(+e);case tP:return z8(e,t);case uP:case iP:case fP:case nP:case rP:case oP:case DP:case aP:case sP:return Ur(e,t);case KT:return new i;case JT:case XT:return new i(e);case ZT:return H8(e);case QT:return new i;case YT:return G8(e)}}var K8=lP;function dP(e){return typeof e.constructor=="function"&&!Ii(e)?Im(Mi(e)):{}}var Wr=dP;var cP="[object Map]";function pP(e){return Xe(e)&&qi(e)==cP}var J8=pP;var Z8=eu&&eu.isMap,mP=Z8?$i(Z8):J8,Q8=mP;var FP="[object Set]";function CP(e){return Xe(e)&&qi(e)==FP}var X8=CP;var Y8=eu&&eu.isSet,hP=Y8?$i(Y8):X8,eF=hP;var gP=1,EP=2,bP=4,tF="[object Arguments]",_P="[object Array]",yP="[object Boolean]",vP="[object Date]",BP="[object Error]",uF="[object Function]",xP="[object GeneratorFunction]",wP="[object Map]",AP="[object Number]",iF="[object Object]",IP="[object RegExp]",SP="[object Set]",$P="[object String]",kP="[object Symbol]",TP="[object WeakMap]",PP="[object ArrayBuffer]",OP="[object DataView]",MP="[object Float32Array]",jP="[object Float64Array]",NP="[object Int8Array]",qP="[object Int16Array]",VP="[object Int32Array]",RP="[object Uint8Array]",LP="[object Uint8ClampedArray]",zP="[object Uint16Array]",HP="[object Uint32Array]",ye={};ye[tF]=ye[_P]=ye[PP]=ye[OP]=ye[yP]=ye[vP]=ye[MP]=ye[jP]=ye[NP]=ye[qP]=ye[VP]=ye[wP]=ye[AP]=ye[iF]=ye[IP]=ye[SP]=ye[$P]=ye[kP]=ye[RP]=ye[LP]=ye[zP]=ye[HP]=!0;ye[BP]=ye[uF]=ye[TP]=!1;function Gr(e,u,t,i,f,n){var r,o=u&gP,D=u&EP,a=u&bP;if(t&&(r=f?t(e,i,f,n):t(e)),r!==void 0)return r;if(!Ye(e))return e;var l=Mt(e);if(l){if(r=L8(e),!o)return Ir(e,r)}else{var m=qi(e),p=m==uF||m==xP;if(Si(e))return Nr(e,o);if(m==iF||m==tF||p&&!f){if(r=D||p?{}:Wr(e),!o)return D?P8(e,x8(r,e)):T8(e,B8(r,e))}else{if(!ye[m])return f?e:{};r=K8(e,m,o)}}n||(n=new jr);var b=n.get(e);if(b)return b;n.set(e,r),eF(e)?e.forEach(function(v){r.add(Gr(v,u,t,v,e,n))}):Q8(e)&&e.forEach(function(v,I){r.set(I,Gr(v,u,t,I,e,n))});var g=a?D?M8:O8:D?zt:ki,_=l?void 0:g(e);return Om(_||e,function(v,I){_&&(I=v,v=e[I]),$r(r,I,Gr(v,u,t,I,e,n))}),r}var fF=Gr;var UP=1,WP=4;function GP(e){return fF(e,UP|WP)}var Kr=GP;function KP(e){return function(u,t,i){for(var f=-1,n=Object(u),r=i(u),o=r.length;o--;){var D=r[e?o:++f];if(t(n[D],D,n)===!1)break}return u}}var nF=KP;var JP=nF(),rF=JP;function ZP(e,u,t){(t!==void 0&&!Cu(e[u],t)||t===void 0&&!(u in e))&&Ai(e,u,t)}var Hf=ZP;function QP(e){return Xe(e)&&hu(e)}var oF=QP;function XP(e,u){if(!(u==="constructor"&&typeof e[u]=="function")&&u!="__proto__")return e[u]}var Uf=XP;function YP(e){return Lt(e,zt(e))}var DF=YP;function eO(e,u,t,i,f,n,r){var o=Uf(e,t),D=Uf(u,t),a=r.get(D);if(a){Hf(e,t,a);return}var l=n?n(o,D,t+"",e,u,r):void 0,m=l===void 0;if(m){var p=Mt(D),b=!p&&Si(D),g=!p&&!b&&Tr(D);l=D,p||b||g?Mt(o)?l=o:oF(o)?l=Ir(o):b?(m=!1,l=Nr(D,!0)):g?(m=!1,l=Ur(D,!0)):l=[]:g8(D)||Lf(D)?(l=o,Lf(o)?l=DF(o):(!Ye(o)||xi(o))&&(l=Wr(D))):m=!1}m&&(r.set(D,l),f(l,D,i,n,r),r.delete(D)),Hf(e,t,l)}var aF=eO;function sF(e,u,t,i,f){e!==u&&rF(u,function(n,r){if(f||(f=new jr),Ye(n))aF(e,u,r,t,sF,i,f);else{var o=i?i(Uf(e,r),n,r+"",e,u,f):void 0;o===void 0&&(o=n),Hf(e,r,o)}},zt)}var lF=sF;var tO=Vm(function(e,u,t){lF(e,u,t)}),za=tO;var uO=0;function iO(e){var u=++uO;return C8(e)+u}var Ha=iO;var dF=(()=>{class e{jsonSchemaForm=S(Vf,{host:!0,self:!0,optional:!0});jsfPatch=!1;constructor(){let t=this.jsonSchemaForm,i=t.jsf.buildLayout.bind(t.jsf);t.jsf.buildLayout=f=>{if(i(f),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,f){if(Array.isArray(t)){let n=t.filter(D=>D.name!=="_bridge"),r=n.filter(D=>D.items&&Array.isArray(D.items)).flatMap(D=>D.items).filter(D=>D.dataType==="array"||D.arrayItem);n.concat(r).filter(D=>D.dataType==="array"||D.arrayItem).forEach(D=>{this.fixNestedArray(D,i,f)})}else this.fixNestedArray(t,i,f)}fixNestedArray(t,i,f){if(t.items&&Array.isArray(t.items)){let n=t.items.find(r=>r.type==="$ref");if(n){let r=t.items.filter(a=>a.type==="section"||a.type==="div"),o=r.length>0?r.reduce((a,l)=>a.id>l.id?a:l):this.getItemTemplateFromRef(n),D=this.getDataFromPointer(i,n.dataPointer.replace(f,""));if(D===null)return;if(Array.isArray(D)){for(;t.items.length-1<D.length;){let a=Kr(o);a._id=Ha("new_"),t.items.unshift(a)}D.forEach((a,l)=>{this.fixArray(t.items[l],a,n.dataPointer)})}else this.fixArray(t.items,i,n.dataPointer)}else this.fixArray(t.items,i,f);t.items.filter(r=>r.items&&Array.isArray(r.items)).forEach(r=>{this.fixArray(r.items,i,f)})}}getDataFromPointer(t,i){let f=t;return i.substring(1).split(/\//).filter(n=>n!=="-").forEach(n=>{try{f=f[n]}catch{f=null}}),f}getItemTemplateFromRef(t){let i={type:"section",items:[]},f=Kr(t);return za(f,i),f}static \u0275fac=function(i){return new(i||e)};static \u0275dir=Lu({type:e,selectors:[["","jsfPatch",""]],inputs:{jsfPatch:"jsfPatch"}})}return e})();function fO(e,u){if(e&1){let t=H();d(0,"json-schema-form",1),O("onChanges",function(f){N(t);let n=C();return q(n.onChanges(f))})("isValid",function(f){N(t);let n=C();return q(n.validChange(f))}),c()}if(e&2){let t=C();h("jsfPatch",t.configSchema.fixArrays)("options",t.jsonFormOptions)("schema",t.configSchema.schema)("layout",t.configSchema.layout)("form",t.configSchema.form)("data",t.currentData)("language",t.language)}}var Ri=(()=>{class e{$settings=S(ke);configSchema;data;dataChange=new et;dataChanged=new et;isValid=new et;currentData;language="en";availableLanguages=["de","en","es","fr","it","pt","zh"];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)}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=K({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-4",1,"ng-bs4-validate",3,"jsfPatch","options","schema","layout","form","data","language"],["framework","bootstrap-4",1,"ng-bs4-validate",3,"onChanges","isValid","jsfPatch","options","schema","layout","form","data","language"]],template:function(i,f){i&1&&(as(0),$(1,fO,1,7,"json-schema-form",0),ss()),i&2&&(s(),A(f.configSchema.schema?1:-1))},dependencies:[cm,Vf,dF],encapsulation:2})}return e})();var nO=["custompluginui"];function rO(e,u){e&1&&(d(0,"div",7),w(1,"i",19),c())}function oO(e,u){if(e&1){let t=H();d(0,"div",9)(1,"app-schema-form",20),$e("dataChange",function(f){N(t);let n=C();return Se(n.pluginConfig[0],f)||(n.pluginConfig[0]=f),q(f)}),O("dataChanged",function(f){N(t);let n=C();return q(n.schemaFormUpdatedSubject.next(f))})("isValid",function(f){N(t);let n=C();return q(n.onIsValid(f))}),c()()}if(e&2){let t=C();s(),h("configSchema",t.schema),Ie("data",t.pluginConfig[0])}}function DO(e,u){if(e&1){let t=H();d(0,"button",24),O("click",function(){N(t);let f=C(2);return q(f.formActionSubject.next("cancel"))}),E(1),c()}if(e&2){let t=C(2);s(),z(t.formCancelButtonLabel)}}function aO(e,u){if(e&1){let t=H();d(0,"button",25),O("click",function(){N(t);let f=C(2);return q(f.formActionSubject.next("submit"))}),E(1),c()}if(e&2){let t=C(2);h("disabled",!t.formValid),s(),V(" ",t.formSubmitButtonLabel," ")}}function sO(e,u){if(e&1){let t=H();d(0,"div",9)(1,"app-schema-form",20),$e("dataChange",function(f){N(t);let n=C();return Se(n.formData,f)||(n.formData=f),q(f)}),O("dataChanged",function(f){N(t);let n=C();return q(n.formUpdatedSubject.next(f))})("isValid",function(f){N(t);let n=C();return q(n.formValidEvent(f))}),c(),d(2,"div",21),$(3,DO,2,1,"button",22)(4,aO,2,2,"button",23),c()()}if(e&2){let t=C();s(),h("configSchema",t.formSchema),Ie("data",t.formData),s(2),A(t.formCancelButtonLabel?3:-1),s(),A(t.formSubmitButtonLabel?4:-1)}}function lO(e,u){e&1&&(d(0,"div",10),w(1,"i",19),c())}function dO(e,u){if(e&1&&(w(0,"i",16),y(1,"translate")),e&2){let t=C();h("ngClass",t.formIsValid?"fa-circle-check green-text":t.strictValidation?"fa-circle-exclamation red-text":"fa-circle-exclamation orange-text")("ngbTooltip",B(1,2,t.formIsValid?"form.label_valid":t.strictValidation?"form.label_invalid_strict":"form.label_invalid"))}}function cO(e,u){e&1&&(d(0,"span"),E(1),y(2,"translate"),c()),e&2&&(s(),z(B(2,1,"form.button_save")))}function pO(e,u){e&1&&w(0,"i",18)}var cF=(()=>{class e{$activeModal=S(he);$api=S(oe);$modal=S(Re);$plugin=S(yu);$settings=S(ke);$toastr=S(de);$translate=S(le);$ws=S(Ku);customPluginUiElementTarget=Yf("custompluginui");plugin;schema;pluginConfig;pluginAlias;pluginType;loading=!0;saveInProgress=!1;pluginSpinner=!1;uiLoaded=!1;showSchemaForm=!1;schemaFormUpdatedSubject=new mt;formId;formSchema;formData;formSubmitButtonLabel;formCancelButtonLabel;formValid=!0;formUpdatedSubject=new mt;formActionSubject=new mt;childBridges=[];isFirstSave=!1;formIsValid=!0;strictValidation=!1;io;basePath;iframe;schemaFormRecentlyUpdated=!1;schemaFormRecentlyRefreshed=!1;schemaFormRefreshSubject=new mt;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,uu.api.origin)}),this.io.socket.on("stream",t=>{t.action="stream",this.iframe.contentWindow.postMessage(t,uu.api.origin)}),this.io.socket.on("ready",()=>{this.loading=!1,this.loadUi()}),this.schemaFormRefreshSubject.pipe(Wf(250)).subscribe(this.schemaFormRefresh.bind(this)),this.schemaFormUpdatedSubject.pipe(Wf(250),eo(1)).subscribe(this.schemaFormUpdated.bind(this)),this.formUpdatedSubject.pipe(Wf(100),eo(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)}loadUi(){this.iframe=this.customPluginUiElementTarget().nativeElement,this.iframe.src=`${uu.api.base+this.basePath}/index.html?origin=${encodeURIComponent(location.origin)}&v=${encodeURIComponent(this.plugin.installedVersion)}`}handleMessage=t=>{if(t.origin===uu.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"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;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 f of i)if(typeof f!="object"||Array.isArray(f))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,f=!0){t.source.postMessage({action:"response",requestId:t.data.requestId,success:f,data:i},t.origin)}injectDefaultStyles(t){return W(this,null,function*(){let i=Array.from(window.document.body.classList).find(D=>D.startsWith("config-ui-x-")),f=window.document.body.classList.contains("dark-mode");t.source.postMessage({action:"body-class",class:i},t.origin),f&&t.source.postMessage({action:"body-class",class:"dark-mode"},t.origin);let n=Array.from(document.querySelectorAll("link"));for(let D of n)if(D.getAttribute("rel")==="stylesheet"){let a=D.getAttribute("href"),l=document.baseURI+(a.startsWith("/")?a.substring(1):a);t.source.postMessage({action:"link-element",href:l,rel:"stylesheet"},t.origin)}let r=Array.from(document.querySelectorAll("style"));for(let D of r)t.source.postMessage({action:"inline-style",style:D.innerHTML},t.origin);let o=`
|
|
13
|
+
`)}this.formInitialized=!0}}initializeOptions(){this.language&&this.language!==this.jsf.language&&this.jsf.setLanguage(this.language),this.jsf.setOptions({debug:!!this.debug});let i=this.loadExternalAssets||!1,f=this.framework||"default";if(j(this.options)&&(this.jsf.setOptions(this.options),i=this.options.loadExternalAssets||i,f=this.options.framework||f),j(this.form)&&j(this.form.options)&&(this.jsf.setOptions(this.form.options),i=this.form.options.loadExternalAssets||i,f=this.form.options.framework||f),j(this.widgets)&&this.jsf.setOptions({widgets:this.widgets}),this.frameworkLibrary.setLoadExternalAssets(i),this.frameworkLibrary.setFramework(f),this.jsf.framework=this.frameworkLibrary.getFramework(),j(this.jsf.formOptions.widgets))for(let n of Object.keys(this.jsf.formOptions.widgets))this.widgetLibrary.registerWidget(n,this.jsf.formOptions.widgets[n]);j(this.form)&&j(this.form.tpldata)&&this.jsf.setTpldata(this.form.tpldata),this.theme&&this.frameworkLibrary.requestThemeChange(this.theme)}initializeSchema(){j(this.schema)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.schema=(0,fe.default)(this.schema)):x(this.form,"schema")&&j(this.form.schema)?this.jsf.schema=(0,fe.default)(this.form.schema):j(this.JSONSchema)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.schema=(0,fe.default)(this.JSONSchema)):x(this.form,"JSONSchema")&&j(this.form.JSONSchema)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.schema=(0,fe.default)(this.form.JSONSchema)):x(this.form,"properties")&&j(this.form.properties)?this.jsf.schema=(0,fe.default)(this.form):j(this.form),Y(this.jsf.schema)||(Le("object",this.jsf.schema.type)&&(this.jsf.schema.type="object"),x(this.jsf.schema,"type")&&this.jsf.schema.type!=="object"?(this.jsf.schema={type:"object",properties:{1:this.jsf.schema}},this.objectWrap=!0):x(this.jsf.schema,"type")||(j(this.jsf.schema.properties)||j(this.jsf.schema.patternProperties)||j(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=_i(this.jsf.schema),this.jsf.compileAjvSchema(),this.jsf.schema=wI(this.jsf.schema,this.jsf.schemaRefLibrary,this.jsf.schemaRecursiveRefMap,this.jsf.dataRecursiveRefMap,this.jsf.arrayMap),x(this.jsf.schemaRefLibrary,"")&&(this.jsf.hasRootReference=!0))}initializeData(){Z(this.data)?(this.jsf.formValues=(0,fe.default)(this.data),this.formValuesInput="data"):Z(this.model)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.formValues=(0,fe.default)(this.model),this.formValuesInput="model"):Z(this.ngModel)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.formValues=(0,fe.default)(this.ngModel),this.formValuesInput="ngModel"):j(this.form)&&Z(this.form.value)?(this.jsf.JsonFormCompatibility=!0,this.jsf.formValues=(0,fe.default)(this.form.value),this.formValuesInput="form.value"):j(this.form)&&Z(this.form.data)?(this.jsf.formValues=(0,fe.default)(this.form.data),this.formValuesInput="form.data"):Z(this.formData)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.formValuesInput="formData"):x(this.form,"formData")&&Z(this.form.formData)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,this.jsf.formValues=(0,fe.default)(this.form.formData),this.formValuesInput="form.formData"):this.formValuesInput="data"}initializeLayout(){let i=n=>((j(n)||T(n))&&ct(n,(r,o)=>{x(r,"options")&&j(r.options)&&(r.titleMap=r.options,delete r.options)},"top-down"),n);T(this.layout)?this.jsf.layout=(0,fe.default)(this.layout):T(this.form)?(this.jsf.AngularSchemaFormCompatibility=!0,this.jsf.layout=(0,fe.default)(this.form)):this.form&&T(this.form.form)?(this.jsf.JsonFormCompatibility=!0,this.jsf.layout=i((0,fe.default)(this.form.form))):this.form&&T(this.form.layout)?this.jsf.layout=(0,fe.default)(this.form.layout):this.jsf.layout=["*"];let f=null;j(this.UISchema)?(this.jsf.ReactJsonSchemaFormCompatibility=!0,f=(0,fe.default)(this.UISchema)):x(this.form,"UISchema")?(this.jsf.ReactJsonSchemaFormCompatibility=!0,f=(0,fe.default)(this.form.UISchema)):x(this.form,"uiSchema")?(this.jsf.ReactJsonSchemaFormCompatibility=!0,f=(0,fe.default)(this.form.uiSchema)):x(this.form,"customFormItems")&&(this.jsf.JsonFormCompatibility=!0,f=i((0,fe.default)(this.form.customFormItems))),f&&k.forEachDeep(f,(n,r)=>{let o=r.replace(/\//g,"/properties/").replace(/\/properties\/items\/properties\//g,"/items/properties/").replace(/\/properties\/titleMap\/properties\//g,"/titleMap/properties/");if(Z(n)&&Z(r)){let D=k.toKey(r),a=(k.parse(o)||[]).slice(0,-2),l;D.toLowerCase()==="ui:order"?l=[...a,"ui:order"]:(D.slice(0,3).toLowerCase()==="ui:"&&(D=D.slice(3)),l=[...a,"x-schema-form",D]),k.has(this.jsf.schema,a)&&!k.has(this.jsf.schema,l)&&k.set(this.jsf.schema,l,n)}})}activateForm(){if(this.unsubscribeOnActivateForm$.next(),Y(this.jsf.schema)&&(Y(this.jsf.formValues)||this.jsf.buildSchemaFromData()),Y(this.jsf.schema)||(this.jsf.compileAjvSchema(),this.jsf.buildLayout(this.widgetLibrary),this.jsf.buildFormGroupTemplate(this.jsf.formValues),this.jsf.buildFormGroup()),this.jsf.formGroup){!Y(this.jsf.formValues)&&this.jsf.formOptions.setSchemaDefaults!==!0&&this.jsf.formOptions.setLayoutDefaults!==!0&&this.setFormValues(this.jsf.formValues),this.dataChangesSubs=this.jsf.dataChanges.pipe(Wi(this.unsubscribeOnActivateForm$)).subscribe(f=>{this.onChanges.emit(this.objectWrap?f[1]:f),this.formValuesInput&&this.formValuesInput.indexOf(".")===-1&&this[`${this.formValuesInput}Change`].emit(this.objectWrap?f[1]:f)}),this.statusChangesSubs=this.jsf.formGroup.statusChanges.pipe(Wi(this.unsubscribeOnActivateForm$)).subscribe(()=>this.changeDetector.markForCheck()),this.isValidChangesSubs=this.jsf.isValidChanges.pipe(Wi(this.unsubscribeOnActivateForm$)).subscribe(f=>this.isValid.emit(f)),this.validationErrorChangesSubs=this.jsf.validationErrorChanges.pipe(Wi(this.unsubscribeOnActivateForm$)).subscribe(f=>this.validationErrors.emit(f)),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=k.get(this.jsf,"/formOptions/validateOnRender");if(i){let f=n=>{(i===!0||Z(n.value))&&n.markAsTouched(),Object.keys(n.controls||{}).forEach(r=>f(n.controls[r]))};f(this.jsf.formGroup),this.isValid.emit(this.jsf.isValid),this.validationErrors.emit(this.jsf.ajvErrors)}}}};u.\u0275fac=function(f){return new(f||u)(ce(cs),ce(YI),ce(dm),ce(Ne))},u.\u0275cmp=K({type:u,selectors:[["json-schema-form"]],inputs:{schema:"schema",layout:"layout",data:"data",options:"options",framework:"framework",widgets:"widgets",form:"form",model:"model",JSONSchema:"JSONSchema",UISchema:"UISchema",formData:"formData",ngModel:"ngModel",language:"language",loadExternalAssets:"loadExternalAssets",debug:"debug",theme:"theme",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:[ds([Ne,eS]),Gi],decls:3,vars:3,consts:[[1,"json-schema-form",3,"ngSubmit","autocomplete"],[3,"layout"],[4,"ngIf"]],template:function(f,n){f&1&&(d(0,"form",0),O("ngSubmit",function(){return n.submitForm()}),w(1,"root-widget",1),c(),$(2,fI,4,1,"div",2)),f&2&&(h("autocomplete",!(n.jsf==null||n.jsf.formOptions==null)&&n.jsf.formOptions.autocomplete?"on":"off"),s(),h("layout",n.jsf==null?null:n.jsf.layout),s(),h("ngIf",n.debug||(n.jsf==null||n.jsf.formOptions==null?null:n.jsf.formOptions.debug)))},dependencies:[ft,bs,Cs,gs,ja],encapsulation:2,changeDetection:0});let e=u;return e})(),tS=(()=>{let u=class u{};u.\u0275fac=function(f){return new(f||u)},u.\u0275cmp=K({type:u,selectors:[["no-framework"]],inputs:{layoutNode:"layoutNode",layoutIndex:"layoutIndex",dataIndex:"dataIndex"},standalone:!1,decls:1,vars:3,consts:[[3,"dataIndex","layoutIndex","layoutNode"]],template:function(f,n){f&1&&w(0,"select-widget-widget",0),f&2&&h("dataIndex",n.dataIndex)("layoutIndex",n.layoutIndex)("layoutNode",n.layoutNode)},dependencies:[lm],encapsulation:2});let e=u;return e})(),uS=(()=>{let u=class u extends Na{constructor(){super(...arguments),this.name="no-framework",this.text="None (plain HTML)",this.framework=tS}};u.\u0275fac=(()=>{let i;return function(n){return(i||(i=fs(u)))(n||u)}})(),u.\u0275prov=Bt({token:u,factory:u.\u0275fac});let e=u;return e})();var Ta=(()=>{let u=class u{};u.\u0275fac=function(f){return new(f||u)},u.\u0275mod=Qf({type:u}),u.\u0275inj=Gf({imports:[on,wt,uo]});let e=u;return e})(),iS=(()=>{let u=class u{};u.\u0275fac=function(f){return new(f||u)},u.\u0275mod=Qf({type:u}),u.\u0275inj=Gf({providers:[{provide:Na,useClass:uS,multi:!0}],imports:[on,Ta]});let e=u;return e})(),cm=(()=>{let u=class u{};u.\u0275fac=function(f){return new(f||u)},u.\u0275mod=Qf({type:u}),u.\u0275inj=Gf({imports:[on,wt,uo,Ta,iS,Ta]});let e=u;return e})();var nS=typeof global=="object"&&global&&global.Object===Object&&global,Br=nS;var rS=typeof self=="object"&&self&&self.Object===Object&&self,oS=Br||rS||Function("return this")(),ze=oS;var DS=ze.Symbol,vt=DS;var pm=Object.prototype,aS=pm.hasOwnProperty,sS=pm.toString,Rf=vt?vt.toStringTag:void 0;function lS(e){var u=aS.call(e,Rf),t=e[Rf];try{e[Rf]=void 0;var i=!0}catch{}var f=sS.call(e);return i&&(u?e[Rf]=t:delete e[Rf]),f}var mm=lS;var dS=Object.prototype,cS=dS.toString;function pS(e){return cS.call(e)}var Fm=pS;var mS="[object Null]",FS="[object Undefined]",Cm=vt?vt.toStringTag:void 0;function CS(e){return e==null?e===void 0?FS:mS:Cm&&Cm in Object(e)?mm(e):Fm(e)}var ht=CS;function hS(e){return e!=null&&typeof e=="object"}var Xe=hS;var gS="[object Symbol]";function ES(e){return typeof e=="symbol"||Xe(e)&&ht(e)==gS}var hm=ES;function bS(e,u){for(var t=-1,i=e==null?0:e.length,f=Array(i);++t<i;)f[t]=u(e[t],t,e);return f}var gm=bS;var _S=Array.isArray,Mt=_S;var yS=1/0,Em=vt?vt.prototype:void 0,bm=Em?Em.toString:void 0;function _m(e){if(typeof e=="string")return e;if(Mt(e))return gm(e,_m)+"";if(hm(e))return bm?bm.call(e):"";var u=e+"";return u=="0"&&1/e==-yS?"-0":u}var ym=_m;function vS(e){var u=typeof e;return e!=null&&(u=="object"||u=="function")}var Ye=vS;function BS(e){return e}var xr=BS;var xS="[object AsyncFunction]",wS="[object Function]",AS="[object GeneratorFunction]",IS="[object Proxy]";function SS(e){if(!Ye(e))return!1;var u=ht(e);return u==wS||u==AS||u==xS||u==IS}var xi=SS;var $S=ze["__core-js_shared__"],wr=$S;var vm=function(){var e=/[^.]+$/.exec(wr&&wr.keys&&wr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function kS(e){return!!vm&&vm in e}var Bm=kS;var TS=Function.prototype,PS=TS.toString;function OS(e){if(e!=null){try{return PS.call(e)}catch{}try{return e+""}catch{}}return""}var Yt=OS;var MS=/[\\^$.*+?()[\]{}|]/g,jS=/^\[object .+?Constructor\]$/,NS=Function.prototype,qS=Object.prototype,VS=NS.toString,RS=qS.hasOwnProperty,LS=RegExp("^"+VS.call(RS).replace(MS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zS(e){if(!Ye(e)||Bm(e))return!1;var u=xi(e)?LS:jS;return u.test(Yt(e))}var xm=zS;function HS(e,u){return e==null?void 0:e[u]}var wm=HS;function US(e,u){var t=wm(e,u);return xm(t)?t:void 0}var pt=US;var WS=pt(ze,"WeakMap"),Ar=WS;var Am=Object.create,GS=function(){function e(){}return function(u){if(!Ye(u))return{};if(Am)return Am(u);e.prototype=u;var t=new e;return e.prototype=void 0,t}}(),Im=GS;function KS(e,u,t){switch(t.length){case 0:return e.call(u);case 1:return e.call(u,t[0]);case 2:return e.call(u,t[0],t[1]);case 3:return e.call(u,t[0],t[1],t[2])}return e.apply(u,t)}var Sm=KS;function JS(e,u){var t=-1,i=e.length;for(u||(u=Array(i));++t<i;)u[t]=e[t];return u}var Ir=JS;var ZS=800,QS=16,XS=Date.now;function YS(e){var u=0,t=0;return function(){var i=XS(),f=QS-(i-t);if(t=i,f>0){if(++u>=ZS)return arguments[0]}else u=0;return e.apply(void 0,arguments)}}var $m=YS;function e$(e){return function(){return e}}var km=e$;var t$=function(){try{var e=pt(Object,"defineProperty");return e({},"",{}),e}catch{}}(),wi=t$;var u$=wi?function(e,u){return wi(e,"toString",{configurable:!0,enumerable:!1,value:km(u),writable:!0})}:xr,Tm=u$;var i$=$m(Tm),Pm=i$;function f$(e,u){for(var t=-1,i=e==null?0:e.length;++t<i&&u(e[t],t,e)!==!1;);return e}var Om=f$;var n$=9007199254740991,r$=/^(?:0|[1-9]\d*)$/;function o$(e,u){var t=typeof e;return u=u==null?n$:u,!!u&&(t=="number"||t!="symbol"&&r$.test(e))&&e>-1&&e%1==0&&e<u}var Sr=o$;function D$(e,u,t){u=="__proto__"&&wi?wi(e,u,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[u]=t}var Ai=D$;function a$(e,u){return e===u||e!==e&&u!==u}var Cu=a$;var s$=Object.prototype,l$=s$.hasOwnProperty;function d$(e,u,t){var i=e[u];(!(l$.call(e,u)&&Cu(i,t))||t===void 0&&!(u in e))&&Ai(e,u,t)}var $r=d$;function c$(e,u,t,i){var f=!t;t||(t={});for(var n=-1,r=u.length;++n<r;){var o=u[n],D=i?i(t[o],e[o],o,t,e):void 0;D===void 0&&(D=e[o]),f?Ai(t,o,D):$r(t,o,D)}return t}var Lt=c$;var Mm=Math.max;function p$(e,u,t){return u=Mm(u===void 0?e.length-1:u,0),function(){for(var i=arguments,f=-1,n=Mm(i.length-u,0),r=Array(n);++f<n;)r[f]=i[u+f];f=-1;for(var o=Array(u+1);++f<u;)o[f]=i[f];return o[u]=t(r),Sm(e,this,o)}}var jm=p$;function m$(e,u){return Pm(jm(e,u,xr),e+"")}var Nm=m$;var F$=9007199254740991;function C$(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=F$}var kr=C$;function h$(e){return e!=null&&kr(e.length)&&!xi(e)}var hu=h$;function g$(e,u,t){if(!Ye(t))return!1;var i=typeof u;return(i=="number"?hu(t)&&Sr(u,t.length):i=="string"&&u in t)?Cu(t[u],e):!1}var qm=g$;function E$(e){return Nm(function(u,t){var i=-1,f=t.length,n=f>1?t[f-1]:void 0,r=f>2?t[2]:void 0;for(n=e.length>3&&typeof n=="function"?(f--,n):void 0,r&&qm(t[0],t[1],r)&&(n=f<3?void 0:n,f=1),u=Object(u);++i<f;){var o=t[i];o&&e(u,o,i,n)}return u})}var Vm=E$;var b$=Object.prototype;function _$(e){var u=e&&e.constructor,t=typeof u=="function"&&u.prototype||b$;return e===t}var Ii=_$;function y$(e,u){for(var t=-1,i=Array(e);++t<e;)i[t]=u(t);return i}var Rm=y$;var v$="[object Arguments]";function B$(e){return Xe(e)&&ht(e)==v$}var qa=B$;var Lm=Object.prototype,x$=Lm.hasOwnProperty,w$=Lm.propertyIsEnumerable,A$=qa(function(){return arguments}())?qa:function(e){return Xe(e)&&x$.call(e,"callee")&&!w$.call(e,"callee")},Lf=A$;function I$(){return!1}var zm=I$;var Wm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hm=Wm&&typeof module=="object"&&module&&!module.nodeType&&module,S$=Hm&&Hm.exports===Wm,Um=S$?ze.Buffer:void 0,$$=Um?Um.isBuffer:void 0,k$=$$||zm,Si=k$;var T$="[object Arguments]",P$="[object Array]",O$="[object Boolean]",M$="[object Date]",j$="[object Error]",N$="[object Function]",q$="[object Map]",V$="[object Number]",R$="[object Object]",L$="[object RegExp]",z$="[object Set]",H$="[object String]",U$="[object WeakMap]",W$="[object ArrayBuffer]",G$="[object DataView]",K$="[object Float32Array]",J$="[object Float64Array]",Z$="[object Int8Array]",Q$="[object Int16Array]",X$="[object Int32Array]",Y$="[object Uint8Array]",ek="[object Uint8ClampedArray]",tk="[object Uint16Array]",uk="[object Uint32Array]",Ae={};Ae[K$]=Ae[J$]=Ae[Z$]=Ae[Q$]=Ae[X$]=Ae[Y$]=Ae[ek]=Ae[tk]=Ae[uk]=!0;Ae[T$]=Ae[P$]=Ae[W$]=Ae[O$]=Ae[G$]=Ae[M$]=Ae[j$]=Ae[N$]=Ae[q$]=Ae[V$]=Ae[R$]=Ae[L$]=Ae[z$]=Ae[H$]=Ae[U$]=!1;function ik(e){return Xe(e)&&kr(e.length)&&!!Ae[ht(e)]}var Gm=ik;function fk(e){return function(u){return e(u)}}var $i=fk;var Km=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zf=Km&&typeof module=="object"&&module&&!module.nodeType&&module,nk=zf&&zf.exports===Km,Va=nk&&Br.process,rk=function(){try{var e=zf&&zf.require&&zf.require("util").types;return e||Va&&Va.binding&&Va.binding("util")}catch{}}(),eu=rk;var Jm=eu&&eu.isTypedArray,ok=Jm?$i(Jm):Gm,Tr=ok;var Dk=Object.prototype,ak=Dk.hasOwnProperty;function sk(e,u){var t=Mt(e),i=!t&&Lf(e),f=!t&&!i&&Si(e),n=!t&&!i&&!f&&Tr(e),r=t||i||f||n,o=r?Rm(e.length,String):[],D=o.length;for(var a in e)(u||ak.call(e,a))&&!(r&&(a=="length"||f&&(a=="offset"||a=="parent")||n&&(a=="buffer"||a=="byteLength"||a=="byteOffset")||Sr(a,D)))&&o.push(a);return o}var Pr=sk;function lk(e,u){return function(t){return e(u(t))}}var Or=lk;var dk=Or(Object.keys,Object),Zm=dk;var ck=Object.prototype,pk=ck.hasOwnProperty;function mk(e){if(!Ii(e))return Zm(e);var u=[];for(var t in Object(e))pk.call(e,t)&&t!="constructor"&&u.push(t);return u}var Qm=mk;function Fk(e){return hu(e)?Pr(e):Qm(e)}var ki=Fk;function Ck(e){var u=[];if(e!=null)for(var t in Object(e))u.push(t);return u}var Xm=Ck;var hk=Object.prototype,gk=hk.hasOwnProperty;function Ek(e){if(!Ye(e))return Xm(e);var u=Ii(e),t=[];for(var i in e)i=="constructor"&&(u||!gk.call(e,i))||t.push(i);return t}var Ym=Ek;function bk(e){return hu(e)?Pr(e,!0):Ym(e)}var zt=bk;var _k=pt(Object,"create"),tu=_k;function yk(){this.__data__=tu?tu(null):{},this.size=0}var e8=yk;function vk(e){var u=this.has(e)&&delete this.__data__[e];return this.size-=u?1:0,u}var t8=vk;var Bk="__lodash_hash_undefined__",xk=Object.prototype,wk=xk.hasOwnProperty;function Ak(e){var u=this.__data__;if(tu){var t=u[e];return t===Bk?void 0:t}return wk.call(u,e)?u[e]:void 0}var u8=Ak;var Ik=Object.prototype,Sk=Ik.hasOwnProperty;function $k(e){var u=this.__data__;return tu?u[e]!==void 0:Sk.call(u,e)}var i8=$k;var kk="__lodash_hash_undefined__";function Tk(e,u){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=tu&&u===void 0?kk:u,this}var f8=Tk;function Ti(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}Ti.prototype.clear=e8;Ti.prototype.delete=t8;Ti.prototype.get=u8;Ti.prototype.has=i8;Ti.prototype.set=f8;var Ra=Ti;function Pk(){this.__data__=[],this.size=0}var n8=Pk;function Ok(e,u){for(var t=e.length;t--;)if(Cu(e[t][0],u))return t;return-1}var gu=Ok;var Mk=Array.prototype,jk=Mk.splice;function Nk(e){var u=this.__data__,t=gu(u,e);if(t<0)return!1;var i=u.length-1;return t==i?u.pop():jk.call(u,t,1),--this.size,!0}var r8=Nk;function qk(e){var u=this.__data__,t=gu(u,e);return t<0?void 0:u[t][1]}var o8=qk;function Vk(e){return gu(this.__data__,e)>-1}var D8=Vk;function Rk(e,u){var t=this.__data__,i=gu(t,e);return i<0?(++this.size,t.push([e,u])):t[i][1]=u,this}var a8=Rk;function Pi(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}Pi.prototype.clear=n8;Pi.prototype.delete=r8;Pi.prototype.get=o8;Pi.prototype.has=D8;Pi.prototype.set=a8;var Eu=Pi;var Lk=pt(ze,"Map"),bu=Lk;function zk(){this.size=0,this.__data__={hash:new Ra,map:new(bu||Eu),string:new Ra}}var s8=zk;function Hk(e){var u=typeof e;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?e!=="__proto__":e===null}var l8=Hk;function Uk(e,u){var t=e.__data__;return l8(u)?t[typeof u=="string"?"string":"hash"]:t.map}var _u=Uk;function Wk(e){var u=_u(this,e).delete(e);return this.size-=u?1:0,u}var d8=Wk;function Gk(e){return _u(this,e).get(e)}var c8=Gk;function Kk(e){return _u(this,e).has(e)}var p8=Kk;function Jk(e,u){var t=_u(this,e),i=t.size;return t.set(e,u),this.size+=t.size==i?0:1,this}var m8=Jk;function Oi(e){var u=-1,t=e==null?0:e.length;for(this.clear();++u<t;){var i=e[u];this.set(i[0],i[1])}}Oi.prototype.clear=s8;Oi.prototype.delete=d8;Oi.prototype.get=c8;Oi.prototype.has=p8;Oi.prototype.set=m8;var F8=Oi;function Zk(e){return e==null?"":ym(e)}var C8=Zk;function Qk(e,u){for(var t=-1,i=u.length,f=e.length;++t<i;)e[f+t]=u[t];return e}var Mr=Qk;var Xk=Or(Object.getPrototypeOf,Object),Mi=Xk;var Yk="[object Object]",eT=Function.prototype,tT=Object.prototype,h8=eT.toString,uT=tT.hasOwnProperty,iT=h8.call(Object);function fT(e){if(!Xe(e)||ht(e)!=Yk)return!1;var u=Mi(e);if(u===null)return!0;var t=uT.call(u,"constructor")&&u.constructor;return typeof t=="function"&&t instanceof t&&h8.call(t)==iT}var g8=fT;function nT(){this.__data__=new Eu,this.size=0}var E8=nT;function rT(e){var u=this.__data__,t=u.delete(e);return this.size=u.size,t}var b8=rT;function oT(e){return this.__data__.get(e)}var _8=oT;function DT(e){return this.__data__.has(e)}var y8=DT;var aT=200;function sT(e,u){var t=this.__data__;if(t instanceof Eu){var i=t.__data__;if(!bu||i.length<aT-1)return i.push([e,u]),this.size=++t.size,this;t=this.__data__=new F8(i)}return t.set(e,u),this.size=t.size,this}var v8=sT;function ji(e){var u=this.__data__=new Eu(e);this.size=u.size}ji.prototype.clear=E8;ji.prototype.delete=b8;ji.prototype.get=_8;ji.prototype.has=y8;ji.prototype.set=v8;var jr=ji;function lT(e,u){return e&&Lt(u,ki(u),e)}var B8=lT;function dT(e,u){return e&&Lt(u,zt(u),e)}var x8=dT;var S8=typeof exports=="object"&&exports&&!exports.nodeType&&exports,w8=S8&&typeof module=="object"&&module&&!module.nodeType&&module,cT=w8&&w8.exports===S8,A8=cT?ze.Buffer:void 0,I8=A8?A8.allocUnsafe:void 0;function pT(e,u){if(u)return e.slice();var t=e.length,i=I8?I8(t):new e.constructor(t);return e.copy(i),i}var Nr=pT;function mT(e,u){for(var t=-1,i=e==null?0:e.length,f=0,n=[];++t<i;){var r=e[t];u(r,t,e)&&(n[f++]=r)}return n}var $8=mT;function FT(){return[]}var qr=FT;var CT=Object.prototype,hT=CT.propertyIsEnumerable,k8=Object.getOwnPropertySymbols,gT=k8?function(e){return e==null?[]:(e=Object(e),$8(k8(e),function(u){return hT.call(e,u)}))}:qr,Ni=gT;function ET(e,u){return Lt(e,Ni(e),u)}var T8=ET;var bT=Object.getOwnPropertySymbols,_T=bT?function(e){for(var u=[];e;)Mr(u,Ni(e)),e=Mi(e);return u}:qr,Vr=_T;function yT(e,u){return Lt(e,Vr(e),u)}var P8=yT;function vT(e,u,t){var i=u(e);return Mt(e)?i:Mr(i,t(e))}var Rr=vT;function BT(e){return Rr(e,ki,Ni)}var O8=BT;function xT(e){return Rr(e,zt,Vr)}var M8=xT;var wT=pt(ze,"DataView"),Lr=wT;var AT=pt(ze,"Promise"),zr=AT;var IT=pt(ze,"Set"),Hr=IT;var j8="[object Map]",ST="[object Object]",N8="[object Promise]",q8="[object Set]",V8="[object WeakMap]",R8="[object DataView]",$T=Yt(Lr),kT=Yt(bu),TT=Yt(zr),PT=Yt(Hr),OT=Yt(Ar),Ru=ht;(Lr&&Ru(new Lr(new ArrayBuffer(1)))!=R8||bu&&Ru(new bu)!=j8||zr&&Ru(zr.resolve())!=N8||Hr&&Ru(new Hr)!=q8||Ar&&Ru(new Ar)!=V8)&&(Ru=function(e){var u=ht(e),t=u==ST?e.constructor:void 0,i=t?Yt(t):"";if(i)switch(i){case $T:return R8;case kT:return j8;case TT:return N8;case PT:return q8;case OT:return V8}return u});var qi=Ru;var MT=Object.prototype,jT=MT.hasOwnProperty;function NT(e){var u=e.length,t=new e.constructor(u);return u&&typeof e[0]=="string"&&jT.call(e,"index")&&(t.index=e.index,t.input=e.input),t}var L8=NT;var qT=ze.Uint8Array,La=qT;function VT(e){var u=new e.constructor(e.byteLength);return new La(u).set(new La(e)),u}var Vi=VT;function RT(e,u){var t=u?Vi(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}var z8=RT;var LT=/\w*$/;function zT(e){var u=new e.constructor(e.source,LT.exec(e));return u.lastIndex=e.lastIndex,u}var H8=zT;var U8=vt?vt.prototype:void 0,W8=U8?U8.valueOf:void 0;function HT(e){return W8?Object(W8.call(e)):{}}var G8=HT;function UT(e,u){var t=u?Vi(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var Ur=UT;var WT="[object Boolean]",GT="[object Date]",KT="[object Map]",JT="[object Number]",ZT="[object RegExp]",QT="[object Set]",XT="[object String]",YT="[object Symbol]",eP="[object ArrayBuffer]",tP="[object DataView]",uP="[object Float32Array]",iP="[object Float64Array]",fP="[object Int8Array]",nP="[object Int16Array]",rP="[object Int32Array]",oP="[object Uint8Array]",DP="[object Uint8ClampedArray]",aP="[object Uint16Array]",sP="[object Uint32Array]";function lP(e,u,t){var i=e.constructor;switch(u){case eP:return Vi(e);case WT:case GT:return new i(+e);case tP:return z8(e,t);case uP:case iP:case fP:case nP:case rP:case oP:case DP:case aP:case sP:return Ur(e,t);case KT:return new i;case JT:case XT:return new i(e);case ZT:return H8(e);case QT:return new i;case YT:return G8(e)}}var K8=lP;function dP(e){return typeof e.constructor=="function"&&!Ii(e)?Im(Mi(e)):{}}var Wr=dP;var cP="[object Map]";function pP(e){return Xe(e)&&qi(e)==cP}var J8=pP;var Z8=eu&&eu.isMap,mP=Z8?$i(Z8):J8,Q8=mP;var FP="[object Set]";function CP(e){return Xe(e)&&qi(e)==FP}var X8=CP;var Y8=eu&&eu.isSet,hP=Y8?$i(Y8):X8,eF=hP;var gP=1,EP=2,bP=4,tF="[object Arguments]",_P="[object Array]",yP="[object Boolean]",vP="[object Date]",BP="[object Error]",uF="[object Function]",xP="[object GeneratorFunction]",wP="[object Map]",AP="[object Number]",iF="[object Object]",IP="[object RegExp]",SP="[object Set]",$P="[object String]",kP="[object Symbol]",TP="[object WeakMap]",PP="[object ArrayBuffer]",OP="[object DataView]",MP="[object Float32Array]",jP="[object Float64Array]",NP="[object Int8Array]",qP="[object Int16Array]",VP="[object Int32Array]",RP="[object Uint8Array]",LP="[object Uint8ClampedArray]",zP="[object Uint16Array]",HP="[object Uint32Array]",ye={};ye[tF]=ye[_P]=ye[PP]=ye[OP]=ye[yP]=ye[vP]=ye[MP]=ye[jP]=ye[NP]=ye[qP]=ye[VP]=ye[wP]=ye[AP]=ye[iF]=ye[IP]=ye[SP]=ye[$P]=ye[kP]=ye[RP]=ye[LP]=ye[zP]=ye[HP]=!0;ye[BP]=ye[uF]=ye[TP]=!1;function Gr(e,u,t,i,f,n){var r,o=u&gP,D=u&EP,a=u&bP;if(t&&(r=f?t(e,i,f,n):t(e)),r!==void 0)return r;if(!Ye(e))return e;var l=Mt(e);if(l){if(r=L8(e),!o)return Ir(e,r)}else{var m=qi(e),p=m==uF||m==xP;if(Si(e))return Nr(e,o);if(m==iF||m==tF||p&&!f){if(r=D||p?{}:Wr(e),!o)return D?P8(e,x8(r,e)):T8(e,B8(r,e))}else{if(!ye[m])return f?e:{};r=K8(e,m,o)}}n||(n=new jr);var b=n.get(e);if(b)return b;n.set(e,r),eF(e)?e.forEach(function(v){r.add(Gr(v,u,t,v,e,n))}):Q8(e)&&e.forEach(function(v,I){r.set(I,Gr(v,u,t,I,e,n))});var g=a?D?M8:O8:D?zt:ki,_=l?void 0:g(e);return Om(_||e,function(v,I){_&&(I=v,v=e[I]),$r(r,I,Gr(v,u,t,I,e,n))}),r}var fF=Gr;var UP=1,WP=4;function GP(e){return fF(e,UP|WP)}var Kr=GP;function KP(e){return function(u,t,i){for(var f=-1,n=Object(u),r=i(u),o=r.length;o--;){var D=r[e?o:++f];if(t(n[D],D,n)===!1)break}return u}}var nF=KP;var JP=nF(),rF=JP;function ZP(e,u,t){(t!==void 0&&!Cu(e[u],t)||t===void 0&&!(u in e))&&Ai(e,u,t)}var Hf=ZP;function QP(e){return Xe(e)&&hu(e)}var oF=QP;function XP(e,u){if(!(u==="constructor"&&typeof e[u]=="function")&&u!="__proto__")return e[u]}var Uf=XP;function YP(e){return Lt(e,zt(e))}var DF=YP;function eO(e,u,t,i,f,n,r){var o=Uf(e,t),D=Uf(u,t),a=r.get(D);if(a){Hf(e,t,a);return}var l=n?n(o,D,t+"",e,u,r):void 0,m=l===void 0;if(m){var p=Mt(D),b=!p&&Si(D),g=!p&&!b&&Tr(D);l=D,p||b||g?Mt(o)?l=o:oF(o)?l=Ir(o):b?(m=!1,l=Nr(D,!0)):g?(m=!1,l=Ur(D,!0)):l=[]:g8(D)||Lf(D)?(l=o,Lf(o)?l=DF(o):(!Ye(o)||xi(o))&&(l=Wr(D))):m=!1}m&&(r.set(D,l),f(l,D,i,n,r),r.delete(D)),Hf(e,t,l)}var aF=eO;function sF(e,u,t,i,f){e!==u&&rF(u,function(n,r){if(f||(f=new jr),Ye(n))aF(e,u,r,t,sF,i,f);else{var o=i?i(Uf(e,r),n,r+"",e,u,f):void 0;o===void 0&&(o=n),Hf(e,r,o)}},zt)}var lF=sF;var tO=Vm(function(e,u,t){lF(e,u,t)}),za=tO;var uO=0;function iO(e){var u=++uO;return C8(e)+u}var Ha=iO;var dF=(()=>{class e{jsonSchemaForm=S(Vf,{host:!0,self:!0,optional:!0});jsfPatch=!1;constructor(){let t=this.jsonSchemaForm,i=t.jsf.buildLayout.bind(t.jsf);t.jsf.buildLayout=f=>{if(i(f),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,f){if(Array.isArray(t)){let n=t.filter(D=>D.name!=="_bridge"),r=n.filter(D=>D.items&&Array.isArray(D.items)).flatMap(D=>D.items).filter(D=>D.dataType==="array"||D.arrayItem);n.concat(r).filter(D=>D.dataType==="array"||D.arrayItem).forEach(D=>{this.fixNestedArray(D,i,f)})}else this.fixNestedArray(t,i,f)}fixNestedArray(t,i,f){if(t.items&&Array.isArray(t.items)){let n=t.items.find(r=>r.type==="$ref");if(n){let r=t.items.filter(a=>a.type==="section"||a.type==="div"),o=r.length>0?r.reduce((a,l)=>a.id>l.id?a:l):this.getItemTemplateFromRef(n),D=this.getDataFromPointer(i,n.dataPointer.replace(f,""));if(D===null)return;if(Array.isArray(D)){for(;t.items.length-1<D.length;){let a=Kr(o);a._id=Ha("new_"),t.items.unshift(a)}D.forEach((a,l)=>{this.fixArray(t.items[l],a,n.dataPointer)})}else this.fixArray(t.items,i,n.dataPointer)}else this.fixArray(t.items,i,f);t.items.filter(r=>r.items&&Array.isArray(r.items)).forEach(r=>{this.fixArray(r.items,i,f)})}}getDataFromPointer(t,i){let f=t;return i.substring(1).split(/\//).filter(n=>n!=="-").forEach(n=>{try{f=f[n]}catch{f=null}}),f}getItemTemplateFromRef(t){let i={type:"section",items:[]},f=Kr(t);return za(f,i),f}static \u0275fac=function(i){return new(i||e)};static \u0275dir=Lu({type:e,selectors:[["","jsfPatch",""]],inputs:{jsfPatch:"jsfPatch"}})}return e})();function fO(e,u){if(e&1){let t=H();d(0,"json-schema-form",1),O("onChanges",function(f){N(t);let n=C();return q(n.onChanges(f))})("isValid",function(f){N(t);let n=C();return q(n.validChange(f))}),c()}if(e&2){let t=C();h("jsfPatch",t.configSchema.fixArrays)("options",t.jsonFormOptions)("schema",t.configSchema.schema)("layout",t.configSchema.layout)("form",t.configSchema.form)("data",t.currentData)("language",t.language)}}var Ri=(()=>{class e{$settings=S(ke);configSchema;data;dataChange=new et;dataChanged=new et;isValid=new et;currentData;language="en";availableLanguages=["de","en","es","fr","it","pt","zh"];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)}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=K({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-4",1,"ng-bs4-validate",3,"jsfPatch","options","schema","layout","form","data","language"],["framework","bootstrap-4",1,"ng-bs4-validate",3,"onChanges","isValid","jsfPatch","options","schema","layout","form","data","language"]],template:function(i,f){i&1&&(as(0),$(1,fO,1,7,"json-schema-form",0),ss()),i&2&&(s(),A(f.configSchema.schema?1:-1))},dependencies:[cm,Vf,dF],encapsulation:2})}return e})();var nO=["custompluginui"];function rO(e,u){e&1&&(d(0,"div",7),w(1,"i",19),c())}function oO(e,u){if(e&1){let t=H();d(0,"div",9)(1,"app-schema-form",20),$e("dataChange",function(f){N(t);let n=C();return Se(n.pluginConfig[0],f)||(n.pluginConfig[0]=f),q(f)}),O("dataChanged",function(f){N(t);let n=C();return q(n.schemaFormUpdatedSubject.next(f))})("isValid",function(f){N(t);let n=C();return q(n.onIsValid(f))}),c()()}if(e&2){let t=C();s(),h("configSchema",t.schema),Ie("data",t.pluginConfig[0])}}function DO(e,u){if(e&1){let t=H();d(0,"button",24),O("click",function(){N(t);let f=C(2);return q(f.formActionSubject.next("cancel"))}),E(1),c()}if(e&2){let t=C(2);s(),z(t.formCancelButtonLabel)}}function aO(e,u){if(e&1){let t=H();d(0,"button",25),O("click",function(){N(t);let f=C(2);return q(f.formActionSubject.next("submit"))}),E(1),c()}if(e&2){let t=C(2);h("disabled",!t.formValid),s(),V(" ",t.formSubmitButtonLabel," ")}}function sO(e,u){if(e&1){let t=H();d(0,"div",9)(1,"app-schema-form",20),$e("dataChange",function(f){N(t);let n=C();return Se(n.formData,f)||(n.formData=f),q(f)}),O("dataChanged",function(f){N(t);let n=C();return q(n.formUpdatedSubject.next(f))})("isValid",function(f){N(t);let n=C();return q(n.formValidEvent(f))}),c(),d(2,"div",21),$(3,DO,2,1,"button",22)(4,aO,2,2,"button",23),c()()}if(e&2){let t=C();s(),h("configSchema",t.formSchema),Ie("data",t.formData),s(2),A(t.formCancelButtonLabel?3:-1),s(),A(t.formSubmitButtonLabel?4:-1)}}function lO(e,u){e&1&&(d(0,"div",10),w(1,"i",19),c())}function dO(e,u){if(e&1&&(w(0,"i",16),y(1,"translate")),e&2){let t=C();h("ngClass",t.formIsValid?"fa-circle-check green-text":t.strictValidation?"fa-circle-exclamation red-text":"fa-circle-exclamation orange-text")("ngbTooltip",B(1,2,t.formIsValid?"form.label_valid":t.strictValidation?"form.label_invalid_strict":"form.label_invalid"))}}function cO(e,u){e&1&&(d(0,"span"),E(1),y(2,"translate"),c()),e&2&&(s(),z(B(2,1,"form.button_save")))}function pO(e,u){e&1&&w(0,"i",18)}var cF=(()=>{class e{$activeModal=S(he);$api=S(oe);$modal=S(Re);$plugin=S(yu);$settings=S(ke);$toastr=S(de);$translate=S(le);$ws=S(Ku);customPluginUiElementTarget=Yf("custompluginui");plugin;schema;pluginConfig;pluginAlias;pluginType;loading=!0;saveInProgress=!1;pluginSpinner=!1;saveButtonDisabled=!1;uiLoaded=!1;showSchemaForm=!1;schemaFormUpdatedSubject=new mt;formId;formSchema;formData;formSubmitButtonLabel;formCancelButtonLabel;formValid=!0;formUpdatedSubject=new mt;formActionSubject=new mt;childBridges=[];isFirstSave=!1;formIsValid=!0;strictValidation=!1;io;basePath;iframe;schemaFormRecentlyUpdated=!1;schemaFormRecentlyRefreshed=!1;schemaFormRefreshSubject=new mt;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,uu.api.origin)}),this.io.socket.on("stream",t=>{t.action="stream",this.iframe.contentWindow.postMessage(t,uu.api.origin)}),this.io.socket.on("ready",()=>{this.loading=!1,this.loadUi()}),this.schemaFormRefreshSubject.pipe(Wf(250)).subscribe(this.schemaFormRefresh.bind(this)),this.schemaFormUpdatedSubject.pipe(Wf(250),eo(1)).subscribe(this.schemaFormUpdated.bind(this)),this.formUpdatedSubject.pipe(Wf(100),eo(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)}loadUi(){this.iframe=this.customPluginUiElementTarget().nativeElement,this.iframe.src=`${uu.api.base+this.basePath}/index.html?origin=${encodeURIComponent(location.origin)}&v=${encodeURIComponent(this.plugin.installedVersion)}`}handleMessage=t=>{if(t.origin===uu.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"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 f of i)if(typeof f!="object"||Array.isArray(f))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,f=!0){t.source.postMessage({action:"response",requestId:t.data.requestId,success:f,data:i},t.origin)}injectDefaultStyles(t){return W(this,null,function*(){let i=Array.from(window.document.body.classList).find(D=>D.startsWith("config-ui-x-")),f=window.document.body.classList.contains("dark-mode");t.source.postMessage({action:"body-class",class:i},t.origin),f&&t.source.postMessage({action:"body-class",class:"dark-mode"},t.origin);let n=Array.from(document.querySelectorAll("link"));for(let D of n)if(D.getAttribute("rel")==="stylesheet"){let a=D.getAttribute("href"),l=document.baseURI+(a.startsWith("/")?a.substring(1):a);t.source.postMessage({action:"link-element",href:l,rel:"stylesheet"},t.origin)}let r=Array.from(document.querySelectorAll("style"));for(let D of r)t.source.postMessage({action:"inline-style",style:D.innerHTML},t.origin);let o=`
|
|
14
14
|
body {
|
|
15
15
|
height: unset !important;
|
|
16
16
|
background-color: ${f?"#242424":"#FFFFFF"} !important;
|
|
17
17
|
color: ${f?"#FFFFFF":"#000000"};
|
|
18
18
|
padding: 5px !important;
|
|
19
19
|
}
|
|
20
|
-
`;t.source.postMessage({action:"inline-style",style:o},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},uu.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,f,n,r){return W(this,null,function*(){yield this.formEnd(),this.formId=t,this.formSchema=i,this.formData=f,this.formSubmitButtonLabel=n,this.formCancelButtonLabel=r})}formEnd(){return W(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}},uu.api.origin)}formValidEvent(t){this.formValid=t}formActionEvent(t){this.iframe.contentWindow.postMessage({action:"stream",event:this.formId,data:{formEvent:t,formData:this.formData}},uu.api.origin)}handleGetCachedAccessories(t){return W(this,null,function*(){let i=yield ne(this.$api.get("/server/cached-accessories"));return this.requestResponse(t,i.filter(f=>f.plugin===this.plugin.name))})}savePluginConfig(t=!1){return W(this,null,function*(){var i;this.saveInProgress=!0;try{let f=yield ne(this.$api.post(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`,this.pluginConfig));if(this.saveInProgress=!1,t){if(this.isFirstSave&&this.$settings.env.recommendChildBridges&&this.$settings.env.serviceMode&&((i=f[0])!=null&&i.platform)){this.$activeModal.close(),this.$plugin.bridgeSettings(this.plugin,!0);return}if(!["homebridge","homebridge-config-ui-x"].includes(this.plugin.name)&&this.$settings.env.serviceMode&&(yield this.getChildBridges(),this.childBridges.length>0)){this.$activeModal.close();let n=this.$modal.open(nu,{size:"lg",backdrop:"static"});n.componentInstance.bridges=this.childBridges.map(r=>({displayName:r.name,username:r.username.replace(/:/g,"")}));return}this.$activeModal.close(),this.$modal.open(At,{size:"lg",backdrop:"static"})}}catch(f){this.saveInProgress=!1,console.error(f),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error"))}})}getChildBridges(){return W(this,null,function*(){try{(yield ne(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=[]}})}onIsValid(t){this.formIsValid=t}ngOnDestroy(){window.removeEventListener("message",this.handleMessage),this.io.end(),this.schemaFormRefreshSubject.complete(),this.schemaFormUpdatedSubject.complete(),this.formUpdatedSubject.complete()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=K({type:e,selectors:[["ng-component"]],viewQuery:function(i,f){i&1&&fn(f.customPluginUiElementTarget,nO,5),i&2&&nn()},inputs:{plugin:"plugin",schema:"schema",pluginConfig:"pluginConfig"},decls:27,vars:20,consts:[["custompluginui",""],[1,"modal-content","hb-plugin-settings-modal"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click","disabled"],["aria-hidden","true"],[1,"modal-body",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-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-center"],[1,"text-right","d-flex","align-items-center","justify-content-end"],["container","modal","placement","top","openDelay","150","triggers","hover",1,"fa","fa-fw","fa-xl",3,"ngClass","ngbTooltip"],["type","button","data-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-right","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,f){if(i&1){let n=H();d(0,"div",1)(1,"div",2)(2,"h5",3),E(3),y(4,"translate"),c(),d(5,"button",4),y(6,"translate"),O("click",function(){return N(n),q(f.$activeModal.dismiss("Dismiss"))}),d(7,"span",5),E(8,"\xD7"),c()()(),d(9,"div",6),$(10,rO,2,0,"div",7),w(11,"iframe",8,0),$(13,oO,2,2,"div",9)(14,sO,5,4,"div",9)(15,lO,2,0,"div",10),c(),d(16,"div",11)(17,"div",12)(18,"button",13),O("click",function(){return N(n),q(f.$activeModal.dismiss("Dismiss"))}),E(19),y(20,"translate"),c()(),w(21,"div",14),d(22,"div",15),$(23,dO,2,4,"i",16),d(24,"button",17),O("click",function(){return N(n),q(f.savePluginConfig(!0))}),$(25,cO,3,3,"span")(26,pO,1,0,"i",18),c()()()()}i&2&&(s(3),Me(" ",B(4,14,"plugins.settings.title_settings"),": ",f.plugin.displayName||f.plugin.name," "),s(2),h("disabled",f.saveInProgress),U("aria-label",B(6,16,"form.button_close")),s(5),A(f.loading?10:-1),s(3),A(f.uiLoaded&&f.pluginConfig.length&&f.schema.singular&&f.showSchemaForm?13:-1),s(),A(f.formId?14:-1),s(),A(f.pluginSpinner?15:-1),s(3),h("disabled",f.saveInProgress),s(),V(" ",B(20,18,"form.button_close")," "),s(4),A(f.showSchemaForm?23:-1),s(),h("disabled",f.saveInProgress||!f.showSchemaForm||f.showSchemaForm&&f.strictValidation&&!f.formIsValid),s(),A(f.saveInProgress?-1:25),s(),A(f.saveInProgress?26:-1))},dependencies:[Ri,jt,Zu,Ce],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;top:16px;left:16px;right:16px;bottom: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 mF=Oe(pF(),1);var Li=(()=>{class e{el=S(Jf);ngOnInit(){this.el.nativeElement.querySelectorAll("a").forEach(f=>{f.target="_blank",f.rel="noopener noreferrer"});let i=new mF.EmojiConvertor;this.el.nativeElement.innerHTML=i.replace_colons(this.el.nativeElement.innerHTML)}static \u0275fac=function(i){return new(i||e)};static \u0275dir=Lu({type:e,selectors:[["markdown"]]})}return e})();function mO(e,u){e&1&&(d(0,"div")(1,"div",10)(2,"p"),E(3),y(4,"translate"),c(),d(5,"p",11)(6,"span"),E(7),y(8,"translate"),c(),d(9,"a",12),E(10," https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control "),c(),d(11,"span"),E(12),y(13,"translate"),c()()()()),e&2&&(s(3),z(B(4,3,"accessories.message_must_use_insecure_mode")),s(4),V("",B(8,5,"accessories.message_please_see")," "),s(5),V(" ",B(13,7,"accessories.message_for_more_information"),""))}function FO(e,u){if(e&1&&(d(0,"div",5),$(1,mO,14,9,"div"),c()),e&2){let t=C();s(),A(t.$settings.env.enableAccessories?-1:1)}}function CO(e,u){e&1&&(d(0,"p"),E(1),y(2,"translate"),c()),e&2&&(s(),z(B(2,1,"plugins.settings.custom.homebridge-gsh.message_account_link_required")))}function hO(e,u){if(e&1){let t=H();d(0,"div",13)(1,"button",17),O("click",function(){N(t);let f=C(2);return q(f.linkAccount())}),E(2),y(3,"translate"),c()()}e&2&&(s(2),V(" ",B(3,1,"plugins.settings.custom.homebridge-gsh.label_link_account")," "))}function gO(e,u){e&1&&(d(0,"div",15)(1,"p",20)(2,"strong"),E(3),y(4,"translate"),c()()()),e&2&&(s(3),z(B(4,1,"plugins.settings.custom.homebridge-gsh.message_homebridge_restart_required")))}function EO(e,u){if(e&1&&(d(0,"div",14),w(1,"i",18),d(2,"h4",19),E(3),y(4,"titlecase"),y(5,"translate"),c(),$(6,gO,5,3,"div",15),c()),e&2){let t=C(2);s(3),Me(" ",B(4,3,t.linkType)," ",B(5,5,"plugins.settings.custom.homebridge-gsh.label_account_linked")," "),s(3),A(t.justLinked?6:-1)}}function bO(e,u){if(e&1&&w(0,"markdown",21),e&2){let t=C(3);h("data",t.schema.footerDisplay)}}function _O(e,u){if(e&1&&(d(0,"div",15),$(1,bO,1,1,"markdown",21),c()),e&2){let t=C(2);s(),A(t.schema.footerDisplay?1:-1)}}function yO(e,u){if(e&1){let t=H();d(0,"div",16)(1,"app-schema-form",22),$e("dataChange",function(f){N(t);let n=C(2);return Se(n.gshConfig,f)||(n.gshConfig=f),q(f)}),c()()}if(e&2){let t=C(2);s(),h("configSchema",t.schema),Ie("data",t.gshConfig)}}function vO(e,u){if(e&1&&(d(0,"div",5)(1,"p"),E(2),y(3,"translate"),c(),$(4,CO,3,3,"p")(5,hO,4,3,"div",13)(6,EO,7,7,"div",14)(7,_O,2,1,"div",15)(8,yO,2,2,"div",16),c()),e&2){let t=C();s(2),z(B(3,6,"plugins.settings.custom.homebridge-gsh.message_about")),s(2),A(t.gshConfig.token?-1:4),s(),A(t.gshConfig.token?-1:5),s(),A(t.gshConfig.token?6:-1),s(),A(t.gshConfig&&t.gshConfig.token?7:-1),s(),A(t.gshConfig&&t.gshConfig.token?8:-1)}}function BO(e,u){if(e&1){let t=H();d(0,"button",23),O("click",function(){N(t);let f=C();return q(f.unlinkAccount())}),E(1),y(2,"translate"),c()}e&2&&(s(),V(" ",B(2,1,"plugins.settings.custom.homebridge-gsh.label_unlink_account")," "))}function xO(e,u){if(e&1){let t=H();d(0,"button",24),O("click",function(){N(t);let f=C();return q(f.saveAndClose())}),E(1),y(2,"translate"),c()}e&2&&(s(),V(" ",B(2,1,"form.button_save")," "))}var CF=(()=>{class e{$activeModal=S(he);$api=S(oe);$jwtHelper=S(ms);$settings=S(ke);$toastr=S(de);$translate=S(le);plugin;schema;pluginConfig;justLinked=!1;gshConfig;linkType;linkDomain="https://homebridge-gsh.iot.oz.nu";linkUrl=`${this.linkDomain}/link-account`;popup;originCheckInterval;constructor(){window.addEventListener("message",this.windowMessageListener,!1)}ngOnInit(){this.pluginConfig.length||this.pluginConfig.push({name:"Google Smart Home",platform:this.schema.pluginAlias}),this.gshConfig=this.pluginConfig[0],this.parseToken()}windowMessageListener=t=>{t.origin!==this.linkDomain&&(console.error("Refusing to process message from",t.origin),console.error(t));try{let i=JSON.parse(t.data);i.token&&this.processToken(i.token)}catch(i){console.error(i)}};linkAccount(){let f=window.top.outerHeight/2+window.top.screenY-350,n=window.top.outerWidth/2+window.top.screenX-450/2;this.popup=window.open(this.linkUrl,"oznu-google-smart-home-auth",`toolbar=no, location=no, directories=no, status=no, menubar=no scrollbars=no, resizable=no, copyhistory=no, width=450, height=700, top=${f}, left=${n}`),this.originCheckInterval=setInterval(()=>{this.popup.postMessage("origin-check",this.linkDomain)},2e3)}unlinkAccount(){this.gshConfig={name:"Google Smart Home",platform:this.schema.pluginAlias},this.pluginConfig.splice(0,this.pluginConfig.length),this.saveConfig()}processToken(t){clearInterval(this.originCheckInterval),this.popup&&this.popup.close(),this.gshConfig.token=t,this.gshConfig.notice="Keep your token a secret!",this.pluginConfig.length||this.pluginConfig.push(this.gshConfig),this.parseToken(),this.saveConfig()}parseToken(){if(this.gshConfig.token)try{let t=this.$jwtHelper.decodeToken(this.gshConfig.token);this.linkType=t.id.split("|")[0].split("-")[0]}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("plugins.settings.custom.homebridge-gsh.message_invalid_token"),this.$translate.instant("toast.title_error")),delete this.gshConfig.token}}saveConfig(){return W(this,null,function*(){try{yield ne(this.$api.post(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`,this.pluginConfig)),this.justLinked=!0,this.$toastr.success(this.$translate.instant("plugins.settings.restart_required"),this.$translate.instant("plugins.settings.plugin_config_saved"))}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error"))}})}saveAndClose(){return W(this,null,function*(){this.gshConfig.platform=this.schema.pluginAlias,this.pluginConfig[0]=this.gshConfig,yield this.saveConfig(),this.$activeModal.close()})}close(){this.$activeModal.close()}ngOnDestroy(){clearInterval(this.originCheckInterval),window.removeEventListener("message",this.windowMessageListener),this.popup&&this.popup.close()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=K({type:e,selectors:[["app-homebridge-google-smarthome"]],inputs:{plugin:"plugin",schema:"schema",pluginConfig:"pluginConfig"},decls:16,vars:10,consts:[[1,"modal-content","hb-plugin-settings-modal"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-elegant","mr-auto"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-dismiss","modal",1,"btn","btn-primary"],["role","alert",1,"alert","alert-warning"],[1,"mb-0"],["target","_blank","rel","noopener noreferrer","href","https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control"],[1,"text-center"],[1,"text-center","mt-1"],[1,"mt-3"],[1,"card","p-2","pt-3","mt-4"],[1,"btn","btn-primary","btn-lg",3,"click"],[1,"fas","fa-fw","fa-check-circle","primary-text",2,"font-size","50px"],[1,"mt-2"],[1,"primary-text"],[1,"plugin-md",3,"data"],[3,"dataChange","configSchema","data"],["type","button","data-dismiss","modal",1,"btn","btn-elegant","mr-auto",3,"click"],["type","button","data-dismiss","modal",1,"btn","btn-primary",3,"click"]],template:function(i,f){i&1&&(d(0,"div",0)(1,"div",1)(2,"h5",2),E(3,"Homebridge Google Smart Home"),c(),d(4,"button",3),y(5,"translate"),O("click",function(){return f.$activeModal.dismiss("Dismiss")}),d(6,"span",4),E(7,"\xD7"),c()()(),$(8,FO,2,1,"div",5)(9,vO,9,8,"div",5),d(10,"div",6),$(11,BO,3,3,"button",7),d(12,"button",8),O("click",function(){return f.close()}),E(13),y(14,"translate"),c(),$(15,xO,3,3,"button",9),c()()),i&2&&(s(4),U("aria-label",B(5,6,"form.button_close")),s(4),A(f.$settings.env.enableAccessories?-1:8),s(),A(f.$settings.env.enableAccessories?9:-1),s(2),A(f.gshConfig.token?11:-1),s(2),V(" ",B(14,8,"form.button_close")," "),s(2),A(f.gshConfig.token?15:-1))},dependencies:[Xu,Qu,Li,Ri,rn,Ce],encapsulation:2})}return e})();var hF=(()=>{class e{$api=S(oe);$modal=S(Re);plugins={"homebridge-gsh":CF};openSettings(t,i){return W(this,null,function*(){let f=yield this.loadPluginConfig(t.name),n=this.$modal.open(this.plugins[t.name],{size:"lg",backdrop:"static"});return n.componentInstance.plugin=t,n.componentInstance.schema=i,n.componentInstance.pluginConfig=f,n.result.catch(()=>{})})}openCustomSettingsUi(t,i){return W(this,null,function*(){let f=yield this.loadPluginConfig(t.name),n=this.$modal.open(cF,{size:"lg",backdrop:"static"});return n.componentInstance.plugin=t,n.componentInstance.schema=i,n.componentInstance.pluginConfig=f,n.result.catch(()=>{})})}loadPluginConfig(t){return W(this,null,function*(){return ne(this.$api.get(`/config-editor/plugin/${encodeURIComponent(t)}`))})}static \u0275fac=function(i){return new(i||e)};static \u0275prov=Bt({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function wO(e,u){e&1&&(d(0,"div",6),w(1,"i",13),c())}function AO(e,u){e&1&&(d(0,"div"),w(1,"i",16),d(2,"p"),E(3,"All your plugins are marked as compatible with the new version of Homebridge."),c(),d(4,"p"),E(5,"You are all set to continue below."),c()())}function IO(e,u){e&1&&(d(0,"div"),w(1,"i",17),d(2,"p"),E(3,"Some of your plugins are not explicitly marked as compatible with the new version of Homebridge."),c(),d(4,"p"),E(5," This does "),d(6,"span",18),E(7,"not"),c(),E(8," necessarily mean that they won't work. We just can't guarantee that they will. "),c(),d(9,"p"),E(10," For more information about this update, please see the "),d(11,"a",19),E(12,"wiki page"),c(),E(13,". "),c(),d(14,"p"),E(15,"To ignore this warning and continue with the update, click continue below."),c()())}function SO(e,u){e&1&&(d(0,"span"),w(1,"i",21),c())}function $O(e,u){e&1&&(d(0,"span"),w(1,"i",22),c())}function kO(e,u){if(e&1&&(d(0,"li",15)(1,"span",20),E(2),c(),$(3,SO,2,0,"span")(4,$O,2,0,"span"),c()),e&2){let t=u.$implicit;s(2),z(t.name),s(),A(t.hb2Ready==="supported"?3:-1),s(),A(t.hb2Ready==="unknown"?4:-1)}}function TO(e,u){if(e&1&&(d(0,"div"),$(1,AO,6,0,"div")(2,IO,16,0,"div"),d(3,"ul",14),ut(4,kO,5,3,"li",15,tt),c()()),e&2){let t=C();s(),A(t.allPluginsSupported?1:-1),s(),A(t.allPluginsSupported?-1:2),s(2),it(t.installedPlugins)}}var gF=(()=>{class e{$activeModal=S(he);$api=S(oe);$settings=S(ke);$toastr=S(de);$translate=S(le);loading=!0;installedPlugins=[];allPluginsSupported=!0;ngOnInit(){this.loadInstalledPlugins()}loadInstalledPlugins(){return W(this,null,function*(){this.installedPlugins=[],this.loading=!0;let t=this.$settings.env.homebridgeVersion.split(".")[0];try{let i=yield ne(this.$api.get("/plugins"));this.installedPlugins=i.filter(f=>f.name!=="homebridge-config-ui-x").map(f=>{var o,D;let n=((D=(o=f.engines)==null?void 0:o.homebridge)==null?void 0:D.split("||").map(a=>a.trim()))||[],r=t==="2"?"hide":n.some(a=>a.startsWith("^2")||a.startsWith(">=2"))?"supported":"unknown";return r==="unknown"&&(this.allPluginsSupported=!1),ve(Q({},f),{hb2Ready:r})}),this.loading=!1}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("plugins.toast_failed_to_load_plugins"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=K({type:e,selectors:[["ng-component"]],decls:22,vars:15,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body","w-100","text-center"],[1,"w-100","text-center","primary-text"],[1,"modal-footer","justify-content-between"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-right"],["type","button","data-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],[1,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[1,"list-group","list-group-box","mt-4"],[1,"list-group-item","d-flex","flex-row","flex-wrap","justify-content-between"],[1,"fas","fa-fw","fa-check-circle","primary-text","mb-4",2,"font-size","75px"],[1,"fas","fa-fw","fa-info-circle","primary-text","mb-4",2,"font-size","75px"],[1,"font-weight-bold"],["href","https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0","target","_blank"],[1,"text-monospace"],["aria-label","The developer has specifically marked this plugin as compatible with Homebridge v2.0",1,"fas","fa-check-circle","green-text","fa-xl","ml-2"],["aria-label","The developer has not specifically marked this plugin as compatible with Homebridge v2.0, but it may still work.",1,"fas","fa-question-circle","orange-text","fa-xl","ml-2"]],template:function(i,f){i&1&&(d(0,"div",0)(1,"div",1)(2,"h5",2),E(3,"Homebridge v2 Update"),c(),d(4,"button",3),y(5,"translate"),O("click",function(){return f.$activeModal.close("Dismiss")}),d(6,"span",4),E(7,"\xD7"),c()()(),d(8,"div",5),$(9,wO,2,0,"div",6)(10,TO,6,2,"div"),c(),d(11,"div",7)(12,"div",8)(13,"button",9),y(14,"translate"),O("click",function(){return f.$activeModal.close("Dismiss")}),E(15),y(16,"translate"),c()(),w(17,"div",10),d(18,"div",11)(19,"button",12),O("click",function(){return f.$activeModal.close("update")}),E(20),y(21,"translate"),c()()()()),i&2&&(s(4),U("aria-label",B(5,7,"form.button_close")),s(5),A(f.loading?9:-1),s(),A(f.loading?-1:10),s(3),U("aria-label",B(14,9,"form.button_close")),s(2),V(" ",B(16,11,"form.button_close")," "),s(4),h("disabled",f.loading),s(),V(" ",B(21,13,"plugins.node_update.continue")," "))},dependencies:[Ce],encapsulation:2})}return e})();var EF=Oe(Qi(),1);var PO=["pluginlogoutput"],bF=(()=>{class e{$activeModal=S(he);$api=S(oe);$log=S(As);$modal=S(Re);$toastr=S(de);$translate=S(le);plugin;termTarget=Yf("pluginlogoutput");resizeEvent=new mt;pluginAlias;onWindowResize(){this.resizeEvent.next(void 0)}ngOnInit(){this.getPluginLog()}getPluginLog(){this.$api.get(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`).subscribe({next:t=>{var i;this.pluginAlias=this.plugin.name==="homebridge-config-ui-x"?"Homebridge UI":((i=t[0])==null?void 0:i.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()}})}downloadLogFile(){let t=this.$modal.open(Bs,{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 f=i.body.split(`
|
|
20
|
+
`;t.source.postMessage({action:"inline-style",style:o},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},uu.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,f,n,r){return W(this,null,function*(){yield this.formEnd(),this.formId=t,this.formSchema=i,this.formData=f,this.formSubmitButtonLabel=n,this.formCancelButtonLabel=r})}formEnd(){return W(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}},uu.api.origin)}formValidEvent(t){this.formValid=t}formActionEvent(t){this.iframe.contentWindow.postMessage({action:"stream",event:this.formId,data:{formEvent:t,formData:this.formData}},uu.api.origin)}handleGetCachedAccessories(t){return W(this,null,function*(){let i=yield ne(this.$api.get("/server/cached-accessories"));return this.requestResponse(t,i.filter(f=>f.plugin===this.plugin.name))})}savePluginConfig(t=!1){return W(this,null,function*(){var i;this.saveInProgress=!0;try{let f=yield ne(this.$api.post(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`,this.pluginConfig));if(this.saveInProgress=!1,t){if(this.isFirstSave&&this.$settings.env.recommendChildBridges&&this.$settings.env.serviceMode&&((i=f[0])!=null&&i.platform)){this.$activeModal.close(),this.$plugin.bridgeSettings(this.plugin,!0);return}if(!["homebridge","homebridge-config-ui-x"].includes(this.plugin.name)&&this.$settings.env.serviceMode&&(yield this.getChildBridges(),this.childBridges.length>0)){this.$activeModal.close();let n=this.$modal.open(nu,{size:"lg",backdrop:"static"});n.componentInstance.bridges=this.childBridges.map(r=>({displayName:r.name,username:r.username.replace(/:/g,"")}));return}this.$activeModal.close(),this.$modal.open(At,{size:"lg",backdrop:"static"})}}catch(f){this.saveInProgress=!1,console.error(f),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error"))}})}getChildBridges(){return W(this,null,function*(){try{(yield ne(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=[]}})}onIsValid(t){this.formIsValid=t}ngOnDestroy(){window.removeEventListener("message",this.handleMessage),this.io.end(),this.schemaFormRefreshSubject.complete(),this.schemaFormUpdatedSubject.complete(),this.formUpdatedSubject.complete()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=K({type:e,selectors:[["ng-component"]],viewQuery:function(i,f){i&1&&fn(f.customPluginUiElementTarget,nO,5),i&2&&nn()},inputs:{plugin:"plugin",schema:"schema",pluginConfig:"pluginConfig"},decls:27,vars:20,consts:[["custompluginui",""],[1,"modal-content","hb-plugin-settings-modal"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click","disabled"],["aria-hidden","true"],[1,"modal-body",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-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-center"],[1,"text-right","d-flex","align-items-center","justify-content-end"],["container","modal","placement","top","openDelay","150","triggers","hover",1,"fa","fa-fw","fa-xl",3,"ngClass","ngbTooltip"],["type","button","data-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-right","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,f){if(i&1){let n=H();d(0,"div",1)(1,"div",2)(2,"h5",3),E(3),y(4,"translate"),c(),d(5,"button",4),y(6,"translate"),O("click",function(){return N(n),q(f.$activeModal.dismiss("Dismiss"))}),d(7,"span",5),E(8,"\xD7"),c()()(),d(9,"div",6),$(10,rO,2,0,"div",7),w(11,"iframe",8,0),$(13,oO,2,2,"div",9)(14,sO,5,4,"div",9)(15,lO,2,0,"div",10),c(),d(16,"div",11)(17,"div",12)(18,"button",13),O("click",function(){return N(n),q(f.$activeModal.dismiss("Dismiss"))}),E(19),y(20,"translate"),c()(),w(21,"div",14),d(22,"div",15),$(23,dO,2,4,"i",16),d(24,"button",17),O("click",function(){return N(n),q(f.savePluginConfig(!0))}),$(25,cO,3,3,"span")(26,pO,1,0,"i",18),c()()()()}i&2&&(s(3),Me(" ",B(4,14,"plugins.settings.title_settings"),": ",f.plugin.displayName||f.plugin.name," "),s(2),h("disabled",f.saveInProgress),U("aria-label",B(6,16,"form.button_close")),s(5),A(f.loading?10:-1),s(3),A(f.uiLoaded&&f.pluginConfig.length&&f.schema.singular&&f.showSchemaForm?13:-1),s(),A(f.formId?14:-1),s(),A(f.pluginSpinner?15:-1),s(3),h("disabled",f.saveInProgress),s(),V(" ",B(20,18,"form.button_close")," "),s(4),A(f.saveButtonDisabled?-1:23),s(),h("disabled",f.saveInProgress||f.saveButtonDisabled),s(),A(f.saveInProgress?-1:25),s(),A(f.saveInProgress?26:-1))},dependencies:[Ri,jt,Zu,Ce],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;top:16px;left:16px;right:16px;bottom: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 mF=Oe(pF(),1);var Li=(()=>{class e{el=S(Jf);ngOnInit(){this.el.nativeElement.querySelectorAll("a").forEach(f=>{f.target="_blank",f.rel="noopener noreferrer"});let i=new mF.EmojiConvertor;this.el.nativeElement.innerHTML=i.replace_colons(this.el.nativeElement.innerHTML)}static \u0275fac=function(i){return new(i||e)};static \u0275dir=Lu({type:e,selectors:[["markdown"]]})}return e})();function mO(e,u){e&1&&(d(0,"div")(1,"div",10)(2,"p"),E(3),y(4,"translate"),c(),d(5,"p",11)(6,"span"),E(7),y(8,"translate"),c(),d(9,"a",12),E(10," https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control "),c(),d(11,"span"),E(12),y(13,"translate"),c()()()()),e&2&&(s(3),z(B(4,3,"accessories.message_must_use_insecure_mode")),s(4),V("",B(8,5,"accessories.message_please_see")," "),s(5),V(" ",B(13,7,"accessories.message_for_more_information"),""))}function FO(e,u){if(e&1&&(d(0,"div",5),$(1,mO,14,9,"div"),c()),e&2){let t=C();s(),A(t.$settings.env.enableAccessories?-1:1)}}function CO(e,u){e&1&&(d(0,"p"),E(1),y(2,"translate"),c()),e&2&&(s(),z(B(2,1,"plugins.settings.custom.homebridge-gsh.message_account_link_required")))}function hO(e,u){if(e&1){let t=H();d(0,"div",13)(1,"button",17),O("click",function(){N(t);let f=C(2);return q(f.linkAccount())}),E(2),y(3,"translate"),c()()}e&2&&(s(2),V(" ",B(3,1,"plugins.settings.custom.homebridge-gsh.label_link_account")," "))}function gO(e,u){e&1&&(d(0,"div",15)(1,"p",20)(2,"strong"),E(3),y(4,"translate"),c()()()),e&2&&(s(3),z(B(4,1,"plugins.settings.custom.homebridge-gsh.message_homebridge_restart_required")))}function EO(e,u){if(e&1&&(d(0,"div",14),w(1,"i",18),d(2,"h4",19),E(3),y(4,"titlecase"),y(5,"translate"),c(),$(6,gO,5,3,"div",15),c()),e&2){let t=C(2);s(3),Me(" ",B(4,3,t.linkType)," ",B(5,5,"plugins.settings.custom.homebridge-gsh.label_account_linked")," "),s(3),A(t.justLinked?6:-1)}}function bO(e,u){if(e&1&&w(0,"markdown",21),e&2){let t=C(3);h("data",t.schema.footerDisplay)}}function _O(e,u){if(e&1&&(d(0,"div",15),$(1,bO,1,1,"markdown",21),c()),e&2){let t=C(2);s(),A(t.schema.footerDisplay?1:-1)}}function yO(e,u){if(e&1){let t=H();d(0,"div",16)(1,"app-schema-form",22),$e("dataChange",function(f){N(t);let n=C(2);return Se(n.gshConfig,f)||(n.gshConfig=f),q(f)}),c()()}if(e&2){let t=C(2);s(),h("configSchema",t.schema),Ie("data",t.gshConfig)}}function vO(e,u){if(e&1&&(d(0,"div",5)(1,"p"),E(2),y(3,"translate"),c(),$(4,CO,3,3,"p")(5,hO,4,3,"div",13)(6,EO,7,7,"div",14)(7,_O,2,1,"div",15)(8,yO,2,2,"div",16),c()),e&2){let t=C();s(2),z(B(3,6,"plugins.settings.custom.homebridge-gsh.message_about")),s(2),A(t.gshConfig.token?-1:4),s(),A(t.gshConfig.token?-1:5),s(),A(t.gshConfig.token?6:-1),s(),A(t.gshConfig&&t.gshConfig.token?7:-1),s(),A(t.gshConfig&&t.gshConfig.token?8:-1)}}function BO(e,u){if(e&1){let t=H();d(0,"button",23),O("click",function(){N(t);let f=C();return q(f.unlinkAccount())}),E(1),y(2,"translate"),c()}e&2&&(s(),V(" ",B(2,1,"plugins.settings.custom.homebridge-gsh.label_unlink_account")," "))}function xO(e,u){if(e&1){let t=H();d(0,"button",24),O("click",function(){N(t);let f=C();return q(f.saveAndClose())}),E(1),y(2,"translate"),c()}e&2&&(s(),V(" ",B(2,1,"form.button_save")," "))}var CF=(()=>{class e{$activeModal=S(he);$api=S(oe);$jwtHelper=S(ms);$settings=S(ke);$toastr=S(de);$translate=S(le);plugin;schema;pluginConfig;justLinked=!1;gshConfig;linkType;linkDomain="https://homebridge-gsh.iot.oz.nu";linkUrl=`${this.linkDomain}/link-account`;popup;originCheckInterval;constructor(){window.addEventListener("message",this.windowMessageListener,!1)}ngOnInit(){this.pluginConfig.length||this.pluginConfig.push({name:"Google Smart Home",platform:this.schema.pluginAlias}),this.gshConfig=this.pluginConfig[0],this.parseToken()}windowMessageListener=t=>{t.origin!==this.linkDomain&&(console.error("Refusing to process message from",t.origin),console.error(t));try{let i=JSON.parse(t.data);i.token&&this.processToken(i.token)}catch(i){console.error(i)}};linkAccount(){let f=window.top.outerHeight/2+window.top.screenY-350,n=window.top.outerWidth/2+window.top.screenX-450/2;this.popup=window.open(this.linkUrl,"oznu-google-smart-home-auth",`toolbar=no, location=no, directories=no, status=no, menubar=no scrollbars=no, resizable=no, copyhistory=no, width=450, height=700, top=${f}, left=${n}`),this.originCheckInterval=setInterval(()=>{this.popup.postMessage("origin-check",this.linkDomain)},2e3)}unlinkAccount(){this.gshConfig={name:"Google Smart Home",platform:this.schema.pluginAlias},this.pluginConfig.splice(0,this.pluginConfig.length),this.saveConfig()}processToken(t){clearInterval(this.originCheckInterval),this.popup&&this.popup.close(),this.gshConfig.token=t,this.gshConfig.notice="Keep your token a secret!",this.pluginConfig.length||this.pluginConfig.push(this.gshConfig),this.parseToken(),this.saveConfig()}parseToken(){if(this.gshConfig.token)try{let t=this.$jwtHelper.decodeToken(this.gshConfig.token);this.linkType=t.id.split("|")[0].split("-")[0]}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("plugins.settings.custom.homebridge-gsh.message_invalid_token"),this.$translate.instant("toast.title_error")),delete this.gshConfig.token}}saveConfig(){return W(this,null,function*(){try{yield ne(this.$api.post(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`,this.pluginConfig)),this.justLinked=!0,this.$toastr.success(this.$translate.instant("plugins.settings.restart_required"),this.$translate.instant("plugins.settings.plugin_config_saved"))}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error"))}})}saveAndClose(){return W(this,null,function*(){this.gshConfig.platform=this.schema.pluginAlias,this.pluginConfig[0]=this.gshConfig,yield this.saveConfig(),this.$activeModal.close()})}close(){this.$activeModal.close()}ngOnDestroy(){clearInterval(this.originCheckInterval),window.removeEventListener("message",this.windowMessageListener),this.popup&&this.popup.close()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=K({type:e,selectors:[["app-homebridge-google-smarthome"]],inputs:{plugin:"plugin",schema:"schema",pluginConfig:"pluginConfig"},decls:16,vars:10,consts:[[1,"modal-content","hb-plugin-settings-modal"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-elegant","mr-auto"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-dismiss","modal",1,"btn","btn-primary"],["role","alert",1,"alert","alert-warning"],[1,"mb-0"],["target","_blank","rel","noopener noreferrer","href","https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control"],[1,"text-center"],[1,"text-center","mt-1"],[1,"mt-3"],[1,"card","p-2","pt-3","mt-4"],[1,"btn","btn-primary","btn-lg",3,"click"],[1,"fas","fa-fw","fa-check-circle","primary-text",2,"font-size","50px"],[1,"mt-2"],[1,"primary-text"],[1,"plugin-md",3,"data"],[3,"dataChange","configSchema","data"],["type","button","data-dismiss","modal",1,"btn","btn-elegant","mr-auto",3,"click"],["type","button","data-dismiss","modal",1,"btn","btn-primary",3,"click"]],template:function(i,f){i&1&&(d(0,"div",0)(1,"div",1)(2,"h5",2),E(3,"Homebridge Google Smart Home"),c(),d(4,"button",3),y(5,"translate"),O("click",function(){return f.$activeModal.dismiss("Dismiss")}),d(6,"span",4),E(7,"\xD7"),c()()(),$(8,FO,2,1,"div",5)(9,vO,9,8,"div",5),d(10,"div",6),$(11,BO,3,3,"button",7),d(12,"button",8),O("click",function(){return f.close()}),E(13),y(14,"translate"),c(),$(15,xO,3,3,"button",9),c()()),i&2&&(s(4),U("aria-label",B(5,6,"form.button_close")),s(4),A(f.$settings.env.enableAccessories?-1:8),s(),A(f.$settings.env.enableAccessories?9:-1),s(2),A(f.gshConfig.token?11:-1),s(2),V(" ",B(14,8,"form.button_close")," "),s(2),A(f.gshConfig.token?15:-1))},dependencies:[Xu,Qu,Li,Ri,rn,Ce],encapsulation:2})}return e})();var hF=(()=>{class e{$api=S(oe);$modal=S(Re);plugins={"homebridge-gsh":CF};openSettings(t,i){return W(this,null,function*(){let f=yield this.loadPluginConfig(t.name),n=this.$modal.open(this.plugins[t.name],{size:"lg",backdrop:"static"});return n.componentInstance.plugin=t,n.componentInstance.schema=i,n.componentInstance.pluginConfig=f,n.result.catch(()=>{})})}openCustomSettingsUi(t,i){return W(this,null,function*(){let f=yield this.loadPluginConfig(t.name),n=this.$modal.open(cF,{size:"lg",backdrop:"static"});return n.componentInstance.plugin=t,n.componentInstance.schema=i,n.componentInstance.pluginConfig=f,n.result.catch(()=>{})})}loadPluginConfig(t){return W(this,null,function*(){return ne(this.$api.get(`/config-editor/plugin/${encodeURIComponent(t)}`))})}static \u0275fac=function(i){return new(i||e)};static \u0275prov=Bt({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function wO(e,u){e&1&&(d(0,"div",6),w(1,"i",13),c())}function AO(e,u){e&1&&(d(0,"div"),w(1,"i",16),d(2,"p"),E(3,"All your plugins are marked as compatible with the new version of Homebridge."),c(),d(4,"p"),E(5,"You are all set to continue below."),c()())}function IO(e,u){e&1&&(d(0,"div"),w(1,"i",17),d(2,"p"),E(3,"Some of your plugins are not explicitly marked as compatible with the new version of Homebridge."),c(),d(4,"p"),E(5," This does "),d(6,"span",18),E(7,"not"),c(),E(8," necessarily mean that they won't work. We just can't guarantee that they will. "),c(),d(9,"p"),E(10," For more information about this update, please see the "),d(11,"a",19),E(12,"wiki page"),c(),E(13,". "),c(),d(14,"p"),E(15,"To ignore this warning and continue with the update, click continue below."),c()())}function SO(e,u){e&1&&(d(0,"span"),w(1,"i",21),c())}function $O(e,u){e&1&&(d(0,"span"),w(1,"i",22),c())}function kO(e,u){if(e&1&&(d(0,"li",15)(1,"span",20),E(2),c(),$(3,SO,2,0,"span")(4,$O,2,0,"span"),c()),e&2){let t=u.$implicit;s(2),z(t.name),s(),A(t.hb2Ready==="supported"?3:-1),s(),A(t.hb2Ready==="unknown"?4:-1)}}function TO(e,u){if(e&1&&(d(0,"div"),$(1,AO,6,0,"div")(2,IO,16,0,"div"),d(3,"ul",14),ut(4,kO,5,3,"li",15,tt),c()()),e&2){let t=C();s(),A(t.allPluginsSupported?1:-1),s(),A(t.allPluginsSupported?-1:2),s(2),it(t.installedPlugins)}}var gF=(()=>{class e{$activeModal=S(he);$api=S(oe);$settings=S(ke);$toastr=S(de);$translate=S(le);loading=!0;installedPlugins=[];allPluginsSupported=!0;ngOnInit(){this.loadInstalledPlugins()}loadInstalledPlugins(){return W(this,null,function*(){this.installedPlugins=[],this.loading=!0;let t=this.$settings.env.homebridgeVersion.split(".")[0];try{let i=yield ne(this.$api.get("/plugins"));this.installedPlugins=i.filter(f=>f.name!=="homebridge-config-ui-x").map(f=>{var o,D;let n=((D=(o=f.engines)==null?void 0:o.homebridge)==null?void 0:D.split("||").map(a=>a.trim()))||[],r=t==="2"?"hide":n.some(a=>a.startsWith("^2")||a.startsWith(">=2"))?"supported":"unknown";return r==="unknown"&&(this.allPluginsSupported=!1),ve(Q({},f),{hb2Ready:r})}),this.loading=!1}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("plugins.toast_failed_to_load_plugins"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=K({type:e,selectors:[["ng-component"]],decls:22,vars:15,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body","w-100","text-center"],[1,"w-100","text-center","primary-text"],[1,"modal-footer","justify-content-between"],[1,"text-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-right"],["type","button","data-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],[1,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[1,"list-group","list-group-box","mt-4"],[1,"list-group-item","d-flex","flex-row","flex-wrap","justify-content-between"],[1,"fas","fa-fw","fa-check-circle","primary-text","mb-4",2,"font-size","75px"],[1,"fas","fa-fw","fa-info-circle","primary-text","mb-4",2,"font-size","75px"],[1,"font-weight-bold"],["href","https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0","target","_blank"],[1,"text-monospace"],["aria-label","The developer has specifically marked this plugin as compatible with Homebridge v2.0",1,"fas","fa-check-circle","green-text","fa-xl","ml-2"],["aria-label","The developer has not specifically marked this plugin as compatible with Homebridge v2.0, but it may still work.",1,"fas","fa-question-circle","orange-text","fa-xl","ml-2"]],template:function(i,f){i&1&&(d(0,"div",0)(1,"div",1)(2,"h5",2),E(3,"Homebridge v2 Update"),c(),d(4,"button",3),y(5,"translate"),O("click",function(){return f.$activeModal.close("Dismiss")}),d(6,"span",4),E(7,"\xD7"),c()()(),d(8,"div",5),$(9,wO,2,0,"div",6)(10,TO,6,2,"div"),c(),d(11,"div",7)(12,"div",8)(13,"button",9),y(14,"translate"),O("click",function(){return f.$activeModal.close("Dismiss")}),E(15),y(16,"translate"),c()(),w(17,"div",10),d(18,"div",11)(19,"button",12),O("click",function(){return f.$activeModal.close("update")}),E(20),y(21,"translate"),c()()()()),i&2&&(s(4),U("aria-label",B(5,7,"form.button_close")),s(5),A(f.loading?9:-1),s(),A(f.loading?-1:10),s(3),U("aria-label",B(14,9,"form.button_close")),s(2),V(" ",B(16,11,"form.button_close")," "),s(4),h("disabled",f.loading),s(),V(" ",B(21,13,"plugins.node_update.continue")," "))},dependencies:[Ce],encapsulation:2})}return e})();var EF=Oe(Qi(),1);var PO=["pluginlogoutput"],bF=(()=>{class e{$activeModal=S(he);$api=S(oe);$log=S(As);$modal=S(Re);$toastr=S(de);$translate=S(le);plugin;termTarget=Yf("pluginlogoutput");resizeEvent=new mt;pluginAlias;onWindowResize(){this.resizeEvent.next(void 0)}ngOnInit(){this.getPluginLog()}getPluginLog(){this.$api.get(`/config-editor/plugin/${encodeURIComponent(this.plugin.name)}`).subscribe({next:t=>{var i;this.pluginAlias=this.plugin.name==="homebridge-config-ui-x"?"Homebridge UI":((i=t[0])==null?void 0:i.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()}})}downloadLogFile(){let t=this.$modal.open(Bs,{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 f=i.body.split(`
|
|
21
21
|
`),n="",r=!1;f.forEach(o=>{if(o){if(r)if(o.match(/36m\[.*?\]/))r=!1;else{n+=`${o.replace(/\x1B\[(\d{1,3}(;\d{1,2})?)?[mGK]/g,"")}\r
|
|
22
22
|
`;return}o.includes(`36m[${this.pluginAlias}]`)&&(n+=`${o.replace(/\x1B\[(\d{1,3}(;\d{1,2})?)?[mGK]/g,"")}\r
|
|
23
23
|
`,r=!0)}}),(0,EF.saveAs)(new Blob([n],{type:"text/plain;charset=utf-8"}),`${this.plugin.name}.log.txt`)},error:i=>W(this,null,function*(){let f;try{f=JSON.parse(yield i.error.text()).message}catch(n){console.error(n)}this.$toastr.error(f||this.$translate.instant("logs.download.error"),this.$translate.instant("toast.title_error"))})})}).catch(()=>{})}ngOnDestroy(){this.$log.destroyTerminal()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=K({type:e,selectors:[["ng-component"]],viewQuery:function(i,f){i&1&&fn(f.termTarget,PO,5),i&2&&nn()},hostBindings:function(i,f){i&1&&O("resize",function(r){return f.onWindowResize(r)},!1,rs)},inputs:{plugin:"plugin"},decls:22,vars:13,consts:[["pluginlogoutput",""],[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"click"],["aria-hidden","true"],[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-left"],["type","button","data-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-right"],[1,"btn","btn-primary",3,"click"]],template:function(i,f){if(i&1){let n=H();d(0,"div",1)(1,"div",2)(2,"h5",3),E(3),c(),d(4,"button",4),y(5,"translate"),O("click",function(){return N(n),q(f.$activeModal.dismiss("Dismiss"))}),d(6,"span",5),E(7,"\xD7"),c()()(),d(8,"div",6),w(9,"div",7,0),c(),d(11,"div",8)(12,"div",9)(13,"button",10),y(14,"translate"),O("click",function(){return N(n),q(f.$activeModal.dismiss("Dismiss"))}),E(15),y(16,"translate"),c()(),w(17,"div",11),d(18,"div",12)(19,"button",13),O("click",function(){return N(n),q(f.downloadLogFile())}),E(20),y(21,"translate"),c()()()()}i&2&&(s(3),V("Logs: ",f.plugin.displayName||f.plugin.name,""),s(),U("aria-label",B(5,5,"form.button_close")),s(9),U("aria-label",B(14,7,"form.button_close")),s(2),V(" ",B(16,9,"form.button_close")," "),s(5),z(B(21,11,"form.button_download")))},dependencies:[Ce],encapsulation:2})}return e})();var yF=Oe(Qi(),1);var vF=Oe(ys(),1),BF=Oe(vs(),1);var OO=(e,u)=>({pluginName:e,targetVersion:u}),_F=()=>["homebridge","homebridge-config-ui-x"];function MO(e,u){e&1&&(d(0,"h3",9),E(1),y(2,"translate"),c()),e&2&&(s(),z(B(2,1,"platform.version.service_restart_required")))}function jO(e,u){e&1&&(d(0,"p",10),E(1),y(2,"translate"),c()),e&2&&(s(),z(B(2,1,"restart.homebridge")))}function NO(e,u){e&1&&(d(0,"p",10),E(1),y(2,"translate"),c()),e&2&&(s(),z(B(2,1,"restart.child_bridges")))}function qO(e,u){if(e&1&&(d(0,"div"),$(1,jO,3,3,"p",10)(2,NO,3,3,"p",10),c()),e&2){let t=C(3);s(),A(qe(2,_F).includes(t.pluginName)||t.childBridges.length===0?1:-1),s(),A(!qe(3,_F).includes(t.pluginName)&&t.childBridges.length>0?2:-1)}}function VO(e,u){if(e&1&&(d(0,"div",11),w(1,"markdown",12),c()),e&2){let t=C(3);s(),h("data",t.changeLog)}}function RO(e,u){if(e&1&&(d(0,"div"),$(1,MO,3,3,"h3",9),d(2,"p",10),E(3),y(4,"translate"),c(),$(5,qO,3,4,"div")(6,VO,2,1,"div",11),c()),e&2){let t=C(2);s(),A(t.isDisabled?-1:1),s(2),V(" ",ot(4,4,"plugins.manage.thanks_for_updating",Hu(7,OO,t.pluginName,t.targetVersion))," "),s(2),A(t.isDisabled?-1:5),s(),A(t.changeLog?6:-1)}}function LO(e,u){if(e&1&&(d(0,"div",6),$(1,RO,7,10,"div"),c()),e&2){let t=C();s(),A(t.justUpdatedPlugin?1:-1)}}function zO(e,u){if(e&1&&(d(0,"div")(1,"p"),E(2),y(3,"translate"),c(),d(4,"pre"),E(5),c()()),e&2){let t=C(2);s(2),z(B(3,3,"plugins.manage.manual_update_command")),s(3),Me(` hb-service stop
|