-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiot-bundle.js
390 lines (299 loc) · 229 KB
/
iot-bundle.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";var awsIot=require("aws-iot-device-sdk"),IoT=function(){function n(){e("Connected"),this.onConnect()}var o=void 0,e=function(n){console.log(n)};return{connect:function(e,c,t,i,s){o=awsIot.device({region:c,protocol:"wss",accessKeyId:t,secretKey:i,sessionToken:s,port:443,host:e});var r=this;console.log("connecting client"),o.on("connect",n.bind(this)),o.on("message",r.onMessage),o.on("error",r.onError),o.on("reconnect",r.onReconnect),o.on("offline",r.onOffline),o.on("close",r.onClose)},send:function(n,e){o.publish(n,e)},subscribe:function(n){o.subscribe(n)},onConnect:function(){},onMessage:function(n,o){e(o)},onError:function(){},onReconnect:function(){},onOffline:function(){},onClose:function(){e("Connection failed")}}};window.IoT=IoT();
},{"aws-iot-device-sdk":9}],2:[function(require,module,exports){
module.exports={NO_KEY_OPTION:'No "keyPath" or "privateKey" option supplied.',NO_CERT_OPTION:'No "certPath" or "clientCert" option supplied.',NO_CA_OPTION:'No "caPath" or "caCert" option supplied.',INVALID_KEY_PATH_OPTION:'Invalid "keyPath" option supplied.',INVALID_CERT_PATH_OPTION:'Invalid "certPath" option supplied.',INVALID_CA_PATH_OPTION:'Invalid "caPath" option supplied.',INVALID_CLIENT_CERT_OPTION:'Invalid "clientCert" option supplied.',INVALID_PRIVATE_KEY_OPTION:'Invalid "privateKey" option supplied.',INVALID_CA_CERT_OPTION:'Invalid "caCert" option supplied.'};
},{}],3:[function(require,module,exports){
module.exports=function(e){return"undefined"==typeof e||null===typeof e};
},{}],4:[function(require,module,exports){
(function (Buffer){
const filesys=require("fs"),isUndefined=require("./is-undefined"),exceptions=require("./exceptions");module.exports=function(e){if(isUndefined(e.keyPath)&&isUndefined(e.privateKey))throw new Error(exceptions.NO_KEY_OPTION);if(isUndefined(e.certPath)&&isUndefined(e.clientCert))throw new Error(exceptions.NO_CERT_OPTION);if(isUndefined(e.caPath)&&isUndefined(e.caCert))throw new Error(exceptions.NO_CA_OPTION);if(!isUndefined(e.caCert))if(Buffer.isBuffer(e.caCert))e.ca=e.caCert;else{if(!filesys.existsSync(e.caCert))throw new Error(exceptions.INVALID_CA_CERT_OPTION);e.ca=filesys.readFileSync(e.caCert)}if(!isUndefined(e.privateKey))if(Buffer.isBuffer(e.privateKey))e.key=e.privateKey;else{if(!filesys.existsSync(e.privateKey))throw new Error(exceptions.INVALID_PRIVATE_KEY_OPTION);e.key=filesys.readFileSync(e.privateKey)}if(!isUndefined(e.clientCert))if(Buffer.isBuffer(e.clientCert))e.cert=e.clientCert;else{if(!filesys.existsSync(e.clientCert))throw new Error(exceptions.INVALID_CLIENT_CERT_OPTION);e.cert=filesys.readFileSync(e.clientCert)}if(filesys.existsSync(e.keyPath))e.key=filesys.readFileSync(e.keyPath);else if(!isUndefined(e.keyPath))throw new Error(exceptions.INVALID_KEY_PATH_OPTION);if(filesys.existsSync(e.certPath))e.cert=filesys.readFileSync(e.certPath);else if(!isUndefined(e.certPath))throw new Error(exceptions.INVALID_CERT_PATH_OPTION);if(filesys.existsSync(e.caPath))e.ca=filesys.readFileSync(e.caPath);else if(!isUndefined(e.caPath))throw new Error(exceptions.INVALID_CA_PATH_OPTION);e.requestCert=!0,e.rejectUnauthorized=!0};
}).call(this,{"isBuffer":require("../../../is-buffer/index.js")})
},{"../../../is-buffer/index.js":65,"./exceptions":2,"./is-undefined":3,"fs":14}],5:[function(require,module,exports){
(function (process){
function makeTwoDigits(e){return e>9?e:"0"+e}function getDateTimeString(){var e=new Date;return e.getUTCFullYear()+""+makeTwoDigits(e.getUTCMonth()+1)+makeTwoDigits(e.getUTCDate())+"T"+makeTwoDigits(e.getUTCHours())+makeTwoDigits(e.getUTCMinutes())+makeTwoDigits(e.getUTCSeconds())+"Z"}function getDateString(e){return e.substring(0,e.indexOf("T"))}function getSignatureKey(e,n,i,t){var o=crypto.HmacSHA256(n,"AWS4"+e,{asBytes:!0}),s=crypto.HmacSHA256(i,o,{asBytes:!0}),r=crypto.HmacSHA256(t,s,{asBytes:!0}),c=crypto.HmacSHA256("aws4_request",r,{asBytes:!0});return c}function signUrl(e,n,i,t,o,s,r,c,l,a,u,d,f,p){var m="host",b="host:"+i.toLowerCase()+"\n",g=e+"\n"+t+"\n"+o+"\n"+b+"\n"+m+"\n"+crypto.SHA256(a,{asBytes:!0});f===!0&&console.log("canonical request: "+g+"\n");var h=crypto.SHA256(g,{asBytes:!0});f===!0&&console.log("hashed canonical request: "+h+"\n");var S="AWS4-HMAC-SHA256\n"+d+"\n"+u+"/"+c+"/"+l+"/aws4_request\n"+h;f===!0&&console.log("string to sign: "+S+"\n");var v=getSignatureKey(r,u,c,l);f===!0&&console.log("signing key: "+v+"\n");var w=crypto.HmacSHA256(S,v,{asBytes:!0});f===!0&&console.log("signature: "+w+"\n");var T=o+"&X-Amz-Signature="+w;isUndefined(p)||(T+="&X-Amz-Security-Token="+encodeURIComponent(p));var U=n+i+t+"?"+T;return f===!0&&console.log("url: "+U+"\n"),U}function prepareWebSocketUrl(e,n,i,t){var o=getDateTimeString(),s=getDateString(o),r="/mqtt",c="iotdata",l="X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential="+n+"%2F"+s+"%2F"+e.region+"%2F"+c+"%2Faws4_request&X-Amz-Date="+o+"&X-Amz-SignedHeaders=host",a=e.host;return isUndefined(e.port)||443===e.port||(a=e.host+":"+e.port),signUrl("GET","wss://",a,r,l,n,i,e.region,c,"",s,o,e.debug,t)}function DeviceClient(e){function n(e,n){var i=g.filter(function(n){return n.topic===e});0===i.length&&g.push({topic:e,options:n})}function i(e,n){var i=g.filter(function(n){return n.topic!==e});g=i}function t(e,t,o){var s=null;h!==!1&&("subscribe"===e?s=n:"unsubscribe"===e&&(s=i),"[object Array]"===Object.prototype.toString.call(t)?t.forEach(function(e,n,i){s(e,o)}):s(t,o))}function o(){return"inactive"===E}function s(n){if("wss"===e.protocol){var i;i=""===w||""===T?"wss://no-credentials-available":prepareWebSocketUrl(e,w,T,U),e.debug===!0&&console.log("using websockets, will connect to '"+i+"'..."),e.url=i}return k[e.protocol](n,e)}function r(){v=I,_.options.reconnectPeriod=v,y=null,E="stable"}function c(){var e=!0;return f>0&&u.length>=f&&("oldest"===p?u.shift():e=!1),e}function l(){var e=S.shift();if(isUndefined(e)){var n=m.shift();if(isUndefined(n)){var i=u.shift();isUndefined(i)||_.publish(i.topic,i.message,i.options,i.callback),0===u.length&&(clearInterval(A),A=null)}else t(n.type,n.topics,n.options),"subscribe"===n.type?isUndefined(n.callback)?_.subscribe(n.topics,n.options):_.subscribe(n.topics,n.options,n.callback):"unsubscribe"===n.type&&_.unsubscribe(n.topics,n.callback)}else isUndefined(e.callback)?_.subscribe(e.topic,e.options):_.subscribe(e.topic,e.options,e.callback)}if(!(this instanceof DeviceClient))return new DeviceClient(e);var a=this,u=[],d=!0,f=0,p="oldest";u.length=0;var m=[],b=50;m.length=0;var g=[],h=!0;g.length=0;var S=[];S.length=0;var v,w,T,U,E="inactive",A=null,C=250,I=1e3,D=2e4,N=128e3,y=null;if(isUndefined(e)||0===Object.keys(e).length)throw new Error(exceptions.INVALID_CONNECT_OPTIONS);if(isUndefined(e.baseReconnectTimeMs)||(I=e.baseReconnectTimeMs),isUndefined(e.minimumConnectionTimeMs)||(D=e.minimumConnectionTimeMs),isUndefined(e.maximumReconnectTimeMs)||(N=e.maximumReconnectTimeMs),isUndefined(e.drainTimeMs)||(C=e.drainTimeMs),isUndefined(e.autoResubscribe)||(h=e.autoResubscribe),isUndefined(e.offlineQueueing)||(d=e.offlineQueueing),isUndefined(e.offlineQueueMaxSize)||(f=e.offlineQueueMaxSize),isUndefined(e.offlineQueueDropBehavior)||(p=e.offlineQueueDropBehavior),v=I,e.reconnectPeriod=v,e.fastDisconnectDetection=!0,e.baseReconnectTimeMs<=0)throw new Error(exceptions.INVALID_RECONNECT_TIMING);if(N<I)throw new Error(exceptions.INVALID_RECONNECT_TIMING);if(D<I)throw new Error(exceptions.INVALID_RECONNECT_TIMING);if("newest"!==p&&"oldest"!==p)throw new Error(exceptions.INVALID_OFFLINE_QUEUEING_PARAMETERS);if(f<0)throw new Error(exceptions.INVALID_OFFLINE_QUEUEING_PARAMETERS);if(isUndefined(e.protocol)&&(e.protocol="mqtts"),isUndefined(e.host)){if(isUndefined(e.region))throw new Error(exceptions.INVALID_CONNECT_OPTIONS);e.host="data.iot."+e.region+".amazonaws.com"}if("mqtts"===e.protocol)isUndefined(e.port)&&(e.port=8883),tlsReader(e);else if("wss"===e.protocol){if(w=isUndefined(e.accessKeyId)?process.env.AWS_ACCESS_KEY_ID:e.accessKeyId,T=isUndefined(e.secretKey)?process.env.AWS_SECRET_ACCESS_KEY:e.secretKey,U=isUndefined(e.sessionToken)?process.env.AWS_SESSION_TOKEN:e.sessionToken,isUndefined(e.region))throw console.log("AWS region must be defined when connecting via WebSocket/SigV4; see README.md"),new Error(exceptions.INVALID_CONNECT_OPTIONS);if(isUndefined(w)||isUndefined(T))throw console.log("To connect via WebSocket/SigV4, AWS Access Key ID and AWS Secret Key must be passed either in options or as environment variables; see README.md"),new Error(exceptions.INVALID_CONNECT_OPTIONS);isUndefined(e.port)&&(e.port=443),isUndefined(e.websocketOptions)?e.websocketOptions={protocol:"mqttv3.1"}:e.websocketOptions.protocol="mqttv3.1"}isUndefined(e)||e.debug!==!0||(console.log(e),console.log("attempting new mqtt connection..."));var k={};k.mqtts=require("./lib/tls"),k.wss=require("./lib/ws");const _=new mqtt.MqttClient(s,e);_.on("connect",function(){null===y&&(y=setTimeout(r,D)),E="established",null===A&&(S=g.slice(0),A=setInterval(l,C)),a.emit("connect")}),_.on("close",function(){isUndefined(e)||e.debug!==!0||console.log("connection lost - will attempt reconnection in "+_.options.reconnectPeriod/1e3+" seconds..."),clearTimeout(y),y=null,clearInterval(A),A=null,E="inactive",a.emit("close")}),_.on("reconnect",function(){v*=2,v=Math.min(N,v),_.options.reconnectPeriod=v,a.emit("reconnect")}),_.on("offline",function(){a.emit("offline")}),_.on("error",function(e){a.emit("error",e)}),_.on("message",function(e,n,i){a.emit("message",e,n,i)}),this.publish=function(e,n,i,t){d!==!0||!o()&&null===A?d!==!0&&o()||_.publish(e,n,i,t):c()&&u.push({topic:e,message:n,options:i,callback:t})},this.subscribe=function(e,n,i){o()&&h!==!1?m.length<b?m.push({type:"subscribe",topics:e,options:n,callback:i}):a.emit("error",new Error("Maximum queued offline subscription reached")):(t("subscribe",e,n),isUndefined(i)?_.subscribe(e,n):_.subscribe(e,n,i))},this.unsubscribe=function(n,i){o()&&h!==!1?m.length<b&&m.push({type:"unsubscribe",topics:n,options:e,callback:i}):(t("unsubscribe",n),_.unsubscribe(n,i))},this.end=function(e,n){_.end(e,n)},this.handleMessage=function(e,n){_.handleMessage(e,n)},this.updateWebSocketCredentials=function(e,n,i,t){w=e,T=n,U=i},this.simulateNetworkFailure=function(){_.stream.emit("error",new Error("simulated connection error")),_.stream.end()}}const events=require("events"),inherits=require("util").inherits,mqtt=require("mqtt"),crypto=require("crypto-js"),exceptions=require("./lib/exceptions"),isUndefined=require("../common/lib/is-undefined"),tlsReader=require("../common/lib/tls-reader");inherits(DeviceClient,events.EventEmitter),module.exports=DeviceClient,module.exports.DeviceClient=DeviceClient,module.exports.prepareWebSocketUrl=prepareWebSocketUrl;
}).call(this,require('_process'))
},{"../common/lib/is-undefined":3,"../common/lib/tls-reader":4,"./lib/exceptions":6,"./lib/tls":7,"./lib/ws":8,"_process":80,"crypto-js":26,"events":62,"mqtt":73,"util":113}],6:[function(require,module,exports){
module.exports={INVALID_CONNECT_OPTIONS:"Invalid connect options supplied.",INVALID_CLIENT_ID_OPTION:'Invalid "clientId" (mqtt client id) option supplied.',INVALID_RECONNECT_TIMING:"Invalid reconnect timing options supplied.",INVALID_OFFLINE_QUEUEING_PARAMETERS:"Invalid offline queueing options supplied."};
},{}],7:[function(require,module,exports){
function buildBuilder(r,e){function o(e){r.emit("error",e),n.end()}var n;return n=tls.connect(e),n.on("secureConnect",function(){n.authorized?n.removeListener("error",o):n.emit("error",new Error("TLS not authorized"))}),n.on("error",o),n}var tls=require("tls");module.exports=buildBuilder;
},{"tls":14}],8:[function(require,module,exports){
function buildBuilder(e,t){return websocket(t.url,["mqttv3.1"],t.websocketOptions)}const websocket=require("websocket-stream");module.exports=buildBuilder;
},{"websocket-stream":121}],9:[function(require,module,exports){
module.exports.device=require("./device"),module.exports.thingShadow=require("./thing");
},{"./device":5,"./thing":10}],10:[function(require,module,exports){
function buildThingShadowTopic(e,i,n){return isUndefined(n)?"$aws/things/"+e+"/shadow/"+i:"$aws/things/"+e+"/shadow/"+i+"/"+n}function isReservedTopic(e){return"$aws/things/"===e.substring(0,12)}function isThingShadowTopic(e,i){var n=!1;return"$aws"===e[0]&&("things"!==e[1]||"shadow"!==e[3]||"update"!==e[4]&&"get"!==e[4]&&"delete"!==e[4]||("subscribe"===i?"accepted"!==e[5]&&"rejected"!==e[5]&&"delta"!==e[5]||6!==e.length||(n=!0):5===e.length&&(n=!0))),n}function ThingShadowsClient(e,i){if(!(this instanceof ThingShadowsClient))return new ThingShadowsClient(e,i);var n=this,t=[{}],s=0,o=1e4,r=!0;const d=deviceModule.DeviceClient(e);isUndefined(i)||isUndefined(i.operationTimeout)||(o=i.operationTimeout),this._handleSubscriptions=function(e,i,n,s){for(var o=[],r=0,c=i.length;r<c;r++)for(var a=0,u=i[r].operations.length;a<u;a++)for(var l=0,h=i[r].statii.length;l<h;l++)o.push(buildThingShadowTopic(e,i[r].operations[a],i[r].statii[l]));t[e].debug===!0&&console.log(n+" on "+o);var p=[];p.push(o),"subscribe"===n?(p.push({qos:t[e].qos}),p.push(function(e,i){if(!isUndefined(s)){if(e)return void s(e);for(var n=[],t=0,o=i.length;t<o;t++)128===i[t].qos&&n.push(i[t]);if(n.length>0)return void s("Not all subscriptions were granted",n);s()}})):isUndefined(s)||p.push(s),d[n].apply(d,p)},this._handleMessages=function(i,n,s,o){var r={};try{r=JSON.parse(o.toString())}catch(i){return void(e.debug===!0&&console.error("failed parsing JSON '"+o.toString()+"', "+i))}var d=r.clientToken,c=r.version;if(delete r.clientToken,delete r.version,!isUndefined(c)&&"rejected"!==s)if(isUndefined(t[i].version)||c>=t[i].version)t[i].version=c;else if("delete"!==n&&t[i].discardStale===!0)return void(e.debug===!0&&console.warn("out-of-date version '"+c+"' on '"+i+"' (local version '"+t[i].version+"')"));return"delta"===s?void this.emit("delta",i,r):isUndefined(t[i].clientToken)||t[i].clientToken!==d?void("accepted"===s&&"get"!==n&&this.emit("foreignStateChange",i,n,r)):(clearTimeout(t[i].timeout),delete t[i].timeout,delete t[i].clientToken,t[i].pending=!1,t[i].persistentSubscribe===!1&&this._handleSubscriptions(i,[{operations:[n],statii:["accepted","rejected"]}],"unsubscribe"),void this.emit("status",i,s,d,r))},d.on("connect",function(){n.emit("connect")}),d.on("close",function(){n.emit("close")}),d.on("reconnect",function(){n.emit("reconnect")}),d.on("offline",function(){n.emit("offline")}),d.on("error",function(e){n.emit("error",e)}),d.on("message",function(e,i){if(r===!0){var s=e.split("/");isThingShadowTopic(s,"subscribe")?t.hasOwnProperty(s[2])&&n._handleMessages(s[2],s[4],s[5],i):n.emit("message",e,i)}}),this._thingOperation=function(i,r,c){var a=null;if(t.hasOwnProperty(i))if(t[i].pending===!1){t[i].pending=!0;var u;if(isUndefined(c.clientToken)){var l=e.clientId.length;u=l>48?e.clientId.substr(l-48)+"-"+s++:e.clientId+"-"+s++}else u=c.clientToken;t[i].clientToken=u;var h=buildThingShadowTopic(i,r);t[i].timeout=setTimeout(function(e,i){t[e].persistentSubscribe===!1&&n._handleSubscriptions(e,[{operations:[r],statii:["accepted","rejected"]}],"unsubscribe"),t[e].pending=!1,n.emit("timeout",e,i),delete t[e].timeout,delete t[e].clientToken},o,i,u),t[i].persistentSubscribe===!1?this._handleSubscriptions(i,[{operations:[r],statii:["accepted","rejected"]}],"subscribe",function(e,n){return isUndefined(e)&&isUndefined(n)?void(isUndefined(c)||(!isUndefined(t[i].version)&&t[i].enableVersioning&&(c.version=t[i].version),c.clientToken=u,d.publish(h,JSON.stringify(c),{qos:t[i].qos}),isUndefined(t[i])||t[i].debug!==!0||console.log("publishing '"+JSON.stringify(c)+" on '"+h+"'"))):void console.warn("failed subscription to accepted/rejected topics")}):(!isUndefined(t[i].version)&&t[i].enableVersioning&&(c.version=t[i].version),c.clientToken=u,d.publish(h,JSON.stringify(c),{qos:t[i].qos}),t[i].debug===!0&&console.log("publishing '"+JSON.stringify(c)+" on '"+h+"'")),a=u}else e.debug===!0&&console.error(r+" still in progress on thing: ",i);else e.debug===!0&&console.error("attempting to "+r+" unknown thing: ",i);return a},this.register=function(i,n,s){if(t.hasOwnProperty(i))e.debug===!0&&console.error("thing already registered: ",i);else{var o=!1,r=[];t[i]={persistentSubscribe:!0,debug:!1,discardStale:!0,enableVersioning:!0,qos:0,pending:!0},isUndefined(n)||(isUndefined(n.ignoreDeltas)||(o=n.ignoreDeltas),isUndefined(n.persistentSubscribe)||(t[i].persistentSubscribe=n.persistentSubscribe),isUndefined(n.debug)||(t[i].debug=n.debug),isUndefined(n.discardStale)||(t[i].discardStale=n.discardStale),isUndefined(n.enableVersioning)||(t[i].enableVersioning=n.enableVersioning),isUndefined(n.qos)||(t[i].qos=n.qos)),o===!1&&r.push({operations:["update"],statii:["delta"]}),t[i].persistentSubscribe===!0&&r.push({operations:["update","get","delete"],statii:["accepted","rejected"]}),r.length>0?this._handleSubscriptions(i,r,"subscribe",function(e,n){isUndefined(e)&&isUndefined(n)&&(t[i].pending=!1),isUndefined(s)||s(e,n)}):(t[i].pending=!1,isUndefined(s)||s())}},this.unregister=function(i){if(t.hasOwnProperty(i)){var n=[];n.push({operations:["update"],statii:["delta"]}),t[i].persistentSubscribe===!0&&n.push({operations:["update","get","delete"],statii:["accepted","rejected"]}),this._handleSubscriptions(i,n,"unsubscribe"),isUndefined(t[i].timeout)||clearTimeout(t[i].timeout),delete t[i]}else e.debug===!0&&console.error("attempting to unregister unknown thing: ",i)},this.update=function(e,i){var t=null;return isUndefined(i.version)?t=n._thingOperation(e,"update",i):console.error("message can't contain 'version' property"),t},this.get=function(e,i){var t={};return isUndefined(i)||(t.clientToken=i),n._thingOperation(e,"get",t)},this.delete=function(e,i){var t={};return isUndefined(i)||(t.clientToken=i),n._thingOperation(e,"delete",t)},this.publish=function(e,i,n,t){if(isReservedTopic(e))throw"cannot publish to reserved topic '"+e+"'";d.publish(e,i,n,t)},this.subscribe=function(e,i,n){var t=[];"string"==typeof e?t.push(e):"object"==typeof e&&e.length&&(t=e);for(var s=0;s<t.length;s++)if(isReservedTopic(t[s]))throw"cannot subscribe to topic array since one of them is a reserved topic '"+t[s]+"'";d.subscribe(t,i,n)},this.unsubscribe=function(e,i){var n=[];"string"==typeof e?n.push(e):"object"==typeof e&&e.length&&(n=e);for(var t=0;t<n.length;t++)if(isReservedTopic(n[t]))throw"cannot unsubscribe from topic array since one of them is a reserved topic '"+n[t]+"'";d.unsubscribe(n,i)},this.end=function(e,i){d.end(e,i)},this.updateWebSocketCredentials=function(e,i,n,t){d.updateWebSocketCredentials(e,i,n,t)},this.setConnectionStatus=function(e){r=e},events.EventEmitter.call(this)}const events=require("events"),inherits=require("util").inherits,deviceModule=require("../device"),isUndefined=require("../common/lib/is-undefined");inherits(ThingShadowsClient,events.EventEmitter),module.exports=ThingShadowsClient;
},{"../common/lib/is-undefined":3,"../device":5,"events":62,"util":113}],11:[function(require,module,exports){
"use strict";function placeHoldersCount(o){var r=o.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===o[r-2]?2:"="===o[r-1]?1:0}function byteLength(o){return 3*o.length/4-placeHoldersCount(o)}function toByteArray(o){var r,e,t,u,n,p,a=o.length;n=placeHoldersCount(o),p=new Arr(3*a/4-n),t=n>0?a-4:a;var l=0;for(r=0,e=0;r<t;r+=4,e+=3)u=revLookup[o.charCodeAt(r)]<<18|revLookup[o.charCodeAt(r+1)]<<12|revLookup[o.charCodeAt(r+2)]<<6|revLookup[o.charCodeAt(r+3)],p[l++]=u>>16&255,p[l++]=u>>8&255,p[l++]=255&u;return 2===n?(u=revLookup[o.charCodeAt(r)]<<2|revLookup[o.charCodeAt(r+1)]>>4,p[l++]=255&u):1===n&&(u=revLookup[o.charCodeAt(r)]<<10|revLookup[o.charCodeAt(r+1)]<<4|revLookup[o.charCodeAt(r+2)]>>2,p[l++]=u>>8&255,p[l++]=255&u),p}function tripletToBase64(o){return lookup[o>>18&63]+lookup[o>>12&63]+lookup[o>>6&63]+lookup[63&o]}function encodeChunk(o,r,e){for(var t,u=[],n=r;n<e;n+=3)t=(o[n]<<16)+(o[n+1]<<8)+o[n+2],u.push(tripletToBase64(t));return u.join("")}function fromByteArray(o){for(var r,e=o.length,t=e%3,u="",n=[],p=16383,a=0,l=e-t;a<l;a+=p)n.push(encodeChunk(o,a,a+p>l?l:a+p));return 1===t?(r=o[e-1],u+=lookup[r>>2],u+=lookup[r<<4&63],u+="=="):2===t&&(r=(o[e-2]<<8)+o[e-1],u+=lookup[r>>10],u+=lookup[r>>4&63],u+=lookup[r<<2&63],u+="="),n.push(u),n.join("")}exports.byteLength=byteLength,exports.toByteArray=toByteArray,exports.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63;
},{}],12:[function(require,module,exports){
(function (Buffer){
function BufferList(t){if(!(this instanceof BufferList))return new BufferList(t);if(this._bufs=[],this.length=0,"function"==typeof t){this._callback=t;var e=function(t){this._callback&&(this._callback(t),this._callback=null)}.bind(this);this.on("pipe",function(t){t.on("error",e)}),this.on("unpipe",function(t){t.removeListener("error",e)})}else Buffer.isBuffer(t)?this.append(t):Array.isArray(t)&&t.forEach(function(t){Buffer.isBuffer(t)&&this.append(t)}.bind(this));DuplexStream.call(this)}var DuplexStream=require("readable-stream/duplex"),util=require("util");util.inherits(BufferList,DuplexStream),BufferList.prototype._offset=function(t){for(var e,i=0,r=0;r<this._bufs.length;r++){if(e=i+this._bufs[r].length,t<e)return[r,t-i];i=e}},BufferList.prototype.append=function(t){var e=Buffer.isBuffer(t)||t instanceof BufferList;return"number"==typeof t&&(t=t.toString()),this._bufs.push(e?t:new Buffer(t)),this.length+=t.length,this},BufferList.prototype._write=function(t,e,i){this.append(t),i&&i()},BufferList.prototype._read=function(t){return this.length?(t=Math.min(t,this.length),this.push(this.slice(0,t)),void this.consume(t)):this.push(null)},BufferList.prototype.end=function(t){DuplexStream.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)},BufferList.prototype.get=function(t){return this.slice(t,t+1)[0]},BufferList.prototype.slice=function(t,e){return this.copy(null,0,t,e)},BufferList.prototype.copy=function(t,e,i,r){if(("number"!=typeof i||i<0)&&(i=0),("number"!=typeof r||r>this.length)&&(r=this.length),i>=this.length)return t||new Buffer(0);if(r<=0)return t||new Buffer(0);var s,f,n=!!t,u=this._offset(i),h=r-i,o=h,l=n&&e||0,a=u[1];if(0===i&&r==this.length){if(!n)return Buffer.concat(this._bufs);for(f=0;f<this._bufs.length;f++)this._bufs[f].copy(t,l),l+=this._bufs[f].length;return t}if(o<=this._bufs[u[0]].length-a)return n?this._bufs[u[0]].copy(t,e,a,a+o):this._bufs[u[0]].slice(a,a+o);for(n||(t=new Buffer(h)),f=u[0];f<this._bufs.length;f++){if(s=this._bufs[f].length-a,!(o>s)){this._bufs[f].copy(t,l,a,a+o);break}this._bufs[f].copy(t,l,a),l+=s,o-=s,a&&(a=0)}return t},BufferList.prototype.toString=function(t,e,i){return this.slice(e,i).toString(t)},BufferList.prototype.consume=function(t){for(;this._bufs.length;){if(!(t>this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},BufferList.prototype.duplicate=function(){for(var t=0,e=new BufferList;t<this._bufs.length;t++)e.append(this._bufs[t]);return e},BufferList.prototype.destroy=function(){this._bufs.length=0,this.length=0,this.push(null)},function(){var t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1};for(var e in t)!function(e){BufferList.prototype[e]=function(i){return this.slice(i,i+t[e])[e](0)}}(e)}(),module.exports=BufferList;
}).call(this,require("buffer").Buffer)
},{"buffer":16,"readable-stream/duplex":85,"util":113}],13:[function(require,module,exports){
},{}],14:[function(require,module,exports){
},{}],15:[function(require,module,exports){
(function (global){
"use strict";var buffer=require("buffer"),Buffer=buffer.Buffer,SlowBuffer=buffer.SlowBuffer,MAX_LEN=buffer.kMaxLength||2147483647;exports.alloc=function(r,e,f){if("function"==typeof Buffer.alloc)return Buffer.alloc(r,e,f);if("number"==typeof f)throw new TypeError("encoding must not be number");if("number"!=typeof r)throw new TypeError("size must be a number");if(r>MAX_LEN)throw new RangeError("size is too large");var n=f,o=e;void 0===o&&(n=void 0,o=0);var t=new Buffer(r);if("string"==typeof o)for(var u=new Buffer(o,n),i=u.length,a=-1;++a<r;)t[a]=u[a%i];else t.fill(o);return t},exports.allocUnsafe=function(r){if("function"==typeof Buffer.allocUnsafe)return Buffer.allocUnsafe(r);if("number"!=typeof r)throw new TypeError("size must be a number");if(r>MAX_LEN)throw new RangeError("size is too large");return new Buffer(r)},exports.from=function(r,e,f){if("function"==typeof Buffer.from&&(!global.Uint8Array||Uint8Array.from!==Buffer.from))return Buffer.from(r,e,f);if("number"==typeof r)throw new TypeError('"value" argument must not be a number');if("string"==typeof r)return new Buffer(r,e);if("undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer){var n=e;if(1===arguments.length)return new Buffer(r);"undefined"==typeof n&&(n=0);var o=f;if("undefined"==typeof o&&(o=r.byteLength-n),n>=r.byteLength)throw new RangeError("'offset' is out of bounds");if(o>r.byteLength-n)throw new RangeError("'length' is out of bounds");return new Buffer(r.slice(n,n+o))}if(Buffer.isBuffer(r)){var t=new Buffer(r.length);return r.copy(t,0,0,r.length),t}if(r){if(Array.isArray(r)||"undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return new Buffer(r);if("Buffer"===r.type&&Array.isArray(r.data))return new Buffer(r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},exports.allocUnsafeSlow=function(r){if("function"==typeof Buffer.allocUnsafeSlow)return Buffer.allocUnsafeSlow(r);if("number"!=typeof r)throw new TypeError("size must be a number");if(r>=MAX_LEN)throw new RangeError("size is too large");return new SlowBuffer(r)};
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"buffer":16}],16:[function(require,module,exports){
(function (global){
"use strict";function typedArraySupport(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(t,e){if(kMaxLength()<e)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=Buffer.prototype):(null===t&&(t=new Buffer(e)),t.length=e),t}function Buffer(t,e,r){if(!(Buffer.TYPED_ARRAY_SUPPORT||this instanceof Buffer))return new Buffer(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,t)}return from(this,t,e,r)}function from(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?fromArrayBuffer(t,e,r,n):"string"==typeof e?fromString(t,e,r):fromObject(t,e)}function assertSize(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function alloc(t,e,r,n){return assertSize(e),e<=0?createBuffer(t,e):void 0!==r?"string"==typeof n?createBuffer(t,e).fill(r,n):createBuffer(t,e).fill(r):createBuffer(t,e)}function allocUnsafe(t,e){if(assertSize(e),t=createBuffer(t,e<0?0:0|checked(e)),!Buffer.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function fromString(t,e,r){if("string"==typeof r&&""!==r||(r="utf8"),!Buffer.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|byteLength(e,r);t=createBuffer(t,n);var f=t.write(e,r);return f!==n&&(t=t.slice(0,f)),t}function fromArrayLike(t,e){var r=e.length<0?0:0|checked(e.length);t=createBuffer(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function fromArrayBuffer(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),Buffer.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=Buffer.prototype):t=fromArrayLike(t,e),t}function fromObject(t,e){if(Buffer.isBuffer(e)){var r=0|checked(e.length);return t=createBuffer(t,r),0===t.length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||isnan(e.length)?createBuffer(t,0):fromArrayLike(t,e);if("Buffer"===e.type&&isArray(e.data))return fromArrayLike(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(t){if(t>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|t}function SlowBuffer(t){return+t!=t&&(t=0),Buffer.alloc(+t)}function byteLength(t,e){if(Buffer.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return utf8ToBytes(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(t).length;default:if(n)return utf8ToBytes(t).length;e=(""+e).toLowerCase(),n=!0}}function slowToString(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return hexSlice(this,e,r);case"utf8":case"utf-8":return utf8Slice(this,e,r);case"ascii":return asciiSlice(this,e,r);case"latin1":case"binary":return latin1Slice(this,e,r);case"base64":return base64Slice(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function swap(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function bidirectionalIndexOf(t,e,r,n,f){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=f?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(f)return-1;r=t.length-1}else if(r<0){if(!f)return-1;r=0}if("string"==typeof e&&(e=Buffer.from(e,n)),Buffer.isBuffer(e))return 0===e.length?-1:arrayIndexOf(t,e,r,n,f);if("number"==typeof e)return e&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?f?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):arrayIndexOf(t,[e],r,n,f);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(t,e,r,n,f){function i(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}var o=1,u=t.length,s=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,u/=2,s/=2,r/=2}var a;if(f){var h=-1;for(a=r;a<u;a++)if(i(t,a)===i(e,h===-1?0:a-h)){if(h===-1&&(h=a),a-h+1===s)return h*o}else h!==-1&&(a-=a-h),h=-1}else for(r+s>u&&(r=u-s),a=r;a>=0;a--){for(var c=!0,l=0;l<s;l++)if(i(t,a+l)!==i(e,l)){c=!1;break}if(c)return a}return-1}function hexWrite(t,e,r,n){r=Number(r)||0;var f=t.length-r;n?(n=Number(n),n>f&&(n=f)):n=f;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;o<n;++o){var u=parseInt(e.substr(2*o,2),16);if(isNaN(u))return o;t[r+o]=u}return o}function utf8Write(t,e,r,n){return blitBuffer(utf8ToBytes(e,t.length-r),t,r,n)}function asciiWrite(t,e,r,n){return blitBuffer(asciiToBytes(e),t,r,n)}function latin1Write(t,e,r,n){return asciiWrite(t,e,r,n)}function base64Write(t,e,r,n){return blitBuffer(base64ToBytes(e),t,r,n)}function ucs2Write(t,e,r,n){return blitBuffer(utf16leToBytes(e,t.length-r),t,r,n)}function base64Slice(t,e,r){return 0===e&&r===t.length?base64.fromByteArray(t):base64.fromByteArray(t.slice(e,r))}function utf8Slice(t,e,r){r=Math.min(t.length,r);for(var n=[],f=e;f<r;){var i=t[f],o=null,u=i>239?4:i>223?3:i>191?2:1;if(f+u<=r){var s,a,h,c;switch(u){case 1:i<128&&(o=i);break;case 2:s=t[f+1],128===(192&s)&&(c=(31&i)<<6|63&s,c>127&&(o=c));break;case 3:s=t[f+1],a=t[f+2],128===(192&s)&&128===(192&a)&&(c=(15&i)<<12|(63&s)<<6|63&a,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:s=t[f+1],a=t[f+2],h=t[f+3],128===(192&s)&&128===(192&a)&&128===(192&h)&&(c=(15&i)<<18|(63&s)<<12|(63&a)<<6|63&h,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,u=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),f+=u}return decodeCodePointsArray(n)}function decodeCodePointsArray(t){var e=t.length;if(e<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=MAX_ARGUMENTS_LENGTH));return r}function asciiSlice(t,e,r){var n="";r=Math.min(t.length,r);for(var f=e;f<r;++f)n+=String.fromCharCode(127&t[f]);return n}function latin1Slice(t,e,r){var n="";r=Math.min(t.length,r);for(var f=e;f<r;++f)n+=String.fromCharCode(t[f]);return n}function hexSlice(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var f="",i=e;i<r;++i)f+=toHex(t[i]);return f}function utf16leSlice(t,e,r){for(var n=t.slice(e,r),f="",i=0;i<n.length;i+=2)f+=String.fromCharCode(n[i]+256*n[i+1]);return f}function checkOffset(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function checkInt(t,e,r,n,f,i){if(!Buffer.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>f||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function objectWriteUInt16(t,e,r,n){e<0&&(e=65535+e+1);for(var f=0,i=Math.min(t.length-r,2);f<i;++f)t[r+f]=(e&255<<8*(n?f:1-f))>>>8*(n?f:1-f)}function objectWriteUInt32(t,e,r,n){e<0&&(e=4294967295+e+1);for(var f=0,i=Math.min(t.length-r,4);f<i;++f)t[r+f]=e>>>8*(n?f:3-f)&255}function checkIEEE754(t,e,r,n,f,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(t,e,r,n,f){return f||checkIEEE754(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(t,e,r,n,23,4),r+4}function writeDouble(t,e,r,n,f){return f||checkIEEE754(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(t,e,r,n,52,8),r+8}function base64clean(t){if(t=stringtrim(t).replace(INVALID_BASE64_RE,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function stringtrim(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function toHex(t){return t<16?"0"+t.toString(16):t.toString(16)}function utf8ToBytes(t,e){e=e||1/0;for(var r,n=t.length,f=null,i=[],o=0;o<n;++o){if(r=t.charCodeAt(o),r>55295&&r<57344){if(!f){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&i.push(239,191,189);continue}f=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),f=r;continue}r=(f-55296<<10|r-56320)+65536}else f&&(e-=3)>-1&&i.push(239,191,189);if(f=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function asciiToBytes(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function utf16leToBytes(t,e){for(var r,n,f,i=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,f=r%256,i.push(f),i.push(n);return i}function base64ToBytes(t){return base64.toByteArray(base64clean(t))}function blitBuffer(t,e,r,n){for(var f=0;f<n&&!(f+r>=e.length||f>=t.length);++f)e[f+r]=t[f];return f}function isnan(t){return t!==t}var base64=require("base64-js"),ieee754=require("ieee754"),isArray=require("isarray");exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==global.TYPED_ARRAY_SUPPORT?global.TYPED_ARRAY_SUPPORT:typedArraySupport(),exports.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(t){return t.__proto__=Buffer.prototype,t},Buffer.from=function(t,e,r){return from(null,t,e,r)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(t,e,r){return alloc(null,t,e,r)},Buffer.allocUnsafe=function(t){return allocUnsafe(null,t)},Buffer.allocUnsafeSlow=function(t){return allocUnsafe(null,t)},Buffer.isBuffer=function(t){return!(null==t||!t._isBuffer)},Buffer.compare=function(t,e){if(!Buffer.isBuffer(t)||!Buffer.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,f=0,i=Math.min(r,n);f<i;++f)if(t[f]!==e[f]){r=t[f],n=e[f];break}return r<n?-1:n<r?1:0},Buffer.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(t,e){if(!isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return Buffer.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=Buffer.allocUnsafe(e),f=0;for(r=0;r<t.length;++r){var i=t[r];if(!Buffer.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,f),f+=i.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.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 e=0;e<t;e+=2)swap(this,e,e+1);return this},Buffer.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)swap(this,e,e+3),swap(this,e+1,e+2);return this},Buffer.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)swap(this,e,e+7),swap(this,e+1,e+6),swap(this,e+2,e+5),swap(this,e+3,e+4);return this},Buffer.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?utf8Slice(this,0,t):slowToString.apply(this,arguments)},Buffer.prototype.equals=function(t){if(!Buffer.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===Buffer.compare(this,t)},Buffer.prototype.inspect=function(){var t="",e=exports.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},Buffer.prototype.compare=function(t,e,r,n,f){if(!Buffer.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===f&&(f=this.length),e<0||r>t.length||n<0||f>this.length)throw new RangeError("out of range index");if(n>=f&&e>=r)return 0;if(n>=f)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,f>>>=0,this===t)return 0;for(var i=f-n,o=r-e,u=Math.min(i,o),s=this.slice(n,f),a=t.slice(e,r),h=0;h<u;++h)if(s[h]!==a[h]){i=s[h],o=a[h];break}return i<o?-1:o<i?1:0},Buffer.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},Buffer.prototype.indexOf=function(t,e,r){return bidirectionalIndexOf(this,t,e,r,!0)},Buffer.prototype.lastIndexOf=function(t,e,r){return bidirectionalIndexOf(this,t,e,r,!1)},Buffer.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var f=this.length-e;if((void 0===r||r>f)&&(r=f),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return hexWrite(this,t,e,r);case"utf8":case"utf-8":return utf8Write(this,t,e,r);case"ascii":return asciiWrite(this,t,e,r);case"latin1":case"binary":return latin1Write(this,t,e,r);case"base64":return base64Write(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e<t&&(e=t);var n;if(Buffer.TYPED_ARRAY_SUPPORT)n=this.subarray(t,e),n.__proto__=Buffer.prototype;else{var f=e-t;n=new Buffer(f,void 0);for(var i=0;i<f;++i)n[i]=this[i+t]}return n},Buffer.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t],f=1,i=0;++i<e&&(f*=256);)n+=this[t+i]*f;return n},Buffer.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t+--e],f=1;e>0&&(f*=256);)n+=this[t+--e]*f;return n},Buffer.prototype.readUInt8=function(t,e){return e||checkOffset(t,1,this.length),this[t]},Buffer.prototype.readUInt16LE=function(t,e){return e||checkOffset(t,2,this.length),this[t]|this[t+1]<<8},Buffer.prototype.readUInt16BE=function(t,e){return e||checkOffset(t,2,this.length),this[t]<<8|this[t+1]},Buffer.prototype.readUInt32LE=function(t,e){return e||checkOffset(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Buffer.prototype.readUInt32BE=function(t,e){return e||checkOffset(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Buffer.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=this[t],f=1,i=0;++i<e&&(f*=256);)n+=this[t+i]*f;return f*=128,n>=f&&(n-=Math.pow(2,8*e)),n},Buffer.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||checkOffset(t,e,this.length);for(var n=e,f=1,i=this[t+--n];n>0&&(f*=256);)i+=this[t+--n]*f;return f*=128,i>=f&&(i-=Math.pow(2,8*e)),i},Buffer.prototype.readInt8=function(t,e){return e||checkOffset(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},Buffer.prototype.readInt16LE=function(t,e){e||checkOffset(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(t,e){e||checkOffset(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(t,e){return e||checkOffset(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Buffer.prototype.readInt32BE=function(t,e){return e||checkOffset(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Buffer.prototype.readFloatLE=function(t,e){return e||checkOffset(t,4,this.length),ieee754.read(this,t,!0,23,4)},Buffer.prototype.readFloatBE=function(t,e){return e||checkOffset(t,4,this.length),ieee754.read(this,t,!1,23,4)},Buffer.prototype.readDoubleLE=function(t,e){return e||checkOffset(t,8,this.length),ieee754.read(this,t,!0,52,8)},Buffer.prototype.readDoubleBE=function(t,e){return e||checkOffset(t,8,this.length),ieee754.read(this,t,!1,52,8)},Buffer.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var f=Math.pow(2,8*r)-1;checkInt(this,t,e,r,f,0)}var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},Buffer.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var f=Math.pow(2,8*r)-1;checkInt(this,t,e,r,f,0)}var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},Buffer.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},Buffer.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,t,e,r,f-1,-f)}var i=0,o=1,u=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===u&&0!==this[e+i-1]&&(u=1),this[e+i]=(t/o>>0)-u&255;return e+r},Buffer.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,t,e,r,f-1,-f)}var i=r-1,o=1,u=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===u&&0!==this[e+i+1]&&(u=1),this[e+i]=(t/o>>0)-u&255;return e+r},Buffer.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},Buffer.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):objectWriteUInt16(this,t,e,!0),e+2},Buffer.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):objectWriteUInt16(this,t,e,!1),e+2},Buffer.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):objectWriteUInt32(this,t,e,!0),e+4},Buffer.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||checkInt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Buffer.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):objectWriteUInt32(this,t,e,!1),e+4},Buffer.prototype.writeFloatLE=function(t,e,r){return writeFloat(this,t,e,!0,r)},Buffer.prototype.writeFloatBE=function(t,e,r){return writeFloat(this,t,e,!1,r)},Buffer.prototype.writeDoubleLE=function(t,e,r){return writeDouble(this,t,e,!0,r)},Buffer.prototype.writeDoubleBE=function(t,e,r){return writeDouble(this,t,e,!1,r)},Buffer.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var f,i=n-r;if(this===t&&r<e&&e<n)for(f=i-1;f>=0;--f)t[f+e]=this[f+r];else if(i<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(f=0;f<i;++f)t[f+e]=this[f+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},Buffer.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var f=t.charCodeAt(0);f<256&&(t=f)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var i;if("number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var o=Buffer.isBuffer(t)?t:utf8ToBytes(new Buffer(t,n).toString()),u=o.length;for(i=0;i<r-e;++i)this[i+e]=o[i%u]}return this};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"base64-js":11,"ieee754":63,"isarray":66}],17:[function(require,module,exports){
(function (Buffer){
function isArray(r){return Array.isArray?Array.isArray(r):"[object Array]"===objectToString(r)}function isBoolean(r){return"boolean"==typeof r}function isNull(r){return null===r}function isNullOrUndefined(r){return null==r}function isNumber(r){return"number"==typeof r}function isString(r){return"string"==typeof r}function isSymbol(r){return"symbol"==typeof r}function isUndefined(r){return void 0===r}function isRegExp(r){return"[object RegExp]"===objectToString(r)}function isObject(r){return"object"==typeof r&&null!==r}function isDate(r){return"[object Date]"===objectToString(r)}function isError(r){return"[object Error]"===objectToString(r)||r instanceof Error}function isFunction(r){return"function"==typeof r}function isPrimitive(r){return null===r||"boolean"==typeof r||"number"==typeof r||"string"==typeof r||"symbol"==typeof r||"undefined"==typeof r}function objectToString(r){return Object.prototype.toString.call(r)}exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=Buffer.isBuffer;
}).call(this,{"isBuffer":require("../../is-buffer/index.js")})
},{"../../is-buffer/index.js":65}],18:[function(require,module,exports){
!function(e,r,o){"object"==typeof exports?module.exports=exports=r(require("./core"),require("./enc-base64"),require("./md5"),require("./evpkdf"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],r):r(e.CryptoJS)}(this,function(e){return function(){var r=e,o=r.lib,i=o.BlockCipher,t=r.algo,n=[],c=[],a=[],f=[],s=[],d=[],u=[],v=[],h=[],p=[];!function(){for(var e=[],r=0;r<256;r++)r<128?e[r]=r<<1:e[r]=r<<1^283;for(var o=0,i=0,r=0;r<256;r++){var t=i^i<<1^i<<2^i<<3^i<<4;t=t>>>8^255&t^99,n[o]=t,c[t]=o;var l=e[o],y=e[l],k=e[y],_=257*e[t]^16843008*t;a[o]=_<<24|_>>>8,f[o]=_<<16|_>>>16,s[o]=_<<8|_>>>24,d[o]=_;var _=16843009*k^65537*y^257*l^16843008*o;u[t]=_<<24|_>>>8,v[t]=_<<16|_>>>16,h[t]=_<<8|_>>>24,p[t]=_,o?(o=l^e[e[e[k^l]]],i^=e[e[i]]):o=i=1}}();var l=[0,1,2,4,8,16,32,64,128,27,54],y=t.AES=i.extend({_doReset:function(){for(var e=this._key,r=e.words,o=e.sigBytes/4,i=this._nRounds=o+6,t=4*(i+1),c=this._keySchedule=[],a=0;a<t;a++)if(a<o)c[a]=r[a];else{var f=c[a-1];a%o?o>6&&a%o==4&&(f=n[f>>>24]<<24|n[f>>>16&255]<<16|n[f>>>8&255]<<8|n[255&f]):(f=f<<8|f>>>24,f=n[f>>>24]<<24|n[f>>>16&255]<<16|n[f>>>8&255]<<8|n[255&f],f^=l[a/o|0]<<24),c[a]=c[a-o]^f}for(var s=this._invKeySchedule=[],d=0;d<t;d++){var a=t-d;if(d%4)var f=c[a];else var f=c[a-4];d<4||a<=4?s[d]=f:s[d]=u[n[f>>>24]]^v[n[f>>>16&255]]^h[n[f>>>8&255]]^p[n[255&f]]}},encryptBlock:function(e,r){this._doCryptBlock(e,r,this._keySchedule,a,f,s,d,n)},decryptBlock:function(e,r){var o=e[r+1];e[r+1]=e[r+3],e[r+3]=o,this._doCryptBlock(e,r,this._invKeySchedule,u,v,h,p,c);var o=e[r+1];e[r+1]=e[r+3],e[r+3]=o},_doCryptBlock:function(e,r,o,i,t,n,c,a){for(var f=this._nRounds,s=e[r]^o[0],d=e[r+1]^o[1],u=e[r+2]^o[2],v=e[r+3]^o[3],h=4,p=1;p<f;p++){var l=i[s>>>24]^t[d>>>16&255]^n[u>>>8&255]^c[255&v]^o[h++],y=i[d>>>24]^t[u>>>16&255]^n[v>>>8&255]^c[255&s]^o[h++],k=i[u>>>24]^t[v>>>16&255]^n[s>>>8&255]^c[255&d]^o[h++],_=i[v>>>24]^t[s>>>16&255]^n[d>>>8&255]^c[255&u]^o[h++];s=l,d=y,u=k,v=_}var l=(a[s>>>24]<<24|a[d>>>16&255]<<16|a[u>>>8&255]<<8|a[255&v])^o[h++],y=(a[d>>>24]<<24|a[u>>>16&255]<<16|a[v>>>8&255]<<8|a[255&s])^o[h++],k=(a[u>>>24]<<24|a[v>>>16&255]<<16|a[s>>>8&255]<<8|a[255&d])^o[h++],_=(a[v>>>24]<<24|a[s>>>16&255]<<16|a[d>>>8&255]<<8|a[255&u])^o[h++];e[r]=l,e[r+1]=y,e[r+2]=k,e[r+3]=_},keySize:8});r.AES=i._createHelper(y)}(),e.AES});
},{"./cipher-core":19,"./core":20,"./enc-base64":21,"./evpkdf":23,"./md5":28}],19:[function(require,module,exports){
!function(e,t){"object"==typeof exports?module.exports=exports=t(require("./core")):"function"==typeof define&&define.amd?define(["./core"],t):t(e.CryptoJS)}(this,function(e){e.lib.Cipher||function(t){var r=e,i=r.lib,n=i.Base,c=i.WordArray,o=i.BufferedBlockAlgorithm,s=r.enc,a=(s.Utf8,s.Base64),f=r.algo,p=f.EvpKDF,d=i.Cipher=o.extend({cfg:n.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?B:k}return function(t){return{encrypt:function(r,i,n){return e(i).encrypt(t,r,i,n)},decrypt:function(r,i,n){return e(i).decrypt(t,r,i,n)}}}}()}),h=(i.StreamCipher=d.extend({_doFinalize:function(){var e=this._process(!0);return e},blockSize:1}),r.mode={}),u=i.BlockCipherMode=n.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),l=h.CBC=function(){function e(e,r,i){var n=this._iv;if(n){var c=n;this._iv=t}else var c=this._prevBlock;for(var o=0;o<i;o++)e[r+o]^=c[o]}var r=u.extend();return r.Encryptor=r.extend({processBlock:function(t,r){var i=this._cipher,n=i.blockSize;e.call(this,t,r,n),i.encryptBlock(t,r),this._prevBlock=t.slice(r,r+n)}}),r.Decryptor=r.extend({processBlock:function(t,r){var i=this._cipher,n=i.blockSize,c=t.slice(r,r+n);i.decryptBlock(t,r),e.call(this,t,r,n),this._prevBlock=c}}),r}(),_=r.pad={},v=_.Pkcs7={pad:function(e,t){for(var r=4*t,i=r-e.sigBytes%r,n=i<<24|i<<16|i<<8|i,o=[],s=0;s<i;s+=4)o.push(n);var a=c.create(o,i);e.concat(a)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},y=(i.BlockCipher=d.extend({cfg:d.cfg.extend({mode:l,padding:v}),reset:function(){d.reset.call(this);var e=this.cfg,t=e.iv,r=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var i=r.createEncryptor;else{var i=r.createDecryptor;this._minBufferSize=1}this._mode=i.call(r,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else{var t=this._process(!0);e.unpad(t)}return t},blockSize:4}),i.CipherParams=n.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),x=r.format={},g=x.OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;if(r)var i=c.create([1398893684,1701076831]).concat(r).concat(t);else var i=t;return i.toString(a)},parse:function(e){var t=a.parse(e),r=t.words;if(1398893684==r[0]&&1701076831==r[1]){var i=c.create(r.slice(2,4));r.splice(0,4),t.sigBytes-=16}return y.create({ciphertext:t,salt:i})}},k=i.SerializableCipher=n.extend({cfg:n.extend({format:g}),encrypt:function(e,t,r,i){i=this.cfg.extend(i);var n=e.createEncryptor(r,i),c=n.finalize(t),o=n.cfg;return y.create({ciphertext:c,key:r,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,r,i){i=this.cfg.extend(i),t=this._parse(t,i.format);var n=e.createDecryptor(r,i).finalize(t.ciphertext);return n},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),m=r.kdf={},S=m.OpenSSL={execute:function(e,t,r,i){i||(i=c.random(8));var n=p.create({keySize:t+r}).compute(e,i),o=c.create(n.words.slice(t),4*r);return n.sigBytes=4*t,y.create({key:n,iv:o,salt:i})}},B=i.PasswordBasedCipher=k.extend({cfg:k.cfg.extend({kdf:S}),encrypt:function(e,t,r,i){i=this.cfg.extend(i);var n=i.kdf.execute(r,e.keySize,e.ivSize);i.iv=n.iv;var c=k.encrypt.call(this,e,t,n.key,i);return c.mixIn(n),c},decrypt:function(e,t,r,i){i=this.cfg.extend(i),t=this._parse(t,i.format);var n=i.kdf.execute(r,e.keySize,e.ivSize,t.salt);i.iv=n.iv;var c=k.decrypt.call(this,e,t,n.key,i);return c}})}()});
},{"./core":20}],20:[function(require,module,exports){
!function(t,n){"object"==typeof exports?module.exports=exports=n():"function"==typeof define&&define.amd?define([],n):t.CryptoJS=n()}(this,function(){var t=t||function(t,n){var i={},e=i.lib={},r=e.Base=function(){function t(){}return{extend:function(n){t.prototype=this;var i=new t;return n&&i.mixIn(n),i.hasOwnProperty("init")||(i.init=function(){i.$super.init.apply(this,arguments)}),i.init.prototype=i,i.$super=this,i},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),s=e.WordArray=r.extend({init:function(t,i){t=this.words=t||[],i!=n?this.sigBytes=i:this.sigBytes=4*t.length},toString:function(t){return(t||a).stringify(this)},concat:function(t){var n=this.words,i=t.words,e=this.sigBytes,r=t.sigBytes;if(this.clamp(),e%4)for(var s=0;s<r;s++){var o=i[s>>>2]>>>24-s%4*8&255;n[e+s>>>2]|=o<<24-(e+s)%4*8}else for(var s=0;s<r;s+=4)n[e+s>>>2]=i[s>>>2];return this.sigBytes+=r,this},clamp:function(){var n=this.words,i=this.sigBytes;n[i>>>2]&=4294967295<<32-i%4*8,n.length=t.ceil(i/4)},clone:function(){var t=r.clone.call(this);return t.words=this.words.slice(0),t},random:function(n){for(var i,e=[],r=function(n){var n=n,i=987654321,e=4294967295;return function(){i=36969*(65535&i)+(i>>16)&e,n=18e3*(65535&n)+(n>>16)&e;var r=(i<<16)+n&e;return r/=4294967296,r+=.5,r*(t.random()>.5?1:-1)}},o=0;o<n;o+=4){var a=r(4294967296*(i||t.random()));i=987654071*a(),e.push(4294967296*a()|0)}return new s.init(e,n)}}),o=i.enc={},a=o.Hex={stringify:function(t){for(var n=t.words,i=t.sigBytes,e=[],r=0;r<i;r++){var s=n[r>>>2]>>>24-r%4*8&255;e.push((s>>>4).toString(16)),e.push((15&s).toString(16))}return e.join("")},parse:function(t){for(var n=t.length,i=[],e=0;e<n;e+=2)i[e>>>3]|=parseInt(t.substr(e,2),16)<<24-e%8*4;return new s.init(i,n/2)}},c=o.Latin1={stringify:function(t){for(var n=t.words,i=t.sigBytes,e=[],r=0;r<i;r++){var s=n[r>>>2]>>>24-r%4*8&255;e.push(String.fromCharCode(s))}return e.join("")},parse:function(t){for(var n=t.length,i=[],e=0;e<n;e++)i[e>>>2]|=(255&t.charCodeAt(e))<<24-e%4*8;return new s.init(i,n)}},u=o.Utf8={stringify:function(t){try{return decodeURIComponent(escape(c.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return c.parse(unescape(encodeURIComponent(t)))}},f=e.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=u.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(n){var i=this._data,e=i.words,r=i.sigBytes,o=this.blockSize,a=4*o,c=r/a;c=n?t.ceil(c):t.max((0|c)-this._minBufferSize,0);var u=c*o,f=t.min(4*u,r);if(u){for(var h=0;h<u;h+=o)this._doProcessBlock(e,h);var p=e.splice(0,u);i.sigBytes-=f}return new s.init(p,f)},clone:function(){var t=r.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),h=(e.Hasher=f.extend({cfg:r.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var n=this._doFinalize();return n},blockSize:16,_createHelper:function(t){return function(n,i){return new t.init(i).finalize(n)}},_createHmacHelper:function(t){return function(n,i){return new h.HMAC.init(t,i).finalize(n)}}}),i.algo={});return i}(Math);return t});
},{}],21:[function(require,module,exports){
!function(r,e){"object"==typeof exports?module.exports=exports=e(require("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(r.CryptoJS)}(this,function(r){return function(){var e=r,t=e.lib,n=t.WordArray,a=e.enc;a.Base64={stringify:function(r){var e=r.words,t=r.sigBytes,n=this._map;r.clamp();for(var a=[],i=0;i<t;i+=3)for(var o=e[i>>>2]>>>24-i%4*8&255,f=e[i+1>>>2]>>>24-(i+1)%4*8&255,c=e[i+2>>>2]>>>24-(i+2)%4*8&255,s=o<<16|f<<8|c,p=0;p<4&&i+.75*p<t;p++)a.push(n.charAt(s>>>6*(3-p)&63));var u=n.charAt(64);if(u)for(;a.length%4;)a.push(u);return a.join("")},parse:function(r){var e=r.length,t=this._map,a=t.charAt(64);if(a){var i=r.indexOf(a);i!=-1&&(e=i)}for(var o=[],f=0,c=0;c<e;c++)if(c%4){var s=t.indexOf(r.charAt(c-1))<<c%4*2,p=t.indexOf(r.charAt(c))>>>6-c%4*2,u=s|p;o[f>>>2]|=u<<24-f%4*8,f++}return n.create(o,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),r.enc.Base64});
},{"./core":20}],22:[function(require,module,exports){
!function(r,e){"object"==typeof exports?module.exports=exports=e(require("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(r.CryptoJS)}(this,function(r){return function(){function e(r){return r<<8&4278255360|r>>>8&16711935}var t=r,n=t.lib,o=n.WordArray,f=t.enc;f.Utf16=f.Utf16BE={stringify:function(r){for(var e=r.words,t=r.sigBytes,n=[],o=0;o<t;o+=2){var f=e[o>>>2]>>>16-o%4*8&65535;n.push(String.fromCharCode(f))}return n.join("")},parse:function(r){for(var e=r.length,t=[],n=0;n<e;n++)t[n>>>1]|=r.charCodeAt(n)<<16-n%2*16;return o.create(t,2*e)}};f.Utf16LE={stringify:function(r){for(var t=r.words,n=r.sigBytes,o=[],f=0;f<n;f+=2){var i=e(t[f>>>2]>>>16-f%4*8&65535);o.push(String.fromCharCode(i))}return o.join("")},parse:function(r){for(var t=r.length,n=[],f=0;f<t;f++)n[f>>>1]|=e(r.charCodeAt(f)<<16-f%2*16);return o.create(n,2*t)}}}(),r.enc.Utf16});
},{"./core":20}],23:[function(require,module,exports){
!function(e,t,r){"object"==typeof exports?module.exports=exports=t(require("./core"),require("./sha1"),require("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],t):t(e.CryptoJS)}(this,function(e){return function(){var t=e,r=t.lib,i=r.Base,n=r.WordArray,o=t.algo,a=o.MD5,c=o.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,i=r.hasher.create(),o=n.create(),a=o.words,c=r.keySize,f=r.iterations;a.length<c;){s&&i.update(s);var s=i.update(e).finalize(t);i.reset();for(var u=1;u<f;u++)s=i.finalize(s),i.reset();o.concat(s)}return o.sigBytes=4*c,o}});t.EvpKDF=function(e,t,r){return c.create(r).compute(e,t)}}(),e.EvpKDF});
},{"./core":20,"./hmac":25,"./sha1":44}],24:[function(require,module,exports){
!function(e,r,t){"object"==typeof exports?module.exports=exports=r(require("./core"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],r):r(e.CryptoJS)}(this,function(e){return function(r){var t=e,i=t.lib,n=i.CipherParams,o=t.enc,c=o.Hex,f=t.format;f.Hex={stringify:function(e){return e.ciphertext.toString(c)},parse:function(e){var r=c.parse(e);return n.create({ciphertext:r})}}}(),e.format.Hex});
},{"./cipher-core":19,"./core":20}],25:[function(require,module,exports){
!function(e,t){"object"==typeof exports?module.exports=exports=t(require("./core")):"function"==typeof define&&define.amd?define(["./core"],t):t(e.CryptoJS)}(this,function(e){!function(){var t=e,i=t.lib,n=i.Base,s=t.enc,r=s.Utf8,o=t.algo;o.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var i=e.blockSize,n=4*i;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var s=this._oKey=t.clone(),o=this._iKey=t.clone(),a=s.words,f=o.words,c=0;c<i;c++)a[c]^=1549556828,f[c]^=909522486;s.sigBytes=o.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,i=t.finalize(e);t.reset();var n=t.finalize(this._oKey.clone().concat(i));return n}})}()});
},{"./core":20}],26:[function(require,module,exports){
!function(e,r,i){"object"==typeof exports?module.exports=exports=r(require("./core"),require("./x64-core"),require("./lib-typedarrays"),require("./enc-utf16"),require("./enc-base64"),require("./md5"),require("./sha1"),require("./sha256"),require("./sha224"),require("./sha512"),require("./sha384"),require("./sha3"),require("./ripemd160"),require("./hmac"),require("./pbkdf2"),require("./evpkdf"),require("./cipher-core"),require("./mode-cfb"),require("./mode-ctr"),require("./mode-ctr-gladman"),require("./mode-ofb"),require("./mode-ecb"),require("./pad-ansix923"),require("./pad-iso10126"),require("./pad-iso97971"),require("./pad-zeropadding"),require("./pad-nopadding"),require("./format-hex"),require("./aes"),require("./tripledes"),require("./rc4"),require("./rabbit"),require("./rabbit-legacy")):"function"==typeof define&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy"],r):e.CryptoJS=r(e.CryptoJS)}(this,function(e){return e});
},{"./aes":18,"./cipher-core":19,"./core":20,"./enc-base64":21,"./enc-utf16":22,"./evpkdf":23,"./format-hex":24,"./hmac":25,"./lib-typedarrays":27,"./md5":28,"./mode-cfb":29,"./mode-ctr":31,"./mode-ctr-gladman":30,"./mode-ecb":32,"./mode-ofb":33,"./pad-ansix923":34,"./pad-iso10126":35,"./pad-iso97971":36,"./pad-nopadding":37,"./pad-zeropadding":38,"./pbkdf2":39,"./rabbit":41,"./rabbit-legacy":40,"./rc4":42,"./ripemd160":43,"./sha1":44,"./sha224":45,"./sha256":46,"./sha3":47,"./sha384":48,"./sha512":49,"./tripledes":50,"./x64-core":51}],27:[function(require,module,exports){
!function(n,r){"object"==typeof exports?module.exports=exports=r(require("./core")):"function"==typeof define&&define.amd?define(["./core"],r):r(n.CryptoJS)}(this,function(n){return function(){if("function"==typeof ArrayBuffer){var r=n,t=r.lib,e=t.WordArray,i=e.init,a=e.init=function(n){if(n instanceof ArrayBuffer&&(n=new Uint8Array(n)),(n instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&n instanceof Uint8ClampedArray||n instanceof Int16Array||n instanceof Uint16Array||n instanceof Int32Array||n instanceof Uint32Array||n instanceof Float32Array||n instanceof Float64Array)&&(n=new Uint8Array(n.buffer,n.byteOffset,n.byteLength)),n instanceof Uint8Array){for(var r=n.byteLength,t=[],e=0;e<r;e++)t[e>>>2]|=n[e]<<24-e%4*8;i.call(this,t,r)}else i.apply(this,arguments)};a.prototype=e}}(),n.lib.WordArray});
},{"./core":20}],28:[function(require,module,exports){
!function(r,e){"object"==typeof exports?module.exports=exports=e(require("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(r.CryptoJS)}(this,function(r){return function(e){function t(r,e,t,n,o,a,i){var s=r+(e&t|~e&n)+o+i;return(s<<a|s>>>32-a)+e}function n(r,e,t,n,o,a,i){var s=r+(e&n|t&~n)+o+i;return(s<<a|s>>>32-a)+e}function o(r,e,t,n,o,a,i){var s=r+(e^t^n)+o+i;return(s<<a|s>>>32-a)+e}function a(r,e,t,n,o,a,i){var s=r+(t^(e|~n))+o+i;return(s<<a|s>>>32-a)+e}var i=r,s=i.lib,c=s.WordArray,f=s.Hasher,h=i.algo,u=[];!function(){for(var r=0;r<64;r++)u[r]=4294967296*e.abs(e.sin(r+1))|0}();var v=h.MD5=f.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(r,e){for(var i=0;i<16;i++){var s=e+i,c=r[s];r[s]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}var f=this._hash.words,h=r[e+0],v=r[e+1],d=r[e+2],l=r[e+3],_=r[e+4],p=r[e+5],y=r[e+6],D=r[e+7],H=r[e+8],M=r[e+9],g=r[e+10],m=r[e+11],w=r[e+12],x=r[e+13],B=r[e+14],b=r[e+15],j=f[0],k=f[1],q=f[2],z=f[3];j=t(j,k,q,z,h,7,u[0]),z=t(z,j,k,q,v,12,u[1]),q=t(q,z,j,k,d,17,u[2]),k=t(k,q,z,j,l,22,u[3]),j=t(j,k,q,z,_,7,u[4]),z=t(z,j,k,q,p,12,u[5]),q=t(q,z,j,k,y,17,u[6]),k=t(k,q,z,j,D,22,u[7]),j=t(j,k,q,z,H,7,u[8]),z=t(z,j,k,q,M,12,u[9]),q=t(q,z,j,k,g,17,u[10]),k=t(k,q,z,j,m,22,u[11]),j=t(j,k,q,z,w,7,u[12]),z=t(z,j,k,q,x,12,u[13]),q=t(q,z,j,k,B,17,u[14]),k=t(k,q,z,j,b,22,u[15]),j=n(j,k,q,z,v,5,u[16]),z=n(z,j,k,q,y,9,u[17]),q=n(q,z,j,k,m,14,u[18]),k=n(k,q,z,j,h,20,u[19]),j=n(j,k,q,z,p,5,u[20]),z=n(z,j,k,q,g,9,u[21]),q=n(q,z,j,k,b,14,u[22]),k=n(k,q,z,j,_,20,u[23]),j=n(j,k,q,z,M,5,u[24]),z=n(z,j,k,q,B,9,u[25]),q=n(q,z,j,k,l,14,u[26]),k=n(k,q,z,j,H,20,u[27]),j=n(j,k,q,z,x,5,u[28]),z=n(z,j,k,q,d,9,u[29]),q=n(q,z,j,k,D,14,u[30]),k=n(k,q,z,j,w,20,u[31]),j=o(j,k,q,z,p,4,u[32]),z=o(z,j,k,q,H,11,u[33]),q=o(q,z,j,k,m,16,u[34]),k=o(k,q,z,j,B,23,u[35]),j=o(j,k,q,z,v,4,u[36]),z=o(z,j,k,q,_,11,u[37]),q=o(q,z,j,k,D,16,u[38]),k=o(k,q,z,j,g,23,u[39]),j=o(j,k,q,z,x,4,u[40]),z=o(z,j,k,q,h,11,u[41]),q=o(q,z,j,k,l,16,u[42]),k=o(k,q,z,j,y,23,u[43]),j=o(j,k,q,z,M,4,u[44]),z=o(z,j,k,q,w,11,u[45]),q=o(q,z,j,k,b,16,u[46]),k=o(k,q,z,j,d,23,u[47]),j=a(j,k,q,z,h,6,u[48]),z=a(z,j,k,q,D,10,u[49]),q=a(q,z,j,k,B,15,u[50]),k=a(k,q,z,j,p,21,u[51]),j=a(j,k,q,z,w,6,u[52]),z=a(z,j,k,q,l,10,u[53]),q=a(q,z,j,k,g,15,u[54]),k=a(k,q,z,j,v,21,u[55]),j=a(j,k,q,z,H,6,u[56]),z=a(z,j,k,q,b,10,u[57]),q=a(q,z,j,k,y,15,u[58]),k=a(k,q,z,j,x,21,u[59]),j=a(j,k,q,z,_,6,u[60]),z=a(z,j,k,q,m,10,u[61]),q=a(q,z,j,k,d,15,u[62]),k=a(k,q,z,j,M,21,u[63]),f[0]=f[0]+j|0,f[1]=f[1]+k|0,f[2]=f[2]+q|0,f[3]=f[3]+z|0},_doFinalize:function(){var r=this._data,t=r.words,n=8*this._nDataBytes,o=8*r.sigBytes;t[o>>>5]|=128<<24-o%32;var a=e.floor(n/4294967296),i=n;t[(o+64>>>9<<4)+15]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t[(o+64>>>9<<4)+14]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),r.sigBytes=4*(t.length+1),this._process();for(var s=this._hash,c=s.words,f=0;f<4;f++){var h=c[f];c[f]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return s},clone:function(){var r=f.clone.call(this);return r._hash=this._hash.clone(),r}});i.MD5=f._createHelper(v),i.HmacMD5=f._createHmacHelper(v)}(Math),r.MD5});
},{"./core":20}],29:[function(require,module,exports){
!function(e,r,i){"object"==typeof exports?module.exports=exports=r(require("./core"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],r):r(e.CryptoJS)}(this,function(e){return e.mode.CFB=function(){function r(e,r,i,o){var c=this._iv;if(c){var t=c.slice(0);this._iv=void 0}else var t=this._prevBlock;o.encryptBlock(t,0);for(var n=0;n<i;n++)e[r+n]^=t[n]}var i=e.lib.BlockCipherMode.extend();return i.Encryptor=i.extend({processBlock:function(e,i){var o=this._cipher,c=o.blockSize;r.call(this,e,i,c,o),this._prevBlock=e.slice(i,i+c)}}),i.Decryptor=i.extend({processBlock:function(e,i){var o=this._cipher,c=o.blockSize,t=e.slice(i,i+c);r.call(this,e,i,c,o),this._prevBlock=t}}),i}(),e.mode.CFB});
},{"./cipher-core":19,"./core":20}],30:[function(require,module,exports){
!function(e,r,o){"object"==typeof exports?module.exports=exports=r(require("./core"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],r):r(e.CryptoJS)}(this,function(e){return e.mode.CTRGladman=function(){function r(e){if(255===(e>>24&255)){var r=e>>16&255,o=e>>8&255,t=255&e;255===r?(r=0,255===o?(o=0,255===t?t=0:++t):++o):++r,e=0,e+=r<<16,e+=o<<8,e+=t}else e+=1<<24;return e}function o(e){return 0===(e[0]=r(e[0]))&&(e[1]=r(e[1])),e}var t=e.lib.BlockCipherMode.extend(),i=t.Encryptor=t.extend({processBlock:function(e,r){var t=this._cipher,i=t.blockSize,n=this._iv,c=this._counter;n&&(c=this._counter=n.slice(0),this._iv=void 0),o(c);var u=c.slice(0);t.encryptBlock(u,0);for(var f=0;f<i;f++)e[r+f]^=u[f]}});return t.Decryptor=i,t}(),e.mode.CTRGladman});
},{"./cipher-core":19,"./core":20}],31:[function(require,module,exports){
!function(e,r,o){"object"==typeof exports?module.exports=exports=r(require("./core"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],r):r(e.CryptoJS)}(this,function(e){return e.mode.CTR=function(){var r=e.lib.BlockCipherMode.extend(),o=r.Encryptor=r.extend({processBlock:function(e,r){var o=this._cipher,i=o.blockSize,t=this._iv,c=this._counter;t&&(c=this._counter=t.slice(0),this._iv=void 0);var n=c.slice(0);o.encryptBlock(n,0),c[i-1]=c[i-1]+1|0;for(var p=0;p<i;p++)e[r+p]^=n[p]}});return r.Decryptor=o,r}(),e.mode.CTR});
},{"./cipher-core":19,"./core":20}],32:[function(require,module,exports){
!function(e,o,r){"object"==typeof exports?module.exports=exports=o(require("./core"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],o):o(e.CryptoJS)}(this,function(e){return e.mode.ECB=function(){var o=e.lib.BlockCipherMode.extend();return o.Encryptor=o.extend({processBlock:function(e,o){this._cipher.encryptBlock(e,o)}}),o.Decryptor=o.extend({processBlock:function(e,o){this._cipher.decryptBlock(e,o)}}),o}(),e.mode.ECB});
},{"./cipher-core":19,"./core":20}],33:[function(require,module,exports){
!function(e,r,o){"object"==typeof exports?module.exports=exports=r(require("./core"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],r):r(e.CryptoJS)}(this,function(e){return e.mode.OFB=function(){var r=e.lib.BlockCipherMode.extend(),o=r.Encryptor=r.extend({processBlock:function(e,r){var o=this._cipher,t=o.blockSize,i=this._iv,c=this._keystream;i&&(c=this._keystream=i.slice(0),this._iv=void 0),o.encryptBlock(c,0);for(var n=0;n<t;n++)e[r+n]^=c[n]}});return r.Decryptor=o,r}(),e.mode.OFB});
},{"./cipher-core":19,"./core":20}],34:[function(require,module,exports){
!function(e,r,i){"object"==typeof exports?module.exports=exports=r(require("./core"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],r):r(e.CryptoJS)}(this,function(e){return e.pad.AnsiX923={pad:function(e,r){var i=e.sigBytes,o=4*r,t=o-i%o,n=i+t-1;e.clamp(),e.words[n>>>2]|=t<<24-n%4*8,e.sigBytes+=t},unpad:function(e){var r=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=r}},e.pad.Ansix923});
},{"./cipher-core":19,"./core":20}],35:[function(require,module,exports){
!function(e,r,o){"object"==typeof exports?module.exports=exports=r(require("./core"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],r):r(e.CryptoJS)}(this,function(e){return e.pad.Iso10126={pad:function(r,o){var t=4*o,i=t-r.sigBytes%t;r.concat(e.lib.WordArray.random(i-1)).concat(e.lib.WordArray.create([i<<24],1))},unpad:function(e){var r=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=r}},e.pad.Iso10126});
},{"./cipher-core":19,"./core":20}],36:[function(require,module,exports){
!function(e,o,r){"object"==typeof exports?module.exports=exports=o(require("./core"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],o):o(e.CryptoJS)}(this,function(e){return e.pad.Iso97971={pad:function(o,r){o.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(o,r)},unpad:function(o){e.pad.ZeroPadding.unpad(o),o.sigBytes--}},e.pad.Iso97971});
},{"./cipher-core":19,"./core":20}],37:[function(require,module,exports){
!function(e,o,n){"object"==typeof exports?module.exports=exports=o(require("./core"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],o):o(e.CryptoJS)}(this,function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding});
},{"./cipher-core":19,"./core":20}],38:[function(require,module,exports){
!function(e,r,o){"object"==typeof exports?module.exports=exports=r(require("./core"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],r):r(e.CryptoJS)}(this,function(e){return e.pad.ZeroPadding={pad:function(e,r){var o=4*r;e.clamp(),e.sigBytes+=o-(e.sigBytes%o||o)},unpad:function(e){for(var r=e.words,o=e.sigBytes-1;!(r[o>>>2]>>>24-o%4*8&255);)o--;e.sigBytes=o+1}},e.pad.ZeroPadding});
},{"./cipher-core":19,"./core":20}],39:[function(require,module,exports){
!function(e,r,t){"object"==typeof exports?module.exports=exports=r(require("./core"),require("./sha1"),require("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],r):r(e.CryptoJS)}(this,function(e){return function(){var r=e,t=r.lib,i=t.Base,n=t.WordArray,o=r.algo,a=o.SHA1,c=o.HMAC,s=o.PBKDF2=i.extend({cfg:i.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,r){for(var t=this.cfg,i=c.create(t.hasher,e),o=n.create(),a=n.create([1]),s=o.words,f=a.words,u=t.keySize,d=t.iterations;s.length<u;){var h=i.update(r).finalize(a);i.reset();for(var p=h.words,g=p.length,l=h,y=1;y<d;y++){l=i.finalize(l),i.reset();for(var m=l.words,x=0;x<g;x++)p[x]^=m[x]}o.concat(h),f[0]++}return o.sigBytes=4*u,o}});r.PBKDF2=function(e,r,t){return s.create(t).compute(e,r)}}(),e.PBKDF2});
},{"./core":20,"./hmac":25,"./sha1":44}],40:[function(require,module,exports){
!function(e,r,i){"object"==typeof exports?module.exports=exports=r(require("./core"),require("./enc-base64"),require("./md5"),require("./evpkdf"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],r):r(e.CryptoJS)}(this,function(e){return function(){function r(){for(var e=this._X,r=this._C,i=0;i<8;i++)s[i]=r[i];r[0]=r[0]+1295307597+this._b|0,r[1]=r[1]+3545052371+(r[0]>>>0<s[0]>>>0?1:0)|0,r[2]=r[2]+886263092+(r[1]>>>0<s[1]>>>0?1:0)|0,r[3]=r[3]+1295307597+(r[2]>>>0<s[2]>>>0?1:0)|0,r[4]=r[4]+3545052371+(r[3]>>>0<s[3]>>>0?1:0)|0,r[5]=r[5]+886263092+(r[4]>>>0<s[4]>>>0?1:0)|0,r[6]=r[6]+1295307597+(r[5]>>>0<s[5]>>>0?1:0)|0,r[7]=r[7]+3545052371+(r[6]>>>0<s[6]>>>0?1:0)|0,this._b=r[7]>>>0<s[7]>>>0?1:0;for(var i=0;i<8;i++){var t=e[i]+r[i],o=65535&t,c=t>>>16,a=((o*o>>>17)+o*c>>>15)+c*c,n=((4294901760&t)*t|0)+((65535&t)*t|0);f[i]=a^n}e[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,e[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,e[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,e[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,e[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,e[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,e[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,e[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0}var i=e,t=i.lib,o=t.StreamCipher,c=i.algo,a=[],s=[],f=[],n=c.RabbitLegacy=o.extend({_doReset:function(){var e=this._key.words,i=this.cfg.iv,t=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var c=0;c<4;c++)r.call(this);for(var c=0;c<8;c++)o[c]^=t[c+4&7];if(i){var a=i.words,s=a[0],f=a[1],n=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),v=n>>>16|4294901760&h,b=h<<16|65535&n;o[0]^=n,o[1]^=v,o[2]^=h,o[3]^=b,o[4]^=n,o[5]^=v,o[6]^=h,o[7]^=b;for(var c=0;c<4;c++)r.call(this)}},_doProcessBlock:function(e,i){var t=this._X;r.call(this),a[0]=t[0]^t[5]>>>16^t[3]<<16,a[1]=t[2]^t[7]>>>16^t[5]<<16,a[2]=t[4]^t[1]>>>16^t[7]<<16,a[3]=t[6]^t[3]>>>16^t[1]<<16;for(var o=0;o<4;o++)a[o]=16711935&(a[o]<<8|a[o]>>>24)|4278255360&(a[o]<<24|a[o]>>>8),e[i+o]^=a[o]},blockSize:4,ivSize:2});i.RabbitLegacy=o._createHelper(n)}(),e.RabbitLegacy});
},{"./cipher-core":19,"./core":20,"./enc-base64":21,"./evpkdf":23,"./md5":28}],41:[function(require,module,exports){
!function(e,r,i){"object"==typeof exports?module.exports=exports=r(require("./core"),require("./enc-base64"),require("./md5"),require("./evpkdf"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],r):r(e.CryptoJS)}(this,function(e){return function(){function r(){for(var e=this._X,r=this._C,i=0;i<8;i++)s[i]=r[i];r[0]=r[0]+1295307597+this._b|0,r[1]=r[1]+3545052371+(r[0]>>>0<s[0]>>>0?1:0)|0,r[2]=r[2]+886263092+(r[1]>>>0<s[1]>>>0?1:0)|0,r[3]=r[3]+1295307597+(r[2]>>>0<s[2]>>>0?1:0)|0,r[4]=r[4]+3545052371+(r[3]>>>0<s[3]>>>0?1:0)|0,r[5]=r[5]+886263092+(r[4]>>>0<s[4]>>>0?1:0)|0,r[6]=r[6]+1295307597+(r[5]>>>0<s[5]>>>0?1:0)|0,r[7]=r[7]+3545052371+(r[6]>>>0<s[6]>>>0?1:0)|0,this._b=r[7]>>>0<s[7]>>>0?1:0;for(var i=0;i<8;i++){var t=e[i]+r[i],o=65535&t,a=t>>>16,c=((o*o>>>17)+o*a>>>15)+a*a,n=((4294901760&t)*t|0)+((65535&t)*t|0);f[i]=c^n}e[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,e[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,e[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,e[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,e[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,e[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,e[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,e[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0}var i=e,t=i.lib,o=t.StreamCipher,a=i.algo,c=[],s=[],f=[],n=a.Rabbit=o.extend({_doReset:function(){for(var e=this._key.words,i=this.cfg.iv,t=0;t<4;t++)e[t]=16711935&(e[t]<<8|e[t]>>>24)|4278255360&(e[t]<<24|e[t]>>>8);var o=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],a=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var t=0;t<4;t++)r.call(this);for(var t=0;t<8;t++)a[t]^=o[t+4&7];if(i){var c=i.words,s=c[0],f=c[1],n=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),v=n>>>16|4294901760&h,b=h<<16|65535&n;a[0]^=n,a[1]^=v,a[2]^=h,a[3]^=b,a[4]^=n,a[5]^=v,a[6]^=h,a[7]^=b;for(var t=0;t<4;t++)r.call(this)}},_doProcessBlock:function(e,i){var t=this._X;r.call(this),c[0]=t[0]^t[5]>>>16^t[3]<<16,c[1]=t[2]^t[7]>>>16^t[5]<<16,c[2]=t[4]^t[1]>>>16^t[7]<<16,c[3]=t[6]^t[3]>>>16^t[1]<<16;for(var o=0;o<4;o++)c[o]=16711935&(c[o]<<8|c[o]>>>24)|4278255360&(c[o]<<24|c[o]>>>8),e[i+o]^=c[o]},blockSize:4,ivSize:2});i.Rabbit=o._createHelper(n)}(),e.Rabbit});
},{"./cipher-core":19,"./core":20,"./enc-base64":21,"./evpkdf":23,"./md5":28}],42:[function(require,module,exports){
!function(e,r,i){"object"==typeof exports?module.exports=exports=r(require("./core"),require("./enc-base64"),require("./md5"),require("./evpkdf"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],r):r(e.CryptoJS)}(this,function(e){return function(){function r(){for(var e=this._S,r=this._i,i=this._j,t=0,o=0;o<4;o++){r=(r+1)%256,i=(i+e[r])%256;var c=e[r];e[r]=e[i],e[i]=c,t|=e[(e[r]+e[i])%256]<<24-8*o}return this._i=r,this._j=i,t}var i=e,t=i.lib,o=t.StreamCipher,c=i.algo,s=c.RC4=o.extend({_doReset:function(){for(var e=this._key,r=e.words,i=e.sigBytes,t=this._S=[],o=0;o<256;o++)t[o]=o;for(var o=0,c=0;o<256;o++){var s=o%i,n=r[s>>>2]>>>24-s%4*8&255;c=(c+t[o]+n)%256;var f=t[o];t[o]=t[c],t[c]=f}this._i=this._j=0},_doProcessBlock:function(e,i){e[i]^=r.call(this)},keySize:8,ivSize:0});i.RC4=o._createHelper(s);var n=c.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)r.call(this)}});i.RC4Drop=o._createHelper(n)}(),e.RC4});
},{"./cipher-core":19,"./core":20,"./enc-base64":21,"./evpkdf":23,"./md5":28}],43:[function(require,module,exports){
!function(r,e){"object"==typeof exports?module.exports=exports=e(require("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(r.CryptoJS)}(this,function(r){return function(e){function t(r,e,t){return r^e^t}function n(r,e,t){return r&e|~r&t}function o(r,e,t){return(r|~e)^t}function s(r,e,t){return r&t|e&~t}function a(r,e,t){return r^(e|~t)}function c(r,e){return r<<e|r>>>32-e}var i=r,u=i.lib,f=u.WordArray,h=u.Hasher,d=i.algo,l=f.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),_=f.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),p=f.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),v=f.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),w=f.create([0,1518500249,1859775393,2400959708,2840853838]),y=f.create([1352829926,1548603684,1836072691,2053994217,0]),D=d.RIPEMD160=h.extend({_doReset:function(){this._hash=f.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(r,e){for(var i=0;i<16;i++){var u=e+i,f=r[u];r[u]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}var h,d,D,H,M,P,R,g,m,x,B=this._hash.words,E=w.words,I=y.words,b=l.words,j=_.words,k=p.words,q=v.words;P=h=B[0],R=d=B[1],g=D=B[2],m=H=B[3],x=M=B[4];for(var z,i=0;i<80;i+=1)z=h+r[e+b[i]]|0,z+=i<16?t(d,D,H)+E[0]:i<32?n(d,D,H)+E[1]:i<48?o(d,D,H)+E[2]:i<64?s(d,D,H)+E[3]:a(d,D,H)+E[4],z|=0,z=c(z,k[i]),z=z+M|0,h=M,M=H,H=c(D,10),D=d,d=z,z=P+r[e+j[i]]|0,z+=i<16?a(R,g,m)+I[0]:i<32?s(R,g,m)+I[1]:i<48?o(R,g,m)+I[2]:i<64?n(R,g,m)+I[3]:t(R,g,m)+I[4],z|=0,z=c(z,q[i]),z=z+x|0,P=x,x=m,m=c(g,10),g=R,R=z;z=B[1]+D+m|0,B[1]=B[2]+H+x|0,B[2]=B[3]+M+P|0,B[3]=B[4]+h+R|0,B[4]=B[0]+d+g|0,B[0]=z},_doFinalize:function(){var r=this._data,e=r.words,t=8*this._nDataBytes,n=8*r.sigBytes;e[n>>>5]|=128<<24-n%32,e[(n+64>>>9<<4)+14]=16711935&(t<<8|t>>>24)|4278255360&(t<<24|t>>>8),r.sigBytes=4*(e.length+1),this._process();for(var o=this._hash,s=o.words,a=0;a<5;a++){var c=s[a];s[a]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return o},clone:function(){var r=h.clone.call(this);return r._hash=this._hash.clone(),r}});i.RIPEMD160=h._createHelper(D),i.HmacRIPEMD160=h._createHmacHelper(D)}(Math),r.RIPEMD160});
},{"./core":20}],44:[function(require,module,exports){
!function(e,t){"object"==typeof exports?module.exports=exports=t(require("./core")):"function"==typeof define&&define.amd?define(["./core"],t):t(e.CryptoJS)}(this,function(e){return function(){var t=e,o=t.lib,r=o.WordArray,n=o.Hasher,s=t.algo,i=[],a=s.SHA1=n.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var o=this._hash.words,r=o[0],n=o[1],s=o[2],a=o[3],c=o[4],h=0;h<80;h++){if(h<16)i[h]=0|e[t+h];else{var f=i[h-3]^i[h-8]^i[h-14]^i[h-16];i[h]=f<<1|f>>>31}var l=(r<<5|r>>>27)+c+i[h];l+=h<20?(n&s|~n&a)+1518500249:h<40?(n^s^a)+1859775393:h<60?(n&s|n&a|s&a)-1894007588:(n^s^a)-899497514,c=a,a=s,s=n<<30|n>>>2,n=r,r=l}o[0]=o[0]+r|0,o[1]=o[1]+n|0,o[2]=o[2]+s|0,o[3]=o[3]+a|0,o[4]=o[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,o=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[(r+64>>>9<<4)+14]=Math.floor(o/4294967296),t[(r+64>>>9<<4)+15]=o,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA1=n._createHelper(a),t.HmacSHA1=n._createHmacHelper(a)}(),e.SHA1});
},{"./core":20}],45:[function(require,module,exports){
!function(e,t,r){"object"==typeof exports?module.exports=exports=t(require("./core"),require("./sha256")):"function"==typeof define&&define.amd?define(["./core","./sha256"],t):t(e.CryptoJS)}(this,function(e){return function(){var t=e,r=t.lib,i=r.WordArray,n=t.algo,o=n.SHA256,a=n.SHA224=o.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=o._doFinalize.call(this);return e.sigBytes-=4,e}});t.SHA224=o._createHelper(a),t.HmacSHA224=o._createHmacHelper(a)}(),e.SHA224});
},{"./core":20,"./sha256":46}],46:[function(require,module,exports){
!function(e,r){"object"==typeof exports?module.exports=exports=r(require("./core")):"function"==typeof define&&define.amd?define(["./core"],r):r(e.CryptoJS)}(this,function(e){return function(r){var t=e,o=t.lib,n=o.WordArray,i=o.Hasher,s=t.algo,a=[],c=[];!function(){function e(e){for(var t=r.sqrt(e),o=2;o<=t;o++)if(!(e%o))return!1;return!0}function t(e){return 4294967296*(e-(0|e))|0}for(var o=2,n=0;n<64;)e(o)&&(n<8&&(a[n]=t(r.pow(o,.5))),c[n]=t(r.pow(o,1/3)),n++),o++}();var f=[],h=s.SHA256=i.extend({_doReset:function(){this._hash=new n.init(a.slice(0))},_doProcessBlock:function(e,r){for(var t=this._hash.words,o=t[0],n=t[1],i=t[2],s=t[3],a=t[4],h=t[5],u=t[6],l=t[7],d=0;d<64;d++){if(d<16)f[d]=0|e[r+d];else{var _=f[d-15],p=(_<<25|_>>>7)^(_<<14|_>>>18)^_>>>3,v=f[d-2],H=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;f[d]=p+f[d-7]+H+f[d-16]}var y=a&h^~a&u,w=o&n^o&i^n&i,A=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),S=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25),g=l+S+y+c[d]+f[d],m=A+w;l=u,u=h,h=a,a=s+g|0,s=i,i=n,n=o,o=g+m|0}t[0]=t[0]+o|0,t[1]=t[1]+n|0,t[2]=t[2]+i|0,t[3]=t[3]+s|0,t[4]=t[4]+a|0,t[5]=t[5]+h|0,t[6]=t[6]+u|0,t[7]=t[7]+l|0},_doFinalize:function(){var e=this._data,t=e.words,o=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[(n+64>>>9<<4)+14]=r.floor(o/4294967296),t[(n+64>>>9<<4)+15]=o,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=i._createHelper(h),t.HmacSHA256=i._createHmacHelper(h)}(Math),e.SHA256});
},{"./core":20}],47:[function(require,module,exports){
!function(r,o,e){"object"==typeof exports?module.exports=exports=o(require("./core"),require("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],o):o(r.CryptoJS)}(this,function(r){return function(o){var e=r,t=e.lib,i=t.WordArray,a=t.Hasher,h=e.x64,n=h.Word,f=e.algo,s=[],c=[],v=[];!function(){for(var r=1,o=0,e=0;e<24;e++){s[r+5*o]=(e+1)*(e+2)/2%64;var t=o%5,i=(2*r+3*o)%5;r=t,o=i}for(var r=0;r<5;r++)for(var o=0;o<5;o++)c[r+5*o]=o+(2*r+3*o)%5*5;for(var a=1,h=0;h<24;h++){for(var f=0,l=0,g=0;g<7;g++){if(1&a){var u=(1<<g)-1;u<32?l^=1<<u:f^=1<<u-32}128&a?a=a<<1^113:a<<=1}v[h]=n.create(f,l)}}();var l=[];!function(){for(var r=0;r<25;r++)l[r]=n.create()}();var g=f.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var r=this._state=[],o=0;o<25;o++)r[o]=new n.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(r,o){for(var e=this._state,t=this.blockSize/2,i=0;i<t;i++){var a=r[o+2*i],h=r[o+2*i+1];a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8);var n=e[i];n.high^=h,n.low^=a}for(var f=0;f<24;f++){for(var g=0;g<5;g++){for(var u=0,w=0,d=0;d<5;d++){var n=e[g+5*d];u^=n.high,w^=n.low}var p=l[g];p.high=u,p.low=w}for(var g=0;g<5;g++)for(var _=l[(g+4)%5],H=l[(g+1)%5],x=H.high,S=H.low,u=_.high^(x<<1|S>>>31),w=_.low^(S<<1|x>>>31),d=0;d<5;d++){var n=e[g+5*d];n.high^=u,n.low^=w}for(var y=1;y<25;y++){var n=e[y],b=n.high,A=n.low,k=s[y];if(k<32)var u=b<<k|A>>>32-k,w=A<<k|b>>>32-k;else var u=A<<k-32|b>>>64-k,w=b<<k-32|A>>>64-k;var m=l[c[y]];m.high=u,m.low=w}var z=l[0],B=e[0];z.high=B.high,z.low=B.low;for(var g=0;g<5;g++)for(var d=0;d<5;d++){var y=g+5*d,n=e[y],L=l[y],q=l[(g+1)%5+5*d],W=l[(g+2)%5+5*d];n.high=L.high^~q.high&W.high,n.low=L.low^~q.low&W.low}var n=e[0],j=v[f];n.high^=j.high,n.low^=j.low}},_doFinalize:function(){var r=this._data,e=r.words,t=(8*this._nDataBytes,8*r.sigBytes),a=32*this.blockSize;e[t>>>5]|=1<<24-t%32,e[(o.ceil((t+1)/a)*a>>>5)-1]|=128,r.sigBytes=4*e.length,this._process();for(var h=this._state,n=this.cfg.outputLength/8,f=n/8,s=[],c=0;c<f;c++){var v=h[c],l=v.high,g=v.low;l=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),g=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),s.push(g),s.push(l)}return new i.init(s,n)},clone:function(){for(var r=a.clone.call(this),o=r._state=this._state.slice(0),e=0;e<25;e++)o[e]=o[e].clone();return r}});e.SHA3=a._createHelper(g),e.HmacSHA3=a._createHmacHelper(g)}(Math),r.SHA3});
},{"./core":20,"./x64-core":51}],48:[function(require,module,exports){
!function(e,i,n){"object"==typeof exports?module.exports=exports=i(require("./core"),require("./x64-core"),require("./sha512")):"function"==typeof define&&define.amd?define(["./core","./x64-core","./sha512"],i):i(e.CryptoJS)}(this,function(e){return function(){var i=e,n=i.x64,t=n.Word,r=n.WordArray,o=i.algo,c=o.SHA512,a=o.SHA384=c.extend({_doReset:function(){this._hash=new r.init([new t.init(3418070365,3238371032),new t.init(1654270250,914150663),new t.init(2438529370,812702999),new t.init(355462360,4144912697),new t.init(1731405415,4290775857),new t.init(2394180231,1750603025),new t.init(3675008525,1694076839),new t.init(1203062813,3204075428)])},_doFinalize:function(){var e=c._doFinalize.call(this);return e.sigBytes-=16,e}});i.SHA384=c._createHelper(a),i.HmacSHA384=c._createHmacHelper(a)}(),e.SHA384});
},{"./core":20,"./sha512":49,"./x64-core":51}],49:[function(require,module,exports){
!function(i,h,o){"object"==typeof exports?module.exports=exports=h(require("./core"),require("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],h):h(i.CryptoJS)}(this,function(i){return function(){function h(){return r.create.apply(r,arguments)}var o=i,e=o.lib,n=e.Hasher,t=o.x64,r=t.Word,l=t.WordArray,w=o.algo,a=[h(1116352408,3609767458),h(1899447441,602891725),h(3049323471,3964484399),h(3921009573,2173295548),h(961987163,4081628472),h(1508970993,3053834265),h(2453635748,2937671579),h(2870763221,3664609560),h(3624381080,2734883394),h(310598401,1164996542),h(607225278,1323610764),h(1426881987,3590304994),h(1925078388,4068182383),h(2162078206,991336113),h(2614888103,633803317),h(3248222580,3479774868),h(3835390401,2666613458),h(4022224774,944711139),h(264347078,2341262773),h(604807628,2007800933),h(770255983,1495990901),h(1249150122,1856431235),h(1555081692,3175218132),h(1996064986,2198950837),h(2554220882,3999719339),h(2821834349,766784016),h(2952996808,2566594879),h(3210313671,3203337956),h(3336571891,1034457026),h(3584528711,2466948901),h(113926993,3758326383),h(338241895,168717936),h(666307205,1188179964),h(773529912,1546045734),h(1294757372,1522805485),h(1396182291,2643833823),h(1695183700,2343527390),h(1986661051,1014477480),h(2177026350,1206759142),h(2456956037,344077627),h(2730485921,1290863460),h(2820302411,3158454273),h(3259730800,3505952657),h(3345764771,106217008),h(3516065817,3606008344),h(3600352804,1432725776),h(4094571909,1467031594),h(275423344,851169720),h(430227734,3100823752),h(506948616,1363258195),h(659060556,3750685593),h(883997877,3785050280),h(958139571,3318307427),h(1322822218,3812723403),h(1537002063,2003034995),h(1747873779,3602036899),h(1955562222,1575990012),h(2024104815,1125592928),h(2227730452,2716904306),h(2361852424,442776044),h(2428436474,593698344),h(2756734187,3733110249),h(3204031479,2999351573),h(3329325298,3815920427),h(3391569614,3928383900),h(3515267271,566280711),h(3940187606,3454069534),h(4118630271,4000239992),h(116418474,1914138554),h(174292421,2731055270),h(289380356,3203993006),h(460393269,320620315),h(685471733,587496836),h(852142971,1086792851),h(1017036298,365543100),h(1126000580,2618297676),h(1288033470,3409855158),h(1501505948,4234509866),h(1607167915,987167468),h(1816402316,1246189591)],s=[];!function(){for(var i=0;i<80;i++)s[i]=h()}();var c=w.SHA512=n.extend({_doReset:function(){this._hash=new l.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(i,h){for(var o=this._hash.words,e=o[0],n=o[1],t=o[2],r=o[3],l=o[4],w=o[5],c=o[6],g=o[7],f=e.high,u=e.low,d=n.high,_=n.low,p=t.high,v=t.low,H=r.high,y=r.low,x=l.high,S=l.low,A=w.high,m=w.low,B=c.high,b=c.low,k=g.high,q=g.low,z=f,W=u,j=d,C=_,D=p,F=v,J=H,M=y,P=x,R=S,X=A,E=m,G=B,I=b,K=k,L=q,N=0;N<80;N++){var O=s[N];if(N<16)var Q=O.high=0|i[h+2*N],T=O.low=0|i[h+2*N+1];else{var U=s[N-15],V=U.high,Y=U.low,Z=(V>>>1|Y<<31)^(V>>>8|Y<<24)^V>>>7,$=(Y>>>1|V<<31)^(Y>>>8|V<<24)^(Y>>>7|V<<25),ii=s[N-2],hi=ii.high,oi=ii.low,ei=(hi>>>19|oi<<13)^(hi<<3|oi>>>29)^hi>>>6,ni=(oi>>>19|hi<<13)^(oi<<3|hi>>>29)^(oi>>>6|hi<<26),ti=s[N-7],ri=ti.high,li=ti.low,wi=s[N-16],ai=wi.high,si=wi.low,T=$+li,Q=Z+ri+(T>>>0<$>>>0?1:0),T=T+ni,Q=Q+ei+(T>>>0<ni>>>0?1:0),T=T+si,Q=Q+ai+(T>>>0<si>>>0?1:0);O.high=Q,O.low=T}var ci=P&X^~P&G,gi=R&E^~R&I,fi=z&j^z&D^j&D,ui=W&C^W&F^C&F,di=(z>>>28|W<<4)^(z<<30|W>>>2)^(z<<25|W>>>7),_i=(W>>>28|z<<4)^(W<<30|z>>>2)^(W<<25|z>>>7),pi=(P>>>14|R<<18)^(P>>>18|R<<14)^(P<<23|R>>>9),vi=(R>>>14|P<<18)^(R>>>18|P<<14)^(R<<23|P>>>9),Hi=a[N],yi=Hi.high,xi=Hi.low,Si=L+vi,Ai=K+pi+(Si>>>0<L>>>0?1:0),Si=Si+gi,Ai=Ai+ci+(Si>>>0<gi>>>0?1:0),Si=Si+xi,Ai=Ai+yi+(Si>>>0<xi>>>0?1:0),Si=Si+T,Ai=Ai+Q+(Si>>>0<T>>>0?1:0),mi=_i+ui,Bi=di+fi+(mi>>>0<_i>>>0?1:0);K=G,L=I,G=X,I=E,X=P,E=R,R=M+Si|0,P=J+Ai+(R>>>0<M>>>0?1:0)|0,J=D,M=F,D=j,F=C,j=z,C=W,W=Si+mi|0,z=Ai+Bi+(W>>>0<Si>>>0?1:0)|0}u=e.low=u+W,e.high=f+z+(u>>>0<W>>>0?1:0),_=n.low=_+C,n.high=d+j+(_>>>0<C>>>0?1:0),v=t.low=v+F,t.high=p+D+(v>>>0<F>>>0?1:0),y=r.low=y+M,r.high=H+J+(y>>>0<M>>>0?1:0),S=l.low=S+R,l.high=x+P+(S>>>0<R>>>0?1:0),m=w.low=m+E,w.high=A+X+(m>>>0<E>>>0?1:0),b=c.low=b+I,c.high=B+G+(b>>>0<I>>>0?1:0),q=g.low=q+L,g.high=k+K+(q>>>0<L>>>0?1:0)},_doFinalize:function(){var i=this._data,h=i.words,o=8*this._nDataBytes,e=8*i.sigBytes;h[e>>>5]|=128<<24-e%32,h[(e+128>>>10<<5)+30]=Math.floor(o/4294967296),h[(e+128>>>10<<5)+31]=o,i.sigBytes=4*h.length,this._process();var n=this._hash.toX32();return n},clone:function(){var i=n.clone.call(this);return i._hash=this._hash.clone(),i},blockSize:32});o.SHA512=n._createHelper(c),o.HmacSHA512=n._createHmacHelper(c)}(),i.SHA512});
},{"./core":20,"./x64-core":51}],50:[function(require,module,exports){
!function(e,t,c){"object"==typeof exports?module.exports=exports=t(require("./core"),require("./enc-base64"),require("./md5"),require("./evpkdf"),require("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],t):t(e.CryptoJS)}(this,function(e){return function(){function t(e,t){var c=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=c,this._lBlock^=c<<e}function c(e,t){var c=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=c,this._rBlock^=c<<e}var r=e,i=r.lib,o=i.WordArray,l=i.BlockCipher,s=r.algo,h=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],n=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],k=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],_=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],a=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],B=s.DES=l.extend({_doReset:function(){for(var e=this._key,t=e.words,c=[],r=0;r<56;r++){var i=h[r]-1;c[r]=t[i>>>5]>>>31-i%32&1}for(var o=this._subKeys=[],l=0;l<16;l++){for(var s=o[l]=[],_=k[l],r=0;r<24;r++)s[r/6|0]|=c[(n[r]-1+_)%28]<<31-r%6,s[4+(r/6|0)]|=c[28+(n[r+24]-1+_)%28]<<31-r%6;s[0]=s[0]<<1|s[0]>>>31;for(var r=1;r<7;r++)s[r]=s[r]>>>4*(r-1)+3;s[7]=s[7]<<5|s[7]>>>27}for(var a=this._invSubKeys=[],r=0;r<16;r++)a[r]=o[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,r,i){this._lBlock=e[r],this._rBlock=e[r+1],t.call(this,4,252645135),t.call(this,16,65535),c.call(this,2,858993459),c.call(this,8,16711935),t.call(this,1,1431655765);for(var o=0;o<16;o++){for(var l=i[o],s=this._lBlock,h=this._rBlock,n=0,k=0;k<8;k++)n|=_[k][((h^l[k])&a[k])>>>0];this._lBlock=h,this._rBlock=s^n}var B=this._lBlock;this._lBlock=this._rBlock,this._rBlock=B,t.call(this,1,1431655765),c.call(this,8,16711935),c.call(this,2,858993459),t.call(this,16,65535),t.call(this,4,252645135),e[r]=this._lBlock,e[r+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});r.DES=l._createHelper(B);var d=s.TripleDES=l.extend({_doReset:function(){var e=this._key,t=e.words;this._des1=B.createEncryptor(o.create(t.slice(0,2))),this._des2=B.createEncryptor(o.create(t.slice(2,4))),this._des3=B.createEncryptor(o.create(t.slice(4,6)))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});r.TripleDES=l._createHelper(d)}(),e.TripleDES});
},{"./cipher-core":19,"./core":20,"./enc-base64":21,"./evpkdf":23,"./md5":28}],51:[function(require,module,exports){
!function(t,e){"object"==typeof exports?module.exports=exports=e(require("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(t.CryptoJS)}(this,function(t){return function(e){var i=t,o=i.lib,n=o.Base,r=o.WordArray,s=i.x64={};s.Word=n.extend({init:function(t,e){this.high=t,this.low=e}}),s.WordArray=n.extend({init:function(t,i){t=this.words=t||[],i!=e?this.sigBytes=i:this.sigBytes=8*t.length},toX32:function(){for(var t=this.words,e=t.length,i=[],o=0;o<e;o++){var n=t[o];i.push(n.high),i.push(n.low)}return r.create(i,this.sigBytes)},clone:function(){for(var t=n.clone.call(this),e=t.words=this.words.slice(0),i=e.length,o=0;o<i;o++)e[o]=e[o].clone();return t}})}(),t});
},{"./core":20}],52:[function(require,module,exports){
(function (process,Buffer){
var stream=require("readable-stream"),eos=require("end-of-stream"),inherits=require("inherits"),shift=require("stream-shift"),SIGNAL_FLUSH=new Buffer([0]),onuncork=function(e,t){e._corked?e.once("uncork",t):t()},destroyer=function(e,t){return function(i){i?e.destroy("premature close"===i.message?null:i):t&&!e._ended&&e.end()}},end=function(e,t){return e?e._writableState&&e._writableState.finished?t():e._writableState?e.end(t):(e.end(),void t()):t()},toStreams2=function(e){return new stream.Readable({objectMode:!0,highWaterMark:16}).wrap(e)},Duplexify=function(e,t,i){return this instanceof Duplexify?(stream.Duplex.call(this,i),this._writable=null,this._readable=null,this._readable2=null,this._forwardDestroy=!i||i.destroy!==!1,this._forwardEnd=!i||i.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,e&&this.setWritable(e),void(t&&this.setReadable(t))):new Duplexify(e,t,i)};inherits(Duplexify,stream.Duplex),Duplexify.obj=function(e,t,i){return i||(i={}),i.objectMode=!0,i.highWaterMark=16,new Duplexify(e,t,i)},Duplexify.prototype.cork=function(){1===++this._corked&&this.emit("cork")},Duplexify.prototype.uncork=function(){this._corked&&0===--this._corked&&this.emit("uncork")},Duplexify.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed)return void(e&&e.destroy&&e.destroy());if(null===e||e===!1)return void this.end();var t=this,i=eos(e,{writable:!0,readable:!1},destroyer(this,this._forwardEnd)),r=function(){var e=t._ondrain;t._ondrain=null,e&&e()},n=function(){t._writable.removeListener("drain",r),i()};this._unwrite&&process.nextTick(r),this._writable=e,this._writable.on("drain",r),this._unwrite=n,this.uncork()},Duplexify.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed)return void(e&&e.destroy&&e.destroy());if(null===e||e===!1)return this.push(null),void this.resume();var t=this,i=eos(e,{writable:!1,readable:!0},destroyer(this)),r=function(){t._forward()},n=function(){t.push(null)},s=function(){t._readable2.removeListener("readable",r),t._readable2.removeListener("end",n),i()};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:toStreams2(e),this._readable2.on("readable",r),this._readable2.on("end",n),this._unread=s,this._forward()},Duplexify.prototype._read=function(){this._drained=!0,this._forward()},Duplexify.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){this._forwarding=!0;for(var e;this._drained&&null!==(e=shift(this._readable2));)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}},Duplexify.prototype.destroy=function(e){if(!this.destroyed){this.destroyed=!0;var t=this;process.nextTick(function(){t._destroy(e)})}},Duplexify.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},Duplexify.prototype._write=function(e,t,i){return this.destroyed?i():this._corked?onuncork(this,this._write.bind(this,e,t,i)):e===SIGNAL_FLUSH?this._finish(i):this._writable?void(this._writable.write(e)===!1?this._ondrain=i:i()):i()},Duplexify.prototype._finish=function(e){var t=this;this.emit("preend"),onuncork(this,function(){end(t._forwardEnd&&t._writable,function(){t._writableState.prefinished===!1&&(t._writableState.prefinished=!0),t.emit("prefinish"),onuncork(t,e)})})},Duplexify.prototype.end=function(e,t,i){return"function"==typeof e?this.end(null,null,e):"function"==typeof t?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this.write(SIGNAL_FLUSH),stream.Writable.prototype.end.call(this,i))},module.exports=Duplexify;
}).call(this,require('_process'),require("buffer").Buffer)
},{"_process":80,"buffer":16,"end-of-stream":53,"inherits":64,"readable-stream":60,"stream-shift":106}],53:[function(require,module,exports){
var once=require("once"),noop=function(){},isRequest=function(e){return e.setHeader&&"function"==typeof e.abort},eos=function(e,r,n){if("function"==typeof r)return eos(e,null,r);r||(r={}),n=once(n||noop);var o=e._writableState,t=e._readableState,i=r.readable||r.readable!==!1&&e.readable,s=r.writable||r.writable!==!1&&e.writable,u=function(){e.writable||a()},a=function(){s=!1,i||n()},c=function(){i=!1,s||n()},l=function(){return(!i||t&&t.ended)&&(!s||o&&o.ended)?void 0:n(new Error("premature close"))},f=function(){e.req.on("finish",a)};return isRequest(e)?(e.on("complete",a),e.on("abort",l),e.req?f():e.on("request",f)):s&&!o&&(e.on("end",u),e.on("close",u)),e.on("end",c),e.on("finish",a),r.error!==!1&&e.on("error",n),e.on("close",l),function(){e.removeListener("complete",a),e.removeListener("abort",l),e.removeListener("request",f),e.req&&e.req.removeListener("finish",a),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",a),e.removeListener("end",c),e.removeListener("error",n),e.removeListener("close",l)}};module.exports=eos;
},{"once":78}],54:[function(require,module,exports){
"use strict";function Duplex(e){return this instanceof Duplex?(Readable.call(this,e),Writable.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(e)}function onend(){this.allowHalfOpen||this._writableState.ended||processNextTick(onEndNT,this)}function onEndNT(e){e.end()}function forEach(e,t){for(var r=0,i=e.length;r<i;r++)t(e[r],r)}var objectKeys=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};module.exports=Duplex;var processNextTick=require("process-nextick-args"),util=require("core-util-is");util.inherits=require("inherits");var Readable=require("./_stream_readable"),Writable=require("./_stream_writable");util.inherits(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}
},{"./_stream_readable":56,"./_stream_writable":58,"core-util-is":17,"inherits":64,"process-nextick-args":79}],55:[function(require,module,exports){
"use strict";function PassThrough(r){return this instanceof PassThrough?void Transform.call(this,r):new PassThrough(r)}module.exports=PassThrough;var Transform=require("./_stream_transform"),util=require("core-util-is");util.inherits=require("inherits"),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(r,s,i){i(null,r)};
},{"./_stream_transform":57,"core-util-is":17,"inherits":64}],56:[function(require,module,exports){
(function (process){
"use strict";function prependListener(e,t,r){return"function"==typeof e.prependListener?e.prependListener(t,r):void(e._events&&e._events[t]?isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r))}function ReadableState(e,t){Duplex=Duplex||require("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,t instanceof Duplex&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this.decoder=new StringDecoder(e.encoding),this.encoding=e.encoding)}function Readable(e){return Duplex=Duplex||require("./_stream_duplex"),this instanceof Readable?(this._readableState=new ReadableState(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),void Stream.call(this)):new Readable(e)}function readableAddChunk(e,t,r,n,a){var i=chunkInvalid(t,r);if(i)e.emit("error",i);else if(null===r)t.reading=!1,onEofChunk(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!a){var d=new Error("stream.push() after EOF");e.emit("error",d)}else if(t.endEmitted&&a){var o=new Error("stream.unshift() after end event");e.emit("error",o)}else{var u;!t.decoder||a||n||(r=t.decoder.write(r),u=!t.objectMode&&0===r.length),a||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,a?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&emitReadable(e))),maybeReadMore(e,t)}else a||(t.reading=!1);return needMoreData(t)}function needMoreData(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function computeNewHighWaterMark(e){return e>=MAX_HWM?e=MAX_HWM:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function howMuchToRead(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=computeNewHighWaterMark(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function chunkInvalid(e,t){var r=null;return Buffer.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function onEofChunk(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,emitReadable(e)}}function emitReadable(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(debug("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?processNextTick(emitReadable_,e):emitReadable_(e))}function emitReadable_(e){debug("emit readable"),e.emit("readable"),flow(e)}function maybeReadMore(e,t){t.readingMore||(t.readingMore=!0,processNextTick(maybeReadMore_,e,t))}function maybeReadMore_(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(debug("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function pipeOnDrain(e){return function(){var t=e._readableState;debug("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&EElistenerCount(e,"data")&&(t.flowing=!0,flow(e))}}function nReadingNextTick(e){debug("readable nexttick read 0"),e.read(0)}function resume(e,t){t.resumeScheduled||(t.resumeScheduled=!0,processNextTick(resume_,e,t))}function resume_(e,t){t.reading||(debug("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),flow(e),t.flowing&&!t.reading&&e.read(0)}function flow(e){var t=e._readableState;for(debug("flow",t.flowing);t.flowing&&null!==e.read(););}function fromList(e,t){if(0===t.length)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=fromListPartial(e,t.buffer,t.decoder),r}function fromListPartial(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?copyFromBufferString(e,t):copyFromBuffer(e,t),n}function copyFromBufferString(e,t){var r=t.head,n=1,a=r.data;for(e-=a.length;r=r.next;){var i=r.data,d=e>i.length?i.length:e;if(a+=d===i.length?i:i.slice(0,e),e-=d,0===e){d===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(d));break}++n}return t.length-=n,a}function copyFromBuffer(e,t){var r=bufferShim.allocUnsafe(e),n=t.head,a=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var i=n.data,d=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,d),e-=d,0===e){d===i.length?(++a,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(d));break}++a}return t.length-=a,r}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,processNextTick(endReadableNT,t,e))}function endReadableNT(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function forEach(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}function indexOf(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}module.exports=Readable;var processNextTick=require("process-nextick-args"),isArray=require("isarray"),Duplex;Readable.ReadableState=ReadableState;var EE=require("events").EventEmitter,EElistenerCount=function(e,t){return e.listeners(t).length},Stream;!function(){try{Stream=require("stream")}catch(e){}finally{Stream||(Stream=require("events").EventEmitter)}}();var Buffer=require("buffer").Buffer,bufferShim=require("buffer-shims"),util=require("core-util-is");util.inherits=require("inherits");var debugUtil=require("util"),debug=void 0;debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var BufferList=require("./internal/streams/BufferList"),StringDecoder;util.inherits(Readable,Stream),Readable.prototype.push=function(e,t){var r=this._readableState;return r.objectMode||"string"!=typeof e||(t=t||r.defaultEncoding,t!==r.encoding&&(e=bufferShim.from(e,t),t="")),readableAddChunk(this,r,e,t,!1)},Readable.prototype.unshift=function(e){var t=this._readableState;return readableAddChunk(this,t,e,"",!0)},Readable.prototype.isPaused=function(){return this._readableState.flowing===!1},Readable.prototype.setEncoding=function(e){return StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this._readableState.decoder=new StringDecoder(e),this._readableState.encoding=e,this};var MAX_HWM=8388608;Readable.prototype.read=function(e){debug("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return debug("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?endReadable(this):emitReadable(this),null;if(e=howMuchToRead(e,t),0===e&&t.ended)return 0===t.length&&endReadable(this),null;var n=t.needReadable;debug("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&(n=!0,debug("length less than watermark",n)),t.ended||t.reading?(n=!1,debug("reading or ended",n)):n&&(debug("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=howMuchToRead(r,t)));var a;return a=e>0?fromList(e,t):null,null===a?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&endReadable(this)),null!==a&&this.emit("data",a),a},Readable.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},Readable.prototype.pipe=function(e,t){function r(e){debug("onunpipe"),e===s&&a()}function n(){debug("onend"),e.end()}function a(){debug("cleanup"),e.removeListener("close",o),e.removeListener("finish",u),e.removeListener("drain",c),e.removeListener("error",d),e.removeListener("unpipe",r),s.removeListener("end",n),s.removeListener("end",a),s.removeListener("data",i),g=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||c()}function i(t){debug("ondata"),b=!1;var r=e.write(t);!1!==r||b||((1===h.pipesCount&&h.pipes===e||h.pipesCount>1&&indexOf(h.pipes,e)!==-1)&&!g&&(debug("false write response, pause",s._readableState.awaitDrain),s._readableState.awaitDrain++,b=!0),s.pause())}function d(t){debug("onerror",t),l(),e.removeListener("error",d),0===EElistenerCount(e,"error")&&e.emit("error",t)}function o(){e.removeListener("finish",u),l()}function u(){debug("onfinish"),e.removeListener("close",o),l()}function l(){debug("unpipe"),s.unpipe(e)}var s=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,debug("pipe count=%d opts=%j",h.pipesCount,t);var f=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,p=f?n:a;h.endEmitted?processNextTick(p):s.once("end",p),e.on("unpipe",r);var c=pipeOnDrain(s);e.on("drain",c);var g=!1,b=!1;return s.on("data",i),prependListener(e,"error",d),e.once("close",o),e.once("finish",u),e.emit("pipe",s),h.flowing||(debug("pipe resume"),s.resume()),e},Readable.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<n;a++)r[a].emit("unpipe",this);return this}var i=indexOf(t.pipes,e);return i===-1?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},Readable.prototype.on=function(e,t){var r=Stream.prototype.on.call(this,e,t);if("data"===e)this._readableState.flowing!==!1&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&emitReadable(this,n):processNextTick(nReadingNextTick,this))}return r},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var e=this._readableState;return e.flowing||(debug("resume"),e.flowing=!0,resume(this,e)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(debug("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(a){if(debug("wrapped data"),t.decoder&&(a=t.decoder.write(a)),(!t.objectMode||null!==a&&void 0!==a)&&(t.objectMode||a&&a.length)){var i=n.push(a);i||(r=!0,e.pause())}});for(var a in e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));var i=["error","close","destroy","pause","resume"];return forEach(i,function(t){e.on(t,n.emit.bind(n,t))}),n._read=function(t){debug("wrapped _read",t),r&&(r=!1,e.resume())},n},Readable._fromList=fromList;
}).call(this,require('_process'))
},{"./_stream_duplex":54,"./internal/streams/BufferList":59,"_process":80,"buffer":16,"buffer-shims":15,"core-util-is":17,"events":62,"inherits":64,"isarray":66,"process-nextick-args":79,"stream":94,"string_decoder/":107,"util":13}],57:[function(require,module,exports){
"use strict";function TransformState(r){this.afterTransform=function(t,n){return afterTransform(r,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function afterTransform(r,t,n){var e=r._transformState;e.transforming=!1;var i=e.writecb;if(!i)return r.emit("error",new Error("no writecb in Transform class"));e.writechunk=null,e.writecb=null,null!==n&&void 0!==n&&r.push(n),i(t);var a=r._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&r._read(a.highWaterMark)}function Transform(r){if(!(this instanceof Transform))return new Transform(r);Duplex.call(this,r),this._transformState=new TransformState(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,r&&("function"==typeof r.transform&&(this._transform=r.transform),"function"==typeof r.flush&&(this._flush=r.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(r,n){done(t,r,n)}):done(t)})}function done(r,t,n){if(t)return r.emit("error",t);null!==n&&void 0!==n&&r.push(n);var e=r._writableState,i=r._transformState;if(e.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return r.push(null)}module.exports=Transform;var Duplex=require("./_stream_duplex"),util=require("core-util-is");util.inherits=require("inherits"),util.inherits(Transform,Duplex),Transform.prototype.push=function(r,t){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,r,t)},Transform.prototype._transform=function(r,t,n){throw new Error("_transform() is not implemented")},Transform.prototype._write=function(r,t,n){var e=this._transformState;if(e.writecb=n,e.writechunk=r,e.writeencoding=t,!e.transforming){var i=this._readableState;(e.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},Transform.prototype._read=function(r){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};
},{"./_stream_duplex":54,"core-util-is":17,"inherits":64}],58:[function(require,module,exports){
(function (process){
"use strict";function nop(){}function WriteReq(e,t,r){this.chunk=e,this.encoding=t,this.callback=r,this.next=null}function WritableState(e,t){Duplex=Duplex||require("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,t instanceof Duplex&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){onwrite(t,e)},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 CorkedRequest(this)}function Writable(e){return Duplex=Duplex||require("./_stream_duplex"),realHasInstance.call(Writable,this)||this instanceof Duplex?(this._writableState=new WritableState(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),void Stream.call(this)):new Writable(e)}function writeAfterEnd(e,t){var r=new Error("write after end");e.emit("error",r),processNextTick(t,r)}function validChunk(e,t,r,i){var n=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):Buffer.isBuffer(r)||"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),processNextTick(i,s),n=!1),n}function decodeChunk(e,t,r){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=bufferShim.from(t,r)),t}function writeOrBuffer(e,t,r,i,n){r=decodeChunk(t,r,i),Buffer.isBuffer(r)&&(i="buffer");var s=t.objectMode?1:r.length;t.length+=s;var o=t.length<t.highWaterMark;if(o||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest=new WriteReq(r,i,n),u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else doWrite(e,t,!1,s,r,i,n);return o}function doWrite(e,t,r,i,n,s,o){t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,s,t.onwrite),t.sync=!1}function onwriteError(e,t,r,i,n){--t.pendingcb,r?processNextTick(n,i):n(i),e._writableState.errorEmitted=!0,e.emit("error",i)}function onwriteStateUpdate(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function onwrite(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(onwriteStateUpdate(r),t)onwriteError(e,r,i,t,n);else{var s=needFinish(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||clearBuffer(e,r),i?asyncWrite(afterWrite,e,r,s,n):afterWrite(e,r,s,n)}}function afterWrite(e,t,r,i){r||onwriteDrain(e,t),t.pendingcb--,i(),finishMaybe(e,t)}function onwriteDrain(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function clearBuffer(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),s=t.corkedRequestsFree;s.entry=r;for(var o=0;r;)n[o]=r,r=r.next,o+=1;doWrite(e,t,!0,t.length,n,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new CorkedRequest(t)}else{for(;r;){var u=r.chunk,f=r.encoding,a=r.callback,c=t.objectMode?1:u.length;if(doWrite(e,t,!1,c,u,f,a),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function needFinish(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function prefinish(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function finishMaybe(e,t){var r=needFinish(t);return r&&(0===t.pendingcb?(prefinish(e,t),t.finished=!0,e.emit("finish")):prefinish(e,t)),r}function endWritable(e,t,r){t.ending=!0,finishMaybe(e,t),r&&(t.finished?processNextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function CorkedRequest(e){var t=this;this.next=null,this.entry=null,this.finish=function(r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}module.exports=Writable;var processNextTick=require("process-nextick-args"),asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:processNextTick,Duplex;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var internalUtil={deprecate:require("util-deprecate")},Stream;!function(){try{Stream=require("stream")}catch(e){}finally{Stream||(Stream=require("events").EventEmitter)}}();var Buffer=require("buffer").Buffer,bufferShim=require("buffer-shims");util.inherits(Writable,Stream),WritableState.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var realHasInstance;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){return!!realHasInstance.call(this,e)||e&&e._writableState instanceof WritableState}})):realHasInstance=function(e){return e instanceof this},Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Writable.prototype.write=function(e,t,r){var i=this._writableState,n=!1;return"function"==typeof t&&(r=t,t=null),Buffer.isBuffer(e)?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=nop),i.ended?writeAfterEnd(this,r):validChunk(this,i,e,r)&&(i.pendingcb++,n=writeOrBuffer(this,i,e,t,r)),n},Writable.prototype.cork=function(){var e=this._writableState;e.corked++},Writable.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||clearBuffer(this,e))},Writable.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Writable.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||endWritable(this,i,r)};
}).call(this,require('_process'))
},{"./_stream_duplex":54,"_process":80,"buffer":16,"buffer-shims":15,"core-util-is":17,"events":62,"inherits":64,"process-nextick-args":79,"stream":94,"util-deprecate":110}],59:[function(require,module,exports){
"use strict";function BufferList(){this.head=null,this.tail=null,this.length=0}var Buffer=require("buffer").Buffer,bufferShim=require("buffer-shims");module.exports=BufferList,BufferList.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},BufferList.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},BufferList.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0},BufferList.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,i=""+e.data;e=e.next;)i+=t+e.data;return i},BufferList.prototype.concat=function(t){if(0===this.length)return bufferShim.alloc(0);if(1===this.length)return this.head.data;for(var e=bufferShim.allocUnsafe(t>>>0),i=this.head,h=0;i;)i.data.copy(e,h),h+=i.data.length,i=i.next;return e};
},{"buffer":16,"buffer-shims":15}],60:[function(require,module,exports){
(function (process){
var Stream=function(){try{return require("stream")}catch(r){}}();exports=module.exports=require("./lib/_stream_readable.js"),exports.Stream=Stream||exports,exports.Readable=exports,exports.Writable=require("./lib/_stream_writable.js"),exports.Duplex=require("./lib/_stream_duplex.js"),exports.Transform=require("./lib/_stream_transform.js"),exports.PassThrough=require("./lib/_stream_passthrough.js"),!process.browser&&"disable"===process.env.READABLE_STREAM&&Stream&&(module.exports=Stream);
}).call(this,require('_process'))
},{"./lib/_stream_duplex.js":54,"./lib/_stream_passthrough.js":55,"./lib/_stream_readable.js":56,"./lib/_stream_transform.js":57,"./lib/_stream_writable.js":58,"_process":80,"stream":94}],61:[function(require,module,exports){
var once=require("once"),noop=function(){},isRequest=function(e){return e.setHeader&&"function"==typeof e.abort},isChildProcess=function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length},eos=function(e,r,n){if("function"==typeof r)return eos(e,null,r);r||(r={}),n=once(n||noop);var o=e._writableState,t=e._readableState,i=r.readable||r.readable!==!1&&e.readable,s=r.writable||r.writable!==!1&&e.writable,u=function(){e.writable||c()},c=function(){s=!1,i||n()},a=function(){i=!1,s||n()},l=function(e){n(e?new Error("exited with error code: "+e):null)},d=function(){return(!i||t&&t.ended)&&(!s||o&&o.ended)?void 0:n(new Error("premature close"))},f=function(){e.req.on("finish",c)};return isRequest(e)?(e.on("complete",c),e.on("abort",d),e.req?f():e.on("request",f)):s&&!o&&(e.on("end",u),e.on("close",u)),isChildProcess(e)&&e.on("exit",l),e.on("end",a),e.on("finish",c),r.error!==!1&&e.on("error",n),e.on("close",d),function(){e.removeListener("complete",c),e.removeListener("abort",d),e.removeListener("request",f),e.req&&e.req.removeListener("finish",c),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("exit",l),e.removeListener("end",a),e.removeListener("error",n),e.removeListener("close",d)}};module.exports=eos;
},{"once":78}],62:[function(require,module,exports){
function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(e){return"function"==typeof e}function isNumber(e){return"number"==typeof e}function isObject(e){return"object"==typeof e&&null!==e}function isUndefined(e){return void 0===e}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(e){if(!isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},EventEmitter.prototype.emit=function(e){var t,i,n,s,r,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i=this._events[e],isUndefined(i))return!1;if(isFunction(i))switch(arguments.length){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),i.apply(this,s)}else if(isObject(i))for(s=Array.prototype.slice.call(arguments,1),o=i.slice(),n=o.length,r=0;r<n;r++)o[r].apply(this,s);return!0},EventEmitter.prototype.addListener=function(e,t){var i;if(!isFunction(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,isFunction(t.listener)?t.listener:t),this._events[e]?isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,isObject(this._events[e])&&!this._events[e].warned&&(i=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(e,t){function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}if(!isFunction(t))throw TypeError("listener must be a function");var n=!1;return i.listener=t,this.on(e,i),this},EventEmitter.prototype.removeListener=function(e,t){var i,n,s,r;if(!isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=this._events[e],s=i.length,n=-1,i===t||isFunction(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(isObject(i)){for(r=s;r-- >0;)if(i[r]===t||i[r].listener&&i[r].listener===t){n=r;break}if(n<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},EventEmitter.prototype.removeAllListeners=function(e){var t,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i=this._events[e],isFunction(i))this.removeListener(e,i);else if(i)for(;i.length;)this.removeListener(e,i[i.length-1]);return delete this._events[e],this},EventEmitter.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},EventEmitter.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(isFunction(t))return 1;if(t)return t.length}return 0},EventEmitter.listenerCount=function(e,t){return e.listenerCount(t)};
},{}],63:[function(require,module,exports){
exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:(s?-1:1)*(1/0);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),o+=p+N>=1?n/f:n*Math.pow(2,1-N),o*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
},{}],64:[function(require,module,exports){
"function"==typeof Object.create?module.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(t,e){t.super_=e;var o=function(){};o.prototype=e.prototype,t.prototype=new o,t.prototype.constructor=t};
},{}],65:[function(require,module,exports){
function isBuffer(f){return!!f.constructor&&"function"==typeof f.constructor.isBuffer&&f.constructor.isBuffer(f)}function isSlowBuffer(f){return"function"==typeof f.readFloatLE&&"function"==typeof f.slice&&isBuffer(f.slice(0,0))}module.exports=function(f){return null!=f&&(isBuffer(f)||isSlowBuffer(f)||!!f._isBuffer)};
},{}],66:[function(require,module,exports){
var toString={}.toString;module.exports=Array.isArray||function(r){return"[object Array]"==toString.call(r)};
},{}],67:[function(require,module,exports){
module.exports.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"},module.exports.codes={};for(var k in module.exports.types){var v=module.exports.types[k];module.exports.codes[v]=k}module.exports.CMD_SHIFT=4,module.exports.CMD_MASK=240,module.exports.DUP_MASK=8,module.exports.QOS_MASK=3,module.exports.QOS_SHIFT=1,module.exports.RETAIN_MASK=1,module.exports.LENGTH_MASK=127,module.exports.LENGTH_FIN_MASK=128,module.exports.SESSIONPRESENT_MASK=1,module.exports.USERNAME_MASK=128,module.exports.PASSWORD_MASK=64,module.exports.WILL_RETAIN_MASK=32,module.exports.WILL_QOS_MASK=24,module.exports.WILL_QOS_SHIFT=3,module.exports.WILL_FLAG_MASK=4,module.exports.CLEAN_SESSION_MASK=2;
},{}],68:[function(require,module,exports){
(function (Buffer){
"use strict";function generate(r){switch(r.cmd){case"connect":return connect(r);case"connack":return connack(r);case"publish":return publish(r);case"puback":case"pubrec":case"pubrel":case"pubcomp":case"unsuback":return confirmation(r);case"subscribe":return subscribe(r);case"suback":return suback(r);case"unsubscribe":return unsubscribe(r);case"pingreq":case"pingresp":case"disconnect":return emptyPacket(r);default:throw new Error("unknown command")}}function connect(r){var r=r||{},e=r.protocolId||"MQTT",t=r.protocolVersion||4,o=r.will,n=r.clean,i=r.keepalive||0,c=r.clientId||"",f=r.username,u=r.password;void 0===n&&(n=!0);var s=0;if(!e||"string"!=typeof e&&!Buffer.isBuffer(e))throw new Error("Invalid protocol id");if(s+=e.length+2,!t||"number"!=typeof t||t>255||t<0)throw new Error("Invalid protocol version");if(s+=1,"string"!=typeof c&&!Buffer.isBuffer(c)||!c&&4!=t||!c&&!n){if(t<4)throw new Error("clientId must be supplied before 3.1.1");if(0==n)throw new Error("clientId must be given if cleanSession set to 0")}else s+=c.length+2;if("number"!=typeof i||i<0||i>65535)throw new Error("Invalid keepalive");if(s+=2,s+=1,o){if("object"!=typeof o)throw new Error("Invalid will");if(!o.topic||"string"!=typeof o.topic)throw new Error("Invalid will topic");if(s+=Buffer.byteLength(o.topic)+2,o.payload&&o.payload){if(!(o.payload.length>=0))throw new Error("Invalid will payload");s+="string"==typeof o.payload?Buffer.byteLength(o.payload)+2:o.payload.length+2}else s+=2}if(f){if(!f.length)throw new Error("Invalid username");s+=Buffer.byteLength(f)+2}if(u){if(!u.length)throw new Error("Invalid password");s+=byteLength(u)+2}var a=new Buffer(1+calcLengthLength(s)+s),l=0;a.writeUInt8(protocol.codes.connect<<protocol.CMD_SHIFT,l++,!0),l+=writeLength(a,l,s),l+=writeStringOrBuffer(a,l,e),a.writeUInt8(t,l++,!0);var w=0;return w|=f?protocol.USERNAME_MASK:0,w|=u?protocol.PASSWORD_MASK:0,w|=o&&o.retain?protocol.WILL_RETAIN_MASK:0,w|=o&&o.qos?o.qos<<protocol.WILL_QOS_SHIFT:0,w|=o?protocol.WILL_FLAG_MASK:0,w|=n?protocol.CLEAN_SESSION_MASK:0,a.writeUInt8(w,l++,!0),l+=writeNumber(a,l,i),l+=writeStringOrBuffer(a,l,c),o&&(l+=writeString(a,l,o.topic),l+=writeStringOrBuffer(a,l,o.payload)),f&&(l+=writeStringOrBuffer(a,l,f)),u&&(l+=writeStringOrBuffer(a,l,u)),a}function connack(r){var r=r||{},e=r.returnCode;if("number"!=typeof e)throw new Error("Invalid return code");var t=new Buffer(4),o=0;return t.writeUInt8(protocol.codes.connack<<protocol.CMD_SHIFT,o++,!0),o+=writeLength(t,o,2),t.writeUInt8(r.sessionPresent&&protocol.SESSIONPRESENT_MASK||0,o++,!0),t.writeUInt8(e,o++,!0),t}function publish(r){var r=r||{},e=r.dup?protocol.DUP_MASK:0,t=r.qos,o=r.retain?protocol.RETAIN_MASK:0,n=r.topic,i=r.payload||empty,c=r.messageId,f=0;if("string"==typeof n)f+=Buffer.byteLength(n)+2;else{if(!Buffer.isBuffer(n))throw new Error("Invalid topic");f+=n.length+2}if(f+=Buffer.isBuffer(i)?i.length:Buffer.byteLength(i),t&&"number"!=typeof c)throw new Error("Invalid message id");t&&(f+=2);var u=new Buffer(1+calcLengthLength(f)+f),s=0;return u.writeUInt8(protocol.codes.publish<<protocol.CMD_SHIFT|e|t<<protocol.QOS_SHIFT|o,s++,!0),s+=writeLength(u,s,f),s+=writeStringOrBuffer(u,s,n),t>0&&(s+=writeNumber(u,s,c)),Buffer.isBuffer(i)?writeBuffer(u,s,i):writeStringNoPos(u,s,i),u}function confirmation(r){var r=r||{},e=r.cmd||"puback",t=r.messageId,o=r.dup&&"pubrel"===e?protocol.DUP_MASK:0,n=0;if("pubrel"===e&&(n=1),"number"!=typeof t)throw new Error("Invalid message id");var i=new Buffer(4),c=0;return i[c++]=protocol.codes[e]<<protocol.CMD_SHIFT|o|n<<protocol.QOS_SHIFT,c+=writeLength(i,c,2),c+=writeNumber(i,c,t),i}function subscribe(r){var r=r||{},e=r.dup?protocol.DUP_MASK:0,t=r.qos||0,o=r.messageId,n=r.subscriptions,i=0;if("number"!=typeof o)throw new Error("Invalid message id");if(i+=2,"object"!=typeof n||!n.length)throw new Error("Invalid subscriptions");for(var c=0;c<n.length;c+=1){var f=n[c].topic,t=n[c].qos;if("string"!=typeof f)throw new Error("Invalid subscriptions - invalid topic");if("number"!=typeof t)throw new Error("Invalid subscriptions - invalid qos");i+=Buffer.byteLength(f)+2+1}var u=new Buffer(1+calcLengthLength(i)+i),s=0;u.writeUInt8(protocol.codes.subscribe<<protocol.CMD_SHIFT|e|1<<protocol.QOS_SHIFT,s++,!0),s+=writeLength(u,s,i),s+=writeNumber(u,s,o);for(var c=0;c<n.length;c++){var a=n[c],f=a.topic,t=a.qos;s+=writeString(u,s,f),u.writeUInt8(t,s++,!0)}return u}function suback(r){var r=r||{},e=r.messageId,t=r.granted,o=0;if("number"!=typeof e)throw new Error("Invalid message id");if(o+=2,"object"!=typeof t||!t.length)throw new Error("Invalid qos vector");for(var n=0;n<t.length;n+=1){if("number"!=typeof t[n])throw new Error("Invalid qos vector");o+=1}var i=new Buffer(1+calcLengthLength(o)+o),c=0;i.writeUInt8(protocol.codes.suback<<protocol.CMD_SHIFT,c++,!0),c+=writeLength(i,c,o),c+=writeNumber(i,c,e);for(var n=0;n<t.length;n++)i.writeUInt8(t[n],c++,!0);return i}function unsubscribe(r){var r=r||{},e=r.messageId,t=r.dup?protocol.DUP_MASK:0,o=r.unsubscriptions,n=0;if("number"!=typeof e)throw new Error("Invalid message id");if(n+=2,"object"!=typeof o||!o.length)throw new Error("Invalid unsubscriptions");for(var i=0;i<o.length;i+=1){if("string"!=typeof o[i])throw new Error("Invalid unsubscriptions");n+=Buffer.byteLength(o[i])+2}var c=new Buffer(1+calcLengthLength(n)+n),f=0;c[f++]=protocol.codes.unsubscribe<<protocol.CMD_SHIFT|t|1<<protocol.QOS_SHIFT,f+=writeLength(c,f,n),f+=writeNumber(c,f,e);for(var i=0;i<o.length;i++)f+=writeString(c,f,o[i]);return c}function emptyPacket(r){var e=new Buffer(2);return e[0]=protocol.codes[r.cmd]<<4,e[1]=0,e}function calcLengthLength(r){return r>=0&&r<128?1:r>=128&&r<16384?2:r>=16384&&r<2097152?3:r>=2097152&&r<268435456?4:0}function writeLength(r,e,t){var o=0,n=e;do o=t%128|0,t=t/128|0,t>0&&(o|=128),r.writeUInt8(o,e++,!0);while(t>0);return e-n}function writeString(r,e,t){var o=Buffer.byteLength(t);return writeNumber(r,e,o),writeStringNoPos(r,e+2,t),o+2}function writeStringNoPos(r,e,t){r.write(t,e)}function writeBuffer(r,e,t){return t.copy(r,e),t.length}function writeNumber(r,e,t){return r.writeUInt8(t>>8,e,!0),r.writeUInt8(255&t,e+1,!0),2}function writeStringOrBuffer(r,e,t){var o=0;return t&&"string"==typeof t?o+=writeString(r,e+o,t):t?(o+=writeNumber(r,e+o,t.length),o+=writeBuffer(r,e+o,t)):o+=writeNumber(r,e+o,0),o}function byteLength(r){return Buffer.isBuffer(r)?r.length:Buffer.byteLength(r)}var protocol=require("./constants"),empty=new Buffer(0);module.exports=generate;
}).call(this,require("buffer").Buffer)
},{"./constants":67,"buffer":16}],69:[function(require,module,exports){
"use strict";exports.parser=require("./parser"),exports.generate=require("./generate");
},{"./generate":68,"./parser":71}],70:[function(require,module,exports){
function Packet(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}module.exports=Packet;
},{}],71:[function(require,module,exports){
function Parser(){return this instanceof Parser?(this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],void this._resetState()):new Parser}var bl=require("bl"),inherits=require("inherits"),EE=require("events").EventEmitter,Packet=require("./packet"),constants=require("./constants");inherits(Parser,EE),Parser.prototype._resetState=function(){this.packet=new Packet,this.error=null,this._list=bl(),this._stateCounter=0},Parser.prototype.parse=function(t){for(this.error&&this._resetState(),this._list.append(t);(this.packet.length!=-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,this._stateCounter>=this._states.length&&(this._stateCounter=0);return this._list.length},Parser.prototype._parseHeader=function(){var t=this._list.readUInt8(0);return this.packet.cmd=constants.types[t>>constants.CMD_SHIFT],this.packet.retain=0!==(t&constants.RETAIN_MASK),this.packet.qos=t>>constants.QOS_SHIFT&constants.QOS_MASK,this.packet.dup=0!==(t&constants.DUP_MASK),this._list.consume(1),!0},Parser.prototype._parseLength=function(){for(var t,s=0,r=1,e=0,i=!0;s<5&&(t=this._list.readUInt8(s++),e+=r*(t&constants.LENGTH_MASK),r*=128,0!==(t&constants.LENGTH_FIN_MASK));)if(this._list.length<=s){i=!1;break}return i&&(this.packet.length=e,this._list.consume(s)),i},Parser.prototype._parsePayload=function(){var t=!1;if(0===this.packet.length||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"))}t=!0}return t},Parser.prototype._parseConnect=function(){var t,s,r,e,i,n,a={},o=this.packet;if(t=this._parseString(),null===t)return this._emitError(new Error("cannot parse protocol id"));if("MQTT"!=t&&"MQIsdp"!=t)return this._emitError(new Error("invalid protocol id"));if(o.protocolId=t,this._pos>=this._list.length)return this._emitError(new Error("packet too short"));if(o.protocolVersion=this._list.readUInt8(this._pos),3!=o.protocolVersion&&4!=o.protocolVersion)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(a.username=this._list.readUInt8(this._pos)&constants.USERNAME_MASK,a.password=this._list.readUInt8(this._pos)&constants.PASSWORD_MASK,a.will=this._list.readUInt8(this._pos)&constants.WILL_FLAG_MASK,a.will&&(o.will={},o.will.retain=0!==(this._list.readUInt8(this._pos)&constants.WILL_RETAIN_MASK),o.will.qos=(this._list.readUInt8(this._pos)&constants.WILL_QOS_MASK)>>constants.WILL_QOS_SHIFT),o.clean=0!==(this._list.readUInt8(this._pos)&constants.CLEAN_SESSION_MASK),this._pos++,o.keepalive=this._parseNum(),o.keepalive===-1)return this._emitError(new Error("packet too short"));if(s=this._parseString(),null===s)return this._emitError(new Error("packet too short"));if(o.clientId=s,a.will){if(r=this._parseString(),null===r)return this._emitError(new Error("cannot parse will topic"));if(o.will.topic=r,e=this._parseBuffer(),null===e)return this._emitError(new Error("cannot parse will payload"));o.will.payload=e}if(a.username){if(n=this._parseString(),null===n)return this._emitError(new Error("cannot parse username"));o.username=n}if(a.password){if(i=this._parseBuffer(),null===i)return this._emitError(new Error("cannot parse username"));o.password=i}return o},Parser.prototype._parseConnack=function(){var t=this.packet;return this._list.length<2?null:(t.sessionPresent=!!(this._list.readUInt8(this._pos++)&constants.SESSIONPRESENT_MASK),t.returnCode=this._list.readUInt8(this._pos),t.returnCode===-1?this._emitError(new Error("cannot parse return code")):void 0)},Parser.prototype._parsePublish=function(){var t=this.packet;return t.topic=this._parseString(),null===t.topic?this._emitError(new Error("cannot parse topic")):void(t.qos>0&&!this._parseMessageId()||(t.payload=this._list.slice(this._pos,t.length)))},Parser.prototype._parseSubscribe=function(){var t,s,r=this.packet;if(1!=r.qos)return this._emitError(new Error("wrong subscribe header"));if(r.subscriptions=[],this._parseMessageId())for(;this._pos<r.length;){if(t=this._parseString(),null===t)return this._emitError(new Error("Parse error - cannot parse topic"));s=this._list.readUInt8(this._pos++),r.subscriptions.push({topic:t,qos:s})}},Parser.prototype._parseSuback=function(){if(this.packet.granted=[],this._parseMessageId())for(;this._pos<this.packet.length;)this.packet.granted.push(this._list.readUInt8(this._pos++))},Parser.prototype._parseUnsubscribe=function(){var t=this.packet;if(t.unsubscriptions=[],this._parseMessageId())for(;this._pos<t.length;){var s;if(s=this._parseString(),null===s)return this._emitError(new Error("cannot parse topic"));t.unsubscriptions.push(s)}},Parser.prototype._parseUnsuback=function(){if(!this._parseMessageId())return this._emitError(new Error("cannot parse message id"))},Parser.prototype._parseMessageId=function(){var t=this.packet;return t.messageId=this._parseNum(),null!==t.messageId||(this._emitError(new Error("cannot parse message id")),!1)},Parser.prototype._parseString=function(t){var s,r=this._parseNum(),e=r+this._pos;return r===-1||e>this._list.length||e>this.packet.length?null:(s=this._list.toString("utf8",this._pos,e),this._pos+=r,s)},Parser.prototype._parseBuffer=function(){var t,s=this._parseNum(),r=s+this._pos;return s===-1||r>this._list.length||r>this.packet.length?null:(t=this._list.slice(this._pos,r),this._pos+=s,t)},Parser.prototype._parseNum=function(){if(this._list.length-this._pos<2)return-1;var t=this._list.readUInt16BE(this._pos);return this._pos+=2,t},Parser.prototype._newPacket=function(){return this.packet&&(this._list.consume(this.packet.length),this.emit("packet",this.packet)),this.packet=new Packet,!0},Parser.prototype._emitError=function(t){this.error=t,this.emit("error",t)},module.exports=Parser;
},{"./constants":67,"./packet":70,"bl":12,"events":62,"inherits":64}],72:[function(require,module,exports){
(function (process,global){
"use strict";function defaultId(){return"mqttjs_"+Math.random().toString(16).substr(2,8)}function sendPacket(t,e,n){try{var i=mqttPacket.generate(e);t.emit("packetsend",e),t.stream.write(i)&&n?n():n&&t.stream.once("drain",n)}catch(e){n?n(e):t.emit("error",e)}}function storeAndSend(t,e,n){t.outgoingStore.put(e,function(i){return i?n&&n(i):void sendPacket(t,e,n)})}function nop(){}function MqttClient(t,e){var n,i=this;if(!(this instanceof MqttClient))return new MqttClient(t,e);this.options=e||{};for(n in defaultConnectOptions)"undefined"==typeof this.options[n]?this.options[n]=defaultConnectOptions[n]:this.options[n]=e[n];this.options.clientId=this.options.clientId||defaultId(),this.streamBuilder=t,this.outgoingStore=this.options.outgoingStore||new Store,this.incomingStore=this.options.incomingStore||new Store,this.queueQoSZero=null==this.options.queueQoSZero||this.options.queueQoSZero,this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this.nextId=Math.floor(65535*Math.random()),this.outgoing={},this.on("connect",function(){this.connected=!0;var t=null;t=this.outgoingStore.createStream(),t.once("readable",function(){function e(){var n,o=t.read(1);o&&(!i.disconnecting&&!i.reconnectTimer&&0<i.options.reconnectPeriod?(t.read(0),n=i.outgoing[o.messageId],i.outgoing[o.messageId]=function(){n&&n(),e()},i._sendPacket(o)):t.destroy&&t.destroy())}e()}).on("error",this.emit.bind(this,"error"))}),this.on("close",function(){this.connected=!1,clearTimeout(this.connackTimer)}),this.on("connect",this._setupPingTimer),this.on("connect",function(){function t(){var n=e.shift(),o=null;n&&(o=n.packet,i._sendPacket(o,function(e){n.cb&&n.cb(e),t()}))}var e=this.queue;t()}),this.on("close",function(){null!==i.pingTimer&&(i.pingTimer.clear(),i.pingTimer=null)}),this.on("close",this._setupReconnect),events.EventEmitter.call(this),this._setupStream()}var events=require("events"),Store=require("./store"),eos=require("end-of-stream"),mqttPacket=require("mqtt-packet"),Writable=require("readable-stream").Writable,inherits=require("inherits"),reInterval=require("reinterval"),setImmediate=global.setImmediate||function(t){process.nextTick(t)},defaultConnectOptions={keepalive:10,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0};inherits(MqttClient,events.EventEmitter),MqttClient.prototype._setupStream=function(){function t(){var e=r.shift(),i=s;e?n._handlePacket(e,t):(s=null,i())}var e,n=this,i=new Writable,o=mqttPacket.parser(this.options),s=null,r=[];this._clearReconnect(),this.stream=this.streamBuilder(this),o.on("packet",function(t){r.push(t)}),i._write=function(e,n,i){s=i,o.parse(e),t()},this.stream.pipe(i),this.stream.on("error",nop),eos(this.stream,this.emit.bind(this,"close")),e=Object.create(this.options),e.cmd="connect",sendPacket(this,e),o.on("error",this.emit.bind(this,"error")),this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(function(){n._cleanUp(!0)},this.options.connectTimeout)},MqttClient.prototype._handlePacket=function(t,e){switch(this.emit("packetreceive",t),t.cmd){case"publish":this._handlePublish(t,e);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":this._handleAck(t),e();break;case"pubrel":this._handlePubrel(t,e);break;case"connack":this._handleConnack(t),e();break;case"pingresp":this._handlePingresp(t),e()}},MqttClient.prototype._checkDisconnecting=function(t){return this.disconnecting&&(t?t(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting},MqttClient.prototype.publish=function(t,e,n,i){var o;if("function"==typeof n&&(i=n,n=null),n||(n={qos:0,retain:!1}),this._checkDisconnecting(i))return this;switch(o={cmd:"publish",topic:t,payload:e,qos:n.qos,retain:n.retain,messageId:this._nextId()},n.qos){case 1:case 2:this.outgoing[o.messageId]=i||nop,this._sendPacket(o);break;default:this._sendPacket(o,i)}return this},MqttClient.prototype.subscribe=function(){var t,e=Array.prototype.slice.call(arguments),n=[],i=e.shift(),o=e.pop()||nop,s=e.pop();return"string"==typeof i&&(i=[i]),"function"!=typeof o&&(s=o,o=nop),this._checkDisconnecting(o)?this:(s||(s={qos:0}),Array.isArray(i)?i.forEach(function(t){n.push({topic:t,qos:s.qos})}):Object.keys(i).forEach(function(t){n.push({topic:t,qos:i[t]})}),t={cmd:"subscribe",subscriptions:n,qos:1,retain:!1,dup:!1,messageId:this._nextId()},this.outgoing[t.messageId]=o,this._sendPacket(t),this)},MqttClient.prototype.unsubscribe=function(t,e){var n={cmd:"unsubscribe",qos:1,messageId:this._nextId()};return e=e||nop,this._checkDisconnecting(e)?this:("string"==typeof t?n.unsubscriptions=[t]:"object"==typeof t&&t.length&&(n.unsubscriptions=t),this.outgoing[n.messageId]=e,this._sendPacket(n),this)},MqttClient.prototype.end=function(t,e){function n(){o.incomingStore.close(function(){o.outgoingStore.close(e)})}function i(){o._cleanUp(t,n)}var o=this;return"function"==typeof t&&(e=t,t=!1),!!this.disconnecting||(this.disconnecting=!0,!t&&0<Object.keys(this.outgoing).length?this.once("outgoingEmpty",setTimeout.bind(null,i,10)):i(),this)},MqttClient.prototype._reconnect=function(){this.emit("reconnect"),this._setupStream()},MqttClient.prototype._setupReconnect=function(){var t=this;!t.disconnecting&&!t.reconnectTimer&&0<t.options.reconnectPeriod&&(this.emit("offline"),t.reconnectTimer=setInterval(function(){t._reconnect()},t.options.reconnectPeriod))},MqttClient.prototype._clearReconnect=function(){this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=!1)},MqttClient.prototype._cleanUp=function(t,e){e&&this.stream.on("close",e),t?this.stream.destroy():this._sendPacket({cmd:"disconnect"},setImmediate.bind(null,this.stream.end.bind(this.stream))),this.reconnectTimer&&(this._clearReconnect(),this._setupReconnect()),null!==this.pingTimer&&(this.pingTimer.clear(),this.pingTimer=null)},MqttClient.prototype._sendPacket=function(t,e){if(!this.connected)return void(0<t.qos||"publish"!==t.cmd||this.queueQoSZero?this.queue.push({packet:t,cb:e}):e&&e(new Error("No connection to broker")));switch(this._shiftPingInterval(),t.qos){case 2:case 1:storeAndSend(this,t,e);break;case 0:default:sendPacket(this,t,e)}},MqttClient.prototype._setupPingTimer=function(){var t=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=reInterval(function(){t._checkPing()},1e3*this.options.keepalive))},MqttClient.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},MqttClient.prototype._checkPing=function(){this.pingResp?(this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):this._cleanUp(!0)},MqttClient.prototype._handlePingresp=function(){this.pingResp=!0},MqttClient.prototype._handleConnack=function(t){var e=t.returnCode,n=["","Unacceptable protocol version","Identifier rejected","Server unavailable","Bad username or password","Not authorized"];clearTimeout(this.connackTimer),0===e?this.emit("connect",t):0<e&&this.emit("error",new Error("Connection refused: "+n[e]))},MqttClient.prototype._handlePublish=function(t,e){var n=t.topic.toString(),i=t.payload,o=t.qos,s=t.messageId,r=this;switch(o){case 2:this.incomingStore.put(t,function(){r._sendPacket({cmd:"pubrec",messageId:s},e)});break;case 1:this._sendPacket({cmd:"puback",messageId:s});case 0:this.emit("message",n,i,t),this.handleMessage(t,e)}},MqttClient.prototype.handleMessage=function(t,e){e()},MqttClient.prototype._handleAck=function(t){var e=t.messageId,n=t.cmd,i=null,o=this.outgoing[e],s=this;if(o){switch(n){case"pubcomp":case"puback":delete this.outgoing[e],this.outgoingStore.del(t,o);break;case"pubrec":i={cmd:"pubrel",qos:2,messageId:e},this._sendPacket(i);break;case"suback":delete this.outgoing[e],this.outgoingStore.del(t,function(e,n){if(e)return s.emit("error",e);var i,r=n.subscriptions,c=t.granted;for(i=0;i<c.length;i+=1)r[i].qos=c[i];o(null,r)});break;case"unsuback":delete this.outgoing[e],this.outgoingStore.del(t,o);break;default:s.emit("error",new Error("unrecognized packet type"))}this.disconnecting&&0===Object.keys(this.outgoing).length&&this.emit("outgoingEmpty")}},MqttClient.prototype._handlePubrel=function(t,e){var n=t.messageId,i=this;i.incomingStore.get(t,function(o,s){return o?i.emit("error",o):("pubrel"!==s.cmd&&(i.emit("message",s.topic,s.payload,s),i.incomingStore.put(t)),void i._sendPacket({cmd:"pubcomp",messageId:n},e))})},MqttClient.prototype._nextId=function(){var t=this.nextId++;return 65535===t&&(this.nextId=1),t},module.exports=MqttClient;
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./store":77,"_process":80,"end-of-stream":61,"events":62,"inherits":64,"mqtt-packet":69,"readable-stream":92,"reinterval":93}],73:[function(require,module,exports){
(function (process){
"use strict";function parseAuthOptions(o){var t;o.auth&&(t=o.auth.match(/^(.+):(.+)$/),t?(o.username=t[1],o.password=t[2]):o.username=o.auth)}function connect(o,t){function r(o){return t.servers&&(o._reconnectCount&&o._reconnectCount!==t.servers.length||(o._reconnectCount=0),t.host=t.servers[o._reconnectCount].host,t.port=t.servers[o._reconnectCount].port,t.hostname=t.host,o._reconnectCount++),protocols[t.protocol](o,t)}if("object"!=typeof o||t||(t=o,o=null),t=t||{},o&&(t=xtend(url.parse(o,!0),t),t.protocol=t.protocol.replace(/\:$/,"")),parseAuthOptions(t),t.query&&"string"==typeof t.query.clientId&&(t.clientId=t.query.clientId),t.cert&&t.key){if(!t.protocol)throw new Error("Missing secure protocol key");if(-1===["mqtts","wss"].indexOf(t.protocol))switch(t.protocol){case"mqtt":t.protocol="mqtts";break;case"ws":t.protocol="wss";break;default:throw new Error('Unknown protocol for secure conenction: "'+t.protocol+'"!')}}if(protocols[t.protocol]||(t.protocol=protocolList.filter(function(o){return"function"==typeof protocols[o]})[0]),!1===t.clean&&!t.clientId)throw new Error("Missing clientId for unclean clients");return new MqttClient(r,t)}var MqttClient=require("../client"),url=require("url"),xtend=require("xtend"),protocols={},protocolList=[];"browser"!==process.title&&(protocols.mqtt=require("./tcp"),protocols.tcp=require("./tcp"),protocols.ssl=require("./tls"),protocols.tls=require("./tls"),protocols.mqtts=require("./tls")),protocols.ws=require("./ws"),protocols.wss=require("./ws"),protocolList=["mqtt","mqtts","ws","wss"],module.exports=connect,module.exports.connect=connect,module.exports.MqttClient=MqttClient;
}).call(this,require('_process'))
},{"../client":72,"./tcp":74,"./tls":75,"./ws":76,"_process":80,"url":108,"xtend":124}],74:[function(require,module,exports){
"use strict";function buildBuilder(t,e){var o,r;return e.port=e.port||1883,e.hostname=e.hostname||e.host||"localhost",o=e.port,r=e.hostname,net.createConnection(o,r)}var net=require("net");module.exports=buildBuilder;
},{"net":13}],75:[function(require,module,exports){
"use strict";function buildBuilder(r,e){function t(t){e.rejectUnauthorized&&r.emit("error",t),o.end()}var o;return e.port=e.port||8883,e.host=e.hostname||e.host||"localhost",e.rejectUnauthorized=!1!==e.rejectUnauthorized,o=tls.connect(e),o.on("secureConnect",function(){e.rejectUnauthorized&&!o.authorized?o.emit("error",new Error("TLS not authorized")):o.removeListener("error",t)}),o.on("error",t),o}var tls=require("tls");module.exports=buildBuilder;
},{"tls":13}],76:[function(require,module,exports){
(function (process){
"use strict";function buildBuilder(o,t){var r={protocol:"mqttv3.1"},e=t.hostname||"localhost",s=String(t.port||80),p=t.path||"/",c=t.protocol+"://"+e+":"+s+p;return"wss"===t.protocol&&wssProperties.forEach(function(o){t.hasOwnProperty(o)&&(r[o]=t[o])}),websocket(c,r)}function buildBuilderBrowser(o,t){var r,e;if("undefined"==typeof document)throw new Error("Could not determine host. Specify host manually.");return e=_URL.parse(document.URL),t.protocol||("https:"===e.protocol?t.protocol="wss":t.protocol="ws"),t.hostname||(t.hostname=t.host),t.hostname||(t.hostname=e.hostname,t.port||(t.port=e.port)),t.port||("wss"===t.protocol?t.port=443:t.port=80),t.path||(t.path="/"),r=t.protocol+"://"+t.hostname+":"+t.port+t.path,websocket(r,"mqttv3.1")}var websocket=require("websocket-stream"),_URL=require("url"),wssProperties=["rejectUnauthorized","ca","cert","key","pfx","passphrase"];"browser"!==process.title?module.exports=buildBuilder:module.exports=buildBuilderBrowser;
}).call(this,require('_process'))
},{"_process":80,"url":108,"websocket-stream":121}],77:[function(require,module,exports){
(function (process){
"use strict";function Store(){return this instanceof Store?void(this._inflights={}):new Store}var Readable=require("readable-stream").Readable,streamsOpts={objectMode:!0};Store.prototype.put=function(t,e){return this._inflights[t.messageId]=t,e&&e(),this},Store.prototype.createStream=function(){var t=new Readable(streamsOpts),e=this._inflights,s=Object.keys(this._inflights),i=!1,r=0;return t._read=function(){!i&&r<s.length?this.push(e[s[r++]]):this.push(null)},t.destroy=function(){if(!i){var t=this;i=!0,process.nextTick(function(){t.emit("close")})}},t},Store.prototype.del=function(t,e){return t=this._inflights[t.messageId],t?(delete this._inflights[t.messageId],e(null,t)):e&&e(new Error("missing packet")),this},Store.prototype.get=function(t,e){return t=this._inflights[t.messageId],t?e(null,t):e&&e(new Error("missing packet")),this},Store.prototype.close=function(t){this._inflights=null,t&&t()},module.exports=Store;
}).call(this,require('_process'))
},{"_process":80,"readable-stream":92}],78:[function(require,module,exports){
function once(e){var n=function(){return n.called?n.value:(n.called=!0,n.value=e.apply(this,arguments))};return n.called=!1,n}var wrappy=require("wrappy");module.exports=wrappy(once),once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:!0})});
},{"wrappy":123}],79:[function(require,module,exports){
(function (process){
"use strict";function nextTick(e,n,c,r){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var s,t,o=arguments.length;switch(o){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,n)});case 3:return process.nextTick(function(){e.call(null,n,c)});case 4:return process.nextTick(function(){e.call(null,n,c,r)});default:for(s=new Array(o-1),t=0;t<s.length;)s[t++]=arguments[t];return process.nextTick(function(){e.apply(null,s)})}}!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?module.exports=nextTick:module.exports=process.nextTick;
}).call(this,require('_process'))
},{"_process":80}],80:[function(require,module,exports){
function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,runClearTimeout(e)}}function Item(e,t){this.fun=e,this.array=t}function noop(){}var process=module.exports={},cachedSetTimeout,cachedClearTimeout;!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var queue=[],draining=!1,currentQueue,queueIndex=-1;process.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var u=1;u<arguments.length;u++)t[u-1]=arguments[u];queue.push(new Item(e,t)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.binding=function(e){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(e){throw new Error("process.chdir is not supported")},process.umask=function(){return 0};
},{}],81:[function(require,module,exports){
(function (global){
!function(e){function o(e){throw new RangeError(T[e])}function n(e,o){for(var n=e.length,r=[];n--;)r[n]=o(e[n]);return r}function r(e,o){var r=e.split("@"),t="";r.length>1&&(t=r[0]+"@",e=r[1]),e=e.replace(S,".");var u=e.split("."),i=n(u,o).join(".");return t+i}function t(e){for(var o,n,r=[],t=0,u=e.length;t<u;)o=e.charCodeAt(t++),o>=55296&&o<=56319&&t<u?(n=e.charCodeAt(t++),56320==(64512&n)?r.push(((1023&o)<<10)+(1023&n)+65536):(r.push(o),t--)):r.push(o);return r}function u(e){return n(e,function(e){var o="";return e>65535&&(e-=65536,o+=P(e>>>10&1023|55296),e=56320|1023&e),o+=P(e)}).join("")}function i(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:b}function f(e,o){return e+22+75*(e<26)-((0!=o)<<5)}function c(e,o,n){var r=0;for(e=n?M(e/j):e>>1,e+=M(e/o);e>L*C>>1;r+=b)e=M(e/L);return M(r+(L+1)*e/(e+m))}function l(e){var n,r,t,f,l,s,d,a,p,h,v=[],g=e.length,w=0,m=I,j=A;for(r=e.lastIndexOf(E),r<0&&(r=0),t=0;t<r;++t)e.charCodeAt(t)>=128&&o("not-basic"),v.push(e.charCodeAt(t));for(f=r>0?r+1:0;f<g;){for(l=w,s=1,d=b;f>=g&&o("invalid-input"),a=i(e.charCodeAt(f++)),(a>=b||a>M((x-w)/s))&&o("overflow"),w+=a*s,p=d<=j?y:d>=j+C?C:d-j,!(a<p);d+=b)h=b-p,s>M(x/h)&&o("overflow"),s*=h;n=v.length+1,j=c(w-l,n,0==l),M(w/n)>x-m&&o("overflow"),m+=M(w/n),w%=n,v.splice(w++,0,m)}return u(v)}function s(e){var n,r,u,i,l,s,d,a,p,h,v,g,w,m,j,F=[];for(e=t(e),g=e.length,n=I,r=0,l=A,s=0;s<g;++s)v=e[s],v<128&&F.push(P(v));for(u=i=F.length,i&&F.push(E);u<g;){for(d=x,s=0;s<g;++s)v=e[s],v>=n&&v<d&&(d=v);for(w=u+1,d-n>M((x-r)/w)&&o("overflow"),r+=(d-n)*w,n=d,s=0;s<g;++s)if(v=e[s],v<n&&++r>x&&o("overflow"),v==n){for(a=r,p=b;h=p<=l?y:p>=l+C?C:p-l,!(a<h);p+=b)j=a-h,m=b-h,F.push(P(f(h+j%m,0))),a=M(j/m);F.push(P(f(a,0))),l=c(r,w,u==i),r=0,++u}++r,++n}return F.join("")}function d(e){return r(e,function(e){return F.test(e)?l(e.slice(4).toLowerCase()):e})}function a(e){return r(e,function(e){return O.test(e)?"xn--"+s(e):e})}var p="object"==typeof exports&&exports&&!exports.nodeType&&exports,h="object"==typeof module&&module&&!module.nodeType&&module,v="object"==typeof global&&global;v.global!==v&&v.window!==v&&v.self!==v||(e=v);var g,w,x=2147483647,b=36,y=1,C=26,m=38,j=700,A=72,I=128,E="-",F=/^xn--/,O=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=b-y,M=Math.floor,P=String.fromCharCode;if(g={version:"1.4.1",ucs2:{decode:t,encode:u},decode:l,encode:s,toASCII:a,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(p&&h)if(module.exports==p)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else e.punycode=g}(this);
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],82:[function(require,module,exports){
"use strict";function hasOwnProperty(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(r,e,t,n){e=e||"&",t=t||"=";var o={};if("string"!=typeof r||0===r.length)return o;var a=/\+/g;r=r.split(e);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var p=r.length;s>0&&p>s&&(p=s);for(var y=0;y<p;++y){var u,c,i,l,f=r[y].replace(a,"%20"),v=f.indexOf(t);v>=0?(u=f.substr(0,v),c=f.substr(v+1)):(u=f,c=""),i=decodeURIComponent(u),l=decodeURIComponent(c),hasOwnProperty(o,i)?isArray(o[i])?o[i].push(l):o[i]=[o[i],l]:o[i]=l}return o};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)};
},{}],83:[function(require,module,exports){
"use strict";function map(r,e){if(r.map)return r.map(e);for(var t=[],n=0;n<r.length;n++)t.push(e(r[n],n));return t}var stringifyPrimitive=function(r){switch(typeof r){case"string":return r;case"boolean":return r?"true":"false";case"number":return isFinite(r)?r:"";default:return""}};module.exports=function(r,e,t,n){return e=e||"&",t=t||"=",null===r&&(r=void 0),"object"==typeof r?map(objectKeys(r),function(n){var i=encodeURIComponent(stringifyPrimitive(n))+t;return isArray(r[n])?map(r[n],function(r){return i+encodeURIComponent(stringifyPrimitive(r))}).join(e):i+encodeURIComponent(stringifyPrimitive(r[n]))}).join(e):n?encodeURIComponent(stringifyPrimitive(n))+t+encodeURIComponent(stringifyPrimitive(r)):""};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)},objectKeys=Object.keys||function(r){var e=[];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.push(t);return e};
},{}],84:[function(require,module,exports){
"use strict";exports.decode=exports.parse=require("./decode"),exports.encode=exports.stringify=require("./encode");
},{"./decode":82,"./encode":83}],85:[function(require,module,exports){
module.exports=require("./lib/_stream_duplex.js");
},{"./lib/_stream_duplex.js":86}],86:[function(require,module,exports){
(function (process){
function Duplex(e){return this instanceof Duplex?(Readable.call(this,e),Writable.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(e)}function onend(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}function forEach(e,t){for(var i=0,r=e.length;i<r;i++)t(e[i],i)}module.exports=Duplex;var objectKeys=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t},util=require("core-util-is");util.inherits=require("inherits");var Readable=require("./_stream_readable"),Writable=require("./_stream_writable");util.inherits(Duplex,Readable),forEach(objectKeys(Writable.prototype),function(e){Duplex.prototype[e]||(Duplex.prototype[e]=Writable.prototype[e])});
}).call(this,require('_process'))
},{"./_stream_readable":88,"./_stream_writable":90,"_process":80,"core-util-is":17,"inherits":64}],87:[function(require,module,exports){
function PassThrough(r){return this instanceof PassThrough?void Transform.call(this,r):new PassThrough(r)}module.exports=PassThrough;var Transform=require("./_stream_transform"),util=require("core-util-is");util.inherits=require("inherits"),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(r,s,i){i(null,r)};
},{"./_stream_transform":89,"core-util-is":17,"inherits":64}],88:[function(require,module,exports){
(function (process){
function ReadableState(e,t){e=e||{};var n=e.highWaterMark;this.highWaterMark=n||0===n?n:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this.decoder=new StringDecoder(e.encoding),this.encoding=e.encoding)}function Readable(e){return this instanceof Readable?(this._readableState=new ReadableState(e,this),this.readable=!0,void Stream.call(this)):new Readable(e)}function readableAddChunk(e,t,n,r,i){var a=chunkInvalid(t,n);if(a)e.emit("error",a);else if(null===n||void 0===n)t.reading=!1,t.ended||onEofChunk(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var d=new Error("stream.push() after EOF");e.emit("error",d)}else if(t.endEmitted&&i){var d=new Error("stream.unshift() after end event");e.emit("error",d)}else!t.decoder||i||r||(n=t.decoder.write(n)),t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):(t.reading=!1,t.buffer.push(n)),t.needReadable&&emitReadable(e),maybeReadMore(e,t);else i||(t.reading=!1);return needMoreData(t)}function needMoreData(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function roundUpToNextPowerOf2(e){if(e>=MAX_HWM)e=MAX_HWM;else{e--;for(var t=1;t<32;t<<=1)e|=e>>t;e++}return e}function howMuchToRead(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:null===e||isNaN(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:e<=0?0:(e>t.highWaterMark&&(t.highWaterMark=roundUpToNextPowerOf2(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function chunkInvalid(e,t){var n=null;return Buffer.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function onEofChunk(e,t){if(t.decoder&&!t.ended){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.length>0?emitReadable(e):endReadable(e)}function emitReadable(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,t.sync?process.nextTick(function(){emitReadable_(e)}):emitReadable_(e))}function emitReadable_(e){e.emit("readable")}function maybeReadMore(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(function(){maybeReadMore_(e,t)}))}function maybeReadMore_(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function pipeOnDrain(e){return function(){var t=e._readableState;t.awaitDrain--,0===t.awaitDrain&&flow(e)}}function flow(e){function t(e,t,i){var a=e.write(n);!1===a&&r.awaitDrain++}var n,r=e._readableState;for(r.awaitDrain=0;r.pipesCount&&null!==(n=e.read());)if(1===r.pipesCount?t(r.pipes,0,null):forEach(r.pipes,t),e.emit("data",n),r.awaitDrain>0)return;return 0===r.pipesCount?(r.flowing=!1,void(EE.listenerCount(e,"data")>0&&emitDataEvents(e))):void(r.ranOut=!0)}function pipeOnReadable(){this._readableState.ranOut&&(this._readableState.ranOut=!1,flow(this))}function emitDataEvents(e,t){var n=e._readableState;if(n.flowing)throw new Error("Cannot switch to old mode now.");var r=t||!1,i=!1;e.readable=!0,e.pipe=Stream.prototype.pipe,e.on=e.addListener=Stream.prototype.on,e.on("readable",function(){i=!0;for(var t;!r&&null!==(t=e.read());)e.emit("data",t);null===t&&(i=!1,e._readableState.needReadable=!0)}),e.pause=function(){r=!0,this.emit("pause")},e.resume=function(){r=!1,i?process.nextTick(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}function fromList(e,t){var n,r=t.buffer,i=t.length,a=!!t.decoder,d=!!t.objectMode;if(0===r.length)return null;if(0===i)n=null;else if(d)n=r.shift();else if(!e||e>=i)n=a?r.join(""):Buffer.concat(r,i),r.length=0;else if(e<r[0].length){var o=r[0];n=o.slice(0,e),r[0]=o.slice(e)}else if(e===r[0].length)n=r.shift();else{n=a?"":new Buffer(e);for(var l=0,s=0,u=r.length;s<u&&l<e;s++){var o=r[0],h=Math.min(e-l,o.length);a?n+=o.slice(0,h):o.copy(n,l,0,h),h<o.length?r[0]=o.slice(h):r.shift(),l+=h}}return n}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");!t.endEmitted&&t.calledRead&&(t.ended=!0,process.nextTick(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function forEach(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function indexOf(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}module.exports=Readable;var isArray=require("isarray"),Buffer=require("buffer").Buffer;Readable.ReadableState=ReadableState;var EE=require("events").EventEmitter;EE.listenerCount||(EE.listenerCount=function(e,t){return e.listeners(t).length});var Stream=require("stream"),util=require("core-util-is");util.inherits=require("inherits");var StringDecoder;util.inherits(Readable,Stream),Readable.prototype.push=function(e,t){var n=this._readableState;return"string"!=typeof e||n.objectMode||(t=t||n.defaultEncoding,t!==n.encoding&&(e=new Buffer(e,t),t="")),readableAddChunk(this,n,e,t,!1)},Readable.prototype.unshift=function(e){var t=this._readableState;return readableAddChunk(this,t,e,"",!0)},Readable.prototype.setEncoding=function(e){StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this._readableState.decoder=new StringDecoder(e),this._readableState.encoding=e};var MAX_HWM=8388608;Readable.prototype.read=function(e){var t=this._readableState;t.calledRead=!0;var n,r=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return emitReadable(this),null;if(e=howMuchToRead(e,t),0===e&&t.ended)return n=null,t.length>0&&t.decoder&&(n=fromList(e,t),t.length-=n.length),0===t.length&&endReadable(this),n;var i=t.needReadable;return t.length-e<=t.highWaterMark&&(i=!0),(t.ended||t.reading)&&(i=!1),i&&(t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),i&&!t.reading&&(e=howMuchToRead(r,t)),n=e>0?fromList(e,t):null,null===n&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),t.ended&&!t.endEmitted&&0===t.length&&endReadable(this),n},Readable.prototype._read=function(e){this.emit("error",new Error("not implemented"))},Readable.prototype.pipe=function(e,t){function n(e){e===s&&i()}function r(){e.end()}function i(){e.removeListener("close",d),e.removeListener("finish",o),e.removeListener("drain",p),e.removeListener("error",a),e.removeListener("unpipe",n),s.removeListener("end",r),s.removeListener("end",i),e._writableState&&!e._writableState.needDrain||p()}function a(t){l(),e.removeListener("error",a),0===EE.listenerCount(e,"error")&&e.emit("error",t)}function d(){e.removeListener("finish",o),l()}function o(){e.removeListener("close",d),l()}function l(){s.unpipe(e)}var s=this,u=this._readableState;switch(u.pipesCount){case 0:u.pipes=e;break;case 1:u.pipes=[u.pipes,e];break;default:u.pipes.push(e)}u.pipesCount+=1;var h=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,f=h?r:i;u.endEmitted?process.nextTick(f):s.once("end",f),e.on("unpipe",n);var p=pipeOnDrain(s);return e.on("drain",p),e._events&&e._events.error?isArray(e._events.error)?e._events.error.unshift(a):e._events.error=[a,e._events.error]:e.on("error",a),e.once("close",d),e.once("finish",o),e.emit("pipe",s),u.flowing||(this.on("readable",pipeOnReadable),u.flowing=!0,process.nextTick(function(){flow(s)})),e},Readable.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,this.removeListener("readable",pipeOnReadable),t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,this.removeListener("readable",pipeOnReadable),t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var i=indexOf(t.pipes,e);return i===-1?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},Readable.prototype.on=function(e,t){var n=Stream.prototype.on.call(this,e,t);if("data"!==e||this._readableState.flowing||emitDataEvents(this),"readable"===e&&this.readable){var r=this._readableState;r.readableListening||(r.readableListening=!0,r.emittedReadable=!1,r.needReadable=!0,r.reading?r.length&&emitReadable(this,r):this.read(0))}return n},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){emitDataEvents(this),this.read(0),this.emit("resume")},Readable.prototype.pause=function(){emitDataEvents(this,!0),this.emit("pause")},Readable.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){if(t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)){var a=r.push(i);a||(n=!0,e.pause())}});for(var i in e)"function"==typeof e[i]&&"undefined"==typeof this[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var a=["error","close","destroy","pause","resume"];return forEach(a,function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(t){n&&(n=!1,e.resume())},r},Readable._fromList=fromList;
}).call(this,require('_process'))
},{"_process":80,"buffer":16,"core-util-is":17,"events":62,"inherits":64,"isarray":91,"stream":94,"string_decoder/":107}],89:[function(require,module,exports){
function TransformState(r,t){this.afterTransform=function(r,e){return afterTransform(t,r,e)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function afterTransform(r,t,e){var n=r._transformState;n.transforming=!1;var a=n.writecb;if(!a)return r.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!==e&&void 0!==e&&r.push(e),a&&a(t);var i=r._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&r._read(i.highWaterMark)}function Transform(r){if(!(this instanceof Transform))return new Transform(r);Duplex.call(this,r);var t=(this._transformState=new TransformState(r,this),this);this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){"function"==typeof this._flush?this._flush(function(r){done(t,r)}):done(t)})}function done(r,t){if(t)return r.emit("error",t);var e=r._writableState,n=(r._readableState,r._transformState);if(e.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return r.push(null)}module.exports=Transform;var Duplex=require("./_stream_duplex"),util=require("core-util-is");util.inherits=require("inherits"),util.inherits(Transform,Duplex),Transform.prototype.push=function(r,t){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,r,t)},Transform.prototype._transform=function(r,t,e){throw new Error("not implemented")},Transform.prototype._write=function(r,t,e){var n=this._transformState;if(n.writecb=e,n.writechunk=r,n.writeencoding=t,!n.transforming){var a=this._readableState;(n.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}},Transform.prototype._read=function(r){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};
},{"./_stream_duplex":86,"core-util-is":17,"inherits":64}],90:[function(require,module,exports){
(function (process){
function WriteReq(e,t,i){this.chunk=e,this.encoding=t,this.callback=i}function WritableState(e,t){e=e||{};var i=e.highWaterMark;this.highWaterMark=i||0===i?i:16384,this.objectMode=!!e.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var r=e.decodeStrings===!1;this.decodeStrings=!r,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){onwrite(t,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.errorEmitted=!1}function Writable(e){var t=require("./_stream_duplex");return this instanceof Writable||this instanceof t?(this._writableState=new WritableState(e,this),this.writable=!0,void Stream.call(this)):new Writable(e)}function writeAfterEnd(e,t,i){var r=new Error("write after end");e.emit("error",r),process.nextTick(function(){i(r)})}function validChunk(e,t,i,r){var n=!0;if(!Buffer.isBuffer(i)&&"string"!=typeof i&&null!==i&&void 0!==i&&!t.objectMode){var f=new TypeError("Invalid non-string/buffer chunk");e.emit("error",f),process.nextTick(function(){r(f)}),n=!1}return n}function decodeChunk(e,t,i){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=new Buffer(t,i)),t}function writeOrBuffer(e,t,i,r,n){i=decodeChunk(t,i,r),Buffer.isBuffer(i)&&(r="buffer");var f=t.objectMode?1:i.length;t.length+=f;var o=t.length<t.highWaterMark;return o||(t.needDrain=!0),t.writing?t.buffer.push(new WriteReq(i,r,n)):doWrite(e,t,f,i,r,n),o}function doWrite(e,t,i,r,n,f){t.writelen=i,t.writecb=f,t.writing=!0,t.sync=!0,e._write(r,n,t.onwrite),t.sync=!1}function onwriteError(e,t,i,r,n){i?process.nextTick(function(){n(r)}):n(r),e._writableState.errorEmitted=!0,e.emit("error",r)}function onwriteStateUpdate(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function onwrite(e,t){var i=e._writableState,r=i.sync,n=i.writecb;if(onwriteStateUpdate(i),t)onwriteError(e,i,r,t,n);else{var f=needFinish(e,i);f||i.bufferProcessing||!i.buffer.length||clearBuffer(e,i),r?process.nextTick(function(){afterWrite(e,i,f,n)}):afterWrite(e,i,f,n)}}function afterWrite(e,t,i,r){i||onwriteDrain(e,t),r(),i&&finishMaybe(e,t)}function onwriteDrain(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function clearBuffer(e,t){t.bufferProcessing=!0;for(var i=0;i<t.buffer.length;i++){var r=t.buffer[i],n=r.chunk,f=r.encoding,o=r.callback,a=t.objectMode?1:n.length;if(doWrite(e,t,a,n,f,o),t.writing){i++;break}}t.bufferProcessing=!1,i<t.buffer.length?t.buffer=t.buffer.slice(i):t.buffer.length=0}function needFinish(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function finishMaybe(e,t){var i=needFinish(e,t);return i&&(t.finished=!0,e.emit("finish")),i}function endWritable(e,t,i){t.ending=!0,finishMaybe(e,t),i&&(t.finished?process.nextTick(i):e.once("finish",i)),t.ended=!0}module.exports=Writable;var Buffer=require("buffer").Buffer;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var Stream=require("stream");util.inherits(Writable,Stream),Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},Writable.prototype.write=function(e,t,i){var r=this._writableState,n=!1;return"function"==typeof t&&(i=t,t=null),Buffer.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof i&&(i=function(){}),r.ended?writeAfterEnd(this,r,i):validChunk(this,r,e,i)&&(n=writeOrBuffer(this,r,e,t,i)),n},Writable.prototype._write=function(e,t,i){i(new Error("not implemented"))},Writable.prototype.end=function(e,t,i){var r=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),"undefined"!=typeof e&&null!==e&&this.write(e,t),r.ending||r.finished||endWritable(this,r,i)};
}).call(this,require('_process'))
},{"./_stream_duplex":86,"_process":80,"buffer":16,"core-util-is":17,"inherits":64,"stream":94}],91:[function(require,module,exports){
module.exports=Array.isArray||function(r){return"[object Array]"==Object.prototype.toString.call(r)};
},{}],92:[function(require,module,exports){
(function (process){
var Stream=require("stream");exports=module.exports=require("./lib/_stream_readable.js"),exports.Stream=Stream,exports.Readable=exports,exports.Writable=require("./lib/_stream_writable.js"),exports.Duplex=require("./lib/_stream_duplex.js"),exports.Transform=require("./lib/_stream_transform.js"),exports.PassThrough=require("./lib/_stream_passthrough.js"),process.browser||"disable"!==process.env.READABLE_STREAM||(module.exports=require("stream"));
}).call(this,require('_process'))
},{"./lib/_stream_duplex.js":86,"./lib/_stream_passthrough.js":87,"./lib/_stream_readable.js":88,"./lib/_stream_transform.js":89,"./lib/_stream_writable.js":90,"_process":80,"stream":94}],93:[function(require,module,exports){
"use strict";function ReInterval(e,r,t){var n=this;this._callback=e,this._args=t,this._interval=setInterval(e,r,this._args),this.reschedule=function(e){e||(e=n._interval),n._interval&&clearInterval(n._interval),n._interval=setInterval(n._callback,e,n._args)},this.clear=function(){n._interval&&(clearInterval(n._interval),n._interval=void 0)},this.destroy=function(){n._interval&&clearInterval(n._interval),n._callback=void 0,n._interval=void 0,n._args=void 0}}function reInterval(){if("function"!=typeof arguments[0])throw new Error("callback needed");if("number"!=typeof arguments[1])throw new Error("interval needed");var e;if(arguments.length>0){e=new Array(arguments.length-2);for(var r=0;r<e.length;r++)e[r]=arguments[r+2]}return new ReInterval(arguments[0],arguments[1],e)}module.exports=reInterval;
},{}],94:[function(require,module,exports){
function Stream(){EE.call(this)}module.exports=Stream;var EE=require("events").EventEmitter,inherits=require("inherits");inherits(Stream,EE),Stream.Readable=require("readable-stream/readable.js"),Stream.Writable=require("readable-stream/writable.js"),Stream.Duplex=require("readable-stream/duplex.js"),Stream.Transform=require("readable-stream/transform.js"),Stream.PassThrough=require("readable-stream/passthrough.js"),Stream.Stream=Stream,Stream.prototype.pipe=function(e,r){function t(r){e.writable&&!1===e.write(r)&&m.pause&&m.pause()}function n(){m.readable&&m.resume&&m.resume()}function a(){u||(u=!0,e.end())}function o(){u||(u=!0,"function"==typeof e.destroy&&e.destroy())}function i(e){if(s(),0===EE.listenerCount(this,"error"))throw e}function s(){m.removeListener("data",t),e.removeListener("drain",n),m.removeListener("end",a),m.removeListener("close",o),m.removeListener("error",i),e.removeListener("error",i),m.removeListener("end",s),m.removeListener("close",s),e.removeListener("close",s)}var m=this;m.on("data",t),e.on("drain",n),e._isStdio||r&&r.end===!1||(m.on("end",a),m.on("close",o));var u=!1;return m.on("error",i),e.on("error",i),m.on("end",s),m.on("close",s),e.on("close",s),e.emit("pipe",m),e};
},{"events":62,"inherits":64,"readable-stream/duplex.js":95,"readable-stream/passthrough.js":102,"readable-stream/readable.js":103,"readable-stream/transform.js":104,"readable-stream/writable.js":105}],95:[function(require,module,exports){
arguments[4][85][0].apply(exports,arguments)
},{"./lib/_stream_duplex.js":96,"dup":85}],96:[function(require,module,exports){
arguments[4][54][0].apply(exports,arguments)
},{"./_stream_readable":98,"./_stream_writable":100,"core-util-is":17,"dup":54,"inherits":64,"process-nextick-args":79}],97:[function(require,module,exports){
arguments[4][55][0].apply(exports,arguments)
},{"./_stream_transform":99,"core-util-is":17,"dup":55,"inherits":64}],98:[function(require,module,exports){
arguments[4][56][0].apply(exports,arguments)
},{"./_stream_duplex":96,"./internal/streams/BufferList":101,"_process":80,"buffer":16,"buffer-shims":15,"core-util-is":17,"dup":56,"events":62,"inherits":64,"isarray":66,"process-nextick-args":79,"stream":94,"string_decoder/":107,"util":13}],99:[function(require,module,exports){
arguments[4][57][0].apply(exports,arguments)
},{"./_stream_duplex":96,"core-util-is":17,"dup":57,"inherits":64}],100:[function(require,module,exports){
arguments[4][58][0].apply(exports,arguments)
},{"./_stream_duplex":96,"_process":80,"buffer":16,"buffer-shims":15,"core-util-is":17,"dup":58,"events":62,"inherits":64,"process-nextick-args":79,"stream":94,"util-deprecate":110}],101:[function(require,module,exports){
"use strict";function BufferList(){this.head=null,this.tail=null,this.length=0}var Buffer=require("buffer").Buffer,bufferShim=require("buffer-shims");module.exports=BufferList,BufferList.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},BufferList.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},BufferList.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0},BufferList.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,i=""+e.data;e=e.next;)i+=t+e.data;return i},BufferList.prototype.concat=function(t){if(0===this.length)return bufferShim.alloc(0);if(1===this.length)return this.head.data;for(var e=bufferShim.allocUnsafe(t>>>0),i=this.head,h=0;i;)i.data.copy(e,h),h+=i.data.length,i=i.next;return e};
},{"buffer":16,"buffer-shims":15}],102:[function(require,module,exports){
module.exports=require("./lib/_stream_passthrough.js");
},{"./lib/_stream_passthrough.js":97}],103:[function(require,module,exports){
(function (process){
var Stream=function(){try{return require("stream")}catch(r){}}();exports=module.exports=require("./lib/_stream_readable.js"),exports.Stream=Stream||exports,exports.Readable=exports,exports.Writable=require("./lib/_stream_writable.js"),exports.Duplex=require("./lib/_stream_duplex.js"),exports.Transform=require("./lib/_stream_transform.js"),exports.PassThrough=require("./lib/_stream_passthrough.js"),!process.browser&&"disable"===process.env.READABLE_STREAM&&Stream&&(module.exports=Stream);
}).call(this,require('_process'))
},{"./lib/_stream_duplex.js":96,"./lib/_stream_passthrough.js":97,"./lib/_stream_readable.js":98,"./lib/_stream_transform.js":99,"./lib/_stream_writable.js":100,"_process":80,"stream":94}],104:[function(require,module,exports){
module.exports=require("./lib/_stream_transform.js");
},{"./lib/_stream_transform.js":99}],105:[function(require,module,exports){
module.exports=require("./lib/_stream_writable.js");
},{"./lib/_stream_writable.js":100}],106:[function(require,module,exports){
function shift(e){var t=e._readableState;return t?t.objectMode?e.read():e.read(getStateLength(t)):null}function getStateLength(e){return e.buffer.length?e.buffer.head?e.buffer.head.data.length:e.buffer[0].length:e.length}module.exports=shift;
},{}],107:[function(require,module,exports){
function assertEncoding(e){if(e&&!isBufferEncoding(e))throw new Error("Unknown encoding: "+e)}function passThroughWrite(e){return e.toString(this.encoding)}function utf16DetectIncompleteChar(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var Buffer=require("buffer").Buffer,isBufferEncoding=Buffer.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},StringDecoder=exports.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),assertEncoding(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=base64DetectIncompleteChar;break;default:return void(this.write=passThroughWrite)}this.charBuffer=new Buffer(6),this.charReceived=0,this.charLength=0};StringDecoder.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";e=e.slice(r,e.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var h=t.charCodeAt(t.length-1);if(!(h>=55296&&h<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,h=t.charCodeAt(i);if(h>=55296&&h<=56319){var c=this.surrogateSize;return this.charLength+=c,this.charReceived+=c,this.charBuffer.copy(this.charBuffer,c,0,c),e.copy(this.charBuffer,0,0,c),t.substring(0,i)}return t},StringDecoder.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},StringDecoder.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,h=this.charBuffer,i=this.encoding;t+=h.slice(0,r).toString(i)}return t};
},{"buffer":16}],108:[function(require,module,exports){
"use strict";function Url(){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}function urlParse(t,s,e){if(t&&util.isObject(t)&&t instanceof Url)return t;var h=new Url;return h.parse(t,s,e),h}function urlFormat(t){return util.isString(t)&&(t=urlParse(t)),t instanceof Url?t.format():Url.prototype.format.call(t)}function urlResolve(t,s){return urlParse(t,!1,!0).resolve(s)}function urlResolveObject(t,s){return t?urlParse(t,!1,!0).resolveObject(s):s}var punycode=require("punycode"),util=require("./util");exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("querystring");Url.prototype.parse=function(t,s,e){if(!util.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var h=t.indexOf("?"),r=h!==-1&&h<t.indexOf("#")?"?":"#",a=t.split(r),o=/\\/g;a[0]=a[0].replace(o,"/"),t=a.join(r);var n=t;if(n=n.trim(),!e&&1===t.split("#").length){var i=simplePathPattern.exec(n);if(i)return this.path=n,this.href=n,this.pathname=i[1],i[2]?(this.search=i[2],s?this.query=querystring.parse(this.search.substr(1)):this.query=this.search.substr(1)):s&&(this.search="",this.query={}),this}var l=protocolPattern.exec(n);if(l){l=l[0];var u=l.toLowerCase();this.protocol=u,n=n.substr(l.length)}if(e||l||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var p="//"===n.substr(0,2);!p||l&&hostlessProtocol[l]||(n=n.substr(2),this.slashes=!0)}if(!hostlessProtocol[l]&&(p||l&&!slashedProtocol[l])){for(var c=-1,f=0;f<hostEndingChars.length;f++){var m=n.indexOf(hostEndingChars[f]);m!==-1&&(c===-1||m<c)&&(c=m)}var v,g;g=c===-1?n.lastIndexOf("@"):n.lastIndexOf("@",c),g!==-1&&(v=n.slice(0,g),n=n.slice(g+1),this.auth=decodeURIComponent(v)),c=-1;for(var f=0;f<nonHostChars.length;f++){var m=n.indexOf(nonHostChars[f]);m!==-1&&(c===-1||m<c)&&(c=m)}c===-1&&(c=n.length),this.host=n.slice(0,c),n=n.slice(c),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var P=this.hostname.split(/\./),f=0,d=P.length;f<d;f++){var q=P[f];if(q&&!q.match(hostnamePartPattern)){for(var b="",O=0,j=q.length;O<j;O++)b+=q.charCodeAt(O)>127?"x":q[O];if(!b.match(hostnamePartPattern)){var x=P.slice(0,f),U=P.slice(f+1),C=q.match(hostnamePartStart);C&&(x.push(C[1]),U.unshift(C[2])),U.length&&(n="/"+U.join(".")+n),this.hostname=x.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=punycode.toASCII(this.hostname));var A=this.port?":"+this.port:"",w=this.hostname||"";this.host=w+A,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!unsafeProtocol[u])for(var f=0,d=autoEscape.length;f<d;f++){var E=autoEscape[f];if(n.indexOf(E)!==-1){var I=encodeURIComponent(E);I===E&&(I=escape(E)),n=n.split(E).join(I)}}var R=n.indexOf("#");R!==-1&&(this.hash=n.substr(R),n=n.slice(0,R));var S=n.indexOf("?");if(S!==-1?(this.search=n.substr(S),this.query=n.substr(S+1),s&&(this.query=querystring.parse(this.query)),n=n.slice(0,S)):s&&(this.search="",this.query={}),n&&(this.pathname=n),slashedProtocol[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var A=this.pathname||"",k=this.search||"";this.path=A+k}return this.href=this.format(),this},Url.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var s=this.protocol||"",e=this.pathname||"",h=this.hash||"",r=!1,a="";this.host?r=t+this.host:this.hostname&&(r=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&util.isObject(this.query)&&Object.keys(this.query).length&&(a=querystring.stringify(this.query));var o=this.search||a&&"?"+a||"";return s&&":"!==s.substr(-1)&&(s+=":"),this.slashes||(!s||slashedProtocol[s])&&r!==!1?(r="//"+(r||""),e&&"/"!==e.charAt(0)&&(e="/"+e)):r||(r=""),h&&"#"!==h.charAt(0)&&(h="#"+h),o&&"?"!==o.charAt(0)&&(o="?"+o),e=e.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),o=o.replace("#","%23"),s+r+e+o+h},Url.prototype.resolve=function(t){return this.resolveObject(urlParse(t,!1,!0)).format()},Url.prototype.resolveObject=function(t){if(util.isString(t)){var s=new Url;s.parse(t,!1,!0),t=s}for(var e=new Url,h=Object.keys(this),r=0;r<h.length;r++){var a=h[r];e[a]=this[a]}if(e.hash=t.hash,""===t.href)return e.href=e.format(),e;if(t.slashes&&!t.protocol){for(var o=Object.keys(t),n=0;n<o.length;n++){var i=o[n];"protocol"!==i&&(e[i]=t[i])}return slashedProtocol[e.protocol]&&e.hostname&&!e.pathname&&(e.path=e.pathname="/"),e.href=e.format(),e}if(t.protocol&&t.protocol!==e.protocol){if(!slashedProtocol[t.protocol]){for(var l=Object.keys(t),u=0;u<l.length;u++){var p=l[u];e[p]=t[p]}return e.href=e.format(),e}if(e.protocol=t.protocol,t.host||hostlessProtocol[t.protocol])e.pathname=t.pathname;else{for(var c=(t.pathname||"").split("/");c.length&&!(t.host=c.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==c[0]&&c.unshift(""),c.length<2&&c.unshift(""),e.pathname=c.join("/")}if(e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,e.pathname||e.search){var f=e.pathname||"",m=e.search||"";e.path=f+m}return e.slashes=e.slashes||t.slashes,e.href=e.format(),e}var v=e.pathname&&"/"===e.pathname.charAt(0),g=t.host||t.pathname&&"/"===t.pathname.charAt(0),y=g||v||e.host&&t.pathname,P=y,d=e.pathname&&e.pathname.split("/")||[],c=t.pathname&&t.pathname.split("/")||[],q=e.protocol&&!slashedProtocol[e.protocol];if(q&&(e.hostname="",e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===c[0]?c[0]=t.host:c.unshift(t.host)),t.host=null),y=y&&(""===c[0]||""===d[0])),g)e.host=t.host||""===t.host?t.host:e.host,e.hostname=t.hostname||""===t.hostname?t.hostname:e.hostname,e.search=t.search,e.query=t.query,d=c;else if(c.length)d||(d=[]),d.pop(),d=d.concat(c),e.search=t.search,e.query=t.query;else if(!util.isNullOrUndefined(t.search)){if(q){e.hostname=e.host=d.shift();var b=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@");b&&(e.auth=b.shift(),e.host=e.hostname=b.shift())}return e.search=t.search,e.query=t.query,util.isNull(e.pathname)&&util.isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!d.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var O=d.slice(-1)[0],j=(e.host||t.host||d.length>1)&&("."===O||".."===O)||""===O,x=0,U=d.length;U>=0;U--)O=d[U],"."===O?d.splice(U,1):".."===O?(d.splice(U,1),x++):x&&(d.splice(U,1),x--);if(!y&&!P)for(;x--;x)d.unshift("..");!y||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),j&&"/"!==d.join("/").substr(-1)&&d.push("");var C=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(q){e.hostname=e.host=C?"":d.length?d.shift():"";var b=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@");b&&(e.auth=b.shift(),e.host=e.hostname=b.shift())}return y=y||e.host&&d.length,y&&!C&&d.unshift(""),d.length?e.pathname=d.join("/"):(e.pathname=null,e.path=null),util.isNull(e.pathname)&&util.isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},Url.prototype.parseHost=function(){var t=this.host,s=portPattern.exec(t);s&&(s=s[0],":"!==s&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)};
},{"./util":109,"punycode":81,"querystring":84}],109:[function(require,module,exports){
"use strict";module.exports={isString:function(n){return"string"==typeof n},isObject:function(n){return"object"==typeof n&&null!==n},isNull:function(n){return null===n},isNullOrUndefined:function(n){return null==n}};
},{}],110:[function(require,module,exports){
(function (global){
function deprecate(r,e){function o(){if(!t){if(config("throwDeprecation"))throw new Error(e);config("traceDeprecation")?console.trace(e):console.warn(e),t=!0}return r.apply(this,arguments)}if(config("noDeprecation"))return r;var t=!1;return o}function config(r){try{if(!global.localStorage)return!1}catch(r){return!1}var e=global.localStorage[r];return null!=e&&"true"===String(e).toLowerCase()}module.exports=deprecate;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],111:[function(require,module,exports){
"function"==typeof Object.create?module.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(t,e){t.super_=e;var o=function(){};o.prototype=e.prototype,t.prototype=new o,t.prototype.constructor=t};
},{}],112:[function(require,module,exports){
module.exports=function(o){return o&&"object"==typeof o&&"function"==typeof o.copy&&"function"==typeof o.fill&&"function"==typeof o.readUInt8};
},{}],113:[function(require,module,exports){
(function (process,global){
function inspect(e,r){var t={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),isBoolean(r)?t.showHidden=r:r&&exports._extend(t,r),isUndefined(t.showHidden)&&(t.showHidden=!1),isUndefined(t.depth)&&(t.depth=2),isUndefined(t.colors)&&(t.colors=!1),isUndefined(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=stylizeWithColor),formatValue(t,e,t.depth)}function stylizeWithColor(e,r){var t=inspect.styles[r];return t?"["+inspect.colors[t][0]+"m"+e+"["+inspect.colors[t][1]+"m":e}function stylizeNoColor(e,r){return e}function arrayToHash(e){var r={};return e.forEach(function(e,t){r[e]=!0}),r}function formatValue(e,r,t){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==exports.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(t,e);return isString(n)||(n=formatValue(e,n,t)),n}var i=formatPrimitive(e,r);if(i)return i;var o=Object.keys(r),s=arrayToHash(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),isError(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return formatError(r);if(0===o.length){if(isFunction(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(isRegExp(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(isDate(r))return e.stylize(Date.prototype.toString.call(r),"date");if(isError(r))return formatError(r)}var c="",a=!1,l=["{","}"];if(isArray(r)&&(a=!0,l=["[","]"]),isFunction(r)){var p=r.name?": "+r.name:"";c=" [Function"+p+"]"}if(isRegExp(r)&&(c=" "+RegExp.prototype.toString.call(r)),isDate(r)&&(c=" "+Date.prototype.toUTCString.call(r)),isError(r)&&(c=" "+formatError(r)),0===o.length&&(!a||0==r.length))return l[0]+c+l[1];if(t<0)return isRegExp(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var f;return f=a?formatArray(e,r,t,s,o):o.map(function(n){return formatProperty(e,r,t,s,n,a)}),e.seen.pop(),reduceToSingleString(f,c,l)}function formatPrimitive(e,r){if(isUndefined(r))return e.stylize("undefined","undefined");if(isString(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}return isNumber(r)?e.stylize(""+r,"number"):isBoolean(r)?e.stylize(""+r,"boolean"):isNull(r)?e.stylize("null","null"):void 0}function formatError(e){return"["+Error.prototype.toString.call(e)+"]"}function formatArray(e,r,t,n,i){for(var o=[],s=0,u=r.length;s<u;++s)hasOwnProperty(r,String(s))?o.push(formatProperty(e,r,t,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(formatProperty(e,r,t,n,i,!0))}),o}function formatProperty(e,r,t,n,i,o){var s,u,c;if(c=Object.getOwnPropertyDescriptor(r,i)||{value:r[i]},c.get?u=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(u=e.stylize("[Setter]","special")),hasOwnProperty(n,i)||(s="["+i+"]"),u||(e.seen.indexOf(c.value)<0?(u=isNull(t)?formatValue(e,c.value,null):formatValue(e,c.value,t-1),u.indexOf("\n")>-1&&(u=o?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n"))):u=e.stylize("[Circular]","special")),isUndefined(s)){if(o&&i.match(/^\d+$/))return u;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+u}function reduceToSingleString(e,r,t){var n=0,i=e.reduce(function(e,r){return n++,r.indexOf("\n")>=0&&n++,e+r.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?t[0]+(""===r?"":r+"\n ")+" "+e.join(",\n ")+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}function isArray(e){return Array.isArray(e)}function isBoolean(e){return"boolean"==typeof e}function isNull(e){return null===e}function isNullOrUndefined(e){return null==e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function isSymbol(e){return"symbol"==typeof e}function isUndefined(e){return void 0===e}function isRegExp(e){return isObject(e)&&"[object RegExp]"===objectToString(e)}function isObject(e){return"object"==typeof e&&null!==e}function isDate(e){return isObject(e)&&"[object Date]"===objectToString(e)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(e){return"function"==typeof e}function isPrimitive(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?"0"+e.toString(10):e.toString(10)}function timestamp(){var e=new Date,r=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(":");return[e.getDate(),months[e.getMonth()],r].join(" ")}function hasOwnProperty(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var formatRegExp=/%[sdj%]/g;exports.format=function(e){if(!isString(e)){for(var r=[],t=0;t<arguments.length;t++)r.push(inspect(arguments[t]));return r.join(" ")}for(var t=1,n=arguments,i=n.length,o=String(e).replace(formatRegExp,function(e){if("%%"===e)return"%";if(t>=i)return e;switch(e){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(e){return"[Circular]"}default:return e}}),s=n[t];t<i;s=n[++t])o+=isNull(s)||!isObject(s)?" "+s:" "+inspect(s);return o},exports.deprecate=function(e,r){function t(){if(!n){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),n=!0}return e.apply(this,arguments)}if(isUndefined(global.process))return function(){return exports.deprecate(e,r).apply(this,arguments)};if(process.noDeprecation===!0)return e;var n=!1;return t};var debugs={},debugEnviron;exports.debuglog=function(e){if(isUndefined(debugEnviron)&&(debugEnviron=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!debugs[e])if(new RegExp("\\b"+e+"\\b","i").test(debugEnviron)){var r=process.pid;debugs[e]=function(){var t=exports.format.apply(exports,arguments);console.error("%s %d: %s",e,r,t)}}else debugs[e]=function(){};return debugs[e]},exports.inspect=inspect,inspect.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]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=require("./support/isBuffer");var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(e,r){if(!r||!isObject(r))return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e};
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./support/isBuffer":112,"_process":80,"inherits":111}],114:[function(require,module,exports){
"use strict";function Duplex(e){return this instanceof Duplex?(Readable.call(this,e),Writable.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(e)}function onend(){this.allowHalfOpen||this._writableState.ended||processNextTick(onEndNT,this)}function onEndNT(e){e.end()}function forEach(e,t){for(var r=0,i=e.length;r<i;r++)t(e[r],r)}var objectKeys=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};module.exports=Duplex;var processNextTick=require("process-nextick-args"),util=require("core-util-is");util.inherits=require("inherits");var Readable=require("./_stream_readable"),Writable=require("./_stream_writable");util.inherits(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}
},{"./_stream_readable":115,"./_stream_writable":117,"core-util-is":17,"inherits":64,"process-nextick-args":79}],115:[function(require,module,exports){
arguments[4][56][0].apply(exports,arguments)
},{"./_stream_duplex":114,"./internal/streams/BufferList":118,"_process":80,"buffer":16,"buffer-shims":15,"core-util-is":17,"dup":56,"events":62,"inherits":64,"isarray":66,"process-nextick-args":79,"stream":94,"string_decoder/":107,"util":13}],116:[function(require,module,exports){
arguments[4][57][0].apply(exports,arguments)
},{"./_stream_duplex":114,"core-util-is":17,"dup":57,"inherits":64}],117:[function(require,module,exports){
arguments[4][58][0].apply(exports,arguments)
},{"./_stream_duplex":114,"_process":80,"buffer":16,"buffer-shims":15,"core-util-is":17,"dup":58,"events":62,"inherits":64,"process-nextick-args":79,"stream":94,"util-deprecate":110}],118:[function(require,module,exports){
arguments[4][101][0].apply(exports,arguments)
},{"buffer":16,"buffer-shims":15,"dup":101}],119:[function(require,module,exports){
module.exports=require("./lib/_stream_transform.js");
},{"./lib/_stream_transform.js":116}],120:[function(require,module,exports){
(function (process){
function DestroyableTransform(r){Transform.call(this,r),this._destroyed=!1}function noop(r,t,o){o(null,r)}function through2(r){return function(t,o,e){return"function"==typeof t&&(e=o,o=t,t={}),"function"!=typeof o&&(o=noop),"function"!=typeof e&&(e=null),r(t,o,e)}}var Transform=require("readable-stream/transform"),inherits=require("util").inherits,xtend=require("xtend");inherits(DestroyableTransform,Transform),DestroyableTransform.prototype.destroy=function(r){if(!this._destroyed){this._destroyed=!0;var t=this;process.nextTick(function(){r&&t.emit("error",r),t.emit("close")})}},module.exports=through2(function(r,t,o){var e=new DestroyableTransform(r);return e._transform=t,o&&(e._flush=o),e}),module.exports.ctor=through2(function(r,t,o){function e(t){return this instanceof e?(this.options=xtend(r,t),void DestroyableTransform.call(this,this.options)):new e(t)}return inherits(e,DestroyableTransform),e.prototype._transform=t,o&&(e.prototype._flush=o),e}),module.exports.obj=through2(function(r,t,o){var e=new DestroyableTransform(xtend({objectMode:!0,highWaterMark:16},r));return e._transform=t,o&&(e._flush=o),e});
}).call(this,require('_process'))
},{"_process":80,"readable-stream/transform":119,"util":113,"xtend":124}],121:[function(require,module,exports){
(function (process,global,Buffer){
"use strict";function WebSocketStream(e,r,o){function t(e,r,o){h&&"string"==typeof e&&(e=new Buffer(e,"utf8")),b.send(e,o)}function n(e,r,o){if(b.bufferedAmount>S)return void setTimeout(n,g,e,r,o);h&&"string"==typeof e&&(e=new Buffer(e,"utf8"));try{b.send(e)}catch(e){return o(e)}o()}function f(e){b.close(),e()}function u(){y.setReadable(w),y.setWritable(w),y.emit("connect")}function i(){y.end(),y.destroy()}function s(e){y.destroy(e)}function a(e){var r=e.data;r=r instanceof ArrayBuffer?new Buffer(new Uint8Array(r)):new Buffer(r),w.push(r)}function c(){b.close()}var y,b,l="browser"===process.title,p=!!global.WebSocket,d=l?n:t,w=through.obj(d,f);r&&!Array.isArray(r)&&"object"==typeof r&&(o=r,r=null,("string"==typeof o.protocol||Array.isArray(o.protocol))&&(r=o.protocol)),o||(o={});var S=o.browserBufferSize||524288,g=o.browserBufferTimeout||1e3;"object"==typeof e?b=e:(b=p&&l?new WS(e,r):new WS(e,r,o),b.binaryType="arraybuffer"),b.readyState===WS.OPEN?y=w:(y=duplexify.obj(),b.onopen=u),y.socket=b,b.onclose=i,b.onerror=s,b.onmessage=a,w.on("close",c);var h=o.binary||void 0===o.binary;return y}var through=require("through2"),duplexify=require("duplexify"),WS=require("ws");module.exports=WebSocketStream;
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
},{"_process":80,"buffer":16,"duplexify":52,"through2":120,"ws":122}],122:[function(require,module,exports){
var ws=null;ws="undefined"!=typeof WebSocket?WebSocket:"undefined"!=typeof MozWebSocket?MozWebSocket:window.WebSocket||window.MozWebSocket,module.exports=ws;
},{}],123:[function(require,module,exports){
function wrappy(n,r){function e(){for(var r=new Array(arguments.length),e=0;e<r.length;e++)r[e]=arguments[e];var t=n.apply(this,r),o=r[r.length-1];return"function"==typeof t&&t!==o&&Object.keys(o).forEach(function(n){t[n]=o[n]}),t}if(n&&r)return wrappy(n)(r);if("function"!=typeof n)throw new TypeError("need wrapper function");return Object.keys(n).forEach(function(r){e[r]=n[r]}),e}module.exports=wrappy;
},{}],124:[function(require,module,exports){
function extend(){for(var r={},e=0;e<arguments.length;e++){var t=arguments[e];for(var n in t)hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r}module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;
},{}]},{},[1]);