@voicenter-team/events-sdk 0.0.28 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/voicenter-events-sdk.cjs.js +16 -16
  2. package/dist/voicenter-events-sdk.cjs.js.map +1 -1
  3. package/dist/voicenter-events-sdk.es.js +2764 -2755
  4. package/dist/voicenter-events-sdk.es.js.map +1 -1
  5. package/dist/voicenter-events-sdk.iife.js +21 -21
  6. package/dist/voicenter-events-sdk.iife.js.map +1 -1
  7. package/dist/voicenter-events-sdk.umd.js +21 -21
  8. package/dist/voicenter-events-sdk.umd.js.map +1 -1
  9. package/package.json +59 -56
  10. package/.eslintrc.cjs +0 -17
  11. package/.github/workflows/main.yml +0 -16
  12. package/.idea/VoicenterEventsSDK.iml +0 -12
  13. package/.idea/git_toolbox_prj.xml +0 -15
  14. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  15. package/.idea/jsLibraryMappings.xml +0 -6
  16. package/.idea/jsLinters/eslint.xml +0 -7
  17. package/.idea/modules.xml +0 -8
  18. package/.idea/vcs.xml +0 -6
  19. package/.nvmrc +0 -1
  20. package/TODELETE_TEMP/events.json +0 -69122
  21. package/TODELETE_TEMP/temphelper.cjs +0 -101
  22. package/docs/package-lock.json +0 -3827
  23. package/docs/package.json +0 -26
  24. package/docs/src/.vuepress/client.js +0 -8
  25. package/docs/src/.vuepress/components/Demo.vue +0 -303
  26. package/docs/src/.vuepress/config.js +0 -60
  27. package/docs/src/.vuepress/public/favicon.ico +0 -0
  28. package/docs/src/.vuepress/public/images/logo.png +0 -0
  29. package/docs/src/.vuepress/styles/index.scss +0 -0
  30. package/docs/src/.vuepress/styles/index.styl +0 -8
  31. package/docs/src/.vuepress/styles/palette.styl +0 -10
  32. package/docs/src/demo.md +0 -7
  33. package/docs/src/index.md +0 -4
  34. package/jest.config.js +0 -11
  35. package/src/classes/auth/auth.class.ts +0 -355
  36. package/src/classes/event-emitter/event-emitter.class.ts +0 -73
  37. package/src/classes/events-sdk/events-sdk-default-options.ts +0 -34
  38. package/src/classes/events-sdk/events-sdk.class.ts +0 -208
  39. package/src/classes/events-sdk/events-sdk.test.ts +0 -17
  40. package/src/classes/events-sdk/events-sdk.types.ts +0 -75
  41. package/src/classes/logger/logger.class.ts +0 -61
  42. package/src/classes/socket-io/socket-io.class.ts +0 -220
  43. package/src/classes/socket-io/socket-io.d.ts +0 -10
  44. package/src/classes/socket-io/versions/index.ts +0 -52
  45. package/src/classes/socket-io/versions/v1_3_7.js +0 -2083
  46. package/src/classes/storage/storage.class.ts +0 -51
  47. package/src/enum/auth.enum.ts +0 -4
  48. package/src/enum/logger.enum.ts +0 -5
  49. package/src/index.ts +0 -13
  50. package/src/types/auth.d.ts +0 -53
  51. package/src/types/events.d.ts +0 -83
  52. package/src/types/listeners.d.ts +0 -37
  53. package/src/types/public-api.d.ts +0 -39
  54. package/src/types/socket.d.ts +0 -5
  55. package/tsconfig.json +0 -47
  56. package/vite.config.ts +0 -45
