homebridge-config-ui-x 5.11.2 → 5.11.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/dist/core/auth/auth.controller.d.ts +4 -0
- package/dist/core/config/config.interfaces.d.ts +14 -0
- package/dist/core/config/config.service.d.ts +6 -0
- package/dist/core/config/config.service.js +8 -0
- package/dist/core/config/config.service.js.map +1 -1
- package/dist/core/config/config.startup.js +48 -17
- package/dist/core/config/config.startup.js.map +1 -1
- package/dist/core/feature-flags/feature-flags.registry.js +5 -0
- package/dist/core/feature-flags/feature-flags.registry.js.map +1 -1
- package/dist/core/homebridge-ipc/homebridge-ipc.service.js +1 -0
- package/dist/core/homebridge-ipc/homebridge-ipc.service.js.map +1 -1
- package/dist/core/spa/spa-html.service.d.ts +5 -0
- package/dist/core/spa/spa-html.service.js +32 -0
- package/dist/core/spa/spa-html.service.js.map +1 -0
- package/dist/core/spa/spa.filter.d.ts +3 -0
- package/dist/core/spa/spa.filter.js +22 -2
- package/dist/core/spa/spa.filter.js.map +1 -1
- package/dist/core/ssl/ssl-cert-generator.service.d.ts +15 -0
- package/dist/core/ssl/ssl-cert-generator.service.js +125 -0
- package/dist/core/ssl/ssl-cert-generator.service.js.map +1 -0
- package/dist/globalDefaults.js +3 -0
- package/dist/globalDefaults.js.map +1 -1
- package/dist/main.js +18 -4
- package/dist/main.js.map +1 -1
- package/dist/modules/accessories/accessories.controller.d.ts +1 -1
- package/dist/modules/accessories/accessories.interfaces.d.ts +94 -0
- package/dist/modules/accessories/accessories.interfaces.js +2 -0
- package/dist/modules/accessories/accessories.interfaces.js.map +1 -0
- package/dist/modules/accessories/accessories.module.js +2 -0
- package/dist/modules/accessories/accessories.module.js.map +1 -1
- package/dist/modules/accessories/accessories.service.d.ts +21 -3
- package/dist/modules/accessories/accessories.service.js +281 -17
- package/dist/modules/accessories/accessories.service.js.map +1 -1
- package/dist/modules/child-bridges/child-bridges.interfaces.d.ts +9 -0
- package/dist/modules/config-editor/config-editor.controller.d.ts +4 -0
- package/dist/modules/config-editor/config-editor.controller.js +64 -0
- package/dist/modules/config-editor/config-editor.controller.js.map +1 -1
- package/dist/modules/config-editor/config-editor.service.d.ts +6 -1
- package/dist/modules/config-editor/config-editor.service.js +45 -1
- package/dist/modules/config-editor/config-editor.service.js.map +1 -1
- package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +1 -1
- package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +1 -1
- package/dist/modules/plugins/plugins.module.js +1 -1
- package/dist/modules/plugins/plugins.service.js +17 -2
- package/dist/modules/plugins/plugins.service.js.map +1 -1
- package/dist/modules/server/server.controller.d.ts +50 -0
- package/dist/modules/server/server.controller.js +201 -2
- package/dist/modules/server/server.controller.js.map +1 -1
- package/dist/modules/server/server.service.d.ts +48 -0
- package/dist/modules/server/server.service.js +502 -14
- package/dist/modules/server/server.service.js.map +1 -1
- package/dist/modules/status/status.gateway.d.ts +2 -0
- package/dist/modules/status/status.interfaces.d.ts +11 -0
- package/dist/modules/status/status.service.d.ts +4 -1
- package/dist/modules/status/status.service.js +21 -2
- package/dist/modules/status/status.service.js.map +1 -1
- package/docs/matter-todo.md +15 -0
- package/docs/ssl-upload-pr.md +103 -0
- package/package.json +4 -2
- package/public/3rdpartylicenses.txt +595 -621
- package/public/assets/matter.svg +8 -0
- package/public/assets/plugin-ui-utils/ui.js +3 -0
- package/public/assets/plugin-ui-utils/ui.js.map +1 -1
- package/public/chunk-2VGNMGIR.js +2 -0
- package/public/chunk-33JY67E7.js +1 -0
- package/public/chunk-37PRZWAE.js +1 -0
- package/public/chunk-3ELEQCY4.js +4 -0
- package/public/chunk-3LPAJLVA.js +1 -0
- package/public/chunk-3U5EVF33.js +1 -0
- package/public/chunk-4MTKU45H.js +1 -0
- package/public/chunk-537Z3TZH.js +1 -0
- package/public/chunk-55GLM7AG.js +1 -0
- package/public/chunk-5IUE2SI2.js +1 -0
- package/public/chunk-5PYHJIFL.js +4 -0
- package/public/chunk-6GBRDYWL.js +1 -0
- package/public/chunk-6HBUGTGB.js +1 -0
- package/public/chunk-6IDWI5FN.js +1 -0
- package/public/chunk-6KEEFMT4.js +1 -0
- package/public/chunk-6SGMX4QN.js +1 -0
- package/public/chunk-6U3HDGMV.js +1 -0
- package/public/chunk-7AYXT4NE.js +1 -0
- package/public/chunk-AKPNXV2T.js +3 -0
- package/public/chunk-AQQQXM6K.js +1 -0
- package/public/chunk-ARIUPFP4.js +1 -0
- package/public/chunk-AUK5NDCU.js +1 -0
- package/public/chunk-B4AJQJMI.js +1 -0
- package/public/{chunk-JLZ5WU6N.js → chunk-BMOLDRJ3.js} +1 -1
- package/public/chunk-BU5OWW3D.js +16 -0
- package/public/chunk-BUFOAAED.js +1 -0
- package/public/chunk-CLZZPSYM.js +1 -0
- package/public/chunk-CQ4V3WTB.js +1 -0
- package/public/{chunk-XVO5247V.js → chunk-CRLXCYA4.js} +1 -1
- package/public/chunk-D5RAEI3L.js +1 -0
- package/public/chunk-DE6IO5N6.js +1 -0
- package/public/chunk-DPQ6DNII.js +1 -0
- package/public/chunk-ED2WGY4W.js +1 -0
- package/public/chunk-EPDCL7TG.js +1 -0
- package/public/chunk-EPQ2ZMQD.js +1 -0
- package/public/chunk-ESL5FTKU.js +2 -0
- package/public/chunk-F4XK3SMH.js +1 -0
- package/public/chunk-FCWNINXI.js +1 -0
- package/public/chunk-FENK2NPT.js +1 -0
- package/public/chunk-G6V4QW45.js +68 -0
- package/public/chunk-GVEBFYKG.js +1 -0
- package/public/chunk-H2Z7V5LU.js +8 -0
- package/public/{chunk-N6JGA2PG.js → chunk-H7F7H5MW.js} +1 -1
- package/public/chunk-HDPCCLQH.js +1 -0
- package/public/chunk-HFO4CT77.js +3 -0
- package/public/chunk-HIZVM47C.js +1 -0
- package/public/chunk-HXRHQRO5.js +1 -0
- package/public/chunk-IAVNB5BZ.js +1 -0
- package/public/chunk-IK7P4HIE.js +1 -0
- package/public/{chunk-VKHX6FUQ.js → chunk-J2O4Y2AJ.js} +52 -2
- package/public/chunk-J2PDRU7K.js +1 -0
- package/public/chunk-JI773Q2P.js +1 -0
- package/public/chunk-JUCKIM56.js +1 -0
- package/public/chunk-K2QSSLBW.js +1 -0
- package/public/chunk-K76PH2IQ.js +1 -0
- package/public/chunk-KTJDR6WA.js +1 -0
- package/public/chunk-KW5REXT7.js +1 -0
- package/public/chunk-L24NLXV5.js +1 -0
- package/public/chunk-LQGMFKUY.js +1 -0
- package/public/chunk-LWKX6TVU.js +1 -0
- package/public/chunk-LZZD3ZUF.js +1 -0
- package/public/chunk-M7YKGLGD.js +1 -0
- package/public/chunk-MAYAJLFA.js +1 -0
- package/public/chunk-MIE7YXOK.js +1 -0
- package/public/chunk-MISBXZWW.js +2 -0
- package/public/chunk-MSZSAJPM.js +1 -0
- package/public/chunk-MVGY6YJ7.js +1 -0
- package/public/chunk-N2IIV3LN.js +1 -0
- package/public/chunk-NMDAPSGJ.js +1 -0
- package/public/chunk-NSILEQ2V.js +1 -0
- package/public/chunk-NX6WIDIM.js +1 -0
- package/public/chunk-NYIFHGIW.js +1 -0
- package/public/chunk-O7IN75B3.js +1 -0
- package/public/chunk-OG2B4MZN.js +1 -0
- package/public/chunk-OOZDDKEF.js +1 -0
- package/public/chunk-OQMG62H7.js +1 -0
- package/public/chunk-OT3SPW73.js +1 -0
- package/public/chunk-PEAQRV5O.js +1 -0
- package/public/chunk-QFZRFLTG.js +1 -0
- package/public/chunk-QH4YP6BY.js +5 -0
- package/public/chunk-QML5ZVO6.js +1 -0
- package/public/chunk-QR626DFY.js +1 -0
- package/public/chunk-REC7F4I2.js +1 -0
- package/public/chunk-RJWIR4SV.js +19 -0
- package/public/chunk-RMPSPYKI.js +1 -0
- package/public/chunk-S6WYT7FX.js +1 -0
- package/public/chunk-SCXXKDXZ.js +1 -0
- package/public/chunk-TEJ4HGDV.js +1 -0
- package/public/chunk-TLHI6ZOI.js +1 -0
- package/public/chunk-TQ2YXTGY.js +1 -0
- package/public/chunk-U74DXZLS.js +35 -0
- package/public/chunk-UATGQE6M.js +1 -0
- package/public/chunk-UEO32F46.js +1 -0
- package/public/chunk-V2IZQE54.js +1 -0
- package/public/chunk-V3I3OYT7.js +1 -0
- package/public/chunk-V3YOVD6B.js +1 -0
- package/public/chunk-VDDMHLOW.js +1 -0
- package/public/chunk-VELTPSDH.js +1 -0
- package/public/chunk-VILWJRZL.js +5 -0
- package/public/chunk-VLRP57U3.js +1 -0
- package/public/chunk-VU3376IO.js +1 -0
- package/public/chunk-VX4RXOTH.js +4 -0
- package/public/chunk-WE2SWTKZ.js +1 -0
- package/public/chunk-WRB2RELR.js +1 -0
- package/public/chunk-XKHWVJWA.js +1 -0
- package/public/chunk-XVXDP3DD.js +1 -0
- package/public/chunk-YNJ5T73B.js +1 -0
- package/public/chunk-YTFACH4Z.js +19 -0
- package/public/chunk-ZCGZM7LU.js +1 -0
- package/public/chunk-ZGIZ2UDW.js +1 -0
- package/public/chunk-ZUPFMQG6.js +1 -0
- package/public/chunk-ZUXW4PNF.js +12 -0
- package/public/index.html +2 -2
- package/public/main-XBUEQ7PA.js +1 -0
- package/public/media/matter-P563JGDL.svg +8 -0
- package/public/polyfills-34U4WL3Z.js +1 -0
- package/public/styles-CT2LPGES.css +1 -0
- package/scripts/extract-plugin-alias.js +53 -2
- package/public/chunk-2BB4D4TW.js +0 -1
- package/public/chunk-2GCZ3AMH.js +0 -1
- package/public/chunk-2K5FWBCK.js +0 -8
- package/public/chunk-2LQBMVWH.js +0 -1
- package/public/chunk-34ZN4GVA.js +0 -3
- package/public/chunk-3JW6FD5V.js +0 -1
- package/public/chunk-57XTQ6PK.js +0 -1
- package/public/chunk-5DBV5PYR.js +0 -19
- package/public/chunk-5GKTPXPE.js +0 -1
- package/public/chunk-5X7ARCKG.js +0 -5
- package/public/chunk-67HOYJJ2.js +0 -1
- package/public/chunk-6MZHUZRT.js +0 -4
- package/public/chunk-77CMUO6J.js +0 -1
- package/public/chunk-7LJYL7EH.js +0 -1
- package/public/chunk-7TFBELRD.js +0 -1
- package/public/chunk-AXOHPUQR.js +0 -1
- package/public/chunk-BMAZBLAT.js +0 -1
- package/public/chunk-C554TVZA.js +0 -2
- package/public/chunk-DGDNSN6I.js +0 -1
- package/public/chunk-E6RSPO2D.js +0 -1
- package/public/chunk-ESQ665GW.js +0 -5
- package/public/chunk-G4QH622U.js +0 -5
- package/public/chunk-GKPR5M7S.js +0 -1
- package/public/chunk-GT7UMMFF.js +0 -2
- package/public/chunk-HBIQJCSE.js +0 -1
- package/public/chunk-JSZIAFBJ.js +0 -1
- package/public/chunk-JWQRV434.js +0 -1
- package/public/chunk-JX72JCMA.js +0 -1
- package/public/chunk-KT26K4DO.js +0 -1
- package/public/chunk-L63FND3A.js +0 -1
- package/public/chunk-LSXTHVKB.js +0 -1
- package/public/chunk-N5VXONVW.js +0 -1
- package/public/chunk-NVCJ3EJS.js +0 -1
- package/public/chunk-OPJZWDSO.js +0 -1
- package/public/chunk-OXBXHVWY.js +0 -8
- package/public/chunk-QHROK73U.js +0 -50
- package/public/chunk-QNEXPAIT.js +0 -1
- package/public/chunk-R2G2YWV4.js +0 -51
- package/public/chunk-RCNF365Q.js +0 -1
- package/public/chunk-RT6EDRIH.js +0 -1
- package/public/chunk-RWM6K46M.js +0 -1
- package/public/chunk-SVVR6UMH.js +0 -1
- package/public/chunk-UI4U37MO.js +0 -1
- package/public/chunk-ULKYNDD3.js +0 -16
- package/public/chunk-UPZ5UT6G.js +0 -1
- package/public/chunk-UQFIBBEZ.js +0 -1
- package/public/chunk-UWUTC3BD.js +0 -1
- package/public/chunk-UZ6QYM64.js +0 -1
- package/public/chunk-VM2MV3DC.js +0 -1
- package/public/chunk-VM6FMRHY.js +0 -1
- package/public/chunk-VYK3U745.js +0 -1
- package/public/chunk-VZJJWHRX.js +0 -1
- package/public/chunk-WHC4E7WY.js +0 -1
- package/public/chunk-WJKVPIP2.js +0 -1
- package/public/chunk-WOBQOQPU.js +0 -1
- package/public/chunk-WTGHGHPV.js +0 -1
- package/public/chunk-WY6UQ47H.js +0 -1
- package/public/chunk-X4ZEQSRY.js +0 -4
- package/public/chunk-XWNU2MFJ.js +0 -1
- package/public/chunk-YD3GJ2C6.js +0 -1
- package/public/chunk-YUEGV7HK.js +0 -4
- package/public/chunk-ZLRFR32W.js +0 -1
- package/public/chunk-ZZ5IX26U.js +0 -40
- package/public/chunk-ZZQEWRDE.js +0 -1
- package/public/main-VKVUZHHA.js +0 -1
- package/public/polyfills-5KWHJ7II.js +0 -2
- package/public/styles-7EFV5QBG.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as H}from"./chunk-MIE7YXOK.js";import{m as k}from"./chunk-VILWJRZL.js";import{D as h}from"./chunk-MISBXZWW.js";import{Ab as c,Dc as b,Ec as _,Jb as o,Kb as a,Lb as m,Rb as y,Sb as f,Ua as r,Yb as u,Za as i,Zb as l,aa as v,ga as L,ha as D,jc as E,kc as C,lc as B,mc as M,nb as T,uc as g,yb as p,zb as d}from"./chunk-VX4RXOTH.js";function S(t,x){if(t&1&&m(0,"i",14),t&2){let e=l();E(g("fas ",e.faIconClass," mb-3"))}}function w(t,x){if(t&1&&m(0,"p",7),t&2){let e=l();f("innerHTML",e.message2,r)}}function z(t,x){if(t&1&&m(0,"p",7),t&2){let e=l();f("innerHTML",e.message3,r)}}function A(t,x){if(t&1){let e=y();o(0,"button",15),u("click",function(){L(e);let n=l();return D(n.closeModal())}),C(1),a()}if(t&2){let e=l();E(g("btn ",e.confirmButtonClass||"btn-primary")),i(),M(" ",e.confirmButtonLabel," ")}}var O=(()=>{class t{$activeModal=v(k);modalData=v(H);title=this.modalData.title;message=this.modalData.message;message2=this.modalData.message2;message3=this.modalData.message3;confirmButtonLabel=this.modalData.confirmButtonLabel;confirmButtonClass=this.modalData.confirmButtonClass;faIconClass=this.modalData.faIconClass;ctaButtonLabel=this.modalData.ctaButtonLabel;ctaButtonLink=this.modalData.ctaButtonLink;dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(){this.$activeModal.close()}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=T({type:t,selectors:[["ng-component"]],decls:20,vars:16,consts:[["role","dialog","aria-modal","true",1,"modal-content"],[1,"modal-header"],["id","confirm-modal-title",1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],[2,"font-size","75px",3,"class"],[1,"mb-0","text-center",3,"innerHTML"],[1,"mt-2","mb-0","text-center",3,"innerHTML"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",3,"class"],[2,"font-size","75px"],["type","button","data-bs-dismiss","modal",3,"click"]],template:function(s,n){s&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),C(3),a(),o(4,"button",3),b(5,"translate"),u("click",function(){return n.dismissModal()}),a()(),o(6,"div",4),d(7,S,1,3,"i",5),m(8,"p",6),d(9,w,1,1,"p",7),d(10,z,1,1,"p",7),a(),o(11,"div",8)(12,"div",9)(13,"button",10),b(14,"translate"),u("click",function(){return n.dismissModal()}),C(15),b(16,"translate"),a()(),m(17,"div",11),o(18,"div",12),d(19,A,2,4,"button",13),a()()()),s&2&&(p("aria-labelledby","confirm-modal-title"),i(3),B(n.title),i(),p("aria-label",_(5,10,"form.button_close")),i(3),c(n.faIconClass?7:-1),i(),f("innerHTML",n.message,r),i(),c(n.message2?9:-1),i(),c(n.message3?10:-1),i(3),p("aria-label",_(14,12,"form.button_cancel")),i(2),M(" ",_(16,14,"form.button_cancel")," "),i(4),c(n.confirmButtonLabel?19:-1))},dependencies:[h],encapsulation:2})}return t})();export{O as a};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{Lb as xt,Nc as Ft,Oc as kt,ec as Dt,fc as Ut,nb as _t,xa as qt}from"./chunk-VX4RXOTH.js";import{e as d,g as Ve,h as Lt}from"./chunk-B4AJQJMI.js";var Ht=d((Fn,zt)=>{zt.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var T=d(P=>{var st,Ke=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];P.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};P.getSymbolTotalCodewords=function(t){return Ke[t]};P.getBCHDigit=function(n){let t=0;for(;n!==0;)t++,n>>>=1;return t};P.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');st=t};P.isKanjiModeEnabled=function(){return typeof st<"u"};P.toSJIS=function(t){return st(t)}});var Q=d(w=>{w.L={bit:1};w.M={bit:0};w.Q={bit:3};w.H={bit:2};function Je(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return w.L;case"m":case"medium":return w.M;case"q":case"quartile":return w.Q;case"h":case"high":return w.H;default:throw new Error("Unknown EC Level: "+n)}}w.isValid=function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4};w.from=function(t,e){if(w.isValid(t))return t;try{return Je(t)}catch{return e}}});var Jt=d((Hn,Kt)=>{function Vt(){this.buffer=[],this.length=0}Vt.prototype={get:function(n){let t=Math.floor(n/8);return(this.buffer[t]>>>7-n%8&1)===1},put:function(n,t){for(let e=0;e<t;e++)this.putBit((n>>>t-e-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(n){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),n&&(this.buffer[t]|=128>>>this.length%8),this.length++}};Kt.exports=Vt});var Yt=d((Vn,Ot)=>{function k(n){if(!n||n<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=n,this.data=new Uint8Array(n*n),this.reservedBit=new Uint8Array(n*n)}k.prototype.set=function(n,t,e,r){let o=n*this.size+t;this.data[o]=e,r&&(this.reservedBit[o]=!0)};k.prototype.get=function(n,t){return this.data[n*this.size+t]};k.prototype.xor=function(n,t,e){this.data[n*this.size+t]^=e};k.prototype.isReserved=function(n,t){return this.reservedBit[n*this.size+t]};Ot.exports=k});var Qt=d(v=>{var Oe=T().getSymbolSize;v.getRowColCoords=function(t){if(t===1)return[];let e=Math.floor(t/7)+2,r=Oe(t),o=r===145?26:Math.ceil((r-13)/(2*e-2))*2,i=[r-7];for(let s=1;s<e-1;s++)i[s]=i[s-1]-o;return i.push(6),i.reverse()};v.getPositions=function(t){let e=[],r=v.getRowColCoords(t),o=r.length;for(let i=0;i<o;i++)for(let s=0;s<o;s++)i===0&&s===0||i===0&&s===o-1||i===o-1&&s===0||e.push([r[i],r[s]]);return e}});var Gt=d(jt=>{var Ye=T().getSymbolSize,vt=7;jt.getPositions=function(t){let e=Ye(t);return[[0,0],[e-vt,0],[0,e-vt]]}});var $t=d(g=>{g.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var b={N1:3,N2:3,N3:40,N4:10};g.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7};g.from=function(t){return g.isValid(t)?parseInt(t,10):void 0};g.getPenaltyN1=function(t){let e=t.size,r=0,o=0,i=0,s=null,u=null;for(let c=0;c<e;c++){o=i=0,s=u=null;for(let l=0;l<e;l++){let a=t.get(c,l);a===s?o++:(o>=5&&(r+=b.N1+(o-5)),s=a,o=1),a=t.get(l,c),a===u?i++:(i>=5&&(r+=b.N1+(i-5)),u=a,i=1)}o>=5&&(r+=b.N1+(o-5)),i>=5&&(r+=b.N1+(i-5))}return r};g.getPenaltyN2=function(t){let e=t.size,r=0;for(let o=0;o<e-1;o++)for(let i=0;i<e-1;i++){let s=t.get(o,i)+t.get(o,i+1)+t.get(o+1,i)+t.get(o+1,i+1);(s===4||s===0)&&r++}return r*b.N2};g.getPenaltyN3=function(t){let e=t.size,r=0,o=0,i=0;for(let s=0;s<e;s++){o=i=0;for(let u=0;u<e;u++)o=o<<1&2047|t.get(s,u),u>=10&&(o===1488||o===93)&&r++,i=i<<1&2047|t.get(u,s),u>=10&&(i===1488||i===93)&&r++}return r*b.N3};g.getPenaltyN4=function(t){let e=0,r=t.data.length;for(let i=0;i<r;i++)e+=t.data[i];return Math.abs(Math.ceil(e*100/r/5)-10)*b.N4};function Qe(n,t,e){switch(n){case g.Patterns.PATTERN000:return(t+e)%2===0;case g.Patterns.PATTERN001:return t%2===0;case g.Patterns.PATTERN010:return e%3===0;case g.Patterns.PATTERN011:return(t+e)%3===0;case g.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2===0;case g.Patterns.PATTERN101:return t*e%2+t*e%3===0;case g.Patterns.PATTERN110:return(t*e%2+t*e%3)%2===0;case g.Patterns.PATTERN111:return(t*e%3+(t+e)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}g.applyMask=function(t,e){let r=e.size;for(let o=0;o<r;o++)for(let i=0;i<r;i++)e.isReserved(i,o)||e.xor(i,o,Qe(t,i,o))};g.getBestMask=function(t,e){let r=Object.keys(g.Patterns).length,o=0,i=1/0;for(let s=0;s<r;s++){e(s),g.applyMask(s,t);let u=g.getPenaltyN1(t)+g.getPenaltyN2(t)+g.getPenaltyN3(t)+g.getPenaltyN4(t);g.applyMask(s,t),u<i&&(i=u,o=s)}return o}});var ct=d(ut=>{var I=Q(),j=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],G=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];ut.getBlocksCount=function(t,e){switch(e){case I.L:return j[(t-1)*4+0];case I.M:return j[(t-1)*4+1];case I.Q:return j[(t-1)*4+2];case I.H:return j[(t-1)*4+3];default:return}};ut.getTotalCodewordsCount=function(t,e){switch(e){case I.L:return G[(t-1)*4+0];case I.M:return G[(t-1)*4+1];case I.Q:return G[(t-1)*4+2];case I.H:return G[(t-1)*4+3];default:return}}});var Wt=d(W=>{var z=new Uint8Array(512),$=new Uint8Array(256);(function(){let t=1;for(let e=0;e<255;e++)z[e]=t,$[t]=e,t<<=1,t&256&&(t^=285);for(let e=255;e<512;e++)z[e]=z[e-255]})();W.log=function(t){if(t<1)throw new Error("log("+t+")");return $[t]};W.exp=function(t){return z[t]};W.mul=function(t,e){return t===0||e===0?0:z[$[t]+$[e]]}});var Zt=d(H=>{var lt=Wt();H.mul=function(t,e){let r=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)r[o+i]^=lt.mul(t[o],e[i]);return r};H.mod=function(t,e){let r=new Uint8Array(t);for(;r.length-e.length>=0;){let o=r[0];for(let s=0;s<e.length;s++)r[s]^=lt.mul(e[s],o);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r};H.generateECPolynomial=function(t){let e=new Uint8Array([1]);for(let r=0;r<t;r++)e=H.mul(e,new Uint8Array([1,lt.exp(r)]));return e}});var ee=d((jn,te)=>{var Xt=Zt();function at(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}at.prototype.initialize=function(t){this.degree=t,this.genPoly=Xt.generateECPolynomial(this.degree)};at.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");let e=new Uint8Array(t.length+this.degree);e.set(t);let r=Xt.mod(e,this.genPoly),o=this.degree-r.length;if(o>0){let i=new Uint8Array(this.degree);return i.set(r,o),i}return r};te.exports=at});var ft=d(ne=>{ne.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}});var dt=d(B=>{var re="[0-9]+",ve="[A-Z $%*+\\-./:]+",V="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";V=V.replace(/u/g,"\\u");var je="(?:(?![A-Z0-9 $%*+\\-./:]|"+V+`)(?:.|[\r
|
|
2
|
+
]))+`;B.KANJI=new RegExp(V,"g");B.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");B.BYTE=new RegExp(je,"g");B.NUMERIC=new RegExp(re,"g");B.ALPHANUMERIC=new RegExp(ve,"g");var Ge=new RegExp("^"+V+"$"),$e=new RegExp("^"+re+"$"),We=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");B.testKanji=function(t){return Ge.test(t)};B.testNumeric=function(t){return $e.test(t)};B.testAlphanumeric=function(t){return We.test(t)}});var M=d(p=>{var Ze=ft(),gt=dt();p.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};p.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};p.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};p.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};p.MIXED={bit:-1};p.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!Ze.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]};p.getBestModeForData=function(t){return gt.testNumeric(t)?p.NUMERIC:gt.testAlphanumeric(t)?p.ALPHANUMERIC:gt.testKanji(t)?p.KANJI:p.BYTE};p.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")};p.isValid=function(t){return t&&t.bit&&t.ccBits};function Xe(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return p.NUMERIC;case"alphanumeric":return p.ALPHANUMERIC;case"kanji":return p.KANJI;case"byte":return p.BYTE;default:throw new Error("Unknown mode: "+n)}}p.from=function(t,e){if(p.isValid(t))return t;try{return Xe(t)}catch{return e}}});var ce=d(R=>{var Z=T(),tn=ct(),oe=Q(),S=M(),ht=ft(),se=7973,ie=Z.getBCHDigit(se);function en(n,t,e){for(let r=1;r<=40;r++)if(t<=R.getCapacity(r,e,n))return r}function ue(n,t){return S.getCharCountIndicator(n,t)+4}function nn(n,t){let e=0;return n.forEach(function(r){let o=ue(r.mode,t);e+=o+r.getBitsLength()}),e}function rn(n,t){for(let e=1;e<=40;e++)if(nn(n,e)<=R.getCapacity(e,t,S.MIXED))return e}R.from=function(t,e){return ht.isValid(t)?parseInt(t,10):e};R.getCapacity=function(t,e,r){if(!ht.isValid(t))throw new Error("Invalid QR Code version");typeof r>"u"&&(r=S.BYTE);let o=Z.getSymbolTotalCodewords(t),i=tn.getTotalCodewordsCount(t,e),s=(o-i)*8;if(r===S.MIXED)return s;let u=s-ue(r,t);switch(r){case S.NUMERIC:return Math.floor(u/10*3);case S.ALPHANUMERIC:return Math.floor(u/11*2);case S.KANJI:return Math.floor(u/13);case S.BYTE:default:return Math.floor(u/8)}};R.getBestVersionForData=function(t,e){let r,o=oe.from(e,oe.M);if(Array.isArray(t)){if(t.length>1)return rn(t,o);if(t.length===0)return 1;r=t[0]}else r=t;return en(r.mode,r.getLength(),o)};R.getEncodedBits=function(t){if(!ht.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;Z.getBCHDigit(e)-ie>=0;)e^=se<<Z.getBCHDigit(e)-ie;return t<<12|e}});var de=d(fe=>{var pt=T(),ae=1335,on=21522,le=pt.getBCHDigit(ae);fe.getEncodedBits=function(t,e){let r=t.bit<<3|e,o=r<<10;for(;pt.getBCHDigit(o)-le>=0;)o^=ae<<pt.getBCHDigit(o)-le;return(r<<10|o)^on}});var he=d((tr,ge)=>{var sn=M();function _(n){this.mode=sn.NUMERIC,this.data=n.toString()}_.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};_.prototype.getLength=function(){return this.data.length};_.prototype.getBitsLength=function(){return _.getBitsLength(this.data.length)};_.prototype.write=function(t){let e,r,o;for(e=0;e+3<=this.data.length;e+=3)r=this.data.substr(e,3),o=parseInt(r,10),t.put(o,10);let i=this.data.length-e;i>0&&(r=this.data.substr(e),o=parseInt(r,10),t.put(o,i*3+1))};ge.exports=_});var me=d((er,pe)=>{var un=M(),mt=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function x(n){this.mode=un.ALPHANUMERIC,this.data=n}x.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};x.prototype.getLength=function(){return this.data.length};x.prototype.getBitsLength=function(){return x.getBitsLength(this.data.length)};x.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let r=mt.indexOf(this.data[e])*45;r+=mt.indexOf(this.data[e+1]),t.put(r,11)}this.data.length%2&&t.put(mt.indexOf(this.data[e]),6)};pe.exports=x});var ye=d((nr,we)=>{var cn=M();function D(n){this.mode=cn.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}D.getBitsLength=function(t){return t*8};D.prototype.getLength=function(){return this.data.length};D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)};D.prototype.write=function(n){for(let t=0,e=this.data.length;t<e;t++)n.put(this.data[t],8)};we.exports=D});var Ce=d((rr,Ee)=>{var ln=M(),an=T();function U(n){this.mode=ln.KANJI,this.data=n}U.getBitsLength=function(t){return t*13};U.prototype.getLength=function(){return this.data.length};U.prototype.getBitsLength=function(){return U.getBitsLength(this.data.length)};U.prototype.write=function(n){let t;for(t=0;t<this.data.length;t++){let e=an.toSJIS(this.data[t]);if(e>=33088&&e<=40956)e-=33088;else if(e>=57408&&e<=60351)e-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
|
|
3
|
+
Make sure your charset is UTF-8`);e=(e>>>8&255)*192+(e&255),n.put(e,13)}};Ee.exports=U});var Be=d((or,wt)=>{"use strict";var K={single_source_shortest_paths:function(n,t,e){var r={},o={};o[t]=0;var i=K.PriorityQueue.make();i.push(t,0);for(var s,u,c,l,a,m,h,y,A;!i.empty();){s=i.pop(),u=s.value,l=s.cost,a=n[u]||{};for(c in a)a.hasOwnProperty(c)&&(m=a[c],h=l+m,y=o[c],A=typeof o[c]>"u",(A||y>h)&&(o[c]=h,i.push(c,h),r[c]=u))}if(typeof e<"u"&&typeof o[e]>"u"){var N=["Could not find a path from ",t," to ",e,"."].join("");throw new Error(N)}return r},extract_shortest_path_from_predecessor_list:function(n,t){for(var e=[],r=t,o;r;)e.push(r),o=n[r],r=n[r];return e.reverse(),e},find_path:function(n,t,e){var r=K.single_source_shortest_paths(n,t,e);return K.extract_shortest_path_from_predecessor_list(r,e)},PriorityQueue:{make:function(n){var t=K.PriorityQueue,e={},r;n=n||{};for(r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e.queue=[],e.sorter=n.sorter||t.default_sorter,e},default_sorter:function(n,t){return n.cost-t.cost},push:function(n,t){var e={value:n,cost:t};this.queue.push(e),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof wt<"u"&&(wt.exports=K)});var be=d(F=>{var f=M(),Te=he(),Ie=me(),Me=ye(),Se=Ce(),J=dt(),X=T(),fn=Be();function Ae(n){return unescape(encodeURIComponent(n)).length}function O(n,t,e){let r=[],o;for(;(o=n.exec(e))!==null;)r.push({data:o[0],index:o.index,mode:t,length:o[0].length});return r}function Pe(n){let t=O(J.NUMERIC,f.NUMERIC,n),e=O(J.ALPHANUMERIC,f.ALPHANUMERIC,n),r,o;return X.isKanjiModeEnabled()?(r=O(J.BYTE,f.BYTE,n),o=O(J.KANJI,f.KANJI,n)):(r=O(J.BYTE_KANJI,f.BYTE,n),o=[]),t.concat(e,r,o).sort(function(s,u){return s.index-u.index}).map(function(s){return{data:s.data,mode:s.mode,length:s.length}})}function yt(n,t){switch(t){case f.NUMERIC:return Te.getBitsLength(n);case f.ALPHANUMERIC:return Ie.getBitsLength(n);case f.KANJI:return Se.getBitsLength(n);case f.BYTE:return Me.getBitsLength(n)}}function dn(n){return n.reduce(function(t,e){let r=t.length-1>=0?t[t.length-1]:null;return r&&r.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}function gn(n){let t=[];for(let e=0;e<n.length;e++){let r=n[e];switch(r.mode){case f.NUMERIC:t.push([r,{data:r.data,mode:f.ALPHANUMERIC,length:r.length},{data:r.data,mode:f.BYTE,length:r.length}]);break;case f.ALPHANUMERIC:t.push([r,{data:r.data,mode:f.BYTE,length:r.length}]);break;case f.KANJI:t.push([r,{data:r.data,mode:f.BYTE,length:Ae(r.data)}]);break;case f.BYTE:t.push([{data:r.data,mode:f.BYTE,length:Ae(r.data)}])}}return t}function hn(n,t){let e={},r={start:{}},o=["start"];for(let i=0;i<n.length;i++){let s=n[i],u=[];for(let c=0;c<s.length;c++){let l=s[c],a=""+i+c;u.push(a),e[a]={node:l,lastCount:0},r[a]={};for(let m=0;m<o.length;m++){let h=o[m];e[h]&&e[h].node.mode===l.mode?(r[h][a]=yt(e[h].lastCount+l.length,l.mode)-yt(e[h].lastCount,l.mode),e[h].lastCount+=l.length):(e[h]&&(e[h].lastCount=l.length),r[h][a]=yt(l.length,l.mode)+4+f.getCharCountIndicator(l.mode,t))}}o=u}for(let i=0;i<o.length;i++)r[o[i]].end=0;return{map:r,table:e}}function Ne(n,t){let e,r=f.getBestModeForData(n);if(e=f.from(t,r),e!==f.BYTE&&e.bit<r.bit)throw new Error('"'+n+'" cannot be encoded with mode '+f.toString(e)+`.
|
|
4
|
+
Suggested mode is: `+f.toString(r));switch(e===f.KANJI&&!X.isKanjiModeEnabled()&&(e=f.BYTE),e){case f.NUMERIC:return new Te(n);case f.ALPHANUMERIC:return new Ie(n);case f.KANJI:return new Se(n);case f.BYTE:return new Me(n)}}F.fromArray=function(t){return t.reduce(function(e,r){return typeof r=="string"?e.push(Ne(r,null)):r.data&&e.push(Ne(r.data,r.mode)),e},[])};F.fromString=function(t,e){let r=Pe(t,X.isKanjiModeEnabled()),o=gn(r),i=hn(o,e),s=fn.find_path(i.map,"start","end"),u=[];for(let c=1;c<s.length-1;c++)u.push(i.table[s[c]].node);return F.fromArray(dn(u))};F.rawSplit=function(t){return F.fromArray(Pe(t,X.isKanjiModeEnabled()))}});var Le=d(Re=>{var et=T(),Et=Q(),pn=Jt(),mn=Yt(),wn=Qt(),yn=Gt(),At=$t(),Nt=ct(),En=ee(),tt=ce(),Cn=de(),Bn=M(),Ct=be();function An(n,t){let e=n.size,r=yn.getPositions(t);for(let o=0;o<r.length;o++){let i=r[o][0],s=r[o][1];for(let u=-1;u<=7;u++)if(!(i+u<=-1||e<=i+u))for(let c=-1;c<=7;c++)s+c<=-1||e<=s+c||(u>=0&&u<=6&&(c===0||c===6)||c>=0&&c<=6&&(u===0||u===6)||u>=2&&u<=4&&c>=2&&c<=4?n.set(i+u,s+c,!0,!0):n.set(i+u,s+c,!1,!0))}}function Nn(n){let t=n.size;for(let e=8;e<t-8;e++){let r=e%2===0;n.set(e,6,r,!0),n.set(6,e,r,!0)}}function Tn(n,t){let e=wn.getPositions(t);for(let r=0;r<e.length;r++){let o=e[r][0],i=e[r][1];for(let s=-2;s<=2;s++)for(let u=-2;u<=2;u++)s===-2||s===2||u===-2||u===2||s===0&&u===0?n.set(o+s,i+u,!0,!0):n.set(o+s,i+u,!1,!0)}}function In(n,t){let e=n.size,r=tt.getEncodedBits(t),o,i,s;for(let u=0;u<18;u++)o=Math.floor(u/3),i=u%3+e-8-3,s=(r>>u&1)===1,n.set(o,i,s,!0),n.set(i,o,s,!0)}function Bt(n,t,e){let r=n.size,o=Cn.getEncodedBits(t,e),i,s;for(i=0;i<15;i++)s=(o>>i&1)===1,i<6?n.set(i,8,s,!0):i<8?n.set(i+1,8,s,!0):n.set(r-15+i,8,s,!0),i<8?n.set(8,r-i-1,s,!0):i<9?n.set(8,15-i-1+1,s,!0):n.set(8,15-i-1,s,!0);n.set(r-8,8,1,!0)}function Mn(n,t){let e=n.size,r=-1,o=e-1,i=7,s=0;for(let u=e-1;u>0;u-=2)for(u===6&&u--;;){for(let c=0;c<2;c++)if(!n.isReserved(o,u-c)){let l=!1;s<t.length&&(l=(t[s]>>>i&1)===1),n.set(o,u-c,l),i--,i===-1&&(s++,i=7)}if(o+=r,o<0||e<=o){o-=r,r=-r;break}}}function Sn(n,t,e){let r=new pn;e.forEach(function(c){r.put(c.mode.bit,4),r.put(c.getLength(),Bn.getCharCountIndicator(c.mode,n)),c.write(r)});let o=et.getSymbolTotalCodewords(n),i=Nt.getTotalCodewordsCount(n,t),s=(o-i)*8;for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);let u=(s-r.getLengthInBits())/8;for(let c=0;c<u;c++)r.put(c%2?17:236,8);return Pn(r,n,t)}function Pn(n,t,e){let r=et.getSymbolTotalCodewords(t),o=Nt.getTotalCodewordsCount(t,e),i=r-o,s=Nt.getBlocksCount(t,e),u=r%s,c=s-u,l=Math.floor(r/s),a=Math.floor(i/s),m=a+1,h=l-a,y=new En(h),A=0,N=new Array(s),bt=new Array(s),rt=0,He=new Uint8Array(n.buffer);for(let q=0;q<s;q++){let it=q<c?a:m;N[q]=He.slice(A,A+it),bt[q]=y.encode(N[q]),A+=it,rt=Math.max(rt,it)}let ot=new Uint8Array(r),Rt=0,E,C;for(E=0;E<rt;E++)for(C=0;C<s;C++)E<N[C].length&&(ot[Rt++]=N[C][E]);for(E=0;E<h;E++)for(C=0;C<s;C++)ot[Rt++]=bt[C][E];return ot}function bn(n,t,e,r){let o;if(Array.isArray(n))o=Ct.fromArray(n);else if(typeof n=="string"){let l=t;if(!l){let a=Ct.rawSplit(n);l=tt.getBestVersionForData(a,e)}o=Ct.fromString(n,l||40)}else throw new Error("Invalid data");let i=tt.getBestVersionForData(o,e);if(!i)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=i;else if(t<i)throw new Error(`
|
|
5
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
6
|
+
Minimum version required to store current data is: `+i+`.
|
|
7
|
+
`);let s=Sn(t,e,o),u=et.getSymbolSize(t),c=new mn(u);return An(c,t),Nn(c),Tn(c,t),Bt(c,e,0),t>=7&&In(c,t),Mn(c,s),isNaN(r)&&(r=At.getBestMask(c,Bt.bind(null,c,e))),At.applyMask(r,c),Bt(c,e,r),{modules:c,version:t,errorCorrectionLevel:e,maskPattern:r,segments:o}}Re.create=function(t,e){if(typeof t>"u"||t==="")throw new Error("No input text");let r=Et.M,o,i;return typeof e<"u"&&(r=Et.from(e.errorCorrectionLevel,Et.M),o=tt.from(e.version),i=At.from(e.maskPattern),e.toSJISFunc&&et.setToSJISFunction(e.toSJISFunc)),bn(t,o,r,i)}});var Tt=d(L=>{function qe(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let t=n.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8)throw new Error("Invalid hex color: "+n);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(r){return[r,r]}))),t.length===6&&t.push("F","F");let e=parseInt(t.join(""),16);return{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:e&255,hex:"#"+t.slice(0,6).join("")}}L.getOptions=function(t){t||(t={}),t.color||(t.color={});let e=typeof t.margin>"u"||t.margin===null||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:qe(t.color.dark||"#000000ff"),light:qe(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}};L.getScale=function(t,e){return e.width&&e.width>=t+e.margin*2?e.width/(t+e.margin*2):e.scale};L.getImageWidth=function(t,e){let r=L.getScale(t,e);return Math.floor((t+e.margin*2)*r)};L.qrToImageData=function(t,e,r){let o=e.modules.size,i=e.modules.data,s=L.getScale(o,r),u=Math.floor((o+r.margin*2)*s),c=r.margin*s,l=[r.color.light,r.color.dark];for(let a=0;a<u;a++)for(let m=0;m<u;m++){let h=(a*u+m)*4,y=r.color.light;if(a>=c&&m>=c&&a<u-c&&m<u-c){let A=Math.floor((a-c)/s),N=Math.floor((m-c)/s);y=l[i[A*o+N]?1:0]}t[h++]=y.r,t[h++]=y.g,t[h++]=y.b,t[h]=y.a}}});var _e=d(nt=>{var It=Tt();function Rn(n,t,e){n.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=e,t.width=e,t.style.height=e+"px",t.style.width=e+"px"}function Ln(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}nt.render=function(t,e,r){let o=r,i=e;typeof o>"u"&&(!e||!e.getContext)&&(o=e,e=void 0),e||(i=Ln()),o=It.getOptions(o);let s=It.getImageWidth(t.modules.size,o),u=i.getContext("2d"),c=u.createImageData(s,s);return It.qrToImageData(c.data,t,o),Rn(u,i,s),u.putImageData(c,0,0),i};nt.renderToDataURL=function(t,e,r){let o=r;typeof o>"u"&&(!e||!e.getContext)&&(o=e,e=void 0),o||(o={});let i=nt.render(t,e,o),s=o.type||"image/png",u=o.rendererOpts||{};return i.toDataURL(s,u.quality)}});var Ue=d(De=>{var qn=Tt();function xe(n,t){let e=n.a/255,r=t+'="'+n.hex+'"';return e<1?r+" "+t+'-opacity="'+e.toFixed(2).slice(1)+'"':r}function Mt(n,t,e){let r=n+t;return typeof e<"u"&&(r+=" "+e),r}function _n(n,t,e){let r="",o=0,i=!1,s=0;for(let u=0;u<n.length;u++){let c=Math.floor(u%t),l=Math.floor(u/t);!c&&!i&&(i=!0),n[u]?(s++,u>0&&c>0&&n[u-1]||(r+=i?Mt("M",c+e,.5+l+e):Mt("m",o,0),o=0,i=!1),c+1<t&&n[u+1]||(r+=Mt("h",s),s=0)):o++}return r}De.render=function(t,e,r){let o=qn.getOptions(e),i=t.modules.size,s=t.modules.data,u=i+o.margin*2,c=o.color.light.a?"<path "+xe(o.color.light,"fill")+' d="M0 0h'+u+"v"+u+'H0z"/>':"",l="<path "+xe(o.color.dark,"stroke")+' d="'+_n(s,i,o.margin)+'"/>',a='viewBox="0 0 '+u+" "+u+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+a+' shape-rendering="crispEdges">'+c+l+`</svg>
|
|
8
|
+
`;return typeof r=="function"&&r(null,h),h}});var ke=d(Y=>{var xn=Ht(),St=Le(),Fe=_e(),Dn=Ue();function Pt(n,t,e,r,o){let i=[].slice.call(arguments,1),s=i.length,u=typeof i[s-1]=="function";if(!u&&!xn())throw new Error("Callback required as last argument");if(u){if(s<2)throw new Error("Too few arguments provided");s===2?(o=e,e=t,t=r=void 0):s===3&&(t.getContext&&typeof o>"u"?(o=r,r=void 0):(o=r,r=e,e=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(e=t,t=r=void 0):s===2&&!t.getContext&&(r=e,e=t,t=void 0),new Promise(function(c,l){try{let a=St.create(e,r);c(n(a,t,r))}catch(a){l(a)}})}try{let c=St.create(e,r);o(null,n(c,t,r))}catch(c){o(c)}}Y.create=St.create;Y.toCanvas=Pt.bind(null,Fe.render);Y.toDataURL=Pt.bind(null,Fe.renderToDataURL);Y.toString=Pt.bind(null,function(n,t,e){return Dn.render(n,e)})});var ze=Ve(ke(),1);var Un=["qrcode"],hr=(()=>{class n{data=Ft.required();qrcodeElement=kt("qrcode");ngOnChanges(){this.renderQrCode()}renderQrCode(){return Lt(this,null,function*(){if(this.data()){let e=this.qrcodeElement();e.nativeElement.innerHTML=yield(0,ze.toString)(this.data(),{type:"svg",margin:0,color:{light:"#ffffff00",dark:document.body.classList.contains("dark-mode")?"#FFF":"#000"}}),e.nativeElement.querySelector("svg").querySelector("path").classList.add("qr-code-theme-color")}})}static \u0275fac=function(r){return new(r||n)};static \u0275cmp=_t({type:n,selectors:[["app-qrcode"]],viewQuery:function(r,o){r&1&&Dt(o.qrcodeElement,Un,5),r&2&&Ut()},inputs:{data:[1,"data"]},features:[qt],decls:2,vars:0,consts:[["qrcode",""],[2,"width","100%","height","100%"]],template:function(r,o){r&1&&xt(0,"div",1,0)},encapsulation:2})}return n})();export{hr as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as b}from"./chunk-
|
|
1
|
+
import{e as b}from"./chunk-B4AJQJMI.js";var L=b((p,v)=>{(function(d,r){typeof define=="function"&&define.amd?define([],r):typeof p<"u"?r():(r(),d.FileSaver={})})(p,function(){"use strict";function d(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function r(e,t,i){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){l(n.response,t,i)},n.onerror=function(){console.error("could not download file")},n.send()}function w(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,m=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(e,t,i){var n=a.URL||a.webkitURL,o=document.createElement("a");t=t||e.name||"download",o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin===location.origin?s(o):w(o.href)?r(e,t,i):s(o,o.target="_blank")):(o.href=n.createObjectURL(e),setTimeout(function(){n.revokeObjectURL(o.href)},4e4),setTimeout(function(){s(o)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(d(e,i),t);else if(w(e))r(e,t,i);else{var n=document.createElement("a");n.href=e,n.target="_blank",setTimeout(function(){s(n)})}}:function(e,t,i,n){if(n=n||open("","_blank"),n&&(n.document.title=n.document.body.innerText="downloading..."),typeof e=="string")return r(e,t,i);var o=e.type==="application/octet-stream",E=/constructor/i.test(a.HTMLElement)||a.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||o&&E||m)&&typeof FileReader<"u"){var u=new FileReader;u.onloadend=function(){var c=u.result;c=y?c:c.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=c:location=c,n=null},u.readAsDataURL(e)}else{var h=a.URL||a.webkitURL,f=h.createObjectURL(e);n?n.location=f:location.href=f,n=null,setTimeout(function(){h.revokeObjectURL(f)},4e4)}});a.saveAs=l.saveAs=l,typeof v<"u"&&(v.exports=l)})});export{L as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-F4XK3SMH.js";import"./chunk-B4AJQJMI.js";export default a();
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as nt}from"./chunk-ZUXW4PNF.js";import"./chunk-BMOLDRJ3.js";import{a as E}from"./chunk-GVEBFYKG.js";import{a as ct}from"./chunk-H7F7H5MW.js";import{a as L}from"./chunk-MIE7YXOK.js";import"./chunk-37PRZWAE.js";import{n as ot,t as it}from"./chunk-VILWJRZL.js";import"./chunk-ZGIZ2UDW.js";import{b as R}from"./chunk-VDDMHLOW.js";import{D as et,c as W,e as J,f as K,g as U,j as X,m as Y,r as Z,s as tt}from"./chunk-537Z3TZH.js";import{b as H}from"./chunk-S6WYT7FX.js";import{C as z,D as A,F as G,I as Q}from"./chunk-MISBXZWW.js";import{Ab as x,Dc as a,Ec as s,Fb as f,Gb as p,Hb as c,Ib as d,Oc as T,Rb as v,Xb as h,Ya as I,Za as r,Zb as m,aa as l,d as k,ea as F,ec as $,fc as q,ga as u,ha as g,ic as B,jc as D,kc as O,lc as P,mb as S,nb as j,sa as y,uc as N,yb as b,zb as w}from"./chunk-VX4RXOTH.js";import{g as lt,h as C}from"./chunk-B4AJQJMI.js";var M=lt(ct(),1);var pt=["logoutput"],mt=["searchInput"];function dt(i,V){if(i&1){let e=v();p(0,"div",5)(1,"button",9),a(2,"translate"),a(3,"translate"),h("click",function(){u(e);let t=m();return g(t.showSearch())}),d(4,"i"),c(),p(5,"button",9),a(6,"translate"),a(7,"translate"),h("click",function(){u(e);let t=m();return g(t.downloadLogFile())}),d(8,"i",10),c(),p(9,"button",11),a(10,"translate"),a(11,"translate"),h("click",function(){u(e);let t=m();return g(t.truncateLogFile())}),d(12,"i",12),c()()}if(i&2){let e=m();r(),f("openDelay",150)("ngbTooltip",s(2,12,"form.search")),b("aria-label",s(3,14,"form.search")),r(3),D(N("fas",e.showSearchBar()?" primary-text":""," fa-search")),r(),f("openDelay",150)("ngbTooltip",s(6,16,"form.button_download")),b("aria-label",s(7,18,"form.button_download")),r(4),f("openDelay",150)("ngbTooltip",s(10,20,"form.button_delete")),b("aria-label",s(11,22,"form.button_delete"))}}function ht(i,V){if(i&1){let e=v();p(0,"button",17),a(1,"translate"),h("click",function(){u(e);let t=m(2);return g(t.onClearSearch())}),d(2,"i",18),c()}i&2&&b("aria-label",s(1,1,"form.button_clear"))}function ut(i,V){if(i&1){let e=v();p(0,"div",6)(1,"div",13)(2,"form",14),h("ngSubmit",function(){u(e);let t=m();return g(t.onSubmit(t.form.value))}),d(3,"input",15,1),a(5,"translate"),w(6,ht,3,3,"button",16),c()()()}if(i&2){let e,o=m();r(2),f("formGroup",o.form),r(),B("is-invalid",o.searchInputInvalid),f("placeholder",s(5,5,"logs.placeholder_search_logs")),r(3),x((e=o.form.get("query"))!=null&&e.value?6:-1)}}var kt=(()=>{class i{injector=l(F);$api=l(Q);$auth=l(R);$log=l(nt);$modal=l(ot);$settings=l(H);$toastr=l(G);$translate=l(z);termTarget=T("logoutput");searchInput=T("searchInput");resizeEvent=new k;valueChangesSubscription;isAdmin=this.$auth.user.admin;showSearchBar=y(!1);showExitButton=y(!1);form=new U({query:new X("")});get searchInputInvalid(){let e=(this.form.get("query")?.value||"").trim();return e.length>0&&e.length<3}onWindowResize(){this.resizeEvent.next(void 0)}ngOnInit(){let e=this.$translate.instant("menu.linux.label_logs");this.$settings.setPageTitle(e),window.document.querySelector("body").classList.add("bg-black"),this.$log.startTerminal(this.termTarget(),{allowProposedApi:!0},this.resizeEvent),this.valueChangesSubscription=this.form.get("query")?.valueChanges.subscribe(o=>{let t=o||"",n=t.trim();n!==t&&this.form.get("query")?.setValue(n,{emitEvent:!1}),this.showExitButton()&&n.length<3&&(this.showExitButton.set(!1),this.$log.clearSearchFilter(),this.$log.scrollToBottom())})}showSearch(){if(this.showSearchBar())this.showSearchBar.set(!1),this.showExitButton.set(!1),this.form.setValue({query:""}),this.$log.clearSearchFilter(),this.$log.scrollToBottom();else{this.showSearchBar.set(!0);let e=this.searchInput();e&&setTimeout(()=>e.nativeElement.focus(),0)}}onSubmit(e){let o=(e.query||"").trim();!o.length||o.length<3?(o.length||this.showSearchBar.set(!1),this.form.setValue({query:""}),this.showExitButton.set(!1),this.$log.clearSearchFilter(),this.$log.scrollToBottom()):(this.showExitButton.set(!0),this.$log.setSearchFilter(o),this.$log.scrollToBottom())}onClearSearch(){this.form.setValue({query:""}),this.showExitButton.set(!1),this.$log.clearSearchFilter(),this.$log.scrollToBottom()}ngOnDestroy(){window.document.querySelector("body").classList.remove("bg-black"),this.valueChangesSubscription&&this.valueChangesSubscription.unsubscribe(),this.resizeEvent.complete(),this.$log.destroyTerminal()}downloadLogFile(){return C(this,null,function*(){let e=S([{provide:L,useValue:{title:this.$translate.instant("logs.title_download_log_file"),message:this.$translate.instant("logs.download_warning"),confirmButtonLabel:this.$translate.instant("form.button_download"),faIconClass:"fas fa-user-secret primary-text"}}],this.injector),o=this.$modal.open(E,{size:"lg",backdrop:"static",injector:e});try{yield o.result;try{let t=yield this.$api.get("/platform-tools/hb-service/log/download",{observe:"response",responseType:"blob"}),n=this.$log.getSearchFilter();if(n){let rt=(yield t.body.text()).split(`
|
|
2
|
+
`).filter(st=>st.replace(/\x1b\[[0-9;]*m/g,"").toLowerCase().includes(n.toLowerCase())),at=new Blob([rt.join(`
|
|
3
|
+
`)],{type:"text/plain"});(0,M.saveAs)(at,"homebridge.log.txt")}else(0,M.saveAs)(t.body,"homebridge.log.txt")}catch(t){let n;try{if(t&&typeof t=="object"&&"error"in t){let _=yield t.error.text();n=JSON.parse(_).message}}catch(_){console.error(_)}this.$toastr.error(n||this.$translate.instant("logs.download.error"),this.$translate.instant("toast.title_error"))}}catch{}})}truncateLogFile(){return C(this,null,function*(){let e=S([{provide:L,useValue:{title:this.$translate.instant("logs.title_truncate_log_file"),message:this.$translate.instant("logs.truncate_log_warning"),confirmButtonLabel:this.$translate.instant("form.button_delete"),confirmButtonClass:"btn-danger",faIconClass:"fas fa-circle-exclamation primary-text"}}],this.injector),o=this.$modal.open(E,{size:"lg",backdrop:"static",injector:e});try{yield o.result;try{yield this.$api.put("/platform-tools/hb-service/log/truncate",{}),this.$toastr.success(this.$translate.instant("logs.log_file_truncated"),this.$translate.instant("toast.title_success")),this.$log.term.clear()}catch(t){console.error(t);let n=t&&typeof t=="object"&&"error"in t&&t.error&&typeof t.error=="object"&&"message"in t.error?String(t.error.message):this.$translate.instant("logs.truncate.error");this.$toastr.error(n,this.$translate.instant("toast.title_error"))}}catch{}})}static \u0275fac=function(o){return new(o||i)};static \u0275cmp=j({type:i,selectors:[["ng-component"]],viewQuery:function(o,t){o&1&&($(t.termTarget,pt,5),$(t.searchInput,mt,5)),o&2&&q(2)},hostBindings:function(o,t){o&1&&h("resize",function(){return t.onWindowResize()},I)},decls:10,vars:9,consts:[["logoutput",""],["searchInput",""],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],[1,"row"],[1,"flex-column","d-flex","align-items-stretch"],["id","log-output",1,"align-self-end","w-100","h-100","mb-1"],["container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","openDelay","ngbTooltip"],[1,"fas","fa-download"],["container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","my-0","me-0",3,"click","openDelay","ngbTooltip"],[1,"fas","fa-trash-alt"],[1,"col-md-12"],["novalidate","",3,"ngSubmit","formGroup"],["type","text","formControlName","query",1,"search-bar",3,"placeholder"],["type","button",1,"search-bar-clear"],["type","button",1,"search-bar-clear",3,"click"],["aria-hidden","true",1,"fas","fa-square-xmark"]],template:function(o,t){o&1&&(p(0,"div",2)(1,"div",3)(2,"h3",4),O(3),a(4,"translate"),c()(),w(5,dt,13,24,"div",5),c(),w(6,ut,7,7,"div",6),p(7,"div",7),d(8,"div",8,0),c()),o&2&&(r(3),P(s(4,7,"menu.linux.label_logs")),r(2),x(t.isAdmin?5:-1),r(),x(t.showSearchBar()?6:-1),r(),B("adjust-for-mobile",!t.showSearchBar())("adjust-for-mobile-with-search",t.showSearchBar()))},dependencies:[it,et,Y,W,J,K,tt,Z,A],styles:["form[_ngcontent-%COMP%]{position:relative}.search-bar[_ngcontent-%COMP%]{outline:none;box-sizing:inherit!important;background-color:inherit;height:50px!important;width:100%;border-width:.5px;padding:10px 45px 10px 10px;margin-bottom:15px}@media(hover:hover){.search-bar[_ngcontent-%COMP%]:hover{border:1px solid #000000}}.search-bar[_ngcontent-%COMP%]:focus{border:1px solid #000000;box-shadow:0 1px #000}.search-bar.is-invalid[_ngcontent-%COMP%]{border:1px solid #d32f2f!important;box-shadow:0 1px #d32f2f!important}@media(hover:hover){.search-bar.is-invalid[_ngcontent-%COMP%]:hover{border:1px solid #d32f2f!important;box-shadow:0 1px #d32f2f!important}}.search-bar.is-invalid[_ngcontent-%COMP%]:focus{border:1px solid #d32f2f!important;box-shadow:0 1px #d32f2f!important}.search-bar-clear[_ngcontent-%COMP%]{position:absolute;right:8px;top:25px;height:50px;background:transparent;border:none;font-size:20px;color:#d0d0d0;cursor:pointer;padding:0 8px;display:flex;align-items:center}.search-bar-clear[_ngcontent-%COMP%]:hover{color:#a0a0a0}.adjust-for-mobile-with-search[_ngcontent-%COMP%]{height:calc(100% - 95px);width:calc(100% + 17px);overflow:hidden}@media(max-width:767px){.adjust-for-mobile-with-search[_ngcontent-%COMP%]{height:calc(100% - 125px)}}"]})}return i})();export{kt as LogsComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-TQ2YXTGY.js";import"./chunk-B4AJQJMI.js";export default a();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as D,c as S,d as H}from"./chunk-J2O4Y2AJ.js";import{b as B}from"./chunk-MIE7YXOK.js";import{m as L}from"./chunk-VILWJRZL.js";import{D as T}from"./chunk-MISBXZWW.js";import{Ab as l,Dc as g,Ec as _,Fb as p,Gb as i,Hb as a,Ib as m,Rb as P,Ua as C,Va as k,Xb as b,Za as o,Zb as d,aa as h,ga as x,ha as O,jc as y,kc as u,lc as I,mc as M,nb as v,uc as w,yb as f,zb as r}from"./chunk-VX4RXOTH.js";function E(t,c){if(t&1&&m(0,"i",16),t&2){let n=d();y(w("fas ",n.faIconClass," mb-3"))}}function z(t,c){if(t&1&&m(0,"h5",6),t&2){let n=d();p("innerHTML",n.subtitle,C)}}function A(t,c){if(t&1&&m(0,"p",8),t&2){let n=d();p("innerHTML",n.message2,C)}}function V(t,c){if(t&1&&m(0,"markdown",9),t&2){let n=d();p("data",n.markdownMessage2)}}function N(t,c){if(t&1){let n=P();i(0,"button",17),g(1,"translate"),b("click",function(){x(n);let e=d();return O(e.dismissModal())}),u(2),g(3,"translate"),a()}t&2&&(f("aria-label",_(1,2,"form.button_close")),o(2),M(" ",_(3,4,"form.button_close")," "))}function F(t,c){if(t&1){let n=P();i(0,"button",17),g(1,"translate"),b("click",function(){x(n);let e=d();return O(e.dismissModal())}),u(2),g(3,"translate"),a()}t&2&&(f("aria-label",_(1,2,"form.button_close")),o(2),M(" ",_(3,4,"form.button_close")," "))}function j(t,c){if(t&1&&(i(0,"a",15),u(1),m(2,"i",18),a()),t&2){let n=d();p("href",n.ctaButtonLink,k),o(),M(" ",n.ctaButtonLabel," ")}}var Y=(()=>{class t{$activeModal=h(L);modalData=h(B);title=this.modalData.title;subtitle=this.modalData.subtitle;message=this.modalData.message;message2=this.modalData.markdownMessage2;ctaButtonLabel=this.modalData.ctaButtonLabel;ctaButtonLink=this.modalData.ctaButtonLink;faIconClass=this.modalData.faIconClass;markdownMessage2=this.modalData.markdownMessage2;dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=v({type:t,selectors:[["ng-component"]],decls:19,vars:13,consts:[["role","dialog","aria-modal","true",1,"modal-content"],[1,"modal-header"],["id","information-modal-title",1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],[2,"font-size","75px",3,"class"],[1,"mb-3",3,"innerHTML"],[1,"mb-0",3,"innerHTML"],[1,"mb-0","mt-3",3,"innerHTML"],[1,"plugin-md",3,"data"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","text-decoration-none",3,"href"],[2,"font-size","75px"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"fas","fa-external-link-alt"]],template:function(s,e){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),u(3),a(),i(4,"button",3),g(5,"translate"),b("click",function(){return e.dismissModal()}),a()(),i(6,"div",4),r(7,E,1,3,"i",5),r(8,z,1,1,"h5",6),m(9,"p",7),r(10,A,1,1,"p",8),r(11,V,1,1,"markdown",9),a(),i(12,"div",10)(13,"div",11),r(14,N,4,6,"button",12),a(),i(15,"div",13),r(16,F,4,6,"button",12),a(),i(17,"div",14),r(18,j,3,2,"a",15),a()()()),s&2&&(f("aria-labelledby","information-modal-title"),o(3),I(e.title),o(),f("aria-label",_(5,11,"form.button_close")),o(3),l(e.faIconClass?7:-1),o(),l(e.subtitle?8:-1),o(),p("innerHTML",e.message,C),o(),l(e.message2?10:-1),o(),l(e.markdownMessage2?11:-1),o(3),l(e.ctaButtonLink?14:-1),o(2),l(e.ctaButtonLink?-1:16),o(2),l(e.ctaButtonLink?18:-1))},dependencies:[S,D,H,T],styles:["[_nghost-%COMP%] .plugin-md{display:block!important;background-color:#f6f8fa!important;border-radius:6px!important;padding:16px!important;margin:16px auto!important;width:100%!important;max-width:632px!important}[_nghost-%COMP%] .plugin-md table{width:100%;max-width:600px;margin:0 auto!important;border-collapse:collapse;border:1px solid #d0d7de!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif!important;font-size:14px!important;color:#24292e!important}[_nghost-%COMP%] .plugin-md th, [_nghost-%COMP%] .plugin-md td{padding:6px 13px!important;border:1px solid #d0d7de!important;text-align:left;color:#24292e!important}[_nghost-%COMP%] .plugin-md th{background-color:#f6f8fa!important;font-weight:600!important;text-align:center!important}[_nghost-%COMP%] .plugin-md td[align=center]{text-align:center!important}[_nghost-%COMP%] .plugin-md tr{color:#24292e!important}[_nghost-%COMP%] .plugin-md tr:nth-child(odd){background-color:#fff!important}[_nghost-%COMP%] .plugin-md tr:nth-child(2n){background-color:#f6f8fa!important}[_nghost-%COMP%] .plugin-md tr:hover{background-color:#f0f2f5!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%]{background-color:#2b2b2b!important;color:#fff!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] table[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] th[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:#fff!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#3c3c3c!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(odd){background-color:#323232!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#2b2b2b!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#454545!important}"]})}return t})();export{Y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as j}from"./chunk-GVEBFYKG.js";import{a as B}from"./chunk-MIE7YXOK.js";import{n as V,t as H}from"./chunk-VILWJRZL.js";import{e as R}from"./chunk-QML5ZVO6.js";import"./chunk-ZGIZ2UDW.js";import"./chunk-537Z3TZH.js";import{b as E}from"./chunk-S6WYT7FX.js";import{C as I,D as O,F as D,I as P}from"./chunk-MISBXZWW.js";import{Ab as v,Dc as l,Ec as c,Fb as y,Gb as s,Hb as o,Ib as S,Rb as h,Xb as m,Za as i,Zb as g,aa as a,ea as C,ga as u,ha as _,kc as p,lc as k,mb as T,mc as d,nb as $,sa as w,zb as f}from"./chunk-VX4RXOTH.js";import{h as b}from"./chunk-B4AJQJMI.js";function N(e,x){if(e&1){let t=h();s(0,"p",5)(1,"button",6),m("click",function(){u(t);let n=g();return _(n.restartServer())}),p(2),l(3,"translate"),o()()}e&2&&(i(2),d(" ",c(3,1,"menu.linux.label_restart_server")," "))}function A(e,x){if(e&1){let t=h();s(0,"p",5)(1,"button",6),m("click",function(){u(t);let n=g();return _(n.shutdownServer())}),p(2),l(3,"translate"),o()()}e&2&&(i(2),d(" ",c(3,1,"menu.linux.label_shutdown_server")," "))}function z(e,x){if(e&1){let t=h();s(0,"p",5)(1,"button",6),m("click",function(){u(t);let n=g();return _(n.dockerRestartContainer())}),p(2),l(3,"translate"),o()()}e&2&&(i(2),d(" ",c(3,1,"menu.docker.restart_container")," "))}var Z=(()=>{class e{injector=a(C);$api=a(P);$modal=a(V);$router=a(R);$settings=a(E);$toastr=a(D);$translate=a(I);canShutdownRestartHost=w(this.$settings.env.canShutdownRestartHost);runningInDocker=w(this.$settings.env.runningInDocker);ngOnInit(){let t=this.$translate.instant("menu.restart.title");this.$settings.setPageTitle(t)}closeRestartToast(){this.$settings.restartToastRef&&(this.$toastr.clear(this.$settings.restartToastRef.toastId),this.$settings.restartToastRef=null)}restartHomebridge(){this.closeRestartToast(),this.$router.navigate(["/restart"])}restartHomebridgeService(){return b(this,null,function*(){this.closeRestartToast();try{yield this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}),this.$router.navigate(["/restart"])}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}restartServer(){this.closeRestartToast(),this.$router.navigate(["/platform-tools/linux/restart-server"])}shutdownServer(){return b(this,null,function*(){this.closeRestartToast();let t=T([{provide:B,useValue:{title:this.$translate.instant("menu.linux.label_shutdown_server"),message:this.$translate.instant("menu.linux.label_shutdown_modal"),confirmButtonLabel:this.$translate.instant("form.button_continue"),faIconClass:"fa fa-power-off primary-text"}}],this.injector),r=this.$modal.open(j,{size:"lg",backdrop:"static",injector:t});try{yield r.result,this.$router.navigate(["/platform-tools/linux/shutdown-server"])}catch{}})}dockerRestartContainer(){this.closeRestartToast(),this.$router.navigate(["/platform-tools/docker/restart-container"])}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=$({type:e,selectors:[["ng-component"]],decls:19,vars:16,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-power-off",2,"font-size","75px"],[1,"w-100","text-center","my-5"],["type","button",1,"btn","btn-primary","p-3","my-0",2,"width","85%",3,"click"],["type","button","container","body","triggers","hover",1,"btn","btn-primary","p-3","my-0",2,"width","85%",3,"click","openDelay","ngbTooltip"]],template:function(r,n){r&1&&(s(0,"div",0)(1,"h3",1),p(2),l(3,"translate"),o()(),s(4,"div",2)(5,"div",3),S(6,"i",4),o(),s(7,"p",5)(8,"button",6),m("click",function(){return n.restartHomebridge()}),p(9),l(10,"translate"),o()(),s(11,"p",5)(12,"button",7),l(13,"translate"),m("click",function(){return n.restartHomebridgeService()}),p(14),l(15,"translate"),o()(),f(16,N,4,3,"p",5),f(17,A,4,3,"p",5),f(18,z,4,3,"p",5),o()),r&2&&(i(2),k(c(3,8,"menu.restart.title")),i(7),d(" ",c(10,10,"menu.hbrestart.confirm_hb")," "),i(3),y("openDelay",150)("ngbTooltip",c(13,12,"reset.force_restart_hb_help_text")),i(2),d(" ",c(15,14,"menu.hbrestart.confirm_ui")," "),i(2),v(n.canShutdownRestartHost()?16:-1),i(),v(n.canShutdownRestartHost()?17:-1),i(),v(n.runningInDocker()?18:-1))},dependencies:[H,O],encapsulation:2})}return e})();export{Z as PowerOptionsComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-KW5REXT7.js";import"./chunk-B4AJQJMI.js";export default a();
|