homebridge-config-ui-x 5.0.0-beta.57 → 5.0.0-beta.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +4 -2
  2. package/package.json +2 -2
  3. package/public/chunk-2EGNZE27.js +1 -0
  4. package/public/{chunk-D7VOCNML.js → chunk-2GPZYQYI.js} +1 -1
  5. package/public/{chunk-GFNUBCXV.js → chunk-2PQO2MA7.js} +1 -1
  6. package/public/chunk-2TCTFOWV.js +1 -0
  7. package/public/{chunk-HODXHCDJ.js → chunk-3FUMZPAO.js} +1 -1
  8. package/public/{chunk-J5Z3G3OU.js → chunk-3J42DLCC.js} +1 -1
  9. package/public/{chunk-4TQHPYJK.js → chunk-3KLKBFMT.js} +1 -1
  10. package/public/chunk-446MWPIY.js +1 -0
  11. package/public/{chunk-HFN3B3QR.js → chunk-47HTHVMR.js} +1 -1
  12. package/public/chunk-4NBCC7D7.js +1 -0
  13. package/public/chunk-4ZDYSEWC.js +1 -0
  14. package/public/chunk-55OWQTTO.js +1 -0
  15. package/public/{chunk-YOBUG76J.js → chunk-5FXXZA2R.js} +1 -1
  16. package/public/chunk-5JH2FLCI.js +1 -0
  17. package/public/{chunk-7LJ3B6ZP.js → chunk-5L2KRRPD.js} +1 -1
  18. package/public/{chunk-BYW5V4GN.js → chunk-5VLLXOOB.js} +1 -1
  19. package/public/{chunk-LROU3O4M.js → chunk-5X4G6K3F.js} +1 -1
  20. package/public/{chunk-ZY3WVSWR.js → chunk-6CFNRIWT.js} +1 -1
  21. package/public/{chunk-MHW5U4MP.js → chunk-6GUGEJNI.js} +1 -1
  22. package/public/chunk-7EMPHCR4.js +1 -0
  23. package/public/{chunk-O5YJ4X2O.js → chunk-7I5J73AM.js} +1 -1
  24. package/public/{chunk-362DCP5A.js → chunk-A7J5IO7B.js} +1 -1
  25. package/public/{chunk-XUQW3U5Y.js → chunk-AD6TBKVM.js} +1 -1
  26. package/public/chunk-AI2GWJXT.js +1 -0
  27. package/public/{chunk-AOXOXBCJ.js → chunk-BVWJPSO5.js} +1 -1
  28. package/public/chunk-BYUGGXVS.js +1 -0
  29. package/public/{chunk-QWTSQNT5.js → chunk-CKQJ3HNH.js} +1 -1
  30. package/public/{chunk-6RGVIHF3.js → chunk-CUF6U45I.js} +1 -1
  31. package/public/{chunk-ME47A4CF.js → chunk-DGAXBOBZ.js} +1 -1
  32. package/public/{chunk-4BSIYTAL.js → chunk-DW54XZS2.js} +1 -1
  33. package/public/{chunk-3IKQJJ35.js → chunk-EJPI56NX.js} +1 -1
  34. package/public/{chunk-6W4AJ2ZZ.js → chunk-FKHZR7GC.js} +1 -1
  35. package/public/{chunk-2WH4IK5A.js → chunk-J3SXKFRW.js} +1 -1
  36. package/public/{chunk-IINEZ45K.js → chunk-K7U6CFTP.js} +1 -1
  37. package/public/{chunk-LVDKZONP.js → chunk-KSGWJWVM.js} +1 -1
  38. package/public/{chunk-6C6D5JTI.js → chunk-KTI6UOVP.js} +1 -1
  39. package/public/chunk-L2AEEJ6Q.js +1 -0
  40. package/public/{chunk-RAAYBP75.js → chunk-MCW7B5OZ.js} +1 -1
  41. package/public/chunk-N7CACY44.js +1 -0
  42. package/public/{chunk-HND4X35J.js → chunk-NMUCZXLJ.js} +1 -1
  43. package/public/{chunk-UZKR4SPQ.js → chunk-O6TC4BRG.js} +1 -1
  44. package/public/{chunk-QO3XIGOO.js → chunk-ODTINVNF.js} +1 -1
  45. package/public/chunk-OU3TDSTO.js +1 -0
  46. package/public/{chunk-7RDZL576.js → chunk-PFI5T7QO.js} +1 -1
  47. package/public/{chunk-ITMRCE56.js → chunk-Q663GNA7.js} +1 -1
  48. package/public/{chunk-YAATCUBG.js → chunk-RBU4IUEW.js} +1 -1
  49. package/public/{chunk-BBUICPD3.js → chunk-RQ5XOSG4.js} +1 -1
  50. package/public/{chunk-MI3HMMGX.js → chunk-SFMO5FYH.js} +1 -1
  51. package/public/chunk-TTKWPLPU.js +1 -0
  52. package/public/{chunk-5YY5PB7J.js → chunk-U2H573S2.js} +1 -1
  53. package/public/{chunk-EGR6APYX.js → chunk-UX6EX6QM.js} +1 -1
  54. package/public/{chunk-L5H6KHHM.js → chunk-VQOZ7EP4.js} +1 -1
  55. package/public/{chunk-5FJB3FCA.js → chunk-WY42RELK.js} +1 -1
  56. package/public/{chunk-PP4ZCDNB.js → chunk-XAYACLOX.js} +1 -1
  57. package/public/{chunk-GVTYCQYL.js → chunk-XNB6X4FV.js} +1 -1
  58. package/public/chunk-XNUGXFVI.js +1 -0
  59. package/public/{chunk-NMSMHD6N.js → chunk-XPPKEWW4.js} +1 -1
  60. package/public/chunk-Z772O5R4.js +1 -0
  61. package/public/{chunk-ECER442J.js → chunk-ZKJ2SL66.js} +1 -1
  62. package/public/chunk-ZO3Q6XWD.js +1 -0
  63. package/public/index.html +1 -1
  64. package/public/main-K3GQAEVM.js +1 -0
  65. package/public/chunk-4JZV3RMY.js +0 -1
  66. package/public/chunk-CDJKWLLD.js +0 -1
  67. package/public/chunk-CUIO3EP4.js +0 -1
  68. package/public/chunk-F7V44PP3.js +0 -1
  69. package/public/chunk-FHYCTWTJ.js +0 -1
  70. package/public/chunk-I3KKIRTX.js +0 -1
  71. package/public/chunk-IGBVA5MG.js +0 -1
  72. package/public/chunk-IZTRU4LC.js +0 -1
  73. package/public/chunk-J3P6NF5H.js +0 -1
  74. package/public/chunk-NFDY2BQU.js +0 -1
  75. package/public/chunk-PIYDYGCD.js +0 -1
  76. package/public/chunk-RPVIKP3Y.js +0 -1
  77. package/public/chunk-UDDAX4U6.js +0 -1
  78. package/public/chunk-WNM6WQXW.js +0 -1
  79. package/public/chunk-YIVO4VCZ.js +0 -1
  80. package/public/chunk-YMRGMDKR.js +0 -1
  81. package/public/chunk-ZDGOOOSQ.js +0 -1
  82. package/public/main-OIGLGXZB.js +0 -1
