@spscommerce/utils 6.13.1 → 7.0.0
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/lib/decorators/simple-metadata-decorator-applicator.d.ts +2 -2
- package/lib/index.cjs.js +1 -1
- package/lib/index.es.js +499 -645
- package/lib/string/template.d.ts +1 -1
- package/lib/typings.d.ts +1 -1
- package/package.json +2 -3
- package/spscommerce-utils-7.0.0.tgz +0 -0
- package/{vite.config.js → vite.config.mjs} +4 -0
package/lib/index.es.js
CHANGED
|
@@ -1,180 +1,125 @@
|
|
|
1
|
-
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
1
|
+
function Q(e, t) {
|
|
2
|
+
for (var n = 0; n < t.length; n++) {
|
|
3
|
+
const r = t[n];
|
|
4
|
+
if (typeof r != "string" && !Array.isArray(r)) {
|
|
5
|
+
for (const a in r)
|
|
6
|
+
if (a !== "default" && !(a in e)) {
|
|
7
|
+
const i = Object.getOwnPropertyDescriptor(r, a);
|
|
8
|
+
i && Object.defineProperty(e, a, i.get ? i : {
|
|
9
|
+
enumerable: !0,
|
|
10
|
+
get: () => r[a]
|
|
11
|
+
});
|
|
12
|
+
}
|
|
14
13
|
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
function _mergeNamespaces(n, m) {
|
|
18
|
-
m.forEach(function(e) {
|
|
19
|
-
Object.keys(e).forEach(function(k) {
|
|
20
|
-
if (k !== "default" && !(k in n)) {
|
|
21
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
22
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function() {
|
|
25
|
-
return e[k];
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
return Object.freeze(n);
|
|
32
|
-
}
|
|
33
|
-
function flatten(arg) {
|
|
34
|
-
if (!Array.isArray(arg)) {
|
|
35
|
-
return arg;
|
|
36
14
|
}
|
|
37
|
-
return
|
|
15
|
+
return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
|
|
38
16
|
}
|
|
39
|
-
function
|
|
40
|
-
|
|
41
|
-
for (const member of candidate) {
|
|
42
|
-
if (!set.has(member)) {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return true;
|
|
17
|
+
function Ne(e) {
|
|
18
|
+
return Array.isArray(e) ? e.reduce((t, n) => t.concat(Ne(n)), []) : e;
|
|
47
19
|
}
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
20
|
+
function st(e, t) {
|
|
21
|
+
const n = new Set(t);
|
|
22
|
+
for (const r of e)
|
|
23
|
+
if (!n.has(r))
|
|
24
|
+
return !1;
|
|
25
|
+
return !0;
|
|
26
|
+
}
|
|
27
|
+
function Le() {
|
|
28
|
+
return this.pending = !1, typeof this.id < "u" ? (clearTimeout(this.id), delete this.id, !0) : !1;
|
|
56
29
|
}
|
|
57
|
-
function
|
|
58
|
-
const
|
|
59
|
-
return new Promise((
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
void (async () => {
|
|
30
|
+
function Be(e, t, n) {
|
|
31
|
+
const r = function(...i) {
|
|
32
|
+
return new Promise((c, m) => {
|
|
33
|
+
r.reset(), r.pending = !0;
|
|
34
|
+
function h() {
|
|
35
|
+
(async () => {
|
|
64
36
|
try {
|
|
65
|
-
let
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
resolve(output);
|
|
70
|
-
} catch (err) {
|
|
71
|
-
reject(err);
|
|
37
|
+
let u = e.apply(n || this, i);
|
|
38
|
+
u instanceof Promise && (u = await u), c(u);
|
|
39
|
+
} catch (u) {
|
|
40
|
+
m(u);
|
|
72
41
|
} finally {
|
|
73
|
-
|
|
42
|
+
r.reset();
|
|
74
43
|
}
|
|
75
44
|
})();
|
|
76
45
|
}
|
|
77
|
-
|
|
46
|
+
r.id = window.setTimeout(h, t);
|
|
78
47
|
});
|
|
79
48
|
};
|
|
80
|
-
|
|
81
|
-
return debFn;
|
|
49
|
+
return r.reset = Le.bind(r), r;
|
|
82
50
|
}
|
|
83
|
-
function
|
|
84
|
-
this.pending =
|
|
85
|
-
if (typeof this.id === "number") {
|
|
86
|
-
window.cancelAnimationFrame(this.id);
|
|
87
|
-
delete this.id;
|
|
88
|
-
return true;
|
|
89
|
-
}
|
|
90
|
-
return false;
|
|
51
|
+
function _e() {
|
|
52
|
+
return this.pending = !1, typeof this.id == "number" ? (window.cancelAnimationFrame(this.id), delete this.id, !0) : !1;
|
|
91
53
|
}
|
|
92
|
-
function
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
lockFn.id = window.requestAnimationFrame(() => {
|
|
98
|
-
if (functionToLock) {
|
|
99
|
-
functionToLock.apply(thisArg || this, args);
|
|
100
|
-
}
|
|
101
|
-
lockFn.reset();
|
|
102
|
-
});
|
|
103
|
-
lockFn.pending = true;
|
|
54
|
+
function qe(e, t) {
|
|
55
|
+
const n = function(...a) {
|
|
56
|
+
n.pending && n.reset(), n.id = window.requestAnimationFrame(() => {
|
|
57
|
+
e && e.apply(t || this, a), n.reset();
|
|
58
|
+
}), n.pending = !0;
|
|
104
59
|
};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
xor: (a, b) => (a || b) && !(a && b)
|
|
60
|
+
return n.pending = !1, n.reset = _e.bind(n), n;
|
|
61
|
+
}
|
|
62
|
+
function mt(e, t) {
|
|
63
|
+
const n = t ? e.bind(t) : e;
|
|
64
|
+
setTimeout(n, 0);
|
|
65
|
+
}
|
|
66
|
+
const z = {
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
|
68
|
+
add: (e, t) => e + t,
|
|
69
|
+
and: (e, t) => e && t,
|
|
70
|
+
band: (e, t) => e & t,
|
|
71
|
+
bor: (e, t) => e | t,
|
|
72
|
+
bxor: (e, t) => e ^ t,
|
|
73
|
+
bnot: (e) => ~e,
|
|
74
|
+
decr: (e) => e - 1,
|
|
75
|
+
div: (e, t) => e / t,
|
|
76
|
+
eq: (e, t) => e === t,
|
|
77
|
+
exp: (e, t) => e ** t,
|
|
78
|
+
gt: (e, t) => e > t,
|
|
79
|
+
gte: (e, t) => e >= t,
|
|
80
|
+
incr: (e) => e + 1,
|
|
81
|
+
lshift: (e, t) => e << t,
|
|
82
|
+
lt: (e, t) => e < t,
|
|
83
|
+
lte: (e, t) => e <= t,
|
|
84
|
+
mul: (e, t) => e * t,
|
|
85
|
+
neg: (e) => -e,
|
|
86
|
+
neq: (e, t) => e !== t,
|
|
87
|
+
not: (e) => !e,
|
|
88
|
+
or: (e, t) => e || t,
|
|
89
|
+
rem: (e, t) => e % t,
|
|
90
|
+
rshift: (e, t) => e >> t,
|
|
91
|
+
rshift_zf: (e, t) => e >>> t,
|
|
92
|
+
sub: (e, t) => e - t,
|
|
93
|
+
xor: (e, t) => (e || t) && !(e && t)
|
|
140
94
|
};
|
|
141
|
-
function
|
|
142
|
-
if (!Number.isInteger(
|
|
95
|
+
function ut(e, t) {
|
|
96
|
+
if (!Number.isInteger(e))
|
|
143
97
|
throw new Error("start must be an integer");
|
|
144
|
-
|
|
145
|
-
if (!Number.isInteger(end)) {
|
|
98
|
+
if (!Number.isInteger(t))
|
|
146
99
|
throw new Error("end must be an integer");
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
for (const key of Object.keys(initDict)) {
|
|
159
|
-
if (key !== "bubbles" && key !== "cancelable") {
|
|
160
|
-
event[key] = initDict[key];
|
|
161
|
-
}
|
|
162
|
-
}
|
|
100
|
+
return new Array(Math.abs(t - e) + 1).fill(e).map(e > t ? z.sub : z.add);
|
|
101
|
+
}
|
|
102
|
+
class lt {
|
|
103
|
+
constructor(t, n = {}) {
|
|
104
|
+
let r;
|
|
105
|
+
if (typeof Event == "function")
|
|
106
|
+
r = new Event(t, n);
|
|
107
|
+
else {
|
|
108
|
+
r = document.createEvent("Event"), r.initEvent(t, n.bubbles, n.cancelable);
|
|
109
|
+
for (const i of Object.keys(n))
|
|
110
|
+
i !== "bubbles" && i !== "cancelable" && (r[i] = n[i]);
|
|
163
111
|
}
|
|
164
|
-
Object.setPrototypeOf(this,
|
|
165
|
-
const
|
|
166
|
-
for (const
|
|
167
|
-
const
|
|
168
|
-
for (const
|
|
169
|
-
|
|
170
|
-
descriptor[key] = descriptor[key].bind(event);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
112
|
+
Object.setPrototypeOf(this, r);
|
|
113
|
+
const a = Object.getOwnPropertyDescriptors(Event.prototype);
|
|
114
|
+
for (const i of Object.keys(a)) {
|
|
115
|
+
const c = a[i];
|
|
116
|
+
for (const m of Object.keys(c))
|
|
117
|
+
typeof c[m] == "function" && (c[m] = c[m].bind(r));
|
|
173
118
|
}
|
|
174
|
-
Object.defineProperties(this,
|
|
119
|
+
Object.defineProperties(this, a);
|
|
175
120
|
}
|
|
176
121
|
}
|
|
177
|
-
const
|
|
122
|
+
const ft = Object.freeze({
|
|
178
123
|
100: { name: "Insurance Plan Description" },
|
|
179
124
|
101: { name: "Name and Address Lists" },
|
|
180
125
|
104: { name: "Air Shipment Information" },
|
|
@@ -475,550 +420,459 @@ const EDI_DOCUMENT_TYPE = Object.freeze({
|
|
|
475
420
|
998: { name: "Set Cancellation" },
|
|
476
421
|
999: { name: "Implementation Acknowledgment" }
|
|
477
422
|
});
|
|
478
|
-
function
|
|
479
|
-
return (
|
|
480
|
-
const
|
|
481
|
-
Object.defineProperties(
|
|
482
|
-
[
|
|
483
|
-
enumerable:
|
|
484
|
-
configurable:
|
|
485
|
-
writable:
|
|
423
|
+
function dt() {
|
|
424
|
+
return (e, t) => {
|
|
425
|
+
const n = `_${String(t)}`;
|
|
426
|
+
Object.defineProperties(e, {
|
|
427
|
+
[n]: {
|
|
428
|
+
enumerable: !1,
|
|
429
|
+
configurable: !0,
|
|
430
|
+
writable: !0,
|
|
486
431
|
value: void 0
|
|
487
432
|
},
|
|
488
|
-
[
|
|
489
|
-
enumerable:
|
|
490
|
-
configurable:
|
|
433
|
+
[t]: {
|
|
434
|
+
enumerable: !0,
|
|
435
|
+
configurable: !0,
|
|
491
436
|
get() {
|
|
492
|
-
return this[
|
|
437
|
+
return this[n];
|
|
493
438
|
},
|
|
494
|
-
set(
|
|
495
|
-
this[
|
|
439
|
+
set(r) {
|
|
440
|
+
this[n] = Number(r);
|
|
496
441
|
}
|
|
497
442
|
}
|
|
498
443
|
});
|
|
499
444
|
};
|
|
500
445
|
}
|
|
501
|
-
function
|
|
502
|
-
return (
|
|
503
|
-
const
|
|
504
|
-
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
return newDescriptorWithDebounced.value;
|
|
509
|
-
};
|
|
510
|
-
originalDescriptorCopy.configurable = true;
|
|
511
|
-
delete originalDescriptorCopy.writable;
|
|
512
|
-
delete originalDescriptorCopy.value;
|
|
513
|
-
return originalDescriptorCopy;
|
|
514
|
-
};
|
|
515
|
-
}
|
|
516
|
-
function lockedToAnimationFrames(target, propertyKey, descriptor) {
|
|
517
|
-
const originalDescriptorCopy = __spreadValues({}, descriptor);
|
|
518
|
-
descriptor.get = function get() {
|
|
519
|
-
const newDescriptor = __spreadValues({}, originalDescriptorCopy);
|
|
520
|
-
newDescriptor.value = lockToAnimationFrames(originalDescriptorCopy.value, this);
|
|
521
|
-
Object.defineProperty(this, propertyKey, newDescriptor);
|
|
522
|
-
return newDescriptor.value;
|
|
523
|
-
};
|
|
524
|
-
descriptor.configurable = true;
|
|
525
|
-
delete descriptor.writable;
|
|
526
|
-
delete descriptor.value;
|
|
527
|
-
return descriptor;
|
|
528
|
-
}
|
|
529
|
-
function simpleMetadataDecoratorApplicator(metadata, defaults, target, key, descriptor) {
|
|
530
|
-
const updatedDescriptor = descriptor || Object.getOwnPropertyDescriptor(target, key);
|
|
531
|
-
const getter = updatedDescriptor.get;
|
|
532
|
-
const { value } = updatedDescriptor;
|
|
533
|
-
updatedDescriptor.get = function get() {
|
|
534
|
-
const self2 = this;
|
|
535
|
-
const fn = value || getter.call(this);
|
|
536
|
-
const boundFn = fn.bind(this);
|
|
537
|
-
const updatedMetadata = __spreadValues(__spreadValues({}, defaults), metadata);
|
|
538
|
-
for (const prop of Object.keys(defaults)) {
|
|
539
|
-
if (typeof metadata[prop] === "function") {
|
|
540
|
-
Object.defineProperty(boundFn, prop, {
|
|
541
|
-
get() {
|
|
542
|
-
return updatedMetadata[prop](self2);
|
|
543
|
-
}
|
|
544
|
-
});
|
|
545
|
-
} else {
|
|
546
|
-
boundFn[prop] = updatedMetadata[prop];
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
Object.defineProperty(this, key, {
|
|
550
|
-
writable: true,
|
|
551
|
-
configurable: true,
|
|
552
|
-
enumerable: updatedDescriptor.enumerable,
|
|
553
|
-
value: boundFn
|
|
554
|
-
});
|
|
555
|
-
return boundFn;
|
|
556
|
-
};
|
|
557
|
-
delete updatedDescriptor.value;
|
|
558
|
-
delete updatedDescriptor.writable;
|
|
559
|
-
return updatedDescriptor;
|
|
560
|
-
}
|
|
561
|
-
function tickDelay(target, propertyKey, descriptor) {
|
|
562
|
-
const originalDescriptorCopy = __spreadValues({}, descriptor);
|
|
563
|
-
originalDescriptorCopy.get = function get() {
|
|
564
|
-
const newDescriptor = __spreadValues({}, originalDescriptorCopy);
|
|
565
|
-
const boundFn = originalDescriptorCopy.value.bind(this);
|
|
566
|
-
newDescriptor.value = () => setTimeout(boundFn, 0);
|
|
567
|
-
Object.defineProperty(this, propertyKey, newDescriptor);
|
|
568
|
-
return newDescriptor.value;
|
|
446
|
+
function pt(e) {
|
|
447
|
+
return (t, n, r) => {
|
|
448
|
+
const a = { ...r };
|
|
449
|
+
return a.get = function() {
|
|
450
|
+
const c = { ...a };
|
|
451
|
+
return c.value = Be(a.value, e, this), Object.defineProperty(this, n, c), c.value;
|
|
452
|
+
}, a.configurable = !0, delete a.writable, delete a.value, a;
|
|
569
453
|
};
|
|
570
|
-
originalDescriptorCopy.configurable = true;
|
|
571
|
-
delete originalDescriptorCopy.writable;
|
|
572
|
-
delete originalDescriptorCopy.value;
|
|
573
|
-
return originalDescriptorCopy;
|
|
574
454
|
}
|
|
575
|
-
function
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
455
|
+
function gt(e, t, n) {
|
|
456
|
+
const r = { ...n };
|
|
457
|
+
return n.get = function() {
|
|
458
|
+
const i = { ...r };
|
|
459
|
+
return i.value = qe(r.value, this), Object.defineProperty(this, t, i), i.value;
|
|
460
|
+
}, n.configurable = !0, delete n.writable, delete n.value, n;
|
|
461
|
+
}
|
|
462
|
+
function yt(e, t, n, r, a) {
|
|
463
|
+
const i = a || Object.getOwnPropertyDescriptor(n, r), c = i.get, { value: m } = i;
|
|
464
|
+
return i.get = function() {
|
|
465
|
+
const u = this, d = (m || c.call(this)).bind(this), S = { ...t, ...e };
|
|
466
|
+
for (const p of Object.keys(t))
|
|
467
|
+
typeof e[p] == "function" ? Object.defineProperty(d, p, {
|
|
468
|
+
get() {
|
|
469
|
+
return S[p](u);
|
|
470
|
+
}
|
|
471
|
+
}) : d[p] = S[p];
|
|
472
|
+
return Object.defineProperty(this, r, {
|
|
473
|
+
writable: !0,
|
|
474
|
+
configurable: !0,
|
|
475
|
+
enumerable: i.enumerable,
|
|
476
|
+
value: d
|
|
477
|
+
}), d;
|
|
478
|
+
}, delete i.value, delete i.writable, i;
|
|
479
|
+
}
|
|
480
|
+
function Rt(e, t, n) {
|
|
481
|
+
const r = { ...n };
|
|
482
|
+
return r.get = function() {
|
|
483
|
+
const i = { ...r }, c = r.value.bind(this);
|
|
484
|
+
return i.value = () => setTimeout(c, 0), Object.defineProperty(this, t, i), i.value;
|
|
485
|
+
}, r.configurable = !0, delete r.writable, delete r.value, r;
|
|
486
|
+
}
|
|
487
|
+
function ht(e, t) {
|
|
488
|
+
return !e || e < t[0] ? t[0] : e > t[1] ? t[1] : e;
|
|
489
|
+
}
|
|
490
|
+
function xe(e, t = 0) {
|
|
491
|
+
const n = String(e).split("."), r = n.length > 1 ? n[1].length : 0;
|
|
492
|
+
let a = e;
|
|
493
|
+
for (let i = r - 1; i >= t; i -= 1)
|
|
494
|
+
a = +`${Math.round(+`${a}e${i}`)}e-${i}`;
|
|
495
|
+
return a;
|
|
592
496
|
}
|
|
593
|
-
function
|
|
594
|
-
if (
|
|
595
|
-
throw new Error(
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
const
|
|
497
|
+
function bt(e, t = 2) {
|
|
498
|
+
if (e > Number.MAX_SAFE_INTEGER)
|
|
499
|
+
throw new Error(
|
|
500
|
+
"Number is greater than MAX_SAFE_INTEGER; toFileSizeString does not support orders of magnitude higher than petabytes for this reason until BigInt achieves broad browser support."
|
|
501
|
+
);
|
|
502
|
+
const n = Math.min(Math.floor(Math.log(e) / Math.log(1024)), 5), r = [
|
|
599
503
|
"B",
|
|
600
504
|
"KB",
|
|
601
505
|
"MB",
|
|
602
506
|
"GB",
|
|
603
507
|
"TB",
|
|
604
508
|
"PB"
|
|
605
|
-
][
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
509
|
+
][n], a = n ? t : 0;
|
|
510
|
+
return xe(e / 1024 ** n, a).toFixed(a) + r;
|
|
511
|
+
}
|
|
512
|
+
function k(e) {
|
|
513
|
+
return typeof e == "string" ? e.match(/[^.[\]]+/g) || [] : [].concat(e);
|
|
514
|
+
}
|
|
515
|
+
function Ve(e, t, n) {
|
|
516
|
+
Object.defineProperty(
|
|
517
|
+
n,
|
|
518
|
+
e,
|
|
519
|
+
Object.getOwnPropertyDescriptor(t, e)
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
|
+
var I = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
523
|
+
function F(e) {
|
|
524
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
525
|
+
}
|
|
526
|
+
var Ge = "[object Object]";
|
|
527
|
+
function $e(e) {
|
|
528
|
+
var t = !1;
|
|
529
|
+
if (e != null && typeof e.toString != "function")
|
|
620
530
|
try {
|
|
621
|
-
|
|
622
|
-
} catch
|
|
531
|
+
t = !!(e + "");
|
|
532
|
+
} catch {
|
|
623
533
|
}
|
|
624
|
-
|
|
625
|
-
return result;
|
|
534
|
+
return t;
|
|
626
535
|
}
|
|
627
|
-
function
|
|
628
|
-
return function(
|
|
629
|
-
return
|
|
536
|
+
function Ue(e, t) {
|
|
537
|
+
return function(n) {
|
|
538
|
+
return e(t(n));
|
|
630
539
|
};
|
|
631
540
|
}
|
|
632
|
-
var
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
}
|
|
681
|
-
d.push({
|
|
682
|
-
type: 0,
|
|
683
|
-
key,
|
|
684
|
-
parentPath,
|
|
685
|
-
objects: [o1, o2]
|
|
686
|
-
});
|
|
687
|
-
} else if (lodash_isplainobject(o1[key]) && lodash_isplainobject(o2[key]) || Array.isArray(o1[key]) && Array.isArray(o2[key])) {
|
|
688
|
-
d = d.concat(diff(o1[key], o2[key], [...parentPath, key]));
|
|
689
|
-
} else if (o1[key] !== o2[key]) {
|
|
690
|
-
d.push({
|
|
691
|
-
type: 2,
|
|
692
|
-
key,
|
|
693
|
-
parentPath,
|
|
694
|
-
objects: [o1, o2]
|
|
695
|
-
});
|
|
696
|
-
}
|
|
541
|
+
var We = Function.prototype, Y = Object.prototype, Z = We.toString, ze = Y.hasOwnProperty, He = Z.call(Object), Ke = Y.toString, Xe = Ue(Object.getPrototypeOf, Object);
|
|
542
|
+
function Je(e) {
|
|
543
|
+
return !!e && typeof e == "object";
|
|
544
|
+
}
|
|
545
|
+
function Qe(e) {
|
|
546
|
+
if (!Je(e) || Ke.call(e) != Ge || $e(e))
|
|
547
|
+
return !1;
|
|
548
|
+
var t = Xe(e);
|
|
549
|
+
if (t === null)
|
|
550
|
+
return !0;
|
|
551
|
+
var n = ze.call(t, "constructor") && t.constructor;
|
|
552
|
+
return typeof n == "function" && n instanceof n && Z.call(n) == He;
|
|
553
|
+
}
|
|
554
|
+
var Ye = Qe;
|
|
555
|
+
const f = /* @__PURE__ */ F(Ye);
|
|
556
|
+
function Ze(e) {
|
|
557
|
+
Object.freeze(e);
|
|
558
|
+
for (const t of Object.keys(e)) {
|
|
559
|
+
const n = e[t];
|
|
560
|
+
(f(n) || Array.isArray(n)) && Ze(n);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
var et = /* @__PURE__ */ ((e) => (e[e.ADDITION = 0] = "ADDITION", e[e.DELETION = 1] = "DELETION", e[e.ALTERATION = 2] = "ALTERATION", e))(et || {});
|
|
564
|
+
function tt(e, t, n = []) {
|
|
565
|
+
let r = [];
|
|
566
|
+
for (const a of /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])) {
|
|
567
|
+
const i = Object.prototype.hasOwnProperty.call(e, a), c = Object.prototype.hasOwnProperty.call(t, a);
|
|
568
|
+
i && !c ? r.push({
|
|
569
|
+
type: 1,
|
|
570
|
+
key: a,
|
|
571
|
+
parentPath: n,
|
|
572
|
+
objects: [e, t]
|
|
573
|
+
}) : !i && c ? r.push({
|
|
574
|
+
type: 0,
|
|
575
|
+
key: a,
|
|
576
|
+
parentPath: n,
|
|
577
|
+
objects: [e, t]
|
|
578
|
+
}) : f(e[a]) && f(t[a]) || Array.isArray(e[a]) && Array.isArray(t[a]) ? r = r.concat(
|
|
579
|
+
tt(
|
|
580
|
+
e[a],
|
|
581
|
+
t[a],
|
|
582
|
+
[...n, a]
|
|
583
|
+
)
|
|
584
|
+
) : e[a] !== t[a] && r.push({
|
|
585
|
+
type: 2,
|
|
586
|
+
key: a,
|
|
587
|
+
parentPath: n,
|
|
588
|
+
objects: [e, t]
|
|
589
|
+
});
|
|
697
590
|
}
|
|
698
|
-
return
|
|
591
|
+
return r;
|
|
699
592
|
}
|
|
700
|
-
function
|
|
701
|
-
for (const
|
|
702
|
-
const
|
|
703
|
-
|
|
704
|
-
forEachEntryDeep(value, fn);
|
|
705
|
-
} else {
|
|
706
|
-
fn(key, value, object);
|
|
707
|
-
}
|
|
593
|
+
function nt(e, t) {
|
|
594
|
+
for (const n of Object.keys(e)) {
|
|
595
|
+
const r = e[n];
|
|
596
|
+
f(r) || Array.isArray(r) ? nt(r, t) : t(n, r, e);
|
|
708
597
|
}
|
|
709
598
|
}
|
|
710
|
-
function
|
|
711
|
-
|
|
712
|
-
for (const
|
|
713
|
-
const
|
|
714
|
-
if (
|
|
715
|
-
const
|
|
716
|
-
|
|
599
|
+
function rt(e, t, n = []) {
|
|
600
|
+
t(n, e);
|
|
601
|
+
for (const r of Object.keys(e)) {
|
|
602
|
+
const a = e[r];
|
|
603
|
+
if (f(a) || Array.isArray(a)) {
|
|
604
|
+
const i = n.concat(r);
|
|
605
|
+
rt(a, t, i);
|
|
717
606
|
}
|
|
718
607
|
}
|
|
719
608
|
}
|
|
720
|
-
function
|
|
721
|
-
return
|
|
609
|
+
function at(e) {
|
|
610
|
+
return e == null;
|
|
722
611
|
}
|
|
723
|
-
var
|
|
724
|
-
|
|
612
|
+
var ee = at;
|
|
613
|
+
const te = /* @__PURE__ */ F(ee), ot = /* @__PURE__ */ Q({
|
|
725
614
|
__proto__: null,
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
(function(
|
|
731
|
-
var
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
var root = freeGlobal || freeSelf || Function("return this")();
|
|
739
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
740
|
-
var freeModule = freeExports && true && module && !module.nodeType && module;
|
|
741
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
742
|
-
function getValue(object, key) {
|
|
743
|
-
return object == null ? void 0 : object[key];
|
|
744
|
-
}
|
|
745
|
-
function isHostObject2(value) {
|
|
746
|
-
var result = false;
|
|
747
|
-
if (value != null && typeof value.toString != "function") {
|
|
615
|
+
default: te
|
|
616
|
+
}, [ee]);
|
|
617
|
+
var A = { exports: {} };
|
|
618
|
+
A.exports;
|
|
619
|
+
(function(e, t) {
|
|
620
|
+
var n = 9007199254740991, r = "[object Arguments]", a = "[object Function]", i = "[object GeneratorFunction]", c = "[object Map]", m = "[object Object]", h = "[object Promise]", u = "[object Set]", O = "[object WeakMap]", d = "[object DataView]", S = /[\\^$.*+?()[\]{}|]/g, p = /^\[object .+?Constructor\]$/, ce = typeof I == "object" && I && I.Object === Object && I, se = typeof self == "object" && self && self.Object === Object && self, g = ce || se || Function("return this")(), L = t && !t.nodeType && t, B = L && !0 && e && !e.nodeType && e, me = B && B.exports === L;
|
|
621
|
+
function ue(o, s) {
|
|
622
|
+
return o == null ? void 0 : o[s];
|
|
623
|
+
}
|
|
624
|
+
function le(o) {
|
|
625
|
+
var s = !1;
|
|
626
|
+
if (o != null && typeof o.toString != "function")
|
|
748
627
|
try {
|
|
749
|
-
|
|
750
|
-
} catch
|
|
628
|
+
s = !!(o + "");
|
|
629
|
+
} catch {
|
|
751
630
|
}
|
|
752
|
-
|
|
753
|
-
return result;
|
|
631
|
+
return s;
|
|
754
632
|
}
|
|
755
|
-
function
|
|
756
|
-
return function(
|
|
757
|
-
return
|
|
633
|
+
function fe(o, s) {
|
|
634
|
+
return function(l) {
|
|
635
|
+
return o(s(l));
|
|
758
636
|
};
|
|
759
637
|
}
|
|
760
|
-
var
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
}();
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
function
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
switch (ctorString) {
|
|
795
|
-
case dataViewCtorString:
|
|
796
|
-
return dataViewTag;
|
|
797
|
-
case mapCtorString:
|
|
798
|
-
return mapTag;
|
|
799
|
-
case promiseCtorString:
|
|
800
|
-
return promiseTag;
|
|
801
|
-
case setCtorString:
|
|
802
|
-
return setTag;
|
|
803
|
-
case weakMapCtorString:
|
|
804
|
-
return weakMapTag;
|
|
805
|
-
}
|
|
638
|
+
var de = Function.prototype, C = Object.prototype, P = g["__core-js_shared__"], _ = function() {
|
|
639
|
+
var o = /[^.]+$/.exec(P && P.keys && P.keys.IE_PROTO || "");
|
|
640
|
+
return o ? "Symbol(src)_1." + o : "";
|
|
641
|
+
}(), q = de.toString, T = C.hasOwnProperty, v = C.toString, pe = RegExp(
|
|
642
|
+
"^" + q.call(T).replace(S, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
643
|
+
), x = me ? g.Buffer : void 0, V = C.propertyIsEnumerable, ge = x ? x.isBuffer : void 0, ye = fe(Object.keys, Object), E = b(g, "DataView"), w = b(g, "Map"), j = b(g, "Promise"), M = b(g, "Set"), D = b(g, "WeakMap"), Re = !V.call({ valueOf: 1 }, "valueOf"), he = R(E), be = R(w), Se = R(j), Ce = R(M), ve = R(D);
|
|
644
|
+
function Ie(o) {
|
|
645
|
+
return v.call(o);
|
|
646
|
+
}
|
|
647
|
+
function Ae(o) {
|
|
648
|
+
if (!U(o) || Oe(o))
|
|
649
|
+
return !1;
|
|
650
|
+
var s = $(o) || le(o) ? pe : p;
|
|
651
|
+
return s.test(R(o));
|
|
652
|
+
}
|
|
653
|
+
function b(o, s) {
|
|
654
|
+
var l = ue(o, s);
|
|
655
|
+
return Ae(l) ? l : void 0;
|
|
656
|
+
}
|
|
657
|
+
var y = Ie;
|
|
658
|
+
(E && y(new E(new ArrayBuffer(1))) != d || w && y(new w()) != c || j && y(j.resolve()) != h || M && y(new M()) != u || D && y(new D()) != O) && (y = function(o) {
|
|
659
|
+
var s = v.call(o), l = s == m ? o.constructor : void 0, W = l ? R(l) : void 0;
|
|
660
|
+
if (W)
|
|
661
|
+
switch (W) {
|
|
662
|
+
case he:
|
|
663
|
+
return d;
|
|
664
|
+
case be:
|
|
665
|
+
return c;
|
|
666
|
+
case Se:
|
|
667
|
+
return h;
|
|
668
|
+
case Ce:
|
|
669
|
+
return u;
|
|
670
|
+
case ve:
|
|
671
|
+
return O;
|
|
806
672
|
}
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
return !!maskSrcKey && maskSrcKey in func;
|
|
673
|
+
return s;
|
|
674
|
+
});
|
|
675
|
+
function Oe(o) {
|
|
676
|
+
return !!_ && _ in o;
|
|
812
677
|
}
|
|
813
|
-
function
|
|
814
|
-
var
|
|
815
|
-
return
|
|
678
|
+
function Pe(o) {
|
|
679
|
+
var s = o && o.constructor, l = typeof s == "function" && s.prototype || C;
|
|
680
|
+
return o === l;
|
|
816
681
|
}
|
|
817
|
-
function
|
|
818
|
-
if (
|
|
682
|
+
function R(o) {
|
|
683
|
+
if (o != null) {
|
|
819
684
|
try {
|
|
820
|
-
return
|
|
821
|
-
} catch
|
|
685
|
+
return q.call(o);
|
|
686
|
+
} catch {
|
|
822
687
|
}
|
|
823
688
|
try {
|
|
824
|
-
return
|
|
825
|
-
} catch
|
|
689
|
+
return o + "";
|
|
690
|
+
} catch {
|
|
826
691
|
}
|
|
827
692
|
}
|
|
828
693
|
return "";
|
|
829
694
|
}
|
|
830
|
-
function
|
|
831
|
-
return
|
|
832
|
-
}
|
|
833
|
-
var
|
|
834
|
-
function
|
|
835
|
-
return
|
|
836
|
-
}
|
|
837
|
-
function
|
|
838
|
-
return
|
|
839
|
-
}
|
|
840
|
-
var
|
|
841
|
-
function
|
|
842
|
-
if (
|
|
843
|
-
return !
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
}
|
|
876
|
-
module.exports = isEmpty2;
|
|
877
|
-
})(lodash_isempty$1, lodash_isempty$1.exports);
|
|
878
|
-
var lodash_isempty = lodash_isempty$1.exports;
|
|
879
|
-
var isEmptyImport = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ _mergeNamespaces({
|
|
695
|
+
function Te(o) {
|
|
696
|
+
return we(o) && T.call(o, "callee") && (!V.call(o, "callee") || v.call(o) == r);
|
|
697
|
+
}
|
|
698
|
+
var Ee = Array.isArray;
|
|
699
|
+
function G(o) {
|
|
700
|
+
return o != null && De(o.length) && !$(o);
|
|
701
|
+
}
|
|
702
|
+
function we(o) {
|
|
703
|
+
return ke(o) && G(o);
|
|
704
|
+
}
|
|
705
|
+
var je = ge || Fe;
|
|
706
|
+
function Me(o) {
|
|
707
|
+
if (G(o) && (Ee(o) || typeof o == "string" || typeof o.splice == "function" || je(o) || Te(o)))
|
|
708
|
+
return !o.length;
|
|
709
|
+
var s = y(o);
|
|
710
|
+
if (s == c || s == u)
|
|
711
|
+
return !o.size;
|
|
712
|
+
if (Re || Pe(o))
|
|
713
|
+
return !ye(o).length;
|
|
714
|
+
for (var l in o)
|
|
715
|
+
if (T.call(o, l))
|
|
716
|
+
return !1;
|
|
717
|
+
return !0;
|
|
718
|
+
}
|
|
719
|
+
function $(o) {
|
|
720
|
+
var s = U(o) ? v.call(o) : "";
|
|
721
|
+
return s == a || s == i;
|
|
722
|
+
}
|
|
723
|
+
function De(o) {
|
|
724
|
+
return typeof o == "number" && o > -1 && o % 1 == 0 && o <= n;
|
|
725
|
+
}
|
|
726
|
+
function U(o) {
|
|
727
|
+
var s = typeof o;
|
|
728
|
+
return !!o && (s == "object" || s == "function");
|
|
729
|
+
}
|
|
730
|
+
function ke(o) {
|
|
731
|
+
return !!o && typeof o == "object";
|
|
732
|
+
}
|
|
733
|
+
function Fe() {
|
|
734
|
+
return !1;
|
|
735
|
+
}
|
|
736
|
+
e.exports = Me;
|
|
737
|
+
})(A, A.exports);
|
|
738
|
+
var ne = A.exports;
|
|
739
|
+
const N = /* @__PURE__ */ F(ne), re = /* @__PURE__ */ Q({
|
|
880
740
|
__proto__: null,
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
}
|
|
908
|
-
function omit(obj, ...keys) {
|
|
909
|
-
const keySet = new Set(keys);
|
|
910
|
-
const result = {};
|
|
911
|
-
for (const k of Object.keys(obj)) {
|
|
912
|
-
if (!keySet.has(k)) {
|
|
913
|
-
result[k] = obj[k];
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
return result;
|
|
917
|
-
}
|
|
918
|
-
const isEmpty = lodash_isempty || isEmptyImport;
|
|
919
|
-
function setPath(object, path, newValue) {
|
|
920
|
-
if (typeof object !== "object") {
|
|
741
|
+
default: N
|
|
742
|
+
}, [ne]), H = te || ot, it = N || re;
|
|
743
|
+
function K(e, t, n, r = !1) {
|
|
744
|
+
if (it(t))
|
|
745
|
+
return e;
|
|
746
|
+
let a = e;
|
|
747
|
+
for (const i of k(t)) {
|
|
748
|
+
let c = i, m;
|
|
749
|
+
if (typeof i == "string" && ([
|
|
750
|
+
,
|
|
751
|
+
c,
|
|
752
|
+
m
|
|
753
|
+
] = /^([^?]+)(\?)?$/.exec(i)), a = a[c], H(a) && (m || r))
|
|
754
|
+
return n;
|
|
755
|
+
}
|
|
756
|
+
return H(a) ? n : a;
|
|
757
|
+
}
|
|
758
|
+
function St(e, ...t) {
|
|
759
|
+
const n = new Set(t), r = {};
|
|
760
|
+
for (const a of Object.keys(e))
|
|
761
|
+
n.has(a) || (r[a] = e[a]);
|
|
762
|
+
return r;
|
|
763
|
+
}
|
|
764
|
+
const ct = N || re;
|
|
765
|
+
function Ct(e, t, n) {
|
|
766
|
+
if (typeof e != "object")
|
|
921
767
|
throw new Error("object is required");
|
|
922
|
-
|
|
923
|
-
if (isEmpty(path)) {
|
|
768
|
+
if (ct(t))
|
|
924
769
|
throw new Error("path is required");
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
for (const
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
}
|
|
945
|
-
function
|
|
946
|
-
const
|
|
947
|
-
for (const
|
|
948
|
-
for (const
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
}
|
|
975
|
-
function values(object) {
|
|
976
|
-
const vals = [];
|
|
977
|
-
for (const key of Object.keys(object)) {
|
|
978
|
-
vals.push(object[key]);
|
|
979
|
-
}
|
|
980
|
-
return vals;
|
|
981
|
-
}
|
|
982
|
-
function code(strings, ...interpolations) {
|
|
983
|
-
const s = strings.reduce((a, b, i) => `${a}${i <= interpolations.length ? String(interpolations[i - 1]) : ""}${b}`);
|
|
984
|
-
const leadingWhitespace = Math.min(...s.split(/[\r\n]/).filter((l) => l.trim()).map((l) => /^ */.exec(l)[0].length));
|
|
985
|
-
return s.replace(new RegExp(`^ {${leadingWhitespace}}`, "gm"), "").trim();
|
|
986
|
-
}
|
|
987
|
-
function parseFileSize(fileSize) {
|
|
988
|
-
const unitMatch = /[A-Z]?B$/.exec(fileSize);
|
|
989
|
-
if (!unitMatch) {
|
|
990
|
-
throw new Error(`Input to parseFileSize ("${fileSize}") doesn't seem like a file size; cannot identify a unit (e.g. KB, GB)`);
|
|
991
|
-
}
|
|
992
|
-
const [unit] = unitMatch;
|
|
993
|
-
const num = Number(fileSize.replace(unit, ""));
|
|
994
|
-
if (Number.isNaN(num)) {
|
|
995
|
-
throw new Error(`Could not parse a number out of input to parseFileSize ("${fileSize}")`);
|
|
996
|
-
}
|
|
997
|
-
const magnitude = [
|
|
770
|
+
const r = k(t), a = r.splice(r.length - 1, 1)[0];
|
|
771
|
+
let i = e;
|
|
772
|
+
for (const c of r)
|
|
773
|
+
if (i = i[c], typeof i != "object")
|
|
774
|
+
throw new Error(`Cannot set value at given path: Path deadends at ${String(c)}`);
|
|
775
|
+
i[a] = n;
|
|
776
|
+
}
|
|
777
|
+
function* vt(e, t) {
|
|
778
|
+
yield e;
|
|
779
|
+
let n = e;
|
|
780
|
+
for (const r of k(t))
|
|
781
|
+
n = n[r], yield n;
|
|
782
|
+
}
|
|
783
|
+
function X(...e) {
|
|
784
|
+
const t = {};
|
|
785
|
+
for (const n of e)
|
|
786
|
+
for (const r of Object.keys(n))
|
|
787
|
+
Object.prototype.hasOwnProperty.call(t, r) && Object.getOwnPropertyDescriptor(t, r).writable && f(t[r]) ? t[r] = X(t[r], n[r]) : f(n[r]) ? t[r] = X({}, n[r]) : t[r] = n[r];
|
|
788
|
+
return t;
|
|
789
|
+
}
|
|
790
|
+
function J(...e) {
|
|
791
|
+
const t = {};
|
|
792
|
+
for (const n of e)
|
|
793
|
+
for (const r of Object.keys(n))
|
|
794
|
+
Object.prototype.hasOwnProperty.call(t, r) && Object.getOwnPropertyDescriptor(t, r).writable && f(t[r]) ? t[r] = J(t[r], n[r]) : f(n[r]) ? t[r] = J({}, n[r]) : Ve(r, n, t);
|
|
795
|
+
return t;
|
|
796
|
+
}
|
|
797
|
+
function It(e) {
|
|
798
|
+
const t = [];
|
|
799
|
+
for (const n of Object.keys(e))
|
|
800
|
+
t.push(e[n]);
|
|
801
|
+
return t;
|
|
802
|
+
}
|
|
803
|
+
function At(e, ...t) {
|
|
804
|
+
const n = e.reduce((a, i, c) => `${a}${c <= t.length ? String(t[c - 1]) : ""}${i}`), r = Math.min(
|
|
805
|
+
...n.split(/[\r\n]/).filter((a) => a.trim()).map((a) => /^ */.exec(a)[0].length)
|
|
806
|
+
);
|
|
807
|
+
return n.replace(new RegExp(`^ {${r}}`, "gm"), "").trim();
|
|
808
|
+
}
|
|
809
|
+
function Ot(e) {
|
|
810
|
+
const t = /[A-Z]?B$/.exec(e);
|
|
811
|
+
if (!t)
|
|
812
|
+
throw new Error(
|
|
813
|
+
`Input to parseFileSize ("${e}") doesn't seem like a file size; cannot identify a unit (e.g. KB, GB)`
|
|
814
|
+
);
|
|
815
|
+
const [n] = t, r = Number(e.replace(n, ""));
|
|
816
|
+
if (Number.isNaN(r))
|
|
817
|
+
throw new Error(`Could not parse a number out of input to parseFileSize ("${e}")`);
|
|
818
|
+
const a = [
|
|
998
819
|
"B",
|
|
999
820
|
"KB",
|
|
1000
821
|
"MB",
|
|
1001
822
|
"GB",
|
|
1002
823
|
"TB",
|
|
1003
824
|
"PB"
|
|
1004
|
-
].indexOf(
|
|
1005
|
-
if (
|
|
825
|
+
].indexOf(n);
|
|
826
|
+
if (a === -1)
|
|
1006
827
|
throw new Error("parseFileSize does not support units above PB");
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
const
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
function
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
828
|
+
return Math.ceil(r * 1024 ** a);
|
|
829
|
+
}
|
|
830
|
+
const ae = /(<%=|{{)(.+?)(%>|}})/g, oe = /<%\?(.+?)%>(.+?)<\/%>/g, ie = Symbol("sps.utils.templateSrc");
|
|
831
|
+
function Pt(e) {
|
|
832
|
+
const t = (n) => e.replace(oe, (r, a, i) => K(n, a.trim()) ? i : "").replace(ae, (r, a, i) => K(n, i.trim(), ""));
|
|
833
|
+
return t[ie] = e, t;
|
|
834
|
+
}
|
|
835
|
+
function Tt(e) {
|
|
836
|
+
return typeof e == "string" && (ae.test(e) || oe.test(e));
|
|
837
|
+
}
|
|
838
|
+
function Et(e) {
|
|
839
|
+
return typeof e == "function" && Object.prototype.hasOwnProperty.call(e, ie);
|
|
840
|
+
}
|
|
841
|
+
export {
|
|
842
|
+
lt as CustomEvent,
|
|
843
|
+
et as DiffChange,
|
|
844
|
+
ft as EDI_DOCUMENT_TYPE,
|
|
845
|
+
z as Op,
|
|
846
|
+
dt as castToNumber,
|
|
847
|
+
At as code,
|
|
848
|
+
ht as constrain,
|
|
849
|
+
Ve as copyProperty,
|
|
850
|
+
k as crumblePath,
|
|
851
|
+
Be as debounce,
|
|
852
|
+
pt as debounced,
|
|
853
|
+
xe as decimalRound,
|
|
854
|
+
Ze as deepFreeze,
|
|
855
|
+
tt as diff,
|
|
856
|
+
Ne as flatten,
|
|
857
|
+
nt as forEachEntryDeep,
|
|
858
|
+
rt as forEachNestedObject,
|
|
859
|
+
K as getPath,
|
|
860
|
+
st as isSubset,
|
|
861
|
+
Tt as isTemplate,
|
|
862
|
+
Et as isTemplateFn,
|
|
863
|
+
qe as lockToAnimationFrames,
|
|
864
|
+
gt as lockedToAnimationFrames,
|
|
865
|
+
X as mergeDeep,
|
|
866
|
+
J as mergePropertiesDeep,
|
|
867
|
+
St as omit,
|
|
868
|
+
mt as onNextTick,
|
|
869
|
+
Ot as parseFileSize,
|
|
870
|
+
ut as range,
|
|
871
|
+
Ct as setPath,
|
|
872
|
+
yt as simpleMetadataDecoratorApplicator,
|
|
873
|
+
Pt as template,
|
|
874
|
+
Rt as tickDelay,
|
|
875
|
+
bt as toFileSizeString,
|
|
876
|
+
vt as traversePath,
|
|
877
|
+
It as values
|
|
878
|
+
};
|