@antcde/vue-utils 0.0.9 → 0.1.6
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.
- package/dist/index.js +194 -198
- package/dist/types/utils.d.ts +0 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useColorMode as
|
|
2
|
-
import { computed as S, ref as g, watch as z, onBeforeUnmount as
|
|
1
|
+
import { useColorMode as It, objectPick as Et, objectOmit as ot, useMagicKeys as Ot, whenever as Q, useAsyncState as At, watchDebounced as jt } from "@vueuse/core";
|
|
2
|
+
import { computed as S, ref as g, watch as z, onBeforeUnmount as it, inject as Pt, unref as Tt, watchEffect as Ct } from "vue";
|
|
3
3
|
import { useI18n as H } from "vue-i18n";
|
|
4
4
|
import { newCommsClient as kt, newCommsHost as Lt } from "@antcde/connect-ts";
|
|
5
5
|
function Ue(e, r) {
|
|
6
|
-
const t =
|
|
6
|
+
const t = It(r), n = S(() => e.context.value.darkMode), o = S(() => {
|
|
7
7
|
switch (n.value) {
|
|
8
8
|
case null:
|
|
9
9
|
return "auto";
|
|
@@ -26,7 +26,7 @@ function Ue(e, r) {
|
|
|
26
26
|
return Object.assign(
|
|
27
27
|
o,
|
|
28
28
|
{ host: n, isDark: i },
|
|
29
|
-
|
|
29
|
+
Et(t, ["state", "system", "store"])
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
32
|
function Re(e, r) {
|
|
@@ -65,14 +65,14 @@ function Ut(e, r, t, n) {
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
return new (t || (t = Promise))(function(i, u) {
|
|
68
|
-
function
|
|
68
|
+
function a(l) {
|
|
69
69
|
try {
|
|
70
70
|
s(n.next(l));
|
|
71
71
|
} catch (p) {
|
|
72
72
|
u(p);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function c(l) {
|
|
76
76
|
try {
|
|
77
77
|
s(n.throw(l));
|
|
78
78
|
} catch (p) {
|
|
@@ -80,25 +80,25 @@ function Ut(e, r, t, n) {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
function s(l) {
|
|
83
|
-
l.done ? i(l.value) : o(l.value).then(
|
|
83
|
+
l.done ? i(l.value) : o(l.value).then(a, c);
|
|
84
84
|
}
|
|
85
85
|
s((n = n.apply(e, r || [])).next());
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
function
|
|
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];
|
|
92
92
|
}, trys: [], ops: [] }, n, o, i, u = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
93
|
-
return u.next =
|
|
93
|
+
return u.next = a(0), u.throw = a(1), u.return = a(2), typeof Symbol == "function" && (u[Symbol.iterator] = function() {
|
|
94
94
|
return this;
|
|
95
95
|
}), u;
|
|
96
|
-
function
|
|
96
|
+
function a(s) {
|
|
97
97
|
return function(l) {
|
|
98
|
-
return
|
|
98
|
+
return c([s, l]);
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function c(s) {
|
|
102
102
|
if (n) throw new TypeError("Generator is already executing.");
|
|
103
103
|
for (; u && (u = 0, s[0] && (t = 0)), t; ) try {
|
|
104
104
|
if (n = 1, o && (i = s[0] & 2 ? o.return : s[0] ? o.throw || ((i = o.return) && i.call(o), 0) : o.next) && !(i = i.call(o, s[1])).done) return i;
|
|
@@ -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
|
|
148
|
+
function j(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 {
|
|
@@ -161,8 +161,8 @@ function R(e, r) {
|
|
|
161
161
|
var n = t.call(e), o, i = [], u;
|
|
162
162
|
try {
|
|
163
163
|
for (; (r === void 0 || r-- > 0) && !(o = n.next()).done; ) i.push(o.value);
|
|
164
|
-
} catch (
|
|
165
|
-
u = { error:
|
|
164
|
+
} catch (a) {
|
|
165
|
+
u = { error: a };
|
|
166
166
|
} finally {
|
|
167
167
|
try {
|
|
168
168
|
o && !o.done && (t = n.return) && t.call(n);
|
|
@@ -183,70 +183,70 @@ function A(e) {
|
|
|
183
183
|
function Rt(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
|
-
return o = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype),
|
|
186
|
+
return o = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), a("next"), a("throw"), a("return", u), o[Symbol.asyncIterator] = function() {
|
|
187
187
|
return this;
|
|
188
188
|
}, o;
|
|
189
189
|
function u(h) {
|
|
190
|
-
return function(
|
|
191
|
-
return Promise.resolve(
|
|
190
|
+
return function(y) {
|
|
191
|
+
return Promise.resolve(y).then(h, p);
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function a(h, y) {
|
|
195
195
|
n[h] && (o[h] = function(v) {
|
|
196
196
|
return new Promise(function(O, f) {
|
|
197
|
-
i.push([h, v, O, f]) > 1 ||
|
|
197
|
+
i.push([h, v, O, f]) > 1 || c(h, v);
|
|
198
198
|
});
|
|
199
|
-
},
|
|
199
|
+
}, y && (o[h] = y(o[h])));
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function c(h, y) {
|
|
202
202
|
try {
|
|
203
|
-
s(n[h](
|
|
203
|
+
s(n[h](y));
|
|
204
204
|
} catch (v) {
|
|
205
|
-
|
|
205
|
+
b(i[0][3], v);
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
function s(h) {
|
|
209
|
-
h.value instanceof A ? Promise.resolve(h.value.v).then(l, p) :
|
|
209
|
+
h.value instanceof A ? Promise.resolve(h.value.v).then(l, p) : b(i[0][2], h);
|
|
210
210
|
}
|
|
211
211
|
function l(h) {
|
|
212
|
-
|
|
212
|
+
c("next", h);
|
|
213
213
|
}
|
|
214
214
|
function p(h) {
|
|
215
|
-
|
|
215
|
+
c("throw", h);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
h(
|
|
217
|
+
function b(h, y) {
|
|
218
|
+
h(y), i.shift(), i.length && c(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
|
|
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() {
|
|
225
225
|
return this;
|
|
226
226
|
}, t);
|
|
227
227
|
function n(i) {
|
|
228
228
|
t[i] = e[i] && function(u) {
|
|
229
|
-
return new Promise(function(
|
|
230
|
-
u = e[i](u), o(
|
|
229
|
+
return new Promise(function(a, c) {
|
|
230
|
+
u = e[i](u), o(a, c, u.done, u.value);
|
|
231
231
|
});
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
|
-
function o(i, u,
|
|
235
|
-
Promise.resolve(
|
|
236
|
-
i({ value: s, done:
|
|
234
|
+
function o(i, u, a, c) {
|
|
235
|
+
Promise.resolve(c).then(function(s) {
|
|
236
|
+
i({ value: s, done: a });
|
|
237
237
|
}, u);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
function d(e) {
|
|
241
241
|
return typeof e == "function";
|
|
242
242
|
}
|
|
243
|
-
function
|
|
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 =
|
|
249
|
+
var D = 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) {
|
|
@@ -261,7 +261,7 @@ function M(e, r) {
|
|
|
261
261
|
0 <= t && e.splice(t, 1);
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
var
|
|
264
|
+
var P = function() {
|
|
265
265
|
function e(r) {
|
|
266
266
|
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
267
267
|
}
|
|
@@ -273,15 +273,15 @@ var j = function() {
|
|
|
273
273
|
if (u)
|
|
274
274
|
if (this._parentage = null, Array.isArray(u))
|
|
275
275
|
try {
|
|
276
|
-
for (var
|
|
277
|
-
var s =
|
|
276
|
+
for (var a = j(u), c = a.next(); !c.done; c = a.next()) {
|
|
277
|
+
var s = c.value;
|
|
278
278
|
s.remove(this);
|
|
279
279
|
}
|
|
280
280
|
} catch (v) {
|
|
281
281
|
r = { error: v };
|
|
282
282
|
} finally {
|
|
283
283
|
try {
|
|
284
|
-
|
|
284
|
+
c && !c.done && (t = a.return) && t.call(a);
|
|
285
285
|
} finally {
|
|
286
286
|
if (r) throw r.error;
|
|
287
287
|
}
|
|
@@ -299,10 +299,10 @@ var j = function() {
|
|
|
299
299
|
if (p) {
|
|
300
300
|
this._finalizers = null;
|
|
301
301
|
try {
|
|
302
|
-
for (var
|
|
303
|
-
var
|
|
302
|
+
for (var b = j(p), h = b.next(); !h.done; h = b.next()) {
|
|
303
|
+
var y = h.value;
|
|
304
304
|
try {
|
|
305
|
-
|
|
305
|
+
X(y);
|
|
306
306
|
} catch (v) {
|
|
307
307
|
i = i ?? [], v instanceof D ? i = F(F([], R(i)), R(v.errors)) : i.push(v);
|
|
308
308
|
}
|
|
@@ -311,7 +311,7 @@ var j = function() {
|
|
|
311
311
|
n = { error: v };
|
|
312
312
|
} finally {
|
|
313
313
|
try {
|
|
314
|
-
h && !h.done && (o =
|
|
314
|
+
h && !h.done && (o = b.return) && o.call(b);
|
|
315
315
|
} finally {
|
|
316
316
|
if (n) throw n.error;
|
|
317
317
|
}
|
|
@@ -324,7 +324,7 @@ var j = function() {
|
|
|
324
324
|
var t;
|
|
325
325
|
if (r && r !== this)
|
|
326
326
|
if (this.closed)
|
|
327
|
-
|
|
327
|
+
X(r);
|
|
328
328
|
else {
|
|
329
329
|
if (r instanceof e) {
|
|
330
330
|
if (r.closed || r._hasParent(this))
|
|
@@ -349,11 +349,11 @@ var j = function() {
|
|
|
349
349
|
var r = new e();
|
|
350
350
|
return r.closed = !0, r;
|
|
351
351
|
}(), e;
|
|
352
|
-
}(),
|
|
353
|
-
function
|
|
354
|
-
return e instanceof
|
|
352
|
+
}(), ct = P.EMPTY;
|
|
353
|
+
function at(e) {
|
|
354
|
+
return e instanceof P || e && "closed" in e && d(e.remove) && d(e.add) && d(e.unsubscribe);
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function X(e) {
|
|
357
357
|
d(e) ? e() : e.unsubscribe();
|
|
358
358
|
}
|
|
359
359
|
var Mt = {
|
|
@@ -369,12 +369,12 @@ var Mt = {
|
|
|
369
369
|
},
|
|
370
370
|
delegate: void 0
|
|
371
371
|
};
|
|
372
|
-
function
|
|
372
|
+
function lt(e) {
|
|
373
373
|
Vt.setTimeout(function() {
|
|
374
374
|
throw e;
|
|
375
375
|
});
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function Z() {
|
|
378
378
|
}
|
|
379
379
|
function U(e) {
|
|
380
380
|
e();
|
|
@@ -383,7 +383,7 @@ var q = 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,
|
|
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
389
|
return new K(t, n, o);
|
|
@@ -410,7 +410,7 @@ var q = function(e) {
|
|
|
410
410
|
this.unsubscribe();
|
|
411
411
|
}
|
|
412
412
|
}, r;
|
|
413
|
-
}(
|
|
413
|
+
}(P), Bt = function() {
|
|
414
414
|
function e(r) {
|
|
415
415
|
this.partialObserver = r;
|
|
416
416
|
}
|
|
@@ -454,16 +454,16 @@ var q = function(e) {
|
|
|
454
454
|
return r;
|
|
455
455
|
}(q);
|
|
456
456
|
function L(e) {
|
|
457
|
-
|
|
457
|
+
lt(e);
|
|
458
458
|
}
|
|
459
459
|
function Dt(e) {
|
|
460
460
|
throw e;
|
|
461
461
|
}
|
|
462
462
|
var Yt = {
|
|
463
463
|
closed: !0,
|
|
464
|
-
next:
|
|
464
|
+
next: Z,
|
|
465
465
|
error: Dt,
|
|
466
|
-
complete:
|
|
466
|
+
complete: Z
|
|
467
467
|
}, W = function() {
|
|
468
468
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
469
469
|
}();
|
|
@@ -487,8 +487,8 @@ var w = function() {
|
|
|
487
487
|
}, e.prototype.subscribe = function(r, t, n) {
|
|
488
488
|
var o = this, i = Gt(r) ? r : new K(r, t, n);
|
|
489
489
|
return U(function() {
|
|
490
|
-
var u = o,
|
|
491
|
-
i.add(
|
|
490
|
+
var u = o, a = u.operator, c = u.source;
|
|
491
|
+
i.add(a ? a.call(i, c) : c ? o._subscribe(i) : o._trySubscribe(i));
|
|
492
492
|
}), i;
|
|
493
493
|
}, e.prototype._trySubscribe = function(r) {
|
|
494
494
|
try {
|
|
@@ -498,13 +498,13 @@ var w = function() {
|
|
|
498
498
|
}
|
|
499
499
|
}, e.prototype.forEach = function(r, t) {
|
|
500
500
|
var n = this;
|
|
501
|
-
return t =
|
|
501
|
+
return t = N(t), new t(function(o, i) {
|
|
502
502
|
var u = new K({
|
|
503
|
-
next: function(
|
|
503
|
+
next: function(a) {
|
|
504
504
|
try {
|
|
505
|
-
r(
|
|
506
|
-
} catch (
|
|
507
|
-
i(
|
|
505
|
+
r(a);
|
|
506
|
+
} catch (c) {
|
|
507
|
+
i(c), u.unsubscribe();
|
|
508
508
|
}
|
|
509
509
|
},
|
|
510
510
|
error: i,
|
|
@@ -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 =
|
|
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,7 +537,7 @@ var w = function() {
|
|
|
537
537
|
return new e(r);
|
|
538
538
|
}, e;
|
|
539
539
|
}();
|
|
540
|
-
function
|
|
540
|
+
function N(e) {
|
|
541
541
|
var r;
|
|
542
542
|
return (r = e ?? Mt.Promise) !== null && r !== void 0 ? r : Promise;
|
|
543
543
|
}
|
|
@@ -545,7 +545,7 @@ function Ht(e) {
|
|
|
545
545
|
return e && d(e.next) && d(e.error) && d(e.complete);
|
|
546
546
|
}
|
|
547
547
|
function Gt(e) {
|
|
548
|
-
return e && e instanceof q || Ht(e) &&
|
|
548
|
+
return e && e instanceof q || Ht(e) && at(e);
|
|
549
549
|
}
|
|
550
550
|
function Kt(e) {
|
|
551
551
|
return d(e == null ? void 0 : e.lift);
|
|
@@ -568,15 +568,15 @@ function _(e, r, t, n, o) {
|
|
|
568
568
|
}
|
|
569
569
|
var qt = function(e) {
|
|
570
570
|
x(r, e);
|
|
571
|
-
function r(t, n, o, i, u,
|
|
572
|
-
var
|
|
573
|
-
return
|
|
571
|
+
function r(t, n, o, i, u, a) {
|
|
572
|
+
var c = e.call(this, t) || this;
|
|
573
|
+
return c.onFinalize = u, c.shouldUnsubscribe = a, c._next = n ? function(s) {
|
|
574
574
|
try {
|
|
575
575
|
n(s);
|
|
576
576
|
} catch (l) {
|
|
577
577
|
t.error(l);
|
|
578
578
|
}
|
|
579
|
-
} : e.prototype._next,
|
|
579
|
+
} : e.prototype._next, c._error = i ? function(s) {
|
|
580
580
|
try {
|
|
581
581
|
i(s);
|
|
582
582
|
} catch (l) {
|
|
@@ -584,7 +584,7 @@ var qt = function(e) {
|
|
|
584
584
|
} finally {
|
|
585
585
|
this.unsubscribe();
|
|
586
586
|
}
|
|
587
|
-
} : e.prototype._error,
|
|
587
|
+
} : e.prototype._error, c._complete = o ? function() {
|
|
588
588
|
try {
|
|
589
589
|
o();
|
|
590
590
|
} catch (s) {
|
|
@@ -592,7 +592,7 @@ var qt = function(e) {
|
|
|
592
592
|
} finally {
|
|
593
593
|
this.unsubscribe();
|
|
594
594
|
}
|
|
595
|
-
} : e.prototype._complete,
|
|
595
|
+
} : e.prototype._complete, c;
|
|
596
596
|
}
|
|
597
597
|
return r.prototype.unsubscribe = function() {
|
|
598
598
|
var t;
|
|
@@ -601,7 +601,7 @@ 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 =
|
|
604
|
+
}(q), Wt = st(function(e) {
|
|
605
605
|
return function() {
|
|
606
606
|
e(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
607
607
|
};
|
|
@@ -612,7 +612,7 @@ var qt = function(e) {
|
|
|
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
|
|
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)
|
|
@@ -624,15 +624,15 @@ var qt = function(e) {
|
|
|
624
624
|
if (n._throwIfClosed(), !n.isStopped) {
|
|
625
625
|
n.currentObservers || (n.currentObservers = Array.from(n.observers));
|
|
626
626
|
try {
|
|
627
|
-
for (var u =
|
|
628
|
-
var
|
|
629
|
-
|
|
627
|
+
for (var u = j(n.currentObservers), a = u.next(); !a.done; a = u.next()) {
|
|
628
|
+
var c = a.value;
|
|
629
|
+
c.next(t);
|
|
630
630
|
}
|
|
631
631
|
} catch (s) {
|
|
632
632
|
o = { error: s };
|
|
633
633
|
} finally {
|
|
634
634
|
try {
|
|
635
|
-
|
|
635
|
+
a && !a.done && (i = u.return) && i.call(u);
|
|
636
636
|
} finally {
|
|
637
637
|
if (o) throw o.error;
|
|
638
638
|
}
|
|
@@ -671,9 +671,9 @@ var qt = function(e) {
|
|
|
671
671
|
}, r.prototype._subscribe = function(t) {
|
|
672
672
|
return this._throwIfClosed(), this._checkFinalizedStatuses(t), this._innerSubscribe(t);
|
|
673
673
|
}, r.prototype._innerSubscribe = function(t) {
|
|
674
|
-
var n = this, o = this, i = o.hasError, u = o.isStopped,
|
|
675
|
-
return i || u ?
|
|
676
|
-
n.currentObservers = null, M(
|
|
674
|
+
var n = this, o = this, i = o.hasError, u = o.isStopped, a = o.observers;
|
|
675
|
+
return i || u ? ct : (this.currentObservers = null, a.push(t), new P(function() {
|
|
676
|
+
n.currentObservers = null, M(a, 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
|
|
685
|
+
return new tt(t, n);
|
|
686
686
|
}, r;
|
|
687
|
-
}(w),
|
|
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,7 +701,7 @@ 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 :
|
|
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
706
|
}($), Y = function(e) {
|
|
707
707
|
x(r, e);
|
|
@@ -738,7 +738,7 @@ var qt = function(e) {
|
|
|
738
738
|
return r.prototype.schedule = function(t, n) {
|
|
739
739
|
return this;
|
|
740
740
|
}, r;
|
|
741
|
-
}(
|
|
741
|
+
}(P), 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];
|
|
@@ -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),
|
|
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 &&
|
|
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");
|
|
@@ -790,7 +790,7 @@ var qt = function(e) {
|
|
|
790
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);
|
|
791
791
|
}
|
|
792
792
|
}, r;
|
|
793
|
-
}(Jt),
|
|
793
|
+
}(Jt), rt = function() {
|
|
794
794
|
function e(r, t) {
|
|
795
795
|
t === void 0 && (t = e.now), this.schedulerActionCtor = r, this.now = t;
|
|
796
796
|
}
|
|
@@ -800,7 +800,7 @@ var qt = function(e) {
|
|
|
800
800
|
}(), Xt = function(e) {
|
|
801
801
|
x(r, e);
|
|
802
802
|
function r(t, n) {
|
|
803
|
-
n === void 0 && (n =
|
|
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,7 +822,7 @@ var qt = function(e) {
|
|
|
822
822
|
throw o;
|
|
823
823
|
}
|
|
824
824
|
}, r;
|
|
825
|
-
}(
|
|
825
|
+
}(rt), Zt = new Xt(Qt);
|
|
826
826
|
function Nt(e) {
|
|
827
827
|
return e && d(e.schedule);
|
|
828
828
|
}
|
|
@@ -832,32 +832,32 @@ function te(e) {
|
|
|
832
832
|
function ee(e) {
|
|
833
833
|
return Nt(te(e)) ? e.pop() : void 0;
|
|
834
834
|
}
|
|
835
|
-
var
|
|
835
|
+
var ft = function(e) {
|
|
836
836
|
return e && typeof e.length == "number" && typeof e != "function";
|
|
837
837
|
};
|
|
838
|
-
function
|
|
838
|
+
function ht(e) {
|
|
839
839
|
return d(e == null ? void 0 : e.then);
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function vt(e) {
|
|
842
842
|
return d(e[W]);
|
|
843
843
|
}
|
|
844
|
-
function
|
|
844
|
+
function dt(e) {
|
|
845
845
|
return Symbol.asyncIterator && d(e == null ? void 0 : e[Symbol.asyncIterator]);
|
|
846
846
|
}
|
|
847
|
-
function
|
|
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
850
|
function re() {
|
|
851
851
|
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
|
852
852
|
}
|
|
853
|
-
var
|
|
853
|
+
var yt = re();
|
|
854
854
|
function bt(e) {
|
|
855
|
-
return d(e == null ? void 0 : e[
|
|
855
|
+
return d(e == null ? void 0 : e[yt]);
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function mt(e) {
|
|
858
858
|
return Rt(this, arguments, function() {
|
|
859
859
|
var t, n, o, i;
|
|
860
|
-
return
|
|
860
|
+
return ut(this, function(u) {
|
|
861
861
|
switch (u.label) {
|
|
862
862
|
case 0:
|
|
863
863
|
t = e.getReader(), u.label = 1;
|
|
@@ -885,27 +885,27 @@ function yt(e) {
|
|
|
885
885
|
});
|
|
886
886
|
});
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function wt(e) {
|
|
889
889
|
return d(e == null ? void 0 : e.getReader);
|
|
890
890
|
}
|
|
891
891
|
function T(e) {
|
|
892
892
|
if (e instanceof w)
|
|
893
893
|
return e;
|
|
894
894
|
if (e != null) {
|
|
895
|
-
if (
|
|
895
|
+
if (vt(e))
|
|
896
896
|
return ne(e);
|
|
897
|
-
if (lt(e))
|
|
898
|
-
return oe(e);
|
|
899
897
|
if (ft(e))
|
|
898
|
+
return oe(e);
|
|
899
|
+
if (ht(e))
|
|
900
900
|
return ie(e);
|
|
901
|
-
if (
|
|
902
|
-
return
|
|
901
|
+
if (dt(e))
|
|
902
|
+
return St(e);
|
|
903
903
|
if (bt(e))
|
|
904
904
|
return ue(e);
|
|
905
|
-
if (
|
|
905
|
+
if (wt(e))
|
|
906
906
|
return se(e);
|
|
907
907
|
}
|
|
908
|
-
throw
|
|
908
|
+
throw pt(e);
|
|
909
909
|
}
|
|
910
910
|
function ne(e) {
|
|
911
911
|
return new w(function(r) {
|
|
@@ -928,20 +928,20 @@ function ie(e) {
|
|
|
928
928
|
r.closed || (r.next(t), r.complete());
|
|
929
929
|
}, function(t) {
|
|
930
930
|
return r.error(t);
|
|
931
|
-
}).then(null,
|
|
931
|
+
}).then(null, lt);
|
|
932
932
|
});
|
|
933
933
|
}
|
|
934
934
|
function ue(e) {
|
|
935
935
|
return new w(function(r) {
|
|
936
936
|
var t, n;
|
|
937
937
|
try {
|
|
938
|
-
for (var o =
|
|
938
|
+
for (var o = j(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;
|
|
942
942
|
}
|
|
943
|
-
} catch (
|
|
944
|
-
t = { error:
|
|
943
|
+
} catch (a) {
|
|
944
|
+
t = { error: a };
|
|
945
945
|
} finally {
|
|
946
946
|
try {
|
|
947
947
|
i && !i.done && (n = o.return) && n.call(o);
|
|
@@ -952,7 +952,7 @@ function ue(e) {
|
|
|
952
952
|
r.complete();
|
|
953
953
|
});
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function St(e) {
|
|
956
956
|
return new w(function(r) {
|
|
957
957
|
ce(e, r).catch(function(t) {
|
|
958
958
|
return r.error(t);
|
|
@@ -960,33 +960,33 @@ function wt(e) {
|
|
|
960
960
|
});
|
|
961
961
|
}
|
|
962
962
|
function se(e) {
|
|
963
|
-
return
|
|
963
|
+
return St(mt(e));
|
|
964
964
|
}
|
|
965
965
|
function ce(e, r) {
|
|
966
966
|
var t, n, o, i;
|
|
967
967
|
return Ut(this, void 0, void 0, function() {
|
|
968
|
-
var u,
|
|
969
|
-
return
|
|
970
|
-
switch (
|
|
968
|
+
var u, a;
|
|
969
|
+
return ut(this, function(c) {
|
|
970
|
+
switch (c.label) {
|
|
971
971
|
case 0:
|
|
972
|
-
|
|
972
|
+
c.trys.push([0, 5, 6, 11]), t = Ft(e), c.label = 1;
|
|
973
973
|
case 1:
|
|
974
974
|
return [4, t.next()];
|
|
975
975
|
case 2:
|
|
976
|
-
if (n =
|
|
976
|
+
if (n = c.sent(), !!n.done) return [3, 4];
|
|
977
977
|
if (u = n.value, r.next(u), r.closed)
|
|
978
978
|
return [2];
|
|
979
|
-
|
|
979
|
+
c.label = 3;
|
|
980
980
|
case 3:
|
|
981
981
|
return [3, 1];
|
|
982
982
|
case 4:
|
|
983
983
|
return [3, 11];
|
|
984
984
|
case 5:
|
|
985
|
-
return
|
|
985
|
+
return a = c.sent(), o = { error: a }, [3, 11];
|
|
986
986
|
case 6:
|
|
987
|
-
return
|
|
987
|
+
return c.trys.push([6, , 9, 10]), n && !n.done && (i = t.return) ? [4, i.call(t)] : [3, 8];
|
|
988
988
|
case 7:
|
|
989
|
-
|
|
989
|
+
c.sent(), c.label = 8;
|
|
990
990
|
case 8:
|
|
991
991
|
return [3, 10];
|
|
992
992
|
case 9:
|
|
@@ -1008,7 +1008,7 @@ function E(e, r, t, n, o) {
|
|
|
1008
1008
|
if (e.add(i), !o)
|
|
1009
1009
|
return i;
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1011
|
+
function gt(e, r) {
|
|
1012
1012
|
return r === void 0 && (r = 0), I(function(t, n) {
|
|
1013
1013
|
t.subscribe(_(n, function(o) {
|
|
1014
1014
|
return E(n, e, function() {
|
|
@@ -1025,7 +1025,7 @@ function St(e, r) {
|
|
|
1025
1025
|
}));
|
|
1026
1026
|
});
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
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);
|
|
@@ -1033,10 +1033,10 @@ function gt(e, r) {
|
|
|
1033
1033
|
});
|
|
1034
1034
|
}
|
|
1035
1035
|
function ae(e, r) {
|
|
1036
|
-
return T(e).pipe(
|
|
1036
|
+
return T(e).pipe(xt(r), gt(r));
|
|
1037
1037
|
}
|
|
1038
1038
|
function le(e, r) {
|
|
1039
|
-
return T(e).pipe(
|
|
1039
|
+
return T(e).pipe(xt(r), gt(r));
|
|
1040
1040
|
}
|
|
1041
1041
|
function fe(e, r) {
|
|
1042
1042
|
return new w(function(t) {
|
|
@@ -1050,12 +1050,12 @@ function he(e, r) {
|
|
|
1050
1050
|
return new w(function(t) {
|
|
1051
1051
|
var n;
|
|
1052
1052
|
return E(t, r, function() {
|
|
1053
|
-
n = e[
|
|
1053
|
+
n = e[yt](), E(t, r, function() {
|
|
1054
1054
|
var o, i, u;
|
|
1055
1055
|
try {
|
|
1056
1056
|
o = n.next(), i = o.value, u = o.done;
|
|
1057
|
-
} catch (
|
|
1058
|
-
t.error(
|
|
1057
|
+
} catch (a) {
|
|
1058
|
+
t.error(a);
|
|
1059
1059
|
return;
|
|
1060
1060
|
}
|
|
1061
1061
|
u ? t.complete() : t.next(i);
|
|
@@ -1065,7 +1065,7 @@ function he(e, r) {
|
|
|
1065
1065
|
};
|
|
1066
1066
|
});
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
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) {
|
|
@@ -1080,24 +1080,24 @@ function xt(e, r) {
|
|
|
1080
1080
|
});
|
|
1081
1081
|
}
|
|
1082
1082
|
function ve(e, r) {
|
|
1083
|
-
return
|
|
1083
|
+
return _t(mt(e), r);
|
|
1084
1084
|
}
|
|
1085
1085
|
function de(e, r) {
|
|
1086
1086
|
if (e != null) {
|
|
1087
|
-
if (
|
|
1087
|
+
if (vt(e))
|
|
1088
1088
|
return ae(e, r);
|
|
1089
|
-
if (lt(e))
|
|
1090
|
-
return fe(e, r);
|
|
1091
1089
|
if (ft(e))
|
|
1090
|
+
return fe(e, r);
|
|
1091
|
+
if (ht(e))
|
|
1092
1092
|
return le(e, r);
|
|
1093
|
-
if (
|
|
1094
|
-
return
|
|
1093
|
+
if (dt(e))
|
|
1094
|
+
return _t(e, r);
|
|
1095
1095
|
if (bt(e))
|
|
1096
1096
|
return he(e, r);
|
|
1097
|
-
if (
|
|
1097
|
+
if (wt(e))
|
|
1098
1098
|
return ve(e, r);
|
|
1099
1099
|
}
|
|
1100
|
-
throw
|
|
1100
|
+
throw pt(e);
|
|
1101
1101
|
}
|
|
1102
1102
|
function pe(e, r) {
|
|
1103
1103
|
return r ? de(e, r) : T(e);
|
|
@@ -1110,12 +1110,12 @@ function J(e, r) {
|
|
|
1110
1110
|
}));
|
|
1111
1111
|
});
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1114
|
-
var
|
|
1115
|
-
p && !
|
|
1113
|
+
function ye(e, r, t, n, o, i, u, a) {
|
|
1114
|
+
var c = [], s = 0, l = 0, p = !1, b = function() {
|
|
1115
|
+
p && !c.length && !s && r.complete();
|
|
1116
1116
|
}, h = function(v) {
|
|
1117
|
-
return s < n ?
|
|
1118
|
-
},
|
|
1117
|
+
return s < n ? y(v) : c.push(v);
|
|
1118
|
+
}, y = function(v) {
|
|
1119
1119
|
s++;
|
|
1120
1120
|
var O = !1;
|
|
1121
1121
|
T(t(v, l++)).subscribe(_(r, function(f) {
|
|
@@ -1127,18 +1127,18 @@ function be(e, r, t, n, o, i, u, c) {
|
|
|
1127
1127
|
try {
|
|
1128
1128
|
s--;
|
|
1129
1129
|
for (var f = function() {
|
|
1130
|
-
var m =
|
|
1131
|
-
u ||
|
|
1132
|
-
};
|
|
1130
|
+
var m = c.shift();
|
|
1131
|
+
u || y(m);
|
|
1132
|
+
}; c.length && s < n; )
|
|
1133
1133
|
f();
|
|
1134
|
-
|
|
1134
|
+
b();
|
|
1135
1135
|
} catch (m) {
|
|
1136
1136
|
r.error(m);
|
|
1137
1137
|
}
|
|
1138
1138
|
}));
|
|
1139
1139
|
};
|
|
1140
1140
|
return e.subscribe(_(r, h, function() {
|
|
1141
|
-
p = !0,
|
|
1141
|
+
p = !0, b();
|
|
1142
1142
|
})), function() {
|
|
1143
1143
|
};
|
|
1144
1144
|
}
|
|
@@ -1148,14 +1148,14 @@ function V(e, r, t) {
|
|
|
1148
1148
|
return r(n, i, o, u);
|
|
1149
1149
|
})(T(e(n, o)));
|
|
1150
1150
|
}, t) : (typeof r == "number" && (t = r), I(function(n, o) {
|
|
1151
|
-
return
|
|
1151
|
+
return ye(n, o, e, t);
|
|
1152
1152
|
}));
|
|
1153
1153
|
}
|
|
1154
|
-
function
|
|
1154
|
+
function be(e) {
|
|
1155
1155
|
return V(B, e);
|
|
1156
1156
|
}
|
|
1157
1157
|
function me() {
|
|
1158
|
-
return
|
|
1158
|
+
return be(1);
|
|
1159
1159
|
}
|
|
1160
1160
|
function we() {
|
|
1161
1161
|
for (var e = [], r = 0; r < arguments.length; r++)
|
|
@@ -1170,30 +1170,30 @@ function Se(e, r) {
|
|
|
1170
1170
|
}));
|
|
1171
1171
|
});
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1173
|
+
function nt(e, r) {
|
|
1174
1174
|
return d(r) ? V(e, r, 1) : V(e, 1);
|
|
1175
1175
|
}
|
|
1176
1176
|
function ge(e, r) {
|
|
1177
1177
|
return r === void 0 && (r = Zt), I(function(t, n) {
|
|
1178
|
-
var o = null, i = null, u = null,
|
|
1178
|
+
var o = null, i = null, u = null, a = function() {
|
|
1179
1179
|
if (o) {
|
|
1180
1180
|
o.unsubscribe(), o = null;
|
|
1181
1181
|
var s = i;
|
|
1182
1182
|
i = null, n.next(s);
|
|
1183
1183
|
}
|
|
1184
1184
|
};
|
|
1185
|
-
function
|
|
1185
|
+
function c() {
|
|
1186
1186
|
var s = u + e, l = r.now();
|
|
1187
1187
|
if (l < s) {
|
|
1188
1188
|
o = this.schedule(void 0, s - l), n.add(o);
|
|
1189
1189
|
return;
|
|
1190
1190
|
}
|
|
1191
|
-
|
|
1191
|
+
a();
|
|
1192
1192
|
}
|
|
1193
1193
|
t.subscribe(_(n, function(s) {
|
|
1194
|
-
i = s, u = r.now(), o || (o = r.schedule(
|
|
1194
|
+
i = s, u = r.now(), o || (o = r.schedule(c, e), n.add(o));
|
|
1195
1195
|
}, function() {
|
|
1196
|
-
|
|
1196
|
+
a(), n.complete();
|
|
1197
1197
|
}, void 0, function() {
|
|
1198
1198
|
i = o = null;
|
|
1199
1199
|
}));
|
|
@@ -1203,8 +1203,8 @@ function xe(e, r) {
|
|
|
1203
1203
|
return r === void 0 && (r = B), e = e ?? _e, I(function(t, n) {
|
|
1204
1204
|
var o, i = !0;
|
|
1205
1205
|
t.subscribe(_(n, function(u) {
|
|
1206
|
-
var
|
|
1207
|
-
(i || !e(o,
|
|
1206
|
+
var a = r(u);
|
|
1207
|
+
(i || !e(o, a)) && (i = !1, o = a, n.next(u));
|
|
1208
1208
|
}));
|
|
1209
1209
|
});
|
|
1210
1210
|
}
|
|
@@ -1216,29 +1216,29 @@ function Ie(e, r, t) {
|
|
|
1216
1216
|
return n ? I(function(o, i) {
|
|
1217
1217
|
var u;
|
|
1218
1218
|
(u = n.subscribe) === null || u === void 0 || u.call(n);
|
|
1219
|
-
var
|
|
1220
|
-
o.subscribe(_(i, function(
|
|
1219
|
+
var a = !0;
|
|
1220
|
+
o.subscribe(_(i, function(c) {
|
|
1221
1221
|
var s;
|
|
1222
|
-
(s = n.next) === null || s === void 0 || s.call(n,
|
|
1222
|
+
(s = n.next) === null || s === void 0 || s.call(n, c), i.next(c);
|
|
1223
1223
|
}, function() {
|
|
1224
|
-
var
|
|
1225
|
-
|
|
1226
|
-
}, function(
|
|
1224
|
+
var c;
|
|
1225
|
+
a = !1, (c = n.complete) === null || c === void 0 || c.call(n), i.complete();
|
|
1226
|
+
}, function(c) {
|
|
1227
1227
|
var s;
|
|
1228
|
-
|
|
1228
|
+
a = !1, (s = n.error) === null || s === void 0 || s.call(n, c), i.error(c);
|
|
1229
1229
|
}, function() {
|
|
1230
|
-
var
|
|
1231
|
-
|
|
1230
|
+
var c, s;
|
|
1231
|
+
a && ((c = n.unsubscribe) === null || c === void 0 || c.call(n)), (s = n.finalize) === null || s === void 0 || s.call(n);
|
|
1232
1232
|
}));
|
|
1233
1233
|
}) : B;
|
|
1234
1234
|
}
|
|
1235
1235
|
function Ee(e, r) {
|
|
1236
1236
|
const t = g({}), n = kt({ parent: window.parent, connect: e }), o = g(""), i = S({
|
|
1237
1237
|
get: () => o.value,
|
|
1238
|
-
set: (
|
|
1238
|
+
set: (a) => n.appState.set(a)
|
|
1239
1239
|
}), u = g({ availableLocales: [] });
|
|
1240
|
-
return n.context.subscribe((
|
|
1241
|
-
|
|
1240
|
+
return n.context.subscribe((a) => t.value = a), we(n.appState.get(), n.appState).subscribe((a) => o.value = a), n.locales.subscribe((a) => u.value = a), Ae(n.signal, n, r), it(() => n.unsubscribe()), Object.assign(
|
|
1241
|
+
ot(n, ["context", "toolbar", "appState", "locales"]),
|
|
1242
1242
|
{
|
|
1243
1243
|
context: t,
|
|
1244
1244
|
toolbar: Oe(n),
|
|
@@ -1249,10 +1249,6 @@ function Ee(e, r) {
|
|
|
1249
1249
|
}
|
|
1250
1250
|
function Oe(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
1252
|
title: S({
|
|
1257
1253
|
get: () => e.toolbar.get().title,
|
|
1258
1254
|
set: (t) => e.toolbar.set((n) => ({ ...n, title: t }))
|
|
@@ -1274,39 +1270,39 @@ function Oe(e) {
|
|
|
1274
1270
|
return e.toolbar.pipe(J((t) => t.search.input ?? ""), xe(), ge(300), Ie(console.log)).forEach((t) => r.search.value = t), r;
|
|
1275
1271
|
}
|
|
1276
1272
|
function Ae(e, r, t) {
|
|
1277
|
-
const { shift: n } =
|
|
1278
|
-
|
|
1279
|
-
|
|
1273
|
+
const { shift: n, ctrl_shift_i: o } = Ot(), i = g(null), u = new $(), a = u.pipe(
|
|
1274
|
+
nt(t ?? ((c) => Promise.resolve(c))),
|
|
1275
|
+
nt((c) => e(c))
|
|
1280
1276
|
).subscribe();
|
|
1281
|
-
return r.add(
|
|
1277
|
+
return r.add(a), Q(n, () => {
|
|
1282
1278
|
const c = Date.now();
|
|
1283
|
-
|
|
1284
|
-
}), u;
|
|
1279
|
+
i.value && c - i.value < 300 ? (i.value = null, u.next({ overlay: { action: !0 } })) : i.value = c;
|
|
1280
|
+
}), Q(o, () => u.next({ immersive: { mode: "toggle" } })), a;
|
|
1285
1281
|
}
|
|
1286
|
-
function
|
|
1282
|
+
function je(e) {
|
|
1287
1283
|
return Object.fromEntries(
|
|
1288
1284
|
Object.entries(e).map(([r, t]) => [r, Tt(t)])
|
|
1289
1285
|
);
|
|
1290
1286
|
}
|
|
1291
1287
|
function Fe(e = "comms") {
|
|
1292
|
-
const [r, t] =
|
|
1288
|
+
const [r, t] = Pe(
|
|
1293
1289
|
e,
|
|
1294
1290
|
() => Ee(),
|
|
1295
1291
|
(n) => n.unsubscribe()
|
|
1296
1292
|
);
|
|
1297
1293
|
return { provideComms: r, injectComms: t };
|
|
1298
1294
|
}
|
|
1299
|
-
function
|
|
1295
|
+
function Pe(e, r, t) {
|
|
1300
1296
|
let n;
|
|
1301
1297
|
const o = () => (!n && (n = r()), n);
|
|
1302
1298
|
return [
|
|
1303
1299
|
(i) => (i.onUnmount(() => t && n && t(n)), i.provide(e, o)),
|
|
1304
|
-
() =>
|
|
1300
|
+
() => Pt(e)()
|
|
1305
1301
|
];
|
|
1306
1302
|
}
|
|
1307
1303
|
function Me(e, r, t) {
|
|
1308
1304
|
const o = At(e, r, { immediate: !1, ...t });
|
|
1309
|
-
return Object.assign(
|
|
1305
|
+
return Object.assign(ot(o, ["execute"]), {
|
|
1310
1306
|
execute: (...i) => o.execute(void 0, ...i),
|
|
1311
1307
|
executeDelayed: o.execute
|
|
1312
1308
|
});
|
|
@@ -1321,32 +1317,32 @@ function Ve(e) {
|
|
|
1321
1317
|
const u = i.asObservable().pipe(
|
|
1322
1318
|
J((f) => f == null ? void 0 : f.contentWindow),
|
|
1323
1319
|
Se((f) => !!f)
|
|
1324
|
-
),
|
|
1325
|
-
Ct(() =>
|
|
1326
|
-
const l = Lt({ ...e, contextChanges: t, windowChanges: u, locales:
|
|
1320
|
+
), a = new Y({ availableLocales: [] }), { locale: c, availableLocales: s } = H();
|
|
1321
|
+
Ct(() => a.next(je({ locale: c, availableLocales: s })));
|
|
1322
|
+
const l = Lt({ ...e, contextChanges: t, windowChanges: u, locales: a });
|
|
1327
1323
|
l.toolbar.subscribe((f) => {
|
|
1328
1324
|
var C, k;
|
|
1329
1325
|
const m = e.toolbar;
|
|
1330
|
-
m.
|
|
1331
|
-
}),
|
|
1326
|
+
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;
|
|
1327
|
+
}), jt(
|
|
1332
1328
|
e.toolbar.search,
|
|
1333
1329
|
(f) => l.toolbar.set.search(f),
|
|
1334
1330
|
{ immediate: !0, debounce: 100 }
|
|
1335
1331
|
);
|
|
1336
|
-
const p = g(l.appState.get()),
|
|
1332
|
+
const p = g(l.appState.get()), b = S({
|
|
1337
1333
|
get: () => p.value,
|
|
1338
1334
|
set: (f) => l.appState.set(f)
|
|
1339
1335
|
});
|
|
1340
1336
|
l.appState.changes.subscribe((f) => p.value = f);
|
|
1341
1337
|
const h = g(!1);
|
|
1342
|
-
l.isConnectionInitialized.subscribe((f) => h.value = f),
|
|
1343
|
-
const { unsubscribe:
|
|
1338
|
+
l.isConnectionInitialized.subscribe((f) => h.value = f), it(() => l.unsubscribe());
|
|
1339
|
+
const { unsubscribe: y, signal: v, closed: O } = l;
|
|
1344
1340
|
return {
|
|
1345
1341
|
...e,
|
|
1346
1342
|
client: o,
|
|
1347
|
-
appState:
|
|
1343
|
+
appState: b,
|
|
1348
1344
|
isConnectionInitialized: h,
|
|
1349
|
-
unsubscribe:
|
|
1345
|
+
unsubscribe: y,
|
|
1350
1346
|
signal: v,
|
|
1351
1347
|
closed: O
|
|
1352
1348
|
};
|
|
@@ -1358,5 +1354,5 @@ export {
|
|
|
1358
1354
|
Ee as useCommsClient,
|
|
1359
1355
|
Ve as useCommsHost,
|
|
1360
1356
|
Fe as useCommsInjection,
|
|
1361
|
-
|
|
1357
|
+
Pe as useSingleton
|
|
1362
1358
|
};
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ type RefObject<T> = {
|
|
|
8
8
|
};
|
|
9
9
|
export declare function unrefObject<T extends object>(obj: RefObject<T>): UnwrapRef<T>;
|
|
10
10
|
export interface CommsToolbar {
|
|
11
|
-
start: Ref<ToolbarItem | undefined>;
|
|
12
11
|
title: Ref<string | undefined>;
|
|
13
12
|
searchEnabled: Ref<boolean>;
|
|
14
13
|
search: Ref<string>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antcde/vue-utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.1.6",
|
|
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.
|
|
35
|
+
"@antcde/connect-ts": "0.1.6"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@vitejs/plugin-vue": "^5.0.3",
|