liveroom-client-element 0.0.8 → 0.0.9

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.
@@ -1,7 +1,7 @@
1
1
  var je = Object.defineProperty;
2
2
  var xe = (s, n, t) => n in s ? je(s, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[n] = t;
3
3
  var f = (s, n, t) => (xe(s, typeof n != "symbol" ? n + "" : n, t), t);
4
- function ut() {
4
+ function pt() {
5
5
  }
6
6
  function oe(s) {
7
7
  return s();
@@ -9,7 +9,7 @@ function oe(s) {
9
9
  function Zt() {
10
10
  return /* @__PURE__ */ Object.create(null);
11
11
  }
12
- function dt(s) {
12
+ function gt(s) {
13
13
  s.forEach(oe);
14
14
  }
15
15
  function ae(s) {
@@ -21,13 +21,13 @@ function Se(s, n) {
21
21
  function Me(s) {
22
22
  return Object.keys(s).length === 0;
23
23
  }
24
- function W(s, n) {
24
+ function F(s, n) {
25
25
  s.appendChild(n);
26
26
  }
27
27
  function Le(s, n, t) {
28
28
  const e = Ne(s);
29
29
  if (!e.getElementById(n)) {
30
- const r = Q("style");
30
+ const r = Z("style");
31
31
  r.id = n, r.textContent = t, Re(e, r);
32
32
  }
33
33
  }
@@ -42,7 +42,7 @@ function Ne(s) {
42
42
  ) : s.ownerDocument;
43
43
  }
44
44
  function Re(s, n) {
45
- return W(
45
+ return F(
46
46
  /** @type {Document} */
47
47
  s.head || s,
48
48
  n
@@ -51,10 +51,10 @@ function Re(s, n) {
51
51
  function Ct(s, n, t) {
52
52
  s.insertBefore(n, t || null);
53
53
  }
54
- function gt(s) {
54
+ function vt(s) {
55
55
  s.parentNode && s.parentNode.removeChild(s);
56
56
  }
57
- function Q(s) {
57
+ function Z(s) {
58
58
  return document.createElement(s);
59
59
  }
60
60
  function Qt(s) {
@@ -88,14 +88,14 @@ function Ie(s) {
88
88
  }
89
89
  ), n;
90
90
  }
91
- let pt;
91
+ let ft;
92
92
  function ht(s) {
93
- pt = s;
93
+ ft = s;
94
94
  }
95
95
  function ce() {
96
- if (!pt)
96
+ if (!ft)
97
97
  throw new Error("Function called outside component initialization");
98
- return pt;
98
+ return ft;
99
99
  }
100
100
  function De(s) {
101
101
  ce().$$.on_mount.push(s);
@@ -105,25 +105,25 @@ function Ue(s) {
105
105
  }
106
106
  const rt = [], Mt = [];
107
107
  let it = [];
108
- const Kt = [], ze = /* @__PURE__ */ Promise.resolve();
108
+ const Kt = [], Je = /* @__PURE__ */ Promise.resolve();
109
109
  let Lt = !1;
110
- function Je() {
111
- Lt || (Lt = !0, ze.then(bt));
110
+ function Ve() {
111
+ Lt || (Lt = !0, Je.then(ct));
112
112
  }
113
113
  function Nt(s) {
114
114
  it.push(s);
115
115
  }
116
116
  const xt = /* @__PURE__ */ new Set();
117
117
  let nt = 0;
118
- function bt() {
118
+ function ct() {
119
119
  if (nt !== 0)
120
120
  return;
121
- const s = pt;
121
+ const s = ft;
122
122
  do {
123
123
  try {
124
124
  for (; nt < rt.length; ) {
125
125
  const n = rt[nt];
126
- nt++, ht(n), Ve(n.$$);
126
+ nt++, ht(n), Be(n.$$);
127
127
  }
128
128
  } catch (n) {
129
129
  throw rt.length = 0, nt = 0, n;
@@ -140,14 +140,14 @@ function bt() {
140
140
  Kt.pop()();
141
141
  Lt = !1, xt.clear(), ht(s);
142
142
  }
143
- function Ve(s) {
143
+ function Be(s) {
144
144
  if (s.fragment !== null) {
145
- s.update(), dt(s.before_update);
145
+ s.update(), gt(s.before_update);
146
146
  const n = s.dirty;
147
147
  s.dirty = [-1], s.fragment && s.fragment.p(s.ctx, n), s.after_update.forEach(Nt);
148
148
  }
149
149
  }
150
- function Be(s) {
150
+ function ze(s) {
151
151
  const n = [], t = [];
152
152
  it.forEach((e) => s.indexOf(e) === -1 ? n.push(e) : t.push(e)), t.forEach((e) => e()), it = n;
153
153
  }
@@ -161,56 +161,56 @@ function te(s) {
161
161
  function We(s, n) {
162
162
  s.d(1), n.delete(s.key);
163
163
  }
164
- function Ge(s, n, t, e, r, i, o, h, p, d, b, _) {
165
- let A = s.length, T = i.length, j = A;
164
+ function Ge(s, n, t, e, r, i, a, h, l, d, _, b) {
165
+ let T = s.length, O = i.length, x = T;
166
166
  const R = {};
167
- for (; j--; )
168
- R[s[j].key] = j;
169
- const M = [], X = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new Map(), k = [];
170
- for (j = T; j--; ) {
171
- const x = _(r, i, j), z = t(x);
172
- let J = o.get(z);
173
- J ? e && k.push(() => J.p(x, n)) : (J = d(z, x), J.c()), X.set(z, M[j] = J), z in R && Z.set(z, Math.abs(j - R[z]));
174
- }
175
- const B = /* @__PURE__ */ new Set(), U = /* @__PURE__ */ new Set();
176
- function q(x) {
177
- le(x, 1), x.m(h, b), o.set(x.key, x), b = x.first, T--;
178
- }
179
- for (; A && T; ) {
180
- const x = M[T - 1], z = s[A - 1], J = x.key, K = z.key;
181
- x === z ? (b = x.first, A--, T--) : X.has(K) ? !o.has(J) || B.has(J) ? q(x) : U.has(K) ? A-- : Z.get(J) > Z.get(K) ? (U.add(J), q(x)) : (B.add(K), A--) : (p(z, o), A--);
182
- }
183
- for (; A--; ) {
184
- const x = s[A];
185
- X.has(x.key) || p(x, o);
186
- }
187
- for (; T; )
188
- q(M[T - 1]);
189
- return dt(k), M;
167
+ for (; x--; )
168
+ R[s[x].key] = x;
169
+ const M = [], G = /* @__PURE__ */ new Map(), X = /* @__PURE__ */ new Map(), Y = [];
170
+ for (x = O; x--; ) {
171
+ const A = b(r, i, x), P = t(A);
172
+ let D = a.get(P);
173
+ D ? e && Y.push(() => D.p(A, n)) : (D = d(P, A), D.c()), G.set(P, M[x] = D), P in R && X.set(P, Math.abs(x - R[P]));
174
+ }
175
+ const Q = /* @__PURE__ */ new Set(), k = /* @__PURE__ */ new Set();
176
+ function V(A) {
177
+ le(A, 1), A.m(h, _), a.set(A.key, A), _ = A.first, O--;
178
+ }
179
+ for (; T && O; ) {
180
+ const A = M[O - 1], P = s[T - 1], D = A.key, K = P.key;
181
+ A === P ? (_ = A.first, T--, O--) : G.has(K) ? !a.has(D) || Q.has(D) ? V(A) : k.has(K) ? T-- : X.get(D) > X.get(K) ? (k.add(D), V(A)) : (Q.add(K), T--) : (l(P, a), T--);
182
+ }
183
+ for (; T--; ) {
184
+ const A = s[T];
185
+ G.has(A.key) || l(A, a);
186
+ }
187
+ for (; O; )
188
+ V(M[O - 1]);
189
+ return gt(Y), M;
190
190
  }
191
191
  function Xe(s, n, t) {
192
192
  const { fragment: e, after_update: r } = s.$$;
193
193
  e && e.m(n, t), Nt(() => {
194
194
  const i = s.$$.on_mount.map(oe).filter(ae);
195
- s.$$.on_destroy ? s.$$.on_destroy.push(...i) : dt(i), s.$$.on_mount = [];
195
+ s.$$.on_destroy ? s.$$.on_destroy.push(...i) : gt(i), s.$$.on_mount = [];
196
196
  }), r.forEach(Nt);
197
197
  }
198
198
  function qe(s, n) {
199
199
  const t = s.$$;
200
- t.fragment !== null && (Be(t.after_update), dt(t.on_destroy), t.fragment && t.fragment.d(n), t.on_destroy = t.fragment = null, t.ctx = []);
200
+ t.fragment !== null && (ze(t.after_update), gt(t.on_destroy), t.fragment && t.fragment.d(n), t.on_destroy = t.fragment = null, t.ctx = []);
201
201
  }
202
202
  function Ye(s, n) {
203
- s.$$.dirty[0] === -1 && (rt.push(s), Je(), s.$$.dirty.fill(0)), s.$$.dirty[n / 31 | 0] |= 1 << n % 31;
203
+ s.$$.dirty[0] === -1 && (rt.push(s), Ve(), s.$$.dirty.fill(0)), s.$$.dirty[n / 31 | 0] |= 1 << n % 31;
204
204
  }
205
- function Ze(s, n, t, e, r, i, o, h = [-1]) {
206
- const p = pt;
205
+ function Ze(s, n, t, e, r, i, a, h = [-1]) {
206
+ const l = ft;
207
207
  ht(s);
208
208
  const d = s.$$ = {
209
209
  fragment: null,
210
210
  ctx: [],
211
211
  // state
212
212
  props: i,
213
- update: ut,
213
+ update: pt,
214
214
  not_equal: r,
215
215
  bound: Zt(),
216
216
  // lifecycle
@@ -219,27 +219,27 @@ function Ze(s, n, t, e, r, i, o, h = [-1]) {
219
219
  on_disconnect: [],
220
220
  before_update: [],
221
221
  after_update: [],
222
- context: new Map(n.context || (p ? p.$$.context : [])),
222
+ context: new Map(n.context || (l ? l.$$.context : [])),
223
223
  // everything else
224
224
  callbacks: Zt(),
225
225
  dirty: h,
226
226
  skip_bound: !1,
227
- root: n.target || p.$$.root
227
+ root: n.target || l.$$.root
228
228
  };
229
- o && o(d.root);
230
- let b = !1;
231
- if (d.ctx = t ? t(s, n.props || {}, (_, A, ...T) => {
232
- const j = T.length ? T[0] : A;
233
- return d.ctx && r(d.ctx[_], d.ctx[_] = j) && (!d.skip_bound && d.bound[_] && d.bound[_](j), b && Ye(s, _)), A;
234
- }) : [], d.update(), b = !0, dt(d.before_update), d.fragment = e ? e(d.ctx) : !1, n.target) {
229
+ a && a(d.root);
230
+ let _ = !1;
231
+ if (d.ctx = t ? t(s, n.props || {}, (b, T, ...O) => {
232
+ const x = O.length ? O[0] : T;
233
+ return d.ctx && r(d.ctx[b], d.ctx[b] = x) && (!d.skip_bound && d.bound[b] && d.bound[b](x), _ && Ye(s, b)), T;
234
+ }) : [], d.update(), _ = !0, gt(d.before_update), d.fragment = e ? e(d.ctx) : !1, n.target) {
235
235
  if (n.hydrate) {
236
- const _ = He(n.target);
237
- d.fragment && d.fragment.l(_), _.forEach(gt);
236
+ const b = He(n.target);
237
+ d.fragment && d.fragment.l(b), b.forEach(vt);
238
238
  } else
239
239
  d.fragment && d.fragment.c();
240
- n.intro && le(s.$$.fragment), Xe(s, n.target, n.anchor), bt();
240
+ n.intro && le(s.$$.fragment), Xe(s, n.target, n.anchor), ct();
241
241
  }
242
- ht(p);
242
+ ht(l);
243
243
  }
244
244
  let ue;
245
245
  typeof HTMLElement == "function" && (ue = class extends HTMLElement {
@@ -282,20 +282,20 @@ typeof HTMLElement == "function" && (ue = class extends HTMLElement {
282
282
  if (this.$$cn = !0, !this.$$c) {
283
283
  let n = function(i) {
284
284
  return () => {
285
- let o;
285
+ let a;
286
286
  return {
287
287
  c: function() {
288
- o = Q("slot"), i !== "default" && S(o, "name", i);
288
+ a = Z("slot"), i !== "default" && S(a, "name", i);
289
289
  },
290
290
  /**
291
291
  * @param {HTMLElement} target
292
292
  * @param {HTMLElement} [anchor]
293
293
  */
294
- m: function(d, b) {
295
- Ct(d, o, b);
294
+ m: function(d, _) {
295
+ Ct(d, a, _);
296
296
  },
297
297
  d: function(d) {
298
- d && gt(o);
298
+ d && vt(a);
299
299
  }
300
300
  };
301
301
  };
@@ -306,8 +306,8 @@ typeof HTMLElement == "function" && (ue = class extends HTMLElement {
306
306
  for (const i of this.$$s)
307
307
  i in e && (t[i] = [n(i)]);
308
308
  for (const i of this.attributes) {
309
- const o = this.$$g_p(i.name);
310
- o in this.$$d || (this.$$d[o] = wt(o, i.value, this.$$p_d, "toProp"));
309
+ const a = this.$$g_p(i.name);
310
+ a in this.$$d || (this.$$d[a] = _t(a, i.value, this.$$p_d, "toProp"));
311
311
  }
312
312
  this.$$c = new this.$$ctor({
313
313
  target: this.shadowRoot || this,
@@ -323,21 +323,21 @@ typeof HTMLElement == "function" && (ue = class extends HTMLElement {
323
323
  this.$$r = !0;
324
324
  for (const i in this.$$p_d)
325
325
  if (this.$$d[i] = this.$$c.$$.ctx[this.$$c.$$.props[i]], this.$$p_d[i].reflect) {
326
- const o = wt(
326
+ const a = _t(
327
327
  i,
328
328
  this.$$d[i],
329
329
  this.$$p_d,
330
330
  "toAttribute"
331
331
  );
332
- o == null ? this.removeAttribute(i) : this.setAttribute(this.$$p_d[i].attribute || i, o);
332
+ a == null ? this.removeAttribute(i) : this.setAttribute(this.$$p_d[i].attribute || i, a);
333
333
  }
334
334
  this.$$r = !1;
335
335
  };
336
336
  this.$$c.$$.after_update.push(r), r();
337
337
  for (const i in this.$$l)
338
- for (const o of this.$$l[i]) {
339
- const h = this.$$c.$on(i, o);
340
- this.$$l_u.set(o, h);
338
+ for (const a of this.$$l[i]) {
339
+ const h = this.$$c.$on(i, a);
340
+ this.$$l_u.set(a, h);
341
341
  }
342
342
  this.$$l = {};
343
343
  }
@@ -346,7 +346,7 @@ typeof HTMLElement == "function" && (ue = class extends HTMLElement {
346
346
  // and setting attributes through setAttribute etc, this is helpful
347
347
  attributeChangedCallback(n, t, e) {
348
348
  var r;
349
- this.$$r || (n = this.$$g_p(n), this.$$d[n] = wt(n, e, this.$$p_d, "toProp"), (r = this.$$c) == null || r.$set({ [n]: this.$$d[n] }));
349
+ this.$$r || (n = this.$$g_p(n), this.$$d[n] = _t(n, e, this.$$p_d, "toProp"), (r = this.$$c) == null || r.$set({ [n]: this.$$d[n] }));
350
350
  }
351
351
  disconnectedCallback() {
352
352
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -359,7 +359,7 @@ typeof HTMLElement == "function" && (ue = class extends HTMLElement {
359
359
  ) || n;
360
360
  }
361
361
  });
362
- function wt(s, n, t, e) {
362
+ function _t(s, n, t, e) {
363
363
  var i;
364
364
  const r = (i = t[s]) == null ? void 0 : i.type;
365
365
  if (n = r === "Boolean" && typeof n != "boolean" ? n != null : n, !e || !t[s])
@@ -390,7 +390,7 @@ function wt(s, n, t, e) {
390
390
  }
391
391
  }
392
392
  function Qe(s, n, t, e, r, i) {
393
- let o = class extends ue {
393
+ let a = class extends ue {
394
394
  constructor() {
395
395
  super(s, t, r), this.$$p_d = n;
396
396
  }
@@ -401,24 +401,24 @@ function Qe(s, n, t, e, r, i) {
401
401
  }
402
402
  };
403
403
  return Object.keys(n).forEach((h) => {
404
- Object.defineProperty(o.prototype, h, {
404
+ Object.defineProperty(a.prototype, h, {
405
405
  get() {
406
406
  return this.$$c && h in this.$$c ? this.$$c[h] : this.$$d[h];
407
407
  },
408
- set(p) {
408
+ set(l) {
409
409
  var d;
410
- p = wt(h, p, n), this.$$d[h] = p, (d = this.$$c) == null || d.$set({ [h]: p });
410
+ l = _t(h, l, n), this.$$d[h] = l, (d = this.$$c) == null || d.$set({ [h]: l });
411
411
  }
412
412
  });
413
413
  }), e.forEach((h) => {
414
- Object.defineProperty(o.prototype, h, {
414
+ Object.defineProperty(a.prototype, h, {
415
415
  get() {
416
- var p;
417
- return (p = this.$$c) == null ? void 0 : p[h];
416
+ var l;
417
+ return (l = this.$$c) == null ? void 0 : l[h];
418
418
  }
419
419
  });
420
- }), i && (o = i(o)), s.element = /** @type {any} */
421
- o, o;
420
+ }), i && (a = i(a)), s.element = /** @type {any} */
421
+ a, a;
422
422
  }
423
423
  class Ke {
424
424
  constructor() {
@@ -441,7 +441,7 @@ class Ke {
441
441
  }
442
442
  /** @returns {void} */
443
443
  $destroy() {
444
- qe(this, 1), this.$destroy = ut;
444
+ qe(this, 1), this.$destroy = pt;
445
445
  }
446
446
  /**
447
447
  * @template {Extract<keyof Events, string>} K
@@ -451,7 +451,7 @@ class Ke {
451
451
  */
452
452
  $on(n, t) {
453
453
  if (!ae(t))
454
- return ut;
454
+ return pt;
455
455
  const e = this.$$.callbacks[n] || (this.$$.callbacks[n] = []);
456
456
  return e.push(t), () => {
457
457
  const r = e.indexOf(t);
@@ -468,25 +468,25 @@ class Ke {
468
468
  }
469
469
  const ts = "4";
470
470
  typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(ts);
471
- const { isArray: es } = Array, ss = Object.keys, ft = (s) => {
471
+ const { isArray: es } = Array, ss = Object.keys, dt = (s) => {
472
472
  if (!s)
473
473
  return s;
474
474
  if (es(s)) {
475
475
  const n = [], t = s.length;
476
476
  for (let e = 0; e < t; e++)
477
- n.push(ft(s[e]));
477
+ n.push(dt(s[e]));
478
478
  return n;
479
479
  } else if (typeof s == "object") {
480
480
  const n = ss(s), t = n.length, e = {};
481
481
  for (let r = 0; r < t; r++) {
482
482
  const i = n[r];
483
- e[i] = ft(s[i]);
483
+ e[i] = dt(s[i]);
484
484
  }
485
485
  return e;
486
486
  }
487
487
  return s;
488
488
  };
489
- class D {
489
+ class J {
490
490
  constructor(n) {
491
491
  f(this, "path");
492
492
  f(this, "from");
@@ -510,21 +510,21 @@ const w = (s) => typeof s == "string" ? cs(s) : s, ls = (s) => !s.length, us = O
510
510
  function ps(s, n) {
511
511
  return us.call(s, n);
512
512
  }
513
- const { isArray: pe } = Array, O = (s, n) => {
513
+ const { isArray: pe } = Array, j = (s, n) => {
514
514
  const t = n.length;
515
515
  if (!t)
516
516
  return { val: s };
517
517
  let e, r;
518
- for (let o = 0; o < t; o++)
519
- if (e = s, r = n[o], pe(e)) {
518
+ for (let a = 0; a < t; a++)
519
+ if (e = s, r = n[a], pe(e)) {
520
520
  const h = e.length;
521
521
  if (r === "-")
522
522
  r = h;
523
523
  else if (typeof r == "string") {
524
- const p = ~~r;
525
- if ("" + p !== r)
524
+ const l = ~~r;
525
+ if ("" + l !== r)
526
526
  throw new Error("INVALID_INDEX");
527
- if (r = p, r < 0)
527
+ if (r = l, r < 0)
528
528
  throw new Error("INVALID_INDEX");
529
529
  }
530
530
  s = e[r];
@@ -533,8 +533,8 @@ const { isArray: pe } = Array, O = (s, n) => {
533
533
  else
534
534
  throw new Error("NOT_FOUND");
535
535
  return { val: s, obj: e, key: r };
536
- }, vt = (s) => pe(s.obj) && typeof s.key == "number", kt = (s) => typeof s.obj == "object" && typeof s.key == "string";
537
- class It extends D {
536
+ }, yt = (s) => pe(s.obj) && typeof s.key == "number", kt = (s) => typeof s.obj == "object" && typeof s.key == "string";
537
+ class It extends J {
538
538
  constructor(t, e) {
539
539
  super(t);
540
540
  f(this, "value");
@@ -547,19 +547,19 @@ class It extends D {
547
547
  return 0;
548
548
  }
549
549
  apply(t) {
550
- const { val: e, key: r, obj: i } = O(t, this.path), o = ft(this.value);
550
+ const { val: e, key: r, obj: i } = j(t, this.path), a = dt(this.value);
551
551
  if (!i)
552
- t = o;
552
+ t = a;
553
553
  else if (typeof r == "string")
554
- i[r] = o;
554
+ i[r] = a;
555
555
  else {
556
556
  const h = i.length;
557
557
  if (r < h)
558
- i.splice(r, 0, o);
558
+ i.splice(r, 0, a);
559
559
  else {
560
560
  if (r > h)
561
561
  throw new Error("INVALID_INDEX");
562
- i.push(o);
562
+ i.push(a);
563
563
  }
564
564
  }
565
565
  return { doc: t, old: e };
@@ -578,7 +578,7 @@ class It extends D {
578
578
  t.encodeArrayHeader(3), t.writer.u8(0), t.encodeArray(this.path), t.encodeAny(this.value);
579
579
  }
580
580
  }
581
- class fe extends D {
581
+ class fe extends J {
582
582
  constructor(t, e) {
583
583
  super(t);
584
584
  f(this, "oldValue");
@@ -591,10 +591,10 @@ class fe extends D {
591
591
  return 1;
592
592
  }
593
593
  apply(t) {
594
- const e = O(t, this.path);
594
+ const e = j(t, this.path);
595
595
  if (e.val === void 0)
596
596
  throw new Error("NOT_FOUND");
597
- return kt(e) ? delete e.obj[e.key] : vt(e) ? e.val !== void 0 && e.obj.splice(e.key, 1) : t = null, { doc: t, old: e.val };
597
+ return kt(e) ? delete e.obj[e.key] : yt(e) ? e.val !== void 0 && e.obj.splice(e.key, 1) : t = null, { doc: t, old: e.val };
598
598
  }
599
599
  toJson(t) {
600
600
  const e = {
@@ -612,7 +612,7 @@ class fe extends D {
612
612
  t.encodeArrayHeader(r ? 3 : 2), t.writer.u8(1), t.encodeArray(this.path), r && t.encodeAny(this.oldValue);
613
613
  }
614
614
  }
615
- class fs extends D {
615
+ class fs extends J {
616
616
  constructor(t, e, r) {
617
617
  super(t);
618
618
  f(this, "value");
@@ -626,10 +626,10 @@ class fs extends D {
626
626
  return 2;
627
627
  }
628
628
  apply(t) {
629
- const e = O(t, this.path);
629
+ const e = j(t, this.path);
630
630
  if (e.val === void 0)
631
631
  throw new Error("NOT_FOUND");
632
- return kt(e) ? e.obj[e.key] = this.value : vt(e) ? e.obj[e.key] = this.value : t = this.value, { doc: t, old: e.val };
632
+ return kt(e) ? e.obj[e.key] = this.value : yt(e) ? e.obj[e.key] = this.value : t = this.value, { doc: t, old: e.val };
633
633
  }
634
634
  toJson(t) {
635
635
  const e = {
@@ -648,7 +648,7 @@ class fs extends D {
648
648
  t.encodeArrayHeader(r ? 4 : 3), t.writer.u8(2), t.encodeArray(this.path), t.encodeAny(this.value), r && t.encodeAny(this.oldValue);
649
649
  }
650
650
  }
651
- class ds extends D {
651
+ class ds extends J {
652
652
  constructor(t, e) {
653
653
  super(t);
654
654
  f(this, "from");
@@ -678,7 +678,7 @@ class ds extends D {
678
678
  t.encodeArrayHeader(3), t.writer.u8(4), t.encodeArray(this.path), t.encodeArray(this.from);
679
679
  }
680
680
  }
681
- class gs extends D {
681
+ class gs extends J {
682
682
  constructor(t, e) {
683
683
  super(t);
684
684
  f(this, "from");
@@ -691,10 +691,10 @@ class gs extends D {
691
691
  return 3;
692
692
  }
693
693
  apply(t) {
694
- const { val: e } = O(t, this.from);
694
+ const { val: e } = j(t, this.from);
695
695
  if (e === void 0)
696
696
  throw new Error("NOT_FOUND");
697
- return new It(this.path, ft(e)).apply(t);
697
+ return new It(this.path, dt(e)).apply(t);
698
698
  }
699
699
  toJson(t) {
700
700
  return {
@@ -710,7 +710,7 @@ class gs extends D {
710
710
  t.encodeArrayHeader(3), t.writer.u8(3), t.encodeArray(this.path), t.encodeArray(this.from);
711
711
  }
712
712
  }
713
- class P extends D {
713
+ class I extends J {
714
714
  apply(n) {
715
715
  if (!this.test(n))
716
716
  throw new Error("TEST");
@@ -743,7 +743,7 @@ const Et = (s, n) => {
743
743
  }
744
744
  return !1;
745
745
  };
746
- class vs extends P {
746
+ class vs extends I {
747
747
  constructor(t, e, r) {
748
748
  super(t);
749
749
  f(this, "value");
@@ -757,7 +757,7 @@ class vs extends P {
757
757
  return 5;
758
758
  }
759
759
  test(t) {
760
- const { val: e } = O(t, this.path);
760
+ const { val: e } = j(t, this.path);
761
761
  if (e === void 0)
762
762
  return !!this.not;
763
763
  const r = Et(e, this.value);
@@ -779,7 +779,7 @@ class vs extends P {
779
779
  t.encodeArrayHeader(this.not ? 4 : 3), t.writer.u8(5), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeAny(this.value), this.not && t.writer.u8(1);
780
780
  }
781
781
  }
782
- class ys extends D {
782
+ class ys extends J {
783
783
  constructor(n) {
784
784
  super(n);
785
785
  }
@@ -790,7 +790,7 @@ class ys extends D {
790
790
  return 8;
791
791
  }
792
792
  apply(n) {
793
- const t = O(n, this.path);
793
+ const t = j(n, this.path);
794
794
  return t.obj ? t.obj[t.key] = !t.val : n = !t.val, { doc: n, old: t.val };
795
795
  }
796
796
  toJson(n) {
@@ -806,7 +806,7 @@ class ys extends D {
806
806
  n.encodeArrayHeader(2), n.writer.u8(8), n.encodeArray(this.path);
807
807
  }
808
808
  }
809
- class ms extends D {
809
+ class ms extends J {
810
810
  constructor(t, e) {
811
811
  super(t);
812
812
  f(this, "inc");
@@ -819,7 +819,7 @@ class ms extends D {
819
819
  return 9;
820
820
  }
821
821
  apply(t) {
822
- const e = O(t, this.path), r = this.inc + Number(e.val);
822
+ const e = j(t, this.path), r = this.inc + Number(e.val);
823
823
  return e.obj ? e.obj[e.key] = r : t = r, { doc: t, old: e.val };
824
824
  }
825
825
  toJson(t) {
@@ -836,7 +836,7 @@ class ms extends D {
836
836
  t.encodeArrayHeader(3), t.writer.u8(9), t.encodeArray(this.path), t.encodeNumber(this.inc);
837
837
  }
838
838
  }
839
- class ws extends D {
839
+ class ws extends J {
840
840
  constructor(t, e, r) {
841
841
  super(t);
842
842
  f(this, "pos");
@@ -850,15 +850,15 @@ class ws extends D {
850
850
  return 6;
851
851
  }
852
852
  apply(t) {
853
- const { val: e, key: r, obj: i } = O(t, this.path);
853
+ const { val: e, key: r, obj: i } = j(t, this.path);
854
854
  if (typeof e != "string") {
855
855
  if (e !== void 0)
856
856
  throw new Error("NOT_A_STRING");
857
857
  if (this.pos !== 0)
858
858
  throw new Error("POS");
859
859
  }
860
- const o = typeof e == "string" ? e : "", h = Math.min(this.pos, o.length), p = o.slice(0, h), d = o.slice(h), b = p + this.str + d;
861
- return i ? i[r] = b : t = b, { doc: t, old: e };
860
+ const a = typeof e == "string" ? e : "", h = Math.min(this.pos, a.length), l = a.slice(0, h), d = a.slice(h), _ = l + this.str + d;
861
+ return i ? i[r] = _ : t = _, { doc: t, old: e };
862
862
  }
863
863
  toJson(t) {
864
864
  return {
@@ -875,7 +875,7 @@ class ws extends D {
875
875
  t.encodeArrayHeader(4), t.writer.u8(6), t.encodeArray(this.path), t.encodeNumber(this.pos), t.encodeString(this.str);
876
876
  }
877
877
  }
878
- class _s extends D {
878
+ class _s extends J {
879
879
  constructor(t, e, r, i) {
880
880
  super(t);
881
881
  f(this, "pos");
@@ -893,11 +893,11 @@ class _s extends D {
893
893
  return typeof this.str == "string" ? this.str.length : this.len;
894
894
  }
895
895
  apply(t) {
896
- const { val: e, key: r, obj: i } = O(t, this.path);
896
+ const { val: e, key: r, obj: i } = j(t, this.path);
897
897
  if (typeof e != "string")
898
898
  throw new Error("NOT_A_STRING");
899
- const o = e.length, h = Math.min(this.pos, e.length), p = Math.min(h, o), d = this.str !== void 0 ? this.str.length : this.len, b = Math.min(h + d, o), _ = e.slice(0, p), A = e.substr(b), T = _ + A;
900
- return i ? i[r] = T : t = T, { doc: t, old: e };
899
+ const a = e.length, h = Math.min(this.pos, e.length), l = Math.min(h, a), d = this.str !== void 0 ? this.str.length : this.len, _ = Math.min(h + d, a), b = e.slice(0, l), T = e.substr(_), O = b + T;
900
+ return i ? i[r] = O : t = O, { doc: t, old: e };
901
901
  }
902
902
  toJson(t) {
903
903
  return typeof this.str == "string" ? {
@@ -925,7 +925,7 @@ const { isArray: bs } = Array, Rt = (s) => !!s && typeof s == "object" && typeof
925
925
  const t = new RegExp(s, n ? "i" : void 0);
926
926
  return (e) => t.test(e);
927
927
  };
928
- class $s extends D {
928
+ class $s extends J {
929
929
  constructor(t, e, r) {
930
930
  super(t);
931
931
  f(this, "pos");
@@ -939,15 +939,15 @@ class $s extends D {
939
939
  return 10;
940
940
  }
941
941
  apply(t) {
942
- const e = O(t, this.path);
942
+ const e = j(t, this.path);
943
943
  if (e.val === void 0)
944
944
  throw new Error("NOT_FOUND");
945
945
  const r = this.split(e.val);
946
- return kt(e) ? e.obj[e.key] = r : vt(e) ? (e.obj[e.key] = r[0], e.obj.splice(e.key + 1, 0, r[1])) : t = r, { doc: t, old: e.val };
946
+ return kt(e) ? e.obj[e.key] = r : yt(e) ? (e.obj[e.key] = r[0], e.obj.splice(e.key + 1, 0, r[1])) : t = r, { doc: t, old: e.val };
947
947
  }
948
948
  split(t) {
949
949
  if (typeof t == "string") {
950
- const { pos: e, props: r } = this, i = t.slice(0, e), o = t.slice(e);
950
+ const { pos: e, props: r } = this, i = t.slice(0, e), a = t.slice(e);
951
951
  return r ? [
952
952
  {
953
953
  ...r,
@@ -955,11 +955,11 @@ class $s extends D {
955
955
  },
956
956
  {
957
957
  ...r,
958
- text: o
958
+ text: a
959
959
  }
960
- ] : [i, o];
960
+ ] : [i, a];
961
961
  } else if (Rt(t)) {
962
- const { pos: e, props: r } = this, i = t.text.slice(0, e), o = t.text.slice(e);
962
+ const { pos: e, props: r } = this, i = t.text.slice(0, e), a = t.text.slice(e);
963
963
  return [
964
964
  {
965
965
  ...t,
@@ -969,11 +969,11 @@ class $s extends D {
969
969
  {
970
970
  ...t,
971
971
  ...r,
972
- text: o
972
+ text: a
973
973
  }
974
974
  ];
975
975
  } else if (Ht(t)) {
976
- const { pos: e, props: r } = this, i = t.children.slice(0, e), o = t.children.slice(e);
976
+ const { pos: e, props: r } = this, i = t.children.slice(0, e), a = t.children.slice(e);
977
977
  return [
978
978
  {
979
979
  ...t,
@@ -983,7 +983,7 @@ class $s extends D {
983
983
  {
984
984
  ...t,
985
985
  ...r,
986
- children: o
986
+ children: a
987
987
  }
988
988
  ];
989
989
  } else if (typeof t == "number") {
@@ -1008,7 +1008,7 @@ class $s extends D {
1008
1008
  t.encodeArrayHeader(this.props ? 4 : 3), t.writer.u8(10), t.encodeArray(this.path), t.encodeNumber(this.pos), this.props && t.encodeObject(this.props);
1009
1009
  }
1010
1010
  }
1011
- class Cs extends D {
1011
+ class Cs extends J {
1012
1012
  constructor(t, e, r) {
1013
1013
  super(t);
1014
1014
  f(this, "pos");
@@ -1022,13 +1022,13 @@ class Cs extends D {
1022
1022
  return 11;
1023
1023
  }
1024
1024
  apply(t) {
1025
- const e = O(t, this.path);
1026
- if (!vt(e))
1025
+ const e = j(t, this.path);
1026
+ if (!yt(e))
1027
1027
  throw new Error("INVALID_TARGET");
1028
1028
  if (e.key <= 0)
1029
1029
  throw new Error("INVALID_KEY");
1030
- const r = e.obj[e.key - 1], i = e.obj[e.key], o = this.merge(r, i);
1031
- return e.obj[e.key - 1] = o, e.obj.splice(e.key, 1), { doc: t, old: [r, i] };
1030
+ const r = e.obj[e.key - 1], i = e.obj[e.key], a = this.merge(r, i);
1031
+ return e.obj[e.key - 1] = a, e.obj.splice(e.key, 1), { doc: t, old: [r, i] };
1032
1032
  }
1033
1033
  merge(t, e) {
1034
1034
  return typeof t == "string" && typeof e == "string" || typeof t == "number" && typeof e == "number" ? t + e : Rt(t) && Rt(e) ? { ...t, ...e, text: t.text + e.text } : Ht(t) && Ht(e) ? { ...t, ...e, children: [...t.children, ...e.children] } : [t, e];
@@ -1050,7 +1050,7 @@ class Cs extends D {
1050
1050
  }
1051
1051
  }
1052
1052
  const { isArray: ks } = Array;
1053
- class As extends D {
1053
+ class As extends J {
1054
1054
  constructor(t, e, r) {
1055
1055
  super(t);
1056
1056
  f(this, "props");
@@ -1064,8 +1064,8 @@ class As extends D {
1064
1064
  return 12;
1065
1065
  }
1066
1066
  apply(t) {
1067
- const e = O(t, this.path);
1068
- return vt(e) ? e.val !== void 0 && (e.obj[e.key] = this.extend(e.val)) : kt(e) ? e.obj[e.key] = this.extend(e.val) : t = this.extend(t), { doc: t };
1067
+ const e = j(t, this.path);
1068
+ return yt(e) ? e.val !== void 0 && (e.obj[e.key] = this.extend(e.val)) : kt(e) ? e.obj[e.key] = this.extend(e.val) : t = this.extend(t), { doc: t };
1069
1069
  }
1070
1070
  extend(t) {
1071
1071
  if (ks(t) || typeof t != "object" || !t)
@@ -1098,7 +1098,7 @@ class As extends D {
1098
1098
  t.encodeArrayHeader(r ? 4 : 3), t.writer.u8(12), t.encodeArray(this.path), t.encodeObject(this.props), r && t.writer.u8(1);
1099
1099
  }
1100
1100
  }
1101
- class Ts extends P {
1101
+ class Ts extends I {
1102
1102
  constructor(n) {
1103
1103
  super(n);
1104
1104
  }
@@ -1109,7 +1109,7 @@ class Ts extends P {
1109
1109
  return 31;
1110
1110
  }
1111
1111
  test(n) {
1112
- const { val: t } = O(n, this.path);
1112
+ const { val: t } = j(n, this.path);
1113
1113
  return t !== void 0;
1114
1114
  }
1115
1115
  toJson(n) {
@@ -1125,7 +1125,7 @@ class Ts extends P {
1125
1125
  n.encodeArrayHeader(2), n.writer.u8(31), n.encodeArray(t ? this.path.slice(t.path.length) : this.path);
1126
1126
  }
1127
1127
  }
1128
- class Os extends P {
1128
+ class Os extends I {
1129
1129
  constructor(n) {
1130
1130
  super(n);
1131
1131
  }
@@ -1137,7 +1137,7 @@ class Os extends P {
1137
1137
  }
1138
1138
  test(n) {
1139
1139
  try {
1140
- const { val: t } = O(n, this.path);
1140
+ const { val: t } = j(n, this.path);
1141
1141
  return t === void 0;
1142
1142
  } catch (t) {
1143
1143
  if (t.message === "NOT_FOUND")
@@ -1159,7 +1159,7 @@ class Os extends P {
1159
1159
  }
1160
1160
  }
1161
1161
  const { isArray: js } = Array;
1162
- class xs extends P {
1162
+ class xs extends I {
1163
1163
  constructor(t, e) {
1164
1164
  super(t);
1165
1165
  f(this, "type");
@@ -1172,7 +1172,7 @@ class xs extends P {
1172
1172
  return 39;
1173
1173
  }
1174
1174
  test(t) {
1175
- const { val: e } = O(t, this.path);
1175
+ const { val: e } = j(t, this.path);
1176
1176
  return e === null ? this.type.indexOf("null") > -1 : js(e) ? this.type.indexOf("array") > -1 : this.type.indexOf(typeof e) > -1 || typeof e == "number" && e === Math.round(e) && this.type.indexOf("integer") > -1;
1177
1177
  }
1178
1178
  toJson(t) {
@@ -1189,7 +1189,7 @@ class xs extends P {
1189
1189
  t.encodeArrayHeader(3), t.writer.u8(39), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeArray(this.type);
1190
1190
  }
1191
1191
  }
1192
- class Ss extends P {
1192
+ class Ss extends I {
1193
1193
  constructor(t, e, r, i) {
1194
1194
  super(t);
1195
1195
  f(this, "pos");
@@ -1204,10 +1204,10 @@ class Ss extends P {
1204
1204
  return 40;
1205
1205
  }
1206
1206
  test(t) {
1207
- const { val: e } = O(t, this.path);
1207
+ const { val: e } = j(t, this.path);
1208
1208
  if (typeof e != "string")
1209
1209
  return !1;
1210
- const r = e.length, i = Math.min(this.pos, r), o = Math.min(this.pos + this.str.length, r), h = e.substring(i, o) === this.str;
1210
+ const r = e.length, i = Math.min(this.pos, r), a = Math.min(this.pos + this.str.length, r), h = e.substring(i, a) === this.str;
1211
1211
  return this.not ? !h : h;
1212
1212
  }
1213
1213
  toJson(t) {
@@ -1227,7 +1227,7 @@ class Ss extends P {
1227
1227
  t.encodeArrayHeader(this.not ? 5 : 4), t.writer.u8(40), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeNumber(this.pos), t.encodeString(this.str), this.not && t.writer.u8(1);
1228
1228
  }
1229
1229
  }
1230
- class Ms extends P {
1230
+ class Ms extends I {
1231
1231
  constructor(t, e, r) {
1232
1232
  super(t);
1233
1233
  f(this, "len");
@@ -1241,7 +1241,7 @@ class Ms extends P {
1241
1241
  return 41;
1242
1242
  }
1243
1243
  test(t) {
1244
- const { val: e } = O(t, this.path);
1244
+ const { val: e } = j(t, this.path);
1245
1245
  if (typeof e != "string")
1246
1246
  return !1;
1247
1247
  const i = e.length >= this.len;
@@ -1263,7 +1263,7 @@ class Ms extends P {
1263
1263
  t.encodeArrayHeader(this.not ? 4 : 3), t.writer.u8(41), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeNumber(this.len), this.not && t.writer.u8(1);
1264
1264
  }
1265
1265
  }
1266
- class Ls extends P {
1266
+ class Ls extends I {
1267
1267
  constructor(t, e, r) {
1268
1268
  super(t);
1269
1269
  f(this, "value");
@@ -1277,7 +1277,7 @@ class Ls extends P {
1277
1277
  return 30;
1278
1278
  }
1279
1279
  test(t) {
1280
- const { val: e } = O(t, this.path);
1280
+ const { val: e } = j(t, this.path);
1281
1281
  if (typeof e != "string")
1282
1282
  return !1;
1283
1283
  const r = this.ignore_case ? e.toLowerCase() : e, i = this.ignore_case ? this.value.toLowerCase() : this.value;
@@ -1300,7 +1300,7 @@ class Ls extends P {
1300
1300
  t.encodeArrayHeader(r ? 4 : 3), t.writer.u8(30), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeString(this.value), r && t.writer.u8(1);
1301
1301
  }
1302
1302
  }
1303
- class Ns extends P {
1303
+ class Ns extends I {
1304
1304
  constructor(t, e, r) {
1305
1305
  super(t);
1306
1306
  f(this, "value");
@@ -1314,7 +1314,7 @@ class Ns extends P {
1314
1314
  return 32;
1315
1315
  }
1316
1316
  test(t) {
1317
- const { val: e } = O(t, this.path);
1317
+ const { val: e } = j(t, this.path);
1318
1318
  if (typeof e != "string")
1319
1319
  return !1;
1320
1320
  const r = this.ignore_case ? e.toLowerCase() : e, i = this.ignore_case ? this.value.toLowerCase() : this.value;
@@ -1337,7 +1337,7 @@ class Ns extends P {
1337
1337
  t.encodeArrayHeader(r ? 4 : 3), t.writer.u8(32), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeString(this.value), r && t.writer.u8(1);
1338
1338
  }
1339
1339
  }
1340
- class Rs extends P {
1340
+ class Rs extends I {
1341
1341
  constructor(t, e, r) {
1342
1342
  super(t);
1343
1343
  f(this, "value");
@@ -1351,7 +1351,7 @@ class Rs extends P {
1351
1351
  return 37;
1352
1352
  }
1353
1353
  test(t) {
1354
- const { val: e } = O(t, this.path);
1354
+ const { val: e } = j(t, this.path);
1355
1355
  if (typeof e != "string")
1356
1356
  return !1;
1357
1357
  const r = this.ignore_case ? e.toLowerCase() : e, i = this.ignore_case ? this.value.toLowerCase() : this.value;
@@ -1374,7 +1374,7 @@ class Rs extends P {
1374
1374
  t.encodeArrayHeader(r ? 4 : 3), t.writer.u8(37), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeString(this.value), r && t.writer.u8(1);
1375
1375
  }
1376
1376
  }
1377
- class Hs extends P {
1377
+ class Hs extends I {
1378
1378
  constructor(t, e) {
1379
1379
  super(t);
1380
1380
  f(this, "value");
@@ -1387,7 +1387,7 @@ class Hs extends P {
1387
1387
  return 33;
1388
1388
  }
1389
1389
  test(t) {
1390
- const { val: e } = O(t, this.path);
1390
+ const { val: e } = j(t, this.path);
1391
1391
  for (const r of this.value)
1392
1392
  if (Et(e, r))
1393
1393
  return !0;
@@ -1407,7 +1407,7 @@ class Hs extends P {
1407
1407
  t.encodeArrayHeader(3), t.writer.u8(33), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeArray(this.value);
1408
1408
  }
1409
1409
  }
1410
- class Ps extends P {
1410
+ class Ps extends I {
1411
1411
  constructor(t, e) {
1412
1412
  super(t);
1413
1413
  f(this, "value");
@@ -1420,7 +1420,7 @@ class Ps extends P {
1420
1420
  return 34;
1421
1421
  }
1422
1422
  test(t) {
1423
- const { val: e } = O(t, this.path);
1423
+ const { val: e } = j(t, this.path);
1424
1424
  return typeof e != "number" ? !1 : e < this.value;
1425
1425
  }
1426
1426
  toJson(t) {
@@ -1437,7 +1437,7 @@ class Ps extends P {
1437
1437
  t.encodeArrayHeader(3), t.writer.u8(34), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeNumber(this.value);
1438
1438
  }
1439
1439
  }
1440
- class Is extends P {
1440
+ class Is extends I {
1441
1441
  constructor(t, e) {
1442
1442
  super(t);
1443
1443
  f(this, "value");
@@ -1450,7 +1450,7 @@ class Is extends P {
1450
1450
  return 36;
1451
1451
  }
1452
1452
  test(t) {
1453
- const { val: e } = O(t, this.path);
1453
+ const { val: e } = j(t, this.path);
1454
1454
  return typeof e != "number" ? !1 : e > this.value;
1455
1455
  }
1456
1456
  toJson(t) {
@@ -1467,7 +1467,7 @@ class Is extends P {
1467
1467
  t.encodeArrayHeader(3), t.writer.u8(36), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeNumber(this.value);
1468
1468
  }
1469
1469
  }
1470
- class Dt extends P {
1470
+ class Dt extends I {
1471
1471
  constructor(t, e) {
1472
1472
  super(t);
1473
1473
  f(this, "ops");
@@ -1511,8 +1511,8 @@ class Ds extends Dt {
1511
1511
  t.encodeArrayHeader(3), t.writer.u8(43), t.encodeArray(r);
1512
1512
  const i = this.ops.length;
1513
1513
  t.encodeArrayHeader(i);
1514
- for (let o = 0; o < i; o++)
1515
- this.ops[o].encode(t, this);
1514
+ for (let a = 0; a < i; a++)
1515
+ this.ops[a].encode(t, this);
1516
1516
  }
1517
1517
  }
1518
1518
  class Us extends Dt {
@@ -1555,7 +1555,7 @@ class Us extends Dt {
1555
1555
  this.ops[i].encode(t, this);
1556
1556
  }
1557
1557
  }
1558
- class zs extends Dt {
1558
+ class Js extends Dt {
1559
1559
  constructor(t, e) {
1560
1560
  super(t, e);
1561
1561
  f(this, "ops");
@@ -1595,7 +1595,7 @@ class zs extends Dt {
1595
1595
  this.ops[i].encode(t, this);
1596
1596
  }
1597
1597
  }
1598
- class Js extends P {
1598
+ class Vs extends I {
1599
1599
  constructor(t, e, r, i) {
1600
1600
  super(t);
1601
1601
  f(this, "value");
@@ -1610,7 +1610,7 @@ class Js extends P {
1610
1610
  return 35;
1611
1611
  }
1612
1612
  test(t) {
1613
- const { val: e } = O(t, this.path);
1613
+ const { val: e } = j(t, this.path);
1614
1614
  return typeof e != "string" ? !1 : this.matcher(e);
1615
1615
  }
1616
1616
  toJson(t) {
@@ -1630,8 +1630,8 @@ class Js extends P {
1630
1630
  t.encodeArrayHeader(r ? 4 : 3), t.writer.u8(35), t.encodeArray(e ? this.path.slice(e.path.length) : this.path), t.encodeString(this.value), r && t.writer.u8(1);
1631
1631
  }
1632
1632
  }
1633
- const { isArray: Vs } = Array;
1634
- class Bs extends P {
1633
+ const { isArray: Bs } = Array;
1634
+ class zs extends I {
1635
1635
  constructor(t, e) {
1636
1636
  super(t);
1637
1637
  f(this, "value");
@@ -1644,8 +1644,8 @@ class Bs extends P {
1644
1644
  return 42;
1645
1645
  }
1646
1646
  test(t) {
1647
- const { val: e } = O(t, this.path);
1648
- return e === null ? this.value === "null" : Vs(e) ? this.value === "array" : typeof e === this.value || typeof e == "number" && e === Math.round(e) && this.value === "integer";
1647
+ const { val: e } = j(t, this.path);
1648
+ return e === null ? this.value === "null" : Bs(e) ? this.value === "array" : typeof e === this.value || typeof e == "number" && e === Math.round(e) && this.value === "integer";
1649
1649
  }
1650
1650
  toJson(t) {
1651
1651
  return {
@@ -1688,9 +1688,9 @@ const Fs = (s, n) => {
1688
1688
  case "extend":
1689
1689
  return new As(w(s.path), s.props, !!s.deleteNull);
1690
1690
  default:
1691
- return _t(s, n);
1691
+ return bt(s, n);
1692
1692
  }
1693
- }, _t = (s, n) => {
1693
+ }, bt = (s, n) => {
1694
1694
  switch (s.op) {
1695
1695
  case "test":
1696
1696
  return new vs(w(s.path), s.value, !!s.not);
@@ -1699,7 +1699,7 @@ const Fs = (s, n) => {
1699
1699
  case "undefined":
1700
1700
  return new Os(w(s.path));
1701
1701
  case "type":
1702
- return new Bs(w(s.path), s.value);
1702
+ return new zs(w(s.path), s.value);
1703
1703
  case "test_type":
1704
1704
  return new xs(w(s.path), s.type);
1705
1705
  case "test_string":
@@ -1713,7 +1713,7 @@ const Fs = (s, n) => {
1713
1713
  case "starts":
1714
1714
  return new Rs(w(s.path), s.value, !!s.ignore_case);
1715
1715
  case "matches":
1716
- return new Js(w(s.path), s.value, !!s.ignore_case, n.createMatcher || Es);
1716
+ return new Vs(w(s.path), s.value, !!s.ignore_case, n.createMatcher || Es);
1717
1717
  case "in":
1718
1718
  return new Hs(w(s.path), s.value);
1719
1719
  case "less":
@@ -1722,22 +1722,22 @@ const Fs = (s, n) => {
1722
1722
  return new Is(w(s.path), s.value);
1723
1723
  case "and": {
1724
1724
  const t = w(s.path);
1725
- return new Ds(t, s.apply.map((e) => _t({ ...e, path: [...t, ...w(e.path)] }, n)));
1725
+ return new Ds(t, s.apply.map((e) => bt({ ...e, path: [...t, ...w(e.path)] }, n)));
1726
1726
  }
1727
1727
  case "or": {
1728
1728
  const t = w(s.path);
1729
- return new Us(t, s.apply.map((e) => _t({ ...e, path: [...t, ...w(e.path)] }, n)));
1729
+ return new Us(t, s.apply.map((e) => bt({ ...e, path: [...t, ...w(e.path)] }, n)));
1730
1730
  }
1731
1731
  case "not": {
1732
1732
  const t = w(s.path);
1733
- return new zs(t, s.apply.map((e) => _t({ ...e, path: [...t, ...w(e.path)] }, n)));
1733
+ return new Js(t, s.apply.map((e) => bt({ ...e, path: [...t, ...w(e.path)] }, n)));
1734
1734
  }
1735
1735
  default:
1736
1736
  throw new Error("OP_UNKNOWN");
1737
1737
  }
1738
1738
  };
1739
1739
  function Ws(s, n, t) {
1740
- t.mutate || (s = ft(s));
1740
+ t.mutate || (s = dt(s));
1741
1741
  const e = [], r = n.length;
1742
1742
  for (let i = 0; i < r; i++) {
1743
1743
  const h = Fs(n[i], t).apply(s);
@@ -1745,15 +1745,15 @@ function Ws(s, n, t) {
1745
1745
  }
1746
1746
  return { doc: s, res: e };
1747
1747
  }
1748
- var ct = (s) => typeof s == "function" ? s : function() {
1748
+ var lt = (s) => typeof s == "function" ? s : function() {
1749
1749
  return s;
1750
- }, Gs = typeof self < "u" ? self : null, at = typeof window < "u" ? window : null, lt = Gs || at || lt, Xs = "2.0.0", V = { connecting: 0, open: 1, closing: 2, closed: 3 }, qs = 1e4, Ys = 1e3, I = {
1750
+ }, Gs = typeof self < "u" ? self : null, at = typeof window < "u" ? window : null, ut = Gs || at || ut, Xs = "2.0.0", B = { connecting: 0, open: 1, closing: 2, closed: 3 }, qs = 1e4, Ys = 1e3, U = {
1751
1751
  closed: "closed",
1752
1752
  errored: "errored",
1753
1753
  joined: "joined",
1754
1754
  joining: "joining",
1755
1755
  leaving: "leaving"
1756
- }, G = {
1756
+ }, W = {
1757
1757
  close: "phx_close",
1758
1758
  error: "phx_error",
1759
1759
  join: "phx_join",
@@ -1764,7 +1764,7 @@ var ct = (s) => typeof s == "function" ? s : function() {
1764
1764
  websocket: "websocket"
1765
1765
  }, Zs = {
1766
1766
  complete: 4
1767
- }, yt = class {
1767
+ }, mt = class {
1768
1768
  constructor(s, n, t, e) {
1769
1769
  this.channel = s, this.event = n, this.payload = t || function() {
1770
1770
  return {};
@@ -1824,21 +1824,21 @@ var ct = (s) => typeof s == "function" ? s : function() {
1824
1824
  }
1825
1825
  }, Qs = class {
1826
1826
  constructor(s, n, t) {
1827
- this.state = I.closed, this.topic = s, this.params = ct(n || {}), this.socket = t, this.bindings = [], this.bindingRef = 0, this.timeout = this.socket.timeout, this.joinedOnce = !1, this.joinPush = new yt(this, G.join, this.params, this.timeout), this.pushBuffer = [], this.stateChangeRefs = [], this.rejoinTimer = new de(() => {
1827
+ this.state = U.closed, this.topic = s, this.params = lt(n || {}), this.socket = t, this.bindings = [], this.bindingRef = 0, this.timeout = this.socket.timeout, this.joinedOnce = !1, this.joinPush = new mt(this, W.join, this.params, this.timeout), this.pushBuffer = [], this.stateChangeRefs = [], this.rejoinTimer = new de(() => {
1828
1828
  this.socket.isConnected() && this.rejoin();
1829
1829
  }, this.socket.rejoinAfterMs), this.stateChangeRefs.push(this.socket.onError(() => this.rejoinTimer.reset())), this.stateChangeRefs.push(this.socket.onOpen(() => {
1830
1830
  this.rejoinTimer.reset(), this.isErrored() && this.rejoin();
1831
1831
  })), this.joinPush.receive("ok", () => {
1832
- this.state = I.joined, this.rejoinTimer.reset(), this.pushBuffer.forEach((e) => e.send()), this.pushBuffer = [];
1832
+ this.state = U.joined, this.rejoinTimer.reset(), this.pushBuffer.forEach((e) => e.send()), this.pushBuffer = [];
1833
1833
  }), this.joinPush.receive("error", () => {
1834
- this.state = I.errored, this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
1834
+ this.state = U.errored, this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
1835
1835
  }), this.onClose(() => {
1836
- this.rejoinTimer.reset(), this.socket.hasLogger() && this.socket.log("channel", `close ${this.topic} ${this.joinRef()}`), this.state = I.closed, this.socket.remove(this);
1836
+ this.rejoinTimer.reset(), this.socket.hasLogger() && this.socket.log("channel", `close ${this.topic} ${this.joinRef()}`), this.state = U.closed, this.socket.remove(this);
1837
1837
  }), this.onError((e) => {
1838
- this.socket.hasLogger() && this.socket.log("channel", `error ${this.topic}`, e), this.isJoining() && this.joinPush.reset(), this.state = I.errored, this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
1838
+ this.socket.hasLogger() && this.socket.log("channel", `error ${this.topic}`, e), this.isJoining() && this.joinPush.reset(), this.state = U.errored, this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
1839
1839
  }), this.joinPush.receive("timeout", () => {
1840
- this.socket.hasLogger() && this.socket.log("channel", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout), new yt(this, G.leave, ct({}), this.timeout).send(), this.state = I.errored, this.joinPush.reset(), this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
1841
- }), this.on(G.reply, (e, r) => {
1840
+ this.socket.hasLogger() && this.socket.log("channel", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout), new mt(this, W.leave, lt({}), this.timeout).send(), this.state = U.errored, this.joinPush.reset(), this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
1841
+ }), this.on(W.reply, (e, r) => {
1842
1842
  this.trigger(this.replyEventName(r), e);
1843
1843
  });
1844
1844
  }
@@ -1848,10 +1848,10 @@ var ct = (s) => typeof s == "function" ? s : function() {
1848
1848
  return this.timeout = s, this.joinedOnce = !0, this.rejoin(), this.joinPush;
1849
1849
  }
1850
1850
  onClose(s) {
1851
- this.on(G.close, s);
1851
+ this.on(W.close, s);
1852
1852
  }
1853
1853
  onError(s) {
1854
- return this.on(G.error, (n) => s(n));
1854
+ return this.on(W.error, (n) => s(n));
1855
1855
  }
1856
1856
  on(s, n) {
1857
1857
  let t = this.bindingRef++;
@@ -1866,16 +1866,16 @@ var ct = (s) => typeof s == "function" ? s : function() {
1866
1866
  push(s, n, t = this.timeout) {
1867
1867
  if (n = n || {}, !this.joinedOnce)
1868
1868
  throw new Error(`tried to push '${s}' to '${this.topic}' before joining. Use channel.join() before pushing events`);
1869
- let e = new yt(this, s, function() {
1869
+ let e = new mt(this, s, function() {
1870
1870
  return n;
1871
1871
  }, t);
1872
1872
  return this.canPush() ? e.send() : (e.startTimeout(), this.pushBuffer.push(e)), e;
1873
1873
  }
1874
1874
  leave(s = this.timeout) {
1875
- this.rejoinTimer.reset(), this.joinPush.cancelTimeout(), this.state = I.leaving;
1875
+ this.rejoinTimer.reset(), this.joinPush.cancelTimeout(), this.state = U.leaving;
1876
1876
  let n = () => {
1877
- this.socket.hasLogger() && this.socket.log("channel", `leave ${this.topic}`), this.trigger(G.close, "leave");
1878
- }, t = new yt(this, G.leave, ct({}), s);
1877
+ this.socket.hasLogger() && this.socket.log("channel", `leave ${this.topic}`), this.trigger(W.close, "leave");
1878
+ }, t = new mt(this, W.leave, lt({}), s);
1879
1879
  return t.receive("ok", () => n()).receive("timeout", () => n()), t.send(), this.canPush() || t.trigger("ok", {}), t;
1880
1880
  }
1881
1881
  onMessage(s, n, t) {
@@ -1888,58 +1888,58 @@ var ct = (s) => typeof s == "function" ? s : function() {
1888
1888
  return this.joinPush.ref;
1889
1889
  }
1890
1890
  rejoin(s = this.timeout) {
1891
- this.isLeaving() || (this.socket.leaveOpenTopic(this.topic), this.state = I.joining, this.joinPush.resend(s));
1891
+ this.isLeaving() || (this.socket.leaveOpenTopic(this.topic), this.state = U.joining, this.joinPush.resend(s));
1892
1892
  }
1893
1893
  trigger(s, n, t, e) {
1894
1894
  let r = this.onMessage(s, n, t, e);
1895
1895
  if (n && !r)
1896
1896
  throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");
1897
- let i = this.bindings.filter((o) => o.event === s);
1898
- for (let o = 0; o < i.length; o++)
1899
- i[o].callback(r, t, e || this.joinRef());
1897
+ let i = this.bindings.filter((a) => a.event === s);
1898
+ for (let a = 0; a < i.length; a++)
1899
+ i[a].callback(r, t, e || this.joinRef());
1900
1900
  }
1901
1901
  replyEventName(s) {
1902
1902
  return `chan_reply_${s}`;
1903
1903
  }
1904
1904
  isClosed() {
1905
- return this.state === I.closed;
1905
+ return this.state === U.closed;
1906
1906
  }
1907
1907
  isErrored() {
1908
- return this.state === I.errored;
1908
+ return this.state === U.errored;
1909
1909
  }
1910
1910
  isJoined() {
1911
- return this.state === I.joined;
1911
+ return this.state === U.joined;
1912
1912
  }
1913
1913
  isJoining() {
1914
- return this.state === I.joining;
1914
+ return this.state === U.joining;
1915
1915
  }
1916
1916
  isLeaving() {
1917
- return this.state === I.leaving;
1917
+ return this.state === U.leaving;
1918
1918
  }
1919
1919
  }, $t = class {
1920
- static request(s, n, t, e, r, i, o) {
1921
- if (lt.XDomainRequest) {
1922
- let h = new lt.XDomainRequest();
1923
- return this.xdomainRequest(h, s, n, e, r, i, o);
1920
+ static request(s, n, t, e, r, i, a) {
1921
+ if (ut.XDomainRequest) {
1922
+ let h = new ut.XDomainRequest();
1923
+ return this.xdomainRequest(h, s, n, e, r, i, a);
1924
1924
  } else {
1925
- let h = new lt.XMLHttpRequest();
1926
- return this.xhrRequest(h, s, n, t, e, r, i, o);
1925
+ let h = new ut.XMLHttpRequest();
1926
+ return this.xhrRequest(h, s, n, t, e, r, i, a);
1927
1927
  }
1928
1928
  }
1929
- static xdomainRequest(s, n, t, e, r, i, o) {
1929
+ static xdomainRequest(s, n, t, e, r, i, a) {
1930
1930
  return s.timeout = r, s.open(n, t), s.onload = () => {
1931
1931
  let h = this.parseJSON(s.responseText);
1932
- o && o(h);
1932
+ a && a(h);
1933
1933
  }, i && (s.ontimeout = i), s.onprogress = () => {
1934
1934
  }, s.send(e), s;
1935
1935
  }
1936
- static xhrRequest(s, n, t, e, r, i, o, h) {
1936
+ static xhrRequest(s, n, t, e, r, i, a, h) {
1937
1937
  return s.open(n, t, !0), s.timeout = i, s.setRequestHeader("Content-Type", e), s.onerror = () => h && h(null), s.onreadystatechange = () => {
1938
1938
  if (s.readyState === Zs.complete && h) {
1939
- let p = this.parseJSON(s.responseText);
1940
- h(p);
1939
+ let l = this.parseJSON(s.responseText);
1940
+ h(l);
1941
1941
  }
1942
- }, o && (s.ontimeout = o), s.send(r), s;
1942
+ }, a && (s.ontimeout = a), s.send(r), s;
1943
1943
  }
1944
1944
  static parseJSON(s) {
1945
1945
  if (!s || s === "")
@@ -1972,7 +1972,7 @@ var ct = (s) => typeof s == "function" ? s : function() {
1972
1972
  }, this.onerror = function() {
1973
1973
  }, this.onmessage = function() {
1974
1974
  }, this.onclose = function() {
1975
- }, this.pollEndpoint = this.normalizeEndpoint(s), this.readyState = V.connecting, this.poll();
1975
+ }, this.pollEndpoint = this.normalizeEndpoint(s), this.readyState = B.connecting, this.poll();
1976
1976
  }
1977
1977
  normalizeEndpoint(s) {
1978
1978
  return s.replace("ws://", "http://").replace("wss://", "https://").replace(new RegExp("(.*)/" + Pt.websocket), "$1/" + Pt.longpoll);
@@ -1981,13 +1981,13 @@ var ct = (s) => typeof s == "function" ? s : function() {
1981
1981
  return $t.appendParams(this.pollEndpoint, { token: this.token });
1982
1982
  }
1983
1983
  closeAndRetry(s, n, t) {
1984
- this.close(s, n, t), this.readyState = V.connecting;
1984
+ this.close(s, n, t), this.readyState = B.connecting;
1985
1985
  }
1986
1986
  ontimeout() {
1987
1987
  this.onerror("timeout"), this.closeAndRetry(1005, "timeout", !1);
1988
1988
  }
1989
1989
  isActive() {
1990
- return this.readyState === V.open || this.readyState === V.connecting;
1990
+ return this.readyState === B.open || this.readyState === B.connecting;
1991
1991
  }
1992
1992
  poll() {
1993
1993
  this.ajax("GET", null, () => this.ontimeout(), (s) => {
@@ -2006,7 +2006,7 @@ var ct = (s) => typeof s == "function" ? s : function() {
2006
2006
  this.poll();
2007
2007
  break;
2008
2008
  case 410:
2009
- this.readyState = V.open, this.onopen({}), this.poll();
2009
+ this.readyState = B.open, this.onopen({}), this.poll();
2010
2010
  break;
2011
2011
  case 403:
2012
2012
  this.onerror(403), this.close(1008, "forbidden", !1);
@@ -2028,7 +2028,7 @@ var ct = (s) => typeof s == "function" ? s : function() {
2028
2028
  close(s, n, t) {
2029
2029
  for (let r of this.reqs)
2030
2030
  r.abort();
2031
- this.readyState = V.closed;
2031
+ this.readyState = B.closed;
2032
2032
  let e = Object.assign({ code: 1e3, reason: void 0, wasClean: !0 }, { code: s, reason: n, wasClean: t });
2033
2033
  typeof CloseEvent < "u" ? this.onclose(new CloseEvent("close", e)) : this.onclose(e);
2034
2034
  }
@@ -2036,11 +2036,11 @@ var ct = (s) => typeof s == "function" ? s : function() {
2036
2036
  let r, i = () => {
2037
2037
  this.reqs.delete(r), t();
2038
2038
  };
2039
- r = $t.request(s, this.endpointURL(), "application/json", n, this.timeout, i, (o) => {
2040
- this.reqs.delete(r), this.isActive() && e(o);
2039
+ r = $t.request(s, this.endpointURL(), "application/json", n, this.timeout, i, (a) => {
2040
+ this.reqs.delete(r), this.isActive() && e(a);
2041
2041
  }), this.reqs.add(r);
2042
2042
  }
2043
- }, mt = {
2043
+ }, wt = {
2044
2044
  HEADER_LENGTH: 1,
2045
2045
  META_LENGTH: 4,
2046
2046
  KINDS: { push: 0, reply: 1, broadcast: 2 },
@@ -2056,15 +2056,15 @@ var ct = (s) => typeof s == "function" ? s : function() {
2056
2056
  if (s.constructor === ArrayBuffer)
2057
2057
  return n(this.binaryDecode(s));
2058
2058
  {
2059
- let [t, e, r, i, o] = JSON.parse(s);
2060
- return n({ join_ref: t, ref: e, topic: r, event: i, payload: o });
2059
+ let [t, e, r, i, a] = JSON.parse(s);
2060
+ return n({ join_ref: t, ref: e, topic: r, event: i, payload: a });
2061
2061
  }
2062
2062
  },
2063
2063
  binaryEncode(s) {
2064
- let { join_ref: n, ref: t, event: e, topic: r, payload: i } = s, o = this.META_LENGTH + n.length + t.length + r.length + e.length, h = new ArrayBuffer(this.HEADER_LENGTH + o), p = new DataView(h), d = 0;
2065
- p.setUint8(d++, this.KINDS.push), p.setUint8(d++, n.length), p.setUint8(d++, t.length), p.setUint8(d++, r.length), p.setUint8(d++, e.length), Array.from(n, (_) => p.setUint8(d++, _.charCodeAt(0))), Array.from(t, (_) => p.setUint8(d++, _.charCodeAt(0))), Array.from(r, (_) => p.setUint8(d++, _.charCodeAt(0))), Array.from(e, (_) => p.setUint8(d++, _.charCodeAt(0)));
2066
- var b = new Uint8Array(h.byteLength + i.byteLength);
2067
- return b.set(new Uint8Array(h), 0), b.set(new Uint8Array(i), h.byteLength), b.buffer;
2064
+ let { join_ref: n, ref: t, event: e, topic: r, payload: i } = s, a = this.META_LENGTH + n.length + t.length + r.length + e.length, h = new ArrayBuffer(this.HEADER_LENGTH + a), l = new DataView(h), d = 0;
2065
+ l.setUint8(d++, this.KINDS.push), l.setUint8(d++, n.length), l.setUint8(d++, t.length), l.setUint8(d++, r.length), l.setUint8(d++, e.length), Array.from(n, (b) => l.setUint8(d++, b.charCodeAt(0))), Array.from(t, (b) => l.setUint8(d++, b.charCodeAt(0))), Array.from(r, (b) => l.setUint8(d++, b.charCodeAt(0))), Array.from(e, (b) => l.setUint8(d++, b.charCodeAt(0)));
2066
+ var _ = new Uint8Array(h.byteLength + i.byteLength);
2067
+ return _.set(new Uint8Array(h), 0), _.set(new Uint8Array(i), h.byteLength), _.buffer;
2068
2068
  },
2069
2069
  binaryDecode(s) {
2070
2070
  let n = new DataView(s), t = n.getUint8(0), e = new TextDecoder();
@@ -2078,44 +2078,44 @@ var ct = (s) => typeof s == "function" ? s : function() {
2078
2078
  }
2079
2079
  },
2080
2080
  decodePush(s, n, t) {
2081
- let e = n.getUint8(1), r = n.getUint8(2), i = n.getUint8(3), o = this.HEADER_LENGTH + this.META_LENGTH - 1, h = t.decode(s.slice(o, o + e));
2082
- o = o + e;
2083
- let p = t.decode(s.slice(o, o + r));
2084
- o = o + r;
2085
- let d = t.decode(s.slice(o, o + i));
2086
- o = o + i;
2087
- let b = s.slice(o, s.byteLength);
2088
- return { join_ref: h, ref: null, topic: p, event: d, payload: b };
2081
+ let e = n.getUint8(1), r = n.getUint8(2), i = n.getUint8(3), a = this.HEADER_LENGTH + this.META_LENGTH - 1, h = t.decode(s.slice(a, a + e));
2082
+ a = a + e;
2083
+ let l = t.decode(s.slice(a, a + r));
2084
+ a = a + r;
2085
+ let d = t.decode(s.slice(a, a + i));
2086
+ a = a + i;
2087
+ let _ = s.slice(a, s.byteLength);
2088
+ return { join_ref: h, ref: null, topic: l, event: d, payload: _ };
2089
2089
  },
2090
2090
  decodeReply(s, n, t) {
2091
- let e = n.getUint8(1), r = n.getUint8(2), i = n.getUint8(3), o = n.getUint8(4), h = this.HEADER_LENGTH + this.META_LENGTH, p = t.decode(s.slice(h, h + e));
2091
+ let e = n.getUint8(1), r = n.getUint8(2), i = n.getUint8(3), a = n.getUint8(4), h = this.HEADER_LENGTH + this.META_LENGTH, l = t.decode(s.slice(h, h + e));
2092
2092
  h = h + e;
2093
2093
  let d = t.decode(s.slice(h, h + r));
2094
2094
  h = h + r;
2095
- let b = t.decode(s.slice(h, h + i));
2095
+ let _ = t.decode(s.slice(h, h + i));
2096
2096
  h = h + i;
2097
- let _ = t.decode(s.slice(h, h + o));
2098
- h = h + o;
2099
- let A = s.slice(h, s.byteLength), T = { status: _, response: A };
2100
- return { join_ref: p, ref: d, topic: b, event: G.reply, payload: T };
2097
+ let b = t.decode(s.slice(h, h + a));
2098
+ h = h + a;
2099
+ let T = s.slice(h, s.byteLength), O = { status: b, response: T };
2100
+ return { join_ref: l, ref: d, topic: _, event: W.reply, payload: O };
2101
2101
  },
2102
2102
  decodeBroadcast(s, n, t) {
2103
- let e = n.getUint8(1), r = n.getUint8(2), i = this.HEADER_LENGTH + 2, o = t.decode(s.slice(i, i + e));
2103
+ let e = n.getUint8(1), r = n.getUint8(2), i = this.HEADER_LENGTH + 2, a = t.decode(s.slice(i, i + e));
2104
2104
  i = i + e;
2105
2105
  let h = t.decode(s.slice(i, i + r));
2106
2106
  i = i + r;
2107
- let p = s.slice(i, s.byteLength);
2108
- return { join_ref: null, ref: null, topic: o, event: h, payload: p };
2107
+ let l = s.slice(i, s.byteLength);
2108
+ return { join_ref: null, ref: null, topic: a, event: h, payload: l };
2109
2109
  }
2110
2110
  }, Ks = class {
2111
2111
  constructor(s, n = {}) {
2112
- this.stateChangeCallbacks = { open: [], close: [], error: [], message: [] }, this.channels = [], this.sendBuffer = [], this.ref = 0, this.timeout = n.timeout || qs, this.transport = n.transport || lt.WebSocket || St, this.establishedConnections = 0, this.defaultEncoder = mt.encode.bind(mt), this.defaultDecoder = mt.decode.bind(mt), this.closeWasClean = !1, this.binaryType = n.binaryType || "arraybuffer", this.connectClock = 1, this.transport !== St ? (this.encode = n.encode || this.defaultEncoder, this.decode = n.decode || this.defaultDecoder) : (this.encode = this.defaultEncoder, this.decode = this.defaultDecoder);
2112
+ this.stateChangeCallbacks = { open: [], close: [], error: [], message: [] }, this.channels = [], this.sendBuffer = [], this.ref = 0, this.timeout = n.timeout || qs, this.transport = n.transport || ut.WebSocket || St, this.establishedConnections = 0, this.defaultEncoder = wt.encode.bind(wt), this.defaultDecoder = wt.decode.bind(wt), this.closeWasClean = !1, this.binaryType = n.binaryType || "arraybuffer", this.connectClock = 1, this.transport !== St ? (this.encode = n.encode || this.defaultEncoder, this.decode = n.decode || this.defaultDecoder) : (this.encode = this.defaultEncoder, this.decode = this.defaultDecoder);
2113
2113
  let t = null;
2114
2114
  at && at.addEventListener && (at.addEventListener("pagehide", (e) => {
2115
2115
  this.conn && (this.disconnect(), t = this.connectClock);
2116
2116
  }), at.addEventListener("pageshow", (e) => {
2117
2117
  t === this.connectClock && (t = null, this.connect());
2118
- })), this.heartbeatIntervalMs = n.heartbeatIntervalMs || 3e4, this.rejoinAfterMs = (e) => n.rejoinAfterMs ? n.rejoinAfterMs(e) : [1e3, 2e3, 5e3][e - 1] || 1e4, this.reconnectAfterMs = (e) => n.reconnectAfterMs ? n.reconnectAfterMs(e) : [10, 50, 100, 150, 200, 250, 500, 1e3, 2e3][e - 1] || 5e3, this.logger = n.logger || null, this.longpollerTimeout = n.longpollerTimeout || 2e4, this.params = ct(n.params || {}), this.endPoint = `${s}/${Pt.websocket}`, this.vsn = n.vsn || Xs, this.heartbeatTimeoutTimer = null, this.heartbeatTimer = null, this.pendingHeartbeatRef = null, this.reconnectTimer = new de(() => {
2118
+ })), this.heartbeatIntervalMs = n.heartbeatIntervalMs || 3e4, this.rejoinAfterMs = (e) => n.rejoinAfterMs ? n.rejoinAfterMs(e) : [1e3, 2e3, 5e3][e - 1] || 1e4, this.reconnectAfterMs = (e) => n.reconnectAfterMs ? n.reconnectAfterMs(e) : [10, 50, 100, 150, 200, 250, 500, 1e3, 2e3][e - 1] || 5e3, this.logger = n.logger || null, this.longpollerTimeout = n.longpollerTimeout || 2e4, this.params = lt(n.params || {}), this.endPoint = `${s}/${Pt.websocket}`, this.vsn = n.vsn || Xs, this.heartbeatTimeoutTimer = null, this.heartbeatTimer = null, this.pendingHeartbeatRef = null, this.reconnectTimer = new de(() => {
2119
2119
  this.teardown(() => this.connect());
2120
2120
  }, this.reconnectAfterMs);
2121
2121
  }
@@ -2136,7 +2136,7 @@ var ct = (s) => typeof s == "function" ? s : function() {
2136
2136
  this.connectClock++, this.closeWasClean = !0, this.reconnectTimer.reset(), this.teardown(s, n, t);
2137
2137
  }
2138
2138
  connect(s) {
2139
- s && (console && console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"), this.params = ct(s)), !this.conn && (this.connectClock++, this.closeWasClean = !1, this.conn = new this.transport(this.endPointURL()), this.conn.binaryType = this.binaryType, this.conn.timeout = this.longpollerTimeout, this.conn.onopen = () => this.onConnOpen(), this.conn.onerror = (n) => this.onConnError(n), this.conn.onmessage = (n) => this.onConnMessage(n), this.conn.onclose = (n) => this.onConnClose(n));
2139
+ s && (console && console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"), this.params = lt(s)), !this.conn && (this.connectClock++, this.closeWasClean = !1, this.conn = new this.transport(this.endPointURL()), this.conn.binaryType = this.binaryType, this.conn.timeout = this.longpollerTimeout, this.conn.onopen = () => this.onConnOpen(), this.conn.onerror = (n) => this.onConnError(n), this.conn.onmessage = (n) => this.onConnMessage(n), this.conn.onclose = (n) => this.onConnClose(n));
2140
2140
  }
2141
2141
  log(s, n, t) {
2142
2142
  this.logger(s, n, t);
@@ -2205,7 +2205,7 @@ var ct = (s) => typeof s == "function" ? s : function() {
2205
2205
  }, 150 * n);
2206
2206
  }
2207
2207
  waitForSocketClosed(s, n = 1) {
2208
- if (n === 5 || !this.conn || this.conn.readyState === V.closed) {
2208
+ if (n === 5 || !this.conn || this.conn.readyState === B.closed) {
2209
2209
  s();
2210
2210
  return;
2211
2211
  }
@@ -2226,16 +2226,16 @@ var ct = (s) => typeof s == "function" ? s : function() {
2226
2226
  }
2227
2227
  triggerChanError() {
2228
2228
  this.channels.forEach((s) => {
2229
- s.isErrored() || s.isLeaving() || s.isClosed() || s.trigger(G.error);
2229
+ s.isErrored() || s.isLeaving() || s.isClosed() || s.trigger(W.error);
2230
2230
  });
2231
2231
  }
2232
2232
  connectionState() {
2233
2233
  switch (this.conn && this.conn.readyState) {
2234
- case V.connecting:
2234
+ case B.connecting:
2235
2235
  return "connecting";
2236
- case V.open:
2236
+ case B.open:
2237
2237
  return "open";
2238
- case V.closing:
2238
+ case B.closing:
2239
2239
  return "closing";
2240
2240
  default:
2241
2241
  return "closed";
@@ -2274,15 +2274,15 @@ var ct = (s) => typeof s == "function" ? s : function() {
2274
2274
  }
2275
2275
  onConnMessage(s) {
2276
2276
  this.decode(s.data, (n) => {
2277
- let { topic: t, event: e, payload: r, ref: i, join_ref: o } = n;
2277
+ let { topic: t, event: e, payload: r, ref: i, join_ref: a } = n;
2278
2278
  i && i === this.pendingHeartbeatRef && (this.clearHeartbeats(), this.pendingHeartbeatRef = null, this.heartbeatTimer = setTimeout(() => this.sendHeartbeat(), this.heartbeatIntervalMs)), this.hasLogger() && this.log("receive", `${r.status || ""} ${t} ${e} ${i && "(" + i + ")" || ""}`, r);
2279
2279
  for (let h = 0; h < this.channels.length; h++) {
2280
- const p = this.channels[h];
2281
- p.isMember(t, e, r, o) && p.trigger(e, r, i, o);
2280
+ const l = this.channels[h];
2281
+ l.isMember(t, e, r, a) && l.trigger(e, r, i, a);
2282
2282
  }
2283
2283
  for (let h = 0; h < this.stateChangeCallbacks.message.length; h++) {
2284
- let [, p] = this.stateChangeCallbacks.message[h];
2285
- p(n);
2284
+ let [, l] = this.stateChangeCallbacks.message[h];
2285
+ l(n);
2286
2286
  }
2287
2287
  });
2288
2288
  }
@@ -2394,124 +2394,124 @@ var se;
2394
2394
  (function(n) {
2395
2395
  var t = typeof ee == "object" ? ee : typeof self == "object" ? self : typeof this == "object" ? this : Function("return this;")(), e = r(s);
2396
2396
  typeof t.Reflect > "u" ? t.Reflect = s : e = r(t.Reflect, e), n(e);
2397
- function r(i, o) {
2398
- return function(h, p) {
2399
- typeof i[h] != "function" && Object.defineProperty(i, h, { configurable: !0, writable: !0, value: p }), o && o(h, p);
2397
+ function r(i, a) {
2398
+ return function(h, l) {
2399
+ typeof i[h] != "function" && Object.defineProperty(i, h, { configurable: !0, writable: !0, value: l }), a && a(h, l);
2400
2400
  };
2401
2401
  }
2402
2402
  })(function(n) {
2403
- var t = Object.prototype.hasOwnProperty, e = typeof Symbol == "function", r = e && typeof Symbol.toPrimitive < "u" ? Symbol.toPrimitive : "@@toPrimitive", i = e && typeof Symbol.iterator < "u" ? Symbol.iterator : "@@iterator", o = typeof Object.create == "function", h = { __proto__: [] } instanceof Array, p = !o && !h, d = {
2403
+ var t = Object.prototype.hasOwnProperty, e = typeof Symbol == "function", r = e && typeof Symbol.toPrimitive < "u" ? Symbol.toPrimitive : "@@toPrimitive", i = e && typeof Symbol.iterator < "u" ? Symbol.iterator : "@@iterator", a = typeof Object.create == "function", h = { __proto__: [] } instanceof Array, l = !a && !h, d = {
2404
2404
  // create an object in dictionary mode (a.k.a. "slow" mode in v8)
2405
- create: o ? function() {
2405
+ create: a ? function() {
2406
2406
  return Ot(/* @__PURE__ */ Object.create(null));
2407
2407
  } : h ? function() {
2408
2408
  return Ot({ __proto__: null });
2409
2409
  } : function() {
2410
2410
  return Ot({});
2411
2411
  },
2412
- has: p ? function(a, c) {
2413
- return t.call(a, c);
2414
- } : function(a, c) {
2415
- return c in a;
2412
+ has: l ? function(o, c) {
2413
+ return t.call(o, c);
2414
+ } : function(o, c) {
2415
+ return c in o;
2416
2416
  },
2417
- get: p ? function(a, c) {
2418
- return t.call(a, c) ? a[c] : void 0;
2419
- } : function(a, c) {
2420
- return a[c];
2417
+ get: l ? function(o, c) {
2418
+ return t.call(o, c) ? o[c] : void 0;
2419
+ } : function(o, c) {
2420
+ return o[c];
2421
2421
  }
2422
- }, b = Object.getPrototypeOf(Function), _ = typeof process == "object" && process.env && process.env.REFLECT_METADATA_USE_MAP_POLYFILL === "true", A = !_ && typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : Ae(), T = !_ && typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : Te(), j = !_ && typeof WeakMap == "function" ? WeakMap : Oe(), R = new j();
2423
- function M(a, c, l, u) {
2424
- if (L(l)) {
2425
- if (!Gt(a))
2422
+ }, _ = Object.getPrototypeOf(Function), b = typeof process == "object" && process.env && process.env.REFLECT_METADATA_USE_MAP_POLYFILL === "true", T = !b && typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : Ae(), O = !b && typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : Te(), x = !b && typeof WeakMap == "function" ? WeakMap : Oe(), R = new x();
2423
+ function M(o, c, u, p) {
2424
+ if (L(u)) {
2425
+ if (!Gt(o))
2426
2426
  throw new TypeError();
2427
2427
  if (!Xt(c))
2428
2428
  throw new TypeError();
2429
- return K(a, c);
2429
+ return K(o, c);
2430
2430
  } else {
2431
- if (!Gt(a))
2431
+ if (!Gt(o))
2432
2432
  throw new TypeError();
2433
2433
  if (!N(c))
2434
2434
  throw new TypeError();
2435
- if (!N(u) && !L(u) && !tt(u))
2435
+ if (!N(p) && !L(p) && !tt(p))
2436
2436
  throw new TypeError();
2437
- return tt(u) && (u = void 0), l = F(l), ge(a, c, l, u);
2437
+ return tt(p) && (p = void 0), u = z(u), ge(o, c, u, p);
2438
2438
  }
2439
2439
  }
2440
2440
  n("decorate", M);
2441
- function X(a, c) {
2442
- function l(u, g) {
2443
- if (!N(u))
2441
+ function G(o, c) {
2442
+ function u(p, g) {
2443
+ if (!N(p))
2444
2444
  throw new TypeError();
2445
2445
  if (!L(g) && !be(g))
2446
2446
  throw new TypeError();
2447
- Vt(a, c, u, g);
2447
+ Bt(o, c, p, g);
2448
2448
  }
2449
- return l;
2449
+ return u;
2450
2450
  }
2451
- n("metadata", X);
2452
- function Z(a, c, l, u) {
2453
- if (!N(l))
2451
+ n("metadata", G);
2452
+ function X(o, c, u, p) {
2453
+ if (!N(u))
2454
2454
  throw new TypeError();
2455
- return L(u) || (u = F(u)), Vt(a, c, l, u);
2455
+ return L(p) || (p = z(p)), Bt(o, c, u, p);
2456
2456
  }
2457
- n("defineMetadata", Z);
2458
- function k(a, c, l) {
2457
+ n("defineMetadata", X);
2458
+ function Y(o, c, u) {
2459
2459
  if (!N(c))
2460
2460
  throw new TypeError();
2461
- return L(l) || (l = F(l)), Ut(a, c, l);
2461
+ return L(u) || (u = z(u)), Ut(o, c, u);
2462
2462
  }
2463
- n("hasMetadata", k);
2464
- function B(a, c, l) {
2463
+ n("hasMetadata", Y);
2464
+ function Q(o, c, u) {
2465
2465
  if (!N(c))
2466
2466
  throw new TypeError();
2467
- return L(l) || (l = F(l)), At(a, c, l);
2467
+ return L(u) || (u = z(u)), At(o, c, u);
2468
2468
  }
2469
- n("hasOwnMetadata", B);
2470
- function U(a, c, l) {
2469
+ n("hasOwnMetadata", Q);
2470
+ function k(o, c, u) {
2471
2471
  if (!N(c))
2472
2472
  throw new TypeError();
2473
- return L(l) || (l = F(l)), zt(a, c, l);
2473
+ return L(u) || (u = z(u)), Jt(o, c, u);
2474
2474
  }
2475
- n("getMetadata", U);
2476
- function q(a, c, l) {
2475
+ n("getMetadata", k);
2476
+ function V(o, c, u) {
2477
2477
  if (!N(c))
2478
2478
  throw new TypeError();
2479
- return L(l) || (l = F(l)), Jt(a, c, l);
2479
+ return L(u) || (u = z(u)), Vt(o, c, u);
2480
2480
  }
2481
- n("getOwnMetadata", q);
2482
- function x(a, c) {
2483
- if (!N(a))
2481
+ n("getOwnMetadata", V);
2482
+ function A(o, c) {
2483
+ if (!N(o))
2484
2484
  throw new TypeError();
2485
- return L(c) || (c = F(c)), Bt(a, c);
2485
+ return L(c) || (c = z(c)), zt(o, c);
2486
2486
  }
2487
- n("getMetadataKeys", x);
2488
- function z(a, c) {
2489
- if (!N(a))
2487
+ n("getMetadataKeys", A);
2488
+ function P(o, c) {
2489
+ if (!N(o))
2490
2490
  throw new TypeError();
2491
- return L(c) || (c = F(c)), Ft(a, c);
2491
+ return L(c) || (c = z(c)), Ft(o, c);
2492
2492
  }
2493
- n("getOwnMetadataKeys", z);
2494
- function J(a, c, l) {
2493
+ n("getOwnMetadataKeys", P);
2494
+ function D(o, c, u) {
2495
2495
  if (!N(c))
2496
2496
  throw new TypeError();
2497
- L(l) || (l = F(l));
2498
- var u = ot(
2497
+ L(u) || (u = z(u));
2498
+ var p = ot(
2499
2499
  c,
2500
- l,
2500
+ u,
2501
2501
  /*Create*/
2502
2502
  !1
2503
2503
  );
2504
- if (L(u) || !u.delete(a))
2504
+ if (L(p) || !p.delete(o))
2505
2505
  return !1;
2506
- if (u.size > 0)
2506
+ if (p.size > 0)
2507
2507
  return !0;
2508
2508
  var g = R.get(c);
2509
- return g.delete(l), g.size > 0 || R.delete(c), !0;
2509
+ return g.delete(u), g.size > 0 || R.delete(c), !0;
2510
2510
  }
2511
- n("deleteMetadata", J);
2512
- function K(a, c) {
2513
- for (var l = a.length - 1; l >= 0; --l) {
2514
- var u = a[l], g = u(c);
2511
+ n("deleteMetadata", D);
2512
+ function K(o, c) {
2513
+ for (var u = o.length - 1; u >= 0; --u) {
2514
+ var p = o[u], g = p(c);
2515
2515
  if (!L(g) && !tt(g)) {
2516
2516
  if (!Xt(g))
2517
2517
  throw new TypeError();
@@ -2520,110 +2520,110 @@ var se;
2520
2520
  }
2521
2521
  return c;
2522
2522
  }
2523
- function ge(a, c, l, u) {
2524
- for (var g = a.length - 1; g >= 0; --g) {
2525
- var H = a[g], y = H(c, l, u);
2523
+ function ge(o, c, u, p) {
2524
+ for (var g = o.length - 1; g >= 0; --g) {
2525
+ var H = o[g], y = H(c, u, p);
2526
2526
  if (!L(y) && !tt(y)) {
2527
2527
  if (!N(y))
2528
2528
  throw new TypeError();
2529
- u = y;
2529
+ p = y;
2530
2530
  }
2531
2531
  }
2532
- return u;
2532
+ return p;
2533
2533
  }
2534
- function ot(a, c, l) {
2535
- var u = R.get(a);
2536
- if (L(u)) {
2537
- if (!l)
2534
+ function ot(o, c, u) {
2535
+ var p = R.get(o);
2536
+ if (L(p)) {
2537
+ if (!u)
2538
2538
  return;
2539
- u = new A(), R.set(a, u);
2539
+ p = new T(), R.set(o, p);
2540
2540
  }
2541
- var g = u.get(c);
2541
+ var g = p.get(c);
2542
2542
  if (L(g)) {
2543
- if (!l)
2543
+ if (!u)
2544
2544
  return;
2545
- g = new A(), u.set(c, g);
2545
+ g = new T(), p.set(c, g);
2546
2546
  }
2547
2547
  return g;
2548
2548
  }
2549
- function Ut(a, c, l) {
2550
- var u = At(a, c, l);
2551
- if (u)
2549
+ function Ut(o, c, u) {
2550
+ var p = At(o, c, u);
2551
+ if (p)
2552
2552
  return !0;
2553
2553
  var g = Tt(c);
2554
- return tt(g) ? !1 : Ut(a, g, l);
2554
+ return tt(g) ? !1 : Ut(o, g, u);
2555
2555
  }
2556
- function At(a, c, l) {
2557
- var u = ot(
2556
+ function At(o, c, u) {
2557
+ var p = ot(
2558
2558
  c,
2559
- l,
2559
+ u,
2560
2560
  /*Create*/
2561
2561
  !1
2562
2562
  );
2563
- return L(u) ? !1 : we(u.has(a));
2563
+ return L(p) ? !1 : we(p.has(o));
2564
2564
  }
2565
- function zt(a, c, l) {
2566
- var u = At(a, c, l);
2567
- if (u)
2568
- return Jt(a, c, l);
2565
+ function Jt(o, c, u) {
2566
+ var p = At(o, c, u);
2567
+ if (p)
2568
+ return Vt(o, c, u);
2569
2569
  var g = Tt(c);
2570
2570
  if (!tt(g))
2571
- return zt(a, g, l);
2571
+ return Jt(o, g, u);
2572
2572
  }
2573
- function Jt(a, c, l) {
2574
- var u = ot(
2573
+ function Vt(o, c, u) {
2574
+ var p = ot(
2575
2575
  c,
2576
- l,
2576
+ u,
2577
2577
  /*Create*/
2578
2578
  !1
2579
2579
  );
2580
- if (!L(u))
2581
- return u.get(a);
2580
+ if (!L(p))
2581
+ return p.get(o);
2582
2582
  }
2583
- function Vt(a, c, l, u) {
2583
+ function Bt(o, c, u, p) {
2584
2584
  var g = ot(
2585
- l,
2586
2585
  u,
2586
+ p,
2587
2587
  /*Create*/
2588
2588
  !0
2589
2589
  );
2590
- g.set(a, c);
2590
+ g.set(o, c);
2591
2591
  }
2592
- function Bt(a, c) {
2593
- var l = Ft(a, c), u = Tt(a);
2594
- if (u === null)
2595
- return l;
2596
- var g = Bt(u, c);
2592
+ function zt(o, c) {
2593
+ var u = Ft(o, c), p = Tt(o);
2594
+ if (p === null)
2595
+ return u;
2596
+ var g = zt(p, c);
2597
2597
  if (g.length <= 0)
2598
- return l;
2599
- if (l.length <= 0)
2598
+ return u;
2599
+ if (u.length <= 0)
2600
2600
  return g;
2601
- for (var H = new T(), y = [], m = 0, v = l; m < v.length; m++) {
2601
+ for (var H = new O(), y = [], m = 0, v = u; m < v.length; m++) {
2602
2602
  var E = v[m], $ = H.has(E);
2603
2603
  $ || (H.add(E), y.push(E));
2604
2604
  }
2605
- for (var Y = 0, Yt = g; Y < Yt.length; Y++) {
2606
- var E = Yt[Y], $ = H.has(E);
2605
+ for (var q = 0, Yt = g; q < Yt.length; q++) {
2606
+ var E = Yt[q], $ = H.has(E);
2607
2607
  $ || (H.add(E), y.push(E));
2608
2608
  }
2609
2609
  return y;
2610
2610
  }
2611
- function Ft(a, c) {
2612
- var l = [], u = ot(
2613
- a,
2611
+ function Ft(o, c) {
2612
+ var u = [], p = ot(
2613
+ o,
2614
2614
  c,
2615
2615
  /*Create*/
2616
2616
  !1
2617
2617
  );
2618
- if (L(u))
2619
- return l;
2620
- for (var g = u.keys(), H = Ee(g), y = 0; ; ) {
2618
+ if (L(p))
2619
+ return u;
2620
+ for (var g = p.keys(), H = Ee(g), y = 0; ; ) {
2621
2621
  var m = Ce(H);
2622
2622
  if (!m)
2623
- return l.length = y, l;
2623
+ return u.length = y, u;
2624
2624
  var v = $e(m);
2625
2625
  try {
2626
- l[y] = v;
2626
+ u[y] = v;
2627
2627
  } catch (E) {
2628
2628
  try {
2629
2629
  ke(H);
@@ -2634,10 +2634,10 @@ var se;
2634
2634
  y++;
2635
2635
  }
2636
2636
  }
2637
- function Wt(a) {
2638
- if (a === null)
2637
+ function Wt(o) {
2638
+ if (o === null)
2639
2639
  return 1;
2640
- switch (typeof a) {
2640
+ switch (typeof o) {
2641
2641
  case "undefined":
2642
2642
  return 0;
2643
2643
  case "boolean":
@@ -2649,102 +2649,102 @@ var se;
2649
2649
  case "number":
2650
2650
  return 5;
2651
2651
  case "object":
2652
- return a === null ? 1 : 6;
2652
+ return o === null ? 1 : 6;
2653
2653
  default:
2654
2654
  return 6;
2655
2655
  }
2656
2656
  }
2657
- function L(a) {
2658
- return a === void 0;
2657
+ function L(o) {
2658
+ return o === void 0;
2659
2659
  }
2660
- function tt(a) {
2661
- return a === null;
2660
+ function tt(o) {
2661
+ return o === null;
2662
2662
  }
2663
- function ve(a) {
2664
- return typeof a == "symbol";
2663
+ function ve(o) {
2664
+ return typeof o == "symbol";
2665
2665
  }
2666
- function N(a) {
2667
- return typeof a == "object" ? a !== null : typeof a == "function";
2666
+ function N(o) {
2667
+ return typeof o == "object" ? o !== null : typeof o == "function";
2668
2668
  }
2669
- function ye(a, c) {
2670
- switch (Wt(a)) {
2669
+ function ye(o, c) {
2670
+ switch (Wt(o)) {
2671
2671
  case 0:
2672
- return a;
2672
+ return o;
2673
2673
  case 1:
2674
- return a;
2674
+ return o;
2675
2675
  case 2:
2676
- return a;
2676
+ return o;
2677
2677
  case 3:
2678
- return a;
2678
+ return o;
2679
2679
  case 4:
2680
- return a;
2680
+ return o;
2681
2681
  case 5:
2682
- return a;
2682
+ return o;
2683
2683
  }
2684
- var l = c === 3 ? "string" : c === 5 ? "number" : "default", u = qt(a, r);
2685
- if (u !== void 0) {
2686
- var g = u.call(a, l);
2684
+ var u = c === 3 ? "string" : c === 5 ? "number" : "default", p = qt(o, r);
2685
+ if (p !== void 0) {
2686
+ var g = p.call(o, u);
2687
2687
  if (N(g))
2688
2688
  throw new TypeError();
2689
2689
  return g;
2690
2690
  }
2691
- return me(a, l === "default" ? "number" : l);
2691
+ return me(o, u === "default" ? "number" : u);
2692
2692
  }
2693
- function me(a, c) {
2693
+ function me(o, c) {
2694
2694
  if (c === "string") {
2695
- var l = a.toString;
2696
- if (et(l)) {
2697
- var u = l.call(a);
2698
- if (!N(u))
2699
- return u;
2695
+ var u = o.toString;
2696
+ if (et(u)) {
2697
+ var p = u.call(o);
2698
+ if (!N(p))
2699
+ return p;
2700
2700
  }
2701
- var g = a.valueOf;
2701
+ var g = o.valueOf;
2702
2702
  if (et(g)) {
2703
- var u = g.call(a);
2704
- if (!N(u))
2705
- return u;
2703
+ var p = g.call(o);
2704
+ if (!N(p))
2705
+ return p;
2706
2706
  }
2707
2707
  } else {
2708
- var g = a.valueOf;
2708
+ var g = o.valueOf;
2709
2709
  if (et(g)) {
2710
- var u = g.call(a);
2711
- if (!N(u))
2712
- return u;
2710
+ var p = g.call(o);
2711
+ if (!N(p))
2712
+ return p;
2713
2713
  }
2714
- var H = a.toString;
2714
+ var H = o.toString;
2715
2715
  if (et(H)) {
2716
- var u = H.call(a);
2717
- if (!N(u))
2718
- return u;
2716
+ var p = H.call(o);
2717
+ if (!N(p))
2718
+ return p;
2719
2719
  }
2720
2720
  }
2721
2721
  throw new TypeError();
2722
2722
  }
2723
- function we(a) {
2724
- return !!a;
2723
+ function we(o) {
2724
+ return !!o;
2725
2725
  }
2726
- function _e(a) {
2727
- return "" + a;
2726
+ function _e(o) {
2727
+ return "" + o;
2728
2728
  }
2729
- function F(a) {
2729
+ function z(o) {
2730
2730
  var c = ye(
2731
- a,
2731
+ o,
2732
2732
  3
2733
2733
  /* String */
2734
2734
  );
2735
2735
  return ve(c) ? c : _e(c);
2736
2736
  }
2737
- function Gt(a) {
2738
- return Array.isArray ? Array.isArray(a) : a instanceof Object ? a instanceof Array : Object.prototype.toString.call(a) === "[object Array]";
2737
+ function Gt(o) {
2738
+ return Array.isArray ? Array.isArray(o) : o instanceof Object ? o instanceof Array : Object.prototype.toString.call(o) === "[object Array]";
2739
2739
  }
2740
- function et(a) {
2741
- return typeof a == "function";
2740
+ function et(o) {
2741
+ return typeof o == "function";
2742
2742
  }
2743
- function Xt(a) {
2744
- return typeof a == "function";
2743
+ function Xt(o) {
2744
+ return typeof o == "function";
2745
2745
  }
2746
- function be(a) {
2747
- switch (Wt(a)) {
2746
+ function be(o) {
2747
+ switch (Wt(o)) {
2748
2748
  case 3:
2749
2749
  return !0;
2750
2750
  case 4:
@@ -2753,46 +2753,46 @@ var se;
2753
2753
  return !1;
2754
2754
  }
2755
2755
  }
2756
- function qt(a, c) {
2757
- var l = a[c];
2758
- if (l != null) {
2759
- if (!et(l))
2756
+ function qt(o, c) {
2757
+ var u = o[c];
2758
+ if (u != null) {
2759
+ if (!et(u))
2760
2760
  throw new TypeError();
2761
- return l;
2761
+ return u;
2762
2762
  }
2763
2763
  }
2764
- function Ee(a) {
2765
- var c = qt(a, i);
2764
+ function Ee(o) {
2765
+ var c = qt(o, i);
2766
2766
  if (!et(c))
2767
2767
  throw new TypeError();
2768
- var l = c.call(a);
2769
- if (!N(l))
2768
+ var u = c.call(o);
2769
+ if (!N(u))
2770
2770
  throw new TypeError();
2771
- return l;
2771
+ return u;
2772
2772
  }
2773
- function $e(a) {
2774
- return a.value;
2773
+ function $e(o) {
2774
+ return o.value;
2775
2775
  }
2776
- function Ce(a) {
2777
- var c = a.next();
2776
+ function Ce(o) {
2777
+ var c = o.next();
2778
2778
  return c.done ? !1 : c;
2779
2779
  }
2780
- function ke(a) {
2781
- var c = a.return;
2782
- c && c.call(a);
2780
+ function ke(o) {
2781
+ var c = o.return;
2782
+ c && c.call(o);
2783
2783
  }
2784
- function Tt(a) {
2785
- var c = Object.getPrototypeOf(a);
2786
- if (typeof a != "function" || a === b || c !== b)
2784
+ function Tt(o) {
2785
+ var c = Object.getPrototypeOf(o);
2786
+ if (typeof o != "function" || o === _ || c !== _)
2787
2787
  return c;
2788
- var l = a.prototype, u = l && Object.getPrototypeOf(l);
2789
- if (u == null || u === Object.prototype)
2788
+ var u = o.prototype, p = u && Object.getPrototypeOf(u);
2789
+ if (p == null || p === Object.prototype)
2790
2790
  return c;
2791
- var g = u.constructor;
2792
- return typeof g != "function" || g === a ? c : g;
2791
+ var g = p.constructor;
2792
+ return typeof g != "function" || g === o ? c : g;
2793
2793
  }
2794
2794
  function Ae() {
2795
- var a = {}, c = [], l = (
2795
+ var o = {}, c = [], u = (
2796
2796
  /** @class */
2797
2797
  function() {
2798
2798
  function y(m, v, E) {
@@ -2820,7 +2820,7 @@ var se;
2820
2820
  /** @class */
2821
2821
  function() {
2822
2822
  function y() {
2823
- this._keys = [], this._values = [], this._cacheKey = a, this._cacheIndex = -2;
2823
+ this._keys = [], this._values = [], this._cacheKey = o, this._cacheIndex = -2;
2824
2824
  }
2825
2825
  return Object.defineProperty(y.prototype, "size", {
2826
2826
  get: function() {
@@ -2857,17 +2857,17 @@ var se;
2857
2857
  if (v >= 0) {
2858
2858
  for (var E = this._keys.length, $ = v + 1; $ < E; $++)
2859
2859
  this._keys[$ - 1] = this._keys[$], this._values[$ - 1] = this._values[$];
2860
- return this._keys.length--, this._values.length--, m === this._cacheKey && (this._cacheKey = a, this._cacheIndex = -2), !0;
2860
+ return this._keys.length--, this._values.length--, m === this._cacheKey && (this._cacheKey = o, this._cacheIndex = -2), !0;
2861
2861
  }
2862
2862
  return !1;
2863
2863
  }, y.prototype.clear = function() {
2864
- this._keys.length = 0, this._values.length = 0, this._cacheKey = a, this._cacheIndex = -2;
2864
+ this._keys.length = 0, this._values.length = 0, this._cacheKey = o, this._cacheIndex = -2;
2865
2865
  }, y.prototype.keys = function() {
2866
- return new l(this._keys, this._values, u);
2866
+ return new u(this._keys, this._values, p);
2867
2867
  }, y.prototype.values = function() {
2868
- return new l(this._keys, this._values, g);
2868
+ return new u(this._keys, this._values, g);
2869
2869
  }, y.prototype.entries = function() {
2870
- return new l(this._keys, this._values, H);
2870
+ return new u(this._keys, this._values, H);
2871
2871
  }, y.prototype["@@iterator"] = function() {
2872
2872
  return this.entries();
2873
2873
  }, y.prototype[i] = function() {
@@ -2877,7 +2877,7 @@ var se;
2877
2877
  }, y;
2878
2878
  }()
2879
2879
  );
2880
- function u(y, m) {
2880
+ function p(y, m) {
2881
2881
  return y;
2882
2882
  }
2883
2883
  function g(y, m) {
@@ -2891,44 +2891,44 @@ var se;
2891
2891
  return (
2892
2892
  /** @class */
2893
2893
  function() {
2894
- function a() {
2895
- this._map = new A();
2894
+ function o() {
2895
+ this._map = new T();
2896
2896
  }
2897
- return Object.defineProperty(a.prototype, "size", {
2897
+ return Object.defineProperty(o.prototype, "size", {
2898
2898
  get: function() {
2899
2899
  return this._map.size;
2900
2900
  },
2901
2901
  enumerable: !0,
2902
2902
  configurable: !0
2903
- }), a.prototype.has = function(c) {
2903
+ }), o.prototype.has = function(c) {
2904
2904
  return this._map.has(c);
2905
- }, a.prototype.add = function(c) {
2905
+ }, o.prototype.add = function(c) {
2906
2906
  return this._map.set(c, c), this;
2907
- }, a.prototype.delete = function(c) {
2907
+ }, o.prototype.delete = function(c) {
2908
2908
  return this._map.delete(c);
2909
- }, a.prototype.clear = function() {
2909
+ }, o.prototype.clear = function() {
2910
2910
  this._map.clear();
2911
- }, a.prototype.keys = function() {
2911
+ }, o.prototype.keys = function() {
2912
2912
  return this._map.keys();
2913
- }, a.prototype.values = function() {
2913
+ }, o.prototype.values = function() {
2914
2914
  return this._map.values();
2915
- }, a.prototype.entries = function() {
2915
+ }, o.prototype.entries = function() {
2916
2916
  return this._map.entries();
2917
- }, a.prototype["@@iterator"] = function() {
2917
+ }, o.prototype["@@iterator"] = function() {
2918
2918
  return this.keys();
2919
- }, a.prototype[i] = function() {
2919
+ }, o.prototype[i] = function() {
2920
2920
  return this.keys();
2921
- }, a;
2921
+ }, o;
2922
2922
  }()
2923
2923
  );
2924
2924
  }
2925
2925
  function Oe() {
2926
- var a = 16, c = d.create(), l = u();
2926
+ var o = 16, c = d.create(), u = p();
2927
2927
  return (
2928
2928
  /** @class */
2929
2929
  function() {
2930
2930
  function v() {
2931
- this._key = u();
2931
+ this._key = p();
2932
2932
  }
2933
2933
  return v.prototype.has = function(E) {
2934
2934
  var $ = g(
@@ -2945,12 +2945,12 @@ var se;
2945
2945
  );
2946
2946
  return $ !== void 0 ? d.get($, this._key) : void 0;
2947
2947
  }, v.prototype.set = function(E, $) {
2948
- var Y = g(
2948
+ var q = g(
2949
2949
  E,
2950
2950
  /*create*/
2951
2951
  !0
2952
2952
  );
2953
- return Y[this._key] = $, this;
2953
+ return q[this._key] = $, this;
2954
2954
  }, v.prototype.delete = function(E) {
2955
2955
  var $ = g(
2956
2956
  E,
@@ -2959,11 +2959,11 @@ var se;
2959
2959
  );
2960
2960
  return $ !== void 0 ? delete $[this._key] : !1;
2961
2961
  }, v.prototype.clear = function() {
2962
- this._key = u();
2962
+ this._key = p();
2963
2963
  }, v;
2964
2964
  }()
2965
2965
  );
2966
- function u() {
2966
+ function p() {
2967
2967
  var v;
2968
2968
  do
2969
2969
  v = "@@WeakMap@@" + m();
@@ -2971,12 +2971,12 @@ var se;
2971
2971
  return c[v] = !0, v;
2972
2972
  }
2973
2973
  function g(v, E) {
2974
- if (!t.call(v, l)) {
2974
+ if (!t.call(v, u)) {
2975
2975
  if (!E)
2976
2976
  return;
2977
- Object.defineProperty(v, l, { value: d.create() });
2977
+ Object.defineProperty(v, u, { value: d.create() });
2978
2978
  }
2979
- return v[l];
2979
+ return v[u];
2980
2980
  }
2981
2981
  function H(v, E) {
2982
2982
  for (var $ = 0; $ < E; ++$)
@@ -2987,185 +2987,198 @@ var se;
2987
2987
  return typeof Uint8Array == "function" ? typeof crypto < "u" ? crypto.getRandomValues(new Uint8Array(v)) : typeof msCrypto < "u" ? msCrypto.getRandomValues(new Uint8Array(v)) : H(new Uint8Array(v), v) : H(new Array(v), v);
2988
2988
  }
2989
2989
  function m() {
2990
- var v = y(a);
2990
+ var v = y(o);
2991
2991
  v[6] = v[6] & 79 | 64, v[8] = v[8] & 191 | 128;
2992
- for (var E = "", $ = 0; $ < a; ++$) {
2993
- var Y = v[$];
2994
- ($ === 4 || $ === 6 || $ === 8) && (E += "-"), Y < 16 && (E += "0"), E += Y.toString(16).toLowerCase();
2992
+ for (var E = "", $ = 0; $ < o; ++$) {
2993
+ var q = v[$];
2994
+ ($ === 4 || $ === 6 || $ === 8) && (E += "-"), q < 16 && (E += "0"), E += q.toString(16).toLowerCase();
2995
2995
  }
2996
2996
  return E;
2997
2997
  }
2998
2998
  }
2999
- function Ot(a) {
3000
- return a.__ = void 0, delete a.__, a;
2999
+ function Ot(o) {
3000
+ return o.__ = void 0, delete o.__, o;
3001
3001
  }
3002
3002
  });
3003
3003
  })(se || (se = {}));
3004
3004
  function en(s) {
3005
- Le(s, "svelte-3iboz2", '#liveroom-client-element.svelte-3iboz2.svelte-3iboz2{font-family:Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#users-container.svelte-3iboz2.svelte-3iboz2{z-index:99999;position:fixed;inset:0;overflow:hidden;pointer-events:none}.user.svelte-3iboz2.svelte-3iboz2{z-index:10;position:absolute;top:0;left:0;user-select:none;transform:translate(var(--x), var(--y))}.user.svelte-3iboz2 .cursor.svelte-3iboz2{position:absolute;top:0;left:0;color:var(--color);transform-origin:top left;transform:rotate(6deg)}.user[data-isself="true"].svelte-3iboz2 .cursor.svelte-3iboz2{display:none}.user-name.svelte-3iboz2.svelte-3iboz2{padding:4px 10px;font-size:14px;line-height:20px;font-weight:600;color:black;background-color:var(--color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:9999px;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-3iboz2 .user-name.svelte-3iboz2{position:absolute;top:20px;left:16px}.user[data-isself="true"].svelte-3iboz2 .user-name.svelte-3iboz2{display:none}.user.svelte-3iboz2 .halo.svelte-3iboz2{transform:scale(0);z-index:-1;position:absolute;top:-60px;left:-60px;width:120px;height:120px;border-radius:9999px;background-color:var(--color);opacity:0.25;transition:transform 0.15s ease-out;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-3iboz2 .halo[data-show="true"].svelte-3iboz2{transform:scale(1)}');
3005
+ Le(s, "svelte-1tmn7wo", '#liveroom-client-element.svelte-1tmn7wo.svelte-1tmn7wo{font-family:Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;line-height:1.5;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}#users-container.svelte-1tmn7wo.svelte-1tmn7wo{z-index:99999;position:fixed;inset:0;overflow:hidden;pointer-events:none}.user.svelte-1tmn7wo.svelte-1tmn7wo{z-index:10;position:absolute;top:0;left:0;user-select:none;transform:translate(var(--x), var(--y))}.user.svelte-1tmn7wo .cursor.svelte-1tmn7wo{position:absolute;top:0;left:0;color:var(--color);transform-origin:top left;transform:rotate(6deg)}.user[data-isself="true"].svelte-1tmn7wo .cursor.svelte-1tmn7wo{display:none}.user-name.svelte-1tmn7wo.svelte-1tmn7wo{padding:4px 10px;font-size:14px;line-height:20px;font-weight:600;color:black;background-color:var(--color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:9999px;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-1tmn7wo .user-name.svelte-1tmn7wo{position:absolute;top:20px;left:16px}.user[data-isself="true"].svelte-1tmn7wo .user-name.svelte-1tmn7wo{display:none}.user.svelte-1tmn7wo .halo.svelte-1tmn7wo{transform:scale(0);z-index:-1;position:absolute;top:-60px;left:-60px;width:120px;height:120px;border-radius:9999px;background-color:var(--color);opacity:0.25;transition:transform 100ms ease-out;box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05)}.user.svelte-1tmn7wo .halo[data-show="true"].svelte-1tmn7wo{transform:scale(1)}');
3006
3006
  }
3007
3007
  function ne(s, n, t) {
3008
3008
  const e = s.slice();
3009
- return e[16] = n[t], e;
3009
+ return e[18] = n[t], e;
3010
3010
  }
3011
3011
  function re(s) {
3012
3012
  let n, t = [], e = /* @__PURE__ */ new Map(), r = te(Object.values(
3013
3013
  /*users*/
3014
- s[2]
3014
+ s[0]
3015
3015
  ));
3016
- const i = (o) => (
3016
+ const i = (a) => (
3017
3017
  /*user*/
3018
- o[16].id
3018
+ a[18].id
3019
3019
  );
3020
- for (let o = 0; o < r.length; o += 1) {
3021
- let h = ne(s, r, o), p = i(h);
3022
- e.set(p, t[o] = ie(p, h));
3020
+ for (let a = 0; a < r.length; a += 1) {
3021
+ let h = ne(s, r, a), l = i(h);
3022
+ e.set(l, t[a] = ie(l, h));
3023
3023
  }
3024
3024
  return {
3025
3025
  c() {
3026
- n = Q("div");
3027
- for (let o = 0; o < t.length; o += 1)
3028
- t[o].c();
3029
- S(n, "id", "users-container"), S(n, "class", "svelte-3iboz2");
3026
+ n = Z("div");
3027
+ for (let a = 0; a < t.length; a += 1)
3028
+ t[a].c();
3029
+ S(n, "id", "users-container"), S(n, "class", "svelte-1tmn7wo");
3030
3030
  },
3031
- m(o, h) {
3032
- Ct(o, n, h);
3033
- for (let p = 0; p < t.length; p += 1)
3034
- t[p] && t[p].m(n, null);
3031
+ m(a, h) {
3032
+ Ct(a, n, h);
3033
+ for (let l = 0; l < t.length; l += 1)
3034
+ t[l] && t[l].m(n, null);
3035
3035
  },
3036
- p(o, h) {
3037
- h & /*Object, users, me, parseFloat*/
3038
- 6 && (r = te(Object.values(
3036
+ p(a, h) {
3037
+ h & /*Object, users, me, parseFloat, users_count*/
3038
+ 13 && (r = te(Object.values(
3039
3039
  /*users*/
3040
- o[2]
3041
- )), t = Ge(t, h, i, 1, o, r, e, n, We, ie, null, ne));
3040
+ a[0]
3041
+ )), t = Ge(t, h, i, 1, a, r, e, n, We, ie, null, ne));
3042
3042
  },
3043
- d(o) {
3044
- o && gt(n);
3043
+ d(a) {
3044
+ a && vt(n);
3045
3045
  for (let h = 0; h < t.length; h += 1)
3046
3046
  t[h].d();
3047
3047
  }
3048
3048
  };
3049
3049
  }
3050
3050
  function ie(s, n) {
3051
- let t, e, r, i, o, h = (
3051
+ let t, e, r, i, a, h = (
3052
3052
  /*user*/
3053
- n[16].name + ""
3054
- ), p, d, b, _, A, T, j;
3053
+ n[18].name + ""
3054
+ ), l, d, _, b, T, O, x;
3055
3055
  return {
3056
3056
  key: s,
3057
3057
  first: null,
3058
3058
  c() {
3059
- t = Q("div"), e = Qt("svg"), r = Qt("path"), i = jt(), o = Q("span"), p = he(h), d = jt(), b = Q("div"), A = jt(), S(r, "d", "M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"), S(e, "width", "23"), S(e, "viewBox", "0 0 27 24"), S(e, "fill", "currentColor"), S(e, "aria-hidden", "true"), S(e, "xmlns", "http://www.w3.org/2000/svg"), S(e, "class", "cursor svelte-3iboz2"), S(o, "class", "user-name svelte-3iboz2"), S(b, "class", "halo svelte-3iboz2"), S(b, "data-show", _ = /*user*/
3060
- n[16].is_mouse_down || /*user*/
3061
- n[16].is_shift_key_down), S(t, "id", T = "user-" + /*user*/
3062
- n[16].id), S(t, "class", "user svelte-3iboz2"), S(t, "data-isself", j = /*user*/
3063
- n[16].id == /*me*/
3064
- n[1].id), st(
3059
+ t = Z("div"), e = Qt("svg"), r = Qt("path"), i = jt(), a = Z("span"), l = he(h), d = jt(), _ = Z("div"), T = jt(), S(r, "d", "M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"), S(e, "width", "23"), S(e, "viewBox", "0 0 27 24"), S(e, "fill", "currentColor"), S(e, "aria-hidden", "true"), S(e, "xmlns", "http://www.w3.org/2000/svg"), S(e, "class", "cursor svelte-1tmn7wo"), S(a, "class", "user-name svelte-1tmn7wo"), S(_, "class", "halo svelte-1tmn7wo"), S(_, "data-show", b = /*user*/
3060
+ (n[18].id == /*me*/
3061
+ n[2].id && /*user*/
3062
+ n[18].is_shift_key_down || /*user*/
3063
+ n[18].id != /*me*/
3064
+ n[2].id && /*user*/
3065
+ (n[18].is_shift_key_down || /*user*/
3066
+ n[18].is_mouse_down)) && /*users_count*/
3067
+ n[3] > 1), S(t, "id", O = "user-" + /*user*/
3068
+ n[18].id), S(t, "class", "user svelte-1tmn7wo"), S(t, "data-isself", x = /*user*/
3069
+ n[18].id == /*me*/
3070
+ n[2].id), st(
3065
3071
  t,
3066
3072
  "--color",
3067
3073
  /*user*/
3068
- n[16].color
3074
+ n[18].color
3069
3075
  ), st(t, "--x", parseFloat(
3070
3076
  /*user*/
3071
- n[16].x
3077
+ n[18].x
3072
3078
  ) + "vw"), st(t, "--y", parseFloat(
3073
3079
  /*user*/
3074
- n[16].y
3080
+ n[18].y
3075
3081
  ) + "vh"), this.first = t;
3076
3082
  },
3077
3083
  m(R, M) {
3078
- Ct(R, t, M), W(t, e), W(e, r), W(t, i), W(t, o), W(o, p), W(t, d), W(t, b), W(t, A);
3084
+ Ct(R, t, M), F(t, e), F(e, r), F(t, i), F(t, a), F(a, l), F(t, d), F(t, _), F(t, T);
3079
3085
  },
3080
3086
  p(R, M) {
3081
3087
  n = R, M & /*users*/
3082
- 4 && h !== (h = /*user*/
3083
- n[16].name + "") && Pe(p, h), M & /*users*/
3084
- 4 && _ !== (_ = /*user*/
3085
- n[16].is_mouse_down || /*user*/
3086
- n[16].is_shift_key_down) && S(b, "data-show", _), M & /*users*/
3087
- 4 && T !== (T = "user-" + /*user*/
3088
- n[16].id) && S(t, "id", T), M & /*users, me*/
3089
- 6 && j !== (j = /*user*/
3090
- n[16].id == /*me*/
3091
- n[1].id) && S(t, "data-isself", j), M & /*users*/
3092
- 4 && st(
3088
+ 1 && h !== (h = /*user*/
3089
+ n[18].name + "") && Pe(l, h), M & /*users, me, users_count*/
3090
+ 13 && b !== (b = /*user*/
3091
+ (n[18].id == /*me*/
3092
+ n[2].id && /*user*/
3093
+ n[18].is_shift_key_down || /*user*/
3094
+ n[18].id != /*me*/
3095
+ n[2].id && /*user*/
3096
+ (n[18].is_shift_key_down || /*user*/
3097
+ n[18].is_mouse_down)) && /*users_count*/
3098
+ n[3] > 1) && S(_, "data-show", b), M & /*users*/
3099
+ 1 && O !== (O = "user-" + /*user*/
3100
+ n[18].id) && S(t, "id", O), M & /*users, me*/
3101
+ 5 && x !== (x = /*user*/
3102
+ n[18].id == /*me*/
3103
+ n[2].id) && S(t, "data-isself", x), M & /*users*/
3104
+ 1 && st(
3093
3105
  t,
3094
3106
  "--color",
3095
3107
  /*user*/
3096
- n[16].color
3108
+ n[18].color
3097
3109
  ), M & /*users*/
3098
- 4 && st(t, "--x", parseFloat(
3110
+ 1 && st(t, "--x", parseFloat(
3099
3111
  /*user*/
3100
- n[16].x
3112
+ n[18].x
3101
3113
  ) + "vw"), M & /*users*/
3102
- 4 && st(t, "--y", parseFloat(
3114
+ 1 && st(t, "--y", parseFloat(
3103
3115
  /*user*/
3104
- n[16].y
3116
+ n[18].y
3105
3117
  ) + "vh");
3106
3118
  },
3107
3119
  d(R) {
3108
- R && gt(t);
3120
+ R && vt(t);
3109
3121
  }
3110
3122
  };
3111
3123
  }
3112
3124
  function sn(s) {
3113
3125
  let n, t = (
3114
3126
  /*me*/
3115
- s[1] && /*users*/
3116
- s[2] && re(s)
3127
+ s[2] && /*users*/
3128
+ s[0] && re(s)
3117
3129
  );
3118
3130
  return {
3119
3131
  c() {
3120
- n = Q("div"), t && t.c(), S(n, "id", "liveroom-client-element"), S(n, "class", "svelte-3iboz2");
3132
+ n = Z("div"), t && t.c(), S(n, "id", "liveroom-client-element"), S(n, "class", "svelte-1tmn7wo");
3121
3133
  },
3122
3134
  m(e, r) {
3123
- Ct(e, n, r), t && t.m(n, null), s[5](n);
3135
+ Ct(e, n, r), t && t.m(n, null), s[7](n);
3124
3136
  },
3125
3137
  p(e, [r]) {
3126
3138
  /*me*/
3127
- e[1] && /*users*/
3128
- e[2] ? t ? t.p(e, r) : (t = re(e), t.c(), t.m(n, null)) : t && (t.d(1), t = null);
3139
+ e[2] && /*users*/
3140
+ e[0] ? t ? t.p(e, r) : (t = re(e), t.c(), t.m(n, null)) : t && (t.d(1), t = null);
3129
3141
  },
3130
- i: ut,
3131
- o: ut,
3142
+ i: pt,
3143
+ o: pt,
3132
3144
  d(e) {
3133
- e && gt(n), t && t.d(), s[5](null);
3145
+ e && vt(n), t && t.d(), s[7](null);
3134
3146
  }
3135
3147
  };
3136
3148
  }
3137
3149
  function nn(s, n, t) {
3138
- let { url: e } = n, { room_id: r } = n, i, o, h, p;
3150
+ let { url: e } = n, { room_id: r } = n, { user_name: i } = n, a, h, l, d, _;
3139
3151
  De(async () => {
3140
- const B = new URLSearchParams(window.location.search).get("_liveroom"), U = B == null ? void 0 : B.split("https://meet.google.com/");
3141
- let q = U == null ? void 0 : U[0];
3142
- !!(U != null && U[1]) && (q = U[1].split("?")[0]), t(3, r = q || r), d();
3152
+ const k = new URLSearchParams(window.location.search), V = k.get("_liveroom"), A = V == null ? void 0 : V.split("https://meet.google.com/");
3153
+ let P = A == null ? void 0 : A[0];
3154
+ !!(A != null && A[1]) && (P = A[1].split("?")[0]), t(4, r = P || r), t(5, i = k.get("_liveroom_user_name")), b();
3143
3155
  }), Ue(() => {
3144
- b();
3156
+ T();
3145
3157
  });
3146
- function d() {
3147
- o = new tn({
3158
+ function b() {
3159
+ h = new tn({
3148
3160
  url: e,
3149
3161
  topic: `liveroom-livestate:${r}`,
3150
3162
  params: {
3151
3163
  room_id: r,
3164
+ user_name: i,
3152
3165
  current_url: window.origin,
3153
3166
  inner_width: window.innerWidth,
3154
3167
  inner_height: window.innerHeight
3155
3168
  }
3156
- }), o.connect(), o.addEventListener("livestate-change", ({ detail: { state: k } }) => {
3157
- t(3, r = k.room_id), t(1, h = k.me), t(2, p = k.users);
3158
- }), window.addEventListener("mousemove", _), window.addEventListener("mousedown", A), window.addEventListener("mouseup", T), window.addEventListener("keydown", R), window.addEventListener("keyup", M), window.addEventListener("resize", X);
3169
+ }), h.connect(), h.addEventListener("livestate-change", ({ detail: { state: k } }) => {
3170
+ t(4, r = k.room_id), t(2, l = k.me), t(0, d = k.users);
3171
+ }), window.addEventListener("mousemove", O), window.addEventListener("mousedown", x), window.addEventListener("mouseup", R), window.addEventListener("keydown", G), window.addEventListener("keyup", X), window.addEventListener("resize", Y);
3159
3172
  }
3160
- function b() {
3161
- window.removeEventListener("resize", X), window.removeEventListener("keyup", M), window.removeEventListener("keydown", R), window.removeEventListener("mouseup", T), window.removeEventListener("mousedown", A), window.removeEventListener("mousemove", _), o == null || o.disconnect();
3173
+ function T() {
3174
+ window.removeEventListener("resize", Y), window.removeEventListener("keyup", X), window.removeEventListener("keydown", G), window.removeEventListener("mouseup", R), window.removeEventListener("mousedown", x), window.removeEventListener("mousemove", O), h == null || h.disconnect();
3162
3175
  }
3163
- function _(k) {
3164
- o && (h != null && h.id) && o.dispatchEvent(new CustomEvent(
3176
+ function O(k) {
3177
+ h && (l != null && l.id) && h.dispatchEvent(new CustomEvent(
3165
3178
  "mouse_move",
3166
3179
  {
3167
3180
  detail: {
3168
- user_id: h.id,
3181
+ user_id: l.id,
3169
3182
  x: Number(k.clientX / window.innerWidth * 100).toFixed(2),
3170
3183
  // in %
3171
3184
  y: Number(k.clientY / window.innerHeight * 100).toFixed(2)
@@ -3174,58 +3187,67 @@ function nn(s, n, t) {
3174
3187
  }
3175
3188
  ));
3176
3189
  }
3177
- function A() {
3178
- o && (h != null && h.id) && o.dispatchEvent(new CustomEvent("mouse_down", { detail: { user_id: h.id } }));
3190
+ function x() {
3191
+ h && (l != null && l.id) && h.dispatchEvent(new CustomEvent("mouse_down", { detail: { user_id: l.id } }));
3179
3192
  }
3180
- function T() {
3181
- o && (h != null && h.id) && o.dispatchEvent(new CustomEvent("mouse_up", { detail: { user_id: h.id } }));
3193
+ function R() {
3194
+ h && (l != null && l.id) && h.dispatchEvent(new CustomEvent("mouse_up", { detail: { user_id: l.id } }));
3182
3195
  }
3183
- const j = ["Shift"];
3184
- function R(k) {
3185
- !k.repeat && j.includes(k.key) && o && (h != null && h.id) && o.dispatchEvent(new CustomEvent("key_down", { detail: { key: k.key, user_id: h.id } }));
3196
+ const M = ["Shift"];
3197
+ function G(k) {
3198
+ !k.repeat && M.includes(k.key) && h && (l != null && l.id) && h.dispatchEvent(new CustomEvent("key_down", { detail: { key: k.key, user_id: l.id } }));
3186
3199
  }
3187
- function M(k) {
3188
- j.includes(k.key) && o && (h != null && h.id) && o.dispatchEvent(new CustomEvent("key_up", { detail: { key: k.key, user_id: h.id } }));
3200
+ function X(k) {
3201
+ M.includes(k.key) && h && (l != null && l.id) && h.dispatchEvent(new CustomEvent("key_up", { detail: { key: k.key, user_id: l.id } }));
3189
3202
  }
3190
- function X() {
3191
- o && (h != null && h.id) && o.dispatchEvent(new CustomEvent(
3203
+ function Y() {
3204
+ h && (l != null && l.id) && h.dispatchEvent(new CustomEvent(
3192
3205
  "window_resize",
3193
3206
  {
3194
3207
  detail: {
3195
3208
  inner_width: window.innerWidth,
3196
3209
  inner_height: window.innerHeight,
3197
- user_id: h.id
3210
+ user_id: l.id
3198
3211
  }
3199
3212
  }
3200
3213
  ));
3201
3214
  }
3202
- function Z(k) {
3215
+ function Q(k) {
3203
3216
  Mt[k ? "unshift" : "push"](() => {
3204
- i = k, t(0, i);
3217
+ a = k, t(1, a);
3205
3218
  });
3206
3219
  }
3207
3220
  return s.$$set = (k) => {
3208
- "url" in k && t(4, e = k.url), "room_id" in k && t(3, r = k.room_id);
3209
- }, [i, h, p, r, e, Z];
3221
+ "url" in k && t(6, e = k.url), "room_id" in k && t(4, r = k.room_id), "user_name" in k && t(5, i = k.user_name);
3222
+ }, s.$$.update = () => {
3223
+ s.$$.dirty & /*users*/
3224
+ 1 && t(3, _ = Object.keys(d || {}).length);
3225
+ }, [d, a, l, _, r, i, e, Q];
3210
3226
  }
3211
3227
  class rn extends Ke {
3212
3228
  constructor(n) {
3213
- super(), Ze(this, n, nn, sn, Se, { url: 4, room_id: 3 }, en);
3229
+ super(), Ze(this, n, nn, sn, Se, { url: 6, room_id: 4, user_name: 5 }, en);
3214
3230
  }
3215
3231
  get url() {
3216
- return this.$$.ctx[4];
3232
+ return this.$$.ctx[6];
3217
3233
  }
3218
3234
  set url(n) {
3219
- this.$$set({ url: n }), bt();
3235
+ this.$$set({ url: n }), ct();
3220
3236
  }
3221
3237
  get room_id() {
3222
- return this.$$.ctx[3];
3238
+ return this.$$.ctx[4];
3223
3239
  }
3224
3240
  set room_id(n) {
3225
- this.$$set({ room_id: n }), bt();
3241
+ this.$$set({ room_id: n }), ct();
3242
+ }
3243
+ get user_name() {
3244
+ return this.$$.ctx[5];
3245
+ }
3246
+ set user_name(n) {
3247
+ this.$$set({ user_name: n }), ct();
3226
3248
  }
3227
3249
  }
3228
- customElements.define("liveroom-client-element", Qe(rn, { url: {}, room_id: {} }, [], [], !0));
3250
+ customElements.define("liveroom-client-element", Qe(rn, { url: {}, room_id: {}, user_name: {} }, [], [], !0));
3229
3251
  export {
3230
3252
  rn as default
3231
3253
  };