homebridge-config-ui-x 5.12.1-beta.5 → 5.12.1-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/platforms/linux.js.map +1 -1
- package/package.json +2 -2
- package/public/3rdpartylicenses.txt +13 -1
- package/public/{chunk-4P4VAV7I.js → chunk-22Z225AS.js} +1 -1
- package/public/chunk-2F2PDTDB.js +1 -0
- package/public/{chunk-A5JF6PDD.js → chunk-2HD3TOVY.js} +1 -1
- package/public/{chunk-HMF2EYMY.js → chunk-2JLK533I.js} +1 -1
- package/public/{chunk-TR77UVYU.js → chunk-2R4HORTN.js} +1 -1
- package/public/{chunk-UH3C2FAE.js → chunk-2U3YDOKK.js} +1 -1
- package/public/{chunk-TV5ACJCB.js → chunk-35FSDYCY.js} +1 -1
- package/public/{chunk-E55EDX5Y.js → chunk-3RTPACYF.js} +1 -1
- package/public/chunk-3T6KISS2.js +1 -0
- package/public/chunk-3TO3C4MF.js +1 -0
- package/public/{chunk-WGTVNYII.js → chunk-3TYXDC2O.js} +1 -1
- package/public/{chunk-4BX7KSQH.js → chunk-3X54YJUZ.js} +1 -1
- package/public/{chunk-BRGXDZZE.js → chunk-4IJDU5W2.js} +1 -1
- package/public/chunk-4RSOPME5.js +1 -0
- package/public/chunk-57L4H7AA.js +1 -0
- package/public/chunk-5G2OIZ66.js +1 -0
- package/public/{chunk-LR2GN2Y2.js → chunk-5GNJNTLA.js} +1 -1
- package/public/{chunk-IHAA5URA.js → chunk-6VNMVWFY.js} +1 -1
- package/public/chunk-732GW26P.js +1 -0
- package/public/{chunk-AHIRH7NQ.js → chunk-7LZXNMQ7.js} +1 -1
- package/public/chunk-7QNFIL7X.js +1 -0
- package/public/{chunk-3BODPB3K.js → chunk-ALTMINMJ.js} +1 -1
- package/public/{chunk-2QSUQ4VI.js → chunk-AWY7TUU4.js} +1 -1
- package/public/{chunk-XTQWZF3J.js → chunk-AYPSIX2K.js} +1 -1
- package/public/chunk-B37HWUCD.js +1 -0
- package/public/{chunk-NYEZF6Y3.js → chunk-BAWF37TF.js} +1 -1
- package/public/{chunk-RDHUW73W.js → chunk-BNNKKGLH.js} +1 -1
- package/public/{chunk-J56ZFHCF.js → chunk-BT3EMPD7.js} +1 -1
- package/public/chunk-BWJIQBIJ.js +1 -0
- package/public/{chunk-X66UFY6K.js → chunk-CU6MTMVY.js} +1 -1
- package/public/chunk-DH5YBYHN.js +92 -0
- package/public/{chunk-5QHRLSAE.js → chunk-DO2QQ27Z.js} +1 -1
- package/public/chunk-DRY2ILHE.js +1 -0
- package/public/chunk-DSI2TVUT.js +1 -0
- package/public/{chunk-DUPASTS2.js → chunk-FDGOZLRL.js} +1 -1
- package/public/{chunk-VWUZDCBZ.js → chunk-FLS573AD.js} +2 -2
- package/public/{chunk-MAJDTCMY.js → chunk-GET4TOQ7.js} +1 -1
- package/public/{chunk-C64AHVUO.js → chunk-GIBUKDL3.js} +1 -1
- package/public/{chunk-HH2FDI7W.js → chunk-HOWYXHPL.js} +1 -1
- package/public/{chunk-UVWXUC5Y.js → chunk-I5AP453W.js} +1 -1
- package/public/chunk-I7YFJOCI.js +1 -0
- package/public/{chunk-3NHWMCB7.js → chunk-IBPLHJH5.js} +1 -1
- package/public/chunk-IMAK4R64.js +1 -0
- package/public/chunk-IRXJL347.js +1 -0
- package/public/{chunk-YDYBCBXX.js → chunk-IVGUGJ5O.js} +1 -1
- package/public/{chunk-VFMCVZHO.js → chunk-J33KCONB.js} +1 -1
- package/public/{chunk-QGJKMFM5.js → chunk-J3GYRR3Q.js} +1 -1
- package/public/{chunk-F5MBSCH4.js → chunk-JJ5CEM72.js} +3 -3
- package/public/{chunk-NPMJGEDY.js → chunk-JV4CFTMO.js} +1 -1
- package/public/{chunk-RMDVYT7X.js → chunk-LK5Y5NQ2.js} +1 -1
- package/public/{chunk-664C4LX2.js → chunk-LMM3BN25.js} +1 -1
- package/public/chunk-LMQIRO2C.js +1 -0
- package/public/chunk-LMWHU5BN.js +1 -0
- package/public/{chunk-5QQ2XMII.js → chunk-LVC2MQ7H.js} +1 -1
- package/public/chunk-MIRW6W7S.js +1 -0
- package/public/{chunk-F2HGBWZZ.js → chunk-MM3ZUHP2.js} +1 -1
- package/public/{chunk-Z2RGI4BU.js → chunk-MOTTUPLZ.js} +1 -1
- package/public/chunk-MQWN43LI.js +1 -0
- package/public/{chunk-5A2G7KDR.js → chunk-MRHB36HC.js} +1 -1
- package/public/chunk-MW5T6P3D.js +1 -0
- package/public/chunk-MXDOJJGQ.js +1 -0
- package/public/{chunk-KIFEAONI.js → chunk-MZA3FXYW.js} +1 -1
- package/public/{chunk-JPAZUSRO.js → chunk-N5Z4CTHV.js} +1 -1
- package/public/chunk-NO3WWNTD.js +1 -0
- package/public/{chunk-6U3YEWBO.js → chunk-NX25VUHB.js} +1 -1
- package/public/chunk-O4RPRD43.js +1 -0
- package/public/{chunk-4OEYZBSF.js → chunk-OCNA6V4W.js} +1 -1
- package/public/chunk-ON7YXJNY.js +1 -0
- package/public/{chunk-IXMOGLOS.js → chunk-P4ODKUQK.js} +1 -1
- package/public/{chunk-3LY5FRVV.js → chunk-PCRT3CPH.js} +1 -1
- package/public/chunk-PSTNNJB4.js +1 -0
- package/public/chunk-Q2RBJQKF.js +36 -0
- package/public/{chunk-2K66PSKD.js → chunk-Q7FTVGEO.js} +1 -1
- package/public/chunk-QJULMVF4.js +1 -0
- package/public/{chunk-V45KU64F.js → chunk-QMHMKWPA.js} +1 -1
- package/public/{chunk-65AW3ZMH.js → chunk-QPIMSYGY.js} +1 -1
- package/public/{chunk-CAY6MDP6.js → chunk-QWCGYWQP.js} +1 -1
- package/public/{chunk-VCWYDWAJ.js → chunk-R2AXYPVZ.js} +1 -1
- package/public/{chunk-ATJM3XYR.js → chunk-SAZ3DI6M.js} +1 -1
- package/public/{chunk-M3DSUNBG.js → chunk-SDK5Z2TS.js} +1 -1
- package/public/{chunk-OTMZDL7S.js → chunk-SGI3H2QJ.js} +1 -1
- package/public/chunk-SHOIYREX.js +1 -0
- package/public/{chunk-RWABUVQY.js → chunk-T43ZT3B7.js} +1 -1
- package/public/{chunk-XUP37AHQ.js → chunk-TLUSFONS.js} +5 -5
- package/public/{chunk-2DRLNNDM.js → chunk-U5APV4HQ.js} +1 -1
- package/public/chunk-UKJBJA6I.js +1 -0
- package/public/chunk-URPE4YWQ.js +1 -0
- package/public/{chunk-DJGU4NTG.js → chunk-UU7UROHF.js} +1 -1
- package/public/{chunk-UHG23NUX.js → chunk-UUDM2ZE6.js} +1 -1
- package/public/{chunk-H7F7H5MW.js → chunk-V62JRIHN.js} +1 -1
- package/public/{chunk-FNRDBHYN.js → chunk-V6SS3LLE.js} +1 -1
- package/public/{chunk-BZLBFDQG.js → chunk-VG77PUXT.js} +1 -1
- package/public/chunk-VJN6YUS2.js +1 -0
- package/public/{chunk-Y6B4ENQ3.js → chunk-VKVESOYG.js} +1 -1
- package/public/{chunk-CP2QJXVO.js → chunk-WFW4V5CB.js} +1 -1
- package/public/{chunk-AY35X64S.js → chunk-WTYHWUIV.js} +1 -1
- package/public/{chunk-VV4S6PBO.js → chunk-WTZQODSR.js} +1 -1
- package/public/{chunk-DOJGHPYJ.js → chunk-WVBGE4PG.js} +1 -1
- package/public/{chunk-PTJ3UZME.js → chunk-X35N33BQ.js} +1 -1
- package/public/{chunk-GDBXX4WT.js → chunk-X4YYP2LR.js} +2 -2
- package/public/{chunk-YCASP3MF.js → chunk-X5XGTC24.js} +1 -1
- package/public/{chunk-S2GJNEOI.js → chunk-XBR7SSMW.js} +1 -1
- package/public/chunk-YASBCOYX.js +1 -0
- package/public/{chunk-FLCYKKEZ.js → chunk-YBWJOGCK.js} +1 -1
- package/public/{chunk-QSXJHCTT.js → chunk-YD4U26CQ.js} +1 -1
- package/public/chunk-YKLNKZD5.js +2 -0
- package/public/chunk-YLQLLNQ6.js +1 -0
- package/public/chunk-YWTJYVRK.js +1 -0
- package/public/{chunk-Q5X66PGK.js → chunk-YXAXWARF.js} +1 -1
- package/public/chunk-Z35VSD7C.js +5 -0
- package/public/{chunk-NTQWCIIF.js → chunk-ZBOWFMAD.js} +1 -1
- package/public/chunk-ZEBL4YGF.js +19 -0
- package/public/{chunk-3YXAYQFV.js → chunk-ZIFXCMBJ.js} +1 -1
- package/public/{chunk-DCBZUBGA.js → chunk-ZONYERCP.js} +1 -1
- package/public/{chunk-KEESKHLN.js → chunk-ZRGZJ2SE.js} +1 -1
- package/public/index.html +2 -2
- package/public/{main-QHHXZV7U.js → main-JPI6JIAY.js} +1 -1
- package/public/styles-SBKKVTID.css +1 -0
- package/public/chunk-2FKL7WTN.js +0 -1
- package/public/chunk-3B3NAPXD.js +0 -1
- package/public/chunk-3BOXIXZY.js +0 -1
- package/public/chunk-3N3RJBS3.js +0 -19
- package/public/chunk-6KHLSYCO.js +0 -1
- package/public/chunk-7GUHWJ4X.js +0 -1
- package/public/chunk-7JD74YRM.js +0 -1
- package/public/chunk-AST2OLG2.js +0 -1
- package/public/chunk-AZLCZPTC.js +0 -1
- package/public/chunk-B4AJQJMI.js +0 -1
- package/public/chunk-BJV2F6QZ.js +0 -1
- package/public/chunk-BMOLDRJ3.js +0 -9
- package/public/chunk-BUZBTHD2.js +0 -1
- package/public/chunk-C5CMRH2U.js +0 -1
- package/public/chunk-CXSRVC7V.js +0 -1
- package/public/chunk-DQVHBQLA.js +0 -1
- package/public/chunk-FH62LNHX.js +0 -35
- package/public/chunk-GYM2PPGX.js +0 -1
- package/public/chunk-H2UKSDHZ.js +0 -1
- package/public/chunk-HBK7LF6W.js +0 -1
- package/public/chunk-JBILFYTL.js +0 -1
- package/public/chunk-K3WEJJSS.js +0 -2
- package/public/chunk-KDXP3F5S.js +0 -1
- package/public/chunk-KYBKIBTT.js +0 -1
- package/public/chunk-LINXSUG2.js +0 -1
- package/public/chunk-LPJ4GDP3.js +0 -1
- package/public/chunk-LPWY3RKY.js +0 -1
- package/public/chunk-MUHHYXFN.js +0 -1
- package/public/chunk-MVT3BOGV.js +0 -5
- package/public/chunk-N6F32H34.js +0 -1
- package/public/chunk-NPABPWX3.js +0 -1
- package/public/chunk-OU66C3M2.js +0 -1
- package/public/chunk-P67JXXO4.js +0 -1
- package/public/chunk-UPP5DT2A.js +0 -1
- package/public/chunk-VV4LXPCS.js +0 -1
- package/public/chunk-XYVW562Y.js +0 -1
- package/public/chunk-ZPKMGNNM.js +0 -1
- package/public/chunk-ZVU2KU6A.js +0 -1
- package/public/styles-WJHG5ONB.css +0 -1
package/public/chunk-GYM2PPGX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-FLCYKKEZ.js";import"./chunk-B4AJQJMI.js";export default a();
|
package/public/chunk-H2UKSDHZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as pe}from"./chunk-664C4LX2.js";import{H as le}from"./chunk-VWUZDCBZ.js";import{X as fe,aa as ue,c as he,d as X}from"./chunk-F5MBSCH4.js";import{f as We}from"./chunk-B4AJQJMI.js";var d=Object.create(null);d.open="0";d.close="1";d.ping="2";d.pong="3";d.message="4";d.upgrade="5";d.noop="6";var S=Object.create(null);Object.keys(d).forEach(r=>{S[d[r]]=r});var O={type:"error",data:"parser error"};var ye=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ge=typeof ArrayBuffer=="function",_e=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,B=({type:r,data:e},t,s)=>ye&&e instanceof Blob?t?s(e):de(e,s):ge&&(e instanceof ArrayBuffer||_e(e))?t?s(e):de(new Blob([e]),s):s(d[r]+(e||"")),de=(r,e)=>{let t=new FileReader;return t.onload=function(){let s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(r)};function me(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}var $;function be(r,e){if(ye&&r.data instanceof Blob)return r.data.arrayBuffer().then(me).then(e);if(ge&&(r.data instanceof ArrayBuffer||_e(r.data)))return e(me(r.data));B(r,!1,t=>{$||($=new TextEncoder),e($.encode(t))})}var we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<we.length;r++)N[we.charCodeAt(r)]=r;var ke=r=>{let e=r.length*.75,t=r.length,s,i=0,n,o,c,a;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);let m=new ArrayBuffer(e),p=new Uint8Array(m);for(s=0;s<t;s+=4)n=N[r.charCodeAt(s)],o=N[r.charCodeAt(s+1)],c=N[r.charCodeAt(s+2)],a=N[r.charCodeAt(s+3)],p[i++]=n<<2|o>>4,p[i++]=(o&15)<<4|c>>2,p[i++]=(c&3)<<6|a&63;return m};var Ke=typeof ArrayBuffer=="function",L=(r,e)=>{if(typeof r!="string")return{type:"message",data:Ee(r,e)};let t=r.charAt(0);return t==="b"?{type:"message",data:Ye(r.substring(1),e)}:S[t]?r.length>1?{type:S[t],data:r.substring(1)}:{type:S[t]}:O},Ye=(r,e)=>{if(Ke){let t=ke(r);return Ee(t,e)}else return{base64:!0,data:r}},Ee=(r,e)=>{switch(e){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}};var ve="",xe=(r,e)=>{let t=r.length,s=new Array(t),i=0;r.forEach((n,o)=>{B(n,!1,c=>{s[o]=c,++i===t&&e(s.join(ve))})})},Te=(r,e)=>{let t=r.split(ve),s=[];for(let i=0;i<t.length;i++){let n=L(t[i],e);if(s.push(n),n.type==="error")break}return s};function Ae(){return new TransformStream({transform(r,e){be(r,t=>{let s=t.length,i;if(s<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,s);else if(s<65536){i=new Uint8Array(3);let n=new DataView(i.buffer);n.setUint8(0,126),n.setUint16(1,s)}else{i=new Uint8Array(9);let n=new DataView(i.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(s))}r.data&&typeof r.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}var Q;function U(r){return r.reduce((e,t)=>e+t.length,0)}function V(r,e){if(r[0].length===e)return r.shift();let t=new Uint8Array(e),s=0;for(let i=0;i<e;i++)t[i]=r[0][s++],s===r[0].length&&(r.shift(),s=0);return r.length&&s<r[0].length&&(r[0]=r[0].slice(s)),t}function Re(r,e){Q||(Q=new TextDecoder);let t=[],s=0,i=-1,n=!1;return new TransformStream({transform(o,c){for(t.push(o);;){if(s===0){if(U(t)<1)break;let a=V(t,1);n=(a[0]&128)===128,i=a[0]&127,i<126?s=3:i===126?s=1:s=2}else if(s===1){if(U(t)<2)break;let a=V(t,2);i=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),s=3}else if(s===2){if(U(t)<8)break;let a=V(t,8),m=new DataView(a.buffer,a.byteOffset,a.length),p=m.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(O);break}i=p*Math.pow(2,32)+m.getUint32(4),s=3}else{if(U(t)<i)break;let a=V(t,i);c.enqueue(L(n?a:Q.decode(a),e)),s=0}if(i===0||i>r){c.enqueue(O);break}}}})}var j=4;function f(r){if(r)return Je(r)}function Je(r){for(var e in f.prototype)r[e]=f.prototype[e];return r}f.prototype.on=f.prototype.addEventListener=function(r,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(e),this};f.prototype.once=function(r,e){function t(){this.off(r,t),e.apply(this,arguments)}return t.fn=e,this.on(r,t),this};f.prototype.off=f.prototype.removeListener=f.prototype.removeAllListeners=f.prototype.removeEventListener=function(r,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+r];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var s,i=0;i<t.length;i++)if(s=t[i],s===e||s.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+r],this};f.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+r],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,i=t.length;s<i;++s)t[s].apply(this,e)}return this};f.prototype.emitReserved=f.prototype.emit;f.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};f.prototype.hasListeners=function(r){return!!this.listeners(r).length};var y=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),u=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Ce="arraybuffer";function M(r,...e){return e.reduce((t,s)=>(r.hasOwnProperty(s)&&(t[s]=r[s]),t),{})}var ze=u.setTimeout,Xe=u.clearTimeout;function g(r,e){e.useNativeTimers?(r.setTimeoutFn=ze.bind(u),r.clearTimeoutFn=Xe.bind(u)):(r.setTimeoutFn=u.setTimeout.bind(u),r.clearTimeoutFn=u.clearTimeout.bind(u))}var $e=1.33;function Se(r){return typeof r=="string"?Qe(r):Math.ceil((r.byteLength||r.size)*$e)}function Qe(r){let e=0,t=0;for(let s=0,i=r.length;s<i;s++)e=r.charCodeAt(s),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(s++,t+=4);return t}function H(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Oe(r){let e="";for(let t in r)r.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(r[t]));return e}function Be(r){let e={},t=r.split("&");for(let s=0,i=t.length;s<i;s++){let n=t[s].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}var W=class extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}},_=class extends f{constructor(e){super(),this.writable=!1,g(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new W(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let t=L(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let t=Oe(e);return t.length?"?"+t:""}};var P=class extends _{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||t()})),this.writable||(s++,this.once("drain",function(){--s||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let t=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Te(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,xe(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=H()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}};var Ne=!1;try{Ne=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Le=Ne;function je(){}var G=class extends P{constructor(e){if(super(e),typeof location<"u"){let t=location.protocol==="https:",s=location.port;s||(s=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){let s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(i,n)=>{this.onError("xhr post error",i,n)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,s)=>{this.onError("xhr poll error",t,s)}),this.pollXhr=e}},K=(()=>{class r extends f{constructor(t,s,i){super(),this.createRequest=t,g(this,i),this._opts=i,this._method=i.method||"GET",this._uri=s,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;let s=M(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;let i=this._xhr=this.createRequest(s);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&i.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var n;i.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=r.requestsCount++,r.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=je,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete r.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}return r.requestsCount=0,r.requests={},r})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Pe);else if(typeof addEventListener=="function"){let r="onpagehide"in u?"pagehide":"unload";addEventListener(r,Pe,!1)}}function Pe(){for(let r in K.requests)K.requests.hasOwnProperty(r)&&K.requests[r].abort()}var Ge=(function(){let r=qe({xdomain:!1});return r&&r.responseType!==null})(),w=class extends G{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=Ge&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new K(qe,this.uri(),e)}};function qe(r){let e=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Le))return new XMLHttpRequest}catch{}if(!e)try{return new u[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var De=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",ee=class extends _{get name(){return"websocket"}doOpen(){let e=this.uri(),t=this.opts.protocols,s=De?{}:M(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let s=e[t],i=t===e.length-1;B(s,this.supportsBinary,n=>{try{this.doWrite(s,n)}catch{}i&&y(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=H()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},Z=u.WebSocket||u.MozWebSocket,k=class extends ee{createSocket(e,t,s){return De?new Z(e,t,s):t?new Z(e,t):new Z(e)}doWrite(e,t){this.ws.send(t)}};var v=class extends _{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=Re(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=Ae();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();let n=()=>{s.read().then(({done:c,value:a})=>{c||(this.onPacket(a),n())}).catch(c=>{})};n();let o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let s=e[t],i=t===e.length-1;this._writer.write(s).then(()=>{i&&y(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var te={websocket:k,webtransport:v,polling:w};var Ze=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,et=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function x(r){if(r.length>8e3)throw"URI too long";let e=r,t=r.indexOf("["),s=r.indexOf("]");t!=-1&&s!=-1&&(r=r.substring(0,t)+r.substring(t,s).replace(/:/g,";")+r.substring(s,r.length));let i=Ze.exec(r||""),n={},o=14;for(;o--;)n[et[o]]=i[o]||"";return t!=-1&&s!=-1&&(n.source=e,n.host=n.host.substring(1,n.host.length-1).replace(/;/g,":"),n.authority=n.authority.replace("[","").replace("]","").replace(/;/g,":"),n.ipv6uri=!0),n.pathNames=tt(n,n.path),n.queryKey=st(n,n.query),n}function tt(r,e){let t=/\/{2,9}/g,s=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function st(r,e){let t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,n){i&&(t[i]=n)}),t}var se=typeof addEventListener=="function"&&typeof removeEventListener=="function",Y=[];se&&addEventListener("offline",()=>{Y.forEach(r=>r())},!1);var J=(()=>{class r extends f{constructor(t,s){if(super(),this.binaryType=Ce,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){let i=x(t);s.hostname=i.host,s.secure=i.protocol==="https"||i.protocol==="wss",s.port=i.port,i.query&&(s.query=i.query)}else s.host&&(s.hostname=x(s.host).host);g(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(i=>{let n=i.prototype.name;this.transports.push(n),this._transportsByName[n]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Be(this.opts.query)),se&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Y.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let s=Object.assign({},this.opts.query);s.EIO=j,s.transport=t,this.id&&(s.sid=this.id);let i=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",r.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let i=0;i<this.writeBuffer.length;i++){let n=this.writeBuffer[i].data;if(n&&(s+=Se(n)),i>0&&s>this._maxPayload)return this.writeBuffer.slice(0,i);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,y(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,i){return this._sendPacket("message",t,s,i),this}send(t,s,i){return this._sendPacket("message",t,s,i),this}_sendPacket(t,s,i,n){if(typeof s=="function"&&(n=s,s=void 0),typeof i=="function"&&(n=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;let o={type:t,data:s,options:i};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},i=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(r.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),se&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let i=Y.indexOf(this._offlineEventListener);i!==-1&&Y.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}return r.protocol=j,r})(),z=class extends J{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;J.priorWebsocketSuccess=!1;let i=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",b=>{if(!s)if(b.type==="pong"&&b.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;J.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(p(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{let C=new Error("probe error");C.transport=t.name,this.emitReserved("upgradeError",C)}}))};function n(){s||(s=!0,p(),t.close(),t=null)}let o=b=>{let C=new Error("probe error: "+b);C.transport=t.name,n(),this.emitReserved("upgradeError",C)};function c(){o("transport closed")}function a(){o("socket closed")}function m(b){t&&b.name!==t.name&&n()}let p=()=>{t.removeListener("open",i),t.removeListener("error",o),t.removeListener("close",c),this.off("close",a),this.off("upgrading",m)};t.once("open",i),t.once("error",o),t.once("close",c),this.once("close",a),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}},T=class extends z{constructor(e,t={}){let s=typeof e=="object"?e:t;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(i=>te[i]).filter(i=>!!i)),super(e,s)}};var ds=T.protocol;function Fe(r,e="",t){let s=r;t=t||typeof location<"u"&&location,r==null&&(r=t.protocol+"//"+t.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=t.protocol+r:r=t.host+r),/^(https?|wss?):\/\//.test(r)||(typeof t<"u"?r=t.protocol+"//"+r:r="https://"+r),s=x(r)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";let n=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+n+":"+s.port+e,s.href=s.protocol+"://"+n+(t&&t.port===s.port?"":":"+s.port),s}var ae={};We(ae,{Decoder:()=>oe,Encoder:()=>ne,PacketType:()=>h,protocol:()=>He});var it=typeof ArrayBuffer=="function",nt=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,Ie=Object.prototype.toString,ot=typeof Blob=="function"||typeof Blob<"u"&&Ie.call(Blob)==="[object BlobConstructor]",ct=typeof File=="function"||typeof File<"u"&&Ie.call(File)==="[object FileConstructor]";function D(r){return it&&(r instanceof ArrayBuffer||nt(r))||ot&&r instanceof Blob||ct&&r instanceof File}function q(r,e){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let t=0,s=r.length;t<s;t++)if(q(r[t]))return!0;return!1}if(D(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return q(r.toJSON(),!0);for(let t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&q(r[t]))return!0;return!1}function Ue(r){let e=[],t=r.data,s=r;return s.data=re(t,e),s.attachments=e.length,{packet:s,buffers:e}}function re(r,e){if(!r)return r;if(D(r)){let t={_placeholder:!0,num:e.length};return e.push(r),t}else if(Array.isArray(r)){let t=new Array(r.length);for(let s=0;s<r.length;s++)t[s]=re(r[s],e);return t}else if(typeof r=="object"&&!(r instanceof Date)){let t={};for(let s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=re(r[s],e));return t}return r}function Ve(r,e){return r.data=ie(r.data,e),delete r.attachments,r}function ie(r,e){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<e.length)return e[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]=ie(r[t],e);else if(typeof r=="object")for(let t in r)Object.prototype.hasOwnProperty.call(r,t)&&(r[t]=ie(r[t],e));return r}var at=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],He=5,h=(function(r){return r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK",r})(h||{}),ne=class{constructor(e){this.replacer=e}encode(e){return(e.type===h.EVENT||e.type===h.ACK)&&q(e)?this.encodeAsBinary({type:e.type===h.EVENT?h.BINARY_EVENT:h.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===h.BINARY_EVENT||e.type===h.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=Ue(e),s=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(s),i}};function Me(r){return Object.prototype.toString.call(r)==="[object Object]"}var oe=class r extends f{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);let s=t.type===h.BINARY_EVENT;s||t.type===h.BINARY_ACK?(t.type=s?h.EVENT:h.ACK,this.reconstructor=new ce(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(D(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0,s={type:Number(e.charAt(0))};if(h[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===h.BINARY_EVENT||s.type===h.BINARY_ACK){let n=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);let o=e.substring(n,t);if(o!=Number(o)||e.charAt(t)!=="-")throw new Error("Illegal attachments");s.attachments=Number(o)}if(e.charAt(t+1)==="/"){let n=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(n,t)}else s.nsp="/";let i=e.charAt(t+1);if(i!==""&&Number(i)==i){let n=t+1;for(;++t;){let o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}s.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){let n=this.tryParse(e.substr(t));if(r.isPayloadValid(s.type,n))s.data=n;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case h.CONNECT:return Me(t);case h.DISCONNECT:return t===void 0;case h.CONNECT_ERROR:return typeof t=="string"||Me(t);case h.EVENT:case h.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&at.indexOf(t[0])===-1);case h.ACK:case h.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},ce=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let t=Ve(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function l(r,e,t){return r.on(e,t),function(){r.off(e,t)}}var ht=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),A=class extends f{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[l(e,"open",this.onopen.bind(this)),l(e,"packet",this.onpacket.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,i,n;if(ht.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let o={type:h.EVENT,data:t};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){let p=this.ids++,b=t.pop();this._registerAckCallback(p,b),o.id=p}let c=(i=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||i===void 0?void 0:i.writable,a=this.connected&&!(!((n=this.io.engine)===null||n===void 0)&&n._hasPingExpired());return this.flags.volatile&&!c||(a?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var s;let i=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===e&&this.sendBuffer.splice(c,1);t.call(this,new Error("operation has timed out"))},i),o=(...c)=>{this.io.clearTimeoutFn(n),t.apply(this,c)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((s,i)=>{let n=(o,c)=>o?i(o):s(c);n.withError=!0,t.push(n),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());let s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...n)=>s!==this._queue[0]?void 0:(i!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...n)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:h.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){let s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case h.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case h.EVENT:case h.BINARY_EVENT:this.onevent(e);break;case h.ACK:case h.BINARY_ACK:this.onack(e);break;case h.DISCONNECT:this.ondisconnect();break;case h.CONNECT_ERROR:this.destroy();let s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,s=!1;return function(...i){s||(s=!0,t.packet({type:h.ACK,id:e,data:i}))}}onack(e){let t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:h.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let s of t)s.apply(this,e.data)}}};function E(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}E.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*r);r=(Math.floor(e*10)&1)==0?r-t:r+t}return Math.min(r,this.max)|0};E.prototype.reset=function(){this.attempts=0};E.prototype.setMin=function(r){this.ms=r};E.prototype.setMax=function(r){this.max=r};E.prototype.setJitter=function(r){this.jitter=r};var R=class extends f{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,g(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((s=t.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new E({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;let i=t.parser||ae;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new T(this.uri,this.opts);let t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;let i=l(t,"open",function(){s.onopen(),e&&e()}),n=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),e?e(c):this.maybeReconnectOnOpen()},o=l(t,"error",n);if(this._timeout!==!1){let c=this._timeout,a=this.setTimeoutFn(()=>{i(),n(new Error("timeout")),t.close()},c);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(l(e,"ping",this.onping.bind(this)),l(e,"data",this.ondata.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this)),l(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){y(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new A(this,e,t),this.nsps[e]=s),s}_destroy(e){let t=Object.keys(this.nsps);for(let s of t)if(this.nsps[s].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var F={};function I(r,e){typeof r=="object"&&(e=r,r=void 0),e=e||{};let t=Fe(r,e.path||"/socket.io"),s=t.source,i=t.id,n=t.path,o=F[i]&&n in F[i].nsps,c=e.forceNew||e["force new connection"]||e.multiplex===!1||o,a;return c?a=new R(s,e):(F[i]||(F[i]=new R(s,e)),a=F[i]),t.query&&!e.query&&(e.query=t.queryKey),a.socket(t.path,e)}Object.assign(I,{Manager:R,Socket:A,io:I,connect:I});var cr=(()=>{class r{$auth=ue(pe);namespaceConnectionCache={};connectToNamespace(t){if(this.namespaceConnectionCache[t]){let s=this.namespaceConnectionCache[t];return s.connected=new X,s.socket.connected&&s.connected.next(void 0),s.socket.on("connect",()=>{s.connected.next(void 0)}),s.end=()=>{s.socket.emit("end"),s.socket.removeAllListeners(),s.connected.complete()},this.namespaceConnectionCache[t]}else{let s=this.establishConnectionToNamespace(t);return s.connected=new X,s.socket.on("connect",()=>{s.connected.next(void 0)}),s.end=()=>{s.socket.emit("end"),s.socket.removeAllListeners(),s.connected.complete()},this.namespaceConnectionCache[t]=s,s}}getExistingNamespace(t){return this.namespaceConnectionCache[t]}establishConnectionToNamespace(t){let s=I(`${le.api.socket}/${t}`,{query:{token:this.$auth.token}});return{socket:s,request:(n,o)=>new he(c=>{s.emit(n,o,a=>{typeof a=="object"&&a.error?c.error(a):c.next(a),c.complete()})})}}static \u0275fac=function(s){return new(s||r)};static \u0275prov=fe({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{cr as a};
|
package/public/chunk-HBK7LF6W.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-TR77UVYU.js";import"./chunk-B4AJQJMI.js";export default a();
|
package/public/chunk-JBILFYTL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Ee}from"./chunk-X66UFY6K.js";import{a as ae}from"./chunk-K3WEJJSS.js";import{a as Se}from"./chunk-3LY5FRVV.js";import{n as R,o as ie}from"./chunk-HH2FDI7W.js";import{a as ne}from"./chunk-UVWXUC5Y.js";import{s as I,t as we}from"./chunk-RDHUW73W.js";import{c as Ce}from"./chunk-CAY6MDP6.js";import{a as xe}from"./chunk-C64AHVUO.js";import{b as K}from"./chunk-664C4LX2.js";import{B as ge,C as G,D as L,b as W,c as j,d as g,e as P,f as X,g as q,j as S,m as Y,q as Z,r as ee,s as te}from"./chunk-JPAZUSRO.js";import{a as Ie,b as he}from"./chunk-MAJDTCMY.js";import{C as k,D as M,F,I as B}from"./chunk-VWUZDCBZ.js";import{Ab as h,Cb as de,Db as pe,Dc as o,Eb as ce,Ec as s,Fb as E,Fc as ve,Gb as r,Hb as a,Ib as d,Jb as D,Kb as T,Kc as oe,Lb as z,Rb as N,Sb as re,Xb as _,Yb as O,Za as e,Zb as v,aa as p,ea as le,ga as A,ha as V,hc as ue,ic as $,jc as Q,kc as m,lc as u,ma as me,mb as J,mc as c,nb as U,nc as fe,sa as y,xc as be,yb as f,yc as _e,zb as C}from"./chunk-F5MBSCH4.js";import{g as Be,h as w}from"./chunk-B4AJQJMI.js";function Ae(n,x){n&1&&(r(0,"ngb-alert",13)(1,"p",20),m(2),o(3,"translate"),a()()),n&2&&(E("dismissible",!1),e(2),u(s(3,2,"login.invalid_password")))}var ye=(()=>{class n{$activeModal=p(I);$api=p(B);$toastr=p(F);$translate=p(k);invalidCredentials=y(!1);formGroup=new q({password:new S("",[g.required])});disable2fa(){return w(this,null,function*(){this.invalidCredentials.set(!1);try{yield this.$api.post("/users/otp/deactivate",this.formGroup.value),this.$activeModal.close()}catch{this.formGroup.setValue({password:""}),this.invalidCredentials.set(!0)}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(l){return new(l||n)};static \u0275cmp=U({type:n,selectors:[["ng-component"]],decls:34,vars:27,consts:[[1,"modal-content",2,"min-height","300px"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","password","autocomplete","current-password",1,"form-control","custom-input",3,"formControl","placeholder"],["type","error",1,"mt-3","mb-0",3,"dismissible"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"mb-0"]],template:function(l,i){l&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),m(3),o(4,"translate"),a(),r(5,"button",3),o(6,"translate"),_("click",function(){return i.dismissModal()}),a()(),r(7,"div",4)(8,"div",5),d(9,"i",6),a(),r(10,"ul",7)(11,"li"),m(12),o(13,"translate"),a()(),r(14,"ul",8)(15,"li",9)(16,"label",10),m(17),o(18,"translate"),a(),r(19,"div",11),d(20,"input",12),o(21,"translate"),a()()(),C(22,Ae,4,4,"ngb-alert",13),a(),r(23,"div",14)(24,"div",15)(25,"button",16),o(26,"translate"),_("click",function(){return i.dismissModal()}),m(27),o(28,"translate"),a()(),d(29,"div",17),r(30,"div",18)(31,"button",19),_("click",function(){return i.disable2fa()}),m(32),o(33,"translate"),a()()()()),l&2&&(e(3),u(s(4,11,"users.setup_2fa_disable")),e(2),f("aria-label",s(6,13,"form.button_close")),e(7),u(s(13,15,"users.setup_2fa_disable_current_password")),e(5),u(s(18,17,"users.label_password")),e(3),E("formControl",i.formGroup.controls.password)("placeholder",s(21,19,"users.label_password")),e(2),h(i.invalidCredentials()&&!i.formGroup.controls.password.value?22:-1),e(3),f("aria-label",s(26,21,"form.button_close")),e(2),c(" ",s(28,23,"form.button_close")," "),e(4),E("disabled",i.formGroup.invalid),e(),c(" ",s(33,25,"form.button_continue")," "))},dependencies:[G,j,P,L,Z,ne,M],encapsulation:2})}return n})();var Ue=Be(Ie(),1);var Ve=n=>({timeDiffError:n});function Ne(n,x){n&1&&(r(0,"li"),m(1),o(2,"translate"),a()),n&2&&(e(),u(s(2,1,"users.setup_2fa_scan_qr_code")))}function Fe(n,x){if(n&1&&(r(0,"ngb-alert",8)(1,"p",16),m(2),o(3,"translate"),a(),r(4,"p",17),m(5),o(6,"translate"),a()()),n&2){let t=v();E("dismissible",!1),e(2),u(s(3,3,"users.setup_2fa_cannot_setup_2fa")),e(3),u(ve(6,5,"users.setup_2fa_server_time_out",be(8,Ve,t.timeDiffError())))}}function je(n,x){n&1&&d(0,"i",27)}function Pe(n,x){n&1&&d(0,"i",28)}function qe(n,x){if(n&1){let t=N();r(0,"div",21),m(1),o(2,"translate"),d(3,"br"),m(4),r(5,"a",26),_("click",function(){A(t);let i=v(2);return V(i.copySecretToClipboard())}),C(6,je,1,0,"i",27)(7,Pe,1,0,"i",28),a()()}if(n&2){let t=v(2);e(),c(" ",s(2,3,"users.setup_2fa_scan_qr_manual")),e(3),c(" ",t.otpSecret()," "),e(2),h(t.secretCopied()?6:7)}}function Ge(n,x){if(n&1&&(r(0,"ul",9)(1,"li",18)(2,"div",19),d(3,"app-qrcode",20),a(),C(4,qe,8,5,"div",21),a(),r(5,"li",22)(6,"label",23),m(7),o(8,"translate"),a(),r(9,"div",24),d(10,"input",25),a()()()),n&2){let t=v();e(3),E("data",t.otpString()),e(),h(t.otpSecret()?4:-1),e(3),u(s(8,4,"users.setup_2fa_enter_code")),e(3),E("formControl",t.formGroup.controls.code)}}function Le(n,x){if(n&1){let t=N();r(0,"button",29),o(1,"translate"),_("click",function(){A(t);let i=v();return V(i.dismissModal())}),m(2),o(3,"translate"),a()}n&2&&(f("aria-label",s(1,2,"form.button_close")),e(2),c(" ",s(3,4,"form.button_close")," "))}function Re(n,x){if(n&1){let t=N();r(0,"button",29),o(1,"translate"),_("click",function(){A(t);let i=v();return V(i.dismissModal())}),m(2),o(3,"translate"),a()}n&2&&(f("aria-label",s(1,2,"form.button_close")),e(2),c(" ",s(3,4,"form.button_close")," "))}function ze(n,x){if(n&1){let t=N();r(0,"button",30),_("click",function(){A(t);let i=v();return V(i.enable2fa())}),m(1),o(2,"translate"),a()}if(n&2){let t=v();E("disabled",t.formGroup.invalid),e(),c(" ",s(2,2,"form.button_continue")," ")}}var Me=(()=>{class n{$activeModal=p(I);$api=p(B);$toastr=p(F);$translate=p(k);modalData=p(R);user=this.modalData.user;timeDiffError=y(null);otpString=y(void 0);otpSecret=y(void 0);secretCopied=y(!1);copyTimeout=null;formGroup=new q({code:new S("",[g.required,g.minLength(6),g.maxLength(6)])});ngOnInit(){this.initialize()}initialize(){return w(this,null,function*(){try{let t=yield this.$api.post("/users/otp/setup",{});this.checkTimeDiff(t.timestamp),this.timeDiffError()||(this.otpString.set(t.otpauth),this.otpSecret.set(new URL(t.otpauth).searchParams.get("secret")||""))}catch(t){this.$activeModal.dismiss(),console.error(t),this.$toastr.error(this.$translate.instant("users.setup_2fa_enable_error"),this.$translate.instant("toast.title_error"))}})}enable2fa(){return w(this,null,function*(){try{yield this.$api.post("/users/otp/activate",this.formGroup.value),this.$activeModal.close()}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("users.setup_2fa_activate_error"),this.$translate.instant("toast.title_error"))}})}copySecretToClipboard(){return w(this,null,function*(){let t=this.otpSecret();t&&(yield navigator.clipboard.writeText(t),this.secretCopied.set(!0),this.copyTimeout&&clearTimeout(this.copyTimeout),this.copyTimeout=setTimeout(()=>{this.secretCopied.set(!1)},3e3))})}dismissModal(){this.$activeModal.dismiss("Dismiss")}checkTimeDiff(t){let l=(0,Ue.default)(t).diff(new Date,"millisecond");l<-5e3||l>5e3?this.timeDiffError.set(l):this.timeDiffError.set(null)}static \u0275fac=function(l){return new(l||n)};static \u0275cmp=U({type:n,selectors:[["ng-component"]],decls:24,vars:15,consts:[[1,"modal-content","setup2fa"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"list-group","list-group-box","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"fw-bold","mb-1"],[1,"mb-0"],[1,"list-group-item","text-center"],[1,"text-center","w-100","d-flex","justify-content-center","my-2"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[1,"grey-text","small","mt-0","mb-1"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","placeholder","eg. 123456","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*",1,"form-control","custom-input",3,"formControl"],["href","javascript:void(0)",1,"ms-1","text-primary",3,"click"],[1,"fas","fa-check","green-text"],[1,"fas","fa-copy"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(l,i){l&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),m(3),o(4,"translate"),a(),r(5,"button",3),o(6,"translate"),_("click",function(){return i.dismissModal()}),a()(),r(7,"div",4)(8,"div",5),d(9,"i",6),a(),r(10,"ul",7)(11,"li"),m(12),o(13,"translate"),a(),C(14,Ne,3,3,"li"),a(),C(15,Fe,7,10,"ngb-alert",8),C(16,Ge,11,6,"ul",9),a(),r(17,"div",10)(18,"div",11),C(19,Le,4,6,"button",12),a(),r(20,"div",13),C(21,Re,4,6,"button",12),a(),r(22,"div",14),C(23,ze,3,4,"button",15),a()()()),l&2&&(e(3),u(s(4,9,"users.setup_2fa")),e(2),f("aria-label",s(6,11,"form.button_close")),e(7),u(s(13,13,"users.setup_2fa_warning")),e(2),h(i.timeDiffError()?-1:14),e(),h(i.timeDiffError()?15:-1),e(),h(i.timeDiffError()?-1:16),e(3),h(i.timeDiffError()?-1:19),e(2),h(i.timeDiffError()?21:-1),e(2),h(i.timeDiffError()?-1:23))},dependencies:[ne,Ee,G,j,P,ge,L,Z,M],encapsulation:2})}return n})();var De=(()=>{class n{$activeModal=p(I);$api=p(B);$toastr=p(F);$translate=p(k);modalData=p(ie);existingUsers=this.modalData.existingUsers;form=new q({username:new S("",[g.required]),name:new S("",[g.required]),password:new S("",[g.compose([g.required,g.minLength(4)])]),passwordConfirm:new S("",[g.required]),admin:new S(!0)},this.matchPassword);ngOnInit(){this.form.controls.username.addValidators(this.duplicateUsernameValidator.bind(this)),this.form.controls.username.updateValueAndValidity()}onSubmit(l){return w(this,arguments,function*({value:t}){try{yield this.$api.post("/users",t),this.$activeModal.close()}catch(i){this.$toastr.error(i.error?.message||i.message,this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}duplicateUsernameValidator(t){if(!t.value)return null;let l=t.value.trim();return l&&this.existingUsers.some(b=>b.username===l)?{duplicateUsername:!0}:null}matchPassword(t){let l=t.get("password")?.value,i=t.get("passwordConfirm")?.value;return l!==i?(t.get("passwordConfirm")?.setErrors({matchPassword:!0}),{matchPassword:!0}):null}static \u0275fac=function(l){return new(l||n)};static \u0275cmp=U({type:n,selectors:[["ng-component"]],decls:63,vars:52,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-user-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autofocus","","autocomplete","username","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["formControlName","admin","type","checkbox","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(l,i){l&1&&(r(0,"div",0)(1,"form",1),_("ngSubmit",function(){return i.onSubmit(i.form)}),r(2,"div",2)(3,"h5",3),m(4),o(5,"translate"),a(),r(6,"button",4),o(7,"translate"),_("click",function(){return i.dismissModal()}),a()(),r(8,"div",5)(9,"div",6),d(10,"i",7),a(),r(11,"ul",8)(12,"li",9)(13,"label",10),m(14),o(15,"translate"),d(16,"app-required-indicator"),a(),r(17,"div",11),d(18,"input",12),o(19,"translate"),a()(),r(20,"li",9)(21,"label",13),m(22),o(23,"translate"),d(24,"app-required-indicator"),a(),r(25,"div",11),d(26,"input",14),o(27,"translate"),a()(),r(28,"li",9)(29,"label",15),m(30),o(31,"translate"),d(32,"app-required-indicator"),a(),r(33,"div",11),d(34,"input",16),o(35,"translate"),a()(),r(36,"li",9)(37,"label",17),m(38),o(39,"translate"),d(40,"app-required-indicator"),a(),r(41,"div",11),d(42,"input",18),o(43,"translate"),a()(),r(44,"li",19)(45,"span",20),m(46),o(47,"translate"),d(48,"app-required-indicator"),a(),r(49,"div",21),d(50,"input",22),o(51,"translate"),d(52,"label",23),a()()()(),r(53,"div",24)(54,"div",20)(55,"button",25),_("click",function(){return i.dismissModal()}),m(56),o(57,"translate"),a()(),d(58,"div",26),r(59,"div",27)(60,"button",28),m(61),o(62,"translate"),a()()()()()),l&2&&(e(),E("formGroup",i.form),e(3),u(s(5,24,"users.title_add_user")),e(2),f("aria-label",s(7,26,"form.button_close")),e(8),c(" ",s(15,28,"users.label_username")," "),e(4),$("is-invalid",i.form.controls.username.touched&&i.form.controls.username.invalid),f("aria-label",s(19,30,"users.label_username")),e(4),c(" ",s(23,32,"users.label_full_name")," "),e(4),$("is-invalid",i.form.controls.name.touched&&i.form.controls.name.invalid),f("aria-label",s(27,34,"users.label_full_name")),e(4),c(" ",s(31,36,"users.label_password")," "),e(4),$("is-invalid",i.form.controls.password.touched&&i.form.controls.password.invalid),f("aria-label",s(35,38,"users.label_password")),e(4),c(" ",s(39,40,"users.label_confirm_password")," "),e(4),$("is-invalid",i.form.controls.passwordConfirm.touched&&i.form.controls.passwordConfirm.invalid),f("aria-label",s(43,42,"users.label_confirm_password")),e(4),c(" ",s(47,44,"users.label_admin_user")," "),e(4),f("aria-label",s(51,46,"users.label_admin_user")),e(6),c(" ",s(57,48,"form.button_close")," "),e(4),E("disabled",!i.form.valid),e(),c(" ",s(62,50,"form.button_save")," "))},dependencies:[G,Y,j,W,P,X,L,te,ee,ae,M],encapsulation:2})}return n})();function Oe(n,x){n&1&&d(0,"app-required-indicator")}function Je(n,x){if(n&1&&(r(0,"li",9)(1,"label",29),m(2),o(3,"translate"),d(4,"app-required-indicator"),a(),r(5,"div",11),d(6,"input",30),o(7,"translate"),a()()),n&2){let t=v();e(2),c(" ",s(3,4,"users.label_confirm_password")," "),e(4),$("is-invalid",t.form.controls.passwordConfirm.touched&&t.form.controls.passwordConfirm.invalid),f("aria-label",s(7,6,"users.label_confirm_password"))}}function Qe(n,x){n&1&&(r(0,"div",22)(1,"div",25),m(2),o(3,"translate"),a()()),n&2&&(e(2),u(s(3,1,"common.phrases.are_you_sure")))}var Te=(()=>{class n{$activeModal=p(I);$api=p(B);$auth=p(K);$toastr=p(F);$translate=p(k);modalData=p(R);user=this.modalData.user;existingUsers=this.modalData.existingUsers||[];isCurrentUser=y(!1);deleteMode=y(!1);initialFormValue={};form=new q({username:new S("",[g.required]),name:new S("",[g.required]),password:new S("",[g.minLength(4)]),passwordConfirm:new S(""),admin:new S(!0)},this.matchPassword);isLastAdmin=oe(()=>this.user?.admin?this.existingUsers.filter(l=>l.admin).length<=1:!1);canDelete=oe(()=>!this.isCurrentUser()&&!this.isLastAdmin());ngOnInit(){this.user&&(this.isCurrentUser.set(this.$auth.user.username===this.user.username),this.form.patchValue(this.user),this.initialFormValue=this.form.getRawValue(),this.form.controls.username.addValidators(this.duplicateUsernameValidator.bind(this)),this.form.controls.username.updateValueAndValidity(),this.isLastAdmin()&&this.form.controls.admin.disable())}onSubmit(l){return w(this,arguments,function*({value:t}){if(this.user){if(this.deleteMode()){try{yield this.$api.delete(`/users/${this.user.id}`),this.$activeModal.close()}catch(i){console.error(i),this.$toastr.error(i.error?.message||i.message,this.$translate.instant("toast.title_error"))}return}try{yield this.$api.patch(`/users/${this.user.id}`,t),this.$activeModal.close(),this.isCurrentUser()&&t.username!==this.$auth.user.username&&this.$auth.logout()}catch(i){console.error(i),this.$toastr.error(i.error?.message||i.message,this.$translate.instant("toast.title_error"))}}})}toggleDeleteMode(t){this.deleteMode.set(!this.deleteMode()),this.deleteMode()?this.form.disable():(this.form.enable(),this.isLastAdmin()&&this.form.controls.admin.disable()),t.target.blur()}isFormUnchanged(){return this.form.controls.password.value?!1:JSON.stringify(this.form.getRawValue())===JSON.stringify(this.initialFormValue)}duplicateUsernameValidator(t){if(!t.value)return null;let l=t.value.trim();return l&&this.existingUsers.some(b=>b.id!==this.user.id&&b.username===l)?{duplicateUsername:!0}:null}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(t){let l=t.get("password")?.value,i=t.get("passwordConfirm")?.value;return l!==i?(t.get("passwordConfirm")?.setErrors({matchPassword:!0}),{matchPassword:!0}):null}static \u0275fac=function(l){return new(l||n)};static \u0275cmp=U({type:n,selectors:[["ng-component"]],decls:60,vars:57,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-user-pen","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","off","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"alert","alert-warning","mt-3","mb-0"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button",1,"btn","btn-elegant","me-2",3,"click","disabled"],["type","submit",1,"btn",3,"disabled"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input"]],template:function(l,i){l&1&&(r(0,"div",0)(1,"form",1),_("ngSubmit",function(){return i.onSubmit(i.form)}),r(2,"div",2)(3,"h5",3),m(4),o(5,"translate"),a(),r(6,"button",4),o(7,"translate"),_("click",function(){return i.dismissModal()}),a()(),r(8,"div",5)(9,"div",6),d(10,"i",7),a(),r(11,"ul",8)(12,"li",9)(13,"label",10),m(14),o(15,"translate"),d(16,"app-required-indicator"),a(),r(17,"div",11),d(18,"input",12),o(19,"translate"),a()(),r(20,"li",9)(21,"label",13),m(22),o(23,"translate"),d(24,"app-required-indicator"),a(),r(25,"div",11),d(26,"input",14),o(27,"translate"),a()(),r(28,"li",9)(29,"label",15),m(30),o(31,"translate"),C(32,Oe,1,0,"app-required-indicator"),a(),r(33,"div",11),d(34,"input",16),o(35,"translate"),a()(),C(36,Je,8,8,"li",9),r(37,"li",17)(38,"span",18),m(39),o(40,"translate"),d(41,"app-required-indicator"),a(),r(42,"div",19),d(43,"input",20),o(44,"translate"),d(45,"label",21),a()()(),C(46,Qe,4,3,"div",22),a(),r(47,"div",23)(48,"div",18)(49,"button",24),_("click",function(){return i.dismissModal()}),m(50),o(51,"translate"),a()(),d(52,"div",25),r(53,"div",26)(54,"button",27),o(55,"translate"),_("click",function(ke){return i.toggleDeleteMode(ke)}),d(56,"i"),a(),r(57,"button",28),m(58),o(59,"translate"),a()()()()()),l&2&&(e(),E("formGroup",i.form),e(3),u(s(5,31,"users.title_edit_user")),e(2),f("aria-label",s(7,33,"form.button_close")),e(5),ue("opacity",i.deleteMode()?"0.25":"1"),e(3),c(" ",s(15,35,"users.label_username")," "),e(4),$("is-invalid",i.form.controls.username.touched&&i.form.controls.username.invalid),f("aria-label",s(19,37,"users.label_username")),e(4),c(" ",s(23,39,"users.label_full_name")," "),e(4),$("is-invalid",i.form.controls.name.touched&&i.form.controls.name.invalid),f("aria-label",s(27,41,"users.label_full_name")),e(4),c(" ",s(31,43,"users.label_new_password")," "),e(2),h(i.form.controls.password.value?32:-1),e(2),$("is-invalid",i.form.controls.password.touched&&i.form.controls.password.invalid),f("aria-label",s(35,45,"users.label_new_password")),e(2),h(i.form.controls.password.value?36:-1),e(3),c(" ",s(40,47,"users.label_admin_user")," "),e(4),f("aria-label",s(44,49,"users.label_admin_user")),e(3),h(i.deleteMode()?46:-1),e(4),c(" ",s(51,51,"form.button_close")," "),e(4),E("disabled",!i.canDelete()),f("aria-label",s(55,53,"users.button_delete_user")),e(2),Q(i.deleteMode()?"fas fa-undo":"fas fa-trash"),e(),Q(i.deleteMode()?"btn-danger":"btn-primary"),E("disabled",!i.deleteMode()&&(!i.form.valid||i.isFormUnchanged())),e(),c(" ",s(59,55,i.deleteMode()?"form.button_delete":"form.button_save")," "))},dependencies:[G,Y,j,W,P,X,L,te,ee,ae,M],encapsulation:2})}return n})();var $e=(()=>{class n{$activeModal=p(I);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(l){return new(l||n)};static \u0275cmp=U({type:n,selectors:[["ng-component"]],decls:46,vars:36,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"ms-2"],[1,"mb-0"],[1,"mb-2","grey-text"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(l,i){l&1&&(r(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),m(4),o(5,"translate"),a(),r(6,"button",3),o(7,"translate"),_("click",function(){return i.dismissModal()}),a()(),r(8,"div",4)(9,"div",5),d(10,"i",6),a(),r(11,"h5",7),m(12),o(13,"translate"),a(),r(14,"ul",8)(15,"li"),m(16),o(17,"translate"),a(),r(18,"ul",9)(19,"li"),m(20),o(21,"translate"),a(),r(22,"li"),m(23),o(24,"translate"),a(),r(25,"li"),m(26),o(27,"translate"),o(28,"translate"),a(),r(29,"li"),m(30),o(31,"translate"),a(),r(32,"li"),m(33),o(34,"translate"),a()(),r(35,"li"),m(36),o(37,"translate"),a()(),d(38,"app-support-banner"),a(),r(39,"div",10),d(40,"div",11),r(41,"div",12)(42,"button",13),_("click",function(){return i.dismissModal()}),m(43),o(44,"translate"),a()(),d(45,"div",14),a()()()),l&2&&(e(4),u(s(5,12,"support.title")),e(2),f("aria-label",s(7,14,"form.button_close")),e(6),u(s(13,16,"users.title_users")),e(4),u(s(17,18,"users.support.acc_1")),e(4),u(s(21,20,"menu.label_status")),e(3),u(s(24,22,"menu.label_plugins")),e(3),fe("",s(27,24,"menu.label_accessories")," (",s(28,26,"users.support.control"),")"),e(4),u(s(31,28,"menu.linux.label_logs")),e(3),u(s(34,30,"support.title")),e(3),u(s(37,32,"users.support.acc_2")),e(7),c(" ",s(44,34,"form.button_close")," "))},dependencies:[Se,M],encapsulation:2})}return n})();var He=(n,x)=>({"fa-user-secret":n,"fa-user":x});function Ke(n,x){if(n&1){let t=N();D(0,"button",21),O("click",function(){A(t);let i=v(2).$implicit,b=v();return V(b.disable2fa(i))}),m(1),o(2,"translate"),T()}if(n&2){let t=v(2).$implicit,l=v();re("disabled",t.username!==l.username),e(),c(" ",s(2,2,"users.setup_2fa_disable")," ")}}function We(n,x){if(n&1){let t=N();D(0,"button",22),O("click",function(){A(t);let i=v(2).$implicit,b=v();return V(b.setup2fa(i))}),m(1),o(2,"translate"),T()}if(n&2){let t=v(2).$implicit,l=v();re("disabled",t.username!==l.username),e(),c(" ",s(2,2,"users.setup_2fa")," ")}}function Xe(n,x){if(n&1&&C(0,Ke,3,4,"button",19)(1,We,3,4,"button",20),n&2){let t=v().$implicit;h(t.otpActive?0:1)}}function Ye(n,x){n&1&&z(0,"div")}function Ze(n,x){if(n&1){let t=N();D(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"span",13)(5,"h4"),m(6),T(),D(7,"h5",14),z(8,"i",15),m(9),T()()(),D(10,"div",16),C(11,Xe,2,1)(12,Ye,1,0,"div"),D(13,"div")(14,"button",17),o(15,"translate"),O("click",function(){let i=A(t).$implicit,b=v();return V(b.openEditUser(i))}),z(16,"i",18),T()()()()()()}if(n&2){let t=x.$implicit;e(6),u(t.name),e(2),Q(_e(8,He,t.admin,!t.admin)),e(),c(" ",t.username," "),e(2),h(t.admin?11:12),e(3),f("aria-label",s(15,6,"form.button_edit"))}}var ci=(()=>{class n{injector=p(le);destroyRef=p(me);$api=p(B);$auth=p(K);$modal=p(we);$route=p(Ce);$settings=p(he);$translate=p(k);homebridgeUsers=y([]);username=this.$auth.user.username;isAdmin=this.$auth.user.admin;ngOnInit(){let t=this.$translate.instant("users.title_users");this.$settings.setPageTitle(t),this.$route.data.pipe(xe(this.destroyRef)).subscribe(l=>{this.homebridgeUsers.set(l.homebridgeUsers)})}reloadUsers(){return w(this,null,function*(){let t=yield this.$api.get("/users");this.homebridgeUsers.set(t)})}openAddNewUser(){return w(this,null,function*(){let t=J([{provide:ie,useValue:{existingUsers:this.homebridgeUsers()}}],this.injector),l=this.$modal.open(De,{size:"lg",backdrop:"static",injector:t});try{yield l.result,this.reloadUsers()}catch{}})}openEditUser(t){return w(this,null,function*(){let l=J([{provide:R,useValue:{user:t,existingUsers:this.homebridgeUsers()}}],this.injector),i=this.$modal.open(Te,{size:"lg",backdrop:"static",injector:l});try{yield i.result,this.reloadUsers()}catch{}})}setup2fa(t){return w(this,null,function*(){let l=J([{provide:R,useValue:{user:t}}],this.injector),i=this.$modal.open(Me,{size:"lg",backdrop:"static",injector:l});try{yield i.result,this.reloadUsers()}catch{}})}disable2fa(t){return w(this,null,function*(){let l=J([{provide:R,useValue:{user:t}}],this.injector),i=this.$modal.open(ye,{size:"lg",backdrop:"static",injector:l});try{yield i.result,this.reloadUsers()}catch{}})}openSupport(){this.$modal.open($e,{size:"lg",backdrop:"static"})}static \u0275fac=function(l){return new(l||n)};static \u0275cmp=U({type:n,selectors:[["app-users"]],decls:15,vars:9,consts:[[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],[1,"btn","btn-elegant","waves-effect","m-0","me-2",3,"click"],[1,"fas","fa-user-plus"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-question-circle-o"],[1,"row"],[1,"col-md-6","mb-4"],[1,"card","card-body"],[1,"d-flex","flex-column"],[1,"d-flex","flex-row","mb-3"],[1,"me-auto","my-0"],[1,"small","text-truncate","grey-text"],[1,"fas"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-user-pen"],[1,"btn","btn-elegant","m-0",3,"disabled"],[1,"btn","btn-primary","m-0",3,"disabled"],[1,"btn","btn-elegant","m-0",3,"click","disabled"],[1,"btn","btn-primary","m-0",3,"click","disabled"]],template:function(l,i){l&1&&(D(0,"div",0)(1,"div",1)(2,"h3",2),m(3),o(4,"translate"),T()(),D(5,"div",3)(6,"button",4),o(7,"translate"),O("click",function(){return i.openAddNewUser()}),z(8,"i",5),T(),D(9,"button",6),o(10,"translate"),O("click",function(){return i.openSupport()}),z(11,"i",7),T()()(),D(12,"div",8),pe(13,Ze,17,11,"div",9,de),T()),l&2&&(e(3),u(s(4,3,"users.title_users")),e(3),f("aria-label",s(7,5,"users.button_add_user")),e(3),f("aria-label",s(10,7,"support.title")),e(4),ce(i.homebridgeUsers()))},dependencies:[M],encapsulation:2})}return n})();export{ci as UsersComponent};
|
package/public/chunk-K3WEJJSS.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{kc as o,nb as n}from"./chunk-F5MBSCH4.js";var c=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275cmp=n({type:e,selectors:[["app-required-indicator"]],decls:1,vars:0,template:function(t,i){t&1&&o(0,`\u25CF
|
|
2
|
-
`)},styles:["[_nghost-%COMP%]{font-size:.5em;vertical-align:super;color:var(--bs-danger)}"]})}return e})();export{c as a};
|
package/public/chunk-KDXP3F5S.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-3BODPB3K.js";import"./chunk-B4AJQJMI.js";export default a();
|
package/public/chunk-KYBKIBTT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-5A2G7KDR.js";import"./chunk-B4AJQJMI.js";export default a();
|
package/public/chunk-LINXSUG2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-3YXAYQFV.js";import"./chunk-B4AJQJMI.js";export default a();
|
package/public/chunk-LPJ4GDP3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-QSXJHCTT.js";import"./chunk-B4AJQJMI.js";export default a();
|
package/public/chunk-LPWY3RKY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-YCASP3MF.js";import"./chunk-B4AJQJMI.js";export default a();
|
package/public/chunk-MUHHYXFN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-DJGU4NTG.js";import"./chunk-B4AJQJMI.js";export default a();
|
package/public/chunk-MVT3BOGV.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as b,b as w,c as y}from"./chunk-BMOLDRJ3.js";import{a as u}from"./chunk-H2UKSDHZ.js";import{I as z}from"./chunk-VWUZDCBZ.js";import{F as o,R as r,X as f,aa as d,d as e}from"./chunk-F5MBSCH4.js";import{g as a,h as p}from"./chunk-B4AJQJMI.js";var l=a(b(),1),m=a(w(),1),c=a(y(),1);var v=(()=>{class n{$ws=d(u);$api=d(z);io;fitAddon;webLinksAddon;resize;elementResize;dataDisposable=null;isInitializing=!1;hasUserTyped=!1;destroy$=new e;term;destroyTerminal(){this.destroy$.next(),this.destroy$.complete(),this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.io&&this.io.end(),this.term&&(this.term.dispose(),this.term=null),this.resize&&this.resize.complete(),this.elementResize&&this.elementResize.complete(),this.destroy$=new e,this.isInitializing=!1,this.hasUserTyped=!1}destroyPersistentSession(){return p(this,null,function*(){this.destroyTerminal();try{yield this.$api.post("/platform-tools/terminal/destroy-persistent-session",{})}catch(t){console.error("Failed to destroy persistent session:",t)}})}detachTerminal(){this.destroy$.next(),this.destroy$.complete(),this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.term&&this.term.dispose(),this.resize&&this.resize.complete(),this.elementResize&&this.elementResize.complete(),this.destroy$=new e,this.isInitializing=!1}hasActiveSession(){return this.io&&this.io.socket&&this.io.socket.connected}hasUserTypedInSession(){return this.hasUserTyped}isTerminalReady(){return this.term&&!this.isInitializing}reconnectTerminal(t,s={},h){if(this.isInitializing)return!1;this.isInitializing=!0,this.elementResize=h,this.io&&this.io.socket&&this.io.socket.connected?(this.term=new c.Terminal(s),this.fitAddon=new l.FitAddon,this.webLinksAddon=new m.WebLinksAddon,setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.resize=new e,this.term.open(t.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.socket.removeAllListeners("stdout"),this.io.socket.removeAllListeners("process-exit"),this.io.socket.on("stdout",i=>{this.term.write(i)}),this.io.socket.on("process-exit",()=>{this.startSession()}),this.dataDisposable&&this.dataDisposable.dispose(),this.dataDisposable=this.term.onData(i=>{this.hasUserTyped=!0,this.io.socket.emit("stdin",i)}),this.term.onResize(i=>{this.resize.next(i)}),this.resize.pipe(o(500),r(this.destroy$)).subscribe(i=>{this.io.socket.emit("resize",i)}),this.elementResize&&this.elementResize.pipe(o(100),r(this.destroy$)).subscribe({next:()=>{this.fitAddon.fit()}}),this.io.socket.emit("start-session",{cols:this.term.cols,rows:this.term.rows}),this.isInitializing=!1):this.startTerminal(t,s,h)}startTerminal(t,s={},h){return this.isInitializing?!1:(this.isInitializing=!0,this.elementResize=h,this.io=this.$ws.connectToNamespace("platform-tools/terminal"),this.term=new c.Terminal(s),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new l.FitAddon,this.webLinksAddon=new m.WebLinksAddon,this.resize=new e,this.term.open(t.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.pipe(o(200),r(this.destroy$)).subscribe(()=>{this.startSession()}),this.io.socket.on("disconnect",()=>{this.term.write(`
|
|
2
|
-
\r
|
|
3
|
-
\rTerminal disconnected. Is the server running?
|
|
4
|
-
\r
|
|
5
|
-
\r`)}),this.io.socket.on("process-exit",()=>{this.startSession()}),this.resize.pipe(o(500),r(this.destroy$)).subscribe(i=>{this.io.socket.emit("resize",i)}),this.io.socket.on("stdout",i=>{this.term.write(i)}),this.dataDisposable=this.term.onData(i=>{this.hasUserTyped=!0,this.io.socket.emit("stdin",i)}),this.term.onResize(i=>{this.resize.next(i)}),this.elementResize&&this.elementResize.pipe(o(100),r(this.destroy$)).subscribe({next:()=>{this.fitAddon.fit()}}),!0)}startSession(){this.term.reset(),this.hasUserTyped=!1,this.io.socket.emit("start-session",{cols:this.term.cols,rows:this.term.rows}),this.resize.next({cols:this.term.cols,rows:this.term.rows}),this.isInitializing=!1}static \u0275fac=function(s){return new(s||n)};static \u0275prov=f({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{v as a};
|
package/public/chunk-N6F32H34.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-YDYBCBXX.js";import"./chunk-B4AJQJMI.js";export default a();
|
package/public/chunk-NPABPWX3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-AHIRH7NQ.js";import"./chunk-B4AJQJMI.js";export default a();
|
package/public/chunk-OU66C3M2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-PTJ3UZME.js";import"./chunk-B4AJQJMI.js";export default a();
|
package/public/chunk-P67JXXO4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-Q5X66PGK.js";import"./chunk-B4AJQJMI.js";export default a();
|
package/public/chunk-UPP5DT2A.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-XTQWZF3J.js";import"./chunk-B4AJQJMI.js";export default a();
|
package/public/chunk-VV4LXPCS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-Z2RGI4BU.js";import"./chunk-B4AJQJMI.js";export default a();
|
package/public/chunk-XYVW562Y.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-65AW3ZMH.js";import"./chunk-B4AJQJMI.js";export default a();
|
package/public/chunk-ZPKMGNNM.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-J56ZFHCF.js";import"./chunk-B4AJQJMI.js";export default a();
|