homebridge-config-ui-x 5.9.1-beta.4 → 5.9.1-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/{chunk-SJRDO5CP.js → chunk-2VUYPCNL.js} +1 -1
- package/public/{chunk-HEISVQS4.js → chunk-2WPWVIKO.js} +1 -1
- package/public/{chunk-3YH7FXML.js → chunk-33YKKULG.js} +1 -1
- package/public/{chunk-W5GBSAG3.js → chunk-3P55AITC.js} +1 -1
- package/public/{chunk-VHXEO3ZO.js → chunk-3X7W32YF.js} +1 -1
- package/public/{chunk-JGWESVQR.js → chunk-5PW44IKU.js} +1 -1
- package/public/{chunk-Q2YSAS5V.js → chunk-74PF5DCP.js} +1 -1
- package/public/{chunk-XCM3VKFY.js → chunk-A5DSO4JZ.js} +1 -1
- package/public/{chunk-TOEOGXWQ.js → chunk-A6JQ6MXP.js} +1 -1
- package/public/{chunk-NRSMNHLO.js → chunk-ARUCLTY5.js} +1 -1
- package/public/{chunk-Y6IRT5JS.js → chunk-BBWC7DOD.js} +1 -1
- package/public/{chunk-WHHWVHCM.js → chunk-BG3FWDDE.js} +1 -1
- package/public/{chunk-FHIQHPYX.js → chunk-BSCDSQ2H.js} +1 -1
- package/public/{chunk-PQA4VPZR.js → chunk-C6SX7UJC.js} +1 -1
- package/public/{chunk-5DEH7NPC.js → chunk-CC3EYBQS.js} +1 -1
- package/public/{chunk-LWW4UMH7.js → chunk-CCCI3B5N.js} +1 -1
- package/public/{chunk-WOC25B3T.js → chunk-DDPSF4PX.js} +1 -1
- package/public/{chunk-EVBAJELE.js → chunk-DFJR6Z7F.js} +1 -1
- package/public/{chunk-LRQYSW4K.js → chunk-DNIKH4ND.js} +1 -1
- package/public/{chunk-MV5HKFNH.js → chunk-FAEVU5HO.js} +1 -1
- package/public/{chunk-AW2GCX53.js → chunk-FQ45Y4ZX.js} +1 -1
- package/public/{chunk-YVMSP7ZU.js → chunk-GVOUECJU.js} +5 -5
- package/public/{chunk-ZGN3NVBG.js → chunk-HA34IWT4.js} +1 -1
- package/public/{chunk-WPPAIWDY.js → chunk-IBETLCOI.js} +1 -1
- package/public/{chunk-HEPKK2NF.js → chunk-J6DUGLTN.js} +1 -1
- package/public/{chunk-WHYMIPMR.js → chunk-J76CJ5TX.js} +1 -1
- package/public/chunk-JITGSJNV.js +1 -0
- package/public/{chunk-PQICUDQU.js → chunk-JUDJJS7H.js} +1 -1
- package/public/{chunk-HHHDRU7N.js → chunk-K2LRXDMZ.js} +1 -1
- package/public/{chunk-KPCNAHX5.js → chunk-K47DTMMS.js} +1 -1
- package/public/{chunk-PY7IYLU2.js → chunk-KDFQPDUJ.js} +1 -1
- package/public/{chunk-FEQANZR6.js → chunk-LLSRLDHR.js} +1 -1
- package/public/{chunk-RRCVDWSH.js → chunk-LXDDU4UH.js} +1 -1
- package/public/{chunk-7TSDWYDG.js → chunk-MBXLZUOK.js} +1 -1
- package/public/{chunk-PFEUH44A.js → chunk-MWO5DZGH.js} +1 -1
- package/public/chunk-MWXJP4MH.js +50 -0
- package/public/{chunk-Z5QZ2DBA.js → chunk-O73K4DAL.js} +1 -1
- package/public/{chunk-YMFBNYEN.js → chunk-PFLI6JJM.js} +1 -1
- package/public/{chunk-PTRTXLSA.js → chunk-PPSCCZIZ.js} +1 -1
- package/public/{chunk-L6RYPM7H.js → chunk-QY7V3UT7.js} +1 -1
- package/public/{chunk-3L72PBVL.js → chunk-RRMPG53L.js} +1 -1
- package/public/{chunk-HMMDL7KD.js → chunk-TNME2B5Y.js} +1 -1
- package/public/{chunk-Z7U3QJUA.js → chunk-UVIAZRUH.js} +1 -1
- package/public/{chunk-XNZMG6ZP.js → chunk-UZ7AQHO3.js} +1 -1
- package/public/{chunk-DRPQVHQ2.js → chunk-VDNTIVIU.js} +1 -1
- package/public/{chunk-JICJM7P7.js → chunk-WGB7ZC7A.js} +1 -1
- package/public/{chunk-7TECHIAM.js → chunk-WKHKCZYW.js} +1 -1
- package/public/{chunk-ZVV3GLU5.js → chunk-Y6SX4D2S.js} +1 -1
- package/public/{chunk-6EU2WVST.js → chunk-Y7DME2RJ.js} +1 -1
- package/public/{chunk-VHCZD2S4.js → chunk-YNBEMSCL.js} +1 -1
- package/public/{chunk-ND4C2ZR6.js → chunk-Z67DYENU.js} +1 -1
- package/public/{chunk-TGLBHALK.js → chunk-ZAVWBEMO.js} +1 -1
- package/public/{chunk-GQ54RHG6.js → chunk-ZTSSPJFY.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-6UMQJXGA.js → main-SB3TTKNP.js} +1 -1
- package/public/chunk-2OL4VJOK.js +0 -1
- package/public/chunk-OELC77D2.js +0 -50
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "homebridge-config-ui-x",
|
|
3
3
|
"displayName": "Homebridge UI",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "5.9.1-beta.
|
|
5
|
+
"version": "5.9.1-beta.6",
|
|
6
6
|
"description": "A web based management, configuration and control platform for Homebridge.",
|
|
7
7
|
"author": "oznu <dev@oz.nu>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as G}from"./chunk-TUN7H57E.js";import{b as j}from"./chunk-PFEUH44A.js";import{a as J}from"./chunk-Z5QZ2DBA.js";import{a as Q}from"./chunk-3MJTL7SQ.js";import{a as te}from"./chunk-VOHBPEFW.js";import"./chunk-EGCKVLUA.js";import{a as X}from"./chunk-WPPAIWDY.js";import{n as L}from"./chunk-5SJKGEVE.js";import"./chunk-PJNMYOLO.js";import{a as R}from"./chunk-DRPQVHQ2.js";import{b as B}from"./chunk-Z7U3QJUA.js";import{a as q,b as N,d as W,e as V,f as D,g as H}from"./chunk-5WBNDRQY.js";import{b as A}from"./chunk-HEPKK2NF.js";import{k as $,l as U,p as T}from"./chunk-PQA4VPZR.js";import{$b as h,Ib as S,Lb as _,Nb as x,Qa as n,Rc as E,Za as F,_b as g,db as O,dd as K,g as ee,h as P,lc as v,mc as M,na as m,pb as u,qb as w,rb as y,sa as b,sc as d,ta as C,tc as l,wb as c,x as z,xb as i,yb as s,zb as p}from"./chunk-EQP5UP7Q.js";var Z=ee(te(),1);var I=()=>["/"],ne=o=>({"hamburger-icon-cross":o}),oe=o=>({expanded:o}),re=()=>({exact:!0}),ae=()=>["/plugins"],se=()=>["/accessories"],de=()=>["/logs"],le=()=>["/support"],pe=()=>["/platform-tools/terminal"],ce=()=>["/config"],me=()=>["/settings"],ue=()=>["/power-options"];function _e(o,k){if(o&1){let e=S();i(0,"div",10)(1,"div",20),d(2,"translate"),d(3,"translate"),_("click",function(){b(e);let t=x();return C(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),i(4,"div",12),p(5,"i",21),s(),i(6,"div",14),g(7),d(8,"translate"),s()()()}o&2&&(n(),u("aria-label",l(2,2,"rpi.throttled.undervoltage_title")+" - "+l(3,4,"rpi.throttled.undervoltage_description")),n(6),h(l(8,6,"rpi.throttled.undervoltage_title")))}function ge(o,k){if(o&1){let e=S();i(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",22),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}o&2&&(n(),c("routerLink",v(8,pe))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_terminal")),n(5),h(l(7,6,"menu.linux.label_terminal")))}function fe(o,k){if(o&1){let e=S();i(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",23),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}o&2&&(n(),c("routerLink",v(8,ce))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.config_json_editor")),n(5),h(l(7,6,"menu.config_json_editor")))}function he(o,k){if(o&1){let e=S();i(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",24),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}o&2&&(n(),c("routerLink",v(8,me))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_settings")),n(5),h(l(7,6,"menu.label_settings")))}function ve(o,k){if(o&1){let e=S();i(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",25),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}o&2&&(n(),c("routerLink",v(8,ue))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.restart.title")),n(5),h(l(7,6,"menu.restart.title")))}function be(o,k){if(o&1){let e=S();i(0,"div",10)(1,"div",20),d(2,"translate"),_("click",function(){b(e);let t=x();return C(t.reloadPage())})("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",26),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}o&2&&(n(),u("aria-label",l(2,2,"menu.reload")),n(5),h(l(7,4,"menu.reload")))}function Ce(o,k){if(o&1){let e=S();i(0,"div",10)(1,"div",20),d(2,"translate"),_("click",function(){b(e);let t=x();return C(t.logout())})("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",27),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}o&2&&(n(),u("aria-label",l(2,2,"menu.tooltip_logout")),n(5),h(l(7,4,"menu.tooltip_logout")))}var Y=(()=>{class o{$auth=m(B);$authHelper=m(j);$settings=m(A);$modal=m(L);$notification=m(Q);$renderer=m(F);$router=m(V);$translate=m($);isExpanded=!1;formAuth=this.$settings.formAuth;isAdmin=this.$auth.user.admin;enableTerminalAccess=this.$settings.env.enableTerminalAccess;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.subscribe(a=>P(this,null,function*(){if(a instanceof q&&this.$settings.formAuth&&a.url!=="/login"&&!(yield this.$authHelper.isAuthenticated())){window.sessionStorage.setItem("target_route",a.url),yield this.$router.navigate(["/login"]);return}a instanceof N&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))}))}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)}),this.$notification.formAuthEnabled.subscribe(r=>{this.formAuth=r});let e=document.querySelector(".sidebar"),a=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!a.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),a.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),a.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}openUnderVoltageModal(){let e=this.$modal.open(J,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let a=e.target;["menuitem","button"].includes(a.getAttribute("role"))&&a.click()}}reloadPage(){window.location.reload()}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}logout(){this.$auth.logout()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.$renderer.setStyle(e,"opacity","20%"),this.$renderer.setStyle(e,"pointer-events","none"),this.$renderer.setStyle(e,"overflow","hidden")):(this.$renderer.removeStyle(e,"opacity"),this.$renderer.removeStyle(e,"pointer-events"),this.$renderer.removeStyle(e,"overflow"))}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}static \u0275fac=function(a){return new(a||o)};static \u0275cmp=O({type:o,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:68,vars:75,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-plug"],[1,"fa","fa-lightbulb"],[1,"fa","fa-wave-square"],[1,"fa","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-terminal"],[1,"fa","fa-code"],[1,"fa","fa-cog"],[1,"fa","fa-power-off"],[1,"fa","fa-refresh"],[1,"fa","fa-right-from-bracket"]],template:function(a,t){a&1&&(i(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(f){return t.handleKeydown(f)}),p(2,"span",1),i(3,"a",2),d(4,"translate"),p(5,"img",3),i(6,"div",4),g(7,"Homebridge"),s()(),i(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),s()(),i(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(f){return t.handleKeydown(f)}),i(15,"a",2),d(16,"translate"),p(17,"img",3),i(18,"div",8),g(19,"Homebridge"),s()()(),i(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),i(24,"div",12),p(25,"i",13),s(),i(26,"div",14),g(27),d(28,"translate"),s()()(),w(29,_e,9,8,"div",10),i(30,"div",10)(31,"div",15),d(32,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),i(33,"div",12),p(34,"i",16),s(),i(35,"div",14),g(36),d(37,"translate"),s()()(),i(38,"div",10)(39,"div",15),d(40,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),i(41,"div",12),p(42,"i",17),s(),i(43,"div",14),g(44),d(45,"translate"),s()()(),i(46,"div",10)(47,"div",15),d(48,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),i(49,"div",12),p(50,"i",18),s(),i(51,"div",14),g(52),d(53,"translate"),s()()(),w(54,ge,8,9,"div",10),w(55,fe,8,9,"div",10),w(56,he,8,9,"div",10),i(57,"div",10)(58,"div",15),d(59,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),i(60,"div",12),p(61,"i",19),s(),i(62,"div",14),g(63),d(64,"translate"),s()()(),w(65,ve,8,9,"div",10),w(66,be,8,6,"div",10),w(67,Ce,8,6,"div",10),s()()),a&2&&(u("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",l(1,37,"menu.sidebar.aria_menu")),n(3),c("routerLink",v(63,I)),u("aria-label",l(4,39,"menu.label_status")),n(5),c("ngClass",M(64,ne,t.isExpanded)),n(5),c("ngClass",M(66,oe,t.isExpanded)),n(2),c("routerLink",v(68,I)),u("aria-label",l(16,41,"menu.label_status")),n(7),c("routerLink",v(69,I))("routerLinkActive","active")("routerLinkActiveOptions",v(70,re)),u("aria-label",l(23,43,"menu.label_status")),n(5),h(l(28,45,"menu.label_status")),n(2),y(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),n(2),c("routerLink",v(71,ae))("routerLinkActive","active"),u("aria-label",l(32,47,"menu.label_plugins")),n(5),h(l(37,49,"menu.label_plugins")),n(3),c("routerLink",v(72,se))("routerLinkActive","active"),u("aria-label",l(40,51,"menu.label_accessories")),n(5),h(l(45,53,"menu.label_accessories")),n(3),c("routerLink",v(73,de))("routerLinkActive","active"),u("aria-label",l(48,55,"menu.linux.label_logs")),n(5),h(l(53,57,"menu.linux.label_logs")),n(2),y(t.enableTerminalAccess&&t.isAdmin?54:-1),n(),y(t.isAdmin?55:-1),n(),y(t.isAdmin?56:-1),n(2),c("routerLink",v(74,le))("routerLinkActive","active"),u("aria-label",l(59,59,"support.title")),n(5),h(l(64,61,"support.title")),n(2),y(t.isAdmin?65:-1),n(),y(t.isPwa?66:-1),n(),y(t.formAuth?67:-1))},dependencies:[D,K,E,H,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 80px)!important;scrollbar-width:thin}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{padding-bottom:60px}}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;transform:rotate(0);transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return o})();var xe=o=>({sidebarExpanded:o}),Je=(()=>{class o{$auth=m(B);$modal=m(L);$router=m(V);$settings=m(A);$translate=m($);$ws=m(R);io;sidebarExpanded=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return P(this,null,function*(){if(this.$settings.settingsLoaded||(yield z(this.$settings.onSettingsLoaded)),!this.$router.url.endsWith("/restart")&&(0,Z.lt)(this.$settings.uiVersion,T.serverTarget)){console.log(`Server restart required. UI Version: ${T.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(X,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:T.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(a){return new(a||o)};static \u0275cmp=O({type:o,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(a,t){a&1&&(p(0,"app-sidebar",0),i(1,"div",1),p(2,"router-outlet"),s()),a&2&&(c("isExpanded",t.sidebarExpanded),n(),c("ngClass",M(2,xe,t.sidebarExpanded)))},dependencies:[Y,E,W],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return o})();export{Je as LayoutComponent};
|
|
1
|
+
import{a as G}from"./chunk-TUN7H57E.js";import{b as j}from"./chunk-MWO5DZGH.js";import{a as J}from"./chunk-O73K4DAL.js";import{a as Q}from"./chunk-3MJTL7SQ.js";import{a as te}from"./chunk-VOHBPEFW.js";import"./chunk-EGCKVLUA.js";import{a as X}from"./chunk-IBETLCOI.js";import{n as L}from"./chunk-5SJKGEVE.js";import"./chunk-PJNMYOLO.js";import{a as R}from"./chunk-VDNTIVIU.js";import{b as B}from"./chunk-UVIAZRUH.js";import{a as q,b as N,d as W,e as V,f as D,g as H}from"./chunk-5WBNDRQY.js";import{b as A}from"./chunk-J6DUGLTN.js";import{k as $,l as U,p as T}from"./chunk-C6SX7UJC.js";import{$b as h,Ib as S,Lb as _,Nb as x,Qa as n,Rc as E,Za as F,_b as g,db as O,dd as K,g as ee,h as P,lc as v,mc as M,na as m,pb as u,qb as w,rb as y,sa as b,sc as d,ta as C,tc as l,wb as c,x as z,xb as i,yb as s,zb as p}from"./chunk-EQP5UP7Q.js";var Z=ee(te(),1);var I=()=>["/"],ne=o=>({"hamburger-icon-cross":o}),oe=o=>({expanded:o}),re=()=>({exact:!0}),ae=()=>["/plugins"],se=()=>["/accessories"],de=()=>["/logs"],le=()=>["/support"],pe=()=>["/platform-tools/terminal"],ce=()=>["/config"],me=()=>["/settings"],ue=()=>["/power-options"];function _e(o,k){if(o&1){let e=S();i(0,"div",10)(1,"div",20),d(2,"translate"),d(3,"translate"),_("click",function(){b(e);let t=x();return C(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),i(4,"div",12),p(5,"i",21),s(),i(6,"div",14),g(7),d(8,"translate"),s()()()}o&2&&(n(),u("aria-label",l(2,2,"rpi.throttled.undervoltage_title")+" - "+l(3,4,"rpi.throttled.undervoltage_description")),n(6),h(l(8,6,"rpi.throttled.undervoltage_title")))}function ge(o,k){if(o&1){let e=S();i(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",22),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}o&2&&(n(),c("routerLink",v(8,pe))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_terminal")),n(5),h(l(7,6,"menu.linux.label_terminal")))}function fe(o,k){if(o&1){let e=S();i(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",23),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}o&2&&(n(),c("routerLink",v(8,ce))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.config_json_editor")),n(5),h(l(7,6,"menu.config_json_editor")))}function he(o,k){if(o&1){let e=S();i(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",24),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}o&2&&(n(),c("routerLink",v(8,me))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_settings")),n(5),h(l(7,6,"menu.label_settings")))}function ve(o,k){if(o&1){let e=S();i(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",25),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}o&2&&(n(),c("routerLink",v(8,ue))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.restart.title")),n(5),h(l(7,6,"menu.restart.title")))}function be(o,k){if(o&1){let e=S();i(0,"div",10)(1,"div",20),d(2,"translate"),_("click",function(){b(e);let t=x();return C(t.reloadPage())})("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",26),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}o&2&&(n(),u("aria-label",l(2,2,"menu.reload")),n(5),h(l(7,4,"menu.reload")))}function Ce(o,k){if(o&1){let e=S();i(0,"div",10)(1,"div",20),d(2,"translate"),_("click",function(){b(e);let t=x();return C(t.logout())})("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",27),s(),i(5,"div",14),g(6),d(7,"translate"),s()()()}o&2&&(n(),u("aria-label",l(2,2,"menu.tooltip_logout")),n(5),h(l(7,4,"menu.tooltip_logout")))}var Y=(()=>{class o{$auth=m(B);$authHelper=m(j);$settings=m(A);$modal=m(L);$notification=m(Q);$renderer=m(F);$router=m(V);$translate=m($);isExpanded=!1;formAuth=this.$settings.formAuth;isAdmin=this.$auth.user.admin;enableTerminalAccess=this.$settings.env.enableTerminalAccess;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.subscribe(a=>P(this,null,function*(){if(a instanceof q&&this.$settings.formAuth&&a.url!=="/login"&&!(yield this.$authHelper.isAuthenticated())){window.sessionStorage.setItem("target_route",a.url),yield this.$router.navigate(["/login"]);return}a instanceof N&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))}))}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)}),this.$notification.formAuthEnabled.subscribe(r=>{this.formAuth=r});let e=document.querySelector(".sidebar"),a=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!a.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),a.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),a.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}openUnderVoltageModal(){let e=this.$modal.open(J,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let a=e.target;["menuitem","button"].includes(a.getAttribute("role"))&&a.click()}}reloadPage(){window.location.reload()}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}logout(){this.$auth.logout()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.$renderer.setStyle(e,"opacity","20%"),this.$renderer.setStyle(e,"pointer-events","none"),this.$renderer.setStyle(e,"overflow","hidden")):(this.$renderer.removeStyle(e,"opacity"),this.$renderer.removeStyle(e,"pointer-events"),this.$renderer.removeStyle(e,"overflow"))}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}static \u0275fac=function(a){return new(a||o)};static \u0275cmp=O({type:o,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:68,vars:75,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-plug"],[1,"fa","fa-lightbulb"],[1,"fa","fa-wave-square"],[1,"fa","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-terminal"],[1,"fa","fa-code"],[1,"fa","fa-cog"],[1,"fa","fa-power-off"],[1,"fa","fa-refresh"],[1,"fa","fa-right-from-bracket"]],template:function(a,t){a&1&&(i(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(f){return t.handleKeydown(f)}),p(2,"span",1),i(3,"a",2),d(4,"translate"),p(5,"img",3),i(6,"div",4),g(7,"Homebridge"),s()(),i(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),s()(),i(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(f){return t.handleKeydown(f)}),i(15,"a",2),d(16,"translate"),p(17,"img",3),i(18,"div",8),g(19,"Homebridge"),s()()(),i(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),i(24,"div",12),p(25,"i",13),s(),i(26,"div",14),g(27),d(28,"translate"),s()()(),w(29,_e,9,8,"div",10),i(30,"div",10)(31,"div",15),d(32,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),i(33,"div",12),p(34,"i",16),s(),i(35,"div",14),g(36),d(37,"translate"),s()()(),i(38,"div",10)(39,"div",15),d(40,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),i(41,"div",12),p(42,"i",17),s(),i(43,"div",14),g(44),d(45,"translate"),s()()(),i(46,"div",10)(47,"div",15),d(48,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),i(49,"div",12),p(50,"i",18),s(),i(51,"div",14),g(52),d(53,"translate"),s()()(),w(54,ge,8,9,"div",10),w(55,fe,8,9,"div",10),w(56,he,8,9,"div",10),i(57,"div",10)(58,"div",15),d(59,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),i(60,"div",12),p(61,"i",19),s(),i(62,"div",14),g(63),d(64,"translate"),s()()(),w(65,ve,8,9,"div",10),w(66,be,8,6,"div",10),w(67,Ce,8,6,"div",10),s()()),a&2&&(u("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",l(1,37,"menu.sidebar.aria_menu")),n(3),c("routerLink",v(63,I)),u("aria-label",l(4,39,"menu.label_status")),n(5),c("ngClass",M(64,ne,t.isExpanded)),n(5),c("ngClass",M(66,oe,t.isExpanded)),n(2),c("routerLink",v(68,I)),u("aria-label",l(16,41,"menu.label_status")),n(7),c("routerLink",v(69,I))("routerLinkActive","active")("routerLinkActiveOptions",v(70,re)),u("aria-label",l(23,43,"menu.label_status")),n(5),h(l(28,45,"menu.label_status")),n(2),y(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),n(2),c("routerLink",v(71,ae))("routerLinkActive","active"),u("aria-label",l(32,47,"menu.label_plugins")),n(5),h(l(37,49,"menu.label_plugins")),n(3),c("routerLink",v(72,se))("routerLinkActive","active"),u("aria-label",l(40,51,"menu.label_accessories")),n(5),h(l(45,53,"menu.label_accessories")),n(3),c("routerLink",v(73,de))("routerLinkActive","active"),u("aria-label",l(48,55,"menu.linux.label_logs")),n(5),h(l(53,57,"menu.linux.label_logs")),n(2),y(t.enableTerminalAccess&&t.isAdmin?54:-1),n(),y(t.isAdmin?55:-1),n(),y(t.isAdmin?56:-1),n(2),c("routerLink",v(74,le))("routerLinkActive","active"),u("aria-label",l(59,59,"support.title")),n(5),h(l(64,61,"support.title")),n(2),y(t.isAdmin?65:-1),n(),y(t.isPwa?66:-1),n(),y(t.formAuth?67:-1))},dependencies:[D,K,E,H,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 80px)!important;scrollbar-width:thin}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{padding-bottom:60px}}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;transform:rotate(0);transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return o})();var xe=o=>({sidebarExpanded:o}),Je=(()=>{class o{$auth=m(B);$modal=m(L);$router=m(V);$settings=m(A);$translate=m($);$ws=m(R);io;sidebarExpanded=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return P(this,null,function*(){if(this.$settings.settingsLoaded||(yield z(this.$settings.onSettingsLoaded)),!this.$router.url.endsWith("/restart")&&(0,Z.lt)(this.$settings.uiVersion,T.serverTarget)){console.log(`Server restart required. UI Version: ${T.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(X,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:T.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(a){return new(a||o)};static \u0275cmp=O({type:o,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(a,t){a&1&&(p(0,"app-sidebar",0),i(1,"div",1),p(2,"router-outlet"),s()),a&2&&(c("isExpanded",t.sidebarExpanded),n(),c("ngClass",M(2,xe,t.sidebarExpanded)))},dependencies:[Y,E,W],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return o})();export{Je as LayoutComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as T}from"./chunk-
|
|
1
|
+
import{a as T}from"./chunk-VDNTIVIU.js";import"./chunk-UVIAZRUH.js";import{e as $}from"./chunk-5WBNDRQY.js";import{b as S}from"./chunk-J6DUGLTN.js";import{k as g,l as _,n as E,q as y}from"./chunk-C6SX7UJC.js";import{$b as s,Ab as r,Bb as i,Cb as u,Nb as v,Qa as n,_b as a,db as h,na as o,qb as c,rb as d,sc as m,tc as l}from"./chunk-EQP5UP7Q.js";function C(t,f){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=v();n(),s(e.error)}}function w(t,f){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),u(5,"i",12),i()()),t&2&&(n(),s(l(2,1,"restart.please_wait_while_server_restarts")))}function k(t,f){t&1&&(r(0,"div",8),a(1),m(2,"translate"),i()),t&2&&(n(),s(l(2,1,"platform.linux.long_time")))}var z=(()=>{class t{$api=o(y);$router=o($);$settings=o(S);$toastr=o(E);$translate=o(g);$ws=o(T);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/linux/restart-host",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{console.error(e),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"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="ok"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.linux.server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},3e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("platform.linux.server_taking_long_time"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},12e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=h({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-spinner","fa-spin"]],template:function(p,x){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),u(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),c(11,C,2,1,"div",7)(12,w,6,3),c(13,k,3,3,"div",8),i()()),p&2&&(n(2),s(l(3,4,"menu.restart.title")),n(7),s(l(10,6,"platform.linux.restarting_server")),n(2),d(x.error?11:12),n(2),d(x.timeout?13:-1))},dependencies:[_],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{z as RestartLinuxComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as z,b,c as k}from"./chunk-4A2GGTS4.js";import{a as u}from"./chunk-
|
|
1
|
+
import{a as z,b,c as k}from"./chunk-4A2GGTS4.js";import{a as u}from"./chunk-VDNTIVIU.js";import{q as f}from"./chunk-C6SX7UJC.js";import{P as t,g as n,h as c,ia as p,n as h,na as a}from"./chunk-EQP5UP7Q.js";var d=n(z(),1),l=n(b(),1),m=n(k(),1);var v=(()=>{class o{$ws=a(u);$api=a(f);io;fitAddon;webLinksAddon;resize;elementResize;dataDisposable=null;isInitializing=!1;hasUserTyped=!1;term;destroyTerminal(){this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.io&&this.io.end(),this.term&&(this.term.dispose(),this.term=null),this.resize&&this.resize.complete(),this.elementResize&&this.elementResize.complete(),this.isInitializing=!1,this.hasUserTyped=!1}destroyPersistentSession(){this.destroyTerminal(),this.$api.post("/platform-tools/terminal/destroy-persistent-session",{}).subscribe({error:s=>console.error("Failed to destroy persistent session:",s)})}detachTerminal(){this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.term&&this.term.dispose(),this.resize&&this.resize.complete(),this.elementResize&&this.elementResize.complete(),this.isInitializing=!1}hasActiveSession(){return this.io&&this.io.socket&&this.io.socket.connected}checkBackendPersistentSession(){return c(this,null,function*(){try{return(yield this.$api.get("/platform-tools/terminal/has-persistent-session").toPromise()).hasPersistentSession}catch(s){return console.error("Failed to check backend persistent session:",s),!1}})}hasUserTypedInSession(){return this.hasUserTyped}isTerminalReady(){return this.term&&!this.isInitializing}reconnectTerminal(s,e={},r){if(this.isInitializing)return!1;this.isInitializing=!0,this.elementResize=r,this.io&&this.io.socket&&this.io.socket.connected?(this.term=new m.Terminal(e),this.fitAddon=new d.FitAddon,this.webLinksAddon=new l.WebLinksAddon,setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.resize=new h,this.term.open(s.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.socket.removeAllListeners("stdout"),this.io.socket.removeAllListeners("process-exit"),this.io.socket.on("stdout",i=>{this.term.write(i)}),this.io.socket.on("process-exit",()=>{this.startSession()}),this.dataDisposable&&this.dataDisposable.dispose(),this.dataDisposable=this.term.onData(i=>{this.hasUserTyped=!0,this.io.socket.emit("stdin",i)}),this.term.onResize(i=>{this.resize.next(i)}),this.resize.pipe(t(500)).subscribe(i=>{this.io.socket.emit("resize",i)}),this.elementResize&&this.elementResize.pipe(t(100)).subscribe({next:()=>{this.fitAddon.fit()}}),this.io.socket.emit("start-session",{cols:this.term.cols,rows:this.term.rows}),this.isInitializing=!1):this.startTerminal(s,e,r)}startTerminal(s,e={},r){return this.isInitializing?!1:(this.isInitializing=!0,this.elementResize=r,this.io=this.$ws.connectToNamespace("platform-tools/terminal"),this.term=new m.Terminal(e),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new d.FitAddon,this.webLinksAddon=new l.WebLinksAddon,this.resize=new h,this.term.open(s.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.pipe(t(200)).subscribe(()=>{this.startSession()}),this.io.socket.on("disconnect",()=>{this.term.write(`
|
|
2
2
|
\r
|
|
3
3
|
\rTerminal disconnected. Is the server running?
|
|
4
4
|
\r
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as z,b as A,c as k}from"./chunk-4A2GGTS4.js";import{a as l}from"./chunk-
|
|
1
|
+
import{a as z,b as A,c as k}from"./chunk-4A2GGTS4.js";import{a as l}from"./chunk-VDNTIVIU.js";import{P as n,g as r,ia as c,n as h,na as d}from"./chunk-EQP5UP7Q.js";var f=r(z(),1),a=r(A(),1),p=r(k(),1);var $=(()=>{class t{$ws=d(l);io;fitAddon;webLinksAddon;resize;elementResize;pluginName;term;startTerminal(m,s={},u,w){this.pluginName=w,this.elementResize=u,this.io=this.$ws.connectToNamespace("log"),this.term=new p.Terminal(s),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new f.FitAddon,this.webLinksAddon=new a.WebLinksAddon,this.resize=new h,this.term.open(m.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.subscribe(()=>{this.term.reset(),this.io.socket.emit("tail-log",{cols:this.term.cols,rows:this.term.rows})}),this.io.socket.on("disconnect",()=>{this.term.write(`
|
|
2
2
|
\r
|
|
3
3
|
\rWebsocket failed to connect. Is the server running?
|
|
4
4
|
\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-Q2JNFJIW.js";import{k as c,n as p,q as m}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-Q2JNFJIW.js";import{k as c,n as p,q as m}from"./chunk-C6SX7UJC.js";import{g as f,h as r,ia as n,na as a,x as s}from"./chunk-EQP5UP7Q.js";var l=f(u(),1);var $=(()=>{class e{$api=a(m);$toastr=a(p);$translate=a(c);downloadBackup(){return r(this,null,function*(){let t=yield s(this.$api.get("/backup/download",{observe:"response",responseType:"blob"})),i=t.headers.get("File-Name")||"homebridge-backup.tar.gz",o=t.body.size;if(o>globalThis.backup.maxBackupSize){let b=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(o/1048576).toFixed(1)}MB`});this.$toastr.warning(b,this.$translate.instant("toast.title_warning"))}(0,l.saveAs)(t.body,i)})}static \u0275fac=function(i){return new(i||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{$ as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as r}from"./chunk-5WBNDRQY.js";import{eb as e,ja as t}from"./chunk-EQP5UP7Q.js";var m=[{path:"",loadComponent:()=>import("./chunk-
|
|
1
|
+
import{h as r}from"./chunk-5WBNDRQY.js";import{eb as e,ja as t}from"./chunk-EQP5UP7Q.js";var m=[{path:"",loadComponent:()=>import("./chunk-A5DSO4JZ.js").then(o=>o.PowerOptionsComponent)}],n=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[r.forChild(m),r]})}return o})();var d=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n]})}return o})();export{d as PowerOptionsModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as P}from"./chunk-46GAMPZC.js";import{a as z}from"./chunk-XFAARHWA.js";import{B as $,c as E,e as y,l as k}from"./chunk-PJNMYOLO.js";import{c as D}from"./chunk-5WBNDRQY.js";import{b as O}from"./chunk-
|
|
1
|
+
import{a as P}from"./chunk-46GAMPZC.js";import{a as z}from"./chunk-XFAARHWA.js";import{B as $,c as E,e as y,l as k}from"./chunk-PJNMYOLO.js";import{c as D}from"./chunk-5WBNDRQY.js";import{b as O}from"./chunk-J6DUGLTN.js";import{k as T,n as I,q as H}from"./chunk-C6SX7UJC.js";import{Ib as g,Lb as _,Nb as a,Qa as p,_b as v,db as x,fc as b,gc as M,h as S,hc as V,na as r,qb as m,rb as u,sa as l,ta as c,wb as f,x as C,xb as d,yb as s,zb as w}from"./chunk-EQP5UP7Q.js";function A(i,h){i&1&&w(0,"i",6)}function L(i,h){i&1&&w(0,"i",7)}function F(i,h){if(i&1){let t=g();d(0,"ngx-monaco-editor",10),_("onInit",function(e){l(t);let o=a();return c(o.onEditorInit(e))})("keydown.control.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())})("keydown.meta.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())}),s()}if(i&2){let t=a();f("options",t.editorOptions)("model",t.monacoEditorModel)}}function W(i,h){if(i&1){let t=g();d(0,"textarea",11),V("ngModelChange",function(e){l(t);let o=a();return M(o.startupScript,e)||(o.startupScript=e),c(e)}),v(1," "),s()}if(i&2){let t=a();b("ngModel",t.startupScript)}}var tt=(()=>{class i{$api=r(H);$md=r(z);$route=r(D);$settings=r(O);$toastr=r(I);$translate=r(T);lastHeight;visualViewPortEventCallback;startupScript;saveInProgress;isMobile=!1;options={printMargin:!1};monacoEditor;editorOptions;monacoEditorModel;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"shell",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light"},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(t=>{this.startupScript=t.startupScript.script}),this.monacoEditorModel={value:"",language:"shell"}}onEditorInit(t){this.monacoEditor=t,this.monacoEditor.getModel().setValue(this.startupScript)}onSave(){return S(this,null,function*(){if(!this.saveInProgress){if(this.saveInProgress=!0,this.isMobile||(yield this.monacoEditor.getAction("editor.action.formatDocument").run(),this.startupScript=this.monacoEditor.getModel().getValue()),!["#!/bin/sh","#!/bin/bash"].includes(this.startupScript.split(`
|
|
2
2
|
`)[0].trim())){this.$toastr.error(this.$translate.instant("platform.docker.must_use_hashbang"),this.$translate.instant("toast.title_error")),this.startupScript=`#!/bin/sh
|
|
3
3
|
|
|
4
4
|
${this.startupScript}`,this.isMobile||this.monacoEditor.getModel().setValue(this.startupScript),this.saveInProgress=!1;return}try{yield C(this.$api.put("/platform-tools/docker/startup-script",{script:this.startupScript})),this.$toastr.success(this.$translate.instant("platform.docker.restart_required"),this.$translate.instant("platform.docker.script_saved"))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}ngOnDestroy(){window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}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)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=x({type:i,selectors:[["ng-component"]],decls:11,vars:4,consts:[[1,"flex-column","d-flex","align-items-stretch","h-100"],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0","font-monospace"],[1,"col-6","text-end"],[1,"btn","btn-primary","waves-effect","m-0",3,"click","disabled"],[1,"fas","fa-spinner","fa-pulse"],[1,"fas","fa-floppy-disk"],[1,"flex-grow-1","h-100","w-100","my-2",3,"options","model"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-2",3,"ngModel"],[1,"flex-grow-1","h-100","w-100","my-2",3,"onInit","keydown.control.s","keydown.meta.s","options","model"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-2",3,"ngModelChange","ngModel"]],template:function(n,e){n&1&&(d(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),v(4,"startup.sh"),s()(),d(5,"div",4)(6,"button",5),_("click",function(){return e.onSave()}),m(7,A,1,0,"i",6)(8,L,1,0,"i",7),s()()(),m(9,F,1,2,"ngx-monaco-editor",8),m(10,W,2,1,"textarea",9),s()),n&2&&(p(6),f("disabled",e.saveInProgress),p(),u(e.saveInProgress?7:8),p(2),u(e.isMobile?-1:9),p(),u(e.isMobile?10:-1))},dependencies:[P,$,E,y,k],encapsulation:2})}return i})();export{tt as StartupScriptComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as V}from"./chunk-
|
|
1
|
+
import{a as V}from"./chunk-IBETLCOI.js";import{n as T,t as S}from"./chunk-5SJKGEVE.js";import"./chunk-PJNMYOLO.js";import{e as R}from"./chunk-5WBNDRQY.js";import{b as O}from"./chunk-J6DUGLTN.js";import{k,l as y,n as I,q as P}from"./chunk-C6SX7UJC.js";import{$b as $,Ib as v,Lb as m,Nb as b,Qa as i,_b as c,ac as d,db as w,na as p,qb as f,rb as h,sa as u,sc as a,ta as _,tc as s,wb as x,xb as o,yb as r,zb as C}from"./chunk-EQP5UP7Q.js";function E(e,g){if(e&1){let t=v();o(0,"p",5)(1,"button",6),m("click",function(){u(t);let n=b();return _(n.restartServer())}),c(2),a(3,"translate"),r()()}e&2&&(i(2),d(" ",s(3,1,"menu.linux.label_restart_server")," "))}function H(e,g){if(e&1){let t=v();o(0,"p",5)(1,"button",6),m("click",function(){u(t);let n=b();return _(n.shutdownServer())}),c(2),a(3,"translate"),r()()}e&2&&(i(2),d(" ",s(3,1,"menu.linux.label_shutdown_server")," "))}function D(e,g){if(e&1){let t=v();o(0,"p",5)(1,"button",6),m("click",function(){u(t);let n=b();return _(n.dockerRestartContainer())}),c(2),a(3,"translate"),r()()}e&2&&(i(2),d(" ",s(3,1,"menu.docker.restart_container")," "))}var K=(()=>{class e{$api=p(P);$modal=p(T);$router=p(R);$settings=p(O);$toastr=p(I);$translate=p(k);canShutdownRestartHost=this.$settings.env.canShutdownRestartHost;runningInDocker=this.$settings.env.runningInDocker;ngOnInit(){let t=this.$translate.instant("menu.restart.title");this.$settings.setPageTitle(t)}closeRestartToast(){this.$settings.restartToastRef&&(this.$toastr.clear(this.$settings.restartToastRef.toastId),this.$settings.restartToastRef=null)}restartHomebridge(){this.closeRestartToast(),this.$router.navigate(["/restart"])}restartHomebridgeService(){this.closeRestartToast(),this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>{this.$router.navigate(["/restart"])},error:t=>{console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}restartServer(){this.closeRestartToast(),this.$router.navigate(["/platform-tools/linux/restart-server"])}shutdownServer(){this.closeRestartToast();let t=this.$modal.open(V,{size:"lg",backdrop:"static"});t.componentInstance.title=this.$translate.instant("menu.linux.label_shutdown_server"),t.componentInstance.message=this.$translate.instant("menu.linux.label_shutdown_modal"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_continue"),t.componentInstance.faIconClass="fa fa-power-off primary-text",t.result.then(()=>{this.$router.navigate(["/platform-tools/linux/shutdown-server"])}).catch(()=>{})}dockerRestartContainer(){this.closeRestartToast(),this.$router.navigate(["/platform-tools/docker/restart-container"])}static \u0275fac=function(l){return new(l||e)};static \u0275cmp=w({type:e,selectors:[["ng-component"]],decls:19,vars:16,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-power-off",2,"font-size","75px"],[1,"w-100","text-center","my-5"],["type","button",1,"btn","btn-primary","p-3","my-0",2,"width","85%",3,"click"],["type","button","container","body","triggers","hover",1,"btn","btn-primary","p-3","my-0",2,"width","85%",3,"click","openDelay","ngbTooltip"]],template:function(l,n){l&1&&(o(0,"div",0)(1,"h3",1),c(2),a(3,"translate"),r()(),o(4,"div",2)(5,"div",3),C(6,"i",4),r(),o(7,"p",5)(8,"button",6),m("click",function(){return n.restartHomebridge()}),c(9),a(10,"translate"),r()(),o(11,"p",5)(12,"button",7),a(13,"translate"),m("click",function(){return n.restartHomebridgeService()}),c(14),a(15,"translate"),r()(),f(16,E,4,3,"p",5),f(17,H,4,3,"p",5),f(18,D,4,3,"p",5),r()),l&2&&(i(2),$(s(3,8,"menu.restart.title")),i(7),d(" ",s(10,10,"menu.hbrestart.confirm_hb")," "),i(3),x("openDelay",150)("ngbTooltip",s(13,12,"reset.force_restart_hb_help_text")),i(2),d(" ",s(15,14,"menu.hbrestart.confirm_ui")," "),i(2),h(n.canShutdownRestartHost?16:-1),i(),h(n.canShutdownRestartHost?17:-1),i(),h(n.runningInDocker?18:-1))},dependencies:[S,y],encapsulation:2})}return e})();export{K as PowerOptionsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-ARUCLTY5.js";import"./chunk-MWO5DZGH.js";import"./chunk-UVIAZRUH.js";import{h as r}from"./chunk-5WBNDRQY.js";import"./chunk-J6DUGLTN.js";import"./chunk-C6SX7UJC.js";import{eb as e,ja as o}from"./chunk-EQP5UP7Q.js";var c=[{path:"",loadComponent:()=>import("./chunk-FAEVU5HO.js").then(t=>t.SettingsComponent),canActivate:[n]}],m=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[r.forChild(c),r]})}return t})();var l=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[m]})}return t})();export{l as SettingsModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as c}from"./chunk-
|
|
1
|
+
import{b as c}from"./chunk-MWO5DZGH.js";import{b as f}from"./chunk-UVIAZRUH.js";import{e as u}from"./chunk-5WBNDRQY.js";import{b as h}from"./chunk-J6DUGLTN.js";import{k as o,n}from"./chunk-C6SX7UJC.js";import{h as i,ia as s,na as t,x as a}from"./chunk-EQP5UP7Q.js";var j=(()=>{class e{$auth=t(f);$authHelper=t(c);$router=t(u);$settings=t(h);$translate=t(o);$toastr=t(n);canActivate(m,r){return i(this,null,function*(){return this.$settings.settingsLoaded||(yield a(this.$settings.onSettingsLoaded)),this.$settings.formAuth===!1?(yield this.$auth.noauth(),!0):(yield this.$authHelper.isAuthenticated())?(yield this.$auth.checkAndRefreshIfNeeded(),this.$auth.user?.admin?!0:(this.$toastr.error(this.$translate.instant("toast.no_auth"),this.$translate.instant("toast.title_error")),yield this.$router.navigate(["/"]),!1)):(window.sessionStorage.setItem("target_route",r.url),yield this.$router.navigate(["/login"]),!1)})}static \u0275fac=function(r){return new(r||e)};static \u0275prov=s({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{j as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n}from"./chunk-5WBNDRQY.js";import{b as s}from"./chunk-
|
|
1
|
+
import{e as n}from"./chunk-5WBNDRQY.js";import{b as s}from"./chunk-J6DUGLTN.js";import{h as r,ia as o,na as e,x as i}from"./chunk-EQP5UP7Q.js";var l=(()=>{class t{$router=e(n);$settings=e(s);canActivate(){return r(this,null,function*(){return this.$settings.settingsLoaded||(yield i(this.$settings.onSettingsLoaded)),this.$settings.env.setupWizardComplete===!1||this.$router.navigate(["/"]),!0})}static \u0275fac=function(a){return new(a||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{l as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"./chunk-
|
|
1
|
+
import{a as b}from"./chunk-VDNTIVIU.js";import"./chunk-UVIAZRUH.js";import{e as T}from"./chunk-5WBNDRQY.js";import{b as w}from"./chunk-J6DUGLTN.js";import{k as C,l as $,n as k,q as S}from"./chunk-C6SX7UJC.js";import{$b as s,Ab as r,Bb as i,Cb as l,Jb as E,La as x,Nb as h,Qa as n,_b as a,db as _,mc as g,na as o,qb as d,rb as f,sc as m,tc as c,uc as y}from"./chunk-EQP5UP7Q.js";var I=t=>({command:t});function D(t,u){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=h();n(),s(e.error)}}function R(t,u){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),l(5,"i",12),i()()),t&2&&(n(),s(c(2,1,"restart.please_wait_while_server_restarts")))}function B(t,u){if(t&1&&(r(0,"div",8)(1,"p"),a(2),m(3,"translate"),i(),l(4,"p",13),m(5,"translate"),i()),t&2){let e=h();n(2),s(c(3,2,"platform.docker.server_long_time")),n(2),E("innerHTML",y(5,4,"platform.docker.run_with_restart",g(7,I,e.command)),x)}}var U=(()=>{class t{$api=o(S);$router=o(T);$settings=o(w);$toastr=o(k);$translate=o(C);$ws=o(b);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;command='<span class="font-monospace">--restart=always</span>';ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/docker/restart-container",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{this.error=this.$translate.instant("restart.toast_server_restart_error"),console.error(e),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="ok"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.docker.container_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},1e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},6e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=_({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fab","fa-docker",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-spinner","fa-spin"],[1,"grey-text","mb-0",3,"innerHTML"]],template:function(p,v){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),l(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),d(11,D,2,1,"div",7)(12,R,6,3),d(13,B,6,9,"div",8),i()()),p&2&&(n(2),s(c(3,4,"menu.restart.title")),n(7),s(c(10,6,"platform.docker.title_restarting")),n(2),f(v.error?11:12),n(2),f(v.timeout?13:-1))},dependencies:[$],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{U as ContainerRestartComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as u,h as s}from"./chunk-5WBNDRQY.js";import{k as p,n as l,q as d}from"./chunk-
|
|
1
|
+
import{e as u,h as s}from"./chunk-5WBNDRQY.js";import{k as p,n as l,q as d}from"./chunk-C6SX7UJC.js";import{eb as n,h as f,ia as c,ja as i,na as e,x as m}from"./chunk-EQP5UP7Q.js";var a=(()=>{class t{$api=e(d);$router=e(u);$toastr=e(l);$translate=e(p);resolve(){return f(this,null,function*(){try{let o=yield m(this.$api.get("/config-editor"));return JSON.stringify(o,null,4)}catch(o){console.error(o),this.$toastr.error(o.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(r){return new(r||t)};static \u0275prov=c({token:t,factory:t.\u0275fac})}return t})();var y=[{path:"",loadComponent:()=>import("./chunk-Z67DYENU.js").then(t=>t.ConfigEditorComponent),resolve:{config:a}}],v=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=n({type:t});static \u0275inj=i({imports:[s.forChild(y),s]})}return t})();var T=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=n({type:t});static \u0275inj=i({providers:[a],imports:[v]})}return t})();export{T as ConfigEditorModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Aa as M,C as at,D as lt,Da as Q,Db as _t,E as Pt,Eb as yt,Gc as Kt,Ib as Tt,Ka as Ht,Kb as $t,La as gt,Lb as V,Nb as f,O as Mt,Qa as a,R as P,Ta as mt,Tc as Ct,Xa as Bt,Xb as $,Zb as v,_ as ut,_a as x,_b as b,a as c,ac as L,b as F,ba as ct,db as vt,e as ne,eb as bt,gb as Vt,hd as zt,ia as d,ja as ht,jb as N,la as Y,ma as S,n as p,na as u,oa as Nt,ob as W,pb as H,qd as qt,s as k,sa as dt,ta as ft,u as D,wa as J,wb as h,xa as pt,xb as g,y as ot,yb as m,zb as B}from"./chunk-EQP5UP7Q.js";var Xt=ne((xi,Ne)=>{Ne.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",type:"module",version:"5.9.1-beta.4",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"hb-service":"dist/bin/hb-service.js"},engines:{node:"^20.19.0 || ^22.12.0 || ^24.0.0",homebridge:"^1.8.0 || ^2.0.0-alpha.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"tsx scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"tsx src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.2","@fastify/multipart":"9.3.0","@fastify/static":"8.3.0","@homebridge/hap-client":"3.1.2","@homebridge/node-pty-prebuilt-multiarch":"0.13.1","@nestjs/axios":"4.0.1","@nestjs/common":"11.1.8","@nestjs/core":"11.1.8","@nestjs/jwt":"11.0.1","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.8","@nestjs/platform-socket.io":"11.1.8","@nestjs/swagger":"11.2.1","@nestjs/websockets":"11.1.8",axios:"1.13.2","bash-color":"0.0.4","bonjour-service":"1.3.0","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.2",dayjs:"1.11.19",fastify:"5.6.1","fs-extra":"11.3.2",jsonwebtoken:"9.0.2",lodash:"4.17.21","node-cache":"5.1.2","node-forge":"1.3.1","node-schedule":"2.1.1",ora:"9.0.0",otplib:"12.0.1","p-limit":"7.2.0",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.3",systeminformation:"5.27.11",tail:"2.2.6",tar:"7.5.2","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^6.2.0","@nestjs/testing":"^11.1.8","@prettier/plugin-xml":"^3.4.2","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.20","@types/node":"^24.10.0","@types/node-forge":"^1.3.11","@types/node-schedule":"^2.1.8","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.1","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^4.0.7",concurrently:"^9.2.1","eslint-plugin-format":"^1.0.2","form-data":"^4.0.4",nodemon:"^3.1.10",rimraf:"^6.1.0",tsx:"^4.20.6",typescript:"^5.9.3","unplugin-swc":"^1.5.8",vitest:"^4.0.7"},overrides:{"@homebridge/hap-client":{axios:"1.13.2"}},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var y=(function(e){return e[e.State=0]="State",e[e.Transition=1]="Transition",e[e.Sequence=2]="Sequence",e[e.Group=3]="Group",e[e.Animate=4]="Animate",e[e.Keyframes=5]="Keyframes",e[e.Style=6]="Style",e[e.Trigger=7]="Trigger",e[e.Reference=8]="Reference",e[e.AnimateChild=9]="AnimateChild",e[e.AnimateRef=10]="AnimateRef",e[e.Query=11]="Query",e[e.Stagger=12]="Stagger",e})(y||{}),se="*";function xt(e,n){return{type:y.Trigger,name:e,definitions:n,options:{}}}function X(e,n=null){return{type:y.Animate,styles:n,timings:e}}function He(e,n=null){return{type:y.Sequence,steps:e,options:n}}function K(e){return{type:y.Style,styles:e,offset:null}}function z(e,n,t){return{type:y.State,name:e,styles:n,options:t}}function tt(e,n,t=null){return{type:y.Transition,expr:e,animation:n,options:t}}var wt=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(n=0,t=0){this.totalTime=n+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){let t=n=="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},Dt=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(n){this.players=n;let t=0,i=0,s=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==r&&this._onFinish()}),o.onDestroy(()=>{++i==r&&this._onDestroy()}),o.onStart(()=>{++s==r&&this._onStart()})}),this.totalTime=this.players.reduce((o,l)=>Math.max(o,l.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){let t=n*this.totalTime;this.players.forEach(i=>{let s=i.totalTime?Math.min(1,t/i.totalTime):1;i.setPosition(s)})}getPosition(){let n=this.players.reduce((t,i)=>t===null||i.totalTime>t.totalTime?i:t,null);return n!=null?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){let t=n=="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},re="!";var G=class{},le=(()=>{class e{handle(t){return t.key}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),O=class{},ue=(()=>{class e extends O{compile(t,i){return t}compileTranslations(t,i){return t}static \u0275fac=(()=>{let t;return function(s){return(t||(t=Q(e)))(s||e)}})();static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),E=class{},ce=(()=>{class e extends E{getTranslation(t){return k({})}static \u0275fac=(()=>{let t;return function(s){return(t||(t=Q(e)))(s||e)}})();static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})();function et(e,n){if(e===n)return!0;if(e===null||n===null)return!1;if(e!==e&&n!==n)return!0;let t=typeof e,i=typeof n,s;if(t==i&&t=="object")if(Array.isArray(e)){if(!Array.isArray(n))return!1;if((s=e.length)==n.length){for(let r=0;r<s;r++)if(!et(e[r],n[r]))return!1;return!0}}else{if(Array.isArray(n))return!1;if(_(e)&&_(n)){let r=Object.create(null);for(let o in e){if(!et(e[o],n[o]))return!1;r[o]=!0}for(let o in n)if(!(o in r)&&typeof n[o]<"u")return!1;return!0}}return!1}function T(e){return typeof e<"u"&&e!==null}function Zt(e){return e!==void 0}function _(e){return Z(e)&&!I(e)&&e!==null}function Z(e){return typeof e=="object"&&e!==null}function I(e){return Array.isArray(e)}function it(e){return typeof e=="string"}function he(e){return typeof e=="function"}function nt(e){if(I(e))return e.map(n=>nt(n));if(_(e)){let n={};return Object.keys(e).forEach(t=>{n[t]=nt(e[t])}),n}else return e}function St(e,n){if(!Z(e))return nt(n);let t=nt(e);return Z(t)&&Z(n)&&Object.keys(n).forEach(i=>{_(n[i])?i in e?t[i]=St(e[i],n[i]):Object.assign(t,{[i]:n[i]}):Object.assign(t,{[i]:n[i]})}),t}function Ut(e,n){let t=n.split(".");n="";do{n+=t.shift();let i=!t.length;if(T(e)){if(_(e)&&Zt(e[n])&&(_(e[n])||I(e[n])||i)){e=e[n],n="";continue}if(I(e)){let s=parseInt(n,10);if(Zt(e[s])&&(_(e[s])||I(e[s])||i)){e=e[s],n="";continue}}}if(i){e=void 0;continue}n+="."}while(t.length);return e}function de(e,n,t){return St(e,fe(n,t))}function fe(e,n){return e.split(".").reduceRight((t,i)=>({[i]:t}),n)}var A=class{},pe=(()=>{class e extends A{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(t,i){if(it(t))return this.interpolateString(t,i);if(he(t))return this.interpolateFunction(t,i)}interpolateFunction(t,i){return t(i)}interpolateString(t,i){return i?t.replace(this.templateMatcher,(s,r)=>{let o=this.getInterpolationReplacement(i,r);return o!==void 0?o:s}):t}getInterpolationReplacement(t,i){return this.formatValue(Ut(t,i))}formatValue(t){if(it(t))return t;if(typeof t=="number"||typeof t=="boolean")return t.toString();if(t===null)return"null";if(I(t))return t.join(", ");if(Z(t))return typeof t.toString=="function"&&t.toString!==Object.prototype.toString?t.toString():JSON.stringify(t)}static \u0275fac=(()=>{let t;return function(s){return(t||(t=Q(e)))(s||e)}})();static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),Lt=(()=>{class e{_onTranslationChange=new p;_onLangChange=new p;_onFallbackLangChange=new p;fallbackLang=null;currentLang;translations={};languages=[];getTranslations(t){return this.translations[t]}setTranslations(t,i,s){this.translations[t]=s&&this.hasTranslationFor(t)?St(this.translations[t],i):i,this.addLanguages([t]),this._onTranslationChange.next({lang:t,translations:this.getTranslations(t)})}getLanguages(){return this.languages}getCurrentLang(){return this.currentLang}getFallbackLang(){return this.fallbackLang}setFallbackLang(t,i=!0){this.fallbackLang=t,i&&this._onFallbackLangChange.next({lang:t,translations:this.translations[t]})}setCurrentLang(t,i=!0){this.currentLang=t,i&&this._onLangChange.next({lang:t,translations:this.translations[t]})}get onTranslationChange(){return this._onTranslationChange.asObservable()}get onLangChange(){return this._onLangChange.asObservable()}get onFallbackLangChange(){return this._onFallbackLangChange.asObservable()}addLanguages(t){this.languages=Array.from(new Set([...this.languages,...t]))}hasTranslationFor(t){return typeof this.translations[t]<"u"}deleteTranslations(t){delete this.translations[t]}getTranslation(t){let i=this.getValue(this.currentLang,t);return i===void 0&&this.fallbackLang!=null&&this.fallbackLang!==this.currentLang&&(i=this.getValue(this.fallbackLang,t)),i}getValue(t,i){return Ut(this.getTranslations(t),i)}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),It=new Y("TRANSLATE_CONFIG"),q=e=>D(e)?e:k(e);var Ft=(()=>{class e{loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;currentLoader=u(E);compiler=u(O);parser=u(A);missingTranslationHandler=u(G);store=u(Lt);extend=!1;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onFallbackLangChange(){return this.store.onFallbackLangChange}get onDefaultLangChange(){return this.store.onFallbackLangChange}constructor(){let t=c({extend:!1,fallbackLang:null},u(It,{optional:!0}));t.lang&&this.use(t.lang),t.fallbackLang&&this.setFallbackLang(t.fallbackLang),t.extend&&(this.extend=!0)}setFallbackLang(t){this.getFallbackLang()||this.store.setFallbackLang(t,!1);let i=this.loadOrExtendLanguage(t);return D(i)?(i.pipe(P(1)).subscribe({next:()=>{this.store.setFallbackLang(t)},error:()=>{}}),i):(this.store.setFallbackLang(t),k(this.store.getTranslations(t)))}use(t){this.lastUseLanguage=t,this.getCurrentLang()||this.store.setCurrentLang(t,!1);let i=this.loadOrExtendLanguage(t);return D(i)?(i.pipe(P(1)).subscribe({next:()=>{this.changeLang(t)},error:()=>{}}),i):(this.changeLang(t),k(this.store.getTranslations(t)))}loadOrExtendLanguage(t){if(!this.store.hasTranslationFor(t)||this.extend)return this._translationRequests[t]=this._translationRequests[t]||this.loadAndCompileTranslations(t),this._translationRequests[t]}changeLang(t){t===this.lastUseLanguage&&this.store.setCurrentLang(t)}getCurrentLang(){return this.store.getCurrentLang()}loadAndCompileTranslations(t){this.pending=!0;let i=this.currentLoader.getTranslation(t).pipe(ut(1),P(1));return this.loadingTranslations=i.pipe(ot(s=>this.compiler.compileTranslations(s,t)),ut(1),P(1)),this.loadingTranslations.subscribe({next:s=>{this.store.setTranslations(t,s,this.extend),this.pending=!1},error:s=>{this.pending=!1}}),i}setTranslation(t,i,s=!1){let r=this.compiler.compileTranslations(i,t);this.store.setTranslations(t,r,s||this.extend)}getLangs(){return this.store.getLanguages()}addLangs(t){this.store.addLanguages(t)}getParsedResultForKey(t,i){let s=this.getTextToInterpolate(t);if(T(s))return this.runInterpolation(s,i);let r=this.missingTranslationHandler.handle(c({key:t,translateService:this},i!==void 0&&{interpolateParams:i}));return r!==void 0?r:t}getFallbackLang(){return this.store.getFallbackLang()}getTextToInterpolate(t){return this.store.getTranslation(t)}runInterpolation(t,i){if(T(t))return I(t)?this.runInterpolationOnArray(t,i):_(t)?this.runInterpolationOnDict(t,i):this.parser.interpolate(t,i)}runInterpolationOnArray(t,i){return t.map(s=>this.runInterpolation(s,i))}runInterpolationOnDict(t,i){let s={};for(let r in t){let o=this.runInterpolation(t[r],i);o!==void 0&&(s[r]=o)}return s}getParsedResult(t,i){return t instanceof Array?this.getParsedResultForArray(t,i):this.getParsedResultForKey(t,i)}getParsedResultForArray(t,i){let s={},r=!1;for(let l of t)s[l]=this.getParsedResultForKey(l,i),r=r||D(s[l]);if(!r)return s;let o=t.map(l=>q(s[l]));return Pt(o).pipe(ot(l=>{let C={};return l.forEach((U,w)=>{C[t[w]]=U}),C}))}get(t,i){if(!T(t)||!t.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(Mt(()=>q(this.getParsedResult(t,i)))):q(this.getParsedResult(t,i))}getStreamOnTranslationChange(t,i){if(!T(t)||!t.length)throw new Error('Parameter "key" is required and cannot be empty');return at(lt(()=>this.get(t,i)),this.onTranslationChange.pipe(ct(()=>{let s=this.getParsedResult(t,i);return q(s)})))}stream(t,i){if(!T(t)||!t.length)throw new Error('Parameter "key" required');return at(lt(()=>this.get(t,i)),this.onLangChange.pipe(ct(()=>{let s=this.getParsedResult(t,i);return q(s)})))}instant(t,i){if(!T(t)||t.length===0)throw new Error('Parameter "key" is required and cannot be empty');let s=this.getParsedResult(t,i);return D(s)?Array.isArray(t)?t.reduce((r,o)=>(r[o]=o,r),{}):t:s}set(t,i,s=this.getCurrentLang()){this.store.setTranslations(s,de(this.store.getTranslations(s),t,it(i)?this.compiler.compile(i,s):this.compiler.compileTranslations(i,s)),!1)}reloadLang(t){return this.resetLang(t),this.loadAndCompileTranslations(t)}resetLang(t){delete this._translationRequests[t],this.store.deleteTranslations(t)}static getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let t=this.getBrowserCultureLang();return t?t.split(/[-_]/)[0]:void 0}static getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}getBrowserLang(){return e.getBrowserLang()}getBrowserCultureLang(){return e.getBrowserCultureLang()}get defaultLang(){return this.getFallbackLang()}get currentLang(){return this.store.getCurrentLang()}get langs(){return this.store.getLanguages()}setDefaultLang(t){return this.setFallbackLang(t)}getDefaultLang(){return this.getFallbackLang()}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})();var Ye=(()=>{class e{translate=u(Ft);_ref=u(Kt);value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onFallbackLangChange;updateValue(t,i,s){let r=o=>{this.value=o!==void 0?o:t,this.lastKey=t,this._ref.markForCheck()};if(s){let o=this.translate.getParsedResult(t,i);D(o)?o.subscribe(r):r(o)}this.translate.get(t,i).subscribe(r)}transform(t,...i){if(!t||!t.length)return t;if(et(t,this.lastKey)&&et(i,this.lastParams))return this.value;let s;if(T(i[0])&&i.length)if(it(i[0])&&i[0].length){let r=i[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{s=JSON.parse(r)}catch(o){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${i[0]}`)}}else _(i[0])&&(s=i[0]);return this.lastKey=t,this.lastParams=i,this.updateValue(t,s),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(r=>{(this.lastKey&&r.lang===this.translate.getCurrentLang()||r.lang===this.translate.getFallbackLang())&&(this.lastKey=null,this.updateValue(t,s,r.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(r=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,s,r.translations))})),this.onFallbackLangChange||(this.onFallbackLangChange=this.translate.onFallbackLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,s))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onFallbackLangChange<"u"&&(this.onFallbackLangChange.unsubscribe(),this.onFallbackLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=Vt({name:"translate",type:e,pure:!1});static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})();function ge(e){return{provide:E,useClass:e}}function me(e){return{provide:O,useClass:e}}function ve(e){return{provide:A,useClass:e}}function be(e){return{provide:G,useClass:e}}function Je(e={}){return _e(c({compiler:me(ue),parser:ve(pe),loader:ge(ce),missingTranslationHandler:be(le)},e),!0)}function _e(e={},n){let t=[];e.loader&&t.push(e.loader),e.compiler&&t.push(e.compiler),e.parser&&t.push(e.parser),e.missingTranslationHandler&&t.push(e.missingTranslationHandler),n&&t.push(Lt),(e.useDefaultLang||e.defaultLanguage)&&(console.warn("The `useDefaultLang` and `defaultLanguage` options are deprecated. Please use `fallbackLang` instead."),e.useDefaultLang===!0&&e.defaultLanguage&&(e.fallbackLang=e.defaultLanguage));let i={fallbackLang:e.fallbackLang??null,lang:e.lang,extend:e.extend??!1};return t.push({provide:It,useValue:i}),t.push({provide:Ft,useClass:Ft,deps:[Lt,E,O,A,G,It]}),t}var Yt=["toast-component",""];function ye(e,n){if(e&1){let t=Tt();g(0,"button",5),V("click",function(){dt(t);let s=f();return ft(s.remove())}),g(1,"span",6),b(2,"\xD7"),m()()}}function Te(e,n){if(e&1&&(_t(0),b(1),yt()),e&2){let t=f(2);a(),L("[",t.duplicatesCount+1,"]")}}function Ce(e,n){if(e&1&&(g(0,"div"),b(1),N(2,Te,2,1,"ng-container",4),m()),e&2){let t=f();v(t.options.titleClass),H("aria-label",t.title),a(),L(" ",t.title," "),a(),h("ngIf",t.duplicatesCount)}}function we(e,n){if(e&1&&B(0,"div",7),e&2){let t=f();v(t.options.messageClass),h("innerHTML",t.message,gt)}}function De(e,n){if(e&1&&(g(0,"div",8),b(1),m()),e&2){let t=f();v(t.options.messageClass),H("aria-label",t.message),a(),L(" ",t.message," ")}}function xe(e,n){if(e&1&&(g(0,"div"),B(1,"div",9),m()),e&2){let t=f();a(),$("width",t.width()+"%")}}function Le(e,n){if(e&1){let t=Tt();g(0,"button",5),V("click",function(){dt(t);let s=f();return ft(s.remove())}),g(1,"span",6),b(2,"\xD7"),m()()}}function Ie(e,n){if(e&1&&(_t(0),b(1),yt()),e&2){let t=f(2);a(),L("[",t.duplicatesCount+1,"]")}}function Fe(e,n){if(e&1&&(g(0,"div"),b(1),N(2,Ie,2,1,"ng-container",4),m()),e&2){let t=f();v(t.options.titleClass),H("aria-label",t.title),a(),L(" ",t.title," "),a(),h("ngIf",t.duplicatesCount)}}function Se(e,n){if(e&1&&B(0,"div",7),e&2){let t=f();v(t.options.messageClass),h("innerHTML",t.message,gt)}}function Oe(e,n){if(e&1&&(g(0,"div",8),b(1),m()),e&2){let t=f();v(t.options.messageClass),H("aria-label",t.message),a(),L(" ",t.message," ")}}function Ee(e,n){if(e&1&&(g(0,"div"),B(1,"div",9),m()),e&2){let t=f();a(),$("width",t.width()+"%")}}var Ot=class{_attachedHost;component;viewContainerRef;injector;constructor(n,t){this.component=n,this.injector=t}attach(n,t){return this._attachedHost=n,n.attach(this,t)}detach(){let n=this._attachedHost;if(n)return this._attachedHost=void 0,n.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},Et=class{_attachedPortal;_disposeFn;attach(n,t){return this._attachedPortal=n,this.attachComponentPortal(n,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(n){this._disposeFn=n}},At=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new p;_activate=new p;_manualClose=new p;_resetTimeout=new p;_countDuplicate=new p;constructor(n){this._overlayRef=n}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(n,t){n&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},R=class{toastId;config;message;title;toastType;toastRef;_onTap=new p;_onAction=new p;constructor(n,t,i,s,r,o){this.toastId=n,this.config=t,this.message=i,this.title=s,this.toastType=r,this.toastRef=o,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(n){this._onAction.next(n)}onAction(){return this._onAction.asObservable()}},Jt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},Qt=new Y("ToastConfig"),Rt=class extends Et{_hostDomElement;_componentFactoryResolver;_appRef;constructor(n,t,i){super(),this._hostDomElement=n,this._componentFactoryResolver=t,this._appRef=i}attachComponentPortal(n,t){let i=this._componentFactoryResolver.resolveComponentFactory(n.component),s;return s=i.create(n.injector),this._appRef.attachView(s.hostView),this.setDisposeFn(()=>{this._appRef.detachView(s.hostView),s.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(s),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(s)),s}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},Ae=(()=>{class e{_document=u(pt);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),jt=class{_portalHost;constructor(n){this._portalHost=n}attach(n,t=!0){return this._portalHost.attach(n,t)}detach(){return this._portalHost.detach()}},Re=(()=>{class e{_overlayContainer=u(Ae);_componentFactoryResolver=u(Bt);_appRef=u(W);_document=u(pt);_paneElements=new Map;create(t,i){return this._createOverlayRef(this.getPaneElement(t,i))}getPaneElement(t="",i){return this._paneElements.get(i)||this._paneElements.set(i,{}),this._paneElements.get(i)[t]||(this._paneElements.get(i)[t]=this._createPaneElement(t,i)),this._paneElements.get(i)[t]}_createPaneElement(t,i){let s=this._document.createElement("div");return s.id="toast-container",s.classList.add(t),s.classList.add("toast-container"),i?i.getContainerElement().appendChild(s):this._overlayContainer.getContainerElement().appendChild(s),s}_createPortalHost(t){return new Rt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new jt(this._createPortalHost(t))}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Wt=(()=>{class e{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,i,s,r,o){this.overlay=i,this._injector=s,this.sanitizer=r,this.ngZone=o,this.toastrConfig=c(c({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=c(c({},t.default.iconClasses),t.config.iconClasses))}show(t,i,s={},r=""){return this._preBuildNotification(r,t,i,this.applyConfig(s))}success(t,i,s={}){let r=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}error(t,i,s={}){let r=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}info(t,i,s={}){let r=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}warning(t,i,s={}){let r=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}clear(t){for(let i of this.toasts)if(t!==void 0){if(i.toastId===t){i.toastRef.manualClose();return}}else i.toastRef.manualClose()}remove(t){let i=this._findToast(t);if(!i||(i.activeToast.toastRef.close(),this.toasts.splice(i.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let s=this.toasts[this.currentlyActive].toastRef;s.isInactive()||(this.currentlyActive=this.currentlyActive+1,s.activate())}return!0}findDuplicate(t="",i="",s,r){let{includeTitleDuplicates:o}=this.toastrConfig;for(let l of this.toasts){let C=o&&l.title===t;if((!o||C)&&l.message===i)return l.toastRef.onDuplicate(s,r),l}return null}applyConfig(t={}){return c(c({},this.toastrConfig),t)}_findToast(t){for(let i=0;i<this.toasts.length;i++)if(this.toasts[i].toastId===t)return{index:i,activeToast:this.toasts[i]};return null}_preBuildNotification(t,i,s,r){return r.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,i,s,r)):this._buildNotification(t,i,s,r)}_buildNotification(t,i,s,r){if(!r.toastComponent)throw new Error("toastComponent required");let o=this.findDuplicate(s,i,this.toastrConfig.resetTimeoutOnDuplicate&&r.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&s||i)&&this.toastrConfig.preventDuplicates&&o!==null)return o;this.previousToastMessage=i;let l=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(l=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let C=this.overlay.create(r.positionClass,this.overlayContainer);this.index=this.index+1;let U=i;i&&r.enableHtml&&(U=this.sanitizer.sanitize(Ht.HTML,i));let w=new At(C),st=new R(this.index,r,U,s,t,w),te=[{provide:R,useValue:st}],ee=J.create({providers:te,parent:this._injector}),ie=new Ot(r.toastComponent,ee),kt=C.attach(ie,r.newestOnTop);w.componentInstance=kt.instance;let rt={toastId:this.index,title:s||"",message:i||"",toastRef:w,onShown:w.afterActivate(),onHidden:w.afterClosed(),onTap:st.onTap(),onAction:st.onAction(),portal:kt};return l||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{rt.toastRef.activate()})),this.toasts.push(rt),rt}static \u0275fac=function(i){return new(i||e)(S(Qt),S(Re),S(J),S(qt),S(mt))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),je=(()=>{class e{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=M(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,i,s){this.toastrService=t,this.toastPackage=i,this.ngZone=s,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r}),this.state=M({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>F(c({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),i=this.hideTime-t;this.width.set(i/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(s=>100-s),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>F(c({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>F(c({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),i)):this.timeout=setTimeout(()=>t(),i)}outsideInterval(t,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),i)):this.intervalId=setInterval(()=>t(),i)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(i){return new(i||e)(x(Wt),x(R),x(mt))};static \u0275cmp=vt({type:e,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(i,s){i&1&&V("click",function(){return s.tapToast()})("mouseenter",function(){return s.stickAround()})("mouseleave",function(){return s.delayedHideToast()}),i&2&&($t("@flyInOut",s._state),v(s.toastClasses),$("display",s.displayStyle))},attrs:Yt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(i,s){i&1&&N(0,ye,3,0,"button",0)(1,Ce,3,5,"div",1)(2,we,1,3,"div",2)(3,De,2,4,"div",3)(4,xe,2,2,"div",4),i&2&&(h("ngIf",s.options.closeButton),a(),h("ngIf",s.title),a(),h("ngIf",s.message&&s.options.enableHtml),a(),h("ngIf",s.message&&!s.options.enableHtml),a(),h("ngIf",s.options.progressBar))},dependencies:[Ct],encapsulation:2,data:{animation:[xt("flyInOut",[z("inactive",K({opacity:0})),z("active",K({opacity:1})),z("removed",K({opacity:0})),tt("inactive => active",X("{{ easeTime }}ms {{ easing }}")),tt("active => removed",X("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return e})(),ke=F(c({},Jt),{toastComponent:je}),Pe=(e={})=>Nt([{provide:Qt,useValue:{default:ke,config:e}}]),Ti=(()=>{class e{static forRoot(t={}){return{ngModule:e,providers:[Pe(t)]}}static \u0275fac=function(i){return new(i||e)};static \u0275mod=bt({type:e});static \u0275inj=ht({})}return e})();var Me=(()=>{class e{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=M(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=M("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,i,s){this.toastrService=t,this.toastPackage=i,this.appRef=s,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),i=this.hideTime-t;this.width.set(i/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(s=>100-s),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(i){return new(i||e)(x(Wt),x(R),x(W))};static \u0275cmp=vt({type:e,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(i,s){i&1&&V("click",function(){return s.tapToast()})("mouseenter",function(){return s.stickAround()})("mouseleave",function(){return s.delayedHideToast()}),i&2&&(v(s.toastClasses),$("display",s.displayStyle))},attrs:Yt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(i,s){i&1&&N(0,Le,3,0,"button",0)(1,Fe,3,5,"div",1)(2,Se,1,3,"div",2)(3,Oe,2,4,"div",3)(4,Ee,2,2,"div",4),i&2&&(h("ngIf",s.options.closeButton),a(),h("ngIf",s.title),a(),h("ngIf",s.message&&s.options.enableHtml),a(),h("ngIf",s.message&&!s.options.enableHtml),a(),h("ngIf",s.options.progressBar))},dependencies:[Ct],encapsulation:2,changeDetection:0})}return e})(),Ci=F(c({},Jt),{toastComponent:Me});var j={serverTarget:Xt().version,production:!0,socket:"",api:{base:(()=>{let n=document.querySelector("base")?.getAttribute("href")||"/";return n.endsWith("/")?`${n}api`:`${n}/api`})(),socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[(()=>{let n=document.querySelector("base")?.getAttribute("href")||"/",t=n.endsWith("/")?`${n}api`:`${n}/api`;return`${window.location.protocol}//${document.location.host}${t}/auth/login`})()]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};var Ei=(()=>{class e{$http=u(zt);get(t,i){return this.$http.get(`${j.api.base}${t}`,i)}post(t,i,s){return this.$http.post(`${j.api.base}${t}`,i,s)}put(t,i,s){return this.$http.put(`${j.api.base}${t}`,i,s)}patch(t,i,s){return this.$http.patch(`${j.api.base}${t}`,i,s)}delete(t,i){return this.$http.delete(`${j.api.base}${t}`,i)}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{y as a,se as b,xt as c,X as d,He as e,K as f,tt as g,wt as h,Dt as i,re as j,Ft as k,Ye as l,Je as m,Wt as n,Ti as o,j as p,Ei as q};
|
|
1
|
+
import{Aa as M,C as at,D as lt,Da as Q,Db as _t,E as Pt,Eb as yt,Gc as Kt,Ib as Tt,Ka as Ht,Kb as $t,La as gt,Lb as V,Nb as f,O as Mt,Qa as a,R as P,Ta as mt,Tc as Ct,Xa as Bt,Xb as $,Zb as v,_ as ut,_a as x,_b as b,a as c,ac as L,b as F,ba as ct,db as vt,e as ne,eb as bt,gb as Vt,hd as zt,ia as d,ja as ht,jb as N,la as Y,ma as S,n as p,na as u,oa as Nt,ob as W,pb as H,qd as qt,s as k,sa as dt,ta as ft,u as D,wa as J,wb as h,xa as pt,xb as g,y as ot,yb as m,zb as B}from"./chunk-EQP5UP7Q.js";var Xt=ne((xi,Ne)=>{Ne.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",type:"module",version:"5.9.1-beta.6",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"hb-service":"dist/bin/hb-service.js"},engines:{node:"^20.19.0 || ^22.12.0 || ^24.0.0",homebridge:"^1.8.0 || ^2.0.0-alpha.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"tsx scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"tsx src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.2","@fastify/multipart":"9.3.0","@fastify/static":"8.3.0","@homebridge/hap-client":"3.1.2","@homebridge/node-pty-prebuilt-multiarch":"0.13.1","@nestjs/axios":"4.0.1","@nestjs/common":"11.1.8","@nestjs/core":"11.1.8","@nestjs/jwt":"11.0.1","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.8","@nestjs/platform-socket.io":"11.1.8","@nestjs/swagger":"11.2.1","@nestjs/websockets":"11.1.8",axios:"1.13.2","bash-color":"0.0.4","bonjour-service":"1.3.0","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.2",dayjs:"1.11.19",fastify:"5.6.1","fs-extra":"11.3.2",jsonwebtoken:"9.0.2",lodash:"4.17.21","node-cache":"5.1.2","node-forge":"1.3.1","node-schedule":"2.1.1",ora:"9.0.0",otplib:"12.0.1","p-limit":"7.2.0",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.3",systeminformation:"5.27.11",tail:"2.2.6",tar:"7.5.2","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^6.2.0","@nestjs/testing":"^11.1.8","@prettier/plugin-xml":"^3.4.2","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.20","@types/node":"^24.10.0","@types/node-forge":"^1.3.11","@types/node-schedule":"^2.1.8","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.1","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^4.0.7",concurrently:"^9.2.1","eslint-plugin-format":"^1.0.2","form-data":"^4.0.4",nodemon:"^3.1.10",rimraf:"^6.1.0",tsx:"^4.20.6",typescript:"^5.9.3","unplugin-swc":"^1.5.8",vitest:"^4.0.7"},overrides:{"@homebridge/hap-client":{axios:"1.13.2"}},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var y=(function(e){return e[e.State=0]="State",e[e.Transition=1]="Transition",e[e.Sequence=2]="Sequence",e[e.Group=3]="Group",e[e.Animate=4]="Animate",e[e.Keyframes=5]="Keyframes",e[e.Style=6]="Style",e[e.Trigger=7]="Trigger",e[e.Reference=8]="Reference",e[e.AnimateChild=9]="AnimateChild",e[e.AnimateRef=10]="AnimateRef",e[e.Query=11]="Query",e[e.Stagger=12]="Stagger",e})(y||{}),se="*";function xt(e,n){return{type:y.Trigger,name:e,definitions:n,options:{}}}function X(e,n=null){return{type:y.Animate,styles:n,timings:e}}function He(e,n=null){return{type:y.Sequence,steps:e,options:n}}function K(e){return{type:y.Style,styles:e,offset:null}}function z(e,n,t){return{type:y.State,name:e,styles:n,options:t}}function tt(e,n,t=null){return{type:y.Transition,expr:e,animation:n,options:t}}var wt=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(n=0,t=0){this.totalTime=n+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){let t=n=="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},Dt=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(n){this.players=n;let t=0,i=0,s=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==r&&this._onFinish()}),o.onDestroy(()=>{++i==r&&this._onDestroy()}),o.onStart(()=>{++s==r&&this._onStart()})}),this.totalTime=this.players.reduce((o,l)=>Math.max(o,l.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){let t=n*this.totalTime;this.players.forEach(i=>{let s=i.totalTime?Math.min(1,t/i.totalTime):1;i.setPosition(s)})}getPosition(){let n=this.players.reduce((t,i)=>t===null||i.totalTime>t.totalTime?i:t,null);return n!=null?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){let t=n=="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},re="!";var G=class{},le=(()=>{class e{handle(t){return t.key}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),O=class{},ue=(()=>{class e extends O{compile(t,i){return t}compileTranslations(t,i){return t}static \u0275fac=(()=>{let t;return function(s){return(t||(t=Q(e)))(s||e)}})();static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),E=class{},ce=(()=>{class e extends E{getTranslation(t){return k({})}static \u0275fac=(()=>{let t;return function(s){return(t||(t=Q(e)))(s||e)}})();static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})();function et(e,n){if(e===n)return!0;if(e===null||n===null)return!1;if(e!==e&&n!==n)return!0;let t=typeof e,i=typeof n,s;if(t==i&&t=="object")if(Array.isArray(e)){if(!Array.isArray(n))return!1;if((s=e.length)==n.length){for(let r=0;r<s;r++)if(!et(e[r],n[r]))return!1;return!0}}else{if(Array.isArray(n))return!1;if(_(e)&&_(n)){let r=Object.create(null);for(let o in e){if(!et(e[o],n[o]))return!1;r[o]=!0}for(let o in n)if(!(o in r)&&typeof n[o]<"u")return!1;return!0}}return!1}function T(e){return typeof e<"u"&&e!==null}function Zt(e){return e!==void 0}function _(e){return Z(e)&&!I(e)&&e!==null}function Z(e){return typeof e=="object"&&e!==null}function I(e){return Array.isArray(e)}function it(e){return typeof e=="string"}function he(e){return typeof e=="function"}function nt(e){if(I(e))return e.map(n=>nt(n));if(_(e)){let n={};return Object.keys(e).forEach(t=>{n[t]=nt(e[t])}),n}else return e}function St(e,n){if(!Z(e))return nt(n);let t=nt(e);return Z(t)&&Z(n)&&Object.keys(n).forEach(i=>{_(n[i])?i in e?t[i]=St(e[i],n[i]):Object.assign(t,{[i]:n[i]}):Object.assign(t,{[i]:n[i]})}),t}function Ut(e,n){let t=n.split(".");n="";do{n+=t.shift();let i=!t.length;if(T(e)){if(_(e)&&Zt(e[n])&&(_(e[n])||I(e[n])||i)){e=e[n],n="";continue}if(I(e)){let s=parseInt(n,10);if(Zt(e[s])&&(_(e[s])||I(e[s])||i)){e=e[s],n="";continue}}}if(i){e=void 0;continue}n+="."}while(t.length);return e}function de(e,n,t){return St(e,fe(n,t))}function fe(e,n){return e.split(".").reduceRight((t,i)=>({[i]:t}),n)}var A=class{},pe=(()=>{class e extends A{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(t,i){if(it(t))return this.interpolateString(t,i);if(he(t))return this.interpolateFunction(t,i)}interpolateFunction(t,i){return t(i)}interpolateString(t,i){return i?t.replace(this.templateMatcher,(s,r)=>{let o=this.getInterpolationReplacement(i,r);return o!==void 0?o:s}):t}getInterpolationReplacement(t,i){return this.formatValue(Ut(t,i))}formatValue(t){if(it(t))return t;if(typeof t=="number"||typeof t=="boolean")return t.toString();if(t===null)return"null";if(I(t))return t.join(", ");if(Z(t))return typeof t.toString=="function"&&t.toString!==Object.prototype.toString?t.toString():JSON.stringify(t)}static \u0275fac=(()=>{let t;return function(s){return(t||(t=Q(e)))(s||e)}})();static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),Lt=(()=>{class e{_onTranslationChange=new p;_onLangChange=new p;_onFallbackLangChange=new p;fallbackLang=null;currentLang;translations={};languages=[];getTranslations(t){return this.translations[t]}setTranslations(t,i,s){this.translations[t]=s&&this.hasTranslationFor(t)?St(this.translations[t],i):i,this.addLanguages([t]),this._onTranslationChange.next({lang:t,translations:this.getTranslations(t)})}getLanguages(){return this.languages}getCurrentLang(){return this.currentLang}getFallbackLang(){return this.fallbackLang}setFallbackLang(t,i=!0){this.fallbackLang=t,i&&this._onFallbackLangChange.next({lang:t,translations:this.translations[t]})}setCurrentLang(t,i=!0){this.currentLang=t,i&&this._onLangChange.next({lang:t,translations:this.translations[t]})}get onTranslationChange(){return this._onTranslationChange.asObservable()}get onLangChange(){return this._onLangChange.asObservable()}get onFallbackLangChange(){return this._onFallbackLangChange.asObservable()}addLanguages(t){this.languages=Array.from(new Set([...this.languages,...t]))}hasTranslationFor(t){return typeof this.translations[t]<"u"}deleteTranslations(t){delete this.translations[t]}getTranslation(t){let i=this.getValue(this.currentLang,t);return i===void 0&&this.fallbackLang!=null&&this.fallbackLang!==this.currentLang&&(i=this.getValue(this.fallbackLang,t)),i}getValue(t,i){return Ut(this.getTranslations(t),i)}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),It=new Y("TRANSLATE_CONFIG"),q=e=>D(e)?e:k(e);var Ft=(()=>{class e{loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;currentLoader=u(E);compiler=u(O);parser=u(A);missingTranslationHandler=u(G);store=u(Lt);extend=!1;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onFallbackLangChange(){return this.store.onFallbackLangChange}get onDefaultLangChange(){return this.store.onFallbackLangChange}constructor(){let t=c({extend:!1,fallbackLang:null},u(It,{optional:!0}));t.lang&&this.use(t.lang),t.fallbackLang&&this.setFallbackLang(t.fallbackLang),t.extend&&(this.extend=!0)}setFallbackLang(t){this.getFallbackLang()||this.store.setFallbackLang(t,!1);let i=this.loadOrExtendLanguage(t);return D(i)?(i.pipe(P(1)).subscribe({next:()=>{this.store.setFallbackLang(t)},error:()=>{}}),i):(this.store.setFallbackLang(t),k(this.store.getTranslations(t)))}use(t){this.lastUseLanguage=t,this.getCurrentLang()||this.store.setCurrentLang(t,!1);let i=this.loadOrExtendLanguage(t);return D(i)?(i.pipe(P(1)).subscribe({next:()=>{this.changeLang(t)},error:()=>{}}),i):(this.changeLang(t),k(this.store.getTranslations(t)))}loadOrExtendLanguage(t){if(!this.store.hasTranslationFor(t)||this.extend)return this._translationRequests[t]=this._translationRequests[t]||this.loadAndCompileTranslations(t),this._translationRequests[t]}changeLang(t){t===this.lastUseLanguage&&this.store.setCurrentLang(t)}getCurrentLang(){return this.store.getCurrentLang()}loadAndCompileTranslations(t){this.pending=!0;let i=this.currentLoader.getTranslation(t).pipe(ut(1),P(1));return this.loadingTranslations=i.pipe(ot(s=>this.compiler.compileTranslations(s,t)),ut(1),P(1)),this.loadingTranslations.subscribe({next:s=>{this.store.setTranslations(t,s,this.extend),this.pending=!1},error:s=>{this.pending=!1}}),i}setTranslation(t,i,s=!1){let r=this.compiler.compileTranslations(i,t);this.store.setTranslations(t,r,s||this.extend)}getLangs(){return this.store.getLanguages()}addLangs(t){this.store.addLanguages(t)}getParsedResultForKey(t,i){let s=this.getTextToInterpolate(t);if(T(s))return this.runInterpolation(s,i);let r=this.missingTranslationHandler.handle(c({key:t,translateService:this},i!==void 0&&{interpolateParams:i}));return r!==void 0?r:t}getFallbackLang(){return this.store.getFallbackLang()}getTextToInterpolate(t){return this.store.getTranslation(t)}runInterpolation(t,i){if(T(t))return I(t)?this.runInterpolationOnArray(t,i):_(t)?this.runInterpolationOnDict(t,i):this.parser.interpolate(t,i)}runInterpolationOnArray(t,i){return t.map(s=>this.runInterpolation(s,i))}runInterpolationOnDict(t,i){let s={};for(let r in t){let o=this.runInterpolation(t[r],i);o!==void 0&&(s[r]=o)}return s}getParsedResult(t,i){return t instanceof Array?this.getParsedResultForArray(t,i):this.getParsedResultForKey(t,i)}getParsedResultForArray(t,i){let s={},r=!1;for(let l of t)s[l]=this.getParsedResultForKey(l,i),r=r||D(s[l]);if(!r)return s;let o=t.map(l=>q(s[l]));return Pt(o).pipe(ot(l=>{let C={};return l.forEach((U,w)=>{C[t[w]]=U}),C}))}get(t,i){if(!T(t)||!t.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(Mt(()=>q(this.getParsedResult(t,i)))):q(this.getParsedResult(t,i))}getStreamOnTranslationChange(t,i){if(!T(t)||!t.length)throw new Error('Parameter "key" is required and cannot be empty');return at(lt(()=>this.get(t,i)),this.onTranslationChange.pipe(ct(()=>{let s=this.getParsedResult(t,i);return q(s)})))}stream(t,i){if(!T(t)||!t.length)throw new Error('Parameter "key" required');return at(lt(()=>this.get(t,i)),this.onLangChange.pipe(ct(()=>{let s=this.getParsedResult(t,i);return q(s)})))}instant(t,i){if(!T(t)||t.length===0)throw new Error('Parameter "key" is required and cannot be empty');let s=this.getParsedResult(t,i);return D(s)?Array.isArray(t)?t.reduce((r,o)=>(r[o]=o,r),{}):t:s}set(t,i,s=this.getCurrentLang()){this.store.setTranslations(s,de(this.store.getTranslations(s),t,it(i)?this.compiler.compile(i,s):this.compiler.compileTranslations(i,s)),!1)}reloadLang(t){return this.resetLang(t),this.loadAndCompileTranslations(t)}resetLang(t){delete this._translationRequests[t],this.store.deleteTranslations(t)}static getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let t=this.getBrowserCultureLang();return t?t.split(/[-_]/)[0]:void 0}static getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}getBrowserLang(){return e.getBrowserLang()}getBrowserCultureLang(){return e.getBrowserCultureLang()}get defaultLang(){return this.getFallbackLang()}get currentLang(){return this.store.getCurrentLang()}get langs(){return this.store.getLanguages()}setDefaultLang(t){return this.setFallbackLang(t)}getDefaultLang(){return this.getFallbackLang()}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})();var Ye=(()=>{class e{translate=u(Ft);_ref=u(Kt);value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onFallbackLangChange;updateValue(t,i,s){let r=o=>{this.value=o!==void 0?o:t,this.lastKey=t,this._ref.markForCheck()};if(s){let o=this.translate.getParsedResult(t,i);D(o)?o.subscribe(r):r(o)}this.translate.get(t,i).subscribe(r)}transform(t,...i){if(!t||!t.length)return t;if(et(t,this.lastKey)&&et(i,this.lastParams))return this.value;let s;if(T(i[0])&&i.length)if(it(i[0])&&i[0].length){let r=i[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{s=JSON.parse(r)}catch(o){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${i[0]}`)}}else _(i[0])&&(s=i[0]);return this.lastKey=t,this.lastParams=i,this.updateValue(t,s),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(r=>{(this.lastKey&&r.lang===this.translate.getCurrentLang()||r.lang===this.translate.getFallbackLang())&&(this.lastKey=null,this.updateValue(t,s,r.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(r=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,s,r.translations))})),this.onFallbackLangChange||(this.onFallbackLangChange=this.translate.onFallbackLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,s))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onFallbackLangChange<"u"&&(this.onFallbackLangChange.unsubscribe(),this.onFallbackLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=Vt({name:"translate",type:e,pure:!1});static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})();function ge(e){return{provide:E,useClass:e}}function me(e){return{provide:O,useClass:e}}function ve(e){return{provide:A,useClass:e}}function be(e){return{provide:G,useClass:e}}function Je(e={}){return _e(c({compiler:me(ue),parser:ve(pe),loader:ge(ce),missingTranslationHandler:be(le)},e),!0)}function _e(e={},n){let t=[];e.loader&&t.push(e.loader),e.compiler&&t.push(e.compiler),e.parser&&t.push(e.parser),e.missingTranslationHandler&&t.push(e.missingTranslationHandler),n&&t.push(Lt),(e.useDefaultLang||e.defaultLanguage)&&(console.warn("The `useDefaultLang` and `defaultLanguage` options are deprecated. Please use `fallbackLang` instead."),e.useDefaultLang===!0&&e.defaultLanguage&&(e.fallbackLang=e.defaultLanguage));let i={fallbackLang:e.fallbackLang??null,lang:e.lang,extend:e.extend??!1};return t.push({provide:It,useValue:i}),t.push({provide:Ft,useClass:Ft,deps:[Lt,E,O,A,G,It]}),t}var Yt=["toast-component",""];function ye(e,n){if(e&1){let t=Tt();g(0,"button",5),V("click",function(){dt(t);let s=f();return ft(s.remove())}),g(1,"span",6),b(2,"\xD7"),m()()}}function Te(e,n){if(e&1&&(_t(0),b(1),yt()),e&2){let t=f(2);a(),L("[",t.duplicatesCount+1,"]")}}function Ce(e,n){if(e&1&&(g(0,"div"),b(1),N(2,Te,2,1,"ng-container",4),m()),e&2){let t=f();v(t.options.titleClass),H("aria-label",t.title),a(),L(" ",t.title," "),a(),h("ngIf",t.duplicatesCount)}}function we(e,n){if(e&1&&B(0,"div",7),e&2){let t=f();v(t.options.messageClass),h("innerHTML",t.message,gt)}}function De(e,n){if(e&1&&(g(0,"div",8),b(1),m()),e&2){let t=f();v(t.options.messageClass),H("aria-label",t.message),a(),L(" ",t.message," ")}}function xe(e,n){if(e&1&&(g(0,"div"),B(1,"div",9),m()),e&2){let t=f();a(),$("width",t.width()+"%")}}function Le(e,n){if(e&1){let t=Tt();g(0,"button",5),V("click",function(){dt(t);let s=f();return ft(s.remove())}),g(1,"span",6),b(2,"\xD7"),m()()}}function Ie(e,n){if(e&1&&(_t(0),b(1),yt()),e&2){let t=f(2);a(),L("[",t.duplicatesCount+1,"]")}}function Fe(e,n){if(e&1&&(g(0,"div"),b(1),N(2,Ie,2,1,"ng-container",4),m()),e&2){let t=f();v(t.options.titleClass),H("aria-label",t.title),a(),L(" ",t.title," "),a(),h("ngIf",t.duplicatesCount)}}function Se(e,n){if(e&1&&B(0,"div",7),e&2){let t=f();v(t.options.messageClass),h("innerHTML",t.message,gt)}}function Oe(e,n){if(e&1&&(g(0,"div",8),b(1),m()),e&2){let t=f();v(t.options.messageClass),H("aria-label",t.message),a(),L(" ",t.message," ")}}function Ee(e,n){if(e&1&&(g(0,"div"),B(1,"div",9),m()),e&2){let t=f();a(),$("width",t.width()+"%")}}var Ot=class{_attachedHost;component;viewContainerRef;injector;constructor(n,t){this.component=n,this.injector=t}attach(n,t){return this._attachedHost=n,n.attach(this,t)}detach(){let n=this._attachedHost;if(n)return this._attachedHost=void 0,n.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},Et=class{_attachedPortal;_disposeFn;attach(n,t){return this._attachedPortal=n,this.attachComponentPortal(n,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(n){this._disposeFn=n}},At=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new p;_activate=new p;_manualClose=new p;_resetTimeout=new p;_countDuplicate=new p;constructor(n){this._overlayRef=n}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(n,t){n&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},R=class{toastId;config;message;title;toastType;toastRef;_onTap=new p;_onAction=new p;constructor(n,t,i,s,r,o){this.toastId=n,this.config=t,this.message=i,this.title=s,this.toastType=r,this.toastRef=o,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(n){this._onAction.next(n)}onAction(){return this._onAction.asObservable()}},Jt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},Qt=new Y("ToastConfig"),Rt=class extends Et{_hostDomElement;_componentFactoryResolver;_appRef;constructor(n,t,i){super(),this._hostDomElement=n,this._componentFactoryResolver=t,this._appRef=i}attachComponentPortal(n,t){let i=this._componentFactoryResolver.resolveComponentFactory(n.component),s;return s=i.create(n.injector),this._appRef.attachView(s.hostView),this.setDisposeFn(()=>{this._appRef.detachView(s.hostView),s.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(s),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(s)),s}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},Ae=(()=>{class e{_document=u(pt);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),jt=class{_portalHost;constructor(n){this._portalHost=n}attach(n,t=!0){return this._portalHost.attach(n,t)}detach(){return this._portalHost.detach()}},Re=(()=>{class e{_overlayContainer=u(Ae);_componentFactoryResolver=u(Bt);_appRef=u(W);_document=u(pt);_paneElements=new Map;create(t,i){return this._createOverlayRef(this.getPaneElement(t,i))}getPaneElement(t="",i){return this._paneElements.get(i)||this._paneElements.set(i,{}),this._paneElements.get(i)[t]||(this._paneElements.get(i)[t]=this._createPaneElement(t,i)),this._paneElements.get(i)[t]}_createPaneElement(t,i){let s=this._document.createElement("div");return s.id="toast-container",s.classList.add(t),s.classList.add("toast-container"),i?i.getContainerElement().appendChild(s):this._overlayContainer.getContainerElement().appendChild(s),s}_createPortalHost(t){return new Rt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new jt(this._createPortalHost(t))}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Wt=(()=>{class e{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,i,s,r,o){this.overlay=i,this._injector=s,this.sanitizer=r,this.ngZone=o,this.toastrConfig=c(c({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=c(c({},t.default.iconClasses),t.config.iconClasses))}show(t,i,s={},r=""){return this._preBuildNotification(r,t,i,this.applyConfig(s))}success(t,i,s={}){let r=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}error(t,i,s={}){let r=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}info(t,i,s={}){let r=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}warning(t,i,s={}){let r=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}clear(t){for(let i of this.toasts)if(t!==void 0){if(i.toastId===t){i.toastRef.manualClose();return}}else i.toastRef.manualClose()}remove(t){let i=this._findToast(t);if(!i||(i.activeToast.toastRef.close(),this.toasts.splice(i.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let s=this.toasts[this.currentlyActive].toastRef;s.isInactive()||(this.currentlyActive=this.currentlyActive+1,s.activate())}return!0}findDuplicate(t="",i="",s,r){let{includeTitleDuplicates:o}=this.toastrConfig;for(let l of this.toasts){let C=o&&l.title===t;if((!o||C)&&l.message===i)return l.toastRef.onDuplicate(s,r),l}return null}applyConfig(t={}){return c(c({},this.toastrConfig),t)}_findToast(t){for(let i=0;i<this.toasts.length;i++)if(this.toasts[i].toastId===t)return{index:i,activeToast:this.toasts[i]};return null}_preBuildNotification(t,i,s,r){return r.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,i,s,r)):this._buildNotification(t,i,s,r)}_buildNotification(t,i,s,r){if(!r.toastComponent)throw new Error("toastComponent required");let o=this.findDuplicate(s,i,this.toastrConfig.resetTimeoutOnDuplicate&&r.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&s||i)&&this.toastrConfig.preventDuplicates&&o!==null)return o;this.previousToastMessage=i;let l=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(l=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let C=this.overlay.create(r.positionClass,this.overlayContainer);this.index=this.index+1;let U=i;i&&r.enableHtml&&(U=this.sanitizer.sanitize(Ht.HTML,i));let w=new At(C),st=new R(this.index,r,U,s,t,w),te=[{provide:R,useValue:st}],ee=J.create({providers:te,parent:this._injector}),ie=new Ot(r.toastComponent,ee),kt=C.attach(ie,r.newestOnTop);w.componentInstance=kt.instance;let rt={toastId:this.index,title:s||"",message:i||"",toastRef:w,onShown:w.afterActivate(),onHidden:w.afterClosed(),onTap:st.onTap(),onAction:st.onAction(),portal:kt};return l||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{rt.toastRef.activate()})),this.toasts.push(rt),rt}static \u0275fac=function(i){return new(i||e)(S(Qt),S(Re),S(J),S(qt),S(mt))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),je=(()=>{class e{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=M(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,i,s){this.toastrService=t,this.toastPackage=i,this.ngZone=s,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r}),this.state=M({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>F(c({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),i=this.hideTime-t;this.width.set(i/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(s=>100-s),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>F(c({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>F(c({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),i)):this.timeout=setTimeout(()=>t(),i)}outsideInterval(t,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),i)):this.intervalId=setInterval(()=>t(),i)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(i){return new(i||e)(x(Wt),x(R),x(mt))};static \u0275cmp=vt({type:e,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(i,s){i&1&&V("click",function(){return s.tapToast()})("mouseenter",function(){return s.stickAround()})("mouseleave",function(){return s.delayedHideToast()}),i&2&&($t("@flyInOut",s._state),v(s.toastClasses),$("display",s.displayStyle))},attrs:Yt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(i,s){i&1&&N(0,ye,3,0,"button",0)(1,Ce,3,5,"div",1)(2,we,1,3,"div",2)(3,De,2,4,"div",3)(4,xe,2,2,"div",4),i&2&&(h("ngIf",s.options.closeButton),a(),h("ngIf",s.title),a(),h("ngIf",s.message&&s.options.enableHtml),a(),h("ngIf",s.message&&!s.options.enableHtml),a(),h("ngIf",s.options.progressBar))},dependencies:[Ct],encapsulation:2,data:{animation:[xt("flyInOut",[z("inactive",K({opacity:0})),z("active",K({opacity:1})),z("removed",K({opacity:0})),tt("inactive => active",X("{{ easeTime }}ms {{ easing }}")),tt("active => removed",X("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return e})(),ke=F(c({},Jt),{toastComponent:je}),Pe=(e={})=>Nt([{provide:Qt,useValue:{default:ke,config:e}}]),Ti=(()=>{class e{static forRoot(t={}){return{ngModule:e,providers:[Pe(t)]}}static \u0275fac=function(i){return new(i||e)};static \u0275mod=bt({type:e});static \u0275inj=ht({})}return e})();var Me=(()=>{class e{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=M(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=M("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,i,s){this.toastrService=t,this.toastPackage=i,this.appRef=s,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),i=this.hideTime-t;this.width.set(i/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(s=>100-s),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(i){return new(i||e)(x(Wt),x(R),x(W))};static \u0275cmp=vt({type:e,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(i,s){i&1&&V("click",function(){return s.tapToast()})("mouseenter",function(){return s.stickAround()})("mouseleave",function(){return s.delayedHideToast()}),i&2&&(v(s.toastClasses),$("display",s.displayStyle))},attrs:Yt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(i,s){i&1&&N(0,Le,3,0,"button",0)(1,Fe,3,5,"div",1)(2,Se,1,3,"div",2)(3,Oe,2,4,"div",3)(4,Ee,2,2,"div",4),i&2&&(h("ngIf",s.options.closeButton),a(),h("ngIf",s.title),a(),h("ngIf",s.message&&s.options.enableHtml),a(),h("ngIf",s.message&&!s.options.enableHtml),a(),h("ngIf",s.options.progressBar))},dependencies:[Ct],encapsulation:2,changeDetection:0})}return e})(),Ci=F(c({},Jt),{toastComponent:Me});var j={serverTarget:Xt().version,production:!0,socket:"",api:{base:(()=>{let n=document.querySelector("base")?.getAttribute("href")||"/";return n.endsWith("/")?`${n}api`:`${n}/api`})(),socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[(()=>{let n=document.querySelector("base")?.getAttribute("href")||"/",t=n.endsWith("/")?`${n}api`:`${n}/api`;return`${window.location.protocol}//${document.location.host}${t}/auth/login`})()]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};var Ei=(()=>{class e{$http=u(zt);get(t,i){return this.$http.get(`${j.api.base}${t}`,i)}post(t,i,s){return this.$http.post(`${j.api.base}${t}`,i,s)}put(t,i,s){return this.$http.put(`${j.api.base}${t}`,i,s)}patch(t,i,s){return this.$http.patch(`${j.api.base}${t}`,i,s)}delete(t,i){return this.$http.delete(`${j.api.base}${t}`,i)}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{y as a,se as b,xt as c,X as d,He as e,K as f,tt as g,wt as h,Dt as i,re as j,Ft as k,Ye as l,Je as m,Wt as n,Ti as o,j as p,Ei as q};
|