homebridge-config-ui-x 5.0.0-beta.69 → 5.0.0-beta.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -1
- package/package.json +7 -7
- package/public/{chunk-KPW2P5T4.js → chunk-2FGEOEQD.js} +2 -2
- package/public/{chunk-JHAEEOVW.js → chunk-2FXBIEFA.js} +1 -1
- package/public/chunk-2OXWNNKT.js +1 -0
- package/public/chunk-2TIYBO73.js +1 -0
- package/public/chunk-2TV4AE2B.js +1 -0
- package/public/{chunk-67JXNHZU.js → chunk-3C65WELO.js} +1 -1
- package/public/chunk-3TKE62PU.js +1 -0
- package/public/{chunk-CUKPSGYS.js → chunk-3VIG5M5R.js} +3 -3
- package/public/chunk-4NDOCFGG.js +1 -0
- package/public/{chunk-G5LGUOIC.js → chunk-4XCUHCZU.js} +1 -1
- package/public/chunk-53GLNOVG.js +1 -0
- package/public/chunk-5CVOEJKH.js +1 -0
- package/public/chunk-7JPH5SDX.js +1 -0
- package/public/chunk-7K64Z2GO.js +1 -0
- package/public/chunk-7NH4NVWO.js +1 -0
- package/public/{chunk-B2YEAISS.js → chunk-7YEHCGBQ.js} +1 -1
- package/public/chunk-A6DLVGIC.js +1 -0
- package/public/chunk-AKBHSB64.js +1 -0
- package/public/chunk-ASBFWS7L.js +2 -0
- package/public/{chunk-3GTACTUQ.js → chunk-AYAHOPHC.js} +1 -1
- package/public/chunk-BLCADRP2.js +1 -0
- package/public/chunk-BXNSJERZ.js +1 -0
- package/public/{chunk-N76LUI5K.js → chunk-C4OILQGQ.js} +1 -1
- package/public/chunk-C53ZM5K2.js +1 -0
- package/public/chunk-CBVDW3UH.js +1 -0
- package/public/chunk-CGQJWESO.js +1 -0
- package/public/chunk-CL3ZDKJG.js +1 -0
- package/public/chunk-CNEG5OIV.js +6 -0
- package/public/chunk-CUAJJ6IB.js +1 -0
- package/public/chunk-D6HAEAIY.js +1 -0
- package/public/{chunk-FETTFNJ2.js → chunk-DJKI5XBW.js} +1 -1
- package/public/chunk-DNSPHPB6.js +1 -0
- package/public/{chunk-UADGHPWZ.js → chunk-EIL4KU4D.js} +2 -2
- package/public/chunk-ENWIG42Q.js +1 -0
- package/public/chunk-F2OGU5FW.js +1 -0
- package/public/chunk-F7KMJJSW.js +23 -0
- package/public/{chunk-AFY7IWPI.js → chunk-FHMZVMZK.js} +2 -2
- package/public/chunk-FTPISXWD.js +1 -0
- package/public/chunk-GFELNZRD.js +20 -0
- package/public/chunk-H34IWNCG.js +1 -0
- package/public/chunk-HT4RSDPG.js +1 -0
- package/public/chunk-HWQ3KYIQ.js +1 -0
- package/public/{chunk-K5MAJ5RF.js → chunk-I2L3GMBC.js} +1 -1
- package/public/chunk-I44OXIOM.js +1 -0
- package/public/{chunk-L5DJ2UTP.js → chunk-I74DZSHW.js} +1 -1
- package/public/{chunk-2QMAJ3PN.js → chunk-IU44HP4M.js} +1 -1
- package/public/{chunk-V22QF6S6.js → chunk-JH55PRGX.js} +1 -1
- package/public/{chunk-ZIXTTJ4W.js → chunk-JMCN2SQV.js} +1 -1
- package/public/chunk-JOBKDXBH.js +1 -0
- package/public/chunk-JXN4RBAX.js +1 -0
- package/public/{chunk-XSS6G7LC.js → chunk-LTDUXFUG.js} +1 -1
- package/public/chunk-MNWOLOKA.js +1 -0
- package/public/chunk-MUNP54KM.js +1 -0
- package/public/chunk-OKGCGHKO.js +32 -0
- package/public/chunk-OLCJ3UHM.js +1 -0
- package/public/{chunk-IMTSM6HN.js → chunk-OR6GW5WP.js} +1 -1
- package/public/{chunk-JCKLHHH2.js → chunk-OYHOVHGM.js} +1 -1
- package/public/chunk-PCAN2IQ6.js +1 -0
- package/public/chunk-PIPVTUBD.js +1 -0
- package/public/{chunk-BEXZDO4J.js → chunk-PXFCEK22.js} +1 -1
- package/public/chunk-Q3LSTRCD.js +1 -0
- package/public/{chunk-3NAAMMFZ.js → chunk-Q7VA22QV.js} +1 -1
- package/public/chunk-QR7L4UUP.js +1 -0
- package/public/chunk-REUKAKIF.js +1 -0
- package/public/chunk-RSIXVZQ5.js +1 -0
- package/public/{chunk-TVADH2OL.js → chunk-RWMXS5CJ.js} +1 -1
- package/public/chunk-SCUB4HUR.js +1 -0
- package/public/chunk-TCMMHINS.js +1 -0
- package/public/chunk-U4V4ICSI.js +7 -0
- package/public/{chunk-HGX4YUHS.js → chunk-UIPWNZIB.js} +1 -1
- package/public/{chunk-OFBUS5IB.js → chunk-UJPIGBLW.js} +1 -1
- package/public/{chunk-SRHERU2M.js → chunk-ULBJMQJF.js} +1 -1
- package/public/{chunk-D33FRRVF.js → chunk-UR24V3JB.js} +1 -1
- package/public/{chunk-QCVDY2FW.js → chunk-WM3ZC7RY.js} +1 -1
- package/public/chunk-XCZRGZLZ.js +1 -0
- package/public/chunk-XSXBWJW4.js +1 -0
- package/public/{chunk-F4MUW63B.js → chunk-XZLDNJOX.js} +1 -1
- package/public/{chunk-I6OD3CV4.js → chunk-XZR7OZ6I.js} +1 -1
- package/public/{chunk-XLKKNOJ4.js → chunk-Y532R476.js} +1 -1
- package/public/chunk-YHABGXDF.js +5 -0
- package/public/chunk-YLJ4YK2P.js +1 -0
- package/public/chunk-YXEV6KOV.js +7 -0
- package/public/{chunk-4SN72CMA.js → chunk-ZAFVFM3T.js} +1 -1
- package/public/index.html +2 -2
- package/public/main-CCEKU4WV.js +1 -0
- package/public/polyfills-4F4B5XMZ.js +2 -0
- package/public/styles-4YGS4LAH.css +1 -0
- package/public/chunk-3H2NNUVI.js +0 -1
- package/public/chunk-3HAXS3IU.js +0 -1
- package/public/chunk-3JPSLKGD.js +0 -1
- package/public/chunk-44K5XVZH.js +0 -7
- package/public/chunk-4UVD743J.js +0 -1
- package/public/chunk-5USLVPBK.js +0 -1
- package/public/chunk-6OMIETCH.js +0 -1
- package/public/chunk-6ZN4TBLM.js +0 -7
- package/public/chunk-73NF6HFY.js +0 -1
- package/public/chunk-7EXP4HZB.js +0 -1
- package/public/chunk-ACOWZQSA.js +0 -1
- package/public/chunk-B34QXHET.js +0 -1
- package/public/chunk-BC4ZZQWV.js +0 -1
- package/public/chunk-CMUSONVW.js +0 -1
- package/public/chunk-CXXS65VA.js +0 -1
- package/public/chunk-D7NSANTX.js +0 -1
- package/public/chunk-DBUCH6BG.js +0 -1
- package/public/chunk-DYLDNTCO.js +0 -1
- package/public/chunk-FIOSU7DQ.js +0 -6
- package/public/chunk-G5O7CHKI.js +0 -20
- package/public/chunk-GDFC3M3E.js +0 -2
- package/public/chunk-GZJ5IINF.js +0 -1
- package/public/chunk-I275JECR.js +0 -1
- package/public/chunk-IAJDVYYP.js +0 -1
- package/public/chunk-IN4TCNQE.js +0 -1
- package/public/chunk-J2A3PKBA.js +0 -1
- package/public/chunk-JXU7YRFK.js +0 -1
- package/public/chunk-KH3V2KYC.js +0 -1
- package/public/chunk-L233K63S.js +0 -1
- package/public/chunk-L3LMIZ4T.js +0 -1
- package/public/chunk-LBTHDQJW.js +0 -1
- package/public/chunk-LBWDO3T4.js +0 -1
- package/public/chunk-MZQEEJH5.js +0 -1
- package/public/chunk-NOMWD75Z.js +0 -1
- package/public/chunk-NSIKUTVP.js +0 -32
- package/public/chunk-OUFTHC36.js +0 -1
- package/public/chunk-OXOBBTSH.js +0 -1
- package/public/chunk-PKS4X3TG.js +0 -1
- package/public/chunk-POGEGBM3.js +0 -1
- package/public/chunk-QN4OHVRE.js +0 -1
- package/public/chunk-RKJ4CETZ.js +0 -1
- package/public/chunk-RQNFJUYG.js +0 -1
- package/public/chunk-S6ZSRVGR.js +0 -1
- package/public/chunk-SPHSTPNY.js +0 -1
- package/public/chunk-TEFE7EK6.js +0 -1
- package/public/chunk-UEC3IA3K.js +0 -1
- package/public/chunk-UTHIJK2F.js +0 -1
- package/public/chunk-W2INV3O5.js +0 -5
- package/public/chunk-X37KHKZ4.js +0 -1
- package/public/chunk-XB3NIEFE.js +0 -1
- package/public/chunk-YEJSJ4HZ.js +0 -1
- package/public/chunk-YKDS5Y4S.js +0 -23
- package/public/main-NTAVPHBN.js +0 -1
- package/public/polyfills-JFMQVUE2.js +0 -2
- package/public/styles-SGJCHKTF.css +0 -1
package/public/chunk-G5O7CHKI.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{a as ee}from"./chunk-QCVDY2FW.js";import{a as Z,b as ne}from"./chunk-SRHERU2M.js";import{a as W,b as Y}from"./chunk-KPW2P5T4.js";import{a as X}from"./chunk-I6OD3CV4.js";import{m as J,n as K,o as U}from"./chunk-W2INV3O5.js";import{c as N,e as F,l as q,y as z}from"./chunk-4UVD743J.js";import{b as G}from"./chunk-DBUCH6BG.js";import{b as Q}from"./chunk-3GTACTUQ.js";import{h as M,k as V}from"./chunk-IMTSM6HN.js";import{a as k,b as T}from"./chunk-FETTFNJ2.js";import{Cc as s,Dc as d,Ec as O,Jb as b,Kb as v,Pb as m,Rb as I,Sb as j,Tb as H,Ub as r,Vb as a,Wb as w,_b as _,bc as h,cc as l,g as oe,gb as n,gd as L,h as S,lb as D,ma as u,mc as C,nc as x,oc as E,tb as $,tc as R,ua as f,uc as P,va as g,vc as B,w as A,zb as y}from"./chunk-6ZN4TBLM.js";var ie=oe(ne(),1);function ae(o,p){o&1&&(r(0,"div",5),w(1,"i",12),a())}function se(o,p){if(o&1){let e=_();r(0,"li",17),C(1),s(2,"date"),r(3,"button",18),s(4,"translate"),h("click",function(){let t=f(e).$implicit,c=l(3);return g(c.restore(t.id))}),w(5,"i",19),a()()}if(o&2){let e=p.$implicit;n(),E(" ",O(2,2,e.timestamp,"medium")," "),n(2),b("aria-label",d(4,5,"config.restore.copy_to_editor"))}}function le(o,p){if(o&1&&(r(0,"ul",15),j(1,se,6,7,"li",17,I),a()),o&2){let e=l(2);n(),H(e.backupList)}}function de(o,p){o&1&&(r(0,"p",16),C(1),s(2,"translate"),a()),o&2&&(n(),x(d(2,1,"config.restore.no_backups")))}function ce(o,p){if(o&1&&(r(0,"div",13),w(1,"i",14),a(),r(2,"p",13),C(3),s(4,"translate"),a(),y(5,le,3,0,"ul",15)(6,de,3,3,"p",16)),o&2){let e=l();n(3),x(d(4,3,"config.restore.title_restore_homebridge_backup")),n(2),m(e.backupList&&e.backupList.length?5:-1),n(),m(!e.backupList||!e.backupList.length?6:-1)}}function me(o,p){if(o&1){let e=_();r(0,"button",20),s(1,"translate"),h("click",function(){f(e);let t=l();return g(t.$activeModal.dismiss("Dismiss"))}),C(2),s(3,"translate"),a()}o&2&&(b("aria-label",d(1,2,"form.button_close")),n(2),E(" ",d(3,4,"form.button_close")," "))}function pe(o,p){if(o&1){let e=_();r(0,"button",20),s(1,"translate"),h("click",function(){f(e);let t=l();return g(t.$activeModal.dismiss("Dismiss"))}),C(2),s(3,"translate"),a()}o&2&&(b("aria-label",d(1,2,"form.button_close")),n(2),E(" ",d(3,4,"form.button_close")," "))}function fe(o,p){if(o&1){let e=_();r(0,"button",21),s(1,"translate"),h("click",function(){f(e);let t=l();return g(t.deleteAllBackups())}),C(2),s(3,"translate"),a()}o&2&&(b("aria-label",d(1,2,"form.button_remove")),n(2),E(" ",d(3,4,"form.button_remove")," "))}var te=(()=>{class o{$activeModal=u(J);$api=u(V);$toastr=u(M);$translate=u(k);loading=!0;backupList=[];constructor(){}ngOnInit(){this.$api.get("/config-editor/backups").subscribe({next:e=>{this.loading=!1,this.backupList=e},error:e=>{this.loading=!1,console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error"))}})}restore(e){return this.$activeModal.close(e)}deleteAllBackups(){return this.$api.delete("/config-editor/backups").subscribe({next:()=>{this.$activeModal.dismiss(),this.$toastr.success(this.$translate.instant("config.restore.toast_backups_deleted"),this.$translate.instant("toast.title_success"))},error:e=>{console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=$({type:o,selectors:[["ng-component"]],decls:17,vars:11,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","primary-text"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button",1,"btn","btn-danger","me-auto"],[1,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-history","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box"],[1,"text-center","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"btn","btn-primary","m-0","ms-3",3,"click"],[1,"fas","fa-fw","fa-arrow-right"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button",1,"btn","btn-danger","me-auto",3,"click"]],template:function(i,t){i&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),C(3),s(4,"translate"),a(),r(5,"button",3),s(6,"translate"),h("click",function(){return t.$activeModal.dismiss("Dismiss")}),a()(),r(7,"div",4),y(8,ae,2,0,"div",5)(9,ce,7,5),a(),r(10,"div",6)(11,"div",7),y(12,me,4,6,"button",8),a(),r(13,"div",9),y(14,pe,4,6,"button",8),a(),r(15,"div",10),y(16,fe,4,6,"button",11),a()()()),i&2&&(n(3),x(d(4,7,"form.button_restore")),n(2),b("aria-label",d(6,9,"form.button_close")),n(3),m(t.loading?8:-1),n(),m(t.loading?-1:9),n(3),m(!t.loading&&t.backupList.length?12:-1),n(2),m(t.loading||!t.loading&&!t.backupList.length?14:-1),n(2),m(!t.loading&&t.backupList.length?16:-1))},dependencies:[L,T],encapsulation:2})}return o})();function ge(o,p){if(o&1){let e=_();r(0,"button",13),s(1,"translate"),s(2,"translate"),h("click",function(){f(e);let t=l();return g(t.onExportConfig())}),w(3,"i",14),a()}o&2&&(v("ngbTooltip",d(1,2,"form.button_download")),b("aria-label",d(2,4,"form.button_download")))}function ue(o,p){if(o&1){let e=_();r(0,"button",15),s(1,"translate"),s(2,"translate"),h("click",function(){f(e);let t=l();return g(t.onCancelRestore())}),w(3,"i",16),a()}if(o&2){let e=l();v("disabled",e.saveInProgress)("ngbTooltip",d(1,3,"form.button_cancel")),b("aria-label",d(2,5,"form.button_cancel"))}}function he(o,p){if(o&1){let e=_();r(0,"button",13),s(1,"translate"),s(2,"translate"),h("click",function(){f(e);let t=l();return g(t.onRestore())}),w(3,"i",17),a()}o&2&&(v("ngbTooltip",d(1,2,"form.button_restore")),b("aria-label",d(2,4,"form.button_restore")))}function _e(o,p){o&1&&w(0,"i",8)}function be(o,p){o&1&&w(0,"i",9)}function Ce(o,p){if(o&1){let e=_();r(0,"ngx-monaco-editor",18),h("onInit",function(t){f(e);let c=l();return g(c.onEditorInit(t))})("keydown.control.s",function(t){f(e);let c=l();return t.preventDefault(),g(c.onSave())})("keydown.meta.s",function(t){f(e);let c=l();return t.preventDefault(),g(c.onSave())}),a()}if(o&2){let e=l();v("options",e.editorOptions)("model",e.monacoEditorModel)}}function ye(o,p){if(o&1){let e=_();r(0,"ngx-monaco-diff-editor",19),h("onInit",function(t){f(e);let c=l();return g(c.onInitDiffEditor(t))})("keydown.control.s",function(t){f(e);let c=l();return t.preventDefault(),g(c.onSave())})("keydown.meta.s",function(t){f(e);let c=l();return t.preventDefault(),g(c.onSave())}),a()}if(o&2){let e=l();v("options",e.editorOptions)("originalModel",e.monacoEditorModel)("modifiedModel",e.monacoEditorModel)}}function we(o,p){if(o&1){let e=_();r(0,"textarea",20),B("ngModelChange",function(t){f(e);let c=l();return P(c.homebridgeConfig,t)||(c.homebridgeConfig=t),g(t)}),C(1," "),a()}if(o&2){let e=l();R("ngModel",e.homebridgeConfig)}}var Ke=(()=>{class o{$api=u(V);$md=u(X);$modal=u(K);$monacoEditor=u(ee);$route=u(G);$renderer=u(D);$settings=u(Q);$toastr=u(M);$translate=u(k);homebridgeConfig;originalConfig;saveInProgress;isMobile=!1;monacoEditor;editorOptions;monacoEditorModel;editorDecorations=[];lastHeight;visualViewPortEventCallback;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"json",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",automaticLayout:!0};let e=document.querySelector(".content");this.$renderer.setStyle(e,"height","100%"),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(i=>{this.homebridgeConfig=i.config}),this.monacoEditorModel={value:"{}",language:"json",uri:window.monaco?window.monaco.Uri.parse("a://homebridge/config.json"):void 0},window.monaco?this.setMonacoEditorModel():this.$monacoEditor.readyEvent.subscribe({next:()=>{this.setMonacoEditorModel()}})}onEditorInit(e){window.editor=e,this.monacoEditor=e,this.monacoEditor.getModel().setValue(this.homebridgeConfig)}onInitDiffEditor(e){this.monacoEditor=e.modifiedEditor,e.getModel().original.setValue(this.originalConfig),e.getModel().modified.setValue(this.homebridgeConfig),window.editor=e}onSave(){return S(this,null,function*(){if(!this.saveInProgress){this.monacoEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[])),this.saveInProgress=!0;try{if(!this.isMobile){yield this.monacoEditor.getAction("editor.action.formatDocument").run();let i=window.monaco.editor.getModelMarkers({owner:"json"});for(let t of i)if(t.message==="Duplicate object key"){this.saveInProgress=!1,this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"));return}this.homebridgeConfig=this.monacoEditor.getModel().getValue()}let e=this.parseConfigFromEditor();this.homebridgeConfig=JSON.stringify(e,null,4),typeof e.bridge!="object"?this.$toastr.error(this.$translate.instant("config.config_bridge_missing"),this.$translate.instant("toast.title_error")):/^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}$/i.test(e.bridge.username)?e.accessories&&!Array.isArray(e.accessories)?this.$toastr.error(this.$translate.instant("config.config_accessory_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&!Array.isArray(e.platforms)?this.$toastr.error(this.$translate.instant("config.config_platform_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&Array.isArray(e.platforms)&&!this.validateSection(e.platforms,"platform")||e.accessories&&Array.isArray(e.accessories)&&!this.validateSection(e.accessories,"accessory")||e.plugins&&Array.isArray(e.plugins)&&!this.validatePlugins(e.plugins,"plugins")||e.disabledPlugins&&Array.isArray(e.disabledPlugins)&&!this.validatePlugins(e.disabledPlugins,"disabledPlugins")||(yield this.saveConfig(e),this.originalConfig=""):this.$toastr.error(this.$translate.instant("config.config_username_error"),this.$translate.instant("toast.title_error"))}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}parseConfigFromEditor(){try{return JSON.parse(this.homebridgeConfig)}catch{let i=ie.default.parse(this.homebridgeConfig);return this.homebridgeConfig=JSON.stringify(i,null,4),this.monacoEditor&&this.monacoEditor.getModel().setValue(this.homebridgeConfig),i}}saveConfig(e){return S(this,null,function*(){try{let i=yield A(this.$api.post("/config-editor",e));this.homebridgeConfig=JSON.stringify(i,null,4),this.$modal.open(Z,{size:"lg",backdrop:"static"})}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error"))}})}onRestore(){this.$modal.open(te,{size:"lg",backdrop:"static"}).result.then(e=>{this.originalConfig||(this.originalConfig=this.homebridgeConfig),this.$api.get(`/config-editor/backups/${e}`).subscribe({next:i=>{this.$toastr.info(this.$translate.instant("config.restore.confirm"),this.$translate.instant("config.title_backup_loaded")),this.homebridgeConfig=JSON.stringify(i,null,4),this.monacoEditor&&window.editor.modifiedEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[]),this.monacoEditor.executeEdits("beautifier",[{identifier:"delete",range:new monaco.Range(1,1,this.monacoEditor.getModel().getLineCount()+10,1),text:"",forceMoveMarkers:!0}]),this.monacoEditor.executeEdits("beautifier",[{identifier:"insert",range:new monaco.Range(1,1,1,1),text:this.homebridgeConfig,forceMoveMarkers:!0}]))},error:i=>{console.error(i),this.$toastr.error(i.error.message||this.$translate.instant("backup.load_error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}onExportConfig(){let e=`data:text/json;charset=utf-8,${encodeURIComponent(this.homebridgeConfig)}`,i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download","config.json"),document.body.appendChild(i),i.click(),i.remove()}onCancelRestore(){this.homebridgeConfig=this.originalConfig,this.originalConfig=""}validateSection(e,i){for(let t of e){if(typeof t!="object"||Array.isArray(t))return this.$toastr.error(this.$translate.instant("config.error_blocks_objects",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1;if(!t[i])return this.$toastr.error(this.$translate.instant("config.error_blocks_type",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1;if(typeof t[i]!="string")return this.$toastr.error(this.$translate.instant("config.error_string_type",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1}return!0}validatePlugins(e,i){for(let t of e)if(typeof t!="string")return this.$toastr.error(this.$translate.instant("config.error_string_array",{key:i}),this.$translate.instant("toast.title_error")),!1;return!0}highlightOffendingArrayItem(e){this.monacoEditor&&(e=JSON.stringify(e,null,4).split(`
|
|
2
|
-
`).map(i=>` ${i}`).join(`
|
|
3
|
-
`),setTimeout(()=>{let i=this.monacoEditor.getModel().findMatches(e);if(i.length){let t=i[0].range,c=new monaco.Range(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn);this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[{range:c,options:{isWholeLine:!0,linesDecorationsClassName:"hb-monaco-editor-line-error"}}])}},200))}setMonacoEditorModel(){if(window.monaco.languages.json.jsonDefaults.diagnosticsOptions.schemas.some(i=>i.uri==="http://homebridge/config.json"))return;let e=monaco.Uri.parse("a://homebridge/config.json");window.monaco.languages.json.jsonDefaults.setDiagnosticsOptions({allowComments:!1,validate:!0,schemas:[{uri:"http://homebridge/config.json",fileMatch:[e.toString()],schema:{type:"object",required:["bridge"],properties:{bridge:{type:"object",required:["name","username","port","pin"],properties:{name:{type:"string",description:`The Homebridge instance name.
|
|
4
|
-
This should be unique if you are running multiple instances of Homebridge.`,default:"Homebridge"},username:{type:"string",description:`Homebridge username must be 6 pairs of colon-separated hexadecimal characters (A-F 0-9).
|
|
5
|
-
You should change this pin if you need to re-pair your instance with HomeKit.
|
|
6
|
-
Example: 0E:89:49:64:91:86`,default:"0E:89:49:64:91:86",pattern:"^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$"},port:{type:"number",description:`The port Homebridge listens on.
|
|
7
|
-
If running more than one instance of Homebridge on the same server make sure each instance is given a unique port.`,default:51173,minimum:1025,maximum:65534},pin:{type:"string",description:`The Homebridge instance pin.
|
|
8
|
-
This is used when pairing Homebridge to HomeKit.
|
|
9
|
-
Example: 630-27-655`,default:"630-27-655",pattern:"^([0-9]{3}-[0-9]{2}-[0-9]{3})$"},manufacturer:{type:"string",description:"The bridge manufacturer to be displayed in HomeKit"},firmwareRevision:{type:"string",description:"The bridge firmware version to be displayed in HomeKit"},model:{type:"string",description:"The bridge model to be displayed in HomeKit"},bind:{description:`A string or an array of strings with the name(s) of the network interface(s) Homebridge should bind to.
|
|
10
|
-
|
|
11
|
-
Requires Homebridge v1.3 or later.`,type:["string","array"],items:{type:"string",description:"Network Interface name that Homebridge should bind to."}}},default:{name:"Homebridge",username:"0E:89:49:64:91:86",port:51173,pin:"6302-7655"}},mdns:{type:"object",properties:{interface:{type:"string",description:`The interface or IP address of the interface you want Homebridge to listen on. This is useful if your server has multiple interfaces.
|
|
12
|
-
|
|
13
|
-
Deprecated as of Homebridge v1.3.0 - use bridge.bind instead.`},legacyAdvertiser:{type:"boolean",description:"Set to `false` to use the new mdns library, ciao."}},default:{legacyAdvertiser:!1}},plugins:{type:"array",description:"An array of plugins that should be selectively enabled. Remove this array to enable all plugins.",items:{type:"string",description:`The full plugin npm package name.
|
|
14
|
-
Example: homebridge-dummy`},default:["homebridge-config-ui-x"]},disabledPlugins:{type:"array",description:`An array of plugins that should be disabled.
|
|
15
|
-
|
|
16
|
-
Requires Homebridge v1.3 or later.`,items:{type:"string",description:`The full plugin npm package name.
|
|
17
|
-
Example: homebridge-dummy`},default:[]},ports:{type:"object",description:"The range of ports that should be used for certain accessories like cameras and TVs",required:["start","end"],properties:{start:{type:"number",default:52100,minimum:1025,maximum:65534},end:{type:"number",default:52150,minimum:1025,maximum:65534}},default:{start:52100,end:52150}},platforms:{type:"array",description:`Any plugin that exposes a platform should have its config entered in this array.
|
|
18
|
-
Separate each plugin config block using a comma.`,items:{type:"object",required:["platform"],anyOf:[{type:"object",required:["platform"],properties:{platform:{type:"string",description:"This is used by Homebridge to identify which plugin this platform belongs to.",not:{enum:["config"]}},name:{type:"string",description:"The name of the platform."}}},{type:"object",properties:{platform:{type:"string",description:`Homebridge UI platform name must be set to "config".
|
|
19
|
-
Do Not Change!`,oneOf:[{enum:"config"}]},name:{type:"string",description:"The name used in the Homebridge log."}}}]}},accessories:{type:"array",description:`Any plugin that exposes an accessory should have its config entered in this array.
|
|
20
|
-
Separate each plugin config block using a comma.`,items:{type:"object",required:["accessory","name"],properties:{accessory:{type:"string",description:"This is used by Homebridge to identify which plugin this accessory belongs to."},name:{type:"string",description:"The name of the accessory."}}}}}}}]}),this.monacoEditorModel.uri=monaco.Uri.parse("a://homebridge/config.json")}visualViewPortChanged(){this.lastHeight<window.visualViewport.height&&document.activeElement.blur(),window.visualViewport.height<window.innerHeight?(this.$md.enableTouchMove(),this.lastHeight=window.visualViewport.height):window.visualViewport.height===window.innerHeight&&(this.$md.disableTouchMove(),this.lastHeight=window.visualViewport.height)}ngOnDestroy(){let e=document.querySelector(".content");this.$renderer.removeStyle(e,"height"),window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=$({type:o,selectors:[["ng-component"]],decls:18,vars:18,consts:[[1,"flex-column","d-flex","align-items-stretch","h-100"],[1,"row"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","me-2",3,"ngbTooltip"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-danger","waves-effect","my-0","me-2",3,"disabled","ngbTooltip"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","me-0",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-floppy-disk"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"options","model"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"options","originalModel","modifiedModel"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-3",3,"ngModel"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","me-2",3,"click","ngbTooltip"],[1,"fas","fa-fw","fa-download"],["container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-danger","waves-effect","my-0","me-2",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-times"],[1,"fas","fa-fw","fa-history"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"onInit","keydown.control.s","keydown.meta.s","options","model"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"onInit","keydown.control.s","keydown.meta.s","options","originalModel","modifiedModel"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-3",3,"ngModelChange","ngModel"]],template:function(i,t){i&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),C(4),s(5,"translate"),a()(),r(6,"div",4),y(7,ge,4,6,"button",5)(8,ue,4,7,"button",6)(9,he,4,6,"button",5),r(10,"button",7),s(11,"translate"),s(12,"translate"),h("click",function(){return t.onSave()}),y(13,_e,1,0,"i",8)(14,be,1,0,"i",9),a()()(),y(15,Ce,1,2,"ngx-monaco-editor",10)(16,ye,1,3,"ngx-monaco-diff-editor",11)(17,we,2,1,"textarea",12),a()),i&2&&(n(4),x(d(5,12,"menu.config_json_editor")),n(3),m(t.originalConfig?-1:7),n(),m(t.originalConfig?8:-1),n(),m(t.originalConfig?-1:9),n(),v("disabled",t.saveInProgress)("ngbTooltip",d(11,14,"form.button_save")),b("aria-label",d(12,16,"form.button_save")),n(3),m(t.saveInProgress?-1:13),n(),m(t.saveInProgress?14:-1),n(),m(!t.isMobile&&!t.originalConfig?15:-1),n(),m(!t.isMobile&&t.originalConfig?16:-1),n(),m(t.isMobile?17:-1))},dependencies:[U,W,Y,z,N,F,q,T],encapsulation:2})}return o})();export{Ke as a};
|
package/public/chunk-GDFC3M3E.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$ as ze,$a as Qe,Ba as ye,Bb as nt,Cb as K,Da as S,Db as Q,Ea as ge,Eb as Te,H as Fe,Ja as Xe,Jc as rt,Ka as Ee,Kc as st,L as Be,La as Ge,Ma as F,Oa as ve,Pa as Je,Qc as v,Rc as k,S as pe,Sc as ot,Ta as B,Tc as it,Ua as N,Va as C,Wa as Ye,Xa as qe,Ya as Ze,Za as We,_a as Ke,a as P,ab as et,b as xe,bb as O,da as p,ea as _,ga as m,ha as Z,hb as z,id as at,ja as g,jd as ee,k as je,kb as tt,kd as ct,la as u,ma as R,md as we,na as me,nd as te,pa as Ve,q as Ue,qa as He,r as fe,ra as $e,ub as W,x as U}from"./chunk-6ZN4TBLM.js";var x=class{},V=class{},A=class r{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
|
|
2
|
-
`).forEach(e=>{let n=e.indexOf(":");if(n>0){let s=e.slice(0,n),o=e.slice(n+1).trim();this.addHeaderEntry(s,o)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof r?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new r;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof r?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(t.name,e);let s=(t.op==="a"?this.headers.get(e):void 0)||[];s.push(...n),this.headers.set(e,s);break;case"d":let o=t.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let i=this.headers.get(e);if(!i)return;i=i.filter(c=>o.indexOf(c)===-1),i.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,i)}break}}addHeaderEntry(t,e){let n=t.toLowerCase();this.maybeSetNormalizedName(t,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(t,e){let n=(Array.isArray(e)?e:[e]).map(o=>o.toString()),s=t.toLowerCase();this.headers.set(s,n),this.maybeSetNormalizedName(t,s)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var re=class{encodeKey(t){return dt(t)}encodeValue(t){return dt(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function Lt(r,t){let e=new Map;return r.length>0&&r.replace(/^\?/,"").split("&").forEach(s=>{let o=s.indexOf("="),[i,c]=o==-1?[t.decodeKey(s),""]:[t.decodeKey(s.slice(0,o)),t.decodeValue(s.slice(o+1))],a=e.get(i)||[];a.push(c),e.set(i,a)}),e}var xt=/%(\d[a-f0-9])/gi,jt={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function dt(r){return encodeURIComponent(r).replace(xt,(t,e)=>{var n;return(n=jt[e])!=null?n:t})}function ne(r){return`${r}`}var D=class r{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new re,t.fromString){if(t.fromObject)throw new p(2805,!1);this.map=Lt(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let n=t.fromObject[e],s=Array.isArray(n)?n.map(ne):[ne(n)];this.map.set(e,s)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(n=>{let s=t[n];Array.isArray(s)?s.forEach(o=>{e.push({param:n,value:o,op:"a"})}):e.push({param:n,value:s,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new r({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(ne(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let n=this.map.get(t.param)||[],s=n.indexOf(ne(t.value));s!==-1&&n.splice(s,1),n.length>0?this.map.set(t.param,n):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var se=class{map=new Map;set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function Ut(r){switch(r){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function lt(r){return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer}function ut(r){return typeof Blob<"u"&&r instanceof Blob}function ht(r){return typeof FormData<"u"&&r instanceof FormData}function Ft(r){return typeof URLSearchParams<"u"&&r instanceof URLSearchParams}var ft="Content-Type",pt="Accept",yt="X-Request-URL",gt="text/plain",Et="application/json",Bt=`${Et}, ${gt}, */*`,L=class r{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;responseType="json";method;params;urlWithParams;transferCache;constructor(t,e,n,s){var i,c;this.url=e,this.method=t.toUpperCase();let o;if(Ut(this.method)||s?(this.body=n!==void 0?n:null,o=s):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),(i=this.headers)!=null||(this.headers=new A),(c=this.context)!=null||(this.context=new se),!this.params)this.params=new D,this.urlWithParams=e;else{let a=this.params.toString();if(a.length===0)this.urlWithParams=e;else{let l=e.indexOf("?"),h=l===-1?"?":l<e.length-1?"&":"";this.urlWithParams=e+h+a}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||lt(this.body)||ut(this.body)||ht(this.body)||Ft(this.body)?this.body:this.body instanceof D?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||ht(this.body)?null:ut(this.body)?this.body.type||null:lt(this.body)?null:typeof this.body=="string"?gt:this.body instanceof D?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Et:null}clone(t={}){var T,b,M,d;let e=t.method||this.method,n=t.url||this.url,s=t.responseType||this.responseType,o=(T=t.transferCache)!=null?T:this.transferCache,i=t.body!==void 0?t.body:this.body,c=(b=t.withCredentials)!=null?b:this.withCredentials,a=(M=t.reportProgress)!=null?M:this.reportProgress,l=t.headers||this.headers,h=t.params||this.params,y=(d=t.context)!=null?d:this.context;return t.setHeaders!==void 0&&(l=Object.keys(t.setHeaders).reduce((f,w)=>f.set(w,t.setHeaders[w]),l)),t.setParams&&(h=Object.keys(t.setParams).reduce((f,w)=>f.set(w,t.setParams[w]),h)),new r(e,n,i,{params:h,headers:l,context:y,reportProgress:a,responseType:s,withCredentials:c,transferCache:o})}},I=function(r){return r[r.Sent=0]="Sent",r[r.UploadProgress=1]="UploadProgress",r[r.ResponseHeader=2]="ResponseHeader",r[r.DownloadProgress=3]="DownloadProgress",r[r.Response=4]="Response",r[r.User=5]="User",r}(I||{}),j=class{headers;status;statusText;url;ok;type;constructor(t,e=200,n="OK"){this.headers=t.headers||new A,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},oe=class r extends j{constructor(t={}){super(t)}type=I.ResponseHeader;clone(t={}){return new r({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},H=class r extends j{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=I.Response;clone(t={}){return new r({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},$=class extends j{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},zt=200,Vt=204;function Re(r,t){return{body:t,headers:r.headers,context:r.context,observe:r.observe,params:r.params,reportProgress:r.reportProgress,responseType:r.responseType,withCredentials:r.withCredentials,transferCache:r.transferCache}}var vt=(()=>{class r{handler;constructor(e){this.handler=e}request(e,n,s={}){let o;if(e instanceof L)o=e;else{let a;s.headers instanceof A?a=s.headers:a=new A(s.headers);let l;s.params&&(s.params instanceof D?l=s.params:l=new D({fromObject:s.params})),o=new L(e,n,s.body!==void 0?s.body:null,{headers:a,context:s.context,params:l,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache})}let i=fe(o).pipe(Be(a=>this.handler.handle(a)));if(e instanceof L||s.observe==="events")return i;let c=i.pipe(Fe(a=>a instanceof H));switch(s.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return c.pipe(U(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new p(2806,!1);return a.body}));case"blob":return c.pipe(U(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new p(2807,!1);return a.body}));case"text":return c.pipe(U(a=>{if(a.body!==null&&typeof a.body!="string")throw new p(2808,!1);return a.body}));case"json":default:return c.pipe(U(a=>a.body))}case"response":return c;default:throw new p(2809,!1)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new D().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,s={}){return this.request("PATCH",e,Re(s,n))}post(e,n,s={}){return this.request("POST",e,Re(s,n))}put(e,n,s={}){return this.request("PUT",e,Re(s,n))}static \u0275fac=function(n){return new(n||r)(u(x))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})();var Ht=new g("");function Tt(r,t){return t(r)}function $t(r,t){return(e,n)=>t.intercept(e,{handle:s=>r(s,n)})}function Xt(r,t,e){return(n,s)=>$e(e,()=>t(n,o=>r(o,s)))}var wt=new g(""),_e=new g(""),Rt=new g(""),De=new g("",{providedIn:"root",factory:()=>!0});function Gt(){let r=null;return(t,e)=>{var o;r===null&&(r=((o=R(wt,{optional:!0}))!=null?o:[]).reduceRight($t,Tt));let n=R(ye);if(R(De)){let i=n.add();return r(t,e).pipe(pe(()=>n.remove(i)))}else return r(t,e)}}var ie=(()=>{class r extends x{backend;injector;chain=null;pendingTasks=R(ye);contributeToStability=R(De);constructor(e,n){super(),this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(_e),...this.injector.get(Rt,[])]));this.chain=n.reduceRight((s,o)=>Xt(s,o,this.injector),Tt)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,s=>this.backend.handle(s)).pipe(pe(()=>this.pendingTasks.remove(n)))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||r)(u(V),u(He))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})();var Jt=/^\)\]\}',?\n/,Yt=RegExp(`^${yt}:`,"m");function qt(r){return"responseURL"in r&&r.responseURL?r.responseURL:Yt.test(r.getAllResponseHeaders())?r.getResponseHeader(yt):null}var Me=(()=>{class r{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new p(-2800,!1);let n=this.xhrFactory;return(n.\u0275loadImpl?Ue(n.\u0275loadImpl()):fe(null)).pipe(ze(()=>new je(o=>{let i=n.build();if(i.open(e.method,e.urlWithParams),e.withCredentials&&(i.withCredentials=!0),e.headers.forEach((d,f)=>i.setRequestHeader(d,f.join(","))),e.headers.has(pt)||i.setRequestHeader(pt,Bt),!e.headers.has(ft)){let d=e.detectContentTypeHeader();d!==null&&i.setRequestHeader(ft,d)}if(e.responseType){let d=e.responseType.toLowerCase();i.responseType=d!=="json"?d:"text"}let c=e.serializeBody(),a=null,l=()=>{if(a!==null)return a;let d=i.statusText||"OK",f=new A(i.getAllResponseHeaders()),w=qt(i)||e.url;return a=new oe({headers:f,status:i.status,statusText:d,url:w}),a},h=()=>{let{headers:d,status:f,statusText:w,url:Le}=l(),E=null;f!==Vt&&(E=typeof i.response>"u"?i.responseText:i.response),f===0&&(f=E?zt:0);let he=f>=200&&f<300;if(e.responseType==="json"&&typeof E=="string"){let Ct=E;E=E.replace(Jt,"");try{E=E!==""?JSON.parse(E):null}catch(kt){E=Ct,he&&(he=!1,E={error:kt,text:E})}}he?(o.next(new H({body:E,headers:d,status:f,statusText:w,url:Le||void 0})),o.complete()):o.error(new $({error:E,headers:d,status:f,statusText:w,url:Le||void 0}))},y=d=>{let{url:f}=l(),w=new $({error:d,status:i.status||0,statusText:i.statusText||"Unknown Error",url:f||void 0});o.error(w)},T=!1,b=d=>{T||(o.next(l()),T=!0);let f={type:I.DownloadProgress,loaded:d.loaded};d.lengthComputable&&(f.total=d.total),e.responseType==="text"&&i.responseText&&(f.partialText=i.responseText),o.next(f)},M=d=>{let f={type:I.UploadProgress,loaded:d.loaded};d.lengthComputable&&(f.total=d.total),o.next(f)};return i.addEventListener("load",h),i.addEventListener("error",y),i.addEventListener("timeout",y),i.addEventListener("abort",y),e.reportProgress&&(i.addEventListener("progress",b),c!==null&&i.upload&&i.upload.addEventListener("progress",M)),i.send(c),o.next({type:I.Sent}),()=>{i.removeEventListener("error",y),i.removeEventListener("abort",y),i.removeEventListener("load",h),i.removeEventListener("timeout",y),e.reportProgress&&(i.removeEventListener("progress",b),c!==null&&i.upload&&i.upload.removeEventListener("progress",M)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(n){return new(n||r)(u(te))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),Mt=new g(""),Zt="XSRF-TOKEN",Wt=new g("",{providedIn:"root",factory:()=>Zt}),Kt="X-XSRF-TOKEN",Qt=new g("",{providedIn:"root",factory:()=>Kt}),X=class{},en=(()=>{class r{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,n){this.doc=e,this.cookieName=n}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=ee(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||r)(u(v),u(Wt))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})();function tn(r,t){let e=r.url.toLowerCase();if(!R(Mt)||r.method==="GET"||r.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(r);let n=R(X).getToken(),s=R(Qt);return n!=null&&!r.headers.has(s)&&(r=r.clone({headers:r.headers.set(s,n)})),t(r)}var Se=function(r){return r[r.Interceptors=0]="Interceptors",r[r.LegacyInterceptors=1]="LegacyInterceptors",r[r.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",r[r.NoXsrfProtection=3]="NoXsrfProtection",r[r.JsonpSupport=4]="JsonpSupport",r[r.RequestsMadeViaParent=5]="RequestsMadeViaParent",r[r.Fetch=6]="Fetch",r}(Se||{});function nn(r,t){return{\u0275kind:r,\u0275providers:t}}function rn(...r){let t=[vt,Me,ie,{provide:x,useExisting:ie},{provide:V,useFactory:()=>{var e;return(e=R(Ht,{optional:!0}))!=null?e:R(Me)}},{provide:_e,useValue:tn,multi:!0},{provide:Mt,useValue:!0},{provide:X,useClass:en}];for(let e of r)t.push(...e.\u0275providers);return me(t)}var mt=new g("");function sn(){return nn(Se.LegacyInterceptors,[{provide:mt,useFactory:Gt},{provide:_e,useExisting:mt,multi:!0}])}var de=new g(""),Pe=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,n){this._zone=n,e.forEach(s=>{s.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,s,o){return this._findPluginFor(n).addEventListener(e,n,s,o)}getZone(){return this._zone}_findPluginFor(e){let n=this._eventNameToPlugin.get(e);if(n)return n;if(n=this._plugins.find(o=>o.supports(e)),!n)throw new p(5101,!1);return this._eventNameToPlugin.set(e,n),n}static \u0275fac=function(n){return new(n||r)(u(de),u(S))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),G=class{_doc;constructor(t){this._doc=t}manager},ae="ng-app-id";function bt(r){for(let t of r)t.remove()}function _t(r,t){let e=t.createElement("style");return e.textContent=r,e}function on(r,t,e,n){var o;let s=(o=r.head)==null?void 0:o.querySelectorAll(`style[${ae}="${t}"],link[${ae}="${t}"]`);if(s)for(let i of s)i.removeAttribute(ae),i instanceof HTMLLinkElement?n.set(i.href.slice(i.href.lastIndexOf("/")+1),{usage:0,elements:[i]}):i.textContent&&e.set(i.textContent,{usage:0,elements:[i]})}function Oe(r,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var Ne=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,n,s,o={}){this.doc=e,this.appId=n,this.nonce=s,this.isServer=we(o),on(e,n,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,n){for(let s of e)this.addUsage(s,this.inline,_t);n==null||n.forEach(s=>this.addUsage(s,this.external,Oe))}removeStyles(e,n){for(let s of e)this.removeUsage(s,this.inline);n==null||n.forEach(s=>this.removeUsage(s,this.external))}addUsage(e,n,s){let o=n.get(e);o?o.usage++:n.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,s(e,this.doc)))})}removeUsage(e,n){let s=n.get(e);s&&(s.usage--,s.usage<=0&&(bt(s.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])bt(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[n,{elements:s}]of this.inline)s.push(this.addElement(e,_t(n,this.doc)));for(let[n,{elements:s}]of this.external)s.push(this.addElement(e,Oe(n,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,n){return this.nonce&&n.setAttribute("nonce",this.nonce),this.isServer&&n.setAttribute(ae,this.appId),e.appendChild(n)}static \u0275fac=function(n){return new(n||r)(u(v),u(Ee),u(ve,8),u(F))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),Ae={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Ce=/%COMP%/g;var St="%COMP%",an=`_nghost-${St}`,cn=`_ngcontent-${St}`,dn=!0,ln=new g("",{providedIn:"root",factory:()=>dn});function un(r){return cn.replace(Ce,r)}function hn(r){return an.replace(Ce,r)}function At(r,t){return t.map(e=>e.replace(Ce,r))}var ke=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,n,s,o,i,c,a,l=null,h=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=s,this.removeStylesOnCompDestroy=o,this.doc=i,this.platformId=c,this.ngZone=a,this.nonce=l,this.tracingService=h,this.platformIsServer=we(c),this.defaultRenderer=new J(e,i,a,this.platformIsServer,this.tracingService)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;this.platformIsServer&&n.encapsulation===B.ShadowDom&&(n=xe(P({},n),{encapsulation:B.Emulated}));let s=this.getOrCreateRenderer(e,n);return s instanceof ce?s.applyToHost(e):s instanceof Y&&s.applyStyles(),s}getOrCreateRenderer(e,n){let s=this.rendererByCompId,o=s.get(n.id);if(!o){let i=this.doc,c=this.ngZone,a=this.eventManager,l=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,y=this.platformIsServer,T=this.tracingService;switch(n.encapsulation){case B.Emulated:o=new ce(a,l,n,this.appId,h,i,c,y,T);break;case B.ShadowDom:return new Ie(a,l,e,n,i,c,this.nonce,y,T);default:o=new Y(a,l,n,h,i,c,y,T);break}s.set(n.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(n){return new(n||r)(u(Pe),u(Ne),u(Ee),u(ln),u(v),u(F),u(S),u(ve),u(Je,8))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),J=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,n,s,o){this.eventManager=t,this.doc=e,this.ngZone=n,this.platformIsServer=s,this.tracingService=o}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(Ae[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(Dt(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(Dt(t)?t.content:t).insertBefore(e,n)}removeChild(t,e){e.remove()}selectRootElement(t,e){let n=typeof t=="string"?this.doc.querySelector(t):t;if(!n)throw new p(-5104,!1);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,s){if(s){e=s+":"+e;let o=Ae[s];o?t.setAttributeNS(o,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){let s=Ae[n];s?t.removeAttributeNS(s,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,s){s&(z.DashCase|z.Important)?t.style.setProperty(e,n,s&z.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&z.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t!=null&&(t[e]=n)}setValue(t,e){t.nodeValue=e}listen(t,e,n,s){var i;if(typeof t=="string"&&(t=k().getGlobalEventTarget(this.doc,t),!t))throw new p(5102,!1);let o=this.decoratePreventDefault(n);return(i=this.tracingService)!=null&&i.wrapEventListener&&(o=this.tracingService.wrapEventListener(t,e,o)),this.eventManager.addEventListener(t,e,o,s)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(e)):t(e))===!1&&e.preventDefault()}}};function Dt(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var Ie=class extends J{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,n,s,o,i,c,a,l){var b;super(t,o,i,a,l),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let h=s.styles;h=At(s.id,h);for(let M of h){let d=document.createElement("style");c&&d.setAttribute("nonce",c),d.textContent=M,this.shadowRoot.appendChild(d)}let y=(b=s.getExternalStyles)==null?void 0:b.call(s);if(y)for(let M of y){let d=Oe(M,o);c&&d.setAttribute("nonce",c),this.shadowRoot.appendChild(d)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Y=class extends J{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,n,s,o,i,c,a,l){var T;super(t,o,i,c,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=s;let h=n.styles;this.styles=l?At(l,h):h,this.styleUrls=(T=n.getExternalStyles)==null?void 0:T.call(n,l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},ce=class extends Y{contentAttr;hostAttr;constructor(t,e,n,s,o,i,c,a,l){let h=s+"-"+n.id;super(t,e,n,o,i,c,a,l,h),this.contentAttr=un(h),this.hostAttr=hn(h)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}};var le=class r extends it{supportsDOMEvents=!0;static makeCurrent(){ot(new r)}onAndCancel(t,e,n,s){return t.addEventListener(e,n,s),()=>{t.removeEventListener(e,n,s)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=fn();return e==null?null:pn(e)}resetBaseElement(){q=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return ee(document.cookie,t)}},q=null;function fn(){return q=q||document.head.querySelector("base"),q?q.getAttribute("href"):null}function pn(r){return new URL(r,document.baseURI).pathname}var ue=class{addToWindow(t){_.getAngularTestability=(n,s=!0)=>{let o=t.findTestabilityInTree(n,s);if(o==null)throw new p(5103,!1);return o},_.getAllAngularTestabilities=()=>t.getAllTestabilities(),_.getAllAngularRootElements=()=>t.getAllRootElements();let e=n=>{let s=_.getAllAngularTestabilities(),o=s.length,i=function(){o--,o==0&&n()};s.forEach(c=>{c.whenStable(i)})};_.frameworkStabilizers||(_.frameworkStabilizers=[]),_.frameworkStabilizers.push(e)}findTestabilityInTree(t,e,n){if(e==null)return null;let s=t.getTestability(e);return s!=null?s:n?k().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}},mn=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||r)};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),It=(()=>{class r extends G{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,s,o){return e.addEventListener(n,s,o),()=>this.removeEventListener(e,n,s,o)}removeEventListener(e,n,s,o){return e.removeEventListener(n,s,o)}static \u0275fac=function(n){return new(n||r)(u(v))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})(),Ot=["alt","control","meta","shift"],yn={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},gn={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},Pt=(()=>{class r extends G{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,n,s,o){let i=r.parseEventName(n),c=r.eventCallback(i.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>k().onAndCancel(e,i.domEventName,c,o))}static parseEventName(e){let n=e.toLowerCase().split("."),s=n.shift();if(n.length===0||!(s==="keydown"||s==="keyup"))return null;let o=r._normalizeKey(n.pop()),i="",c=n.indexOf("code");if(c>-1&&(n.splice(c,1),i="code."),Ot.forEach(l=>{let h=n.indexOf(l);h>-1&&(n.splice(h,1),i+=l+".")}),i+=o,n.length!=0||o.length===0)return null;let a={};return a.domEventName=s,a.fullKey=i,a}static matchEventFullKeyCode(e,n){let s=yn[e.key]||e.key,o="";return n.indexOf("code.")>-1&&(s=e.code,o="code."),s==null||!s?!1:(s=s.toLowerCase(),s===" "?s="space":s==="."&&(s="dot"),Ot.forEach(i=>{if(i!==s){let c=gn[i];c(e)&&(o+=i+".")}}),o+=s,o===n)}static eventCallback(e,n,s){return o=>{r.matchEventFullKeyCode(o,e)&&s.runGuarded(()=>n(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(n){return new(n||r)(u(v))};static \u0275prov=m({token:r,factory:r.\u0275fac})}return r})();function En(r,t){return st(P({rootComponent:r},vn(t)))}function vn(r){var t;return{appProviders:[...Nt,...(t=r==null?void 0:r.providers)!=null?t:[]],platformProviders:Mn}}function Tn(){le.makeCurrent()}function wn(){return new ge}function Rn(){return Xe(document),document}var Mn=[{provide:F,useValue:ct},{provide:Ge,useValue:Tn,multi:!0},{provide:v,useFactory:Rn}];var bn=[{provide:K,useClass:ue},{provide:nt,useClass:Q,deps:[S,Te,K]},{provide:Q,useClass:Q,deps:[S,Te,K]}],Nt=[{provide:Ve,useValue:"root"},{provide:ge,useFactory:wn},{provide:de,useClass:It,multi:!0,deps:[v]},{provide:de,useClass:Pt,multi:!0,deps:[v]},ke,Ne,Pe,{provide:tt,useExisting:ke},{provide:te,useClass:mn},[]],_n=(()=>{class r{constructor(){}static \u0275fac=function(n){return new(n||r)};static \u0275mod=W({type:r});static \u0275inj=Z({providers:[...Nt,...bn],imports:[at,rt]})}return r})();var qr=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(n){return new(n||r)(u(v))};static \u0275prov=m({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Sn=(()=>{class r{static \u0275fac=function(n){return new(n||r)};static \u0275prov=m({token:r,factory:function(n){let s=null;return n?s=new(n||r):s=u(An),s},providedIn:"root"})}return r})(),An=(()=>{class r extends Sn{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case O.NONE:return n;case O.HTML:return C(n,"HTML")?N(n):et(this._doc,String(n)).toString();case O.STYLE:return C(n,"Style")?N(n):n;case O.SCRIPT:if(C(n,"Script"))return N(n);throw new p(5200,!1);case O.URL:return C(n,"URL")?N(n):Qe(String(n));case O.RESOURCE_URL:if(C(n,"ResourceURL"))return N(n);throw new p(5201,!1);default:throw new p(5202,!1)}}bypassSecurityTrustHtml(e){return Ye(e)}bypassSecurityTrustStyle(e){return qe(e)}bypassSecurityTrustScript(e){return Ze(e)}bypassSecurityTrustUrl(e){return We(e)}bypassSecurityTrustResourceUrl(e){return Ke(e)}static \u0275fac=function(n){return new(n||r)(u(v))};static \u0275prov=m({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{V as a,D as b,I as c,H as d,vt as e,wt as f,rn as g,sn as h,ke as i,En as j,_n as k,qr as l,Sn as m};
|
package/public/chunk-GZJ5IINF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-V22QF6S6.js";import{q as p}from"./chunk-W2INV3O5.js";import{z as m}from"./chunk-4UVD743J.js";import{g as i}from"./chunk-DBUCH6BG.js";import"./chunk-3GTACTUQ.js";import"./chunk-IMTSM6HN.js";import"./chunk-GDFC3M3E.js";import{c as s}from"./chunk-FETTFNJ2.js";import{ha as t,id as n,ub as r}from"./chunk-6ZN4TBLM.js";var a=[{path:"",loadComponent:()=>import("./chunk-IAJDVYYP.js").then(o=>o.PowerOptionsComponent)}],u=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(a),i]})}return o})();var j=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n,u,p,m,s]})}return o})();export{j as PowerOptionsModule};
|
package/public/chunk-I275JECR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-6OMIETCH.js";import{q as n}from"./chunk-W2INV3O5.js";import{z as p}from"./chunk-4UVD743J.js";import{g as i}from"./chunk-DBUCH6BG.js";import"./chunk-GDFC3M3E.js";import{c as u}from"./chunk-FETTFNJ2.js";import{ha as t,id as m,ub as r}from"./chunk-6ZN4TBLM.js";var l=[{path:"",loadComponent:()=>import("./chunk-OXOBBTSH.js").then(o=>o.SupportComponent)}],d=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(l),i]})}return o})();var R=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[m,d,n,p,u]})}return o})();export{R as SupportModule};
|
package/public/chunk-IAJDVYYP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-V22QF6S6.js";import"./chunk-W2INV3O5.js";import"./chunk-4UVD743J.js";import"./chunk-DBUCH6BG.js";import"./chunk-3GTACTUQ.js";import"./chunk-IMTSM6HN.js";import"./chunk-GDFC3M3E.js";import"./chunk-FETTFNJ2.js";import"./chunk-6ZN4TBLM.js";export{a as PowerOptionsComponent};
|
package/public/chunk-IN4TCNQE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as a}from"./chunk-CMUSONVW.js";import"./chunk-UTHIJK2F.js";import"./chunk-7EXP4HZB.js";import"./chunk-NSIKUTVP.js";import"./chunk-SRHERU2M.js";import"./chunk-KPW2P5T4.js";import"./chunk-CUKPSGYS.js";import"./chunk-I6OD3CV4.js";import"./chunk-JHAEEOVW.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-L5DJ2UTP.js";import"./chunk-DBUCH6BG.js";import"./chunk-XLKKNOJ4.js";import"./chunk-3GTACTUQ.js";import"./chunk-IMTSM6HN.js";import"./chunk-GDFC3M3E.js";import"./chunk-FETTFNJ2.js";import"./chunk-6ZN4TBLM.js";export{a as SettingsComponent};
|
package/public/chunk-J2A3PKBA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as h}from"./chunk-TVADH2OL.js";import{b}from"./chunk-FETTFNJ2.js";import{Cc as y,Dc as T,Ub as r,Vb as o,Wb as u,bc as p,fb as l,gb as s,jc as f,kc as v,ma as a,mc as g,n as m,nc as w,pb as d,tb as c}from"./chunk-6ZN4TBLM.js";var C=["terminaloutput"],k=(()=>{class t{$terminal=a(h);termTarget=d("terminaloutput");resizeEvent=new m;constructor(){}onWindowResize(){this.resizeEvent.next(void 0)}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.$terminal.startTerminal(this.termTarget(),{},this.resizeEvent),this.$terminal.term.focus()}ngOnDestroy(){window.document.querySelector("body").classList.remove("bg-black"),this.$terminal.destroyTerminal()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=c({type:t,selectors:[["ng-component"]],viewQuery:function(e,n){e&1&&f(n.termTarget,C,5),e&2&&v()},hostBindings:function(e,n){e&1&&p("resize",function(x){return n.onWindowResize(x)},!1,l)},decls:8,vars:3,consts:[["terminaloutput",""],[1,"row","mb-3"],[1,"col-12"],[1,"primary-text","m-0"],[1,"flex-column","d-flex","align-items-stretch","adjust-for-mobile"],["id","docker-terminal",1,"align-self-end","w-100","h-100","mb-1"]],template:function(e,n){e&1&&(r(0,"div",1)(1,"div",2)(2,"h3",3),g(3),y(4,"translate"),o()()(),r(5,"div",4),u(6,"div",5,0),o()),e&2&&(s(3),w(T(4,1,"menu.linux.label_terminal")))},dependencies:[b],encapsulation:2})}return t})();export{k as a};
|
package/public/chunk-JXU7YRFK.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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-NSIKUTVP.js";import{a as H}from"./chunk-SRHERU2M.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-L5DJ2UTP.js";import{a as fi,d as _i}from"./chunk-DBUCH6BG.js";import{b as U}from"./chunk-3GTACTUQ.js";import{h as F,k as R}from"./chunk-IMTSM6HN.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};
|
package/public/chunk-KH3V2KYC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as ie,a as U,b as X,c as Y,f as te}from"./chunk-S6ZSRVGR.js";import{a as ne}from"./chunk-I6OD3CV4.js";import{m as $,n as K,o as Q}from"./chunk-W2INV3O5.js";import{c as W,e as R,f as j,i as z,l as q,m as G,y as J}from"./chunk-4UVD743J.js";import{c as ee}from"./chunk-XLKKNOJ4.js";import{b as Z}from"./chunk-3GTACTUQ.js";import{b as M}from"./chunk-FETTFNJ2.js";import{$c as O,Cc as s,Dc as l,Ec as H,Jb as v,Kb as _,Pb as h,Rb as I,Sb as V,Tb as F,Ub as a,Vb as r,Wb as p,_b as B,bc as b,cb as N,cc as m,gb as o,ma as f,mc as d,nc as u,oc as w,tb as y,tc as k,ua as x,uc as T,va as C,vc as A,xc as L,yc as E,zb as S}from"./chunk-6ZN4TBLM.js";var oe=(()=>{class t{$activeModal=f($);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["ng-component"]],decls:31,vars:21,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-fw","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),d(4),s(5,"translate"),r(),a(6,"button",3),s(7,"translate"),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),r()(),a(8,"div",4)(9,"div",5),p(10,"i",6),r(),a(11,"ul",7)(12,"li"),d(13),s(14,"translate"),r(),a(15,"li"),d(16),s(17,"translate"),r(),a(18,"li"),d(19),s(20,"translate"),r(),a(21,"li"),d(22),s(23,"translate"),r()()(),a(24,"div",8),p(25,"div",9),a(26,"div",10)(27,"button",11),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),d(28),s(29,"translate"),r()(),p(30,"div",12),r()()()),i&2&&(o(4),u(l(5,7,"support.title")),o(2),v("aria-label",l(7,9,"form.button_close")),o(7),u(l(14,11,"accessories.support.list_1")),o(3),u(l(17,13,"accessories.support.list_2")),o(3),u(l(20,15,"accessories.support.list_3")),o(3),u(l(23,17,"accessories.support.list_4")),o(6),w(" ",l(29,19,"form.button_close")," "))},dependencies:[M],encapsulation:2})}return t})();var se=()=>({standalone:!0}),ae=(()=>{class t{$activeModal=f($);roomName;constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["ng-component"]],inputs:{roomName:"roomName"},decls:28,vars:19,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-folder-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["autocomplete","off","type","text","id","form-name","autofocus","",1,"form-control","custom-input",3,"ngModelChange","keyup.enter","ngModel","ngModelOptions"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(i,n){i&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),d(4),s(5,"translate"),r(),a(6,"button",3),s(7,"translate"),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),r()(),a(8,"div",4)(9,"div",5),p(10,"i",6),r(),a(11,"ul",7)(12,"li",8)(13,"label",9),d(14),s(15,"translate"),r(),a(16,"div",10)(17,"input",11),A("ngModelChange",function(D){return T(n.roomName,D)||(n.roomName=D),D}),b("keyup.enter",function(){return n.$activeModal.close(n.roomName)}),r()()()()(),a(18,"div",12)(19,"div",13)(20,"button",14),b("click",function(){return n.$activeModal.dismiss("Dismiss")}),d(21),s(22,"translate"),r()(),p(23,"div",15),a(24,"div",16)(25,"button",17),b("click",function(){return n.$activeModal.close(n.roomName)}),d(26),s(27,"translate"),r()()()()()),i&2&&(o(4),u(l(5,8,"accessories.button_add_room")),o(2),v("aria-label",l(7,10,"form.button_close")),o(8),u(l(15,12,"accessories.room_name")),o(3),k("ngModel",n.roomName),_("ngModelOptions",L(18,se)),o(4),w(" ",l(22,14,"form.button_close")," "),o(4),_("disabled",!n.roomName),o(),w(" ",l(27,16,"form.button_save")," "))},dependencies:[J,G,W,R,j,q,z,M],encapsulation:2})}return t})();var re=(()=>{class t{constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-drag-here-placeholder"]],decls:5,vars:3,consts:[[1,"accessory-box"],[1,"fas","fa-fw","fa-arrow-alt-circle-down","accessory-icon"],[1,"accessory-label"]],template:function(i,n){i&1&&(a(0,"div",0),p(1,"i",1),a(2,"div",2),d(3),s(4,"translate"),r()()),i&2&&(o(3),u(l(4,1,"accessories.control.drag_here")))},dependencies:[M],styles:[".accessory-box[_ngcontent-%COMP%]{opacity:.2}"]})}return t})();var le=t=>({"cursor-move":t}),ce=t=>({"justify-content-between":t}),de=t=>({link:t});function pe(t,g){if(t&1&&(a(0,"div",0)(1,"div",18)(2,"h5",19),d(3),s(4,"translate"),r()()()),t&2){let e=m().$implicit,i=m(2);o(2),_("ngClass",E(4,le,!i.isMobile)),o(),w(" ",e.name==="Default Room"?l(4,2,"accessories.control.default_room"):e.name," ")}}function me(t,g){if(t&1&&(a(0,"div",22),p(1,"app-accessory-tile",23),r()),t&2){let e=m().$implicit;o(),_("service",e)}}function ue(t,g){if(t&1&&S(0,me,2,1,"div",22),t&2){let e=g.$implicit,i=m(4);h(!i.hideHidden||!e.hidden?0:-1)}}function _e(t,g){if(t&1){let e=B();a(0,"div",20),A("dragulaModelChange",function(n){x(e);let c=m().$implicit;return T(c.services,n)||(c.services=n),C(n)}),V(1,ue,1,1,null,null,I),p(3,"div",21)(4,"div",21)(5,"div",21)(6,"div",21)(7,"div",21)(8,"div",21)(9,"div",21)(10,"div",21)(11,"div",21)(12,"div",21),r()}if(t&2){let e=m().$implicit,i=m(2);_("ngClass",E(3,ce,i.isMobile))("dragula","services-bag"),k("dragulaModel",e.services),o(),F(e.services)}}function be(t,g){if(t&1){let e=B();a(0,"div",24),A("dragulaModelChange",function(n){x(e);let c=m().$implicit;return T(c.services,n)||(c.services=n),C(n)}),p(1,"app-drag-here-placeholder",25),r()}if(t&2){let e=m().$implicit;_("dragula","services-bag"),k("dragulaModel",e.services)}}function fe(t,g){if(t&1&&(a(0,"div"),S(1,pe,5,6,"div",0),a(2,"div",15),S(3,_e,13,5,"div",16)(4,be,2,2,"div",17),r()()),t&2){let e=g.$implicit,i=m(2);o(),h(!i.isMobile||e.services.length?1:-1),o(2),h(e.services.length?3:-1),o(),h(!e.services.length&&!i.isMobile?4:-1)}}function ge(t,g){if(t&1){let e=B();a(0,"div",1)(1,"div",2)(2,"h3",3),d(3),s(4,"translate"),r()(),a(5,"div",4)(6,"button",5),s(7,"translate"),s(8,"translate"),b("click",function(){x(e);let n=m();return C(n.addRoom())}),p(9,"i",6),r(),a(10,"button",5),s(11,"translate"),s(12,"translate"),s(13,"translate"),s(14,"translate"),b("click",function(){x(e);let n=m();return C(n.hideHidden=!n.hideHidden)}),p(15,"i",7),r(),a(16,"div",8)(17,"button",9),s(18,"translate"),s(19,"translate"),b("click",function(){x(e);let n=m();return C(n.toggleLayoutLock())}),p(20,"i",10),r(),a(21,"button",9),s(22,"translate"),s(23,"translate"),b("click",function(){x(e);let n=m();return C(n.toggleLayoutLock())}),p(24,"i",11),r()(),a(25,"button",12),s(26,"translate"),b("click",function(){x(e);let n=m();return C(n.openSupport())}),p(27,"i",13),r()()(),a(28,"div",14),A("dragulaModelChange",function(n){x(e);let c=m();return T(c.$accessories.rooms,n)||(c.$accessories.rooms=n),C(n)}),V(29,fe,5,3,"div",null,I),r()}if(t&2){let e=m();o(3),u(l(4,17,"accessories.title_accessories")),o(3),_("hidden",e.isMobile)("ngbTooltip",l(7,19,"accessories.button_add_room")),v("aria-label",l(8,21,"accessories.button_add_room")),o(4),_("hidden",e.isMobile)("ngbTooltip",e.hideHidden?l(11,23,"accessories.button_hidden_show"):l(12,25,"accessories.button_hidden_hide")),v("aria-label",e.hideHidden?l(13,27,"accessories.button_hidden_show"):l(14,29,"accessories.button_hidden_hide")),o(5),_("ngClass",e.hideHidden?"fa-eye-slash":"fa-eye"),o(2),_("disabled",!e.isMobile)("ngbTooltip",l(18,31,"form.button_unlock")),v("aria-label",l(19,33,"form.button_unlock")),o(4),_("disabled",e.isMobile)("ngbTooltip",l(22,35,"form.button_lock")),v("aria-label",l(23,37,"form.button_lock")),o(4),v("aria-label",l(26,39,"support.title")),o(3),_("dragula","rooms-bag"),k("dragulaModel",e.$accessories.rooms),o(),F(e.$accessories.rooms)}}function ve(t,g){t&1&&(a(0,"p",32),d(1),s(2,"translate"),r()),t&2&&(o(),u(l(2,1,"accessories.settings_link")))}function xe(t,g){if(t&1&&(a(0,"div",0)(1,"div",26)(2,"h3",27),d(3),s(4,"translate"),r()(),a(5,"div",28)(6,"div",29)(7,"h5",30),d(8),s(9,"translate"),r(),p(10,"p",31),s(11,"translate"),S(12,ve,3,3,"p",32),r()()()),t&2){let e=m();o(3),u(l(4,4,"accessories.title_accessories")),o(5),u(l(9,6,"accessories.control_disabled")),o(2),_("innerHTML",H(11,8,"accessories.message_must_use_insecure_mode",E(11,de,e.linkInsecure)),N),o(2),h(e.$auth.user.admin?12:-1)}}var Ue=(()=>{class t{$auth=f(ee);dragulaService=f(U);$modal=f(K);$settings=f(Z);$md=f(ne);$accessories=f(te);isMobile=!1;hideHidden=!0;orderSubscription;linkInsecure='<a href="https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control" target="_blank"><i class="fa fa-fw fa-external-link-alt primary-text"></i></a>';constructor(){let e=this.dragulaService;this.isMobile=this.$md.detect.mobile(),e.createGroup("rooms-bag",{moves:(i,n,c)=>!this.isMobile&&c.classList.contains("drag-handle")}),e.createGroup("services-bag",{moves:i=>!this.isMobile&&!i.classList.contains("no-drag")}),this.orderSubscription=e.drop().subscribe(()=>{setTimeout(()=>{this.$accessories.saveLayout()})}),this.isMobile=!0}ngOnInit(){this.$accessories.start()}addRoom(){this.$modal.open(ae,{size:"lg",backdrop:"static"}).result.then(e=>{!e||!e.length||this.$accessories.rooms.find(i=>i.name===e)||(this.$accessories.rooms.push({name:e,services:[]}),this.isMobile&&this.toggleLayoutLock())}).catch(()=>{})}toggleLayoutLock(){this.isMobile=!this.isMobile,this.isMobile?document.querySelectorAll(".services-bag").forEach(i=>{for(let n=0;n<10;n++){let c=document.createElement("div");c.className="accessory-box invisible py-0 my-0",c.style.height="0",i.appendChild(c)}}):document.querySelectorAll(".invisible").forEach(i=>i.remove())}openSupport(){this.$modal.open(oe,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.$accessories.stop(),this.orderSubscription.unsubscribe(),this.dragulaService.destroy("rooms-bag"),this.dragulaService.destroy("services-bag")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=y({type:t,selectors:[["app-accessories"]],decls:2,vars:2,consts:[[1,"row"],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end","d-none","d-sm-inline-block"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","hidden","ngbTooltip"],[1,"fas","fa-fw","fa-folder-plus"],[1,"fas","fa-fw",3,"ngClass"],["role","group",1,"btn-group","me-2"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-unlock"],[1,"fas","fa-fw","fa-lock"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-fw","fa-question-circle-o"],[3,"dragulaModelChange","dragula","dragulaModel"],[1,"row","mb-4"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"ngClass","dragula","dragulaModel"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragula","dragulaModel"],[1,"col-md-12"],[1,"primary-text","drag-handle","room-title","m-0","mb-1","mb-sm-0",3,"ngClass"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"dragulaModelChange","ngClass","dragula","dragulaModel"],[1,"accessory-box","invisible","py-0","my-0",2,"height","0"],[1,"accessory-item","accessory-tab"],[3,"service"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragulaModelChange","dragula","dragulaModel"],[1,"no-drag"],[1,"col-12"],[1,"primary-text","m-0","mb-3"],[1,"col-12","text-center"],["role","alert",1,"alert","alert-warning","p-4"],[1,"mb-3","mt-0"],[1,"mb-0",3,"innerHTML"],[1,"mt-3","mb-0"]],template:function(i,n){i&1&&S(0,ge,31,41)(1,xe,13,13,"div",0),i&2&&(h(n.$settings.env.enableAccessories?0:-1),o(),h(n.$settings.env.enableAccessories?-1:1))},dependencies:[Q,O,Y,X,ie,re,M],styles:[".room-title[_ngcontent-%COMP%]{margin-left:10px}@media (max-width: 575px){.room-title[_ngcontent-%COMP%]{margin-left:7px}}.services-bag[_ngcontent-%COMP%]{min-height:170px}@media (max-width: 575px){.services-bag[_ngcontent-%COMP%]{min-height:initial}}.cursor-move[_ngcontent-%COMP%]{cursor:move}.gu-transit[_ngcontent-%COMP%] .manage-accessory-button[_ngcontent-%COMP%]{display:none}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return t})();export{ae as a,Ue as b};
|
package/public/chunk-L233K63S.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-UADGHPWZ.js";import"./chunk-KPW2P5T4.js";import"./chunk-I6OD3CV4.js";import"./chunk-4UVD743J.js";import"./chunk-DBUCH6BG.js";import"./chunk-3GTACTUQ.js";import"./chunk-IMTSM6HN.js";import"./chunk-GDFC3M3E.js";import"./chunk-FETTFNJ2.js";import"./chunk-6ZN4TBLM.js";export{a as StartupScriptComponent};
|
package/public/chunk-L3LMIZ4T.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as T,m as C}from"./chunk-W2INV3O5.js";import{b as h}from"./chunk-FETTFNJ2.js";import{$c as P,Cc as a,Dc as r,Ec as x,Jb as u,Kb as f,Pb as D,Rb as I,Sb as w,Tb as B,Ub as i,Vb as n,Wb as m,bc as c,cc as M,db as S,gb as e,ma as _,mc as o,nc as p,oc as g,tb as v,yc as y,zb as E}from"./chunk-6ZN4TBLM.js";var $=t=>({pluginName:t});function O(t,k){t&1&&(i(0,"ul",7)(1,"li"),o(2),a(3,"translate"),n(),i(4,"li"),o(5),a(6,"translate"),n()()),t&2&&(e(2),p(r(3,2,"plugins.manage.confirm_disable_accessory_1")),e(3),p(r(6,4,"plugins.manage.confirm_disable_accessory_2")))}function j(t,k){t&1&&(i(0,"ul",7)(1,"li"),o(2),a(3,"translate"),n(),i(4,"li"),o(5),a(6,"translate"),n()()),t&2&&(e(2),p(r(3,2,"plugins.manage.confirm_disable_platform_1")),e(3),p(r(6,4,"plugins.manage.confirm_disable_platform_2")))}var H=(()=>{class t{$activeModal=_(C);pluginName;isConfigured=!1;isConfiguredDynamicPlatform=!1;constructor(){}static \u0275fac=function(d){return new(d||t)};static \u0275cmp=v({type:t,selectors:[["ng-component"]],inputs:{pluginName:"pluginName",isConfigured:"isConfigured",isConfiguredDynamicPlatform:"isConfiguredDynamicPlatform"},decls:26,vars:22,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"mb-3","text-center"],[1,"fas","fa-fw","fa-circle-pause","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","warning",1,"mb-0",3,"dismissible"],[1,"w-100","text-center","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click"]],template:function(d,s){d&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),o(3),n(),i(4,"button",3),a(5,"translate"),c("click",function(){return s.$activeModal.dismiss("Dismiss")}),n()(),i(6,"div",4)(7,"div",5),m(8,"i",6),n(),E(9,O,7,6,"ul",7)(10,j,7,6,"ul",7),i(11,"ngb-alert",8)(12,"p",9),o(13),a(14,"translate"),n()()(),i(15,"div",10)(16,"div",11)(17,"button",12),a(18,"translate"),c("click",function(){return s.$activeModal.dismiss("Dismiss")}),o(19),a(20,"translate"),n()(),m(21,"div",13),i(22,"div",14)(23,"button",15),c("click",function(){return s.$activeModal.close()}),o(24),a(25,"translate"),n()()()()),d&2&&(e(3),p(s.pluginName),e(),u("aria-label",r(5,9,"form.button_close")),e(5),D(s.isConfigured&&!s.isConfiguredDynamicPlatform?9:-1),e(),D(s.isConfigured&&s.isConfiguredDynamicPlatform?10:-1),e(),f("dismissible",!1),e(2),p(x(14,11,"plugins.manage.confirm_disable",y(20,$,s.pluginName))),e(4),u("aria-label",r(18,14,"form.button_close")),e(2),g(" ",r(20,16,"form.button_close")," "),e(5),g(" ",r(25,18,"plugins.manage.disable")," "))},dependencies:[T,h],encapsulation:2})}return t})();var A=t=>({author:t});function F(t,k){if(t&1&&(i(0,"li",9),m(1,"i",15),i(2,"a",16),o(3),n()()),t&2){let l=k.$implicit,d=M();e(),f("ngClass",d.getIconClass(l.type)),e(),f("href",l.url,S),e(),p(l.url)}}var Y=(()=>{class t{$activeModal=_(C);plugin;fundingOptions;constructor(){}ngOnInit(){this.plugin.funding||this.$activeModal.close(),this.plugin.name==="homebridge-config-ui-x"&&(this.plugin.author="oznu"),Array.isArray(this.plugin.funding)?this.fundingOptions=this.plugin.funding.map(l=>{if(typeof l=="string")return{type:"other",url:l};if(typeof l=="object")return{type:l.type||"other",url:l.url}}):typeof this.plugin.funding=="string"?this.fundingOptions=[{type:"other",url:this.plugin.funding}]:typeof this.plugin.funding=="object"&&(this.fundingOptions=[{type:this.plugin.funding.type||"other",url:this.plugin.funding.url}])}getIconClass(l){switch(l.toLowerCase()){case"paypal":return"fab fa-fw fa-paypal";case"github":return"fab fa-fw fa-github";case"patreon":return"fab fa-fw fa-patreon";case"kofi":case"ko-fi":return"fas fa-fw fa-coffee";default:return"fas fa-fw fa-link"}}static \u0275fac=function(d){return new(d||t)};static \u0275cmp=v({type:t,selectors:[["ng-component"]],inputs:{plugin:"plugin"},decls:28,vars:21,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","pink-text","mb-3"],[1,"fas","fa-fw","fa-heart",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box"],[1,"list-group-item"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"],[1,"me-2","primary-text","fa-fw","fa-xl",3,"ngClass"],["target","_blank","rel","noopener noreferrer",1,"text-break-all",3,"href"]],template:function(d,s){d&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),o(3),a(4,"translate"),n(),i(5,"button",3),a(6,"translate"),c("click",function(){return s.$activeModal.dismiss("Dismiss")}),n()(),i(7,"div",4)(8,"div",5),m(9,"i",6),n(),i(10,"ul",7)(11,"li"),o(12),a(13,"translate"),n(),i(14,"li"),o(15),a(16,"translate"),n()(),i(17,"ul",8),w(18,F,4,3,"li",9,I),n()(),i(20,"div",10),m(21,"div",11),i(22,"div",12)(23,"button",13),a(24,"translate"),c("click",function(){return s.$activeModal.dismiss("Dismiss")}),o(25),a(26,"translate"),n()(),m(27,"div",14),n()()),d&2&&(e(3),p(x(4,6,"plugins.donate.tile_donate_to",y(19,A,"@"+s.plugin.author))),e(2),u("aria-label",r(6,9,"form.button_close")),e(7),p(r(13,11,"plugins.donate.message_1")),e(3),p(r(16,13,"plugins.donate.message_2")),e(3),B(s.fundingOptions),e(5),u("aria-label",r(24,15,"form.button_close")),e(2),g(" ",r(26,17,"form.button_close")," "))},dependencies:[P,h],styles:[".text-break-all[_ngcontent-%COMP%]{word-break:break-all}"]})}return t})();export{H as a,Y as b};
|
package/public/chunk-LBTHDQJW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as N,d as w,e as T,f as O,g as q,j as x,m as G,p as Q,q as z,w as D,y as H,z as j}from"./chunk-4UVD743J.js";import{d as W}from"./chunk-DBUCH6BG.js";import{c as K}from"./chunk-XLKKNOJ4.js";import{b as J}from"./chunk-3GTACTUQ.js";import{j as U}from"./chunk-IMTSM6HN.js";import{b as A}from"./chunk-FETTFNJ2.js";import{$c as M,Cc as s,Dc as l,Kb as p,M as $,Pb as c,Ub as r,Vb as a,Wb as m,bc as L,cc as I,cd as R,gb as o,h as b,jc as v,kc as P,ma as g,mc as d,nc as C,oc as B,pb as h,tb as k,w as V,yc as f,zb as S}from"./chunk-6ZN4TBLM.js";var X=["password"],Y=["username"],Z=["otp"],ee=e=>({background:e}),E=e=>({"is-invalid":e});function te(e,_){if(e&1&&(r(0,"div",10)(1,"span",11),m(2,"i",12),a(),m(3,"input",13,0),s(5,"translate"),a(),r(6,"div",14)(7,"span",11),m(8,"i",15),a(),m(9,"input",16,1),s(11,"translate"),a()),e&2){let t=I();o(3),p("placeholder",l(5,4,"users.label_username"))("ngClass",f(8,E,t.form.controls.username.dirty&&t.form.controls.username.errors)),o(6),p("placeholder",l(11,6,"users.label_password"))("ngClass",f(10,E,t.form.controls.password.dirty&&t.form.controls.password.errors))}}function ne(e,_){if(e&1&&(r(0,"p",7),d(1),s(2,"translate"),a(),r(3,"div",14)(4,"span",11),m(5,"i",17),a(),m(6,"input",18,2),s(8,"translate"),a()),e&2){let t=I();o(),C(l(2,3,"users.setup_2fa_enter_code")),o(5),p("placeholder",l(8,5,"login.label_2fa_code"))("ngClass",f(7,E,t.form.controls.otp.dirty&&t.form.controls.otp.errors))}}function ie(e,_){e&1&&(r(0,"p",8)(1,"small"),d(2),s(3,"translate"),a()()),e&2&&(o(2),C(l(3,1,"login.invalid_credentials")))}function oe(e,_){e&1&&(r(0,"p",8)(1,"small"),d(2),s(3,"translate"),a()()),e&2&&(o(2),C(l(3,1,"login.message_invalid_2fa_code")))}var Ce=(()=>{class e{$auth=g(K);$router=g(W);$settings=g(J);passwordInput=h("password");usernameInput=h("username");otpInput=h("otp");form;backgroundStyle;invalidCredentials=!1;invalid2faCode=!1;twoFactorCodeRequired=!1;inProgress=!1;targetRoute;constructor(){}ngOnInit(){this.form=new q({username:new x(""),password:new x("")}),this.form.valueChanges.pipe($(500)).subscribe(t=>{var n;let i=(n=this.passwordInput())==null?void 0:n.nativeElement.value;i&&i!==t.password&&this.form.controls.password.setValue(i)}),this.targetRoute=window.sessionStorage.getItem("target_route")||"",this.setBackground()}setBackground(){return b(this,null,function*(){if(this.$settings.settingsLoaded||(yield V(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let t=this.$settings.env.customWallpaperHash?`${U.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`:"/assets/snapshot.jpg";this.backgroundStyle=`url('${t}') center/cover`}})}onSubmit(){return b(this,null,function*(){var n,y,F;this.invalidCredentials=!1,this.invalid2faCode=!1,this.inProgress=!0;let t=(n=this.passwordInput())==null?void 0:n.nativeElement.value;t&&t!==this.form.get("password").value&&this.form.controls.password.setValue(t);let i=(y=this.usernameInput())==null?void 0:y.nativeElement.value;if(i&&i!==this.form.get("username").value&&this.form.controls.username.setValue(i),this.twoFactorCodeRequired){let u=(F=this.otpInput())==null?void 0:F.nativeElement.value;u&&u!==this.form.get("otp").value&&this.form.controls.username.setValue(u)}yield this.$auth.login(this.form.getRawValue()).then(()=>{this.$router.navigateByUrl(this.targetRoute),window.sessionStorage.removeItem("target_route")}).catch(u=>{u.status===412?(this.form.controls.otp?(this.form.controls.otp.setErrors(["Invalid Code"]),this.invalid2faCode=!0):this.form.addControl("otp",new x("",[w.required,w.minLength(6),w.maxLength(6)])),this.twoFactorCodeRequired=!0,setTimeout(()=>{document.getElementById("form-ota").focus()},100)):this.invalidCredentials=!0}),this.inProgress=!1})}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=k({type:e,selectors:[["ng-component"]],viewQuery:function(i,n){i&1&&(v(n.passwordInput,X,5),v(n.usernameInput,Y,5),v(n.otpInput,Z,5)),i&2&&P(3)},decls:13,vars:12,consts:[["username",""],["password",""],["otp",""],[1,"login-container","d-flex","align-items-center","justify-content-center",3,"ngStyle"],[1,"card","card-body","mx-2","login-card"],["novalidate","",3,"ngSubmit","formGroup"],[1,"h4","text-center","mb-4"],[1,"text-center"],[1,"red-text"],["tabindex","3","type","submit",1,"btn","btn-primary",3,"disabled"],[1,"md-form","input-group","mb-3"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","prefix","grey-text"],["formControlName","username","type","text","id","form-username","autofocus","","autocomplete","username","autocapitalize","none","tabindex","1",1,"form-control","custom-input","py-2",3,"placeholder","ngClass"],[1,"md-form","input-group","mb-4"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","current-password","tabindex","2",1,"form-control","custom-input","py-2",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-key","prefix","grey-text"],["formControlName","otp","type","text","id","form-ota","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*","tabindex","1",1,"form-control","custom-input","py-2",3,"placeholder","ngClass"]],template:function(i,n){i&1&&(r(0,"div",3)(1,"div",4)(2,"form",5),L("ngSubmit",function(){return n.onSubmit()}),r(3,"p",6),d(4,"Homebridge"),a(),S(5,te,12,12)(6,ne,9,9),r(7,"div",7),S(8,ie,4,3,"p",8)(9,oe,4,3,"p",8),r(10,"button",9),d(11),s(12,"translate"),a()()()()()),i&2&&(p("ngStyle",f(10,ee,n.backgroundStyle)),o(2),p("formGroup",n.form),o(3),c(n.twoFactorCodeRequired?-1:5),o(),c(n.twoFactorCodeRequired?6:-1),o(2),c(n.invalidCredentials?8:-1),o(),c(n.invalid2faCode?9:-1),o(),p("disabled",n.form.invalid),o(),B(" ",l(12,8,"login.button_login")," "))},dependencies:[R,H,G,N,T,O,D,j,Q,z,M,A],styles:[".login-container[_ngcontent-%COMP%]{background-color:#f4f4f4;background-size:cover;position:absolute;top:0;bottom:0;right:0;left:0}.login-card[_ngcontent-%COMP%]{max-width:500px;background-color:#ffffffe6}@media screen and (min-height: 800px){.login-card[_ngcontent-%COMP%]{margin-bottom:12em}}.login-logo[_ngcontent-%COMP%]{position:absolute;top:-35%;z-index:2000;max-width:450px}@media screen and (max-width: 450px){.login-logo[_ngcontent-%COMP%]{max-width:320px;top:-25%}}@media screen and (max-width: 320px){.login-logo[_ngcontent-%COMP%]{max-width:280px}}@media screen and (max-height: 450px){.login-logo[_ngcontent-%COMP%]{display:none}}"]})}return e})();export{Ce as a};
|
package/public/chunk-LBWDO3T4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-N76LUI5K.js";import"./chunk-L5DJ2UTP.js";import"./chunk-DBUCH6BG.js";import"./chunk-XLKKNOJ4.js";import"./chunk-3GTACTUQ.js";import"./chunk-IMTSM6HN.js";import"./chunk-GDFC3M3E.js";import"./chunk-FETTFNJ2.js";import"./chunk-6ZN4TBLM.js";export{a as ContainerRestartComponent};
|
package/public/chunk-MZQEEJH5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-G5O7CHKI.js";import"./chunk-QCVDY2FW.js";import"./chunk-SRHERU2M.js";import"./chunk-KPW2P5T4.js";import"./chunk-I6OD3CV4.js";import"./chunk-W2INV3O5.js";import"./chunk-4UVD743J.js";import"./chunk-DBUCH6BG.js";import"./chunk-3GTACTUQ.js";import"./chunk-IMTSM6HN.js";import"./chunk-GDFC3M3E.js";import"./chunk-FETTFNJ2.js";import"./chunk-6ZN4TBLM.js";export{a as ConfigEditorComponent};
|
package/public/chunk-NOMWD75Z.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as w,k as S}from"./chunk-IMTSM6HN.js";import{a as _,b as h}from"./chunk-FETTFNJ2.js";import{Cc as s,Dc as m,Pb as d,Ub as i,Vb as n,Wb as u,cc as v,gb as e,ma as p,mc as o,nc as a,tb as x,zb as f}from"./chunk-6ZN4TBLM.js";function C(t,y){t&1&&(i(0,"p",7),o(1),s(2,"translate"),n()),t&2&&(e(),a(m(2,1,"platform.linux.server_will_power_down")))}function g(t,y){if(t&1&&(i(0,"div",8),o(1),n()),t&2){let r=v();e(),a(r.error)}}var B=(()=>{class t{$api=p(S);$toastr=p(w);$translate=p(_);error=!1;constructor(){}ngOnInit(){this.$api.put("/platform-tools/linux/shutdown-host",{}).subscribe({error:r=>{console.error(r),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(l){return new(l||t)};static \u0275cmp=x({type:t,selectors:[["ng-component"]],decls:13,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"grey-text"],[1,"alert","alert-error","my-4"]],template:function(l,c){l&1&&(i(0,"div",0)(1,"h3",1),o(2),s(3,"translate"),n()(),i(4,"div",2)(5,"div",3),u(6,"i",4),n(),i(7,"div",5)(8,"h4",6),o(9),s(10,"translate"),n(),f(11,C,3,3,"p",7)(12,g,2,1,"div",8),n()()),l&2&&(e(2),a(m(3,4,"menu.restart.title")),e(7),a(m(10,6,"platform.linux.shutting_down_server")),e(2),d(c.error?-1:11),e(),d(c.error?12:-1))},dependencies:[h],encapsulation:2})}return t})();export{B as a};
|