homebridge-config-ui-x 5.0.0-beta.67 → 5.0.0-beta.69

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 (85) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/modules/backup/backup.service.d.ts +0 -1
  3. package/dist/modules/backup/backup.service.js +12 -40
  4. package/dist/modules/backup/backup.service.js.map +1 -1
  5. package/dist/modules/plugins/plugins.service.js +0 -6
  6. package/dist/modules/plugins/plugins.service.js.map +1 -1
  7. package/dist/modules/server/server.service.js +6 -26
  8. package/dist/modules/server/server.service.js.map +1 -1
  9. package/package.json +1 -1
  10. package/public/{chunk-VITWCXZU.js → chunk-2QMAJ3PN.js} +1 -1
  11. package/public/{chunk-HKPESAZ3.js → chunk-3GTACTUQ.js} +1 -1
  12. package/public/{chunk-XLQU32V3.js → chunk-3H2NNUVI.js} +1 -1
  13. package/public/chunk-3HAXS3IU.js +1 -0
  14. package/public/chunk-3JPSLKGD.js +1 -0
  15. package/public/{chunk-7KL4UIOK.js → chunk-4SN72CMA.js} +1 -1
  16. package/public/chunk-5USLVPBK.js +1 -0
  17. package/public/{chunk-S763KEEG.js → chunk-67JXNHZU.js} +1 -1
  18. package/public/chunk-73NF6HFY.js +1 -0
  19. package/public/{chunk-LOD3M3TR.js → chunk-7EXP4HZB.js} +1 -1
  20. package/public/{chunk-GJ5W6DLB.js → chunk-ACOWZQSA.js} +1 -1
  21. package/public/{chunk-S6XXF7O6.js → chunk-B2YEAISS.js} +1 -1
  22. package/public/chunk-B34QXHET.js +1 -0
  23. package/public/{chunk-24M7AVE7.js → chunk-BEXZDO4J.js} +1 -1
  24. package/public/{chunk-UQR4E3DH.js → chunk-CMUSONVW.js} +1 -1
  25. package/public/chunk-CXXS65VA.js +1 -0
  26. package/public/{chunk-TLCTTAOK.js → chunk-D7NSANTX.js} +1 -1
  27. package/public/{chunk-PMSHAIRY.js → chunk-DYLDNTCO.js} +1 -1
  28. package/public/{chunk-ISAHOZSK.js → chunk-F4MUW63B.js} +1 -1
  29. package/public/{chunk-QLBMAGMJ.js → chunk-FIOSU7DQ.js} +1 -1
  30. package/public/{chunk-FX3LOQ2X.js → chunk-G5O7CHKI.js} +1 -1
  31. package/public/{chunk-TFPHZBCD.js → chunk-GZJ5IINF.js} +1 -1
  32. package/public/{chunk-ZW4Z4WJU.js → chunk-HGX4YUHS.js} +1 -1
  33. package/public/{chunk-KRFB72MD.js → chunk-IAJDVYYP.js} +1 -1
  34. package/public/{chunk-CAVXS647.js → chunk-IMTSM6HN.js} +1 -1
  35. package/public/chunk-IN4TCNQE.js +1 -0
  36. package/public/{chunk-SPL5HOT6.js → chunk-J2A3PKBA.js} +1 -1
  37. package/public/{chunk-AKGJGDDS.js → chunk-JCKLHHH2.js} +1 -1
  38. package/public/{chunk-QO7GTX4Z.js → chunk-JHAEEOVW.js} +1 -1
  39. package/public/{chunk-KRCHQ6AY.js → chunk-JXU7YRFK.js} +1 -1
  40. package/public/{chunk-5EL7WWT3.js → chunk-K5MAJ5RF.js} +1 -1
  41. package/public/{chunk-CHWU3VHL.js → chunk-KH3V2KYC.js} +1 -1
  42. package/public/chunk-L233K63S.js +1 -0
  43. package/public/{chunk-4ZKMD4ME.js → chunk-L5DJ2UTP.js} +1 -1
  44. package/public/{chunk-GTNB3JK7.js → chunk-LBTHDQJW.js} +1 -1
  45. package/public/chunk-LBWDO3T4.js +1 -0
  46. package/public/chunk-MZQEEJH5.js +1 -0
  47. package/public/{chunk-EQ4N3NPW.js → chunk-N76LUI5K.js} +1 -1
  48. package/public/{chunk-S2G5HYBK.js → chunk-NOMWD75Z.js} +1 -1
  49. package/public/{chunk-MQK5LVL3.js → chunk-NSIKUTVP.js} +16 -16
  50. package/public/{chunk-SX36WPJK.js → chunk-OFBUS5IB.js} +1 -1
  51. package/public/{chunk-J5E53DQW.js → chunk-OUFTHC36.js} +1 -1
  52. package/public/{chunk-MOQDVF5Q.js → chunk-PKS4X3TG.js} +1 -1
  53. package/public/{chunk-IFQCCDUK.js → chunk-POGEGBM3.js} +1 -1
  54. package/public/{chunk-FOQTBAVK.js → chunk-QN4OHVRE.js} +1 -1
  55. package/public/{chunk-KDQ2ADL3.js → chunk-RKJ4CETZ.js} +1 -1
  56. package/public/chunk-RQNFJUYG.js +1 -0
  57. package/public/{chunk-XONFXHFC.js → chunk-S6ZSRVGR.js} +1 -1
  58. package/public/chunk-SPHSTPNY.js +1 -0
  59. package/public/{chunk-7RUBICEC.js → chunk-SRHERU2M.js} +1 -1
  60. package/public/{chunk-IGVHNYOE.js → chunk-TVADH2OL.js} +1 -1
  61. package/public/{chunk-YNK3XXKG.js → chunk-UADGHPWZ.js} +1 -1
  62. package/public/{chunk-DZD4VZFL.js → chunk-UEC3IA3K.js} +1 -1
  63. package/public/{chunk-MZBVICGB.js → chunk-UTHIJK2F.js} +1 -1
  64. package/public/{chunk-4PM5KYQU.js → chunk-V22QF6S6.js} +1 -1
  65. package/public/{chunk-JRZDIXFB.js → chunk-X37KHKZ4.js} +1 -1
  66. package/public/chunk-XB3NIEFE.js +1 -0
  67. package/public/{chunk-ETQUINQG.js → chunk-XLKKNOJ4.js} +1 -1
  68. package/public/chunk-YEJSJ4HZ.js +1 -0
  69. package/public/{chunk-ZCJCTP65.js → chunk-YKDS5Y4S.js} +1 -1
  70. package/public/index.html +1 -1
  71. package/public/{main-RYWFCH5L.js → main-NTAVPHBN.js} +1 -1
  72. package/public/chunk-2W53DZ5S.js +0 -1
  73. package/public/chunk-6S36U76X.js +0 -1
  74. package/public/chunk-F2SENPN6.js +0 -1
  75. package/public/chunk-K3QDGYKJ.js +0 -1
  76. package/public/chunk-KAQKQ3GO.js +0 -1
  77. package/public/chunk-LRL4URCK.js +0 -1
  78. package/public/chunk-OJMVLUTV.js +0 -1
  79. package/public/chunk-Q7B67Y3B.js +0 -1
  80. package/public/chunk-RFDWZYSG.js +0 -1
  81. package/public/chunk-SKZJUTDJ.js +0 -1
  82. package/public/chunk-TXVAZY2S.js +0 -1
  83. package/public/chunk-UX77IZWI.js +0 -1
  84. package/public/chunk-WOS55GRK.js +0 -1
  85. package/public/chunk-YYNVG7LX.js +0 -1
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-LBTHDQJW.js";import"./chunk-4UVD743J.js";import"./chunk-DBUCH6BG.js";import"./chunk-XLKKNOJ4.js";import"./chunk-3GTACTUQ.js";import"./chunk-IMTSM6HN.js";import"./chunk-GDFC3M3E.js";import"./chunk-FETTFNJ2.js";import"./chunk-6ZN4TBLM.js";export{a as LoginComponent};
@@ -1,4 +1,4 @@
1
- import{m as Mu}from"./chunk-W2INV3O5.js";import{d as Hu}from"./chunk-DBUCH6BG.js";import{h as Ru,k as zu}from"./chunk-CAVXS647.js";import{a as Tu,b as Lu}from"./chunk-FETTFNJ2.js";import{Cc as G,Dc as U,Jb as vu,Ub as q,Vb as W,Wb as hu,bc as Au,e as P0,gb as k,ma as Q,mc as tu,nc as gu,oc as bu,tb as $u}from"./chunk-6ZN4TBLM.js";var N0=P0((yu,xu)=>{(function(w,y){typeof yu=="object"&&typeof xu<"u"?xu.exports=y():typeof define=="function"&&define.amd?define(y):w.JSON5=y()})(yu,function(){"use strict";function w(u,D){return D={exports:{}},u(D,D.exports),D.exports}var y=w(function(u){var D=u.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=D)}),x=w(function(u){var D=u.exports={version:"2.6.5"};typeof __e=="number"&&(__e=D)}),X=x.version,S=function(u){return typeof u=="object"?u!==null:typeof u=="function"},Y=function(u){if(!S(u))throw TypeError(u+" is not an object!");return u},wu=function(u){try{return!!u()}catch{return!0}},ou=!wu(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),Eu=y.document,Ju=S(Eu)&&S(Eu.createElement),ku=function(u){return Ju?Eu.createElement(u):{}},qu=!ou&&!wu(function(){return Object.defineProperty(ku("div"),"a",{get:function(){return 7}}).a!=7}),Gu=function(u,D){if(!S(u))return u;var t,r;if(D&&typeof(t=u.toString)=="function"&&!S(r=t.call(u))||typeof(t=u.valueOf)=="function"&&!S(r=t.call(u))||!D&&typeof(t=u.toString)=="function"&&!S(r=t.call(u)))return r;throw TypeError("Can't convert object to primitive value")},Uu=Object.defineProperty,Zu=ou?Object.defineProperty:function(D,t,r){if(Y(D),t=Gu(t,!0),Y(r),qu)try{return Uu(D,t,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(D[t]=r.value),D},Ku={f:Zu},Qu=function(u,D){return{enumerable:!(u&1),configurable:!(u&2),writable:!(u&4),value:D}},uu=ou?function(u,D,t){return Ku.f(u,D,Qu(1,t))}:function(u,D,t){return u[D]=t,u},Wu={}.hasOwnProperty,Su=function(u,D){return Wu.call(u,D)},Xu=0,Yu=Math.random(),u0=function(u){return"Symbol(".concat(u===void 0?"":u,")_",(++Xu+Yu).toString(36))},D0=!1,e0=w(function(u){var D="__core-js_shared__",t=y[D]||(y[D]={});(u.exports=function(r,n){return t[r]||(t[r]=n!==void 0?n:{})})("versions",[]).push({version:x.version,mode:D0?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})}),cu=e0("native-function-to-string",Function.toString),r0=w(function(u){var D=u0("src"),t="toString",r=(""+cu).split(t);x.inspectSource=function(n){return cu.call(n)},(u.exports=function(n,C,o,g){var B=typeof o=="function";B&&(Su(o,"name")||uu(o,"name",C)),n[C]!==o&&(B&&(Su(o,D)||uu(o,D,n[C]?""+n[C]:r.join(String(C)))),n===y?n[C]=o:g?n[C]?n[C]=o:uu(n,C,o):(delete n[C],uu(n,C,o)))})(Function.prototype,t,function(){return typeof this=="function"&&this[D]||cu.call(this)})}),t0=function(u){if(typeof u!="function")throw TypeError(u+" is not a function!");return u},_u=function(u,D,t){if(t0(u),D===void 0)return u;switch(t){case 1:return function(r){return u.call(D,r)};case 2:return function(r,n){return u.call(D,r,n)};case 3:return function(r,n,C){return u.call(D,r,n,C)}}return function(){return u.apply(D,arguments)}},su="prototype",v=function(u,D,t){var r=u&v.F,n=u&v.G,C=u&v.S,o=u&v.P,g=u&v.B,B=n?y:C?y[D]||(y[D]={}):(y[D]||{})[su],H=n?x:x[D]||(x[D]={}),Z=H[su]||(H[su]={}),P,I,b,K;n&&(t=D);for(P in t)I=!r&&B&&B[P]!==void 0,b=(I?B:t)[P],K=g&&I?_u(b,y):o&&typeof b=="function"?_u(Function.call,b):b,B&&r0(B,P,b,u&v.U),H[P]!=b&&uu(H,P,K),o&&Z[P]!=b&&(Z[P]=b)};y.core=x,v.F=1,v.G=2,v.S=4,v.P=8,v.B=16,v.W=32,v.U=64,v.R=128;var Du=v,n0=Math.ceil,i0=Math.floor,Pu=function(u){return isNaN(u=+u)?0:(u>0?i0:n0)(u)},a0=function(u){if(u==null)throw TypeError("Can't call method on "+u);return u},F0=function(u){return function(D,t){var r=String(a0(D)),n=Pu(t),C=r.length,o,g;return n<0||n>=C?u?"":void 0:(o=r.charCodeAt(n),o<55296||o>56319||n+1===C||(g=r.charCodeAt(n+1))<56320||g>57343?u?r.charAt(n):o:u?r.slice(n,n+2):(o-55296<<10)+(g-56320)+65536)}},C0=F0(!1);Du(Du.P,"String",{codePointAt:function(D){return C0(this,D)}});var I0=x.String.codePointAt,A0=Math.max,o0=Math.min,E0=function(u,D){return u=Pu(u),u<0?A0(u+D,0):o0(u,D)},Nu=String.fromCharCode,Iu=String.fromCodePoint;Du(Du.S+Du.F*(!!Iu&&Iu.length!=1),"String",{fromCodePoint:function(D){for(var t=arguments,r=[],n=arguments.length,C=0,o;n>C;){if(o=+t[C++],E0(o,1114111)!==o)throw RangeError(o+" is not a valid code point");r.push(o<65536?Nu(o):Nu(((o-=65536)>>10)+55296,o%1024+56320))}return r.join("")}});var j0=x.String.fromCodePoint,c0=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,s0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9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D80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-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0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u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F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06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\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE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DE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,fu={Space_Separator:c0,ID_Start:s0,ID_Continue:f0},f={isSpaceSeparator:function(D){return typeof D=="string"&&fu.Space_Separator.test(D)},isIdStartChar:function(D){return typeof D=="string"&&(D>="a"&&D<="z"||D>="A"&&D<="Z"||D==="$"||D==="_"||fu.ID_Start.test(D))},isIdContinueChar:function(D){return typeof D=="string"&&(D>="a"&&D<="z"||D>="A"&&D<="Z"||D>="0"&&D<="9"||D==="$"||D==="_"||D==="\u200C"||D==="\u200D"||fu.ID_Continue.test(D))},isDigit:function(D){return typeof D=="string"&&/[0-9]/.test(D)},isHexDigit:function(D){return typeof D=="string"&&/[0-9A-Fa-f]/.test(D)}},Bu,h,j,nu,M,_,l,lu,eu,B0=function(D,t){Bu=String(D),h="start",j=[],nu=0,M=1,_=0,l=void 0,lu=void 0,eu=void 0;do l=l0(),m0[h]();while(l.type!=="eof");return typeof t=="function"?du({"":eu},"",t):eu};function du(u,D,t){var r=u[D];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(var n=0;n<r.length;n++){var C=String(n),o=du(r,C,t);o===void 0?delete r[C]:Object.defineProperty(r,C,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(var g in r){var B=du(r,g,t);B===void 0?delete r[g]:Object.defineProperty(r,g,{value:B,writable:!0,enumerable:!0,configurable:!0})}return t.call(u,D,r)}var F,i,ru,O,A;function l0(){for(F="default",i="",ru=!1,O=1;;){A=V();var u=ju[F]();if(u)return u}}function V(){if(Bu[nu])return String.fromCodePoint(Bu.codePointAt(nu))}function e(){var u=V();return u===`
1
+ import{m as Mu}from"./chunk-W2INV3O5.js";import{d as Hu}from"./chunk-DBUCH6BG.js";import{h as Ru,k as zu}from"./chunk-IMTSM6HN.js";import{a as Tu,b as Lu}from"./chunk-FETTFNJ2.js";import{Cc as G,Dc as U,Jb as vu,Ub as q,Vb as W,Wb as hu,bc as Au,e as P0,gb as k,ma as Q,mc as tu,nc as gu,oc as bu,tb as $u}from"./chunk-6ZN4TBLM.js";var N0=P0((yu,xu)=>{(function(w,y){typeof yu=="object"&&typeof xu<"u"?xu.exports=y():typeof define=="function"&&define.amd?define(y):w.JSON5=y()})(yu,function(){"use strict";function w(u,D){return D={exports:{}},u(D,D.exports),D.exports}var y=w(function(u){var D=u.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=D)}),x=w(function(u){var D=u.exports={version:"2.6.5"};typeof __e=="number"&&(__e=D)}),X=x.version,S=function(u){return typeof u=="object"?u!==null:typeof u=="function"},Y=function(u){if(!S(u))throw TypeError(u+" is not an object!");return u},wu=function(u){try{return!!u()}catch{return!0}},ou=!wu(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),Eu=y.document,Ju=S(Eu)&&S(Eu.createElement),ku=function(u){return Ju?Eu.createElement(u):{}},qu=!ou&&!wu(function(){return Object.defineProperty(ku("div"),"a",{get:function(){return 7}}).a!=7}),Gu=function(u,D){if(!S(u))return u;var t,r;if(D&&typeof(t=u.toString)=="function"&&!S(r=t.call(u))||typeof(t=u.valueOf)=="function"&&!S(r=t.call(u))||!D&&typeof(t=u.toString)=="function"&&!S(r=t.call(u)))return r;throw TypeError("Can't convert object to primitive value")},Uu=Object.defineProperty,Zu=ou?Object.defineProperty:function(D,t,r){if(Y(D),t=Gu(t,!0),Y(r),qu)try{return Uu(D,t,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(D[t]=r.value),D},Ku={f:Zu},Qu=function(u,D){return{enumerable:!(u&1),configurable:!(u&2),writable:!(u&4),value:D}},uu=ou?function(u,D,t){return Ku.f(u,D,Qu(1,t))}:function(u,D,t){return u[D]=t,u},Wu={}.hasOwnProperty,Su=function(u,D){return Wu.call(u,D)},Xu=0,Yu=Math.random(),u0=function(u){return"Symbol(".concat(u===void 0?"":u,")_",(++Xu+Yu).toString(36))},D0=!1,e0=w(function(u){var D="__core-js_shared__",t=y[D]||(y[D]={});(u.exports=function(r,n){return t[r]||(t[r]=n!==void 0?n:{})})("versions",[]).push({version:x.version,mode:D0?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})}),cu=e0("native-function-to-string",Function.toString),r0=w(function(u){var D=u0("src"),t="toString",r=(""+cu).split(t);x.inspectSource=function(n){return cu.call(n)},(u.exports=function(n,C,o,g){var B=typeof o=="function";B&&(Su(o,"name")||uu(o,"name",C)),n[C]!==o&&(B&&(Su(o,D)||uu(o,D,n[C]?""+n[C]:r.join(String(C)))),n===y?n[C]=o:g?n[C]?n[C]=o:uu(n,C,o):(delete n[C],uu(n,C,o)))})(Function.prototype,t,function(){return typeof this=="function"&&this[D]||cu.call(this)})}),t0=function(u){if(typeof u!="function")throw TypeError(u+" is not a function!");return u},_u=function(u,D,t){if(t0(u),D===void 0)return u;switch(t){case 1:return function(r){return u.call(D,r)};case 2:return function(r,n){return u.call(D,r,n)};case 3:return function(r,n,C){return u.call(D,r,n,C)}}return function(){return u.apply(D,arguments)}},su="prototype",v=function(u,D,t){var r=u&v.F,n=u&v.G,C=u&v.S,o=u&v.P,g=u&v.B,B=n?y:C?y[D]||(y[D]={}):(y[D]||{})[su],H=n?x:x[D]||(x[D]={}),Z=H[su]||(H[su]={}),P,I,b,K;n&&(t=D);for(P in t)I=!r&&B&&B[P]!==void 0,b=(I?B:t)[P],K=g&&I?_u(b,y):o&&typeof b=="function"?_u(Function.call,b):b,B&&r0(B,P,b,u&v.U),H[P]!=b&&uu(H,P,K),o&&Z[P]!=b&&(Z[P]=b)};y.core=x,v.F=1,v.G=2,v.S=4,v.P=8,v.B=16,v.W=32,v.U=64,v.R=128;var Du=v,n0=Math.ceil,i0=Math.floor,Pu=function(u){return isNaN(u=+u)?0:(u>0?i0:n0)(u)},a0=function(u){if(u==null)throw TypeError("Can't call method on "+u);return u},F0=function(u){return function(D,t){var r=String(a0(D)),n=Pu(t),C=r.length,o,g;return n<0||n>=C?u?"":void 0:(o=r.charCodeAt(n),o<55296||o>56319||n+1===C||(g=r.charCodeAt(n+1))<56320||g>57343?u?r.charAt(n):o:u?r.slice(n,n+2):(o-55296<<10)+(g-56320)+65536)}},C0=F0(!1);Du(Du.P,"String",{codePointAt:function(D){return C0(this,D)}});var I0=x.String.codePointAt,A0=Math.max,o0=Math.min,E0=function(u,D){return u=Pu(u),u<0?A0(u+D,0):o0(u,D)},Nu=String.fromCharCode,Iu=String.fromCodePoint;Du(Du.S+Du.F*(!!Iu&&Iu.length!=1),"String",{fromCodePoint:function(D){for(var t=arguments,r=[],n=arguments.length,C=0,o;n>C;){if(o=+t[C++],E0(o,1114111)!==o)throw RangeError(o+" is not a valid code point");r.push(o<65536?Nu(o):Nu(((o-=65536)>>10)+55296,o%1024+56320))}return r.join("")}});var j0=x.String.fromCodePoint,c0=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,s0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\u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\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,f0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0B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125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\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13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uD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uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,fu={Space_Separator:c0,ID_Start:s0,ID_Continue:f0},f={isSpaceSeparator:function(D){return typeof D=="string"&&fu.Space_Separator.test(D)},isIdStartChar:function(D){return typeof D=="string"&&(D>="a"&&D<="z"||D>="A"&&D<="Z"||D==="$"||D==="_"||fu.ID_Start.test(D))},isIdContinueChar:function(D){return typeof D=="string"&&(D>="a"&&D<="z"||D>="A"&&D<="Z"||D>="0"&&D<="9"||D==="$"||D==="_"||D==="\u200C"||D==="\u200D"||fu.ID_Continue.test(D))},isDigit:function(D){return typeof D=="string"&&/[0-9]/.test(D)},isHexDigit:function(D){return typeof D=="string"&&/[0-9A-Fa-f]/.test(D)}},Bu,h,j,nu,M,_,l,lu,eu,B0=function(D,t){Bu=String(D),h="start",j=[],nu=0,M=1,_=0,l=void 0,lu=void 0,eu=void 0;do l=l0(),m0[h]();while(l.type!=="eof");return typeof t=="function"?du({"":eu},"",t):eu};function du(u,D,t){var r=u[D];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(var n=0;n<r.length;n++){var C=String(n),o=du(r,C,t);o===void 0?delete r[C]:Object.defineProperty(r,C,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(var g in r){var B=du(r,g,t);B===void 0?delete r[g]:Object.defineProperty(r,g,{value:B,writable:!0,enumerable:!0,configurable:!0})}return t.call(u,D,r)}var F,i,ru,O,A;function l0(){for(F="default",i="",ru=!1,O=1;;){A=V();var u=ju[F]();if(u)return u}}function V(){if(Bu[nu])return String.fromCodePoint(Bu.codePointAt(nu))}function e(){var u=V();return u===`
2
2
  `?(M++,_=0):u?_+=u.length:_++,u&&(nu+=u.length),u}var ju={default:function(){switch(A){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
3
3
  `:case"\r":case"\u2028":case"\u2029":e();return;case"/":e(),F="comment";return;case void 0:return e(),c("eof")}if(f.isSpaceSeparator(A)){e();return}return ju[h]()},comment:function(){switch(A){case"*":e(),F="multiLineComment";return;case"/":e(),F="singleLineComment";return}throw s(e())},multiLineComment:function(){switch(A){case"*":e(),F="multiLineCommentAsterisk";return;case void 0:throw s(e())}e()},multiLineCommentAsterisk:function(){switch(A){case"*":e();return;case"/":e(),F="default";return;case void 0:throw s(e())}e(),F="multiLineComment"},singleLineComment:function(){switch(A){case`
4
4
  `:case"\r":case"\u2028":case"\u2029":e(),F="default";return;case void 0:return e(),c("eof")}e()},value:function(){switch(A){case"{":case"[":return c("punctuator",e());case"n":return e(),L("ull"),c("null",null);case"t":return e(),L("rue"),c("boolean",!0);case"f":return e(),L("alse"),c("boolean",!1);case"-":case"+":e()==="-"&&(O=-1),F="sign";return;case".":i=e(),F="decimalPointLeading";return;case"0":i=e(),F="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":i=e(),F="decimalInteger";return;case"I":return e(),L("nfinity"),c("numeric",1/0);case"N":return e(),L("aN"),c("numeric",NaN);case'"':case"'":ru=e()==='"',i="",F="string";return}throw s(e())},identifierNameStartEscape:function(){if(A!=="u")throw s(e());e();var D=pu();switch(D){case"$":case"_":break;default:if(!f.isIdStartChar(D))throw Ou();break}i+=D,F="identifierName"},identifierName:function(){switch(A){case"$":case"_":case"\u200C":case"\u200D":i+=e();return;case"\\":e(),F="identifierNameEscape";return}if(f.isIdContinueChar(A)){i+=e();return}return c("identifier",i)},identifierNameEscape:function(){if(A!=="u")throw s(e());e();var D=pu();switch(D){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!f.isIdContinueChar(D))throw Ou();break}i+=D,F="identifierName"},sign:function(){switch(A){case".":i=e(),F="decimalPointLeading";return;case"0":i=e(),F="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":i=e(),F="decimalInteger";return;case"I":return e(),L("nfinity"),c("numeric",O*(1/0));case"N":return e(),L("aN"),c("numeric",NaN)}throw s(e())},zero:function(){switch(A){case".":i+=e(),F="decimalPoint";return;case"e":case"E":i+=e(),F="decimalExponent";return;case"x":case"X":i+=e(),F="hexadecimal";return}return c("numeric",O*0)},decimalInteger:function(){switch(A){case".":i+=e(),F="decimalPoint";return;case"e":case"E":i+=e(),F="decimalExponent";return}if(f.isDigit(A)){i+=e();return}return c("numeric",O*Number(i))},decimalPointLeading:function(){if(f.isDigit(A)){i+=e(),F="decimalFraction";return}throw s(e())},decimalPoint:function(){switch(A){case"e":case"E":i+=e(),F="decimalExponent";return}if(f.isDigit(A)){i+=e(),F="decimalFraction";return}return c("numeric",O*Number(i))},decimalFraction:function(){switch(A){case"e":case"E":i+=e(),F="decimalExponent";return}if(f.isDigit(A)){i+=e();return}return c("numeric",O*Number(i))},decimalExponent:function(){switch(A){case"+":case"-":i+=e(),F="decimalExponentSign";return}if(f.isDigit(A)){i+=e(),F="decimalExponentInteger";return}throw s(e())},decimalExponentSign:function(){if(f.isDigit(A)){i+=e(),F="decimalExponentInteger";return}throw s(e())},decimalExponentInteger:function(){if(f.isDigit(A)){i+=e();return}return c("numeric",O*Number(i))},hexadecimal:function(){if(f.isHexDigit(A)){i+=e(),F="hexadecimalInteger";return}throw s(e())},hexadecimalInteger:function(){if(f.isHexDigit(A)){i+=e();return}return c("numeric",O*Number(i))},string:function(){switch(A){case"\\":e(),i+=d0();return;case'"':if(ru)return e(),c("string",i);i+=e();return;case"'":if(!ru)return e(),c("string",i);i+=e();return;case`
@@ -1,4 +1,4 @@
1
- import{a as b}from"./chunk-3NAAMMFZ.js";import{a as p,b as w}from"./chunk-44K5XVZH.js";import{a as c}from"./chunk-4ZKMD4ME.js";import{M as i,g as o,ga as m,ma as h,n}from"./chunk-6ZN4TBLM.js";var d=o(p(),1),a=o(w(),1),l=o(b(),1);var v=(()=>{class e{$ws=h(c);term;io;fitAddon;webLinksAddon;resize;elementResize;constructor(){}destroyTerminal(){this.io.end(),this.term.dispose(),this.resize.complete(),this.elementResize&&this.elementResize.complete()}startTerminal(r,s={},f){this.elementResize=f,this.io=this.$ws.connectToNamespace("platform-tools/terminal"),this.term=new d.Terminal(s),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new a.FitAddon,this.webLinksAddon=new l.WebLinksAddon,this.resize=new n,this.term.open(r.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.pipe(i(200)).subscribe(()=>{this.startSession()}),this.io.socket.on("disconnect",()=>{this.term.write(`
1
+ import{a as b}from"./chunk-3NAAMMFZ.js";import{a as p,b as w}from"./chunk-44K5XVZH.js";import{a as c}from"./chunk-L5DJ2UTP.js";import{M as i,g as o,ga as m,ma as h,n}from"./chunk-6ZN4TBLM.js";var d=o(p(),1),a=o(w(),1),l=o(b(),1);var v=(()=>{class e{$ws=h(c);term;io;fitAddon;webLinksAddon;resize;elementResize;constructor(){}destroyTerminal(){this.io.end(),this.term.dispose(),this.resize.complete(),this.elementResize&&this.elementResize.complete()}startTerminal(r,s={},f){this.elementResize=f,this.io=this.$ws.connectToNamespace("platform-tools/terminal"),this.term=new d.Terminal(s),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new a.FitAddon,this.webLinksAddon=new l.WebLinksAddon,this.resize=new n,this.term.open(r.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.pipe(i(200)).subscribe(()=>{this.startSession()}),this.io.socket.on("disconnect",()=>{this.term.write(`
2
2
  \r
3
3
  \rTerminal disconnected. Is the server running?
4
4
  \r
@@ -1,4 +1,4 @@
1
- import{a as P}from"./chunk-KPW2P5T4.js";import{a as O}from"./chunk-I6OD3CV4.js";import{c as y,e as E,l as k,y as $}from"./chunk-4UVD743J.js";import{b as D}from"./chunk-DBUCH6BG.js";import{b as L}from"./chunk-HKPESAZ3.js";import{h as I,k as H}from"./chunk-CAVXS647.js";import{a as T}from"./chunk-FETTFNJ2.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-6ZN4TBLM.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-KPW2P5T4.js";import{a as O}from"./chunk-I6OD3CV4.js";import{c as y,e as E,l as k,y as $}from"./chunk-4UVD743J.js";import{b as D}from"./chunk-DBUCH6BG.js";import{b as L}from"./chunk-3GTACTUQ.js";import{h as I,k as H}from"./chunk-IMTSM6HN.js";import{a as T}from"./chunk-FETTFNJ2.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-6ZN4TBLM.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 +1 @@
1
- import{a as l,b as u,c as a,d as g}from"./chunk-UQR4E3DH.js";import{a as f}from"./chunk-ZW4Z4WJU.js";import"./chunk-MZBVICGB.js";import{a as c}from"./chunk-LOD3M3TR.js";import"./chunk-MQK5LVL3.js";import"./chunk-7RUBICEC.js";import"./chunk-KPW2P5T4.js";import"./chunk-CUKPSGYS.js";import"./chunk-I6OD3CV4.js";import"./chunk-QO7GTX4Z.js";import"./chunk-3NAAMMFZ.js";import"./chunk-AFY7IWPI.js";import"./chunk-ZIXTTJ4W.js";import"./chunk-44K5XVZH.js";import"./chunk-XSS6G7LC.js";import"./chunk-TEFE7EK6.js";import{q as s}from"./chunk-W2INV3O5.js";import{y as n,z as p}from"./chunk-4UVD743J.js";import"./chunk-4ZKMD4ME.js";import{g as i}from"./chunk-DBUCH6BG.js";import"./chunk-ETQUINQG.js";import"./chunk-HKPESAZ3.js";import"./chunk-CAVXS647.js";import"./chunk-GDFC3M3E.js";import{c as d}from"./chunk-FETTFNJ2.js";import{ha as t,id as m,ub as e}from"./chunk-6ZN4TBLM.js";var v=[{path:"",loadComponent:()=>import("./chunk-TXVAZY2S.js").then(o=>o.SettingsComponent),canActivate:[f]}],C=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(v),i]})}return o})();var K=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[m,n,p,d,s,C,g,u,l,c,a]})}return o})();export{K as SettingsModule};
1
+ import{a as l,b as u,c as a,d as g}from"./chunk-CMUSONVW.js";import{a as f}from"./chunk-HGX4YUHS.js";import"./chunk-UTHIJK2F.js";import{a as c}from"./chunk-7EXP4HZB.js";import"./chunk-NSIKUTVP.js";import"./chunk-SRHERU2M.js";import"./chunk-KPW2P5T4.js";import"./chunk-CUKPSGYS.js";import"./chunk-I6OD3CV4.js";import"./chunk-JHAEEOVW.js";import"./chunk-3NAAMMFZ.js";import"./chunk-AFY7IWPI.js";import"./chunk-ZIXTTJ4W.js";import"./chunk-44K5XVZH.js";import"./chunk-XSS6G7LC.js";import"./chunk-TEFE7EK6.js";import{q as s}from"./chunk-W2INV3O5.js";import{y as n,z as p}from"./chunk-4UVD743J.js";import"./chunk-L5DJ2UTP.js";import{g as i}from"./chunk-DBUCH6BG.js";import"./chunk-XLKKNOJ4.js";import"./chunk-3GTACTUQ.js";import"./chunk-IMTSM6HN.js";import"./chunk-GDFC3M3E.js";import{c as d}from"./chunk-FETTFNJ2.js";import{ha as t,id as m,ub as e}from"./chunk-6ZN4TBLM.js";var v=[{path:"",loadComponent:()=>import("./chunk-IN4TCNQE.js").then(o=>o.SettingsComponent),canActivate:[f]}],C=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(v),i]})}return o})();var K=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[m,n,p,d,s,C,g,u,l,c,a]})}return o})();export{K as SettingsModule};
@@ -1 +1 @@
1
- import{a as te}from"./chunk-ZIXTTJ4W.js";import{a as Z,b as ee}from"./chunk-44K5XVZH.js";import{m as E,n as I,o as q}from"./chunk-W2INV3O5.js";import{a as J}from"./chunk-4ZKMD4ME.js";import{d as G}from"./chunk-DBUCH6BG.js";import{h as M,k as D}from"./chunk-CAVXS647.js";import{c as O,d as U}from"./chunk-GDFC3M3E.js";import{a as R,b as F}from"./chunk-FETTFNJ2.js";import{$c as H,Cc as s,Dc as l,Ec as y,Jb as v,Kb as _,Pb as u,Rb as A,Sb as N,Tb as W,Ub as r,Vb as o,Wb as m,_b as T,bc as f,cc as d,g as P,gb as i,gd as j,h as $,ma as x,mc as c,nc as k,oc as h,tb as S,ua as C,va as B,yc as w,zb as g,zc as z}from"./chunk-6ZN4TBLM.js";var V=P(te(),1);var L=P(Z(),1),Q=P(ee(),1);var ne=t=>({maxBackupSizeText:t});function ae(t,p){if(t&1&&m(0,"input",10),t&2){let e=d(2);_("value",e.selectedBackup.fileName)}}function oe(t,p){if(t&1){let e=T();r(0,"input",12),f("change",function(a){C(e);let b=d(2);return B(b.handleRestoreFileInput(a.target.files))}),o()}}function re(t,p){if(t&1&&(r(0,"div",4)(1,"div",7),m(2,"i",8),o(),r(3,"ul",9)(4,"li"),c(5),s(6,"translate"),o(),r(7,"li"),c(8),s(9,"translate"),o(),r(10,"li"),c(11),s(12,"translate"),o(),r(13,"li"),c(14),s(15,"translate"),o()(),g(16,ae,1,1,"input",10)(17,oe,1,0,"input",11),o()),t&2){let e=d();i(5),k(l(6,6,"backup.restore_help_one")),i(3),k(l(9,8,"backup.restore_help_two")),i(3),k(y(12,10,"backup.restore_max_size",w(15,ne,e.maxFileSizeText))),i(3),k(l(15,13,"backup.restore_warning")),i(2),u(e.selectedBackup?16:-1),i(),u(e.selectedBackup?-1:17)}}function se(t,p){if(t&1){let e=T();r(0,"button",18),s(1,"translate"),f("click",function(){C(e);let a=d(2);return B(a.$activeModal.dismiss("Dismiss"))}),c(2),s(3,"translate"),o()}if(t&2){let e=d(2);_("disabled",e.clicked),v("aria-label",l(1,3,"form.button_close")),i(2),h(" ",l(3,5,"form.button_close")," ")}}function le(t,p){if(t&1){let e=T();r(0,"button",18),s(1,"translate"),f("click",function(){C(e);let a=d(2);return B(a.reopenBackupModal())}),c(2),s(3,"translate"),o()}if(t&2){let e=d(2);_("disabled",e.clicked),v("aria-label",l(1,3,"form.button_back")),i(2),h(" ",l(3,5,"form.button_back")," ")}}function ce(t,p){t&1&&m(0,"i",19)}function pe(t,p){if(t&1&&(r(0,"span"),c(1),o()),t&2){let e=d(3);i(),h("",e.uploadPercent,"% - ")}}function de(t,p){t&1&&(r(0,"span"),c(1," Extracting Archive"),o())}function me(t,p){t&1&&(r(0,"span"),c(1),s(2,"translate"),o()),t&2&&(i(),h(" ",l(2,1,"backup.label_uploading"),""))}function ue(t,p){if(t&1&&(r(0,"span"),g(1,ce,1,0,"i",19)(2,pe,2,1,"span")(3,de,2,0,"span")(4,me,3,3,"span"),o()),t&2){let e=d(2);i(),u(!e.uploadPercent||e.uploadPercent===100?1:-1),i(),u(e.uploadPercent&&e.uploadPercent!==100?2:-1),i(),u(e.uploadPercent===100?3:-1),i(),u(e.uploadPercent!==100?4:-1)}}function _e(t,p){t&1&&(c(0),s(1,"translate")),t&2&&h(" ",l(1,1,"form.button_restore")," ")}function be(t,p){if(t&1){let e=T();r(0,"div",6)(1,"div",13),g(2,se,4,7,"button",14)(3,le,4,7,"button",14),o(),m(4,"div",15),r(5,"div",16)(6,"button",17),f("click",function(){C(e);let a=d();return B(a.onRestoreBackupClick())}),g(7,ue,5,4,"span")(8,_e,2,3),o()()()}if(t&2){let e=d();i(2),u(e.setupWizardRestore?2:-1),i(),u(e.setupWizardRestore?-1:3),i(3),_("disabled",!e.selectedBackup&&!e.selectedFile||e.clicked),i(),u(e.clicked?7:-1),i(),u(e.clicked?-1:8)}}function ke(t,p){if(t&1){let e=T();r(0,"div",6),m(1,"div",13),r(2,"div",15)(3,"button",20),f("click",function(){C(e);let a=d();return B(a.postBackupRestart())}),c(4),s(5,"translate"),o()(),m(6,"div",16),o()}t&2&&(i(4),h(" ",l(5,1,"menu.hbrestart.title")," "))}var X=(()=>{class t{$activeModal=x(E);$api=x(D);$modal=x(I);$route=x(G);$toastr=x(M);$translate=x(R);$ws=x(J);setupWizardRestore=!1;selectedBackup=null;clicked=!1;maxFileSizeText=globalThis.backup.maxBackupSizeText;selectedFile;restoreInProgress=!1;restoreStarted=!1;restoreFailed=!1;restoreArchiveType="homebridge";uploadPercent=0;term=new L.Terminal;termTarget;fitAddon=new Q.FitAddon;io;constructor(){}ngOnInit(){return $(this,null,function*(){this.io=this.$ws.connectToNamespace("backup"),this.termTarget=document.getElementById("plugin-log-output"),this.term.open(this.termTarget),this.fitAddon.fit(),this.io.socket.on("stdout",e=>{this.term.write(e)}),this.setupWizardRestore&&(this.restoreStarted=!0,this.restoreInProgress=!0,this.startRestore())})}onRestoreBackupClick(){this.selectedBackup?this.restoreScheduledBackup():this.restoreArchiveType==="homebridge"?this.uploadHomebridgeArchive():this.restoreArchiveType==="hbfx"&&this.uploadHbfxArchive()}uploadHomebridgeArchive(){this.term.reset(),this.clicked=!0;let e=new FormData;e.append("restoreArchive",this.selectedFile,this.selectedFile.name),this.$api.post("/backup/restore",e).subscribe({next:()=>{this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startRestore()},500),this.clicked=!1},error:n=>{var a;console.error(n),this.$toastr.error(((a=n.error)==null?void 0:a.message)||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error")),this.clicked=!1}})}restoreScheduledBackup(){return $(this,null,function*(){this.term.reset(),this.clicked=!0,this.$api.post(`/backup/scheduled-backups/${this.selectedBackup.id}/restore`,{}).subscribe({next:()=>{this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startRestore()},500),this.clicked=!1},error:e=>{var n;console.error(e),this.$toastr.error(((n=e.error)==null?void 0:n.message)||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error")),this.clicked=!1}})})}startRestore(){return $(this,null,function*(){this.io.request("do-restore").subscribe({next:()=>{this.restoreInProgress=!1,this.$toastr.success(this.$translate.instant("backup.backup_restored"),this.$translate.instant("toast.title_success")),this.setupWizardRestore&&this.postBackupRestart()},error:e=>{this.restoreFailed=!0,console.error(e),this.$toastr.error(this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})})}uploadHbfxArchive(){this.term.reset(),this.clicked=!0;let e=new FormData;e.append("restoreArchive",this.selectedFile,this.selectedFile.name),this.$api.post("/backup/restore/hbfx",e,{reportProgress:!0,observe:"events"}).subscribe({next:n=>{n.type===O.UploadProgress?this.uploadPercent=Math.round(100*n.loaded/n.total):n instanceof U&&(this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startHbfxRestore()},500),this.clicked=!1)},error:n=>{var a;this.clicked=!1,console.error(n),this.$toastr.error(((a=n.error)==null?void 0:a.message)||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})}startHbfxRestore(){return $(this,null,function*(){this.io.request("do-restore-hbfx").subscribe({next:()=>{this.restoreInProgress=!1,this.$toastr.success(this.$translate.instant("backup.backup_restored"),this.$translate.instant("toast.title_success"))},error:e=>{this.restoreFailed=!0,console.error(e),this.$toastr.error(this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})})}handleRestoreFileInput(e){e.length?(this.selectedFile=e[0],this.selectedFile.name.endsWith(".hbfx")?this.restoreArchiveType="hbfx":this.restoreArchiveType="homebridge"):delete this.selectedFile}postBackupRestart(){this.$api.put("/backup/restart",{}).subscribe({next:()=>{this.$activeModal.close(!0),this.$route.navigate(["/"])},error:()=>{}})}reopenBackupModal(){this.$activeModal.dismiss(),this.$modal.open(K,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.io.end()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=S({type:t,selectors:[["ng-component"]],inputs:{setupWizardRestore:"setupWizardRestore",selectedBackup:"selectedBackup"},decls:11,vars:11,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],["id","plugin-log-output",1,"modal-body",3,"hidden"],[1,"modal-footer","justify-content-between"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-hard-drive","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","text","disabled","",1,"form-control","custom-input",3,"value"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz, .hbfx",1,"form-control"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz, .hbfx",1,"form-control",3,"change"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"fa","fa-fw","fa-circle-notch","fa-spin"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click"]],template:function(n,a){n&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),c(3),s(4,"translate"),o(),r(5,"button",3),s(6,"translate"),f("click",function(){return a.$activeModal.dismiss("Dismiss")}),o()(),g(7,re,18,17,"div",4),m(8,"div",5),g(9,be,9,5,"div",6)(10,ke,7,3,"div",6),o()),n&2&&(i(3),k(l(4,7,"backup.title_backup")),i(2),_("disabled",a.restoreInProgress),v("aria-label",l(6,9,"form.button_close")),i(2),u(!a.restoreStarted&&!a.setupWizardRestore?7:-1),i(),_("hidden",!a.restoreStarted),i(),u(!a.restoreStarted||a.restoreFailed===!0?9:-1),i(),u(!a.restoreInProgress&&a.restoreStarted?10:-1))},dependencies:[F],encapsulation:2})}return t})();var fe=(t,p)=>({"fa-arrow-right":t,"fa-cog fa-spin":p}),he=t=>({backupTime:t,dayCount:7}),xe=(t,p)=>({"fa-trash":t,"fa-cog fa-spin":p}),ge=(t,p)=>({backupSize:t,maxBackupSizeText:p});function ve(t,p){if(t&1&&(c(0),s(1,"date"),s(2,"translate")),t&2){let e=d(2);h(" ",y(2,4,"backup.scheduled_backup_time",w(7,he,y(1,1,e.backupTime,"shortTime")))," ")}}function Ce(t,p){t&1&&(c(0),s(1,"translate")),t&2&&h(" ",l(1,1,"backup.scheduled_backup_disabled")," ")}function Be(t,p){if(t&1&&(r(0,"span",24),s(1,"translate"),m(2,"i",31),c(3),o()),t&2){let e=d().$implicit;_("ngbTooltip",y(1,2,"backup.backup_exceeds_max_size",z(5,ge,e.size+"MB",e.maxBackupSizeText))),i(3),h(" ",e.size,"MB ")}}function Te(t,p){if(t&1&&(r(0,"span"),c(1),o()),t&2){let e=d().$implicit;i(),h(" ",e.size,"MB ")}}function ye(t,p){if(t&1){let e=T();r(0,"li",9)(1,"span")(2,"span",23),c(3),s(4,"date"),o(),m(5,"br"),r(6,"small",10),c(7),s(8,"date"),g(9,Be,4,8,"span",24)(10,Te,2,1,"span"),o()(),r(11,"span",25)(12,"button",26),s(13,"translate"),s(14,"translate"),f("click",function(){let a=C(e).$implicit,b=d(2);return B(b.restore(a))}),m(15,"i",27),o(),r(16,"button",28),s(17,"translate"),s(18,"translate"),f("click",function(){let a=C(e).$implicit,b=d(2);return B(b.download(a))}),m(19,"i",29),o(),r(20,"button",30),s(21,"translate"),s(22,"translate"),f("click",function(){let a=C(e).$implicit,b=d(2);return B(b.delete(a))}),m(23,"i",12),o()()()}if(t&2){let e=p.$implicit,n=d(2);i(2),_("ngbTooltip",e.fileName),i(),h(" ",y(4,15,e.timestamp,"mediumDate")," "),i(4),h(" ",y(8,18,e.timestamp,"shortTime")," \xB7 "),i(2),u(e.size>e.maxBackupSize?9:-1),i(),u(e.size<=e.maxBackupSize?10:-1),i(2),_("disabled",n.clicked||n.deleting||e.size>e.maxBackupSize)("ngbTooltip",l(13,21,"form.button_restore")),v("aria-label",l(14,23,"form.button_restore")),i(4),_("disabled",n.clicked||n.deleting)("ngbTooltip",l(17,25,"form.button_download")),v("aria-label",l(18,27,"form.button_download")),i(4),_("disabled",n.clicked||n.deleting)("ngbTooltip",l(21,29,"form.button_delete")),v("aria-label",l(22,31,"form.button_delete")),i(3),_("ngClass",z(33,xe,e.id!==n.deleting,e.id===n.deleting))}}function $e(t,p){if(t&1&&(r(0,"ul",14)(1,"li",20)(2,"h6",21),c(3),s(4,"translate"),o(),r(5,"p",22),g(6,ve,3,9)(7,Ce,2,3),o()(),N(8,ye,24,36,"li",9,A),o()),t&2){let e=d();i(3),k(l(4,3,"backup.files_auto")),i(3),u(e.backupTime?6:-1),i(),u(e.backupTime?-1:7),i(),W(e.scheduledBackups)}}var K=(()=>{class t{$activeModal=x(E);$api=x(D);$modal=x(I);$toastr=x(M);$translate=x(R);clicked=!1;scheduledBackups=[];backupTime;deleting=null;constructor(){}ngOnInit(){this.getScheduledBackups(),this.getNextBackup()}getScheduledBackups(){this.$api.get("/backup/scheduled-backups").subscribe({next:e=>{this.scheduledBackups=e},error:e=>console.error(e)})}getNextBackup(){this.$api.get("/backup/scheduled-backups/next").subscribe({next:e=>{this.backupTime=e.next},error:e=>{console.error(e)}})}download(e){this.$api.get(`/backup/scheduled-backups/${e.id}`,{observe:"response",responseType:"blob"}).subscribe({next:n=>{let a=e.fileName||"homebridge-backup.tar.gz",b=n.body.size;if(b>globalThis.backup.maxBackupSize){let Y=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(b/1048576).toFixed(1)}MB`});this.$toastr.warning(Y,this.$translate.instant("toast.title_warning"))}(0,V.saveAs)(n.body,a)},error:n=>{console.error(n),this.$toastr.error(this.$translate.instant("backup.backup_download_failed"),this.$translate.instant("toast.title_error"))}})}restore(e){this.$activeModal.close();let n=this.$modal.open(X,{size:"lg",backdrop:"static"});n.componentInstance.selectedBackup=e}delete(e){this.deleting=e.id,this.$api.delete(`/backup/scheduled-backups/${e.id}`).subscribe({next:()=>{this.getScheduledBackups(),this.deleting=null},error:n=>{this.deleting=null,console.error(n),this.$toastr.error(this.$translate.instant("backup.backup_delete_failed"),this.$translate.instant("toast.title_error"))}})}onDownloadBackupClick(){return $(this,null,function*(){this.clicked=!0,this.$api.get("/backup/download",{observe:"response",responseType:"blob"}).subscribe({next:e=>{let n=e.headers.get("File-Name")||"homebridge-backup.tar.gz";this.clicked=!1;let a=e.body.size;if(a>globalThis.backup.maxBackupSize){let b=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(a/1048576).toFixed(1)}MB`});this.$toastr.warning(b,this.$translate.instant("toast.title_warning"))}(0,V.saveAs)(e.body,n)},error:e=>{this.clicked=!1,console.error(e),this.$toastr.error(this.$translate.instant("backup.backup_download_failed"),this.$translate.instant("toast.title_error"))}})})}Date=Date;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=S({type:t,selectors:[["ng-component"]],decls:53,vars:45,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-hard-drive","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"grey-text"],[1,"btn","btn-primary","m-0","ms-3",3,"click","disabled"],[1,"fas","fa-fw",3,"ngClass"],[1,"fas","fa-fw","fa-arrow-right"],[1,"list-group","list-group-box","mt-3","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-end"],[1,"list-group-item"],[1,"mb-1","text-center"],[1,"small","grey-text","mb-0","text-center"],["container","modal","openDelay","150","triggers","hover",3,"ngbTooltip"],["container","modal","openDelay","150","triggers","hover",1,"red-text",3,"ngbTooltip"],[2,"display","flex","flex-wrap","nowrap"],["placement","bottom","container","modal","openDelay","150","triggers","hover",1,"btn","btn-primary","m-0","ms-3",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-history"],["placement","bottom","container","modal","openDelay","150","triggers","hover",1,"btn","btn-primary","m-0","ms-2",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-download"],["placement","bottom","container","modal","openDelay","150","triggers","hover",1,"btn","btn-danger","m-0","ms-2",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-exclamation-circle"]],template:function(n,a){n&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),c(3),s(4,"translate"),o(),r(5,"button",3),s(6,"translate"),f("click",function(){return a.$activeModal.dismiss("Dismiss")}),o()(),r(7,"div",4)(8,"div",5),m(9,"i",6),o(),r(10,"ul",7)(11,"li"),c(12),s(13,"translate"),o(),r(14,"li"),c(15),s(16,"translate"),o(),r(17,"li"),c(18),s(19,"translate"),o()(),r(20,"ul",8)(21,"li",9)(22,"div")(23,"span"),c(24),s(25,"translate"),o(),m(26,"br"),r(27,"small",10),c(28),s(29,"translate"),o()(),r(30,"button",11),s(31,"translate"),f("click",function(){return a.onDownloadBackupClick()}),m(32,"i",12),o()(),r(33,"li",9)(34,"div")(35,"span"),c(36),s(37,"translate"),o(),m(38,"br"),r(39,"small",10),c(40),s(41,"translate"),o()(),r(42,"button",11),s(43,"translate"),f("click",function(){return a.restore(null)}),m(44,"i",13),o()()(),g(45,$e,10,5,"ul",14),o(),r(46,"div",15),m(47,"div",16),r(48,"div",17)(49,"button",18),f("click",function(){return a.$activeModal.dismiss("Dismiss")}),c(50),s(51,"translate"),o()(),m(52,"div",19),o()()),n&2&&(i(3),k(l(4,18,"backup.title_backup")),i(2),_("disabled",a.clicked||a.deleting),v("aria-label",l(6,20,"form.button_close")),i(7),k(l(13,22,"backup.backup_help_one")),i(3),k(l(16,24,"backup.backup_help_two")),i(3),k(l(19,26,"backup.backup_warning")),i(6),k(l(25,28,"backup.backup_now")),i(4),k(l(29,30,"backup.backup_now_desc")),i(2),_("disabled",a.clicked),v("aria-label",l(31,32,"backup.backup_now")),i(2),_("ngClass",z(42,fe,!a.clicked,a.clicked)),i(4),k(l(37,34,"backup.restore_now")),i(4),k(l(41,36,"backup.restore_now_desc")),i(2),_("disabled",a.clicked),v("aria-label",l(43,38,"backup.restore_now")),i(3),u(a.scheduledBackups.length?45:-1),i(4),_("disabled",a.clicked||a.deleting),i(),h(" ",l(51,40,"form.button_close")," "))},dependencies:[q,H,j,F],encapsulation:2})}return t})();export{K as a,X as b};
1
+ import{a as te}from"./chunk-ZIXTTJ4W.js";import{a as Z,b as ee}from"./chunk-44K5XVZH.js";import{m as E,n as I,o as q}from"./chunk-W2INV3O5.js";import{a as J}from"./chunk-L5DJ2UTP.js";import{d as G}from"./chunk-DBUCH6BG.js";import{h as M,k as D}from"./chunk-IMTSM6HN.js";import{c as O,d as U}from"./chunk-GDFC3M3E.js";import{a as R,b as F}from"./chunk-FETTFNJ2.js";import{$c as H,Cc as s,Dc as l,Ec as y,Jb as v,Kb as _,Pb as u,Rb as A,Sb as N,Tb as W,Ub as r,Vb as o,Wb as m,_b as T,bc as f,cc as d,g as P,gb as i,gd as j,h as $,ma as x,mc as c,nc as k,oc as h,tb as S,ua as C,va as B,yc as w,zb as g,zc as z}from"./chunk-6ZN4TBLM.js";var V=P(te(),1);var L=P(Z(),1),Q=P(ee(),1);var ne=t=>({maxBackupSizeText:t});function ae(t,p){if(t&1&&m(0,"input",10),t&2){let e=d(2);_("value",e.selectedBackup.fileName)}}function oe(t,p){if(t&1){let e=T();r(0,"input",12),f("change",function(a){C(e);let b=d(2);return B(b.handleRestoreFileInput(a.target.files))}),o()}}function re(t,p){if(t&1&&(r(0,"div",4)(1,"div",7),m(2,"i",8),o(),r(3,"ul",9)(4,"li"),c(5),s(6,"translate"),o(),r(7,"li"),c(8),s(9,"translate"),o(),r(10,"li"),c(11),s(12,"translate"),o(),r(13,"li"),c(14),s(15,"translate"),o()(),g(16,ae,1,1,"input",10)(17,oe,1,0,"input",11),o()),t&2){let e=d();i(5),k(l(6,6,"backup.restore_help_one")),i(3),k(l(9,8,"backup.restore_help_two")),i(3),k(y(12,10,"backup.restore_max_size",w(15,ne,e.maxFileSizeText))),i(3),k(l(15,13,"backup.restore_warning")),i(2),u(e.selectedBackup?16:-1),i(),u(e.selectedBackup?-1:17)}}function se(t,p){if(t&1){let e=T();r(0,"button",18),s(1,"translate"),f("click",function(){C(e);let a=d(2);return B(a.$activeModal.dismiss("Dismiss"))}),c(2),s(3,"translate"),o()}if(t&2){let e=d(2);_("disabled",e.clicked),v("aria-label",l(1,3,"form.button_close")),i(2),h(" ",l(3,5,"form.button_close")," ")}}function le(t,p){if(t&1){let e=T();r(0,"button",18),s(1,"translate"),f("click",function(){C(e);let a=d(2);return B(a.reopenBackupModal())}),c(2),s(3,"translate"),o()}if(t&2){let e=d(2);_("disabled",e.clicked),v("aria-label",l(1,3,"form.button_back")),i(2),h(" ",l(3,5,"form.button_back")," ")}}function ce(t,p){t&1&&m(0,"i",19)}function pe(t,p){if(t&1&&(r(0,"span"),c(1),o()),t&2){let e=d(3);i(),h("",e.uploadPercent,"% - ")}}function de(t,p){t&1&&(r(0,"span"),c(1," Extracting Archive"),o())}function me(t,p){t&1&&(r(0,"span"),c(1),s(2,"translate"),o()),t&2&&(i(),h(" ",l(2,1,"backup.label_uploading"),""))}function ue(t,p){if(t&1&&(r(0,"span"),g(1,ce,1,0,"i",19)(2,pe,2,1,"span")(3,de,2,0,"span")(4,me,3,3,"span"),o()),t&2){let e=d(2);i(),u(!e.uploadPercent||e.uploadPercent===100?1:-1),i(),u(e.uploadPercent&&e.uploadPercent!==100?2:-1),i(),u(e.uploadPercent===100?3:-1),i(),u(e.uploadPercent!==100?4:-1)}}function _e(t,p){t&1&&(c(0),s(1,"translate")),t&2&&h(" ",l(1,1,"form.button_restore")," ")}function be(t,p){if(t&1){let e=T();r(0,"div",6)(1,"div",13),g(2,se,4,7,"button",14)(3,le,4,7,"button",14),o(),m(4,"div",15),r(5,"div",16)(6,"button",17),f("click",function(){C(e);let a=d();return B(a.onRestoreBackupClick())}),g(7,ue,5,4,"span")(8,_e,2,3),o()()()}if(t&2){let e=d();i(2),u(e.setupWizardRestore?2:-1),i(),u(e.setupWizardRestore?-1:3),i(3),_("disabled",!e.selectedBackup&&!e.selectedFile||e.clicked),i(),u(e.clicked?7:-1),i(),u(e.clicked?-1:8)}}function ke(t,p){if(t&1){let e=T();r(0,"div",6),m(1,"div",13),r(2,"div",15)(3,"button",20),f("click",function(){C(e);let a=d();return B(a.postBackupRestart())}),c(4),s(5,"translate"),o()(),m(6,"div",16),o()}t&2&&(i(4),h(" ",l(5,1,"menu.hbrestart.title")," "))}var X=(()=>{class t{$activeModal=x(E);$api=x(D);$modal=x(I);$route=x(G);$toastr=x(M);$translate=x(R);$ws=x(J);setupWizardRestore=!1;selectedBackup=null;clicked=!1;maxFileSizeText=globalThis.backup.maxBackupSizeText;selectedFile;restoreInProgress=!1;restoreStarted=!1;restoreFailed=!1;restoreArchiveType="homebridge";uploadPercent=0;term=new L.Terminal;termTarget;fitAddon=new Q.FitAddon;io;constructor(){}ngOnInit(){return $(this,null,function*(){this.io=this.$ws.connectToNamespace("backup"),this.termTarget=document.getElementById("plugin-log-output"),this.term.open(this.termTarget),this.fitAddon.fit(),this.io.socket.on("stdout",e=>{this.term.write(e)}),this.setupWizardRestore&&(this.restoreStarted=!0,this.restoreInProgress=!0,this.startRestore())})}onRestoreBackupClick(){this.selectedBackup?this.restoreScheduledBackup():this.restoreArchiveType==="homebridge"?this.uploadHomebridgeArchive():this.restoreArchiveType==="hbfx"&&this.uploadHbfxArchive()}uploadHomebridgeArchive(){this.term.reset(),this.clicked=!0;let e=new FormData;e.append("restoreArchive",this.selectedFile,this.selectedFile.name),this.$api.post("/backup/restore",e).subscribe({next:()=>{this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startRestore()},500),this.clicked=!1},error:n=>{var a;console.error(n),this.$toastr.error(((a=n.error)==null?void 0:a.message)||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error")),this.clicked=!1}})}restoreScheduledBackup(){return $(this,null,function*(){this.term.reset(),this.clicked=!0,this.$api.post(`/backup/scheduled-backups/${this.selectedBackup.id}/restore`,{}).subscribe({next:()=>{this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startRestore()},500),this.clicked=!1},error:e=>{var n;console.error(e),this.$toastr.error(((n=e.error)==null?void 0:n.message)||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error")),this.clicked=!1}})})}startRestore(){return $(this,null,function*(){this.io.request("do-restore").subscribe({next:()=>{this.restoreInProgress=!1,this.$toastr.success(this.$translate.instant("backup.backup_restored"),this.$translate.instant("toast.title_success")),this.setupWizardRestore&&this.postBackupRestart()},error:e=>{this.restoreFailed=!0,console.error(e),this.$toastr.error(this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})})}uploadHbfxArchive(){this.term.reset(),this.clicked=!0;let e=new FormData;e.append("restoreArchive",this.selectedFile,this.selectedFile.name),this.$api.post("/backup/restore/hbfx",e,{reportProgress:!0,observe:"events"}).subscribe({next:n=>{n.type===O.UploadProgress?this.uploadPercent=Math.round(100*n.loaded/n.total):n instanceof U&&(this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startHbfxRestore()},500),this.clicked=!1)},error:n=>{var a;this.clicked=!1,console.error(n),this.$toastr.error(((a=n.error)==null?void 0:a.message)||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})}startHbfxRestore(){return $(this,null,function*(){this.io.request("do-restore-hbfx").subscribe({next:()=>{this.restoreInProgress=!1,this.$toastr.success(this.$translate.instant("backup.backup_restored"),this.$translate.instant("toast.title_success"))},error:e=>{this.restoreFailed=!0,console.error(e),this.$toastr.error(this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})})}handleRestoreFileInput(e){e.length?(this.selectedFile=e[0],this.selectedFile.name.endsWith(".hbfx")?this.restoreArchiveType="hbfx":this.restoreArchiveType="homebridge"):delete this.selectedFile}postBackupRestart(){this.$api.put("/backup/restart",{}).subscribe({next:()=>{this.$activeModal.close(!0),this.$route.navigate(["/"])},error:()=>{}})}reopenBackupModal(){this.$activeModal.dismiss(),this.$modal.open(K,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.io.end()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=S({type:t,selectors:[["ng-component"]],inputs:{setupWizardRestore:"setupWizardRestore",selectedBackup:"selectedBackup"},decls:11,vars:11,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],["id","plugin-log-output",1,"modal-body",3,"hidden"],[1,"modal-footer","justify-content-between"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-hard-drive","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","text","disabled","",1,"form-control","custom-input",3,"value"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz, .hbfx",1,"form-control"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz, .hbfx",1,"form-control",3,"change"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"fa","fa-fw","fa-circle-notch","fa-spin"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click"]],template:function(n,a){n&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),c(3),s(4,"translate"),o(),r(5,"button",3),s(6,"translate"),f("click",function(){return a.$activeModal.dismiss("Dismiss")}),o()(),g(7,re,18,17,"div",4),m(8,"div",5),g(9,be,9,5,"div",6)(10,ke,7,3,"div",6),o()),n&2&&(i(3),k(l(4,7,"backup.title_backup")),i(2),_("disabled",a.restoreInProgress),v("aria-label",l(6,9,"form.button_close")),i(2),u(!a.restoreStarted&&!a.setupWizardRestore?7:-1),i(),_("hidden",!a.restoreStarted),i(),u(!a.restoreStarted||a.restoreFailed===!0?9:-1),i(),u(!a.restoreInProgress&&a.restoreStarted?10:-1))},dependencies:[F],encapsulation:2})}return t})();var fe=(t,p)=>({"fa-arrow-right":t,"fa-cog fa-spin":p}),he=t=>({backupTime:t,dayCount:7}),xe=(t,p)=>({"fa-trash":t,"fa-cog fa-spin":p}),ge=(t,p)=>({backupSize:t,maxBackupSizeText:p});function ve(t,p){if(t&1&&(c(0),s(1,"date"),s(2,"translate")),t&2){let e=d(2);h(" ",y(2,4,"backup.scheduled_backup_time",w(7,he,y(1,1,e.backupTime,"shortTime")))," ")}}function Ce(t,p){t&1&&(c(0),s(1,"translate")),t&2&&h(" ",l(1,1,"backup.scheduled_backup_disabled")," ")}function Be(t,p){if(t&1&&(r(0,"span",24),s(1,"translate"),m(2,"i",31),c(3),o()),t&2){let e=d().$implicit;_("ngbTooltip",y(1,2,"backup.backup_exceeds_max_size",z(5,ge,e.size+"MB",e.maxBackupSizeText))),i(3),h(" ",e.size,"MB ")}}function Te(t,p){if(t&1&&(r(0,"span"),c(1),o()),t&2){let e=d().$implicit;i(),h(" ",e.size,"MB ")}}function ye(t,p){if(t&1){let e=T();r(0,"li",9)(1,"span")(2,"span",23),c(3),s(4,"date"),o(),m(5,"br"),r(6,"small",10),c(7),s(8,"date"),g(9,Be,4,8,"span",24)(10,Te,2,1,"span"),o()(),r(11,"span",25)(12,"button",26),s(13,"translate"),s(14,"translate"),f("click",function(){let a=C(e).$implicit,b=d(2);return B(b.restore(a))}),m(15,"i",27),o(),r(16,"button",28),s(17,"translate"),s(18,"translate"),f("click",function(){let a=C(e).$implicit,b=d(2);return B(b.download(a))}),m(19,"i",29),o(),r(20,"button",30),s(21,"translate"),s(22,"translate"),f("click",function(){let a=C(e).$implicit,b=d(2);return B(b.delete(a))}),m(23,"i",12),o()()()}if(t&2){let e=p.$implicit,n=d(2);i(2),_("ngbTooltip",e.fileName),i(),h(" ",y(4,15,e.timestamp,"mediumDate")," "),i(4),h(" ",y(8,18,e.timestamp,"shortTime")," \xB7 "),i(2),u(e.size>e.maxBackupSize?9:-1),i(),u(e.size<=e.maxBackupSize?10:-1),i(2),_("disabled",n.clicked||n.deleting||e.size>e.maxBackupSize)("ngbTooltip",l(13,21,"form.button_restore")),v("aria-label",l(14,23,"form.button_restore")),i(4),_("disabled",n.clicked||n.deleting)("ngbTooltip",l(17,25,"form.button_download")),v("aria-label",l(18,27,"form.button_download")),i(4),_("disabled",n.clicked||n.deleting)("ngbTooltip",l(21,29,"form.button_delete")),v("aria-label",l(22,31,"form.button_delete")),i(3),_("ngClass",z(33,xe,e.id!==n.deleting,e.id===n.deleting))}}function $e(t,p){if(t&1&&(r(0,"ul",14)(1,"li",20)(2,"h6",21),c(3),s(4,"translate"),o(),r(5,"p",22),g(6,ve,3,9)(7,Ce,2,3),o()(),N(8,ye,24,36,"li",9,A),o()),t&2){let e=d();i(3),k(l(4,3,"backup.files_auto")),i(3),u(e.backupTime?6:-1),i(),u(e.backupTime?-1:7),i(),W(e.scheduledBackups)}}var K=(()=>{class t{$activeModal=x(E);$api=x(D);$modal=x(I);$toastr=x(M);$translate=x(R);clicked=!1;scheduledBackups=[];backupTime;deleting=null;constructor(){}ngOnInit(){this.getScheduledBackups(),this.getNextBackup()}getScheduledBackups(){this.$api.get("/backup/scheduled-backups").subscribe({next:e=>{this.scheduledBackups=e},error:e=>console.error(e)})}getNextBackup(){this.$api.get("/backup/scheduled-backups/next").subscribe({next:e=>{this.backupTime=e.next},error:e=>{console.error(e)}})}download(e){this.$api.get(`/backup/scheduled-backups/${e.id}`,{observe:"response",responseType:"blob"}).subscribe({next:n=>{let a=e.fileName||"homebridge-backup.tar.gz",b=n.body.size;if(b>globalThis.backup.maxBackupSize){let Y=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(b/1048576).toFixed(1)}MB`});this.$toastr.warning(Y,this.$translate.instant("toast.title_warning"))}(0,V.saveAs)(n.body,a)},error:n=>{console.error(n),this.$toastr.error(this.$translate.instant("backup.backup_download_failed"),this.$translate.instant("toast.title_error"))}})}restore(e){this.$activeModal.close();let n=this.$modal.open(X,{size:"lg",backdrop:"static"});n.componentInstance.selectedBackup=e}delete(e){this.deleting=e.id,this.$api.delete(`/backup/scheduled-backups/${e.id}`).subscribe({next:()=>{this.getScheduledBackups(),this.deleting=null},error:n=>{this.deleting=null,console.error(n),this.$toastr.error(this.$translate.instant("backup.backup_delete_failed"),this.$translate.instant("toast.title_error"))}})}onDownloadBackupClick(){return $(this,null,function*(){this.clicked=!0,this.$api.get("/backup/download",{observe:"response",responseType:"blob"}).subscribe({next:e=>{let n=e.headers.get("File-Name")||"homebridge-backup.tar.gz";this.clicked=!1;let a=e.body.size;if(a>globalThis.backup.maxBackupSize){let b=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(a/1048576).toFixed(1)}MB`});this.$toastr.warning(b,this.$translate.instant("toast.title_warning"))}(0,V.saveAs)(e.body,n)},error:e=>{this.clicked=!1,console.error(e),this.$toastr.error(this.$translate.instant("backup.backup_download_failed"),this.$translate.instant("toast.title_error"))}})})}Date=Date;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=S({type:t,selectors:[["ng-component"]],decls:53,vars:45,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-hard-drive","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"grey-text"],[1,"btn","btn-primary","m-0","ms-3",3,"click","disabled"],[1,"fas","fa-fw",3,"ngClass"],[1,"fas","fa-fw","fa-arrow-right"],[1,"list-group","list-group-box","mt-3","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-end"],[1,"list-group-item"],[1,"mb-1","text-center"],[1,"small","grey-text","mb-0","text-center"],["container","modal","openDelay","150","triggers","hover",3,"ngbTooltip"],["container","modal","openDelay","150","triggers","hover",1,"red-text",3,"ngbTooltip"],[2,"display","flex","flex-wrap","nowrap"],["placement","bottom","container","modal","openDelay","150","triggers","hover",1,"btn","btn-primary","m-0","ms-3",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-history"],["placement","bottom","container","modal","openDelay","150","triggers","hover",1,"btn","btn-primary","m-0","ms-2",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-download"],["placement","bottom","container","modal","openDelay","150","triggers","hover",1,"btn","btn-danger","m-0","ms-2",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-exclamation-circle"]],template:function(n,a){n&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),c(3),s(4,"translate"),o(),r(5,"button",3),s(6,"translate"),f("click",function(){return a.$activeModal.dismiss("Dismiss")}),o()(),r(7,"div",4)(8,"div",5),m(9,"i",6),o(),r(10,"ul",7)(11,"li"),c(12),s(13,"translate"),o(),r(14,"li"),c(15),s(16,"translate"),o(),r(17,"li"),c(18),s(19,"translate"),o()(),r(20,"ul",8)(21,"li",9)(22,"div")(23,"span"),c(24),s(25,"translate"),o(),m(26,"br"),r(27,"small",10),c(28),s(29,"translate"),o()(),r(30,"button",11),s(31,"translate"),f("click",function(){return a.onDownloadBackupClick()}),m(32,"i",12),o()(),r(33,"li",9)(34,"div")(35,"span"),c(36),s(37,"translate"),o(),m(38,"br"),r(39,"small",10),c(40),s(41,"translate"),o()(),r(42,"button",11),s(43,"translate"),f("click",function(){return a.restore(null)}),m(44,"i",13),o()()(),g(45,$e,10,5,"ul",14),o(),r(46,"div",15),m(47,"div",16),r(48,"div",17)(49,"button",18),f("click",function(){return a.$activeModal.dismiss("Dismiss")}),c(50),s(51,"translate"),o()(),m(52,"div",19),o()()),n&2&&(i(3),k(l(4,18,"backup.title_backup")),i(2),_("disabled",a.clicked||a.deleting),v("aria-label",l(6,20,"form.button_close")),i(7),k(l(13,22,"backup.backup_help_one")),i(3),k(l(16,24,"backup.backup_help_two")),i(3),k(l(19,26,"backup.backup_warning")),i(6),k(l(25,28,"backup.backup_now")),i(4),k(l(29,30,"backup.backup_now_desc")),i(2),_("disabled",a.clicked),v("aria-label",l(31,32,"backup.backup_now")),i(2),_("ngClass",z(42,fe,!a.clicked,a.clicked)),i(4),k(l(37,34,"backup.restore_now")),i(4),k(l(41,36,"backup.restore_now_desc")),i(2),_("disabled",a.clicked),v("aria-label",l(43,38,"backup.restore_now")),i(3),u(a.scheduledBackups.length?45:-1),i(4),_("disabled",a.clicked||a.deleting),i(),h(" ",l(51,40,"form.button_close")," "))},dependencies:[q,H,j,F],encapsulation:2})}return t})();export{K as a,X as b};
@@ -1 +1 @@
1
- import{o as k}from"./chunk-W2INV3O5.js";import{d as P}from"./chunk-DBUCH6BG.js";import{b as V}from"./chunk-HKPESAZ3.js";import{h as T,k as O}from"./chunk-CAVXS647.js";import{a as y,b as $}from"./chunk-FETTFNJ2.js";import{Cc as a,Dc as s,Kb as C,Pb as f,Ub as o,Vb as r,Wb as h,_b as v,bc as m,cc as b,gb as i,ma as c,mc as l,nc as S,oc as d,tb as w,ua as u,va as _,zb as g}from"./chunk-6ZN4TBLM.js";function B(t,x){if(t&1){let n=v();o(0,"p",5)(1,"button",6),m("click",function(){u(n);let e=b();return _(e.restartServer())}),l(2),a(3,"translate"),r()()}t&2&&(i(2),d(" ",s(3,1,"menu.linux.label_restart_server")," "))}function I(t,x){if(t&1){let n=v();o(0,"p",5)(1,"button",6),m("click",function(){u(n);let e=b();return _(e.shutdownServer())}),l(2),a(3,"translate"),r()()}t&2&&(i(2),d(" ",s(3,1,"menu.linux.label_shutdown_server")," "))}function H(t,x){if(t&1){let n=v();o(0,"p",5)(1,"button",6),m("click",function(){u(n);let e=b();return _(e.dockerRestartContainer())}),l(2),a(3,"translate"),r()()}t&2&&(i(2),d(" ",s(3,1,"menu.docker.restart_container")," "))}var G=(()=>{class t{$api=c(O);$router=c(P);$settings=c(V);$toastr=c(T);$translate=c(y);constructor(){}restartHomebridge(){this.$router.navigate(["/restart"])}restartHomebridgeService(){this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>{this.$router.navigate(["/restart"])},error:n=>{console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error"))}})}restartServer(){this.$router.navigate(["/platform-tools/linux/restart-server"])}shutdownServer(){this.$router.navigate(["/platform-tools/linux/shutdown-server"])}dockerRestartContainer(){this.$router.navigate(["/platform-tools/docker/restart-container"])}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=w({type:t,selectors:[["ng-component"]],decls:19,vars:15,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,"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","openDelay","150","triggers","hover",1,"btn","btn-primary","p-3","my-0",2,"width","85%",3,"click","ngbTooltip"]],template:function(p,e){p&1&&(o(0,"div",0)(1,"h3",1),l(2),a(3,"translate"),r()(),o(4,"div",2)(5,"div",3),h(6,"i",4),r(),o(7,"p",5)(8,"button",6),m("click",function(){return e.restartHomebridge()}),l(9),a(10,"translate"),r()(),o(11,"p",5)(12,"button",7),a(13,"translate"),m("click",function(){return e.restartHomebridgeService()}),l(14),a(15,"translate"),r()(),g(16,B,4,3,"p",5)(17,I,4,3,"p",5)(18,H,4,3,"p",5),r()),p&2&&(i(2),S(s(3,7,"menu.restart.title")),i(7),d(" ",s(10,9,"menu.hbrestart.confirm_hb")," "),i(3),C("ngbTooltip",s(13,11,"reset.force_restart_hb_help_text")),i(2),d(" ",s(15,13,"menu.hbrestart.confirm_ui")," "),i(2),f(e.$settings.env.canShutdownRestartHost?16:-1),i(),f(e.$settings.env.canShutdownRestartHost?17:-1),i(),f(e.$settings.env.runningInDocker?18:-1))},dependencies:[k,$],encapsulation:2})}return t})();export{G as a};
1
+ import{o as k}from"./chunk-W2INV3O5.js";import{d as P}from"./chunk-DBUCH6BG.js";import{b as V}from"./chunk-3GTACTUQ.js";import{h as T,k as O}from"./chunk-IMTSM6HN.js";import{a as y,b as $}from"./chunk-FETTFNJ2.js";import{Cc as a,Dc as s,Kb as C,Pb as f,Ub as o,Vb as r,Wb as h,_b as v,bc as m,cc as b,gb as i,ma as c,mc as l,nc as S,oc as d,tb as w,ua as u,va as _,zb as g}from"./chunk-6ZN4TBLM.js";function B(t,x){if(t&1){let n=v();o(0,"p",5)(1,"button",6),m("click",function(){u(n);let e=b();return _(e.restartServer())}),l(2),a(3,"translate"),r()()}t&2&&(i(2),d(" ",s(3,1,"menu.linux.label_restart_server")," "))}function I(t,x){if(t&1){let n=v();o(0,"p",5)(1,"button",6),m("click",function(){u(n);let e=b();return _(e.shutdownServer())}),l(2),a(3,"translate"),r()()}t&2&&(i(2),d(" ",s(3,1,"menu.linux.label_shutdown_server")," "))}function H(t,x){if(t&1){let n=v();o(0,"p",5)(1,"button",6),m("click",function(){u(n);let e=b();return _(e.dockerRestartContainer())}),l(2),a(3,"translate"),r()()}t&2&&(i(2),d(" ",s(3,1,"menu.docker.restart_container")," "))}var G=(()=>{class t{$api=c(O);$router=c(P);$settings=c(V);$toastr=c(T);$translate=c(y);constructor(){}restartHomebridge(){this.$router.navigate(["/restart"])}restartHomebridgeService(){this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>{this.$router.navigate(["/restart"])},error:n=>{console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error"))}})}restartServer(){this.$router.navigate(["/platform-tools/linux/restart-server"])}shutdownServer(){this.$router.navigate(["/platform-tools/linux/shutdown-server"])}dockerRestartContainer(){this.$router.navigate(["/platform-tools/docker/restart-container"])}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=w({type:t,selectors:[["ng-component"]],decls:19,vars:15,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,"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","openDelay","150","triggers","hover",1,"btn","btn-primary","p-3","my-0",2,"width","85%",3,"click","ngbTooltip"]],template:function(p,e){p&1&&(o(0,"div",0)(1,"h3",1),l(2),a(3,"translate"),r()(),o(4,"div",2)(5,"div",3),h(6,"i",4),r(),o(7,"p",5)(8,"button",6),m("click",function(){return e.restartHomebridge()}),l(9),a(10,"translate"),r()(),o(11,"p",5)(12,"button",7),a(13,"translate"),m("click",function(){return e.restartHomebridgeService()}),l(14),a(15,"translate"),r()(),g(16,B,4,3,"p",5)(17,I,4,3,"p",5)(18,H,4,3,"p",5),r()),p&2&&(i(2),S(s(3,7,"menu.restart.title")),i(7),d(" ",s(10,9,"menu.hbrestart.confirm_hb")," "),i(3),C("ngbTooltip",s(13,11,"reset.force_restart_hb_help_text")),i(2),d(" ",s(15,13,"menu.hbrestart.confirm_ui")," "),i(2),f(e.$settings.env.canShutdownRestartHost?16:-1),i(),f(e.$settings.env.canShutdownRestartHost?17:-1),i(),f(e.$settings.env.runningInDocker?18:-1))},dependencies:[k,$],encapsulation:2})}return t})();export{G as a};
@@ -1 +1 @@
1
- import{b as X}from"./chunk-MZBVICGB.js";import{n as j}from"./chunk-W2INV3O5.js";import{c as B,d as w,e as P,f as V,g as O,j as F,m as R,p as W,q as N,y as D,z as G}from"./chunk-4UVD743J.js";import{e as L}from"./chunk-DBUCH6BG.js";import{c as Q}from"./chunk-ETQUINQG.js";import{b as J}from"./chunk-HKPESAZ3.js";import{h as q,j as T,k as K}from"./chunk-CAVXS647.js";import{l as M}from"./chunk-GDFC3M3E.js";import{a as H,b as A}from"./chunk-FETTFNJ2.js";import{$c as I,Cc as s,Dc as l,Kb as _,Pb as f,Ub as n,Vb as o,Wb as d,_b as S,bc as b,cc as m,gb as i,h as v,ma as g,mc as p,nc as c,oc as C,tb as E,ua as h,va as x,w as y,yc as $,zb as z,zc as k}from"./chunk-6ZN4TBLM.js";var U=(t,u)=>({"is-valid":t,"is-invalid":u}),Z=t=>({"button-loading":t});function ee(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",3),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"button",5),b("click",function(){h(e);let a=m();return x(a.onClickGettingStarted())}),p(6),s(7,"translate"),o(),n(8,"small",6)(9,"a",7),b("click",function(){h(e);let a=m();return x(a.onClickRestoreBackup())}),p(10),s(11,"translate"),o()()()}t&2&&(i(3),c(l(4,3,"setup.welcome_to_homebridge")),i(3),C(" ",l(7,5,"setup.button_get_started")," "),i(4),c(l(11,7,"setup_wizard_message_restore")))}function te(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"div",9)(6,"p"),p(7),s(8,"translate"),o(),n(9,"form",10),b("ngSubmit",function(){h(e);let a=m();return x(a.createFirstUser())}),n(10,"div",11)(11,"span",12),d(12,"i",13),o(),d(13,"input",14),s(14,"translate"),o(),n(15,"div",11)(16,"span",12),d(17,"i",15),o(),d(18,"input",16),s(19,"translate"),o(),n(20,"div",17)(21,"span",12),d(22,"i",15),o(),d(23,"input",18),s(24,"translate"),o(),n(25,"div",19)(26,"button",20),p(27),s(28,"translate"),d(29,"i",21),o()()()()()}if(t&2){let e=m();i(3),c(l(4,15,"setup.create_account")),i(4),c(l(8,17,"setup.create_account_reason")),i(2),_("formGroup",e.createUserForm),i(4),_("placeholder",l(14,19,"users.label_username"))("readonly",e.loading)("ngClass",k(27,U,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid)),i(5),_("placeholder",l(19,21,"users.label_password"))("readonly",e.loading)("ngClass",k(30,U,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors)),i(5),_("placeholder",l(24,23,"users.label_confirm_password"))("readonly",e.loading)("ngClass",k(33,U,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors)),i(3),_("disabled",e.createUserForm.invalid||e.loading)("ngClass",$(36,Z,e.loading)),i(),C(" ",l(28,25,"setup.create_account")," ")}}function ie(t,u){t&1&&(n(0,"span"),d(1,"i",26),p(2),s(3,"translate"),o()),t&2&&(i(2),C(" ",l(3,1,"backup.label_uploading")," "))}function ne(t,u){t&1&&(p(0),s(1,"translate")),t&2&&C(" ",l(1,1,"backup.button_restore_backup")," ")}function oe(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"p"),p(6),s(7,"translate"),o(),n(8,"input",22),b("change",function(a){h(e);let Y=m();return x(Y.handleRestoreFileInput(a.target.files))}),o(),n(9,"div",23)(10,"button",24),b("click",function(){h(e);let a=m();return x(a.onClickCancelRestore())}),p(11),s(12,"translate"),o(),n(13,"button",25),b("click",function(){h(e);let a=m();return x(a.onRestoreBackupClick())}),z(14,ie,4,3,"span")(15,ne,2,3),o()()()}if(t&2){let e=m();i(3),c(l(4,7,"form.button_restore")),i(3),c(l(7,9,"backup.restore_help_one")),i(4),_("disabled",e.restoreUploading),i(),C(" ",l(12,11,"form.button_cancel")," "),i(2),_("disabled",e.restoreUploading||!e.selectedFile),i(),f(e.restoreUploading?14:-1),i(),f(e.restoreUploading?-1:15)}}function re(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"h1"),d(6,"i",26),o()()),t&2&&(i(3),c(l(4,1,"restart.title_restart")))}function ae(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",27),p(3),s(4,"translate"),o(),n(5,"p",28),p(6),s(7,"translate"),o(),n(8,"a",29),p(9),s(10,"translate"),o()()),t&2&&(i(3),c(l(4,3,"setup_wizard_message_complete_title")),i(3),c(l(7,5,"setup_wizard_message_complete_message")),i(3),c(l(10,7,"setup.open_dashboard")))}var Se=(()=>{class t{$api=g(K);$auth=g(Q);$modal=g(j);$settings=g(J);$title=g(M);$toastr=g(q);$translate=g(H);previousTitle;step="welcome";createUserForm=new O({username:new F("",[w.required]),password:new F("",[w.compose([w.required,w.minLength(4)])]),passwordConfirm:new F("",[w.required])},this.matchPassword);loading=!1;selectedFile;restoreUploading=!1;constructor(){}ngOnInit(){this.previousTitle=this.$title.getTitle(),this.$title.setTitle("Setup Homebridge")}matchPassword(e){let r=e.get("password").value,a=e.get("passwordConfirm").value;if(r!==a)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}ngOnDestroy(){this.$title.setTitle(this.previousTitle)}onClickGettingStarted(){this.step="create-account"}onClickRestoreBackup(){this.step="restore-backup"}onClickCancelRestore(){this.selectedFile=null,this.step="welcome"}createFirstUser(){this.loading=!0;let e=this.createUserForm.getRawValue();e.name=e.username,this.$api.post("/setup-wizard/create-first-user",e).subscribe({next:()=>v(this,null,function*(){this.$settings.env.setupWizardComplete=!0,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}),error:r=>{this.loading=!1,console.error(r),this.$toastr.error(r.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?this.selectedFile=e[0]:delete this.selectedFile}onRestoreBackupClick(){this.restoreUploading=!0,this.uploadHomebridgeArchive()}uploadHomebridgeArchive(){return v(this,null,function*(){try{let e=yield y(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(T.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token;let r=new FormData;r.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield y(this.$api.post("/backup/restore",r)),this.openRestoreModal(),this.restoreUploading=!1}catch(e){this.restoreUploading=!1,console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}openRestoreModal(){let e=this.$modal.open(X,{size:"lg",backdrop:"static"});e.componentInstance.setupWizardRestore=!0,e.result.then(r=>{r===!0&&this.waitForHomebridgeToRestart()})}waitForHomebridgeToRestart(){return v(this,null,function*(){this.step="restarting",window.localStorage.removeItem(T.jwt.tokenKey),this.$auth.token=null,yield new Promise(r=>setTimeout(r,15e3));let e=setInterval(()=>v(this,null,function*(){try{yield y(this.$api.get("/auth/settings")),clearInterval(e),location.reload()}catch{}}),1e3)})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=E({type:t,selectors:[["ng-component"]],decls:7,vars:5,consts:[[1,"setup-container","d-flex","align-items-center","justify-content-center"],[1,"w-100","setup-card","d-flex","py-5"],[1,"w-100","d-flex","flex-column","align-items-center"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","mx-auto"],[1,"pt-4","pb-3","text-center"],["type","button",1,"btn","btn-lg","btn-primary",3,"click"],[1,"mt-3"],["href","javascript:void(0)",1,"grey-text",3,"click"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","homebridge-logo-small","mx-auto"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"md-form","input-group","mb-3"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","prefix","grey-text"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"md-form","input-group","mb-4"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"w-100","text-center"],["type","submit",1,"btn","btn-primary",3,"disabled","ngClass"],[1,"button-loading-overlay","fas","fa-fw","fa-spinner","fa-pulse"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"form-control",3,"change"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ms-0",3,"click","disabled"],["type","button",1,"btn","btn-primary","me-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"pt-4","pb-3"],[1,"text-center"],["routerLink","/",1,"btn","btn-lg","btn-primary","mt-3"]],template:function(r,a){r&1&&(n(0,"div",0)(1,"div",1),z(2,ee,12,9,"div",2)(3,te,30,38,"div",2)(4,oe,16,13,"div",2)(5,re,7,3,"div",2)(6,ae,11,9,"div",2),o()()),r&2&&(i(2),f(a.step==="welcome"?2:-1),i(),f(a.step==="create-account"?3:-1),i(),f(a.step==="restore-backup"?4:-1),i(),f(a.step==="restarting"?5:-1),i(),f(a.step==="setup-complete"?6:-1))},dependencies:[D,R,B,P,V,G,W,N,I,L,A],styles:[".setup-container[_ngcontent-%COMP%]{background-size:cover;z-index:-1;padding-top:1em;padding-bottom:1em}@media screen and (min-height: 500px) and (min-width: 600px){.setup-container[_ngcontent-%COMP%]{padding-top:4em}}.setup-card[_ngcontent-%COMP%]{max-width:600px;border-radius:15px;background-color:#fff;padding-right:25px;padding-left:25px}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 600px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.homebridge-logo[_ngcontent-%COMP%]{margin-right:10px;height:200px}@media screen and (max-height: 500px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}@media screen and (max-width: 600px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}.homebridge-logo-small[_ngcontent-%COMP%]{height:50px}.button-loading[_ngcontent-%COMP%]{position:relative;color:#0000}.button-loading[_ngcontent-%COMP%] .button-loading-overlay[_ngcontent-%COMP%]{display:block;color:#fff}.button-loading-overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:9px;left:0;right:0}small[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}return t})();export{Se as a};
1
+ import{b as X}from"./chunk-UTHIJK2F.js";import{n as j}from"./chunk-W2INV3O5.js";import{c as B,d as w,e as P,f as V,g as O,j as F,m as R,p as W,q as N,y as D,z as G}from"./chunk-4UVD743J.js";import{e as L}from"./chunk-DBUCH6BG.js";import{c as Q}from"./chunk-XLKKNOJ4.js";import{b as J}from"./chunk-3GTACTUQ.js";import{h as q,j as T,k as K}from"./chunk-IMTSM6HN.js";import{l as M}from"./chunk-GDFC3M3E.js";import{a as H,b as A}from"./chunk-FETTFNJ2.js";import{$c as I,Cc as s,Dc as l,Kb as _,Pb as f,Ub as n,Vb as o,Wb as d,_b as S,bc as b,cc as m,gb as i,h as v,ma as g,mc as p,nc as c,oc as C,tb as E,ua as h,va as x,w as y,yc as $,zb as z,zc as k}from"./chunk-6ZN4TBLM.js";var U=(t,u)=>({"is-valid":t,"is-invalid":u}),Z=t=>({"button-loading":t});function ee(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",3),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"button",5),b("click",function(){h(e);let a=m();return x(a.onClickGettingStarted())}),p(6),s(7,"translate"),o(),n(8,"small",6)(9,"a",7),b("click",function(){h(e);let a=m();return x(a.onClickRestoreBackup())}),p(10),s(11,"translate"),o()()()}t&2&&(i(3),c(l(4,3,"setup.welcome_to_homebridge")),i(3),C(" ",l(7,5,"setup.button_get_started")," "),i(4),c(l(11,7,"setup_wizard_message_restore")))}function te(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"div",9)(6,"p"),p(7),s(8,"translate"),o(),n(9,"form",10),b("ngSubmit",function(){h(e);let a=m();return x(a.createFirstUser())}),n(10,"div",11)(11,"span",12),d(12,"i",13),o(),d(13,"input",14),s(14,"translate"),o(),n(15,"div",11)(16,"span",12),d(17,"i",15),o(),d(18,"input",16),s(19,"translate"),o(),n(20,"div",17)(21,"span",12),d(22,"i",15),o(),d(23,"input",18),s(24,"translate"),o(),n(25,"div",19)(26,"button",20),p(27),s(28,"translate"),d(29,"i",21),o()()()()()}if(t&2){let e=m();i(3),c(l(4,15,"setup.create_account")),i(4),c(l(8,17,"setup.create_account_reason")),i(2),_("formGroup",e.createUserForm),i(4),_("placeholder",l(14,19,"users.label_username"))("readonly",e.loading)("ngClass",k(27,U,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid)),i(5),_("placeholder",l(19,21,"users.label_password"))("readonly",e.loading)("ngClass",k(30,U,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors)),i(5),_("placeholder",l(24,23,"users.label_confirm_password"))("readonly",e.loading)("ngClass",k(33,U,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors)),i(3),_("disabled",e.createUserForm.invalid||e.loading)("ngClass",$(36,Z,e.loading)),i(),C(" ",l(28,25,"setup.create_account")," ")}}function ie(t,u){t&1&&(n(0,"span"),d(1,"i",26),p(2),s(3,"translate"),o()),t&2&&(i(2),C(" ",l(3,1,"backup.label_uploading")," "))}function ne(t,u){t&1&&(p(0),s(1,"translate")),t&2&&C(" ",l(1,1,"backup.button_restore_backup")," ")}function oe(t,u){if(t&1){let e=S();n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"p"),p(6),s(7,"translate"),o(),n(8,"input",22),b("change",function(a){h(e);let Y=m();return x(Y.handleRestoreFileInput(a.target.files))}),o(),n(9,"div",23)(10,"button",24),b("click",function(){h(e);let a=m();return x(a.onClickCancelRestore())}),p(11),s(12,"translate"),o(),n(13,"button",25),b("click",function(){h(e);let a=m();return x(a.onRestoreBackupClick())}),z(14,ie,4,3,"span")(15,ne,2,3),o()()()}if(t&2){let e=m();i(3),c(l(4,7,"form.button_restore")),i(3),c(l(7,9,"backup.restore_help_one")),i(4),_("disabled",e.restoreUploading),i(),C(" ",l(12,11,"form.button_cancel")," "),i(2),_("disabled",e.restoreUploading||!e.selectedFile),i(),f(e.restoreUploading?14:-1),i(),f(e.restoreUploading?-1:15)}}function re(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",4),p(3),s(4,"translate"),o(),n(5,"h1"),d(6,"i",26),o()()),t&2&&(i(3),c(l(4,1,"restart.title_restart")))}function ae(t,u){t&1&&(n(0,"div",2),d(1,"img",8),n(2,"h3",27),p(3),s(4,"translate"),o(),n(5,"p",28),p(6),s(7,"translate"),o(),n(8,"a",29),p(9),s(10,"translate"),o()()),t&2&&(i(3),c(l(4,3,"setup_wizard_message_complete_title")),i(3),c(l(7,5,"setup_wizard_message_complete_message")),i(3),c(l(10,7,"setup.open_dashboard")))}var Se=(()=>{class t{$api=g(K);$auth=g(Q);$modal=g(j);$settings=g(J);$title=g(M);$toastr=g(q);$translate=g(H);previousTitle;step="welcome";createUserForm=new O({username:new F("",[w.required]),password:new F("",[w.compose([w.required,w.minLength(4)])]),passwordConfirm:new F("",[w.required])},this.matchPassword);loading=!1;selectedFile;restoreUploading=!1;constructor(){}ngOnInit(){this.previousTitle=this.$title.getTitle(),this.$title.setTitle("Setup Homebridge")}matchPassword(e){let r=e.get("password").value,a=e.get("passwordConfirm").value;if(r!==a)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}ngOnDestroy(){this.$title.setTitle(this.previousTitle)}onClickGettingStarted(){this.step="create-account"}onClickRestoreBackup(){this.step="restore-backup"}onClickCancelRestore(){this.selectedFile=null,this.step="welcome"}createFirstUser(){this.loading=!0;let e=this.createUserForm.getRawValue();e.name=e.username,this.$api.post("/setup-wizard/create-first-user",e).subscribe({next:()=>v(this,null,function*(){this.$settings.env.setupWizardComplete=!0,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}),error:r=>{this.loading=!1,console.error(r),this.$toastr.error(r.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?this.selectedFile=e[0]:delete this.selectedFile}onRestoreBackupClick(){this.restoreUploading=!0,this.uploadHomebridgeArchive()}uploadHomebridgeArchive(){return v(this,null,function*(){try{let e=yield y(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(T.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token;let r=new FormData;r.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield y(this.$api.post("/backup/restore",r)),this.openRestoreModal(),this.restoreUploading=!1}catch(e){this.restoreUploading=!1,console.error(e),this.$toastr.error(e.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}openRestoreModal(){let e=this.$modal.open(X,{size:"lg",backdrop:"static"});e.componentInstance.setupWizardRestore=!0,e.result.then(r=>{r===!0&&this.waitForHomebridgeToRestart()})}waitForHomebridgeToRestart(){return v(this,null,function*(){this.step="restarting",window.localStorage.removeItem(T.jwt.tokenKey),this.$auth.token=null,yield new Promise(r=>setTimeout(r,15e3));let e=setInterval(()=>v(this,null,function*(){try{yield y(this.$api.get("/auth/settings")),clearInterval(e),location.reload()}catch{}}),1e3)})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=E({type:t,selectors:[["ng-component"]],decls:7,vars:5,consts:[[1,"setup-container","d-flex","align-items-center","justify-content-center"],[1,"w-100","setup-card","d-flex","py-5"],[1,"w-100","d-flex","flex-column","align-items-center"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","mx-auto"],[1,"pt-4","pb-3","text-center"],["type","button",1,"btn","btn-lg","btn-primary",3,"click"],[1,"mt-3"],["href","javascript:void(0)",1,"grey-text",3,"click"],["src","/assets/homebridge-color-round.svg","alt","hb logo",1,"homebridge-logo","homebridge-logo-small","mx-auto"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"md-form","input-group","mb-3"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","prefix","grey-text"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"fas","fa-fw","fa-lock","prefix","grey-text"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"md-form","input-group","mb-4"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2",1,"form-control","py-2",3,"placeholder","readonly","ngClass"],[1,"w-100","text-center"],["type","submit",1,"btn","btn-primary",3,"disabled","ngClass"],[1,"button-loading-overlay","fas","fa-fw","fa-spinner","fa-pulse"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"form-control",3,"change"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ms-0",3,"click","disabled"],["type","button",1,"btn","btn-primary","me-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"pt-4","pb-3"],[1,"text-center"],["routerLink","/",1,"btn","btn-lg","btn-primary","mt-3"]],template:function(r,a){r&1&&(n(0,"div",0)(1,"div",1),z(2,ee,12,9,"div",2)(3,te,30,38,"div",2)(4,oe,16,13,"div",2)(5,re,7,3,"div",2)(6,ae,11,9,"div",2),o()()),r&2&&(i(2),f(a.step==="welcome"?2:-1),i(),f(a.step==="create-account"?3:-1),i(),f(a.step==="restore-backup"?4:-1),i(),f(a.step==="restarting"?5:-1),i(),f(a.step==="setup-complete"?6:-1))},dependencies:[D,R,B,P,V,G,W,N,I,L,A],styles:[".setup-container[_ngcontent-%COMP%]{background-size:cover;z-index:-1;padding-top:1em;padding-bottom:1em}@media screen and (min-height: 500px) and (min-width: 600px){.setup-container[_ngcontent-%COMP%]{padding-top:4em}}.setup-card[_ngcontent-%COMP%]{max-width:600px;border-radius:15px;background-color:#fff;padding-right:25px;padding-left:25px}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 600px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.homebridge-logo[_ngcontent-%COMP%]{margin-right:10px;height:200px}@media screen and (max-height: 500px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}@media screen and (max-width: 600px){.homebridge-logo[_ngcontent-%COMP%]{height:100px}}.homebridge-logo-small[_ngcontent-%COMP%]{height:50px}.button-loading[_ngcontent-%COMP%]{position:relative;color:#0000}.button-loading[_ngcontent-%COMP%] .button-loading-overlay[_ngcontent-%COMP%]{display:block;color:#fff}.button-loading-overlay[_ngcontent-%COMP%]{display:none;position:absolute;top:9px;left:0;right:0}small[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}return t})();export{Se as a};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-JCKLHHH2.js";import"./chunk-L5DJ2UTP.js";import"./chunk-DBUCH6BG.js";import"./chunk-XLKKNOJ4.js";import"./chunk-3GTACTUQ.js";import"./chunk-IMTSM6HN.js";import"./chunk-GDFC3M3E.js";import"./chunk-FETTFNJ2.js";import"./chunk-6ZN4TBLM.js";export{a as RestartComponent};
@@ -1 +1 @@
1
- import{a as _,b as D}from"./chunk-HKPESAZ3.js";import{j as c,k as S}from"./chunk-CAVXS647.js";import{f as x}from"./chunk-GDFC3M3E.js";import{C as v,Qc as I,g as O,ga as h,h as a,ha as E,ja as y,la as l,ma as f,r as p,ub as j,w as d,x as T,z as w}from"./chunk-6ZN4TBLM.js";var g=new y("JWT_OPTIONS"),m=(()=>{class r{constructor(e=null){this.tokenGetter=e&&e.tokenGetter||function(){}}urlBase64Decode(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:{t+="==";break}case 3:{t+="=";break}default:throw new Error("Illegal base64url string!")}return this.b64DecodeUnicode(t)}b64decode(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="";if(e=String(e).replace(/=+$/,""),e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let i=0,s,n,b=0;n=e.charAt(b++);~n&&(s=i%4?s*64+n:n,i++%4)?o+=String.fromCharCode(255&s>>(-2*i&6)):0)n=t.indexOf(n);return o}b64DecodeUnicode(e){return decodeURIComponent(Array.prototype.map.call(this.b64decode(e),t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join(""))}decodeToken(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._decodeToken(t)):this._decodeToken(e)}_decodeToken(e){if(!e||e==="")return null;let t=e.split(".");if(t.length!==3)throw new Error("The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.");let o=this.urlBase64Decode(t[1]);if(!o)throw new Error("Cannot decode the token.");return JSON.parse(o)}getTokenExpirationDate(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._getTokenExpirationDate(t)):this._getTokenExpirationDate(e)}_getTokenExpirationDate(e){let t;if(t=this.decodeToken(e),!t||!t.hasOwnProperty("exp"))return null;let o=new Date(0);return o.setUTCSeconds(t.exp),o}isTokenExpired(e=this.tokenGetter(),t){return e instanceof Promise?e.then(o=>this._isTokenExpired(o,t)):this._isTokenExpired(e,t)}_isTokenExpired(e,t){if(!e||e==="")return!0;let o=this.getTokenExpirationDate(e);return t=t||0,o===null?!1:!(o.valueOf()>new Date().valueOf()+t*1e3)}getAuthScheme(e,t){return typeof e=="function"?e(t):e}}return r.\u0275fac=function(e){return new(e||r)(l(g))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),$=r=>r instanceof Promise?v(()=>r):p(r),R=(()=>{class r{constructor(e,t,o){this.jwtHelper=t,this.document=o,this.standardPorts=["80","443"],this.tokenGetter=e.tokenGetter,this.headerName=e.headerName||"Authorization",this.authScheme=e.authScheme||e.authScheme===""?e.authScheme:"Bearer ",this.allowedDomains=e.allowedDomains||[],this.disallowedRoutes=e.disallowedRoutes||[],this.throwNoTokenError=e.throwNoTokenError||!1,this.skipWhenExpired=e.skipWhenExpired}isAllowedDomain(e){let t=new URL(e.url,this.document.location.origin);if(t.host===this.document.location.host)return!0;let o=`${t.hostname}${t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""}`;return this.allowedDomains.findIndex(i=>typeof i=="string"?i===o:i instanceof RegExp?i.test(o):!1)>-1}isDisallowedRoute(e){let t=new URL(e.url,this.document.location.origin);return this.disallowedRoutes.findIndex(o=>{if(typeof o=="string"){let i=new URL(o,this.document.location.origin);return i.hostname===t.hostname&&i.pathname===t.pathname}return o instanceof RegExp?o.test(e.url):!1})>-1}handleInterception(e,t,o){let i=this.jwtHelper.getAuthScheme(this.authScheme,t);if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");let s=p(!1);return this.skipWhenExpired&&(s=e?$(this.jwtHelper.isTokenExpired(e)):p(!0)),e?s.pipe(T(n=>n&&this.skipWhenExpired?t.clone():t.clone({setHeaders:{[this.headerName]:`${i}${e}`}})),w(n=>o.handle(n))):o.handle(t)}intercept(e,t){if(!this.isAllowedDomain(e)||this.isDisallowedRoute(e))return t.handle(e);let o=this.tokenGetter(e);return $(o).pipe(w(i=>this.handleInterception(i,e,t)))}}return r.\u0275fac=function(e){return new(e||r)(l(g),l(m),l(I))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),F=(()=>{class r{constructor(e){if(e)throw new Error("JwtModule is already loaded. It should only be imported in your application's main module.")}static forRoot(e){return{ngModule:r,providers:[{provide:x,useClass:R,multi:!0},e.jwtOptionsProvider||{provide:g,useValue:e.config},m]}}}return r.\u0275fac=function(e){return new(e||r)(l(r,12))},r.\u0275mod=j({type:r}),r.\u0275inj=E({}),r})();var k=O(_(),1);var q=(()=>{class r{$api=f(S);$jwtHelper=f(m);$settings=f(D);token;user={};logoutTimer;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield d(this.$api.post("/auth/login",e));if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(c.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield d(this.$api.post("/auth/noauth",{}));if(this.validateToken(e.access_token))window.localStorage.setItem(c.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,window.localStorage.removeItem(c.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield d(this.$settings.onSettingsLoaded));let e=window.localStorage.getItem(c.jwt.tokenKey);e&&this.validateToken(e)})}validateToken(e){try{return this.$jwtHelper.isTokenExpired(e,this.$settings.serverTimeOffset)&&this.logout(),this.user=this.$jwtHelper.decodeToken(e),this.token=e,this.setLogoutTimer(),!0}catch{return window.localStorage.removeItem(c.jwt.tokenKey),this.token=null,!1}}checkToken(){return a(this,null,function*(){try{return yield d(this.$api.get("/auth/check"))}catch(e){e.status===401&&(console.error("Current token is not valid"),this.logout())}})}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let t=(0,k.default)(this.$jwtHelper.getTokenExpirationDate(this.token)).diff((0,k.default)().add(this.$settings.serverTimeOffset,"s"),"millisecond");t<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),t))}}isLoggedIn(){return this.$settings.env.instanceId!==this.user.instanceId?(console.error("Token does not match instance"),!1):this.user&&this.token&&!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac})}return r})();export{m as a,F as b,q as c};
1
+ import{a as _,b as D}from"./chunk-3GTACTUQ.js";import{j as c,k as S}from"./chunk-IMTSM6HN.js";import{f as x}from"./chunk-GDFC3M3E.js";import{C as v,Qc as I,g as O,ga as h,h as a,ha as E,ja as y,la as l,ma as f,r as p,ub as j,w as d,x as T,z as w}from"./chunk-6ZN4TBLM.js";var g=new y("JWT_OPTIONS"),m=(()=>{class r{constructor(e=null){this.tokenGetter=e&&e.tokenGetter||function(){}}urlBase64Decode(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:{t+="==";break}case 3:{t+="=";break}default:throw new Error("Illegal base64url string!")}return this.b64DecodeUnicode(t)}b64decode(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="";if(e=String(e).replace(/=+$/,""),e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let i=0,s,n,b=0;n=e.charAt(b++);~n&&(s=i%4?s*64+n:n,i++%4)?o+=String.fromCharCode(255&s>>(-2*i&6)):0)n=t.indexOf(n);return o}b64DecodeUnicode(e){return decodeURIComponent(Array.prototype.map.call(this.b64decode(e),t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join(""))}decodeToken(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._decodeToken(t)):this._decodeToken(e)}_decodeToken(e){if(!e||e==="")return null;let t=e.split(".");if(t.length!==3)throw new Error("The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.");let o=this.urlBase64Decode(t[1]);if(!o)throw new Error("Cannot decode the token.");return JSON.parse(o)}getTokenExpirationDate(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._getTokenExpirationDate(t)):this._getTokenExpirationDate(e)}_getTokenExpirationDate(e){let t;if(t=this.decodeToken(e),!t||!t.hasOwnProperty("exp"))return null;let o=new Date(0);return o.setUTCSeconds(t.exp),o}isTokenExpired(e=this.tokenGetter(),t){return e instanceof Promise?e.then(o=>this._isTokenExpired(o,t)):this._isTokenExpired(e,t)}_isTokenExpired(e,t){if(!e||e==="")return!0;let o=this.getTokenExpirationDate(e);return t=t||0,o===null?!1:!(o.valueOf()>new Date().valueOf()+t*1e3)}getAuthScheme(e,t){return typeof e=="function"?e(t):e}}return r.\u0275fac=function(e){return new(e||r)(l(g))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),$=r=>r instanceof Promise?v(()=>r):p(r),R=(()=>{class r{constructor(e,t,o){this.jwtHelper=t,this.document=o,this.standardPorts=["80","443"],this.tokenGetter=e.tokenGetter,this.headerName=e.headerName||"Authorization",this.authScheme=e.authScheme||e.authScheme===""?e.authScheme:"Bearer ",this.allowedDomains=e.allowedDomains||[],this.disallowedRoutes=e.disallowedRoutes||[],this.throwNoTokenError=e.throwNoTokenError||!1,this.skipWhenExpired=e.skipWhenExpired}isAllowedDomain(e){let t=new URL(e.url,this.document.location.origin);if(t.host===this.document.location.host)return!0;let o=`${t.hostname}${t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""}`;return this.allowedDomains.findIndex(i=>typeof i=="string"?i===o:i instanceof RegExp?i.test(o):!1)>-1}isDisallowedRoute(e){let t=new URL(e.url,this.document.location.origin);return this.disallowedRoutes.findIndex(o=>{if(typeof o=="string"){let i=new URL(o,this.document.location.origin);return i.hostname===t.hostname&&i.pathname===t.pathname}return o instanceof RegExp?o.test(e.url):!1})>-1}handleInterception(e,t,o){let i=this.jwtHelper.getAuthScheme(this.authScheme,t);if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");let s=p(!1);return this.skipWhenExpired&&(s=e?$(this.jwtHelper.isTokenExpired(e)):p(!0)),e?s.pipe(T(n=>n&&this.skipWhenExpired?t.clone():t.clone({setHeaders:{[this.headerName]:`${i}${e}`}})),w(n=>o.handle(n))):o.handle(t)}intercept(e,t){if(!this.isAllowedDomain(e)||this.isDisallowedRoute(e))return t.handle(e);let o=this.tokenGetter(e);return $(o).pipe(w(i=>this.handleInterception(i,e,t)))}}return r.\u0275fac=function(e){return new(e||r)(l(g),l(m),l(I))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),F=(()=>{class r{constructor(e){if(e)throw new Error("JwtModule is already loaded. It should only be imported in your application's main module.")}static forRoot(e){return{ngModule:r,providers:[{provide:x,useClass:R,multi:!0},e.jwtOptionsProvider||{provide:g,useValue:e.config},m]}}}return r.\u0275fac=function(e){return new(e||r)(l(r,12))},r.\u0275mod=j({type:r}),r.\u0275inj=E({}),r})();var k=O(_(),1);var q=(()=>{class r{$api=f(S);$jwtHelper=f(m);$settings=f(D);token;user={};logoutTimer;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield d(this.$api.post("/auth/login",e));if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(c.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield d(this.$api.post("/auth/noauth",{}));if(this.validateToken(e.access_token))window.localStorage.setItem(c.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,window.localStorage.removeItem(c.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield d(this.$settings.onSettingsLoaded));let e=window.localStorage.getItem(c.jwt.tokenKey);e&&this.validateToken(e)})}validateToken(e){try{return this.$jwtHelper.isTokenExpired(e,this.$settings.serverTimeOffset)&&this.logout(),this.user=this.$jwtHelper.decodeToken(e),this.token=e,this.setLogoutTimer(),!0}catch{return window.localStorage.removeItem(c.jwt.tokenKey),this.token=null,!1}}checkToken(){return a(this,null,function*(){try{return yield d(this.$api.get("/auth/check"))}catch(e){e.status===401&&(console.error("Current token is not valid"),this.logout())}})}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let t=(0,k.default)(this.$jwtHelper.getTokenExpirationDate(this.token)).diff((0,k.default)().add(this.$settings.serverTimeOffset,"s"),"millisecond");t<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),t))}}isLoggedIn(){return this.$settings.env.instanceId!==this.user.instanceId?(console.error("Token does not match instance"),!1):this.user&&this.token&&!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac})}return r})();export{m as a,F as b,q as c};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-J2A3PKBA.js";import"./chunk-TVADH2OL.js";import"./chunk-3NAAMMFZ.js";import"./chunk-44K5XVZH.js";import"./chunk-L5DJ2UTP.js";import"./chunk-XLKKNOJ4.js";import"./chunk-3GTACTUQ.js";import"./chunk-IMTSM6HN.js";import"./chunk-GDFC3M3E.js";import"./chunk-FETTFNJ2.js";import"./chunk-6ZN4TBLM.js";export{a as TerminalComponent};