@@ -1 +1 @@
1
- import{a as X}from"./chunk-ER76XVWX.js";import{a as H}from"./chunk-JUAHATIH.js";import{a as Z}from"./chunk-L6QFBAQD.js";import{a as R}from"./chunk-YRKK76EB.js";import{n as L}from"./chunk-ACZLPZJM.js";import"./chunk-VNJJI7TG.js";import{a as j}from"./chunk-2WH4IK5A.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-4T2QSCYW.js";import{c as B}from"./chunk-NMSMHD6N.js";import{b as $}from"./chunk-6W4AJ2ZZ.js";import{j as T}from"./chunk-BYW5V4GN.js";import"./chunk-ZZ5DUZ3T.js";import{a as M,b as U}from"./chunk-5FC5GQ62.js";import{$c as E,Cc as d,Dc as l,Jb as u,Kb as c,Pb as C,Ub as n,Vb as a,Wb as p,_b as y,bc as _,cc as w,g as Y,gb as o,h as z,lb as F,ma as m,mc as f,nc as g,qd as K,tb as P,ua as h,va as b,w as A,xc as v,yc as k,zb as O}from"./chunk-YSEOPOHR.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&((window==null?void 0:window.matchMedia("(display-mode: standalone)").matches)||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||(window==null?void 0:window.Windows)||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var I=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/accessories"],re=()=>["/support"],ae=()=>["/power-options"],se=()=>["/plugins"],de=()=>["/logs"],le=()=>["/platform-tools/terminal"],pe=()=>["/config"],ce=()=>["/settings"];function me(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),d(3,"translate"),_("click",function(){h(e);let t=w();return b(t.openUnderVoltageModal())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",20),a(),n(6,"div",14),f(7),d(8,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"rpi.throttled.undervoltage_title")+" - "+l(3,4,"rpi.throttled.undervoltage_description")),o(6),g(l(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",21),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,se))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_plugins")),o(5),g(l(7,6,"menu.label_plugins")))}function _e(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,de))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_logs")),o(5),g(l(7,6,"menu.linux.label_logs")))}function fe(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,le))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_terminal")),o(5),g(l(7,6,"menu.linux.label_terminal")))}function ge(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,pe))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.config_json_editor")),o(5),g(l(7,6,"menu.config_json_editor")))}function ve(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,ce))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_settings")),o(5),g(l(7,6,"menu.label_settings")))}function he(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.reloadPage())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.reload")),o(5),g(l(7,4,"menu.reload")))}function be(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.$auth.logout())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.tooltip_logout")),o(5),g(l(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{router=m(V);translate=m(M);$auth=m(B);$settings=m($);$modal=m(L);$notification=m(X);$translate=m(M);renderer=m(F);isExpanded=!1;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){let e=this.router;this.isMobile=window.innerWidth<768;let s;window.addEventListener("resize",()=>{clearTimeout(s),s=setTimeout(()=>{this.updateListeners()},500)}),e.events.subscribe(t=>{t instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)});let e=document.querySelector(".sidebar"),s=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!s.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),s.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),s.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.renderer.setStyle(e,"opacity","20%"),this.renderer.setStyle(e,"pointer-events","none"),this.renderer.setStyle(e,"overflow","hidden")):(this.renderer.removeStyle(e,"opacity"),this.renderer.removeStyle(e,"pointer-events"),this.renderer.removeStyle(e,"overflow"))}openUnderVoltageModal(){let e=this.$modal.open(H,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let s=e.target;["menuitem","button"].includes(s.getAttribute("role"))&&s.click()}}reloadPage(){window.location.reload()}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:61,vars:67,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","../../../../assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"fa","fa-fw","fa-power-off"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(s,t){s&1&&(n(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),p(2,"span",1),n(3,"a",2),d(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),n(15,"a",2),d(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),d(28,"translate"),a()()(),O(29,me,9,8,"div",10)(30,ue,8,9,"div",10),n(31,"div",10)(32,"div",15),d(33,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(34,"div",12),p(35,"i",16),a(),n(36,"div",14),f(37),d(38,"translate"),a()()(),O(39,_e,8,9,"div",10)(40,fe,8,9,"div",10)(41,ge,8,9,"div",10)(42,ve,8,9,"div",10),n(43,"div",10)(44,"div",15),d(45,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(46,"div",12),p(47,"i",17),a(),n(48,"div",14),f(49),d(50,"translate"),a()()(),n(51,"div",10)(52,"div",15),d(53,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(54,"div",12),p(55,"i",18),a(),n(56,"div",14),f(57),d(58,"translate"),a()()(),O(59,he,8,6,"div",10)(60,be,8,6,"div",10),a()()),s&2&&(u("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",l(1,34,"menu.sidebar.aria_menu")),o(3),c("routerLink",v(56,I)),u("aria-label",l(4,36,"menu.label_status")),o(5),c("ngClass",k(57,te,t.isExpanded)),o(5),c("ngClass",k(59,ne,t.isExpanded)),o(2),c("routerLink",v(61,I)),u("aria-label",l(16,38,"menu.label_status")),o(7),c("routerLink",v(62,I))("routerLinkActive","active")("routerLinkActiveOptions",v(63,ie)),u("aria-label",l(23,40,"menu.label_status")),o(5),g(l(28,42,"menu.label_status")),o(2),C(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(),C(t.$auth.user.admin?30:-1),o(2),c("routerLink",v(64,oe))("routerLinkActive","active"),u("aria-label",l(33,44,"menu.label_accessories")),o(5),g(l(38,46,"menu.label_accessories")),o(2),C(t.$auth.user.admin?39:-1),o(),C(t.$settings.env.enableTerminalAccess&&t.$auth.user.admin?40:-1),o(),C(t.$auth.user.admin?41:-1),o(),C(t.$auth.user.admin?42:-1),o(2),c("routerLink",v(65,re))("routerLinkActive","active"),u("aria-label",l(45,48,"support.title")),o(5),g(l(50,50,"support.title")),o(3),c("routerLink",v(66,ae))("routerLinkActive","active"),u("aria-label",l(53,52,"menu.restart.title")),o(5),g(l(58,54,"menu.restart.title")),o(2),C(t.isPwa?59:-1),o(),C(t.$settings.formAuth?60:-1))},dependencies:[N,K,E,D,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 80px)!important}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var we=i=>({sidebarExpanded:i}),Xe=(()=>{class i{$auth=m(B);$modal=m(L);$router=m(V);$settings=m($);$translate=m(M);$ws=m(j);sidebarExpanded=!1;io;constructor(){}ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return z(this,null,function*(){if(this.$settings.settingsLoaded||(yield A(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,T.serverTarget)){console.log(`Server restart required. UI Version: ${T.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:T.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(s,t){s&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),s&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",k(2,we,t.sidebarExpanded)))},dependencies:[J,E,q],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return i})();export{Xe as LayoutComponent};
1
+ import{a as X}from"./chunk-ER76XVWX.js";import{a as H}from"./chunk-JUAHATIH.js";import{a as Z}from"./chunk-L6QFBAQD.js";import{a as R}from"./chunk-YRKK76EB.js";import{n as L}from"./chunk-ACZLPZJM.js";import"./chunk-VNJJI7TG.js";import{a as j}from"./chunk-J3SXKFRW.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-4T2QSCYW.js";import{c as B}from"./chunk-XPPKEWW4.js";import{b as $}from"./chunk-FKHZR7GC.js";import{j as T}from"./chunk-5VLLXOOB.js";import"./chunk-ZZ5DUZ3T.js";import{a as M,b as U}from"./chunk-5FC5GQ62.js";import{$c as E,Cc as d,Dc as l,Jb as u,Kb as c,Pb as C,Ub as n,Vb as a,Wb as p,_b as y,bc as _,cc as w,g as Y,gb as o,h as z,lb as F,ma as m,mc as f,nc as g,qd as K,tb as P,ua as h,va as b,w as A,xc as v,yc as k,zb as O}from"./chunk-YSEOPOHR.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&((window==null?void 0:window.matchMedia("(display-mode: standalone)").matches)||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||(window==null?void 0:window.Windows)||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var I=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/accessories"],re=()=>["/support"],ae=()=>["/power-options"],se=()=>["/plugins"],de=()=>["/logs"],le=()=>["/platform-tools/terminal"],pe=()=>["/config"],ce=()=>["/settings"];function me(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),d(3,"translate"),_("click",function(){h(e);let t=w();return b(t.openUnderVoltageModal())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",20),a(),n(6,"div",14),f(7),d(8,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"rpi.throttled.undervoltage_title")+" - "+l(3,4,"rpi.throttled.undervoltage_description")),o(6),g(l(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",21),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,se))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_plugins")),o(5),g(l(7,6,"menu.label_plugins")))}function _e(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,de))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_logs")),o(5),g(l(7,6,"menu.linux.label_logs")))}function fe(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,le))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.linux.label_terminal")),o(5),g(l(7,6,"menu.linux.label_terminal")))}function ge(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,pe))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.config_json_editor")),o(5),g(l(7,6,"menu.config_json_editor")))}function ve(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",v(8,ce))("routerLinkActive","active"),u("aria-label",l(2,4,"menu.label_settings")),o(5),g(l(7,6,"menu.label_settings")))}function he(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.reloadPage())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.reload")),o(5),g(l(7,4,"menu.reload")))}function be(i,S){if(i&1){let e=y();n(0,"div",10)(1,"div",19),d(2,"translate"),_("click",function(){h(e);let t=w();return b(t.$auth.logout())})("keydown",function(t){h(e);let r=w();return b(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),u("aria-label",l(2,2,"menu.tooltip_logout")),o(5),g(l(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{router=m(V);translate=m(M);$auth=m(B);$settings=m($);$modal=m(L);$notification=m(X);$translate=m(M);renderer=m(F);isExpanded=!1;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){let e=this.router;this.isMobile=window.innerWidth<768;let s;window.addEventListener("resize",()=>{clearTimeout(s),s=setTimeout(()=>{this.updateListeners()},500)}),e.events.subscribe(t=>{t instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)});let e=document.querySelector(".sidebar"),s=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!s.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),s.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),s.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.renderer.setStyle(e,"opacity","20%"),this.renderer.setStyle(e,"pointer-events","none"),this.renderer.setStyle(e,"overflow","hidden")):(this.renderer.removeStyle(e,"opacity"),this.renderer.removeStyle(e,"pointer-events"),this.renderer.removeStyle(e,"overflow"))}openUnderVoltageModal(){let e=this.$modal.open(H,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let s=e.target;["menuitem","button"].includes(s.getAttribute("role"))&&s.click()}}reloadPage(){window.location.reload()}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:61,vars:67,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","../../../../assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"fa","fa-fw","fa-power-off"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(s,t){s&1&&(n(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),p(2,"span",1),n(3,"a",2),d(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(x){return t.handleKeydown(x)}),n(15,"a",2),d(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),d(28,"translate"),a()()(),O(29,me,9,8,"div",10)(30,ue,8,9,"div",10),n(31,"div",10)(32,"div",15),d(33,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(34,"div",12),p(35,"i",16),a(),n(36,"div",14),f(37),d(38,"translate"),a()()(),O(39,_e,8,9,"div",10)(40,fe,8,9,"div",10)(41,ge,8,9,"div",10)(42,ve,8,9,"div",10),n(43,"div",10)(44,"div",15),d(45,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(46,"div",12),p(47,"i",17),a(),n(48,"div",14),f(49),d(50,"translate"),a()()(),n(51,"div",10)(52,"div",15),d(53,"translate"),_("keydown",function(x){return t.handleKeydown(x)}),n(54,"div",12),p(55,"i",18),a(),n(56,"div",14),f(57),d(58,"translate"),a()()(),O(59,he,8,6,"div",10)(60,be,8,6,"div",10),a()()),s&2&&(u("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",l(1,34,"menu.sidebar.aria_menu")),o(3),c("routerLink",v(56,I)),u("aria-label",l(4,36,"menu.label_status")),o(5),c("ngClass",k(57,te,t.isExpanded)),o(5),c("ngClass",k(59,ne,t.isExpanded)),o(2),c("routerLink",v(61,I)),u("aria-label",l(16,38,"menu.label_status")),o(7),c("routerLink",v(62,I))("routerLinkActive","active")("routerLinkActiveOptions",v(63,ie)),u("aria-label",l(23,40,"menu.label_status")),o(5),g(l(28,42,"menu.label_status")),o(2),C(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(),C(t.$auth.user.admin?30:-1),o(2),c("routerLink",v(64,oe))("routerLinkActive","active"),u("aria-label",l(33,44,"menu.label_accessories")),o(5),g(l(38,46,"menu.label_accessories")),o(2),C(t.$auth.user.admin?39:-1),o(),C(t.$settings.env.enableTerminalAccess&&t.$auth.user.admin?40:-1),o(),C(t.$auth.user.admin?41:-1),o(),C(t.$auth.user.admin?42:-1),o(2),c("routerLink",v(65,re))("routerLinkActive","active"),u("aria-label",l(45,48,"support.title")),o(5),g(l(50,50,"support.title")),o(3),c("routerLink",v(66,ae))("routerLinkActive","active"),u("aria-label",l(53,52,"menu.restart.title")),o(5),g(l(58,54,"menu.restart.title")),o(2),C(t.isPwa?59:-1),o(),C(t.$settings.formAuth?60:-1))},dependencies:[N,K,E,D,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 80px)!important}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var we=i=>({sidebarExpanded:i}),Xe=(()=>{class i{$auth=m(B);$modal=m(L);$router=m(V);$settings=m($);$translate=m(M);$ws=m(j);sidebarExpanded=!1;io;constructor(){}ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return z(this,null,function*(){if(this.$settings.settingsLoaded||(yield A(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,T.serverTarget)){console.log(`Server restart required. UI Version: ${T.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:T.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(s){return new(s||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(s,t){s&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),s&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",k(2,we,t.sidebarExpanded)))},dependencies:[J,E,q],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return i})();export{Xe as LayoutComponent};
@@ -0,0 +1 @@
1
+ import{f as a}from"./chunk-MCW7B5OZ.js";import"./chunk-47HTHVMR.js";import"./chunk-N7CACY44.js";import"./chunk-2PQO2MA7.js";import"./chunk-ER76XVWX.js";import"./chunk-DWUJUZ6J.js";import"./chunk-A7J5IO7B.js";import"./chunk-O6TC4BRG.js";import"./chunk-CMCSOAXY.js";import"./chunk-AT2FVBH6.js";import"./chunk-GZS22B5R.js";import"./chunk-6CFNRIWT.js";import"./chunk-HKLJJXUX.js";import"./chunk-ZC5PN6KE.js";import"./chunk-OIONECW5.js";import"./chunk-ZIEZJHQ3.js";import"./chunk-JUAHATIH.js";import"./chunk-L6QFBAQD.js";import"./chunk-YRKK76EB.js";import"./chunk-ACZLPZJM.js";import"./chunk-VNJJI7TG.js";import"./chunk-J3SXKFRW.js";import"./chunk-4T2QSCYW.js";import"./chunk-XPPKEWW4.js";import"./chunk-FKHZR7GC.js";import"./chunk-5VLLXOOB.js";import"./chunk-ZZ5DUZ3T.js";import"./chunk-5FC5GQ62.js";import"./chunk-YSEOPOHR.js";export{a as StatusComponent};
@@ -1,4 +1,4 @@
1
- import{a as P}from"./chunk-CMCSOAXY.js";import{a as O}from"./chunk-GZS22B5R.js";import{c as y,e as E,l as k,y as $}from"./chunk-VNJJI7TG.js";import{b as D}from"./chunk-4T2QSCYW.js";import{b as L}from"./chunk-6W4AJ2ZZ.js";import{h as I,k as H}from"./chunk-BYW5V4GN.js";import{a as T}from"./chunk-5FC5GQ62.js";import{Kb as f,Pb as d,Ub as m,Vb as l,Wb as w,_b as g,bc as _,cc as a,gb as s,h as S,ma as r,mc as v,tb as x,tc as b,ua as c,uc as M,va as p,vc as V,w as C,zb as h}from"./chunk-YSEOPOHR.js";function z(i,u){i&1&&w(0,"i",6)}function A(i,u){i&1&&w(0,"i",7)}function F(i,u){if(i&1){let t=g();m(0,"ngx-monaco-editor",10),_("onInit",function(e){c(t);let o=a();return p(o.onEditorInit(e))})("keydown.control.s",function(e){c(t);let o=a();return e.preventDefault(),p(o.onSave())})("keydown.meta.s",function(e){c(t);let o=a();return e.preventDefault(),p(o.onSave())}),l()}if(i&2){let t=a();f("options",t.editorOptions)("model",t.monacoEditorModel)}}function W(i,u){if(i&1){let t=g();m(0,"textarea",11),V("ngModelChange",function(e){c(t);let o=a();return M(o.startupScript,e)||(o.startupScript=e),p(e)}),v(1," "),l()}if(i&2){let t=a();b("ngModel",t.startupScript)}}var tt=(()=>{class i{$api=r(H);$md=r(O);$route=r(D);$settings=r(L);$toastr=r(I);$translate=r(T);startupScript;saveInProgress;isMobile=!1;options={printMargin:!1};monacoEditor;editorOptions;monacoEditorModel;lastHeight;visualViewPortEventCallback;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"shell",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",automaticLayout:!0},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(`
1
+ import{a as P}from"./chunk-CMCSOAXY.js";import{a as O}from"./chunk-GZS22B5R.js";import{c as y,e as E,l as k,y as $}from"./chunk-VNJJI7TG.js";import{b as D}from"./chunk-4T2QSCYW.js";import{b as L}from"./chunk-FKHZR7GC.js";import{h as I,k as H}from"./chunk-5VLLXOOB.js";import{a as T}from"./chunk-5FC5GQ62.js";import{Kb as f,Pb as d,Ub as m,Vb as l,Wb as w,_b as g,bc as _,cc as a,gb as s,h as S,ma as r,mc as v,tb as x,tc as b,ua as c,uc as M,va as p,vc as V,w as C,zb as h}from"./chunk-YSEOPOHR.js";function z(i,u){i&1&&w(0,"i",6)}function A(i,u){i&1&&w(0,"i",7)}function F(i,u){if(i&1){let t=g();m(0,"ngx-monaco-editor",10),_("onInit",function(e){c(t);let o=a();return p(o.onEditorInit(e))})("keydown.control.s",function(e){c(t);let o=a();return e.preventDefault(),p(o.onSave())})("keydown.meta.s",function(e){c(t);let o=a();return e.preventDefault(),p(o.onSave())}),l()}if(i&2){let t=a();f("options",t.editorOptions)("model",t.monacoEditorModel)}}function W(i,u){if(i&1){let t=g();m(0,"textarea",11),V("ngModelChange",function(e){c(t);let o=a();return M(o.startupScript,e)||(o.startupScript=e),p(e)}),v(1," "),l()}if(i&2){let t=a();b("ngModel",t.startupScript)}}var tt=(()=>{class i{$api=r(H);$md=r(O);$route=r(D);$settings=r(L);$toastr=r(I);$translate=r(T);startupScript;saveInProgress;isMobile=!1;options={printMargin:!1};monacoEditor;editorOptions;monacoEditorModel;lastHeight;visualViewPortEventCallback;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"shell",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",automaticLayout:!0},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}})}visualViewPortChanged(){this.lastHeight<window.visualViewport.height&&document.activeElement.blur(),window.visualViewport.height<window.innerHeight?(this.$md.enableTouchMove(),this.lastHeight=window.visualViewport.height):window.visualViewport.height===window.innerHeight&&(this.$md.disableTouchMove(),this.lastHeight=window.visualViewport.height)}ngOnDestroy(){window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=x({type:i,selectors:[["ng-component"]],decls:11,vars:5,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-fw","fa-floppy-disk"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[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&&(m(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),v(4,"startup.sh"),l()(),m(5,"div",4)(6,"button",5),_("click",function(){return e.onSave()}),h(7,z,1,0,"i",6)(8,A,1,0,"i",7),l()()(),h(9,F,1,2,"ngx-monaco-editor",8)(10,W,2,1,"textarea",9),l()),n&2&&(s(6),f("disabled",e.saveInProgress),s(),d(e.saveInProgress?-1:7),s(),d(e.saveInProgress?8:-1),s(),d(e.isMobile?-1:9),s(),d(e.isMobile?10:-1))},dependencies:[P,$,y,E,k],encapsulation:2})}return i})();export{tt as a};
@@ -1,4 +1,4 @@
1
- import{a as eu,b as Qg}from"./chunk-UZKR4SPQ.js";import{a as S1}from"./chunk-CMCSOAXY.js";import{a as Xi,b as Yi}from"./chunk-AT2FVBH6.js";import{a as P1}from"./chunk-GZS22B5R.js";import{a as M1}from"./chunk-ZY3WVSWR.js";import{a as O1}from"./chunk-ZC5PN6KE.js";import{a as tf}from"./chunk-OIONECW5.js";import{a as k1,b as $1}from"./chunk-ZIEZJHQ3.js";import{a as Ia}from"./chunk-L6QFBAQD.js";import{a as T1}from"./chunk-YRKK76EB.js";import{a as Fr,b as Cr,c as hr,d as gr,e as Er,f as br,g as Gi,m as ye,n as ut,o as Ki}from"./chunk-ACZLPZJM.js";import{a as _1,b as zi,c as Hi,e as _t,f as y1,h as v1,i as B1,k as x1,l as Ku,m as w1,o as Ui,r as Wi,s as Ei,t as bi,x as I1,y as Qt,z as wa}from"./chunk-VNJJI7TG.js";import{a as Ji}from"./chunk-2WH4IK5A.js";import{d as lu}from"./chunk-4T2QSCYW.js";import{a as A1}from"./chunk-NMSMHD6N.js";import{b as qe}from"./chunk-6W4AJ2ZZ.js";import{h as be,j as Ju,k as Ce}from"./chunk-BYW5V4GN.js";import{e as b1}from"./chunk-ZZ5DUZ3T.js";import{a as Ee,b as ve}from"./chunk-5FC5GQ62.js";import{$c as Rt,Ac as vu,Bc as Li,Ca as l1,Cc as v,D as r1,Da as dr,Dc as B,Ec as Xe,Fa as Ct,Ga as z,Ha as Lu,Ia as cr,Ic as g1,Jb as K,Kb as E,Lb as Yt,M as lr,Mb as Hu,Nb as Z,Ob as p1,Pb as w,Rb as it,Sb as nt,Tb as ft,Ub as c,Vb as p,Wb as I,Xb as m1,Yb as F1,Z as ya,_b as U,a as X,aa as ef,ad as gi,b as we,bc as M,bd as ht,cb as de,cc as h,e as F,ed as E1,fa as o1,fb as d1,g as Ue,ga as Tt,gb as l,gc as va,h as G,ha as Vi,hc as Ba,ic as xa,id as mr,ja as a1,jc as Uu,k as u1,kc as Wu,la as D1,lb as pr,ma as x,mb as bu,mc as _,n as $t,nc as H,o as _a,ob as hi,oc as q,pb as zu,pc as yu,q as i1,qc as C1,ta as Ru,tb as Y,tc as $e,ua as N,ub as Ri,uc as Te,v as n1,va as j,vb as _u,vc as Pe,w as De,wb as c1,wc as h1,x as f1,xa as s1,xc as Je,yc as Zt,zb as k,zc as Gu}from"./chunk-YSEOPOHR.js";var ff=F(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.regexpCode=ge.getEsmExportName=ge.getProperty=ge.safeStringify=ge.stringify=ge.strConcat=ge.addCodeArg=ge.str=ge._=ge.nil=ge._Code=ge.Name=ge.IDENTIFIER=ge._CodeOrName=void 0;var uf=class{};ge._CodeOrName=uf;ge.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var _i=class extends uf{constructor(u){if(super(),!ge.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ge.Name=_i;var Lt=class extends uf{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((t,i)=>(i instanceof _i&&(t[i.str]=(t[i.str]||0)+1),t),{})}};ge._Code=Lt;ge.nil=new Lt("");function N1(e,...u){let t=[e[0]],i=0;for(;i<u.length;)Aa(t,u[i]),t.push(e[++i]);return new Lt(t)}ge._=N1;var Sa=new Lt("+");function j1(e,...u){let t=[nf(e[0])],i=0;for(;i<u.length;)t.push(Sa),Aa(t,u[i]),t.push(Sa,nf(e[++i]));return t4(t),new Lt(t)}ge.str=j1;function Aa(e,u){u instanceof Lt?e.push(...u._items):u instanceof _i?e.push(u):e.push(n4(u))}ge.addCodeArg=Aa;function t4(e){let u=1;for(;u<e.length-1;){if(e[u]===Sa){let t=u4(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function u4(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof _i||e[e.length-1]!=='"'?void 0:typeof u!="string"?`${e.slice(0,-1)}${u}"`:u[0]==='"'?e.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(e instanceof _i))return`"${e}${u.slice(1)}`}function i4(e,u){return u.emptyStr()?e:e.emptyStr()?u:j1`${e}${u}`}ge.strConcat=i4;function n4(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:nf(Array.isArray(e)?e.join(","):e)}function f4(e){return new Lt(nf(e))}ge.stringify=f4;function nf(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ge.safeStringify=nf;function r4(e){return typeof e=="string"&&ge.IDENTIFIER.test(e)?new Lt(`.${e}`):N1`[${e}]`}ge.getProperty=r4;function o4(e){if(typeof e=="string"&&ge.IDENTIFIER.test(e))return new Lt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ge.getEsmExportName=o4;function a4(e){return new Lt(e.toString())}ge.regexpCode=a4});var Ta=F(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.ValueScope=vt.ValueScopeName=vt.Scope=vt.varKinds=vt.UsedValueState=void 0;var yt=ff(),ka=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},_r=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(_r||(vt.UsedValueState=_r={}));vt.varKinds={const:new yt.Name("const"),let:new yt.Name("let"),var:new yt.Name("var")};var yr=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof yt.Name?u:this.name(u)}name(u){return new yt.Name(this._newName(u))}_newName(u){let t=this._names[u]||this._nameGroup(u);return`${u}${t.index++}`}_nameGroup(u){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}};vt.Scope=yr;var vr=class extends yt.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,yt._)`.${new yt.Name(t)}[${i}]`}};vt.ValueScopeName=vr;var D4=(0,yt._)`\n`,$a=class extends yr{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=we(X({},u),{_n:u.lines?D4:yt.nil})}get(){return this._scope}name(u){return new vr(u,this._newName(u))}value(u,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(u),{prefix:f}=n,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[f];if(o){let s=o.get(r);if(s)return s}else o=this._values[f]=new Map;o.set(r,n);let a=this._scope[f]||(this._scope[f]=[]),D=a.length;return a[D]=t.ref,n.setValue(t,{property:f,itemIndex:D}),n}getValue(u,t){let i=this._values[u];if(i)return i.get(t)}scopeRefs(u,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,yt._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,i)}_reduceValues(u,t,i={},n){let f=yt.nil;for(let r in u){let o=u[r];if(!o)continue;let a=i[r]=i[r]||new Map;o.forEach(D=>{if(a.has(D))return;a.set(D,_r.Started);let s=t(D);if(s){let d=this.opts.es5?vt.varKinds.var:vt.varKinds.const;f=(0,yt._)`${f}${d} ${D} = ${s};${this.opts._n}`}else if(s=n==null?void 0:n(D))f=(0,yt._)`${f}${s}${this.opts._n}`;else throw new ka(D);a.set(D,_r.Completed)})}return f}};vt.ValueScope=$a});var fe=F(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.or=ae.and=ae.not=ae.CodeGen=ae.operators=ae.varKinds=ae.ValueScopeName=ae.ValueScope=ae.Scope=ae.Name=ae.regexpCode=ae.stringify=ae.getProperty=ae.nil=ae.strConcat=ae.str=ae._=void 0;var me=ff(),tu=Ta(),Xu=ff();Object.defineProperty(ae,"_",{enumerable:!0,get:function(){return Xu._}});Object.defineProperty(ae,"str",{enumerable:!0,get:function(){return Xu.str}});Object.defineProperty(ae,"strConcat",{enumerable:!0,get:function(){return Xu.strConcat}});Object.defineProperty(ae,"nil",{enumerable:!0,get:function(){return Xu.nil}});Object.defineProperty(ae,"getProperty",{enumerable:!0,get:function(){return Xu.getProperty}});Object.defineProperty(ae,"stringify",{enumerable:!0,get:function(){return Xu.stringify}});Object.defineProperty(ae,"regexpCode",{enumerable:!0,get:function(){return Xu.regexpCode}});Object.defineProperty(ae,"Name",{enumerable:!0,get:function(){return Xu.Name}});var Sr=Ta();Object.defineProperty(ae,"Scope",{enumerable:!0,get:function(){return Sr.Scope}});Object.defineProperty(ae,"ValueScope",{enumerable:!0,get:function(){return Sr.ValueScope}});Object.defineProperty(ae,"ValueScopeName",{enumerable:!0,get:function(){return Sr.ValueScopeName}});Object.defineProperty(ae,"varKinds",{enumerable:!0,get:function(){return Sr.varKinds}});ae.operators={GT:new me._Code(">"),GTE:new me._Code(">="),LT:new me._Code("<"),LTE:new me._Code("<="),EQ:new me._Code("==="),NEQ:new me._Code("!=="),NOT:new me._Code("!"),OR:new me._Code("||"),AND:new me._Code("&&"),ADD:new me._Code("+")};var Bu=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},Pa=class extends Bu{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?tu.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=Qi(this.rhs,u,t)),this}get names(){return this.rhs instanceof me._CodeOrName?this.rhs.names:{}}},xr=class extends Bu{constructor(u,t,i){super(),this.lhs=u,this.rhs=t,this.sideEffects=i}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,t){if(!(this.lhs instanceof me.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=Qi(this.rhs,u,t),this}get names(){let u=this.lhs instanceof me.Name?{}:X({},this.lhs.names);return Ir(u,this.rhs)}},Oa=class extends xr{constructor(u,t,i,n){super(u,i,n),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},Ma=class extends Bu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},Na=class extends Bu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},ja=class extends Bu{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},qa=class extends Bu{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,t){return this.code=Qi(this.code,u,t),this}get names(){return this.code instanceof me._CodeOrName?this.code.names:{}}},rf=class extends Bu{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((t,i)=>t+i.render(u),"")}optimizeNodes(){let{nodes:u}=this,t=u.length;for(;t--;){let i=u[t].optimizeNodes();Array.isArray(i)?u.splice(t,1,...i):i?u[t]=i:u.splice(t,1)}return u.length>0?this:void 0}optimizeNames(u,t){let{nodes:i}=this,n=i.length;for(;n--;){let f=i[n];f.optimizeNames(u,t)||(s4(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>yi(u,t.names),{})}},xu=class extends rf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},Va=class extends rf{},Ra=(()=>{class e extends xu{}return e.kind="else",e})(),Br=(()=>{class e extends xu{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let n=i.optimizeNodes();i=this.else=Array.isArray(n)?new Ra(n):n}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(z1(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=Qi(this.condition,t,i),this}get names(){let t=super.names;return Ir(t,this.condition),this.else&&yi(t,this.else.names),t}}return e.kind="if",e})(),Ar=(()=>{class e extends xu{}return e.kind="for",e})(),La=class extends Ar{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iteration=Qi(this.iteration,u,t),this}get names(){return yi(super.names,this.iteration.names)}},za=class extends Ar{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?tu.varKinds.var:this.varKind,{name:i,from:n,to:f}=this;return`for(${t} ${i}=${n}; ${i}<${f}; ${i}++)`+super.render(u)}get names(){let u=Ir(super.names,this.from);return Ir(u,this.to)}},wr=class extends Ar{constructor(u,t,i,n){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=n}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iterable=Qi(this.iterable,u,t),this}get names(){return yi(super.names,this.iterable.names)}},q1=(()=>{class e extends xu{constructor(t,i,n){super(),this.name=t,this.args=i,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),V1=(()=>{class e extends rf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Ha=class extends xu{render(u){let t="try"+super.render(u);return this.catch&&(t+=this.catch.render(u)),this.finally&&(t+=this.finally.render(u)),t}optimizeNodes(){var u,t;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(u,t){var i,n;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(n=this.finally)===null||n===void 0||n.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&yi(u,this.catch.names),this.finally&&yi(u,this.finally.names),u}},R1=(()=>{class e extends xu{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),L1=(()=>{class e extends xu{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Ua=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=we(X({},t),{_n:t.lines?`
1
+ import{a as eu,b as Qg}from"./chunk-O6TC4BRG.js";import{a as S1}from"./chunk-CMCSOAXY.js";import{a as Xi,b as Yi}from"./chunk-AT2FVBH6.js";import{a as P1}from"./chunk-GZS22B5R.js";import{a as M1}from"./chunk-6CFNRIWT.js";import{a as O1}from"./chunk-ZC5PN6KE.js";import{a as tf}from"./chunk-OIONECW5.js";import{a as k1,b as $1}from"./chunk-ZIEZJHQ3.js";import{a as Ia}from"./chunk-L6QFBAQD.js";import{a as T1}from"./chunk-YRKK76EB.js";import{a as Fr,b as Cr,c as hr,d as gr,e as Er,f as br,g as Gi,m as ye,n as ut,o as Ki}from"./chunk-ACZLPZJM.js";import{a as _1,b as zi,c as Hi,e as _t,f as y1,h as v1,i as B1,k as x1,l as Ku,m as w1,o as Ui,r as Wi,s as Ei,t as bi,x as I1,y as Qt,z as wa}from"./chunk-VNJJI7TG.js";import{a as Ji}from"./chunk-J3SXKFRW.js";import{d as lu}from"./chunk-4T2QSCYW.js";import{a as A1}from"./chunk-XPPKEWW4.js";import{b as qe}from"./chunk-FKHZR7GC.js";import{h as be,j as Ju,k as Ce}from"./chunk-5VLLXOOB.js";import{e as b1}from"./chunk-ZZ5DUZ3T.js";import{a as Ee,b as ve}from"./chunk-5FC5GQ62.js";import{$c as Rt,Ac as vu,Bc as Li,Ca as l1,Cc as v,D as r1,Da as dr,Dc as B,Ec as Xe,Fa as Ct,Ga as z,Ha as Lu,Ia as cr,Ic as g1,Jb as K,Kb as E,Lb as Yt,M as lr,Mb as Hu,Nb as Z,Ob as p1,Pb as w,Rb as it,Sb as nt,Tb as ft,Ub as c,Vb as p,Wb as I,Xb as m1,Yb as F1,Z as ya,_b as U,a as X,aa as ef,ad as gi,b as we,bc as M,bd as ht,cb as de,cc as h,e as F,ed as E1,fa as o1,fb as d1,g as Ue,ga as Tt,gb as l,gc as va,h as G,ha as Vi,hc as Ba,ic as xa,id as mr,ja as a1,jc as Uu,k as u1,kc as Wu,la as D1,lb as pr,ma as x,mb as bu,mc as _,n as $t,nc as H,o as _a,ob as hi,oc as q,pb as zu,pc as yu,q as i1,qc as C1,ta as Ru,tb as Y,tc as $e,ua as N,ub as Ri,uc as Te,v as n1,va as j,vb as _u,vc as Pe,w as De,wb as c1,wc as h1,x as f1,xa as s1,xc as Je,yc as Zt,zb as k,zc as Gu}from"./chunk-YSEOPOHR.js";var ff=F(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.regexpCode=ge.getEsmExportName=ge.getProperty=ge.safeStringify=ge.stringify=ge.strConcat=ge.addCodeArg=ge.str=ge._=ge.nil=ge._Code=ge.Name=ge.IDENTIFIER=ge._CodeOrName=void 0;var uf=class{};ge._CodeOrName=uf;ge.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var _i=class extends uf{constructor(u){if(super(),!ge.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ge.Name=_i;var Lt=class extends uf{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((t,i)=>(i instanceof _i&&(t[i.str]=(t[i.str]||0)+1),t),{})}};ge._Code=Lt;ge.nil=new Lt("");function N1(e,...u){let t=[e[0]],i=0;for(;i<u.length;)Aa(t,u[i]),t.push(e[++i]);return new Lt(t)}ge._=N1;var Sa=new Lt("+");function j1(e,...u){let t=[nf(e[0])],i=0;for(;i<u.length;)t.push(Sa),Aa(t,u[i]),t.push(Sa,nf(e[++i]));return t4(t),new Lt(t)}ge.str=j1;function Aa(e,u){u instanceof Lt?e.push(...u._items):u instanceof _i?e.push(u):e.push(n4(u))}ge.addCodeArg=Aa;function t4(e){let u=1;for(;u<e.length-1;){if(e[u]===Sa){let t=u4(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function u4(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof _i||e[e.length-1]!=='"'?void 0:typeof u!="string"?`${e.slice(0,-1)}${u}"`:u[0]==='"'?e.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(e instanceof _i))return`"${e}${u.slice(1)}`}function i4(e,u){return u.emptyStr()?e:e.emptyStr()?u:j1`${e}${u}`}ge.strConcat=i4;function n4(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:nf(Array.isArray(e)?e.join(","):e)}function f4(e){return new Lt(nf(e))}ge.stringify=f4;function nf(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ge.safeStringify=nf;function r4(e){return typeof e=="string"&&ge.IDENTIFIER.test(e)?new Lt(`.${e}`):N1`[${e}]`}ge.getProperty=r4;function o4(e){if(typeof e=="string"&&ge.IDENTIFIER.test(e))return new Lt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ge.getEsmExportName=o4;function a4(e){return new Lt(e.toString())}ge.regexpCode=a4});var Ta=F(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.ValueScope=vt.ValueScopeName=vt.Scope=vt.varKinds=vt.UsedValueState=void 0;var yt=ff(),ka=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},_r=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(_r||(vt.UsedValueState=_r={}));vt.varKinds={const:new yt.Name("const"),let:new yt.Name("let"),var:new yt.Name("var")};var yr=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof yt.Name?u:this.name(u)}name(u){return new yt.Name(this._newName(u))}_newName(u){let t=this._names[u]||this._nameGroup(u);return`${u}${t.index++}`}_nameGroup(u){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}};vt.Scope=yr;var vr=class extends yt.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,yt._)`.${new yt.Name(t)}[${i}]`}};vt.ValueScopeName=vr;var D4=(0,yt._)`\n`,$a=class extends yr{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=we(X({},u),{_n:u.lines?D4:yt.nil})}get(){return this._scope}name(u){return new vr(u,this._newName(u))}value(u,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(u),{prefix:f}=n,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[f];if(o){let s=o.get(r);if(s)return s}else o=this._values[f]=new Map;o.set(r,n);let a=this._scope[f]||(this._scope[f]=[]),D=a.length;return a[D]=t.ref,n.setValue(t,{property:f,itemIndex:D}),n}getValue(u,t){let i=this._values[u];if(i)return i.get(t)}scopeRefs(u,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,yt._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,i)}_reduceValues(u,t,i={},n){let f=yt.nil;for(let r in u){let o=u[r];if(!o)continue;let a=i[r]=i[r]||new Map;o.forEach(D=>{if(a.has(D))return;a.set(D,_r.Started);let s=t(D);if(s){let d=this.opts.es5?vt.varKinds.var:vt.varKinds.const;f=(0,yt._)`${f}${d} ${D} = ${s};${this.opts._n}`}else if(s=n==null?void 0:n(D))f=(0,yt._)`${f}${s}${this.opts._n}`;else throw new ka(D);a.set(D,_r.Completed)})}return f}};vt.ValueScope=$a});var fe=F(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.or=ae.and=ae.not=ae.CodeGen=ae.operators=ae.varKinds=ae.ValueScopeName=ae.ValueScope=ae.Scope=ae.Name=ae.regexpCode=ae.stringify=ae.getProperty=ae.nil=ae.strConcat=ae.str=ae._=void 0;var me=ff(),tu=Ta(),Xu=ff();Object.defineProperty(ae,"_",{enumerable:!0,get:function(){return Xu._}});Object.defineProperty(ae,"str",{enumerable:!0,get:function(){return Xu.str}});Object.defineProperty(ae,"strConcat",{enumerable:!0,get:function(){return Xu.strConcat}});Object.defineProperty(ae,"nil",{enumerable:!0,get:function(){return Xu.nil}});Object.defineProperty(ae,"getProperty",{enumerable:!0,get:function(){return Xu.getProperty}});Object.defineProperty(ae,"stringify",{enumerable:!0,get:function(){return Xu.stringify}});Object.defineProperty(ae,"regexpCode",{enumerable:!0,get:function(){return Xu.regexpCode}});Object.defineProperty(ae,"Name",{enumerable:!0,get:function(){return Xu.Name}});var Sr=Ta();Object.defineProperty(ae,"Scope",{enumerable:!0,get:function(){return Sr.Scope}});Object.defineProperty(ae,"ValueScope",{enumerable:!0,get:function(){return Sr.ValueScope}});Object.defineProperty(ae,"ValueScopeName",{enumerable:!0,get:function(){return Sr.ValueScopeName}});Object.defineProperty(ae,"varKinds",{enumerable:!0,get:function(){return Sr.varKinds}});ae.operators={GT:new me._Code(">"),GTE:new me._Code(">="),LT:new me._Code("<"),LTE:new me._Code("<="),EQ:new me._Code("==="),NEQ:new me._Code("!=="),NOT:new me._Code("!"),OR:new me._Code("||"),AND:new me._Code("&&"),ADD:new me._Code("+")};var Bu=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},Pa=class extends Bu{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?tu.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=Qi(this.rhs,u,t)),this}get names(){return this.rhs instanceof me._CodeOrName?this.rhs.names:{}}},xr=class extends Bu{constructor(u,t,i){super(),this.lhs=u,this.rhs=t,this.sideEffects=i}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,t){if(!(this.lhs instanceof me.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=Qi(this.rhs,u,t),this}get names(){let u=this.lhs instanceof me.Name?{}:X({},this.lhs.names);return Ir(u,this.rhs)}},Oa=class extends xr{constructor(u,t,i,n){super(u,i,n),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},Ma=class extends Bu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},Na=class extends Bu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},ja=class extends Bu{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},qa=class extends Bu{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,t){return this.code=Qi(this.code,u,t),this}get names(){return this.code instanceof me._CodeOrName?this.code.names:{}}},rf=class extends Bu{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((t,i)=>t+i.render(u),"")}optimizeNodes(){let{nodes:u}=this,t=u.length;for(;t--;){let i=u[t].optimizeNodes();Array.isArray(i)?u.splice(t,1,...i):i?u[t]=i:u.splice(t,1)}return u.length>0?this:void 0}optimizeNames(u,t){let{nodes:i}=this,n=i.length;for(;n--;){let f=i[n];f.optimizeNames(u,t)||(s4(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>yi(u,t.names),{})}},xu=class extends rf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},Va=class extends rf{},Ra=(()=>{class e extends xu{}return e.kind="else",e})(),Br=(()=>{class e extends xu{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let n=i.optimizeNodes();i=this.else=Array.isArray(n)?new Ra(n):n}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(z1(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=Qi(this.condition,t,i),this}get names(){let t=super.names;return Ir(t,this.condition),this.else&&yi(t,this.else.names),t}}return e.kind="if",e})(),Ar=(()=>{class e extends xu{}return e.kind="for",e})(),La=class extends Ar{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iteration=Qi(this.iteration,u,t),this}get names(){return yi(super.names,this.iteration.names)}},za=class extends Ar{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?tu.varKinds.var:this.varKind,{name:i,from:n,to:f}=this;return`for(${t} ${i}=${n}; ${i}<${f}; ${i}++)`+super.render(u)}get names(){let u=Ir(super.names,this.from);return Ir(u,this.to)}},wr=class extends Ar{constructor(u,t,i,n){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=n}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iterable=Qi(this.iterable,u,t),this}get names(){return yi(super.names,this.iterable.names)}},q1=(()=>{class e extends xu{constructor(t,i,n){super(),this.name=t,this.args=i,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),V1=(()=>{class e extends rf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Ha=class extends xu{render(u){let t="try"+super.render(u);return this.catch&&(t+=this.catch.render(u)),this.finally&&(t+=this.finally.render(u)),t}optimizeNodes(){var u,t;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(u,t){var i,n;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(n=this.finally)===null||n===void 0||n.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&yi(u,this.catch.names),this.finally&&yi(u,this.finally.names),u}},R1=(()=>{class e extends xu{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),L1=(()=>{class e extends xu{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Ua=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=we(X({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=u,this._scope=new tu.Scope({parent:u}),this._nodes=[new Va]}toString(){return this._root.render(this.opts)}name(u){return this._scope.name(u)}scopeName(u){return this._extScope.name(u)}scopeValue(u,t){let i=this._extScope.value(u,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(u,t){return this._extScope.getValue(u,t)}scopeRefs(u){return this._extScope.scopeRefs(u,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(u,t,i,n){let f=this._scope.toName(t);return i!==void 0&&n&&(this._constants[f.str]=i),this._leafNode(new Pa(u,f,i)),f}const(u,t,i){return this._def(tu.varKinds.const,u,t,i)}let(u,t,i){return this._def(tu.varKinds.let,u,t,i)}var(u,t,i){return this._def(tu.varKinds.var,u,t,i)}assign(u,t,i){return this._leafNode(new xr(u,t,i))}add(u,t){return this._leafNode(new Oa(u,ae.operators.ADD,t))}code(u){return typeof u=="function"?u():u!==me.nil&&this._leafNode(new qa(u)),this}object(...u){let t=["{"];for(let[i,n]of u)t.length>1&&t.push(","),t.push(i),(i!==n||this.opts.es5)&&(t.push(":"),(0,me.addCodeArg)(t,n));return t.push("}"),new me._Code(t)}if(u,t,i){if(this._blockNode(new Br(u)),t&&i)this.code(t).else().code(i).endIf();else if(t)this.code(t).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(u){return this._elseNode(new Br(u))}else(){return this._elseNode(new Ra)}endIf(){return this._endBlockNode(Br,Ra)}_for(u,t){return this._blockNode(u),t&&this.code(t).endFor(),this}for(u,t){return this._for(new La(u),t)}forRange(u,t,i,n,f=this.opts.es5?tu.varKinds.var:tu.varKinds.let){let r=this._scope.toName(u);return this._for(new za(f,r,t,i),()=>n(r))}forOf(u,t,i,n=tu.varKinds.const){let f=this._scope.toName(u);if(this.opts.es5){let r=t instanceof me.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,me._)`${r}.length`,o=>{this.var(f,(0,me._)`${r}[${o}]`),i(f)})}return this._for(new wr("of",n,f,t),()=>i(f))}forIn(u,t,i,n=this.opts.es5?tu.varKinds.var:tu.varKinds.const){if(this.opts.ownProperties)return this.forOf(u,(0,me._)`Object.keys(${t})`,i);let f=this._scope.toName(u);return this._for(new wr("in",n,f,t),()=>i(f))}endFor(){return this._endBlockNode(Ar)}label(u){return this._leafNode(new Ma(u))}break(u){return this._leafNode(new Na(u))}return(u){let t=new V1;if(this._blockNode(t),this.code(u),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(V1)}try(u,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Ha;if(this._blockNode(n),this.code(u),t){let f=this.name("e");this._currNode=n.catch=new R1(f),t(f)}return i&&(this._currNode=n.finally=new L1,this.code(i)),this._endBlockNode(R1,L1)}throw(u){return this._leafNode(new ja(u))}block(u,t){return this._blockStarts.push(this._nodes.length),u&&this.code(u).endBlock(t),this}endBlock(u){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let i=this._nodes.length-t;if(i<0||u!==void 0&&i!==u)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${u} expected`);return this._nodes.length=t,this}func(u,t=me.nil,i,n){return this._blockNode(new q1(u,t,i)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(q1)}optimize(u=1){for(;u-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(u){return this._currNode.nodes.push(u),this}_blockNode(u){this._currNode.nodes.push(u),this._nodes.push(u)}_endBlockNode(u,t){let i=this._currNode;if(i instanceof u||t&&i instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${u.kind}/${t.kind}`:u.kind}"`)}_elseNode(u){let t=this._currNode;if(!(t instanceof Br))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=u,this}get _root(){return this._nodes[0]}get _currNode(){let u=this._nodes;return u[u.length-1]}set _currNode(u){let t=this._nodes;t[t.length-1]=u}};ae.CodeGen=Ua;function yi(e,u){for(let t in u)e[t]=(e[t]||0)+(u[t]||0);return e}function Ir(e,u){return u instanceof me._CodeOrName?yi(e,u.names):e}function Qi(e,u,t){if(e instanceof me.Name)return i(e);if(!n(e))return e;return new me._Code(e._items.reduce((f,r)=>(r instanceof me.Name&&(r=i(r)),r instanceof me._Code?f.push(...r._items):f.push(r),f),[]));function i(f){let r=t[f.str];return r===void 0||u[f.str]!==1?f:(delete u[f.str],r)}function n(f){return f instanceof me._Code&&f._items.some(r=>r instanceof me.Name&&u[r.str]===1&&t[r.str]!==void 0)}}function s4(e,u){for(let t in u)e[t]=(e[t]||0)-(u[t]||0)}function z1(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,me._)`!${Wa(e)}`}ae.not=z1;var l4=H1(ae.operators.AND);function d4(...e){return e.reduce(l4)}ae.and=d4;var c4=H1(ae.operators.OR);function p4(...e){return e.reduce(c4)}ae.or=p4;function H1(e){return(u,t)=>u===me.nil?t:t===me.nil?u:(0,me._)`${Wa(u)} ${e} ${Wa(t)}`}function Wa(e){return e instanceof me.Name?e:(0,me._)`(${e})`}});var le=F(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.checkStrictMode=se.getErrorPath=se.Type=se.useFunc=se.setEvaluated=se.evaluatedPropsToName=se.mergeEvaluated=se.eachItem=se.unescapeJsonPointer=se.escapeJsonPointer=se.escapeFragment=se.unescapeFragment=se.schemaRefOrVal=se.schemaHasRulesButRef=se.schemaHasRules=se.checkUnknownRules=se.alwaysValidSchema=se.toHash=void 0;var Ie=fe(),m4=ff();function F4(e){let u={};for(let t of e)u[t]=!0;return u}se.toHash=F4;function C4(e,u){return typeof u=="boolean"?u:Object.keys(u).length===0?!0:(G1(e,u),!K1(u,e.self.RULES.all))}se.alwaysValidSchema=C4;function G1(e,u=e.schema){let{opts:t,self:i}=e;if(!t.strictSchema||typeof u=="boolean")return;let n=i.RULES.keywords;for(let f in u)n[f]||Y1(e,`unknown keyword: "${f}"`)}se.checkUnknownRules=G1;function K1(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(u[t])return!0;return!1}se.schemaHasRules=K1;function h4(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&u.all[t])return!0;return!1}se.schemaHasRulesButRef=h4;function g4({topSchemaRef:e,schemaPath:u},t,i,n){if(!n){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Ie._)`${t}`}return(0,Ie._)`${e}${u}${(0,Ie.getProperty)(i)}`}se.schemaRefOrVal=g4;function E4(e){return J1(decodeURIComponent(e))}se.unescapeFragment=E4;function b4(e){return encodeURIComponent(Ka(e))}se.escapeFragment=b4;function Ka(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}se.escapeJsonPointer=Ka;function J1(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}se.unescapeJsonPointer=J1;function _4(e,u){if(Array.isArray(e))for(let t of e)u(t);else u(e)}se.eachItem=_4;function U1({mergeNames:e,mergeToName:u,mergeValues:t,resultToName:i}){return(n,f,r,o)=>{let a=r===void 0?f:r instanceof Ie.Name?(f instanceof Ie.Name?e(n,f,r):u(n,f,r),r):f instanceof Ie.Name?(u(n,r,f),f):t(f,r);return o===Ie.Name&&!(a instanceof Ie.Name)?i(n,a):a}}se.mergeEvaluated={props:U1({mergeNames:(e,u,t)=>e.if((0,Ie._)`${t} !== true && ${u} !== undefined`,()=>{e.if((0,Ie._)`${u} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Ie._)`${t} || {}`).code((0,Ie._)`Object.assign(${t}, ${u})`))}),mergeToName:(e,u,t)=>e.if((0,Ie._)`${t} !== true`,()=>{u===!0?e.assign(t,!0):(e.assign(t,(0,Ie._)`${t} || {}`),Ja(e,t,u))}),mergeValues:(e,u)=>e===!0?!0:X(X({},e),u),resultToName:X1}),items:U1({mergeNames:(e,u,t)=>e.if((0,Ie._)`${t} !== true && ${u} !== undefined`,()=>e.assign(t,(0,Ie._)`${u} === true ? true : ${t} > ${u} ? ${t} : ${u}`)),mergeToName:(e,u,t)=>e.if((0,Ie._)`${t} !== true`,()=>e.assign(t,u===!0?!0:(0,Ie._)`${t} > ${u} ? ${t} : ${u}`)),mergeValues:(e,u)=>e===!0?!0:Math.max(e,u),resultToName:(e,u)=>e.var("items",u)})};function X1(e,u){if(u===!0)return e.var("props",!0);let t=e.var("props",(0,Ie._)`{}`);return u!==void 0&&Ja(e,t,u),t}se.evaluatedPropsToName=X1;function Ja(e,u,t){Object.keys(t).forEach(i=>e.assign((0,Ie._)`${u}${(0,Ie.getProperty)(i)}`,!0))}se.setEvaluated=Ja;var W1={};function y4(e,u){return e.scopeValue("func",{ref:u,code:W1[u.code]||(W1[u.code]=new m4._Code(u.code))})}se.useFunc=y4;var Ga=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(Ga||(se.Type=Ga={}));function v4(e,u,t){if(e instanceof Ie.Name){let i=u===Ga.Num;return t?i?(0,Ie._)`"[" + ${e} + "]"`:(0,Ie._)`"['" + ${e} + "']"`:i?(0,Ie._)`"/" + ${e}`:(0,Ie._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Ie.getProperty)(e).toString():"/"+Ka(e)}se.getErrorPath=v4;function Y1(e,u,t=e.opts.strictSchema){if(t){if(u=`strict mode: ${u}`,t===!0)throw new Error(u);e.self.logger.warn(u)}}se.checkStrictMode=Y1});var zt=F(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});var st=fe(),B4={data:new st.Name("data"),valCxt:new st.Name("valCxt"),instancePath:new st.Name("instancePath"),parentData:new st.Name("parentData"),parentDataProperty:new st.Name("parentDataProperty"),rootData:new st.Name("rootData"),dynamicAnchors:new st.Name("dynamicAnchors"),vErrors:new st.Name("vErrors"),errors:new st.Name("errors"),this:new st.Name("this"),self:new st.Name("self"),scope:new st.Name("scope"),json:new st.Name("json"),jsonPos:new st.Name("jsonPos"),jsonLen:new st.Name("jsonLen"),jsonPart:new st.Name("jsonPart")};Xa.default=B4});var of=F(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.extendErrors=lt.resetErrorsCount=lt.reportExtraError=lt.reportError=lt.keyword$DataError=lt.keywordError=void 0;var he=fe(),kr=le(),gt=zt();lt.keywordError={message:({keyword:e})=>(0,he.str)`must pass "${e}" keyword validation`};lt.keyword$DataError={message:({keyword:e,schemaType:u})=>u?(0,he.str)`"${e}" keyword must be ${u} ($data)`:(0,he.str)`"${e}" keyword is invalid ($data)`};function x4(e,u=lt.keywordError,t,i){let{it:n}=e,{gen:f,compositeRule:r,allErrors:o}=n,a=el(e,u,t);(i!=null?i:r||o)?Z1(f,a):Q1(n,(0,he._)`[${a}]`)}lt.reportError=x4;function w4(e,u=lt.keywordError,t){let{it:i}=e,{gen:n,compositeRule:f,allErrors:r}=i,o=el(e,u,t);Z1(n,o),f||r||Q1(i,gt.default.vErrors)}lt.reportExtraError=w4;function I4(e,u){e.assign(gt.default.errors,u),e.if((0,he._)`${gt.default.vErrors} !== null`,()=>e.if(u,()=>e.assign((0,he._)`${gt.default.vErrors}.length`,u),()=>e.assign(gt.default.vErrors,null)))}lt.resetErrorsCount=I4;function S4({gen:e,keyword:u,schemaValue:t,data:i,errsCount:n,it:f}){if(n===void 0)throw new Error("ajv implementation error");let r=e.name("err");e.forRange("i",n,gt.default.errors,o=>{e.const(r,(0,he._)`${gt.default.vErrors}[${o}]`),e.if((0,he._)`${r}.instancePath === undefined`,()=>e.assign((0,he._)`${r}.instancePath`,(0,he.strConcat)(gt.default.instancePath,f.errorPath))),e.assign((0,he._)`${r}.schemaPath`,(0,he.str)`${f.errSchemaPath}/${u}`),f.opts.verbose&&(e.assign((0,he._)`${r}.schema`,t),e.assign((0,he._)`${r}.data`,i))})}lt.extendErrors=S4;function Z1(e,u){let t=e.const("err",u);e.if((0,he._)`${gt.default.vErrors} === null`,()=>e.assign(gt.default.vErrors,(0,he._)`[${t}]`),(0,he._)`${gt.default.vErrors}.push(${t})`),e.code((0,he._)`${gt.default.errors}++`)}function Q1(e,u){let{gen:t,validateName:i,schemaEnv:n}=e;n.$async?t.throw((0,he._)`new ${e.ValidationError}(${u})`):(t.assign((0,he._)`${i}.errors`,u),t.return(!1))}var vi={keyword:new he.Name("keyword"),schemaPath:new he.Name("schemaPath"),params:new he.Name("params"),propertyName:new he.Name("propertyName"),message:new he.Name("message"),schema:new he.Name("schema"),parentSchema:new he.Name("parentSchema")};function el(e,u,t){let{createErrors:i}=e.it;return i===!1?(0,he._)`{}`:A4(e,u,t)}function A4(e,u,t={}){let{gen:i,it:n}=e,f=[k4(n,t),$4(e,t)];return T4(e,u,f),i.object(...f)}function k4({errorPath:e},{instancePath:u}){let t=u?(0,he.str)`${e}${(0,kr.getErrorPath)(u,kr.Type.Str)}`:e;return[gt.default.instancePath,(0,he.strConcat)(gt.default.instancePath,t)]}function $4({keyword:e,it:{errSchemaPath:u}},{schemaPath:t,parentSchema:i}){let n=i?u:(0,he.str)`${u}/${e}`;return t&&(n=(0,he.str)`${n}${(0,kr.getErrorPath)(t,kr.Type.Str)}`),[vi.schemaPath,n]}function T4(e,{params:u,message:t},i){let{keyword:n,data:f,schemaValue:r,it:o}=e,{opts:a,propertyName:D,topSchemaRef:s,schemaPath:d}=o;i.push([vi.keyword,n],[vi.params,typeof u=="function"?u(e):u||(0,he._)`{}`]),a.messages&&i.push([vi.message,typeof t=="function"?t(e):t]),a.verbose&&i.push([vi.schema,r],[vi.parentSchema,(0,he._)`${s}${d}`],[gt.default.data,f]),D&&i.push([vi.propertyName,D])}});var ul=F(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.boolOrEmptySchema=en.topBoolOrEmptySchema=void 0;var P4=of(),O4=fe(),M4=zt(),N4={message:"boolean schema is false"};function j4(e){let{gen:u,schema:t,validateName:i}=e;t===!1?tl(e,!1):typeof t=="object"&&t.$async===!0?u.return(M4.default.data):(u.assign((0,O4._)`${i}.errors`,null),u.return(!0))}en.topBoolOrEmptySchema=j4;function q4(e,u){let{gen:t,schema:i}=e;i===!1?(t.var(u,!1),tl(e)):t.var(u,!0)}en.boolOrEmptySchema=q4;function tl(e,u){let{gen:t,data:i}=e,n={gen:t,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,P4.reportError)(n,N4,void 0,u)}});var Ya=F(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.getRules=tn.isJSONType=void 0;var V4=["string","number","integer","boolean","null","object","array"],R4=new Set(V4);function L4(e){return typeof e=="string"&&R4.has(e)}tn.isJSONType=L4;function z4(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:we(X({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}tn.getRules=z4});var Za=F(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});Yu.shouldUseRule=Yu.shouldUseGroup=Yu.schemaHasRulesForType=void 0;function H4({schema:e,self:u},t){let i=u.RULES.types[t];return i&&i!==!0&&il(e,i)}Yu.schemaHasRulesForType=H4;function il(e,u){return u.rules.some(t=>nl(e,t))}Yu.shouldUseGroup=il;function nl(e,u){var t;return e[u.keyword]!==void 0||((t=u.definition.implements)===null||t===void 0?void 0:t.some(i=>e[i]!==void 0))}Yu.shouldUseRule=nl});var af=F(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.reportTypeError=dt.checkDataTypes=dt.checkDataType=dt.coerceAndCheckDataType=dt.getJSONTypes=dt.getSchemaTypes=dt.DataType=void 0;var U4=Ya(),W4=Za(),G4=of(),re=fe(),fl=le(),un=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(un||(dt.DataType=un={}));function K4(e){let u=rl(e.type);if(u.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!u.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&u.push("null")}return u}dt.getSchemaTypes=K4;function rl(e){let u=Array.isArray(e)?e:e?[e]:[];if(u.every(U4.isJSONType))return u;throw new Error("type must be JSONType or JSONType[]: "+u.join(","))}dt.getJSONTypes=rl;function J4(e,u){let{gen:t,data:i,opts:n}=e,f=X4(u,n.coerceTypes),r=u.length>0&&!(f.length===0&&u.length===1&&(0,W4.schemaHasRulesForType)(e,u[0]));if(r){let o=eD(u,i,n.strictNumbers,un.Wrong);t.if(o,()=>{f.length?Y4(e,u,f):tD(e)})}return r}dt.coerceAndCheckDataType=J4;var ol=new Set(["string","number","integer","boolean","null"]);function X4(e,u){return u?e.filter(t=>ol.has(t)||u==="array"&&t==="array"):[]}function Y4(e,u,t){let{gen:i,data:n,opts:f}=e,r=i.let("dataType",(0,re._)`typeof ${n}`),o=i.let("coerced",(0,re._)`undefined`);f.coerceTypes==="array"&&i.if((0,re._)`${r} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>i.assign(n,(0,re._)`${n}[0]`).assign(r,(0,re._)`typeof ${n}`).if(eD(u,n,f.strictNumbers),()=>i.assign(o,n))),i.if((0,re._)`${o} !== undefined`);for(let D of t)(ol.has(D)||D==="array"&&f.coerceTypes==="array")&&a(D);i.else(),tD(e),i.endIf(),i.if((0,re._)`${o} !== undefined`,()=>{i.assign(n,o),Z4(e,o)});function a(D){switch(D){case"string":i.elseIf((0,re._)`${r} == "number" || ${r} == "boolean"`).assign(o,(0,re._)`"" + ${n}`).elseIf((0,re._)`${n} === null`).assign(o,(0,re._)`""`);return;case"number":i.elseIf((0,re._)`${r} == "boolean" || ${n} === null
3
3
  || (${r} == "string" && ${n} && ${n} == +${n})`).assign(o,(0,re._)`+${n}`);return;case"integer":i.elseIf((0,re._)`${r} === "boolean" || ${n} === null
4
4
  || (${r} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(o,(0,re._)`+${n}`);return;case"boolean":i.elseIf((0,re._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(o,!1).elseIf((0,re._)`${n} === "true" || ${n} === 1`).assign(o,!0);return;case"null":i.elseIf((0,re._)`${n} === "" || ${n} === 0 || ${n} === false`),i.assign(o,null);return;case"array":i.elseIf((0,re._)`${r} === "string" || ${r} === "number"
@@ -1 +1 @@
1
- import{a as D}from"./chunk-2WH4IK5A.js";import{d as E}from"./chunk-4T2QSCYW.js";import{b as B}from"./chunk-6W4AJ2ZZ.js";import{h as O,k as R}from"./chunk-BYW5V4GN.js";import{a as k,b as I}from"./chunk-5FC5GQ62.js";import{$c as T,Cc as o,Dc as l,Kb as _,Pb as u,Ub as r,Vb as n,Wb as v,_b as $,bc as S,cc as f,gb as e,ma as m,mc as a,nc as p,oc as x,tb as w,ua as C,va as y,yc as b,zb as h,zc as g}from"./chunk-YSEOPOHR.js";var U=(t,c)=>({"fas fa-fw fa-spinner fa-spin":t,"far fa-fw fa-check-circle":c}),F=t=>({"grey-text":t}),P=(t,c)=>({"far fa-fw fa-circle":t,"fas fa-fw fa-spinner fa-spin":c});function j(t,c){t&1&&(r(0,"p",7),a(1),o(2,"translate"),n()),t&2&&(e(),p(l(2,1,"restart.please_wait_while_server_restarts")))}function M(t,c){if(t&1&&(r(0,"div",8),a(1),n()),t&2){let i=f();e(),p(i.error)}}function V(t,c){if(t&1&&(r(0,"div",9)(1,"div",11)(2,"span"),v(3,"i",12),a(4),o(5,"translate"),n()(),r(6,"div",11)(7,"span",12),v(8,"i",12),a(9),o(10,"translate"),n()()()),t&2){let i=f();e(3),_("ngClass",g(9,U,!i.uiOnline,i.uiOnline)),e(),x(" ",l(5,5,"restart.ui_online")," "),e(3),_("ngClass",b(12,F,!i.uiOnline)),e(),_("ngClass",g(14,P,!i.uiOnline,i.uiOnline)),e(),x(" ",l(10,7,"restart.service_ready")," ")}}function z(t,c){if(t&1){let i=$();r(0,"p",15)(1,"button",16),S("click",function(){C(i);let d=f(2);return y(d.viewLogs())}),a(2),o(3,"translate"),n()()}t&2&&(e(2),p(l(3,1,"menu.tooltip_view_logs")))}function A(t,c){if(t&1&&(r(0,"div",10)(1,"p"),a(2),o(3,"translate"),n(),r(4,"p",13),a(5),o(6,"translate"),r(7,"span",14),a(8),n()(),h(9,z,4,3,"p",15),n()),t&2){let i=f();e(2),p(l(3,4,"restart.server_is_taking_long_time_to_restart")),e(3),x(" ",l(6,6,"restart.label_restart_command_executed"),": "),e(3),p(i.resp.command||"End Process"),e(),u(i.uiOnline?9:-1)}}var Y=(()=>{class t{$api=m(R);$router=m(E);$settings=m(B);$toastr=m(O);$translate=m(k);$ws=m(D);checkTimeout;checkDelay;resp={};timeout=!1;error=!1;uiOnline=!1;io;constructor(){}ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$router.parseUrl(this.$router.url).queryParams.restarting?(this.uiOnline=!0,this.checkIfServerUp()):this.$api.put("/server/restart",{}).subscribe({next:s=>{this.resp=s,this.checkIfServerUp(),s.restartingUI||(this.uiOnline=!0)},error:s=>{console.error(s),this.error=this.$translate.instant("restart.toast_server_restart_error"),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",i=>{this.uiOnline=!0,(i.status==="up"||i.status==="pending")&&(this.$toastr.success(this.$translate.instant("restart.toast_server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},7e3),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},4e4)}viewLogs(){this.$router.navigate(["/logs"])}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=w({type:t,selectors:[["ng-component"]],decls:15,vars:10,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"grey-text"],[1,"alert","alert-error","my-4"],[1,"justify-content-center","my-4"],[1,"alert","alert-warning","my-4"],[1,"restart-progress-box","primary-text"],[3,"ngClass"],[1,"grey-text","mb-0"],[1,"font-monospace"],[1,"mt-2","mb-0"],[1,"btn","btn-primary","mb-0",3,"click"]],template:function(s,d){s&1&&(r(0,"div",0)(1,"h3",1),a(2),o(3,"translate"),n()(),r(4,"div",2)(5,"div",3),v(6,"i",4),n(),r(7,"div",5)(8,"h4",6),a(9),o(10,"translate"),n(),h(11,j,3,3,"p",7)(12,M,2,1,"div",8)(13,V,11,17,"div",9)(14,A,10,8,"div",10),n()()),s&2&&(e(2),p(l(3,6,"menu.restart.title")),e(7),p(l(10,8,"restart.title_restart")),e(2),u(d.error?-1:11),e(),u(d.error?12:-1),e(),u(d.error?-1:13),e(),u(d.timeout?14:-1))},dependencies:[T,I],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{Y as a};
1
+ import{a as D}from"./chunk-J3SXKFRW.js";import{d as E}from"./chunk-4T2QSCYW.js";import{b as B}from"./chunk-FKHZR7GC.js";import{h as O,k as R}from"./chunk-5VLLXOOB.js";import{a as k,b as I}from"./chunk-5FC5GQ62.js";import{$c as T,Cc as o,Dc as l,Kb as _,Pb as u,Ub as r,Vb as n,Wb as v,_b as $,bc as S,cc as f,gb as e,ma as m,mc as a,nc as p,oc as x,tb as w,ua as C,va as y,yc as b,zb as h,zc as g}from"./chunk-YSEOPOHR.js";var U=(t,c)=>({"fas fa-fw fa-spinner fa-spin":t,"far fa-fw fa-check-circle":c}),F=t=>({"grey-text":t}),P=(t,c)=>({"far fa-fw fa-circle":t,"fas fa-fw fa-spinner fa-spin":c});function j(t,c){t&1&&(r(0,"p",7),a(1),o(2,"translate"),n()),t&2&&(e(),p(l(2,1,"restart.please_wait_while_server_restarts")))}function M(t,c){if(t&1&&(r(0,"div",8),a(1),n()),t&2){let i=f();e(),p(i.error)}}function V(t,c){if(t&1&&(r(0,"div",9)(1,"div",11)(2,"span"),v(3,"i",12),a(4),o(5,"translate"),n()(),r(6,"div",11)(7,"span",12),v(8,"i",12),a(9),o(10,"translate"),n()()()),t&2){let i=f();e(3),_("ngClass",g(9,U,!i.uiOnline,i.uiOnline)),e(),x(" ",l(5,5,"restart.ui_online")," "),e(3),_("ngClass",b(12,F,!i.uiOnline)),e(),_("ngClass",g(14,P,!i.uiOnline,i.uiOnline)),e(),x(" ",l(10,7,"restart.service_ready")," ")}}function z(t,c){if(t&1){let i=$();r(0,"p",15)(1,"button",16),S("click",function(){C(i);let d=f(2);return y(d.viewLogs())}),a(2),o(3,"translate"),n()()}t&2&&(e(2),p(l(3,1,"menu.tooltip_view_logs")))}function A(t,c){if(t&1&&(r(0,"div",10)(1,"p"),a(2),o(3,"translate"),n(),r(4,"p",13),a(5),o(6,"translate"),r(7,"span",14),a(8),n()(),h(9,z,4,3,"p",15),n()),t&2){let i=f();e(2),p(l(3,4,"restart.server_is_taking_long_time_to_restart")),e(3),x(" ",l(6,6,"restart.label_restart_command_executed"),": "),e(3),p(i.resp.command||"End Process"),e(),u(i.uiOnline?9:-1)}}var Y=(()=>{class t{$api=m(R);$router=m(E);$settings=m(B);$toastr=m(O);$translate=m(k);$ws=m(D);checkTimeout;checkDelay;resp={};timeout=!1;error=!1;uiOnline=!1;io;constructor(){}ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$router.parseUrl(this.$router.url).queryParams.restarting?(this.uiOnline=!0,this.checkIfServerUp()):this.$api.put("/server/restart",{}).subscribe({next:s=>{this.resp=s,this.checkIfServerUp(),s.restartingUI||(this.uiOnline=!0)},error:s=>{console.error(s),this.error=this.$translate.instant("restart.toast_server_restart_error"),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",i=>{this.uiOnline=!0,(i.status==="up"||i.status==="pending")&&(this.$toastr.success(this.$translate.instant("restart.toast_server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},7e3),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},4e4)}viewLogs(){this.$router.navigate(["/logs"])}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=w({type:t,selectors:[["ng-component"]],decls:15,vars:10,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"grey-text"],[1,"alert","alert-error","my-4"],[1,"justify-content-center","my-4"],[1,"alert","alert-warning","my-4"],[1,"restart-progress-box","primary-text"],[3,"ngClass"],[1,"grey-text","mb-0"],[1,"font-monospace"],[1,"mt-2","mb-0"],[1,"btn","btn-primary","mb-0",3,"click"]],template:function(s,d){s&1&&(r(0,"div",0)(1,"h3",1),a(2),o(3,"translate"),n()(),r(4,"div",2)(5,"div",3),v(6,"i",4),n(),r(7,"div",5)(8,"h4",6),a(9),o(10,"translate"),n(),h(11,j,3,3,"p",7)(12,M,2,1,"div",8)(13,V,11,17,"div",9)(14,A,10,8,"div",10),n()()),s&2&&(e(2),p(l(3,6,"menu.restart.title")),e(7),p(l(10,8,"restart.title_restart")),e(2),u(d.error?-1:11),e(),u(d.error?12:-1),e(),u(d.error?-1:13),e(),u(d.timeout?14:-1))},dependencies:[T,I],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{Y as a};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-3FUMZPAO.js";import"./chunk-LAIV47S5.js";import"./chunk-O6TC4BRG.js";import"./chunk-CMCSOAXY.js";import"./chunk-GZS22B5R.js";import"./chunk-ACZLPZJM.js";import"./chunk-VNJJI7TG.js";import"./chunk-4T2QSCYW.js";import"./chunk-FKHZR7GC.js";import"./chunk-5VLLXOOB.js";import"./chunk-ZZ5DUZ3T.js";import"./chunk-5FC5GQ62.js";import"./chunk-YSEOPOHR.js";export{a as ConfigEditorComponent};
@@ -1 +1 @@
1
- import"./chunk-7RDZL576.js";import"./chunk-HFN3B3QR.js";import"./chunk-HKLJJXUX.js";import"./chunk-ZIEZJHQ3.js";import"./chunk-2WH4IK5A.js";import{g as i}from"./chunk-4T2QSCYW.js";import"./chunk-NMSMHD6N.js";import"./chunk-6W4AJ2ZZ.js";import"./chunk-BYW5V4GN.js";import"./chunk-ZZ5DUZ3T.js";import{c as m}from"./chunk-5FC5GQ62.js";import{ha as t,id as n,ub as r}from"./chunk-YSEOPOHR.js";var u=[{path:"",loadComponent:()=>import("./chunk-CDJKWLLD.js").then(o=>o.TerminalComponent)}],a=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(u),i]})}return o})();var T=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n,a,m.forChild()]})}return o})();export{T as TerminalModule};
1
+ import"./chunk-PFI5T7QO.js";import"./chunk-47HTHVMR.js";import"./chunk-HKLJJXUX.js";import"./chunk-ZIEZJHQ3.js";import"./chunk-J3SXKFRW.js";import{g as i}from"./chunk-4T2QSCYW.js";import"./chunk-XPPKEWW4.js";import"./chunk-FKHZR7GC.js";import"./chunk-5VLLXOOB.js";import"./chunk-ZZ5DUZ3T.js";import{c as m}from"./chunk-5FC5GQ62.js";import{ha as t,id as n,ub as r}from"./chunk-YSEOPOHR.js";var u=[{path:"",loadComponent:()=>import("./chunk-2TCTFOWV.js").then(o=>o.TerminalComponent)}],a=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(u),i]})}return o})();var T=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n,a,m.forChild()]})}return o})();export{T as TerminalModule};
@@ -0,0 +1 @@
1
+ import{b as a}from"./chunk-5X4G6K3F.js";import"./chunk-N7CACY44.js";import"./chunk-2PQO2MA7.js";import"./chunk-GZS22B5R.js";import"./chunk-ACZLPZJM.js";import"./chunk-VNJJI7TG.js";import"./chunk-J3SXKFRW.js";import"./chunk-4T2QSCYW.js";import"./chunk-XPPKEWW4.js";import"./chunk-FKHZR7GC.js";import"./chunk-5VLLXOOB.js";import"./chunk-ZZ5DUZ3T.js";import"./chunk-5FC5GQ62.js";import"./chunk-YSEOPOHR.js";export{a as AccessoriesComponent};