@@ -1,2083 +0,0 @@
1
- /* eslint-disable */
2
- export default function () {
3
- var t;
4
- return function e(t, n, r) {
5
- function o(s, a) {
6
- if (!n[s]) {
7
- if (!t[s]) {
8
- var c = "function" == typeof require && require;
9
- if (!a && c) return c(s, !0);
10
- if (i) return i(s, !0);
11
- throw new Error("Cannot find module '" + s + "'")
12
- }
13
- var p = n[s] = {exports: {}};
14
- t[s][0].call(p.exports, function (e) {
15
- var n = t[s][1][e];
16
- return o(n ? n : e)
17
- }, p, p.exports, e, t, n, r)
18
- }
19
- return n[s].exports
20
- }
21
-
22
- for (var i = "function" == typeof require && require, s = 0; s < r.length; s++) o(r[s]);
23
- return o
24
- }({
25
- 1: [function (t, e) {
26
- e.exports = t("./lib/")
27
- }, {"./lib/": 2}],
28
- 2: [function (t, e, n) {
29
- function r(t, e) {
30
- "object" == typeof t && (e = t, t = void 0), e = e || {};
31
- var n, r = o(t), i = r.source, p = r.id;
32
- return e.forceNew || e["force new connection"] || !1 === e.multiplex ? (a("ignoring socket cache for %s", i), n = s(i, e)) : (c[p] || (a("new io instance for %s", i), c[p] = s(i, e)), n = c[p]), n.socket(r.path)
33
- }
34
-
35
- var o = t("./url"), i = t("socket.io-parser"), s = t("./manager"), a = t("debug")("socket.io-client");
36
- e.exports = n = r;
37
- var c = n.managers = {};
38
- n.protocol = i.protocol, n.connect = r, n.Manager = t("./manager"), n.Socket = t("./socket")
39
- }, {"./manager": 3, "./socket": 5, "./url": 6, debug: 10, "socket.io-parser": 44}],
40
- 3: [function (t, e) {
41
- function n(t, e) {
42
- return this instanceof n ? (t && "object" == typeof t && (e = t, t = void 0), e = e || {}, e.path = e.path || "/socket.io", this.nsps = {}, this.subs = [], this.opts = e, this.reconnection(e.reconnection !== !1), this.reconnectionAttempts(e.reconnectionAttempts || 1 / 0), this.reconnectionDelay(e.reconnectionDelay || 1e3), this.reconnectionDelayMax(e.reconnectionDelayMax || 5e3), this.randomizationFactor(e.randomizationFactor || .5), this.backoff = new f({
43
- min: this.reconnectionDelay(),
44
- max: this.reconnectionDelayMax(),
45
- jitter: this.randomizationFactor()
46
- }), this.timeout(null == e.timeout ? 2e4 : e.timeout), this.readyState = "closed", this.uri = t, this.connected = [], this.encoding = !1, this.packetBuffer = [], this.encoder = new s.Encoder, this.decoder = new s.Decoder, this.autoConnect = e.autoConnect !== !1, void (this.autoConnect && this.open())) : new n(t, e)
47
- }
48
-
49
- var r = (t("./url"), t("engine.io-client")), o = t("./socket"), i = t("component-emitter"),
50
- s = t("socket.io-parser"), a = t("./on"), c = t("component-bind"),
51
- p = (t("object-component"), t("debug")("socket.io-client:manager")), u = t("indexof"), f = t("backo2");
52
- e.exports = n, n.prototype.emitAll = function () {
53
- this.emit.apply(this, arguments);
54
- for (var t in this.nsps) this.nsps[t].emit.apply(this.nsps[t], arguments)
55
- }, n.prototype.updateSocketIds = function () {
56
- for (var t in this.nsps) this.nsps[t].id = this.engine.id
57
- }, i(n.prototype), n.prototype.reconnection = function (t) {
58
- return arguments.length ? (this._reconnection = !!t, this) : this._reconnection
59
- }, n.prototype.reconnectionAttempts = function (t) {
60
- return arguments.length ? (this._reconnectionAttempts = t, this) : this._reconnectionAttempts
61
- }, n.prototype.reconnectionDelay = function (t) {
62
- return arguments.length ? (this._reconnectionDelay = t, this.backoff && this.backoff.setMin(t), this) : this._reconnectionDelay
63
- }, n.prototype.randomizationFactor = function (t) {
64
- return arguments.length ? (this._randomizationFactor = t, this.backoff && this.backoff.setJitter(t), this) : this._randomizationFactor
65
- }, n.prototype.reconnectionDelayMax = function (t) {
66
- return arguments.length ? (this._reconnectionDelayMax = t, this.backoff && this.backoff.setMax(t), this) : this._reconnectionDelayMax
67
- }, n.prototype.timeout = function (t) {
68
- return arguments.length ? (this._timeout = t, this) : this._timeout
69
- }, n.prototype.maybeReconnectOnOpen = function () {
70
- !this.reconnecting && this._reconnection && 0 === this.backoff.attempts && this.reconnect()
71
- }, n.prototype.open = n.prototype.connect = function (t) {
72
- if (p("readyState %s", this.readyState), ~this.readyState.indexOf("open")) return this;
73
- p("opening %s", this.uri), this.engine = r(this.uri, this.opts);
74
- var e = this.engine, n = this;
75
- this.readyState = "opening", this.skipReconnect = !1;
76
- var o = a(e, "open", function () {
77
- n.onopen(), t && t()
78
- }), i = a(e, "error", function (e) {
79
- if (p("connect_error"), n.cleanup(), n.readyState = "closed", n.emitAll("connect_error", e), t) {
80
- var r = new Error("Connection error");
81
- r.data = e, t(r)
82
- } else n.maybeReconnectOnOpen()
83
- });
84
- if (!1 !== this._timeout) {
85
- var s = this._timeout;
86
- p("connect attempt will timeout after %d", s);
87
- var c = setTimeout(function () {
88
- p("connect attempt timed out after %d", s), o.destroy(), e.close(), e.emit("error", "timeout"), n.emitAll("connect_timeout", s)
89
- }, s);
90
- this.subs.push({
91
- destroy: function () {
92
- clearTimeout(c)
93
- }
94
- })
95
- }
96
- return this.subs.push(o), this.subs.push(i), this
97
- }, n.prototype.onopen = function () {
98
- p("open"), this.cleanup(), this.readyState = "open", this.emit("open");
99
- var t = this.engine;
100
- this.subs.push(a(t, "data", c(this, "ondata"))), this.subs.push(a(this.decoder, "decoded", c(this, "ondecoded"))), this.subs.push(a(t, "error", c(this, "onerror"))), this.subs.push(a(t, "close", c(this, "onclose")))
101
- }, n.prototype.ondata = function (t) {
102
- this.decoder.add(t)
103
- }, n.prototype.ondecoded = function (t) {
104
- this.emit("packet", t)
105
- }, n.prototype.onerror = function (t) {
106
- p("error", t), this.emitAll("error", t)
107
- }, n.prototype.socket = function (t) {
108
- var e = this.nsps[t];
109
- if (!e) {
110
- e = new o(this, t), this.nsps[t] = e;
111
- var n = this;
112
- e.on("connect", function () {
113
- e.id = n.engine.id, ~u(n.connected, e) || n.connected.push(e)
114
- })
115
- }
116
- return e
117
- }, n.prototype.destroy = function (t) {
118
- var e = u(this.connected, t);
119
- ~e && this.connected.splice(e, 1), this.connected.length || this.close()
120
- }, n.prototype.packet = function (t) {
121
- p("writing packet %j", t);
122
- var e = this;
123
- e.encoding ? e.packetBuffer.push(t) : (e.encoding = !0, this.encoder.encode(t, function (t) {
124
- for (var n = 0; n < t.length; n++) e.engine.write(t[n]);
125
- e.encoding = !1, e.processPacketQueue()
126
- }))
127
- }, n.prototype.processPacketQueue = function () {
128
- if (this.packetBuffer.length > 0 && !this.encoding) {
129
- var t = this.packetBuffer.shift();
130
- this.packet(t)
131
- }
132
- }, n.prototype.cleanup = function () {
133
- for (var t; t = this.subs.shift();) t.destroy();
134
- this.packetBuffer = [], this.encoding = !1, this.decoder.destroy()
135
- }, n.prototype.close = n.prototype.disconnect = function () {
136
- this.skipReconnect = !0, this.backoff.reset(), this.readyState = "closed", this.engine && this.engine.close()
137
- }, n.prototype.onclose = function (t) {
138
- p("close"), this.cleanup(), this.backoff.reset(), this.readyState = "closed", this.emit("close", t), this._reconnection && !this.skipReconnect && this.reconnect()
139
- }, n.prototype.reconnect = function () {
140
- if (this.reconnecting || this.skipReconnect) return this;
141
- var t = this;
142
- if (this.backoff.attempts >= this._reconnectionAttempts) p("reconnect failed"), this.backoff.reset(), this.emitAll("reconnect_failed"), this.reconnecting = !1; else {
143
- var e = this.backoff.duration();
144
- p("will wait %dms before reconnect attempt", e), this.reconnecting = !0;
145
- var n = setTimeout(function () {
146
- t.skipReconnect || (p("attempting reconnect"), t.emitAll("reconnect_attempt", t.backoff.attempts), t.emitAll("reconnecting", t.backoff.attempts), t.skipReconnect || t.open(function (e) {
147
- e ? (p("reconnect attempt error"), t.reconnecting = !1, t.reconnect(), t.emitAll("reconnect_error", e.data)) : (p("reconnect success"), t.onreconnect())
148
- }))
149
- }, e);
150
- this.subs.push({
151
- destroy: function () {
152
- clearTimeout(n)
153
- }
154
- })
155
- }
156
- }, n.prototype.onreconnect = function () {
157
- var t = this.backoff.attempts;
158
- this.reconnecting = !1, this.backoff.reset(), this.updateSocketIds(), this.emitAll("reconnect", t)
159
- }
160
- }, {
161
- "./on": 4,
162
- "./socket": 5,
163
- "./url": 6,
164
- backo2: 7,
165
- "component-bind": 8,
166
- "component-emitter": 9,
167
- debug: 10,
168
- "engine.io-client": 11,
169
- indexof: 40,
170
- "object-component": 41,
171
- "socket.io-parser": 44
172
- }],
173
- 4: [function (t, e) {
174
- function n(t, e, n) {
175
- return t.on(e, n), {
176
- destroy: function () {
177
- t.removeListener(e, n)
178
- }
179
- }
180
- }
181
-
182
- e.exports = n
183
- }, {}],
184
- 5: [function (t, e, n) {
185
- function r(t, e) {
186
- this.io = t, this.nsp = e, this.json = this, this.ids = 0, this.acks = {}, this.io.autoConnect && this.open(), this.receiveBuffer = [], this.sendBuffer = [], this.connected = !1, this.disconnected = !0
187
- }
188
-
189
- var o = t("socket.io-parser"), i = t("component-emitter"), s = t("to-array"), a = t("./on"),
190
- c = t("component-bind"), p = t("debug")("socket.io-client:socket"), u = t("has-binary");
191
- e.exports = n = r;
192
- var f = {
193
- connect: 1,
194
- connect_error: 1,
195
- connect_timeout: 1,
196
- disconnect: 1,
197
- error: 1,
198
- reconnect: 1,
199
- reconnect_attempt: 1,
200
- reconnect_failed: 1,
201
- reconnect_error: 1,
202
- reconnecting: 1
203
- }, h = i.prototype.emit;
204
- i(r.prototype), r.prototype.subEvents = function () {
205
- if (!this.subs) {
206
- var t = this.io;
207
- this.subs = [a(t, "open", c(this, "onopen")), a(t, "packet", c(this, "onpacket")), a(t, "close", c(this, "onclose"))]
208
- }
209
- }, r.prototype.open = r.prototype.connect = function () {
210
- return this.connected ? this : (this.subEvents(), this.io.open(), "open" == this.io.readyState && this.onopen(), this)
211
- }, r.prototype.send = function () {
212
- var t = s(arguments);
213
- return t.unshift("message"), this.emit.apply(this, t), this
214
- }, r.prototype.emit = function (t) {
215
- if (f.hasOwnProperty(t)) return h.apply(this, arguments), this;
216
- var e = s(arguments), n = o.EVENT;
217
- u(e) && (n = o.BINARY_EVENT);
218
- var r = {type: n, data: e};
219
- return "function" == typeof e[e.length - 1] && (p("emitting packet with ack id %d", this.ids), this.acks[this.ids] = e.pop(), r.id = this.ids++), this.connected ? this.packet(r) : this.sendBuffer.push(r), this
220
- }, r.prototype.packet = function (t) {
221
- t.nsp = this.nsp, this.io.packet(t)
222
- }, r.prototype.onopen = function () {
223
- p("transport is open - connecting"), "/" != this.nsp && this.packet({type: o.CONNECT})
224
- }, r.prototype.onclose = function (t) {
225
- p("close (%s)", t), this.connected = !1, this.disconnected = !0, delete this.id, this.emit("disconnect", t)
226
- }, r.prototype.onpacket = function (t) {
227
- if (t.nsp == this.nsp) switch (t.type) {
228
- case o.CONNECT:
229
- this.onconnect();
230
- break;
231
- case o.EVENT:
232
- this.onevent(t);
233
- break;
234
- case o.BINARY_EVENT:
235
- this.onevent(t);
236
- break;
237
- case o.ACK:
238
- this.onack(t);
239
- break;
240
- case o.BINARY_ACK:
241
- this.onack(t);
242
- break;
243
- case o.DISCONNECT:
244
- this.ondisconnect();
245
- break;
246
- case o.ERROR:
247
- this.emit("error", t.data)
248
- }
249
- }, r.prototype.onevent = function (t) {
250
- var e = t.data || [];
251
- p("emitting event %j", e), null != t.id && (p("attaching ack callback to event"), e.push(this.ack(t.id))), this.connected ? h.apply(this, e) : this.receiveBuffer.push(e)
252
- }, r.prototype.ack = function (t) {
253
- var e = this, n = !1;
254
- return function () {
255
- if (!n) {
256
- n = !0;
257
- var r = s(arguments);
258
- p("sending ack %j", r);
259
- var i = u(r) ? o.BINARY_ACK : o.ACK;
260
- e.packet({type: i, id: t, data: r})
261
- }
262
- }
263
- }, r.prototype.onack = function (t) {
264
- p("calling ack %s with %j", t.id, t.data);
265
- var e = this.acks[t.id];
266
- e.apply(this, t.data), delete this.acks[t.id]
267
- }, r.prototype.onconnect = function () {
268
- this.connected = !0, this.disconnected = !1, this.emit("connect"), this.emitBuffered()
269
- }, r.prototype.emitBuffered = function () {
270
- var t;
271
- for (t = 0; t < this.receiveBuffer.length; t++) h.apply(this, this.receiveBuffer[t]);
272
- for (this.receiveBuffer = [], t = 0; t < this.sendBuffer.length; t++) this.packet(this.sendBuffer[t]);
273
- this.sendBuffer = []
274
- }, r.prototype.ondisconnect = function () {
275
- p("server disconnect (%s)", this.nsp), this.destroy(), this.onclose("io server disconnect")
276
- }, r.prototype.destroy = function () {
277
- if (this.subs) {
278
- for (var t = 0; t < this.subs.length; t++) this.subs[t].destroy();
279
- this.subs = null
280
- }
281
- this.io.destroy(this)
282
- }, r.prototype.close = r.prototype.disconnect = function () {
283
- return this.connected && (p("performing disconnect (%s)", this.nsp), this.packet({type: o.DISCONNECT})), this.destroy(), this.connected && this.onclose("io client disconnect"), this
284
- }
285
- }, {
286
- "./on": 4,
287
- "component-bind": 8,
288
- "component-emitter": 9,
289
- debug: 10,
290
- "has-binary": 36,
291
- "socket.io-parser": 44,
292
- "to-array": 48
293
- }],
294
- 6: [function (t, e) {
295
- (function (n) {
296
- function r(t, e) {
297
- var r = t, e = e || n.location;
298
- return null == t && (t = e.protocol + "//" + e.host), "string" == typeof t && ("/" == t.charAt(0) && (t = "/" == t.charAt(1) ? e.protocol + t : e.hostname + t), /^(https?|wss?):\/\//.test(t) || (i("protocol-less url %s", t), t = "undefined" != typeof e ? e.protocol + "//" + t : "https://" + t), i("parse %s", t), r = o(t)), r.port || (/^(http|ws)$/.test(r.protocol) ? r.port = "80" : /^(http|ws)s$/.test(r.protocol) && (r.port = "443")), r.path = r.path || "/", r.id = r.protocol + "://" + r.host + ":" + r.port, r.href = r.protocol + "://" + r.host + (e && e.port == r.port ? "" : ":" + r.port), r
299
- }
300
-
301
- var o = t("parseuri"), i = t("debug")("socket.io-client:url");
302
- e.exports = r
303
- }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
304
- }, {debug: 10, parseuri: 42}],
305
- 7: [function (t, e) {
306
- function n(t) {
307
- t = t || {}, this.ms = t.min || 100, this.max = t.max || 1e4, this.factor = t.factor || 2, this.jitter = t.jitter > 0 && t.jitter <= 1 ? t.jitter : 0, this.attempts = 0
308
- }
309
-
310
- e.exports = n, n.prototype.duration = function () {
311
- var t = this.ms * Math.pow(this.factor, this.attempts++);
312
- if (this.jitter) {
313
- var e = Math.random(), n = Math.floor(e * this.jitter * t);
314
- t = 0 == (1 & Math.floor(10 * e)) ? t - n : t + n
315
- }
316
- return 0 | Math.min(t, this.max)
317
- }, n.prototype.reset = function () {
318
- this.attempts = 0
319
- }, n.prototype.setMin = function (t) {
320
- this.ms = t
321
- }, n.prototype.setMax = function (t) {
322
- this.max = t
323
- }, n.prototype.setJitter = function (t) {
324
- this.jitter = t
325
- }
326
- }, {}],
327
- 8: [function (t, e) {
328
- var n = [].slice;
329
- e.exports = function (t, e) {
330
- if ("string" == typeof e && (e = t[e]), "function" != typeof e) throw new Error("bind() requires a function");
331
- var r = n.call(arguments, 2);
332
- return function () {
333
- return e.apply(t, r.concat(n.call(arguments)))
334
- }
335
- }
336
- }, {}],
337
- 9: [function (t, e) {
338
- function n(t) {
339
- return t ? r(t) : void 0
340
- }
341
-
342
- function r(t) {
343
- for (var e in n.prototype) t[e] = n.prototype[e];
344
- return t
345
- }
346
-
347
- e.exports = n, n.prototype.on = n.prototype.addEventListener = function (t, e) {
348
- return this._callbacks = this._callbacks || {}, (this._callbacks[t] = this._callbacks[t] || []).push(e), this
349
- }, n.prototype.once = function (t, e) {
350
- function n() {
351
- r.off(t, n), e.apply(this, arguments)
352
- }
353
-
354
- var r = this;
355
- return this._callbacks = this._callbacks || {}, n.fn = e, this.on(t, n), this
356
- }, n.prototype.off = n.prototype.removeListener = n.prototype.removeAllListeners = n.prototype.removeEventListener = function (t, e) {
357
- if (this._callbacks = this._callbacks || {}, 0 == arguments.length) return this._callbacks = {}, this;
358
- var n = this._callbacks[t];
359
- if (!n) return this;
360
- if (1 == arguments.length) return delete this._callbacks[t], this;
361
- for (var r, o = 0; o < n.length; o++) if (r = n[o], r === e || r.fn === e) {
362
- n.splice(o, 1);
363
- break
364
- }
365
- return this
366
- }, n.prototype.emit = function (t) {
367
- this._callbacks = this._callbacks || {};
368
- var e = [].slice.call(arguments, 1), n = this._callbacks[t];
369
- if (n) {
370
- n = n.slice(0);
371
- for (var r = 0, o = n.length; o > r; ++r) n[r].apply(this, e)
372
- }
373
- return this
374
- }, n.prototype.listeners = function (t) {
375
- return this._callbacks = this._callbacks || {}, this._callbacks[t] || []
376
- }, n.prototype.hasListeners = function (t) {
377
- return !!this.listeners(t).length
378
- }
379
- }, {}],
380
- 10: [function (t, e) {
381
- function n(t) {
382
- return n.enabled(t) ? function (e) {
383
- e = r(e);
384
- var o = new Date, i = o - (n[t] || o);
385
- n[t] = o, e = t + " " + e + " +" + n.humanize(i), window.console && console.log && Function.prototype.apply.call(console.log, console, arguments)
386
- } : function () {
387
- }
388
- }
389
-
390
- function r(t) {
391
- return t instanceof Error ? t.stack || t.message : t
392
- }
393
-
394
- e.exports = n, n.names = [], n.skips = [], n.enable = function (t) {
395
- try {
396
- localStorage.debug = t
397
- } catch (e) {
398
- }
399
- for (var r = (t || "").split(/[\s,]+/), o = r.length, i = 0; o > i; i++) t = r[i].replace("*", ".*?"), "-" === t[0] ? n.skips.push(new RegExp("^" + t.substr(1) + "$")) : n.names.push(new RegExp("^" + t + "$"))
400
- }, n.disable = function () {
401
- n.enable("")
402
- }, n.humanize = function (t) {
403
- var e = 1e3, n = 6e4, r = 60 * n;
404
- return t >= r ? (t / r).toFixed(1) + "h" : t >= n ? (t / n).toFixed(1) + "m" : t >= e ? (t / e | 0) + "s" : t + "ms"
405
- }, n.enabled = function (t) {
406
- for (var e = 0, r = n.skips.length; r > e; e++) if (n.skips[e].test(t)) return !1;
407
- for (var e = 0, r = n.names.length; r > e; e++) if (n.names[e].test(t)) return !0;
408
- return !1
409
- };
410
- try {
411
- window.localStorage && n.enable(localStorage.debug)
412
- } catch (o) {
413
- }
414
- }, {}],
415
- 11: [function (t, e) {
416
- e.exports = t("./lib/")
417
- }, {"./lib/": 12}],
418
- 12: [function (t, e) {
419
- e.exports = t("./socket"), e.exports.parser = t("engine.io-parser")
420
- }, {"./socket": 13, "engine.io-parser": 25}],
421
- 13: [function (t, e) {
422
- (function (n) {
423
- function r(t, e) {
424
- if (!(this instanceof r)) return new r(t, e);
425
- if (e = e || {}, t && "object" == typeof t && (e = t, t = null), t && (t = u(t), e.host = t.host, e.secure = "https" == t.protocol || "wss" == t.protocol, e.port = t.port, t.query && (e.query = t.query)), this.secure = null != e.secure ? e.secure : n.location && "https:" == location.protocol, e.host) {
426
- var o = e.host.split(":");
427
- e.hostname = o.shift(), o.length ? e.port = o.pop() : e.port || (e.port = this.secure ? "443" : "80")
428
- }
429
- this.agent = e.agent || !1, this.hostname = e.hostname || (n.location ? location.hostname : "localhost"), this.port = e.port || (n.location && location.port ? location.port : this.secure ? 443 : 80), this.query = e.query || {}, "string" == typeof this.query && (this.query = h.decode(this.query)), this.upgrade = !1 !== e.upgrade, this.path = (e.path || "/engine.io").replace(/\/$/, "") + "/", this.forceJSONP = !!e.forceJSONP, this.jsonp = !1 !== e.jsonp, this.forceBase64 = !!e.forceBase64, this.enablesXDR = !!e.enablesXDR, this.timestampParam = e.timestampParam || "t", this.timestampRequests = e.timestampRequests, this.transports = e.transports || ["polling", "websocket"], this.readyState = "", this.writeBuffer = [], this.callbackBuffer = [], this.policyPort = e.policyPort || 843, this.rememberUpgrade = e.rememberUpgrade || !1, this.binaryType = null, this.onlyBinaryUpgrades = e.onlyBinaryUpgrades, this.pfx = e.pfx || null, this.key = e.key || null, this.passphrase = e.passphrase || null, this.cert = e.cert || null, this.ca = e.ca || null, this.ciphers = e.ciphers || null, this.rejectUnauthorized = e.rejectUnauthorized || null, this.open()
430
- }
431
-
432
- function o(t) {
433
- var e = {};
434
- for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
435
- return e
436
- }
437
-
438
- var i = t("./transports"), s = t("component-emitter"), a = t("debug")("engine.io-client:socket"),
439
- c = t("indexof"), p = t("engine.io-parser"), u = t("parseuri"), f = t("parsejson"),
440
- h = t("parseqs");
441
- e.exports = r, r.priorWebsocketSuccess = !1, s(r.prototype), r.protocol = p.protocol, r.Socket = r, r.Transport = t("./transport"), r.transports = t("./transports"), r.parser = t("engine.io-parser"), r.prototype.createTransport = function (t) {
442
- a('creating transport "%s"', t);
443
- var e = o(this.query);
444
- e.EIO = p.protocol, e.transport = t, this.id && (e.sid = this.id);
445
- var n = new i[t]({
446
- agent: this.agent,
447
- hostname: this.hostname,
448
- port: this.port,
449
- secure: this.secure,
450
- path: this.path,
451
- query: e,
452
- forceJSONP: this.forceJSONP,
453
- jsonp: this.jsonp,
454
- forceBase64: this.forceBase64,
455
- enablesXDR: this.enablesXDR,
456
- timestampRequests: this.timestampRequests,
457
- timestampParam: this.timestampParam,
458
- policyPort: this.policyPort,
459
- socket: this,
460
- pfx: this.pfx,
461
- key: this.key,
462
- passphrase: this.passphrase,
463
- cert: this.cert,
464
- ca: this.ca,
465
- ciphers: this.ciphers,
466
- rejectUnauthorized: this.rejectUnauthorized
467
- });
468
- return n
469
- }, r.prototype.open = function () {
470
- var t;
471
- if (this.rememberUpgrade && r.priorWebsocketSuccess && -1 != this.transports.indexOf("websocket")) t = "websocket"; else {
472
- if (0 == this.transports.length) {
473
- var e = this;
474
- return void setTimeout(function () {
475
- e.emit("error", "No transports available")
476
- }, 0)
477
- }
478
- t = this.transports[0]
479
- }
480
- this.readyState = "opening";
481
- var t;
482
- try {
483
- t = this.createTransport(t)
484
- } catch (n) {
485
- return this.transports.shift(), void this.open()
486
- }
487
- t.open(), this.setTransport(t)
488
- }, r.prototype.setTransport = function (t) {
489
- a("setting transport %s", t.name);
490
- var e = this;
491
- this.transport && (a("clearing existing transport %s", this.transport.name), this.transport.removeAllListeners()), this.transport = t, t.on("drain", function () {
492
- e.onDrain()
493
- }).on("packet", function (t) {
494
- e.onPacket(t)
495
- }).on("error", function (t) {
496
- e.onError(t)
497
- }).on("close", function () {
498
- e.onClose("transport close")
499
- })
500
- }, r.prototype.probe = function (t) {
501
- function e() {
502
- if (h.onlyBinaryUpgrades) {
503
- var e = !this.supportsBinary && h.transport.supportsBinary;
504
- f = f || e
505
- }
506
- f || (a('probe transport "%s" opened', t), u.send([{
507
- type: "ping",
508
- data: "probe"
509
- }]), u.once("packet", function (e) {
510
- if (!f) if ("pong" == e.type && "probe" == e.data) {
511
- if (a('probe transport "%s" pong', t), h.upgrading = !0, h.emit("upgrading", u), !u) return;
512
- r.priorWebsocketSuccess = "websocket" == u.name, a('pausing current transport "%s"', h.transport.name), h.transport.pause(function () {
513
- f || "closed" != h.readyState && (a("changing transport and sending upgrade packet"), p(), h.setTransport(u), u.send([{type: "upgrade"}]), h.emit("upgrade", u), u = null, h.upgrading = !1, h.flush())
514
- })
515
- } else {
516
- a('probe transport "%s" failed', t);
517
- var n = new Error("probe error");
518
- n.transport = u.name, h.emit("upgradeError", n)
519
- }
520
- }))
521
- }
522
-
523
- function n() {
524
- f || (f = !0, p(), u.close(), u = null)
525
- }
526
-
527
- function o(e) {
528
- var r = new Error("probe error: " + e);
529
- r.transport = u.name, n(), a('probe transport "%s" failed because of error: %s', t, e), h.emit("upgradeError", r)
530
- }
531
-
532
- function i() {
533
- o("transport closed")
534
- }
535
-
536
- function s() {
537
- o("socket closed")
538
- }
539
-
540
- function c(t) {
541
- u && t.name != u.name && (a('"%s" works - aborting "%s"', t.name, u.name), n())
542
- }
543
-
544
- function p() {
545
- u.removeListener("open", e), u.removeListener("error", o), u.removeListener("close", i), h.removeListener("close", s), h.removeListener("upgrading", c)
546
- }
547
-
548
- a('probing transport "%s"', t);
549
- var u = this.createTransport(t, {probe: 1}), f = !1, h = this;
550
- r.priorWebsocketSuccess = !1, u.once("open", e), u.once("error", o), u.once("close", i), this.once("close", s), this.once("upgrading", c), u.open()
551
- }, r.prototype.onOpen = function () {
552
- if (a("socket open"), this.readyState = "open", r.priorWebsocketSuccess = "websocket" == this.transport.name, this.emit("open"), this.flush(), "open" == this.readyState && this.upgrade && this.transport.pause) {
553
- a("starting upgrade probes");
554
- for (var t = 0, e = this.upgrades.length; e > t; t++) this.probe(this.upgrades[t])
555
- }
556
- }, r.prototype.onPacket = function (t) {
557
- if ("opening" == this.readyState || "open" == this.readyState) switch (a('socket receive: type "%s", data "%s"', t.type, t.data), this.emit("packet", t), this.emit("heartbeat"), t.type) {
558
- case"open":
559
- this.onHandshake(f(t.data));
560
- break;
561
- case"pong":
562
- this.setPing();
563
- break;
564
- case"error":
565
- var e = new Error("server error");
566
- e.code = t.data, this.emit("error", e);
567
- break;
568
- case"message":
569
- this.emit("data", t.data), this.emit("message", t.data)
570
- } else a('packet received with socket readyState "%s"', this.readyState)
571
- }, r.prototype.onHandshake = function (t) {
572
- this.emit("handshake", t), this.id = t.sid, this.transport.query.sid = t.sid, this.upgrades = this.filterUpgrades(t.upgrades), this.pingInterval = t.pingInterval, this.pingTimeout = t.pingTimeout, this.onOpen(), "closed" != this.readyState && (this.setPing(), this.removeListener("heartbeat", this.onHeartbeat), this.on("heartbeat", this.onHeartbeat))
573
- }, r.prototype.onHeartbeat = function (t) {
574
- clearTimeout(this.pingTimeoutTimer);
575
- var e = this;
576
- e.pingTimeoutTimer = setTimeout(function () {
577
- "closed" != e.readyState && e.onClose("ping timeout")
578
- }, t || e.pingInterval + e.pingTimeout)
579
- }, r.prototype.setPing = function () {
580
- var t = this;
581
- clearTimeout(t.pingIntervalTimer), t.pingIntervalTimer = setTimeout(function () {
582
- a("writing ping packet - expecting pong within %sms", t.pingTimeout), t.ping(), t.onHeartbeat(t.pingTimeout)
583
- }, t.pingInterval)
584
- }, r.prototype.ping = function () {
585
- this.sendPacket("ping")
586
- }, r.prototype.onDrain = function () {
587
- for (var t = 0; t < this.prevBufferLen; t++) this.callbackBuffer[t] && this.callbackBuffer[t]();
588
- this.writeBuffer.splice(0, this.prevBufferLen), this.callbackBuffer.splice(0, this.prevBufferLen), this.prevBufferLen = 0, 0 == this.writeBuffer.length ? this.emit("drain") : this.flush()
589
- }, r.prototype.flush = function () {
590
- "closed" != this.readyState && this.transport.writable && !this.upgrading && this.writeBuffer.length && (a("flushing %d packets in socket", this.writeBuffer.length), this.transport.send(this.writeBuffer), this.prevBufferLen = this.writeBuffer.length, this.emit("flush"))
591
- }, r.prototype.write = r.prototype.send = function (t, e) {
592
- return this.sendPacket("message", t, e), this
593
- }, r.prototype.sendPacket = function (t, e, n) {
594
- if ("closing" != this.readyState && "closed" != this.readyState) {
595
- var r = {type: t, data: e};
596
- this.emit("packetCreate", r), this.writeBuffer.push(r), this.callbackBuffer.push(n), this.flush()
597
- }
598
- }, r.prototype.close = function () {
599
- function t() {
600
- r.onClose("forced close"), a("socket closing - telling transport to close"), r.transport.close()
601
- }
602
-
603
- function e() {
604
- r.removeListener("upgrade", e), r.removeListener("upgradeError", e), t()
605
- }
606
-
607
- function n() {
608
- r.once("upgrade", e), r.once("upgradeError", e)
609
- }
610
-
611
- if ("opening" == this.readyState || "open" == this.readyState) {
612
- this.readyState = "closing";
613
- var r = this;
614
- this.writeBuffer.length ? this.once("drain", function () {
615
- this.upgrading ? n() : t()
616
- }) : this.upgrading ? n() : t()
617
- }
618
- return this
619
- }, r.prototype.onError = function (t) {
620
- a("socket error %j", t), r.priorWebsocketSuccess = !1, this.emit("error", t), this.onClose("transport error", t)
621
- }, r.prototype.onClose = function (t, e) {
622
- if ("opening" == this.readyState || "open" == this.readyState || "closing" == this.readyState) {
623
- a('socket close with reason: "%s"', t);
624
- var n = this;
625
- clearTimeout(this.pingIntervalTimer), clearTimeout(this.pingTimeoutTimer), setTimeout(function () {
626
- n.writeBuffer = [], n.callbackBuffer = [], n.prevBufferLen = 0
627
- }, 0), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), this.readyState = "closed", this.id = null, this.emit("close", t, e)
628
- }
629
- }, r.prototype.filterUpgrades = function (t) {
630
- for (var e = [], n = 0, r = t.length; r > n; n++) ~c(this.transports, t[n]) && e.push(t[n]);
631
- return e
632
- }
633
- }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
634
- }, {
635
- "./transport": 14,
636
- "./transports": 15,
637
- "component-emitter": 9,
638
- debug: 22,
639
- "engine.io-parser": 25,
640
- indexof: 40,
641
- parsejson: 32,
642
- parseqs: 33,
643
- parseuri: 34
644
- }],
645
- 14: [function (t, e) {
646
- function n(t) {
647
- this.path = t.path, this.hostname = t.hostname, this.port = t.port, this.secure = t.secure, this.query = t.query, this.timestampParam = t.timestampParam, this.timestampRequests = t.timestampRequests, this.readyState = "", this.agent = t.agent || !1, this.socket = t.socket, this.enablesXDR = t.enablesXDR, this.pfx = t.pfx, this.key = t.key, this.passphrase = t.passphrase, this.cert = t.cert, this.ca = t.ca, this.ciphers = t.ciphers, this.rejectUnauthorized = t.rejectUnauthorized
648
- }
649
-
650
- var r = t("engine.io-parser"), o = t("component-emitter");
651
- e.exports = n, o(n.prototype), n.timestamps = 0, n.prototype.onError = function (t, e) {
652
- var n = new Error(t);
653
- return n.type = "TransportError", n.description = e, this.emit("error", n), this
654
- }, n.prototype.open = function () {
655
- return ("closed" == this.readyState || "" == this.readyState) && (this.readyState = "opening", this.doOpen()), this
656
- }, n.prototype.close = function () {
657
- return ("opening" == this.readyState || "open" == this.readyState) && (this.doClose(), this.onClose()), this
658
- }, n.prototype.send = function (t) {
659
- if ("open" != this.readyState) throw new Error("Transport not open");
660
- this.write(t)
661
- }, n.prototype.onOpen = function () {
662
- this.readyState = "open", this.writable = !0, this.emit("open")
663
- }, n.prototype.onData = function (t) {
664
- var e = r.decodePacket(t, this.socket.binaryType);
665
- this.onPacket(e)
666
- }, n.prototype.onPacket = function (t) {
667
- this.emit("packet", t)
668
- }, n.prototype.onClose = function () {
669
- this.readyState = "closed", this.emit("close")
670
- }
671
- }, {"component-emitter": 9, "engine.io-parser": 25}],
672
- 15: [function (t, e, n) {
673
- (function (e) {
674
- function r(t) {
675
- var n, r = !1, a = !1, c = !1 !== t.jsonp;
676
- if (e.location) {
677
- var p = "https:" == location.protocol, u = location.port;
678
- u || (u = p ? 443 : 80), r = t.hostname != location.hostname || u != t.port, a = t.secure != p
679
- }
680
- if (t.xdomain = r, t.xscheme = a, n = new o(t), "open" in n && !t.forceJSONP) return new i(t);
681
- if (!c) throw new Error("JSONP disabled");
682
- return new s(t)
683
- }
684
-
685
- var o = t("xmlhttprequest"), i = t("./polling-xhr"), s = t("./polling-jsonp"), a = t("./websocket");
686
- n.polling = r, n.websocket = a
687
- }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
688
- }, {"./polling-jsonp": 16, "./polling-xhr": 17, "./websocket": 19, xmlhttprequest: 20}],
689
- 16: [function (t, e) {
690
- (function (n) {
691
- function r() {
692
- }
693
-
694
- function o(t) {
695
- i.call(this, t), this.query = this.query || {}, a || (n.___eio || (n.___eio = []), a = n.___eio), this.index = a.length;
696
- var e = this;
697
- a.push(function (t) {
698
- e.onData(t)
699
- }), this.query.j = this.index, n.document && n.addEventListener && n.addEventListener("beforeunload", function () {
700
- e.script && (e.script.onerror = r)
701
- }, !1)
702
- }
703
-
704
- var i = t("./polling"), s = t("component-inherit");
705
- e.exports = o;
706
- var a, c = /\n/g, p = /\\n/g;
707
- s(o, i), o.prototype.supportsBinary = !1, o.prototype.doClose = function () {
708
- this.script && (this.script.parentNode.removeChild(this.script), this.script = null), this.form && (this.form.parentNode.removeChild(this.form), this.form = null, this.iframe = null), i.prototype.doClose.call(this)
709
- }, o.prototype.doPoll = function () {
710
- var t = this, e = document.createElement("script");
711
- this.script && (this.script.parentNode.removeChild(this.script), this.script = null), e.async = !0, e.src = this.uri(), e.onerror = function (e) {
712
- t.onError("jsonp poll error", e)
713
- };
714
- var n = document.getElementsByTagName("script")[0];
715
- n.parentNode.insertBefore(e, n), this.script = e;
716
- var r = "undefined" != typeof navigator && /gecko/i.test(navigator.userAgent);
717
- r && setTimeout(function () {
718
- var t = document.createElement("iframe");
719
- document.body.appendChild(t), document.body.removeChild(t)
720
- }, 100)
721
- }, o.prototype.doWrite = function (t, e) {
722
- function n() {
723
- r(), e()
724
- }
725
-
726
- function r() {
727
- if (o.iframe) try {
728
- o.form.removeChild(o.iframe)
729
- } catch (t) {
730
- o.onError("jsonp polling iframe removal error", t)
731
- }
732
- try {
733
- var e = '<iframe src="javascript:0" name="' + o.iframeId + '">';
734
- i = document.createElement(e)
735
- } catch (t) {
736
- i = document.createElement("iframe"), i.name = o.iframeId, i.src = "javascript:0"
737
- }
738
- i.id = o.iframeId, o.form.appendChild(i), o.iframe = i
739
- }
740
-
741
- var o = this;
742
- if (!this.form) {
743
- var i, s = document.createElement("form"), a = document.createElement("textarea"),
744
- u = this.iframeId = "eio_iframe_" + this.index;
745
- s.className = "socketio", s.style.position = "absolute", s.style.top = "-1000px", s.style.left = "-1000px", s.target = u, s.method = "POST", s.setAttribute("accept-charset", "utf-8"), a.name = "d", s.appendChild(a), document.body.appendChild(s), this.form = s, this.area = a
746
- }
747
- this.form.action = this.uri(), r(), t = t.replace(p, "\\\n"), this.area.value = t.replace(c, "\\n");
748
- try {
749
- this.form.submit()
750
- } catch (f) {
751
- }
752
- this.iframe.attachEvent ? this.iframe.onreadystatechange = function () {
753
- "complete" == o.iframe.readyState && n()
754
- } : this.iframe.onload = n
755
- }
756
- }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
757
- }, {"./polling": 18, "component-inherit": 21}],
758
- 17: [function (t, e) {
759
- (function (n) {
760
- function r() {
761
- }
762
-
763
- function o(t) {
764
- if (c.call(this, t), n.location) {
765
- var e = "https:" == location.protocol, r = location.port;
766
- r || (r = e ? 443 : 80), this.xd = t.hostname != n.location.hostname || r != t.port, this.xs = t.secure != e
767
- }
768
- }
769
-
770
- function i(t) {
771
- this.method = t.method || "GET", this.uri = t.uri, this.xd = !!t.xd, this.xs = !!t.xs, this.async = !1 !== t.async, this.data = void 0 != t.data ? t.data : null, this.agent = t.agent, this.isBinary = t.isBinary, this.supportsBinary = t.supportsBinary, this.enablesXDR = t.enablesXDR, this.pfx = t.pfx, this.key = t.key, this.passphrase = t.passphrase, this.cert = t.cert, this.ca = t.ca, this.ciphers = t.ciphers, this.rejectUnauthorized = t.rejectUnauthorized, this.create()
772
- }
773
-
774
- function s() {
775
- for (var t in i.requests) i.requests.hasOwnProperty(t) && i.requests[t].abort()
776
- }
777
-
778
- var a = t("xmlhttprequest"), c = t("./polling"), p = t("component-emitter"), u = t("component-inherit"),
779
- f = t("debug")("engine.io-client:polling-xhr");
780
- e.exports = o, e.exports.Request = i, u(o, c), o.prototype.supportsBinary = !0, o.prototype.request = function (t) {
781
- return t = t || {}, t.uri = this.uri(), t.xd = this.xd, t.xs = this.xs, t.agent = this.agent || !1, t.supportsBinary = this.supportsBinary, t.enablesXDR = this.enablesXDR, t.pfx = this.pfx, t.key = this.key, t.passphrase = this.passphrase, t.cert = this.cert, t.ca = this.ca, t.ciphers = this.ciphers, t.rejectUnauthorized = this.rejectUnauthorized, new i(t)
782
- }, o.prototype.doWrite = function (t, e) {
783
- var n = "string" != typeof t && void 0 !== t,
784
- r = this.request({method: "POST", data: t, isBinary: n}), o = this;
785
- r.on("success", e), r.on("error", function (t) {
786
- o.onError("xhr post error", t)
787
- }), this.sendXhr = r
788
- }, o.prototype.doPoll = function () {
789
- f("xhr poll");
790
- var t = this.request(), e = this;
791
- t.on("data", function (t) {
792
- e.onData(t)
793
- }), t.on("error", function (t) {
794
- e.onError("xhr poll error", t)
795
- }), this.pollXhr = t
796
- }, p(i.prototype), i.prototype.create = function () {
797
- var t = {agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR};
798
- t.pfx = this.pfx, t.key = this.key, t.passphrase = this.passphrase, t.cert = this.cert, t.ca = this.ca, t.ciphers = this.ciphers, t.rejectUnauthorized = this.rejectUnauthorized;
799
- var e = this.xhr = new a(t), r = this;
800
- try {
801
- if (f("xhr open %s: %s", this.method, this.uri), e.open(this.method, this.uri, this.async), this.supportsBinary && (e.responseType = "arraybuffer"), "POST" == this.method) try {
802
- this.isBinary ? e.setRequestHeader("Content-type", "application/octet-stream") : e.setRequestHeader("Content-type", "text/plain;charset=UTF-8")
803
- } catch (o) {
804
- }
805
- "withCredentials" in e && (e.withCredentials = !0), this.hasXDR() ? (e.onload = function () {
806
- r.onLoad()
807
- }, e.onerror = function () {
808
- r.onError(e.responseText)
809
- }) : e.onreadystatechange = function () {
810
- 4 == e.readyState && (200 == e.status || 1223 == e.status ? r.onLoad() : setTimeout(function () {
811
- r.onError(e.status)
812
- }, 0))
813
- }, f("xhr data %s", this.data), e.send(this.data)
814
- } catch (o) {
815
- return void setTimeout(function () {
816
- r.onError(o)
817
- }, 0)
818
- }
819
- n.document && (this.index = i.requestsCount++, i.requests[this.index] = this)
820
- }, i.prototype.onSuccess = function () {
821
- this.emit("success"), this.cleanup()
822
- }, i.prototype.onData = function (t) {
823
- this.emit("data", t), this.onSuccess()
824
- }, i.prototype.onError = function (t) {
825
- this.emit("error", t), this.cleanup(!0)
826
- }, i.prototype.cleanup = function (t) {
827
- if ("undefined" != typeof this.xhr && null !== this.xhr) {
828
- if (this.hasXDR() ? this.xhr.onload = this.xhr.onerror = r : this.xhr.onreadystatechange = r, t) try {
829
- this.xhr.abort()
830
- } catch (e) {
831
- }
832
- n.document && delete i.requests[this.index], this.xhr = null
833
- }
834
- }, i.prototype.onLoad = function () {
835
- var t;
836
- try {
837
- var e;
838
- try {
839
- e = this.xhr.getResponseHeader("Content-Type").split(";")[0]
840
- } catch (n) {
841
- }
842
- t = "application/octet-stream" === e ? this.xhr.response : this.supportsBinary ? "ok" : this.xhr.responseText
843
- } catch (n) {
844
- this.onError(n)
845
- }
846
- null != t && this.onData(t)
847
- }, i.prototype.hasXDR = function () {
848
- return "undefined" != typeof n.XDomainRequest && !this.xs && this.enablesXDR
849
- }, i.prototype.abort = function () {
850
- this.cleanup()
851
- }, n.document && (i.requestsCount = 0, i.requests = {}, n.attachEvent ? n.attachEvent("onunload", s) : n.addEventListener && n.addEventListener("beforeunload", s, !1))
852
- }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
853
- }, {"./polling": 18, "component-emitter": 9, "component-inherit": 21, debug: 22, xmlhttprequest: 20}],
854
- 18: [function (t, e) {
855
- function n(t) {
856
- var e = t && t.forceBase64;
857
- (!c || e) && (this.supportsBinary = !1), r.call(this, t)
858
- }
859
-
860
- var r = t("../transport"), o = t("parseqs"), i = t("engine.io-parser"), s = t("component-inherit"),
861
- a = t("debug")("engine.io-client:polling");
862
- e.exports = n;
863
- var c = function () {
864
- var e = t("xmlhttprequest"), n = new e({xdomain: !1});
865
- return null != n.responseType
866
- }();
867
- s(n, r), n.prototype.name = "polling", n.prototype.doOpen = function () {
868
- this.poll()
869
- }, n.prototype.pause = function (t) {
870
- function e() {
871
- a("paused"), n.readyState = "paused", t()
872
- }
873
-
874
- var n = this;
875
- if (this.readyState = "pausing", this.polling || !this.writable) {
876
- var r = 0;
877
- this.polling && (a("we are currently polling - waiting to pause"), r++, this.once("pollComplete", function () {
878
- a("pre-pause polling complete"), --r || e()
879
- })), this.writable || (a("we are currently writing - waiting to pause"), r++, this.once("drain", function () {
880
- a("pre-pause writing complete"), --r || e()
881
- }))
882
- } else e()
883
- }, n.prototype.poll = function () {
884
- a("polling"), this.polling = !0, this.doPoll(), this.emit("poll")
885
- }, n.prototype.onData = function (t) {
886
- var e = this;
887
- a("polling got data %s", t);
888
- var n = function (t) {
889
- return "opening" == e.readyState && e.onOpen(), "close" == t.type ? (e.onClose(), !1) : void e.onPacket(t)
890
- };
891
- i.decodePayload(t, this.socket.binaryType, n), "closed" != this.readyState && (this.polling = !1, this.emit("pollComplete"), "open" == this.readyState ? this.poll() : a('ignoring poll - transport state "%s"', this.readyState))
892
- }, n.prototype.doClose = function () {
893
- function t() {
894
- a("writing close packet"), e.write([{type: "close"}])
895
- }
896
-
897
- var e = this;
898
- "open" == this.readyState ? (a("transport open - closing"), t()) : (a("transport not open - deferring close"), this.once("open", t))
899
- }, n.prototype.write = function (t) {
900
- var e = this;
901
- this.writable = !1;
902
- var n = function () {
903
- e.writable = !0, e.emit("drain")
904
- }, e = this;
905
- i.encodePayload(t, this.supportsBinary, function (t) {
906
- e.doWrite(t, n)
907
- })
908
- }, n.prototype.uri = function () {
909
- var t = this.query || {}, e = this.secure ? "https" : "http", n = "";
910
- return !1 !== this.timestampRequests && (t[this.timestampParam] = +new Date + "-" + r.timestamps++), this.supportsBinary || t.sid || (t.b64 = 1), t = o.encode(t), this.port && ("https" == e && 443 != this.port || "http" == e && 80 != this.port) && (n = ":" + this.port), t.length && (t = "?" + t), e + "://" + this.hostname + n + this.path + t
911
- }
912
- }, {
913
- "../transport": 14,
914
- "component-inherit": 21,
915
- debug: 22,
916
- "engine.io-parser": 25,
917
- parseqs: 33,
918
- xmlhttprequest: 20
919
- }],
920
- 19: [function (t, e) {
921
- function n(t) {
922
- var e = t && t.forceBase64;
923
- e && (this.supportsBinary = !1), r.call(this, t)
924
- }
925
-
926
- var r = t("../transport"), o = t("engine.io-parser"), i = t("parseqs"), s = t("component-inherit"),
927
- a = t("debug")("engine.io-client:websocket"), c = t("ws");
928
- e.exports = n, s(n, r), n.prototype.name = "websocket", n.prototype.supportsBinary = !0, n.prototype.doOpen = function () {
929
- if (this.check()) {
930
- var t = this.uri(), e = void 0, n = {agent: this.agent};
931
- n.pfx = this.pfx, n.key = this.key, n.passphrase = this.passphrase, n.cert = this.cert, n.ca = this.ca, n.ciphers = this.ciphers, n.rejectUnauthorized = this.rejectUnauthorized, this.ws = new c(t, e, n), void 0 === this.ws.binaryType && (this.supportsBinary = !1), this.ws.binaryType = "arraybuffer", this.addEventListeners()
932
- }
933
- }, n.prototype.addEventListeners = function () {
934
- var t = this;
935
- this.ws.onopen = function () {
936
- t.onOpen()
937
- }, this.ws.onclose = function () {
938
- t.onClose()
939
- }, this.ws.onmessage = function (e) {
940
- t.onData(e.data)
941
- }, this.ws.onerror = function (e) {
942
- t.onError("websocket error", e)
943
- }
944
- }, "undefined" != typeof navigator && /iPad|iPhone|iPod/i.test(navigator.userAgent) && (n.prototype.onData = function (t) {
945
- var e = this;
946
- setTimeout(function () {
947
- r.prototype.onData.call(e, t)
948
- }, 0)
949
- }), n.prototype.write = function (t) {
950
- function e() {
951
- n.writable = !0, n.emit("drain")
952
- }
953
-
954
- var n = this;
955
- this.writable = !1;
956
- for (var r = 0, i = t.length; i > r; r++) o.encodePacket(t[r], this.supportsBinary, function (t) {
957
- try {
958
- n.ws.send(t)
959
- } catch (e) {
960
- a("websocket closed before onclose event")
961
- }
962
- });
963
- setTimeout(e, 0)
964
- }, n.prototype.onClose = function () {
965
- r.prototype.onClose.call(this)
966
- }, n.prototype.doClose = function () {
967
- "undefined" != typeof this.ws && this.ws.close()
968
- }, n.prototype.uri = function () {
969
- var t = this.query || {}, e = this.secure ? "wss" : "ws", n = "";
970
- return this.port && ("wss" == e && 443 != this.port || "ws" == e && 80 != this.port) && (n = ":" + this.port), this.timestampRequests && (t[this.timestampParam] = +new Date), this.supportsBinary || (t.b64 = 1), t = i.encode(t), t.length && (t = "?" + t), e + "://" + this.hostname + n + this.path + t
971
- }, n.prototype.check = function () {
972
- return !(!c || "__initialize" in c && this.name === n.prototype.name)
973
- }
974
- }, {"../transport": 14, "component-inherit": 21, debug: 22, "engine.io-parser": 25, parseqs: 33, ws: 35}],
975
- 20: [function (t, e) {
976
- var n = t("has-cors");
977
- e.exports = function (t) {
978
- var e = t.xdomain, r = t.xscheme, o = t.enablesXDR;
979
- try {
980
- if ("undefined" != typeof XMLHttpRequest && (!e || n)) return new XMLHttpRequest
981
- } catch (i) {
982
- }
983
- try {
984
- if ("undefined" != typeof XDomainRequest && !r && o) return new XDomainRequest
985
- } catch (i) {
986
- }
987
- if (!e) try {
988
- return new ActiveXObject("Microsoft.XMLHTTP")
989
- } catch (i) {
990
- }
991
- }
992
- }, {"has-cors": 38}],
993
- 21: [function (t, e) {
994
- e.exports = function (t, e) {
995
- var n = function () {
996
- };
997
- n.prototype = e.prototype, t.prototype = new n, t.prototype.constructor = t
998
- }
999
- }, {}],
1000
- 22: [function (t, e, n) {
1001
- function r() {
1002
- return "WebkitAppearance" in document.documentElement.style || window.console && (console.firebug || console.exception && console.table) || navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31
1003
- }
1004
-
1005
- function o() {
1006
- var t = arguments, e = this.useColors;
1007
- if (t[0] = (e ? "%c" : "") + this.namespace + (e ? " %c" : " ") + t[0] + (e ? "%c " : " ") + "+" + n.humanize(this.diff), !e) return t;
1008
- var r = "color: " + this.color;
1009
- t = [t[0], r, "color: inherit"].concat(Array.prototype.slice.call(t, 1));
1010
- var o = 0, i = 0;
1011
- return t[0].replace(/%[a-z%]/g, function (t) {
1012
- "%%" !== t && (o++, "%c" === t && (i = o))
1013
- }), t.splice(i, 0, r), t
1014
- }
1015
-
1016
- function i() {
1017
- return "object" == typeof console && "function" == typeof console.log && Function.prototype.apply.call(console.log, console, arguments)
1018
- }
1019
-
1020
- function s(t) {
1021
- try {
1022
- null == t ? localStorage.removeItem("debug") : localStorage.debug = t
1023
- } catch (e) {
1024
- }
1025
- }
1026
-
1027
- function a() {
1028
- var t;
1029
- try {
1030
- t = localStorage.debug
1031
- } catch (e) {
1032
- }
1033
- return t
1034
- }
1035
-
1036
- n = e.exports = t("./debug"), n.log = i, n.formatArgs = o, n.save = s, n.load = a, n.useColors = r, n.colors = ["lightseagreen", "forestgreen", "goldenrod", "dodgerblue", "darkorchid", "crimson"], n.formatters.j = function (t) {
1037
- return JSON.stringify(t)
1038
- }, n.enable(a())
1039
- }, {"./debug": 23}],
1040
- 23: [function (t, e, n) {
1041
- function r() {
1042
- return n.colors[u++ % n.colors.length]
1043
- }
1044
-
1045
- function o(t) {
1046
- function e() {
1047
- }
1048
-
1049
- function o() {
1050
- var t = o, e = +new Date, i = e - (p || e);
1051
- t.diff = i, t.prev = p, t.curr = e, p = e, null == t.useColors && (t.useColors = n.useColors()), null == t.color && t.useColors && (t.color = r());
1052
- var s = Array.prototype.slice.call(arguments);
1053
- s[0] = n.coerce(s[0]), "string" != typeof s[0] && (s = ["%o"].concat(s));
1054
- var a = 0;
1055
- s[0] = s[0].replace(/%([a-z%])/g, function (e, r) {
1056
- if ("%%" === e) return e;
1057
- a++;
1058
- var o = n.formatters[r];
1059
- if ("function" == typeof o) {
1060
- var i = s[a];
1061
- e = o.call(t, i), s.splice(a, 1), a--
1062
- }
1063
- return e
1064
- }), "function" == typeof n.formatArgs && (s = n.formatArgs.apply(t, s));
1065
- var c = o.log || n.log || console.log.bind(console);
1066
- c.apply(t, s)
1067
- }
1068
-
1069
- e.enabled = !1, o.enabled = !0;
1070
- var i = n.enabled(t) ? o : e;
1071
- return i.namespace = t, i
1072
- }
1073
-
1074
- function i(t) {
1075
- n.save(t);
1076
- for (var e = (t || "").split(/[\s,]+/), r = e.length, o = 0; r > o; o++) e[o] && (t = e[o].replace(/\*/g, ".*?"), "-" === t[0] ? n.skips.push(new RegExp("^" + t.substr(1) + "$")) : n.names.push(new RegExp("^" + t + "$")))
1077
- }
1078
-
1079
- function s() {
1080
- n.enable("")
1081
- }
1082
-
1083
- function a(t) {
1084
- var e, r;
1085
- for (e = 0, r = n.skips.length; r > e; e++) if (n.skips[e].test(t)) return !1;
1086
- for (e = 0, r = n.names.length; r > e; e++) if (n.names[e].test(t)) return !0;
1087
- return !1
1088
- }
1089
-
1090
- function c(t) {
1091
- return t instanceof Error ? t.stack || t.message : t
1092
- }
1093
-
1094
- n = e.exports = o, n.coerce = c, n.disable = s, n.enable = i, n.enabled = a, n.humanize = t("ms"), n.names = [], n.skips = [], n.formatters = {};
1095
- var p, u = 0
1096
- }, {ms: 24}],
1097
- 24: [function (t, e) {
1098
- function n(t) {
1099
- var e = /^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(t);
1100
- if (e) {
1101
- var n = parseFloat(e[1]), r = (e[2] || "ms").toLowerCase();
1102
- switch (r) {
1103
- case"years":
1104
- case"year":
1105
- case"y":
1106
- return n * u;
1107
- case"days":
1108
- case"day":
1109
- case"d":
1110
- return n * p;
1111
- case"hours":
1112
- case"hour":
1113
- case"h":
1114
- return n * c;
1115
- case"minutes":
1116
- case"minute":
1117
- case"m":
1118
- return n * a;
1119
- case"seconds":
1120
- case"second":
1121
- case"s":
1122
- return n * s;
1123
- case"ms":
1124
- return n
1125
- }
1126
- }
1127
- }
1128
-
1129
- function r(t) {
1130
- return t >= p ? Math.round(t / p) + "d" : t >= c ? Math.round(t / c) + "h" : t >= a ? Math.round(t / a) + "m" : t >= s ? Math.round(t / s) + "s" : t + "ms"
1131
- }
1132
-
1133
- function o(t) {
1134
- return i(t, p, "day") || i(t, c, "hour") || i(t, a, "minute") || i(t, s, "second") || t + " ms"
1135
- }
1136
-
1137
- function i(t, e, n) {
1138
- return e > t ? void 0 : 1.5 * e > t ? Math.floor(t / e) + " " + n : Math.ceil(t / e) + " " + n + "s"
1139
- }
1140
-
1141
- var s = 1e3, a = 60 * s, c = 60 * a, p = 24 * c, u = 365.25 * p;
1142
- e.exports = function (t, e) {
1143
- return e = e || {}, "string" == typeof t ? n(t) : e.long ? o(t) : r(t)
1144
- }
1145
- }, {}],
1146
- 25: [function (t, e, n) {
1147
- (function (e) {
1148
- function r(t, e) {
1149
- var r = "b" + n.packets[t.type] + t.data.data;
1150
- return e(r)
1151
- }
1152
-
1153
- function o(t, e, r) {
1154
- if (!e) return n.encodeBase64Packet(t, r);
1155
- var o = t.data, i = new Uint8Array(o), s = new Uint8Array(1 + o.byteLength);
1156
- s[0] = m[t.type];
1157
- for (var a = 0; a < i.length; a++) s[a + 1] = i[a];
1158
- return r(s.buffer)
1159
- }
1160
-
1161
- function i(t, e, r) {
1162
- if (!e) return n.encodeBase64Packet(t, r);
1163
- var o = new FileReader;
1164
- return o.onload = function () {
1165
- t.data = o.result, n.encodePacket(t, e, !0, r)
1166
- }, o.readAsArrayBuffer(t.data)
1167
- }
1168
-
1169
- function s(t, e, r) {
1170
- if (!e) return n.encodeBase64Packet(t, r);
1171
- if (g) return i(t, e, r);
1172
- var o = new Uint8Array(1);
1173
- o[0] = m[t.type];
1174
- var s = new w([o.buffer, t.data]);
1175
- return r(s)
1176
- }
1177
-
1178
- function a(t, e, n) {
1179
- for (var r = new Array(t.length), o = h(t.length, n), i = function (t, n, o) {
1180
- e(n, function (e, n) {
1181
- r[t] = n, o(e, r)
1182
- })
1183
- }, s = 0; s < t.length; s++) i(s, t[s], o)
1184
- }
1185
-
1186
- var c = t("./keys"), p = t("has-binary"), u = t("arraybuffer.slice"), f = t("base64-arraybuffer"),
1187
- h = t("after"), l = t("utf8"), d = navigator.userAgent.match(/Android/i),
1188
- y = /PhantomJS/i.test(navigator.userAgent), g = d || y;
1189
- n.protocol = 3;
1190
- var m = n.packets = {open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6}, v = c(m),
1191
- b = {type: "error", data: "parser error"}, w = t("blob");
1192
- n.encodePacket = function (t, n, i, a) {
1193
- "function" == typeof n && (a = n, n = !1), "function" == typeof i && (a = i, i = null);
1194
- var c = void 0 === t.data ? void 0 : t.data.buffer || t.data;
1195
- if (e.ArrayBuffer && c instanceof ArrayBuffer) return o(t, n, a);
1196
- if (w && c instanceof e.Blob) return s(t, n, a);
1197
- if (c && c.base64) return r(t, a);
1198
- var p = m[t.type];
1199
- return void 0 !== t.data && (p += i ? l.encode(String(t.data)) : String(t.data)), a("" + p)
1200
- }, n.encodeBase64Packet = function (t, r) {
1201
- var o = "b" + n.packets[t.type];
1202
- if (w && t.data instanceof w) {
1203
- var i = new FileReader;
1204
- return i.onload = function () {
1205
- var t = i.result.split(",")[1];
1206
- r(o + t)
1207
- }, i.readAsDataURL(t.data)
1208
- }
1209
- var s;
1210
- try {
1211
- s = String.fromCharCode.apply(null, new Uint8Array(t.data))
1212
- } catch (a) {
1213
- for (var c = new Uint8Array(t.data), p = new Array(c.length), u = 0; u < c.length; u++) p[u] = c[u];
1214
- s = String.fromCharCode.apply(null, p)
1215
- }
1216
- return o += e.btoa(s), r(o)
1217
- }, n.decodePacket = function (t, e, r) {
1218
- if ("string" == typeof t || void 0 === t) {
1219
- if ("b" == t.charAt(0)) return n.decodeBase64Packet(t.substr(1), e);
1220
- if (r) try {
1221
- t = l.decode(t)
1222
- } catch (o) {
1223
- return b
1224
- }
1225
- var i = t.charAt(0);
1226
- return Number(i) == i && v[i] ? t.length > 1 ? {
1227
- type: v[i],
1228
- data: t.substring(1)
1229
- } : {type: v[i]} : b
1230
- }
1231
- var s = new Uint8Array(t), i = s[0], a = u(t, 1);
1232
- return w && "blob" === e && (a = new w([a])), {type: v[i], data: a}
1233
- }, n.decodeBase64Packet = function (t, n) {
1234
- var r = v[t.charAt(0)];
1235
- if (!e.ArrayBuffer) return {type: r, data: {base64: !0, data: t.substr(1)}};
1236
- var o = f.decode(t.substr(1));
1237
- return "blob" === n && w && (o = new w([o])), {type: r, data: o}
1238
- }, n.encodePayload = function (t, e, r) {
1239
- function o(t) {
1240
- return t.length + ":" + t
1241
- }
1242
-
1243
- function i(t, r) {
1244
- n.encodePacket(t, s ? e : !1, !0, function (t) {
1245
- r(null, o(t))
1246
- })
1247
- }
1248
-
1249
- "function" == typeof e && (r = e, e = null);
1250
- var s = p(t);
1251
- return e && s ? w && !g ? n.encodePayloadAsBlob(t, r) : n.encodePayloadAsArrayBuffer(t, r) : t.length ? void a(t, i, function (t, e) {
1252
- return r(e.join(""))
1253
- }) : r("0:")
1254
- }, n.decodePayload = function (t, e, r) {
1255
- if ("string" != typeof t) return n.decodePayloadAsBinary(t, e, r);
1256
- "function" == typeof e && (r = e, e = null);
1257
- var o;
1258
- if ("" == t) return r(b, 0, 1);
1259
- for (var i, s, a = "", c = 0, p = t.length; p > c; c++) {
1260
- var u = t.charAt(c);
1261
- if (":" != u) a += u; else {
1262
- if ("" == a || a != (i = Number(a))) return r(b, 0, 1);
1263
- if (s = t.substr(c + 1, i), a != s.length) return r(b, 0, 1);
1264
- if (s.length) {
1265
- if (o = n.decodePacket(s, e, !0), b.type == o.type && b.data == o.data) return r(b, 0, 1);
1266
- var f = r(o, c + i, p);
1267
- if (!1 === f) return
1268
- }
1269
- c += i, a = ""
1270
- }
1271
- }
1272
- return "" != a ? r(b, 0, 1) : void 0
1273
- }, n.encodePayloadAsArrayBuffer = function (t, e) {
1274
- function r(t, e) {
1275
- n.encodePacket(t, !0, !0, function (t) {
1276
- return e(null, t)
1277
- })
1278
- }
1279
-
1280
- return t.length ? void a(t, r, function (t, n) {
1281
- var r = n.reduce(function (t, e) {
1282
- var n;
1283
- return n = "string" == typeof e ? e.length : e.byteLength, t + n.toString().length + n + 2
1284
- }, 0), o = new Uint8Array(r), i = 0;
1285
- return n.forEach(function (t) {
1286
- var e = "string" == typeof t, n = t;
1287
- if (e) {
1288
- for (var r = new Uint8Array(t.length), s = 0; s < t.length; s++) r[s] = t.charCodeAt(s);
1289
- n = r.buffer
1290
- }
1291
- o[i++] = e ? 0 : 1;
1292
- for (var a = n.byteLength.toString(), s = 0; s < a.length; s++) o[i++] = parseInt(a[s]);
1293
- o[i++] = 255;
1294
- for (var r = new Uint8Array(n), s = 0; s < r.length; s++) o[i++] = r[s]
1295
- }), e(o.buffer)
1296
- }) : e(new ArrayBuffer(0))
1297
- }, n.encodePayloadAsBlob = function (t, e) {
1298
- function r(t, e) {
1299
- n.encodePacket(t, !0, !0, function (t) {
1300
- var n = new Uint8Array(1);
1301
- if (n[0] = 1, "string" == typeof t) {
1302
- for (var r = new Uint8Array(t.length), o = 0; o < t.length; o++) r[o] = t.charCodeAt(o);
1303
- t = r.buffer, n[0] = 0
1304
- }
1305
- for (var i = t instanceof ArrayBuffer ? t.byteLength : t.size, s = i.toString(), a = new Uint8Array(s.length + 1), o = 0; o < s.length; o++) a[o] = parseInt(s[o]);
1306
- if (a[s.length] = 255, w) {
1307
- var c = new w([n.buffer, a.buffer, t]);
1308
- e(null, c)
1309
- }
1310
- })
1311
- }
1312
-
1313
- a(t, r, function (t, n) {
1314
- return e(new w(n))
1315
- })
1316
- }, n.decodePayloadAsBinary = function (t, e, r) {
1317
- "function" == typeof e && (r = e, e = null);
1318
- for (var o = t, i = [], s = !1; o.byteLength > 0;) {
1319
- for (var a = new Uint8Array(o), c = 0 === a[0], p = "", f = 1; 255 != a[f]; f++) {
1320
- if (p.length > 310) {
1321
- s = !0;
1322
- break
1323
- }
1324
- p += a[f]
1325
- }
1326
- if (s) return r(b, 0, 1);
1327
- o = u(o, 2 + p.length), p = parseInt(p);
1328
- var h = u(o, 0, p);
1329
- if (c) try {
1330
- h = String.fromCharCode.apply(null, new Uint8Array(h))
1331
- } catch (l) {
1332
- var d = new Uint8Array(h);
1333
- h = "";
1334
- for (var f = 0; f < d.length; f++) h += String.fromCharCode(d[f])
1335
- }
1336
- i.push(h), o = u(o, p)
1337
- }
1338
- var y = i.length;
1339
- i.forEach(function (t, o) {
1340
- r(n.decodePacket(t, e, !0), o, y)
1341
- })
1342
- }
1343
- }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
1344
- }, {
1345
- "./keys": 26,
1346
- after: 27,
1347
- "arraybuffer.slice": 28,
1348
- "base64-arraybuffer": 29,
1349
- blob: 30,
1350
- "has-binary": 36,
1351
- utf8: 31
1352
- }],
1353
- 26: [function (t, e) {
1354
- e.exports = Object.keys || function (t) {
1355
- var e = [], n = Object.prototype.hasOwnProperty;
1356
- for (var r in t) n.call(t, r) && e.push(r);
1357
- return e
1358
- }
1359
- }, {}],
1360
- 27: [function (t, e) {
1361
- function n(t, e, n) {
1362
- function o(t, r) {
1363
- if (o.count <= 0) throw new Error("after called too many times");
1364
- --o.count, t ? (i = !0, e(t), e = n) : 0 !== o.count || i || e(null, r)
1365
- }
1366
-
1367
- var i = !1;
1368
- return n = n || r, o.count = t, 0 === t ? e() : o
1369
- }
1370
-
1371
- function r() {
1372
- }
1373
-
1374
- e.exports = n
1375
- }, {}],
1376
- 28: [function (t, e) {
1377
- e.exports = function (t, e, n) {
1378
- var r = t.byteLength;
1379
- if (e = e || 0, n = n || r, t.slice) return t.slice(e, n);
1380
- if (0 > e && (e += r), 0 > n && (n += r), n > r && (n = r), e >= r || e >= n || 0 === r) return new ArrayBuffer(0);
1381
- for (var o = new Uint8Array(t), i = new Uint8Array(n - e), s = e, a = 0; n > s; s++, a++) i[a] = o[s];
1382
- return i.buffer
1383
- }
1384
- }, {}],
1385
- 29: [function (t, e, n) {
1386
- !function (t) {
1387
- "use strict";
1388
- n.encode = function (e) {
1389
- var n, r = new Uint8Array(e), o = r.length, i = "";
1390
- for (n = 0; o > n; n += 3) i += t[r[n] >> 2], i += t[(3 & r[n]) << 4 | r[n + 1] >> 4], i += t[(15 & r[n + 1]) << 2 | r[n + 2] >> 6], i += t[63 & r[n + 2]];
1391
- return o % 3 === 2 ? i = i.substring(0, i.length - 1) + "=" : o % 3 === 1 && (i = i.substring(0, i.length - 2) + "=="), i
1392
- }, n.decode = function (e) {
1393
- var n, r, o, i, s, a = .75 * e.length, c = e.length, p = 0;
1394
- "=" === e[e.length - 1] && (a--, "=" === e[e.length - 2] && a--);
1395
- var u = new ArrayBuffer(a), f = new Uint8Array(u);
1396
- for (n = 0; c > n; n += 4) r = t.indexOf(e[n]), o = t.indexOf(e[n + 1]), i = t.indexOf(e[n + 2]), s = t.indexOf(e[n + 3]), f[p++] = r << 2 | o >> 4, f[p++] = (15 & o) << 4 | i >> 2, f[p++] = (3 & i) << 6 | 63 & s;
1397
- return u
1398
- }
1399
- }("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")
1400
- }, {}],
1401
- 30: [function (t, e) {
1402
- (function (t) {
1403
- function n(t) {
1404
- for (var e = 0; e < t.length; e++) {
1405
- var n = t[e];
1406
- if (n.buffer instanceof ArrayBuffer) {
1407
- var r = n.buffer;
1408
- if (n.byteLength !== r.byteLength) {
1409
- var o = new Uint8Array(n.byteLength);
1410
- o.set(new Uint8Array(r, n.byteOffset, n.byteLength)), r = o.buffer
1411
- }
1412
- t[e] = r
1413
- }
1414
- }
1415
- }
1416
-
1417
- function r(t, e) {
1418
- e = e || {};
1419
- var r = new i;
1420
- n(t);
1421
- for (var o = 0; o < t.length; o++) r.append(t[o]);
1422
- return e.type ? r.getBlob(e.type) : r.getBlob()
1423
- }
1424
-
1425
- function o(t, e) {
1426
- return n(t), new Blob(t, e || {})
1427
- }
1428
-
1429
- var i = t.BlobBuilder || t.WebKitBlobBuilder || t.MSBlobBuilder || t.MozBlobBuilder, s = function () {
1430
- try {
1431
- var t = new Blob(["hi"]);
1432
- return 2 === t.size
1433
- } catch (e) {
1434
- return !1
1435
- }
1436
- }(), a = s && function () {
1437
- try {
1438
- var t = new Blob([new Uint8Array([1, 2])]);
1439
- return 2 === t.size
1440
- } catch (e) {
1441
- return !1
1442
- }
1443
- }(), c = i && i.prototype.append && i.prototype.getBlob;
1444
- e.exports = function () {
1445
- return s ? a ? t.Blob : o : c ? r : void 0
1446
- }()
1447
- }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
1448
- }, {}],
1449
- 31: [function (e, n, r) {
1450
- (function (e) {
1451
- !function (o) {
1452
- function i(t) {
1453
- for (var e, n, r = [], o = 0, i = t.length; i > o;) e = t.charCodeAt(o++), e >= 55296 && 56319 >= e && i > o ? (n = t.charCodeAt(o++), 56320 == (64512 & n) ? r.push(((1023 & e) << 10) + (1023 & n) + 65536) : (r.push(e), o--)) : r.push(e);
1454
- return r
1455
- }
1456
-
1457
- function s(t) {
1458
- for (var e, n = t.length, r = -1, o = ""; ++r < n;) e = t[r], e > 65535 && (e -= 65536, o += w(e >>> 10 & 1023 | 55296), e = 56320 | 1023 & e), o += w(e);
1459
- return o
1460
- }
1461
-
1462
- function a(t) {
1463
- if (t >= 55296 && 57343 >= t) throw Error("Lone surrogate U+" + t.toString(16).toUpperCase() + " is not a scalar value")
1464
- }
1465
-
1466
- function c(t, e) {
1467
- return w(t >> e & 63 | 128)
1468
- }
1469
-
1470
- function p(t) {
1471
- if (0 == (4294967168 & t)) return w(t);
1472
- var e = "";
1473
- return 0 == (4294965248 & t) ? e = w(t >> 6 & 31 | 192) : 0 == (4294901760 & t) ? (a(t), e = w(t >> 12 & 15 | 224), e += c(t, 6)) : 0 == (4292870144 & t) && (e = w(t >> 18 & 7 | 240), e += c(t, 12), e += c(t, 6)), e += w(63 & t | 128)
1474
- }
1475
-
1476
- function u(t) {
1477
- for (var e, n = i(t), r = n.length, o = -1, s = ""; ++o < r;) e = n[o], s += p(e);
1478
- return s
1479
- }
1480
-
1481
- function f() {
1482
- if (b >= v) throw Error("Invalid byte index");
1483
- var t = 255 & m[b];
1484
- if (b++, 128 == (192 & t)) return 63 & t;
1485
- throw Error("Invalid continuation byte")
1486
- }
1487
-
1488
- function h() {
1489
- var t, e, n, r, o;
1490
- if (b > v) throw Error("Invalid byte index");
1491
- if (b == v) return !1;
1492
- if (t = 255 & m[b], b++, 0 == (128 & t)) return t;
1493
- if (192 == (224 & t)) {
1494
- var e = f();
1495
- if (o = (31 & t) << 6 | e, o >= 128) return o;
1496
- throw Error("Invalid continuation byte")
1497
- }
1498
- if (224 == (240 & t)) {
1499
- if (e = f(), n = f(), o = (15 & t) << 12 | e << 6 | n, o >= 2048) return a(o), o;
1500
- throw Error("Invalid continuation byte")
1501
- }
1502
- if (240 == (248 & t) && (e = f(), n = f(), r = f(), o = (15 & t) << 18 | e << 12 | n << 6 | r, o >= 65536 && 1114111 >= o)) return o;
1503
- throw Error("Invalid UTF-8 detected")
1504
- }
1505
-
1506
- function l(t) {
1507
- m = i(t), v = m.length, b = 0;
1508
- for (var e, n = []; (e = h()) !== !1;) n.push(e);
1509
- return s(n)
1510
- }
1511
-
1512
- var d = "object" == typeof r && r, y = "object" == typeof n && n && n.exports == d && n,
1513
- g = "object" == typeof e && e;
1514
- (g.global === g || g.window === g) && (o = g);
1515
- var m, v, b, w = String.fromCharCode, k = {version: "2.0.0", encode: u, decode: l};
1516
- if ("function" == typeof t && "object" == typeof t.amd && t.amd) t(function () {
1517
- return k
1518
- }); else if (d && !d.nodeType) if (y) y.exports = k; else {
1519
- var x = {}, A = x.hasOwnProperty;
1520
- for (var B in k) A.call(k, B) && (d[B] = k[B])
1521
- } else o.utf8 = k
1522
- }(this)
1523
- }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
1524
- }, {}],
1525
- 32: [function (t, e) {
1526
- (function (t) {
1527
- var n = /^[\],:{}\s]*$/, r = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
1528
- o = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, i = /(?:^|:|,)(?:\s*\[)+/g,
1529
- s = /^\s+/, a = /\s+$/;
1530
- e.exports = function (e) {
1531
- return "string" == typeof e && e ? (e = e.replace(s, "").replace(a, ""), t.JSON && JSON.parse ? JSON.parse(e) : n.test(e.replace(r, "@").replace(o, "]").replace(i, "")) ? new Function("return " + e)() : void 0) : null
1532
- }
1533
- }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
1534
- }, {}],
1535
- 33: [function (t, e, n) {
1536
- n.encode = function (t) {
1537
- var e = "";
1538
- for (var n in t) t.hasOwnProperty(n) && (e.length && (e += "&"), e += encodeURIComponent(n) + "=" + encodeURIComponent(t[n]));
1539
- return e
1540
- }, n.decode = function (t) {
1541
- for (var e = {}, n = t.split("&"), r = 0, o = n.length; o > r; r++) {
1542
- var i = n[r].split("=");
1543
- e[decodeURIComponent(i[0])] = decodeURIComponent(i[1])
1544
- }
1545
- return e
1546
- }
1547
- }, {}],
1548
- 34: [function (t, e) {
1549
- var n = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,
1550
- r = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"];
1551
- e.exports = function (t) {
1552
- var e = t, o = t.indexOf("["), i = t.indexOf("]");
1553
- -1 != o && -1 != i && (t = t.substring(0, o) + t.substring(o, i).replace(/:/g, ";") + t.substring(i, t.length));
1554
- for (var s = n.exec(t || ""), a = {}, c = 14; c--;) a[r[c]] = s[c] || "";
1555
- return -1 != o && -1 != i && (a.source = e, a.host = a.host.substring(1, a.host.length - 1).replace(/;/g, ":"), a.authority = a.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), a.ipv6uri = !0), a
1556
- }
1557
- }, {}],
1558
- 35: [function (t, e) {
1559
- function n(t, e) {
1560
- var n;
1561
- return n = e ? new o(t, e) : new o(t)
1562
- }
1563
-
1564
- var r = function () {
1565
- return self
1566
- }(), o = r.WebSocket || r.MozWebSocket;
1567
- e.exports = o ? n : null, o && (n.prototype = o.prototype)
1568
- }, {}],
1569
- 36: [function (t, e) {
1570
- (function (n) {
1571
- function r(t) {
1572
- function e(t) {
1573
- if (!t) return !1;
1574
- if (n.Buffer && n.Buffer.isBuffer(t) || n.ArrayBuffer && t instanceof ArrayBuffer || n.Blob && t instanceof Blob || n.File && t instanceof File) return !0;
1575
- if (o(t)) {
1576
- for (var r = 0; r < t.length; r++) if (e(t[r])) return !0
1577
- } else if (t && "object" == typeof t) {
1578
- t.toJSON && (t = t.toJSON());
1579
- for (var i in t) if (Object.prototype.hasOwnProperty.call(t, i) && e(t[i])) return !0
1580
- }
1581
- return !1
1582
- }
1583
-
1584
- return e(t)
1585
- }
1586
-
1587
- var o = t("isarray");
1588
- e.exports = r
1589
- }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
1590
- }, {isarray: 37}],
1591
- 37: [function (t, e) {
1592
- e.exports = Array.isArray || function (t) {
1593
- return "[object Array]" == Object.prototype.toString.call(t)
1594
- }
1595
- }, {}],
1596
- 38: [function (t, e) {
1597
- var n = t("global");
1598
- try {
1599
- e.exports = "XMLHttpRequest" in n && "withCredentials" in new n.XMLHttpRequest
1600
- } catch (r) {
1601
- e.exports = !1
1602
- }
1603
- }, {global: 39}],
1604
- 39: [function (t, e) {
1605
- e.exports = function () {
1606
- return this
1607
- }()
1608
- }, {}],
1609
- 40: [function (t, e) {
1610
- var n = [].indexOf;
1611
- e.exports = function (t, e) {
1612
- if (n) return t.indexOf(e);
1613
- for (var r = 0; r < t.length; ++r) if (t[r] === e) return r;
1614
- return -1
1615
- }
1616
- }, {}],
1617
- 41: [function (t, e, n) {
1618
- var r = Object.prototype.hasOwnProperty;
1619
- n.keys = Object.keys || function (t) {
1620
- var e = [];
1621
- for (var n in t) r.call(t, n) && e.push(n);
1622
- return e
1623
- }, n.values = function (t) {
1624
- var e = [];
1625
- for (var n in t) r.call(t, n) && e.push(t[n]);
1626
- return e
1627
- }, n.merge = function (t, e) {
1628
- for (var n in e) r.call(e, n) && (t[n] = e[n]);
1629
- return t
1630
- }, n.length = function (t) {
1631
- return n.keys(t).length
1632
- }, n.isEmpty = function (t) {
1633
- return 0 == n.length(t)
1634
- }
1635
- }, {}],
1636
- 42: [function (t, e) {
1637
- var n = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,
1638
- r = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"];
1639
- e.exports = function (t) {
1640
- for (var e = n.exec(t || ""), o = {}, i = 14; i--;) o[r[i]] = e[i] || "";
1641
- return o
1642
- }
1643
- }, {}],
1644
- 43: [function (t, e, n) {
1645
- (function (e) {
1646
- var r = t("isarray"), o = t("./is-buffer");
1647
- n.deconstructPacket = function (t) {
1648
- function e(t) {
1649
- if (!t) return t;
1650
- if (o(t)) {
1651
- var i = {_placeholder: !0, num: n.length};
1652
- return n.push(t), i
1653
- }
1654
- if (r(t)) {
1655
- for (var s = new Array(t.length), a = 0; a < t.length; a++) s[a] = e(t[a]);
1656
- return s
1657
- }
1658
- if ("object" == typeof t && !(t instanceof Date)) {
1659
- var s = {};
1660
- for (var c in t) s[c] = e(t[c]);
1661
- return s
1662
- }
1663
- return t
1664
- }
1665
-
1666
- var n = [], i = t.data, s = t;
1667
- return s.data = e(i), s.attachments = n.length, {packet: s, buffers: n}
1668
- }, n.reconstructPacket = function (t, e) {
1669
- function n(t) {
1670
- if (t && t._placeholder) {
1671
- var o = e[t.num];
1672
- return o
1673
- }
1674
- if (r(t)) {
1675
- for (var i = 0; i < t.length; i++) t[i] = n(t[i]);
1676
- return t
1677
- }
1678
- if (t && "object" == typeof t) {
1679
- for (var s in t) t[s] = n(t[s]);
1680
- return t
1681
- }
1682
- return t
1683
- }
1684
-
1685
- return t.data = n(t.data), t.attachments = void 0, t
1686
- }, n.removeBlobs = function (t, n) {
1687
- function i(t, c, p) {
1688
- if (!t) return t;
1689
- if (e.Blob && t instanceof Blob || e.File && t instanceof File) {
1690
- s++;
1691
- var u = new FileReader;
1692
- u.onload = function () {
1693
- p ? p[c] = this.result : a = this.result, --s || n(a)
1694
- }, u.readAsArrayBuffer(t)
1695
- } else if (r(t)) for (var f = 0; f < t.length; f++) i(t[f], f, t); else if (t && "object" == typeof t && !o(t)) for (var h in t) i(t[h], h, t)
1696
- }
1697
-
1698
- var s = 0, a = t;
1699
- i(a), s || n(a)
1700
- }
1701
- }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
1702
- }, {"./is-buffer": 45, isarray: 46}],
1703
- 44: [function (t, e, n) {
1704
- function r() {
1705
- }
1706
-
1707
- function o(t) {
1708
- var e = "", r = !1;
1709
- return e += t.type, (n.BINARY_EVENT == t.type || n.BINARY_ACK == t.type) && (e += t.attachments, e += "-"), t.nsp && "/" != t.nsp && (r = !0, e += t.nsp), null != t.id && (r && (e += ",", r = !1), e += t.id), null != t.data && (r && (e += ","), e += f.stringify(t.data)), u("encoded %j as %s", t, e), e
1710
- }
1711
-
1712
- function i(t, e) {
1713
- function n(t) {
1714
- var n = l.deconstructPacket(t), r = o(n.packet), i = n.buffers;
1715
- i.unshift(r), e(i)
1716
- }
1717
-
1718
- l.removeBlobs(t, n)
1719
- }
1720
-
1721
- function s() {
1722
- this.reconstructor = null
1723
- }
1724
-
1725
- function a(t) {
1726
- var e = {}, r = 0;
1727
- if (e.type = Number(t.charAt(0)), null == n.types[e.type]) return p();
1728
- if (n.BINARY_EVENT == e.type || n.BINARY_ACK == e.type) {
1729
- for (var o = ""; "-" != t.charAt(++r) && (o += t.charAt(r), r != t.length);) ;
1730
- if (o != Number(o) || "-" != t.charAt(r)) throw new Error("Illegal attachments");
1731
- e.attachments = Number(o)
1732
- }
1733
- if ("/" == t.charAt(r + 1)) for (e.nsp = ""; ++r;) {
1734
- var i = t.charAt(r);
1735
- if ("," == i) break;
1736
- if (e.nsp += i, r == t.length) break
1737
- } else e.nsp = "/";
1738
- var s = t.charAt(r + 1);
1739
- if ("" !== s && Number(s) == s) {
1740
- for (e.id = ""; ++r;) {
1741
- var i = t.charAt(r);
1742
- if (null == i || Number(i) != i) {
1743
- --r;
1744
- break
1745
- }
1746
- if (e.id += t.charAt(r), r == t.length) break
1747
- }
1748
- e.id = Number(e.id)
1749
- }
1750
- if (t.charAt(++r)) try {
1751
- e.data = f.parse(t.substr(r))
1752
- } catch (a) {
1753
- return p()
1754
- }
1755
- return u("decoded %s as %j", t, e), e
1756
- }
1757
-
1758
- function c(t) {
1759
- this.reconPack = t, this.buffers = []
1760
- }
1761
-
1762
- function p() {
1763
- return {type: n.ERROR, data: "parser error"}
1764
- }
1765
-
1766
- var u = t("debug")("socket.io-parser"), f = t("json3"), h = (t("isarray"), t("component-emitter")),
1767
- l = t("./binary"), d = t("./is-buffer");
1768
- n.protocol = 4, n.types = ["CONNECT", "DISCONNECT", "EVENT", "BINARY_EVENT", "ACK", "BINARY_ACK", "ERROR"], n.CONNECT = 0, n.DISCONNECT = 1, n.EVENT = 2, n.ACK = 3, n.ERROR = 4, n.BINARY_EVENT = 5, n.BINARY_ACK = 6, n.Encoder = r, n.Decoder = s, r.prototype.encode = function (t, e) {
1769
- if (u("encoding packet %j", t), n.BINARY_EVENT == t.type || n.BINARY_ACK == t.type) i(t, e); else {
1770
- var r = o(t);
1771
- e([r])
1772
- }
1773
- }, h(s.prototype), s.prototype.add = function (t) {
1774
- var e;
1775
- if ("string" == typeof t) e = a(t), n.BINARY_EVENT == e.type || n.BINARY_ACK == e.type ? (this.reconstructor = new c(e), 0 === this.reconstructor.reconPack.attachments && this.emit("decoded", e)) : this.emit("decoded", e); else {
1776
- if (!d(t) && !t.base64) throw new Error("Unknown type: " + t);
1777
- if (!this.reconstructor) throw new Error("got binary data when not reconstructing a packet");
1778
- e = this.reconstructor.takeBinaryData(t), e && (this.reconstructor = null, this.emit("decoded", e))
1779
- }
1780
- }, s.prototype.destroy = function () {
1781
- this.reconstructor && this.reconstructor.finishedReconstruction()
1782
- }, c.prototype.takeBinaryData = function (t) {
1783
- if (this.buffers.push(t), this.buffers.length == this.reconPack.attachments) {
1784
- var e = l.reconstructPacket(this.reconPack, this.buffers);
1785
- return this.finishedReconstruction(), e
1786
- }
1787
- return null
1788
- }, c.prototype.finishedReconstruction = function () {
1789
- this.reconPack = null, this.buffers = []
1790
- }
1791
- }, {"./binary": 43, "./is-buffer": 45, "component-emitter": 9, debug: 10, isarray: 46, json3: 47}],
1792
- 45: [function (t, e) {
1793
- (function (t) {
1794
- function n(e) {
1795
- return t.Buffer && t.Buffer.isBuffer(e) || t.ArrayBuffer && e instanceof ArrayBuffer
1796
- }
1797
-
1798
- e.exports = n
1799
- }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
1800
- }, {}],
1801
- 46: [function (t, e) {
1802
- e.exports = t(37)
1803
- }, {}],
1804
- 47: [function (e, n, r) {
1805
- !function (e) {
1806
- function n(t) {
1807
- if (n[t] !== s) return n[t];
1808
- var e;
1809
- if ("bug-string-char-index" == t) e = "a" != "a"[0]; else if ("json" == t) e = n("json-stringify") && n("json-parse"); else {
1810
- var r, o = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
1811
- if ("json-stringify" == t) {
1812
- var i = u.stringify, c = "function" == typeof i && f;
1813
- if (c) {
1814
- (r = function () {
1815
- return 1
1816
- }).toJSON = r;
1817
- try {
1818
- c = "0" === i(0) && "0" === i(new Number) && '""' == i(new String) && i(a) === s && i(s) === s && i() === s && "1" === i(r) && "[1]" == i([r]) && "[null]" == i([s]) && "null" == i(null) && "[null,null,null]" == i([s, a, null]) && i({a: [r, !0, !1, null, "\x00\b\n\f\r "]}) == o && "1" === i(null, r) && "[\n 1,\n 2\n]" == i([1, 2], null, 1) && '"-271821-04-20T00:00:00.000Z"' == i(new Date(-864e13)) && '"+275760-09-13T00:00:00.000Z"' == i(new Date(864e13)) && '"-000001-01-01T00:00:00.000Z"' == i(new Date(-621987552e5)) && '"1969-12-31T23:59:59.999Z"' == i(new Date(-1))
1819
- } catch (p) {
1820
- c = !1
1821
- }
1822
- }
1823
- e = c
1824
- }
1825
- if ("json-parse" == t) {
1826
- var h = u.parse;
1827
- if ("function" == typeof h) try {
1828
- if (0 === h("0") && !h(!1)) {
1829
- r = h(o);
1830
- var l = 5 == r.a.length && 1 === r.a[0];
1831
- if (l) {
1832
- try {
1833
- l = !h('" "')
1834
- } catch (p) {
1835
- }
1836
- if (l) try {
1837
- l = 1 !== h("01")
1838
- } catch (p) {
1839
- }
1840
- if (l) try {
1841
- l = 1 !== h("1.")
1842
- } catch (p) {
1843
- }
1844
- }
1845
- }
1846
- } catch (p) {
1847
- l = !1
1848
- }
1849
- e = l
1850
- }
1851
- }
1852
- return n[t] = !!e
1853
- }
1854
-
1855
- var o, i, s, a = {}.toString, c = "function" == typeof t && t.amd, p = "object" == typeof JSON && JSON,
1856
- u = "object" == typeof r && r && !r.nodeType && r;
1857
- u && p ? (u.stringify = p.stringify, u.parse = p.parse) : u = e.JSON = p || {};
1858
- var f = new Date(-0xc782b5b800cec);
1859
- try {
1860
- f = -109252 == f.getUTCFullYear() && 0 === f.getUTCMonth() && 1 === f.getUTCDate() && 10 == f.getUTCHours() && 37 == f.getUTCMinutes() && 6 == f.getUTCSeconds() && 708 == f.getUTCMilliseconds()
1861
- } catch (h) {
1862
- }
1863
- if (!n("json")) {
1864
- var l = "[object Function]", d = "[object Date]", y = "[object Number]", g = "[object String]",
1865
- m = "[object Array]", v = "[object Boolean]", b = n("bug-string-char-index");
1866
- if (!f) var w = Math.floor, k = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],
1867
- x = function (t, e) {
1868
- return k[e] + 365 * (t - 1970) + w((t - 1969 + (e = +(e > 1))) / 4) - w((t - 1901 + e) / 100) + w((t - 1601 + e) / 400)
1869
- };
1870
- (o = {}.hasOwnProperty) || (o = function (t) {
1871
- var e, n = {};
1872
- return (n.__proto__ = null, n.__proto__ = {toString: 1}, n).toString != a ? o = function (t) {
1873
- var e = this.__proto__, n = t in (this.__proto__ = null, this);
1874
- return this.__proto__ = e, n
1875
- } : (e = n.constructor, o = function (t) {
1876
- var n = (this.constructor || e).prototype;
1877
- return t in this && !(t in n && this[t] === n[t])
1878
- }), n = null, o.call(this, t)
1879
- });
1880
- var A = {"boolean": 1, number: 1, string: 1, undefined: 1}, B = function (t, e) {
1881
- var n = typeof t[e];
1882
- return "object" == n ? !!t[e] : !A[n]
1883
- };
1884
- if (i = function (t, e) {
1885
- var n, r, s, c = 0;
1886
- (n = function () {
1887
- this.valueOf = 0
1888
- }).prototype.valueOf = 0, r = new n;
1889
- for (s in r) o.call(r, s) && c++;
1890
- return n = r = null, c ? i = 2 == c ? function (t, e) {
1891
- var n, r = {}, i = a.call(t) == l;
1892
- for (n in t) i && "prototype" == n || o.call(r, n) || !(r[n] = 1) || !o.call(t, n) || e(n)
1893
- } : function (t, e) {
1894
- var n, r, i = a.call(t) == l;
1895
- for (n in t) i && "prototype" == n || !o.call(t, n) || (r = "constructor" === n) || e(n);
1896
- (r || o.call(t, n = "constructor")) && e(n)
1897
- } : (r = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"], i = function (t, e) {
1898
- var n, i, s = a.call(t) == l,
1899
- c = !s && "function" != typeof t.constructor && B(t, "hasOwnProperty") ? t.hasOwnProperty : o;
1900
- for (n in t) s && "prototype" == n || !c.call(t, n) || e(n);
1901
- for (i = r.length; n = r[--i]; c.call(t, n) && e(n)) ;
1902
- }), i(t, e)
1903
- }, !n("json-stringify")) {
1904
- var C = {92: "\\\\", 34: '\\"', 8: "\\b", 12: "\\f", 10: "\\n", 13: "\\r", 9: "\\t"},
1905
- S = "000000", E = function (t, e) {
1906
- return (S + (e || 0)).slice(-t)
1907
- }, T = "\\u00", j = function (t) {
1908
- var e, n = '"', r = 0, o = t.length, i = o > 10 && b;
1909
- for (i && (e = t.split("")); o > r; r++) {
1910
- var s = t.charCodeAt(r);
1911
- switch (s) {
1912
- case 8:
1913
- case 9:
1914
- case 10:
1915
- case 12:
1916
- case 13:
1917
- case 34:
1918
- case 92:
1919
- n += C[s];
1920
- break;
1921
- default:
1922
- if (32 > s) {
1923
- n += T + E(2, s.toString(16));
1924
- break
1925
- }
1926
- n += i ? e[r] : b ? t.charAt(r) : t[r]
1927
- }
1928
- }
1929
- return n + '"'
1930
- }, _ = function (t, e, n, r, c, p, u) {
1931
- var f, h, l, b, k, A, B, C, S, T, P, R, N, O, U, q;
1932
- try {
1933
- f = e[t]
1934
- } catch (D) {
1935
- }
1936
- if ("object" == typeof f && f) if (h = a.call(f), h != d || o.call(f, "toJSON")) "function" == typeof f.toJSON && (h != y && h != g && h != m || o.call(f, "toJSON")) && (f = f.toJSON(t)); else if (f > -1 / 0 && 1 / 0 > f) {
1937
- if (x) {
1938
- for (k = w(f / 864e5), l = w(k / 365.2425) + 1970 - 1; x(l + 1, 0) <= k; l++) ;
1939
- for (b = w((k - x(l, 0)) / 30.42); x(l, b + 1) <= k; b++) ;
1940
- k = 1 + k - x(l, b), A = (f % 864e5 + 864e5) % 864e5, B = w(A / 36e5) % 24, C = w(A / 6e4) % 60, S = w(A / 1e3) % 60, T = A % 1e3
1941
- } else l = f.getUTCFullYear(), b = f.getUTCMonth(), k = f.getUTCDate(), B = f.getUTCHours(), C = f.getUTCMinutes(), S = f.getUTCSeconds(), T = f.getUTCMilliseconds();
1942
- f = (0 >= l || l >= 1e4 ? (0 > l ? "-" : "+") + E(6, 0 > l ? -l : l) : E(4, l)) + "-" + E(2, b + 1) + "-" + E(2, k) + "T" + E(2, B) + ":" + E(2, C) + ":" + E(2, S) + "." + E(3, T) + "Z"
1943
- } else f = null;
1944
- if (n && (f = n.call(e, t, f)), null === f) return "null";
1945
- if (h = a.call(f), h == v) return "" + f;
1946
- if (h == y) return f > -1 / 0 && 1 / 0 > f ? "" + f : "null";
1947
- if (h == g) return j("" + f);
1948
- if ("object" == typeof f) {
1949
- for (O = u.length; O--;) if (u[O] === f) throw TypeError();
1950
- if (u.push(f), P = [], U = p, p += c, h == m) {
1951
- for (N = 0, O = f.length; O > N; N++) R = _(N, f, n, r, c, p, u), P.push(R === s ? "null" : R);
1952
- q = P.length ? c ? "[\n" + p + P.join(",\n" + p) + "\n" + U + "]" : "[" + P.join(",") + "]" : "[]"
1953
- } else i(r || f, function (t) {
1954
- var e = _(t, f, n, r, c, p, u);
1955
- e !== s && P.push(j(t) + ":" + (c ? " " : "") + e)
1956
- }), q = P.length ? c ? "{\n" + p + P.join(",\n" + p) + "\n" + U + "}" : "{" + P.join(",") + "}" : "{}";
1957
- return u.pop(), q
1958
- }
1959
- };
1960
- u.stringify = function (t, e, n) {
1961
- var r, o, i, s;
1962
- if ("function" == typeof e || "object" == typeof e && e) if ((s = a.call(e)) == l) o = e; else if (s == m) {
1963
- i = {};
1964
- for (var c, p = 0, u = e.length; u > p; c = e[p++], s = a.call(c), (s == g || s == y) && (i[c] = 1)) ;
1965
- }
1966
- if (n) if ((s = a.call(n)) == y) {
1967
- if ((n -= n % 1) > 0) for (r = "", n > 10 && (n = 10); r.length < n; r += " ") ;
1968
- } else s == g && (r = n.length <= 10 ? n : n.slice(0, 10));
1969
- return _("", (c = {}, c[""] = t, c), o, i, r, "", [])
1970
- }
1971
- }
1972
- if (!n("json-parse")) {
1973
- var P, R, N = String.fromCharCode,
1974
- O = {92: "\\", 34: '"', 47: "/", 98: "\b", 116: " ", 110: "\n", 102: "\f", 114: "\r"},
1975
- U = function () {
1976
- throw P = R = null, SyntaxError()
1977
- }, q = function () {
1978
- for (var t, e, n, r, o, i = R, s = i.length; s > P;) switch (o = i.charCodeAt(P)) {
1979
- case 9:
1980
- case 10:
1981
- case 13:
1982
- case 32:
1983
- P++;
1984
- break;
1985
- case 123:
1986
- case 125:
1987
- case 91:
1988
- case 93:
1989
- case 58:
1990
- case 44:
1991
- return t = b ? i.charAt(P) : i[P], P++, t;
1992
- case 34:
1993
- for (t = "@", P++; s > P;) if (o = i.charCodeAt(P), 32 > o) U(); else if (92 == o) switch (o = i.charCodeAt(++P)) {
1994
- case 92:
1995
- case 34:
1996
- case 47:
1997
- case 98:
1998
- case 116:
1999
- case 110:
2000
- case 102:
2001
- case 114:
2002
- t += O[o], P++;
2003
- break;
2004
- case 117:
2005
- for (e = ++P, n = P + 4; n > P; P++) o = i.charCodeAt(P), o >= 48 && 57 >= o || o >= 97 && 102 >= o || o >= 65 && 70 >= o || U();
2006
- t += N("0x" + i.slice(e, P));
2007
- break;
2008
- default:
2009
- U()
2010
- } else {
2011
- if (34 == o) break;
2012
- for (o = i.charCodeAt(P), e = P; o >= 32 && 92 != o && 34 != o;) o = i.charCodeAt(++P);
2013
- t += i.slice(e, P)
2014
- }
2015
- if (34 == i.charCodeAt(P)) return P++, t;
2016
- U();
2017
- default:
2018
- if (e = P, 45 == o && (r = !0, o = i.charCodeAt(++P)), o >= 48 && 57 >= o) {
2019
- for (48 == o && (o = i.charCodeAt(P + 1), o >= 48 && 57 >= o) && U(), r = !1; s > P && (o = i.charCodeAt(P), o >= 48 && 57 >= o); P++) ;
2020
- if (46 == i.charCodeAt(P)) {
2021
- for (n = ++P; s > n && (o = i.charCodeAt(n), o >= 48 && 57 >= o); n++) ;
2022
- n == P && U(), P = n
2023
- }
2024
- if (o = i.charCodeAt(P), 101 == o || 69 == o) {
2025
- for (o = i.charCodeAt(++P), (43 == o || 45 == o) && P++, n = P; s > n && (o = i.charCodeAt(n), o >= 48 && 57 >= o); n++) ;
2026
- n == P && U(), P = n
2027
- }
2028
- return +i.slice(e, P)
2029
- }
2030
- if (r && U(), "true" == i.slice(P, P + 4)) return P += 4, !0;
2031
- if ("false" == i.slice(P, P + 5)) return P += 5, !1;
2032
- if ("null" == i.slice(P, P + 4)) return P += 4, null;
2033
- U()
2034
- }
2035
- return "$"
2036
- }, D = function (t) {
2037
- var e, n;
2038
- if ("$" == t && U(), "string" == typeof t) {
2039
- if ("@" == (b ? t.charAt(0) : t[0])) return t.slice(1);
2040
- if ("[" == t) {
2041
- for (e = []; t = q(), "]" != t; n || (n = !0)) n && ("," == t ? (t = q(), "]" == t && U()) : U()), "," == t && U(), e.push(D(t));
2042
- return e
2043
- }
2044
- if ("{" == t) {
2045
- for (e = {}; t = q(), "}" != t; n || (n = !0)) n && ("," == t ? (t = q(), "}" == t && U()) : U()), ("," == t || "string" != typeof t || "@" != (b ? t.charAt(0) : t[0]) || ":" != q()) && U(), e[t.slice(1)] = D(q());
2046
- return e
2047
- }
2048
- U()
2049
- }
2050
- return t
2051
- }, I = function (t, e, n) {
2052
- var r = L(t, e, n);
2053
- r === s ? delete t[e] : t[e] = r
2054
- }, L = function (t, e, n) {
2055
- var r, o = t[e];
2056
- if ("object" == typeof o && o) if (a.call(o) == m) for (r = o.length; r--;) I(o, r, n); else i(o, function (t) {
2057
- I(o, t, n)
2058
- });
2059
- return n.call(t, e, o)
2060
- };
2061
- u.parse = function (t, e) {
2062
- var n, r;
2063
- return P = 0, R = "" + t, n = D(q()), "$" != q() && U(), P = R = null, e && a.call(e) == l ? L((r = {}, r[""] = n, r), "", e) : n
2064
- }
2065
- }
2066
- }
2067
- c && t(function () {
2068
- return u
2069
- })
2070
- }(this)
2071
- }, {}],
2072
- 48: [function (t, e) {
2073
- function n(t, e) {
2074
- var n = [];
2075
- e = e || 0;
2076
- for (var r = e || 0; r < t.length; r++) n[r - e] = t[r];
2077
- return n
2078
- }
2079
-
2080
- e.exports = n
2081
- }, {}]
2082
- }, {}, [1])(1)
2083
- }