homebridge-config-ui-x 5.0.0-beta.62 → 5.0.0-beta.63
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/package.json +1 -1
- package/public/{chunk-JPW5L5TP.js → chunk-2FCFN6C5.js} +1 -1
- package/public/{chunk-3QK5UUDD.js → chunk-2TEI7EAA.js} +1 -1
- package/public/chunk-32FSMCIF.js +1 -0
- package/public/chunk-3334QWLL.js +1 -0
- package/public/{chunk-GZJQ6JWD.js → chunk-3CVRTPW6.js} +1 -1
- package/public/{chunk-BSRU73R7.js → chunk-3FE6OZWZ.js} +1 -1
- package/public/{chunk-IYGRQ74X.js → chunk-3N4YS5PJ.js} +1 -1
- package/public/{chunk-QKMELSC5.js → chunk-4QYHUMMF.js} +1 -1
- package/public/{chunk-HUDUFJKA.js → chunk-52JKNMP3.js} +1 -1
- package/public/{chunk-E4BETMNF.js → chunk-5F3DALNO.js} +1 -1
- package/public/chunk-5UECJRTC.js +1 -0
- package/public/chunk-6BXX7UAC.js +1 -0
- package/public/{chunk-6FWHLYBG.js → chunk-7LC66BZE.js} +1 -1
- package/public/{chunk-5NZGHO7L.js → chunk-7SGGL4QF.js} +1 -1
- package/public/{chunk-DIFHTODX.js → chunk-A2RJH2UI.js} +1 -1
- package/public/chunk-B6GRRHVL.js +1 -0
- package/public/{chunk-LHNRSYGN.js → chunk-BYNB7MSO.js} +1 -1
- package/public/{chunk-4VGUGZMV.js → chunk-BYWEVMTT.js} +1 -1
- package/public/{chunk-5DMLGMBW.js → chunk-CETEXGSV.js} +1 -1
- package/public/{chunk-7MM5YU4N.js → chunk-CNXJFYGV.js} +1 -1
- package/public/chunk-D7TRCST7.js +1 -0
- package/public/chunk-DPP54NJV.js +1 -0
- package/public/{chunk-A7Z6YHW7.js → chunk-E2IVJS5Z.js} +1 -1
- package/public/{chunk-ESFFXEOC.js → chunk-E7AAMDQR.js} +1 -1
- package/public/{chunk-ZAM7TDUI.js → chunk-ENPRA6UC.js} +1 -1
- package/public/chunk-EOPT6TFP.js +1 -0
- package/public/{chunk-QGSYKEI7.js → chunk-EVBUUGTN.js} +1 -1
- package/public/{chunk-LXFHVH4F.js → chunk-EYDTMAI7.js} +1 -1
- package/public/{chunk-NL72Q4WH.js → chunk-F2GROJGF.js} +1 -1
- package/public/{chunk-65MXJ5UD.js → chunk-F5S7ELAU.js} +1 -1
- package/public/{chunk-2DOHDIPX.js → chunk-GGUY4KAL.js} +1 -1
- package/public/{chunk-7NKNF62C.js → chunk-GJLMCYTS.js} +1 -1
- package/public/{chunk-3BYO2BKQ.js → chunk-GMRXG2EA.js} +1 -1
- package/public/chunk-H7DWMIIJ.js +1 -0
- package/public/{chunk-4ROF2F6L.js → chunk-HNMSRSIC.js} +1 -1
- package/public/{chunk-QREBJA53.js → chunk-I7ACYC4O.js} +1 -1
- package/public/chunk-JQEC7GPV.js +1 -0
- package/public/{chunk-RMUGQZNR.js → chunk-L4S52NB3.js} +1 -1
- package/public/{chunk-UIXER4XT.js → chunk-M5ZPJBE6.js} +1 -1
- package/public/{chunk-HCNL2IXJ.js → chunk-MLJ5LG22.js} +1 -1
- package/public/chunk-NHDDPCIU.js +1 -0
- package/public/{chunk-GWSPD7C7.js → chunk-OLHRESCF.js} +1 -1
- package/public/{chunk-L7E3SMFV.js → chunk-PRAGJ7KY.js} +1 -1
- package/public/{chunk-ZRCHGCUM.js → chunk-PUML3TSV.js} +1 -1
- package/public/{chunk-ATW76YSS.js → chunk-QG5KO6DT.js} +1 -1
- package/public/chunk-QX4VKBWI.js +1 -0
- package/public/{chunk-SKU573MT.js → chunk-RVY64DJT.js} +1 -1
- package/public/{chunk-FUZVZJ3L.js → chunk-SFY6RJZE.js} +1 -1
- package/public/chunk-SLWWUQE7.js +1 -0
- package/public/{chunk-IYO4QA36.js → chunk-SWFWTC7T.js} +1 -1
- package/public/{chunk-RJG6OG4S.js → chunk-TJB4D5U3.js} +1 -1
- package/public/chunk-UI5OJ6VK.js +1 -0
- package/public/{chunk-ND3LAXKV.js → chunk-VBK66T5X.js} +1 -1
- package/public/{chunk-6D2ADQDJ.js → chunk-VXKOIR6Y.js} +1 -1
- package/public/chunk-W2LRHORE.js +1 -0
- package/public/{chunk-YN5L2RPU.js → chunk-W7CGVJW2.js} +1 -1
- package/public/{chunk-7NGHFZ25.js → chunk-WLC3UULK.js} +1 -1
- package/public/{chunk-QOVS4JL2.js → chunk-X3HBQMAM.js} +1 -1
- package/public/{chunk-N3KQISSE.js → chunk-XV65G5VP.js} +1 -1
- package/public/{chunk-UUSHKTVD.js → chunk-ZS62NHMN.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-Y4KA67ZE.js → main-I2EG5DRW.js} +1 -1
- package/public/chunk-2GEHBHV7.js +0 -1
- package/public/chunk-4ZSSU23I.js +0 -1
- package/public/chunk-6S3RDNUO.js +0 -1
- package/public/chunk-72VDFGO7.js +0 -1
- package/public/chunk-AA42EIVS.js +0 -1
- package/public/chunk-DPGUG6HS.js +0 -1
- package/public/chunk-EAPNOWW2.js +0 -1
- package/public/chunk-FVRT2MUG.js +0 -1
- package/public/chunk-HXETPUGR.js +0 -1
- package/public/chunk-PDEVRKXM.js +0 -1
- package/public/chunk-PE752VCZ.js +0 -1
- package/public/chunk-QP5IJFMR.js +0 -1
- package/public/chunk-WX6GQCUJ.js +0 -1
- package/public/chunk-XGVMAKSJ.js +0 -1
- package/public/chunk-ZKBN6A26.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-SFY6RJZE.js";import"./chunk-PRAGJ7KY.js";import"./chunk-ZIXTTJ4W.js";import"./chunk-44K5XVZH.js";import"./chunk-W2INV3O5.js";import"./chunk-4UVD743J.js";import"./chunk-7SGGL4QF.js";import"./chunk-DBUCH6BG.js";import"./chunk-RVY64DJT.js";import"./chunk-X3HBQMAM.js";import"./chunk-E2IVJS5Z.js";import"./chunk-GDFC3M3E.js";import"./chunk-FETTFNJ2.js";import"./chunk-6ZN4TBLM.js";export{a as SetupWizardComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as i}from"./chunk-DBUCH6BG.js";import"./chunk-GDFC3M3E.js";import{ha as t,id as l,ub as e}from"./chunk-6ZN4TBLM.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-
|
|
1
|
+
import{g as i}from"./chunk-DBUCH6BG.js";import"./chunk-GDFC3M3E.js";import{ha as t,id as l,ub as e}from"./chunk-6ZN4TBLM.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-VXKOIR6Y.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-WLC3UULK.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-F5S7ELAU.js").then(o=>o.TerminalModule)}],n=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(d),i]})}return o})();var s=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l,n]})}return o})();export{s as PlatformToolsModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as N,B as x,C as D,D as W,E as I,F as j,G as O,H as V,I as q,J as B,K as G,L as R,M as U,N as z,O as E,P as J,Q as K,R as P,S as Q,T as X,U as Y,e as f,f as a,g as C,h as s,i as c,j as d,k as u,l,m as g,n as M,o as y,p as h,q as v,r as S,s as b,t as w,u as k,v as A,w as F,x as L,y as T,z as H}from"./chunk-
|
|
1
|
+
import{A as N,B as x,C as D,D as W,E as I,F as j,G as O,H as V,I as q,J as B,K as G,L as R,M as U,N as z,O as E,P as J,Q as K,R as P,S as Q,T as X,U as Y,e as f,f as a,g as C,h as s,i as c,j as d,k as u,l,m as g,n as M,o as y,p as h,q as v,r as S,s as b,t as w,u as k,v as A,w as F,x as L,y as T,z as H}from"./chunk-6BXX7UAC.js";import{b as Z}from"./chunk-CUKPSGYS.js";import{q as i}from"./chunk-W2INV3O5.js";import{y as e,z as t}from"./chunk-4UVD743J.js";import{c as p}from"./chunk-FETTFNJ2.js";import{ha as m,id as n,ub as r}from"./chunk-6ZN4TBLM.js";var cm=(()=>{class o{static \u0275fac=function($){return new($||o)};static \u0275mod=r({type:o});static \u0275inj=m({providers:[a],imports:[n,e,t,p.forChild(),C,i,Z,Y,f,G,B,U,W,h,v,z,L,F,T,N,H,S,x,D,d,X,Q,P,K,y,M,R,g,q,V,j,I,A,O,J,E,k,c,s,b,w,l,u]})}return o})();export{cm as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as eu,b as Qg}from"./chunk-QREBJA53.js";import{a as S1}from"./chunk-KPW2P5T4.js";import{a as Xi,b as Yi}from"./chunk-CUKPSGYS.js";import{a as P1}from"./chunk-I6OD3CV4.js";import{a as M1}from"./chunk-6FWHLYBG.js";import{a as O1}from"./chunk-AFY7IWPI.js";import{a as tf}from"./chunk-ZIXTTJ4W.js";import{a as k1,b as $1}from"./chunk-44K5XVZH.js";import{a as Ia}from"./chunk-XSS6G7LC.js";import{a as T1}from"./chunk-TEFE7EK6.js";import{a as Fr,b as Cr,c as hr,d as gr,e as Er,f as br,g as Gi,m as ye,n as ut,o as Ki}from"./chunk-W2INV3O5.js";import{a as _1,b as zi,c as Hi,e as _t,f as y1,h as v1,i as B1,k as x1,l as Ku,m as w1,o as Ui,r as Wi,s as Ei,t as bi,x as I1,y as Qt,z as wa}from"./chunk-4UVD743J.js";import{a as Ji}from"./chunk-5NZGHO7L.js";import{d as lu}from"./chunk-DBUCH6BG.js";import{a as A1}from"./chunk-SKU573MT.js";import{b as qe}from"./chunk-QOVS4JL2.js";import{h as be,j as Ju,k as Ce}from"./chunk-A7Z6YHW7.js";import{e as b1}from"./chunk-GDFC3M3E.js";import{a as Ee,b as ve}from"./chunk-FETTFNJ2.js";import{$c as Rt,Ac as vu,Bc as Li,Ca as l1,Cc as v,D as r1,Da as dr,Dc as B,Ec as Xe,Fa as Ct,Ga as z,Ha as Lu,Ia as cr,Ic as g1,Jb as K,Kb as E,Lb as Yt,M as lr,Mb as Hu,Nb as Z,Ob as p1,Pb as w,Rb as it,Sb as nt,Tb as ft,Ub as c,Vb as p,Wb as I,Xb as m1,Yb as F1,Z as ya,_b as U,a as X,aa as ef,ad as gi,b as we,bc as M,bd as ht,cb as de,cc as h,e as F,ed as E1,fa as o1,fb as d1,g as Ue,ga as Tt,gb as l,gc as va,h as G,ha as Vi,hc as Ba,ic as xa,id as mr,ja as a1,jc as Uu,k as u1,kc as Wu,la as D1,lb as pr,ma as x,mb as bu,mc as _,n as $t,nc as H,o as _a,ob as hi,oc as q,pb as zu,pc as yu,q as i1,qc as C1,ta as Ru,tb as Y,tc as $e,ua as N,ub as Ri,uc as Te,v as n1,va as j,vb as _u,vc as Pe,w as De,wb as c1,wc as h1,x as f1,xa as s1,xc as Je,yc as Zt,zb as k,zc as Gu}from"./chunk-6ZN4TBLM.js";var ff=F(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.regexpCode=ge.getEsmExportName=ge.getProperty=ge.safeStringify=ge.stringify=ge.strConcat=ge.addCodeArg=ge.str=ge._=ge.nil=ge._Code=ge.Name=ge.IDENTIFIER=ge._CodeOrName=void 0;var uf=class{};ge._CodeOrName=uf;ge.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var _i=class extends uf{constructor(u){if(super(),!ge.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}}};ge.Name=_i;var Lt=class extends uf{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 _i&&(t[i.str]=(t[i.str]||0)+1),t),{})}};ge._Code=Lt;ge.nil=new Lt("");function N1(e,...u){let t=[e[0]],i=0;for(;i<u.length;)Aa(t,u[i]),t.push(e[++i]);return new Lt(t)}ge._=N1;var Sa=new Lt("+");function j1(e,...u){let t=[nf(e[0])],i=0;for(;i<u.length;)t.push(Sa),Aa(t,u[i]),t.push(Sa,nf(e[++i]));return t4(t),new Lt(t)}ge.str=j1;function Aa(e,u){u instanceof Lt?e.push(...u._items):u instanceof _i?e.push(u):e.push(n4(u))}ge.addCodeArg=Aa;function t4(e){let u=1;for(;u<e.length-1;){if(e[u]===Sa){let t=u4(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function u4(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof _i||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 _i))return`"${e}${u.slice(1)}`}function i4(e,u){return u.emptyStr()?e:e.emptyStr()?u:j1`${e}${u}`}ge.strConcat=i4;function n4(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:nf(Array.isArray(e)?e.join(","):e)}function f4(e){return new Lt(nf(e))}ge.stringify=f4;function nf(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ge.safeStringify=nf;function r4(e){return typeof e=="string"&&ge.IDENTIFIER.test(e)?new Lt(`.${e}`):N1`[${e}]`}ge.getProperty=r4;function o4(e){if(typeof e=="string"&&ge.IDENTIFIER.test(e))return new Lt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ge.getEsmExportName=o4;function a4(e){return new Lt(e.toString())}ge.regexpCode=a4});var Ta=F(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.ValueScope=vt.ValueScopeName=vt.Scope=vt.varKinds=vt.UsedValueState=void 0;var yt=ff(),ka=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},_r=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(_r||(vt.UsedValueState=_r={}));vt.varKinds={const:new yt.Name("const"),let:new yt.Name("let"),var:new yt.Name("var")};var yr=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof yt.Name?u:this.name(u)}name(u){return new yt.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}}};vt.Scope=yr;var vr=class extends yt.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,yt._)`.${new yt.Name(t)}[${i}]`}};vt.ValueScopeName=vr;var D4=(0,yt._)`\n`,$a=class extends yr{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=we(X({},u),{_n:u.lines?D4:yt.nil})}get(){return this._scope}name(u){return new vr(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 n=this.toName(u),{prefix:f}=n,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[f];if(o){let s=o.get(r);if(s)return s}else o=this._values[f]=new Map;o.set(r,n);let a=this._scope[f]||(this._scope[f]=[]),D=a.length;return a[D]=t.ref,n.setValue(t,{property:f,itemIndex:D}),n}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,yt._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,i)}_reduceValues(u,t,i={},n){let f=yt.nil;for(let r in u){let o=u[r];if(!o)continue;let a=i[r]=i[r]||new Map;o.forEach(D=>{if(a.has(D))return;a.set(D,_r.Started);let s=t(D);if(s){let d=this.opts.es5?vt.varKinds.var:vt.varKinds.const;f=(0,yt._)`${f}${d} ${D} = ${s};${this.opts._n}`}else if(s=n==null?void 0:n(D))f=(0,yt._)`${f}${s}${this.opts._n}`;else throw new ka(D);a.set(D,_r.Completed)})}return f}};vt.ValueScope=$a});var fe=F(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.or=ae.and=ae.not=ae.CodeGen=ae.operators=ae.varKinds=ae.ValueScopeName=ae.ValueScope=ae.Scope=ae.Name=ae.regexpCode=ae.stringify=ae.getProperty=ae.nil=ae.strConcat=ae.str=ae._=void 0;var me=ff(),tu=Ta(),Xu=ff();Object.defineProperty(ae,"_",{enumerable:!0,get:function(){return Xu._}});Object.defineProperty(ae,"str",{enumerable:!0,get:function(){return Xu.str}});Object.defineProperty(ae,"strConcat",{enumerable:!0,get:function(){return Xu.strConcat}});Object.defineProperty(ae,"nil",{enumerable:!0,get:function(){return Xu.nil}});Object.defineProperty(ae,"getProperty",{enumerable:!0,get:function(){return Xu.getProperty}});Object.defineProperty(ae,"stringify",{enumerable:!0,get:function(){return Xu.stringify}});Object.defineProperty(ae,"regexpCode",{enumerable:!0,get:function(){return Xu.regexpCode}});Object.defineProperty(ae,"Name",{enumerable:!0,get:function(){return Xu.Name}});var Sr=Ta();Object.defineProperty(ae,"Scope",{enumerable:!0,get:function(){return Sr.Scope}});Object.defineProperty(ae,"ValueScope",{enumerable:!0,get:function(){return Sr.ValueScope}});Object.defineProperty(ae,"ValueScopeName",{enumerable:!0,get:function(){return Sr.ValueScopeName}});Object.defineProperty(ae,"varKinds",{enumerable:!0,get:function(){return Sr.varKinds}});ae.operators={GT:new me._Code(">"),GTE:new me._Code(">="),LT:new me._Code("<"),LTE:new me._Code("<="),EQ:new me._Code("==="),NEQ:new me._Code("!=="),NOT:new me._Code("!"),OR:new me._Code("||"),AND:new me._Code("&&"),ADD:new me._Code("+")};var Bu=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},Pa=class extends Bu{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?tu.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=Qi(this.rhs,u,t)),this}get names(){return this.rhs instanceof me._CodeOrName?this.rhs.names:{}}},xr=class extends Bu{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 me.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=Qi(this.rhs,u,t),this}get names(){let u=this.lhs instanceof me.Name?{}:X({},this.lhs.names);return Ir(u,this.rhs)}},Oa=class extends xr{constructor(u,t,i,n){super(u,i,n),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},Ma=class extends Bu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},Na=class extends Bu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},ja=class extends Bu{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},qa=class extends Bu{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=Qi(this.code,u,t),this}get names(){return this.code instanceof me._CodeOrName?this.code.names:{}}},rf=class extends Bu{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,n=i.length;for(;n--;){let f=i[n];f.optimizeNames(u,t)||(s4(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>yi(u,t.names),{})}},xu=class extends rf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},Va=class extends rf{},Ra=(()=>{class e extends xu{}return e.kind="else",e})(),Br=(()=>{class e extends xu{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 n=i.optimizeNodes();i=this.else=Array.isArray(n)?new Ra(n):n}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(z1(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=Qi(this.condition,t,i),this}get names(){let t=super.names;return Ir(t,this.condition),this.else&&yi(t,this.else.names),t}}return e.kind="if",e})(),Ar=(()=>{class e extends xu{}return e.kind="for",e})(),La=class extends Ar{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=Qi(this.iteration,u,t),this}get names(){return yi(super.names,this.iteration.names)}},za=class extends Ar{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?tu.varKinds.var:this.varKind,{name:i,from:n,to:f}=this;return`for(${t} ${i}=${n}; ${i}<${f}; ${i}++)`+super.render(u)}get names(){let u=Ir(super.names,this.from);return Ir(u,this.to)}},wr=class extends Ar{constructor(u,t,i,n){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=n}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=Qi(this.iterable,u,t),this}get names(){return yi(super.names,this.iterable.names)}},q1=(()=>{class e extends xu{constructor(t,i,n){super(),this.name=t,this.args=i,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),V1=(()=>{class e extends rf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Ha=class extends xu{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,n;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(n=this.finally)===null||n===void 0||n.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&yi(u,this.catch.names),this.finally&&yi(u,this.finally.names),u}},R1=(()=>{class e extends xu{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),L1=(()=>{class e extends xu{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Ua=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=we(X({},t),{_n:t.lines?`
|
|
1
|
+
import{a as eu,b as Qg}from"./chunk-I7ACYC4O.js";import{a as S1}from"./chunk-KPW2P5T4.js";import{a as Xi,b as Yi}from"./chunk-CUKPSGYS.js";import{a as P1}from"./chunk-I6OD3CV4.js";import{a as M1}from"./chunk-7LC66BZE.js";import{a as O1}from"./chunk-AFY7IWPI.js";import{a as tf}from"./chunk-ZIXTTJ4W.js";import{a as k1,b as $1}from"./chunk-44K5XVZH.js";import{a as Ia}from"./chunk-XSS6G7LC.js";import{a as T1}from"./chunk-TEFE7EK6.js";import{a as Fr,b as Cr,c as hr,d as gr,e as Er,f as br,g as Gi,m as ye,n as ut,o as Ki}from"./chunk-W2INV3O5.js";import{a as _1,b as zi,c as Hi,e as _t,f as y1,h as v1,i as B1,k as x1,l as Ku,m as w1,o as Ui,r as Wi,s as Ei,t as bi,x as I1,y as Qt,z as wa}from"./chunk-4UVD743J.js";import{a as Ji}from"./chunk-7SGGL4QF.js";import{d as lu}from"./chunk-DBUCH6BG.js";import{a as A1}from"./chunk-RVY64DJT.js";import{b as qe}from"./chunk-X3HBQMAM.js";import{h as be,j as Ju,k as Ce}from"./chunk-E2IVJS5Z.js";import{e as b1}from"./chunk-GDFC3M3E.js";import{a as Ee,b as ve}from"./chunk-FETTFNJ2.js";import{$c as Rt,Ac as vu,Bc as Li,Ca as l1,Cc as v,D as r1,Da as dr,Dc as B,Ec as Xe,Fa as Ct,Ga as z,Ha as Lu,Ia as cr,Ic as g1,Jb as K,Kb as E,Lb as Yt,M as lr,Mb as Hu,Nb as Z,Ob as p1,Pb as w,Rb as it,Sb as nt,Tb as ft,Ub as c,Vb as p,Wb as I,Xb as m1,Yb as F1,Z as ya,_b as U,a as X,aa as ef,ad as gi,b as we,bc as M,bd as ht,cb as de,cc as h,e as F,ed as E1,fa as o1,fb as d1,g as Ue,ga as Tt,gb as l,gc as va,h as G,ha as Vi,hc as Ba,ic as xa,id as mr,ja as a1,jc as Uu,k as u1,kc as Wu,la as D1,lb as pr,ma as x,mb as bu,mc as _,n as $t,nc as H,o as _a,ob as hi,oc as q,pb as zu,pc as yu,q as i1,qc as C1,ta as Ru,tb as Y,tc as $e,ua as N,ub as Ri,uc as Te,v as n1,va as j,vb as _u,vc as Pe,w as De,wb as c1,wc as h1,x as f1,xa as s1,xc as Je,yc as Zt,zb as k,zc as Gu}from"./chunk-6ZN4TBLM.js";var ff=F(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.regexpCode=ge.getEsmExportName=ge.getProperty=ge.safeStringify=ge.stringify=ge.strConcat=ge.addCodeArg=ge.str=ge._=ge.nil=ge._Code=ge.Name=ge.IDENTIFIER=ge._CodeOrName=void 0;var uf=class{};ge._CodeOrName=uf;ge.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var _i=class extends uf{constructor(u){if(super(),!ge.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}}};ge.Name=_i;var Lt=class extends uf{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 _i&&(t[i.str]=(t[i.str]||0)+1),t),{})}};ge._Code=Lt;ge.nil=new Lt("");function N1(e,...u){let t=[e[0]],i=0;for(;i<u.length;)Aa(t,u[i]),t.push(e[++i]);return new Lt(t)}ge._=N1;var Sa=new Lt("+");function j1(e,...u){let t=[nf(e[0])],i=0;for(;i<u.length;)t.push(Sa),Aa(t,u[i]),t.push(Sa,nf(e[++i]));return t4(t),new Lt(t)}ge.str=j1;function Aa(e,u){u instanceof Lt?e.push(...u._items):u instanceof _i?e.push(u):e.push(n4(u))}ge.addCodeArg=Aa;function t4(e){let u=1;for(;u<e.length-1;){if(e[u]===Sa){let t=u4(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function u4(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof _i||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 _i))return`"${e}${u.slice(1)}`}function i4(e,u){return u.emptyStr()?e:e.emptyStr()?u:j1`${e}${u}`}ge.strConcat=i4;function n4(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:nf(Array.isArray(e)?e.join(","):e)}function f4(e){return new Lt(nf(e))}ge.stringify=f4;function nf(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ge.safeStringify=nf;function r4(e){return typeof e=="string"&&ge.IDENTIFIER.test(e)?new Lt(`.${e}`):N1`[${e}]`}ge.getProperty=r4;function o4(e){if(typeof e=="string"&&ge.IDENTIFIER.test(e))return new Lt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ge.getEsmExportName=o4;function a4(e){return new Lt(e.toString())}ge.regexpCode=a4});var Ta=F(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.ValueScope=vt.ValueScopeName=vt.Scope=vt.varKinds=vt.UsedValueState=void 0;var yt=ff(),ka=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},_r=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(_r||(vt.UsedValueState=_r={}));vt.varKinds={const:new yt.Name("const"),let:new yt.Name("let"),var:new yt.Name("var")};var yr=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof yt.Name?u:this.name(u)}name(u){return new yt.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}}};vt.Scope=yr;var vr=class extends yt.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,yt._)`.${new yt.Name(t)}[${i}]`}};vt.ValueScopeName=vr;var D4=(0,yt._)`\n`,$a=class extends yr{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=we(X({},u),{_n:u.lines?D4:yt.nil})}get(){return this._scope}name(u){return new vr(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 n=this.toName(u),{prefix:f}=n,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[f];if(o){let s=o.get(r);if(s)return s}else o=this._values[f]=new Map;o.set(r,n);let a=this._scope[f]||(this._scope[f]=[]),D=a.length;return a[D]=t.ref,n.setValue(t,{property:f,itemIndex:D}),n}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,yt._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,i)}_reduceValues(u,t,i={},n){let f=yt.nil;for(let r in u){let o=u[r];if(!o)continue;let a=i[r]=i[r]||new Map;o.forEach(D=>{if(a.has(D))return;a.set(D,_r.Started);let s=t(D);if(s){let d=this.opts.es5?vt.varKinds.var:vt.varKinds.const;f=(0,yt._)`${f}${d} ${D} = ${s};${this.opts._n}`}else if(s=n==null?void 0:n(D))f=(0,yt._)`${f}${s}${this.opts._n}`;else throw new ka(D);a.set(D,_r.Completed)})}return f}};vt.ValueScope=$a});var fe=F(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.or=ae.and=ae.not=ae.CodeGen=ae.operators=ae.varKinds=ae.ValueScopeName=ae.ValueScope=ae.Scope=ae.Name=ae.regexpCode=ae.stringify=ae.getProperty=ae.nil=ae.strConcat=ae.str=ae._=void 0;var me=ff(),tu=Ta(),Xu=ff();Object.defineProperty(ae,"_",{enumerable:!0,get:function(){return Xu._}});Object.defineProperty(ae,"str",{enumerable:!0,get:function(){return Xu.str}});Object.defineProperty(ae,"strConcat",{enumerable:!0,get:function(){return Xu.strConcat}});Object.defineProperty(ae,"nil",{enumerable:!0,get:function(){return Xu.nil}});Object.defineProperty(ae,"getProperty",{enumerable:!0,get:function(){return Xu.getProperty}});Object.defineProperty(ae,"stringify",{enumerable:!0,get:function(){return Xu.stringify}});Object.defineProperty(ae,"regexpCode",{enumerable:!0,get:function(){return Xu.regexpCode}});Object.defineProperty(ae,"Name",{enumerable:!0,get:function(){return Xu.Name}});var Sr=Ta();Object.defineProperty(ae,"Scope",{enumerable:!0,get:function(){return Sr.Scope}});Object.defineProperty(ae,"ValueScope",{enumerable:!0,get:function(){return Sr.ValueScope}});Object.defineProperty(ae,"ValueScopeName",{enumerable:!0,get:function(){return Sr.ValueScopeName}});Object.defineProperty(ae,"varKinds",{enumerable:!0,get:function(){return Sr.varKinds}});ae.operators={GT:new me._Code(">"),GTE:new me._Code(">="),LT:new me._Code("<"),LTE:new me._Code("<="),EQ:new me._Code("==="),NEQ:new me._Code("!=="),NOT:new me._Code("!"),OR:new me._Code("||"),AND:new me._Code("&&"),ADD:new me._Code("+")};var Bu=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},Pa=class extends Bu{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?tu.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=Qi(this.rhs,u,t)),this}get names(){return this.rhs instanceof me._CodeOrName?this.rhs.names:{}}},xr=class extends Bu{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 me.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=Qi(this.rhs,u,t),this}get names(){let u=this.lhs instanceof me.Name?{}:X({},this.lhs.names);return Ir(u,this.rhs)}},Oa=class extends xr{constructor(u,t,i,n){super(u,i,n),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},Ma=class extends Bu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},Na=class extends Bu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},ja=class extends Bu{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},qa=class extends Bu{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=Qi(this.code,u,t),this}get names(){return this.code instanceof me._CodeOrName?this.code.names:{}}},rf=class extends Bu{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,n=i.length;for(;n--;){let f=i[n];f.optimizeNames(u,t)||(s4(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>yi(u,t.names),{})}},xu=class extends rf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},Va=class extends rf{},Ra=(()=>{class e extends xu{}return e.kind="else",e})(),Br=(()=>{class e extends xu{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 n=i.optimizeNodes();i=this.else=Array.isArray(n)?new Ra(n):n}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(z1(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=Qi(this.condition,t,i),this}get names(){let t=super.names;return Ir(t,this.condition),this.else&&yi(t,this.else.names),t}}return e.kind="if",e})(),Ar=(()=>{class e extends xu{}return e.kind="for",e})(),La=class extends Ar{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=Qi(this.iteration,u,t),this}get names(){return yi(super.names,this.iteration.names)}},za=class extends Ar{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?tu.varKinds.var:this.varKind,{name:i,from:n,to:f}=this;return`for(${t} ${i}=${n}; ${i}<${f}; ${i}++)`+super.render(u)}get names(){let u=Ir(super.names,this.from);return Ir(u,this.to)}},wr=class extends Ar{constructor(u,t,i,n){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=n}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=Qi(this.iterable,u,t),this}get names(){return yi(super.names,this.iterable.names)}},q1=(()=>{class e extends xu{constructor(t,i,n){super(),this.name=t,this.args=i,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),V1=(()=>{class e extends rf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Ha=class extends xu{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,n;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(n=this.finally)===null||n===void 0||n.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&yi(u,this.catch.names),this.finally&&yi(u,this.finally.names),u}},R1=(()=>{class e extends xu{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),L1=(()=>{class e extends xu{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Ua=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=we(X({},t),{_n:t.lines?`
|
|
2
2
|
`:""}),this._extScope=u,this._scope=new tu.Scope({parent:u}),this._nodes=[new Va]}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,n){let f=this._scope.toName(t);return i!==void 0&&n&&(this._constants[f.str]=i),this._leafNode(new Pa(u,f,i)),f}const(u,t,i){return this._def(tu.varKinds.const,u,t,i)}let(u,t,i){return this._def(tu.varKinds.let,u,t,i)}var(u,t,i){return this._def(tu.varKinds.var,u,t,i)}assign(u,t,i){return this._leafNode(new xr(u,t,i))}add(u,t){return this._leafNode(new Oa(u,ae.operators.ADD,t))}code(u){return typeof u=="function"?u():u!==me.nil&&this._leafNode(new qa(u)),this}object(...u){let t=["{"];for(let[i,n]of u)t.length>1&&t.push(","),t.push(i),(i!==n||this.opts.es5)&&(t.push(":"),(0,me.addCodeArg)(t,n));return t.push("}"),new me._Code(t)}if(u,t,i){if(this._blockNode(new Br(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 Br(u))}else(){return this._elseNode(new Ra)}endIf(){return this._endBlockNode(Br,Ra)}_for(u,t){return this._blockNode(u),t&&this.code(t).endFor(),this}for(u,t){return this._for(new La(u),t)}forRange(u,t,i,n,f=this.opts.es5?tu.varKinds.var:tu.varKinds.let){let r=this._scope.toName(u);return this._for(new za(f,r,t,i),()=>n(r))}forOf(u,t,i,n=tu.varKinds.const){let f=this._scope.toName(u);if(this.opts.es5){let r=t instanceof me.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,me._)`${r}.length`,o=>{this.var(f,(0,me._)`${r}[${o}]`),i(f)})}return this._for(new wr("of",n,f,t),()=>i(f))}forIn(u,t,i,n=this.opts.es5?tu.varKinds.var:tu.varKinds.const){if(this.opts.ownProperties)return this.forOf(u,(0,me._)`Object.keys(${t})`,i);let f=this._scope.toName(u);return this._for(new wr("in",n,f,t),()=>i(f))}endFor(){return this._endBlockNode(Ar)}label(u){return this._leafNode(new Ma(u))}break(u){return this._leafNode(new Na(u))}return(u){let t=new V1;if(this._blockNode(t),this.code(u),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(V1)}try(u,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Ha;if(this._blockNode(n),this.code(u),t){let f=this.name("e");this._currNode=n.catch=new R1(f),t(f)}return i&&(this._currNode=n.finally=new L1,this.code(i)),this._endBlockNode(R1,L1)}throw(u){return this._leafNode(new ja(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=me.nil,i,n){return this._blockNode(new q1(u,t,i)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(q1)}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 Br))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}};ae.CodeGen=Ua;function yi(e,u){for(let t in u)e[t]=(e[t]||0)+(u[t]||0);return e}function Ir(e,u){return u instanceof me._CodeOrName?yi(e,u.names):e}function Qi(e,u,t){if(e instanceof me.Name)return i(e);if(!n(e))return e;return new me._Code(e._items.reduce((f,r)=>(r instanceof me.Name&&(r=i(r)),r instanceof me._Code?f.push(...r._items):f.push(r),f),[]));function i(f){let r=t[f.str];return r===void 0||u[f.str]!==1?f:(delete u[f.str],r)}function n(f){return f instanceof me._Code&&f._items.some(r=>r instanceof me.Name&&u[r.str]===1&&t[r.str]!==void 0)}}function s4(e,u){for(let t in u)e[t]=(e[t]||0)-(u[t]||0)}function z1(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,me._)`!${Wa(e)}`}ae.not=z1;var l4=H1(ae.operators.AND);function d4(...e){return e.reduce(l4)}ae.and=d4;var c4=H1(ae.operators.OR);function p4(...e){return e.reduce(c4)}ae.or=p4;function H1(e){return(u,t)=>u===me.nil?t:t===me.nil?u:(0,me._)`${Wa(u)} ${e} ${Wa(t)}`}function Wa(e){return e instanceof me.Name?e:(0,me._)`(${e})`}});var le=F(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.checkStrictMode=se.getErrorPath=se.Type=se.useFunc=se.setEvaluated=se.evaluatedPropsToName=se.mergeEvaluated=se.eachItem=se.unescapeJsonPointer=se.escapeJsonPointer=se.escapeFragment=se.unescapeFragment=se.schemaRefOrVal=se.schemaHasRulesButRef=se.schemaHasRules=se.checkUnknownRules=se.alwaysValidSchema=se.toHash=void 0;var Ie=fe(),m4=ff();function F4(e){let u={};for(let t of e)u[t]=!0;return u}se.toHash=F4;function C4(e,u){return typeof u=="boolean"?u:Object.keys(u).length===0?!0:(G1(e,u),!K1(u,e.self.RULES.all))}se.alwaysValidSchema=C4;function G1(e,u=e.schema){let{opts:t,self:i}=e;if(!t.strictSchema||typeof u=="boolean")return;let n=i.RULES.keywords;for(let f in u)n[f]||Y1(e,`unknown keyword: "${f}"`)}se.checkUnknownRules=G1;function K1(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(u[t])return!0;return!1}se.schemaHasRules=K1;function h4(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&u.all[t])return!0;return!1}se.schemaHasRulesButRef=h4;function g4({topSchemaRef:e,schemaPath:u},t,i,n){if(!n){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Ie._)`${t}`}return(0,Ie._)`${e}${u}${(0,Ie.getProperty)(i)}`}se.schemaRefOrVal=g4;function E4(e){return J1(decodeURIComponent(e))}se.unescapeFragment=E4;function b4(e){return encodeURIComponent(Ka(e))}se.escapeFragment=b4;function Ka(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}se.escapeJsonPointer=Ka;function J1(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}se.unescapeJsonPointer=J1;function _4(e,u){if(Array.isArray(e))for(let t of e)u(t);else u(e)}se.eachItem=_4;function U1({mergeNames:e,mergeToName:u,mergeValues:t,resultToName:i}){return(n,f,r,o)=>{let a=r===void 0?f:r instanceof Ie.Name?(f instanceof Ie.Name?e(n,f,r):u(n,f,r),r):f instanceof Ie.Name?(u(n,r,f),f):t(f,r);return o===Ie.Name&&!(a instanceof Ie.Name)?i(n,a):a}}se.mergeEvaluated={props:U1({mergeNames:(e,u,t)=>e.if((0,Ie._)`${t} !== true && ${u} !== undefined`,()=>{e.if((0,Ie._)`${u} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Ie._)`${t} || {}`).code((0,Ie._)`Object.assign(${t}, ${u})`))}),mergeToName:(e,u,t)=>e.if((0,Ie._)`${t} !== true`,()=>{u===!0?e.assign(t,!0):(e.assign(t,(0,Ie._)`${t} || {}`),Ja(e,t,u))}),mergeValues:(e,u)=>e===!0?!0:X(X({},e),u),resultToName:X1}),items:U1({mergeNames:(e,u,t)=>e.if((0,Ie._)`${t} !== true && ${u} !== undefined`,()=>e.assign(t,(0,Ie._)`${u} === true ? true : ${t} > ${u} ? ${t} : ${u}`)),mergeToName:(e,u,t)=>e.if((0,Ie._)`${t} !== true`,()=>e.assign(t,u===!0?!0:(0,Ie._)`${t} > ${u} ? ${t} : ${u}`)),mergeValues:(e,u)=>e===!0?!0:Math.max(e,u),resultToName:(e,u)=>e.var("items",u)})};function X1(e,u){if(u===!0)return e.var("props",!0);let t=e.var("props",(0,Ie._)`{}`);return u!==void 0&&Ja(e,t,u),t}se.evaluatedPropsToName=X1;function Ja(e,u,t){Object.keys(t).forEach(i=>e.assign((0,Ie._)`${u}${(0,Ie.getProperty)(i)}`,!0))}se.setEvaluated=Ja;var W1={};function y4(e,u){return e.scopeValue("func",{ref:u,code:W1[u.code]||(W1[u.code]=new m4._Code(u.code))})}se.useFunc=y4;var Ga=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(Ga||(se.Type=Ga={}));function v4(e,u,t){if(e instanceof Ie.Name){let i=u===Ga.Num;return t?i?(0,Ie._)`"[" + ${e} + "]"`:(0,Ie._)`"['" + ${e} + "']"`:i?(0,Ie._)`"/" + ${e}`:(0,Ie._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Ie.getProperty)(e).toString():"/"+Ka(e)}se.getErrorPath=v4;function Y1(e,u,t=e.opts.strictSchema){if(t){if(u=`strict mode: ${u}`,t===!0)throw new Error(u);e.self.logger.warn(u)}}se.checkStrictMode=Y1});var zt=F(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});var st=fe(),B4={data:new st.Name("data"),valCxt:new st.Name("valCxt"),instancePath:new st.Name("instancePath"),parentData:new st.Name("parentData"),parentDataProperty:new st.Name("parentDataProperty"),rootData:new st.Name("rootData"),dynamicAnchors:new st.Name("dynamicAnchors"),vErrors:new st.Name("vErrors"),errors:new st.Name("errors"),this:new st.Name("this"),self:new st.Name("self"),scope:new st.Name("scope"),json:new st.Name("json"),jsonPos:new st.Name("jsonPos"),jsonLen:new st.Name("jsonLen"),jsonPart:new st.Name("jsonPart")};Xa.default=B4});var of=F(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.extendErrors=lt.resetErrorsCount=lt.reportExtraError=lt.reportError=lt.keyword$DataError=lt.keywordError=void 0;var he=fe(),kr=le(),gt=zt();lt.keywordError={message:({keyword:e})=>(0,he.str)`must pass "${e}" keyword validation`};lt.keyword$DataError={message:({keyword:e,schemaType:u})=>u?(0,he.str)`"${e}" keyword must be ${u} ($data)`:(0,he.str)`"${e}" keyword is invalid ($data)`};function x4(e,u=lt.keywordError,t,i){let{it:n}=e,{gen:f,compositeRule:r,allErrors:o}=n,a=el(e,u,t);(i!=null?i:r||o)?Z1(f,a):Q1(n,(0,he._)`[${a}]`)}lt.reportError=x4;function w4(e,u=lt.keywordError,t){let{it:i}=e,{gen:n,compositeRule:f,allErrors:r}=i,o=el(e,u,t);Z1(n,o),f||r||Q1(i,gt.default.vErrors)}lt.reportExtraError=w4;function I4(e,u){e.assign(gt.default.errors,u),e.if((0,he._)`${gt.default.vErrors} !== null`,()=>e.if(u,()=>e.assign((0,he._)`${gt.default.vErrors}.length`,u),()=>e.assign(gt.default.vErrors,null)))}lt.resetErrorsCount=I4;function S4({gen:e,keyword:u,schemaValue:t,data:i,errsCount:n,it:f}){if(n===void 0)throw new Error("ajv implementation error");let r=e.name("err");e.forRange("i",n,gt.default.errors,o=>{e.const(r,(0,he._)`${gt.default.vErrors}[${o}]`),e.if((0,he._)`${r}.instancePath === undefined`,()=>e.assign((0,he._)`${r}.instancePath`,(0,he.strConcat)(gt.default.instancePath,f.errorPath))),e.assign((0,he._)`${r}.schemaPath`,(0,he.str)`${f.errSchemaPath}/${u}`),f.opts.verbose&&(e.assign((0,he._)`${r}.schema`,t),e.assign((0,he._)`${r}.data`,i))})}lt.extendErrors=S4;function Z1(e,u){let t=e.const("err",u);e.if((0,he._)`${gt.default.vErrors} === null`,()=>e.assign(gt.default.vErrors,(0,he._)`[${t}]`),(0,he._)`${gt.default.vErrors}.push(${t})`),e.code((0,he._)`${gt.default.errors}++`)}function Q1(e,u){let{gen:t,validateName:i,schemaEnv:n}=e;n.$async?t.throw((0,he._)`new ${e.ValidationError}(${u})`):(t.assign((0,he._)`${i}.errors`,u),t.return(!1))}var vi={keyword:new he.Name("keyword"),schemaPath:new he.Name("schemaPath"),params:new he.Name("params"),propertyName:new he.Name("propertyName"),message:new he.Name("message"),schema:new he.Name("schema"),parentSchema:new he.Name("parentSchema")};function el(e,u,t){let{createErrors:i}=e.it;return i===!1?(0,he._)`{}`:A4(e,u,t)}function A4(e,u,t={}){let{gen:i,it:n}=e,f=[k4(n,t),$4(e,t)];return T4(e,u,f),i.object(...f)}function k4({errorPath:e},{instancePath:u}){let t=u?(0,he.str)`${e}${(0,kr.getErrorPath)(u,kr.Type.Str)}`:e;return[gt.default.instancePath,(0,he.strConcat)(gt.default.instancePath,t)]}function $4({keyword:e,it:{errSchemaPath:u}},{schemaPath:t,parentSchema:i}){let n=i?u:(0,he.str)`${u}/${e}`;return t&&(n=(0,he.str)`${n}${(0,kr.getErrorPath)(t,kr.Type.Str)}`),[vi.schemaPath,n]}function T4(e,{params:u,message:t},i){let{keyword:n,data:f,schemaValue:r,it:o}=e,{opts:a,propertyName:D,topSchemaRef:s,schemaPath:d}=o;i.push([vi.keyword,n],[vi.params,typeof u=="function"?u(e):u||(0,he._)`{}`]),a.messages&&i.push([vi.message,typeof t=="function"?t(e):t]),a.verbose&&i.push([vi.schema,r],[vi.parentSchema,(0,he._)`${s}${d}`],[gt.default.data,f]),D&&i.push([vi.propertyName,D])}});var ul=F(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.boolOrEmptySchema=en.topBoolOrEmptySchema=void 0;var P4=of(),O4=fe(),M4=zt(),N4={message:"boolean schema is false"};function j4(e){let{gen:u,schema:t,validateName:i}=e;t===!1?tl(e,!1):typeof t=="object"&&t.$async===!0?u.return(M4.default.data):(u.assign((0,O4._)`${i}.errors`,null),u.return(!0))}en.topBoolOrEmptySchema=j4;function q4(e,u){let{gen:t,schema:i}=e;i===!1?(t.var(u,!1),tl(e)):t.var(u,!0)}en.boolOrEmptySchema=q4;function tl(e,u){let{gen:t,data:i}=e,n={gen:t,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,P4.reportError)(n,N4,void 0,u)}});var Ya=F(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.getRules=tn.isJSONType=void 0;var V4=["string","number","integer","boolean","null","object","array"],R4=new Set(V4);function L4(e){return typeof e=="string"&&R4.has(e)}tn.isJSONType=L4;function z4(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:we(X({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}tn.getRules=z4});var Za=F(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});Yu.shouldUseRule=Yu.shouldUseGroup=Yu.schemaHasRulesForType=void 0;function H4({schema:e,self:u},t){let i=u.RULES.types[t];return i&&i!==!0&&il(e,i)}Yu.schemaHasRulesForType=H4;function il(e,u){return u.rules.some(t=>nl(e,t))}Yu.shouldUseGroup=il;function nl(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))}Yu.shouldUseRule=nl});var af=F(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.reportTypeError=dt.checkDataTypes=dt.checkDataType=dt.coerceAndCheckDataType=dt.getJSONTypes=dt.getSchemaTypes=dt.DataType=void 0;var U4=Ya(),W4=Za(),G4=of(),re=fe(),fl=le(),un=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(un||(dt.DataType=un={}));function K4(e){let u=rl(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}dt.getSchemaTypes=K4;function rl(e){let u=Array.isArray(e)?e:e?[e]:[];if(u.every(U4.isJSONType))return u;throw new Error("type must be JSONType or JSONType[]: "+u.join(","))}dt.getJSONTypes=rl;function J4(e,u){let{gen:t,data:i,opts:n}=e,f=X4(u,n.coerceTypes),r=u.length>0&&!(f.length===0&&u.length===1&&(0,W4.schemaHasRulesForType)(e,u[0]));if(r){let o=eD(u,i,n.strictNumbers,un.Wrong);t.if(o,()=>{f.length?Y4(e,u,f):tD(e)})}return r}dt.coerceAndCheckDataType=J4;var ol=new Set(["string","number","integer","boolean","null"]);function X4(e,u){return u?e.filter(t=>ol.has(t)||u==="array"&&t==="array"):[]}function Y4(e,u,t){let{gen:i,data:n,opts:f}=e,r=i.let("dataType",(0,re._)`typeof ${n}`),o=i.let("coerced",(0,re._)`undefined`);f.coerceTypes==="array"&&i.if((0,re._)`${r} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>i.assign(n,(0,re._)`${n}[0]`).assign(r,(0,re._)`typeof ${n}`).if(eD(u,n,f.strictNumbers),()=>i.assign(o,n))),i.if((0,re._)`${o} !== undefined`);for(let D of t)(ol.has(D)||D==="array"&&f.coerceTypes==="array")&&a(D);i.else(),tD(e),i.endIf(),i.if((0,re._)`${o} !== undefined`,()=>{i.assign(n,o),Z4(e,o)});function a(D){switch(D){case"string":i.elseIf((0,re._)`${r} == "number" || ${r} == "boolean"`).assign(o,(0,re._)`"" + ${n}`).elseIf((0,re._)`${n} === null`).assign(o,(0,re._)`""`);return;case"number":i.elseIf((0,re._)`${r} == "boolean" || ${n} === null
|
|
3
3
|
|| (${r} == "string" && ${n} && ${n} == +${n})`).assign(o,(0,re._)`+${n}`);return;case"integer":i.elseIf((0,re._)`${r} === "boolean" || ${n} === null
|
|
4
4
|
|| (${r} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(o,(0,re._)`+${n}`);return;case"boolean":i.elseIf((0,re._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(o,!1).elseIf((0,re._)`${n} === "true" || ${n} === 1`).assign(o,!0);return;case"null":i.elseIf((0,re._)`${n} === "" || ${n} === 0 || ${n} === false`),i.assign(o,null);return;case"array":i.elseIf((0,re._)`${r} === "string" || ${r} === "number"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-CNXJFYGV.js";import"./chunk-3CVRTPW6.js";import"./chunk-3NAAMMFZ.js";import"./chunk-44K5XVZH.js";import"./chunk-7SGGL4QF.js";import{g as i}from"./chunk-DBUCH6BG.js";import"./chunk-RVY64DJT.js";import"./chunk-X3HBQMAM.js";import"./chunk-E2IVJS5Z.js";import"./chunk-GDFC3M3E.js";import{c as m}from"./chunk-FETTFNJ2.js";import{ha as t,id as n,ub as r}from"./chunk-6ZN4TBLM.js";var u=[{path:"",loadComponent:()=>import("./chunk-QX4VKBWI.js").then(o=>o.TerminalComponent)}],a=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(u),i]})}return o})();var T=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n,a,m.forChild()]})}return o})();export{T as TerminalModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-GMRXG2EA.js";import{a as f}from"./chunk-SFY6RJZE.js";import"./chunk-PRAGJ7KY.js";import"./chunk-ZIXTTJ4W.js";import"./chunk-44K5XVZH.js";import{q as u}from"./chunk-W2INV3O5.js";import{y as n,z as p}from"./chunk-4UVD743J.js";import"./chunk-7SGGL4QF.js";import{g as i}from"./chunk-DBUCH6BG.js";import"./chunk-RVY64DJT.js";import"./chunk-X3HBQMAM.js";import"./chunk-E2IVJS5Z.js";import"./chunk-GDFC3M3E.js";import{c as d}from"./chunk-FETTFNJ2.js";import{ha as t,id as m,ub as r}from"./chunk-6ZN4TBLM.js";var M=[{path:"",loadComponent:()=>import("./chunk-EOPT6TFP.js").then(o=>o.SetupWizardComponent)}],l=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(M),i]})}return o})();var R=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({providers:[a],imports:[m,n,p,d,u,l,f]})}return o})();export{R as SetupWizardModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as wi,b as Pi}from"./chunk-L3LMIZ4T.js";import{a as bi}from"./chunk-G5LGUOIC.js";import{n as xi,v as O}from"./chunk-NL72Q4WH.js";import{a as H}from"./chunk-QREBJA53.js";import{a as vi}from"./chunk-I6OD3CV4.js";import{a as Ci}from"./chunk-BC4ZZQWV.js";import{a as hi}from"./chunk-TEFE7EK6.js";import{h as si,i as di,j as pi,k as ci,l as ui,m as gi,n as j,o as mi}from"./chunk-W2INV3O5.js";import{c as Y,e as Z,f as ii,g as ei,j as ni,m as ti,p as oi,q as ai,y as li,z as ri}from"./chunk-4UVD743J.js";import{a as z}from"./chunk-5NZGHO7L.js";import{a as fi,d as _i}from"./chunk-DBUCH6BG.js";import{b as U}from"./chunk-QOVS4JL2.js";import{h as F,k as R}from"./chunk-A7Z6YHW7.js";import{a as A,b as $}from"./chunk-FETTFNJ2.js";import{$c as E,Ac as K,Cc as c,Dc as u,Ec as N,Jb as B,Kb as b,Pb as s,Rb as G,Sb as W,Tb as J,Ub as a,Vb as l,Wb as d,_b as h,bc as m,cb as L,cc as p,cd as Q,db as T,gb as t,gd as X,h as y,ma as w,mc as g,nc as P,oc as v,tb as V,ua as f,va as _,w as I,yc as D,zb as x,zc as k}from"./chunk-6ZN4TBLM.js";var Ii=(n,r)=>({"orange-text":n,"grey-text":r}),q=n=>({opacity:n}),Ti=(n,r)=>({"green-text":n,"grey-text":r}),Vi=(n,r)=>({"purple-text":n,"grey-text":r}),Ei=(n,r)=>({scopedLink:n,verifiedLink:r});function $i(n,r){n&1&&(a(0,"h6",18),g(1),c(2,"translate"),l(),a(3,"p",19),g(4),c(5,"translate"),l(),a(6,"p",19),g(7),c(8,"translate"),l()),n&2&&(t(),P(u(2,3,"plugins.manage.scoped_subtitle")),t(3),P(u(5,5,"plugins.manage.scoped_message")),t(3),P(u(8,7,"plugins.manage.verified_message")))}function Mi(n,r){n&1&&(a(0,"h6",18),g(1),c(2,"translate"),l(),a(3,"p",19),g(4),c(5,"translate"),l()),n&2&&(t(),P(u(2,2,"plugins.manage.verified_subtitle")),t(3),P(u(5,4,"plugins.manage.verified_message")))}function Hi(n,r){n&1&&(a(0,"h6",18),g(1),c(2,"translate"),l(),a(3,"p",19),g(4),c(5,"translate"),l()),n&2&&(t(),P(u(2,2,"plugins.manage.unverified_subtitle")),t(3),P(u(5,4,"plugins.manage.unverified_message")))}function Di(n,r){if(n&1){let e=h();a(0,"button",20),m("click",function(){f(e);let i=p();return _(i.$activeModal.dismiss("Dismiss"))}),g(1),c(2,"translate"),l()}n&2&&(t(),v(" ",u(2,1,"form.button_close")," "))}function Ni(n,r){if(n&1){let e=h();a(0,"button",20),m("click",function(){f(e);let i=p();return _(i.$activeModal.dismiss("Dismiss"))}),g(1),c(2,"translate"),l()}n&2&&(t(),v(" ",u(2,1,"form.button_close")," "))}function ji(n,r){if(n&1&&(a(0,"a",17),g(1),c(2,"translate"),d(3,"i",21),l()),n&2){let e=p();b("href",e.plugin.links.homepage||e.plugin.links.npm,T),t(),v(" ",u(2,2,"plugins.button_homepage")," ")}}var yi=(()=>{class n{$activeModal=w(gi);plugin;defaultIcon="assets/hb-icon.png";linkScoped='<a href="https://github.com/homebridge/plugins/wiki/Scoped-Plugins" target="_blank"><i class="fas fa-fw fa-external-link-alt primary-text"></i></a>';linkVerified='<a href="https://github.com/homebridge/plugins/wiki/Verified-Plugins" target="_blank"><i class="fas fa-fw fa-external-link-alt primary-text"></i></a>';constructor(){}ngOnInit(){this.plugin.icon||(this.plugin.icon=this.defaultIcon)}handleIconError(){this.plugin.icon=this.defaultIcon}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=V({type:n,selectors:[["ng-component"]],inputs:{plugin:"plugin"},decls:32,vars:45,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],["alt","Plugin Icon",1,"mb-3","plugin-icon-card",3,"error","src"],[1,"mb-1"],[1,"grey-text","mb-0","font-monospace"],[1,"grey-text","mb-1","font-monospace"],[1,"mb-3"],[1,"fas","fa-fw","fa-shield-alt","mb-3",2,"font-size","48px",3,"ngClass","ngStyle"],[1,"mb-0","grey-text",3,"innerHTML"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","text-decoration-none",3,"href"],[1,"mb-2"],[1,"mb-1","grey-text"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"fas","fa-fw","fa-external-link-alt"]],template:function(o,i){o&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),g(3),c(4,"translate"),l(),a(5,"button",3),c(6,"translate"),m("click",function(){return i.$activeModal.dismiss("Dismiss")}),l()(),a(7,"div",4)(8,"img",5),m("error",function(){return i.handleIconError()}),l(),a(9,"h4",6),g(10),l(),a(11,"p",7),g(12),l(),a(13,"p",8),g(14),l(),a(15,"p",9),g(16),l(),d(17,"i",10)(18,"i",10)(19,"i",10),x(20,$i,9,9)(21,Mi,6,6)(22,Hi,6,6),d(23,"p",11),c(24,"translate"),l(),a(25,"div",12)(26,"div",13),x(27,Di,3,3,"button",14),l(),a(28,"div",15),x(29,Ni,3,3,"button",14),l(),a(30,"div",16),x(31,ji,4,4,"a",17),l()()()),o&2&&(t(3),P(u(4,20,"plugins.manage.information")),t(2),B("aria-label",u(6,22,"form.button_close")),t(3),b("src",i.plugin.icon,T),t(2),P(i.plugin.displayName),t(2),P(i.plugin.name),t(2),v("@",i.plugin.author,""),t(2),P(i.plugin.description),t(),b("ngClass",k(27,Ii,!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin,i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin))("ngStyle",D(30,q,!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin?1:.25)),t(),b("ngClass",k(32,Ti,!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin),i.plugin.isHbScoped||!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin))("ngStyle",D(35,q,!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)?1:.25)),t(),b("ngClass",k(37,Vi,i.plugin.isHbScoped,!i.plugin.isHbScoped))("ngStyle",D(40,q,i.plugin.isHbScoped?1:.25)),t(),s(i.plugin.isHbScoped?20:-1),t(),s(!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)?21:-1),t(),s(!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin?22:-1),t(),b("innerHTML",N(24,24,"plugins.manage.more_info",k(42,Ei,i.linkScoped,i.linkVerified)),L),t(4),s(i.plugin.links.homepage||i.plugin.links.npm?27:-1),t(2),s(!i.plugin.links.homepage&&!i.plugin.links.npm?29:-1),t(2),s(i.plugin.links.homepage||i.plugin.links.npm?31:-1))},dependencies:[$,E,Q],styles:[".plugin-icon[_ngcontent-%COMP%]{height:75px;width:75px;border-radius:15px;border:1px solid #222222}"]})}return n})();var Ai=(n,r,e)=>({"purple-text":n,"green-text":r,"orange-text":e}),Fi=(n,r)=>({"fa-bridge-circle-exclamation orange-text":n,"fa-bridge-circle-xmark red-text":r});function Ri(n,r){n&1&&d(0,"i",25)}function Ui(n,r){n&1&&d(0,"i",26)}function zi(n,r){if(n&1){let e=h();a(0,"a",24),m("click",function(){f(e);let i=p();return _(i.openHb2InfoModal())}),x(1,Ri,1,0,"i",25)(2,Ui,1,0,"i",26),l()}if(n&2){let e=p();b("ngbTooltip","Homebridge v2 Readiness")("placement","right"),t(),s(e.hb2Status==="supported"?1:-1),t(),s(e.hb2Status==="unknown"?2:-1)}}function Oi(n,r){if(n&1){let e=h();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.checkAndUpdatePlugin(i.plugin,i.plugin.updateTag||"latest"))}),d(3,"i",28),l()}n&2&&(b("ngbTooltip",u(1,2,"plugins.button_update")),B("aria-label",u(2,4,"plugins.button_update")))}function qi(n,r){if(n&1){let e=h();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.switchToScoped(i.plugin))}),d(3,"i",29),l()}n&2&&(b("ngbTooltip",u(1,2,"plugins.manage.scoped.switch")),B("aria-label",u(2,4,"plugins.manage.scoped.switch")))}function Li(n,r){if(n&1){let e=h();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.settings(i.plugin))}),d(3,"i",30),l()}n&2&&(b("ngbTooltip",u(1,2,"plugins.button_set_up")),B("aria-label",u(2,4,"plugins.button_set_up")))}function Gi(n,r){if(n&1){let e=h();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.bridgeSettings(i.plugin))}),d(3,"i",31),l()}n&2&&(b("ngbTooltip",u(1,2,"child_bridge.setup")),B("aria-label",u(2,4,"child_bridge.setup")))}function Wi(n,r){if(n&1){let e=h();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.bridgeSettings(i.plugin))}),d(3,"i",32),l()}n&2&&(b("ngbTooltip",u(1,2,"child_bridge.bridge_connect")),B("aria-label",u(2,4,"child_bridge.bridge_connect")))}function Ji(n,r){if(n&1&&d(0,"i",13),n&2){let e=p();b("ngClass",k(1,Fi,e.childBridgeStatus==="pending",e.childBridgeStatus==="down"))}}function Ki(n,r){if(n&1){let e=h();a(0,"a",15),m("click",function(){f(e);let i=p();return _(i.openFundingModal(i.plugin))}),d(1,"i",33),a(2,"span",17),g(3),l()()}if(n&2){let e=p();t(3),v("@",e.plugin.author,"")}}function Qi(n,r){if(n&1&&(a(0,"span",17),d(1,"i",34),g(2),l()),n&2){let e=p();t(2),v("@",e.plugin.author," ")}}function Xi(n,r){if(n&1&&(a(0,"span"),g(1),c(2,"date"),l()),n&2){let e=p(2);t(),v("(",N(2,1,e.plugin.lastUpdated,"yyyy-MM-dd"),")")}}function Yi(n,r){if(n&1&&(a(0,"span"),d(1,"i",35),a(2,"span",17),g(3),x(4,Xi,3,4,"span"),l()()),n&2){let e=p();t(3),v("v",e.plugin.latestVersion," "),t(),s(e.plugin.lastUpdated?4:-1)}}function Zi(n,r){if(n&1&&(d(0,"i",36),g(1)),n&2){let e=p();t(),v("v",e.plugin.installedVersion," ")}}function ie(n,r){if(n&1){let e=h();a(0,"a",27),c(1,"translate"),m("click",function(){f(e);let i=p();return _(i.doChildBridgeAction("restart"))}),d(2,"i",37),l()}if(n&2){let e=p();b("ngbTooltip",u(1,1,e.setChildBridges.length>1?"child_bridge.restart_plural":"child_bridge.restart"))}}function ee(n,r){if(n&1){let e=h();a(0,"a",38),m("click",function(){f(e);let i=p();return _(i.enablePlugin(i.plugin))}),d(1,"i",39),c(2,"translate"),l()}n&2&&(t(),b("ngbTooltip",u(2,1,"plugins.status_disabled")))}function ne(n,r){if(n&1){let e=h();a(0,"a",40),m("click",function(){f(e);let i=p();return _(i.$plugin.installAlternateVersion(i.plugin))}),d(1,"i",41),l()}}function te(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.viewPluginLog(i.plugin))}),d(1,"i",50),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.plugin_logs")," "))}function oe(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.installAlternateVersion(i.plugin))}),d(1,"i",51),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.manage_version")," "))}function ae(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.jsonEditor(i.plugin))}),d(1,"i",52),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.json_config")," "))}function le(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.disablePlugin(i.plugin))}),d(1,"i",53),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.disable")," "))}function re(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.enablePlugin(i.plugin))}),d(1,"i",54),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.enable")," "))}function se(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.uninstallPlugin(i.plugin,i.setChildBridges))}),d(1,"i",55),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.button_uninstall")," "))}function de(n,r){n&1&&d(0,"div",48)}function pe(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(3);return _(i.doChildBridgeAction("restart"))}),d(1,"i",58),g(2),c(3,"translate"),l()}if(n&2){let e=p(3);t(2),v(" ",u(3,1,e.setChildBridges.length>1?"child_bridge.restart_plural":"child_bridge.restart")," ")}}function ce(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(3);return _(i.doChildBridgeAction("stop"))}),d(1,"i",59),g(2),c(3,"translate"),l()}if(n&2){let e=p(3);t(2),v(" ",u(3,1,e.setChildBridges.length>1?"child_bridge.stop_plural":"child_bridge.stop")," ")}}function ue(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(3);return _(i.doChildBridgeAction("start"))}),d(1,"i",60),g(2),c(3,"translate"),l()}if(n&2){let e=p(3);t(2),v(" ",u(3,1,e.setChildBridges.length>1?"child_bridge.start_plural":"child_bridge.start")," ")}}function ge(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.bridgeSettings(i.plugin))}),d(1,"i",56),g(2),c(3,"translate"),l(),x(4,pe,4,3,"button",47)(5,ce,4,3,"button",47)(6,ue,4,3,"button",47),a(7,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.resetChildBridges(i.setChildBridges))}),d(8,"i",57),g(9),c(10,"translate"),l()}if(n&2){let e=p(2);t(2),v(" ",u(3,5,"child_bridge.bridge_settings")," "),t(2),s(e.childBridgeRestartInProgress?-1:4),t(),s(e.allChildBridgesStopped?-1:5),t(),s(e.allChildBridgesStopped?6:-1),t(3),v(" ",u(10,7,"child_bridge.reset_accessories")," ")}}function me(n,r){n&1&&d(0,"div",48)}function fe(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.bridgeSettings(i.plugin))}),d(1,"i",61),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"child_bridge.setup")," "))}function _e(n,r){n&1&&d(0,"div",48)}function he(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.bridgeSettings(i.plugin))}),d(1,"i",61),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"child_bridge.setup")," "))}function Ce(n,r){n&1&&d(0,"div",48)}function be(n,r){if(n&1&&(a(0,"a",49),d(1,"i",62),g(2),c(3,"translate"),l()),n&2){let e=p(2);b("href",e.plugin.links.bugs,T),t(2),v(" ",u(3,2,"support.links.issue")," ")}}function ve(n,r){if(n&1){let e=h();a(0,"span",23)(1,"a",42),d(2,"i",43),l(),a(3,"div",44)(4,"button",45),m("click",function(){f(e);let i=p();return _(i.$plugin.settings(i.plugin))}),d(5,"i",46),g(6),c(7,"translate"),l(),x(8,te,4,3,"button",47)(9,oe,4,3,"button",47)(10,ae,4,3,"button",47)(11,le,4,3,"button",47)(12,re,4,3,"button",47)(13,se,4,3,"button",47)(14,de,1,0,"div",48)(15,ge,11,9)(16,me,1,0,"div",48)(17,fe,4,3,"button",47)(18,_e,1,0,"div",48)(19,he,4,3,"button",47)(20,Ce,1,0,"div",48)(21,be,4,4,"a",49),l()()}if(n&2){let e=p();t(),B("aria-label","Plugin Actions Dropdown"),t(5),v(" ",u(7,16,"plugins.button_settings")," "),t(2),s(e.plugin.isConfigured&&!e.plugin.disabled?8:-1),t(),s(e.plugin.publicPackage?9:-1),t(),s(!e.isMobile&&e.plugin.name!=="homebridge-config-ui-x"?10:-1),t(),s(e.plugin.name!=="homebridge-config-ui-x"&&!e.plugin.disabled?11:-1),t(),s(e.plugin.name!=="homebridge-config-ui-x"&&e.plugin.disabled?12:-1),t(),s(e.plugin.name!=="homebridge-config-ui-x"?13:-1),t(),s(!e.plugin.disabled&&e.plugin.isConfigured&&e.plugin.hasChildBridges&&e.plugin.installedVersion&&e.plugin.name!=="homebridge-config-ui-x"?14:-1),t(),s(e.plugin.hasChildBridges&&!e.plugin.disabled?15:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&!e.plugin.recommendChildBridge?16:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&!e.plugin.recommendChildBridge?17:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&e.plugin.recommendChildBridge&&e.plugin.updateAvailable?18:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&e.plugin.recommendChildBridge&&e.plugin.updateAvailable?19:-1),t(),s(e.plugin.links!=null&&e.plugin.links.bugs?20:-1),t(),s(e.plugin.links!=null&&e.plugin.links.bugs?21:-1)}}var Bi=(()=>{class n{$api=w(R);$md=w(vi);$modal=w(j);$plugin=w(O);$settings=w(U);$toastr=w(F);$translate=w(A);$ws=w(z);plugin;hasChildBridges=!1;hasUnpairedChildBridges=!1;allChildBridgesStopped=!1;childBridgeStatus="pending";childBridgeRestartInProgress=!1;defaultIcon="assets/hb-icon.png";isMobile;setChildBridges=[];hb2Status="unknown";io;constructor(){}set childBridges(e){var C,M;this.hasChildBridges=e.length>0,this.hasUnpairedChildBridges=e.filter(S=>S.paired===!1).length>0,this.allChildBridgesStopped=e.filter(S=>S.manuallyStopped===!0).length===e.length,this.hasChildBridges&&(e.some(S=>S.status==="down")?this.childBridgeStatus="down":e.some(S=>S.status==="pending")?this.childBridgeStatus="pending":e.some(S=>S.status==="ok")&&(this.childBridgeStatus="ok")),this.setChildBridges=e;let o=this.$settings.env.homebridgeVersion.split(".")[0],i=((M=(C=this.plugin.engines)==null?void 0:C.homebridge)==null?void 0:M.split("||").map(S=>S.trim()))||[];this.hb2Status=o==="2"?"hide":i.some(S=>S.startsWith("^2")||S.startsWith(">=2"))?"supported":this.hb2Status}ngOnInit(){this.isMobile=this.$md.detect.mobile(),this.io=this.$ws.getExistingNamespace("child-bridges"),this.isMobile&&this.plugin.displayName.toLowerCase().startsWith("homebridge ")&&(this.plugin.displayName=this.plugin.displayName.replace(/^homebridge /i,"")),this.plugin.icon||(this.plugin.icon=this.defaultIcon)}openFundingModal(e){let o=this.$modal.open(Pi,{size:"lg",backdrop:"static"});o.componentInstance.plugin=e}pluginInfoModal(e){let o=this.$modal.open(yi,{size:"lg",backdrop:"static"});o.componentInstance.plugin=e}disablePlugin(e){let o=this.$modal.open(wi,{size:"lg",backdrop:"static"});o.componentInstance.pluginName=e.displayName,o.componentInstance.isConfigured=e.isConfigured,o.componentInstance.isConfiguredDynamicPlatform=e.isConfiguredDynamicPlatform,o.result.then(()=>y(this,null,function*(){try{yield I(this.$api.put(`/config-editor/plugin/${encodeURIComponent(e.name)}/disable`,{})),e.disabled=!0,this.hasChildBridges&&this.doChildBridgeAction("stop"),this.$modal.open(H,{size:"lg",backdrop:"static"})}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("plugins.disable.error"),this.$translate.instant("toast.title_error"))}}))}enablePlugin(e){let o=this.$modal.open(hi,{size:"lg",backdrop:"static"});o.componentInstance.title=e.name,o.componentInstance.message=this.$translate.instant("plugins.manage.confirm_enable",{pluginName:e.displayName}),o.componentInstance.confirmButtonLabel=this.$translate.instant("plugins.manage.enable"),o.componentInstance.faIconClass="fa-circle-play primary-text",o.result.then(()=>y(this,null,function*(){try{yield I(this.$api.put(`/config-editor/plugin/${encodeURIComponent(e.name)}/enable`,{})),e.disabled=!1,this.hasChildBridges&&(yield this.doChildBridgeAction("start")),this.$modal.open(H,{size:"lg",backdrop:"static"})}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("plugins.enable.error"),this.$translate.instant("toast.title_error"))}}))}viewPluginLog(e){let o=this.$modal.open(xi,{size:"xl",backdrop:"static"});o.componentInstance.plugin=e}doChildBridgeAction(e){return y(this,null,function*(){this.childBridgeRestartInProgress=!0;try{for(let o of this.setChildBridges)yield I(this.io.request(`${e}-child-bridge`,o.username))}catch(o){console.error(o),this.$toastr.error(this.$translate.instant("plugins.bridge.action_error",{action:e}),this.$translate.instant("toast.title_error")),this.childBridgeRestartInProgress=!1}finally{setTimeout(()=>{this.childBridgeRestartInProgress=!1},e==="restart"?12e3:e==="stop"?6e3:1e3)}})}handleIconError(){this.plugin.icon=this.defaultIcon}openHb2InfoModal(){let e=this.$modal.open(Ci,{size:"lg",backdrop:"static"});e.componentInstance.title="Plugin Readiness",this.hb2Status==="supported"?(e.componentInstance.subtitle=`${this.plugin.displayName} is ready for Homebridge v2`,e.componentInstance.message="The developer has specifically marked your installed version of the plugin as compatible with Homebridge v2.",e.componentInstance.faIconClass="fa-check-circle green-text"):(e.componentInstance.subtitle=`${this.plugin.displayName} might not be ready for Homebridge v2`,e.componentInstance.message="The developer has not specifically marked your installed version of the plugin as compatible with Homebridge v2, but it may still work.",e.componentInstance.faIconClass="fa-question-circle orange-text"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.ctaButtonLink="https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0"}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=V({type:n,selectors:[["app-plugin-card"]],inputs:{plugin:"plugin",childBridges:"childBridges"},decls:36,vars:24,consts:[[1,"card","card-body","mb-3"],[1,"d-flex","flex-row","justify-content-between"],[1,"d-flex","flex-column","me-3","align-items-center","justify-content-between"],["alt","Plugin Icon",1,"plugin-icon-card","mb-3",3,"error","src"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover","aria-label","Homebridge v2 Readiness",3,"ngbTooltip","placement"],[1,"d-flex","flex-column","justify-content-between",2,"min-width","calc(100% - 80px)"],[1,"d-flex","flex-row","align-items-end"],[1,"d-flex","flex-column","w-100"],[1,"d-flex","flex-row"],[1,"card-title","mb-2","text-truncate"],[1,"ms-auto"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover",1,"card-link",3,"ngbTooltip"],[1,"fas","fa-fw","fa-spinner","fa-pulse","fa-lg","grey-text","ms-3",3,"hidden"],[1,"fas","fa-fw","fa-lg","ms-3",3,"ngClass"],[1,"card-text","mb-2","text-truncate"],["href","javascript:void(0)",1,"card-link",3,"click"],[1,"fas","fa-fw","fa-shield-alt","fa-lg","me-1",3,"ngClass"],[1,"grey-text"],[1,"card-text","mb-2"],["href","javascript:void(0)",1,"card-link"],[1,"card-text","mb-0","grey-text"],["href","javascript:void(0)",1,"card-link","red-text"],["href","javascript:void(0)"],["ngbDropdown","","placement","left",1,"d-inline-block","ms-3","mt-auto"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover","aria-label","Homebridge v2 Readiness",3,"click","ngbTooltip","placement"],["aria-label","The developer has specifically marked this plugin as compatible with Homebridge v2.",1,"fas","fa-check-circle","green-text","fa-xl"],["aria-label","The developer has not specifically marked this plugin as compatible with Homebridge v2, but it may still work.",1,"fas","fa-question-circle","orange-text","fa-xl"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover",1,"card-link",3,"click","ngbTooltip"],[1,"far","fa-fw","fa-arrow-alt-circle-up","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-fw","fa-arrow-right-arrow-left","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-fw","fa-sliders","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"icon-button","fas","fa-fw","fa-bridge","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"icon-button","fas","fa-fw","fa-qrcode","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-fw","fa-heart","fa-lg","me-1","pink-text"],[1,"fas","fa-fw","fa-heart","fa-lg","me-1",2,"opacity","0.5"],[1,"far","fa-fw","fa-circle-dot","fa-lg","me-1"],[1,"far","fa-fw","fa-circle-check","fa-lg","me-1"],[1,"fas","fa-fw","fa-lg","fa-power-off","ms-3"],["href","javascript:void(0)",1,"card-link","red-text",3,"click"],["container","body","openDelay","150","triggers","hover",1,"far","fa-fw","fa-pause-circle","fa-lg",3,"ngbTooltip"],["href","javascript:void(0)",3,"click"],[1,"far","fa-fw","fa-arrow-alt-circle-down","fa-lg"],["href","javascript:void(0)","ngbDropdownToggle","",1,"card-link","text-decoration-none","mt-auto",2,"outline","none"],[1,"fa-solid","fa-fw","fa-ellipsis-v","fa-lg"],["ngbDropdownMenu","","aria-labelledby","Plugin Actions Dropdown"],["ngbDropdownItem","",3,"click"],[1,"fas","fa-fw","fa-sliders"],["ngbDropdownItem",""],[1,"dropdown-divider"],["ngbDropdownItem","","rel","noopener noreferrer","target","_blank",3,"href"],[1,"fas","fa-fw","fa-wave-square"],[1,"fas","fa-fw","fa-code-compare"],[1,"fas","fa-fw","fa-code"],[1,"far","fa-fw","fa-circle-pause"],[1,"far","fa-fw","fa-circle-play"],[1,"fas","fa-fw","fa-trash"],[1,"fas","fa-fw","fa-bridge"],[1,"fas","fa-fw","fa-broom"],[1,"fa-fw","icon-button","fas","fa-fw","fa-power-off"],[1,"fas","fa-fw","fa-stop"],[1,"fas","fa-fw","fa-play"],[1,"icon-button","fas","fa-fw","fa-bridge"],[1,"icon-button","fa","fa-fw","fa-question-circle-o"]],template:function(o,i){o&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"img",3),m("error",function(){return i.handleIconError()}),l(),x(4,zi,3,4,"a",4),l(),a(5,"div",5)(6,"div",6)(7,"div",7)(8,"div",8)(9,"h5",9),g(10),l(),a(11,"div",10),x(12,Oi,4,6,"a",11)(13,qi,4,6,"a",11)(14,Li,4,6,"a",11)(15,Gi,4,6,"a",11)(16,Wi,4,6,"a",11),d(17,"i",12),x(18,Ji,1,4,"i",13),l()(),a(19,"p",14)(20,"a",15),m("click",function(){return i.pluginInfoModal(i.plugin)}),d(21,"i",16),a(22,"span",17),g(23),l()()(),a(24,"p",18),x(25,Ki,4,1,"a",19)(26,Qi,3,1,"span",17),l(),a(27,"div",8)(28,"p",20),x(29,Yi,5,2,"span")(30,Zi,2,1),l(),a(31,"div",10),x(32,ie,3,3,"a",11)(33,ee,3,3,"a",21)(34,ne,2,0,"a",22)(35,ve,22,18,"span",23),l()()()()()()()),o&2&&(t(3),b("src",i.plugin.icon,T),t(),s(i.plugin.installedVersion&&i.hb2Status!=="hide"?4:-1),t(6),P(i.plugin.displayName),t(2),s(i.plugin.installedVersion&&i.plugin.updateAvailable&&!i.childBridgeRestartInProgress?12:-1),t(),s(i.plugin.installedVersion&&(i.plugin.newHbScope==null?null:i.plugin.newHbScope.switch)===i.plugin.installedVersion&&!i.childBridgeRestartInProgress?13:-1),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&!i.plugin.isConfigured&&!i.childBridgeRestartInProgress&&!i.plugin.disabled?14:-1),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&i.plugin.isConfigured&&!i.plugin.hasChildBridges&&!i.plugin.disabled&&i.plugin.recommendChildBridge&&!i.childBridgeRestartInProgress?15:-1),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&i.plugin.isConfigured&&i.plugin.hasChildBridges&&!i.childBridgeRestartInProgress&&i.hasUnpairedChildBridges&&i.childBridgeStatus==="ok"&&!i.plugin.disabled?16:-1),t(),b("hidden",!i.childBridgeRestartInProgress),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&i.plugin.isConfigured&&i.plugin.hasChildBridges&&!i.childBridgeRestartInProgress&&!i.hasUnpairedChildBridges&&i.childBridgeStatus!=="ok"&&!i.plugin.disabled?18:-1),t(3),b("ngClass",K(20,Ai,i.plugin.isHbScoped,!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin),!i.plugin.isHbScoped&&!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin)),t(2),P(i.plugin.name),t(2),s((i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)&&i.plugin.funding?25:-1),t(),s((i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)&&i.plugin.funding?-1:26),t(3),s(i.plugin.publicPackage&&!i.plugin.installedVersion?29:-1),t(),s(i.plugin.installedVersion?30:-1),t(2),s(!i.plugin.disabled&&i.plugin.hasChildBridges&&i.childBridgeStatus==="ok"?32:-1),t(),s(i.plugin.installedVersion&&i.plugin.disabled?33:-1),t(),s(i.plugin.publicPackage&&!i.plugin.installedVersion?34:-1),t(),s(i.plugin.installedVersion?35:-1))},dependencies:[mi,E,ui,ci,pi,di,si,X,$],encapsulation:2})}return n})();var xe=(n,r)=>({"fa-magnifying-glass":n,"fa-exclamation-circle":r});function we(n,r){n&1&&d(0,"app-spinner")}function Pe(n,r){if(n&1){let e=h();a(0,"a",9),m("click",function(){f(e);let i=p();return _(i.onClearSearch())}),d(1,"i",10),l()}}function Se(n,r){if(n&1&&(a(0,"div",11),d(1,"app-plugin-card",13),l()),n&2){let e=r.$implicit,o=p(2);t(),b("plugin",e)("childBridges",o.getPluginChildBridges(e))}}function ye(n,r){if(n&1&&(a(0,"div",12),d(1,"i",14),a(2,"p"),g(3),c(4,"translate"),l()()),n&2){let e=p(2);t(),b("ngClass",k(4,xe,!e.showExitButton,e.showExitButton)),t(2),P(u(4,2,e.showExitButton?"plugins.placeholder_search_none":"plugins.placeholder_search_first"))}}function Be(n,r){if(n&1&&(a(0,"div",8),W(1,Se,2,2,"div",11,G),x(3,ye,5,7,"div",12),l()),n&2){let e=p();t(),J(e.installedPlugins),t(2),s(e.installedPlugins.length===0&&!e.loading&&!e.mainError?3:-1)}}var vn=(()=>{class n{$api=w(R);$modal=w(j);$plugin=w(O);$router=w(_i);$settings=w(U);$toastr=w(F);$translate=w(A);$ws=w(z);isSearchMode=!1;mainError=!1;loading=!0;installedPlugins=[];childBridges=[];showExitButton=!1;form=new ei({query:new ni("")});io;navigationSubscription;constructor(){}ngOnInit(){return y(this,null,function*(){this.io=this.$ws.connectToNamespace("child-bridges"),this.io.connected.subscribe(()=>y(this,null,function*(){this.getChildBridgeMetadata(),this.io.socket.emit("monitor-child-bridge-status"),this.loadInstalledPlugins().then(()=>{let e=this.$router.parseUrl(this.$router.url).queryParams.installed;if(e){let o=this.installedPlugins.find(i=>i.name===e);o&&(o.isConfigured?this.$modal.open(H,{size:"lg",backdrop:"static"}):this.$plugin.settings(o)),this.$router.navigate(["/plugins"])}})})),this.io.socket.on("child-bridge-status-update",e=>{let o=this.childBridges.find(i=>i.username===e.username);o?Object.assign(o,e):this.childBridges.push(e)}),this.navigationSubscription=this.$router.events.subscribe(e=>{e instanceof fi&&this.loadInstalledPlugins()})})}loadInstalledPlugins(){return y(this,null,function*(){this.form.setValue({query:""}),this.showExitButton=!1,this.installedPlugins=[],this.loading=!0,this.mainError=!1;try{let e=yield I(this.$api.get("/plugins"));this.installedPlugins=e.filter(i=>i.name!=="homebridge-config-ui-x"),yield this.appendMetaInfo();let o=this.installedPlugins.sort((i,C)=>i.updateAvailable!==C.updateAvailable?i.updateAvailable?-1:1:i.newHbScope&&!C.newHbScope?-1:i.disabled!==C.disabled?i.disabled?1:-1:i.isConfigured!==C.isConfigured?i.isConfigured?1:-1:i.hasChildBridgesUnpaired!==C.hasChildBridgesUnpaired?i.hasChildBridgesUnpaired?-1:1:i.hasChildBridges!==C.hasChildBridges&&this.$settings.env.recommendChildBridges?i.hasChildBridges?1:-1:i.name.localeCompare(C.name));return this.loading=!1,o}catch(e){console.error(e),this.loading=!1,this.mainError=!0,this.$toastr.error(this.$translate.instant("plugins.toast_failed_to_load_plugins"),this.$translate.instant("toast.title_error"))}})}appendMetaInfo(){return y(this,null,function*(){yield Promise.all(this.installedPlugins.filter(e=>e.installedVersion).map(e=>y(this,null,function*(){try{let o=yield I(this.$api.get(`/config-editor/plugin/${encodeURIComponent(e.name)}`));e.isConfigured=o.length>0,e.isConfiguredDynamicPlatform=e.isConfigured&&Object.prototype.hasOwnProperty.call(o[0],"platform"),e.recommendChildBridge=e.isConfiguredDynamicPlatform&&this.$settings.env.recommendChildBridges&&!["homebridge","homebridge-config-ui-x"].includes(e.name),e.hasChildBridges=e.isConfigured&&o.some(C=>C._bridge&&C._bridge.username);let i=this.getPluginChildBridges(e);e.hasChildBridgesUnpaired=i.some(C=>!C.paired)}catch{e.isConfigured=!0,e.hasChildBridges=!0}})))})}search(){this.installedPlugins=[],this.loading=!0,this.showExitButton=!0,this.$api.get(`/plugins/search/${encodeURIComponent(this.form.value.query)}`).subscribe({next:e=>{let o=new Set;this.installedPlugins=e.reduce((i,C)=>{if(C.name==="homebridge-config-ui-x"||o.has(C.name))return i;if(C.newHbScope){let M=C.newHbScope.to,S=e.some(ki=>ki.name===M);(C.installedVersion||!S)&&(o.add(M),i.push(C))}else i.push(C);return i},[]),this.appendMetaInfo(),this.loading=!1},error:e=>{this.loading=!1,this.isSearchMode=!1,console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error")),this.loadInstalledPlugins()}})}onClearSearch(){this.loadInstalledPlugins()}onSubmit({value:e}){e.query.length?(this.isSearchMode=!0,this.search()):this.isSearchMode&&(this.isSearchMode=!1,this.loadInstalledPlugins())}getChildBridgeMetadata(){this.io.request("get-homebridge-child-bridge-status").subscribe(e=>{this.childBridges=e})}getPluginChildBridges(e){return this.childBridges.filter(o=>o.plugin===e.name)}ngOnDestroy(){this.navigationSubscription&&this.navigationSubscription.unsubscribe(),this.io.end()}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=V({type:n,selectors:[["ng-component"]],decls:13,vars:10,consts:[[1,"row","mb-3"],[1,"col-12"],[1,"primary-text","m-0"],[1,"row"],[1,"col-md-12"],["novalidate","",3,"ngSubmit","formGroup"],["type","text","formControlName","query",1,"hb-npm-search",3,"placeholder"],["href","javascript:void(0)",1,"hb-npm-search-clear"],[1,"d-flex","flex-wrap","justify-content-between"],["href","javascript:void(0)",1,"hb-npm-search-clear",3,"click"],[1,"far","fa-fw","fa-times-circle"],[1,"hb-plugin-space-between"],[1,"alert","alert-info","mt-4","text-center","w-100"],[3,"plugin","childBridges"],[1,"fas","fa-fw","primary-text","my-3",2,"font-size","75px",3,"ngClass"]],template:function(o,i){o&1&&(x(0,we,1,0,"app-spinner"),a(1,"div",0)(2,"div",1)(3,"h3",2),g(4),c(5,"translate"),l()()(),a(6,"div",3)(7,"div",4)(8,"form",5),m("ngSubmit",function(){return i.onSubmit(i.form)}),d(9,"input",6),c(10,"translate"),x(11,Pe,2,0,"a",7),l()()(),x(12,Be,4,1,"div",8)),o&2&&(s(i.loading?0:-1),t(4),P(u(5,6,"menu.label_plugins")),t(4),b("formGroup",i.form),t(),b("placeholder",u(10,8,"plugins.placeholder_search_plugin")),t(2),s(i.showExitButton?11:-1),t(),s(i.loading?-1:12))},dependencies:[bi,li,ti,Y,Z,ii,ri,oi,ai,Bi,$,E],styles:[".hb-npm-search[_ngcontent-%COMP%]{outline:none;box-sizing:inherit!important;background-color:inherit;height:50px!important;width:100%;border-width:.5px;padding:10px;margin-bottom:15px}@media (hover: hover){.hb-npm-search[_ngcontent-%COMP%]:hover{border:1px solid #000000}}.hb-npm-search[_ngcontent-%COMP%]:focus{border:1px solid #000000;box-shadow:0 1px #000}.hb-npm-search-clear[_ngcontent-%COMP%]{position:absolute;right:25px;font-size:35px;color:#d0d0d0;line-height:50px;cursor:pointer}.hb-plugin-space-between[_ngcontent-%COMP%]{box-sizing:border-box;width:calc(50% - 6.6666666667px)}@media only screen and (max-width: 991px){.hb-plugin-space-between[_ngcontent-%COMP%]{width:100%}}"]})}return n})();export{vn as a};
|
|
1
|
+
import{a as wi,b as Pi}from"./chunk-L3LMIZ4T.js";import{a as bi}from"./chunk-G5LGUOIC.js";import{n as xi,v as O}from"./chunk-F2GROJGF.js";import{a as H}from"./chunk-I7ACYC4O.js";import{a as vi}from"./chunk-I6OD3CV4.js";import{a as Ci}from"./chunk-BC4ZZQWV.js";import{a as hi}from"./chunk-TEFE7EK6.js";import{h as si,i as di,j as pi,k as ci,l as ui,m as gi,n as j,o as mi}from"./chunk-W2INV3O5.js";import{c as Y,e as Z,f as ii,g as ei,j as ni,m as ti,p as oi,q as ai,y as li,z as ri}from"./chunk-4UVD743J.js";import{a as z}from"./chunk-7SGGL4QF.js";import{a as fi,d as _i}from"./chunk-DBUCH6BG.js";import{b as U}from"./chunk-X3HBQMAM.js";import{h as F,k as R}from"./chunk-E2IVJS5Z.js";import{a as A,b as $}from"./chunk-FETTFNJ2.js";import{$c as E,Ac as K,Cc as c,Dc as u,Ec as N,Jb as B,Kb as b,Pb as s,Rb as G,Sb as W,Tb as J,Ub as a,Vb as l,Wb as d,_b as h,bc as m,cb as L,cc as p,cd as Q,db as T,gb as t,gd as X,h as y,ma as w,mc as g,nc as P,oc as v,tb as V,ua as f,va as _,w as I,yc as D,zb as x,zc as k}from"./chunk-6ZN4TBLM.js";var Ii=(n,r)=>({"orange-text":n,"grey-text":r}),q=n=>({opacity:n}),Ti=(n,r)=>({"green-text":n,"grey-text":r}),Vi=(n,r)=>({"purple-text":n,"grey-text":r}),Ei=(n,r)=>({scopedLink:n,verifiedLink:r});function $i(n,r){n&1&&(a(0,"h6",18),g(1),c(2,"translate"),l(),a(3,"p",19),g(4),c(5,"translate"),l(),a(6,"p",19),g(7),c(8,"translate"),l()),n&2&&(t(),P(u(2,3,"plugins.manage.scoped_subtitle")),t(3),P(u(5,5,"plugins.manage.scoped_message")),t(3),P(u(8,7,"plugins.manage.verified_message")))}function Mi(n,r){n&1&&(a(0,"h6",18),g(1),c(2,"translate"),l(),a(3,"p",19),g(4),c(5,"translate"),l()),n&2&&(t(),P(u(2,2,"plugins.manage.verified_subtitle")),t(3),P(u(5,4,"plugins.manage.verified_message")))}function Hi(n,r){n&1&&(a(0,"h6",18),g(1),c(2,"translate"),l(),a(3,"p",19),g(4),c(5,"translate"),l()),n&2&&(t(),P(u(2,2,"plugins.manage.unverified_subtitle")),t(3),P(u(5,4,"plugins.manage.unverified_message")))}function Di(n,r){if(n&1){let e=h();a(0,"button",20),m("click",function(){f(e);let i=p();return _(i.$activeModal.dismiss("Dismiss"))}),g(1),c(2,"translate"),l()}n&2&&(t(),v(" ",u(2,1,"form.button_close")," "))}function Ni(n,r){if(n&1){let e=h();a(0,"button",20),m("click",function(){f(e);let i=p();return _(i.$activeModal.dismiss("Dismiss"))}),g(1),c(2,"translate"),l()}n&2&&(t(),v(" ",u(2,1,"form.button_close")," "))}function ji(n,r){if(n&1&&(a(0,"a",17),g(1),c(2,"translate"),d(3,"i",21),l()),n&2){let e=p();b("href",e.plugin.links.homepage||e.plugin.links.npm,T),t(),v(" ",u(2,2,"plugins.button_homepage")," ")}}var yi=(()=>{class n{$activeModal=w(gi);plugin;defaultIcon="assets/hb-icon.png";linkScoped='<a href="https://github.com/homebridge/plugins/wiki/Scoped-Plugins" target="_blank"><i class="fas fa-fw fa-external-link-alt primary-text"></i></a>';linkVerified='<a href="https://github.com/homebridge/plugins/wiki/Verified-Plugins" target="_blank"><i class="fas fa-fw fa-external-link-alt primary-text"></i></a>';constructor(){}ngOnInit(){this.plugin.icon||(this.plugin.icon=this.defaultIcon)}handleIconError(){this.plugin.icon=this.defaultIcon}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=V({type:n,selectors:[["ng-component"]],inputs:{plugin:"plugin"},decls:32,vars:45,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],["alt","Plugin Icon",1,"mb-3","plugin-icon-card",3,"error","src"],[1,"mb-1"],[1,"grey-text","mb-0","font-monospace"],[1,"grey-text","mb-1","font-monospace"],[1,"mb-3"],[1,"fas","fa-fw","fa-shield-alt","mb-3",2,"font-size","48px",3,"ngClass","ngStyle"],[1,"mb-0","grey-text",3,"innerHTML"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","text-decoration-none",3,"href"],[1,"mb-2"],[1,"mb-1","grey-text"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"fas","fa-fw","fa-external-link-alt"]],template:function(o,i){o&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),g(3),c(4,"translate"),l(),a(5,"button",3),c(6,"translate"),m("click",function(){return i.$activeModal.dismiss("Dismiss")}),l()(),a(7,"div",4)(8,"img",5),m("error",function(){return i.handleIconError()}),l(),a(9,"h4",6),g(10),l(),a(11,"p",7),g(12),l(),a(13,"p",8),g(14),l(),a(15,"p",9),g(16),l(),d(17,"i",10)(18,"i",10)(19,"i",10),x(20,$i,9,9)(21,Mi,6,6)(22,Hi,6,6),d(23,"p",11),c(24,"translate"),l(),a(25,"div",12)(26,"div",13),x(27,Di,3,3,"button",14),l(),a(28,"div",15),x(29,Ni,3,3,"button",14),l(),a(30,"div",16),x(31,ji,4,4,"a",17),l()()()),o&2&&(t(3),P(u(4,20,"plugins.manage.information")),t(2),B("aria-label",u(6,22,"form.button_close")),t(3),b("src",i.plugin.icon,T),t(2),P(i.plugin.displayName),t(2),P(i.plugin.name),t(2),v("@",i.plugin.author,""),t(2),P(i.plugin.description),t(),b("ngClass",k(27,Ii,!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin,i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin))("ngStyle",D(30,q,!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin?1:.25)),t(),b("ngClass",k(32,Ti,!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin),i.plugin.isHbScoped||!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin))("ngStyle",D(35,q,!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)?1:.25)),t(),b("ngClass",k(37,Vi,i.plugin.isHbScoped,!i.plugin.isHbScoped))("ngStyle",D(40,q,i.plugin.isHbScoped?1:.25)),t(),s(i.plugin.isHbScoped?20:-1),t(),s(!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)?21:-1),t(),s(!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin?22:-1),t(),b("innerHTML",N(24,24,"plugins.manage.more_info",k(42,Ei,i.linkScoped,i.linkVerified)),L),t(4),s(i.plugin.links.homepage||i.plugin.links.npm?27:-1),t(2),s(!i.plugin.links.homepage&&!i.plugin.links.npm?29:-1),t(2),s(i.plugin.links.homepage||i.plugin.links.npm?31:-1))},dependencies:[$,E,Q],styles:[".plugin-icon[_ngcontent-%COMP%]{height:75px;width:75px;border-radius:15px;border:1px solid #222222}"]})}return n})();var Ai=(n,r,e)=>({"purple-text":n,"green-text":r,"orange-text":e}),Fi=(n,r)=>({"fa-bridge-circle-exclamation orange-text":n,"fa-bridge-circle-xmark red-text":r});function Ri(n,r){n&1&&d(0,"i",25)}function Ui(n,r){n&1&&d(0,"i",26)}function zi(n,r){if(n&1){let e=h();a(0,"a",24),m("click",function(){f(e);let i=p();return _(i.openHb2InfoModal())}),x(1,Ri,1,0,"i",25)(2,Ui,1,0,"i",26),l()}if(n&2){let e=p();b("ngbTooltip","Homebridge v2 Readiness")("placement","right"),t(),s(e.hb2Status==="supported"?1:-1),t(),s(e.hb2Status==="unknown"?2:-1)}}function Oi(n,r){if(n&1){let e=h();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.checkAndUpdatePlugin(i.plugin,i.plugin.updateTag||"latest"))}),d(3,"i",28),l()}n&2&&(b("ngbTooltip",u(1,2,"plugins.button_update")),B("aria-label",u(2,4,"plugins.button_update")))}function qi(n,r){if(n&1){let e=h();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.switchToScoped(i.plugin))}),d(3,"i",29),l()}n&2&&(b("ngbTooltip",u(1,2,"plugins.manage.scoped.switch")),B("aria-label",u(2,4,"plugins.manage.scoped.switch")))}function Li(n,r){if(n&1){let e=h();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.settings(i.plugin))}),d(3,"i",30),l()}n&2&&(b("ngbTooltip",u(1,2,"plugins.button_set_up")),B("aria-label",u(2,4,"plugins.button_set_up")))}function Gi(n,r){if(n&1){let e=h();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.bridgeSettings(i.plugin))}),d(3,"i",31),l()}n&2&&(b("ngbTooltip",u(1,2,"child_bridge.setup")),B("aria-label",u(2,4,"child_bridge.setup")))}function Wi(n,r){if(n&1){let e=h();a(0,"a",27),c(1,"translate"),c(2,"translate"),m("click",function(){f(e);let i=p();return _(i.$plugin.bridgeSettings(i.plugin))}),d(3,"i",32),l()}n&2&&(b("ngbTooltip",u(1,2,"child_bridge.bridge_connect")),B("aria-label",u(2,4,"child_bridge.bridge_connect")))}function Ji(n,r){if(n&1&&d(0,"i",13),n&2){let e=p();b("ngClass",k(1,Fi,e.childBridgeStatus==="pending",e.childBridgeStatus==="down"))}}function Ki(n,r){if(n&1){let e=h();a(0,"a",15),m("click",function(){f(e);let i=p();return _(i.openFundingModal(i.plugin))}),d(1,"i",33),a(2,"span",17),g(3),l()()}if(n&2){let e=p();t(3),v("@",e.plugin.author,"")}}function Qi(n,r){if(n&1&&(a(0,"span",17),d(1,"i",34),g(2),l()),n&2){let e=p();t(2),v("@",e.plugin.author," ")}}function Xi(n,r){if(n&1&&(a(0,"span"),g(1),c(2,"date"),l()),n&2){let e=p(2);t(),v("(",N(2,1,e.plugin.lastUpdated,"yyyy-MM-dd"),")")}}function Yi(n,r){if(n&1&&(a(0,"span"),d(1,"i",35),a(2,"span",17),g(3),x(4,Xi,3,4,"span"),l()()),n&2){let e=p();t(3),v("v",e.plugin.latestVersion," "),t(),s(e.plugin.lastUpdated?4:-1)}}function Zi(n,r){if(n&1&&(d(0,"i",36),g(1)),n&2){let e=p();t(),v("v",e.plugin.installedVersion," ")}}function ie(n,r){if(n&1){let e=h();a(0,"a",27),c(1,"translate"),m("click",function(){f(e);let i=p();return _(i.doChildBridgeAction("restart"))}),d(2,"i",37),l()}if(n&2){let e=p();b("ngbTooltip",u(1,1,e.setChildBridges.length>1?"child_bridge.restart_plural":"child_bridge.restart"))}}function ee(n,r){if(n&1){let e=h();a(0,"a",38),m("click",function(){f(e);let i=p();return _(i.enablePlugin(i.plugin))}),d(1,"i",39),c(2,"translate"),l()}n&2&&(t(),b("ngbTooltip",u(2,1,"plugins.status_disabled")))}function ne(n,r){if(n&1){let e=h();a(0,"a",40),m("click",function(){f(e);let i=p();return _(i.$plugin.installAlternateVersion(i.plugin))}),d(1,"i",41),l()}}function te(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.viewPluginLog(i.plugin))}),d(1,"i",50),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.plugin_logs")," "))}function oe(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.installAlternateVersion(i.plugin))}),d(1,"i",51),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.manage_version")," "))}function ae(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.jsonEditor(i.plugin))}),d(1,"i",52),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.json_config")," "))}function le(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.disablePlugin(i.plugin))}),d(1,"i",53),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.disable")," "))}function re(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.enablePlugin(i.plugin))}),d(1,"i",54),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.manage.enable")," "))}function se(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.uninstallPlugin(i.plugin,i.setChildBridges))}),d(1,"i",55),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"plugins.button_uninstall")," "))}function de(n,r){n&1&&d(0,"div",48)}function pe(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(3);return _(i.doChildBridgeAction("restart"))}),d(1,"i",58),g(2),c(3,"translate"),l()}if(n&2){let e=p(3);t(2),v(" ",u(3,1,e.setChildBridges.length>1?"child_bridge.restart_plural":"child_bridge.restart")," ")}}function ce(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(3);return _(i.doChildBridgeAction("stop"))}),d(1,"i",59),g(2),c(3,"translate"),l()}if(n&2){let e=p(3);t(2),v(" ",u(3,1,e.setChildBridges.length>1?"child_bridge.stop_plural":"child_bridge.stop")," ")}}function ue(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(3);return _(i.doChildBridgeAction("start"))}),d(1,"i",60),g(2),c(3,"translate"),l()}if(n&2){let e=p(3);t(2),v(" ",u(3,1,e.setChildBridges.length>1?"child_bridge.start_plural":"child_bridge.start")," ")}}function ge(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.bridgeSettings(i.plugin))}),d(1,"i",56),g(2),c(3,"translate"),l(),x(4,pe,4,3,"button",47)(5,ce,4,3,"button",47)(6,ue,4,3,"button",47),a(7,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.resetChildBridges(i.setChildBridges))}),d(8,"i",57),g(9),c(10,"translate"),l()}if(n&2){let e=p(2);t(2),v(" ",u(3,5,"child_bridge.bridge_settings")," "),t(2),s(e.childBridgeRestartInProgress?-1:4),t(),s(e.allChildBridgesStopped?-1:5),t(),s(e.allChildBridgesStopped?6:-1),t(3),v(" ",u(10,7,"child_bridge.reset_accessories")," ")}}function me(n,r){n&1&&d(0,"div",48)}function fe(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.bridgeSettings(i.plugin))}),d(1,"i",61),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"child_bridge.setup")," "))}function _e(n,r){n&1&&d(0,"div",48)}function he(n,r){if(n&1){let e=h();a(0,"button",45),m("click",function(){f(e);let i=p(2);return _(i.$plugin.bridgeSettings(i.plugin))}),d(1,"i",61),g(2),c(3,"translate"),l()}n&2&&(t(2),v(" ",u(3,1,"child_bridge.setup")," "))}function Ce(n,r){n&1&&d(0,"div",48)}function be(n,r){if(n&1&&(a(0,"a",49),d(1,"i",62),g(2),c(3,"translate"),l()),n&2){let e=p(2);b("href",e.plugin.links.bugs,T),t(2),v(" ",u(3,2,"support.links.issue")," ")}}function ve(n,r){if(n&1){let e=h();a(0,"span",23)(1,"a",42),d(2,"i",43),l(),a(3,"div",44)(4,"button",45),m("click",function(){f(e);let i=p();return _(i.$plugin.settings(i.plugin))}),d(5,"i",46),g(6),c(7,"translate"),l(),x(8,te,4,3,"button",47)(9,oe,4,3,"button",47)(10,ae,4,3,"button",47)(11,le,4,3,"button",47)(12,re,4,3,"button",47)(13,se,4,3,"button",47)(14,de,1,0,"div",48)(15,ge,11,9)(16,me,1,0,"div",48)(17,fe,4,3,"button",47)(18,_e,1,0,"div",48)(19,he,4,3,"button",47)(20,Ce,1,0,"div",48)(21,be,4,4,"a",49),l()()}if(n&2){let e=p();t(),B("aria-label","Plugin Actions Dropdown"),t(5),v(" ",u(7,16,"plugins.button_settings")," "),t(2),s(e.plugin.isConfigured&&!e.plugin.disabled?8:-1),t(),s(e.plugin.publicPackage?9:-1),t(),s(!e.isMobile&&e.plugin.name!=="homebridge-config-ui-x"?10:-1),t(),s(e.plugin.name!=="homebridge-config-ui-x"&&!e.plugin.disabled?11:-1),t(),s(e.plugin.name!=="homebridge-config-ui-x"&&e.plugin.disabled?12:-1),t(),s(e.plugin.name!=="homebridge-config-ui-x"?13:-1),t(),s(!e.plugin.disabled&&e.plugin.isConfigured&&e.plugin.hasChildBridges&&e.plugin.installedVersion&&e.plugin.name!=="homebridge-config-ui-x"?14:-1),t(),s(e.plugin.hasChildBridges&&!e.plugin.disabled?15:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&!e.plugin.recommendChildBridge?16:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&!e.plugin.recommendChildBridge?17:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&e.plugin.recommendChildBridge&&e.plugin.updateAvailable?18:-1),t(),s(e.plugin.isConfigured&&!e.plugin.hasChildBridges&&!e.plugin.disabled&&e.plugin.recommendChildBridge&&e.plugin.updateAvailable?19:-1),t(),s(e.plugin.links!=null&&e.plugin.links.bugs?20:-1),t(),s(e.plugin.links!=null&&e.plugin.links.bugs?21:-1)}}var Bi=(()=>{class n{$api=w(R);$md=w(vi);$modal=w(j);$plugin=w(O);$settings=w(U);$toastr=w(F);$translate=w(A);$ws=w(z);plugin;hasChildBridges=!1;hasUnpairedChildBridges=!1;allChildBridgesStopped=!1;childBridgeStatus="pending";childBridgeRestartInProgress=!1;defaultIcon="assets/hb-icon.png";isMobile;setChildBridges=[];hb2Status="unknown";io;constructor(){}set childBridges(e){var C,M;this.hasChildBridges=e.length>0,this.hasUnpairedChildBridges=e.filter(S=>S.paired===!1).length>0,this.allChildBridgesStopped=e.filter(S=>S.manuallyStopped===!0).length===e.length,this.hasChildBridges&&(e.some(S=>S.status==="down")?this.childBridgeStatus="down":e.some(S=>S.status==="pending")?this.childBridgeStatus="pending":e.some(S=>S.status==="ok")&&(this.childBridgeStatus="ok")),this.setChildBridges=e;let o=this.$settings.env.homebridgeVersion.split(".")[0],i=((M=(C=this.plugin.engines)==null?void 0:C.homebridge)==null?void 0:M.split("||").map(S=>S.trim()))||[];this.hb2Status=o==="2"?"hide":i.some(S=>S.startsWith("^2")||S.startsWith(">=2"))?"supported":this.hb2Status}ngOnInit(){this.isMobile=this.$md.detect.mobile(),this.io=this.$ws.getExistingNamespace("child-bridges"),this.isMobile&&this.plugin.displayName.toLowerCase().startsWith("homebridge ")&&(this.plugin.displayName=this.plugin.displayName.replace(/^homebridge /i,"")),this.plugin.icon||(this.plugin.icon=this.defaultIcon)}openFundingModal(e){let o=this.$modal.open(Pi,{size:"lg",backdrop:"static"});o.componentInstance.plugin=e}pluginInfoModal(e){let o=this.$modal.open(yi,{size:"lg",backdrop:"static"});o.componentInstance.plugin=e}disablePlugin(e){let o=this.$modal.open(wi,{size:"lg",backdrop:"static"});o.componentInstance.pluginName=e.displayName,o.componentInstance.isConfigured=e.isConfigured,o.componentInstance.isConfiguredDynamicPlatform=e.isConfiguredDynamicPlatform,o.result.then(()=>y(this,null,function*(){try{yield I(this.$api.put(`/config-editor/plugin/${encodeURIComponent(e.name)}/disable`,{})),e.disabled=!0,this.hasChildBridges&&this.doChildBridgeAction("stop"),this.$modal.open(H,{size:"lg",backdrop:"static"})}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("plugins.disable.error"),this.$translate.instant("toast.title_error"))}}))}enablePlugin(e){let o=this.$modal.open(hi,{size:"lg",backdrop:"static"});o.componentInstance.title=e.name,o.componentInstance.message=this.$translate.instant("plugins.manage.confirm_enable",{pluginName:e.displayName}),o.componentInstance.confirmButtonLabel=this.$translate.instant("plugins.manage.enable"),o.componentInstance.faIconClass="fa-circle-play primary-text",o.result.then(()=>y(this,null,function*(){try{yield I(this.$api.put(`/config-editor/plugin/${encodeURIComponent(e.name)}/enable`,{})),e.disabled=!1,this.hasChildBridges&&(yield this.doChildBridgeAction("start")),this.$modal.open(H,{size:"lg",backdrop:"static"})}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("plugins.enable.error"),this.$translate.instant("toast.title_error"))}}))}viewPluginLog(e){let o=this.$modal.open(xi,{size:"xl",backdrop:"static"});o.componentInstance.plugin=e}doChildBridgeAction(e){return y(this,null,function*(){this.childBridgeRestartInProgress=!0;try{for(let o of this.setChildBridges)yield I(this.io.request(`${e}-child-bridge`,o.username))}catch(o){console.error(o),this.$toastr.error(this.$translate.instant("plugins.bridge.action_error",{action:e}),this.$translate.instant("toast.title_error")),this.childBridgeRestartInProgress=!1}finally{setTimeout(()=>{this.childBridgeRestartInProgress=!1},e==="restart"?12e3:e==="stop"?6e3:1e3)}})}handleIconError(){this.plugin.icon=this.defaultIcon}openHb2InfoModal(){let e=this.$modal.open(Ci,{size:"lg",backdrop:"static"});e.componentInstance.title="Plugin Readiness",this.hb2Status==="supported"?(e.componentInstance.subtitle=`${this.plugin.displayName} is ready for Homebridge v2`,e.componentInstance.message="The developer has specifically marked your installed version of the plugin as compatible with Homebridge v2.",e.componentInstance.faIconClass="fa-check-circle green-text"):(e.componentInstance.subtitle=`${this.plugin.displayName} might not be ready for Homebridge v2`,e.componentInstance.message="The developer has not specifically marked your installed version of the plugin as compatible with Homebridge v2, but it may still work.",e.componentInstance.faIconClass="fa-question-circle orange-text"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.ctaButtonLink="https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0"}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=V({type:n,selectors:[["app-plugin-card"]],inputs:{plugin:"plugin",childBridges:"childBridges"},decls:36,vars:24,consts:[[1,"card","card-body","mb-3"],[1,"d-flex","flex-row","justify-content-between"],[1,"d-flex","flex-column","me-3","align-items-center","justify-content-between"],["alt","Plugin Icon",1,"plugin-icon-card","mb-3",3,"error","src"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover","aria-label","Homebridge v2 Readiness",3,"ngbTooltip","placement"],[1,"d-flex","flex-column","justify-content-between",2,"min-width","calc(100% - 80px)"],[1,"d-flex","flex-row","align-items-end"],[1,"d-flex","flex-column","w-100"],[1,"d-flex","flex-row"],[1,"card-title","mb-2","text-truncate"],[1,"ms-auto"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover",1,"card-link",3,"ngbTooltip"],[1,"fas","fa-fw","fa-spinner","fa-pulse","fa-lg","grey-text","ms-3",3,"hidden"],[1,"fas","fa-fw","fa-lg","ms-3",3,"ngClass"],[1,"card-text","mb-2","text-truncate"],["href","javascript:void(0)",1,"card-link",3,"click"],[1,"fas","fa-fw","fa-shield-alt","fa-lg","me-1",3,"ngClass"],[1,"grey-text"],[1,"card-text","mb-2"],["href","javascript:void(0)",1,"card-link"],[1,"card-text","mb-0","grey-text"],["href","javascript:void(0)",1,"card-link","red-text"],["href","javascript:void(0)"],["ngbDropdown","","placement","left",1,"d-inline-block","ms-3","mt-auto"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover","aria-label","Homebridge v2 Readiness",3,"click","ngbTooltip","placement"],["aria-label","The developer has specifically marked this plugin as compatible with Homebridge v2.",1,"fas","fa-check-circle","green-text","fa-xl"],["aria-label","The developer has not specifically marked this plugin as compatible with Homebridge v2, but it may still work.",1,"fas","fa-question-circle","orange-text","fa-xl"],["href","javascript:void(0)","container","body","openDelay","150","triggers","hover",1,"card-link",3,"click","ngbTooltip"],[1,"far","fa-fw","fa-arrow-alt-circle-up","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-fw","fa-arrow-right-arrow-left","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-fw","fa-sliders","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"icon-button","fas","fa-fw","fa-bridge","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"icon-button","fas","fa-fw","fa-qrcode","primary-text","fa-lg","fa-fade","ms-3",2,"--fa-animation-duration","2s"],[1,"fas","fa-fw","fa-heart","fa-lg","me-1","pink-text"],[1,"fas","fa-fw","fa-heart","fa-lg","me-1",2,"opacity","0.5"],[1,"far","fa-fw","fa-circle-dot","fa-lg","me-1"],[1,"far","fa-fw","fa-circle-check","fa-lg","me-1"],[1,"fas","fa-fw","fa-lg","fa-power-off","ms-3"],["href","javascript:void(0)",1,"card-link","red-text",3,"click"],["container","body","openDelay","150","triggers","hover",1,"far","fa-fw","fa-pause-circle","fa-lg",3,"ngbTooltip"],["href","javascript:void(0)",3,"click"],[1,"far","fa-fw","fa-arrow-alt-circle-down","fa-lg"],["href","javascript:void(0)","ngbDropdownToggle","",1,"card-link","text-decoration-none","mt-auto",2,"outline","none"],[1,"fa-solid","fa-fw","fa-ellipsis-v","fa-lg"],["ngbDropdownMenu","","aria-labelledby","Plugin Actions Dropdown"],["ngbDropdownItem","",3,"click"],[1,"fas","fa-fw","fa-sliders"],["ngbDropdownItem",""],[1,"dropdown-divider"],["ngbDropdownItem","","rel","noopener noreferrer","target","_blank",3,"href"],[1,"fas","fa-fw","fa-wave-square"],[1,"fas","fa-fw","fa-code-compare"],[1,"fas","fa-fw","fa-code"],[1,"far","fa-fw","fa-circle-pause"],[1,"far","fa-fw","fa-circle-play"],[1,"fas","fa-fw","fa-trash"],[1,"fas","fa-fw","fa-bridge"],[1,"fas","fa-fw","fa-broom"],[1,"fa-fw","icon-button","fas","fa-fw","fa-power-off"],[1,"fas","fa-fw","fa-stop"],[1,"fas","fa-fw","fa-play"],[1,"icon-button","fas","fa-fw","fa-bridge"],[1,"icon-button","fa","fa-fw","fa-question-circle-o"]],template:function(o,i){o&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"img",3),m("error",function(){return i.handleIconError()}),l(),x(4,zi,3,4,"a",4),l(),a(5,"div",5)(6,"div",6)(7,"div",7)(8,"div",8)(9,"h5",9),g(10),l(),a(11,"div",10),x(12,Oi,4,6,"a",11)(13,qi,4,6,"a",11)(14,Li,4,6,"a",11)(15,Gi,4,6,"a",11)(16,Wi,4,6,"a",11),d(17,"i",12),x(18,Ji,1,4,"i",13),l()(),a(19,"p",14)(20,"a",15),m("click",function(){return i.pluginInfoModal(i.plugin)}),d(21,"i",16),a(22,"span",17),g(23),l()()(),a(24,"p",18),x(25,Ki,4,1,"a",19)(26,Qi,3,1,"span",17),l(),a(27,"div",8)(28,"p",20),x(29,Yi,5,2,"span")(30,Zi,2,1),l(),a(31,"div",10),x(32,ie,3,3,"a",11)(33,ee,3,3,"a",21)(34,ne,2,0,"a",22)(35,ve,22,18,"span",23),l()()()()()()()),o&2&&(t(3),b("src",i.plugin.icon,T),t(),s(i.plugin.installedVersion&&i.hb2Status!=="hide"?4:-1),t(6),P(i.plugin.displayName),t(2),s(i.plugin.installedVersion&&i.plugin.updateAvailable&&!i.childBridgeRestartInProgress?12:-1),t(),s(i.plugin.installedVersion&&(i.plugin.newHbScope==null?null:i.plugin.newHbScope.switch)===i.plugin.installedVersion&&!i.childBridgeRestartInProgress?13:-1),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&!i.plugin.isConfigured&&!i.childBridgeRestartInProgress&&!i.plugin.disabled?14:-1),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&i.plugin.isConfigured&&!i.plugin.hasChildBridges&&!i.plugin.disabled&&i.plugin.recommendChildBridge&&!i.childBridgeRestartInProgress?15:-1),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&i.plugin.isConfigured&&i.plugin.hasChildBridges&&!i.childBridgeRestartInProgress&&i.hasUnpairedChildBridges&&i.childBridgeStatus==="ok"&&!i.plugin.disabled?16:-1),t(),b("hidden",!i.childBridgeRestartInProgress),t(),s(i.plugin.installedVersion&&(!i.plugin.newHbScope||i.plugin.newHbScope.switch!==i.plugin.installedVersion)&&!i.plugin.updateAvailable&&i.plugin.isConfigured&&i.plugin.hasChildBridges&&!i.childBridgeRestartInProgress&&!i.hasUnpairedChildBridges&&i.childBridgeStatus!=="ok"&&!i.plugin.disabled?18:-1),t(3),b("ngClass",K(20,Ai,i.plugin.isHbScoped,!i.plugin.isHbScoped&&(i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin),!i.plugin.isHbScoped&&!i.plugin.verifiedPlugin&&!i.plugin.verifiedPlusPlugin)),t(2),P(i.plugin.name),t(2),s((i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)&&i.plugin.funding?25:-1),t(),s((i.plugin.verifiedPlugin||i.plugin.verifiedPlusPlugin)&&i.plugin.funding?-1:26),t(3),s(i.plugin.publicPackage&&!i.plugin.installedVersion?29:-1),t(),s(i.plugin.installedVersion?30:-1),t(2),s(!i.plugin.disabled&&i.plugin.hasChildBridges&&i.childBridgeStatus==="ok"?32:-1),t(),s(i.plugin.installedVersion&&i.plugin.disabled?33:-1),t(),s(i.plugin.publicPackage&&!i.plugin.installedVersion?34:-1),t(),s(i.plugin.installedVersion?35:-1))},dependencies:[mi,E,ui,ci,pi,di,si,X,$],encapsulation:2})}return n})();var xe=(n,r)=>({"fa-magnifying-glass":n,"fa-exclamation-circle":r});function we(n,r){n&1&&d(0,"app-spinner")}function Pe(n,r){if(n&1){let e=h();a(0,"a",9),m("click",function(){f(e);let i=p();return _(i.onClearSearch())}),d(1,"i",10),l()}}function Se(n,r){if(n&1&&(a(0,"div",11),d(1,"app-plugin-card",13),l()),n&2){let e=r.$implicit,o=p(2);t(),b("plugin",e)("childBridges",o.getPluginChildBridges(e))}}function ye(n,r){if(n&1&&(a(0,"div",12),d(1,"i",14),a(2,"p"),g(3),c(4,"translate"),l()()),n&2){let e=p(2);t(),b("ngClass",k(4,xe,!e.showExitButton,e.showExitButton)),t(2),P(u(4,2,e.showExitButton?"plugins.placeholder_search_none":"plugins.placeholder_search_first"))}}function Be(n,r){if(n&1&&(a(0,"div",8),W(1,Se,2,2,"div",11,G),x(3,ye,5,7,"div",12),l()),n&2){let e=p();t(),J(e.installedPlugins),t(2),s(e.installedPlugins.length===0&&!e.loading&&!e.mainError?3:-1)}}var vn=(()=>{class n{$api=w(R);$modal=w(j);$plugin=w(O);$router=w(_i);$settings=w(U);$toastr=w(F);$translate=w(A);$ws=w(z);isSearchMode=!1;mainError=!1;loading=!0;installedPlugins=[];childBridges=[];showExitButton=!1;form=new ei({query:new ni("")});io;navigationSubscription;constructor(){}ngOnInit(){return y(this,null,function*(){this.io=this.$ws.connectToNamespace("child-bridges"),this.io.connected.subscribe(()=>y(this,null,function*(){this.getChildBridgeMetadata(),this.io.socket.emit("monitor-child-bridge-status"),this.loadInstalledPlugins().then(()=>{let e=this.$router.parseUrl(this.$router.url).queryParams.installed;if(e){let o=this.installedPlugins.find(i=>i.name===e);o&&(o.isConfigured?this.$modal.open(H,{size:"lg",backdrop:"static"}):this.$plugin.settings(o)),this.$router.navigate(["/plugins"])}})})),this.io.socket.on("child-bridge-status-update",e=>{let o=this.childBridges.find(i=>i.username===e.username);o?Object.assign(o,e):this.childBridges.push(e)}),this.navigationSubscription=this.$router.events.subscribe(e=>{e instanceof fi&&this.loadInstalledPlugins()})})}loadInstalledPlugins(){return y(this,null,function*(){this.form.setValue({query:""}),this.showExitButton=!1,this.installedPlugins=[],this.loading=!0,this.mainError=!1;try{let e=yield I(this.$api.get("/plugins"));this.installedPlugins=e.filter(i=>i.name!=="homebridge-config-ui-x"),yield this.appendMetaInfo();let o=this.installedPlugins.sort((i,C)=>i.updateAvailable!==C.updateAvailable?i.updateAvailable?-1:1:i.newHbScope&&!C.newHbScope?-1:i.disabled!==C.disabled?i.disabled?1:-1:i.isConfigured!==C.isConfigured?i.isConfigured?1:-1:i.hasChildBridgesUnpaired!==C.hasChildBridgesUnpaired?i.hasChildBridgesUnpaired?-1:1:i.hasChildBridges!==C.hasChildBridges&&this.$settings.env.recommendChildBridges?i.hasChildBridges?1:-1:i.name.localeCompare(C.name));return this.loading=!1,o}catch(e){console.error(e),this.loading=!1,this.mainError=!0,this.$toastr.error(this.$translate.instant("plugins.toast_failed_to_load_plugins"),this.$translate.instant("toast.title_error"))}})}appendMetaInfo(){return y(this,null,function*(){yield Promise.all(this.installedPlugins.filter(e=>e.installedVersion).map(e=>y(this,null,function*(){try{let o=yield I(this.$api.get(`/config-editor/plugin/${encodeURIComponent(e.name)}`));e.isConfigured=o.length>0,e.isConfiguredDynamicPlatform=e.isConfigured&&Object.prototype.hasOwnProperty.call(o[0],"platform"),e.recommendChildBridge=e.isConfiguredDynamicPlatform&&this.$settings.env.recommendChildBridges&&!["homebridge","homebridge-config-ui-x"].includes(e.name),e.hasChildBridges=e.isConfigured&&o.some(C=>C._bridge&&C._bridge.username);let i=this.getPluginChildBridges(e);e.hasChildBridgesUnpaired=i.some(C=>!C.paired)}catch{e.isConfigured=!0,e.hasChildBridges=!0}})))})}search(){this.installedPlugins=[],this.loading=!0,this.showExitButton=!0,this.$api.get(`/plugins/search/${encodeURIComponent(this.form.value.query)}`).subscribe({next:e=>{let o=new Set;this.installedPlugins=e.reduce((i,C)=>{if(C.name==="homebridge-config-ui-x"||o.has(C.name))return i;if(C.newHbScope){let M=C.newHbScope.to,S=e.some(ki=>ki.name===M);(C.installedVersion||!S)&&(o.add(M),i.push(C))}else i.push(C);return i},[]),this.appendMetaInfo(),this.loading=!1},error:e=>{this.loading=!1,this.isSearchMode=!1,console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error")),this.loadInstalledPlugins()}})}onClearSearch(){this.loadInstalledPlugins()}onSubmit({value:e}){e.query.length?(this.isSearchMode=!0,this.search()):this.isSearchMode&&(this.isSearchMode=!1,this.loadInstalledPlugins())}getChildBridgeMetadata(){this.io.request("get-homebridge-child-bridge-status").subscribe(e=>{this.childBridges=e})}getPluginChildBridges(e){return this.childBridges.filter(o=>o.plugin===e.name)}ngOnDestroy(){this.navigationSubscription&&this.navigationSubscription.unsubscribe(),this.io.end()}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=V({type:n,selectors:[["ng-component"]],decls:13,vars:10,consts:[[1,"row","mb-3"],[1,"col-12"],[1,"primary-text","m-0"],[1,"row"],[1,"col-md-12"],["novalidate","",3,"ngSubmit","formGroup"],["type","text","formControlName","query",1,"hb-npm-search",3,"placeholder"],["href","javascript:void(0)",1,"hb-npm-search-clear"],[1,"d-flex","flex-wrap","justify-content-between"],["href","javascript:void(0)",1,"hb-npm-search-clear",3,"click"],[1,"far","fa-fw","fa-times-circle"],[1,"hb-plugin-space-between"],[1,"alert","alert-info","mt-4","text-center","w-100"],[3,"plugin","childBridges"],[1,"fas","fa-fw","primary-text","my-3",2,"font-size","75px",3,"ngClass"]],template:function(o,i){o&1&&(x(0,we,1,0,"app-spinner"),a(1,"div",0)(2,"div",1)(3,"h3",2),g(4),c(5,"translate"),l()()(),a(6,"div",3)(7,"div",4)(8,"form",5),m("ngSubmit",function(){return i.onSubmit(i.form)}),d(9,"input",6),c(10,"translate"),x(11,Pe,2,0,"a",7),l()()(),x(12,Be,4,1,"div",8)),o&2&&(s(i.loading?0:-1),t(4),P(u(5,6,"menu.label_plugins")),t(4),b("formGroup",i.form),t(),b("placeholder",u(10,8,"plugins.placeholder_search_plugin")),t(2),s(i.showExitButton?11:-1),t(),s(i.loading?-1:12))},dependencies:[bi,li,ti,Y,Z,ii,ri,oi,ai,Bi,$,E],styles:[".hb-npm-search[_ngcontent-%COMP%]{outline:none;box-sizing:inherit!important;background-color:inherit;height:50px!important;width:100%;border-width:.5px;padding:10px;margin-bottom:15px}@media (hover: hover){.hb-npm-search[_ngcontent-%COMP%]:hover{border:1px solid #000000}}.hb-npm-search[_ngcontent-%COMP%]:focus{border:1px solid #000000;box-shadow:0 1px #000}.hb-npm-search-clear[_ngcontent-%COMP%]{position:absolute;right:25px;font-size:35px;color:#d0d0d0;line-height:50px;cursor:pointer}.hb-plugin-space-between[_ngcontent-%COMP%]{box-sizing:border-box;width:calc(50% - 6.6666666667px)}@media only screen and (max-width: 991px){.hb-plugin-space-between[_ngcontent-%COMP%]{width:100%}}"]})}return n})();export{vn as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as n}from"./chunk-DBUCH6BG.js";import{b as s}from"./chunk-
|
|
1
|
+
import{d as n}from"./chunk-DBUCH6BG.js";import{b as s}from"./chunk-X3HBQMAM.js";import{ga as o,h as r,ma as e,w as i}from"./chunk-6ZN4TBLM.js";var l=(()=>{class t{$router=e(n);$settings=e(s);constructor(){}canActivate(){return r(this,null,function*(){return this.$settings.settingsLoaded||(yield i(this.$settings.onSettingsLoaded)),this.$settings.env.setupWizardComplete===!1||this.$router.navigate(["/"]),!0})}static \u0275fac=function(a){return new(a||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{l as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as a}from"./chunk-52JKNMP3.js";import"./chunk-PRAGJ7KY.js";import"./chunk-A2RJH2UI.js";import"./chunk-F2GROJGF.js";import"./chunk-I7ACYC4O.js";import"./chunk-KPW2P5T4.js";import"./chunk-CUKPSGYS.js";import"./chunk-I6OD3CV4.js";import"./chunk-7LC66BZE.js";import"./chunk-3NAAMMFZ.js";import"./chunk-AFY7IWPI.js";import"./chunk-ZIXTTJ4W.js";import"./chunk-44K5XVZH.js";import"./chunk-XSS6G7LC.js";import"./chunk-TEFE7EK6.js";import"./chunk-W2INV3O5.js";import"./chunk-4UVD743J.js";import"./chunk-7SGGL4QF.js";import"./chunk-DBUCH6BG.js";import"./chunk-RVY64DJT.js";import"./chunk-X3HBQMAM.js";import"./chunk-E2IVJS5Z.js";import"./chunk-GDFC3M3E.js";import"./chunk-FETTFNJ2.js";import"./chunk-6ZN4TBLM.js";export{a as SettingsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as X}from"./chunk-D33FRRVF.js";import{a as H}from"./chunk-BC4ZZQWV.js";import{a as Z}from"./chunk-XSS6G7LC.js";import{a as R}from"./chunk-TEFE7EK6.js";import{n as L}from"./chunk-W2INV3O5.js";import"./chunk-4UVD743J.js";import{a as j}from"./chunk-5NZGHO7L.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-DBUCH6BG.js";import{c as B}from"./chunk-SKU573MT.js";import{b as $}from"./chunk-QOVS4JL2.js";import{j as T}from"./chunk-A7Z6YHW7.js";import"./chunk-GDFC3M3E.js";import{a as M,b as U}from"./chunk-FETTFNJ2.js";import{$c as E,Cc as d,Dc as l,Jb as u,Kb as c,Pb as C,Ub as n,Vb as a,Wb as p,_b as y,bc as _,cc as w,g as Y,gb as o,h as z,lb as F,ma as m,mc as f,nc as g,qd as K,tb as P,ua as h,va as b,w as A,xc as v,yc as k,zb as O}from"./chunk-6ZN4TBLM.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&((window==null?void 0:window.matchMedia("(display-mode: standalone)").matches)||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||(window==null?void 0:window.Windows)||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var I=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/accessories"],re=()=>["/support"],ae=()=>["/power-options"],se=()=>["/plugins"],de=()=>["/logs"],le=()=>["/platform-tools/terminal"],pe=()=>["/config"],ce=()=>["/settings"];function me(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),d(3,"translate"),_("click",function(){h(e);let t=w();return b(t.openUnderVoltageModal())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",20),a(),n(6,"div",14),f(7),d(8,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"rpi.throttled.undervoltage_title")+" - "+l(3,4,"rpi.throttled.undervoltage_description")),o(6),g(l(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",21),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,se))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_plugins")),o(5),g(l(7,6,"menu.label_plugins")))}function _e(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,de))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_logs")),o(5),g(l(7,6,"menu.linux.label_logs")))}function fe(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,le))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_terminal")),o(5),g(l(7,6,"menu.linux.label_terminal")))}function ge(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,pe))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.config_json_editor")),o(5),g(l(7,6,"menu.config_json_editor")))}function ve(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,ce))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_settings")),o(5),g(l(7,6,"menu.label_settings")))}function he(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.reloadPage())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.reload")),o(5),g(l(7,4,"menu.reload")))}function be(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.$auth.logout())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.tooltip_logout")),o(5),g(l(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{router=m(V);translate=m(M);$auth=m(B);$settings=m($);$modal=m(L);$notification=m(X);$translate=m(M);renderer=m(F);isExpanded=!1;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){let e=this.router;this.isMobile=window.innerWidth<768;let s;window.addEventListener("resize",()=>{clearTimeout(s),s=setTimeout(()=>{this.updateListeners()},500)}),e.events.subscribe(t=>{t instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)});let e=document.querySelector(".sidebar"),s=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!s.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),s.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),s.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.renderer.setStyle(e,"opacity","20%"),this.renderer.setStyle(e,"pointer-events","none"),this.renderer.setStyle(e,"overflow","hidden")):(this.renderer.removeStyle(e,"opacity"),this.renderer.removeStyle(e,"pointer-events"),this.renderer.removeStyle(e,"overflow"))}openUnderVoltageModal(){let e=this.$modal.open(H,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let s=e.target;["menuitem","button"].includes(s.getAttribute("role"))&&s.click()}}reloadPage(){window.location.reload()}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:61,vars:67,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","../../../../assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"fa","fa-fw","fa-power-off"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(s,t){s&1&&(n(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),p(2,"span",1),n(3,"a",2),d(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),n(15,"a",2),d(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),d(28,"translate"),a()()(),O(29,me,9,8,"div",10)(30,ue,8,9,"div",10),n(31,"div",10)(32,"div",15),d(33,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(34,"div",12),p(35,"i",16),a(),n(36,"div",14),f(37),d(38,"translate"),a()()(),O(39,_e,8,9,"div",10)(40,fe,8,9,"div",10)(41,ge,8,9,"div",10)(42,ve,8,9,"div",10),n(43,"div",10)(44,"div",15),d(45,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(46,"div",12),p(47,"i",17),a(),n(48,"div",14),f(49),d(50,"translate"),a()()(),n(51,"div",10)(52,"div",15),d(53,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(54,"div",12),p(55,"i",18),a(),n(56,"div",14),f(57),d(58,"translate"),a()()(),O(59,he,8,6,"div",10)(60,be,8,6,"div",10),a()()),s&2&&(u("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",l(1,34,"menu.sidebar.aria_menu")),o(3),c("routerLink",v(56,I)),u("aria-label",l(4,36,"menu.label_status")),o(5),c("ngClass",k(57,te,t.isExpanded)),o(5),c("ngClass",k(59,ne,t.isExpanded)),o(2),c("routerLink",v(61,I)),u("aria-label",l(16,38,"menu.label_status")),o(7),c("routerLink",v(62,I))("routerLinkActive","active")("routerLinkActiveOptions",v(63,ie)),u("aria-label",l(23,40,"menu.label_status")),o(5),g(l(28,42,"menu.label_status")),o(2),C(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(),C(t.$auth.user.admin?30:-1),o(2),c("routerLink",v(64,oe))("routerLinkActive","active"),u("aria-label",l(33,44,"menu.label_accessories")),o(5),g(l(38,46,"menu.label_accessories")),o(2),C(t.$auth.user.admin?39:-1),o(),C(t.$settings.env.enableTerminalAccess&&t.$auth.user.admin?40:-1),o(),C(t.$auth.user.admin?41:-1),o(),C(t.$auth.user.admin?42:-1),o(2),c("routerLink",v(65,re))("routerLinkActive","active"),u("aria-label",l(45,48,"support.title")),o(5),g(l(50,50,"support.title")),o(3),c("routerLink",v(66,ae))("routerLinkActive","active"),u("aria-label",l(53,52,"menu.restart.title")),o(5),g(l(58,54,"menu.restart.title")),o(2),C(t.isPwa?59:-1),o(),C(t.$settings.formAuth?60:-1))},dependencies:[N,K,E,D,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 80px)!important}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var we=i=>({sidebarExpanded:i}),Xe=(()=>{class i{$auth=m(B);$modal=m(L);$router=m(V);$settings=m($);$translate=m(M);$ws=m(j);sidebarExpanded=!1;io;constructor(){}ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return z(this,null,function*(){if(this.$settings.settingsLoaded||(yield A(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,T.serverTarget)){console.log(`Server restart required. UI Version: ${T.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:T.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(s,t){s&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),s&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",k(2,we,t.sidebarExpanded)))},dependencies:[J,E,q],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return i})();export{Xe as LayoutComponent};
|
|
1
|
+
import{a as X}from"./chunk-D33FRRVF.js";import{a as H}from"./chunk-BC4ZZQWV.js";import{a as Z}from"./chunk-XSS6G7LC.js";import{a as R}from"./chunk-TEFE7EK6.js";import{n as L}from"./chunk-W2INV3O5.js";import"./chunk-4UVD743J.js";import{a as j}from"./chunk-7SGGL4QF.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-DBUCH6BG.js";import{c as B}from"./chunk-RVY64DJT.js";import{b as $}from"./chunk-X3HBQMAM.js";import{j as T}from"./chunk-E2IVJS5Z.js";import"./chunk-GDFC3M3E.js";import{a as M,b as U}from"./chunk-FETTFNJ2.js";import{$c as E,Cc as d,Dc as l,Jb as u,Kb as c,Pb as C,Ub as n,Vb as a,Wb as p,_b as y,bc as _,cc as w,g as Y,gb as o,h as z,lb as F,ma as m,mc as f,nc as g,qd as K,tb as P,ua as h,va as b,w as A,xc as v,yc as k,zb as O}from"./chunk-6ZN4TBLM.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&((window==null?void 0:window.matchMedia("(display-mode: standalone)").matches)||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||(window==null?void 0:window.Windows)||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var I=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/accessories"],re=()=>["/support"],ae=()=>["/power-options"],se=()=>["/plugins"],de=()=>["/logs"],le=()=>["/platform-tools/terminal"],pe=()=>["/config"],ce=()=>["/settings"];function me(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),d(3,"translate"),_("click",function(){h(e);let t=w();return b(t.openUnderVoltageModal())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",20),a(),n(6,"div",14),f(7),d(8,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"rpi.throttled.undervoltage_title")+" - "+l(3,4,"rpi.throttled.undervoltage_description")),o(6),g(l(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",21),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,se))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_plugins")),o(5),g(l(7,6,"menu.label_plugins")))}function _e(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,de))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_logs")),o(5),g(l(7,6,"menu.linux.label_logs")))}function fe(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,le))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_terminal")),o(5),g(l(7,6,"menu.linux.label_terminal")))}function ge(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,pe))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.config_json_editor")),o(5),g(l(7,6,"menu.config_json_editor")))}function ve(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,ce))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_settings")),o(5),g(l(7,6,"menu.label_settings")))}function he(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.reloadPage())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.reload")),o(5),g(l(7,4,"menu.reload")))}function be(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.$auth.logout())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.tooltip_logout")),o(5),g(l(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{router=m(V);translate=m(M);$auth=m(B);$settings=m($);$modal=m(L);$notification=m(X);$translate=m(M);renderer=m(F);isExpanded=!1;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){let e=this.router;this.isMobile=window.innerWidth<768;let s;window.addEventListener("resize",()=>{clearTimeout(s),s=setTimeout(()=>{this.updateListeners()},500)}),e.events.subscribe(t=>{t instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)});let e=document.querySelector(".sidebar"),s=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!s.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),s.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),s.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.renderer.setStyle(e,"opacity","20%"),this.renderer.setStyle(e,"pointer-events","none"),this.renderer.setStyle(e,"overflow","hidden")):(this.renderer.removeStyle(e,"opacity"),this.renderer.removeStyle(e,"pointer-events"),this.renderer.removeStyle(e,"overflow"))}openUnderVoltageModal(){let e=this.$modal.open(H,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let s=e.target;["menuitem","button"].includes(s.getAttribute("role"))&&s.click()}}reloadPage(){window.location.reload()}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:61,vars:67,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","../../../../assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"fa","fa-fw","fa-power-off"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(s,t){s&1&&(n(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),p(2,"span",1),n(3,"a",2),d(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),n(15,"a",2),d(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),d(28,"translate"),a()()(),O(29,me,9,8,"div",10)(30,ue,8,9,"div",10),n(31,"div",10)(32,"div",15),d(33,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(34,"div",12),p(35,"i",16),a(),n(36,"div",14),f(37),d(38,"translate"),a()()(),O(39,_e,8,9,"div",10)(40,fe,8,9,"div",10)(41,ge,8,9,"div",10)(42,ve,8,9,"div",10),n(43,"div",10)(44,"div",15),d(45,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(46,"div",12),p(47,"i",17),a(),n(48,"div",14),f(49),d(50,"translate"),a()()(),n(51,"div",10)(52,"div",15),d(53,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(54,"div",12),p(55,"i",18),a(),n(56,"div",14),f(57),d(58,"translate"),a()()(),O(59,he,8,6,"div",10)(60,be,8,6,"div",10),a()()),s&2&&(u("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",l(1,34,"menu.sidebar.aria_menu")),o(3),c("routerLink",v(56,I)),u("aria-label",l(4,36,"menu.label_status")),o(5),c("ngClass",k(57,te,t.isExpanded)),o(5),c("ngClass",k(59,ne,t.isExpanded)),o(2),c("routerLink",v(61,I)),u("aria-label",l(16,38,"menu.label_status")),o(7),c("routerLink",v(62,I))("routerLinkActive","active")("routerLinkActiveOptions",v(63,ie)),u("aria-label",l(23,40,"menu.label_status")),o(5),g(l(28,42,"menu.label_status")),o(2),C(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(),C(t.$auth.user.admin?30:-1),o(2),c("routerLink",v(64,oe))("routerLinkActive","active"),u("aria-label",l(33,44,"menu.label_accessories")),o(5),g(l(38,46,"menu.label_accessories")),o(2),C(t.$auth.user.admin?39:-1),o(),C(t.$settings.env.enableTerminalAccess&&t.$auth.user.admin?40:-1),o(),C(t.$auth.user.admin?41:-1),o(),C(t.$auth.user.admin?42:-1),o(2),c("routerLink",v(65,re))("routerLinkActive","active"),u("aria-label",l(45,48,"support.title")),o(5),g(l(50,50,"support.title")),o(3),c("routerLink",v(66,ae))("routerLinkActive","active"),u("aria-label",l(53,52,"menu.restart.title")),o(5),g(l(58,54,"menu.restart.title")),o(2),C(t.isPwa?59:-1),o(),C(t.$settings.formAuth?60:-1))},dependencies:[N,K,E,D,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 80px)!important}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var we=i=>({sidebarExpanded:i}),Xe=(()=>{class i{$auth=m(B);$modal=m(L);$router=m(V);$settings=m($);$translate=m(M);$ws=m(j);sidebarExpanded=!1;io;constructor(){}ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return z(this,null,function*(){if(this.$settings.settingsLoaded||(yield A(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,T.serverTarget)){console.log(`Server restart required. UI Version: ${T.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:T.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(s,t){s&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),s&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",k(2,we,t.sidebarExpanded)))},dependencies:[J,E,q],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return i})();export{Xe as LayoutComponent};
|