import{d as xe,ag as Ge,A as Be,ah as Qe,G as Te,D as Oe,c as _e,e as me,f as we,h as fe,i as ce,ai as Je,F as Pe,j as De,k as ke,g as he,S as qe,J as Ze,T as Ye,t as Ie,y as Fe,aj as Xe,n as We,_ as Ee,p as Ke,a3 as ge,r as ye,b as He,ak as et,al as tt,q as Re,s as Le,am as rt,a as nt,l as je,an as it,ao as ze,ap as Ve,E as Me,aq as ot,C as st}from"./index-ccab2584.js";import{_ as Ue}from"./notData-cf10628e.js";import{c as Ce}from"./_commonjs-dynamic-modules-d7dd40bd.js";const at=["onClick"],ut={class:"breadcrumb-title"},lt=xe({__name:"Breadcrumb",setup(de){const ve=Ge(),s=Be(),v=Qe(),x=Te(),i=Oe(()=>x.themeConfig),a=Oe(()=>{var u;return(u=v.breadcrumbListGet[ve.matched[ve.matched.length-1].path])!=null?u:[]}),d=(f,u)=>{u!==a.value.length-1&&s.push(f.path)};return(f,u)=>{const e=_e("el-icon"),n=_e("el-breadcrumb-item"),o=_e("el-breadcrumb");return me(),we("div",{class:We(["breadcrumb-box",!i.value.breadcrumbIcon&&"no-icon"])},[fe(o,{"separator-icon":Fe(Xe)},{default:ce(()=>[fe(Je,{name:"breadcrumb"},{default:ce(()=>[(me(!0),we(Pe,null,De(a.value,(c,l)=>(me(),ke(n,{key:c.path},{default:ce(()=>[he("div",{class:"el-breadcrumb__inner is-link",onClick:_=>d(c,l)},[qe(fe(e,{class:"breadcrumb-icon"},{default:ce(()=>[(me(),ke(Ze(c.meta.icon)))]),_:2},1536),[[Ye,c.meta.icon&&i.value.breadcrumbIcon]]),he("span",ut,Ie(c.meta.title),1)],8,at)]),_:2},1024))),128))]),_:1})]),_:1},8,["separator-icon"])],2)}}});const ft=Ee(lt,[["__scopeId","data-v-0c1ab9e7"]]),ct={class:"tool-bar-lf"},ht=xe({__name:"ToolBarLeft",setup(de){const ve=Te(),s=Oe(()=>ve.themeConfig);return(v,x)=>(me(),we("div",ct,[s.value.breadcrumb?(me(),ke(ft,{key:0,id:"breadcrumb"})):Ke("",!0)]))}});const Qt=Ee(ht,[["__scopeId","data-v-2f06fc6a"]]);var $e={exports:{}};(function(de,ve){(function(s){de.exports=s()})(function(){return function(){function s(v,x,i){function a(u,e){if(!x[u]){if(!v[u]){var n=typeof Ce=="function"&&Ce;if(!e&&n)return n(u,!0);if(d)return d(u,!0);var o=new Error("Cannot find module '"+u+"'");throw o.code="MODULE_NOT_FOUND",o}var c=x[u]={exports:{}};v[u][0].call(c.exports,function(l){var _=v[u][1][l];return a(_||l)},c,c.exports,s,v,x,i)}return x[u].exports}for(var d=typeof Ce=="function"&&Ce,f=0;f"u"?this.options[W]=O[W]:this.options[W]=j[W];this.options.clientId=typeof this.options.clientId=="string"?this.options.clientId:m(),this.streamBuilder=S,this.outgoingStore=this.options.outgoingStore||new f,this.incomingStore=this.options.incomingStore||new f,this.queueQoSZero=this.options.queueQoSZero===void 0?!0:this.options.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this.nextId=Math.max(1,Math.floor(Math.random()*65535)),this.outgoing={},this.on("connect",function(){if(this.disconnected)return;this.connected=!0;var g=this.outgoingStore.createStream();this.once("close",D),g.on("end",function(){M.removeListener("close",D)}),g.on("error",function(V){M.removeListener("close",D),M.emit("error",V)});function D(){g.destroy(),g=null}function F(){if(!!g){var V=g.read(1),Z;if(!V){g.once("readable",F);return}!M.disconnecting&&!M.reconnectTimer?(Z=M.outgoing[V.messageId],M.outgoing[V.messageId]=function(K,Q){Z&&Z(K,Q),F()},M._sendPacket(V)):g.destroy&&g.destroy()}}F()}),this.on("close",function(){this.connected=!1,clearTimeout(this.connackTimer)}),this.on("connect",this._setupPingTimer),this.on("connect",function(){var g=this.queue;function D(){var F=g.shift(),V=null;!F||(V=F.packet,M._sendPacket(V,function(Z){F.cb&&F.cb(Z),D()}))}D()});var ee=!0;this.on("connect",function(){!ee&&this.options.clean&&Object.keys(this._resubscribeTopics).length>0&&(this.options.resubscribe?(this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics)):this._resubscribeTopics={}),ee=!1}),this.on("close",function(){M.pingTimer!==null&&(M.pingTimer.clear(),M.pingTimer=null)}),this.on("close",this._setupReconnect),d.EventEmitter.call(this),this._setupStream()}o(A,d.EventEmitter),A.prototype._setupStream=function(){var S,j=this,W=new n,M=e.parser(this.options),ee=null,g=[];this._clearReconnect(),this.stream=this.streamBuilder(this),M.on("packet",function(V){g.push(V)});function D(){i.nextTick(F)}function F(){var V=g.shift(),Z=ee;V?j._handlePacket(V,D):(ee=null,Z())}W._write=function(V,Z,K){ee=K,M.parse(V),F()},this.stream.pipe(W),this.stream.on("error",T),u(this.stream,this.emit.bind(this,"close")),S=Object.create(this.options),S.cmd="connect",P(this,S),M.on("error",this.emit.bind(this,"error")),this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){j._cleanUp(!0)},this.options.connectTimeout)},A.prototype._handlePacket=function(S,j){switch(this.emit("packetreceive",S),S.cmd){case"publish":this._handlePublish(S,j);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(S),j();break;case"pubrel":this._handlePubrel(S,j);break;case"connack":this._handleConnack(S),j();break;case"pingresp":this._handlePingresp(S),j();break}},A.prototype._checkDisconnecting=function(S){return this.disconnecting&&(S?S(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},A.prototype.publish=function(S,j,W,M){var ee;typeof W=="function"&&(M=W,W=null);var g={qos:0,retain:!1,dup:!1};if(W=_(g,W),this._checkDisconnecting(M))return this;switch(ee={cmd:"publish",topic:S,payload:j,qos:W.qos,retain:W.retain,messageId:this._nextId(),dup:W.dup},W.qos){case 1:case 2:this.outgoing[ee.messageId]=M||T,this._sendPacket(ee);break;default:this._sendPacket(ee,M);break}return this},A.prototype.subscribe=function(){var S,j=Array.prototype.slice.call(arguments),W=[],M=j.shift(),ee=M.resubscribe,g=j.pop()||T,D=j.pop(),F,V=this;if(delete M.resubscribe,typeof M=="string"&&(M=[M]),typeof g!="function"&&(D=g,g=T),F=l.validateTopics(M),F!==null)return E(g,new Error("Invalid topic "+F)),this;if(this._checkDisconnecting(g))return this;var Z={qos:0};if(D=_(Z,D),Array.isArray(M)?M.forEach(function(Q){(V._resubscribeTopics[Q]0&&(V._resubscribeTopics[Q.topic]=Q.qos,K.push(Q.topic))}),V.messageIdToTopic[S.messageId]=K}return this.outgoing[S.messageId]=function(Q,z){if(!Q)for(var N=z.granted,re=0;re0?this.once("outgoingEmpty",setTimeout.bind(null,ee,10)):ee(),this)},A.prototype.removeOutgoingMessage=function(S){var j=this.outgoing[S];return delete this.outgoing[S],this.outgoingStore.del({messageId:S},function(){j(new Error("Message removed"))}),this},A.prototype.reconnect=function(S){var j=this,W=function(){S?(j.options.incomingStore=S.incomingStore,j.options.outgoingStore=S.outgoingStore):(j.options.incomingStore=null,j.options.outgoingStore=null),j.incomingStore=j.options.incomingStore||new f,j.outgoingStore=j.options.outgoingStore||new f,j.disconnecting=!1,j.disconnected=!1,j._deferredReconnect=null,j._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=W:W(),this},A.prototype._reconnect=function(){this.emit("reconnect"),this._setupStream()},A.prototype._setupReconnect=function(){var S=this;!S.disconnecting&&!S.reconnectTimer&&S.options.reconnectPeriod>0&&(this.reconnecting||(this.emit("offline"),this.reconnecting=!0),S.reconnectTimer=setInterval(function(){S._reconnect()},S.options.reconnectPeriod))},A.prototype._clearReconnect=function(){this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},A.prototype._cleanUp=function(S,j){j&&this.stream.on("close",j),S?(this.options.reconnectPeriod===0&&this.options.clean&&R(this.outgoing),this.stream.destroy()):this._sendPacket({cmd:"disconnect"},E.bind(null,this.stream.end.bind(this.stream))),this.disconnecting||(this._clearReconnect(),this._setupReconnect()),this.pingTimer!==null&&(this.pingTimer.clear(),this.pingTimer=null),j&&!this.connected&&(this.stream.removeListener("close",j),j())},A.prototype._sendPacket=function(S,j){if(!this.connected){(S.qos||0)===0&&this.queueQoSZero||S.cmd!=="publish"?this.queue.push({packet:S,cb:j}):S.qos>0?(j=this.outgoing[S.messageId],this.outgoingStore.put(S,function(W){if(W)return j&&j(W)})):j&&j(new Error("No connection to broker"));return}switch(this._shiftPingInterval(),S.cmd){case"publish":break;case"pubrel":C(this,S,j);return;default:P(this,S,j);return}switch(S.qos){case 2:case 1:C(this,S,j);break;case 0:default:P(this,S,j);break}},A.prototype._setupPingTimer=function(){var S=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=c(function(){S._checkPing()},this.options.keepalive*1e3))},A.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(this.options.keepalive*1e3)},A.prototype._checkPing=function(){this.pingResp?(this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):this._cleanUp(!0)},A.prototype._handlePingresp=function(){this.pingResp=!0},A.prototype._handleConnack=function(S){var j=S.returnCode,W=["","Unacceptable protocol version","Identifier rejected","Server unavailable","Bad username or password","Not authorized"];if(clearTimeout(this.connackTimer),j===0)this.reconnecting=!1,this.emit("connect",S);else if(j>0){var M=new Error("Connection refused: "+W[j]);M.code=j,this.emit("error",M)}},A.prototype._handlePublish=function(S,j){j=typeof j<"u"?j:T;var W=S.topic.toString(),M=S.payload,ee=S.qos,g=S.messageId,D=this;switch(ee){case 2:this.incomingStore.put(S,function(F){if(F)return j(F);D._sendPacket({cmd:"pubrec",messageId:g},j)});break;case 1:this.emit("message",W,M,S),this.handleMessage(S,function(F){if(F)return j(F);D._sendPacket({cmd:"puback",messageId:g},j)});break;case 0:this.emit("message",W,M,S),this.handleMessage(S,j);break}},A.prototype.handleMessage=function(S,j){j()},A.prototype._handleAck=function(S){var j=S.messageId,W=S.cmd,M=null,ee=this.outgoing[j],g=this;if(!!ee){switch(W){case"pubcomp":case"puback":delete this.outgoing[j],this.outgoingStore.del(S,ee);break;case"pubrec":M={cmd:"pubrel",qos:2,messageId:j},this._sendPacket(M);break;case"suback":if(delete this.outgoing[j],S.granted.length===1&&(S.granted[0]&128)!==0){var D=this.messageIdToTopic[j];D&&D.forEach(function(F){delete g._resubscribeTopics[F]})}ee(null,S);break;case"unsuback":delete this.outgoing[j],ee(null);break;default:g.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&Object.keys(this.outgoing).length===0&&this.emit("outgoingEmpty")}},A.prototype._handlePubrel=function(S,j){j=typeof j<"u"?j:T;var W=S.messageId,M=this,ee={cmd:"pubcomp",messageId:W};M.incomingStore.get(S,function(g,D){!g&&D.cmd!=="pubrel"?(M.emit("message",D.topic,D.payload,D),M.incomingStore.put(S,function(F){if(F)return j(F);M.handleMessage(D,function(V){if(V)return j(V);M._sendPacket(ee,j)})})):M._sendPacket(ee,j)})},A.prototype._nextId=function(){var S=this.nextId++;return this.nextId===65536&&(this.nextId=1),S},A.prototype.getLastMessageId=function(){return this.nextId===1?65535:this.nextId-1},v.exports=A}).call(this,s("_process"),typeof ge<"u"?ge:typeof self<"u"?self:typeof window<"u"?window:{})},{"./store":6,"./validations":7,_process:92,"end-of-stream":17,events:78,inherits:80,"mqtt-packet":85,"readable-stream":106,reinterval:107,xtend:120}],2:[function(s,v,x){var i=s("net");function a(d,f){var u,e;return f.port=f.port||1883,f.hostname=f.hostname||f.host||"localhost",u=f.port,e=f.hostname,i.createConnection(u,e)}v.exports=a},{net:11}],3:[function(s,v,x){var i=s("tls");function a(d,f){var u;f.port=f.port||8883,f.host=f.hostname||f.host||"localhost",f.rejectUnauthorized=f.rejectUnauthorized!==!1,delete f.path,u=i.connect(f),u.on("secureConnect",function(){f.rejectUnauthorized&&!u.authorized?u.emit("error",new Error("TLS not authorized")):u.removeListener("error",e)});function e(n){f.rejectUnauthorized&&d.emit("error",n),u.end()}return u.on("error",e),u}v.exports=a},{tls:11}],4:[function(s,v,x){(function(i){var a=s("websocket-stream"),d=s("url"),f=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],u=i.title==="browser";function e(_,E){var O=_.protocol+"://"+_.hostname+":"+_.port+_.path;return typeof _.transformWsUrl=="function"&&(O=_.transformWsUrl(O,_,E)),O}function n(_){_.hostname||(_.hostname="localhost"),_.port||(_.protocol==="wss"?_.port=443:_.port=80),_.path||(_.path="/"),_.wsOptions||(_.wsOptions={}),!u&&_.protocol==="wss"&&f.forEach(function(E){_.hasOwnProperty(E)&&!_.wsOptions.hasOwnProperty(E)&&(_.wsOptions[E]=_[E])})}function o(_,E){var O=E.protocolId==="MQIsdp"&&E.protocolVersion===3?"mqttv3.1":"mqtt";n(E);var m=e(E,_);return a(m,[O],E.wsOptions)}function c(_,E){return o(_,E)}function l(_,E){if(E.hostname||(E.hostname=E.host),!E.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");var O=d.parse(document.URL);E.hostname=O.hostname,E.port||(E.port=O.port)}return o(_,E)}u?v.exports=l:v.exports=c}).call(this,s("_process"))},{_process:92,url:112,"websocket-stream":117}],5:[function(s,v,x){var i=!1,a=[];function d(l){i?wx.sendSocketMessage({data:l.buffer||l}):a.push(l)}function f(l,_){var E={OPEN:1,CLOSING:2,CLOSED:3,readyState:i?1:0,send:d,close:wx.closeSocket,onopen:null,onmessage:null,onclose:null,onerror:null};return wx.connectSocket({url:l,protocols:_}),wx.onSocketOpen(function(O){E.readyState=E.OPEN,i=!0;for(var m=0;m0)throw new Error("Invalid string. Length must be a multiple of 4");var R=m.indexOf("=");R===-1&&(R=P);var C=R===P?0:4-R%4;return[R,C]}function o(m){var P=n(m),R=P[0],C=P[1];return(R+C)*3/4-C}function c(m,P,R){return(P+R)*3/4-R}function l(m){for(var P,R=n(m),C=R[0],T=R[1],A=new d(c(m,C,T)),S=0,j=T>0?C-4:C,W=0;W>16&255,A[S++]=P>>8&255,A[S++]=P&255;return T===2&&(P=a[m.charCodeAt(W)]<<2|a[m.charCodeAt(W+1)]>>4,A[S++]=P&255),T===1&&(P=a[m.charCodeAt(W)]<<10|a[m.charCodeAt(W+1)]<<4|a[m.charCodeAt(W+2)]>>2,A[S++]=P>>8&255,A[S++]=P&255),A}function _(m){return i[m>>18&63]+i[m>>12&63]+i[m>>6&63]+i[m&63]}function E(m,P,R){for(var C,T=[],A=P;Aj?j:S+A));return C===1?(P=m[R-1],T.push(i[P>>2]+i[P<<4&63]+"==")):C===2&&(P=(m[R-2]<<8)+m[R-1],T.push(i[P>>10]+i[P>>4&63]+i[P<<2&63]+"=")),T.join("")}},{}],10:[function(s,v,x){var i=s("readable-stream/duplex"),a=s("util"),d=s("safe-buffer").Buffer;function f(u){if(!(this instanceof f))return new f(u);if(this._bufs=[],this.length=0,typeof u=="function"){this._callback=u;var e=function(o){this._callback&&(this._callback(o),this._callback=null)}.bind(this);this.on("pipe",function(o){o.on("error",e)}),this.on("unpipe",function(o){o.removeListener("error",e)})}else this.append(u);i.call(this)}a.inherits(f,i),f.prototype._offset=function(e){var n=0,o=0,c;if(e===0)return[0,0];for(;othis.length)&&(c=this.length),o>=this.length||c<=0)return e||d.alloc(0);var l=!!e,_=this._offset(o),E=c-o,O=E,m=l&&n||0,P=_[1],R,C;if(o===0&&c==this.length){if(!l)return this._bufs.length===1?this._bufs[0]:d.concat(this._bufs,this.length);for(C=0;CR)this._bufs[C].copy(e,m,P);else{this._bufs[C].copy(e,m,P,P+O);break}m+=R,O-=R,P&&(P=0)}return e},f.prototype.shallowSlice=function(e,n){e=e||0,n=n||this.length,e<0&&(e+=this.length),n<0&&(n+=this.length);var o=this._offset(e),c=this._offset(n),l=this._bufs.slice(o[0],c[0]+1);return c[1]==0?l.pop():l[l.length-1]=l[l.length-1].slice(0,c[1]),o[1]!=0&&(l[0]=l[0].slice(o[1])),new f(l)},f.prototype.toString=function(e,n,o){return this.slice(n,o).toString(e)},f.prototype.consume=function(e){for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this},f.prototype.duplicate=function(){for(var e=0,n=new f;ed)throw new RangeError('The value "'+h+'" is invalid for option "size"');var t=new Uint8Array(h);return t.__proto__=e.prototype,t}function e(h,t,r){if(typeof h=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return l(h)}return n(h,t,r)}typeof Symbol<"u"&&Symbol.species!=null&&e[Symbol.species]===e&&Object.defineProperty(e,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),e.poolSize=8192;function n(h,t,r){if(typeof h=="string")return _(h,t);if(ArrayBuffer.isView(h))return E(h);if(h==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h);if(Y(h,ArrayBuffer)||h&&Y(h.buffer,ArrayBuffer))return O(h,t,r);if(typeof h=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var b=h.valueOf&&h.valueOf();if(b!=null&&b!==h)return e.from(b,t,r);var L=m(h);if(L)return L;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof h[Symbol.toPrimitive]=="function")return e.from(h[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h)}e.from=function(h,t,r){return n(h,t,r)},e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array;function o(h){if(typeof h!="number")throw new TypeError('"size" argument must be of type number');if(h<0)throw new RangeError('The value "'+h+'" is invalid for option "size"')}function c(h,t,r){return o(h),h<=0?u(h):t!==void 0?typeof r=="string"?u(h).fill(t,r):u(h).fill(t):u(h)}e.alloc=function(h,t,r){return c(h,t,r)};function l(h){return o(h),u(h<0?0:P(h)|0)}e.allocUnsafe=function(h){return l(h)},e.allocUnsafeSlow=function(h){return l(h)};function _(h,t){if((typeof t!="string"||t==="")&&(t="utf8"),!e.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=C(h,t)|0,b=u(r),L=b.write(h,t);return L!==r&&(b=b.slice(0,L)),b}function E(h){for(var t=h.length<0?0:P(h.length)|0,r=u(t),b=0;b=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return h|0}function R(h){return+h!=h&&(h=0),e.alloc(+h)}e.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==e.prototype},e.compare=function(t,r){if(Y(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),Y(r,Uint8Array)&&(r=e.from(r,r.offset,r.byteLength)),!e.isBuffer(t)||!e.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var b=t.length,L=r.length,q=0,X=Math.min(b,L);q2&&arguments[2]===!0;if(!b&&r===0)return 0;for(var L=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return ne(h).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return w(h).length;default:if(L)return b?-1:ne(h).length;t=(""+t).toLowerCase(),L=!0}}e.byteLength=C;function T(h,t,r){var b=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(h||(h="utf8");;)switch(h){case"hex":return re(this,t,r);case"utf8":case"utf-8":return Z(this,t,r);case"ascii":return z(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return V(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(b)throw new TypeError("Unknown encoding: "+h);h=(h+"").toLowerCase(),b=!0}}e.prototype._isBuffer=!0;function A(h,t,r){var b=h[t];h[t]=h[r],h[r]=b}e.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;rr&&(t+=" ... "),""},e.prototype.compare=function(t,r,b,L,q){if(Y(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),b===void 0&&(b=t?t.length:0),L===void 0&&(L=0),q===void 0&&(q=this.length),r<0||b>t.length||L<0||q>this.length)throw new RangeError("out of range index");if(L>=q&&r>=b)return 0;if(L>=q)return-1;if(r>=b)return 1;if(r>>>=0,b>>>=0,L>>>=0,q>>>=0,this===t)return 0;for(var X=q-L,se=b-r,ae=Math.min(X,se),ue=this.slice(L,q),pe=t.slice(r,b),le=0;le2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,oe(r)&&(r=L?0:h.length-1),r<0&&(r=h.length+r),r>=h.length){if(L)return-1;r=h.length-1}else if(r<0)if(L)r=0;else return-1;if(typeof t=="string"&&(t=e.from(t,b)),e.isBuffer(t))return t.length===0?-1:j(h,t,r,b,L);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?L?Uint8Array.prototype.indexOf.call(h,t,r):Uint8Array.prototype.lastIndexOf.call(h,t,r):j(h,[t],r,b,L);throw new TypeError("val must be string, number or Buffer")}function j(h,t,r,b,L){var q=1,X=h.length,se=t.length;if(b!==void 0&&(b=String(b).toLowerCase(),b==="ucs2"||b==="ucs-2"||b==="utf16le"||b==="utf-16le")){if(h.length<2||t.length<2)return-1;q=2,X/=2,se/=2,r/=2}function ae(Se,Ne){return q===1?Se[Ne]:Se.readUInt16BE(Ne*q)}var ue;if(L){var pe=-1;for(ue=r;ueX&&(r=X-se),ue=r;ue>=0;ue--){for(var le=!0,be=0;beL&&(b=L)):b=L;var q=t.length;b>q/2&&(b=q/2);for(var X=0;X>>0,isFinite(b)?(b=b>>>0,L===void 0&&(L="utf8")):(L=b,b=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var q=this.length-r;if((b===void 0||b>q)&&(b=q),t.length>0&&(b<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");L||(L="utf8");for(var X=!1;;)switch(L){case"hex":return W(this,t,r,b);case"utf8":case"utf-8":return M(this,t,r,b);case"ascii":return ee(this,t,r,b);case"latin1":case"binary":return g(this,t,r,b);case"base64":return D(this,t,r,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,r,b);default:if(X)throw new TypeError("Unknown encoding: "+L);L=(""+L).toLowerCase(),X=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function V(h,t,r){return t===0&&r===h.length?i.fromByteArray(h):i.fromByteArray(h.slice(t,r))}function Z(h,t,r){r=Math.min(h.length,r);for(var b=[],L=t;L239?4:q>223?3:q>191?2:1;if(L+se<=r){var ae,ue,pe,le;switch(se){case 1:q<128&&(X=q);break;case 2:ae=h[L+1],(ae&192)===128&&(le=(q&31)<<6|ae&63,le>127&&(X=le));break;case 3:ae=h[L+1],ue=h[L+2],(ae&192)===128&&(ue&192)===128&&(le=(q&15)<<12|(ae&63)<<6|ue&63,le>2047&&(le<55296||le>57343)&&(X=le));break;case 4:ae=h[L+1],ue=h[L+2],pe=h[L+3],(ae&192)===128&&(ue&192)===128&&(pe&192)===128&&(le=(q&15)<<18|(ae&63)<<12|(ue&63)<<6|pe&63,le>65535&&le<1114112&&(X=le))}}X===null?(X=65533,se=1):X>65535&&(X-=65536,b.push(X>>>10&1023|55296),X=56320|X&1023),b.push(X),L+=se}return Q(b)}var K=4096;function Q(h){var t=h.length;if(t<=K)return String.fromCharCode.apply(String,h);for(var r="",b=0;bb)&&(r=b);for(var L="",q=t;qb&&(t=b),r<0?(r+=b,r<0&&(r=0)):r>b&&(r=b),rr)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUIntLE=function(t,r,b){t=t>>>0,r=r>>>0,b||k(t,r,this.length);for(var L=this[t],q=1,X=0;++X>>0,r=r>>>0,b||k(t,r,this.length);for(var L=this[t+--r],q=1;r>0&&(q*=256);)L+=this[t+--r]*q;return L},e.prototype.readUInt8=function(t,r){return t=t>>>0,r||k(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||k(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||k(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},e.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||k(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,r,b){t=t>>>0,r=r>>>0,b||k(t,r,this.length);for(var L=this[t],q=1,X=0;++X=q&&(L-=Math.pow(2,8*r)),L},e.prototype.readIntBE=function(t,r,b){t=t>>>0,r=r>>>0,b||k(t,r,this.length);for(var L=r,q=1,X=this[t+--L];L>0&&(q*=256);)X+=this[t+--L]*q;return q*=128,X>=q&&(X-=Math.pow(2,8*r)),X},e.prototype.readInt8=function(t,r){return t=t>>>0,r||k(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},e.prototype.readInt16LE=function(t,r){t=t>>>0,r||k(t,2,this.length);var b=this[t]|this[t+1]<<8;return b&32768?b|4294901760:b},e.prototype.readInt16BE=function(t,r){t=t>>>0,r||k(t,2,this.length);var b=this[t+1]|this[t]<<8;return b&32768?b|4294901760:b},e.prototype.readInt32LE=function(t,r){return t=t>>>0,r||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,r){return t=t>>>0,r||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,r){return t=t>>>0,r||k(t,4,this.length),a.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,r){return t=t>>>0,r||k(t,4,this.length),a.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||k(t,8,this.length),a.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||k(t,8,this.length),a.read(this,t,!1,52,8)};function p(h,t,r,b,L,q){if(!e.isBuffer(h))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>L||th.length)throw new RangeError("Index out of range")}e.prototype.writeUIntLE=function(t,r,b,L){if(t=+t,r=r>>>0,b=b>>>0,!L){var q=Math.pow(2,8*b)-1;p(this,t,r,b,q,0)}var X=1,se=0;for(this[r]=t&255;++se>>0,b=b>>>0,!L){var q=Math.pow(2,8*b)-1;p(this,t,r,b,q,0)}var X=b-1,se=1;for(this[r+X]=t&255;--X>=0&&(se*=256);)this[r+X]=t/se&255;return r+b},e.prototype.writeUInt8=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,1,255,0),this[r]=t&255,r+1},e.prototype.writeUInt16LE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2},e.prototype.writeUInt16BE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2},e.prototype.writeUInt32LE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4},e.prototype.writeUInt32BE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4},e.prototype.writeIntLE=function(t,r,b,L){if(t=+t,r=r>>>0,!L){var q=Math.pow(2,8*b-1);p(this,t,r,b,q-1,-q)}var X=0,se=1,ae=0;for(this[r]=t&255;++X>0)-ae&255;return r+b},e.prototype.writeIntBE=function(t,r,b,L){if(t=+t,r=r>>>0,!L){var q=Math.pow(2,8*b-1);p(this,t,r,b,q-1,-q)}var X=b-1,se=1,ae=0;for(this[r+X]=t&255;--X>=0&&(se*=256);)t<0&&ae===0&&this[r+X+1]!==0&&(ae=1),this[r+X]=(t/se>>0)-ae&255;return r+b},e.prototype.writeInt8=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1},e.prototype.writeInt16LE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2},e.prototype.writeInt16BE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2},e.prototype.writeInt32LE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4},e.prototype.writeInt32BE=function(t,r,b){return t=+t,r=r>>>0,b||p(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function I(h,t,r,b,L,q){if(r+b>h.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(h,t,r,b,L){return t=+t,r=r>>>0,L||I(h,t,r,4),a.write(h,t,r,b,23,4),r+4}e.prototype.writeFloatLE=function(t,r,b){return U(this,t,r,!0,b)},e.prototype.writeFloatBE=function(t,r,b){return U(this,t,r,!1,b)};function $(h,t,r,b,L){return t=+t,r=r>>>0,L||I(h,t,r,8),a.write(h,t,r,b,52,8),r+8}e.prototype.writeDoubleLE=function(t,r,b){return $(this,t,r,!0,b)},e.prototype.writeDoubleBE=function(t,r,b){return $(this,t,r,!1,b)},e.prototype.copy=function(t,r,b,L){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(b||(b=0),!L&&L!==0&&(L=this.length),r>=t.length&&(r=t.length),r||(r=0),L>0&&L=this.length)throw new RangeError("Index out of range");if(L<0)throw new RangeError("sourceEnd out of bounds");L>this.length&&(L=this.length),t.length-r=0;--X)t[X+r]=this[X+b];else Uint8Array.prototype.set.call(t,this.subarray(b,L),r);return q},e.prototype.fill=function(t,r,b,L){if(typeof t=="string"){if(typeof r=="string"?(L=r,r=0,b=this.length):typeof b=="string"&&(L=b,b=this.length),L!==void 0&&typeof L!="string")throw new TypeError("encoding must be a string");if(typeof L=="string"&&!e.isEncoding(L))throw new TypeError("Unknown encoding: "+L);if(t.length===1){var q=t.charCodeAt(0);(L==="utf8"&&q<128||L==="latin1")&&(t=q)}}else typeof t=="number"&&(t=t&255);if(r<0||this.length>>0,b=b===void 0?this.length:b>>>0,t||(t=0);var X;if(typeof t=="number")for(X=r;X55295&&r<57344){if(!L){if(r>56319){(t-=3)>-1&&q.push(239,191,189);continue}else if(X+1===b){(t-=3)>-1&&q.push(239,191,189);continue}L=r;continue}if(r<56320){(t-=3)>-1&&q.push(239,191,189),L=r;continue}r=(L-55296<<10|r-56320)+65536}else L&&(t-=3)>-1&&q.push(239,191,189);if(L=null,r<128){if((t-=1)<0)break;q.push(r)}else if(r<2048){if((t-=2)<0)break;q.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;q.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;q.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return q}function ie(h){for(var t=[],r=0;r>8,L=r%256,q.push(L),q.push(b);return q}function w(h){return i.toByteArray(J(h))}function G(h,t,r,b){for(var L=0;L=t.length||L>=h.length);++L)t[L+r]=h[L];return L}function Y(h,t){return h instanceof t||h!=null&&h.constructor!=null&&h.constructor.name!=null&&h.constructor.name===t.name}function oe(h){return h!==h}},{"base64-js":9,ieee754:79}],13:[function(s,v,x){(function(i){function a(C){return Array.isArray?Array.isArray(C):R(C)==="[object Array]"}x.isArray=a;function d(C){return typeof C=="boolean"}x.isBoolean=d;function f(C){return C===null}x.isNull=f;function u(C){return C==null}x.isNullOrUndefined=u;function e(C){return typeof C=="number"}x.isNumber=e;function n(C){return typeof C=="string"}x.isString=n;function o(C){return typeof C=="symbol"}x.isSymbol=o;function c(C){return C===void 0}x.isUndefined=c;function l(C){return R(C)==="[object RegExp]"}x.isRegExp=l;function _(C){return typeof C=="object"&&C!==null}x.isObject=_;function E(C){return R(C)==="[object Date]"}x.isDate=E;function O(C){return R(C)==="[object Error]"||C instanceof Error}x.isError=O;function m(C){return typeof C=="function"}x.isFunction=m;function P(C){return C===null||typeof C=="boolean"||typeof C=="number"||typeof C=="string"||typeof C=="symbol"||typeof C>"u"}x.isPrimitive=P,x.isBuffer=i.isBuffer;function R(C){return Object.prototype.toString.call(C)}}).call(this,{isBuffer:s("../../is-buffer/index.js")})},{"../../is-buffer/index.js":81}],14:[function(s,v,x){var i=s("es5-ext/object/copy"),a=s("es5-ext/object/normalize-options"),d=s("es5-ext/object/valid-callable"),f=s("es5-ext/object/map"),u=s("es5-ext/object/valid-callable"),e=s("es5-ext/object/valid-value"),n=Function.prototype.bind,o=Object.defineProperty,c=Object.prototype.hasOwnProperty,l;l=function(_,E,O){var m=e(E)&&u(E.value),P;return P=i(E),delete P.writable,delete P.value,P.get=function(){return!O.overwriteDefinition&&c.call(this,_)?m:(E.value=n.call(m,O.resolveContext?O.resolveContext(this):this),o(this,_,E),this[_])},P},v.exports=function(_){var E=a(arguments[1]);return E.resolveContext!=null&&d(E.resolveContext),f(_,function(O,m){return l(m,O,E)})}},{"es5-ext/object/copy":38,"es5-ext/object/map":47,"es5-ext/object/normalize-options":48,"es5-ext/object/valid-callable":53,"es5-ext/object/valid-value":54}],15:[function(s,v,x){var i=s("es5-ext/object/assign"),a=s("es5-ext/object/normalize-options"),d=s("es5-ext/object/is-callable"),f=s("es5-ext/string/#/contains"),u;u=v.exports=function(e,n){var o,c,l,_,E;return arguments.length<2||typeof e!="string"?(_=n,n=e,e=null):_=arguments[2],e==null?(o=l=!0,c=!1):(o=f.call(e,"c"),c=f.call(e,"e"),l=f.call(e,"w")),E={value:n,configurable:o,enumerable:c,writable:l},_?i(a(_),E):E},u.gs=function(e,n,o){var c,l,_,E;return typeof e!="string"?(_=o,o=n,n=e,e=null):_=arguments[3],n==null?n=void 0:d(n)?o==null?o=void 0:d(o)||(_=o,o=void 0):(_=n,n=o=void 0),e==null?(c=!0,l=!1):(c=f.call(e,"c"),l=f.call(e,"e")),E={get:n,set:o,configurable:c,enumerable:l},_?i(a(_),E):E}},{"es5-ext/object/assign":35,"es5-ext/object/is-callable":41,"es5-ext/object/normalize-options":48,"es5-ext/string/#/contains":55}],16:[function(s,v,x){(function(i,a){var d=s("readable-stream"),f=s("end-of-stream"),u=s("inherits"),e=s("stream-shift"),n=a.from&&a.from!==Uint8Array.from?a.from([0]):new a([0]),o=function(m,P){m._corked?m.once("uncork",P):P()},c=function(m,P){m._autoDestroy&&m.destroy(P)},l=function(m,P){return function(R){R?c(m,R.message==="premature close"?null:R):P&&!m._ended&&m.end()}},_=function(m,P){if(!m||m._writableState&&m._writableState.finished)return P();if(m._writableState)return m.end(P);m.end(),P()},E=function(m){return new d.Readable({objectMode:!0,highWaterMark:16}).wrap(m)},O=function(m,P,R){if(!(this instanceof O))return new O(m,P,R);d.Duplex.call(this,R),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!R||R.autoDestroy!==!1,this._forwardDestroy=!R||R.destroy!==!1,this._forwardEnd=!R||R.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,m&&this.setWritable(m),P&&this.setReadable(P)};u(O,d.Duplex),O.obj=function(m,P,R){return R||(R={}),R.objectMode=!0,R.highWaterMark=16,new O(m,P,R)},O.prototype.cork=function(){++this._corked===1&&this.emit("cork")},O.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")},O.prototype.setWritable=function(m){if(this._unwrite&&this._unwrite(),this.destroyed){m&&m.destroy&&m.destroy();return}if(m===null||m===!1){this.end();return}var P=this,R=f(m,{writable:!0,readable:!1},l(this,this._forwardEnd)),C=function(){var A=P._ondrain;P._ondrain=null,A&&A()},T=function(){P._writable.removeListener("drain",C),R()};this._unwrite&&i.nextTick(C),this._writable=m,this._writable.on("drain",C),this._unwrite=T,this.uncork()},O.prototype.setReadable=function(m){if(this._unread&&this._unread(),this.destroyed){m&&m.destroy&&m.destroy();return}if(m===null||m===!1){this.push(null),this.resume();return}var P=this,R=f(m,{writable:!1,readable:!0},l(this)),C=function(){P._forward()},T=function(){P.push(null)},A=function(){P._readable2.removeListener("readable",C),P._readable2.removeListener("end",T),R()};this._drained=!0,this._readable=m,this._readable2=m._readableState?m:E(m),this._readable2.on("readable",C),this._readable2.on("end",T),this._unread=A,this._forward()},O.prototype._read=function(){this._drained=!0,this._forward()},O.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var m;this._drained&&(m=e(this._readable2))!==null;)this.destroyed||(this._drained=this.push(m));this._forwarding=!1}},O.prototype.destroy=function(m){if(!this.destroyed){this.destroyed=!0;var P=this;i.nextTick(function(){P._destroy(m)})}},O.prototype._destroy=function(m){if(m){var P=this._ondrain;this._ondrain=null,P?P(m):this.emit("error",m)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},O.prototype._write=function(m,P,R){if(this.destroyed)return R();if(this._corked)return o(this,this._write.bind(this,m,P,R));if(m===n)return this._finish(R);if(!this._writable)return R();this._writable.write(m)===!1?this._ondrain=R:R()},O.prototype._finish=function(m){var P=this;this.emit("preend"),o(this,function(){_(P._forwardEnd&&P._writable,function(){P._writableState.prefinished===!1&&(P._writableState.prefinished=!0),P.emit("prefinish"),o(P,m)})})},O.prototype.end=function(m,P,R){return typeof m=="function"?this.end(null,null,m):typeof P=="function"?this.end(m,null,P):(this._ended=!0,m&&this.write(m),this._writableState.ending||this.write(n),d.Writable.prototype.end.call(this,R))},v.exports=O}).call(this,s("_process"),s("buffer").Buffer)},{_process:92,buffer:12,"end-of-stream":17,inherits:80,"readable-stream":106,"stream-shift":109}],17:[function(s,v,x){var i=s("once"),a=function(){},d=function(e){return e.setHeader&&typeof e.abort=="function"},f=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},u=function(e,n,o){if(typeof n=="function")return u(e,null,n);n||(n={}),o=i(o||a);var c=e._writableState,l=e._readableState,_=n.readable||n.readable!==!1&&e.readable,E=n.writable||n.writable!==!1&&e.writable,O=function(){e.writable||m()},m=function(){E=!1,_||o.call(e)},P=function(){_=!1,E||o.call(e)},R=function(S){o.call(e,S?new Error("exited with error code: "+S):null)},C=function(S){o.call(e,S)},T=function(){if(_&&!(l&&l.ended))return o.call(e,new Error("premature close"));if(E&&!(c&&c.ended))return o.call(e,new Error("premature close"))},A=function(){e.req.on("finish",m)};return d(e)?(e.on("complete",m),e.on("abort",T),e.req?A():e.on("request",A)):E&&!c&&(e.on("end",O),e.on("close",O)),f(e)&&e.on("exit",R),e.on("end",P),e.on("finish",m),n.error!==!1&&e.on("error",C),e.on("close",T),function(){e.removeListener("complete",m),e.removeListener("abort",T),e.removeListener("request",A),e.req&&e.req.removeListener("finish",m),e.removeListener("end",O),e.removeListener("close",O),e.removeListener("finish",m),e.removeListener("exit",R),e.removeListener("end",P),e.removeListener("error",C),e.removeListener("close",T)}};v.exports=u},{once:90}],18:[function(s,v,x){var i=s("../../object/valid-value");v.exports=function(){return i(this).length=0,this}},{"../../object/valid-value":54}],19:[function(s,v,x){var i=s("../../number/is-nan"),a=s("../../number/to-pos-integer"),d=s("../../object/valid-value"),f=Array.prototype.indexOf,u=Object.prototype.hasOwnProperty,e=Math.abs,n=Math.floor;v.exports=function(o){var c,l,_,E;if(!i(o))return f.apply(this,arguments);for(l=a(d(this).length),_=arguments[1],isNaN(_)?_=0:_>=0?_=n(_):_=a(this.length)-n(e(_)),c=_;c=55296&&j<=56319&&(g+=O[++C])),g=m?l.call(m,P,g,T):g,R?(_.value=g,E(A,T,_)):A[T]=g,++T;S=T}}if(S===void 0)for(S=f(O.length),R&&(A=new R(S)),C=0;C0?1:-1}},{}],29:[function(s,v,x){v.exports=s("./is-implemented")()?Number.isNaN:s("./shim")},{"./is-implemented":30,"./shim":31}],30:[function(s,v,x){v.exports=function(){var i=Number.isNaN;return typeof i!="function"?!1:!i({})&&i(NaN)&&!i(34)}},{}],31:[function(s,v,x){v.exports=function(i){return i!==i}},{}],32:[function(s,v,x){var i=s("../math/sign"),a=Math.abs,d=Math.floor;v.exports=function(f){return isNaN(f)?0:(f=Number(f),f===0||!isFinite(f)?f:i(f)*d(a(f)))}},{"../math/sign":26}],33:[function(s,v,x){var i=s("./to-integer"),a=Math.max;v.exports=function(d){return a(0,i(d))}},{"./to-integer":32}],34:[function(s,v,x){var i=s("./valid-callable"),a=s("./valid-value"),d=Function.prototype.bind,f=Function.prototype.call,u=Object.keys,e=Object.prototype.propertyIsEnumerable;v.exports=function(n,o){return function(c,l){var _,E=arguments[2],O=arguments[3];return c=Object(a(c)),i(l),_=u(c),O&&_.sort(typeof O=="function"?d.call(O,c):void 0),typeof n!="function"&&(n=_[n]),f.call(n,_,function(m,P){return e.call(c,m)?f.call(l,E,c[m],m,c,P):o})}}},{"./valid-callable":53,"./valid-value":54}],35:[function(s,v,x){v.exports=s("./is-implemented")()?Object.assign:s("./shim")},{"./is-implemented":36,"./shim":37}],36:[function(s,v,x){v.exports=function(){var i=Object.assign,a;return typeof i!="function"?!1:(a={foo:"raz"},i(a,{bar:"dwa"},{trzy:"trzy"}),a.foo+a.bar+a.trzy==="razdwatrzy")}},{}],37:[function(s,v,x){var i=s("../keys"),a=s("../valid-value"),d=Math.max;v.exports=function(f,u){var e,n,o=d(arguments.length,2),c;for(f=Object(a(f)),c=function(l){try{f[l]=u[l]}catch(_){e||(e=_)}},n=1;n-1}},{}],58:[function(s,v,x){var i=Object.prototype.toString,a=i.call("");v.exports=function(d){return typeof d=="string"||d&&typeof d=="object"&&(d instanceof String||i.call(d)===a)||!1}},{}],59:[function(s,v,x){var i=s("es5-ext/object/set-prototype-of"),a=s("es5-ext/string/#/contains"),d=s("d"),f=s("es6-symbol"),u=s("./"),e=Object.defineProperty,n;n=v.exports=function(o,c){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");u.call(this,o),c?a.call(c,"key+value")?c="key+value":a.call(c,"key")?c="key":c="value":c="value",e(this,"__kind__",d("",c))},i&&i(n,u),delete n.prototype.constructor,n.prototype=Object.create(u.prototype,{_resolve:d(function(o){return this.__kind__==="value"?this.__list__[o]:this.__kind__==="key+value"?[o,this.__list__[o]]:o})}),e(n.prototype,f.toStringTag,d("c","Array Iterator"))},{"./":62,d:15,"es5-ext/object/set-prototype-of":50,"es5-ext/string/#/contains":55,"es6-symbol":72}],60:[function(s,v,x){var i=s("es5-ext/function/is-arguments"),a=s("es5-ext/object/valid-callable"),d=s("es5-ext/string/is-string"),f=s("./get"),u=Array.isArray,e=Function.prototype.call,n=Array.prototype.some;v.exports=function(o,c){var l,_=arguments[2],E,O,m,P,R,C,T;if(u(o)||i(o)?l="array":d(o)?l="string":o=f(o),a(c),O=function(){m=!0},l==="array"){n.call(o,function(A){return e.call(c,_,A,O),m});return}if(l==="string"){for(R=o.length,P=0;P=55296&&T<=56319&&(C+=o[++P])),e.call(c,_,C,O),!m);++P);return}for(E=o.next();!E.done;){if(e.call(c,_,E.value,O),m)return;E=o.next()}}},{"./get":61,"es5-ext/function/is-arguments":23,"es5-ext/object/valid-callable":53,"es5-ext/string/is-string":58}],61:[function(s,v,x){var i=s("es5-ext/function/is-arguments"),a=s("es5-ext/string/is-string"),d=s("./array"),f=s("./string"),u=s("./valid-iterable"),e=s("es6-symbol").iterator;v.exports=function(n){return typeof u(n)[e]=="function"?n[e]():i(n)?new d(n):a(n)?new f(n):new d(n)}},{"./array":59,"./string":64,"./valid-iterable":65,"es5-ext/function/is-arguments":23,"es5-ext/string/is-string":58,"es6-symbol":72}],62:[function(s,v,x){var i=s("es5-ext/array/#/clear"),a=s("es5-ext/object/assign"),d=s("es5-ext/object/valid-callable"),f=s("es5-ext/object/valid-value"),u=s("d"),e=s("d/auto-bind"),n=s("es6-symbol"),o=Object.defineProperty,c=Object.defineProperties,l;v.exports=l=function(_,E){if(!(this instanceof l))throw new TypeError("Constructor requires 'new'");c(this,{__list__:u("w",f(_)),__context__:u("w",E),__nextIndex__:u("w",0)}),E&&(d(E.on),E.on("_add",this._onAdd),E.on("_delete",this._onDelete),E.on("_clear",this._onClear))},delete l.prototype.constructor,c(l.prototype,a({_next:u(function(){var _;if(!!this.__list__){if(this.__redo__&&(_=this.__redo__.shift(),_!==void 0))return _;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){o(this,"__redo__",u("c",[_]));return}this.__redo__.forEach(function(E,O){E>=_&&(this.__redo__[O]=++E)},this),this.__redo__.push(_)}}),_onDelete:u(function(_){var E;_>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(E=this.__redo__.indexOf(_),E!==-1&&this.__redo__.splice(E,1),this.__redo__.forEach(function(O,m){O>_&&(this.__redo__[m]=--O)},this)))}),_onClear:u(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),o(l.prototype,n.iterator,u(function(){return this}))},{d:15,"d/auto-bind":14,"es5-ext/array/#/clear":18,"es5-ext/object/assign":35,"es5-ext/object/valid-callable":53,"es5-ext/object/valid-value":54,"es6-symbol":72}],63:[function(s,v,x){var i=s("es5-ext/function/is-arguments"),a=s("es5-ext/object/is-value"),d=s("es5-ext/string/is-string"),f=s("es6-symbol").iterator,u=Array.isArray;v.exports=function(e){return a(e)?u(e)||d(e)||i(e)?!0:typeof e[f]=="function":!1}},{"es5-ext/function/is-arguments":23,"es5-ext/object/is-value":43,"es5-ext/string/is-string":58,"es6-symbol":72}],64:[function(s,v,x){var i=s("es5-ext/object/set-prototype-of"),a=s("d"),d=s("es6-symbol"),f=s("./"),u=Object.defineProperty,e;e=v.exports=function(n){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");n=String(n),f.call(this,n),u(this,"__length__",a("",n.length))},i&&i(e,f),delete e.prototype.constructor,e.prototype=Object.create(f.prototype,{_next:a(function(){if(!!this.__list__){if(this.__nextIndex__=55296&&c<=56319?o+this.__list__[this.__nextIndex__++]:o)})}),u(e.prototype,d.toStringTag,a("c","String Iterator"))},{"./":62,d:15,"es5-ext/object/set-prototype-of":50,"es6-symbol":72}],65:[function(s,v,x){var i=s("./is-iterable");v.exports=function(a){if(!i(a))throw new TypeError(a+" is not iterable");return a}},{"./is-iterable":63}],66:[function(s,v,x){v.exports=s("./is-implemented")()?Map:s("./polyfill")},{"./is-implemented":67,"./polyfill":71}],67:[function(s,v,x){v.exports=function(){var i,a,d;if(typeof Map!="function")return!1;try{i=new Map([["raz","one"],["dwa","two"],["trzy","three"]])}catch{return!1}return!(String(i)!=="[object Map]"||i.size!==3||typeof i.clear!="function"||typeof i.delete!="function"||typeof i.entries!="function"||typeof i.forEach!="function"||typeof i.get!="function"||typeof i.has!="function"||typeof i.keys!="function"||typeof i.set!="function"||typeof i.values!="function"||(a=i.entries(),d=a.next(),d.done!==!1)||!d.value||d.value[0]!=="raz"||d.value[1]!=="one")}},{}],68:[function(s,v,x){v.exports=function(){return typeof Map>"u"?!1:Object.prototype.toString.call(new Map)==="[object Map]"}()},{}],69:[function(s,v,x){v.exports=s("es5-ext/object/primitive-set")("key","value","key+value")},{"es5-ext/object/primitive-set":49}],70:[function(s,v,x){var i=s("es5-ext/object/set-prototype-of"),a=s("d"),d=s("es6-iterator"),f=s("es6-symbol").toStringTag,u=s("./iterator-kinds"),e=Object.defineProperties,n=d.prototype._unBind,o;o=v.exports=function(c,l){if(!(this instanceof o))return new o(c,l);d.call(this,c.__mapKeysData__,c),(!l||!u[l])&&(l="key+value"),e(this,{__kind__:a("",l),__values__:a("w",c.__mapValuesData__)})},i&&i(o,d),o.prototype=Object.create(d.prototype,{constructor:a(o),_resolve:a(function(c){return this.__kind__==="value"?this.__values__[c]:this.__kind__==="key"?this.__list__[c]:[this.__list__[c],this.__values__[c]]}),_unBind:a(function(){this.__values__=null,n.call(this)}),toString:a(function(){return"[object Map Iterator]"})}),Object.defineProperty(o.prototype,f,a("c","Map Iterator"))},{"./iterator-kinds":69,d:15,"es5-ext/object/set-prototype-of":50,"es6-iterator":62,"es6-symbol":72}],71:[function(s,v,x){var i=s("es5-ext/array/#/clear"),a=s("es5-ext/array/#/e-index-of"),d=s("es5-ext/object/set-prototype-of"),f=s("es5-ext/object/valid-callable"),u=s("es5-ext/object/valid-value"),e=s("d"),n=s("event-emitter"),o=s("es6-symbol"),c=s("es6-iterator/valid-iterable"),l=s("es6-iterator/for-of"),_=s("./lib/iterator"),E=s("./is-native-implemented"),O=Function.prototype.call,m=Object.defineProperties,P=Object.getPrototypeOf,R;v.exports=R=function(){var C=arguments[0],T,A,S;if(!(this instanceof R))throw new TypeError("Constructor requires 'new'");return E&&d&&Map!==R?S=d(new Map,P(this)):S=this,C!=null&&c(C),m(S,{__mapKeysData__:e("c",T=[]),__mapValuesData__:e("c",A=[])}),C&&l(C,function(j){var W=u(j)[0];j=j[1],a.call(T,W)===-1&&(T.push(W),A.push(j))},S),S},E&&(d&&d(R,Map),R.prototype=Object.create(Map.prototype,{constructor:e(R)})),n(m(R.prototype,{clear:e(function(){!this.__mapKeysData__.length||(i.call(this.__mapKeysData__),i.call(this.__mapValuesData__),this.emit("_clear"))}),delete:e(function(C){var T=a.call(this.__mapKeysData__,C);return T===-1?!1:(this.__mapKeysData__.splice(T,1),this.__mapValuesData__.splice(T,1),this.emit("_delete",T,C),!0)}),entries:e(function(){return new _(this,"key+value")}),forEach:e(function(C){var T=arguments[1],A,S;for(f(C),A=this.entries(),S=A._next();S!==void 0;)O.call(C,T,this.__mapValuesData__[S],this.__mapKeysData__[S],this),S=A._next()}),get:e(function(C){var T=a.call(this.__mapKeysData__,C);if(T!==-1)return this.__mapValuesData__[T]}),has:e(function(C){return a.call(this.__mapKeysData__,C)!==-1}),keys:e(function(){return new _(this,"key")}),set:e(function(C,T){var A=a.call(this.__mapKeysData__,C),S;return A===-1&&(A=this.__mapKeysData__.push(C)-1,S=!0),this.__mapValuesData__[A]=T,S&&this.emit("_add",A,C),this}),size:e.gs(function(){return this.__mapKeysData__.length}),values:e(function(){return new _(this,"value")}),toString:e(function(){return"[object Map]"})})),Object.defineProperty(R.prototype,o.iterator,e(function(){return this.entries()})),Object.defineProperty(R.prototype,o.toStringTag,e("c","Map"))},{"./is-native-implemented":68,"./lib/iterator":70,d:15,"es5-ext/array/#/clear":18,"es5-ext/array/#/e-index-of":19,"es5-ext/object/set-prototype-of":50,"es5-ext/object/valid-callable":53,"es5-ext/object/valid-value":54,"es6-iterator/for-of":60,"es6-iterator/valid-iterable":65,"es6-symbol":72,"event-emitter":77}],72:[function(s,v,x){v.exports=s("./is-implemented")()?Symbol:s("./polyfill")},{"./is-implemented":73,"./polyfill":75}],73:[function(s,v,x){var i={object:!0,symbol:!0};v.exports=function(){var a;if(typeof Symbol!="function")return!1;a=Symbol("test symbol");try{String(a)}catch{return!1}return!(!i[typeof Symbol.iterator]||!i[typeof Symbol.toPrimitive]||!i[typeof Symbol.toStringTag])}},{}],74:[function(s,v,x){v.exports=function(i){return i?typeof i=="symbol"?!0:!i.constructor||i.constructor.name!=="Symbol"?!1:i[i.constructor.toStringTag]==="Symbol":!1}},{}],75:[function(s,v,x){var i=s("d"),a=s("./validate-symbol"),d=Object.create,f=Object.defineProperties,u=Object.defineProperty,e=Object.prototype,n,o,c,l=d(null),_;if(typeof Symbol=="function"){n=Symbol;try{String(n()),_=!0}catch{}}var E=function(){var O=d(null);return function(m){for(var P=0,R,C;O[m+(P||"")];)++P;return m+=P||"",O[m]=!0,R="@@"+m,u(e,R,i.gs(null,function(T){C||(C=!0,u(this,R,i(T)),C=!1)})),R}}();c=function(m){if(this instanceof c)throw new TypeError("Symbol is not a constructor");return o(m)},v.exports=o=function O(m){var P;if(this instanceof O)throw new TypeError("Symbol is not a constructor");return _?n(m):(P=d(c.prototype),m=m===void 0?"":String(m),f(P,{__description__:i("",m),__name__:i("",E(m))}))},f(o,{for:i(function(O){return l[O]?l[O]:l[O]=o(String(O))}),keyFor:i(function(O){var m;a(O);for(m in l)if(l[m]===O)return m}),hasInstance:i("",n&&n.hasInstance||o("hasInstance")),isConcatSpreadable:i("",n&&n.isConcatSpreadable||o("isConcatSpreadable")),iterator:i("",n&&n.iterator||o("iterator")),match:i("",n&&n.match||o("match")),replace:i("",n&&n.replace||o("replace")),search:i("",n&&n.search||o("search")),species:i("",n&&n.species||o("species")),split:i("",n&&n.split||o("split")),toPrimitive:i("",n&&n.toPrimitive||o("toPrimitive")),toStringTag:i("",n&&n.toStringTag||o("toStringTag")),unscopables:i("",n&&n.unscopables||o("unscopables"))}),f(c.prototype,{constructor:i(o),toString:i("",function(){return this.__name__})}),f(o.prototype,{toString:i(function(){return"Symbol ("+a(this).__description__+")"}),valueOf:i(function(){return a(this)})}),u(o.prototype,o.toPrimitive,i("",function(){var O=a(this);return typeof O=="symbol"?O:O.toString()})),u(o.prototype,o.toStringTag,i("c","Symbol")),u(c.prototype,o.toStringTag,i("c",o.prototype[o.toStringTag])),u(c.prototype,o.toPrimitive,i("c",o.prototype[o.toPrimitive]))},{"./validate-symbol":76,d:15}],76:[function(s,v,x){var i=s("./is-symbol");v.exports=function(a){if(!i(a))throw new TypeError(a+" is not a symbol");return a}},{"./is-symbol":74}],77:[function(s,v,x){var i=s("d"),a=s("es5-ext/object/valid-callable"),d=Function.prototype.apply,f=Function.prototype.call,u=Object.create,e=Object.defineProperty,n=Object.defineProperties,o=Object.prototype.hasOwnProperty,c={configurable:!0,enumerable:!1,writable:!0},l,_,E,O,m,P,R;l=function(C,T){var A;return a(T),o.call(this,"__ee__")?A=this.__ee__:(A=c.value=u(null),e(this,"__ee__",c),c.value=null),A[C]?typeof A[C]=="object"?A[C].push(T):A[C]=[A[C],T]:A[C]=T,this},_=function(C,T){var A,S;return a(T),S=this,l.call(this,C,A=function(){E.call(S,C,A),d.call(T,this,arguments)}),A.__eeOnceListener__=T,this},E=function(C,T){var A,S,j,W;if(a(T),!o.call(this,"__ee__"))return this;if(A=this.__ee__,!A[C])return this;if(S=A[C],typeof S=="object")for(W=0;j=S[W];++W)(j===T||j.__eeOnceListener__===T)&&(S.length===2?A[C]=S[W?0:1]:S.splice(W,1));else(S===T||S.__eeOnceListener__===T)&&delete A[C];return this},O=function(C){var T,A,S,j,W;if(!!o.call(this,"__ee__")&&(j=this.__ee__[C],!!j))if(typeof j=="object"){for(A=arguments.length,W=new Array(A-1),T=1;T1&&(F=arguments[1]),F instanceof Error)throw F;var re=new Error('Unhandled "error" event. ('+F+")");throw re.context=F,re}if(V=z[D],!V)return!1;var B=typeof V=="function";switch(Z=arguments.length,Z){case 1:c(V,B,this);break;case 2:l(V,B,this,arguments[1]);break;case 3:_(V,B,this,arguments[1],arguments[2]);break;case 4:E(V,B,this,arguments[1],arguments[2],arguments[3]);break;default:for(K=new Array(Z-1),Q=1;Q0&&Q.length>Z)){Q.warned=!0;var z=new Error("Possible EventEmitter memory leak detected. "+Q.length+' "'+String(D)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');z.name="MaxListenersExceededWarning",z.emitter=g,z.type=D,z.count=Q.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",z.name,z.message)}return g}f.prototype.addListener=function(D,F){return m(this,D,F,!1)},f.prototype.on=f.prototype.addListener,f.prototype.prependListener=function(D,F){return m(this,D,F,!0)};function P(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var g=new Array(arguments.length),D=0;D=0;Q--)if(V[Q]===F||V[Q].listener===F){z=V[Q].listener,K=Q;break}if(K<0)return this;K===0?V.shift():A(V,K),V.length===1&&(Z[D]=V[0]),Z.removeListener&&this.emit("removeListener",D,z||F)}return this},f.prototype.removeAllListeners=function(D){var F,V,Z;if(V=this._events,!V)return this;if(!V.removeListener)return arguments.length===0?(this._events=i(null),this._eventsCount=0):V[D]&&(--this._eventsCount===0?this._events=i(null):delete V[D]),this;if(arguments.length===0){var K=a(V),Q;for(Z=0;Z=0;Z--)this.removeListener(D,F[Z]);return this};function C(g,D,F){var V=g._events;if(!V)return[];var Z=V[D];return Z?typeof Z=="function"?F?[Z.listener||Z]:[Z]:F?j(Z):S(Z,Z.length):[]}f.prototype.listeners=function(D){return C(this,D,!0)},f.prototype.rawListeners=function(D){return C(this,D,!1)},f.listenerCount=function(g,D){return typeof g.listenerCount=="function"?g.listenerCount(D):T.call(g,D)},f.prototype.listenerCount=T;function T(g){var D=this._events;if(D){var F=D[g];if(typeof F=="function")return 1;if(F)return F.length}return 0}f.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};function A(g,D){for(var F=D,V=F+1,Z=g.length;V>1,_=-7,E=d?u-1:0,O=d?-1:1,m=i[a+E];for(E+=O,e=m&(1<<-_)-1,m>>=-_,_+=o;_>0;e=e*256+i[a+E],E+=O,_-=8);for(n=e&(1<<-_)-1,e>>=-_,_+=f;_>0;n=n*256+i[a+E],E+=O,_-=8);if(e===0)e=1-l;else{if(e===c)return n?NaN:(m?-1:1)*(1/0);n=n+Math.pow(2,f),e=e-l}return(m?-1:1)*n*Math.pow(2,e-f)},x.write=function(i,a,d,f,u,e){var n,o,c,l=e*8-u-1,_=(1<>1,O=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=f?0:e-1,P=f?1:-1,R=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(o=isNaN(a)?1:0,n=_):(n=Math.floor(Math.log(a)/Math.LN2),a*(c=Math.pow(2,-n))<1&&(n--,c*=2),n+E>=1?a+=O/c:a+=O*Math.pow(2,1-E),a*c>=2&&(n++,c/=2),n+E>=_?(o=0,n=_):n+E>=1?(o=(a*c-1)*Math.pow(2,u),n=n+E):(o=a*Math.pow(2,E-1)*Math.pow(2,u),n=0));u>=8;i[d+m]=o&255,m+=P,o/=256,u-=8);for(n=n<0;i[d+m]=n&255,m+=P,n/=256,l-=8);i[d+m-P]|=R*128}},{}],80:[function(s,v,x){typeof Object.create=="function"?v.exports=function(a,d){a.super_=d,a.prototype=Object.create(d.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:v.exports=function(a,d){a.super_=d;var f=function(){};f.prototype=d.prototype,a.prototype=new f,a.prototype.constructor=a}},{}],81:[function(s,v,x){v.exports=function(d){return d!=null&&(i(d)||a(d)||!!d._isBuffer)};function i(d){return!!d.constructor&&typeof d.constructor.isBuffer=="function"&&d.constructor.isBuffer(d)}function a(d){return typeof d.readFloatLE=="function"&&typeof d.slice=="function"&&i(d.slice(0,0))}},{}],82:[function(s,v,x){var i={}.toString;v.exports=Array.isArray||function(a){return i.call(a)=="[object Array]"}},{}],83:[function(s,v,x){var i=s("safe-buffer").Buffer,a=v.exports;a.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"reserved"},a.codes={};for(var d in a.types){var f=a.types[d];a.codes[f]=d}a.CMD_SHIFT=4,a.CMD_MASK=240,a.DUP_MASK=8,a.QOS_MASK=3,a.QOS_SHIFT=1,a.RETAIN_MASK=1,a.LENGTH_MASK=127,a.LENGTH_FIN_MASK=128,a.SESSIONPRESENT_MASK=1,a.SESSIONPRESENT_HEADER=i.from([a.SESSIONPRESENT_MASK]),a.CONNACK_HEADER=i.from([a.codes.connack<>8,0),n.writeUInt8(e&255,0+1),n}function u(){for(var e=0;e0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,this._stateCounter>=this._states.length&&(this._stateCounter=0);return this._list.length},e.prototype._parseHeader=function(){var n=this._list.readUInt8(0);return this.packet.cmd=u.types[n>>u.CMD_SHIFT],this.packet.retain=(n&u.RETAIN_MASK)!==0,this.packet.qos=n>>u.QOS_SHIFT&u.QOS_MASK,this.packet.dup=(n&u.DUP_MASK)!==0,this._list.consume(1),!0},e.prototype._parseLength=function(){for(var n=0,o=1,c=0,l=!0,_;n<5&&(_=this._list.readUInt8(n++),c+=o*(_&u.LENGTH_MASK),o*=128,(_&u.LENGTH_FIN_MASK)!==0);)if(this._list.length<=n){l=!1;break}return l&&(this.packet.length=c,this._list.consume(n)),l},e.prototype._parsePayload=function(){var n=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseMessageId();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":case"disconnect":break;default:this._emitError(new Error("Not supported"))}n=!0}return n},e.prototype._parseConnect=function(){var n,o,c,l,_,E,O={},m=this.packet;if(n=this._parseString(),n===null)return this._emitError(new Error("Cannot parse protocolId"));if(n!=="MQTT"&&n!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(m.protocolId=n,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(m.protocolVersion=this._list.readUInt8(this._pos),m.protocolVersion!==3&&m.protocolVersion!==4)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(O.username=this._list.readUInt8(this._pos)&u.USERNAME_MASK,O.password=this._list.readUInt8(this._pos)&u.PASSWORD_MASK,O.will=this._list.readUInt8(this._pos)&u.WILL_FLAG_MASK,O.will&&(m.will={},m.will.retain=(this._list.readUInt8(this._pos)&u.WILL_RETAIN_MASK)!==0,m.will.qos=(this._list.readUInt8(this._pos)&u.WILL_QOS_MASK)>>u.WILL_QOS_SHIFT),m.clean=(this._list.readUInt8(this._pos)&u.CLEAN_SESSION_MASK)!==0,this._pos++,m.keepalive=this._parseNum(),m.keepalive===-1)return this._emitError(new Error("Packet too short"));if(o=this._parseString(),o===null)return this._emitError(new Error("Packet too short"));if(m.clientId=o,O.will){if(c=this._parseString(),c===null)return this._emitError(new Error("Cannot parse will topic"));if(m.will.topic=c,l=this._parseBuffer(),l===null)return this._emitError(new Error("Cannot parse will payload"));m.will.payload=l}if(O.username){if(E=this._parseString(),E===null)return this._emitError(new Error("Cannot parse username"));m.username=E}if(O.password){if(_=this._parseBuffer(),_===null)return this._emitError(new Error("Cannot parse password"));m.password=_}return m},e.prototype._parseConnack=function(){var n=this.packet;if(this._list.length<2)return null;if(n.sessionPresent=!!(this._list.readUInt8(this._pos++)&u.SESSIONPRESENT_MASK),n.returnCode=this._list.readUInt8(this._pos),n.returnCode===-1)return this._emitError(new Error("Cannot parse return code"))},e.prototype._parsePublish=function(){var n=this.packet;if(n.topic=this._parseString(),n.topic===null)return this._emitError(new Error("Cannot parse topic"));n.qos>0&&!this._parseMessageId()||(n.payload=this._list.slice(this._pos,n.length))},e.prototype._parseSubscribe=function(){var n=this.packet,o,c;if(n.qos!==1)return this._emitError(new Error("Wrong subscribe header"));if(n.subscriptions=[],!!this._parseMessageId())for(;this._posthis._list.length||l>this.packet.length?null:(c=this._list.toString("utf8",this._pos,l),this._pos+=o,c)},e.prototype._parseBuffer=function(){var n=this._parseNum(),o,c=n+this._pos;return n===-1||c>this._list.length||c>this.packet.length?null:(o=this._list.slice(this._pos,c),this._pos+=n,o)},e.prototype._parseNum=function(){if(this._list.length-this._pos<2)return-1;var n=this._list.readUInt16BE(this._pos);return this._pos+=2,n},e.prototype._newPacket=function(){return this.packet&&(this._list.consume(this.packet.length),this.emit("packet",this.packet)),this.packet=new f,!0},e.prototype._emitError=function(n){this.error=n,this.emit("error",n)},v.exports=e},{"./constants":83,"./packet":87,bl:10,events:78,inherits:80}],89:[function(s,v,x){var i=s("./constants"),a=s("safe-buffer").Buffer,d=a.allocUnsafe(0),f=a.from([0]),u=s("./numbers"),e=s("process-nextick-args").nextTick,n=u.cache,o=u.generateNumber,c=u.generateCache,l=F,_=!0;function E(z,N){switch(N.cork&&(N.cork(),e(O,N)),_&&(_=!1,c()),z.cmd){case"connect":return m(z,N);case"connack":return P(z,N);case"publish":return R(z,N);case"puback":case"pubrec":case"pubrel":case"pubcomp":case"unsuback":return C(z,N);case"subscribe":return T(z,N);case"suback":return A(z,N);case"unsubscribe":return S(z,N);case"pingreq":case"pingresp":case"disconnect":return j(z,N);default:return N.emit("error",new Error("Unknown command")),!1}}Object.defineProperty(E,"cacheNumbers",{get:function(){return l===F},set:function(z){z?((!n||Object.keys(n).length===0)&&(_=!0),l=F):(_=!1,l=V)}});function O(z){z.uncork()}function m(z,N){var re=z||{},B=re.protocolId||"MQTT",k=re.protocolVersion||4,p=re.will,I=re.clean,U=re.keepalive||0,$=re.clientId||"",H=re.username,J=re.password;I===void 0&&(I=!0);var te=0;if(!B||typeof B!="string"&&!a.isBuffer(B))return N.emit("error",new Error("Invalid protocolId")),!1;if(te+=B.length+2,k!==3&&k!==4)return N.emit("error",new Error("Invalid protocol version")),!1;if(te+=1,(typeof $=="string"||a.isBuffer($))&&($||k===4)&&($||I))te+=$.length+2;else{if(k<4)return N.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(I*1===0)return N.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof U!="number"||U<0||U>65535||U%1!==0)return N.emit("error",new Error("Invalid keepalive")),!1;if(te+=2,te+=1,p){if(typeof p!="object")return N.emit("error",new Error("Invalid will")),!1;if(!p.topic||typeof p.topic!="string")return N.emit("error",new Error("Invalid will topic")),!1;if(te+=a.byteLength(p.topic)+2,p.payload&&p.payload)if(p.payload.length>=0)typeof p.payload=="string"?te+=a.byteLength(p.payload)+2:te+=p.payload.length+2;else return N.emit("error",new Error("Invalid will payload")),!1;else te+=2}var ne=!1;if(H!=null)if(Q(H))ne=!0,te+=a.byteLength(H)+2;else return N.emit("error",new Error("Invalid username")),!1;if(J!=null){if(!ne)return N.emit("error",new Error("Username is required to use password")),!1;if(Q(J))te+=K(J)+2;else return N.emit("error",new Error("Invalid password")),!1}N.write(i.CONNECT_HEADER),g(N,te),Z(N,B),N.write(k===4?i.VERSION4:i.VERSION3);var ie=0;return ie|=H!=null?i.USERNAME_MASK:0,ie|=J!=null?i.PASSWORD_MASK:0,ie|=p&&p.retain?i.WILL_RETAIN_MASK:0,ie|=p&&p.qos?p.qos<0&&l(N,U),N.write(I))}function C(z,N){var re=z||{},B=re.cmd||"puback",k=re.messageId,p=re.dup&&B==="pubrel"?i.DUP_MASK:0,I=0;return B==="pubrel"&&(I=1),typeof k!="number"?(N.emit("error",new Error("Invalid messageId")),!1):(N.write(i.ACKS[B][I][p][0]),g(N,2),l(N,k))}function T(z,N){var re=z||{},B=re.dup?i.DUP_MASK:0,k=re.messageId,p=re.subscriptions,I=0;if(typeof k!="number")return N.emit("error",new Error("Invalid messageId")),!1;if(I+=2,typeof p=="object"&&p.length)for(var U=0;U=0&&z<128?1:z>=128&&z<16384?2:z>=16384&&z<2097152?3:z>=2097152&&z<268435456?4:0}function M(z){var N=0,re=0,B=a.allocUnsafe(W(z));do N=z%128|0,z=z/128|0,z>0&&(N=N|128),B.writeUInt8(N,re++);while(z>0);return B}var ee={};function g(z,N){var re=ee[N];re||(re=M(N),N<16384&&(ee[N]=re)),z.write(re)}function D(z,N){var re=a.byteLength(N);l(z,re),z.write(N,"utf8")}function F(z,N){return z.write(n[N])}function V(z,N){return z.write(o(N))}function Z(z,N){typeof N=="string"?D(z,N):N?(l(z,N.length),z.write(N)):l(z,0)}function K(z){return z?z instanceof a?z.length:a.byteLength(z):0}function Q(z){return typeof z=="string"||z instanceof a}v.exports=E},{"./constants":83,"./numbers":86,"process-nextick-args":91,"safe-buffer":108}],90:[function(s,v,x){var i=s("wrappy");v.exports=i(a),v.exports.strict=i(d),a.proto=a(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return a(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return d(this)},configurable:!0})});function a(f){var u=function(){return u.called?u.value:(u.called=!0,u.value=f.apply(this,arguments))};return u.called=!1,u}function d(f){var u=function(){if(u.called)throw new Error(u.onceError);return u.called=!0,u.value=f.apply(this,arguments)},e=f.name||"Function wrapped with `once`";return u.onceError=e+" shouldn't be called more than once",u.called=!1,u}},{wrappy:119}],91:[function(s,v,x){(function(i){!i.version||i.version.indexOf("v0.")===0||i.version.indexOf("v1.")===0&&i.version.indexOf("v1.8.")!==0?v.exports={nextTick:a}:v.exports=i;function a(d,f,u,e){if(typeof d!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,o,c;switch(n){case 0:case 1:return i.nextTick(d);case 2:return i.nextTick(function(){d.call(null,f)});case 3:return i.nextTick(function(){d.call(null,f,u)});case 4:return i.nextTick(function(){d.call(null,f,u,e)});default:for(o=new Array(n-1),c=0;c1)for(var T=1;T= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=o-c,j=Math.floor,W=String.fromCharCode,M;function ee(k){throw new RangeError(A[k])}function g(k,p){for(var I=k.length,U=[];I--;)U[I]=p(k[I]);return U}function D(k,p){var I=k.split("@"),U="";I.length>1&&(U=I[0]+"@",k=I[1]),k=k.replace(T,".");var $=k.split("."),H=g($,p).join(".");return U+H}function F(k){for(var p=[],I=0,U=k.length,$,H;I=55296&&$<=56319&&I65535&&(p-=65536,I+=W(p>>>10&1023|55296),p=56320|p&1023),I+=W(p),I}).join("")}function Z(k){return k-48<10?k-22:k-65<26?k-65:k-97<26?k-97:o}function K(k,p){return k+22+75*(k<26)-((p!=0)<<5)}function Q(k,p,I){var U=0;for(k=I?j(k/E):k>>1,k+=j(k/p);k>S*l>>1;U+=o)k=j(k/S);return j(U+(S+1)*k/(k+_))}function z(k){var p=[],I=k.length,U,$=0,H=m,J=O,te,ne,ie,y,w,G,Y,oe,h;for(te=k.lastIndexOf(P),te<0&&(te=0),ne=0;ne=128&&ee("not-basic"),p.push(k.charCodeAt(ne));for(ie=te>0?te+1:0;ie=I&&ee("invalid-input"),Y=Z(k.charCodeAt(ie++)),(Y>=o||Y>j((n-$)/w))&&ee("overflow"),$+=Y*w,oe=G<=J?c:G>=J+l?l:G-J,!(Yj(n/h)&&ee("overflow"),w*=h;U=p.length+1,J=Q($-y,U,y==0),j($/U)>n-H&&ee("overflow"),H+=j($/U),$%=U,p.splice($++,0,H)}return V(p)}function N(k){var p,I,U,$,H,J,te,ne,ie,y,w,G=[],Y,oe,h,t;for(k=F(k),Y=k.length,p=m,I=0,H=O,J=0;J=p&&wj((n-I)/oe)&&ee("overflow"),I+=(te-p)*oe,p=te,J=0;Jn&&ee("overflow"),w==p){for(ne=I,ie=o;y=ie<=H?c:ie>=H+l?l:ie-H,!(ne0&&l>c&&(l=c);for(var _=0;_=0?(m=E.substr(0,O),P=E.substr(O+1)):(m=E,P=""),R=decodeURIComponent(m),C=decodeURIComponent(P),i(n,R)?a(n[R])?n[R].push(C):n[R]=[n[R],C]:n[R]=C}return n};var a=Array.isArray||function(d){return Object.prototype.toString.call(d)==="[object Array]"}},{}],95:[function(s,v,x){var i=function(u){switch(typeof u){case"string":return u;case"boolean":return u?"true":"false";case"number":return isFinite(u)?u:"";default:return""}};v.exports=function(u,e,n,o){return e=e||"&",n=n||"=",u===null&&(u=void 0),typeof u=="object"?d(f(u),function(c){var l=encodeURIComponent(i(c))+n;return a(u[c])?d(u[c],function(_){return l+encodeURIComponent(i(_))}).join(e):l+encodeURIComponent(i(u[c]))}).join(e):o?encodeURIComponent(i(o))+n+encodeURIComponent(i(u)):""};var a=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"};function d(u,e){if(u.map)return u.map(e);for(var n=[],o=0;o0?(typeof w!="string"&&!h.objectMode&&Object.getPrototypeOf(w)!==o.prototype&&(w=l(w)),Y?h.endEmitted?y.emit("error",new Error("stream.unshift() after end event")):M(y,h,w,!0):h.ended?y.emit("error",new Error("stream.push() after EOF")):(h.reading=!1,h.decoder&&!G?(w=h.decoder.write(w),h.objectMode||w.length!==0?M(y,h,w,!1):z(y,h)):M(y,h,w,!1))):Y||(h.reading=!1)}return g(h)}function M(y,w,G,Y){w.flowing&&w.length===0&&!w.sync?(y.emit("data",G),y.read(0)):(w.length+=w.objectMode?1:G.length,Y?w.buffer.unshift(G):w.buffer.push(G),w.needReadable&&K(y)),z(y,w)}function ee(y,w){var G;return!_(w)&&typeof w!="string"&&w!==void 0&&!y.objectMode&&(G=new TypeError("Invalid non-string/buffer chunk")),G}function g(y){return!y.ended&&(y.needReadable||y.length=D?y=D:(y--,y|=y>>>1,y|=y>>>2,y|=y>>>4,y|=y>>>8,y|=y>>>16,y++),y}function V(y,w){return y<=0||w.length===0&&w.ended?0:w.objectMode?1:y!==y?w.flowing&&w.length?w.buffer.head.data.length:w.length:(y>w.highWaterMark&&(w.highWaterMark=F(y)),y<=w.length?y:w.ended?w.length:(w.needReadable=!0,0))}j.prototype.read=function(y){m("read",y),y=parseInt(y,10);var w=this._readableState,G=y;if(y!==0&&(w.emittedReadable=!1),y===0&&w.needReadable&&(w.length>=w.highWaterMark||w.ended))return m("read: emitReadable",w.length,w.ended),w.length===0&&w.ended?te(this):K(this),null;if(y=V(y,w),y===0&&w.ended)return w.length===0&&te(this),null;var Y=w.needReadable;m("need readable",Y),(w.length===0||w.length-y0?oe=U(y,w):oe=null,oe===null?(w.needReadable=!0,y=0):w.length-=y,w.length===0&&(w.ended||(w.needReadable=!0),G!==y&&w.ended&&te(this)),oe!==null&&this.emit("data",oe),oe};function Z(y,w){if(!w.ended){if(w.decoder){var G=w.decoder.end();G&&G.length&&(w.buffer.push(G),w.length+=w.objectMode?1:G.length)}w.ended=!0,K(y)}}function K(y){var w=y._readableState;w.needReadable=!1,w.emittedReadable||(m("emitReadable",w.flowing),w.emittedReadable=!0,w.sync?d.nextTick(Q,y):Q(y))}function Q(y){m("emit readable"),y.emit("readable"),I(y)}function z(y,w){w.readingMore||(w.readingMore=!0,d.nextTick(N,y,w))}function N(y,w){for(var G=w.length;!w.reading&&!w.flowing&&!w.ended&&w.length1&&ie(Y.pipes,y)!==-1)&&!L&&(m("false write response, pause",G._readableState.awaitDrain),G._readableState.awaitDrain++,X=!0),G.pause())}function ae(be){m("onerror",be),le(),y.removeListener("error",ae),e(y,"error")===0&&y.emit("error",be)}A(y,"error",ae);function ue(){y.removeListener("finish",pe),le()}y.once("close",ue);function pe(){m("onfinish"),y.removeListener("close",ue),le()}y.once("finish",pe);function le(){m("unpipe"),G.unpipe(y)}return y.emit("pipe",G),Y.flowing||(m("pipe resume"),G.resume()),y};function re(y){return function(){var w=y._readableState;m("pipeOnDrain",w.awaitDrain),w.awaitDrain&&w.awaitDrain--,w.awaitDrain===0&&e(y,"data")&&(w.flowing=!0,I(y))}}j.prototype.unpipe=function(y){var w=this._readableState,G={hasUnpiped:!1};if(w.pipesCount===0)return this;if(w.pipesCount===1)return y&&y!==w.pipes?this:(y||(y=w.pipes),w.pipes=null,w.pipesCount=0,w.flowing=!1,y&&y.emit("unpipe",this,G),this);if(!y){var Y=w.pipes,oe=w.pipesCount;w.pipes=null,w.pipesCount=0,w.flowing=!1;for(var h=0;h=w.length?(w.decoder?G=w.buffer.join(""):w.buffer.length===1?G=w.buffer.head.data:G=w.buffer.concat(w.length),w.buffer.clear()):G=$(y,w.buffer,w.decoder),G}function $(y,w,G){var Y;return yh.length?h.length:y;if(t===h.length?oe+=h:oe+=h.slice(0,y),y-=t,y===0){t===h.length?(++Y,G.next?w.head=G.next:w.head=w.tail=null):(w.head=G,G.data=h.slice(t));break}++Y}return w.length-=Y,oe}function J(y,w){var G=o.allocUnsafe(y),Y=w.head,oe=1;for(Y.data.copy(G),y-=Y.data.length;Y=Y.next;){var h=Y.data,t=y>h.length?h.length:y;if(h.copy(G,G.length-y,0,t),y-=t,y===0){t===h.length?(++oe,Y.next?w.head=Y.next:w.head=w.tail=null):(w.head=Y,Y.data=h.slice(t));break}++oe}return w.length-=oe,G}function te(y){var w=y._readableState;if(w.length>0)throw new Error('"endReadable()" called on non-empty stream');w.endEmitted||(w.ended=!0,d.nextTick(ne,w,y))}function ne(y,w){!y.endEmitted&&y.length===0&&(y.endEmitted=!0,w.readable=!1,w.emit("end"))}function ie(y,w){for(var G=0,Y=y.length;G-1?d:f.nextTick,n;A.WritableState=C;var o=s("core-util-is");o.inherits=s("inherits");var c={deprecate:s("util-deprecate")},l=s("./internal/streams/stream"),_=s("safe-buffer").Buffer,E=a.Uint8Array||function(){};function O(p){return _.from(p)}function m(p){return _.isBuffer(p)||p instanceof E}var P=s("./internal/streams/destroy");o.inherits(A,l);function R(){}function C(p,I){n=n||s("./_stream_duplex"),p=p||{};var U=I instanceof n;this.objectMode=!!p.objectMode,U&&(this.objectMode=this.objectMode||!!p.writableObjectMode);var $=p.highWaterMark,H=p.writableHighWaterMark,J=this.objectMode?16:16*1024;$||$===0?this.highWaterMark=$:U&&(H||H===0)?this.highWaterMark=H:this.highWaterMark=J,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var te=p.decodeStrings===!1;this.decodeStrings=!te,this.defaultEncoding=p.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ne){F(I,ne)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new u(this)}C.prototype.getBuffer=function(){for(var I=this.bufferedRequest,U=[];I;)U.push(I),I=I.next;return U},function(){try{Object.defineProperty(C.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var T;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(p){return T.call(this,p)?!0:this!==A?!1:p&&p._writableState instanceof C}})):T=function(p){return p instanceof this};function A(p){if(n=n||s("./_stream_duplex"),!T.call(A,this)&&!(this instanceof n))return new A(p);this._writableState=new C(p,this),this.writable=!0,p&&(typeof p.write=="function"&&(this._write=p.write),typeof p.writev=="function"&&(this._writev=p.writev),typeof p.destroy=="function"&&(this._destroy=p.destroy),typeof p.final=="function"&&(this._final=p.final)),l.call(this)}A.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function S(p,I){var U=new Error("write after end");p.emit("error",U),f.nextTick(I,U)}function j(p,I,U,$){var H=!0,J=!1;return U===null?J=new TypeError("May not write null values to stream"):typeof U!="string"&&U!==void 0&&!I.objectMode&&(J=new TypeError("Invalid non-string/buffer chunk")),J&&(p.emit("error",J),f.nextTick($,J),H=!1),H}A.prototype.write=function(p,I,U){var $=this._writableState,H=!1,J=!$.objectMode&&m(p);return J&&!_.isBuffer(p)&&(p=O(p)),typeof I=="function"&&(U=I,I=null),J?I="buffer":I||(I=$.defaultEncoding),typeof U!="function"&&(U=R),$.ended?S(this,U):(J||j(this,$,p,U))&&($.pendingcb++,H=M(this,$,J,p,I,U)),H},A.prototype.cork=function(){var p=this._writableState;p.corked++},A.prototype.uncork=function(){var p=this._writableState;p.corked&&(p.corked--,!p.writing&&!p.corked&&!p.finished&&!p.bufferProcessing&&p.bufferedRequest&&K(this,p))},A.prototype.setDefaultEncoding=function(I){if(typeof I=="string"&&(I=I.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((I+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+I);return this._writableState.defaultEncoding=I,this};function W(p,I,U){return!p.objectMode&&p.decodeStrings!==!1&&typeof I=="string"&&(I=_.from(I,U)),I}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function M(p,I,U,$,H,J){if(!U){var te=W(I,$,H);$!==te&&(U=!0,H="buffer",$=te)}var ne=I.objectMode?1:$.length;I.length+=ne;var ie=I.length0?this.tail.next=o:this.head=o,this.tail=o,++this.length},u.prototype.unshift=function(n){var o={data:n,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length},u.prototype.shift=function(){if(this.length!==0){var n=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,n}},u.prototype.clear=function(){this.head=this.tail=null,this.length=0},u.prototype.join=function(n){if(this.length===0)return"";for(var o=this.head,c=""+o.data;o=o.next;)c+=n+o.data;return c},u.prototype.concat=function(n){if(this.length===0)return a.alloc(0);if(this.length===1)return this.head.data;for(var o=a.allocUnsafe(n>>>0),c=this.head,l=0;c;)f(c.data,o,l),l+=c.data.length,c=c.next;return o},u}(),d&&d.inspect&&d.inspect.custom&&(v.exports.prototype[d.inspect.custom]=function(){var u=d.inspect({length:this.length});return this.constructor.name+" "+u})},{"safe-buffer":108,util:11}],104:[function(s,v,x){var i=s("process-nextick-args");function a(u,e){var n=this,o=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return o||c?(e?e(u):u&&(!this._writableState||!this._writableState.errorEmitted)&&i.nextTick(f,this,u),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(l){!e&&l?(i.nextTick(f,n,l),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(l)}),this)}function d(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function f(u,e){u.emit("error",e)}v.exports={destroy:a,undestroy:d}},{"process-nextick-args":91}],105:[function(s,v,x){v.exports=s("events").EventEmitter},{events:78}],106:[function(s,v,x){x=v.exports=s("./lib/_stream_readable.js"),x.Stream=x,x.Readable=x,x.Writable=s("./lib/_stream_writable.js"),x.Duplex=s("./lib/_stream_duplex.js"),x.Transform=s("./lib/_stream_transform.js"),x.PassThrough=s("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":98,"./lib/_stream_passthrough.js":99,"./lib/_stream_readable.js":100,"./lib/_stream_transform.js":101,"./lib/_stream_writable.js":102}],107:[function(s,v,x){function i(d,f,u){var e=this;this._callback=d,this._args=u,this._interval=setInterval(d,f,this._args),this.reschedule=function(n){n||(n=e._interval),e._interval&&clearInterval(e._interval),e._interval=setInterval(e._callback,n,e._args)},this.clear=function(){e._interval&&(clearInterval(e._interval),e._interval=void 0)},this.destroy=function(){e._interval&&clearInterval(e._interval),e._callback=void 0,e._interval=void 0,e._args=void 0}}function a(){if(typeof arguments[0]!="function")throw new Error("callback needed");if(typeof arguments[1]!="number")throw new Error("interval needed");var d;if(arguments.length>0){d=new Array(arguments.length-2);for(var f=0;f>5===6?2:T>>4===14?3:T>>3===30?4:T>>6===2?-1:-2}function n(T,A,S){var j=A.length-1;if(j=0?(W>0&&(T.lastNeed=W-1),W):--j=0?(W>0&&(T.lastNeed=W-2),W):--j=0?(W>0&&(W===2?W=0:T.lastNeed=W-3),W):0))}function o(T,A,S){if((A[0]&192)!==128)return T.lastNeed=0,"\uFFFD";if(T.lastNeed>1&&A.length>1){if((A[1]&192)!==128)return T.lastNeed=1,"\uFFFD";if(T.lastNeed>2&&A.length>2&&(A[2]&192)!==128)return T.lastNeed=2,"\uFFFD"}}function c(T){var A=this.lastTotal-this.lastNeed,S=o(this,T);if(S!==void 0)return S;if(this.lastNeed<=T.length)return T.copy(this.lastChar,A,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,A,0,T.length),this.lastNeed-=T.length}function l(T,A){var S=n(this,T,A);if(!this.lastNeed)return T.toString("utf8",A);this.lastTotal=S;var j=T.length-(S-this.lastNeed);return T.copy(this.lastChar,0,j),T.toString("utf8",A,j)}function _(T){var A=T&&T.length?this.write(T):"";return this.lastNeed?A+"\uFFFD":A}function E(T,A){if((T.length-A)%2===0){var S=T.toString("utf16le",A);if(S){var j=S.charCodeAt(S.length-1);if(j>=55296&&j<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",A,T.length-1)}function O(T){var A=T&&T.length?this.write(T):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return A+this.lastChar.toString("utf16le",0,S)}return A}function m(T,A){var S=(T.length-A)%3;return S===0?T.toString("base64",A):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",A,T.length-S))}function P(T){var A=T&&T.length?this.write(T):"";return this.lastNeed?A+this.lastChar.toString("base64",0,3-this.lastNeed):A}function R(T){return T.toString(this.encoding)}function C(T){return T&&T.length?this.write(T):""}},{"safe-buffer":108}],111:[function(s,v,x){(function(i,a){var d=s("process/browser.js").nextTick,f=Function.prototype.apply,u=Array.prototype.slice,e={},n=0;x.setTimeout=function(){return new o(f.call(setTimeout,window,arguments),clearTimeout)},x.setInterval=function(){return new o(f.call(setInterval,window,arguments),clearInterval)},x.clearTimeout=x.clearInterval=function(c){c.close()};function o(c,l){this._id=c,this._clearFn=l}o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(window,this._id)},x.enroll=function(c,l){clearTimeout(c._idleTimeoutId),c._idleTimeout=l},x.unenroll=function(c){clearTimeout(c._idleTimeoutId),c._idleTimeout=-1},x._unrefActive=x.active=function(c){clearTimeout(c._idleTimeoutId);var l=c._idleTimeout;l>=0&&(c._idleTimeoutId=setTimeout(function(){c._onTimeout&&c._onTimeout()},l))},x.setImmediate=typeof i=="function"?i:function(c){var l=n++,_=arguments.length<2?!1:u.call(arguments,1);return e[l]=!0,d(function(){e[l]&&(_?c.apply(null,_):c.call(null),x.clearImmediate(l))}),l},x.clearImmediate=typeof a=="function"?a:function(c){delete e[c]}}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":92,timers:111}],112:[function(s,v,x){var i=s("punycode"),a=s("./util");x.parse=A,x.resolve=j,x.resolveObject=W,x.format=S,x.Url=d;function d(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var f=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,e=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,n=["<",">",'"',"`"," ","\r",` `," "],o=["{","}","|","\\","^","`"].concat(n),c=["'"].concat(o),l=["%","/","?",";","#"].concat(c),_=["/","?","#"],E=255,O=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,P={javascript:!0,"javascript:":!0},R={javascript:!0,"javascript:":!0},C={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},T=s("querystring");function A(M,ee,g){if(M&&a.isObject(M)&&M instanceof d)return M;var D=new d;return D.parse(M,ee,g),D}d.prototype.parse=function(M,ee,g){if(!a.isString(M))throw new TypeError("Parameter 'url' must be a string, not "+typeof M);var D=M.indexOf("?"),F=D!==-1&&D127?ne+="x":ne+=te[ie];if(!ne.match(O)){var w=H.slice(0,k),G=H.slice(k+1),Y=te.match(m);Y&&(w.push(Y[1]),G.unshift(Y[2])),G.length&&(K="/"+G.join(".")+K),this.hostname=w.join(".");break}}}this.hostname.length>E?this.hostname="":this.hostname=this.hostname.toLowerCase(),$||(this.hostname=i.toASCII(this.hostname));var oe=this.port?":"+this.port:"",h=this.hostname||"";this.host=h+oe,this.href+=this.host,$&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),K[0]!=="/"&&(K="/"+K))}if(!P[N])for(var k=0,J=c.length;k0?g.host.split("@"):!1;ne&&(g.auth=ne.shift(),g.host=g.hostname=ne.shift())}return g.search=M.search,g.query=M.query,(!a.isNull(g.pathname)||!a.isNull(g.search))&&(g.path=(g.pathname?g.pathname:"")+(g.search?g.search:"")),g.href=g.format(),g}if(!H.length)return g.pathname=null,g.search?g.path="/"+g.search:g.path=null,g.href=g.format(),g;for(var ie=H.slice(-1)[0],y=(g.host||M.host||H.length>1)&&(ie==="."||ie==="..")||ie==="",w=0,G=H.length;G>=0;G--)ie=H[G],ie==="."?H.splice(G,1):ie===".."?(H.splice(G,1),w++):w&&(H.splice(G,1),w--);if(!U&&!$)for(;w--;w)H.unshift("..");U&&H[0]!==""&&(!H[0]||H[0].charAt(0)!=="/")&&H.unshift(""),y&&H.join("/").substr(-1)!=="/"&&H.push("");var Y=H[0]===""||H[0]&&H[0].charAt(0)==="/";if(te){g.hostname=g.host=Y?"":H.length?H.shift():"";var ne=g.host&&g.host.indexOf("@")>0?g.host.split("@"):!1;ne&&(g.auth=ne.shift(),g.host=g.hostname=ne.shift())}return U=U||g.host&&H.length,U&&!Y&&H.unshift(""),H.length?g.pathname=H.join("/"):(g.pathname=null,g.path=null),(!a.isNull(g.pathname)||!a.isNull(g.search))&&(g.path=(g.pathname?g.pathname:"")+(g.search?g.search:"")),g.auth=M.auth||g.auth,g.slashes=g.slashes||M.slashes,g.href=g.format(),g},d.prototype.parseHost=function(){var M=this.host,ee=u.exec(M);ee&&(ee=ee[0],ee!==":"&&(this.port=ee.substr(1)),M=M.substr(0,M.length-ee.length)),M&&(this.hostname=M)}},{"./util":113,punycode:93,querystring:96}],113:[function(s,v,x){v.exports={isString:function(i){return typeof i=="string"},isObject:function(i){return typeof i=="object"&&i!==null},isNull:function(i){return i===null},isNullOrUndefined:function(i){return i==null}}},{}],114:[function(s,v,x){(function(i){v.exports=a;function a(f,u){if(d("noDeprecation"))return f;var e=!1;function n(){if(!e){if(d("throwDeprecation"))throw new Error(u);d("traceDeprecation")?console.trace(u):console.warn(u),e=!0}return f.apply(this,arguments)}return n}function d(f){try{if(!i.localStorage)return!1}catch{return!1}var u=i.localStorage[f];return u==null?!1:String(u).toLowerCase()==="true"}}).call(this,typeof ge<"u"?ge:typeof self<"u"?self:typeof window<"u"?window:{})},{}],115:[function(s,v,x){v.exports=function(a){return a&&typeof a=="object"&&typeof a.copy=="function"&&typeof a.fill=="function"&&typeof a.readUInt8=="function"}},{}],116:[function(s,v,x){(function(i,a){var d=/%[sdj%]/g;x.format=function(B){if(!j(B)){for(var k=[],p=0;p=U)return J;switch(J){case"%s":return String(I[p++]);case"%d":return Number(I[p++]);case"%j":try{return JSON.stringify(I[p++])}catch{return"[Circular]"}default:return J}}),H=I[p];p=3&&(p.depth=arguments[2]),arguments.length>=4&&(p.colors=arguments[3]),C(k)?p.showHidden=k:k&&x._extend(p,k),M(p.showHidden)&&(p.showHidden=!1),M(p.depth)&&(p.depth=2),M(p.colors)&&(p.colors=!1),M(p.customInspect)&&(p.customInspect=!0),p.colors&&(p.stylize=n),l(p,B,p.depth)}x.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function n(B,k){var p=e.styles[k];return p?"\x1B["+e.colors[p][0]+"m"+B+"\x1B["+e.colors[p][1]+"m":B}function o(B,k){return B}function c(B){var k={};return B.forEach(function(p,I){k[p]=!0}),k}function l(B,k,p){if(B.customInspect&&k&&V(k.inspect)&&k.inspect!==x.inspect&&!(k.constructor&&k.constructor.prototype===k)){var I=k.inspect(p,B);return j(I)||(I=l(B,I,p)),I}var U=_(B,k);if(U)return U;var $=Object.keys(k),H=c($);if(B.showHidden&&($=Object.getOwnPropertyNames(k)),F(k)&&($.indexOf("message")>=0||$.indexOf("description")>=0))return E(k);if($.length===0){if(V(k)){var J=k.name?": "+k.name:"";return B.stylize("[Function"+J+"]","special")}if(ee(k))return B.stylize(RegExp.prototype.toString.call(k),"regexp");if(D(k))return B.stylize(Date.prototype.toString.call(k),"date");if(F(k))return E(k)}var te="",ne=!1,ie=["{","}"];if(R(k)&&(ne=!0,ie=["[","]"]),V(k)){var y=k.name?": "+k.name:"";te=" [Function"+y+"]"}if(ee(k)&&(te=" "+RegExp.prototype.toString.call(k)),D(k)&&(te=" "+Date.prototype.toUTCString.call(k)),F(k)&&(te=" "+E(k)),$.length===0&&(!ne||k.length==0))return ie[0]+te+ie[1];if(p<0)return ee(k)?B.stylize(RegExp.prototype.toString.call(k),"regexp"):B.stylize("[Object]","special");B.seen.push(k);var w;return ne?w=O(B,k,p,H,$):w=$.map(function(G){return m(B,k,p,H,G,ne)}),B.seen.pop(),P(w,te,ie)}function _(B,k){if(M(k))return B.stylize("undefined","undefined");if(j(k)){var p="'"+JSON.stringify(k).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(p,"string")}if(S(k))return B.stylize(""+k,"number");if(C(k))return B.stylize(""+k,"boolean");if(T(k))return B.stylize("null","null")}function E(B){return"["+Error.prototype.toString.call(B)+"]"}function O(B,k,p,I,U){for(var $=[],H=0,J=k.length;H-1&&($?J=J.split(` `).map(function(ne){return" "+ne}).join(` `).substr(2):J=` `+J.split(` `).map(function(ne){return" "+ne}).join(` `))):J=B.stylize("[Circular]","special")),M(H)){if($&&U.match(/^\d+$/))return J;H=JSON.stringify(""+U),H.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(H=H.substr(1,H.length-2),H=B.stylize(H,"name")):(H=H.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),H=B.stylize(H,"string"))}return H+": "+J}function P(B,k,p){var I=B.reduce(function(U,$){return $.indexOf(` `)>=0,U+$.replace(/\u001b\[\d\d?m/g,"").length+1},0);return I>60?p[0]+(k===""?"":k+` `)+" "+B.join(`, `)+" "+p[1]:p[0]+k+" "+B.join(", ")+" "+p[1]}function R(B){return Array.isArray(B)}x.isArray=R;function C(B){return typeof B=="boolean"}x.isBoolean=C;function T(B){return B===null}x.isNull=T;function A(B){return B==null}x.isNullOrUndefined=A;function S(B){return typeof B=="number"}x.isNumber=S;function j(B){return typeof B=="string"}x.isString=j;function W(B){return typeof B=="symbol"}x.isSymbol=W;function M(B){return B===void 0}x.isUndefined=M;function ee(B){return g(B)&&K(B)==="[object RegExp]"}x.isRegExp=ee;function g(B){return typeof B=="object"&&B!==null}x.isObject=g;function D(B){return g(B)&&K(B)==="[object Date]"}x.isDate=D;function F(B){return g(B)&&(K(B)==="[object Error]"||B instanceof Error)}x.isError=F;function V(B){return typeof B=="function"}x.isFunction=V;function Z(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}x.isPrimitive=Z,x.isBuffer=s("./support/isBuffer");function K(B){return Object.prototype.toString.call(B)}function Q(B){return B<10?"0"+B.toString(10):B.toString(10)}var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N(){var B=new Date,k=[Q(B.getHours()),Q(B.getMinutes()),Q(B.getSeconds())].join(":");return[B.getDate(),z[B.getMonth()],k].join(" ")}x.log=function(){N(),x.format.apply(x,arguments)},x.inherits=s("inherits"),x._extend=function(B,k){if(!k||!g(k))return B;for(var p=Object.keys(k),I=p.length;I--;)B[p[I]]=k[p[I]];return B};function re(B,k){return Object.prototype.hasOwnProperty.call(B,k)}}).call(this,s("_process"),typeof ge<"u"?ge:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":115,_process:92,inherits:80}],117:[function(s,v,x){(function(i,a){var d=s("readable-stream").Transform,f=s("duplexify"),u=s("ws"),e=s("safe-buffer").Buffer;v.exports=o;function n(c,l,_){var E=new d({objectMode:c.objectMode});return E._write=l,E._flush=_,E}function o(c,l,_){var E,O,m=i.title==="browser",P=!!a.WebSocket,R=m?W:j;l&&!Array.isArray(l)&&typeof l=="object"&&(_=l,l=null,(typeof _.protocol=="string"||Array.isArray(_.protocol))&&(l=_.protocol)),_||(_={}),_.objectMode===void 0&&(_.objectMode=!(_.binary===!0||_.binary===void 0));var C=n(_,R,M);_.objectMode||(C._writev=Z);var T=_.browserBufferSize||1024*512,A=_.browserBufferTimeout||1e3;typeof c=="object"?O=c:(P&&m?O=new u(c,l):O=new u(c,l,_),O.binaryType="arraybuffer"),O.readyState===O.OPEN?E=C:(E=f.obj(),O.onopen=ee),E.socket=O,O.onclose=g,O.onerror=D,O.onmessage=F,C.on("close",V);var S=!_.objectMode;function j(K,Q,z){if(O.readyState!==O.OPEN){z();return}S&&typeof K=="string"&&(K=e.from(K,"utf8")),O.send(K,z)}function W(K,Q,z){if(O.bufferedAmount>T){setTimeout(W,A,K,Q,z);return}S&&typeof K=="string"&&(K=e.from(K,"utf8"));try{O.send(K)}catch(N){return z(N)}z()}function M(K){O.close(),K()}function ee(){E.setReadable(C),E.setWritable(C),E.emit("connect")}function g(){E.end(),E.destroy()}function D(K){E.destroy(K)}function F(K){var Q=K.data;Q instanceof ArrayBuffer?Q=e.from(Q):Q=e.from(Q,"utf8"),C.push(Q)}function V(){O.close()}function Z(K,Q){for(var z=new Array(K.length),N=0;N(Re("data-v-7544cefd"),de=de(),Le(),de),pt={class:"message"},dt=Ae(()=>he("div",{style:{"margin-left":"10px"}},"\u6D88\u606F",-1)),_t={key:0,class:"message-list"},mt=["onClick"],gt={class:"message-content"},yt={class:"main-title"},vt={key:0,class:"redCircle"},bt={class:"message-title"},wt={class:"message-date"},St={key:1,class:"message-empty"},xt=Ae(()=>he("img",{src:Ue,alt:"notData"},null,-1)),Et=Ae(()=>he("div",null,"\u6682\u65E0\u901A\u77E5",-1)),It=[xt,Et],Tt=Ae(()=>he("div",{class:"message-empty"},[he("img",{src:Ue,alt:"notData"}),he("div",null,"\u6682\u65E0\u6D88\u606F")],-1)),At=Ae(()=>he("div",{class:"message-empty"},[he("img",{src:Ue,alt:"notData"}),he("div",null,"\u6682\u65E0\u4EE3\u529E")],-1)),Ct=xe({__name:"Message",setup(de){const ve=Te(),s=ye(0),v=ye([]),x=ye("first"),i=ye(),a=ye({clean:!0,connectTimeout:5e3,clientId:"mqtt_01",username:"admin",password:"JXJ@admin"}),d=async o=>{if(o.isRead==0){let c={messageId:o.messageId,type:o.type};const l=await rt(c);l&&l.success&&f()}},f=async()=>{s.value=0;const o=await tt();o.result&&o.result.length>0?(v.value=o.result,v.value.map(c=>{c.isRead==0&&s.value++})):(v.value=[],s.value=0)},u=o=>{},e=()=>{let o="ws://182.90.224.147:8083/mqtt";i.value=$e.exports.connect(o,a.value),i.value.on("connect",c=>{i.value.subscribe(`wisdomSite/message/${ve.userInfo.userId}`,{qos:1},(l,_)=>{}),i.value.on("message",(l,_)=>{JSON.parse(_.toString()),f()})})},n=()=>{if(i.value)try{i.value.end(),i.value=null}catch{}};return He(()=>{f(),e()}),et(()=>{n()}),(o,c)=>{const l=_e("el-badge"),_=_e("el-tab-pane"),E=_e("el-tabs"),O=_e("el-popover");return me(),we("div",pt,[fe(O,{placement:"bottom",width:310,trigger:"click"},{reference:ce(()=>[fe(l,{value:s.value,hidden:!s.value,style:{display:"flex","justify-content":"center","align-items":"center"},class:"item"},{default:ce(()=>[he("i",{class:We(["iconfont icon-xiaoxi","toolBar-icon"]),style:{"font-size":"14px"}}),dt]),_:1},8,["value","hidden"])]),default:ce(()=>[fe(E,{modelValue:x.value,"onUpdate:modelValue":c[0]||(c[0]=m=>x.value=m),onTabChange:u},{default:ce(()=>[fe(_,{label:`\u901A\u77E5(${v.value.length})`,name:"first"},{default:ce(()=>[v.value.length>0?(me(),we("div",_t,[(me(!0),we(Pe,null,De(v.value,(m,P)=>(me(),we("div",{class:"message-item",key:P,onClick:R=>d(m)},[he("div",gt,[he("div",yt,[m.isRead?Ke("",!0):(me(),we("span",vt)),he("span",bt,Ie(m.title),1)]),he("span",wt,Ie(m.createTime),1)])],8,mt))),128))])):(me(),we("div",St,It))]),_:1},8,["label"]),fe(_,{label:"\u6D88\u606F(0)",name:"second"},{default:ce(()=>[Tt]),_:1}),fe(_,{label:"\u4EE3\u529E(0)",name:"third"},{default:ce(()=>[At]),_:1})]),_:1},8,["modelValue"])]),_:1})])}}});const kt=Ee(Ct,[["__scopeId","data-v-7544cefd"]]),Ot={class:"dialog-footer"},jt=xe({name:"editPassword"}),Mt=xe({...jt,setup(de,{expose:ve}){const s=Be(),v=Te(),x=ye(!1),i=nt({password:[{required:!0,message:"\u8BF7\u8F93\u5165\u5BC6\u7801",trigger:"blur"}],enterPassword:[{required:!0,message:"\u8BF7\u518D\u6B21\u8F93\u5165\u5BC6\u7801",trigger:"blur"},{validator:(n,o,c)=>{o===""?c(new Error("\u8BF7\u786E\u8BA4\u5BC6\u7801")):o!==f.value.password?c(new Error("\u4E24\u6B21\u5BC6\u7801\u8F93\u5165\u4E0D\u4E00\u81F4")):c()}}]}),a=ye(!1),d=ye(),f=ye({password:"",enterPassword:""}),u=async n=>{!n||await n.validate(async(o,c)=>{if(o)try{x.value=!0,await it({password:f.value.password}),a.value=!1,await ze(),v.resetStore(),s.replace(Ve),Me.success("\u4FEE\u6539\u5BC6\u7801\u6210\u529F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55")}finally{x.value=!1}else Me({showClose:!0,message:"\u8BF7\u5B8C\u5584\u8868\u5355\u4FE1\u606F\uFF01",type:"error"})})};return ve({openDialog:()=>{var n;(n=d.value)==null||n.resetFields(),a.value=!0},onSubmit:u}),(n,o)=>{const c=_e("el-input"),l=_e("el-form-item"),_=_e("el-form"),E=_e("el-button"),O=_e("el-dialog");return me(),ke(O,{modelValue:a.value,"onUpdate:modelValue":o[4]||(o[4]=m=>a.value=m),title:"\u4FEE\u6539\u5BC6\u7801",width:"500px",draggable:""},{footer:ce(()=>[he("span",Ot,[fe(E,{onClick:o[2]||(o[2]=m=>a.value=!1)},{default:ce(()=>[je("\u53D6\u6D88")]),_:1}),fe(E,{type:"primary",loading:x.value,onClick:o[3]||(o[3]=m=>u(d.value))},{default:ce(()=>[je("\u786E\u8BA4")]),_:1},8,["loading"])])]),default:ce(()=>[fe(_,{ref_key:"ruleFormRef",ref:d,rules:i,class:"form",model:f.value,"label-width":"100px"},{default:ce(()=>[fe(l,{label:"\u4FEE\u6539\u5BC6\u7801:",prop:"password"},{default:ce(()=>[fe(c,{modelValue:f.value.password,"onUpdate:modelValue":o[0]||(o[0]=m=>f.value.password=m),placeholder:"\u8BF7\u8F93\u5165\u5BC6\u7801"},null,8,["modelValue"])]),_:1}),fe(l,{label:"\u786E\u8BA4\u5BC6\u7801:",prop:"enterPassword"},{default:ce(()=>[fe(c,{type:"password",modelValue:f.value.enterPassword,"onUpdate:modelValue":o[1]||(o[1]=m=>f.value.enterPassword=m),placeholder:"\u8BF7\u8F93\u5165\u786E\u8BA4\u5BC6\u7801"},null,8,["modelValue"])]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["modelValue"])}}});const Bt=Ee(Mt,[["__scopeId","data-v-67739aba"]]),Pt=de=>(Re("data-v-9f8d1b71"),de=de(),Le(),de),Rt={class:"avatar"},Lt=Pt(()=>he("span",null,"\u6587\u6863\u5730\u5740",-1)),Ut=xe({__name:"Avatar",setup(de){const ve=Be(),s=Te(),v=s.account;ye(!1);const x=ye(""),i=async()=>{const{result:c}=await ot({configKey:"system_doc"});x.value=c[0].configValue},a=()=>{st.confirm("\u60A8\u662F\u5426\u786E\u8BA4\u9000\u51FA\u767B\u5F55?","\u6E29\u99A8\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(async()=>{await ze(),s.resetStore(),ve.replace(Ve),Me.success("\u9000\u51FA\u767B\u5F55\u6210\u529F\uFF01")})},d=ye(null),f=ye(null),u=c=>{var l,_;c=="infoRef"?(l=d.value)==null||l.openDialog():(_=f.value)==null||_.openDialog(),f.value},e=c=>{s.seteditPassword(c)},n=()=>{s.seteditPassword(!0),s.editPassword},o=()=>{window.open(x.value,"_blank")};return He(()=>{i()}),(c,l)=>{const _=_e("CaretBottom"),E=_e("el-icon"),O=_e("el-dropdown-item"),m=_e("el-dropdown-menu"),P=_e("el-dropdown");return me(),we(Pe,null,[fe(P,{onVisibleChange:e,"hide-on-click":!1,trigger:"click"},{dropdown:ce(()=>[fe(m,{"virtual-triggering":""},{default:ce(()=>[fe(O,{onClick:o},{default:ce(()=>[Lt]),_:1}),fe(O,{onClick:l[0]||(l[0]=R=>u("passwordRef"))},{default:ce(()=>[he("span",{onClic:n},"\u4FEE\u6539\u5BC6\u7801",32)]),_:1}),fe(O,{onClick:a,divided:""},{default:ce(()=>[je(Ie(c.$t("header.logout")),1)]),_:1})]),_:1})]),default:ce(()=>[he("div",Rt,[he("span",null,Ie(Fe(v)),1),fe(E,null,{default:ce(()=>[fe(_)]),_:1})])]),_:1}),fe(Bt,{ref_key:"passwordRef",ref:f},null,512)],64)}}});const Nt=Ee(Ut,[["__scopeId","data-v-9f8d1b71"]]),Dt=de=>(Re("data-v-b1225e4c"),de=de(),Le(),de),Ft={class:"tool-bar-ri"},Wt={class:"header-icon"},Kt={style:{display:"flex","align-items":"center",cursor:"pointer"}},Ht=Dt(()=>he("span",{style:{margin:"0 26px"}},"|",-1)),zt=xe({__name:"ToolBarRight",setup(de){return(ve,s)=>(me(),we("div",Ft,[he("div",Wt,[he("div",Kt,[fe(kt,{id:"message"})]),Ht]),fe(Nt)]))}});const Jt=Ee(zt,[["__scopeId","data-v-b1225e4c"]]);export{Qt as T,Jt as a};