@antcde/vue-utils 0.1.0 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +309 -308
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { useColorMode as _t, objectPick as It, objectOmit as nt, useMagicKeys as Et, whenever as Ot, useAsyncState as At, watchDebounced as jt } from "@vueuse/core";
2
- import { computed as S, ref as g, watch as z, onBeforeUnmount as ot, inject as Pt, unref as Tt, watchEffect as Ct } from "vue";
3
- import { useI18n as H } from "vue-i18n";
4
- import { newCommsClient as kt, newCommsHost as Lt } from "@antcde/connect-ts";
5
- function Ue(e, r) {
6
- const t = _t(r), n = S(() => e.context.value.darkMode), o = S(() => {
1
+ import { useColorMode as It, objectPick as Et, objectOmit as ot, useMagicKeys as Ot, whenever as E, useAsyncState as At, watchDebounced as jt } from "@vueuse/core";
2
+ import { computed as g, ref as S, watch as z, onBeforeUnmount as it, onMounted as Pt, inject as Tt, unref as Ct, watchEffect as kt } from "vue";
3
+ import { useI18n as G } from "vue-i18n";
4
+ import { newCommsClient as Lt, newCommsHost as Ut } from "@antcde/connect-ts";
5
+ function Re(e, r) {
6
+ const t = It(r), n = g(() => e.context.value.darkMode), o = g(() => {
7
7
  switch (n.value) {
8
8
  case null:
9
9
  return "auto";
@@ -14,7 +14,7 @@ function Ue(e, r) {
14
14
  default:
15
15
  return t.value;
16
16
  }
17
- }), i = S(() => {
17
+ }), i = g(() => {
18
18
  switch (o.value) {
19
19
  case "light":
20
20
  case "auto":
@@ -26,14 +26,14 @@ function Ue(e, r) {
26
26
  return Object.assign(
27
27
  o,
28
28
  { host: n, isDark: i },
29
- It(t, ["state", "system", "store"])
29
+ Et(t, ["state", "system", "store"])
30
30
  );
31
31
  }
32
- function Re(e, r) {
33
- const t = g(H(r));
32
+ function Me(e, r) {
33
+ const t = S(G(r));
34
34
  return z(
35
35
  e.locales.value,
36
- ({ locale: n }) => t.value = H({ ...r, locale: n })
36
+ ({ locale: n }) => t.value = G({ ...r, locale: n })
37
37
  ), Object.keys(t.value).reduce(
38
38
  (n, o) => Object.defineProperty(n, o, {
39
39
  get: () => t.value[o],
@@ -42,23 +42,23 @@ function Re(e, r) {
42
42
  {}
43
43
  );
44
44
  }
45
- var G = function(e, r) {
46
- return G = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
45
+ var K = function(e, r) {
46
+ return K = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
47
47
  t.__proto__ = n;
48
48
  } || function(t, n) {
49
49
  for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
50
- }, G(e, r);
50
+ }, K(e, r);
51
51
  };
52
52
  function x(e, r) {
53
53
  if (typeof r != "function" && r !== null)
54
54
  throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
55
- G(e, r);
55
+ K(e, r);
56
56
  function t() {
57
57
  this.constructor = e;
58
58
  }
59
59
  e.prototype = r === null ? Object.create(r) : (t.prototype = r.prototype, new t());
60
60
  }
61
- function Ut(e, r, t, n) {
61
+ function Rt(e, r, t, n) {
62
62
  function o(i) {
63
63
  return i instanceof t ? i : new t(function(u) {
64
64
  u(i);
@@ -68,15 +68,15 @@ function Ut(e, r, t, n) {
68
68
  function c(l) {
69
69
  try {
70
70
  s(n.next(l));
71
- } catch (p) {
72
- u(p);
71
+ } catch (d) {
72
+ u(d);
73
73
  }
74
74
  }
75
75
  function a(l) {
76
76
  try {
77
77
  s(n.throw(l));
78
- } catch (p) {
79
- u(p);
78
+ } catch (d) {
79
+ u(d);
80
80
  }
81
81
  }
82
82
  function s(l) {
@@ -85,7 +85,7 @@ function Ut(e, r, t, n) {
85
85
  s((n = n.apply(e, r || [])).next());
86
86
  });
87
87
  }
88
- function it(e, r) {
88
+ function ut(e, r) {
89
89
  var t = { label: 0, sent: function() {
90
90
  if (i[0] & 1) throw i[1];
91
91
  return i[1];
@@ -145,7 +145,7 @@ function it(e, r) {
145
145
  return { value: s[0] ? s[1] : void 0, done: !0 };
146
146
  }
147
147
  }
148
- function j(e) {
148
+ function P(e) {
149
149
  var r = typeof Symbol == "function" && Symbol.iterator, t = r && e[r], n = 0;
150
150
  if (t) return t.call(e);
151
151
  if (e && typeof e.length == "number") return {
@@ -155,7 +155,7 @@ function j(e) {
155
155
  };
156
156
  throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
157
157
  }
158
- function R(e, r) {
158
+ function M(e, r) {
159
159
  var t = typeof Symbol == "function" && e[Symbol.iterator];
160
160
  if (!t) return e;
161
161
  var n = t.call(e), o, i = [], u;
@@ -177,51 +177,51 @@ function F(e, r, t) {
177
177
  (i || !(n in r)) && (i || (i = Array.prototype.slice.call(r, 0, n)), i[n] = r[n]);
178
178
  return e.concat(i || Array.prototype.slice.call(r));
179
179
  }
180
- function A(e) {
181
- return this instanceof A ? (this.v = e, this) : new A(e);
180
+ function j(e) {
181
+ return this instanceof j ? (this.v = e, this) : new j(e);
182
182
  }
183
- function Rt(e, r, t) {
183
+ function Mt(e, r, t) {
184
184
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
185
185
  var n = t.apply(e, r || []), o, i = [];
186
186
  return o = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), c("next"), c("throw"), c("return", u), o[Symbol.asyncIterator] = function() {
187
187
  return this;
188
188
  }, o;
189
- function u(h) {
189
+ function u(f) {
190
190
  return function(b) {
191
- return Promise.resolve(b).then(h, p);
191
+ return Promise.resolve(b).then(f, d);
192
192
  };
193
193
  }
194
- function c(h, b) {
195
- n[h] && (o[h] = function(v) {
196
- return new Promise(function(O, f) {
197
- i.push([h, v, O, f]) > 1 || a(h, v);
194
+ function c(f, b) {
195
+ n[f] && (o[f] = function(v) {
196
+ return new Promise(function(A, h) {
197
+ i.push([f, v, A, h]) > 1 || a(f, v);
198
198
  });
199
- }, b && (o[h] = b(o[h])));
199
+ }, b && (o[f] = b(o[f])));
200
200
  }
201
- function a(h, b) {
201
+ function a(f, b) {
202
202
  try {
203
- s(n[h](b));
203
+ s(n[f](b));
204
204
  } catch (v) {
205
205
  y(i[0][3], v);
206
206
  }
207
207
  }
208
- function s(h) {
209
- h.value instanceof A ? Promise.resolve(h.value.v).then(l, p) : y(i[0][2], h);
208
+ function s(f) {
209
+ f.value instanceof j ? Promise.resolve(f.value.v).then(l, d) : y(i[0][2], f);
210
210
  }
211
- function l(h) {
212
- a("next", h);
211
+ function l(f) {
212
+ a("next", f);
213
213
  }
214
- function p(h) {
215
- a("throw", h);
214
+ function d(f) {
215
+ a("throw", f);
216
216
  }
217
- function y(h, b) {
218
- h(b), i.shift(), i.length && a(i[0][0], i[0][1]);
217
+ function y(f, b) {
218
+ f(b), i.shift(), i.length && a(i[0][0], i[0][1]);
219
219
  }
220
220
  }
221
221
  function Ft(e) {
222
222
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
223
223
  var r = e[Symbol.asyncIterator], t;
224
- return r ? r.call(e) : (e = typeof j == "function" ? j(e) : e[Symbol.iterator](), t = {}, n("next"), n("throw"), n("return"), t[Symbol.asyncIterator] = function() {
224
+ return r ? r.call(e) : (e = typeof P == "function" ? P(e) : e[Symbol.iterator](), t = {}, n("next"), n("throw"), n("return"), t[Symbol.asyncIterator] = function() {
225
225
  return this;
226
226
  }, t);
227
227
  function n(i) {
@@ -237,16 +237,16 @@ function Ft(e) {
237
237
  }, u);
238
238
  }
239
239
  }
240
- function d(e) {
240
+ function p(e) {
241
241
  return typeof e == "function";
242
242
  }
243
- function ut(e) {
243
+ function st(e) {
244
244
  var r = function(n) {
245
245
  Error.call(n), n.stack = new Error().stack;
246
246
  }, t = e(r);
247
247
  return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t;
248
248
  }
249
- var D = ut(function(e) {
249
+ var H = st(function(e) {
250
250
  return function(t) {
251
251
  e(this), this.message = t ? t.length + ` errors occurred during unsubscription:
252
252
  ` + t.map(function(n, o) {
@@ -255,13 +255,13 @@ var D = ut(function(e) {
255
255
  `) : "", this.name = "UnsubscriptionError", this.errors = t;
256
256
  };
257
257
  });
258
- function M(e, r) {
258
+ function V(e, r) {
259
259
  if (e) {
260
260
  var t = e.indexOf(r);
261
261
  0 <= t && e.splice(t, 1);
262
262
  }
263
263
  }
264
- var P = function() {
264
+ var T = function() {
265
265
  function e(r) {
266
266
  this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
267
267
  }
@@ -273,7 +273,7 @@ var P = function() {
273
273
  if (u)
274
274
  if (this._parentage = null, Array.isArray(u))
275
275
  try {
276
- for (var c = j(u), a = c.next(); !a.done; a = c.next()) {
276
+ for (var c = P(u), a = c.next(); !a.done; a = c.next()) {
277
277
  var s = a.value;
278
278
  s.remove(this);
279
279
  }
@@ -289,42 +289,42 @@ var P = function() {
289
289
  else
290
290
  u.remove(this);
291
291
  var l = this.initialTeardown;
292
- if (d(l))
292
+ if (p(l))
293
293
  try {
294
294
  l();
295
295
  } catch (v) {
296
- i = v instanceof D ? v.errors : [v];
296
+ i = v instanceof H ? v.errors : [v];
297
297
  }
298
- var p = this._finalizers;
299
- if (p) {
298
+ var d = this._finalizers;
299
+ if (d) {
300
300
  this._finalizers = null;
301
301
  try {
302
- for (var y = j(p), h = y.next(); !h.done; h = y.next()) {
303
- var b = h.value;
302
+ for (var y = P(d), f = y.next(); !f.done; f = y.next()) {
303
+ var b = f.value;
304
304
  try {
305
- Q(b);
305
+ X(b);
306
306
  } catch (v) {
307
- i = i ?? [], v instanceof D ? i = F(F([], R(i)), R(v.errors)) : i.push(v);
307
+ i = i ?? [], v instanceof H ? i = F(F([], M(i)), M(v.errors)) : i.push(v);
308
308
  }
309
309
  }
310
310
  } catch (v) {
311
311
  n = { error: v };
312
312
  } finally {
313
313
  try {
314
- h && !h.done && (o = y.return) && o.call(y);
314
+ f && !f.done && (o = y.return) && o.call(y);
315
315
  } finally {
316
316
  if (n) throw n.error;
317
317
  }
318
318
  }
319
319
  }
320
320
  if (i)
321
- throw new D(i);
321
+ throw new H(i);
322
322
  }
323
323
  }, e.prototype.add = function(r) {
324
324
  var t;
325
325
  if (r && r !== this)
326
326
  if (this.closed)
327
- Q(r);
327
+ X(r);
328
328
  else {
329
329
  if (r instanceof e) {
330
330
  if (r.closed || r._hasParent(this))
@@ -341,52 +341,52 @@ var P = function() {
341
341
  this._parentage = Array.isArray(t) ? (t.push(r), t) : t ? [t, r] : r;
342
342
  }, e.prototype._removeParent = function(r) {
343
343
  var t = this._parentage;
344
- t === r ? this._parentage = null : Array.isArray(t) && M(t, r);
344
+ t === r ? this._parentage = null : Array.isArray(t) && V(t, r);
345
345
  }, e.prototype.remove = function(r) {
346
346
  var t = this._finalizers;
347
- t && M(t, r), r instanceof e && r._removeParent(this);
347
+ t && V(t, r), r instanceof e && r._removeParent(this);
348
348
  }, e.EMPTY = function() {
349
349
  var r = new e();
350
350
  return r.closed = !0, r;
351
351
  }(), e;
352
- }(), st = P.EMPTY;
353
- function ct(e) {
354
- return e instanceof P || e && "closed" in e && d(e.remove) && d(e.add) && d(e.unsubscribe);
352
+ }(), ct = T.EMPTY;
353
+ function at(e) {
354
+ return e instanceof T || e && "closed" in e && p(e.remove) && p(e.add) && p(e.unsubscribe);
355
355
  }
356
- function Q(e) {
357
- d(e) ? e() : e.unsubscribe();
356
+ function X(e) {
357
+ p(e) ? e() : e.unsubscribe();
358
358
  }
359
- var Mt = {
359
+ var Vt = {
360
360
  Promise: void 0
361
- }, Vt = {
361
+ }, Bt = {
362
362
  setTimeout: function(e, r) {
363
363
  for (var t = [], n = 2; n < arguments.length; n++)
364
364
  t[n - 2] = arguments[n];
365
- return setTimeout.apply(void 0, F([e, r], R(t)));
365
+ return setTimeout.apply(void 0, F([e, r], M(t)));
366
366
  },
367
367
  clearTimeout: function(e) {
368
368
  return clearTimeout(e);
369
369
  },
370
370
  delegate: void 0
371
371
  };
372
- function at(e) {
373
- Vt.setTimeout(function() {
372
+ function lt(e) {
373
+ Bt.setTimeout(function() {
374
374
  throw e;
375
375
  });
376
376
  }
377
- function X() {
377
+ function Z() {
378
378
  }
379
- function U(e) {
379
+ function R(e) {
380
380
  e();
381
381
  }
382
- var q = function(e) {
382
+ var W = function(e) {
383
383
  x(r, e);
384
384
  function r(t) {
385
385
  var n = e.call(this) || this;
386
- return n.isStopped = !1, t ? (n.destination = t, ct(t) && t.add(n)) : n.destination = Yt, n;
386
+ return n.isStopped = !1, t ? (n.destination = t, at(t) && t.add(n)) : n.destination = Yt, n;
387
387
  }
388
388
  return r.create = function(t, n, o) {
389
- return new K(t, n, o);
389
+ return new q(t, n, o);
390
390
  }, r.prototype.next = function(t) {
391
391
  this.isStopped || this._next(t);
392
392
  }, r.prototype.error = function(t) {
@@ -410,7 +410,7 @@ var q = function(e) {
410
410
  this.unsubscribe();
411
411
  }
412
412
  }, r;
413
- }(P), Bt = function() {
413
+ }(T), Dt = function() {
414
414
  function e(r) {
415
415
  this.partialObserver = r;
416
416
  }
@@ -420,7 +420,7 @@ var q = function(e) {
420
420
  try {
421
421
  t.next(r);
422
422
  } catch (n) {
423
- L(n);
423
+ U(n);
424
424
  }
425
425
  }, e.prototype.error = function(r) {
426
426
  var t = this.partialObserver;
@@ -428,50 +428,50 @@ var q = function(e) {
428
428
  try {
429
429
  t.error(r);
430
430
  } catch (n) {
431
- L(n);
431
+ U(n);
432
432
  }
433
433
  else
434
- L(r);
434
+ U(r);
435
435
  }, e.prototype.complete = function() {
436
436
  var r = this.partialObserver;
437
437
  if (r.complete)
438
438
  try {
439
439
  r.complete();
440
440
  } catch (t) {
441
- L(t);
441
+ U(t);
442
442
  }
443
443
  }, e;
444
- }(), K = function(e) {
444
+ }(), q = function(e) {
445
445
  x(r, e);
446
446
  function r(t, n, o) {
447
447
  var i = e.call(this) || this, u;
448
- return d(t) || !t ? u = {
448
+ return p(t) || !t ? u = {
449
449
  next: t ?? void 0,
450
450
  error: n ?? void 0,
451
451
  complete: o ?? void 0
452
- } : u = t, i.destination = new Bt(u), i;
452
+ } : u = t, i.destination = new Dt(u), i;
453
453
  }
454
454
  return r;
455
- }(q);
456
- function L(e) {
457
- at(e);
455
+ }(W);
456
+ function U(e) {
457
+ lt(e);
458
458
  }
459
- function Dt(e) {
459
+ function Ht(e) {
460
460
  throw e;
461
461
  }
462
462
  var Yt = {
463
463
  closed: !0,
464
- next: X,
465
- error: Dt,
466
- complete: X
467
- }, W = function() {
464
+ next: Z,
465
+ error: Ht,
466
+ complete: Z
467
+ }, $ = function() {
468
468
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
469
469
  }();
470
- function B(e) {
470
+ function D(e) {
471
471
  return e;
472
472
  }
473
473
  function zt(e) {
474
- return e.length === 0 ? B : e.length === 1 ? e[0] : function(t) {
474
+ return e.length === 0 ? D : e.length === 1 ? e[0] : function(t) {
475
475
  return e.reduce(function(n, o) {
476
476
  return o(n);
477
477
  }, t);
@@ -485,8 +485,8 @@ var w = function() {
485
485
  var t = new e();
486
486
  return t.source = this, t.operator = r, t;
487
487
  }, e.prototype.subscribe = function(r, t, n) {
488
- var o = this, i = Gt(r) ? r : new K(r, t, n);
489
- return U(function() {
488
+ var o = this, i = Kt(r) ? r : new q(r, t, n);
489
+ return R(function() {
490
490
  var u = o, c = u.operator, a = u.source;
491
491
  i.add(c ? c.call(i, a) : a ? o._subscribe(i) : o._trySubscribe(i));
492
492
  }), i;
@@ -498,8 +498,8 @@ var w = function() {
498
498
  }
499
499
  }, e.prototype.forEach = function(r, t) {
500
500
  var n = this;
501
- return t = Z(t), new t(function(o, i) {
502
- var u = new K({
501
+ return t = N(t), new t(function(o, i) {
502
+ var u = new q({
503
503
  next: function(c) {
504
504
  try {
505
505
  r(c);
@@ -515,7 +515,7 @@ var w = function() {
515
515
  }, e.prototype._subscribe = function(r) {
516
516
  var t;
517
517
  return (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(r);
518
- }, e.prototype[W] = function() {
518
+ }, e.prototype[$] = function() {
519
519
  return this;
520
520
  }, e.prototype.pipe = function() {
521
521
  for (var r = [], t = 0; t < arguments.length; t++)
@@ -523,7 +523,7 @@ var w = function() {
523
523
  return zt(r)(this);
524
524
  }, e.prototype.toPromise = function(r) {
525
525
  var t = this;
526
- return r = Z(r), new r(function(n, o) {
526
+ return r = N(r), new r(function(n, o) {
527
527
  var i;
528
528
  t.subscribe(function(u) {
529
529
  return i = u;
@@ -537,22 +537,22 @@ var w = function() {
537
537
  return new e(r);
538
538
  }, e;
539
539
  }();
540
- function Z(e) {
540
+ function N(e) {
541
541
  var r;
542
- return (r = e ?? Mt.Promise) !== null && r !== void 0 ? r : Promise;
543
- }
544
- function Ht(e) {
545
- return e && d(e.next) && d(e.error) && d(e.complete);
542
+ return (r = e ?? Vt.Promise) !== null && r !== void 0 ? r : Promise;
546
543
  }
547
544
  function Gt(e) {
548
- return e && e instanceof q || Ht(e) && ct(e);
545
+ return e && p(e.next) && p(e.error) && p(e.complete);
549
546
  }
550
547
  function Kt(e) {
551
- return d(e == null ? void 0 : e.lift);
548
+ return e && e instanceof W || Gt(e) && at(e);
549
+ }
550
+ function qt(e) {
551
+ return p(e == null ? void 0 : e.lift);
552
552
  }
553
553
  function I(e) {
554
554
  return function(r) {
555
- if (Kt(r))
555
+ if (qt(r))
556
556
  return r.lift(function(t) {
557
557
  try {
558
558
  return e(t, this);
@@ -564,9 +564,9 @@ function I(e) {
564
564
  };
565
565
  }
566
566
  function _(e, r, t, n, o) {
567
- return new qt(e, r, t, n, o);
567
+ return new Wt(e, r, t, n, o);
568
568
  }
569
- var qt = function(e) {
569
+ var Wt = function(e) {
570
570
  x(r, e);
571
571
  function r(t, n, o, i, u, c) {
572
572
  var a = e.call(this, t) || this;
@@ -601,30 +601,30 @@ var qt = function(e) {
601
601
  e.prototype.unsubscribe.call(this), !n && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
602
602
  }
603
603
  }, r;
604
- }(q), Wt = ut(function(e) {
604
+ }(W), $t = st(function(e) {
605
605
  return function() {
606
606
  e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
607
607
  };
608
- }), $ = function(e) {
608
+ }), J = function(e) {
609
609
  x(r, e);
610
610
  function r() {
611
611
  var t = e.call(this) || this;
612
612
  return t.closed = !1, t.currentObservers = null, t.observers = [], t.isStopped = !1, t.hasError = !1, t.thrownError = null, t;
613
613
  }
614
614
  return r.prototype.lift = function(t) {
615
- var n = new N(this, this);
615
+ var n = new tt(this, this);
616
616
  return n.operator = t, n;
617
617
  }, r.prototype._throwIfClosed = function() {
618
618
  if (this.closed)
619
- throw new Wt();
619
+ throw new $t();
620
620
  }, r.prototype.next = function(t) {
621
621
  var n = this;
622
- U(function() {
622
+ R(function() {
623
623
  var o, i;
624
624
  if (n._throwIfClosed(), !n.isStopped) {
625
625
  n.currentObservers || (n.currentObservers = Array.from(n.observers));
626
626
  try {
627
- for (var u = j(n.currentObservers), c = u.next(); !c.done; c = u.next()) {
627
+ for (var u = P(n.currentObservers), c = u.next(); !c.done; c = u.next()) {
628
628
  var a = c.value;
629
629
  a.next(t);
630
630
  }
@@ -641,7 +641,7 @@ var qt = function(e) {
641
641
  });
642
642
  }, r.prototype.error = function(t) {
643
643
  var n = this;
644
- U(function() {
644
+ R(function() {
645
645
  if (n._throwIfClosed(), !n.isStopped) {
646
646
  n.hasError = n.isStopped = !0, n.thrownError = t;
647
647
  for (var o = n.observers; o.length; )
@@ -650,7 +650,7 @@ var qt = function(e) {
650
650
  });
651
651
  }, r.prototype.complete = function() {
652
652
  var t = this;
653
- U(function() {
653
+ R(function() {
654
654
  if (t._throwIfClosed(), !t.isStopped) {
655
655
  t.isStopped = !0;
656
656
  for (var n = t.observers; n.length; )
@@ -672,8 +672,8 @@ var qt = function(e) {
672
672
  return this._throwIfClosed(), this._checkFinalizedStatuses(t), this._innerSubscribe(t);
673
673
  }, r.prototype._innerSubscribe = function(t) {
674
674
  var n = this, o = this, i = o.hasError, u = o.isStopped, c = o.observers;
675
- return i || u ? st : (this.currentObservers = null, c.push(t), new P(function() {
676
- n.currentObservers = null, M(c, t);
675
+ return i || u ? ct : (this.currentObservers = null, c.push(t), new T(function() {
676
+ n.currentObservers = null, V(c, t);
677
677
  }));
678
678
  }, r.prototype._checkFinalizedStatuses = function(t) {
679
679
  var n = this, o = n.hasError, i = n.thrownError, u = n.isStopped;
@@ -682,9 +682,9 @@ var qt = function(e) {
682
682
  var t = new w();
683
683
  return t.source = this, t;
684
684
  }, r.create = function(t, n) {
685
- return new N(t, n);
685
+ return new tt(t, n);
686
686
  }, r;
687
- }(w), N = function(e) {
687
+ }(w), tt = function(e) {
688
688
  x(r, e);
689
689
  function r(t, n) {
690
690
  var o = e.call(this) || this;
@@ -701,9 +701,9 @@ var qt = function(e) {
701
701
  (n = (t = this.destination) === null || t === void 0 ? void 0 : t.complete) === null || n === void 0 || n.call(t);
702
702
  }, r.prototype._subscribe = function(t) {
703
703
  var n, o;
704
- return (o = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t)) !== null && o !== void 0 ? o : st;
704
+ return (o = (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(t)) !== null && o !== void 0 ? o : ct;
705
705
  }, r;
706
- }($), Y = function(e) {
706
+ }(J), Y = function(e) {
707
707
  x(r, e);
708
708
  function r(t) {
709
709
  var n = e.call(this) || this;
@@ -726,11 +726,11 @@ var qt = function(e) {
726
726
  }, r.prototype.next = function(t) {
727
727
  e.prototype.next.call(this, this._value = t);
728
728
  }, r;
729
- }($), $t = {
729
+ }(J), Jt = {
730
730
  now: function() {
731
731
  return Date.now();
732
732
  }
733
- }, Jt = function(e) {
733
+ }, Qt = function(e) {
734
734
  x(r, e);
735
735
  function r(t, n) {
736
736
  return e.call(this) || this;
@@ -738,17 +738,17 @@ var qt = function(e) {
738
738
  return r.prototype.schedule = function(t, n) {
739
739
  return this;
740
740
  }, r;
741
- }(P), tt = {
741
+ }(T), et = {
742
742
  setInterval: function(e, r) {
743
743
  for (var t = [], n = 2; n < arguments.length; n++)
744
744
  t[n - 2] = arguments[n];
745
- return setInterval.apply(void 0, F([e, r], R(t)));
745
+ return setInterval.apply(void 0, F([e, r], M(t)));
746
746
  },
747
747
  clearInterval: function(e) {
748
748
  return clearInterval(e);
749
749
  },
750
750
  delegate: void 0
751
- }, Qt = function(e) {
751
+ }, Xt = function(e) {
752
752
  x(r, e);
753
753
  function r(t, n) {
754
754
  var o = e.call(this, t, n) || this;
@@ -762,11 +762,11 @@ var qt = function(e) {
762
762
  var i = this.id, u = this.scheduler;
763
763
  return i != null && (this.id = this.recycleAsyncId(u, i, n)), this.pending = !0, this.delay = n, this.id = (o = this.id) !== null && o !== void 0 ? o : this.requestAsyncId(u, this.id, n), this;
764
764
  }, r.prototype.requestAsyncId = function(t, n, o) {
765
- return o === void 0 && (o = 0), tt.setInterval(t.flush.bind(t, this), o);
765
+ return o === void 0 && (o = 0), et.setInterval(t.flush.bind(t, this), o);
766
766
  }, r.prototype.recycleAsyncId = function(t, n, o) {
767
767
  if (o === void 0 && (o = 0), o != null && this.delay === o && this.pending === !1)
768
768
  return n;
769
- n != null && tt.clearInterval(n);
769
+ n != null && et.clearInterval(n);
770
770
  }, r.prototype.execute = function(t, n) {
771
771
  if (this.closed)
772
772
  return new Error("executing a cancelled action");
@@ -787,20 +787,20 @@ var qt = function(e) {
787
787
  }, r.prototype.unsubscribe = function() {
788
788
  if (!this.closed) {
789
789
  var t = this, n = t.id, o = t.scheduler, i = o.actions;
790
- this.work = this.state = this.scheduler = null, this.pending = !1, M(i, this), n != null && (this.id = this.recycleAsyncId(o, n, null)), this.delay = null, e.prototype.unsubscribe.call(this);
790
+ this.work = this.state = this.scheduler = null, this.pending = !1, V(i, this), n != null && (this.id = this.recycleAsyncId(o, n, null)), this.delay = null, e.prototype.unsubscribe.call(this);
791
791
  }
792
792
  }, r;
793
- }(Jt), et = function() {
793
+ }(Qt), rt = function() {
794
794
  function e(r, t) {
795
795
  t === void 0 && (t = e.now), this.schedulerActionCtor = r, this.now = t;
796
796
  }
797
797
  return e.prototype.schedule = function(r, t, n) {
798
798
  return t === void 0 && (t = 0), new this.schedulerActionCtor(this, r).schedule(n, t);
799
- }, e.now = $t.now, e;
800
- }(), Xt = function(e) {
799
+ }, e.now = Jt.now, e;
800
+ }(), Zt = function(e) {
801
801
  x(r, e);
802
802
  function r(t, n) {
803
- n === void 0 && (n = et.now);
803
+ n === void 0 && (n = rt.now);
804
804
  var o = e.call(this, t, n) || this;
805
805
  return o.actions = [], o._active = !1, o;
806
806
  }
@@ -822,55 +822,55 @@ var qt = function(e) {
822
822
  throw o;
823
823
  }
824
824
  }, r;
825
- }(et), Zt = new Xt(Qt);
826
- function Nt(e) {
827
- return e && d(e.schedule);
828
- }
825
+ }(rt), Nt = new Zt(Xt);
829
826
  function te(e) {
830
- return e[e.length - 1];
827
+ return e && p(e.schedule);
831
828
  }
832
829
  function ee(e) {
833
- return Nt(te(e)) ? e.pop() : void 0;
830
+ return e[e.length - 1];
831
+ }
832
+ function re(e) {
833
+ return te(ee(e)) ? e.pop() : void 0;
834
834
  }
835
- var lt = function(e) {
835
+ var ft = function(e) {
836
836
  return e && typeof e.length == "number" && typeof e != "function";
837
837
  };
838
- function ft(e) {
839
- return d(e == null ? void 0 : e.then);
840
- }
841
838
  function ht(e) {
842
- return d(e[W]);
839
+ return p(e == null ? void 0 : e.then);
840
+ }
841
+ function dt(e) {
842
+ return p(e[$]);
843
843
  }
844
844
  function vt(e) {
845
- return Symbol.asyncIterator && d(e == null ? void 0 : e[Symbol.asyncIterator]);
845
+ return Symbol.asyncIterator && p(e == null ? void 0 : e[Symbol.asyncIterator]);
846
846
  }
847
- function dt(e) {
847
+ function pt(e) {
848
848
  return new TypeError("You provided " + (e !== null && typeof e == "object" ? "an invalid object" : "'" + e + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
849
849
  }
850
- function re() {
850
+ function ne() {
851
851
  return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
852
852
  }
853
- var pt = re();
853
+ var yt = ne();
854
854
  function bt(e) {
855
- return d(e == null ? void 0 : e[pt]);
855
+ return p(e == null ? void 0 : e[yt]);
856
856
  }
857
- function yt(e) {
858
- return Rt(this, arguments, function() {
857
+ function mt(e) {
858
+ return Mt(this, arguments, function() {
859
859
  var t, n, o, i;
860
- return it(this, function(u) {
860
+ return ut(this, function(u) {
861
861
  switch (u.label) {
862
862
  case 0:
863
863
  t = e.getReader(), u.label = 1;
864
864
  case 1:
865
865
  u.trys.push([1, , 9, 10]), u.label = 2;
866
866
  case 2:
867
- return [4, A(t.read())];
867
+ return [4, j(t.read())];
868
868
  case 3:
869
- return n = u.sent(), o = n.value, i = n.done, i ? [4, A(void 0)] : [3, 5];
869
+ return n = u.sent(), o = n.value, i = n.done, i ? [4, j(void 0)] : [3, 5];
870
870
  case 4:
871
871
  return [2, u.sent()];
872
872
  case 5:
873
- return [4, A(o)];
873
+ return [4, j(o)];
874
874
  case 6:
875
875
  return [4, u.sent()];
876
876
  case 7:
@@ -885,57 +885,57 @@ function yt(e) {
885
885
  });
886
886
  });
887
887
  }
888
- function mt(e) {
889
- return d(e == null ? void 0 : e.getReader);
888
+ function wt(e) {
889
+ return p(e == null ? void 0 : e.getReader);
890
890
  }
891
- function T(e) {
891
+ function C(e) {
892
892
  if (e instanceof w)
893
893
  return e;
894
894
  if (e != null) {
895
- if (ht(e))
896
- return ne(e);
897
- if (lt(e))
895
+ if (dt(e))
898
896
  return oe(e);
899
897
  if (ft(e))
900
898
  return ie(e);
899
+ if (ht(e))
900
+ return ue(e);
901
901
  if (vt(e))
902
- return wt(e);
902
+ return gt(e);
903
903
  if (bt(e))
904
- return ue(e);
905
- if (mt(e))
906
904
  return se(e);
905
+ if (wt(e))
906
+ return ce(e);
907
907
  }
908
- throw dt(e);
908
+ throw pt(e);
909
909
  }
910
- function ne(e) {
910
+ function oe(e) {
911
911
  return new w(function(r) {
912
- var t = e[W]();
913
- if (d(t.subscribe))
912
+ var t = e[$]();
913
+ if (p(t.subscribe))
914
914
  return t.subscribe(r);
915
915
  throw new TypeError("Provided object does not correctly implement Symbol.observable");
916
916
  });
917
917
  }
918
- function oe(e) {
918
+ function ie(e) {
919
919
  return new w(function(r) {
920
920
  for (var t = 0; t < e.length && !r.closed; t++)
921
921
  r.next(e[t]);
922
922
  r.complete();
923
923
  });
924
924
  }
925
- function ie(e) {
925
+ function ue(e) {
926
926
  return new w(function(r) {
927
927
  e.then(function(t) {
928
928
  r.closed || (r.next(t), r.complete());
929
929
  }, function(t) {
930
930
  return r.error(t);
931
- }).then(null, at);
931
+ }).then(null, lt);
932
932
  });
933
933
  }
934
- function ue(e) {
934
+ function se(e) {
935
935
  return new w(function(r) {
936
936
  var t, n;
937
937
  try {
938
- for (var o = j(e), i = o.next(); !i.done; i = o.next()) {
938
+ for (var o = P(e), i = o.next(); !i.done; i = o.next()) {
939
939
  var u = i.value;
940
940
  if (r.next(u), r.closed)
941
941
  return;
@@ -952,21 +952,21 @@ function ue(e) {
952
952
  r.complete();
953
953
  });
954
954
  }
955
- function wt(e) {
955
+ function gt(e) {
956
956
  return new w(function(r) {
957
- ce(e, r).catch(function(t) {
957
+ ae(e, r).catch(function(t) {
958
958
  return r.error(t);
959
959
  });
960
960
  });
961
961
  }
962
- function se(e) {
963
- return wt(yt(e));
962
+ function ce(e) {
963
+ return gt(mt(e));
964
964
  }
965
- function ce(e, r) {
965
+ function ae(e, r) {
966
966
  var t, n, o, i;
967
- return Ut(this, void 0, void 0, function() {
967
+ return Rt(this, void 0, void 0, function() {
968
968
  var u, c;
969
- return it(this, function(a) {
969
+ return ut(this, function(a) {
970
970
  switch (a.label) {
971
971
  case 0:
972
972
  a.trys.push([0, 5, 6, 11]), t = Ft(e), a.label = 1;
@@ -1000,7 +1000,7 @@ function ce(e, r) {
1000
1000
  });
1001
1001
  });
1002
1002
  }
1003
- function E(e, r, t, n, o) {
1003
+ function O(e, r, t, n, o) {
1004
1004
  n === void 0 && (n = 0), o === void 0 && (o = !1);
1005
1005
  var i = r.schedule(function() {
1006
1006
  t(), o ? e.add(this.schedule(null, n)) : this.unsubscribe();
@@ -1011,34 +1011,34 @@ function E(e, r, t, n, o) {
1011
1011
  function St(e, r) {
1012
1012
  return r === void 0 && (r = 0), I(function(t, n) {
1013
1013
  t.subscribe(_(n, function(o) {
1014
- return E(n, e, function() {
1014
+ return O(n, e, function() {
1015
1015
  return n.next(o);
1016
1016
  }, r);
1017
1017
  }, function() {
1018
- return E(n, e, function() {
1018
+ return O(n, e, function() {
1019
1019
  return n.complete();
1020
1020
  }, r);
1021
1021
  }, function(o) {
1022
- return E(n, e, function() {
1022
+ return O(n, e, function() {
1023
1023
  return n.error(o);
1024
1024
  }, r);
1025
1025
  }));
1026
1026
  });
1027
1027
  }
1028
- function gt(e, r) {
1028
+ function xt(e, r) {
1029
1029
  return r === void 0 && (r = 0), I(function(t, n) {
1030
1030
  n.add(e.schedule(function() {
1031
1031
  return t.subscribe(n);
1032
1032
  }, r));
1033
1033
  });
1034
1034
  }
1035
- function ae(e, r) {
1036
- return T(e).pipe(gt(r), St(r));
1037
- }
1038
1035
  function le(e, r) {
1039
- return T(e).pipe(gt(r), St(r));
1036
+ return C(e).pipe(xt(r), St(r));
1040
1037
  }
1041
1038
  function fe(e, r) {
1039
+ return C(e).pipe(xt(r), St(r));
1040
+ }
1041
+ function he(e, r) {
1042
1042
  return new w(function(t) {
1043
1043
  var n = 0;
1044
1044
  return r.schedule(function() {
@@ -1046,11 +1046,11 @@ function fe(e, r) {
1046
1046
  });
1047
1047
  });
1048
1048
  }
1049
- function he(e, r) {
1049
+ function de(e, r) {
1050
1050
  return new w(function(t) {
1051
1051
  var n;
1052
- return E(t, r, function() {
1053
- n = e[pt](), E(t, r, function() {
1052
+ return O(t, r, function() {
1053
+ n = e[yt](), O(t, r, function() {
1054
1054
  var o, i, u;
1055
1055
  try {
1056
1056
  o = n.next(), i = o.value, u = o.done;
@@ -1061,17 +1061,17 @@ function he(e, r) {
1061
1061
  u ? t.complete() : t.next(i);
1062
1062
  }, 0, !0);
1063
1063
  }), function() {
1064
- return d(n == null ? void 0 : n.return) && n.return();
1064
+ return p(n == null ? void 0 : n.return) && n.return();
1065
1065
  };
1066
1066
  });
1067
1067
  }
1068
- function xt(e, r) {
1068
+ function _t(e, r) {
1069
1069
  if (!e)
1070
1070
  throw new Error("Iterable cannot be null");
1071
1071
  return new w(function(t) {
1072
- E(t, r, function() {
1072
+ O(t, r, function() {
1073
1073
  var n = e[Symbol.asyncIterator]();
1074
- E(t, r, function() {
1074
+ O(t, r, function() {
1075
1075
  n.next().then(function(o) {
1076
1076
  o.done ? t.complete() : t.next(o.value);
1077
1077
  });
@@ -1080,29 +1080,29 @@ function xt(e, r) {
1080
1080
  });
1081
1081
  }
1082
1082
  function ve(e, r) {
1083
- return xt(yt(e), r);
1083
+ return _t(mt(e), r);
1084
1084
  }
1085
- function de(e, r) {
1085
+ function pe(e, r) {
1086
1086
  if (e != null) {
1087
+ if (dt(e))
1088
+ return le(e, r);
1089
+ if (ft(e))
1090
+ return he(e, r);
1087
1091
  if (ht(e))
1088
- return ae(e, r);
1089
- if (lt(e))
1090
1092
  return fe(e, r);
1091
- if (ft(e))
1092
- return le(e, r);
1093
1093
  if (vt(e))
1094
- return xt(e, r);
1094
+ return _t(e, r);
1095
1095
  if (bt(e))
1096
- return he(e, r);
1097
- if (mt(e))
1096
+ return de(e, r);
1097
+ if (wt(e))
1098
1098
  return ve(e, r);
1099
1099
  }
1100
- throw dt(e);
1100
+ throw pt(e);
1101
1101
  }
1102
- function pe(e, r) {
1103
- return r ? de(e, r) : T(e);
1102
+ function ye(e, r) {
1103
+ return r ? pe(e, r) : C(e);
1104
1104
  }
1105
- function J(e, r) {
1105
+ function Q(e, r) {
1106
1106
  return I(function(t, n) {
1107
1107
  var o = 0;
1108
1108
  t.subscribe(_(n, function(i) {
@@ -1111,56 +1111,56 @@ function J(e, r) {
1111
1111
  });
1112
1112
  }
1113
1113
  function be(e, r, t, n, o, i, u, c) {
1114
- var a = [], s = 0, l = 0, p = !1, y = function() {
1115
- p && !a.length && !s && r.complete();
1116
- }, h = function(v) {
1114
+ var a = [], s = 0, l = 0, d = !1, y = function() {
1115
+ d && !a.length && !s && r.complete();
1116
+ }, f = function(v) {
1117
1117
  return s < n ? b(v) : a.push(v);
1118
1118
  }, b = function(v) {
1119
1119
  s++;
1120
- var O = !1;
1121
- T(t(v, l++)).subscribe(_(r, function(f) {
1122
- r.next(f);
1120
+ var A = !1;
1121
+ C(t(v, l++)).subscribe(_(r, function(h) {
1122
+ r.next(h);
1123
1123
  }, function() {
1124
- O = !0;
1124
+ A = !0;
1125
1125
  }, void 0, function() {
1126
- if (O)
1126
+ if (A)
1127
1127
  try {
1128
1128
  s--;
1129
- for (var f = function() {
1129
+ for (var h = function() {
1130
1130
  var m = a.shift();
1131
1131
  u || b(m);
1132
1132
  }; a.length && s < n; )
1133
- f();
1133
+ h();
1134
1134
  y();
1135
1135
  } catch (m) {
1136
1136
  r.error(m);
1137
1137
  }
1138
1138
  }));
1139
1139
  };
1140
- return e.subscribe(_(r, h, function() {
1141
- p = !0, y();
1140
+ return e.subscribe(_(r, f, function() {
1141
+ d = !0, y();
1142
1142
  })), function() {
1143
1143
  };
1144
1144
  }
1145
- function V(e, r, t) {
1146
- return t === void 0 && (t = 1 / 0), d(r) ? V(function(n, o) {
1147
- return J(function(i, u) {
1145
+ function B(e, r, t) {
1146
+ return t === void 0 && (t = 1 / 0), p(r) ? B(function(n, o) {
1147
+ return Q(function(i, u) {
1148
1148
  return r(n, i, o, u);
1149
- })(T(e(n, o)));
1149
+ })(C(e(n, o)));
1150
1150
  }, t) : (typeof r == "number" && (t = r), I(function(n, o) {
1151
1151
  return be(n, o, e, t);
1152
1152
  }));
1153
1153
  }
1154
- function ye(e) {
1155
- return V(B, e);
1156
- }
1157
- function me() {
1158
- return ye(1);
1154
+ function me(e) {
1155
+ return B(D, e);
1159
1156
  }
1160
1157
  function we() {
1158
+ return me(1);
1159
+ }
1160
+ function ge() {
1161
1161
  for (var e = [], r = 0; r < arguments.length; r++)
1162
1162
  e[r] = arguments[r];
1163
- return me()(pe(e, ee(e)));
1163
+ return we()(ye(e, re(e)));
1164
1164
  }
1165
1165
  function Se(e, r) {
1166
1166
  return I(function(t, n) {
@@ -1170,11 +1170,11 @@ function Se(e, r) {
1170
1170
  }));
1171
1171
  });
1172
1172
  }
1173
- function rt(e, r) {
1174
- return d(r) ? V(e, r, 1) : V(e, 1);
1173
+ function nt(e, r) {
1174
+ return p(r) ? B(e, r, 1) : B(e, 1);
1175
1175
  }
1176
- function ge(e, r) {
1177
- return r === void 0 && (r = Zt), I(function(t, n) {
1176
+ function xe(e, r) {
1177
+ return r === void 0 && (r = Nt), I(function(t, n) {
1178
1178
  var o = null, i = null, u = null, c = function() {
1179
1179
  if (o) {
1180
1180
  o.unsubscribe(), o = null;
@@ -1199,8 +1199,8 @@ function ge(e, r) {
1199
1199
  }));
1200
1200
  });
1201
1201
  }
1202
- function xe(e, r) {
1203
- return r === void 0 && (r = B), e = e ?? _e, I(function(t, n) {
1202
+ function _e(e, r) {
1203
+ return r === void 0 && (r = D), e = e ?? Ie, I(function(t, n) {
1204
1204
  var o, i = !0;
1205
1205
  t.subscribe(_(n, function(u) {
1206
1206
  var c = r(u);
@@ -1208,11 +1208,11 @@ function xe(e, r) {
1208
1208
  }));
1209
1209
  });
1210
1210
  }
1211
- function _e(e, r) {
1211
+ function Ie(e, r) {
1212
1212
  return e === r;
1213
1213
  }
1214
- function Ie(e, r, t) {
1215
- var n = d(e) || r || t ? { next: e, error: r, complete: t } : e;
1214
+ function Ee(e, r, t) {
1215
+ var n = p(e) || r || t ? { next: e, error: r, complete: t } : e;
1216
1216
  return n ? I(function(o, i) {
1217
1217
  var u;
1218
1218
  (u = n.subscribe) === null || u === void 0 || u.call(n);
@@ -1230,133 +1230,134 @@ function Ie(e, r, t) {
1230
1230
  var a, s;
1231
1231
  c && ((a = n.unsubscribe) === null || a === void 0 || a.call(n)), (s = n.finalize) === null || s === void 0 || s.call(n);
1232
1232
  }));
1233
- }) : B;
1233
+ }) : D;
1234
1234
  }
1235
- function Ee(e, r) {
1236
- const t = g({}), n = kt({ parent: window.parent, connect: e }), o = g(""), i = S({
1235
+ function Oe(e, r) {
1236
+ const t = S({}), n = Lt({ parent: window.parent, connect: e }), o = S(""), i = g({
1237
1237
  get: () => o.value,
1238
1238
  set: (c) => n.appState.set(c)
1239
- }), u = g({ availableLocales: [] });
1240
- return n.context.subscribe((c) => t.value = c), we(n.appState.get(), n.appState).subscribe((c) => o.value = c), n.locales.subscribe((c) => u.value = c), Ae(n.signal, n, r), ot(() => n.unsubscribe()), Object.assign(
1241
- nt(n, ["context", "toolbar", "appState", "locales"]),
1239
+ }), u = S({ availableLocales: [] });
1240
+ return n.context.subscribe((c) => t.value = c), ge(n.appState.get(), n.appState).subscribe((c) => o.value = c), n.locales.subscribe((c) => u.value = c), je(n.signal, n, r), it(() => n.unsubscribe()), Object.assign(
1241
+ ot(n, ["context", "toolbar", "appState", "locales"]),
1242
1242
  {
1243
1243
  context: t,
1244
- toolbar: Oe(n),
1244
+ toolbar: Ae(n),
1245
1245
  appState: i,
1246
1246
  locales: u
1247
1247
  }
1248
1248
  );
1249
1249
  }
1250
- function Oe(e) {
1250
+ function Ae(e) {
1251
1251
  const r = {
1252
- start: S({
1253
- get: () => e.toolbar.get().start,
1254
- set: (t) => e.toolbar.set((n) => ({ ...n, start: t }))
1255
- }),
1256
- title: S({
1252
+ title: g({
1257
1253
  get: () => e.toolbar.get().title,
1258
1254
  set: (t) => e.toolbar.set((n) => ({ ...n, title: t }))
1259
1255
  }),
1260
- searchEnabled: S({
1256
+ searchEnabled: g({
1261
1257
  get: () => e.toolbar.get().search.enabled,
1262
1258
  set: (t) => e.toolbar.set((n) => ({ ...n, search: { ...n.search, enabled: t } }))
1263
1259
  }),
1264
- search: g(""),
1265
- menu: S({
1260
+ search: S(""),
1261
+ menu: g({
1266
1262
  get: () => e.toolbar.get().menu ?? [],
1267
1263
  set: (t) => e.toolbar.set((n) => ({ ...n, menu: t }))
1268
1264
  }),
1269
- isLoading: S({
1265
+ isLoading: g({
1270
1266
  get: () => e.toolbar.get().isLoading,
1271
1267
  set: (t) => e.toolbar.set((n) => ({ ...n, isLoading: t }))
1272
1268
  })
1273
1269
  };
1274
- return e.toolbar.pipe(J((t) => t.search.input ?? ""), xe(), ge(300), Ie(console.log)).forEach((t) => r.search.value = t), r;
1270
+ return e.toolbar.pipe(Q((t) => t.search.input ?? ""), _e(), xe(300), Ee(console.log)).forEach((t) => r.search.value = t), r;
1275
1271
  }
1276
- function Ae(e, r, t) {
1277
- const { shift: n } = Et(), o = g(null), i = new $(), u = i.pipe(
1278
- rt(t ?? ((c) => Promise.resolve(c))),
1279
- rt((c) => e(c))
1272
+ function je(e, r, t) {
1273
+ const n = Ot(), { shift: o, ctrl_shift_i: i, ctrl_shift_o: u, ctrl_shift_p: c, ctrl_h: a } = n, s = S(null), l = new J(), d = l.pipe(
1274
+ nt(t ?? ((y) => Promise.resolve(y))),
1275
+ nt((y) => e(y))
1280
1276
  ).subscribe();
1281
- return r.add(u), Ot(n, () => {
1282
- const c = Date.now();
1283
- o.value && c - o.value < 300 ? (o.value = null, i.next({ overlay: { action: !0 } })) : o.value = c;
1284
- }), u;
1277
+ return r.add(d), d.add(E(o, () => {
1278
+ const y = Date.now();
1279
+ s.value && y - s.value < 300 ? (s.value = null, l.next({ overlay: { action: !0 } })) : s.value = y;
1280
+ })), d.add(E(a, () => l.next({ navigate: { to: "OS.dash" } }))), d.add(E(i, () => l.next({ immersive: { mode: "toggle" } }))), d.add(E(u, () => l.next({ notifications: { action: "toggle" } }))), d.add(E(c, () => l.next({ notepad: { action: "toggle" } }))), d.add(E(n["ctrl_/"], () => l.next({ hotkeys: { action: "toggle" } }))), d.add(Pt(
1281
+ () => Array.from({ length: 10 }).forEach((y, f) => {
1282
+ const b = (f + 1) % 10, v = n[`ctrl_${b}`];
1283
+ d.add(E(v, () => l.next({ navigate: { to: { favorite: f } } })));
1284
+ })
1285
+ )), d;
1285
1286
  }
1286
- function je(e) {
1287
+ function Pe(e) {
1287
1288
  return Object.fromEntries(
1288
- Object.entries(e).map(([r, t]) => [r, Tt(t)])
1289
+ Object.entries(e).map(([r, t]) => [r, Ct(t)])
1289
1290
  );
1290
1291
  }
1291
1292
  function Fe(e = "comms") {
1292
- const [r, t] = Pe(
1293
+ const [r, t] = Te(
1293
1294
  e,
1294
- () => Ee(),
1295
+ () => Oe(),
1295
1296
  (n) => n.unsubscribe()
1296
1297
  );
1297
1298
  return { provideComms: r, injectComms: t };
1298
1299
  }
1299
- function Pe(e, r, t) {
1300
+ function Te(e, r, t) {
1300
1301
  let n;
1301
1302
  const o = () => (!n && (n = r()), n);
1302
1303
  return [
1303
1304
  (i) => (i.onUnmount(() => t && n && t(n)), i.provide(e, o)),
1304
- () => Pt(e)()
1305
+ () => Tt(e)()
1305
1306
  ];
1306
1307
  }
1307
- function Me(e, r, t) {
1308
+ function Ve(e, r, t) {
1308
1309
  const o = At(e, r, { immediate: !1, ...t });
1309
- return Object.assign(nt(o, ["execute"]), {
1310
+ return Object.assign(ot(o, ["execute"]), {
1310
1311
  execute: (...i) => o.execute(void 0, ...i),
1311
1312
  executeDelayed: o.execute
1312
1313
  });
1313
1314
  }
1314
- function Ve(e) {
1315
- const { context: r } = e, t = new Y({}), n = (f) => t.next(f(t.value)), o = g(), i = new Y(void 0);
1316
- Object.entries(r).forEach(([f, m]) => z(
1315
+ function Be(e) {
1316
+ const { context: r } = e, t = new Y({}), n = (h) => t.next(h(t.value)), o = S(), i = new Y(void 0);
1317
+ Object.entries(r).forEach(([h, m]) => z(
1317
1318
  m,
1318
- (C) => n((k) => ({ ...k, [f]: C })),
1319
+ (k) => n((L) => ({ ...L, [h]: k })),
1319
1320
  { immediate: !0 }
1320
- )), z(o, (f) => i.next(f), { immediate: !0 });
1321
+ )), z(o, (h) => i.next(h), { immediate: !0 });
1321
1322
  const u = i.asObservable().pipe(
1322
- J((f) => f == null ? void 0 : f.contentWindow),
1323
- Se((f) => !!f)
1324
- ), c = new Y({ availableLocales: [] }), { locale: a, availableLocales: s } = H();
1325
- Ct(() => c.next(je({ locale: a, availableLocales: s })));
1326
- const l = Lt({ ...e, contextChanges: t, windowChanges: u, locales: c });
1327
- l.toolbar.subscribe((f) => {
1328
- var C, k;
1323
+ Q((h) => h == null ? void 0 : h.contentWindow),
1324
+ Se((h) => !!h)
1325
+ ), c = new Y({ availableLocales: [] }), { locale: a, availableLocales: s } = G();
1326
+ kt(() => c.next(Pe({ locale: a, availableLocales: s })));
1327
+ const l = Ut({ ...e, contextChanges: t, windowChanges: u, locales: c });
1328
+ l.toolbar.subscribe((h) => {
1329
+ var k, L;
1329
1330
  const m = e.toolbar;
1330
- m.start.value = f.start, m.title.value = f.title, m.searchEnabled.value = ((C = f.search) == null ? void 0 : C.enabled) ?? !1, m.search.value = (k = f.search) == null ? void 0 : k.input, m.menu.value = f.menu, m.isLoading.value = (f == null ? void 0 : f.isLoading) ?? !1;
1331
+ m.title.value = h.title, m.searchEnabled.value = ((k = h.search) == null ? void 0 : k.enabled) ?? !1, m.search.value = (L = h.search) == null ? void 0 : L.input, m.menu.value = h.menu, m.isLoading.value = (h == null ? void 0 : h.isLoading) ?? !1;
1331
1332
  }), jt(
1332
1333
  e.toolbar.search,
1333
- (f) => l.toolbar.set.search(f),
1334
+ (h) => l.toolbar.set.search(h),
1334
1335
  { immediate: !0, debounce: 100 }
1335
1336
  );
1336
- const p = g(l.appState.get()), y = S({
1337
- get: () => p.value,
1338
- set: (f) => l.appState.set(f)
1337
+ const d = S(l.appState.get()), y = g({
1338
+ get: () => d.value,
1339
+ set: (h) => l.appState.set(h)
1339
1340
  });
1340
- l.appState.changes.subscribe((f) => p.value = f);
1341
- const h = g(!1);
1342
- l.isConnectionInitialized.subscribe((f) => h.value = f), ot(() => l.unsubscribe());
1343
- const { unsubscribe: b, signal: v, closed: O } = l;
1341
+ l.appState.changes.subscribe((h) => d.value = h);
1342
+ const f = S(!1);
1343
+ l.isConnectionInitialized.subscribe((h) => f.value = h), it(() => l.unsubscribe());
1344
+ const { unsubscribe: b, signal: v, closed: A } = l;
1344
1345
  return {
1345
1346
  ...e,
1346
1347
  client: o,
1347
1348
  appState: y,
1348
- isConnectionInitialized: h,
1349
+ isConnectionInitialized: f,
1349
1350
  unsubscribe: b,
1350
1351
  signal: v,
1351
- closed: O
1352
+ closed: A
1352
1353
  };
1353
1354
  }
1354
1355
  export {
1355
- Ue as useAntColorMode,
1356
- Re as useAntI18n,
1357
- Me as useApi,
1358
- Ee as useCommsClient,
1359
- Ve as useCommsHost,
1356
+ Re as useAntColorMode,
1357
+ Me as useAntI18n,
1358
+ Ve as useApi,
1359
+ Oe as useCommsClient,
1360
+ Be as useCommsHost,
1360
1361
  Fe as useCommsInjection,
1361
- Pe as useSingleton
1362
+ Te as useSingleton
1362
1363
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antcde/vue-utils",
3
3
  "type": "module",
4
- "version": "0.1.0",
4
+ "version": "0.1.7",
5
5
  "description": "Helper to use ANT Comms in Vue 3",
6
6
  "author": "CollaborAll",
7
7
  "repository": {
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "rxjs": "^7.8.1",
35
- "@antcde/connect-ts": "0.1.0"
35
+ "@antcde/connect-ts": "0.1.6"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@vitejs/plugin-vue": "^5.0.3",