@leancodepl/force-update 9.7.2 → 9.7.3
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/CHANGELOG.md +242 -0
- package/LICENSE +142 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1378 -0
- package/dist/index.umd.cjs +4 -0
- package/{src → dist}/lib/ForceUpdateNotification/index.d.ts +1 -0
- package/dist/lib/ForceUpdateNotification/index.d.ts.map +1 -0
- package/{src → dist}/lib/listenOnForceUpdate.d.ts +1 -0
- package/dist/lib/listenOnForceUpdate.d.ts.map +1 -0
- package/{src → dist}/lib/vitePluginForceUpdate.d.ts +2 -1
- package/dist/lib/vitePluginForceUpdate.d.ts.map +1 -0
- package/package.json +22 -14
- package/index.cjs.default.js +0 -1
- package/index.cjs.js +0 -79
- package/index.cjs.mjs +0 -2
- package/index.d.ts +0 -1
- package/index.esm.js +0 -75
- package/src/index.d.ts +0 -3
package/dist/index.js
ADDED
|
@@ -0,0 +1,1378 @@
|
|
|
1
|
+
import { useEffect as Ne } from "react";
|
|
2
|
+
var Y = function(e, n) {
|
|
3
|
+
return Y = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, r) {
|
|
4
|
+
t.__proto__ = r;
|
|
5
|
+
} || function(t, r) {
|
|
6
|
+
for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
|
|
7
|
+
}, Y(e, n);
|
|
8
|
+
};
|
|
9
|
+
function U(e, n) {
|
|
10
|
+
if (typeof n != "function" && n !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
12
|
+
Y(e, n);
|
|
13
|
+
function t() {
|
|
14
|
+
this.constructor = e;
|
|
15
|
+
}
|
|
16
|
+
e.prototype = n === null ? Object.create(n) : (t.prototype = n.prototype, new t());
|
|
17
|
+
}
|
|
18
|
+
var C = function() {
|
|
19
|
+
return C = Object.assign || function(n) {
|
|
20
|
+
for (var t, r = 1, o = arguments.length; r < o; r++) {
|
|
21
|
+
t = arguments[r];
|
|
22
|
+
for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (n[i] = t[i]);
|
|
23
|
+
}
|
|
24
|
+
return n;
|
|
25
|
+
}, C.apply(this, arguments);
|
|
26
|
+
};
|
|
27
|
+
function Ge(e, n, t, r) {
|
|
28
|
+
function o(i) {
|
|
29
|
+
return i instanceof t ? i : new t(function(u) {
|
|
30
|
+
u(i);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return new (t || (t = Promise))(function(i, u) {
|
|
34
|
+
function s(f) {
|
|
35
|
+
try {
|
|
36
|
+
c(r.next(f));
|
|
37
|
+
} catch (h) {
|
|
38
|
+
u(h);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function a(f) {
|
|
42
|
+
try {
|
|
43
|
+
c(r.throw(f));
|
|
44
|
+
} catch (h) {
|
|
45
|
+
u(h);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function c(f) {
|
|
49
|
+
f.done ? i(f.value) : o(f.value).then(s, a);
|
|
50
|
+
}
|
|
51
|
+
c((r = r.apply(e, n || [])).next());
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function ye(e, n) {
|
|
55
|
+
var t = { label: 0, sent: function() {
|
|
56
|
+
if (i[0] & 1) throw i[1];
|
|
57
|
+
return i[1];
|
|
58
|
+
}, trys: [], ops: [] }, r, o, i, u = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
59
|
+
return u.next = s(0), u.throw = s(1), u.return = s(2), typeof Symbol == "function" && (u[Symbol.iterator] = function() {
|
|
60
|
+
return this;
|
|
61
|
+
}), u;
|
|
62
|
+
function s(c) {
|
|
63
|
+
return function(f) {
|
|
64
|
+
return a([c, f]);
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function a(c) {
|
|
68
|
+
if (r) throw new TypeError("Generator is already executing.");
|
|
69
|
+
for (; u && (u = 0, c[0] && (t = 0)), t; ) try {
|
|
70
|
+
if (r = 1, o && (i = c[0] & 2 ? o.return : c[0] ? o.throw || ((i = o.return) && i.call(o), 0) : o.next) && !(i = i.call(o, c[1])).done) return i;
|
|
71
|
+
switch (o = 0, i && (c = [c[0] & 2, i.value]), c[0]) {
|
|
72
|
+
case 0:
|
|
73
|
+
case 1:
|
|
74
|
+
i = c;
|
|
75
|
+
break;
|
|
76
|
+
case 4:
|
|
77
|
+
return t.label++, { value: c[1], done: !1 };
|
|
78
|
+
case 5:
|
|
79
|
+
t.label++, o = c[1], c = [0];
|
|
80
|
+
continue;
|
|
81
|
+
case 7:
|
|
82
|
+
c = t.ops.pop(), t.trys.pop();
|
|
83
|
+
continue;
|
|
84
|
+
default:
|
|
85
|
+
if (i = t.trys, !(i = i.length > 0 && i[i.length - 1]) && (c[0] === 6 || c[0] === 2)) {
|
|
86
|
+
t = 0;
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
if (c[0] === 3 && (!i || c[1] > i[0] && c[1] < i[3])) {
|
|
90
|
+
t.label = c[1];
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
if (c[0] === 6 && t.label < i[1]) {
|
|
94
|
+
t.label = i[1], i = c;
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
if (i && t.label < i[2]) {
|
|
98
|
+
t.label = i[2], t.ops.push(c);
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
i[2] && t.ops.pop(), t.trys.pop();
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
c = n.call(e, t);
|
|
105
|
+
} catch (f) {
|
|
106
|
+
c = [6, f], o = 0;
|
|
107
|
+
} finally {
|
|
108
|
+
r = i = 0;
|
|
109
|
+
}
|
|
110
|
+
if (c[0] & 5) throw c[1];
|
|
111
|
+
return { value: c[0] ? c[1] : void 0, done: !0 };
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function _(e) {
|
|
115
|
+
var n = typeof Symbol == "function" && Symbol.iterator, t = n && e[n], r = 0;
|
|
116
|
+
if (t) return t.call(e);
|
|
117
|
+
if (e && typeof e.length == "number") return {
|
|
118
|
+
next: function() {
|
|
119
|
+
return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e };
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
throw new TypeError(n ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
123
|
+
}
|
|
124
|
+
function F(e, n) {
|
|
125
|
+
var t = typeof Symbol == "function" && e[Symbol.iterator];
|
|
126
|
+
if (!t) return e;
|
|
127
|
+
var r = t.call(e), o, i = [], u;
|
|
128
|
+
try {
|
|
129
|
+
for (; (n === void 0 || n-- > 0) && !(o = r.next()).done; ) i.push(o.value);
|
|
130
|
+
} catch (s) {
|
|
131
|
+
u = { error: s };
|
|
132
|
+
} finally {
|
|
133
|
+
try {
|
|
134
|
+
o && !o.done && (t = r.return) && t.call(r);
|
|
135
|
+
} finally {
|
|
136
|
+
if (u) throw u.error;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return i;
|
|
140
|
+
}
|
|
141
|
+
function H(e, n, t) {
|
|
142
|
+
if (t || arguments.length === 2) for (var r = 0, o = n.length, i; r < o; r++)
|
|
143
|
+
(i || !(r in n)) && (i || (i = Array.prototype.slice.call(n, 0, r)), i[r] = n[r]);
|
|
144
|
+
return e.concat(i || Array.prototype.slice.call(n));
|
|
145
|
+
}
|
|
146
|
+
function k(e) {
|
|
147
|
+
return this instanceof k ? (this.v = e, this) : new k(e);
|
|
148
|
+
}
|
|
149
|
+
function Me(e, n, t) {
|
|
150
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
151
|
+
var r = t.apply(e, n || []), o, i = [];
|
|
152
|
+
return o = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), s("next"), s("throw"), s("return", u), o[Symbol.asyncIterator] = function() {
|
|
153
|
+
return this;
|
|
154
|
+
}, o;
|
|
155
|
+
function u(l) {
|
|
156
|
+
return function(x) {
|
|
157
|
+
return Promise.resolve(x).then(l, h);
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
function s(l, x) {
|
|
161
|
+
r[l] && (o[l] = function(d) {
|
|
162
|
+
return new Promise(function(T, P) {
|
|
163
|
+
i.push([l, d, T, P]) > 1 || a(l, d);
|
|
164
|
+
});
|
|
165
|
+
}, x && (o[l] = x(o[l])));
|
|
166
|
+
}
|
|
167
|
+
function a(l, x) {
|
|
168
|
+
try {
|
|
169
|
+
c(r[l](x));
|
|
170
|
+
} catch (d) {
|
|
171
|
+
p(i[0][3], d);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function c(l) {
|
|
175
|
+
l.value instanceof k ? Promise.resolve(l.value.v).then(f, h) : p(i[0][2], l);
|
|
176
|
+
}
|
|
177
|
+
function f(l) {
|
|
178
|
+
a("next", l);
|
|
179
|
+
}
|
|
180
|
+
function h(l) {
|
|
181
|
+
a("throw", l);
|
|
182
|
+
}
|
|
183
|
+
function p(l, x) {
|
|
184
|
+
l(x), i.shift(), i.length && a(i[0][0], i[0][1]);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
function Xe(e) {
|
|
188
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
189
|
+
var n = e[Symbol.asyncIterator], t;
|
|
190
|
+
return n ? n.call(e) : (e = typeof _ == "function" ? _(e) : e[Symbol.iterator](), t = {}, r("next"), r("throw"), r("return"), t[Symbol.asyncIterator] = function() {
|
|
191
|
+
return this;
|
|
192
|
+
}, t);
|
|
193
|
+
function r(i) {
|
|
194
|
+
t[i] = e[i] && function(u) {
|
|
195
|
+
return new Promise(function(s, a) {
|
|
196
|
+
u = e[i](u), o(s, a, u.done, u.value);
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
function o(i, u, s, a) {
|
|
201
|
+
Promise.resolve(a).then(function(c) {
|
|
202
|
+
i({ value: c, done: s });
|
|
203
|
+
}, u);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function b(e) {
|
|
207
|
+
return typeof e == "function";
|
|
208
|
+
}
|
|
209
|
+
function z(e) {
|
|
210
|
+
var n = function(r) {
|
|
211
|
+
Error.call(r), r.stack = new Error().stack;
|
|
212
|
+
}, t = e(n);
|
|
213
|
+
return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t;
|
|
214
|
+
}
|
|
215
|
+
var G = z(function(e) {
|
|
216
|
+
return function(t) {
|
|
217
|
+
e(this), this.message = t ? t.length + ` errors occurred during unsubscription:
|
|
218
|
+
` + t.map(function(r, o) {
|
|
219
|
+
return o + 1 + ") " + r.toString();
|
|
220
|
+
}).join(`
|
|
221
|
+
`) : "", this.name = "UnsubscriptionError", this.errors = t;
|
|
222
|
+
};
|
|
223
|
+
});
|
|
224
|
+
function J(e, n) {
|
|
225
|
+
if (e) {
|
|
226
|
+
var t = e.indexOf(n);
|
|
227
|
+
0 <= t && e.splice(t, 1);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
var B = (function() {
|
|
231
|
+
function e(n) {
|
|
232
|
+
this.initialTeardown = n, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
233
|
+
}
|
|
234
|
+
return e.prototype.unsubscribe = function() {
|
|
235
|
+
var n, t, r, o, i;
|
|
236
|
+
if (!this.closed) {
|
|
237
|
+
this.closed = !0;
|
|
238
|
+
var u = this._parentage;
|
|
239
|
+
if (u)
|
|
240
|
+
if (this._parentage = null, Array.isArray(u))
|
|
241
|
+
try {
|
|
242
|
+
for (var s = _(u), a = s.next(); !a.done; a = s.next()) {
|
|
243
|
+
var c = a.value;
|
|
244
|
+
c.remove(this);
|
|
245
|
+
}
|
|
246
|
+
} catch (d) {
|
|
247
|
+
n = { error: d };
|
|
248
|
+
} finally {
|
|
249
|
+
try {
|
|
250
|
+
a && !a.done && (t = s.return) && t.call(s);
|
|
251
|
+
} finally {
|
|
252
|
+
if (n) throw n.error;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
else
|
|
256
|
+
u.remove(this);
|
|
257
|
+
var f = this.initialTeardown;
|
|
258
|
+
if (b(f))
|
|
259
|
+
try {
|
|
260
|
+
f();
|
|
261
|
+
} catch (d) {
|
|
262
|
+
i = d instanceof G ? d.errors : [d];
|
|
263
|
+
}
|
|
264
|
+
var h = this._finalizers;
|
|
265
|
+
if (h) {
|
|
266
|
+
this._finalizers = null;
|
|
267
|
+
try {
|
|
268
|
+
for (var p = _(h), l = p.next(); !l.done; l = p.next()) {
|
|
269
|
+
var x = l.value;
|
|
270
|
+
try {
|
|
271
|
+
se(x);
|
|
272
|
+
} catch (d) {
|
|
273
|
+
i = i ?? [], d instanceof G ? i = H(H([], F(i)), F(d.errors)) : i.push(d);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
} catch (d) {
|
|
277
|
+
r = { error: d };
|
|
278
|
+
} finally {
|
|
279
|
+
try {
|
|
280
|
+
l && !l.done && (o = p.return) && o.call(p);
|
|
281
|
+
} finally {
|
|
282
|
+
if (r) throw r.error;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
if (i)
|
|
287
|
+
throw new G(i);
|
|
288
|
+
}
|
|
289
|
+
}, e.prototype.add = function(n) {
|
|
290
|
+
var t;
|
|
291
|
+
if (n && n !== this)
|
|
292
|
+
if (this.closed)
|
|
293
|
+
se(n);
|
|
294
|
+
else {
|
|
295
|
+
if (n instanceof e) {
|
|
296
|
+
if (n.closed || n._hasParent(this))
|
|
297
|
+
return;
|
|
298
|
+
n._addParent(this);
|
|
299
|
+
}
|
|
300
|
+
(this._finalizers = (t = this._finalizers) !== null && t !== void 0 ? t : []).push(n);
|
|
301
|
+
}
|
|
302
|
+
}, e.prototype._hasParent = function(n) {
|
|
303
|
+
var t = this._parentage;
|
|
304
|
+
return t === n || Array.isArray(t) && t.includes(n);
|
|
305
|
+
}, e.prototype._addParent = function(n) {
|
|
306
|
+
var t = this._parentage;
|
|
307
|
+
this._parentage = Array.isArray(t) ? (t.push(n), t) : t ? [t, n] : n;
|
|
308
|
+
}, e.prototype._removeParent = function(n) {
|
|
309
|
+
var t = this._parentage;
|
|
310
|
+
t === n ? this._parentage = null : Array.isArray(t) && J(t, n);
|
|
311
|
+
}, e.prototype.remove = function(n) {
|
|
312
|
+
var t = this._finalizers;
|
|
313
|
+
t && J(t, n), n instanceof e && n._removeParent(this);
|
|
314
|
+
}, e.EMPTY = (function() {
|
|
315
|
+
var n = new e();
|
|
316
|
+
return n.closed = !0, n;
|
|
317
|
+
})(), e;
|
|
318
|
+
})();
|
|
319
|
+
B.EMPTY;
|
|
320
|
+
function me(e) {
|
|
321
|
+
return e instanceof B || e && "closed" in e && b(e.remove) && b(e.add) && b(e.unsubscribe);
|
|
322
|
+
}
|
|
323
|
+
function se(e) {
|
|
324
|
+
b(e) ? e() : e.unsubscribe();
|
|
325
|
+
}
|
|
326
|
+
var Ye = {
|
|
327
|
+
Promise: void 0
|
|
328
|
+
}, Je = {
|
|
329
|
+
setTimeout: function(e, n) {
|
|
330
|
+
for (var t = [], r = 2; r < arguments.length; r++)
|
|
331
|
+
t[r - 2] = arguments[r];
|
|
332
|
+
return setTimeout.apply(void 0, H([e, n], F(t)));
|
|
333
|
+
},
|
|
334
|
+
clearTimeout: function(e) {
|
|
335
|
+
return clearTimeout(e);
|
|
336
|
+
},
|
|
337
|
+
delegate: void 0
|
|
338
|
+
};
|
|
339
|
+
function we(e) {
|
|
340
|
+
Je.setTimeout(function() {
|
|
341
|
+
throw e;
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
function fe() {
|
|
345
|
+
}
|
|
346
|
+
function $e(e) {
|
|
347
|
+
e();
|
|
348
|
+
}
|
|
349
|
+
var W = (function(e) {
|
|
350
|
+
U(n, e);
|
|
351
|
+
function n(t) {
|
|
352
|
+
var r = e.call(this) || this;
|
|
353
|
+
return r.isStopped = !1, t ? (r.destination = t, me(t) && t.add(r)) : r.destination = Ke, r;
|
|
354
|
+
}
|
|
355
|
+
return n.create = function(t, r, o) {
|
|
356
|
+
return new $(t, r, o);
|
|
357
|
+
}, n.prototype.next = function(t) {
|
|
358
|
+
this.isStopped || this._next(t);
|
|
359
|
+
}, n.prototype.error = function(t) {
|
|
360
|
+
this.isStopped || (this.isStopped = !0, this._error(t));
|
|
361
|
+
}, n.prototype.complete = function() {
|
|
362
|
+
this.isStopped || (this.isStopped = !0, this._complete());
|
|
363
|
+
}, n.prototype.unsubscribe = function() {
|
|
364
|
+
this.closed || (this.isStopped = !0, e.prototype.unsubscribe.call(this), this.destination = null);
|
|
365
|
+
}, n.prototype._next = function(t) {
|
|
366
|
+
this.destination.next(t);
|
|
367
|
+
}, n.prototype._error = function(t) {
|
|
368
|
+
try {
|
|
369
|
+
this.destination.error(t);
|
|
370
|
+
} finally {
|
|
371
|
+
this.unsubscribe();
|
|
372
|
+
}
|
|
373
|
+
}, n.prototype._complete = function() {
|
|
374
|
+
try {
|
|
375
|
+
this.destination.complete();
|
|
376
|
+
} finally {
|
|
377
|
+
this.unsubscribe();
|
|
378
|
+
}
|
|
379
|
+
}, n;
|
|
380
|
+
})(B), ze = (function() {
|
|
381
|
+
function e(n) {
|
|
382
|
+
this.partialObserver = n;
|
|
383
|
+
}
|
|
384
|
+
return e.prototype.next = function(n) {
|
|
385
|
+
var t = this.partialObserver;
|
|
386
|
+
if (t.next)
|
|
387
|
+
try {
|
|
388
|
+
t.next(n);
|
|
389
|
+
} catch (r) {
|
|
390
|
+
q(r);
|
|
391
|
+
}
|
|
392
|
+
}, e.prototype.error = function(n) {
|
|
393
|
+
var t = this.partialObserver;
|
|
394
|
+
if (t.error)
|
|
395
|
+
try {
|
|
396
|
+
t.error(n);
|
|
397
|
+
} catch (r) {
|
|
398
|
+
q(r);
|
|
399
|
+
}
|
|
400
|
+
else
|
|
401
|
+
q(n);
|
|
402
|
+
}, e.prototype.complete = function() {
|
|
403
|
+
var n = this.partialObserver;
|
|
404
|
+
if (n.complete)
|
|
405
|
+
try {
|
|
406
|
+
n.complete();
|
|
407
|
+
} catch (t) {
|
|
408
|
+
q(t);
|
|
409
|
+
}
|
|
410
|
+
}, e;
|
|
411
|
+
})(), $ = (function(e) {
|
|
412
|
+
U(n, e);
|
|
413
|
+
function n(t, r, o) {
|
|
414
|
+
var i = e.call(this) || this, u;
|
|
415
|
+
return b(t) || !t ? u = {
|
|
416
|
+
next: t ?? void 0,
|
|
417
|
+
error: r ?? void 0,
|
|
418
|
+
complete: o ?? void 0
|
|
419
|
+
} : u = t, i.destination = new ze(u), i;
|
|
420
|
+
}
|
|
421
|
+
return n;
|
|
422
|
+
})(W);
|
|
423
|
+
function q(e) {
|
|
424
|
+
we(e);
|
|
425
|
+
}
|
|
426
|
+
function We(e) {
|
|
427
|
+
throw e;
|
|
428
|
+
}
|
|
429
|
+
var Ke = {
|
|
430
|
+
closed: !0,
|
|
431
|
+
next: fe,
|
|
432
|
+
error: We,
|
|
433
|
+
complete: fe
|
|
434
|
+
}, K = (function() {
|
|
435
|
+
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
436
|
+
})();
|
|
437
|
+
function be(e) {
|
|
438
|
+
return e;
|
|
439
|
+
}
|
|
440
|
+
function Qe(e) {
|
|
441
|
+
return e.length === 0 ? be : e.length === 1 ? e[0] : function(t) {
|
|
442
|
+
return e.reduce(function(r, o) {
|
|
443
|
+
return o(r);
|
|
444
|
+
}, t);
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
var S = (function() {
|
|
448
|
+
function e(n) {
|
|
449
|
+
n && (this._subscribe = n);
|
|
450
|
+
}
|
|
451
|
+
return e.prototype.lift = function(n) {
|
|
452
|
+
var t = new e();
|
|
453
|
+
return t.source = this, t.operator = n, t;
|
|
454
|
+
}, e.prototype.subscribe = function(n, t, r) {
|
|
455
|
+
var o = this, i = et(n) ? n : new $(n, t, r);
|
|
456
|
+
return $e(function() {
|
|
457
|
+
var u = o, s = u.operator, a = u.source;
|
|
458
|
+
i.add(s ? s.call(i, a) : a ? o._subscribe(i) : o._trySubscribe(i));
|
|
459
|
+
}), i;
|
|
460
|
+
}, e.prototype._trySubscribe = function(n) {
|
|
461
|
+
try {
|
|
462
|
+
return this._subscribe(n);
|
|
463
|
+
} catch (t) {
|
|
464
|
+
n.error(t);
|
|
465
|
+
}
|
|
466
|
+
}, e.prototype.forEach = function(n, t) {
|
|
467
|
+
var r = this;
|
|
468
|
+
return t = le(t), new t(function(o, i) {
|
|
469
|
+
var u = new $({
|
|
470
|
+
next: function(s) {
|
|
471
|
+
try {
|
|
472
|
+
n(s);
|
|
473
|
+
} catch (a) {
|
|
474
|
+
i(a), u.unsubscribe();
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
error: i,
|
|
478
|
+
complete: o
|
|
479
|
+
});
|
|
480
|
+
r.subscribe(u);
|
|
481
|
+
});
|
|
482
|
+
}, e.prototype._subscribe = function(n) {
|
|
483
|
+
var t;
|
|
484
|
+
return (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(n);
|
|
485
|
+
}, e.prototype[K] = function() {
|
|
486
|
+
return this;
|
|
487
|
+
}, e.prototype.pipe = function() {
|
|
488
|
+
for (var n = [], t = 0; t < arguments.length; t++)
|
|
489
|
+
n[t] = arguments[t];
|
|
490
|
+
return Qe(n)(this);
|
|
491
|
+
}, e.prototype.toPromise = function(n) {
|
|
492
|
+
var t = this;
|
|
493
|
+
return n = le(n), new n(function(r, o) {
|
|
494
|
+
var i;
|
|
495
|
+
t.subscribe(function(u) {
|
|
496
|
+
return i = u;
|
|
497
|
+
}, function(u) {
|
|
498
|
+
return o(u);
|
|
499
|
+
}, function() {
|
|
500
|
+
return r(i);
|
|
501
|
+
});
|
|
502
|
+
});
|
|
503
|
+
}, e.create = function(n) {
|
|
504
|
+
return new e(n);
|
|
505
|
+
}, e;
|
|
506
|
+
})();
|
|
507
|
+
function le(e) {
|
|
508
|
+
var n;
|
|
509
|
+
return (n = e ?? Ye.Promise) !== null && n !== void 0 ? n : Promise;
|
|
510
|
+
}
|
|
511
|
+
function Ze(e) {
|
|
512
|
+
return e && b(e.next) && b(e.error) && b(e.complete);
|
|
513
|
+
}
|
|
514
|
+
function et(e) {
|
|
515
|
+
return e && e instanceof W || Ze(e) && me(e);
|
|
516
|
+
}
|
|
517
|
+
function tt(e) {
|
|
518
|
+
return b(e?.lift);
|
|
519
|
+
}
|
|
520
|
+
function I(e) {
|
|
521
|
+
return function(n) {
|
|
522
|
+
if (tt(n))
|
|
523
|
+
return n.lift(function(t) {
|
|
524
|
+
try {
|
|
525
|
+
return e(t, this);
|
|
526
|
+
} catch (r) {
|
|
527
|
+
this.error(r);
|
|
528
|
+
}
|
|
529
|
+
});
|
|
530
|
+
throw new TypeError("Unable to lift unknown Observable type");
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
function E(e, n, t, r, o) {
|
|
534
|
+
return new nt(e, n, t, r, o);
|
|
535
|
+
}
|
|
536
|
+
var nt = (function(e) {
|
|
537
|
+
U(n, e);
|
|
538
|
+
function n(t, r, o, i, u, s) {
|
|
539
|
+
var a = e.call(this, t) || this;
|
|
540
|
+
return a.onFinalize = u, a.shouldUnsubscribe = s, a._next = r ? function(c) {
|
|
541
|
+
try {
|
|
542
|
+
r(c);
|
|
543
|
+
} catch (f) {
|
|
544
|
+
t.error(f);
|
|
545
|
+
}
|
|
546
|
+
} : e.prototype._next, a._error = i ? function(c) {
|
|
547
|
+
try {
|
|
548
|
+
i(c);
|
|
549
|
+
} catch (f) {
|
|
550
|
+
t.error(f);
|
|
551
|
+
} finally {
|
|
552
|
+
this.unsubscribe();
|
|
553
|
+
}
|
|
554
|
+
} : e.prototype._error, a._complete = o ? function() {
|
|
555
|
+
try {
|
|
556
|
+
o();
|
|
557
|
+
} catch (c) {
|
|
558
|
+
t.error(c);
|
|
559
|
+
} finally {
|
|
560
|
+
this.unsubscribe();
|
|
561
|
+
}
|
|
562
|
+
} : e.prototype._complete, a;
|
|
563
|
+
}
|
|
564
|
+
return n.prototype.unsubscribe = function() {
|
|
565
|
+
var t;
|
|
566
|
+
if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
|
|
567
|
+
var r = this.closed;
|
|
568
|
+
e.prototype.unsubscribe.call(this), !r && ((t = this.onFinalize) === null || t === void 0 || t.call(this));
|
|
569
|
+
}
|
|
570
|
+
}, n;
|
|
571
|
+
})(W), rt = {
|
|
572
|
+
now: function() {
|
|
573
|
+
return Date.now();
|
|
574
|
+
}
|
|
575
|
+
}, ot = (function(e) {
|
|
576
|
+
U(n, e);
|
|
577
|
+
function n(t, r) {
|
|
578
|
+
return e.call(this) || this;
|
|
579
|
+
}
|
|
580
|
+
return n.prototype.schedule = function(t, r) {
|
|
581
|
+
return this;
|
|
582
|
+
}, n;
|
|
583
|
+
})(B), he = {
|
|
584
|
+
setInterval: function(e, n) {
|
|
585
|
+
for (var t = [], r = 2; r < arguments.length; r++)
|
|
586
|
+
t[r - 2] = arguments[r];
|
|
587
|
+
return setInterval.apply(void 0, H([e, n], F(t)));
|
|
588
|
+
},
|
|
589
|
+
clearInterval: function(e) {
|
|
590
|
+
return clearInterval(e);
|
|
591
|
+
},
|
|
592
|
+
delegate: void 0
|
|
593
|
+
}, it = (function(e) {
|
|
594
|
+
U(n, e);
|
|
595
|
+
function n(t, r) {
|
|
596
|
+
var o = e.call(this, t, r) || this;
|
|
597
|
+
return o.scheduler = t, o.work = r, o.pending = !1, o;
|
|
598
|
+
}
|
|
599
|
+
return n.prototype.schedule = function(t, r) {
|
|
600
|
+
var o;
|
|
601
|
+
if (r === void 0 && (r = 0), this.closed)
|
|
602
|
+
return this;
|
|
603
|
+
this.state = t;
|
|
604
|
+
var i = this.id, u = this.scheduler;
|
|
605
|
+
return i != null && (this.id = this.recycleAsyncId(u, i, r)), this.pending = !0, this.delay = r, this.id = (o = this.id) !== null && o !== void 0 ? o : this.requestAsyncId(u, this.id, r), this;
|
|
606
|
+
}, n.prototype.requestAsyncId = function(t, r, o) {
|
|
607
|
+
return o === void 0 && (o = 0), he.setInterval(t.flush.bind(t, this), o);
|
|
608
|
+
}, n.prototype.recycleAsyncId = function(t, r, o) {
|
|
609
|
+
if (o === void 0 && (o = 0), o != null && this.delay === o && this.pending === !1)
|
|
610
|
+
return r;
|
|
611
|
+
r != null && he.clearInterval(r);
|
|
612
|
+
}, n.prototype.execute = function(t, r) {
|
|
613
|
+
if (this.closed)
|
|
614
|
+
return new Error("executing a cancelled action");
|
|
615
|
+
this.pending = !1;
|
|
616
|
+
var o = this._execute(t, r);
|
|
617
|
+
if (o)
|
|
618
|
+
return o;
|
|
619
|
+
this.pending === !1 && this.id != null && (this.id = this.recycleAsyncId(this.scheduler, this.id, null));
|
|
620
|
+
}, n.prototype._execute = function(t, r) {
|
|
621
|
+
var o = !1, i;
|
|
622
|
+
try {
|
|
623
|
+
this.work(t);
|
|
624
|
+
} catch (u) {
|
|
625
|
+
o = !0, i = u || new Error("Scheduled action threw falsy error");
|
|
626
|
+
}
|
|
627
|
+
if (o)
|
|
628
|
+
return this.unsubscribe(), i;
|
|
629
|
+
}, n.prototype.unsubscribe = function() {
|
|
630
|
+
if (!this.closed) {
|
|
631
|
+
var t = this, r = t.id, o = t.scheduler, i = o.actions;
|
|
632
|
+
this.work = this.state = this.scheduler = null, this.pending = !1, J(i, this), r != null && (this.id = this.recycleAsyncId(o, r, null)), this.delay = null, e.prototype.unsubscribe.call(this);
|
|
633
|
+
}
|
|
634
|
+
}, n;
|
|
635
|
+
})(ot), de = (function() {
|
|
636
|
+
function e(n, t) {
|
|
637
|
+
t === void 0 && (t = e.now), this.schedulerActionCtor = n, this.now = t;
|
|
638
|
+
}
|
|
639
|
+
return e.prototype.schedule = function(n, t, r) {
|
|
640
|
+
return t === void 0 && (t = 0), new this.schedulerActionCtor(this, n).schedule(r, t);
|
|
641
|
+
}, e.now = rt.now, e;
|
|
642
|
+
})(), ut = (function(e) {
|
|
643
|
+
U(n, e);
|
|
644
|
+
function n(t, r) {
|
|
645
|
+
r === void 0 && (r = de.now);
|
|
646
|
+
var o = e.call(this, t, r) || this;
|
|
647
|
+
return o.actions = [], o._active = !1, o;
|
|
648
|
+
}
|
|
649
|
+
return n.prototype.flush = function(t) {
|
|
650
|
+
var r = this.actions;
|
|
651
|
+
if (this._active) {
|
|
652
|
+
r.push(t);
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
var o;
|
|
656
|
+
this._active = !0;
|
|
657
|
+
do
|
|
658
|
+
if (o = t.execute(t.state, t.delay))
|
|
659
|
+
break;
|
|
660
|
+
while (t = r.shift());
|
|
661
|
+
if (this._active = !1, o) {
|
|
662
|
+
for (; t = r.shift(); )
|
|
663
|
+
t.unsubscribe();
|
|
664
|
+
throw o;
|
|
665
|
+
}
|
|
666
|
+
}, n;
|
|
667
|
+
})(de), xe = new ut(it), at = xe, ct = new S(function(e) {
|
|
668
|
+
return e.complete();
|
|
669
|
+
});
|
|
670
|
+
function ge(e) {
|
|
671
|
+
return e && b(e.schedule);
|
|
672
|
+
}
|
|
673
|
+
function st(e) {
|
|
674
|
+
return e[e.length - 1];
|
|
675
|
+
}
|
|
676
|
+
function ft(e) {
|
|
677
|
+
return ge(st(e)) ? e.pop() : void 0;
|
|
678
|
+
}
|
|
679
|
+
var Se = (function(e) {
|
|
680
|
+
return e && typeof e.length == "number" && typeof e != "function";
|
|
681
|
+
});
|
|
682
|
+
function Ae(e) {
|
|
683
|
+
return b(e?.then);
|
|
684
|
+
}
|
|
685
|
+
function Ee(e) {
|
|
686
|
+
return b(e[K]);
|
|
687
|
+
}
|
|
688
|
+
function Ie(e) {
|
|
689
|
+
return Symbol.asyncIterator && b(e?.[Symbol.asyncIterator]);
|
|
690
|
+
}
|
|
691
|
+
function Pe(e) {
|
|
692
|
+
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.");
|
|
693
|
+
}
|
|
694
|
+
function lt() {
|
|
695
|
+
return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
|
|
696
|
+
}
|
|
697
|
+
var Te = lt();
|
|
698
|
+
function Oe(e) {
|
|
699
|
+
return b(e?.[Te]);
|
|
700
|
+
}
|
|
701
|
+
function Re(e) {
|
|
702
|
+
return Me(this, arguments, function() {
|
|
703
|
+
var t, r, o, i;
|
|
704
|
+
return ye(this, function(u) {
|
|
705
|
+
switch (u.label) {
|
|
706
|
+
case 0:
|
|
707
|
+
t = e.getReader(), u.label = 1;
|
|
708
|
+
case 1:
|
|
709
|
+
u.trys.push([1, , 9, 10]), u.label = 2;
|
|
710
|
+
case 2:
|
|
711
|
+
return [4, k(t.read())];
|
|
712
|
+
case 3:
|
|
713
|
+
return r = u.sent(), o = r.value, i = r.done, i ? [4, k(void 0)] : [3, 5];
|
|
714
|
+
case 4:
|
|
715
|
+
return [2, u.sent()];
|
|
716
|
+
case 5:
|
|
717
|
+
return [4, k(o)];
|
|
718
|
+
case 6:
|
|
719
|
+
return [4, u.sent()];
|
|
720
|
+
case 7:
|
|
721
|
+
return u.sent(), [3, 2];
|
|
722
|
+
case 8:
|
|
723
|
+
return [3, 10];
|
|
724
|
+
case 9:
|
|
725
|
+
return t.releaseLock(), [7];
|
|
726
|
+
case 10:
|
|
727
|
+
return [2];
|
|
728
|
+
}
|
|
729
|
+
});
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
function je(e) {
|
|
733
|
+
return b(e?.getReader);
|
|
734
|
+
}
|
|
735
|
+
function D(e) {
|
|
736
|
+
if (e instanceof S)
|
|
737
|
+
return e;
|
|
738
|
+
if (e != null) {
|
|
739
|
+
if (Ee(e))
|
|
740
|
+
return ht(e);
|
|
741
|
+
if (Se(e))
|
|
742
|
+
return dt(e);
|
|
743
|
+
if (Ae(e))
|
|
744
|
+
return vt(e);
|
|
745
|
+
if (Ie(e))
|
|
746
|
+
return Le(e);
|
|
747
|
+
if (Oe(e))
|
|
748
|
+
return pt(e);
|
|
749
|
+
if (je(e))
|
|
750
|
+
return yt(e);
|
|
751
|
+
}
|
|
752
|
+
throw Pe(e);
|
|
753
|
+
}
|
|
754
|
+
function ht(e) {
|
|
755
|
+
return new S(function(n) {
|
|
756
|
+
var t = e[K]();
|
|
757
|
+
if (b(t.subscribe))
|
|
758
|
+
return t.subscribe(n);
|
|
759
|
+
throw new TypeError("Provided object does not correctly implement Symbol.observable");
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
function dt(e) {
|
|
763
|
+
return new S(function(n) {
|
|
764
|
+
for (var t = 0; t < e.length && !n.closed; t++)
|
|
765
|
+
n.next(e[t]);
|
|
766
|
+
n.complete();
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
function vt(e) {
|
|
770
|
+
return new S(function(n) {
|
|
771
|
+
e.then(function(t) {
|
|
772
|
+
n.closed || (n.next(t), n.complete());
|
|
773
|
+
}, function(t) {
|
|
774
|
+
return n.error(t);
|
|
775
|
+
}).then(null, we);
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
function pt(e) {
|
|
779
|
+
return new S(function(n) {
|
|
780
|
+
var t, r;
|
|
781
|
+
try {
|
|
782
|
+
for (var o = _(e), i = o.next(); !i.done; i = o.next()) {
|
|
783
|
+
var u = i.value;
|
|
784
|
+
if (n.next(u), n.closed)
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
787
|
+
} catch (s) {
|
|
788
|
+
t = { error: s };
|
|
789
|
+
} finally {
|
|
790
|
+
try {
|
|
791
|
+
i && !i.done && (r = o.return) && r.call(o);
|
|
792
|
+
} finally {
|
|
793
|
+
if (t) throw t.error;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
n.complete();
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
function Le(e) {
|
|
800
|
+
return new S(function(n) {
|
|
801
|
+
mt(e, n).catch(function(t) {
|
|
802
|
+
return n.error(t);
|
|
803
|
+
});
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
function yt(e) {
|
|
807
|
+
return Le(Re(e));
|
|
808
|
+
}
|
|
809
|
+
function mt(e, n) {
|
|
810
|
+
var t, r, o, i;
|
|
811
|
+
return Ge(this, void 0, void 0, function() {
|
|
812
|
+
var u, s;
|
|
813
|
+
return ye(this, function(a) {
|
|
814
|
+
switch (a.label) {
|
|
815
|
+
case 0:
|
|
816
|
+
a.trys.push([0, 5, 6, 11]), t = Xe(e), a.label = 1;
|
|
817
|
+
case 1:
|
|
818
|
+
return [4, t.next()];
|
|
819
|
+
case 2:
|
|
820
|
+
if (r = a.sent(), !!r.done) return [3, 4];
|
|
821
|
+
if (u = r.value, n.next(u), n.closed)
|
|
822
|
+
return [2];
|
|
823
|
+
a.label = 3;
|
|
824
|
+
case 3:
|
|
825
|
+
return [3, 1];
|
|
826
|
+
case 4:
|
|
827
|
+
return [3, 11];
|
|
828
|
+
case 5:
|
|
829
|
+
return s = a.sent(), o = { error: s }, [3, 11];
|
|
830
|
+
case 6:
|
|
831
|
+
return a.trys.push([6, , 9, 10]), r && !r.done && (i = t.return) ? [4, i.call(t)] : [3, 8];
|
|
832
|
+
case 7:
|
|
833
|
+
a.sent(), a.label = 8;
|
|
834
|
+
case 8:
|
|
835
|
+
return [3, 10];
|
|
836
|
+
case 9:
|
|
837
|
+
if (o) throw o.error;
|
|
838
|
+
return [7];
|
|
839
|
+
case 10:
|
|
840
|
+
return [7];
|
|
841
|
+
case 11:
|
|
842
|
+
return n.complete(), [2];
|
|
843
|
+
}
|
|
844
|
+
});
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
function j(e, n, t, r, o) {
|
|
848
|
+
r === void 0 && (r = 0), o === void 0 && (o = !1);
|
|
849
|
+
var i = n.schedule(function() {
|
|
850
|
+
t(), o ? e.add(this.schedule(null, r)) : this.unsubscribe();
|
|
851
|
+
}, r);
|
|
852
|
+
if (e.add(i), !o)
|
|
853
|
+
return i;
|
|
854
|
+
}
|
|
855
|
+
function ke(e, n) {
|
|
856
|
+
return n === void 0 && (n = 0), I(function(t, r) {
|
|
857
|
+
t.subscribe(E(r, function(o) {
|
|
858
|
+
return j(r, e, function() {
|
|
859
|
+
return r.next(o);
|
|
860
|
+
}, n);
|
|
861
|
+
}, function() {
|
|
862
|
+
return j(r, e, function() {
|
|
863
|
+
return r.complete();
|
|
864
|
+
}, n);
|
|
865
|
+
}, function(o) {
|
|
866
|
+
return j(r, e, function() {
|
|
867
|
+
return r.error(o);
|
|
868
|
+
}, n);
|
|
869
|
+
}));
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
function Ue(e, n) {
|
|
873
|
+
return n === void 0 && (n = 0), I(function(t, r) {
|
|
874
|
+
r.add(e.schedule(function() {
|
|
875
|
+
return t.subscribe(r);
|
|
876
|
+
}, n));
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
function wt(e, n) {
|
|
880
|
+
return D(e).pipe(Ue(n), ke(n));
|
|
881
|
+
}
|
|
882
|
+
function bt(e, n) {
|
|
883
|
+
return D(e).pipe(Ue(n), ke(n));
|
|
884
|
+
}
|
|
885
|
+
function xt(e, n) {
|
|
886
|
+
return new S(function(t) {
|
|
887
|
+
var r = 0;
|
|
888
|
+
return n.schedule(function() {
|
|
889
|
+
r === e.length ? t.complete() : (t.next(e[r++]), t.closed || this.schedule());
|
|
890
|
+
});
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
function gt(e, n) {
|
|
894
|
+
return new S(function(t) {
|
|
895
|
+
var r;
|
|
896
|
+
return j(t, n, function() {
|
|
897
|
+
r = e[Te](), j(t, n, function() {
|
|
898
|
+
var o, i, u;
|
|
899
|
+
try {
|
|
900
|
+
o = r.next(), i = o.value, u = o.done;
|
|
901
|
+
} catch (s) {
|
|
902
|
+
t.error(s);
|
|
903
|
+
return;
|
|
904
|
+
}
|
|
905
|
+
u ? t.complete() : t.next(i);
|
|
906
|
+
}, 0, !0);
|
|
907
|
+
}), function() {
|
|
908
|
+
return b(r?.return) && r.return();
|
|
909
|
+
};
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
function De(e, n) {
|
|
913
|
+
if (!e)
|
|
914
|
+
throw new Error("Iterable cannot be null");
|
|
915
|
+
return new S(function(t) {
|
|
916
|
+
j(t, n, function() {
|
|
917
|
+
var r = e[Symbol.asyncIterator]();
|
|
918
|
+
j(t, n, function() {
|
|
919
|
+
r.next().then(function(o) {
|
|
920
|
+
o.done ? t.complete() : t.next(o.value);
|
|
921
|
+
});
|
|
922
|
+
}, 0, !0);
|
|
923
|
+
});
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
function St(e, n) {
|
|
927
|
+
return De(Re(e), n);
|
|
928
|
+
}
|
|
929
|
+
function At(e, n) {
|
|
930
|
+
if (e != null) {
|
|
931
|
+
if (Ee(e))
|
|
932
|
+
return wt(e, n);
|
|
933
|
+
if (Se(e))
|
|
934
|
+
return xt(e, n);
|
|
935
|
+
if (Ae(e))
|
|
936
|
+
return bt(e, n);
|
|
937
|
+
if (Ie(e))
|
|
938
|
+
return De(e, n);
|
|
939
|
+
if (Oe(e))
|
|
940
|
+
return gt(e, n);
|
|
941
|
+
if (je(e))
|
|
942
|
+
return St(e, n);
|
|
943
|
+
}
|
|
944
|
+
throw Pe(e);
|
|
945
|
+
}
|
|
946
|
+
function Et(e, n) {
|
|
947
|
+
return n ? At(e, n) : D(e);
|
|
948
|
+
}
|
|
949
|
+
function It() {
|
|
950
|
+
for (var e = [], n = 0; n < arguments.length; n++)
|
|
951
|
+
e[n] = arguments[n];
|
|
952
|
+
var t = ft(e);
|
|
953
|
+
return Et(e, t);
|
|
954
|
+
}
|
|
955
|
+
var Ce = z(function(e) {
|
|
956
|
+
return function() {
|
|
957
|
+
e(this), this.name = "EmptyError", this.message = "no elements in sequence";
|
|
958
|
+
};
|
|
959
|
+
});
|
|
960
|
+
function Pt(e) {
|
|
961
|
+
return e instanceof Date && !isNaN(e);
|
|
962
|
+
}
|
|
963
|
+
function Q(e, n) {
|
|
964
|
+
return I(function(t, r) {
|
|
965
|
+
var o = 0;
|
|
966
|
+
t.subscribe(E(r, function(i) {
|
|
967
|
+
r.next(e.call(n, i, o++));
|
|
968
|
+
}));
|
|
969
|
+
});
|
|
970
|
+
}
|
|
971
|
+
function Tt(e, n, t, r, o, i, u, s) {
|
|
972
|
+
var a = [], c = 0, f = 0, h = !1, p = function() {
|
|
973
|
+
h && !a.length && !c && n.complete();
|
|
974
|
+
}, l = function(d) {
|
|
975
|
+
return c < r ? x(d) : a.push(d);
|
|
976
|
+
}, x = function(d) {
|
|
977
|
+
c++;
|
|
978
|
+
var T = !1;
|
|
979
|
+
D(t(d, f++)).subscribe(E(n, function(P) {
|
|
980
|
+
n.next(P);
|
|
981
|
+
}, function() {
|
|
982
|
+
T = !0;
|
|
983
|
+
}, void 0, function() {
|
|
984
|
+
if (T)
|
|
985
|
+
try {
|
|
986
|
+
c--;
|
|
987
|
+
for (var P = function() {
|
|
988
|
+
var O = a.shift();
|
|
989
|
+
u || x(O);
|
|
990
|
+
}; a.length && c < r; )
|
|
991
|
+
P();
|
|
992
|
+
p();
|
|
993
|
+
} catch (O) {
|
|
994
|
+
n.error(O);
|
|
995
|
+
}
|
|
996
|
+
}));
|
|
997
|
+
};
|
|
998
|
+
return e.subscribe(E(n, l, function() {
|
|
999
|
+
h = !0, p();
|
|
1000
|
+
})), function() {
|
|
1001
|
+
};
|
|
1002
|
+
}
|
|
1003
|
+
function _e(e, n, t) {
|
|
1004
|
+
return t === void 0 && (t = 1 / 0), b(n) ? _e(function(r, o) {
|
|
1005
|
+
return Q(function(i, u) {
|
|
1006
|
+
return n(r, i, o, u);
|
|
1007
|
+
})(D(e(r, o)));
|
|
1008
|
+
}, t) : (typeof n == "number" && (t = n), I(function(r, o) {
|
|
1009
|
+
return Tt(r, o, e, t);
|
|
1010
|
+
}));
|
|
1011
|
+
}
|
|
1012
|
+
function Ot(e, n, t) {
|
|
1013
|
+
e === void 0 && (e = 0), t === void 0 && (t = at);
|
|
1014
|
+
var r = -1;
|
|
1015
|
+
return n != null && (ge(n) ? t = n : r = n), new S(function(o) {
|
|
1016
|
+
var i = Pt(e) ? +e - t.now() : e;
|
|
1017
|
+
i < 0 && (i = 0);
|
|
1018
|
+
var u = 0;
|
|
1019
|
+
return t.schedule(function() {
|
|
1020
|
+
o.closed || (o.next(u++), 0 <= r ? this.schedule(void 0, r) : o.complete());
|
|
1021
|
+
}, i);
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
function Rt(e, n) {
|
|
1025
|
+
return e === void 0 && (e = 0), n === void 0 && (n = xe), e < 0 && (e = 0), Ot(e, e, n);
|
|
1026
|
+
}
|
|
1027
|
+
function jt(e, n) {
|
|
1028
|
+
return I(function(t, r) {
|
|
1029
|
+
var o = 0;
|
|
1030
|
+
t.subscribe(E(r, function(i) {
|
|
1031
|
+
return e.call(n, i, o++) && r.next(i);
|
|
1032
|
+
}));
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
1035
|
+
function qe(e) {
|
|
1036
|
+
return I(function(n, t) {
|
|
1037
|
+
var r = null, o = !1, i;
|
|
1038
|
+
r = n.subscribe(E(t, void 0, void 0, function(u) {
|
|
1039
|
+
i = D(e(u, qe(e)(n))), r ? (r.unsubscribe(), r = null, i.subscribe(t)) : o = !0;
|
|
1040
|
+
})), o && (r.unsubscribe(), r = null, i.subscribe(t));
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
function Lt(e, n, t, r, o) {
|
|
1044
|
+
return function(i, u) {
|
|
1045
|
+
var s = t, a = n, c = 0;
|
|
1046
|
+
i.subscribe(E(u, function(f) {
|
|
1047
|
+
var h = c++;
|
|
1048
|
+
a = s ? e(a, f, h) : (s = !0, f), u.next(a);
|
|
1049
|
+
}, o));
|
|
1050
|
+
};
|
|
1051
|
+
}
|
|
1052
|
+
function kt(e) {
|
|
1053
|
+
return I(function(n, t) {
|
|
1054
|
+
var r = !1;
|
|
1055
|
+
n.subscribe(E(t, function(o) {
|
|
1056
|
+
r = !0, t.next(o);
|
|
1057
|
+
}, function() {
|
|
1058
|
+
r || t.next(e), t.complete();
|
|
1059
|
+
}));
|
|
1060
|
+
});
|
|
1061
|
+
}
|
|
1062
|
+
function Ut(e) {
|
|
1063
|
+
return e <= 0 ? function() {
|
|
1064
|
+
return ct;
|
|
1065
|
+
} : I(function(n, t) {
|
|
1066
|
+
var r = 0;
|
|
1067
|
+
n.subscribe(E(t, function(o) {
|
|
1068
|
+
++r <= e && (t.next(o), e <= r && t.complete());
|
|
1069
|
+
}));
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1072
|
+
function Dt(e) {
|
|
1073
|
+
return e === void 0 && (e = Ct), I(function(n, t) {
|
|
1074
|
+
var r = !1;
|
|
1075
|
+
n.subscribe(E(t, function(o) {
|
|
1076
|
+
r = !0, t.next(o);
|
|
1077
|
+
}, function() {
|
|
1078
|
+
return r ? t.complete() : t.error(e());
|
|
1079
|
+
}));
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
function Ct() {
|
|
1083
|
+
return new Ce();
|
|
1084
|
+
}
|
|
1085
|
+
function _t(e, n) {
|
|
1086
|
+
var t = arguments.length >= 2;
|
|
1087
|
+
return function(r) {
|
|
1088
|
+
return r.pipe(e ? jt(function(o, i) {
|
|
1089
|
+
return e(o, i, r);
|
|
1090
|
+
}) : be, Ut(1), t ? kt(n) : Dt(function() {
|
|
1091
|
+
return new Ce();
|
|
1092
|
+
}));
|
|
1093
|
+
};
|
|
1094
|
+
}
|
|
1095
|
+
function qt() {
|
|
1096
|
+
return I(function(e, n) {
|
|
1097
|
+
var t, r = !1;
|
|
1098
|
+
e.subscribe(E(n, function(o) {
|
|
1099
|
+
var i = t;
|
|
1100
|
+
t = o, r && n.next([i, o]), r = !0;
|
|
1101
|
+
}));
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
function Ft(e, n) {
|
|
1105
|
+
return I(Lt(e, n, arguments.length >= 2, !0));
|
|
1106
|
+
}
|
|
1107
|
+
function Fe(e) {
|
|
1108
|
+
switch (e.responseType) {
|
|
1109
|
+
case "json": {
|
|
1110
|
+
if ("response" in e)
|
|
1111
|
+
return e.response;
|
|
1112
|
+
var n = e;
|
|
1113
|
+
return JSON.parse(n.responseText);
|
|
1114
|
+
}
|
|
1115
|
+
case "document":
|
|
1116
|
+
return e.responseXML;
|
|
1117
|
+
default: {
|
|
1118
|
+
if ("response" in e)
|
|
1119
|
+
return e.response;
|
|
1120
|
+
var n = e;
|
|
1121
|
+
return n.responseText;
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
var Ht = /* @__PURE__ */ (function() {
|
|
1126
|
+
function e(n, t, r, o) {
|
|
1127
|
+
o === void 0 && (o = "download_load"), this.originalEvent = n, this.xhr = t, this.request = r, this.type = o;
|
|
1128
|
+
var i = t.status, u = t.responseType;
|
|
1129
|
+
this.status = i ?? 0, this.responseType = u ?? "";
|
|
1130
|
+
var s = t.getAllResponseHeaders();
|
|
1131
|
+
this.responseHeaders = s ? s.split(`
|
|
1132
|
+
`).reduce(function(f, h) {
|
|
1133
|
+
var p = h.indexOf(": ");
|
|
1134
|
+
return f[h.slice(0, p)] = h.slice(p + 2), f;
|
|
1135
|
+
}, {}) : {}, this.response = Fe(t);
|
|
1136
|
+
var a = n.loaded, c = n.total;
|
|
1137
|
+
this.loaded = a, this.total = c;
|
|
1138
|
+
}
|
|
1139
|
+
return e;
|
|
1140
|
+
})(), V = z(function(e) {
|
|
1141
|
+
return function(t, r, o) {
|
|
1142
|
+
this.message = t, this.name = "AjaxError", this.xhr = r, this.request = o, this.status = r.status, this.responseType = r.responseType;
|
|
1143
|
+
var i;
|
|
1144
|
+
try {
|
|
1145
|
+
i = Fe(r);
|
|
1146
|
+
} catch {
|
|
1147
|
+
i = r.responseText;
|
|
1148
|
+
}
|
|
1149
|
+
this.response = i;
|
|
1150
|
+
};
|
|
1151
|
+
}), Vt = (function() {
|
|
1152
|
+
function e(n, t) {
|
|
1153
|
+
return V.call(this, "ajax timeout", n, t), this.name = "AjaxTimeoutError", this;
|
|
1154
|
+
}
|
|
1155
|
+
return e.prototype = Object.create(V.prototype), e;
|
|
1156
|
+
})();
|
|
1157
|
+
function Bt(e, n) {
|
|
1158
|
+
return L({ method: "GET", url: e, headers: n });
|
|
1159
|
+
}
|
|
1160
|
+
function Nt(e, n, t) {
|
|
1161
|
+
return L({ method: "POST", url: e, body: n, headers: t });
|
|
1162
|
+
}
|
|
1163
|
+
function Gt(e, n) {
|
|
1164
|
+
return L({ method: "DELETE", url: e, headers: n });
|
|
1165
|
+
}
|
|
1166
|
+
function Mt(e, n, t) {
|
|
1167
|
+
return L({ method: "PUT", url: e, body: n, headers: t });
|
|
1168
|
+
}
|
|
1169
|
+
function Xt(e, n, t) {
|
|
1170
|
+
return L({ method: "PATCH", url: e, body: n, headers: t });
|
|
1171
|
+
}
|
|
1172
|
+
var Yt = Q(function(e) {
|
|
1173
|
+
return e.response;
|
|
1174
|
+
});
|
|
1175
|
+
function Jt(e, n) {
|
|
1176
|
+
return Yt(L({
|
|
1177
|
+
method: "GET",
|
|
1178
|
+
url: e,
|
|
1179
|
+
headers: n
|
|
1180
|
+
}));
|
|
1181
|
+
}
|
|
1182
|
+
var L = (function() {
|
|
1183
|
+
var e = function(n) {
|
|
1184
|
+
var t = typeof n == "string" ? {
|
|
1185
|
+
url: n
|
|
1186
|
+
} : n;
|
|
1187
|
+
return zt(t);
|
|
1188
|
+
};
|
|
1189
|
+
return e.get = Bt, e.post = Nt, e.delete = Gt, e.put = Mt, e.patch = Xt, e.getJSON = Jt, e;
|
|
1190
|
+
})(), $t = "upload", ve = "download", M = "loadstart", X = "progress", pe = "load";
|
|
1191
|
+
function zt(e) {
|
|
1192
|
+
return new S(function(n) {
|
|
1193
|
+
var t, r, o = C({ async: !0, crossDomain: !1, withCredentials: !1, method: "GET", timeout: 0, responseType: "json" }, e), i = o.queryParams, u = o.body, s = o.headers, a = o.url;
|
|
1194
|
+
if (!a)
|
|
1195
|
+
throw new TypeError("url is required");
|
|
1196
|
+
if (i) {
|
|
1197
|
+
var c;
|
|
1198
|
+
if (a.includes("?")) {
|
|
1199
|
+
var f = a.split("?");
|
|
1200
|
+
if (2 < f.length)
|
|
1201
|
+
throw new TypeError("invalid url");
|
|
1202
|
+
c = new URLSearchParams(f[1]), new URLSearchParams(i).forEach(function(m, w) {
|
|
1203
|
+
return c.set(w, m);
|
|
1204
|
+
}), a = f[0] + "?" + c;
|
|
1205
|
+
} else
|
|
1206
|
+
c = new URLSearchParams(i), a = a + "?" + c;
|
|
1207
|
+
}
|
|
1208
|
+
var h = {};
|
|
1209
|
+
if (s)
|
|
1210
|
+
for (var p in s)
|
|
1211
|
+
s.hasOwnProperty(p) && (h[p.toLowerCase()] = s[p]);
|
|
1212
|
+
var l = o.crossDomain;
|
|
1213
|
+
!l && !("x-requested-with" in h) && (h["x-requested-with"] = "XMLHttpRequest");
|
|
1214
|
+
var x = o.withCredentials, d = o.xsrfCookieName, T = o.xsrfHeaderName;
|
|
1215
|
+
if ((x || !l) && d && T) {
|
|
1216
|
+
var P = (r = (t = document?.cookie.match(new RegExp("(^|;\\s*)(" + d + ")=([^;]*)"))) === null || t === void 0 ? void 0 : t.pop()) !== null && r !== void 0 ? r : "";
|
|
1217
|
+
P && (h[T] = P);
|
|
1218
|
+
}
|
|
1219
|
+
var O = Wt(u, h), A = C(C({}, o), {
|
|
1220
|
+
url: a,
|
|
1221
|
+
headers: h,
|
|
1222
|
+
body: O
|
|
1223
|
+
}), v;
|
|
1224
|
+
v = e.createXHR ? e.createXHR() : new XMLHttpRequest();
|
|
1225
|
+
{
|
|
1226
|
+
var y = e.progressSubscriber, ee = e.includeDownloadProgress, He = ee === void 0 ? !1 : ee, te = e.includeUploadProgress, Ve = te === void 0 ? !1 : te, ne = function(m, w) {
|
|
1227
|
+
v.addEventListener(m, function() {
|
|
1228
|
+
var g, R = w();
|
|
1229
|
+
(g = y?.error) === null || g === void 0 || g.call(y, R), n.error(R);
|
|
1230
|
+
});
|
|
1231
|
+
};
|
|
1232
|
+
ne("timeout", function() {
|
|
1233
|
+
return new Vt(v, A);
|
|
1234
|
+
}), ne("abort", function() {
|
|
1235
|
+
return new V("aborted", v, A);
|
|
1236
|
+
});
|
|
1237
|
+
var re = function(m, w) {
|
|
1238
|
+
return new Ht(w, v, A, m + "_" + w.type);
|
|
1239
|
+
}, oe = function(m, w, g) {
|
|
1240
|
+
m.addEventListener(w, function(R) {
|
|
1241
|
+
n.next(re(g, R));
|
|
1242
|
+
});
|
|
1243
|
+
};
|
|
1244
|
+
Ve && [M, X, pe].forEach(function(m) {
|
|
1245
|
+
return oe(v.upload, m, $t);
|
|
1246
|
+
}), y && [M, X].forEach(function(m) {
|
|
1247
|
+
return v.upload.addEventListener(m, function(w) {
|
|
1248
|
+
var g;
|
|
1249
|
+
return (g = y?.next) === null || g === void 0 ? void 0 : g.call(y, w);
|
|
1250
|
+
});
|
|
1251
|
+
}), He && [M, X].forEach(function(m) {
|
|
1252
|
+
return oe(v, m, ve);
|
|
1253
|
+
});
|
|
1254
|
+
var ie = function(m) {
|
|
1255
|
+
var w = "ajax error" + (m ? " " + m : "");
|
|
1256
|
+
n.error(new V(w, v, A));
|
|
1257
|
+
};
|
|
1258
|
+
v.addEventListener("error", function(m) {
|
|
1259
|
+
var w;
|
|
1260
|
+
(w = y?.error) === null || w === void 0 || w.call(y, m), ie();
|
|
1261
|
+
}), v.addEventListener(pe, function(m) {
|
|
1262
|
+
var w, g, R = v.status;
|
|
1263
|
+
if (R < 400) {
|
|
1264
|
+
(w = y?.complete) === null || w === void 0 || w.call(y);
|
|
1265
|
+
var ce = void 0;
|
|
1266
|
+
try {
|
|
1267
|
+
ce = re(ve, m);
|
|
1268
|
+
} catch (Be) {
|
|
1269
|
+
n.error(Be);
|
|
1270
|
+
return;
|
|
1271
|
+
}
|
|
1272
|
+
n.next(ce), n.complete();
|
|
1273
|
+
} else
|
|
1274
|
+
(g = y?.error) === null || g === void 0 || g.call(y, m), ie(R);
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1277
|
+
var ue = A.user, ae = A.method, N = A.async;
|
|
1278
|
+
ue ? v.open(ae, a, N, ue, A.password) : v.open(ae, a, N), N && (v.timeout = A.timeout, v.responseType = A.responseType), "withCredentials" in v && (v.withCredentials = A.withCredentials);
|
|
1279
|
+
for (var p in h)
|
|
1280
|
+
h.hasOwnProperty(p) && v.setRequestHeader(p, h[p]);
|
|
1281
|
+
return O ? v.send(O) : v.send(), function() {
|
|
1282
|
+
v && v.readyState !== 4 && v.abort();
|
|
1283
|
+
};
|
|
1284
|
+
});
|
|
1285
|
+
}
|
|
1286
|
+
function Wt(e, n) {
|
|
1287
|
+
var t;
|
|
1288
|
+
if (!e || typeof e == "string" || nn(e) || rn(e) || Qt(e) || Zt(e) || en(e) || on(e))
|
|
1289
|
+
return e;
|
|
1290
|
+
if (tn(e))
|
|
1291
|
+
return e.buffer;
|
|
1292
|
+
if (typeof e == "object")
|
|
1293
|
+
return n["content-type"] = (t = n["content-type"]) !== null && t !== void 0 ? t : "application/json;charset=utf-8", JSON.stringify(e);
|
|
1294
|
+
throw new TypeError("Unknown body type");
|
|
1295
|
+
}
|
|
1296
|
+
var Kt = Object.prototype.toString;
|
|
1297
|
+
function Z(e, n) {
|
|
1298
|
+
return Kt.call(e) === "[object " + n + "]";
|
|
1299
|
+
}
|
|
1300
|
+
function Qt(e) {
|
|
1301
|
+
return Z(e, "ArrayBuffer");
|
|
1302
|
+
}
|
|
1303
|
+
function Zt(e) {
|
|
1304
|
+
return Z(e, "File");
|
|
1305
|
+
}
|
|
1306
|
+
function en(e) {
|
|
1307
|
+
return Z(e, "Blob");
|
|
1308
|
+
}
|
|
1309
|
+
function tn(e) {
|
|
1310
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView(e);
|
|
1311
|
+
}
|
|
1312
|
+
function nn(e) {
|
|
1313
|
+
return typeof FormData < "u" && e instanceof FormData;
|
|
1314
|
+
}
|
|
1315
|
+
function rn(e) {
|
|
1316
|
+
return typeof URLSearchParams < "u" && e instanceof URLSearchParams;
|
|
1317
|
+
}
|
|
1318
|
+
function on(e) {
|
|
1319
|
+
return typeof ReadableStream < "u" && e instanceof ReadableStream;
|
|
1320
|
+
}
|
|
1321
|
+
const un = 180 * 1e3, an = ({
|
|
1322
|
+
versionCheckIntervalPeriod: e = un,
|
|
1323
|
+
onNewVersionAvailable: n
|
|
1324
|
+
}) => {
|
|
1325
|
+
const t = () => L({
|
|
1326
|
+
url: "/version",
|
|
1327
|
+
responseType: "text",
|
|
1328
|
+
headers: {
|
|
1329
|
+
"Cache-Control": "no-store"
|
|
1330
|
+
}
|
|
1331
|
+
}).pipe(
|
|
1332
|
+
Q((o) => {
|
|
1333
|
+
const i = o.response;
|
|
1334
|
+
return typeof i == "string" ? i.trim() : null;
|
|
1335
|
+
}),
|
|
1336
|
+
qe(() => It(null))
|
|
1337
|
+
), r = Rt(e).pipe(
|
|
1338
|
+
_e(t),
|
|
1339
|
+
Ft((o, i) => i ?? o),
|
|
1340
|
+
qt(),
|
|
1341
|
+
_t(([o, i]) => !!o && o !== i)
|
|
1342
|
+
).subscribe(() => {
|
|
1343
|
+
n(), r.unsubscribe();
|
|
1344
|
+
});
|
|
1345
|
+
return () => r.unsubscribe();
|
|
1346
|
+
};
|
|
1347
|
+
function sn({
|
|
1348
|
+
message: e = "A new version of the app is available. Please reload the page to access latest features."
|
|
1349
|
+
}) {
|
|
1350
|
+
return Ne(() => an({
|
|
1351
|
+
onNewVersionAvailable: () => {
|
|
1352
|
+
globalThis.confirm(e) && globalThis.location.reload();
|
|
1353
|
+
}
|
|
1354
|
+
}), [e]), null;
|
|
1355
|
+
}
|
|
1356
|
+
function fn(e = {}) {
|
|
1357
|
+
const { envVarName: n = "APP_VERSION" } = e;
|
|
1358
|
+
return {
|
|
1359
|
+
name: "vite-plugin-force-update",
|
|
1360
|
+
generateBundle() {
|
|
1361
|
+
const t = process.env[n];
|
|
1362
|
+
if (!t) {
|
|
1363
|
+
console.warn(`Environment variable ${n} is not set.`);
|
|
1364
|
+
return;
|
|
1365
|
+
}
|
|
1366
|
+
this.emitFile({
|
|
1367
|
+
type: "asset",
|
|
1368
|
+
fileName: "version",
|
|
1369
|
+
source: t.trim()
|
|
1370
|
+
});
|
|
1371
|
+
}
|
|
1372
|
+
};
|
|
1373
|
+
}
|
|
1374
|
+
export {
|
|
1375
|
+
sn as ForceUpdateNotification,
|
|
1376
|
+
an as listenOnForceUpdate,
|
|
1377
|
+
fn as vitePluginForceUpdate
|
|
1378
|
+
};
|