homebridge-config-ui-x 5.4.1-beta.4 → 5.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -7
- package/package.json +4 -4
- package/public/assets/hap-icons/irrigation-system.svg +49 -0
- package/public/assets/hap-icons/lock-locked.svg +25 -0
- package/public/assets/hap-icons/lock-unlocked.svg +25 -0
- package/public/assets/hap-icons/security-system-active.svg +103 -0
- package/public/assets/hap-icons/security-system-off.svg +69 -0
- package/public/assets/hap-icons/security-system-triggered.svg +103 -0
- package/public/assets/hap-icons/stateless-programmable-switch.svg +52 -0
- package/public/assets/hap-icons/valve-faucet.svg +21 -0
- package/public/assets/hap-icons/valve-generic.svg +28 -0
- package/public/assets/hap-icons/valve-irrigation.svg +38 -0
- package/public/assets/hap-icons/valve-shower-head.svg +52 -0
- package/public/assets/service-icons/door.svg +2 -23
- package/public/assets/service-icons/fan.svg +2 -2
- package/public/assets/service-icons/garage-door.svg +1 -1
- package/public/assets/service-icons/stateless-programmable-switch.svg +2 -2
- package/public/assets/service-icons/window-covering.svg +2 -2
- package/public/assets/service-icons/window.svg +0 -4
- package/public/{chunk-5QSOD3VZ.js → chunk-2DRGGCL6.js} +1 -1
- package/public/chunk-33VXBD5W.js +12 -0
- package/public/{chunk-V6JVOQNN.js → chunk-3JNJJOX6.js} +1 -1
- package/public/{chunk-D7VCPH6W.js → chunk-3QBYXJ7T.js} +1 -1
- package/public/{chunk-A2LQJCVZ.js → chunk-4TADR47H.js} +1 -1
- package/public/{chunk-CJBATTMM.js → chunk-5CQQ6P7K.js} +1 -1
- package/public/{chunk-LL4DBEOM.js → chunk-5UXBLAGX.js} +1 -1
- package/public/chunk-645YHJEQ.js +4 -0
- package/public/{chunk-DFFTJVRY.js → chunk-6HJHVJPI.js} +1 -1
- package/public/{chunk-GVK5UW64.js → chunk-6PUQJMXN.js} +1 -1
- package/public/{chunk-OQ7NVATB.js → chunk-6VEFADT5.js} +1 -1
- package/public/{chunk-RT465KKZ.js → chunk-7IWNYMNH.js} +1 -1
- package/public/{chunk-R4LZOXMJ.js → chunk-7YPOSTMY.js} +1 -1
- package/public/{chunk-LLPZZ37V.js → chunk-AVMRG6LJ.js} +1 -1
- package/public/{chunk-CXCXRMDE.js → chunk-AVVYKDTL.js} +1 -1
- package/public/{chunk-DZLOLH4A.js → chunk-BPGGCIV2.js} +1 -1
- package/public/{chunk-DQJI2BHR.js → chunk-DFLIHKAC.js} +1 -1
- package/public/{chunk-MDNTL76G.js → chunk-DFZAFAJ3.js} +1 -1
- package/public/{chunk-H45DK7IX.js → chunk-DYB33NRF.js} +1 -1
- package/public/{chunk-TLB52PIJ.js → chunk-E2BQMFOO.js} +1 -1
- package/public/chunk-EF3XRHYY.js +1 -0
- package/public/{chunk-5E4D6S2D.js → chunk-EQHN6CPG.js} +1 -1
- package/public/{chunk-C4UB2RMG.js → chunk-ER4N7WWQ.js} +1 -1
- package/public/{chunk-ZUTM7S4U.js → chunk-EZQF5CUM.js} +1 -1
- package/public/{chunk-TLSYCZTN.js → chunk-F37WZQGE.js} +1 -1
- package/public/{chunk-Y7NZAMZK.js → chunk-FMZEX6EI.js} +1 -1
- package/public/{chunk-KZKL7DGI.js → chunk-FYDO54CR.js} +1 -1
- package/public/{chunk-IWFKJHPR.js → chunk-FYI7RHOJ.js} +1 -1
- package/public/{chunk-PPG3IMBO.js → chunk-G2UERN7F.js} +1 -1
- package/public/{chunk-J6CJ26QN.js → chunk-G6KV6PYE.js} +1 -1
- package/public/{chunk-CX3JPNTU.js → chunk-G7J6XGY5.js} +1 -1
- package/public/{chunk-FVLF6TIN.js → chunk-GZH3YYXD.js} +1 -1
- package/public/{chunk-COFJ5YET.js → chunk-H7SE35UN.js} +1 -1
- package/public/{chunk-FVKMBZOU.js → chunk-HHGB2T2Q.js} +1 -1
- package/public/{chunk-CMOVUX6R.js → chunk-HO4UVRDI.js} +1 -1
- package/public/{chunk-TGVFLMOM.js → chunk-IA2EYXXP.js} +11 -11
- package/public/chunk-IDFQPWF6.js +1 -0
- package/public/{chunk-7MQX53MR.js → chunk-J3QUQJAX.js} +1 -1
- package/public/{chunk-WTDK2HE6.js → chunk-JCYDPJQ5.js} +1 -1
- package/public/{chunk-UY4SHEDE.js → chunk-KBHPX4TF.js} +1 -1
- package/public/{chunk-TDWG2MD7.js → chunk-KGKX7ALV.js} +1 -1
- package/public/{chunk-OA7Y3E5A.js → chunk-KLQ6BEKS.js} +1 -1
- package/public/{chunk-7EQFLCW4.js → chunk-KYB236MX.js} +1 -1
- package/public/chunk-L6SKGR7C.js +1 -0
- package/public/{chunk-2C3X2ESN.js → chunk-M4QDQWSG.js} +1 -1
- package/public/{chunk-HHD4XIWF.js → chunk-NRX2DKWS.js} +1 -1
- package/public/{chunk-LCZBRIFP.js → chunk-NZ3SNZL4.js} +1 -1
- package/public/{chunk-EES3556N.js → chunk-O6QIOU32.js} +1 -1
- package/public/{chunk-UPKT4ZZY.js → chunk-PGM4QIVA.js} +1 -1
- package/public/{chunk-HWAWBYVQ.js → chunk-PPSFRNJC.js} +1 -1
- package/public/{chunk-XL5NTCWH.js → chunk-RANTT44U.js} +1 -1
- package/public/{chunk-WCOLHYTR.js → chunk-RCYYU6LQ.js} +1 -1
- package/public/{chunk-Z2T4OZ7I.js → chunk-RGXCQLZU.js} +1 -1
- package/public/{chunk-QX6BFGHZ.js → chunk-RZ4UMDVF.js} +1 -1
- package/public/{chunk-MOOIK26Y.js → chunk-SZXKSRVG.js} +1 -1
- package/public/{chunk-A3QYRD6T.js → chunk-TYM2IKKZ.js} +1 -1
- package/public/{chunk-FXJWZ2UF.js → chunk-ULWO2VVV.js} +1 -1
- package/public/{chunk-H5WTK5UT.js → chunk-V35TPDVW.js} +1 -1
- package/public/{chunk-FV6RCQPN.js → chunk-VUXV5F3D.js} +1 -1
- package/public/{chunk-F3DTISE4.js → chunk-WP55NF6D.js} +1 -1
- package/public/{chunk-KAZPFVGN.js → chunk-WRO77OEO.js} +1 -1
- package/public/{chunk-L5ZV5OL2.js → chunk-WYHYUPM6.js} +1 -1
- package/public/{chunk-5QVTYNT7.js → chunk-XTHHRD72.js} +1 -1
- package/public/{chunk-ZD6PQFLB.js → chunk-YLBALIW6.js} +1 -1
- package/public/{chunk-TD5VR6DO.js → chunk-YO7SFY4E.js} +1 -1
- package/public/chunk-ZBNNBPMQ.js +1 -0
- package/public/chunk-ZC3LHWJU.js +1 -0
- package/public/{chunk-ZHQIKQHN.js → chunk-ZFBUCUQW.js} +1 -1
- package/public/{chunk-LVH6COBV.js → chunk-ZGXQHCAZ.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-WNLVDV7O.js → main-YBDT5CSM.js} +1 -1
- package/public/assets/hap-icons/humidity-sensor.svg +0 -25
- package/public/assets/hap-icons/temperature.svg +0 -25
- package/public/assets/service-icons/irrigation-system.svg +0 -34
- package/public/assets/service-icons/lock-mechanism.svg +0 -39
- package/public/assets/service-icons/security-system.svg +0 -19
- package/public/assets/service-icons/valve-faucet.svg +0 -22
- package/public/assets/service-icons/valve-generic.svg +0 -25
- package/public/assets/service-icons/valve-irrigation.svg +0 -34
- package/public/assets/service-icons/valve-shower-head.svg +0 -32
- package/public/chunk-56HKFS2T.js +0 -12
- package/public/chunk-AUT7I6EX.js +0 -1
- package/public/chunk-CX2MYCJQ.js +0 -1
- package/public/chunk-GTE7SBW3.js +0 -1
- package/public/chunk-IOKYXV5M.js +0 -4
- package/public/chunk-SOPJIVQE.js +0 -1
- package/public/chunk-TMKMJPX5.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as pe}from"./chunk-OQ7NVATB.js";import{m as le}from"./chunk-CX2MYCJQ.js";import{f as We,ga as fe,k as he,la as ue,n as X}from"./chunk-IOKYXV5M.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,setTimeout(()=>{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};
|
|
1
|
+
import{b as pe}from"./chunk-6VEFADT5.js";import{m as le}from"./chunk-EF3XRHYY.js";import{f as We,ga as fe,k as he,la as ue,n as X}from"./chunk-645YHJEQ.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,setTimeout(()=>{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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-V35TPDVW.js";import{k as p,n as m}from"./chunk-EF3XRHYY.js";import{a as c}from"./chunk-FYDO54CR.js";import{g as f,ga as n,h as r,la as a,w as s}from"./chunk-645YHJEQ.js";var l=f(u(),1);var $=(()=>{class e{$api=a(m);$toastr=a(p);$translate=a(c);downloadBackup(){return r(this,null,function*(){let t=yield s(this.$api.get("/backup/download",{observe:"response",responseType:"blob"})),i=t.headers.get("File-Name")||"homebridge-backup.tar.gz",o=t.body.size;if(o>globalThis.backup.maxBackupSize){let b=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(o/1048576).toFixed(1)}MB`});this.$toastr.warning(b,this.$translate.instant("toast.title_warning"))}(0,l.saveAs)(t.body,i)})}static \u0275fac=function(i){return new(i||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{$ as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as l0}from"./chunk-KBHPX4TF.js";import{m as i0,n as U}from"./chunk-FYI7RHOJ.js";import{b as j,c as z,e as X,l as J,r as Z,s as Q,t as e0,z as t0}from"./chunk-KYB236MX.js";import{a as B0}from"./chunk-YLBALIW6.js";import{b as c0}from"./chunk-6VEFADT5.js";import{b as s0}from"./chunk-WYHYUPM6.js";import{k as a0,n as r0}from"./chunk-EF3XRHYY.js";import{a as n0,b as o0}from"./chunk-FYDO54CR.js";import{Hb as x,Ib as C,Ic as p,Jb as _,Jc as d,Lb as E,Mb as y,Nb as g,Ob as F,Pb as c,Qb as r,Rb as I,Xa as $,_b as M,a as G,ab as n,b as Y,bc as h,dc as l,e as E0,g as y0,ga as K,h as b,la as f,mb as q,n as k,pb as T,qc as a,ra as D,rc as m,sa as R,sc as u,w as P,xc as V,yc as w,zc as H}from"./chunk-645YHJEQ.js";var p0=E0(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.Enums=A.Categories=A.Characteristics=A.Services=void 0;A.Services={"00000260-0000-1000-8000-0026BB765291":"AccessCode",AccessCode:"00000260-0000-1000-8000-0026BB765291","000000DA-0000-1000-8000-0026BB765291":"AccessControl",AccessControl:"000000DA-0000-1000-8000-0026BB765291","0000003E-0000-1000-8000-0026BB765291":"AccessoryInformation",AccessoryInformation:"0000003E-0000-1000-8000-0026BB765291","00000270-0000-1000-8000-0026BB765291":"AccessoryMetrics",AccessoryMetrics:"00000270-0000-1000-8000-0026BB765291","00000239-0000-1000-8000-0026BB765291":"AccessoryRuntimeInformation",AccessoryRuntimeInformation:"00000239-0000-1000-8000-0026BB765291","000000BB-0000-1000-8000-0026BB765291":"AirPurifier",AirPurifier:"000000BB-0000-1000-8000-0026BB765291","0000008D-0000-1000-8000-0026BB765291":"AirQualitySensor",AirQualitySensor:"0000008D-0000-1000-8000-0026BB765291","00000267-0000-1000-8000-0026BB765291":"AssetUpdate",AssetUpdate:"00000267-0000-1000-8000-0026BB765291","0000026A-0000-1000-8000-0026BB765291":"Assistant",Assistant:"0000026A-0000-1000-8000-0026BB765291","00000127-0000-1000-8000-0026BB765291":"AudioStreamManagement",AudioStreamManagement:"00000127-0000-1000-8000-0026BB765291","00000096-0000-1000-8000-0026BB765291":"Battery",Battery:"00000096-0000-1000-8000-0026BB765291","0000021A-0000-1000-8000-0026BB765291":"CameraOperatingMode",CameraOperatingMode:"0000021A-0000-1000-8000-0026BB765291","00000204-0000-1000-8000-0026BB765291":"CameraRecordingManagement",CameraRecordingManagement:"00000204-0000-1000-8000-0026BB765291","00000110-0000-1000-8000-0026BB765291":"CameraRTPStreamManagement",CameraRTPStreamManagement:"00000110-0000-1000-8000-0026BB765291","00000097-0000-1000-8000-0026BB765291":"CarbonDioxideSensor",CarbonDioxideSensor:"00000097-0000-1000-8000-0026BB765291","0000007F-0000-1000-8000-0026BB765291":"CarbonMonoxideSensor",CarbonMonoxideSensor:"0000007F-0000-1000-8000-0026BB765291","0000005A-0000-1000-8000-0026BB765291":"CloudRelay",CloudRelay:"0000005A-0000-1000-8000-0026BB765291","00000080-0000-1000-8000-0026BB765291":"ContactSensor",ContactSensor:"00000080-0000-1000-8000-0026BB765291","00000129-0000-1000-8000-0026BB765291":"DataStreamTransportManagement",DataStreamTransportManagement:"00000129-0000-1000-8000-0026BB765291","00000237-0000-1000-8000-0026BB765291":"Diagnostics",Diagnostics:"00000237-0000-1000-8000-0026BB765291","00000081-0000-1000-8000-0026BB765291":"Door",Door:"00000081-0000-1000-8000-0026BB765291","00000121-0000-1000-8000-0026BB765291":"Doorbell",Doorbell:"00000121-0000-1000-8000-0026BB765291","00000040-0000-1000-8000-0026BB765291":"Fan",Fan:"00000040-0000-1000-8000-0026BB765291","000000B7-0000-1000-8000-0026BB765291":"Fanv2",Fanv2:"000000B7-0000-1000-8000-0026BB765291","000000D7-0000-1000-8000-0026BB765291":"Faucet",Faucet:"000000D7-0000-1000-8000-0026BB765291","000000BA-0000-1000-8000-0026BB765291":"FilterMaintenance",FilterMaintenance:"000000BA-0000-1000-8000-0026BB765291","00000236-0000-1000-8000-0026BB765291":"FirmwareUpdate",FirmwareUpdate:"00000236-0000-1000-8000-0026BB765291","00000041-0000-1000-8000-0026BB765291":"GarageDoorOpener",GarageDoorOpener:"00000041-0000-1000-8000-0026BB765291","000000BC-0000-1000-8000-0026BB765291":"HeaterCooler",HeaterCooler:"000000BC-0000-1000-8000-0026BB765291","000000BD-0000-1000-8000-0026BB765291":"HumidifierDehumidifier",HumidifierDehumidifier:"000000BD-0000-1000-8000-0026BB765291","00000082-0000-1000-8000-0026BB765291":"HumiditySensor",HumiditySensor:"00000082-0000-1000-8000-0026BB765291","000000D9-0000-1000-8000-0026BB765291":"InputSource",InputSource:"000000D9-0000-1000-8000-0026BB765291","000000CF-0000-1000-8000-0026BB765291":"IrrigationSystem",IrrigationSystem:"000000CF-0000-1000-8000-0026BB765291","00000083-0000-1000-8000-0026BB765291":"LeakSensor",LeakSensor:"00000083-0000-1000-8000-0026BB765291","00000043-0000-1000-8000-0026BB765291":"Lightbulb",Lightbulb:"00000043-0000-1000-8000-0026BB765291","00000084-0000-1000-8000-0026BB765291":"LightSensor",LightSensor:"00000084-0000-1000-8000-0026BB765291","00000044-0000-1000-8000-0026BB765291":"LockManagement",LockManagement:"00000044-0000-1000-8000-0026BB765291","00000045-0000-1000-8000-0026BB765291":"LockMechanism",LockMechanism:"00000045-0000-1000-8000-0026BB765291","00000112-0000-1000-8000-0026BB765291":"Microphone",Microphone:"00000112-0000-1000-8000-0026BB765291","00000085-0000-1000-8000-0026BB765291":"MotionSensor",MotionSensor:"00000085-0000-1000-8000-0026BB765291","00000266-0000-1000-8000-0026BB765291":"NFCAccess",NFCAccess:"00000266-0000-1000-8000-0026BB765291","00000086-0000-1000-8000-0026BB765291":"OccupancySensor",OccupancySensor:"00000086-0000-1000-8000-0026BB765291","00000047-0000-1000-8000-0026BB765291":"Outlet",Outlet:"00000047-0000-1000-8000-0026BB765291","00000055-0000-1000-8000-0026BB765291":"Pairing",Pairing:"00000055-0000-1000-8000-0026BB765291","00000221-0000-1000-8000-0026BB765291":"PowerManagement",PowerManagement:"00000221-0000-1000-8000-0026BB765291","000000A2-0000-1000-8000-0026BB765291":"ProtocolInformation",ProtocolInformation:"000000A2-0000-1000-8000-0026BB765291","0000007E-0000-1000-8000-0026BB765291":"SecuritySystem",SecuritySystem:"0000007E-0000-1000-8000-0026BB765291","000000CC-0000-1000-8000-0026BB765291":"ServiceLabel",ServiceLabel:"000000CC-0000-1000-8000-0026BB765291","00000133-0000-1000-8000-0026BB765291":"Siri",Siri:"00000133-0000-1000-8000-0026BB765291","00000253-0000-1000-8000-0026BB765291":"SiriEndpoint",SiriEndpoint:"00000253-0000-1000-8000-0026BB765291","000000B9-0000-1000-8000-0026BB765291":"Slats",Slats:"000000B9-0000-1000-8000-0026BB765291","00000228-0000-1000-8000-0026BB765291":"SmartSpeaker",SmartSpeaker:"00000228-0000-1000-8000-0026BB765291","00000087-0000-1000-8000-0026BB765291":"SmokeSensor",SmokeSensor:"00000087-0000-1000-8000-0026BB765291","00000113-0000-1000-8000-0026BB765291":"Speaker",Speaker:"00000113-0000-1000-8000-0026BB765291","00000088-0000-1000-8000-0026BB765291":"StatefulProgrammableSwitch",StatefulProgrammableSwitch:"00000088-0000-1000-8000-0026BB765291","00000089-0000-1000-8000-0026BB765291":"StatelessProgrammableSwitch",StatelessProgrammableSwitch:"00000089-0000-1000-8000-0026BB765291","00000049-0000-1000-8000-0026BB765291":"Switch",Switch:"00000049-0000-1000-8000-0026BB765291","0000022E-0000-1000-8000-0026BB765291":"TapManagement",TapManagement:"0000022E-0000-1000-8000-0026BB765291","00000125-0000-1000-8000-0026BB765291":"TargetControl",TargetControl:"00000125-0000-1000-8000-0026BB765291","00000122-0000-1000-8000-0026BB765291":"TargetControlManagement",TargetControlManagement:"00000122-0000-1000-8000-0026BB765291","000000D8-0000-1000-8000-0026BB765291":"Television",Television:"000000D8-0000-1000-8000-0026BB765291",TelevisionSpeaker:"00000113-0000-1000-8000-0026BB765291","0000008A-0000-1000-8000-0026BB765291":"TemperatureSensor",TemperatureSensor:"0000008A-0000-1000-8000-0026BB765291","0000004A-0000-1000-8000-0026BB765291":"Thermostat",Thermostat:"0000004A-0000-1000-8000-0026BB765291","00000701-0000-1000-8000-0026BB765291":"ThreadTransport",ThreadTransport:"00000701-0000-1000-8000-0026BB765291","00000203-0000-1000-8000-0026BB765291":"TransferTransportManagement",TransferTransportManagement:"00000203-0000-1000-8000-0026BB765291","00000056-0000-1000-8000-0026BB765291":"Tunnel",Tunnel:"00000056-0000-1000-8000-0026BB765291","000000D0-0000-1000-8000-0026BB765291":"Valve",Valve:"000000D0-0000-1000-8000-0026BB765291","0000020A-0000-1000-8000-0026BB765291":"WiFiRouter",WiFiRouter:"0000020A-0000-1000-8000-0026BB765291","0000020F-0000-1000-8000-0026BB765291":"WiFiSatellite",WiFiSatellite:"0000020F-0000-1000-8000-0026BB765291","0000022A-0000-1000-8000-0026BB765291":"WiFiTransport",WiFiTransport:"0000022A-0000-1000-8000-0026BB765291","0000008B-0000-1000-8000-0026BB765291":"Window",Window:"0000008B-0000-1000-8000-0026BB765291","0000008C-0000-1000-8000-0026BB765291":"WindowCovering",WindowCovering:"0000008C-0000-1000-8000-0026BB765291"};A.Characteristics={"00000262-0000-1000-8000-0026BB765291":"AccessCodeControlPoint",AccessCodeControlPoint:"00000262-0000-1000-8000-0026BB765291","00000261-0000-1000-8000-0026BB765291":"AccessCodeSupportedConfiguration",AccessCodeSupportedConfiguration:"00000261-0000-1000-8000-0026BB765291","000000E5-0000-1000-8000-0026BB765291":"AccessControlLevel",AccessControlLevel:"000000E5-0000-1000-8000-0026BB765291","000000A6-0000-1000-8000-0026BB765291":"AccessoryFlags",AccessoryFlags:"000000A6-0000-1000-8000-0026BB765291","00000057-0000-1000-8000-0026BB765291":"AccessoryIdentifier",AccessoryIdentifier:"00000057-0000-1000-8000-0026BB765291","000000B0-0000-1000-8000-0026BB765291":"Active",Active:"000000B0-0000-1000-8000-0026BB765291","000000E7-0000-1000-8000-0026BB765291":"ActiveIdentifier",ActiveIdentifier:"000000E7-0000-1000-8000-0026BB765291","0000023B-0000-1000-8000-0026BB765291":"ActivityInterval",ActivityInterval:"0000023B-0000-1000-8000-0026BB765291","00000001-0000-1000-8000-0026BB765291":"AdministratorOnlyAccess",AdministratorOnlyAccess:"00000001-0000-1000-8000-0026BB765291","00000064-0000-1000-8000-0026BB765291":"AirParticulateDensity",AirParticulateDensity:"00000064-0000-1000-8000-0026BB765291","00000065-0000-1000-8000-0026BB765291":"AirParticulateSize",AirParticulateSize:"00000065-0000-1000-8000-0026BB765291","0000025B-0000-1000-8000-0026BB765291":"AirPlayEnable",AirPlayEnable:"0000025B-0000-1000-8000-0026BB765291","00000095-0000-1000-8000-0026BB765291":"AirQuality",AirQuality:"00000095-0000-1000-8000-0026BB765291","000000A4-0000-1000-8000-0026BB765291":"AppMatchingIdentifier",AppMatchingIdentifier:"000000A4-0000-1000-8000-0026BB765291","00000269-0000-1000-8000-0026BB765291":"AssetUpdateReadiness",AssetUpdateReadiness:"00000269-0000-1000-8000-0026BB765291","00000005-0000-1000-8000-0026BB765291":"AudioFeedback",AudioFeedback:"00000005-0000-1000-8000-0026BB765291","00000068-0000-1000-8000-0026BB765291":"BatteryLevel",BatteryLevel:"00000068-0000-1000-8000-0026BB765291","00000008-0000-1000-8000-0026BB765291":"Brightness",Brightness:"00000008-0000-1000-8000-0026BB765291","00000126-0000-1000-8000-0026BB765291":"ButtonEvent",ButtonEvent:"00000126-0000-1000-8000-0026BB765291","0000021D-0000-1000-8000-0026BB765291":"CameraOperatingModeIndicator",CameraOperatingModeIndicator:"0000021D-0000-1000-8000-0026BB765291","00000092-0000-1000-8000-0026BB765291":"CarbonDioxideDetected",CarbonDioxideDetected:"00000092-0000-1000-8000-0026BB765291","00000093-0000-1000-8000-0026BB765291":"CarbonDioxideLevel",CarbonDioxideLevel:"00000093-0000-1000-8000-0026BB765291","00000094-0000-1000-8000-0026BB765291":"CarbonDioxidePeakLevel",CarbonDioxidePeakLevel:"00000094-0000-1000-8000-0026BB765291","00000069-0000-1000-8000-0026BB765291":"CarbonMonoxideDetected",CarbonMonoxideDetected:"00000069-0000-1000-8000-0026BB765291","00000090-0000-1000-8000-0026BB765291":"CarbonMonoxideLevel",CarbonMonoxideLevel:"00000090-0000-1000-8000-0026BB765291","00000091-0000-1000-8000-0026BB765291":"CarbonMonoxidePeakLevel",CarbonMonoxidePeakLevel:"00000091-0000-1000-8000-0026BB765291","00000246-0000-1000-8000-0026BB765291":"CCAEnergyDetectThreshold",CCAEnergyDetectThreshold:"00000246-0000-1000-8000-0026BB765291","00000245-0000-1000-8000-0026BB765291":"CCASignalDetectThreshold",CCASignalDetectThreshold:"00000245-0000-1000-8000-0026BB765291","0000024B-0000-1000-8000-0026BB765291":"CharacteristicValueActiveTransitionCount",CharacteristicValueActiveTransitionCount:"0000024B-0000-1000-8000-0026BB765291","00000143-0000-1000-8000-0026BB765291":"CharacteristicValueTransitionControl",CharacteristicValueTransitionControl:"00000143-0000-1000-8000-0026BB765291","0000008F-0000-1000-8000-0026BB765291":"ChargingState",ChargingState:"0000008F-0000-1000-8000-0026BB765291","000000DD-0000-1000-8000-0026BB765291":"ClosedCaptions",ClosedCaptions:"000000DD-0000-1000-8000-0026BB765291","000000CE-0000-1000-8000-0026BB765291":"ColorTemperature",ColorTemperature:"000000CE-0000-1000-8000-0026BB765291","00000263-0000-1000-8000-0026BB765291":"ConfigurationState",ConfigurationState:"00000263-0000-1000-8000-0026BB765291","000000E3-0000-1000-8000-0026BB765291":"ConfiguredName",ConfiguredName:"000000E3-0000-1000-8000-0026BB765291","0000006A-0000-1000-8000-0026BB765291":"ContactSensorState",ContactSensorState:"0000006A-0000-1000-8000-0026BB765291","0000000D-0000-1000-8000-0026BB765291":"CoolingThresholdTemperature",CoolingThresholdTemperature:"0000000D-0000-1000-8000-0026BB765291","00000250-0000-1000-8000-0026BB765291":"CryptoHash",CryptoHash:"00000250-0000-1000-8000-0026BB765291","000000A9-0000-1000-8000-0026BB765291":"CurrentAirPurifierState",CurrentAirPurifierState:"000000A9-0000-1000-8000-0026BB765291","0000006B-0000-1000-8000-0026BB765291":"CurrentAmbientLightLevel",CurrentAmbientLightLevel:"0000006B-0000-1000-8000-0026BB765291","0000000E-0000-1000-8000-0026BB765291":"CurrentDoorState",CurrentDoorState:"0000000E-0000-1000-8000-0026BB765291","000000AF-0000-1000-8000-0026BB765291":"CurrentFanState",CurrentFanState:"000000AF-0000-1000-8000-0026BB765291","000000B1-0000-1000-8000-0026BB765291":"CurrentHeaterCoolerState",CurrentHeaterCoolerState:"000000B1-0000-1000-8000-0026BB765291","0000000F-0000-1000-8000-0026BB765291":"CurrentHeatingCoolingState",CurrentHeatingCoolingState:"0000000F-0000-1000-8000-0026BB765291","0000006C-0000-1000-8000-0026BB765291":"CurrentHorizontalTiltAngle",CurrentHorizontalTiltAngle:"0000006C-0000-1000-8000-0026BB765291","000000B3-0000-1000-8000-0026BB765291":"CurrentHumidifierDehumidifierState",CurrentHumidifierDehumidifierState:"000000B3-0000-1000-8000-0026BB765291","000000E0-0000-1000-8000-0026BB765291":"CurrentMediaState",CurrentMediaState:"000000E0-0000-1000-8000-0026BB765291","0000006D-0000-1000-8000-0026BB765291":"CurrentPosition",CurrentPosition:"0000006D-0000-1000-8000-0026BB765291","00000010-0000-1000-8000-0026BB765291":"CurrentRelativeHumidity",CurrentRelativeHumidity:"00000010-0000-1000-8000-0026BB765291","000000AA-0000-1000-8000-0026BB765291":"CurrentSlatState",CurrentSlatState:"000000AA-0000-1000-8000-0026BB765291","00000011-0000-1000-8000-0026BB765291":"CurrentTemperature",CurrentTemperature:"00000011-0000-1000-8000-0026BB765291","000000C1-0000-1000-8000-0026BB765291":"CurrentTiltAngle",CurrentTiltAngle:"000000C1-0000-1000-8000-0026BB765291","0000022B-0000-1000-8000-0026BB765291":"CurrentTransport",CurrentTransport:"0000022B-0000-1000-8000-0026BB765291","0000006E-0000-1000-8000-0026BB765291":"CurrentVerticalTiltAngle",CurrentVerticalTiltAngle:"0000006E-0000-1000-8000-0026BB765291","00000135-0000-1000-8000-0026BB765291":"CurrentVisibilityState",CurrentVisibilityState:"00000135-0000-1000-8000-0026BB765291","00000138-0000-1000-8000-0026BB765291":"DataStreamHAPTransport",DataStreamHAPTransport:"00000138-0000-1000-8000-0026BB765291","00000139-0000-1000-8000-0026BB765291":"DataStreamHAPTransportInterrupt",DataStreamHAPTransportInterrupt:"00000139-0000-1000-8000-0026BB765291","00000224-0000-1000-8000-0026BB765291":"DiagonalFieldOfView",DiagonalFieldOfView:"00000224-0000-1000-8000-0026BB765291","0000011D-0000-1000-8000-0026BB765291":"DigitalZoom",DigitalZoom:"0000011D-0000-1000-8000-0026BB765291","00000136-0000-1000-8000-0026BB765291":"DisplayOrder",DisplayOrder:"00000136-0000-1000-8000-0026BB765291","0000023D-0000-1000-8000-0026BB765291":"EventRetransmissionMaximum",EventRetransmissionMaximum:"0000023D-0000-1000-8000-0026BB765291","00000223-0000-1000-8000-0026BB765291":"EventSnapshotsActive",EventSnapshotsActive:"00000223-0000-1000-8000-0026BB765291","0000023E-0000-1000-8000-0026BB765291":"EventTransmissionCounters",EventTransmissionCounters:"0000023E-0000-1000-8000-0026BB765291","000000AC-0000-1000-8000-0026BB765291":"FilterChangeIndication",FilterChangeIndication:"000000AC-0000-1000-8000-0026BB765291","000000AB-0000-1000-8000-0026BB765291":"FilterLifeLevel",FilterLifeLevel:"000000AB-0000-1000-8000-0026BB765291","00000052-0000-1000-8000-0026BB765291":"FirmwareRevision",FirmwareRevision:"00000052-0000-1000-8000-0026BB765291","00000234-0000-1000-8000-0026BB765291":"FirmwareUpdateReadiness",FirmwareUpdateReadiness:"00000234-0000-1000-8000-0026BB765291","00000235-0000-1000-8000-0026BB765291":"FirmwareUpdateStatus",FirmwareUpdateStatus:"00000235-0000-1000-8000-0026BB765291","0000026C-0000-1000-8000-0026BB765291":"HardwareFinish",HardwareFinish:"0000026C-0000-1000-8000-0026BB765291","00000053-0000-1000-8000-0026BB765291":"HardwareRevision",HardwareRevision:"00000053-0000-1000-8000-0026BB765291","0000024A-0000-1000-8000-0026BB765291":"HeartBeat",HeartBeat:"0000024A-0000-1000-8000-0026BB765291","00000012-0000-1000-8000-0026BB765291":"HeatingThresholdTemperature",HeatingThresholdTemperature:"00000012-0000-1000-8000-0026BB765291","0000006F-0000-1000-8000-0026BB765291":"HoldPosition",HoldPosition:"0000006F-0000-1000-8000-0026BB765291","0000021B-0000-1000-8000-0026BB765291":"HomeKitCameraActive",HomeKitCameraActive:"0000021B-0000-1000-8000-0026BB765291","00000013-0000-1000-8000-0026BB765291":"Hue",Hue:"00000013-0000-1000-8000-0026BB765291","000000E6-0000-1000-8000-0026BB765291":"Identifier",Identifier:"000000E6-0000-1000-8000-0026BB765291","00000014-0000-1000-8000-0026BB765291":"Identify",Identify:"00000014-0000-1000-8000-0026BB765291","0000011F-0000-1000-8000-0026BB765291":"ImageMirroring",ImageMirroring:"0000011F-0000-1000-8000-0026BB765291","0000011E-0000-1000-8000-0026BB765291":"ImageRotation",ImageRotation:"0000011E-0000-1000-8000-0026BB765291","000000DC-0000-1000-8000-0026BB765291":"InputDeviceType",InputDeviceType:"000000DC-0000-1000-8000-0026BB765291","000000DB-0000-1000-8000-0026BB765291":"InputSourceType",InputSourceType:"000000DB-0000-1000-8000-0026BB765291","000000D2-0000-1000-8000-0026BB765291":"InUse",InUse:"000000D2-0000-1000-8000-0026BB765291","000000D6-0000-1000-8000-0026BB765291":"IsConfigured",IsConfigured:"000000D6-0000-1000-8000-0026BB765291","00000070-0000-1000-8000-0026BB765291":"LeakDetected",LeakDetected:"00000070-0000-1000-8000-0026BB765291","00000050-0000-1000-8000-0026BB765291":"ListPairings",ListPairings:"00000050-0000-1000-8000-0026BB765291","00000019-0000-1000-8000-0026BB765291":"LockControlPoint",LockControlPoint:"00000019-0000-1000-8000-0026BB765291","0000001D-0000-1000-8000-0026BB765291":"LockCurrentState",LockCurrentState:"0000001D-0000-1000-8000-0026BB765291","0000001C-0000-1000-8000-0026BB765291":"LockLastKnownAction",LockLastKnownAction:"0000001C-0000-1000-8000-0026BB765291","0000001A-0000-1000-8000-0026BB765291":"LockManagementAutoSecurityTimeout",LockManagementAutoSecurityTimeout:"0000001A-0000-1000-8000-0026BB765291","000000A7-0000-1000-8000-0026BB765291":"LockPhysicalControls",LockPhysicalControls:"000000A7-0000-1000-8000-0026BB765291","0000001E-0000-1000-8000-0026BB765291":"LockTargetState",LockTargetState:"0000001E-0000-1000-8000-0026BB765291","0000001F-0000-1000-8000-0026BB765291":"Logs",Logs:"0000001F-0000-1000-8000-0026BB765291","00000247-0000-1000-8000-0026BB765291":"MACRetransmissionMaximum",MACRetransmissionMaximum:"00000247-0000-1000-8000-0026BB765291","00000248-0000-1000-8000-0026BB765291":"MACTransmissionCounters",MACTransmissionCounters:"00000248-0000-1000-8000-0026BB765291","00000215-0000-1000-8000-0026BB765291":"ManagedNetworkEnable",ManagedNetworkEnable:"00000215-0000-1000-8000-0026BB765291","00000227-0000-1000-8000-0026BB765291":"ManuallyDisabled",ManuallyDisabled:"00000227-0000-1000-8000-0026BB765291","00000020-0000-1000-8000-0026BB765291":"Manufacturer",Manufacturer:"00000020-0000-1000-8000-0026BB765291","0000026D-0000-1000-8000-0026BB765291":"MatterFirmwareRevisionNumber",MatterFirmwareRevisionNumber:"0000026D-0000-1000-8000-0026BB765291","0000026E-0000-1000-8000-0026BB765291":"MatterFirmwareUpdateStatus",MatterFirmwareUpdateStatus:"0000026E-0000-1000-8000-0026BB765291","00000243-0000-1000-8000-0026BB765291":"MaximumTransmitPower",MaximumTransmitPower:"00000243-0000-1000-8000-0026BB765291","00000272-0000-1000-8000-0026BB765291":"MetricsBufferFullState",MetricsBufferFullState:"00000272-0000-1000-8000-0026BB765291","00000021-0000-1000-8000-0026BB765291":"Model",Model:"00000021-0000-1000-8000-0026BB765291","00000022-0000-1000-8000-0026BB765291":"MotionDetected",MotionDetected:"00000022-0000-1000-8000-0026BB765291","0000026B-0000-1000-8000-0026BB765291":"MultifunctionButton",MultifunctionButton:"0000026B-0000-1000-8000-0026BB765291","0000011A-0000-1000-8000-0026BB765291":"Mute",Mute:"0000011A-0000-1000-8000-0026BB765291","00000023-0000-1000-8000-0026BB765291":"Name",Name:"00000023-0000-1000-8000-0026BB765291","0000021F-0000-1000-8000-0026BB765291":"NetworkAccessViolationControl",NetworkAccessViolationControl:"0000021F-0000-1000-8000-0026BB765291","0000020C-0000-1000-8000-0026BB765291":"NetworkClientProfileControl",NetworkClientProfileControl:"0000020C-0000-1000-8000-0026BB765291","0000020D-0000-1000-8000-0026BB765291":"NetworkClientStatusControl",NetworkClientStatusControl:"0000020D-0000-1000-8000-0026BB765291","00000264-0000-1000-8000-0026BB765291":"NFCAccessControlPoint",NFCAccessControlPoint:"00000264-0000-1000-8000-0026BB765291","00000265-0000-1000-8000-0026BB765291":"NFCAccessSupportedConfiguration",NFCAccessSupportedConfiguration:"00000265-0000-1000-8000-0026BB765291","0000011B-0000-1000-8000-0026BB765291":"NightVision",NightVision:"0000011B-0000-1000-8000-0026BB765291","000000C4-0000-1000-8000-0026BB765291":"NitrogenDioxideDensity",NitrogenDioxideDensity:"000000C4-0000-1000-8000-0026BB765291","00000024-0000-1000-8000-0026BB765291":"ObstructionDetected",ObstructionDetected:"00000024-0000-1000-8000-0026BB765291","00000071-0000-1000-8000-0026BB765291":"OccupancyDetected",OccupancyDetected:"00000071-0000-1000-8000-0026BB765291","00000025-0000-1000-8000-0026BB765291":"On",On:"00000025-0000-1000-8000-0026BB765291","00000232-0000-1000-8000-0026BB765291":"OperatingStateResponse",OperatingStateResponse:"00000232-0000-1000-8000-0026BB765291","0000011C-0000-1000-8000-0026BB765291":"OpticalZoom",OpticalZoom:"0000011C-0000-1000-8000-0026BB765291","00000026-0000-1000-8000-0026BB765291":"OutletInUse",OutletInUse:"00000026-0000-1000-8000-0026BB765291","000000C3-0000-1000-8000-0026BB765291":"OzoneDensity",OzoneDensity:"000000C3-0000-1000-8000-0026BB765291","0000004F-0000-1000-8000-0026BB765291":"PairingFeatures",PairingFeatures:"0000004F-0000-1000-8000-0026BB765291","0000004C-0000-1000-8000-0026BB765291":"PairSetup",PairSetup:"0000004C-0000-1000-8000-0026BB765291","0000004E-0000-1000-8000-0026BB765291":"PairVerify",PairVerify:"0000004E-0000-1000-8000-0026BB765291","000000E4-0000-1000-8000-0026BB765291":"PasswordSetting",PasswordSetting:"000000E4-0000-1000-8000-0026BB765291","00000225-0000-1000-8000-0026BB765291":"PeriodicSnapshotsActive",PeriodicSnapshotsActive:"00000225-0000-1000-8000-0026BB765291","000000E2-0000-1000-8000-0026BB765291":"PictureMode",PictureMode:"000000E2-0000-1000-8000-0026BB765291","0000023C-0000-1000-8000-0026BB765291":"Ping",Ping:"0000023C-0000-1000-8000-0026BB765291","000000C7-0000-1000-8000-0026BB765291":"PM10Density",PM10Density:"000000C7-0000-1000-8000-0026BB765291","000000C6-0000-1000-8000-0026BB765291":"PM2_5Density",PM2_5Density:"000000C6-0000-1000-8000-0026BB765291","00000072-0000-1000-8000-0026BB765291":"PositionState",PositionState:"00000072-0000-1000-8000-0026BB765291","000000DF-0000-1000-8000-0026BB765291":"PowerModeSelection",PowerModeSelection:"000000DF-0000-1000-8000-0026BB765291","00000220-0000-1000-8000-0026BB765291":"ProductData",ProductData:"00000220-0000-1000-8000-0026BB765291","00000073-0000-1000-8000-0026BB765291":"ProgrammableSwitchEvent",ProgrammableSwitchEvent:"00000073-0000-1000-8000-0026BB765291","00000074-0000-1000-8000-0026BB765291":"ProgrammableSwitchOutputState",ProgrammableSwitchOutputState:"00000074-0000-1000-8000-0026BB765291","000000D1-0000-1000-8000-0026BB765291":"ProgramMode",ProgramMode:"000000D1-0000-1000-8000-0026BB765291","0000023F-0000-1000-8000-0026BB765291":"ReceivedSignalStrengthIndication",ReceivedSignalStrengthIndication:"0000023F-0000-1000-8000-0026BB765291","00000244-0000-1000-8000-0026BB765291":"ReceiverSensitivity",ReceiverSensitivity:"00000244-0000-1000-8000-0026BB765291","00000226-0000-1000-8000-0026BB765291":"RecordingAudioActive",RecordingAudioActive:"00000226-0000-1000-8000-0026BB765291","000000C9-0000-1000-8000-0026BB765291":"RelativeHumidityDehumidifierThreshold",RelativeHumidityDehumidifierThreshold:"000000C9-0000-1000-8000-0026BB765291","000000CA-0000-1000-8000-0026BB765291":"RelativeHumidityHumidifierThreshold",RelativeHumidityHumidifierThreshold:"000000CA-0000-1000-8000-0026BB765291","0000005E-0000-1000-8000-0026BB765291":"RelayControlPoint",RelayControlPoint:"0000005E-0000-1000-8000-0026BB765291","0000005B-0000-1000-8000-0026BB765291":"RelayEnabled",RelayEnabled:"0000005B-0000-1000-8000-0026BB765291","0000005C-0000-1000-8000-0026BB765291":"RelayState",RelayState:"0000005C-0000-1000-8000-0026BB765291","000000D4-0000-1000-8000-0026BB765291":"RemainingDuration",RemainingDuration:"000000D4-0000-1000-8000-0026BB765291","000000E1-0000-1000-8000-0026BB765291":"RemoteKey",RemoteKey:"000000E1-0000-1000-8000-0026BB765291","000000AD-0000-1000-8000-0026BB765291":"ResetFilterIndication",ResetFilterIndication:"000000AD-0000-1000-8000-0026BB765291","00000028-0000-1000-8000-0026BB765291":"RotationDirection",RotationDirection:"00000028-0000-1000-8000-0026BB765291","00000029-0000-1000-8000-0026BB765291":"RotationSpeed",RotationSpeed:"00000029-0000-1000-8000-0026BB765291","0000020E-0000-1000-8000-0026BB765291":"RouterStatus",RouterStatus:"0000020E-0000-1000-8000-0026BB765291","0000002F-0000-1000-8000-0026BB765291":"Saturation",Saturation:"0000002F-0000-1000-8000-0026BB765291","0000008E-0000-1000-8000-0026BB765291":"SecuritySystemAlarmType",SecuritySystemAlarmType:"0000008E-0000-1000-8000-0026BB765291","00000066-0000-1000-8000-0026BB765291":"SecuritySystemCurrentState",SecuritySystemCurrentState:"00000066-0000-1000-8000-0026BB765291","00000067-0000-1000-8000-0026BB765291":"SecuritySystemTargetState",SecuritySystemTargetState:"00000067-0000-1000-8000-0026BB765291","00000128-0000-1000-8000-0026BB765291":"SelectedAudioStreamConfiguration",SelectedAudioStreamConfiguration:"00000128-0000-1000-8000-0026BB765291","00000209-0000-1000-8000-0026BB765291":"SelectedCameraRecordingConfiguration",SelectedCameraRecordingConfiguration:"00000209-0000-1000-8000-0026BB765291","0000024D-0000-1000-8000-0026BB765291":"SelectedDiagnosticsModes",SelectedDiagnosticsModes:"0000024D-0000-1000-8000-0026BB765291","00000117-0000-1000-8000-0026BB765291":"SelectedRTPStreamConfiguration",SelectedRTPStreamConfiguration:"00000117-0000-1000-8000-0026BB765291","00000252-0000-1000-8000-0026BB765291":"SelectedSleepConfiguration",SelectedSleepConfiguration:"00000252-0000-1000-8000-0026BB765291","00000030-0000-1000-8000-0026BB765291":"SerialNumber",SerialNumber:"00000030-0000-1000-8000-0026BB765291","000000CB-0000-1000-8000-0026BB765291":"ServiceLabelIndex",ServiceLabelIndex:"000000CB-0000-1000-8000-0026BB765291","000000CD-0000-1000-8000-0026BB765291":"ServiceLabelNamespace",ServiceLabelNamespace:"000000CD-0000-1000-8000-0026BB765291","000000D3-0000-1000-8000-0026BB765291":"SetDuration",SetDuration:"000000D3-0000-1000-8000-0026BB765291","00000131-0000-1000-8000-0026BB765291":"SetupDataStreamTransport",SetupDataStreamTransport:"00000131-0000-1000-8000-0026BB765291","00000118-0000-1000-8000-0026BB765291":"SetupEndpoints",SetupEndpoints:"00000118-0000-1000-8000-0026BB765291","00000201-0000-1000-8000-0026BB765291":"SetupTransferTransport",SetupTransferTransport:"00000201-0000-1000-8000-0026BB765291","00000241-0000-1000-8000-0026BB765291":"SignalToNoiseRatio",SignalToNoiseRatio:"00000241-0000-1000-8000-0026BB765291","00000255-0000-1000-8000-0026BB765291":"SiriEnable",SiriEnable:"00000255-0000-1000-8000-0026BB765291","00000254-0000-1000-8000-0026BB765291":"SiriEndpointSessionStatus",SiriEndpointSessionStatus:"00000254-0000-1000-8000-0026BB765291","0000025A-0000-1000-8000-0026BB765291":"SiriEngineVersion",SiriEngineVersion:"0000025A-0000-1000-8000-0026BB765291","00000132-0000-1000-8000-0026BB765291":"SiriInputType",SiriInputType:"00000132-0000-1000-8000-0026BB765291","00000258-0000-1000-8000-0026BB765291":"SiriLightOnUse",SiriLightOnUse:"00000258-0000-1000-8000-0026BB765291","00000256-0000-1000-8000-0026BB765291":"SiriListening",SiriListening:"00000256-0000-1000-8000-0026BB765291","00000257-0000-1000-8000-0026BB765291":"SiriTouchToUse",SiriTouchToUse:"00000257-0000-1000-8000-0026BB765291","000000C0-0000-1000-8000-0026BB765291":"SlatType",SlatType:"000000C0-0000-1000-8000-0026BB765291","000000E8-0000-1000-8000-0026BB765291":"SleepDiscoveryMode",SleepDiscoveryMode:"000000E8-0000-1000-8000-0026BB765291","0000023A-0000-1000-8000-0026BB765291":"SleepInterval",SleepInterval:"0000023A-0000-1000-8000-0026BB765291","00000076-0000-1000-8000-0026BB765291":"SmokeDetected",SmokeDetected:"00000076-0000-1000-8000-0026BB765291","00000054-0000-1000-8000-0026BB765291":"SoftwareRevision",SoftwareRevision:"00000054-0000-1000-8000-0026BB765291","00000249-0000-1000-8000-0026BB765291":"StagedFirmwareVersion",StagedFirmwareVersion:"00000249-0000-1000-8000-0026BB765291","00000075-0000-1000-8000-0026BB765291":"StatusActive",StatusActive:"00000075-0000-1000-8000-0026BB765291","00000077-0000-1000-8000-0026BB765291":"StatusFault",StatusFault:"00000077-0000-1000-8000-0026BB765291","00000078-0000-1000-8000-0026BB765291":"StatusJammed",StatusJammed:"00000078-0000-1000-8000-0026BB765291","00000079-0000-1000-8000-0026BB765291":"StatusLowBattery",StatusLowBattery:"00000079-0000-1000-8000-0026BB765291","0000007A-0000-1000-8000-0026BB765291":"StatusTampered",StatusTampered:"0000007A-0000-1000-8000-0026BB765291","00000120-0000-1000-8000-0026BB765291":"StreamingStatus",StreamingStatus:"00000120-0000-1000-8000-0026BB765291","000000C5-0000-1000-8000-0026BB765291":"SulphurDioxideDensity",SulphurDioxideDensity:"000000C5-0000-1000-8000-0026BB765291","00000268-0000-1000-8000-0026BB765291":"SupportedAssetTypes",SupportedAssetTypes:"00000268-0000-1000-8000-0026BB765291","00000207-0000-1000-8000-0026BB765291":"SupportedAudioRecordingConfiguration",SupportedAudioRecordingConfiguration:"00000207-0000-1000-8000-0026BB765291","00000115-0000-1000-8000-0026BB765291":"SupportedAudioStreamConfiguration",SupportedAudioStreamConfiguration:"00000115-0000-1000-8000-0026BB765291","00000205-0000-1000-8000-0026BB765291":"SupportedCameraRecordingConfiguration",SupportedCameraRecordingConfiguration:"00000205-0000-1000-8000-0026BB765291","00000144-0000-1000-8000-0026BB765291":"SupportedCharacteristicValueTransitionConfiguration",SupportedCharacteristicValueTransitionConfiguration:"00000144-0000-1000-8000-0026BB765291","00000130-0000-1000-8000-0026BB765291":"SupportedDataStreamTransportConfiguration",SupportedDataStreamTransportConfiguration:"00000130-0000-1000-8000-0026BB765291","0000024C-0000-1000-8000-0026BB765291":"SupportedDiagnosticsModes",SupportedDiagnosticsModes:"0000024C-0000-1000-8000-0026BB765291","00000238-0000-1000-8000-0026BB765291":"SupportedDiagnosticsSnapshot",SupportedDiagnosticsSnapshot:"00000238-0000-1000-8000-0026BB765291","00000233-0000-1000-8000-0026BB765291":"SupportedFirmwareUpdateConfiguration",SupportedFirmwareUpdateConfiguration:"00000233-0000-1000-8000-0026BB765291","00000271-0000-1000-8000-0026BB765291":"SupportedMetrics",SupportedMetrics:"00000271-0000-1000-8000-0026BB765291","00000210-0000-1000-8000-0026BB765291":"SupportedRouterConfiguration",SupportedRouterConfiguration:"00000210-0000-1000-8000-0026BB765291","00000116-0000-1000-8000-0026BB765291":"SupportedRTPConfiguration",SupportedRTPConfiguration:"00000116-0000-1000-8000-0026BB765291","00000251-0000-1000-8000-0026BB765291":"SupportedSleepConfiguration",SupportedSleepConfiguration:"00000251-0000-1000-8000-0026BB765291","00000202-0000-1000-8000-0026BB765291":"SupportedTransferTransportConfiguration",SupportedTransferTransportConfiguration:"00000202-0000-1000-8000-0026BB765291","00000206-0000-1000-8000-0026BB765291":"SupportedVideoRecordingConfiguration",SupportedVideoRecordingConfiguration:"00000206-0000-1000-8000-0026BB765291","00000114-0000-1000-8000-0026BB765291":"SupportedVideoStreamConfiguration",SupportedVideoStreamConfiguration:"00000114-0000-1000-8000-0026BB765291","000000B6-0000-1000-8000-0026BB765291":"SwingMode",SwingMode:"000000B6-0000-1000-8000-0026BB765291","0000022F-0000-1000-8000-0026BB765291":"TapType",TapType:"0000022F-0000-1000-8000-0026BB765291","000000A8-0000-1000-8000-0026BB765291":"TargetAirPurifierState",TargetAirPurifierState:"000000A8-0000-1000-8000-0026BB765291","00000124-0000-1000-8000-0026BB765291":"TargetControlList",TargetControlList:"00000124-0000-1000-8000-0026BB765291","00000123-0000-1000-8000-0026BB765291":"TargetControlSupportedConfiguration",TargetControlSupportedConfiguration:"00000123-0000-1000-8000-0026BB765291","00000032-0000-1000-8000-0026BB765291":"TargetDoorState",TargetDoorState:"00000032-0000-1000-8000-0026BB765291","000000BF-0000-1000-8000-0026BB765291":"TargetFanState",TargetFanState:"000000BF-0000-1000-8000-0026BB765291","000000B2-0000-1000-8000-0026BB765291":"TargetHeaterCoolerState",TargetHeaterCoolerState:"000000B2-0000-1000-8000-0026BB765291","00000033-0000-1000-8000-0026BB765291":"TargetHeatingCoolingState",TargetHeatingCoolingState:"00000033-0000-1000-8000-0026BB765291","0000007B-0000-1000-8000-0026BB765291":"TargetHorizontalTiltAngle",TargetHorizontalTiltAngle:"0000007B-0000-1000-8000-0026BB765291","000000B4-0000-1000-8000-0026BB765291":"TargetHumidifierDehumidifierState",TargetHumidifierDehumidifierState:"000000B4-0000-1000-8000-0026BB765291","00000137-0000-1000-8000-0026BB765291":"TargetMediaState",TargetMediaState:"00000137-0000-1000-8000-0026BB765291","0000007C-0000-1000-8000-0026BB765291":"TargetPosition",TargetPosition:"0000007C-0000-1000-8000-0026BB765291","00000034-0000-1000-8000-0026BB765291":"TargetRelativeHumidity",TargetRelativeHumidity:"00000034-0000-1000-8000-0026BB765291","00000035-0000-1000-8000-0026BB765291":"TargetTemperature",TargetTemperature:"00000035-0000-1000-8000-0026BB765291","000000C2-0000-1000-8000-0026BB765291":"TargetTiltAngle",TargetTiltAngle:"000000C2-0000-1000-8000-0026BB765291","0000007D-0000-1000-8000-0026BB765291":"TargetVerticalTiltAngle",TargetVerticalTiltAngle:"0000007D-0000-1000-8000-0026BB765291","00000134-0000-1000-8000-0026BB765291":"TargetVisibilityState",TargetVisibilityState:"00000134-0000-1000-8000-0026BB765291","00000036-0000-1000-8000-0026BB765291":"TemperatureDisplayUnits",TemperatureDisplayUnits:"00000036-0000-1000-8000-0026BB765291","0000021C-0000-1000-8000-0026BB765291":"ThirdPartyCameraActive",ThirdPartyCameraActive:"0000021C-0000-1000-8000-0026BB765291","00000704-0000-1000-8000-0026BB765291":"ThreadControlPoint",ThreadControlPoint:"00000704-0000-1000-8000-0026BB765291","00000702-0000-1000-8000-0026BB765291":"ThreadNodeCapabilities",ThreadNodeCapabilities:"00000702-0000-1000-8000-0026BB765291","00000706-0000-1000-8000-0026BB765291":"ThreadOpenThreadVersion",ThreadOpenThreadVersion:"00000706-0000-1000-8000-0026BB765291","00000703-0000-1000-8000-0026BB765291":"ThreadStatus",ThreadStatus:"00000703-0000-1000-8000-0026BB765291","00000231-0000-1000-8000-0026BB765291":"Token",Token:"00000231-0000-1000-8000-0026BB765291","00000242-0000-1000-8000-0026BB765291":"TransmitPower",TransmitPower:"00000242-0000-1000-8000-0026BB765291","00000061-0000-1000-8000-0026BB765291":"TunnelConnectionTimeout",TunnelConnectionTimeout:"00000061-0000-1000-8000-0026BB765291","00000060-0000-1000-8000-0026BB765291":"TunneledAccessoryAdvertising",TunneledAccessoryAdvertising:"00000060-0000-1000-8000-0026BB765291","00000059-0000-1000-8000-0026BB765291":"TunneledAccessoryConnected",TunneledAccessoryConnected:"00000059-0000-1000-8000-0026BB765291","00000058-0000-1000-8000-0026BB765291":"TunneledAccessoryStateNumber",TunneledAccessoryStateNumber:"00000058-0000-1000-8000-0026BB765291","000000D5-0000-1000-8000-0026BB765291":"ValveType",ValveType:"000000D5-0000-1000-8000-0026BB765291","00000037-0000-1000-8000-0026BB765291":"Version",Version:"00000037-0000-1000-8000-0026BB765291","00000229-0000-1000-8000-0026BB765291":"VideoAnalysisActive",VideoAnalysisActive:"00000229-0000-1000-8000-0026BB765291","000000C8-0000-1000-8000-0026BB765291":"VOCDensity",VOCDensity:"000000C8-0000-1000-8000-0026BB765291","00000119-0000-1000-8000-0026BB765291":"Volume",Volume:"00000119-0000-1000-8000-0026BB765291","000000E9-0000-1000-8000-0026BB765291":"VolumeControlType",VolumeControlType:"000000E9-0000-1000-8000-0026BB765291","000000EA-0000-1000-8000-0026BB765291":"VolumeSelector",VolumeSelector:"000000EA-0000-1000-8000-0026BB765291","00000222-0000-1000-8000-0026BB765291":"WakeConfiguration",WakeConfiguration:"00000222-0000-1000-8000-0026BB765291","00000211-0000-1000-8000-0026BB765291":"WANConfigurationList",WANConfigurationList:"00000211-0000-1000-8000-0026BB765291","00000212-0000-1000-8000-0026BB765291":"WANStatusList",WANStatusList:"00000212-0000-1000-8000-0026BB765291","000000B5-0000-1000-8000-0026BB765291":"WaterLevel",WaterLevel:"000000B5-0000-1000-8000-0026BB765291","0000022C-0000-1000-8000-0026BB765291":"WiFiCapabilities",WiFiCapabilities:"0000022C-0000-1000-8000-0026BB765291","0000022D-0000-1000-8000-0026BB765291":"WiFiConfigurationControl",WiFiConfigurationControl:"0000022D-0000-1000-8000-0026BB765291","0000021E-0000-1000-8000-0026BB765291":"WiFiSatelliteStatus",WiFiSatelliteStatus:"0000021E-0000-1000-8000-0026BB765291"};A.Categories={OTHER:1,BRIDGE:2,FAN:3,GARAGE_DOOR_OPENER:4,LIGHTBULB:5,DOOR_LOCK:6,OUTLET:7,SWITCH:8,THERMOSTAT:9,SENSOR:10,ALARM_SYSTEM:11,SECURITY_SYSTEM:11,DOOR:12,WINDOW:13,WINDOW_COVERING:14,PROGRAMMABLE_SWITCH:15,RANGE_EXTENDER:16,CAMERA:17,IP_CAMERA:17,VIDEO_DOORBELL:18,AIR_PURIFIER:19,AIR_HEATER:20,AIR_CONDITIONER:21,AIR_HUMIDIFIER:22,AIR_DEHUMIDIFIER:23,APPLE_TV:24,HOMEPOD:25,SPEAKER:26,AIRPORT:27,SPRINKLER:28,FAUCET:29,SHOWER_HEAD:30,TELEVISION:31,TARGET_CONTROLLER:32,ROUTER:33,AUDIO_RECEIVER:34,TV_SET_TOP_BOX:35,TV_STREAMING_STICK:36};A.Enums={AccessoryFlags:{1:"REQUIRES_ADDITIONAL_SETUP_BIT_MASK"},Active:{0:"INACTIVE",1:"ACTIVE"},AirParticulateSize:{0:"_2_5_M",1:"_10_M"},AirQuality:{0:"UNKNOWN",1:"EXCELLENT",2:"GOOD",3:"FAIR",4:"INFERIOR",5:"POOR"},CameraOperatingModeIndicator:{0:"DISABLE",1:"ENABLE"},CarbonDioxideDetected:{0:"CO2_LEVELS_NORMAL",1:"CO2_LEVELS_ABNORMAL"},CarbonMonoxideDetected:{0:"CO_LEVELS_NORMAL",1:"CO_LEVELS_ABNORMAL"},ChargingState:{0:"NOT_CHARGING",1:"CHARGING",2:"NOT_CHARGEABLE"},ClosedCaptions:{0:"DISABLED",1:"ENABLED"},ContactSensorState:{0:"CONTACT_DETECTED",1:"CONTACT_NOT_DETECTED"},CurrentAirPurifierState:{0:"INACTIVE",1:"IDLE",2:"PURIFYING_AIR"},CurrentDoorState:{0:"OPEN",1:"CLOSED",2:"OPENING",3:"CLOSING",4:"STOPPED"},CurrentFanState:{0:"INACTIVE",1:"IDLE",2:"BLOWING_AIR"},CurrentHeaterCoolerState:{0:"INACTIVE",1:"IDLE",2:"HEATING",3:"COOLING"},CurrentHeatingCoolingState:{0:"OFF",1:"HEAT",2:"COOL"},CurrentHumidifierDehumidifierState:{0:"INACTIVE",1:"IDLE",2:"HUMIDIFYING",3:"DEHUMIDIFYING"},CurrentMediaState:{0:"PLAY",1:"PAUSE",2:"STOP",4:"LOADING",5:"INTERRUPTED"},CurrentSlatState:{0:"FIXED",1:"JAMMED",2:"SWINGING"},CurrentVisibilityState:{0:"SHOWN",1:"HIDDEN"},EventSnapshotsActive:{0:"DISABLE",1:"ENABLE"},FilterChangeIndication:{0:"FILTER_OK",1:"CHANGE_FILTER"},HomeKitCameraActive:{0:"OFF",1:"ON"},InputDeviceType:{0:"OTHER",1:"TV",2:"RECORDING",3:"TUNER",4:"PLAYBACK",5:"AUDIO_SYSTEM"},InputSourceType:{0:"OTHER",1:"HOME_SCREEN",2:"TUNER",3:"HDMI",4:"COMPOSITE_VIDEO",5:"S_VIDEO",6:"COMPONENT_VIDEO",7:"DVI",8:"AIRPLAY",9:"USB",10:"APPLICATION"},InUse:{0:"NOT_IN_USE",1:"IN_USE"},IsConfigured:{0:"NOT_CONFIGURED",1:"CONFIGURED"},LeakDetected:{0:"LEAK_NOT_DETECTED",1:"LEAK_DETECTED"},LockCurrentState:{0:"UNSECURED",1:"SECURED",2:"JAMMED",3:"UNKNOWN"},LockLastKnownAction:{0:"SECURED_PHYSICALLY_INTERIOR",1:"UNSECURED_PHYSICALLY_INTERIOR",2:"SECURED_PHYSICALLY_EXTERIOR",3:"UNSECURED_PHYSICALLY_EXTERIOR",4:"SECURED_BY_KEYPAD",5:"UNSECURED_BY_KEYPAD",6:"SECURED_REMOTELY",7:"UNSECURED_REMOTELY",8:"SECURED_BY_AUTO_SECURE_TIMEOUT",9:"SECURED_PHYSICALLY",10:"UNSECURED_PHYSICALLY"},LockPhysicalControls:{0:"CONTROL_LOCK_DISABLED",1:"CONTROL_LOCK_ENABLED"},LockTargetState:{0:"UNSECURED",1:"SECURED"},ManagedNetworkEnable:{0:"DISABLED",1:"ENABLED"},ManuallyDisabled:{0:"ENABLED",1:"DISABLED"},OccupancyDetected:{0:"OCCUPANCY_NOT_DETECTED",1:"OCCUPANCY_DETECTED"},PeriodicSnapshotsActive:{0:"DISABLE",1:"ENABLE"},PictureMode:{0:"OTHER",1:"STANDARD",2:"CALIBRATED",3:"CALIBRATED_DARK",4:"VIVID",5:"GAME",6:"COMPUTER",7:"CUSTOM"},PositionState:{0:"DECREASING",1:"INCREASING",2:"STOPPED"},PowerModeSelection:{0:"SHOW",1:"HIDE"},ProgrammableSwitchEvent:{0:"SINGLE_PRESS",1:"DOUBLE_PRESS",2:"LONG_PRESS"},ProgramMode:{0:"NO_PROGRAM_SCHEDULED",1:"PROGRAM_SCHEDULED",2:"PROGRAM_SCHEDULED_MANUAL_MODE"},RecordingAudioActive:{0:"DISABLE",1:"ENABLE"},RemoteKey:{0:"REWIND",1:"FAST_FORWARD",2:"NEXT_TRACK",3:"PREVIOUS_TRACK",4:"ARROW_UP",5:"ARROW_DOWN",6:"ARROW_LEFT",7:"ARROW_RIGHT",8:"SELECT",9:"BACK",10:"EXIT",11:"PLAY_PAUSE",15:"INFORMATION"},RotationDirection:{0:"CLOCKWISE",1:"COUNTER_CLOCKWISE"},RouterStatus:{0:"READY",1:"NOT_READY"},SecuritySystemAlarmType:{0:"NO_ALARM",1:"UNKNOWN"},SecuritySystemCurrentState:{0:"STAY_ARM",1:"AWAY_ARM",2:"NIGHT_ARM",3:"DISARMED",4:"ALARM_TRIGGERED"},SecuritySystemTargetState:{0:"STAY_ARM",1:"AWAY_ARM",2:"NIGHT_ARM",3:"DISARM"},ServiceLabelNamespace:{0:"DOTS",1:"ARABIC_NUMERALS"},SiriInputType:{0:"PUSH_BUTTON_TRIGGERED_APPLE_TV"},SlatType:{0:"HORIZONTAL",1:"VERTICAL"},SleepDiscoveryMode:{0:"NOT_DISCOVERABLE",1:"ALWAYS_DISCOVERABLE"},SmokeDetected:{0:"SMOKE_NOT_DETECTED",1:"SMOKE_DETECTED"},StatusFault:{0:"NO_FAULT",1:"GENERAL_FAULT"},StatusJammed:{0:"NOT_JAMMED",1:"JAMMED"},StatusLowBattery:{0:"BATTERY_LEVEL_NORMAL",1:"BATTERY_LEVEL_LOW"},StatusTampered:{0:"NOT_TAMPERED",1:"TAMPERED"},SwingMode:{0:"SWING_DISABLED",1:"SWING_ENABLED"},TargetAirPurifierState:{0:"MANUAL",1:"AUTO"},TargetDoorState:{0:"OPEN",1:"CLOSED"},TargetFanState:{0:"MANUAL",1:"AUTO"},TargetHeaterCoolerState:{0:"AUTO",1:"HEAT",2:"COOL"},TargetHeatingCoolingState:{0:"OFF",1:"HEAT",2:"COOL",3:"AUTO"},TargetHumidifierDehumidifierState:{0:"HUMIDIFIER_OR_DEHUMIDIFIER",1:"HUMIDIFIER",2:"DEHUMIDIFIER"},TargetMediaState:{0:"PLAY",1:"PAUSE",2:"STOP"},TargetVisibilityState:{0:"SHOWN",1:"HIDDEN"},TemperatureDisplayUnits:{0:"CELSIUS",1:"FAHRENHEIT"},ThirdPartyCameraActive:{0:"OFF",1:"ON"},ValveType:{0:"GENERIC_VALVE",1:"IRRIGATION",2:"SHOWER_HEAD",3:"WATER_FAUCET"},VolumeControlType:{0:"NONE",1:"RELATIVE",2:"RELATIVE_WITH_CURRENT",3:"ABSOLUTE"},VolumeSelector:{0:"INCREMENT",1:"DECREMENT"},WiFiSatelliteStatus:{0:"UNKNOWN",1:"CONNECTED",2:"NOT_CONNECTED"}}});var _0=y0(p0(),1);var d0=(()=>{class t{transform(e){if(typeof e!="number")return e;let o=1e6/e,i=Math.round(e),B=Math.round(o);return`${i}M (${B}K)`}static \u0275fac=function(o){return new(o||t)};static \u0275pipe=T({name:"convertMired",type:t,pure:!0})}return t})();var m0=(()=>{class t{$settings=f(s0);transform(e,o=this.$settings.env.temperatureUnits){return o==="f"?e*1.8+32:e}static \u0275fac=function(o){return new(o||t)};static \u0275pipe=T({name:"convertTemp",type:t,pure:!0})}return t})();var u0=(()=>{class t{transform(e){return typeof e!="string"?e:e.replace(/_/g," ").toLowerCase().replace(/\b\w/g,o=>o.toUpperCase()).replace(/([a-z])([A-Z])/g,"$1 $2")}static \u0275fac=function(o){return new(o||t)};static \u0275pipe=T({name:"prettify",type:t,pure:!0})}return t})();var C0=(()=>{class t{transform(e){return typeof e!="string"||!e?e:e.replace(/(?!^)([A-Z])/g," $1")}static \u0275fac=function(o){return new(o||t)};static \u0275pipe=T({name:"spaceBeforeCaps",type:t,pure:!0})}return t})();function g0(t,s){if(t&1&&(c(0,"option",30),a(1),p(2,"spaceBeforeCaps"),r()),t&2){let e=s.$implicit;F("value",e),n(),m(d(2,2,e))}}function I0(t,s){if(t&1){let e=M();c(0,"li",8)(1,"label",27),a(2),p(3,"translate"),c(4,"span",28),a(5),p(6,"translate"),r()(),c(7,"div",10)(8,"select",29),H("ngModelChange",function(i){D(e);let B=l();return w(B.service.customType,i)||(B.service.customType=i),R(i)}),y(9,g0,3,4,"option",30,E),r()()()}if(t&2){let e=l();n(2),u(" ",d(3,3,"accessories.custom_type")," "),n(3),m(d(6,5,"common.labels.beta")),n(3),V("ngModel",e.service.customType),n(),g(e.customTypeList.sort())}}function x0(t,s){if(t&1){let e=M();c(0,"li",12)(1,"span",13),a(2),p(3,"translate"),r(),c(4,"div",14)(5,"input",31),p(6,"translate"),H("ngModelChange",function(i){D(e);let B=l();return w(B.service.onDashboard,i)||(B.service.onDashboard=i),R(i)}),r(),I(7,"label",32),r()()}if(t&2){let e=l();n(2),m(d(3,3,"accessories.show_on_dashboard")),n(3),V("ngModel",e.service.onDashboard),x("aria-label",d(6,5,"accessories.show_on_dashboard"))}}function h0(t,s){if(t&1){let e=M();c(0,"span",37),h("click",function(){D(e);let i=l().$implicit,B=l();return R(B.toggleDetailsVisibility(i))}),a(1),r()}if(t&2){let e=l().$implicit,o=l();x("aria-expanded",o.isDetailsVisible[e.uuid]),n(),m(e.description)}}function v0(t,s){if(t&1&&a(0),t&2){let e=l().$implicit;u(" ",e.description," ")}}function D0(t,s){if(t&1&&(c(0,"div"),a(1),r()),t&2){let e=l(2).$implicit;n(),u("Step: ",e.minStep)}}function R0(t,s){if(t&1&&(c(0,"div"),a(1),r()),t&2){let e=l(2).$implicit;n(),u("Min: ",e.minValue)}}function M0(t,s){if(t&1&&(c(0,"div"),a(1),r()),t&2){let e=l(2).$implicit;n(),u("Max: ",e.maxValue)}}function L0(t,s){t&1&&a(0," \xB7 ")}function F0(t,s){if(t&1&&(a(0),C(1,L0,1,0)),t&2){let e=s.$implicit,o=s.$index,i=s.$count;u(" ",e," "),n(),_(o!==i-1?1:-1)}}function O0(t,s){if(t&1&&(c(0,"div"),a(1," Valid: "),y(2,F0,2,2,null,null,E),r()),t&2){let e=l(2).$implicit;n(2),g(e.validValues)}}function N0(t,s){if(t&1&&(c(0,"div",34),C(1,D0,2,1,"div"),C(2,R0,2,1,"div"),C(3,M0,2,1,"div"),C(4,O0,4,0,"div"),r()),t&2){let e=l().$implicit;n(),_("minStep"in e?1:-1),n(),_("minValue"in e?2:-1),n(),_("maxValue"in e?3:-1),n(),_("validValues"in e?4:-1)}}function b0(t,s){t&1&&a(0," Value: ")}function P0(t,s){if(t&1&&a(0),t&2){let e=l().$implicit;u(" ",e.value,"% ")}}function V0(t,s){if(t&1&&(a(0),p(1,"convertTemp")),t&2){let e=l().$implicit;u(" ",d(1,1,e.value),"\xB0 ")}}function w0(t,s){if(t&1&&(a(0),p(1,"convertMired")),t&2){let e=l(2).$implicit;u(" ",d(1,1,e.value)," ")}}function H0(t,s){if(t&1&&a(0),t&2){let e=l(2).$implicit;u(" ",e.value," ")}}function U0(t,s){if(t&1&&C(0,w0,2,3)(1,H0,1,1),t&2){let e,o=l().$implicit;_((e=o.type)==="ColorTemperature"?0:1)}}function k0(t,s){if(t&1&&(a(0),p(1,"prettify")),t&2){let e=l().$implicit,o=l();u(" (",d(1,1,o.enums[e.type][e.value]),") ")}}function $0(t,s){if(t&1&&(a(0),p(1,"translate")),t&2){let e=l().$implicit;u(" (",d(1,1,e.value?"status.widget.info.yes":"status.widget.info.no"),") ")}}function W0(t,s){if(t&1&&a(0),t&2){let e=l().$implicit;u(" ",e.value,"% ")}}function G0(t,s){if(t&1&&(a(0),p(1,"convertTemp")),t&2){let e=l().$implicit;u(" ",d(1,1,e.value),"\xB0 ")}}function Y0(t,s){if(t&1&&(a(0),p(1,"convertMired")),t&2){let e=l(2).$implicit;u(" ",d(1,1,e.value)," ")}}function K0(t,s){if(t&1&&a(0),t&2){let e=l(2).$implicit;u(" ",e.value," ")}}function q0(t,s){if(t&1&&C(0,Y0,2,3)(1,K0,1,1),t&2){let e,o=l().$implicit;_((e=o.type)==="ColorTemperature"?0:1)}}function j0(t,s){if(t&1&&(a(0),p(1,"prettify")),t&2){let e=l().$implicit,o=l();u(" (",d(1,1,o.enums[e.type][e.value]),") ")}}function z0(t,s){if(t&1&&(a(0),p(1,"translate")),t&2){let e=l().$implicit;u(" (",d(1,1,e.value?"status.widget.info.yes":"status.widget.info.no"),") ")}}function X0(t,s){if(t&1&&(c(0,"li",19)(1,"span"),C(2,h0,2,2,"span",33)(3,v0,1,1),C(4,N0,5,4,"div",34),c(5,"div",35),C(6,b0,1,0),C(7,P0,1,1)(8,V0,2,3)(9,U0,2,1),C(10,k0,2,3)(11,$0,2,3),r()(),c(12,"span",36),C(13,W0,1,1)(14,G0,2,3)(15,q0,2,1),C(16,j0,2,3)(17,z0,2,3),r()()),t&2){let e,o,i=s.$implicit,B=l();n(2),_("minStep"in i||"minValue"in i||"maxValue"in i||"validValues"in i?2:3),n(2),_(B.isDetailsVisible[i.uuid]?4:-1),n(2),_(B.isDetailsVisible[i.uuid]?6:-1),n(),_((e=i.unit)==="percentage"?7:e==="celsius"?8:9),n(3),_(B.enums[i.type]!=null&&B.enums[i.type][i.value]?10:i.format==="bool"?11:-1),n(3),_((o=i.unit)==="percentage"?13:o==="celsius"?14:15),n(3),_(B.enums[i.type]!=null&&B.enums[i.type][i.value]?16:i.format==="bool"?17:-1)}}function J0(t,s){if(t&1){let e=M();c(0,"span",37),h("click",function(){D(e);let i=l().$implicit,B=l(2);return R(B.toggleDetailsVisibility(i))}),a(1),r()}if(t&2){let e=l().$implicit,o=l(2);x("aria-expanded",o.isDetailsVisible[e.uuid]),n(),m(e.description)}}function Z0(t,s){if(t&1&&a(0),t&2){let e=l().$implicit;u(" ",e.description," ")}}function Q0(t,s){if(t&1&&(c(0,"div"),a(1),r()),t&2){let e=l(2).$implicit;n(),u("Step: ",e.minStep)}}function ee(t,s){if(t&1&&(c(0,"div"),a(1),r()),t&2){let e=l(2).$implicit;n(),u("Min: ",e.minValue)}}function te(t,s){if(t&1&&(c(0,"div"),a(1),r()),t&2){let e=l(2).$implicit;n(),u("Max: ",e.maxValue)}}function ie(t,s){t&1&&a(0," \xB7 ")}function ne(t,s){if(t&1&&(a(0),C(1,ie,1,0)),t&2){let e=s.$implicit,o=s.$index,i=s.$count;u(" ",e," "),n(),_(o!==i-1?1:-1)}}function oe(t,s){if(t&1&&(c(0,"div"),a(1," Valid: "),y(2,ne,2,2,null,null,E),r()),t&2){let e=l(2).$implicit;n(2),g(e.validValues)}}function ae(t,s){if(t&1&&(c(0,"div",34),C(1,Q0,2,1,"div"),C(2,ee,2,1,"div"),C(3,te,2,1,"div"),C(4,oe,4,0,"div"),r()),t&2){let e=l().$implicit;n(),_("minStep"in e?1:-1),n(),_("minValue"in e?2:-1),n(),_("maxValue"in e?3:-1),n(),_("validValues"in e?4:-1)}}function re(t,s){t&1&&a(0," Value: ")}function se(t,s){if(t&1&&a(0),t&2){let e=l().$implicit;u(" ",e.value,"% ")}}function ce(t,s){if(t&1&&(a(0),p(1,"convertTemp")),t&2){let e=l().$implicit;u(" ",d(1,1,e.value),"\xB0 ")}}function Be(t,s){if(t&1&&(a(0),p(1,"convertMired")),t&2){let e=l(2).$implicit;u(" ",d(1,1,e.value)," ")}}function le(t,s){if(t&1&&a(0),t&2){let e=l(2).$implicit;u(" ",e.value," ")}}function pe(t,s){if(t&1&&C(0,Be,2,3)(1,le,1,1),t&2){let e,o=l().$implicit;_((e=o.type)==="ColorTemperature"?0:1)}}function de(t,s){if(t&1&&(a(0),p(1,"prettify")),t&2){let e=l().$implicit,o=l(2);u(" (",d(1,1,o.enums[e.type][e.value]),") ")}}function me(t,s){if(t&1&&(a(0),p(1,"translate")),t&2){let e=l().$implicit;u(" (",d(1,1,e.value?"status.widget.info.yes":"status.widget.info.no"),") ")}}function ue(t,s){if(t&1&&a(0),t&2){let e=l().$implicit;u(" ",e.value,"% ")}}function Ce(t,s){if(t&1&&(a(0),p(1,"convertTemp")),t&2){let e=l().$implicit;u(" ",d(1,1,e.value),"\xB0 ")}}function _e(t,s){if(t&1&&(a(0),p(1,"convertMired")),t&2){let e=l(2).$implicit;u(" ",d(1,1,e.value)," ")}}function Se(t,s){if(t&1&&a(0),t&2){let e=l(2).$implicit;u(" ",e.value," ")}}function fe(t,s){if(t&1&&C(0,_e,2,3)(1,Se,1,1),t&2){let e,o=l().$implicit;_((e=o.type)==="ColorTemperature"?0:1)}}function Ae(t,s){if(t&1&&(a(0),p(1,"prettify")),t&2){let e=l().$implicit,o=l(2);u(" (",d(1,1,o.enums[e.type][e.value]),") ")}}function Te(t,s){if(t&1&&(a(0),p(1,"translate")),t&2){let e=l().$implicit;u(" (",d(1,1,e.value?"status.widget.info.yes":"status.widget.info.no"),") ")}}function Ee(t,s){if(t&1&&(c(0,"li",19)(1,"span"),C(2,J0,2,2,"span",33)(3,Z0,1,1),C(4,ae,5,4,"div",34),c(5,"div",35),C(6,re,1,0),C(7,se,1,1)(8,ce,2,3)(9,pe,2,1),C(10,de,2,3)(11,me,2,3),r()(),c(12,"span",36),C(13,ue,1,1)(14,Ce,2,3)(15,fe,2,1),C(16,Ae,2,3)(17,Te,2,3),r()()),t&2){let e,o,i=s.$implicit,B=l(2);n(2),_("minStep"in i||"minValue"in i||"maxValue"in i||"validValues"in i?2:3),n(2),_(B.isDetailsVisible[i.uuid]?4:-1),n(2),_(B.isDetailsVisible[i.uuid]?6:-1),n(),_((e=i.unit)==="percentage"?7:e==="celsius"?8:9),n(3),_(B.enums[i.type]!=null&&B.enums[i.type][i.value]?10:i.format==="bool"?11:-1),n(3),_((o=i.unit)==="percentage"?13:o==="celsius"?14:15),n(3),_(B.enums[i.type]!=null&&B.enums[i.type][i.value]?16:i.format==="bool"?17:-1)}}function ye(t,s){if(t&1&&(c(0,"ul",5)(1,"li",17)(2,"h6",18),a(3),p(4,"translate"),r()(),c(5,"li",19)(6,"span",13),a(7),p(8,"translate"),r(),c(9,"span",20),a(10),r()(),c(11,"li",19)(12,"span",13),a(13),p(14,"translate"),r(),c(15,"span",20),a(16),r()(),y(17,Ee,18,7,"li",19,E),r()),t&2){let e=s.$implicit;n(3),m(d(4,5,"accessories.service_info")),n(4),m(d(8,7,"accessories.service")),n(3),m(e.humanType),n(3),m(d(14,9,"accessories.name")),n(3),m(e.serviceName),n(),g(e.serviceCharacteristics)}}function ge(t,s){if(t&1&&(c(0,"li",19)(1,"span",13),a(2),p(3,"translate"),r(),c(4,"span",20),a(5),r()()),t&2){let e=l(2);n(2),m(d(3,2,"child_bridge.config.platform")),n(3),m(e.matchedCachedAccessory.platform)}}function Ie(t,s){if(t&1&&(c(0,"li",19)(1,"span",13),a(2),p(3,"translate"),r(),c(4,"span",20),a(5),r()()),t&2){let e=l(2);n(2),m(d(3,2,"child_bridge.config.accessory")),n(3),m(e.matchedCachedAccessory.accessory)}}function xe(t,s){if(t&1&&(c(0,"li",19)(1,"span",13),a(2),p(3,"translate"),r(),c(4,"span",20),a(5),r()(),C(6,ge,6,4,"li",19),C(7,Ie,6,4,"li",19)),t&2){let e=l();n(2),m(d(3,4,"accessories.plugin")),n(3),m(e.matchedCachedAccessory.plugin),n(),_(e.matchedCachedAccessory.platform?6:-1),n(),_(e.matchedCachedAccessory.accessory?7:-1)}}function he(t,s){if(t&1&&(c(0,"li",19)(1,"span",13),a(2),r(),c(3,"span",20),a(4),r()()),t&2){let e=s.$implicit;n(2),m(e.key),n(2),m(e.value)}}function ve(t,s){if(t&1&&(c(0,"li",19)(1,"span",13),a(2),p(3,"translate"),r(),c(4,"span",20),a(5),r()()),t&2){let e=l();n(2),m(d(3,2,"accessories.bridge_name")),n(3),m(e.matchedCachedAccessory.bridge)}}function De(t,s){if(t&1){let e=M();c(0,"li",19)(1,"span",22),a(2,"UUID"),r(),c(3,"span",20),a(4),r()(),c(5,"li",38)(6,"span",13),a(7),p(8,"translate"),r(),c(9,"button",39),h("click",function(){D(e);let i=l();return R(i.removeSingleCachedAccessories())}),I(10,"i",40),r()()}if(t&2){let e=l();n(4),m(e.matchedCachedAccessory.UUID),n(3),m(d(8,2,"accessories.button_remove"))}}var S0=(()=>{class t{$activeModal=f(i0);$modal=f(U);allCustomTypeList=[["AirPurifier","Switch","Outlet","Fan","Lightbulb","Heater","Cooler","Humidifier","Dehumidifier","Television","Valve","RobotVacuum","WashingMachine"],["Switch","Outlet","LockMechanism"],["Switch","Outlet","GarageDoorOpener"],["Door","Window","WindowCovering"],["Doorbell","Speaker","SmartSpeaker","Microphone"]];accessoryCache;pairingCache;service;isDetailsVisible={};accessoryInformation;extraServices=[];matchedCachedAccessory=null;enums=_0.Enums;customTypeList=[];ngOnInit(){this.accessoryInformation=Object.entries(this.service.accessoryInformation).map(([e,o])=>({key:e,value:o})),this.matchedCachedAccessory=this.matchToCachedAccessory(),this.service.type==="LockMechanism"&&Object.values(this.service.linkedServices).filter(e=>e.type==="LockManagement").forEach(e=>this.extraServices.push(e)),this.customTypeList=[...new Set(this.allCustomTypeList.filter(e=>e.includes(this.service.type)).flat())],this.service.customType||(this.service.customType=this.service.type)}removeSingleCachedAccessories(){this.$activeModal.close();let e=this.$modal.open(l0,{size:"lg",backdrop:"static"});e.componentInstance.selectedBridge=this.service.instance.username.replaceAll(":","")}toggleDetailsVisibility(e){("minStep"in e||"minValue"in e||"maxValue"in e||"validValues"in e)&&(this.isDetailsVisible[e.uuid]=!this.isDetailsVisible[e.uuid])}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchToCachedAccessory(){let e=this.service.instance.username,o=this.pairingCache.find(i=>i._username===e);if(o){let i=o._main?"cachedAccessories":`cachedAccessories.${o._id}`,B=this.accessoryCache.filter(S=>S.$cacheFile===i);if(B.length){let S=this.service.accessoryInformation.Name,N=this.service.accessoryInformation["Serial Number"],v=B.filter(f0=>{let W=f0.services.find(L=>L.constructorName==="AccessoryInformation"),A0=W.characteristics.find(L=>L.displayName==="Name"),T0=W.characteristics.find(L=>L.displayName==="Serial Number");return A0.value===S&&T0.value===N});if(v.length===1)return Y(G({},v[0]),{bridge:o.name})}}}static \u0275fac=function(o){return new(o||t)};static \u0275cmp=q({type:t,selectors:[["ng-component"]],inputs:{accessoryCache:"accessoryCache",pairingCache:"pairingCache",service:"service"},decls:97,vars:60,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,"list-group","list-group-box","mb-3"],[1,"list-group-item","text-center","grey-text","small"],[3,"innerHTML"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","id","form-name","autocomplete","off",1,"form-control","custom-input",3,"ngModelChange","ngModel"],[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","id","hide-accessory",1,"rendux-input",3,"ngModelChange","ngModel"],["for","hide-accessory",1,"rendux-label","ms-3"],[1,"list-group-item"],[1,"mb-0","text-center"],[1,"list-group-item","d-flex","justify-content-between","align-items-left","flex-column","flex-md-row"],[1,"text-start","text-md-end","grey-text","font-monospace"],[1,"list-group","list-group-box","mb-0"],[1,"text-start","font-monospace"],[1,"modal-footer","justify-content-between"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"badge","badge-primary","ms-1"],[1,"custom-select",3,"ngModelChange","ngModel"],[3,"value"],["type","checkbox","id","show-on-dashboard",1,"rendux-input","mb-0",3,"ngModelChange","ngModel"],["for","show-on-dashboard",1,"rendux-label","ms-3"],[1,"hover-pointer"],[1,"grey-text","m-0","p-0","font-monospace"],[1,"d-block","d-md-none","font-monospace","grey-text"],[1,"text-start","text-md-end","grey-text","font-monospace","d-none","d-md-block","align-content-center"],[1,"hover-pointer",3,"click"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"btn","btn-primary","m-0","ms-3",3,"click"],[1,"fas","fa-fw","fa-arrow-right"]],template:function(o,i){o&1&&(c(0,"div",0)(1,"div",1)(2,"h5",2),a(3),r(),c(4,"button",3),p(5,"translate"),h("click",function(){return i.dismissModal()}),r()(),c(6,"div",4)(7,"ul",5)(8,"li",6),I(9,"span",7),p(10,"translate"),I(11,"br")(12,"span",7),p(13,"translate"),r(),c(14,"li",8)(15,"label",9),a(16),p(17,"translate"),r(),c(18,"div",10)(19,"input",11),h("ngModelChange",function(S){return i.service.customName=S}),r()()(),C(20,I0,11,7,"li",8),c(21,"li",12)(22,"span",13),a(23),p(24,"translate"),r(),c(25,"div",14)(26,"input",15),p(27,"translate"),H("ngModelChange",function(S){return w(i.service.hidden,S)||(i.service.hidden=S),S}),r(),I(28,"label",16),r()(),C(29,x0,8,7,"li",12),r(),c(30,"ul",5)(31,"li",17)(32,"h6",18),a(33),p(34,"translate"),r()(),c(35,"li",19)(36,"span",13),a(37),p(38,"translate"),r(),c(39,"span",20),a(40),r()(),c(41,"li",19)(42,"span",13),a(43),p(44,"translate"),r(),c(45,"span",20),a(46),r()(),y(47,X0,18,7,"li",19,E),r(),y(49,ye,19,11,"ul",5,E),c(51,"ul",21)(52,"li",17)(53,"h6",18),a(54),p(55,"translate"),r()(),C(56,xe,8,6),y(57,he,5,2,"li",19,E),c(59,"li",19)(60,"span",13),a(61),p(62,"translate"),r(),c(63,"span",20),a(64),r()(),C(65,ve,6,4,"li",19),c(66,"li",19)(67,"span",13),a(68),p(69,"translate"),r(),c(70,"span",20),a(71),r()(),c(72,"li",19)(73,"span",13),a(74),p(75,"translate"),r(),c(76,"span",20),a(77),r()(),c(78,"li",19)(79,"span",22),a(80,"aid"),r(),c(81,"span",20),a(82),r()(),c(83,"li",19)(84,"span",22),a(85,"iid"),r(),c(86,"span",20),a(87),r()(),C(88,De,11,4),r()(),c(89,"div",23),I(90,"div",13),c(91,"div",24)(92,"button",25),p(93,"translate"),h("click",function(){return i.dismissModal()}),a(94),p(95,"translate"),r()(),I(96,"div",26),r()()),o&2&&(n(3),m(i.service.customName||i.service.serviceName),n(),x("aria-label",d(5,30,"form.button_close")),n(5),F("innerHTML",d(10,32,"accessories.only_ui"),$),n(3),F("innerHTML",d(13,34,"accessories.only_ui_2"),$),n(4),m(d(17,36,"accessories.custom_name")),n(3),F("ngModel",i.service.customName||i.service.serviceName),n(),_(i.customTypeList.length?20:-1),n(3),m(d(24,38,"accessories.hide_this_accessory")),n(3),V("ngModel",i.service.hidden),x("aria-label",d(27,40,"accessories.hide_this_accessory")),n(3),_(i.service.hidden?-1:29),n(4),m(d(34,42,"accessories.service_info")),n(4),m(d(38,44,"accessories.service")),n(3),m(i.service.humanType),n(3),m(d(44,46,"accessories.name")),n(3),m(i.service.serviceName),n(),g(i.service.serviceCharacteristics),n(2),g(i.extraServices),n(5),m(d(55,48,"accessories.accessory_info")),n(2),_(i.matchedCachedAccessory?56:-1),n(),g(i.accessoryInformation),n(4),m(d(62,50,"accessories.bridge_username")),n(3),m(i.service.instance.username),n(),_(i.matchedCachedAccessory?65:-1),n(3),m(d(69,52,"accessories.bridge_ip")),n(3),m(i.service.instance.ipAddress),n(3),m(d(75,54,"accessories.bridge_port")),n(3),m(i.service.instance.port),n(5),m(i.service.aid),n(5),m(i.service.iid),n(),_(i.matchedCachedAccessory?88:-1),n(4),x("aria-label",d(93,56,"form.button_close")),n(2),u(" ",d(95,58,"form.button_close")," "))},dependencies:[t0,Q,e0,z,j,Z,X,J,o0,m0,u0,d0,C0],encapsulation:2})}return t})();var st=(()=>{class t{$api=f(r0);$auth=f(c0);$modal=f(U);$toastr=f(a0);$translate=f(n0);$ws=f(B0);accessoryCache=[];pairingCache=[];io;roomsOrdered=!1;hiddenTypes=["InputSource","LockManagement","CameraRTPStreamManagement","ProtocolInformation"];layoutSaved=new k;accessoryData=new k;readyForControl=!1;accessories={services:[]};rooms=[];accessoryLayout;constructor(){this.$auth.user.admin&&(P(this.$api.get("/server/cached-accessories")).then(e=>{this.accessoryCache=e}).catch(e=>console.error(e)),P(this.$api.get("/server/pairings")).then(e=>{this.pairingCache=e}).catch(e=>console.error(e)))}showAccessoryInformation(e){let o=this.$modal.open(S0,{size:"lg",backdrop:"static"});return o.componentInstance.service=e,o.componentInstance.accessoryCache=this.accessoryCache,o.componentInstance.pairingCache=this.pairingCache,o.result.then(()=>this.saveLayout()).catch(()=>this.saveLayout()),!1}stop(){this.io.end(),this.rooms=[],this.accessories={services:[]},this.roomsOrdered=!1,delete this.accessoryLayout}start(){return b(this,null,function*(){this.readyForControl=!1,this.io=this.$ws.connectToNamespace("accessories"),yield this.loadLayout(),this.io.connected?(this.io.socket.emit("get-accessories"),setTimeout(()=>{this.io.connected.subscribe(()=>{this.io.socket.emit("get-accessories")})},1e3)):this.io.connected.subscribe(()=>{this.io.socket.emit("get-accessories")}),this.io.socket.on("accessories-data",e=>{this.parseServices(e),this.generateHelpers(),this.sortIntoRooms(),this.roomsOrdered||(this.orderRooms(),this.applyCustomAttributes(),this.roomsOrdered=!0),this.accessoryData.next(e)}),this.io.socket.on("accessories-reload-required",()=>b(this,null,function*(){this.stop(),yield this.start()})),this.io.socket.on("accessory-control-failure",e=>{console.error(e),this.$toastr.error(e,this.$translate.instant("toast.title_error"))}),this.io.socket.on("accessories-ready-for-control",()=>{this.readyForControl=!0})})}saveLayout(){this.accessoryLayout=this.rooms.map(e=>({name:e.name,services:e.services.map(o=>({uniqueId:o.uniqueId,aid:o.aid,iid:o.iid,uuid:o.uuid,customName:o.customName||void 0,customType:o.customType||void 0,hidden:o.hidden||void 0,onDashboard:o.onDashboard||void 0}))})).filter(e=>e.services.length),this.io.request("save-layout",{user:this.$auth.user.username,layout:this.accessoryLayout}).subscribe({next:()=>this.layoutSaved.next(void 0),error:e=>{console.error(e),this.$toastr.error(e.message,this.$translate.instant("toast.title_error"))}})}loadLayout(){return b(this,null,function*(){this.accessoryLayout=yield P(this.io.request("get-layout",{user:this.$auth.user.username})),this.rooms=this.accessoryLayout.map(e=>({name:e.name,services:[]}))})}parseServices(e){if(!this.accessories.services.length){this.accessories.services=e;return}e.forEach(o=>{let i=this.accessories.services.find(B=>B.uniqueId===o.uniqueId);o.type==="LockMechanism"&&this.attachLockManagementToMechanism(o),i?Object.assign(i,o):this.accessories.services.push(o)})}sortIntoRooms(){this.accessories.services.forEach(e=>{if(this.hiddenTypes.includes(e.type))return;if(e.linked&&(e.linkedServices={},e.linked.forEach(i=>{e.linkedServices[i]=this.accessories.services.find(B=>B.aid===e.aid&&B.iid===i&&B.instance.username===e.instance.username)})),!this.rooms.find(i=>i.services.find(B=>B.uniqueId===e.uniqueId))){let i=this.accessoryLayout.find(B=>B.services.find(S=>S.uniqueId===e.uniqueId));if(i)this.rooms.find(B=>B.name===i.name).services.push(e);else{let B=this.rooms.find(S=>S.name==="Default Room");B?B.services.push(e):this.rooms.push({name:"Default Room",services:[e]})}}})}orderRooms(){this.rooms.forEach(e=>{let o=this.accessoryLayout.find(i=>i.name===e.name);e.services.sort((i,B)=>{let S=o.services.findIndex(v=>v.uniqueId===i.uniqueId),N=o.services.findIndex(v=>v.uniqueId===B.uniqueId);return S<N?-1:S>N?1:0})})}applyCustomAttributes(){this.rooms.forEach(e=>{let o=this.accessoryLayout.find(i=>i.name===e.name);e.services.forEach(i=>{let B=o.services.find(S=>S.uniqueId===i.uniqueId);Object.assign(i,B)})})}generateHelpers(){this.accessories.services.forEach(e=>{e.getCharacteristic||(e.getCharacteristic=o=>{let i=e.serviceCharacteristics.find(B=>B.type===o);return i?(i.setValue=B=>new Promise(S=>(this.readyForControl||S(void 0),this.io.socket.emit("accessory-control",{set:{uniqueId:e.uniqueId,aid:e.aid,siid:e.iid,iid:i.iid,value:B}}),S(void 0))),i):null})})}attachLockManagementToMechanism(e){let o=[],i=[];for(let B of this.accessories.services)B.type==="LockMechanism"&&B.accessoryInformation.Name===e.accessoryInformation.Name&&B.accessoryInformation["Serial Number"]===e.accessoryInformation["Serial Number"]?o.push(B):B.type==="LockManagement"&&B.accessoryInformation.Name===e.accessoryInformation.Name&&B.accessoryInformation["Serial Number"]===e.accessoryInformation["Serial Number"]&&i.push(B);if(o.length===1&&i.length===1){let B=i[0];e.linkedServices||(e.linkedServices={}),e.linkedServices[B.iid]=B}}static \u0275fac=function(o){return new(o||t)};static \u0275prov=K({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{d0 as a,m0 as b,st as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s}from"./chunk-DFLIHKAC.js";import"./chunk-ZBNNBPMQ.js";import"./chunk-KBHPX4TF.js";import"./chunk-G6KV6PYE.js";import"./chunk-FYI7RHOJ.js";import"./chunk-KYB236MX.js";import"./chunk-YLBALIW6.js";import"./chunk-6VEFADT5.js";import{g as i}from"./chunk-6HJHVJPI.js";import"./chunk-WYHYUPM6.js";import"./chunk-EF3XRHYY.js";import"./chunk-FYDO54CR.js";import"./chunk-KLQ6BEKS.js";import{ha as e,nb as t}from"./chunk-645YHJEQ.js";var u=[{path:"",loadComponent:()=>import("./chunk-SZXKSRVG.js").then(o=>o.AccessoriesComponent)}],c=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[i.forChild(u),i]})}return o})();var l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[s,c]})}return o})();export{l as AccessoriesModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as H}from"./chunk-5E4D6S2D.js";import{a as X}from"./chunk-FXJWZ2UF.js";import{a as Z}from"./chunk-H45DK7IX.js";import"./chunk-J6CJ26QN.js";import{a as R}from"./chunk-ZUTM7S4U.js";import{n as E}from"./chunk-IWFKJHPR.js";import"./chunk-7EQFLCW4.js";import{a as j}from"./chunk-ZD6PQFLB.js";import{b as A}from"./chunk-OQ7NVATB.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-DFFTJVRY.js";import{b as T}from"./chunk-L5ZV5OL2.js";import{m as $}from"./chunk-CX2MYCJQ.js";import{a as L,b as U}from"./chunk-KZKL7DGI.js";import"./chunk-OA7Y3E5A.js";import{Bd as K,Cc as h,Dc as M,Hb as m,Ib as x,Jb as y,Jc as s,Kc as d,Ob as c,Pb as n,Qb as a,Rb as p,_b as S,ab as o,bc as _,dc as C,fb as F,g as Y,h as I,kd as O,la as u,mb as P,qc as f,ra as b,rc as v,sa as w,w as z}from"./chunk-IOKYXV5M.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&(window?.matchMedia("(display-mode: standalone)").matches||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||window?.Windows||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var B=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/plugins"],re=()=>["/accessories"],ae=()=>["/logs"],se=()=>["/support"],de=()=>["/platform-tools/terminal"],le=()=>["/config"],pe=()=>["/settings"],ce=()=>["/power-options"];function me(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),s(3,"translate"),_("click",function(){b(e);let t=C();return w(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",21),a(),n(6,"div",14),f(7),s(8,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"rpi.throttled.undervoltage_title")+" - "+d(3,4,"rpi.throttled.undervoltage_description")),o(6),v(d(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,de))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.linux.label_terminal")),o(5),v(d(7,6,"menu.linux.label_terminal")))}function _e(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,le))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.config_json_editor")),o(5),v(d(7,6,"menu.config_json_editor")))}function fe(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,pe))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.label_settings")),o(5),v(d(7,6,"menu.label_settings")))}function ge(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,ce))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.restart.title")),o(5),v(d(7,6,"menu.restart.title")))}function ve(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),_("click",function(){b(e);let t=C();return w(t.reloadPage())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"menu.reload")),o(5),v(d(7,4,"menu.reload")))}function he(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),_("click",function(){b(e);let t=C();return w(t.logout())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"menu.tooltip_logout")),o(5),v(d(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{$auth=u(A);$settings=u(T);$modal=u(E);$notification=u(X);$renderer=u(F);$router=u(V);$translate=u(L);isExpanded=!1;formAuth=this.$settings.formAuth;isAdmin=this.$auth.user.admin;enableTerminalAccess=this.$settings.env.enableTerminalAccess;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.subscribe(l=>{l instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)}),this.$notification.formAuthEnabled.subscribe(r=>{this.formAuth=r});let e=document.querySelector(".sidebar"),l=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!l.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),l.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),l.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}openUnderVoltageModal(){let e=this.$modal.open(H,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let l=e.target;["menuitem","button"].includes(l.getAttribute("role"))&&l.click()}}reloadPage(){window.location.reload()}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}logout(){this.$auth.logout()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.$renderer.setStyle(e,"opacity","20%"),this.$renderer.setStyle(e,"pointer-events","none"),this.$renderer.setStyle(e,"overflow","hidden")):(this.$renderer.removeStyle(e,"opacity"),this.$renderer.removeStyle(e,"pointer-events"),this.$renderer.removeStyle(e,"overflow"))}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=P({type:i,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:68,vars:75,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","../../../../assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-power-off"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(l,t){l&1&&(n(0,"div",0),s(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),p(2,"span",1),n(3,"a",2),s(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),n(15,"a",2),s(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),s(23,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),s(28,"translate"),a()()(),x(29,me,9,8,"div",10),n(30,"div",10)(31,"div",15),s(32,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(33,"div",12),p(34,"i",16),a(),n(35,"div",14),f(36),s(37,"translate"),a()()(),n(38,"div",10)(39,"div",15),s(40,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(41,"div",12),p(42,"i",17),a(),n(43,"div",14),f(44),s(45,"translate"),a()()(),n(46,"div",10)(47,"div",15),s(48,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(49,"div",12),p(50,"i",18),a(),n(51,"div",14),f(52),s(53,"translate"),a()()(),x(54,ue,8,9,"div",10),x(55,_e,8,9,"div",10),x(56,fe,8,9,"div",10),n(57,"div",10)(58,"div",15),s(59,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(60,"div",12),p(61,"i",19),a(),n(62,"div",14),f(63),s(64,"translate"),a()()(),x(65,ge,8,9,"div",10),x(66,ve,8,6,"div",10),x(67,he,8,6,"div",10),a()()),l&2&&(m("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",d(1,37,"menu.sidebar.aria_menu")),o(3),c("routerLink",h(63,B)),m("aria-label",d(4,39,"menu.label_status")),o(5),c("ngClass",M(64,te,t.isExpanded)),o(5),c("ngClass",M(66,ne,t.isExpanded)),o(2),c("routerLink",h(68,B)),m("aria-label",d(16,41,"menu.label_status")),o(7),c("routerLink",h(69,B))("routerLinkActive","active")("routerLinkActiveOptions",h(70,ie)),m("aria-label",d(23,43,"menu.label_status")),o(5),v(d(28,45,"menu.label_status")),o(2),y(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(2),c("routerLink",h(71,oe))("routerLinkActive","active"),m("aria-label",d(32,47,"menu.label_plugins")),o(5),v(d(37,49,"menu.label_plugins")),o(3),c("routerLink",h(72,re))("routerLinkActive","active"),m("aria-label",d(40,51,"menu.label_accessories")),o(5),v(d(45,53,"menu.label_accessories")),o(3),c("routerLink",h(73,ae))("routerLinkActive","active"),m("aria-label",d(48,55,"menu.linux.label_logs")),o(5),v(d(53,57,"menu.linux.label_logs")),o(2),y(t.enableTerminalAccess&&t.isAdmin?54:-1),o(),y(t.isAdmin?55:-1),o(),y(t.isAdmin?56:-1),o(2),c("routerLink",h(74,se))("routerLinkActive","active"),m("aria-label",d(59,59,"support.title")),o(5),v(d(64,61,"support.title")),o(2),y(t.isAdmin?65:-1),o(),y(t.isPwa?66:-1),o(),y(t.formAuth?67:-1))},dependencies:[N,K,O,D,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 80px)!important}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var be=i=>({sidebarExpanded:i}),He=(()=>{class i{$auth=u(A);$modal=u(E);$router=u(V);$settings=u(T);$translate=u(L);$ws=u(j);io;sidebarExpanded=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return I(this,null,function*(){if(this.$settings.settingsLoaded||(yield z(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,$.serverTarget)){console.log(`Server restart required. UI Version: ${$.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:$.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(l,t){l&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),l&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",M(2,be,t.sidebarExpanded)))},dependencies:[J,O,q],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return i})();export{He as LayoutComponent};
|
|
1
|
+
import{a as H}from"./chunk-EQHN6CPG.js";import{a as X}from"./chunk-ULWO2VVV.js";import{a as Z}from"./chunk-DYB33NRF.js";import"./chunk-G6KV6PYE.js";import{a as R}from"./chunk-EZQF5CUM.js";import{n as E}from"./chunk-FYI7RHOJ.js";import"./chunk-KYB236MX.js";import{a as j}from"./chunk-YLBALIW6.js";import{b as A}from"./chunk-6VEFADT5.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-6HJHVJPI.js";import{b as T}from"./chunk-WYHYUPM6.js";import{m as $}from"./chunk-EF3XRHYY.js";import{a as L,b as U}from"./chunk-FYDO54CR.js";import"./chunk-KLQ6BEKS.js";import{Ad as K,Cc as h,Dc as M,Hb as m,Ib as x,Ic as s,Jb as y,Jc as d,Ob as c,Pb as n,Qb as a,Rb as p,_b as S,ab as o,bc as _,dc as C,fb as F,g as Y,h as I,jd as O,la as u,mb as P,qc as f,ra as b,rc as v,sa as w,w as z}from"./chunk-645YHJEQ.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&(window?.matchMedia("(display-mode: standalone)").matches||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||window?.Windows||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var B=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/plugins"],re=()=>["/accessories"],ae=()=>["/logs"],se=()=>["/support"],de=()=>["/platform-tools/terminal"],le=()=>["/config"],pe=()=>["/settings"],ce=()=>["/power-options"];function me(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),s(3,"translate"),_("click",function(){b(e);let t=C();return w(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",21),a(),n(6,"div",14),f(7),s(8,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"rpi.throttled.undervoltage_title")+" - "+d(3,4,"rpi.throttled.undervoltage_description")),o(6),v(d(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,de))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.linux.label_terminal")),o(5),v(d(7,6,"menu.linux.label_terminal")))}function _e(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,le))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.config_json_editor")),o(5),v(d(7,6,"menu.config_json_editor")))}function fe(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,pe))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.label_settings")),o(5),v(d(7,6,"menu.label_settings")))}function ge(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,ce))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.restart.title")),o(5),v(d(7,6,"menu.restart.title")))}function ve(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),_("click",function(){b(e);let t=C();return w(t.reloadPage())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"menu.reload")),o(5),v(d(7,4,"menu.reload")))}function he(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),_("click",function(){b(e);let t=C();return w(t.logout())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"menu.tooltip_logout")),o(5),v(d(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{$auth=u(A);$settings=u(T);$modal=u(E);$notification=u(X);$renderer=u(F);$router=u(V);$translate=u(L);isExpanded=!1;formAuth=this.$settings.formAuth;isAdmin=this.$auth.user.admin;enableTerminalAccess=this.$settings.env.enableTerminalAccess;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.subscribe(l=>{l instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)}),this.$notification.formAuthEnabled.subscribe(r=>{this.formAuth=r});let e=document.querySelector(".sidebar"),l=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!l.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),l.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),l.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}openUnderVoltageModal(){let e=this.$modal.open(H,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let l=e.target;["menuitem","button"].includes(l.getAttribute("role"))&&l.click()}}reloadPage(){window.location.reload()}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}logout(){this.$auth.logout()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.$renderer.setStyle(e,"opacity","20%"),this.$renderer.setStyle(e,"pointer-events","none"),this.$renderer.setStyle(e,"overflow","hidden")):(this.$renderer.removeStyle(e,"opacity"),this.$renderer.removeStyle(e,"pointer-events"),this.$renderer.removeStyle(e,"overflow"))}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=P({type:i,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:68,vars:75,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","../../../../assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-power-off"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(l,t){l&1&&(n(0,"div",0),s(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),p(2,"span",1),n(3,"a",2),s(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),n(15,"a",2),s(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),s(23,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),s(28,"translate"),a()()(),x(29,me,9,8,"div",10),n(30,"div",10)(31,"div",15),s(32,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(33,"div",12),p(34,"i",16),a(),n(35,"div",14),f(36),s(37,"translate"),a()()(),n(38,"div",10)(39,"div",15),s(40,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(41,"div",12),p(42,"i",17),a(),n(43,"div",14),f(44),s(45,"translate"),a()()(),n(46,"div",10)(47,"div",15),s(48,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(49,"div",12),p(50,"i",18),a(),n(51,"div",14),f(52),s(53,"translate"),a()()(),x(54,ue,8,9,"div",10),x(55,_e,8,9,"div",10),x(56,fe,8,9,"div",10),n(57,"div",10)(58,"div",15),s(59,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(60,"div",12),p(61,"i",19),a(),n(62,"div",14),f(63),s(64,"translate"),a()()(),x(65,ge,8,9,"div",10),x(66,ve,8,6,"div",10),x(67,he,8,6,"div",10),a()()),l&2&&(m("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",d(1,37,"menu.sidebar.aria_menu")),o(3),c("routerLink",h(63,B)),m("aria-label",d(4,39,"menu.label_status")),o(5),c("ngClass",M(64,te,t.isExpanded)),o(5),c("ngClass",M(66,ne,t.isExpanded)),o(2),c("routerLink",h(68,B)),m("aria-label",d(16,41,"menu.label_status")),o(7),c("routerLink",h(69,B))("routerLinkActive","active")("routerLinkActiveOptions",h(70,ie)),m("aria-label",d(23,43,"menu.label_status")),o(5),v(d(28,45,"menu.label_status")),o(2),y(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(2),c("routerLink",h(71,oe))("routerLinkActive","active"),m("aria-label",d(32,47,"menu.label_plugins")),o(5),v(d(37,49,"menu.label_plugins")),o(3),c("routerLink",h(72,re))("routerLinkActive","active"),m("aria-label",d(40,51,"menu.label_accessories")),o(5),v(d(45,53,"menu.label_accessories")),o(3),c("routerLink",h(73,ae))("routerLinkActive","active"),m("aria-label",d(48,55,"menu.linux.label_logs")),o(5),v(d(53,57,"menu.linux.label_logs")),o(2),y(t.enableTerminalAccess&&t.isAdmin?54:-1),o(),y(t.isAdmin?55:-1),o(),y(t.isAdmin?56:-1),o(2),c("routerLink",h(74,se))("routerLinkActive","active"),m("aria-label",d(59,59,"support.title")),o(5),v(d(64,61,"support.title")),o(2),y(t.isAdmin?65:-1),o(),y(t.isPwa?66:-1),o(),y(t.formAuth?67:-1))},dependencies:[N,K,O,D,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 80px)!important}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var be=i=>({sidebarExpanded:i}),He=(()=>{class i{$auth=u(A);$modal=u(E);$router=u(V);$settings=u(T);$translate=u(L);$ws=u(j);io;sidebarExpanded=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return I(this,null,function*(){if(this.$settings.settingsLoaded||(yield z(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,$.serverTarget)){console.log(`Server restart required. UI Version: ${$.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:$.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(l,t){l&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),l&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",M(2,be,t.sidebarExpanded)))},dependencies:[J,O,q],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return i})();export{He as LayoutComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as z,b,c as k}from"./chunk-
|
|
1
|
+
import{a as z,b,c as k}from"./chunk-HHGB2T2Q.js";import{a as u}from"./chunk-YLBALIW6.js";import{n as f}from"./chunk-EF3XRHYY.js";import{M as t,g as n,ga as p,h as c,la as a,n as h}from"./chunk-645YHJEQ.js";var d=n(z(),1),l=n(b(),1),m=n(k(),1);var v=(()=>{class o{$ws=a(u);$api=a(f);io;fitAddon;webLinksAddon;resize;elementResize;dataDisposable=null;isInitializing=!1;hasUserTyped=!1;term;destroyTerminal(){this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.io&&this.io.end(),this.term&&(this.term.dispose(),this.term=null),this.resize&&this.resize.complete(),this.elementResize&&this.elementResize.complete(),this.isInitializing=!1,this.hasUserTyped=!1}destroyPersistentSession(){this.destroyTerminal(),this.$api.post("/platform-tools/terminal/destroy-persistent-session",{}).subscribe({error:s=>console.error("Failed to destroy persistent session:",s)})}detachTerminal(){this.dataDisposable&&(this.dataDisposable.dispose(),this.dataDisposable=null),this.term&&this.term.dispose(),this.resize&&this.resize.complete(),this.elementResize&&this.elementResize.complete(),this.isInitializing=!1}hasActiveSession(){return this.io&&this.io.socket&&this.io.socket.connected}checkBackendPersistentSession(){return c(this,null,function*(){try{return(yield this.$api.get("/platform-tools/terminal/has-persistent-session").toPromise()).hasPersistentSession}catch(s){return console.error("Failed to check backend persistent session:",s),!1}})}hasUserTypedInSession(){return this.hasUserTyped}isTerminalReady(){return this.term&&!this.isInitializing}reconnectTerminal(s,e={},r){if(this.isInitializing)return!1;this.isInitializing=!0,this.elementResize=r,this.io&&this.io.socket&&this.io.socket.connected?(this.term=new m.Terminal(e),this.fitAddon=new d.FitAddon,this.webLinksAddon=new l.WebLinksAddon,setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.resize=new h,this.term.open(s.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.socket.removeAllListeners("stdout"),this.io.socket.removeAllListeners("process-exit"),this.io.socket.on("stdout",i=>{this.term.write(i)}),this.io.socket.on("process-exit",()=>{this.startSession()}),this.dataDisposable&&this.dataDisposable.dispose(),this.dataDisposable=this.term.onData(i=>{this.hasUserTyped=!0,this.io.socket.emit("stdin",i)}),this.term.onResize(i=>{this.resize.next(i)}),this.resize.pipe(t(500)).subscribe(i=>{this.io.socket.emit("resize",i)}),this.elementResize&&this.elementResize.pipe(t(100)).subscribe({next:()=>{this.fitAddon.fit()}}),this.io.socket.emit("start-session",{cols:this.term.cols,rows:this.term.rows}),this.isInitializing=!1):this.startTerminal(s,e,r)}startTerminal(s,e={},r){return this.isInitializing?!1:(this.isInitializing=!0,this.elementResize=r,this.io=this.$ws.connectToNamespace("platform-tools/terminal"),this.term=new m.Terminal(e),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new d.FitAddon,this.webLinksAddon=new l.WebLinksAddon,this.resize=new h,this.term.open(s.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.pipe(t(200)).subscribe(()=>{this.startSession()}),this.io.socket.on("disconnect",()=>{this.term.write(`
|
|
2
2
|
\r
|
|
3
3
|
\rTerminal disconnected. Is the server running?
|
|
4
4
|
\r
|
package/public/index.html
CHANGED
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
|
|
21
21
|
<body>
|
|
22
22
|
<app-root></app-root>
|
|
23
|
-
<link rel="modulepreload" href="chunk-
|
|
23
|
+
<link rel="modulepreload" href="chunk-H7SE35UN.js"><link rel="modulepreload" href="chunk-FMZEX6EI.js"><link rel="modulepreload" href="chunk-RZ4UMDVF.js"><link rel="modulepreload" href="chunk-DFLIHKAC.js"><link rel="modulepreload" href="chunk-NRX2DKWS.js"><link rel="modulepreload" href="chunk-O6QIOU32.js"><link rel="modulepreload" href="chunk-3JNJJOX6.js"><link rel="modulepreload" href="chunk-ZBNNBPMQ.js"><link rel="modulepreload" href="chunk-KBHPX4TF.js"><link rel="modulepreload" href="chunk-IA2EYXXP.js"><script src="polyfills-WE4HA5DL.js" type="module" crossorigin="use-credentials"></script><script src="main-YBDT5CSM.js" type="module" crossorigin="use-credentials"></script></body>
|
|
24
24
|
</html>
|