@cliquify.me/state 3.1.8 → 3.1.10
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/constants/design.d.ts +4 -0
- package/dist/events.d.ts +58 -0
- package/dist/handle-events.d.ts +6 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +3911 -0
- package/dist/index.umd.js +3 -0
- package/dist/state.d.ts +101 -0
- package/dist/utils/clone-deep.d.ts +1 -0
- package/dist/utils/duration.d.ts +3 -0
- package/dist/utils/find-track.d.ts +6 -0
- package/dist/utils/fonts.d.ts +4 -0
- package/dist/utils/generate-id.d.ts +1 -0
- package/dist/utils/group-items.d.ts +8 -0
- package/dist/utils/load-item.d.ts +339 -0
- package/dist/utils/math.d.ts +8 -0
- package/dist/utils/media.d.ts +20 -0
- package/dist/utils/replace-item.d.ts +22 -0
- package/dist/utils/track.d.ts +3 -0
- package/package.json +13 -6
- package/src/index.ts +0 -2
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,3911 @@
|
|
|
1
|
+
var Ts = Object.defineProperty;
|
|
2
|
+
var Ms = (t, r, n) => r in t ? Ts(t, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[r] = n;
|
|
3
|
+
var ie = (t, r, n) => Ms(t, typeof r != "symbol" ? r + "" : r, n);
|
|
4
|
+
import { subject as ae, filter as oe } from "@designcombo/events";
|
|
5
|
+
var fn = function(t, r) {
|
|
6
|
+
return fn = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, s) {
|
|
7
|
+
n.__proto__ = s;
|
|
8
|
+
} || function(n, s) {
|
|
9
|
+
for (var a in s) Object.prototype.hasOwnProperty.call(s, a) && (n[a] = s[a]);
|
|
10
|
+
}, fn(t, r);
|
|
11
|
+
};
|
|
12
|
+
function Ge(t, r) {
|
|
13
|
+
if (typeof r != "function" && r !== null)
|
|
14
|
+
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
|
|
15
|
+
fn(t, r);
|
|
16
|
+
function n() {
|
|
17
|
+
this.constructor = t;
|
|
18
|
+
}
|
|
19
|
+
t.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype, new n());
|
|
20
|
+
}
|
|
21
|
+
function pn(t) {
|
|
22
|
+
var r = typeof Symbol == "function" && Symbol.iterator, n = r && t[r], s = 0;
|
|
23
|
+
if (n) return n.call(t);
|
|
24
|
+
if (t && typeof t.length == "number") return {
|
|
25
|
+
next: function() {
|
|
26
|
+
return t && s >= t.length && (t = void 0), { value: t && t[s++], done: !t };
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
30
|
+
}
|
|
31
|
+
function hn(t, r) {
|
|
32
|
+
var n = typeof Symbol == "function" && t[Symbol.iterator];
|
|
33
|
+
if (!n) return t;
|
|
34
|
+
var s = n.call(t), a, c = [], f;
|
|
35
|
+
try {
|
|
36
|
+
for (; (r === void 0 || r-- > 0) && !(a = s.next()).done; ) c.push(a.value);
|
|
37
|
+
} catch (p) {
|
|
38
|
+
f = { error: p };
|
|
39
|
+
} finally {
|
|
40
|
+
try {
|
|
41
|
+
a && !a.done && (n = s.return) && n.call(s);
|
|
42
|
+
} finally {
|
|
43
|
+
if (f) throw f.error;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return c;
|
|
47
|
+
}
|
|
48
|
+
function mn(t, r, n) {
|
|
49
|
+
if (n || arguments.length === 2) for (var s = 0, a = r.length, c; s < a; s++)
|
|
50
|
+
(c || !(s in r)) && (c || (c = Array.prototype.slice.call(r, 0, s)), c[s] = r[s]);
|
|
51
|
+
return t.concat(c || Array.prototype.slice.call(r));
|
|
52
|
+
}
|
|
53
|
+
function Yt(t) {
|
|
54
|
+
return typeof t == "function";
|
|
55
|
+
}
|
|
56
|
+
function Qn(t) {
|
|
57
|
+
var r = function(s) {
|
|
58
|
+
Error.call(s), s.stack = new Error().stack;
|
|
59
|
+
}, n = t(r);
|
|
60
|
+
return n.prototype = Object.create(Error.prototype), n.prototype.constructor = n, n;
|
|
61
|
+
}
|
|
62
|
+
var on = Qn(function(t) {
|
|
63
|
+
return function(n) {
|
|
64
|
+
t(this), this.message = n ? n.length + ` errors occurred during unsubscription:
|
|
65
|
+
` + n.map(function(s, a) {
|
|
66
|
+
return a + 1 + ") " + s.toString();
|
|
67
|
+
}).join(`
|
|
68
|
+
`) : "", this.name = "UnsubscriptionError", this.errors = n;
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
function yn(t, r) {
|
|
72
|
+
if (t) {
|
|
73
|
+
var n = t.indexOf(r);
|
|
74
|
+
0 <= n && t.splice(n, 1);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
var gr = function() {
|
|
78
|
+
function t(r) {
|
|
79
|
+
this.initialTeardown = r, this.closed = !1, this._parentage = null, this._finalizers = null;
|
|
80
|
+
}
|
|
81
|
+
return t.prototype.unsubscribe = function() {
|
|
82
|
+
var r, n, s, a, c;
|
|
83
|
+
if (!this.closed) {
|
|
84
|
+
this.closed = !0;
|
|
85
|
+
var f = this._parentage;
|
|
86
|
+
if (f)
|
|
87
|
+
if (this._parentage = null, Array.isArray(f))
|
|
88
|
+
try {
|
|
89
|
+
for (var p = pn(f), S = p.next(); !S.done; S = p.next()) {
|
|
90
|
+
var A = S.value;
|
|
91
|
+
A.remove(this);
|
|
92
|
+
}
|
|
93
|
+
} catch (u) {
|
|
94
|
+
r = { error: u };
|
|
95
|
+
} finally {
|
|
96
|
+
try {
|
|
97
|
+
S && !S.done && (n = p.return) && n.call(p);
|
|
98
|
+
} finally {
|
|
99
|
+
if (r) throw r.error;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
else
|
|
103
|
+
f.remove(this);
|
|
104
|
+
var k = this.initialTeardown;
|
|
105
|
+
if (Yt(k))
|
|
106
|
+
try {
|
|
107
|
+
k();
|
|
108
|
+
} catch (u) {
|
|
109
|
+
c = u instanceof on ? u.errors : [u];
|
|
110
|
+
}
|
|
111
|
+
var T = this._finalizers;
|
|
112
|
+
if (T) {
|
|
113
|
+
this._finalizers = null;
|
|
114
|
+
try {
|
|
115
|
+
for (var y = pn(T), M = y.next(); !M.done; M = y.next()) {
|
|
116
|
+
var C = M.value;
|
|
117
|
+
try {
|
|
118
|
+
Fn(C);
|
|
119
|
+
} catch (u) {
|
|
120
|
+
c = c ?? [], u instanceof on ? c = mn(mn([], hn(c)), hn(u.errors)) : c.push(u);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
} catch (u) {
|
|
124
|
+
s = { error: u };
|
|
125
|
+
} finally {
|
|
126
|
+
try {
|
|
127
|
+
M && !M.done && (a = y.return) && a.call(y);
|
|
128
|
+
} finally {
|
|
129
|
+
if (s) throw s.error;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (c)
|
|
134
|
+
throw new on(c);
|
|
135
|
+
}
|
|
136
|
+
}, t.prototype.add = function(r) {
|
|
137
|
+
var n;
|
|
138
|
+
if (r && r !== this)
|
|
139
|
+
if (this.closed)
|
|
140
|
+
Fn(r);
|
|
141
|
+
else {
|
|
142
|
+
if (r instanceof t) {
|
|
143
|
+
if (r.closed || r._hasParent(this))
|
|
144
|
+
return;
|
|
145
|
+
r._addParent(this);
|
|
146
|
+
}
|
|
147
|
+
(this._finalizers = (n = this._finalizers) !== null && n !== void 0 ? n : []).push(r);
|
|
148
|
+
}
|
|
149
|
+
}, t.prototype._hasParent = function(r) {
|
|
150
|
+
var n = this._parentage;
|
|
151
|
+
return n === r || Array.isArray(n) && n.includes(r);
|
|
152
|
+
}, t.prototype._addParent = function(r) {
|
|
153
|
+
var n = this._parentage;
|
|
154
|
+
this._parentage = Array.isArray(n) ? (n.push(r), n) : n ? [n, r] : r;
|
|
155
|
+
}, t.prototype._removeParent = function(r) {
|
|
156
|
+
var n = this._parentage;
|
|
157
|
+
n === r ? this._parentage = null : Array.isArray(n) && yn(n, r);
|
|
158
|
+
}, t.prototype.remove = function(r) {
|
|
159
|
+
var n = this._finalizers;
|
|
160
|
+
n && yn(n, r), r instanceof t && r._removeParent(this);
|
|
161
|
+
}, t.EMPTY = function() {
|
|
162
|
+
var r = new t();
|
|
163
|
+
return r.closed = !0, r;
|
|
164
|
+
}(), t;
|
|
165
|
+
}(), ts = gr.EMPTY;
|
|
166
|
+
function es(t) {
|
|
167
|
+
return t instanceof gr || t && "closed" in t && Yt(t.remove) && Yt(t.add) && Yt(t.unsubscribe);
|
|
168
|
+
}
|
|
169
|
+
function Fn(t) {
|
|
170
|
+
Yt(t) ? t() : t.unsubscribe();
|
|
171
|
+
}
|
|
172
|
+
var rs = {
|
|
173
|
+
onUnhandledError: null,
|
|
174
|
+
onStoppedNotification: null,
|
|
175
|
+
Promise: void 0,
|
|
176
|
+
useDeprecatedSynchronousErrorHandling: !1,
|
|
177
|
+
useDeprecatedNextContext: !1
|
|
178
|
+
}, ns = {
|
|
179
|
+
setTimeout: function(t, r) {
|
|
180
|
+
for (var n = [], s = 2; s < arguments.length; s++)
|
|
181
|
+
n[s - 2] = arguments[s];
|
|
182
|
+
return setTimeout.apply(void 0, mn([t, r], hn(n)));
|
|
183
|
+
},
|
|
184
|
+
clearTimeout: function(t) {
|
|
185
|
+
var r = ns.delegate;
|
|
186
|
+
return ((r == null ? void 0 : r.clearTimeout) || clearTimeout)(t);
|
|
187
|
+
},
|
|
188
|
+
delegate: void 0
|
|
189
|
+
};
|
|
190
|
+
function Es(t) {
|
|
191
|
+
ns.setTimeout(function() {
|
|
192
|
+
throw t;
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
function jn() {
|
|
196
|
+
}
|
|
197
|
+
function fr(t) {
|
|
198
|
+
t();
|
|
199
|
+
}
|
|
200
|
+
var ss = function(t) {
|
|
201
|
+
Ge(r, t);
|
|
202
|
+
function r(n) {
|
|
203
|
+
var s = t.call(this) || this;
|
|
204
|
+
return s.isStopped = !1, n ? (s.destination = n, es(n) && n.add(s)) : s.destination = xs, s;
|
|
205
|
+
}
|
|
206
|
+
return r.create = function(n, s, a) {
|
|
207
|
+
return new In(n, s, a);
|
|
208
|
+
}, r.prototype.next = function(n) {
|
|
209
|
+
this.isStopped || this._next(n);
|
|
210
|
+
}, r.prototype.error = function(n) {
|
|
211
|
+
this.isStopped || (this.isStopped = !0, this._error(n));
|
|
212
|
+
}, r.prototype.complete = function() {
|
|
213
|
+
this.isStopped || (this.isStopped = !0, this._complete());
|
|
214
|
+
}, r.prototype.unsubscribe = function() {
|
|
215
|
+
this.closed || (this.isStopped = !0, t.prototype.unsubscribe.call(this), this.destination = null);
|
|
216
|
+
}, r.prototype._next = function(n) {
|
|
217
|
+
this.destination.next(n);
|
|
218
|
+
}, r.prototype._error = function(n) {
|
|
219
|
+
try {
|
|
220
|
+
this.destination.error(n);
|
|
221
|
+
} finally {
|
|
222
|
+
this.unsubscribe();
|
|
223
|
+
}
|
|
224
|
+
}, r.prototype._complete = function() {
|
|
225
|
+
try {
|
|
226
|
+
this.destination.complete();
|
|
227
|
+
} finally {
|
|
228
|
+
this.unsubscribe();
|
|
229
|
+
}
|
|
230
|
+
}, r;
|
|
231
|
+
}(gr), As = Function.prototype.bind;
|
|
232
|
+
function cn(t, r) {
|
|
233
|
+
return As.call(t, r);
|
|
234
|
+
}
|
|
235
|
+
var Ds = function() {
|
|
236
|
+
function t(r) {
|
|
237
|
+
this.partialObserver = r;
|
|
238
|
+
}
|
|
239
|
+
return t.prototype.next = function(r) {
|
|
240
|
+
var n = this.partialObserver;
|
|
241
|
+
if (n.next)
|
|
242
|
+
try {
|
|
243
|
+
n.next(r);
|
|
244
|
+
} catch (s) {
|
|
245
|
+
dr(s);
|
|
246
|
+
}
|
|
247
|
+
}, t.prototype.error = function(r) {
|
|
248
|
+
var n = this.partialObserver;
|
|
249
|
+
if (n.error)
|
|
250
|
+
try {
|
|
251
|
+
n.error(r);
|
|
252
|
+
} catch (s) {
|
|
253
|
+
dr(s);
|
|
254
|
+
}
|
|
255
|
+
else
|
|
256
|
+
dr(r);
|
|
257
|
+
}, t.prototype.complete = function() {
|
|
258
|
+
var r = this.partialObserver;
|
|
259
|
+
if (r.complete)
|
|
260
|
+
try {
|
|
261
|
+
r.complete();
|
|
262
|
+
} catch (n) {
|
|
263
|
+
dr(n);
|
|
264
|
+
}
|
|
265
|
+
}, t;
|
|
266
|
+
}(), In = function(t) {
|
|
267
|
+
Ge(r, t);
|
|
268
|
+
function r(n, s, a) {
|
|
269
|
+
var c = t.call(this) || this, f;
|
|
270
|
+
if (Yt(n) || !n)
|
|
271
|
+
f = {
|
|
272
|
+
next: n ?? void 0,
|
|
273
|
+
error: s ?? void 0,
|
|
274
|
+
complete: a ?? void 0
|
|
275
|
+
};
|
|
276
|
+
else {
|
|
277
|
+
var p;
|
|
278
|
+
c && rs.useDeprecatedNextContext ? (p = Object.create(n), p.unsubscribe = function() {
|
|
279
|
+
return c.unsubscribe();
|
|
280
|
+
}, f = {
|
|
281
|
+
next: n.next && cn(n.next, p),
|
|
282
|
+
error: n.error && cn(n.error, p),
|
|
283
|
+
complete: n.complete && cn(n.complete, p)
|
|
284
|
+
}) : f = n;
|
|
285
|
+
}
|
|
286
|
+
return c.destination = new Ds(f), c;
|
|
287
|
+
}
|
|
288
|
+
return r;
|
|
289
|
+
}(ss);
|
|
290
|
+
function dr(t) {
|
|
291
|
+
Es(t);
|
|
292
|
+
}
|
|
293
|
+
function Os(t) {
|
|
294
|
+
throw t;
|
|
295
|
+
}
|
|
296
|
+
var xs = {
|
|
297
|
+
closed: !0,
|
|
298
|
+
next: jn,
|
|
299
|
+
error: Os,
|
|
300
|
+
complete: jn
|
|
301
|
+
}, Ps = function() {
|
|
302
|
+
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
|
303
|
+
}();
|
|
304
|
+
function Cs(t) {
|
|
305
|
+
return t;
|
|
306
|
+
}
|
|
307
|
+
function Rs(t) {
|
|
308
|
+
return t.length === 0 ? Cs : t.length === 1 ? t[0] : function(n) {
|
|
309
|
+
return t.reduce(function(s, a) {
|
|
310
|
+
return a(s);
|
|
311
|
+
}, n);
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
var zn = function() {
|
|
315
|
+
function t(r) {
|
|
316
|
+
r && (this._subscribe = r);
|
|
317
|
+
}
|
|
318
|
+
return t.prototype.lift = function(r) {
|
|
319
|
+
var n = new t();
|
|
320
|
+
return n.source = this, n.operator = r, n;
|
|
321
|
+
}, t.prototype.subscribe = function(r, n, s) {
|
|
322
|
+
var a = this, c = js(r) ? r : new In(r, n, s);
|
|
323
|
+
return fr(function() {
|
|
324
|
+
var f = a, p = f.operator, S = f.source;
|
|
325
|
+
c.add(p ? p.call(c, S) : S ? a._subscribe(c) : a._trySubscribe(c));
|
|
326
|
+
}), c;
|
|
327
|
+
}, t.prototype._trySubscribe = function(r) {
|
|
328
|
+
try {
|
|
329
|
+
return this._subscribe(r);
|
|
330
|
+
} catch (n) {
|
|
331
|
+
r.error(n);
|
|
332
|
+
}
|
|
333
|
+
}, t.prototype.forEach = function(r, n) {
|
|
334
|
+
var s = this;
|
|
335
|
+
return n = Nn(n), new n(function(a, c) {
|
|
336
|
+
var f = new In({
|
|
337
|
+
next: function(p) {
|
|
338
|
+
try {
|
|
339
|
+
r(p);
|
|
340
|
+
} catch (S) {
|
|
341
|
+
c(S), f.unsubscribe();
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
error: c,
|
|
345
|
+
complete: a
|
|
346
|
+
});
|
|
347
|
+
s.subscribe(f);
|
|
348
|
+
});
|
|
349
|
+
}, t.prototype._subscribe = function(r) {
|
|
350
|
+
var n;
|
|
351
|
+
return (n = this.source) === null || n === void 0 ? void 0 : n.subscribe(r);
|
|
352
|
+
}, t.prototype[Ps] = function() {
|
|
353
|
+
return this;
|
|
354
|
+
}, t.prototype.pipe = function() {
|
|
355
|
+
for (var r = [], n = 0; n < arguments.length; n++)
|
|
356
|
+
r[n] = arguments[n];
|
|
357
|
+
return Rs(r)(this);
|
|
358
|
+
}, t.prototype.toPromise = function(r) {
|
|
359
|
+
var n = this;
|
|
360
|
+
return r = Nn(r), new r(function(s, a) {
|
|
361
|
+
var c;
|
|
362
|
+
n.subscribe(function(f) {
|
|
363
|
+
return c = f;
|
|
364
|
+
}, function(f) {
|
|
365
|
+
return a(f);
|
|
366
|
+
}, function() {
|
|
367
|
+
return s(c);
|
|
368
|
+
});
|
|
369
|
+
});
|
|
370
|
+
}, t.create = function(r) {
|
|
371
|
+
return new t(r);
|
|
372
|
+
}, t;
|
|
373
|
+
}();
|
|
374
|
+
function Nn(t) {
|
|
375
|
+
var r;
|
|
376
|
+
return (r = t ?? rs.Promise) !== null && r !== void 0 ? r : Promise;
|
|
377
|
+
}
|
|
378
|
+
function Fs(t) {
|
|
379
|
+
return t && Yt(t.next) && Yt(t.error) && Yt(t.complete);
|
|
380
|
+
}
|
|
381
|
+
function js(t) {
|
|
382
|
+
return t && t instanceof ss || Fs(t) && es(t);
|
|
383
|
+
}
|
|
384
|
+
var zs = Qn(function(t) {
|
|
385
|
+
return function() {
|
|
386
|
+
t(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
|
387
|
+
};
|
|
388
|
+
}), is = function(t) {
|
|
389
|
+
Ge(r, t);
|
|
390
|
+
function r() {
|
|
391
|
+
var n = t.call(this) || this;
|
|
392
|
+
return n.closed = !1, n.currentObservers = null, n.observers = [], n.isStopped = !1, n.hasError = !1, n.thrownError = null, n;
|
|
393
|
+
}
|
|
394
|
+
return r.prototype.lift = function(n) {
|
|
395
|
+
var s = new Hn(this, this);
|
|
396
|
+
return s.operator = n, s;
|
|
397
|
+
}, r.prototype._throwIfClosed = function() {
|
|
398
|
+
if (this.closed)
|
|
399
|
+
throw new zs();
|
|
400
|
+
}, r.prototype.next = function(n) {
|
|
401
|
+
var s = this;
|
|
402
|
+
fr(function() {
|
|
403
|
+
var a, c;
|
|
404
|
+
if (s._throwIfClosed(), !s.isStopped) {
|
|
405
|
+
s.currentObservers || (s.currentObservers = Array.from(s.observers));
|
|
406
|
+
try {
|
|
407
|
+
for (var f = pn(s.currentObservers), p = f.next(); !p.done; p = f.next()) {
|
|
408
|
+
var S = p.value;
|
|
409
|
+
S.next(n);
|
|
410
|
+
}
|
|
411
|
+
} catch (A) {
|
|
412
|
+
a = { error: A };
|
|
413
|
+
} finally {
|
|
414
|
+
try {
|
|
415
|
+
p && !p.done && (c = f.return) && c.call(f);
|
|
416
|
+
} finally {
|
|
417
|
+
if (a) throw a.error;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
}, r.prototype.error = function(n) {
|
|
423
|
+
var s = this;
|
|
424
|
+
fr(function() {
|
|
425
|
+
if (s._throwIfClosed(), !s.isStopped) {
|
|
426
|
+
s.hasError = s.isStopped = !0, s.thrownError = n;
|
|
427
|
+
for (var a = s.observers; a.length; )
|
|
428
|
+
a.shift().error(n);
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
}, r.prototype.complete = function() {
|
|
432
|
+
var n = this;
|
|
433
|
+
fr(function() {
|
|
434
|
+
if (n._throwIfClosed(), !n.isStopped) {
|
|
435
|
+
n.isStopped = !0;
|
|
436
|
+
for (var s = n.observers; s.length; )
|
|
437
|
+
s.shift().complete();
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
}, r.prototype.unsubscribe = function() {
|
|
441
|
+
this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
|
|
442
|
+
}, Object.defineProperty(r.prototype, "observed", {
|
|
443
|
+
get: function() {
|
|
444
|
+
var n;
|
|
445
|
+
return ((n = this.observers) === null || n === void 0 ? void 0 : n.length) > 0;
|
|
446
|
+
},
|
|
447
|
+
enumerable: !1,
|
|
448
|
+
configurable: !0
|
|
449
|
+
}), r.prototype._trySubscribe = function(n) {
|
|
450
|
+
return this._throwIfClosed(), t.prototype._trySubscribe.call(this, n);
|
|
451
|
+
}, r.prototype._subscribe = function(n) {
|
|
452
|
+
return this._throwIfClosed(), this._checkFinalizedStatuses(n), this._innerSubscribe(n);
|
|
453
|
+
}, r.prototype._innerSubscribe = function(n) {
|
|
454
|
+
var s = this, a = this, c = a.hasError, f = a.isStopped, p = a.observers;
|
|
455
|
+
return c || f ? ts : (this.currentObservers = null, p.push(n), new gr(function() {
|
|
456
|
+
s.currentObservers = null, yn(p, n);
|
|
457
|
+
}));
|
|
458
|
+
}, r.prototype._checkFinalizedStatuses = function(n) {
|
|
459
|
+
var s = this, a = s.hasError, c = s.thrownError, f = s.isStopped;
|
|
460
|
+
a ? n.error(c) : f && n.complete();
|
|
461
|
+
}, r.prototype.asObservable = function() {
|
|
462
|
+
var n = new zn();
|
|
463
|
+
return n.source = this, n;
|
|
464
|
+
}, r.create = function(n, s) {
|
|
465
|
+
return new Hn(n, s);
|
|
466
|
+
}, r;
|
|
467
|
+
}(zn), Hn = function(t) {
|
|
468
|
+
Ge(r, t);
|
|
469
|
+
function r(n, s) {
|
|
470
|
+
var a = t.call(this) || this;
|
|
471
|
+
return a.destination = n, a.source = s, a;
|
|
472
|
+
}
|
|
473
|
+
return r.prototype.next = function(n) {
|
|
474
|
+
var s, a;
|
|
475
|
+
(a = (s = this.destination) === null || s === void 0 ? void 0 : s.next) === null || a === void 0 || a.call(s, n);
|
|
476
|
+
}, r.prototype.error = function(n) {
|
|
477
|
+
var s, a;
|
|
478
|
+
(a = (s = this.destination) === null || s === void 0 ? void 0 : s.error) === null || a === void 0 || a.call(s, n);
|
|
479
|
+
}, r.prototype.complete = function() {
|
|
480
|
+
var n, s;
|
|
481
|
+
(s = (n = this.destination) === null || n === void 0 ? void 0 : n.complete) === null || s === void 0 || s.call(n);
|
|
482
|
+
}, r.prototype._subscribe = function(n) {
|
|
483
|
+
var s, a;
|
|
484
|
+
return (a = (s = this.source) === null || s === void 0 ? void 0 : s.subscribe(n)) !== null && a !== void 0 ? a : ts;
|
|
485
|
+
}, r;
|
|
486
|
+
}(is), Ln = function(t) {
|
|
487
|
+
Ge(r, t);
|
|
488
|
+
function r(n) {
|
|
489
|
+
var s = t.call(this) || this;
|
|
490
|
+
return s._value = n, s;
|
|
491
|
+
}
|
|
492
|
+
return Object.defineProperty(r.prototype, "value", {
|
|
493
|
+
get: function() {
|
|
494
|
+
return this.getValue();
|
|
495
|
+
},
|
|
496
|
+
enumerable: !1,
|
|
497
|
+
configurable: !0
|
|
498
|
+
}), r.prototype._subscribe = function(n) {
|
|
499
|
+
var s = t.prototype._subscribe.call(this, n);
|
|
500
|
+
return !s.closed && n.next(this._value), s;
|
|
501
|
+
}, r.prototype.getValue = function() {
|
|
502
|
+
var n = this, s = n.hasError, a = n.thrownError, c = n._value;
|
|
503
|
+
if (s)
|
|
504
|
+
throw a;
|
|
505
|
+
return this._throwIfClosed(), c;
|
|
506
|
+
}, r.prototype.next = function(n) {
|
|
507
|
+
t.prototype.next.call(this, this._value = n);
|
|
508
|
+
}, r;
|
|
509
|
+
}(is), Dt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
510
|
+
function En(t) {
|
|
511
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
512
|
+
}
|
|
513
|
+
var pr = { exports: {} };
|
|
514
|
+
pr.exports;
|
|
515
|
+
(function(t, r) {
|
|
516
|
+
var n = 200, s = "__lodash_hash_undefined__", a = 1, c = 2, f = 9007199254740991, p = "[object Arguments]", S = "[object Array]", A = "[object AsyncFunction]", k = "[object Boolean]", T = "[object Date]", y = "[object Error]", M = "[object Function]", C = "[object GeneratorFunction]", u = "[object Map]", d = "[object Number]", g = "[object Null]", b = "[object Object]", _ = "[object Promise]", h = "[object Proxy]", v = "[object RegExp]", I = "[object Set]", m = "[object String]", P = "[object Symbol]", x = "[object Undefined]", E = "[object WeakMap]", j = "[object ArrayBuffer]", H = "[object DataView]", $ = "[object Float32Array]", O = "[object Float64Array]", F = "[object Int8Array]", X = "[object Int16Array]", Tt = "[object Int32Array]", Rt = "[object Uint8Array]", Ft = "[object Uint8ClampedArray]", U = "[object Uint16Array]", Bt = "[object Uint32Array]", ft = /[\\^$.*+?()[\]{}|]/g, pt = /^\[object .+?Constructor\]$/, Lt = /^(?:0|[1-9]\d*)$/, w = {};
|
|
517
|
+
w[$] = w[O] = w[F] = w[X] = w[Tt] = w[Rt] = w[Ft] = w[U] = w[Bt] = !0, w[p] = w[S] = w[j] = w[k] = w[H] = w[T] = w[y] = w[M] = w[u] = w[d] = w[b] = w[v] = w[I] = w[m] = w[E] = !1;
|
|
518
|
+
var Z = typeof Dt == "object" && Dt && Dt.Object === Object && Dt, Mt = typeof self == "object" && self && self.Object === Object && self, Q = Z || Mt || Function("return this")(), bt = r && !r.nodeType && r, ht = bt && !0 && t && !t.nodeType && t, V = ht && ht.exports === bt, _t = V && Z.process, xt = function() {
|
|
519
|
+
try {
|
|
520
|
+
return _t && _t.binding && _t.binding("util");
|
|
521
|
+
} catch {
|
|
522
|
+
}
|
|
523
|
+
}(), mt = xt && xt.isTypedArray;
|
|
524
|
+
function R(e, i) {
|
|
525
|
+
for (var o = -1, l = e == null ? 0 : e.length, z = 0, D = []; ++o < l; ) {
|
|
526
|
+
var G = e[o];
|
|
527
|
+
i(G, o, e) && (D[z++] = G);
|
|
528
|
+
}
|
|
529
|
+
return D;
|
|
530
|
+
}
|
|
531
|
+
function N(e, i) {
|
|
532
|
+
for (var o = -1, l = i.length, z = e.length; ++o < l; )
|
|
533
|
+
e[z + o] = i[o];
|
|
534
|
+
return e;
|
|
535
|
+
}
|
|
536
|
+
function L(e, i) {
|
|
537
|
+
for (var o = -1, l = e == null ? 0 : e.length; ++o < l; )
|
|
538
|
+
if (i(e[o], o, e))
|
|
539
|
+
return !0;
|
|
540
|
+
return !1;
|
|
541
|
+
}
|
|
542
|
+
function Et(e, i) {
|
|
543
|
+
for (var o = -1, l = Array(e); ++o < e; )
|
|
544
|
+
l[o] = i(o);
|
|
545
|
+
return l;
|
|
546
|
+
}
|
|
547
|
+
function vt(e) {
|
|
548
|
+
return function(i) {
|
|
549
|
+
return e(i);
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
function tt(e, i) {
|
|
553
|
+
return e.has(i);
|
|
554
|
+
}
|
|
555
|
+
function kt(e, i) {
|
|
556
|
+
return e == null ? void 0 : e[i];
|
|
557
|
+
}
|
|
558
|
+
function J(e) {
|
|
559
|
+
var i = -1, o = Array(e.size);
|
|
560
|
+
return e.forEach(function(l, z) {
|
|
561
|
+
o[++i] = [z, l];
|
|
562
|
+
}), o;
|
|
563
|
+
}
|
|
564
|
+
function qt(e, i) {
|
|
565
|
+
return function(o) {
|
|
566
|
+
return e(i(o));
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
function At(e) {
|
|
570
|
+
var i = -1, o = Array(e.size);
|
|
571
|
+
return e.forEach(function(l) {
|
|
572
|
+
o[++i] = l;
|
|
573
|
+
}), o;
|
|
574
|
+
}
|
|
575
|
+
var Kt = Array.prototype, K = Function.prototype, at = Object.prototype, jt = Q["__core-js_shared__"], Zt = K.toString, ot = at.hasOwnProperty, Ve = function() {
|
|
576
|
+
var e = /[^.]+$/.exec(jt && jt.keys && jt.keys.IE_PROTO || "");
|
|
577
|
+
return e ? "Symbol(src)_1." + e : "";
|
|
578
|
+
}(), Je = at.toString, kr = RegExp(
|
|
579
|
+
"^" + Zt.call(ot).replace(ft, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
580
|
+
), Te = V ? Q.Buffer : void 0, me = Q.Symbol, qe = Q.Uint8Array, ye = at.propertyIsEnumerable, Qt = Kt.splice, Pt = me ? me.toStringTag : void 0, Ie = Object.getOwnPropertySymbols, Me = Te ? Te.isBuffer : void 0, te = qt(Object.keys, Object), Ee = Ut(Q, "DataView"), ee = Ut(Q, "Map"), Ae = Ut(Q, "Promise"), De = Ut(Q, "Set"), Oe = Ut(Q, "WeakMap"), Xt = Ut(Object, "create"), Ze = yt(Ee), $t = yt(ee), Sr = yt(Ae), wr = yt(De), Tr = yt(Oe), Qe = me ? me.prototype : void 0, xe = Qe ? Qe.valueOf : void 0;
|
|
581
|
+
function st(e) {
|
|
582
|
+
var i = -1, o = e == null ? 0 : e.length;
|
|
583
|
+
for (this.clear(); ++i < o; ) {
|
|
584
|
+
var l = e[i];
|
|
585
|
+
this.set(l[0], l[1]);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
function Mr() {
|
|
589
|
+
this.__data__ = Xt ? Xt(null) : {}, this.size = 0;
|
|
590
|
+
}
|
|
591
|
+
function Er(e) {
|
|
592
|
+
var i = this.has(e) && delete this.__data__[e];
|
|
593
|
+
return this.size -= i ? 1 : 0, i;
|
|
594
|
+
}
|
|
595
|
+
function Ar(e) {
|
|
596
|
+
var i = this.__data__;
|
|
597
|
+
if (Xt) {
|
|
598
|
+
var o = i[e];
|
|
599
|
+
return o === s ? void 0 : o;
|
|
600
|
+
}
|
|
601
|
+
return ot.call(i, e) ? i[e] : void 0;
|
|
602
|
+
}
|
|
603
|
+
function Dr(e) {
|
|
604
|
+
var i = this.__data__;
|
|
605
|
+
return Xt ? i[e] !== void 0 : ot.call(i, e);
|
|
606
|
+
}
|
|
607
|
+
function Or(e, i) {
|
|
608
|
+
var o = this.__data__;
|
|
609
|
+
return this.size += this.has(e) ? 0 : 1, o[e] = Xt && i === void 0 ? s : i, this;
|
|
610
|
+
}
|
|
611
|
+
st.prototype.clear = Mr, st.prototype.delete = Er, st.prototype.get = Ar, st.prototype.has = Dr, st.prototype.set = Or;
|
|
612
|
+
function ct(e) {
|
|
613
|
+
var i = -1, o = e == null ? 0 : e.length;
|
|
614
|
+
for (this.clear(); ++i < o; ) {
|
|
615
|
+
var l = e[i];
|
|
616
|
+
this.set(l[0], l[1]);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
function xr() {
|
|
620
|
+
this.__data__ = [], this.size = 0;
|
|
621
|
+
}
|
|
622
|
+
function Pr(e) {
|
|
623
|
+
var i = this.__data__, o = _e(i, e);
|
|
624
|
+
if (o < 0)
|
|
625
|
+
return !1;
|
|
626
|
+
var l = i.length - 1;
|
|
627
|
+
return o == l ? i.pop() : Qt.call(i, o, 1), --this.size, !0;
|
|
628
|
+
}
|
|
629
|
+
function Cr(e) {
|
|
630
|
+
var i = this.__data__, o = _e(i, e);
|
|
631
|
+
return o < 0 ? void 0 : i[o][1];
|
|
632
|
+
}
|
|
633
|
+
function Rr(e) {
|
|
634
|
+
return _e(this.__data__, e) > -1;
|
|
635
|
+
}
|
|
636
|
+
function Fr(e, i) {
|
|
637
|
+
var o = this.__data__, l = _e(o, e);
|
|
638
|
+
return l < 0 ? (++this.size, o.push([e, i])) : o[l][1] = i, this;
|
|
639
|
+
}
|
|
640
|
+
ct.prototype.clear = xr, ct.prototype.delete = Pr, ct.prototype.get = Cr, ct.prototype.has = Rr, ct.prototype.set = Fr;
|
|
641
|
+
function It(e) {
|
|
642
|
+
var i = -1, o = e == null ? 0 : e.length;
|
|
643
|
+
for (this.clear(); ++i < o; ) {
|
|
644
|
+
var l = e[i];
|
|
645
|
+
this.set(l[0], l[1]);
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
function jr() {
|
|
649
|
+
this.size = 0, this.__data__ = {
|
|
650
|
+
hash: new st(),
|
|
651
|
+
map: new (ee || ct)(),
|
|
652
|
+
string: new st()
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
function zr(e) {
|
|
656
|
+
var i = Ct(this, e).delete(e);
|
|
657
|
+
return this.size -= i ? 1 : 0, i;
|
|
658
|
+
}
|
|
659
|
+
function Nr(e) {
|
|
660
|
+
return Ct(this, e).get(e);
|
|
661
|
+
}
|
|
662
|
+
function Hr(e) {
|
|
663
|
+
return Ct(this, e).has(e);
|
|
664
|
+
}
|
|
665
|
+
function Lr(e, i) {
|
|
666
|
+
var o = Ct(this, e), l = o.size;
|
|
667
|
+
return o.set(e, i), this.size += o.size == l ? 0 : 1, this;
|
|
668
|
+
}
|
|
669
|
+
It.prototype.clear = jr, It.prototype.delete = zr, It.prototype.get = Nr, It.prototype.has = Hr, It.prototype.set = Lr;
|
|
670
|
+
function ge(e) {
|
|
671
|
+
var i = -1, o = e == null ? 0 : e.length;
|
|
672
|
+
for (this.__data__ = new It(); ++i < o; )
|
|
673
|
+
this.add(e[i]);
|
|
674
|
+
}
|
|
675
|
+
function tr(e) {
|
|
676
|
+
return this.__data__.set(e, s), this;
|
|
677
|
+
}
|
|
678
|
+
function be(e) {
|
|
679
|
+
return this.__data__.has(e);
|
|
680
|
+
}
|
|
681
|
+
ge.prototype.add = ge.prototype.push = tr, ge.prototype.has = be;
|
|
682
|
+
function zt(e) {
|
|
683
|
+
var i = this.__data__ = new ct(e);
|
|
684
|
+
this.size = i.size;
|
|
685
|
+
}
|
|
686
|
+
function Pe() {
|
|
687
|
+
this.__data__ = new ct(), this.size = 0;
|
|
688
|
+
}
|
|
689
|
+
function $r(e) {
|
|
690
|
+
var i = this.__data__, o = i.delete(e);
|
|
691
|
+
return this.size = i.size, o;
|
|
692
|
+
}
|
|
693
|
+
function Ur(e) {
|
|
694
|
+
return this.__data__.get(e);
|
|
695
|
+
}
|
|
696
|
+
function Wr(e) {
|
|
697
|
+
return this.__data__.has(e);
|
|
698
|
+
}
|
|
699
|
+
function Gr(e, i) {
|
|
700
|
+
var o = this.__data__;
|
|
701
|
+
if (o instanceof ct) {
|
|
702
|
+
var l = o.__data__;
|
|
703
|
+
if (!ee || l.length < n - 1)
|
|
704
|
+
return l.push([e, i]), this.size = ++o.size, this;
|
|
705
|
+
o = this.__data__ = new It(l);
|
|
706
|
+
}
|
|
707
|
+
return o.set(e, i), this.size = o.size, this;
|
|
708
|
+
}
|
|
709
|
+
zt.prototype.clear = Pe, zt.prototype.delete = $r, zt.prototype.get = Ur, zt.prototype.has = Wr, zt.prototype.set = Gr;
|
|
710
|
+
function Yr(e, i) {
|
|
711
|
+
var o = ve(e), l = !o && ir(e), z = !o && !l && ke(e), D = !o && !l && !z && cr(e), G = o || l || z || D, W = G ? Et(e.length, String) : [], q = W.length;
|
|
712
|
+
for (var Y in e)
|
|
713
|
+
ot.call(e, Y) && !(G && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
714
|
+
(Y == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
715
|
+
z && (Y == "offset" || Y == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
716
|
+
D && (Y == "buffer" || Y == "byteLength" || Y == "byteOffset") || // Skip index properties.
|
|
717
|
+
Qr(Y, q))) && W.push(Y);
|
|
718
|
+
return W;
|
|
719
|
+
}
|
|
720
|
+
function _e(e, i) {
|
|
721
|
+
for (var o = e.length; o--; )
|
|
722
|
+
if (sr(e[o][0], i))
|
|
723
|
+
return o;
|
|
724
|
+
return -1;
|
|
725
|
+
}
|
|
726
|
+
function Ce(e, i, o) {
|
|
727
|
+
var l = i(e);
|
|
728
|
+
return ve(e) ? l : N(l, o(e));
|
|
729
|
+
}
|
|
730
|
+
function re(e) {
|
|
731
|
+
return e == null ? e === void 0 ? x : g : Pt && Pt in Object(e) ? Wt(e) : nr(e);
|
|
732
|
+
}
|
|
733
|
+
function er(e) {
|
|
734
|
+
return Ht(e) && re(e) == p;
|
|
735
|
+
}
|
|
736
|
+
function rr(e, i, o, l, z) {
|
|
737
|
+
return e === i ? !0 : e == null || i == null || !Ht(e) && !Ht(i) ? e !== e && i !== i : Br(e, i, o, l, rr, z);
|
|
738
|
+
}
|
|
739
|
+
function Br(e, i, o, l, z, D) {
|
|
740
|
+
var G = ve(e), W = ve(i), q = G ? S : Nt(e), Y = W ? S : Nt(i);
|
|
741
|
+
q = q == p ? b : q, Y = Y == p ? b : Y;
|
|
742
|
+
var ut = q == b, gt = Y == b, et = q == Y;
|
|
743
|
+
if (et && ke(e)) {
|
|
744
|
+
if (!ke(i))
|
|
745
|
+
return !1;
|
|
746
|
+
G = !0, ut = !1;
|
|
747
|
+
}
|
|
748
|
+
if (et && !ut)
|
|
749
|
+
return D || (D = new zt()), G || cr(e) ? Re(e, i, o, l, z, D) : Jr(e, i, q, o, l, z, D);
|
|
750
|
+
if (!(o & a)) {
|
|
751
|
+
var lt = ut && ot.call(e, "__wrapped__"), it = gt && ot.call(i, "__wrapped__");
|
|
752
|
+
if (lt || it) {
|
|
753
|
+
var Vt = lt ? e.value() : e, Gt = it ? i.value() : i;
|
|
754
|
+
return D || (D = new zt()), z(Vt, Gt, o, l, D);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
return et ? (D || (D = new zt()), qr(e, i, o, l, z, D)) : !1;
|
|
758
|
+
}
|
|
759
|
+
function Kr(e) {
|
|
760
|
+
if (!or(e) || en(e))
|
|
761
|
+
return !1;
|
|
762
|
+
var i = ar(e) ? kr : pt;
|
|
763
|
+
return i.test(yt(e));
|
|
764
|
+
}
|
|
765
|
+
function Xr(e) {
|
|
766
|
+
return Ht(e) && je(e.length) && !!w[re(e)];
|
|
767
|
+
}
|
|
768
|
+
function Vr(e) {
|
|
769
|
+
if (!rn(e))
|
|
770
|
+
return te(e);
|
|
771
|
+
var i = [];
|
|
772
|
+
for (var o in Object(e))
|
|
773
|
+
ot.call(e, o) && o != "constructor" && i.push(o);
|
|
774
|
+
return i;
|
|
775
|
+
}
|
|
776
|
+
function Re(e, i, o, l, z, D) {
|
|
777
|
+
var G = o & a, W = e.length, q = i.length;
|
|
778
|
+
if (W != q && !(G && q > W))
|
|
779
|
+
return !1;
|
|
780
|
+
var Y = D.get(e);
|
|
781
|
+
if (Y && D.get(i))
|
|
782
|
+
return Y == i;
|
|
783
|
+
var ut = -1, gt = !0, et = o & c ? new ge() : void 0;
|
|
784
|
+
for (D.set(e, i), D.set(i, e); ++ut < W; ) {
|
|
785
|
+
var lt = e[ut], it = i[ut];
|
|
786
|
+
if (l)
|
|
787
|
+
var Vt = G ? l(it, lt, ut, i, e, D) : l(lt, it, ut, e, i, D);
|
|
788
|
+
if (Vt !== void 0) {
|
|
789
|
+
if (Vt)
|
|
790
|
+
continue;
|
|
791
|
+
gt = !1;
|
|
792
|
+
break;
|
|
793
|
+
}
|
|
794
|
+
if (et) {
|
|
795
|
+
if (!L(i, function(Gt, se) {
|
|
796
|
+
if (!tt(et, se) && (lt === Gt || z(lt, Gt, o, l, D)))
|
|
797
|
+
return et.push(se);
|
|
798
|
+
})) {
|
|
799
|
+
gt = !1;
|
|
800
|
+
break;
|
|
801
|
+
}
|
|
802
|
+
} else if (!(lt === it || z(lt, it, o, l, D))) {
|
|
803
|
+
gt = !1;
|
|
804
|
+
break;
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
return D.delete(e), D.delete(i), gt;
|
|
808
|
+
}
|
|
809
|
+
function Jr(e, i, o, l, z, D, G) {
|
|
810
|
+
switch (o) {
|
|
811
|
+
case H:
|
|
812
|
+
if (e.byteLength != i.byteLength || e.byteOffset != i.byteOffset)
|
|
813
|
+
return !1;
|
|
814
|
+
e = e.buffer, i = i.buffer;
|
|
815
|
+
case j:
|
|
816
|
+
return !(e.byteLength != i.byteLength || !D(new qe(e), new qe(i)));
|
|
817
|
+
case k:
|
|
818
|
+
case T:
|
|
819
|
+
case d:
|
|
820
|
+
return sr(+e, +i);
|
|
821
|
+
case y:
|
|
822
|
+
return e.name == i.name && e.message == i.message;
|
|
823
|
+
case v:
|
|
824
|
+
case m:
|
|
825
|
+
return e == i + "";
|
|
826
|
+
case u:
|
|
827
|
+
var W = J;
|
|
828
|
+
case I:
|
|
829
|
+
var q = l & a;
|
|
830
|
+
if (W || (W = At), e.size != i.size && !q)
|
|
831
|
+
return !1;
|
|
832
|
+
var Y = G.get(e);
|
|
833
|
+
if (Y)
|
|
834
|
+
return Y == i;
|
|
835
|
+
l |= c, G.set(e, i);
|
|
836
|
+
var ut = Re(W(e), W(i), l, z, D, G);
|
|
837
|
+
return G.delete(e), ut;
|
|
838
|
+
case P:
|
|
839
|
+
if (xe)
|
|
840
|
+
return xe.call(e) == xe.call(i);
|
|
841
|
+
}
|
|
842
|
+
return !1;
|
|
843
|
+
}
|
|
844
|
+
function qr(e, i, o, l, z, D) {
|
|
845
|
+
var G = o & a, W = ne(e), q = W.length, Y = ne(i), ut = Y.length;
|
|
846
|
+
if (q != ut && !G)
|
|
847
|
+
return !1;
|
|
848
|
+
for (var gt = q; gt--; ) {
|
|
849
|
+
var et = W[gt];
|
|
850
|
+
if (!(G ? et in i : ot.call(i, et)))
|
|
851
|
+
return !1;
|
|
852
|
+
}
|
|
853
|
+
var lt = D.get(e);
|
|
854
|
+
if (lt && D.get(i))
|
|
855
|
+
return lt == i;
|
|
856
|
+
var it = !0;
|
|
857
|
+
D.set(e, i), D.set(i, e);
|
|
858
|
+
for (var Vt = G; ++gt < q; ) {
|
|
859
|
+
et = W[gt];
|
|
860
|
+
var Gt = e[et], se = i[et];
|
|
861
|
+
if (l)
|
|
862
|
+
var Rn = G ? l(se, Gt, et, i, e, D) : l(Gt, se, et, e, i, D);
|
|
863
|
+
if (!(Rn === void 0 ? Gt === se || z(Gt, se, o, l, D) : Rn)) {
|
|
864
|
+
it = !1;
|
|
865
|
+
break;
|
|
866
|
+
}
|
|
867
|
+
Vt || (Vt = et == "constructor");
|
|
868
|
+
}
|
|
869
|
+
if (it && !Vt) {
|
|
870
|
+
var ur = e.constructor, lr = i.constructor;
|
|
871
|
+
ur != lr && "constructor" in e && "constructor" in i && !(typeof ur == "function" && ur instanceof ur && typeof lr == "function" && lr instanceof lr) && (it = !1);
|
|
872
|
+
}
|
|
873
|
+
return D.delete(e), D.delete(i), it;
|
|
874
|
+
}
|
|
875
|
+
function ne(e) {
|
|
876
|
+
return Ce(e, ze, Zr);
|
|
877
|
+
}
|
|
878
|
+
function Ct(e, i) {
|
|
879
|
+
var o = e.__data__;
|
|
880
|
+
return tn(i) ? o[typeof i == "string" ? "string" : "hash"] : o.map;
|
|
881
|
+
}
|
|
882
|
+
function Ut(e, i) {
|
|
883
|
+
var o = kt(e, i);
|
|
884
|
+
return Kr(o) ? o : void 0;
|
|
885
|
+
}
|
|
886
|
+
function Wt(e) {
|
|
887
|
+
var i = ot.call(e, Pt), o = e[Pt];
|
|
888
|
+
try {
|
|
889
|
+
e[Pt] = void 0;
|
|
890
|
+
var l = !0;
|
|
891
|
+
} catch {
|
|
892
|
+
}
|
|
893
|
+
var z = Je.call(e);
|
|
894
|
+
return l && (i ? e[Pt] = o : delete e[Pt]), z;
|
|
895
|
+
}
|
|
896
|
+
var Zr = Ie ? function(e) {
|
|
897
|
+
return e == null ? [] : (e = Object(e), R(Ie(e), function(i) {
|
|
898
|
+
return ye.call(e, i);
|
|
899
|
+
}));
|
|
900
|
+
} : sn, Nt = re;
|
|
901
|
+
(Ee && Nt(new Ee(new ArrayBuffer(1))) != H || ee && Nt(new ee()) != u || Ae && Nt(Ae.resolve()) != _ || De && Nt(new De()) != I || Oe && Nt(new Oe()) != E) && (Nt = function(e) {
|
|
902
|
+
var i = re(e), o = i == b ? e.constructor : void 0, l = o ? yt(o) : "";
|
|
903
|
+
if (l)
|
|
904
|
+
switch (l) {
|
|
905
|
+
case Ze:
|
|
906
|
+
return H;
|
|
907
|
+
case $t:
|
|
908
|
+
return u;
|
|
909
|
+
case Sr:
|
|
910
|
+
return _;
|
|
911
|
+
case wr:
|
|
912
|
+
return I;
|
|
913
|
+
case Tr:
|
|
914
|
+
return E;
|
|
915
|
+
}
|
|
916
|
+
return i;
|
|
917
|
+
});
|
|
918
|
+
function Qr(e, i) {
|
|
919
|
+
return i = i ?? f, !!i && (typeof e == "number" || Lt.test(e)) && e > -1 && e % 1 == 0 && e < i;
|
|
920
|
+
}
|
|
921
|
+
function tn(e) {
|
|
922
|
+
var i = typeof e;
|
|
923
|
+
return i == "string" || i == "number" || i == "symbol" || i == "boolean" ? e !== "__proto__" : e === null;
|
|
924
|
+
}
|
|
925
|
+
function en(e) {
|
|
926
|
+
return !!Ve && Ve in e;
|
|
927
|
+
}
|
|
928
|
+
function rn(e) {
|
|
929
|
+
var i = e && e.constructor, o = typeof i == "function" && i.prototype || at;
|
|
930
|
+
return e === o;
|
|
931
|
+
}
|
|
932
|
+
function nr(e) {
|
|
933
|
+
return Je.call(e);
|
|
934
|
+
}
|
|
935
|
+
function yt(e) {
|
|
936
|
+
if (e != null) {
|
|
937
|
+
try {
|
|
938
|
+
return Zt.call(e);
|
|
939
|
+
} catch {
|
|
940
|
+
}
|
|
941
|
+
try {
|
|
942
|
+
return e + "";
|
|
943
|
+
} catch {
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
return "";
|
|
947
|
+
}
|
|
948
|
+
function sr(e, i) {
|
|
949
|
+
return e === i || e !== e && i !== i;
|
|
950
|
+
}
|
|
951
|
+
var ir = er(/* @__PURE__ */ function() {
|
|
952
|
+
return arguments;
|
|
953
|
+
}()) ? er : function(e) {
|
|
954
|
+
return Ht(e) && ot.call(e, "callee") && !ye.call(e, "callee");
|
|
955
|
+
}, ve = Array.isArray;
|
|
956
|
+
function Fe(e) {
|
|
957
|
+
return e != null && je(e.length) && !ar(e);
|
|
958
|
+
}
|
|
959
|
+
var ke = Me || an;
|
|
960
|
+
function nn(e, i) {
|
|
961
|
+
return rr(e, i);
|
|
962
|
+
}
|
|
963
|
+
function ar(e) {
|
|
964
|
+
if (!or(e))
|
|
965
|
+
return !1;
|
|
966
|
+
var i = re(e);
|
|
967
|
+
return i == M || i == C || i == A || i == h;
|
|
968
|
+
}
|
|
969
|
+
function je(e) {
|
|
970
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= f;
|
|
971
|
+
}
|
|
972
|
+
function or(e) {
|
|
973
|
+
var i = typeof e;
|
|
974
|
+
return e != null && (i == "object" || i == "function");
|
|
975
|
+
}
|
|
976
|
+
function Ht(e) {
|
|
977
|
+
return e != null && typeof e == "object";
|
|
978
|
+
}
|
|
979
|
+
var cr = mt ? vt(mt) : Xr;
|
|
980
|
+
function ze(e) {
|
|
981
|
+
return Fe(e) ? Yr(e) : Vr(e);
|
|
982
|
+
}
|
|
983
|
+
function sn() {
|
|
984
|
+
return [];
|
|
985
|
+
}
|
|
986
|
+
function an() {
|
|
987
|
+
return !1;
|
|
988
|
+
}
|
|
989
|
+
t.exports = nn;
|
|
990
|
+
})(pr, pr.exports);
|
|
991
|
+
var Ns = pr.exports;
|
|
992
|
+
const nt = /* @__PURE__ */ En(Ns), ma = "add", Hs = "track", Ls = "trackItems", ya = `${Hs}:changed`, Ia = `${Ls}:changed`, $s = "state", ga = `${$s}:changed`, An = "design", Us = `${An}:load`, Ws = `${An}:resize`, Ot = "add", Gs = `${Ot}:text`, Ys = `${Ot}:video`, Bs = `${Ot}:audio`, ba = `${Ot}:placeholder`, Ks = `${Ot}:image`, _a = `${Ot}:mask`, va = `${Ot}:transition`, Xs = `${Ot}:animation`, Vs = `${Ot}:caption`, Js = `${Ot}:template`, qs = `${Ot}:items`, he = "edit", Zs = `${he}:object`, Qs = `${he}:replaceMedia`, ka = `${he}:text`, Sa = `${he}:shape`, wa = `${he}:templateItem`, Ta = `${he}:deleteTemplateItem`, Ma = "enterEditMode", we = "active", Ea = `${we}:set`, Aa = `${we}:delete`, ti = `${we}:paste`, ei = `${we}:clone`, ri = `${we}:split`, dt = "layer", Da = `${dt}:locked`, Oa = `${dt}:hidden`, xa = `${dt}:move`, Pa = `${dt}:select`, Ca = `${dt}:selection`, Ra = `${dt}:sendTo`, Fa = `${dt}:rename`, ja = `${dt}:editingName`, za = `${dt}:copy`, Na = `${dt}:paste`, ni = `${dt}:clone`, Ha = `${dt}:split`, La = `${dt}:cut`, si = `${dt}:delete`, ii = `${dt}:replace`, br = "history", ai = `${br}:undo`, oi = `${br}:redo`, $a = `${br}:reset`, as = "scale", ci = `${as}:changed`;
|
|
993
|
+
var hr = { exports: {} };
|
|
994
|
+
hr.exports;
|
|
995
|
+
(function(t, r) {
|
|
996
|
+
var n = 200, s = "__lodash_hash_undefined__", a = 9007199254740991, c = "[object Arguments]", f = "[object Array]", p = "[object Boolean]", S = "[object Date]", A = "[object Error]", k = "[object Function]", T = "[object GeneratorFunction]", y = "[object Map]", M = "[object Number]", C = "[object Object]", u = "[object Promise]", d = "[object RegExp]", g = "[object Set]", b = "[object String]", _ = "[object Symbol]", h = "[object WeakMap]", v = "[object ArrayBuffer]", I = "[object DataView]", m = "[object Float32Array]", P = "[object Float64Array]", x = "[object Int8Array]", E = "[object Int16Array]", j = "[object Int32Array]", H = "[object Uint8Array]", $ = "[object Uint8ClampedArray]", O = "[object Uint16Array]", F = "[object Uint32Array]", X = /[\\^$.*+?()[\]{}|]/g, Tt = /\w*$/, Rt = /^\[object .+?Constructor\]$/, Ft = /^(?:0|[1-9]\d*)$/, U = {};
|
|
997
|
+
U[c] = U[f] = U[v] = U[I] = U[p] = U[S] = U[m] = U[P] = U[x] = U[E] = U[j] = U[y] = U[M] = U[C] = U[d] = U[g] = U[b] = U[_] = U[H] = U[$] = U[O] = U[F] = !0, U[A] = U[k] = U[h] = !1;
|
|
998
|
+
var Bt = typeof Dt == "object" && Dt && Dt.Object === Object && Dt, ft = typeof self == "object" && self && self.Object === Object && self, pt = Bt || ft || Function("return this")(), Lt = r && !r.nodeType && r, w = Lt && !0 && t && !t.nodeType && t, Z = w && w.exports === Lt;
|
|
999
|
+
function Mt(e, i) {
|
|
1000
|
+
return e.set(i[0], i[1]), e;
|
|
1001
|
+
}
|
|
1002
|
+
function Q(e, i) {
|
|
1003
|
+
return e.add(i), e;
|
|
1004
|
+
}
|
|
1005
|
+
function bt(e, i) {
|
|
1006
|
+
for (var o = -1, l = e ? e.length : 0; ++o < l && i(e[o], o, e) !== !1; )
|
|
1007
|
+
;
|
|
1008
|
+
return e;
|
|
1009
|
+
}
|
|
1010
|
+
function ht(e, i) {
|
|
1011
|
+
for (var o = -1, l = i.length, z = e.length; ++o < l; )
|
|
1012
|
+
e[z + o] = i[o];
|
|
1013
|
+
return e;
|
|
1014
|
+
}
|
|
1015
|
+
function V(e, i, o, l) {
|
|
1016
|
+
for (var z = -1, D = e ? e.length : 0; ++z < D; )
|
|
1017
|
+
o = i(o, e[z], z, e);
|
|
1018
|
+
return o;
|
|
1019
|
+
}
|
|
1020
|
+
function _t(e, i) {
|
|
1021
|
+
for (var o = -1, l = Array(e); ++o < e; )
|
|
1022
|
+
l[o] = i(o);
|
|
1023
|
+
return l;
|
|
1024
|
+
}
|
|
1025
|
+
function xt(e, i) {
|
|
1026
|
+
return e == null ? void 0 : e[i];
|
|
1027
|
+
}
|
|
1028
|
+
function mt(e) {
|
|
1029
|
+
var i = !1;
|
|
1030
|
+
if (e != null && typeof e.toString != "function")
|
|
1031
|
+
try {
|
|
1032
|
+
i = !!(e + "");
|
|
1033
|
+
} catch {
|
|
1034
|
+
}
|
|
1035
|
+
return i;
|
|
1036
|
+
}
|
|
1037
|
+
function R(e) {
|
|
1038
|
+
var i = -1, o = Array(e.size);
|
|
1039
|
+
return e.forEach(function(l, z) {
|
|
1040
|
+
o[++i] = [z, l];
|
|
1041
|
+
}), o;
|
|
1042
|
+
}
|
|
1043
|
+
function N(e, i) {
|
|
1044
|
+
return function(o) {
|
|
1045
|
+
return e(i(o));
|
|
1046
|
+
};
|
|
1047
|
+
}
|
|
1048
|
+
function L(e) {
|
|
1049
|
+
var i = -1, o = Array(e.size);
|
|
1050
|
+
return e.forEach(function(l) {
|
|
1051
|
+
o[++i] = l;
|
|
1052
|
+
}), o;
|
|
1053
|
+
}
|
|
1054
|
+
var Et = Array.prototype, vt = Function.prototype, tt = Object.prototype, kt = pt["__core-js_shared__"], J = function() {
|
|
1055
|
+
var e = /[^.]+$/.exec(kt && kt.keys && kt.keys.IE_PROTO || "");
|
|
1056
|
+
return e ? "Symbol(src)_1." + e : "";
|
|
1057
|
+
}(), qt = vt.toString, At = tt.hasOwnProperty, Kt = tt.toString, K = RegExp(
|
|
1058
|
+
"^" + qt.call(At).replace(X, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1059
|
+
), at = Z ? pt.Buffer : void 0, jt = pt.Symbol, Zt = pt.Uint8Array, ot = N(Object.getPrototypeOf, Object), Ve = Object.create, Je = tt.propertyIsEnumerable, kr = Et.splice, Te = Object.getOwnPropertySymbols, me = at ? at.isBuffer : void 0, qe = N(Object.keys, Object), ye = Ct(pt, "DataView"), Qt = Ct(pt, "Map"), Pt = Ct(pt, "Promise"), Ie = Ct(pt, "Set"), Me = Ct(pt, "WeakMap"), te = Ct(Object, "create"), Ee = yt(ye), ee = yt(Qt), Ae = yt(Pt), De = yt(Ie), Oe = yt(Me), Xt = jt ? jt.prototype : void 0, Ze = Xt ? Xt.valueOf : void 0;
|
|
1060
|
+
function $t(e) {
|
|
1061
|
+
var i = -1, o = e ? e.length : 0;
|
|
1062
|
+
for (this.clear(); ++i < o; ) {
|
|
1063
|
+
var l = e[i];
|
|
1064
|
+
this.set(l[0], l[1]);
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
function Sr() {
|
|
1068
|
+
this.__data__ = te ? te(null) : {};
|
|
1069
|
+
}
|
|
1070
|
+
function wr(e) {
|
|
1071
|
+
return this.has(e) && delete this.__data__[e];
|
|
1072
|
+
}
|
|
1073
|
+
function Tr(e) {
|
|
1074
|
+
var i = this.__data__;
|
|
1075
|
+
if (te) {
|
|
1076
|
+
var o = i[e];
|
|
1077
|
+
return o === s ? void 0 : o;
|
|
1078
|
+
}
|
|
1079
|
+
return At.call(i, e) ? i[e] : void 0;
|
|
1080
|
+
}
|
|
1081
|
+
function Qe(e) {
|
|
1082
|
+
var i = this.__data__;
|
|
1083
|
+
return te ? i[e] !== void 0 : At.call(i, e);
|
|
1084
|
+
}
|
|
1085
|
+
function xe(e, i) {
|
|
1086
|
+
var o = this.__data__;
|
|
1087
|
+
return o[e] = te && i === void 0 ? s : i, this;
|
|
1088
|
+
}
|
|
1089
|
+
$t.prototype.clear = Sr, $t.prototype.delete = wr, $t.prototype.get = Tr, $t.prototype.has = Qe, $t.prototype.set = xe;
|
|
1090
|
+
function st(e) {
|
|
1091
|
+
var i = -1, o = e ? e.length : 0;
|
|
1092
|
+
for (this.clear(); ++i < o; ) {
|
|
1093
|
+
var l = e[i];
|
|
1094
|
+
this.set(l[0], l[1]);
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
function Mr() {
|
|
1098
|
+
this.__data__ = [];
|
|
1099
|
+
}
|
|
1100
|
+
function Er(e) {
|
|
1101
|
+
var i = this.__data__, o = be(i, e);
|
|
1102
|
+
if (o < 0)
|
|
1103
|
+
return !1;
|
|
1104
|
+
var l = i.length - 1;
|
|
1105
|
+
return o == l ? i.pop() : kr.call(i, o, 1), !0;
|
|
1106
|
+
}
|
|
1107
|
+
function Ar(e) {
|
|
1108
|
+
var i = this.__data__, o = be(i, e);
|
|
1109
|
+
return o < 0 ? void 0 : i[o][1];
|
|
1110
|
+
}
|
|
1111
|
+
function Dr(e) {
|
|
1112
|
+
return be(this.__data__, e) > -1;
|
|
1113
|
+
}
|
|
1114
|
+
function Or(e, i) {
|
|
1115
|
+
var o = this.__data__, l = be(o, e);
|
|
1116
|
+
return l < 0 ? o.push([e, i]) : o[l][1] = i, this;
|
|
1117
|
+
}
|
|
1118
|
+
st.prototype.clear = Mr, st.prototype.delete = Er, st.prototype.get = Ar, st.prototype.has = Dr, st.prototype.set = Or;
|
|
1119
|
+
function ct(e) {
|
|
1120
|
+
var i = -1, o = e ? e.length : 0;
|
|
1121
|
+
for (this.clear(); ++i < o; ) {
|
|
1122
|
+
var l = e[i];
|
|
1123
|
+
this.set(l[0], l[1]);
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
function xr() {
|
|
1127
|
+
this.__data__ = {
|
|
1128
|
+
hash: new $t(),
|
|
1129
|
+
map: new (Qt || st)(),
|
|
1130
|
+
string: new $t()
|
|
1131
|
+
};
|
|
1132
|
+
}
|
|
1133
|
+
function Pr(e) {
|
|
1134
|
+
return ne(this, e).delete(e);
|
|
1135
|
+
}
|
|
1136
|
+
function Cr(e) {
|
|
1137
|
+
return ne(this, e).get(e);
|
|
1138
|
+
}
|
|
1139
|
+
function Rr(e) {
|
|
1140
|
+
return ne(this, e).has(e);
|
|
1141
|
+
}
|
|
1142
|
+
function Fr(e, i) {
|
|
1143
|
+
return ne(this, e).set(e, i), this;
|
|
1144
|
+
}
|
|
1145
|
+
ct.prototype.clear = xr, ct.prototype.delete = Pr, ct.prototype.get = Cr, ct.prototype.has = Rr, ct.prototype.set = Fr;
|
|
1146
|
+
function It(e) {
|
|
1147
|
+
this.__data__ = new st(e);
|
|
1148
|
+
}
|
|
1149
|
+
function jr() {
|
|
1150
|
+
this.__data__ = new st();
|
|
1151
|
+
}
|
|
1152
|
+
function zr(e) {
|
|
1153
|
+
return this.__data__.delete(e);
|
|
1154
|
+
}
|
|
1155
|
+
function Nr(e) {
|
|
1156
|
+
return this.__data__.get(e);
|
|
1157
|
+
}
|
|
1158
|
+
function Hr(e) {
|
|
1159
|
+
return this.__data__.has(e);
|
|
1160
|
+
}
|
|
1161
|
+
function Lr(e, i) {
|
|
1162
|
+
var o = this.__data__;
|
|
1163
|
+
if (o instanceof st) {
|
|
1164
|
+
var l = o.__data__;
|
|
1165
|
+
if (!Qt || l.length < n - 1)
|
|
1166
|
+
return l.push([e, i]), this;
|
|
1167
|
+
o = this.__data__ = new ct(l);
|
|
1168
|
+
}
|
|
1169
|
+
return o.set(e, i), this;
|
|
1170
|
+
}
|
|
1171
|
+
It.prototype.clear = jr, It.prototype.delete = zr, It.prototype.get = Nr, It.prototype.has = Hr, It.prototype.set = Lr;
|
|
1172
|
+
function ge(e, i) {
|
|
1173
|
+
var o = Fe(e) || ve(e) ? _t(e.length, String) : [], l = o.length, z = !!l;
|
|
1174
|
+
for (var D in e)
|
|
1175
|
+
At.call(e, D) && !(z && (D == "length" || tn(D, l))) && o.push(D);
|
|
1176
|
+
return o;
|
|
1177
|
+
}
|
|
1178
|
+
function tr(e, i, o) {
|
|
1179
|
+
var l = e[i];
|
|
1180
|
+
(!(At.call(e, i) && ir(l, o)) || o === void 0 && !(i in e)) && (e[i] = o);
|
|
1181
|
+
}
|
|
1182
|
+
function be(e, i) {
|
|
1183
|
+
for (var o = e.length; o--; )
|
|
1184
|
+
if (ir(e[o][0], i))
|
|
1185
|
+
return o;
|
|
1186
|
+
return -1;
|
|
1187
|
+
}
|
|
1188
|
+
function zt(e, i) {
|
|
1189
|
+
return e && Re(i, ze(i), e);
|
|
1190
|
+
}
|
|
1191
|
+
function Pe(e, i, o, l, z, D, G) {
|
|
1192
|
+
var W;
|
|
1193
|
+
if (l && (W = D ? l(e, z, D, G) : l(e)), W !== void 0)
|
|
1194
|
+
return W;
|
|
1195
|
+
if (!Ht(e))
|
|
1196
|
+
return e;
|
|
1197
|
+
var q = Fe(e);
|
|
1198
|
+
if (q) {
|
|
1199
|
+
if (W = Zr(e), !i)
|
|
1200
|
+
return Vr(e, W);
|
|
1201
|
+
} else {
|
|
1202
|
+
var Y = Wt(e), ut = Y == k || Y == T;
|
|
1203
|
+
if (ar(e))
|
|
1204
|
+
return _e(e, i);
|
|
1205
|
+
if (Y == C || Y == c || ut && !D) {
|
|
1206
|
+
if (mt(e))
|
|
1207
|
+
return D ? e : {};
|
|
1208
|
+
if (W = Nt(ut ? {} : e), !i)
|
|
1209
|
+
return Jr(e, zt(W, e));
|
|
1210
|
+
} else {
|
|
1211
|
+
if (!U[Y])
|
|
1212
|
+
return D ? e : {};
|
|
1213
|
+
W = Qr(e, Y, Pe, i);
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
G || (G = new It());
|
|
1217
|
+
var gt = G.get(e);
|
|
1218
|
+
if (gt)
|
|
1219
|
+
return gt;
|
|
1220
|
+
if (G.set(e, W), !q)
|
|
1221
|
+
var et = o ? qr(e) : ze(e);
|
|
1222
|
+
return bt(et || e, function(lt, it) {
|
|
1223
|
+
et && (it = lt, lt = e[it]), tr(W, it, Pe(lt, i, o, l, it, e, G));
|
|
1224
|
+
}), W;
|
|
1225
|
+
}
|
|
1226
|
+
function $r(e) {
|
|
1227
|
+
return Ht(e) ? Ve(e) : {};
|
|
1228
|
+
}
|
|
1229
|
+
function Ur(e, i, o) {
|
|
1230
|
+
var l = i(e);
|
|
1231
|
+
return Fe(e) ? l : ht(l, o(e));
|
|
1232
|
+
}
|
|
1233
|
+
function Wr(e) {
|
|
1234
|
+
return Kt.call(e);
|
|
1235
|
+
}
|
|
1236
|
+
function Gr(e) {
|
|
1237
|
+
if (!Ht(e) || rn(e))
|
|
1238
|
+
return !1;
|
|
1239
|
+
var i = je(e) || mt(e) ? K : Rt;
|
|
1240
|
+
return i.test(yt(e));
|
|
1241
|
+
}
|
|
1242
|
+
function Yr(e) {
|
|
1243
|
+
if (!nr(e))
|
|
1244
|
+
return qe(e);
|
|
1245
|
+
var i = [];
|
|
1246
|
+
for (var o in Object(e))
|
|
1247
|
+
At.call(e, o) && o != "constructor" && i.push(o);
|
|
1248
|
+
return i;
|
|
1249
|
+
}
|
|
1250
|
+
function _e(e, i) {
|
|
1251
|
+
if (i)
|
|
1252
|
+
return e.slice();
|
|
1253
|
+
var o = new e.constructor(e.length);
|
|
1254
|
+
return e.copy(o), o;
|
|
1255
|
+
}
|
|
1256
|
+
function Ce(e) {
|
|
1257
|
+
var i = new e.constructor(e.byteLength);
|
|
1258
|
+
return new Zt(i).set(new Zt(e)), i;
|
|
1259
|
+
}
|
|
1260
|
+
function re(e, i) {
|
|
1261
|
+
var o = i ? Ce(e.buffer) : e.buffer;
|
|
1262
|
+
return new e.constructor(o, e.byteOffset, e.byteLength);
|
|
1263
|
+
}
|
|
1264
|
+
function er(e, i, o) {
|
|
1265
|
+
var l = i ? o(R(e), !0) : R(e);
|
|
1266
|
+
return V(l, Mt, new e.constructor());
|
|
1267
|
+
}
|
|
1268
|
+
function rr(e) {
|
|
1269
|
+
var i = new e.constructor(e.source, Tt.exec(e));
|
|
1270
|
+
return i.lastIndex = e.lastIndex, i;
|
|
1271
|
+
}
|
|
1272
|
+
function Br(e, i, o) {
|
|
1273
|
+
var l = i ? o(L(e), !0) : L(e);
|
|
1274
|
+
return V(l, Q, new e.constructor());
|
|
1275
|
+
}
|
|
1276
|
+
function Kr(e) {
|
|
1277
|
+
return Ze ? Object(Ze.call(e)) : {};
|
|
1278
|
+
}
|
|
1279
|
+
function Xr(e, i) {
|
|
1280
|
+
var o = i ? Ce(e.buffer) : e.buffer;
|
|
1281
|
+
return new e.constructor(o, e.byteOffset, e.length);
|
|
1282
|
+
}
|
|
1283
|
+
function Vr(e, i) {
|
|
1284
|
+
var o = -1, l = e.length;
|
|
1285
|
+
for (i || (i = Array(l)); ++o < l; )
|
|
1286
|
+
i[o] = e[o];
|
|
1287
|
+
return i;
|
|
1288
|
+
}
|
|
1289
|
+
function Re(e, i, o, l) {
|
|
1290
|
+
o || (o = {});
|
|
1291
|
+
for (var z = -1, D = i.length; ++z < D; ) {
|
|
1292
|
+
var G = i[z], W = void 0;
|
|
1293
|
+
tr(o, G, W === void 0 ? e[G] : W);
|
|
1294
|
+
}
|
|
1295
|
+
return o;
|
|
1296
|
+
}
|
|
1297
|
+
function Jr(e, i) {
|
|
1298
|
+
return Re(e, Ut(e), i);
|
|
1299
|
+
}
|
|
1300
|
+
function qr(e) {
|
|
1301
|
+
return Ur(e, ze, Ut);
|
|
1302
|
+
}
|
|
1303
|
+
function ne(e, i) {
|
|
1304
|
+
var o = e.__data__;
|
|
1305
|
+
return en(i) ? o[typeof i == "string" ? "string" : "hash"] : o.map;
|
|
1306
|
+
}
|
|
1307
|
+
function Ct(e, i) {
|
|
1308
|
+
var o = xt(e, i);
|
|
1309
|
+
return Gr(o) ? o : void 0;
|
|
1310
|
+
}
|
|
1311
|
+
var Ut = Te ? N(Te, Object) : sn, Wt = Wr;
|
|
1312
|
+
(ye && Wt(new ye(new ArrayBuffer(1))) != I || Qt && Wt(new Qt()) != y || Pt && Wt(Pt.resolve()) != u || Ie && Wt(new Ie()) != g || Me && Wt(new Me()) != h) && (Wt = function(e) {
|
|
1313
|
+
var i = Kt.call(e), o = i == C ? e.constructor : void 0, l = o ? yt(o) : void 0;
|
|
1314
|
+
if (l)
|
|
1315
|
+
switch (l) {
|
|
1316
|
+
case Ee:
|
|
1317
|
+
return I;
|
|
1318
|
+
case ee:
|
|
1319
|
+
return y;
|
|
1320
|
+
case Ae:
|
|
1321
|
+
return u;
|
|
1322
|
+
case De:
|
|
1323
|
+
return g;
|
|
1324
|
+
case Oe:
|
|
1325
|
+
return h;
|
|
1326
|
+
}
|
|
1327
|
+
return i;
|
|
1328
|
+
});
|
|
1329
|
+
function Zr(e) {
|
|
1330
|
+
var i = e.length, o = e.constructor(i);
|
|
1331
|
+
return i && typeof e[0] == "string" && At.call(e, "index") && (o.index = e.index, o.input = e.input), o;
|
|
1332
|
+
}
|
|
1333
|
+
function Nt(e) {
|
|
1334
|
+
return typeof e.constructor == "function" && !nr(e) ? $r(ot(e)) : {};
|
|
1335
|
+
}
|
|
1336
|
+
function Qr(e, i, o, l) {
|
|
1337
|
+
var z = e.constructor;
|
|
1338
|
+
switch (i) {
|
|
1339
|
+
case v:
|
|
1340
|
+
return Ce(e);
|
|
1341
|
+
case p:
|
|
1342
|
+
case S:
|
|
1343
|
+
return new z(+e);
|
|
1344
|
+
case I:
|
|
1345
|
+
return re(e, l);
|
|
1346
|
+
case m:
|
|
1347
|
+
case P:
|
|
1348
|
+
case x:
|
|
1349
|
+
case E:
|
|
1350
|
+
case j:
|
|
1351
|
+
case H:
|
|
1352
|
+
case $:
|
|
1353
|
+
case O:
|
|
1354
|
+
case F:
|
|
1355
|
+
return Xr(e, l);
|
|
1356
|
+
case y:
|
|
1357
|
+
return er(e, l, o);
|
|
1358
|
+
case M:
|
|
1359
|
+
case b:
|
|
1360
|
+
return new z(e);
|
|
1361
|
+
case d:
|
|
1362
|
+
return rr(e);
|
|
1363
|
+
case g:
|
|
1364
|
+
return Br(e, l, o);
|
|
1365
|
+
case _:
|
|
1366
|
+
return Kr(e);
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
function tn(e, i) {
|
|
1370
|
+
return i = i ?? a, !!i && (typeof e == "number" || Ft.test(e)) && e > -1 && e % 1 == 0 && e < i;
|
|
1371
|
+
}
|
|
1372
|
+
function en(e) {
|
|
1373
|
+
var i = typeof e;
|
|
1374
|
+
return i == "string" || i == "number" || i == "symbol" || i == "boolean" ? e !== "__proto__" : e === null;
|
|
1375
|
+
}
|
|
1376
|
+
function rn(e) {
|
|
1377
|
+
return !!J && J in e;
|
|
1378
|
+
}
|
|
1379
|
+
function nr(e) {
|
|
1380
|
+
var i = e && e.constructor, o = typeof i == "function" && i.prototype || tt;
|
|
1381
|
+
return e === o;
|
|
1382
|
+
}
|
|
1383
|
+
function yt(e) {
|
|
1384
|
+
if (e != null) {
|
|
1385
|
+
try {
|
|
1386
|
+
return qt.call(e);
|
|
1387
|
+
} catch {
|
|
1388
|
+
}
|
|
1389
|
+
try {
|
|
1390
|
+
return e + "";
|
|
1391
|
+
} catch {
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
return "";
|
|
1395
|
+
}
|
|
1396
|
+
function sr(e) {
|
|
1397
|
+
return Pe(e, !0, !0);
|
|
1398
|
+
}
|
|
1399
|
+
function ir(e, i) {
|
|
1400
|
+
return e === i || e !== e && i !== i;
|
|
1401
|
+
}
|
|
1402
|
+
function ve(e) {
|
|
1403
|
+
return nn(e) && At.call(e, "callee") && (!Je.call(e, "callee") || Kt.call(e) == c);
|
|
1404
|
+
}
|
|
1405
|
+
var Fe = Array.isArray;
|
|
1406
|
+
function ke(e) {
|
|
1407
|
+
return e != null && or(e.length) && !je(e);
|
|
1408
|
+
}
|
|
1409
|
+
function nn(e) {
|
|
1410
|
+
return cr(e) && ke(e);
|
|
1411
|
+
}
|
|
1412
|
+
var ar = me || an;
|
|
1413
|
+
function je(e) {
|
|
1414
|
+
var i = Ht(e) ? Kt.call(e) : "";
|
|
1415
|
+
return i == k || i == T;
|
|
1416
|
+
}
|
|
1417
|
+
function or(e) {
|
|
1418
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= a;
|
|
1419
|
+
}
|
|
1420
|
+
function Ht(e) {
|
|
1421
|
+
var i = typeof e;
|
|
1422
|
+
return !!e && (i == "object" || i == "function");
|
|
1423
|
+
}
|
|
1424
|
+
function cr(e) {
|
|
1425
|
+
return !!e && typeof e == "object";
|
|
1426
|
+
}
|
|
1427
|
+
function ze(e) {
|
|
1428
|
+
return ke(e) ? ge(e) : Yr(e);
|
|
1429
|
+
}
|
|
1430
|
+
function sn() {
|
|
1431
|
+
return [];
|
|
1432
|
+
}
|
|
1433
|
+
function an() {
|
|
1434
|
+
return !1;
|
|
1435
|
+
}
|
|
1436
|
+
t.exports = sr;
|
|
1437
|
+
})(hr, hr.exports);
|
|
1438
|
+
var ui = hr.exports;
|
|
1439
|
+
const B = /* @__PURE__ */ En(ui), gn = (t) => new Promise((r, n) => {
|
|
1440
|
+
const s = new Image();
|
|
1441
|
+
console.warn("update cdn config for cors?"), s.onload = () => {
|
|
1442
|
+
const a = s.width, c = s.height;
|
|
1443
|
+
r({ width: a, height: c });
|
|
1444
|
+
}, s.onerror = (a) => {
|
|
1445
|
+
n(a);
|
|
1446
|
+
}, s.crossOrigin = "anonymous", s.src = t;
|
|
1447
|
+
}), os = (t) => new Promise((r, n) => {
|
|
1448
|
+
const s = new Audio();
|
|
1449
|
+
s.preload = "auto", s.addEventListener("loadedmetadata", () => {
|
|
1450
|
+
const a = s.duration * 1e3;
|
|
1451
|
+
r({ duration: a });
|
|
1452
|
+
}), s.addEventListener("error", (a) => {
|
|
1453
|
+
n(a);
|
|
1454
|
+
}), s.src = t, s.crossOrigin = "anonymous", s.load();
|
|
1455
|
+
}), bn = (t) => new Promise((r, n) => {
|
|
1456
|
+
const s = document.createElement("video");
|
|
1457
|
+
s.preload = "auto", s.addEventListener("loadedmetadata", () => {
|
|
1458
|
+
const a = s.duration * 1e3, c = s.videoWidth, f = s.videoHeight;
|
|
1459
|
+
r({ duration: a, width: c, height: f });
|
|
1460
|
+
}), s.addEventListener("error", (a) => {
|
|
1461
|
+
n(a);
|
|
1462
|
+
}), s.src = t, s.load();
|
|
1463
|
+
}), li = async (t) => {
|
|
1464
|
+
var a, c;
|
|
1465
|
+
const r = t.duration, n = (a = t.details) == null ? void 0 : a.width, s = (c = t.details) == null ? void 0 : c.height;
|
|
1466
|
+
return r && n && s ? { duration: r, width: n, height: s } : bn(t.details.src);
|
|
1467
|
+
}, cs = (t, r) => {
|
|
1468
|
+
const n = document.createElement("div");
|
|
1469
|
+
Object.keys(r).forEach((a) => {
|
|
1470
|
+
a !== "height" && (n.style[a] = r[a]);
|
|
1471
|
+
}), document.body.appendChild(n), n.textContent = t, n.style.whiteSpace = "normal", n.style.position = "absolute", n.style.visibility = "hidden", n.style.display = "inline-block", n.style.width = r.width + "px", n.style.fontSize = r.fontSize + "px";
|
|
1472
|
+
const s = getComputedStyle(n).height;
|
|
1473
|
+
return document.body.removeChild(n), parseFloat(s);
|
|
1474
|
+
}, mr = (t) => {
|
|
1475
|
+
const r = t.map((n) => new FontFace(n.fontFamily, `url(${n.url})`).load().catch((s) => s));
|
|
1476
|
+
return r.length === 0 ? Promise.resolve(!0) : new Promise((n, s) => {
|
|
1477
|
+
Promise.all(r).then((a) => {
|
|
1478
|
+
a.forEach((c) => {
|
|
1479
|
+
c && c.family && (document.fonts.add(c), n(!0));
|
|
1480
|
+
});
|
|
1481
|
+
}).catch((a) => s(a));
|
|
1482
|
+
});
|
|
1483
|
+
}, di = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
1484
|
+
let Ne = (t = 21) => {
|
|
1485
|
+
let r = "", n = crypto.getRandomValues(new Uint8Array(t));
|
|
1486
|
+
for (; t--; )
|
|
1487
|
+
r += di[n[t] & 63];
|
|
1488
|
+
return r;
|
|
1489
|
+
};
|
|
1490
|
+
function Se(t = 16) {
|
|
1491
|
+
const r = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", n = r.charAt(Math.floor(Math.random() * r.length));
|
|
1492
|
+
let s = Ne(t - 1);
|
|
1493
|
+
return s = s.replace(/[^a-zA-Z0-9]/g, "").slice(0, t - 1), n + s;
|
|
1494
|
+
}
|
|
1495
|
+
const _r = {
|
|
1496
|
+
color: "#000000",
|
|
1497
|
+
x: 0,
|
|
1498
|
+
y: 0,
|
|
1499
|
+
blur: 0
|
|
1500
|
+
}, Ye = (t, r) => {
|
|
1501
|
+
let n = r != null && r.trim ? r.trim.to - r.trim.from : (r == null ? void 0 : r.duration) || 5e3;
|
|
1502
|
+
const s = {
|
|
1503
|
+
from: 0,
|
|
1504
|
+
to: n
|
|
1505
|
+
};
|
|
1506
|
+
if (!t)
|
|
1507
|
+
return s;
|
|
1508
|
+
if (t.from < 0)
|
|
1509
|
+
return console.error(
|
|
1510
|
+
"'from' must be a non-negative number. Returning default display."
|
|
1511
|
+
), s;
|
|
1512
|
+
if (t.from !== void 0 && t.to === void 0)
|
|
1513
|
+
return {
|
|
1514
|
+
from: t.from,
|
|
1515
|
+
to: t.from + n
|
|
1516
|
+
};
|
|
1517
|
+
if (t.to !== void 0) {
|
|
1518
|
+
if (t.to < 0)
|
|
1519
|
+
return console.error(
|
|
1520
|
+
"'to' must be a non-negative number. Returning default display."
|
|
1521
|
+
), s;
|
|
1522
|
+
if (t.to < t.from)
|
|
1523
|
+
return console.error(
|
|
1524
|
+
"'to' must be greater than or equal to 'from'. Returning default display."
|
|
1525
|
+
), s;
|
|
1526
|
+
}
|
|
1527
|
+
return t;
|
|
1528
|
+
}, us = (t, r) => t ? t.from && !t.to ? {
|
|
1529
|
+
from: t.from,
|
|
1530
|
+
to: r.duration
|
|
1531
|
+
} : t : {
|
|
1532
|
+
from: 0,
|
|
1533
|
+
to: r.duration
|
|
1534
|
+
};
|
|
1535
|
+
function Be(t, r) {
|
|
1536
|
+
const n = t.scaleMode, s = {
|
|
1537
|
+
x: t.size.width / 2,
|
|
1538
|
+
y: t.size.height / 2
|
|
1539
|
+
}, a = { x: r.width / 2, y: r.height / 2 };
|
|
1540
|
+
let c;
|
|
1541
|
+
n === "fill" ? c = Math.max(
|
|
1542
|
+
t.size.width / r.width,
|
|
1543
|
+
t.size.height / r.height
|
|
1544
|
+
) : c = Math.min(
|
|
1545
|
+
t.size.width / r.width,
|
|
1546
|
+
t.size.height / r.height
|
|
1547
|
+
);
|
|
1548
|
+
const f = s.x - a.x;
|
|
1549
|
+
return {
|
|
1550
|
+
top: `${s.y - a.y}px`,
|
|
1551
|
+
left: `${f}px`,
|
|
1552
|
+
transform: `scale(${c})`
|
|
1553
|
+
};
|
|
1554
|
+
}
|
|
1555
|
+
const ls = async (t, r) => {
|
|
1556
|
+
const n = t.details.src, s = await li(t), a = Be(r, {
|
|
1557
|
+
...s
|
|
1558
|
+
}), c = us(t.trim, { duration: s.duration }), f = {
|
|
1559
|
+
width: s.width,
|
|
1560
|
+
height: s.height,
|
|
1561
|
+
opacity: 100,
|
|
1562
|
+
src: n,
|
|
1563
|
+
volume: t.details.volume ?? 100,
|
|
1564
|
+
// Default volume
|
|
1565
|
+
borderRadius: t.details.borderRadius ?? 0,
|
|
1566
|
+
// Default border radius
|
|
1567
|
+
borderWidth: t.details.borderWidth ?? 0,
|
|
1568
|
+
// Default border width
|
|
1569
|
+
borderColor: t.details.borderColor || "#000000",
|
|
1570
|
+
// Default border color
|
|
1571
|
+
boxShadow: t.details.boxShadow || _r,
|
|
1572
|
+
top: t.details.top || a.top || "0px",
|
|
1573
|
+
// Default top
|
|
1574
|
+
left: t.details.left || a.left || "0px",
|
|
1575
|
+
// Default left
|
|
1576
|
+
transform: t.details.transform || a.transform,
|
|
1577
|
+
// Default transform
|
|
1578
|
+
blur: t.details.blur || 0,
|
|
1579
|
+
brightness: t.details.brightness || 100,
|
|
1580
|
+
flipX: t.details.flipX || !1,
|
|
1581
|
+
flipY: t.details.flipY || !1,
|
|
1582
|
+
rotate: t.details.rotate || "0deg",
|
|
1583
|
+
visibility: t.details.visibility || "visible"
|
|
1584
|
+
};
|
|
1585
|
+
return {
|
|
1586
|
+
...t,
|
|
1587
|
+
trim: c,
|
|
1588
|
+
type: "video",
|
|
1589
|
+
name: "video",
|
|
1590
|
+
details: f,
|
|
1591
|
+
playbackRate: t.playbackRate || 1,
|
|
1592
|
+
display: Ye(t.display, { duration: s.duration, trim: c }),
|
|
1593
|
+
duration: s.duration
|
|
1594
|
+
};
|
|
1595
|
+
}, ds = async (t) => {
|
|
1596
|
+
const r = t.id, n = t.details, a = (await os(n.src)).duration, c = us(t.trim, { duration: a });
|
|
1597
|
+
return {
|
|
1598
|
+
id: r,
|
|
1599
|
+
name: t.name || "audio",
|
|
1600
|
+
type: "audio",
|
|
1601
|
+
display: Ye(t.display, { duration: a, trim: c }),
|
|
1602
|
+
trim: c,
|
|
1603
|
+
playbackRate: t.playbackRate || 1,
|
|
1604
|
+
details: {
|
|
1605
|
+
src: n.src,
|
|
1606
|
+
volume: n.volume ?? 100
|
|
1607
|
+
// Default volume
|
|
1608
|
+
},
|
|
1609
|
+
metadata: { ...t.metadata },
|
|
1610
|
+
duration: a
|
|
1611
|
+
};
|
|
1612
|
+
}, fs = async (t, r) => {
|
|
1613
|
+
var T;
|
|
1614
|
+
const n = t.trackItemIds, s = t.size || {
|
|
1615
|
+
width: t.details.width,
|
|
1616
|
+
height: t.details.height
|
|
1617
|
+
}, a = Math.min(
|
|
1618
|
+
r.size.width / s.width,
|
|
1619
|
+
r.size.height / s.height
|
|
1620
|
+
), c = ((T = t.details) == null ? void 0 : T.rotate) || 0, f = Be(r, s), p = t.display;
|
|
1621
|
+
let S = 1 / 0, A = 0;
|
|
1622
|
+
n.forEach((y) => {
|
|
1623
|
+
const M = t.trackItemsMap[y];
|
|
1624
|
+
M.display.from < S && (S = M.display.from), M.display.to > A && (A = M.display.to);
|
|
1625
|
+
});
|
|
1626
|
+
const k = t.trim || t.display || { from: S, to: A };
|
|
1627
|
+
return {
|
|
1628
|
+
id: t.id,
|
|
1629
|
+
type: "template",
|
|
1630
|
+
details: {
|
|
1631
|
+
...s,
|
|
1632
|
+
top: t.details.top || f.top,
|
|
1633
|
+
left: t.details.left || f.left,
|
|
1634
|
+
scale: a,
|
|
1635
|
+
rotate: c
|
|
1636
|
+
},
|
|
1637
|
+
trim: k,
|
|
1638
|
+
display: p || { from: S, to: A },
|
|
1639
|
+
activeEdit: !1
|
|
1640
|
+
};
|
|
1641
|
+
}, ps = async (t, r) => {
|
|
1642
|
+
const n = t.details, s = await gn(n.src), a = Be(r, s);
|
|
1643
|
+
return {
|
|
1644
|
+
id: t.id,
|
|
1645
|
+
type: "image",
|
|
1646
|
+
name: "image",
|
|
1647
|
+
display: Ye(t.display),
|
|
1648
|
+
playbackRate: t.playbackRate || 1,
|
|
1649
|
+
details: {
|
|
1650
|
+
src: n.src || "",
|
|
1651
|
+
// Default source URL
|
|
1652
|
+
width: n.width || s.width || 100,
|
|
1653
|
+
// Default width
|
|
1654
|
+
height: n.height || s.height || 100,
|
|
1655
|
+
// Default height
|
|
1656
|
+
opacity: n.opacity ?? 100,
|
|
1657
|
+
// Default opacity
|
|
1658
|
+
transform: n.transform || a.transform,
|
|
1659
|
+
// Default transform
|
|
1660
|
+
border: n.border || "none",
|
|
1661
|
+
// Default border
|
|
1662
|
+
borderRadius: n.borderRadius || 0,
|
|
1663
|
+
// Default border radius
|
|
1664
|
+
boxShadow: n.boxShadow || _r,
|
|
1665
|
+
// Default box shadow
|
|
1666
|
+
top: n.top || a.top || "0px",
|
|
1667
|
+
// Default top
|
|
1668
|
+
left: n.left || a.left || "0px",
|
|
1669
|
+
// Default left
|
|
1670
|
+
borderWidth: n.borderWidth ?? 0,
|
|
1671
|
+
// Default border width
|
|
1672
|
+
borderColor: n.borderColor || "#000000",
|
|
1673
|
+
// Default border color
|
|
1674
|
+
blur: n.blur || 0,
|
|
1675
|
+
brightness: n.brightness || 100,
|
|
1676
|
+
flipX: n.flipX || !1,
|
|
1677
|
+
flipY: n.flipY || !1,
|
|
1678
|
+
rotate: n.rotate || "0deg",
|
|
1679
|
+
visibility: n.visibility || "visible"
|
|
1680
|
+
},
|
|
1681
|
+
metadata: t.metadata || {}
|
|
1682
|
+
};
|
|
1683
|
+
}, hs = async (t, r) => {
|
|
1684
|
+
const n = t;
|
|
1685
|
+
n.details.fontUrl && await mr([
|
|
1686
|
+
{
|
|
1687
|
+
fontFamily: n.details.fontFamily,
|
|
1688
|
+
url: n.details.fontUrl
|
|
1689
|
+
}
|
|
1690
|
+
]);
|
|
1691
|
+
const s = n.id, a = n.details, c = ys(a), f = cs(n.details.text, c), p = Be(r, {
|
|
1692
|
+
width: c.width,
|
|
1693
|
+
height: f
|
|
1694
|
+
});
|
|
1695
|
+
return {
|
|
1696
|
+
id: s,
|
|
1697
|
+
name: "caption",
|
|
1698
|
+
type: "caption",
|
|
1699
|
+
display: Ye(n.display),
|
|
1700
|
+
details: {
|
|
1701
|
+
...c,
|
|
1702
|
+
text: a.text || "",
|
|
1703
|
+
// Default text content
|
|
1704
|
+
height: f,
|
|
1705
|
+
// Default height
|
|
1706
|
+
fontUrl: a.fontUrl,
|
|
1707
|
+
top: c.top || p.top,
|
|
1708
|
+
left: c.left || p.left,
|
|
1709
|
+
borderWidth: a.borderWidth || 0,
|
|
1710
|
+
borderColor: a.borderColor || "#000000",
|
|
1711
|
+
boxShadow: a.boxShadow || _r,
|
|
1712
|
+
words: a.words || [],
|
|
1713
|
+
appearedColor: a.appearedColor || a.color,
|
|
1714
|
+
activeColor: a.activeColor || a.color,
|
|
1715
|
+
activeFillColor: a.activeFillColor || "transparent"
|
|
1716
|
+
},
|
|
1717
|
+
metadata: t.metadata || {}
|
|
1718
|
+
};
|
|
1719
|
+
}, ms = async (t, r) => {
|
|
1720
|
+
t.details.fontUrl && await mr([
|
|
1721
|
+
{
|
|
1722
|
+
fontFamily: t.details.fontFamily,
|
|
1723
|
+
url: t.details.fontUrl
|
|
1724
|
+
}
|
|
1725
|
+
]);
|
|
1726
|
+
const n = t.id, s = t.details, a = ys(s), c = cs(t.details.text, a), f = Be(r, {
|
|
1727
|
+
width: a.width,
|
|
1728
|
+
height: c
|
|
1729
|
+
});
|
|
1730
|
+
return {
|
|
1731
|
+
id: n,
|
|
1732
|
+
name: "text",
|
|
1733
|
+
type: "text",
|
|
1734
|
+
display: Ye(t.display),
|
|
1735
|
+
details: {
|
|
1736
|
+
...a,
|
|
1737
|
+
text: s.text || "",
|
|
1738
|
+
// Default text content
|
|
1739
|
+
height: c,
|
|
1740
|
+
// Default height
|
|
1741
|
+
fontUrl: s.fontUrl,
|
|
1742
|
+
top: a.top || f.top,
|
|
1743
|
+
left: a.left || f.left,
|
|
1744
|
+
borderWidth: s.borderWidth || 0,
|
|
1745
|
+
borderColor: s.borderColor || "#000000",
|
|
1746
|
+
boxShadow: s.boxShadow || _r
|
|
1747
|
+
},
|
|
1748
|
+
metadata: {}
|
|
1749
|
+
};
|
|
1750
|
+
}, ys = (t) => ({
|
|
1751
|
+
fontFamily: t.fontFamily || "Arial",
|
|
1752
|
+
// Default font family
|
|
1753
|
+
fontSize: t.fontSize || "16px",
|
|
1754
|
+
// Default font size
|
|
1755
|
+
fontWeight: t.fontWeight || "normal",
|
|
1756
|
+
// Default font weight
|
|
1757
|
+
fontStyle: t.fontStyle || "normal",
|
|
1758
|
+
// Default font style
|
|
1759
|
+
textDecoration: t.textDecoration || "none",
|
|
1760
|
+
// Default text decoration
|
|
1761
|
+
textAlign: t.textAlign || "left",
|
|
1762
|
+
// Default text alignment
|
|
1763
|
+
lineHeight: t.lineHeight || "normal",
|
|
1764
|
+
// Default line height
|
|
1765
|
+
letterSpacing: t.letterSpacing || "normal",
|
|
1766
|
+
// Default letter spacing
|
|
1767
|
+
wordSpacing: t.wordSpacing || "normal",
|
|
1768
|
+
// Default word spacing
|
|
1769
|
+
color: t.color || "#ffffff",
|
|
1770
|
+
// Default text color (black)
|
|
1771
|
+
backgroundColor: t.backgroundColor || "transparent",
|
|
1772
|
+
// Default background color
|
|
1773
|
+
border: t.border || "none",
|
|
1774
|
+
// Default border
|
|
1775
|
+
textShadow: t.textShadow || "none",
|
|
1776
|
+
// Default text shadow
|
|
1777
|
+
text: t.text || "",
|
|
1778
|
+
// Default text content
|
|
1779
|
+
opacity: t.opacity ?? 100,
|
|
1780
|
+
// Default opacity
|
|
1781
|
+
width: t.width || 300,
|
|
1782
|
+
wordWrap: t.wordWrap || "normal",
|
|
1783
|
+
//'break-word'
|
|
1784
|
+
wordBreak: t.wordBreak || "normal",
|
|
1785
|
+
//'break-all',
|
|
1786
|
+
WebkitTextStrokeColor: t.WebkitTextStrokeColor || "#ffffff",
|
|
1787
|
+
WebkitTextStrokeWidth: t.WebkitTextStrokeWidth || "0px",
|
|
1788
|
+
top: t.top,
|
|
1789
|
+
left: t.left,
|
|
1790
|
+
textTransform: t.textTransform || "none",
|
|
1791
|
+
transform: t.transform || "none",
|
|
1792
|
+
skewX: t.skewX || 0,
|
|
1793
|
+
skewY: t.skewY || 0
|
|
1794
|
+
}), fi = async (t, r) => {
|
|
1795
|
+
switch (t.type) {
|
|
1796
|
+
case "video":
|
|
1797
|
+
return ls(t, r || {});
|
|
1798
|
+
case "audio":
|
|
1799
|
+
return ds(t);
|
|
1800
|
+
case "image":
|
|
1801
|
+
return ps(t, r || {});
|
|
1802
|
+
case "text":
|
|
1803
|
+
return ms(t, r || {});
|
|
1804
|
+
case "caption":
|
|
1805
|
+
return hs(t, r || {});
|
|
1806
|
+
case "template":
|
|
1807
|
+
return fs(t, {
|
|
1808
|
+
size: r == null ? void 0 : r.size
|
|
1809
|
+
});
|
|
1810
|
+
default:
|
|
1811
|
+
throw new Error("Unsupported track item");
|
|
1812
|
+
}
|
|
1813
|
+
};
|
|
1814
|
+
function pi(t, r) {
|
|
1815
|
+
return r.some(
|
|
1816
|
+
(n) => t.some((s) => s.id === n.id)
|
|
1817
|
+
);
|
|
1818
|
+
}
|
|
1819
|
+
const hi = (t = [], r = []) => t.length === 0 ? r.map((s) => ({
|
|
1820
|
+
id: Se(),
|
|
1821
|
+
items: [s.id],
|
|
1822
|
+
type: s.type,
|
|
1823
|
+
accepts: ["text", "image", "video", "audio", "caption", "template"]
|
|
1824
|
+
})) : t.map((n) => ({
|
|
1825
|
+
...n,
|
|
1826
|
+
items: n.items || [],
|
|
1827
|
+
accepts: ["audio", "video", "image", "text", "caption", "template"],
|
|
1828
|
+
type: n.type || "text",
|
|
1829
|
+
magnetic: n.magnetic || !1,
|
|
1830
|
+
static: n.static || !1,
|
|
1831
|
+
id: n.id || Se()
|
|
1832
|
+
}));
|
|
1833
|
+
function mi(t, r) {
|
|
1834
|
+
return t.filter((s) => {
|
|
1835
|
+
if (r.forEach((a) => {
|
|
1836
|
+
s.items.includes(a) && (s.items = s.items.filter((c) => c !== a));
|
|
1837
|
+
}), s.items.length !== 0 || s.static)
|
|
1838
|
+
return s;
|
|
1839
|
+
});
|
|
1840
|
+
}
|
|
1841
|
+
const ue = (t) => Object.keys(t).reduce((r, n) => {
|
|
1842
|
+
const { display: s, playbackRate: a } = t[n];
|
|
1843
|
+
return Math.max(r, s.to / (a || 1));
|
|
1844
|
+
}, 0);
|
|
1845
|
+
function _n(t, r, n) {
|
|
1846
|
+
return Math.min(Math.max(t, r), n);
|
|
1847
|
+
}
|
|
1848
|
+
const yi = (t, r, n, s, a) => {
|
|
1849
|
+
if (s === void 0 && a === void 0)
|
|
1850
|
+
return { trackId: void 0, trackIndex: void 0 };
|
|
1851
|
+
const c = a !== void 0 ? r[_n(a, 0, r.length)] : r.find((S) => S.id === s);
|
|
1852
|
+
if (!c)
|
|
1853
|
+
return {
|
|
1854
|
+
trackId: void 0,
|
|
1855
|
+
trackIndex: a !== void 0 ? _n(a, 0, r.length) : void 0
|
|
1856
|
+
};
|
|
1857
|
+
const f = c.items.map((S) => n[S]), p = t.map((S) => n[S]);
|
|
1858
|
+
for (const S of f) {
|
|
1859
|
+
const A = S.display.from, k = S.display.to;
|
|
1860
|
+
for (const T of p) {
|
|
1861
|
+
const y = T.display.from;
|
|
1862
|
+
if (!(T.display.to <= A || y >= k))
|
|
1863
|
+
return {
|
|
1864
|
+
trackId: void 0,
|
|
1865
|
+
trackIndex: r.indexOf(c)
|
|
1866
|
+
};
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
return {
|
|
1870
|
+
trackId: c.id,
|
|
1871
|
+
trackIndex: r.indexOf(c)
|
|
1872
|
+
};
|
|
1873
|
+
}, $n = (t, r) => {
|
|
1874
|
+
var p, S;
|
|
1875
|
+
const n = ((p = t.details.crop) == null ? void 0 : p.width) || t.details.width || 0, s = ((S = t.details.crop) == null ? void 0 : S.height) || t.details.height || 0;
|
|
1876
|
+
let a = r.width, c = r.height;
|
|
1877
|
+
const f = r.width / r.height;
|
|
1878
|
+
return n / s > f ? (a = n, c = n / f) : (c = s, a = s * f), {
|
|
1879
|
+
newWidth: a,
|
|
1880
|
+
newHeight: c,
|
|
1881
|
+
crop: {
|
|
1882
|
+
x: 0,
|
|
1883
|
+
y: 0,
|
|
1884
|
+
height: s,
|
|
1885
|
+
width: n
|
|
1886
|
+
}
|
|
1887
|
+
};
|
|
1888
|
+
}, Un = (t, r) => {
|
|
1889
|
+
const n = B(t.trim), s = B(t.display);
|
|
1890
|
+
return r.duration < t.display.to && (s.to = r.duration, n && (n.to = r.duration)), {
|
|
1891
|
+
duration: r.duration,
|
|
1892
|
+
trim: n,
|
|
1893
|
+
display: s
|
|
1894
|
+
};
|
|
1895
|
+
}, Ii = (t) => {
|
|
1896
|
+
const { trackItemIds: r, transitionsMap: n, trackItemsMap: s } = t, a = /* @__PURE__ */ new Map();
|
|
1897
|
+
Object.values(n).forEach((A) => {
|
|
1898
|
+
var M, C;
|
|
1899
|
+
const { fromId: k, toId: T, kind: y } = A;
|
|
1900
|
+
y !== "none" && (a.has(k) || a.set(k, []), a.has(T) || a.set(T, []), (M = a.get(k)) == null || M.push(A), (C = a.get(T)) == null || C.push(A));
|
|
1901
|
+
});
|
|
1902
|
+
const c = [], f = /* @__PURE__ */ new Set(), p = (A) => {
|
|
1903
|
+
const k = [];
|
|
1904
|
+
let T = A;
|
|
1905
|
+
for (; T && !f.has(T); ) {
|
|
1906
|
+
f.add(T);
|
|
1907
|
+
const y = s[T];
|
|
1908
|
+
k.push(y);
|
|
1909
|
+
const M = Object.values(n).find(
|
|
1910
|
+
(C) => C.fromId === T && C.kind !== "none"
|
|
1911
|
+
// Filter here
|
|
1912
|
+
);
|
|
1913
|
+
if (!M) break;
|
|
1914
|
+
k.push(M), T = M.toId;
|
|
1915
|
+
}
|
|
1916
|
+
return k;
|
|
1917
|
+
}, S = Object.values(n).filter(
|
|
1918
|
+
(A) => A.kind !== "none"
|
|
1919
|
+
);
|
|
1920
|
+
for (const A of r)
|
|
1921
|
+
if (!f.has(A) && (!a.has(A) || !S.some((k) => k.toId === A))) {
|
|
1922
|
+
const k = p(A);
|
|
1923
|
+
k.length > 0 && c.push(k);
|
|
1924
|
+
}
|
|
1925
|
+
return c.forEach((A) => {
|
|
1926
|
+
A.sort((k, T) => "display" in k && "display" in T ? k.display.from - T.display.from : 0);
|
|
1927
|
+
}), c.filter((A) => A.filter((T) => T !== void 0).length > 0);
|
|
1928
|
+
};
|
|
1929
|
+
function gi(t, r) {
|
|
1930
|
+
let s = r.reduce(
|
|
1931
|
+
(a, c) => c.display.to > a.display.to ? c : a,
|
|
1932
|
+
{ display: { to: 0 } }
|
|
1933
|
+
).display.to;
|
|
1934
|
+
t.forEach((a) => {
|
|
1935
|
+
const c = a.display.from, p = a.display.to - c;
|
|
1936
|
+
a.display.from = s, a.display.to = a.display.from + p, s = a.display.to;
|
|
1937
|
+
});
|
|
1938
|
+
}
|
|
1939
|
+
function bi(t) {
|
|
1940
|
+
const r = t, n = r.tracks, s = r.trackItemsMap, a = [], c = {}, f = r.structure;
|
|
1941
|
+
return n.forEach((p) => {
|
|
1942
|
+
var A;
|
|
1943
|
+
const S = p.items.map((k) => s[k]).sort((k, T) => k.display.from - T.display.from);
|
|
1944
|
+
for (let k = 0; k < S.length - 1; k++) {
|
|
1945
|
+
const T = S[k], y = S[k + 1];
|
|
1946
|
+
if (Math.abs(T.display.to - y.display.from) <= 1) {
|
|
1947
|
+
const M = `${T.id}-${y.id}`;
|
|
1948
|
+
if ((A = r.transitionIds) == null ? void 0 : A.includes(M))
|
|
1949
|
+
c[M] = r.transitionsMap[M];
|
|
1950
|
+
else {
|
|
1951
|
+
const u = {
|
|
1952
|
+
id: M,
|
|
1953
|
+
duration: 1500,
|
|
1954
|
+
fromId: T.id,
|
|
1955
|
+
toId: y.id,
|
|
1956
|
+
kind: "none",
|
|
1957
|
+
trackId: p.id,
|
|
1958
|
+
type: "transition"
|
|
1959
|
+
};
|
|
1960
|
+
c[M] = u;
|
|
1961
|
+
}
|
|
1962
|
+
a.push(M);
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
}), f.forEach((p) => {
|
|
1966
|
+
p.transitions.forEach((S) => {
|
|
1967
|
+
c[S] = {
|
|
1968
|
+
...r.transitionsMap[S],
|
|
1969
|
+
trackId: p.id
|
|
1970
|
+
};
|
|
1971
|
+
});
|
|
1972
|
+
}), r.transitionIds = a, r.transitionsMap = c, {
|
|
1973
|
+
transitionIds: a,
|
|
1974
|
+
transitionsMap: c
|
|
1975
|
+
};
|
|
1976
|
+
}
|
|
1977
|
+
function _i(t) {
|
|
1978
|
+
const r = ae.pipe(
|
|
1979
|
+
oe(({ key: u }) => u.startsWith(An))
|
|
1980
|
+
), n = ae.pipe(
|
|
1981
|
+
oe(({ key: u }) => u.startsWith(Ot))
|
|
1982
|
+
), s = ae.pipe(
|
|
1983
|
+
oe(({ key: u }) => u.startsWith(dt))
|
|
1984
|
+
), a = ae.pipe(
|
|
1985
|
+
oe(({ key: u }) => u.startsWith(br))
|
|
1986
|
+
), c = ae.pipe(
|
|
1987
|
+
oe(({ key: u }) => u.startsWith(we))
|
|
1988
|
+
), f = ae.pipe(
|
|
1989
|
+
oe(({ key: u }) => u.startsWith(he))
|
|
1990
|
+
), p = ae.pipe(
|
|
1991
|
+
oe(({ key: u }) => u.startsWith(as))
|
|
1992
|
+
), S = r.subscribe(async (u) => {
|
|
1993
|
+
var d, g;
|
|
1994
|
+
if (u.key === Us) {
|
|
1995
|
+
const b = (d = u.value) == null ? void 0 : d.payload, _ = b.trackItemsMap, h = b.trackItemDetailsMap;
|
|
1996
|
+
console.warn("IMPROVE FONTS LOADING");
|
|
1997
|
+
for (const I in h)
|
|
1998
|
+
if (h[I].type === "text" || h[I].type === "caption") {
|
|
1999
|
+
const m = h[I].details;
|
|
2000
|
+
await mr([
|
|
2001
|
+
{
|
|
2002
|
+
fontFamily: m.fontFamily,
|
|
2003
|
+
url: m.fontUrl
|
|
2004
|
+
}
|
|
2005
|
+
]);
|
|
2006
|
+
}
|
|
2007
|
+
const v = ue(_);
|
|
2008
|
+
t.updateState(
|
|
2009
|
+
{
|
|
2010
|
+
...b,
|
|
2011
|
+
duration: v
|
|
2012
|
+
},
|
|
2013
|
+
{
|
|
2014
|
+
kind: "design:load",
|
|
2015
|
+
updateHistory: !1
|
|
2016
|
+
}
|
|
2017
|
+
);
|
|
2018
|
+
}
|
|
2019
|
+
if (u.key === Ws) {
|
|
2020
|
+
const b = (g = u.value) == null ? void 0 : g.payload;
|
|
2021
|
+
t.updateState(
|
|
2022
|
+
{
|
|
2023
|
+
size: b
|
|
2024
|
+
},
|
|
2025
|
+
{
|
|
2026
|
+
kind: "design:resize",
|
|
2027
|
+
updateHistory: !1
|
|
2028
|
+
}
|
|
2029
|
+
);
|
|
2030
|
+
}
|
|
2031
|
+
}), A = a.subscribe((u) => {
|
|
2032
|
+
if (u.key === ai) return t.undo();
|
|
2033
|
+
if (u.key === oi) return t.redo();
|
|
2034
|
+
}), k = p.subscribe((u) => {
|
|
2035
|
+
var d;
|
|
2036
|
+
if (u.key === ci) {
|
|
2037
|
+
const g = (d = u.value) == null ? void 0 : d.payload.scale;
|
|
2038
|
+
t.updateState(
|
|
2039
|
+
{
|
|
2040
|
+
scale: g
|
|
2041
|
+
},
|
|
2042
|
+
{
|
|
2043
|
+
kind: "update",
|
|
2044
|
+
updateHistory: !1
|
|
2045
|
+
}
|
|
2046
|
+
);
|
|
2047
|
+
}
|
|
2048
|
+
}), T = s.subscribe(async (u) => {
|
|
2049
|
+
var g, b, _, h, v;
|
|
2050
|
+
const d = [];
|
|
2051
|
+
if ((g = u.value) != null && g.payload.trackItemIds && (d.push((b = u.value) == null ? void 0 : b.payload.trackItemIds), t.updateState(
|
|
2052
|
+
{ activeIds: d },
|
|
2053
|
+
{
|
|
2054
|
+
kind: "update",
|
|
2055
|
+
updateHistory: !1
|
|
2056
|
+
}
|
|
2057
|
+
)), u.key === si) {
|
|
2058
|
+
const I = (_ = u.value) == null ? void 0 : _.payload.trackItemIds, m = B(t.getState()), P = I && I.length ? I : m.activeIds, x = P.map((w) => m.transitionsMap[w]).filter((w) => !!w).map((w) => w.id), E = P.map((w) => m.trackItemsMap[w]).filter((w) => !!w).map((w) => w.id), j = m.transitionIds.filter(
|
|
2059
|
+
(w) => {
|
|
2060
|
+
const Z = m.transitionsMap[w];
|
|
2061
|
+
return E.includes(Z.fromId) || E.includes(Z.toId);
|
|
2062
|
+
}
|
|
2063
|
+
);
|
|
2064
|
+
E.push(...j, ...x);
|
|
2065
|
+
const H = m.trackItemIds, $ = m.transitionIds, O = m.trackItemDetailsMap, F = B(m.tracks), X = B(m.structure);
|
|
2066
|
+
E.forEach((w) => {
|
|
2067
|
+
var Mt;
|
|
2068
|
+
const Z = m.trackItemsMap[w] || m.transitionsMap[w];
|
|
2069
|
+
if (Z.type === "template") {
|
|
2070
|
+
const Q = (Mt = m.structure.find(
|
|
2071
|
+
(ht) => ht.id === Z.id
|
|
2072
|
+
)) == null ? void 0 : Mt.items;
|
|
2073
|
+
E.push(...Q);
|
|
2074
|
+
const bt = X.findIndex(
|
|
2075
|
+
(ht) => ht.id === Z.id
|
|
2076
|
+
);
|
|
2077
|
+
X.splice(bt, 1);
|
|
2078
|
+
}
|
|
2079
|
+
}), E.forEach((w) => {
|
|
2080
|
+
X.forEach((Z) => {
|
|
2081
|
+
Z.items.includes(w) && (Z.items = Z.items.filter((Mt) => Mt !== w));
|
|
2082
|
+
});
|
|
2083
|
+
});
|
|
2084
|
+
const Tt = H.filter(
|
|
2085
|
+
(w) => !E.includes(w)
|
|
2086
|
+
), Rt = $.filter(
|
|
2087
|
+
(w) => !E.includes(w)
|
|
2088
|
+
), Ft = Object.fromEntries(
|
|
2089
|
+
Object.entries(O).filter(
|
|
2090
|
+
([w]) => !E.includes(w)
|
|
2091
|
+
)
|
|
2092
|
+
), U = Object.fromEntries(
|
|
2093
|
+
Object.entries(m.transitionsMap).filter(
|
|
2094
|
+
([w]) => !E.includes(w)
|
|
2095
|
+
)
|
|
2096
|
+
), Bt = mi(
|
|
2097
|
+
m.tracks,
|
|
2098
|
+
E
|
|
2099
|
+
), ft = Object.fromEntries(
|
|
2100
|
+
Object.entries(m.trackItemsMap).filter(
|
|
2101
|
+
([w]) => !E.includes(w)
|
|
2102
|
+
)
|
|
2103
|
+
);
|
|
2104
|
+
F.filter((w) => w.magnetic).forEach((w) => {
|
|
2105
|
+
const Q = Object.values(ft).filter(
|
|
2106
|
+
(V) => w.items.includes(V.id)
|
|
2107
|
+
).sort(
|
|
2108
|
+
(V, _t) => V.display.from - _t.display.from
|
|
2109
|
+
).map((V) => V.id), bt = Ii({
|
|
2110
|
+
trackItemIds: Q,
|
|
2111
|
+
transitionsMap: U,
|
|
2112
|
+
trackItemsMap: ft
|
|
2113
|
+
});
|
|
2114
|
+
let ht = 0;
|
|
2115
|
+
Q.forEach((V) => {
|
|
2116
|
+
const _t = [];
|
|
2117
|
+
for (const mt of bt)
|
|
2118
|
+
if (mt.find((R) => R.id === V)) {
|
|
2119
|
+
const R = bt.findIndex(
|
|
2120
|
+
(N) => N.find((L) => L.id === V)
|
|
2121
|
+
);
|
|
2122
|
+
if (R - 1 >= 0)
|
|
2123
|
+
for (let N = R - 1; N >= 0; N--) {
|
|
2124
|
+
const L = bt[N];
|
|
2125
|
+
_t.push(L);
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
let xt = 0;
|
|
2129
|
+
if (_t.forEach((mt) => {
|
|
2130
|
+
mt.forEach((R) => {
|
|
2131
|
+
R.type === "transition" && (xt += R.duration);
|
|
2132
|
+
});
|
|
2133
|
+
}), ft[V]) {
|
|
2134
|
+
const mt = ft[V].display.to - ft[V].display.from;
|
|
2135
|
+
ft[V].display = {
|
|
2136
|
+
from: ht - xt,
|
|
2137
|
+
to: ht + mt - xt
|
|
2138
|
+
}, ht += mt;
|
|
2139
|
+
}
|
|
2140
|
+
});
|
|
2141
|
+
});
|
|
2142
|
+
const Lt = ue(ft);
|
|
2143
|
+
t.updateState(
|
|
2144
|
+
{
|
|
2145
|
+
trackItemIds: Tt,
|
|
2146
|
+
trackItemDetailsMap: Ft,
|
|
2147
|
+
activeIds: [],
|
|
2148
|
+
trackItemsMap: ft,
|
|
2149
|
+
tracks: Bt,
|
|
2150
|
+
duration: Lt,
|
|
2151
|
+
structure: X,
|
|
2152
|
+
transitionIds: Rt,
|
|
2153
|
+
transitionsMap: U
|
|
2154
|
+
},
|
|
2155
|
+
{ updateHistory: !0, kind: "remove" }
|
|
2156
|
+
);
|
|
2157
|
+
}
|
|
2158
|
+
if (u.key === ni) {
|
|
2159
|
+
const I = B(t.getState()), m = {}, P = ((h = u.value) == null ? void 0 : h.payload.trackItemIds) || I.activeIds;
|
|
2160
|
+
if (P.length === 0) return;
|
|
2161
|
+
P.forEach((E) => {
|
|
2162
|
+
const j = I.trackItemsMap[E], H = I.trackItemDetailsMap[E], $ = Se();
|
|
2163
|
+
I.trackItemsMap[$] = {
|
|
2164
|
+
...B(j),
|
|
2165
|
+
id: $
|
|
2166
|
+
}, I.trackItemDetailsMap[$] = {
|
|
2167
|
+
...B(H)
|
|
2168
|
+
}, I.trackItemIds.push($);
|
|
2169
|
+
const O = I.tracks.find(
|
|
2170
|
+
(F) => F.items.includes(E)
|
|
2171
|
+
);
|
|
2172
|
+
m[O.id] ? m[O.id].items.push($) : m[O.id] = {
|
|
2173
|
+
...O,
|
|
2174
|
+
id: Se(),
|
|
2175
|
+
items: [$],
|
|
2176
|
+
static: !1,
|
|
2177
|
+
magnetic: !1
|
|
2178
|
+
};
|
|
2179
|
+
});
|
|
2180
|
+
const x = Object.values(m);
|
|
2181
|
+
I.tracks = [...x, ...I.tracks], t.updateState(
|
|
2182
|
+
{
|
|
2183
|
+
trackItemDetailsMap: I.trackItemDetailsMap,
|
|
2184
|
+
tracks: I.tracks,
|
|
2185
|
+
trackItemIds: I.trackItemIds,
|
|
2186
|
+
trackItemsMap: I.trackItemsMap
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
updateHistory: !0,
|
|
2190
|
+
kind: "update"
|
|
2191
|
+
}
|
|
2192
|
+
);
|
|
2193
|
+
}
|
|
2194
|
+
if (u.key === ii) {
|
|
2195
|
+
const I = (v = u.value) == null ? void 0 : v.payload, m = Object.keys(I)[0], P = Object.values(I)[0], x = B(t.getState()), E = x.trackItemDetailsMap[m], j = B(x.trackItemsMap[m]), H = E.details;
|
|
2196
|
+
if (!P.details.src) return;
|
|
2197
|
+
if (E.type === "image") {
|
|
2198
|
+
const $ = await gn(P.details.src), { crop: O, newHeight: F, newWidth: X } = $n(
|
|
2199
|
+
E,
|
|
2200
|
+
$
|
|
2201
|
+
);
|
|
2202
|
+
P.details.crop = O, P.details.height = F, P.details.width = X;
|
|
2203
|
+
} else if (E.type === "video") {
|
|
2204
|
+
const $ = await bn(P.details.src), O = x.trackItemsMap[m], { display: F, duration: X, trim: Tt } = Un(O, $), { crop: Rt, newHeight: Ft, newWidth: U } = $n(
|
|
2205
|
+
E,
|
|
2206
|
+
$
|
|
2207
|
+
);
|
|
2208
|
+
P.details.crop = Rt, P.details.height = Ft, P.details.width = U, j.display = F, j.duration = X, j.trim = Tt;
|
|
2209
|
+
} else if (E.type === "audio") {
|
|
2210
|
+
const $ = await os(P.details.src), O = x.trackItemsMap[m], { display: F, duration: X, trim: Tt } = Un(O, $);
|
|
2211
|
+
j.display = F, j.duration = X, j.trim = Tt;
|
|
2212
|
+
}
|
|
2213
|
+
E.details = { ...H, ...P.details }, x.trackItemDetailsMap[m] = { ...E }, x.trackItemsMap[m] = { ...j }, t.updateState(
|
|
2214
|
+
{
|
|
2215
|
+
trackItemDetailsMap: x.trackItemDetailsMap,
|
|
2216
|
+
trackItemsMap: x.trackItemsMap
|
|
2217
|
+
},
|
|
2218
|
+
{
|
|
2219
|
+
updateHistory: !0,
|
|
2220
|
+
kind: "update:details"
|
|
2221
|
+
}
|
|
2222
|
+
);
|
|
2223
|
+
}
|
|
2224
|
+
}), y = n.subscribe(async (u) => {
|
|
2225
|
+
var x, E, j, H, $, O, F, X, Tt, Rt, Ft, U, Bt, ft, pt, Lt, w, Z, Mt, Q, bt, ht, V, _t, xt, mt;
|
|
2226
|
+
const d = B(t.getState()), g = ((E = (x = u.value) == null ? void 0 : x.options) == null ? void 0 : E.isSelected) || !1, b = (H = (j = u.value) == null ? void 0 : j.options) == null ? void 0 : H.scaleMode, _ = (O = ($ = u.value) == null ? void 0 : $.options) == null ? void 0 : O.isNewTrack;
|
|
2227
|
+
let h = [], v = "text";
|
|
2228
|
+
const I = (X = (F = u.value) == null ? void 0 : F.options) == null ? void 0 : X.trackId;
|
|
2229
|
+
let m = (Rt = (Tt = u.value) == null ? void 0 : Tt.options) == null ? void 0 : Rt.trackIndex;
|
|
2230
|
+
if (u.key === Xs) {
|
|
2231
|
+
const R = (Ft = u.value) == null ? void 0 : Ft.payload;
|
|
2232
|
+
let N = d.trackItemsMap[R.id].animations;
|
|
2233
|
+
N ? N.in && R.animations.in ? N.in = R.animations.in : N.out && R.animations.out || !N.out && R.animations.out ? N.out = R.animations.out : !N.in && R.animations.in ? N.in = R.animations.in : N = R.animations : d.trackItemsMap[R.id].animations = R.animations;
|
|
2234
|
+
}
|
|
2235
|
+
if (u.key === qs) {
|
|
2236
|
+
const R = (U = u.value) == null ? void 0 : U.payload, N = R.trackItems.map(
|
|
2237
|
+
(K) => fi(K, {
|
|
2238
|
+
size: d.size
|
|
2239
|
+
})
|
|
2240
|
+
), L = await Promise.all(N), Et = hi(R.tracks, R.trackItems), vt = [];
|
|
2241
|
+
R.trackItems.forEach((K) => {
|
|
2242
|
+
if (K.type !== "template") return;
|
|
2243
|
+
d.trackItemsMap = {
|
|
2244
|
+
...d.trackItemsMap,
|
|
2245
|
+
...K.trackItemsMap
|
|
2246
|
+
}, d.trackItemDetailsMap = {
|
|
2247
|
+
...d.trackItemDetailsMap,
|
|
2248
|
+
...K.trackItemDetailsMap
|
|
2249
|
+
}, d.transitionsMap = {
|
|
2250
|
+
...d.transitionsMap,
|
|
2251
|
+
...K.transitionsMap
|
|
2252
|
+
};
|
|
2253
|
+
const at = {
|
|
2254
|
+
id: K.id,
|
|
2255
|
+
items: K.trackItemIds,
|
|
2256
|
+
transitions: K.transitionsIds || [],
|
|
2257
|
+
tracks: K.tracks
|
|
2258
|
+
};
|
|
2259
|
+
vt.push(at);
|
|
2260
|
+
});
|
|
2261
|
+
const tt = [], kt = {}, J = {};
|
|
2262
|
+
if (L.forEach((K) => {
|
|
2263
|
+
const { details: at, ...jt } = K;
|
|
2264
|
+
tt.push(K.id), kt[K.id] = {
|
|
2265
|
+
type: K.type,
|
|
2266
|
+
details: at
|
|
2267
|
+
}, J[K.id] = jt;
|
|
2268
|
+
}), pi(
|
|
2269
|
+
d.tracks,
|
|
2270
|
+
Et
|
|
2271
|
+
))
|
|
2272
|
+
d.tracks.forEach((K) => {
|
|
2273
|
+
Et.forEach((at) => {
|
|
2274
|
+
if (K.id === at.id) {
|
|
2275
|
+
if (K.magnetic) {
|
|
2276
|
+
const jt = at.items.map((ot) => J[ot]), Zt = K.items.map(
|
|
2277
|
+
(ot) => d.trackItemsMap[ot]
|
|
2278
|
+
);
|
|
2279
|
+
gi(
|
|
2280
|
+
jt,
|
|
2281
|
+
Zt
|
|
2282
|
+
);
|
|
2283
|
+
}
|
|
2284
|
+
K.items.push(...tt);
|
|
2285
|
+
}
|
|
2286
|
+
});
|
|
2287
|
+
});
|
|
2288
|
+
else {
|
|
2289
|
+
const K = ((ft = (Bt = u.value) == null ? void 0 : Bt.options) == null ? void 0 : ft.trackIndex) || 0, at = _n(
|
|
2290
|
+
K,
|
|
2291
|
+
0,
|
|
2292
|
+
d.tracks.length
|
|
2293
|
+
);
|
|
2294
|
+
d.tracks.splice(at, 0, ...Et);
|
|
2295
|
+
}
|
|
2296
|
+
d.trackItemDetailsMap = {
|
|
2297
|
+
...d.trackItemDetailsMap,
|
|
2298
|
+
...kt
|
|
2299
|
+
}, d.trackItemsMap = {
|
|
2300
|
+
...d.trackItemsMap,
|
|
2301
|
+
...J
|
|
2302
|
+
}, d.trackItemIds = [
|
|
2303
|
+
...d.trackItemIds,
|
|
2304
|
+
...tt
|
|
2305
|
+
], d.structure = [...d.structure, ...vt], d.duration = ue(d.trackItemsMap);
|
|
2306
|
+
const { transitionIds: At, transitionsMap: Kt } = bi(
|
|
2307
|
+
d
|
|
2308
|
+
);
|
|
2309
|
+
t.updateState(
|
|
2310
|
+
{
|
|
2311
|
+
trackItemIds: d.trackItemIds,
|
|
2312
|
+
trackItemDetailsMap: d.trackItemDetailsMap,
|
|
2313
|
+
trackItemsMap: d.trackItemsMap,
|
|
2314
|
+
tracks: d.tracks,
|
|
2315
|
+
duration: d.duration,
|
|
2316
|
+
structure: d.structure,
|
|
2317
|
+
transitionIds: At,
|
|
2318
|
+
transitionsMap: Kt
|
|
2319
|
+
},
|
|
2320
|
+
{
|
|
2321
|
+
updateHistory: !0,
|
|
2322
|
+
kind: "add"
|
|
2323
|
+
}
|
|
2324
|
+
);
|
|
2325
|
+
return;
|
|
2326
|
+
}
|
|
2327
|
+
if (u.key === Vs) {
|
|
2328
|
+
v = "caption";
|
|
2329
|
+
const R = (pt = u.value) == null ? void 0 : pt.payload, N = [];
|
|
2330
|
+
for (const vt of R) {
|
|
2331
|
+
const tt = hs(vt, {
|
|
2332
|
+
size: d.size
|
|
2333
|
+
});
|
|
2334
|
+
N.push(tt);
|
|
2335
|
+
}
|
|
2336
|
+
const L = await Promise.all(N), Et = [];
|
|
2337
|
+
for (const vt of L) {
|
|
2338
|
+
const tt = vt.id;
|
|
2339
|
+
Et.push(tt);
|
|
2340
|
+
const { details: kt, ...J } = vt;
|
|
2341
|
+
d.trackItemDetailsMap[tt] = {
|
|
2342
|
+
type: v,
|
|
2343
|
+
details: kt
|
|
2344
|
+
}, d.trackItemsMap[tt] = J, d.trackItemIds.push(tt);
|
|
2345
|
+
}
|
|
2346
|
+
h = Et;
|
|
2347
|
+
}
|
|
2348
|
+
if (u.key === Gs) {
|
|
2349
|
+
v = "text";
|
|
2350
|
+
const R = await ms((Lt = u.value) == null ? void 0 : Lt.payload, {
|
|
2351
|
+
size: d.size
|
|
2352
|
+
}), { details: N, ...L } = R;
|
|
2353
|
+
d.trackItemDetailsMap[L.id] = {
|
|
2354
|
+
type: v,
|
|
2355
|
+
details: N
|
|
2356
|
+
}, d.trackItemsMap[L.id] = L, d.trackItemIds.push(L.id), h = [L.id];
|
|
2357
|
+
}
|
|
2358
|
+
if (u.key === Js) {
|
|
2359
|
+
v = "template";
|
|
2360
|
+
const R = (w = u.value) == null ? void 0 : w.payload.trackItemsMap, N = (Z = u.value) == null ? void 0 : Z.payload.trackItemDetailsMap, L = (Mt = u.value) == null ? void 0 : Mt.payload.transitionsMap, Et = ((Q = u.value) == null ? void 0 : Q.payload.transitionIds) || [], vt = (bt = u.value) == null ? void 0 : bt.payload.trackItemIds, tt = ((ht = u.value) == null ? void 0 : ht.payload.tracks) || [], { details: kt, ...J } = await fs((V = u.value) == null ? void 0 : V.payload, {
|
|
2361
|
+
size: d.size
|
|
2362
|
+
}), qt = {
|
|
2363
|
+
id: J.id,
|
|
2364
|
+
items: vt,
|
|
2365
|
+
transitions: Et,
|
|
2366
|
+
tracks: tt
|
|
2367
|
+
};
|
|
2368
|
+
d.trackItemDetailsMap[J.id] = {
|
|
2369
|
+
type: v,
|
|
2370
|
+
details: kt
|
|
2371
|
+
}, d.trackItemsMap[J.id] = J, d.trackItemIds.push(J.id), h = [J.id], d.trackItemsMap = {
|
|
2372
|
+
...d.trackItemsMap,
|
|
2373
|
+
...R,
|
|
2374
|
+
[J.id]: {
|
|
2375
|
+
...J
|
|
2376
|
+
}
|
|
2377
|
+
}, d.trackItemDetailsMap = {
|
|
2378
|
+
...d.trackItemDetailsMap,
|
|
2379
|
+
...N,
|
|
2380
|
+
[J.id]: {
|
|
2381
|
+
type: "template",
|
|
2382
|
+
details: kt
|
|
2383
|
+
}
|
|
2384
|
+
}, d.transitionsMap = {
|
|
2385
|
+
...d.transitionsMap,
|
|
2386
|
+
...L
|
|
2387
|
+
}, d.structure = [...d.structure, qt];
|
|
2388
|
+
}
|
|
2389
|
+
if (u.key === Ks) {
|
|
2390
|
+
v = "image";
|
|
2391
|
+
const R = await ps((_t = u.value) == null ? void 0 : _t.payload, {
|
|
2392
|
+
size: d.size,
|
|
2393
|
+
scaleMode: b
|
|
2394
|
+
}), { details: N, ...L } = R;
|
|
2395
|
+
d.trackItemDetailsMap[L.id] = {
|
|
2396
|
+
type: v,
|
|
2397
|
+
details: N
|
|
2398
|
+
}, d.trackItemsMap[L.id] = L, d.trackItemIds.push(L.id), h = [L.id];
|
|
2399
|
+
}
|
|
2400
|
+
if (u.key === Bs) {
|
|
2401
|
+
v = "audio";
|
|
2402
|
+
const R = await ds((xt = u.value) == null ? void 0 : xt.payload), { details: N, ...L } = R;
|
|
2403
|
+
d.trackItemDetailsMap[L.id] = {
|
|
2404
|
+
type: v,
|
|
2405
|
+
details: N
|
|
2406
|
+
}, d.trackItemsMap[L.id] = L, d.trackItemIds.push(L.id), h = [L.id];
|
|
2407
|
+
}
|
|
2408
|
+
if (u.key === Ys) {
|
|
2409
|
+
v = "video";
|
|
2410
|
+
const R = await ls((mt = u.value) == null ? void 0 : mt.payload, {
|
|
2411
|
+
size: d.size,
|
|
2412
|
+
scaleMode: b
|
|
2413
|
+
}), { details: N, ...L } = R;
|
|
2414
|
+
d.trackItemDetailsMap[L.id] = {
|
|
2415
|
+
type: v,
|
|
2416
|
+
details: N,
|
|
2417
|
+
metadata: L.metadata
|
|
2418
|
+
}, d.trackItemsMap[L.id] = L, d.trackItemIds.push(L.id), h = [L.id];
|
|
2419
|
+
}
|
|
2420
|
+
const P = yi(
|
|
2421
|
+
h,
|
|
2422
|
+
d.tracks,
|
|
2423
|
+
d.trackItemsMap,
|
|
2424
|
+
I,
|
|
2425
|
+
m
|
|
2426
|
+
);
|
|
2427
|
+
if (_) {
|
|
2428
|
+
const R = Ne();
|
|
2429
|
+
P.trackId = R;
|
|
2430
|
+
const N = {
|
|
2431
|
+
id: P.trackId,
|
|
2432
|
+
accepts: [
|
|
2433
|
+
"text",
|
|
2434
|
+
"audio",
|
|
2435
|
+
"helper",
|
|
2436
|
+
"video",
|
|
2437
|
+
"image",
|
|
2438
|
+
"caption",
|
|
2439
|
+
"template"
|
|
2440
|
+
],
|
|
2441
|
+
type: v,
|
|
2442
|
+
items: h,
|
|
2443
|
+
magnetic: !1,
|
|
2444
|
+
static: !1
|
|
2445
|
+
};
|
|
2446
|
+
d.tracks.splice(P.trackIndex, 0, N);
|
|
2447
|
+
} else if (P.trackId) {
|
|
2448
|
+
const R = d.tracks.find(
|
|
2449
|
+
(N) => N.id === P.trackId
|
|
2450
|
+
);
|
|
2451
|
+
R && R.items.push(...h);
|
|
2452
|
+
} else if (P.trackIndex !== void 0) {
|
|
2453
|
+
const R = {
|
|
2454
|
+
id: Ne(),
|
|
2455
|
+
accepts: [
|
|
2456
|
+
"text",
|
|
2457
|
+
"audio",
|
|
2458
|
+
"helper",
|
|
2459
|
+
"video",
|
|
2460
|
+
"image",
|
|
2461
|
+
"caption",
|
|
2462
|
+
"template"
|
|
2463
|
+
],
|
|
2464
|
+
type: v,
|
|
2465
|
+
items: h,
|
|
2466
|
+
magnetic: !1,
|
|
2467
|
+
static: !1
|
|
2468
|
+
};
|
|
2469
|
+
d.tracks.splice(P.trackIndex, 0, R);
|
|
2470
|
+
} else
|
|
2471
|
+
d.tracks.unshift({
|
|
2472
|
+
id: Ne(),
|
|
2473
|
+
accepts: [
|
|
2474
|
+
"text",
|
|
2475
|
+
"audio",
|
|
2476
|
+
"helper",
|
|
2477
|
+
"video",
|
|
2478
|
+
"image",
|
|
2479
|
+
"caption",
|
|
2480
|
+
"template"
|
|
2481
|
+
],
|
|
2482
|
+
type: v,
|
|
2483
|
+
items: h,
|
|
2484
|
+
magnetic: !1,
|
|
2485
|
+
static: !1
|
|
2486
|
+
});
|
|
2487
|
+
g && (d.activeIds = h), d.duration = ue(d.trackItemsMap), t.updateState(
|
|
2488
|
+
{
|
|
2489
|
+
activeIds: d.activeIds,
|
|
2490
|
+
trackItemIds: d.trackItemIds,
|
|
2491
|
+
trackItemDetailsMap: d.trackItemDetailsMap,
|
|
2492
|
+
trackItemsMap: d.trackItemsMap,
|
|
2493
|
+
transitionsMap: d.transitionsMap,
|
|
2494
|
+
tracks: d.tracks,
|
|
2495
|
+
duration: d.duration,
|
|
2496
|
+
structure: d.structure
|
|
2497
|
+
},
|
|
2498
|
+
{
|
|
2499
|
+
updateHistory: !0,
|
|
2500
|
+
kind: "add"
|
|
2501
|
+
}
|
|
2502
|
+
);
|
|
2503
|
+
}), M = c.subscribe(async (u) => {
|
|
2504
|
+
var d;
|
|
2505
|
+
if (u.key === ri) {
|
|
2506
|
+
const g = B(t.getState()), b = (d = u.value) == null ? void 0 : d.options.time;
|
|
2507
|
+
if (g.activeIds.length === 1) {
|
|
2508
|
+
const _ = g.activeIds[0], h = B(g.trackItemsMap[_]);
|
|
2509
|
+
if (b >= h.display.to || b <= h.display.from)
|
|
2510
|
+
return;
|
|
2511
|
+
const v = B(g.trackItemDetailsMap[_]), I = Se(), m = B({
|
|
2512
|
+
...h,
|
|
2513
|
+
display: {
|
|
2514
|
+
from: h.display.from,
|
|
2515
|
+
to: b
|
|
2516
|
+
}
|
|
2517
|
+
}), P = B({
|
|
2518
|
+
...h,
|
|
2519
|
+
id: I,
|
|
2520
|
+
display: {
|
|
2521
|
+
from: b,
|
|
2522
|
+
to: h.display.to
|
|
2523
|
+
}
|
|
2524
|
+
});
|
|
2525
|
+
if (h.type === "video" || h.type === "audio") {
|
|
2526
|
+
const x = b - m.display.from;
|
|
2527
|
+
m.trim = {
|
|
2528
|
+
from: h.trim.from,
|
|
2529
|
+
to: h.trim.from + x
|
|
2530
|
+
}, P.trim = {
|
|
2531
|
+
from: h.trim.from + x,
|
|
2532
|
+
to: h.trim.to
|
|
2533
|
+
};
|
|
2534
|
+
}
|
|
2535
|
+
g.trackItemsMap[_] = m, g.trackItemsMap[I] = P, g.trackItemIds.push(I), g.trackItemDetailsMap[I] = v, g.tracks.forEach((x) => {
|
|
2536
|
+
x.items.includes(_) && x.items.push(I);
|
|
2537
|
+
}), t.updateState(
|
|
2538
|
+
{
|
|
2539
|
+
trackItemDetailsMap: g.trackItemDetailsMap,
|
|
2540
|
+
tracks: g.tracks,
|
|
2541
|
+
trackItemIds: g.trackItemIds,
|
|
2542
|
+
trackItemsMap: g.trackItemsMap
|
|
2543
|
+
},
|
|
2544
|
+
{
|
|
2545
|
+
updateHistory: !0,
|
|
2546
|
+
kind: "update"
|
|
2547
|
+
}
|
|
2548
|
+
);
|
|
2549
|
+
}
|
|
2550
|
+
return;
|
|
2551
|
+
}
|
|
2552
|
+
if (u.key === ei) {
|
|
2553
|
+
const g = B(t.getState());
|
|
2554
|
+
if (g.activeIds.length) {
|
|
2555
|
+
const b = g.activeIds, _ = [], h = {
|
|
2556
|
+
activeIds: b,
|
|
2557
|
+
trackItemDetailsMap: {},
|
|
2558
|
+
trackItemsMap: {},
|
|
2559
|
+
tracks: []
|
|
2560
|
+
};
|
|
2561
|
+
b.forEach((I) => {
|
|
2562
|
+
h.trackItemDetailsMap[I] = g.trackItemDetailsMap[I], h.trackItemsMap[I] = g.trackItemsMap[I], _.push(
|
|
2563
|
+
g.tracks.find((m) => m.items.includes(I))
|
|
2564
|
+
);
|
|
2565
|
+
});
|
|
2566
|
+
const v = /* @__PURE__ */ new Set();
|
|
2567
|
+
_.filter((I) => v.has(I.id) ? !1 : (v.add(I), !0)), h.tracks = Array.from(v.keys()), localStorage.setItem("DesignComboTemp", JSON.stringify(h));
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
if (u.key === ti) {
|
|
2571
|
+
const g = localStorage.getItem("DesignComboTemp");
|
|
2572
|
+
if (!g) return;
|
|
2573
|
+
const b = B(t.getState()), _ = JSON.parse(g), h = {}, v = _.trackItemsMap, I = _.trackItemDetailsMap, m = _.tracks, P = [], x = _.activeIds.map(async (E) => {
|
|
2574
|
+
const j = I[E];
|
|
2575
|
+
(j.type === "caption" || j.type === "text") && j.details.fontUrl && await mr([
|
|
2576
|
+
{
|
|
2577
|
+
fontFamily: j.details.fontFamily,
|
|
2578
|
+
url: j.details.fontUrl
|
|
2579
|
+
}
|
|
2580
|
+
]);
|
|
2581
|
+
const H = Se();
|
|
2582
|
+
return h[E] = H, b.trackItemsMap[H] = {
|
|
2583
|
+
...v[E],
|
|
2584
|
+
id: H
|
|
2585
|
+
}, b.trackItemDetailsMap[H] = j, b.trackItemIds.push(H), !0;
|
|
2586
|
+
});
|
|
2587
|
+
await Promise.all(x), m.forEach((E) => {
|
|
2588
|
+
const j = E.items.map(($) => h[$]), H = {
|
|
2589
|
+
...E,
|
|
2590
|
+
items: j,
|
|
2591
|
+
id: Ne()
|
|
2592
|
+
};
|
|
2593
|
+
P.push(H);
|
|
2594
|
+
}), b.tracks = [...b.tracks, ...P], t.updateState(
|
|
2595
|
+
{
|
|
2596
|
+
trackItemDetailsMap: b.trackItemDetailsMap,
|
|
2597
|
+
tracks: b.tracks,
|
|
2598
|
+
trackItemIds: b.trackItemIds,
|
|
2599
|
+
trackItemsMap: b.trackItemsMap
|
|
2600
|
+
},
|
|
2601
|
+
{
|
|
2602
|
+
updateHistory: !0,
|
|
2603
|
+
kind: "update"
|
|
2604
|
+
}
|
|
2605
|
+
);
|
|
2606
|
+
}
|
|
2607
|
+
}), C = f.subscribe(async (u) => {
|
|
2608
|
+
var d, g, b;
|
|
2609
|
+
if (u.key === Zs) {
|
|
2610
|
+
const _ = B(t.getState()), h = _.trackItemDetailsMap, v = _.trackItemsMap, I = Object.keys((d = u.value) == null ? void 0 : d.payload);
|
|
2611
|
+
if (!I.length) return;
|
|
2612
|
+
const m = (g = u.value) == null ? void 0 : g.payload;
|
|
2613
|
+
I.forEach((x) => {
|
|
2614
|
+
const E = m[x];
|
|
2615
|
+
E.details ? h[x].details = {
|
|
2616
|
+
...h[x].details,
|
|
2617
|
+
...E.details
|
|
2618
|
+
} : m[x].playbackRate && (v[x].playbackRate = m[x].playbackRate), m[x].metadata && (v[x].metadata ? v[x].metadata = {
|
|
2619
|
+
...v[x].metadata,
|
|
2620
|
+
...m[x].metadata
|
|
2621
|
+
} : v[x].metadata = m[x].metadata), m[x].display && (v[x].display = m[x].display);
|
|
2622
|
+
});
|
|
2623
|
+
const P = ue(v);
|
|
2624
|
+
t.updateState(
|
|
2625
|
+
{
|
|
2626
|
+
trackItemDetailsMap: { ...h },
|
|
2627
|
+
trackItemsMap: { ...v },
|
|
2628
|
+
duration: P
|
|
2629
|
+
},
|
|
2630
|
+
{
|
|
2631
|
+
updateHistory: !0,
|
|
2632
|
+
kind: "update:details"
|
|
2633
|
+
}
|
|
2634
|
+
);
|
|
2635
|
+
}
|
|
2636
|
+
if (u.key === Qs) {
|
|
2637
|
+
const _ = (b = u.value) == null ? void 0 : b.payload, h = Object.keys(_)[0], v = Object.values(_)[0], I = B(t.getState()), m = I.trackItemDetailsMap[h], P = m.details;
|
|
2638
|
+
if (v.details) {
|
|
2639
|
+
if (v.type === "image" && v.details.src) {
|
|
2640
|
+
const E = await gn(v.details.src), j = m.details.width || 0, H = m.details.height || 0;
|
|
2641
|
+
let $ = E.width, O = E.height;
|
|
2642
|
+
const F = E.width / E.height;
|
|
2643
|
+
j / H > F ? ($ = j, O = j / F) : (O = H, $ = H * F), P.crop = {
|
|
2644
|
+
x: 0,
|
|
2645
|
+
y: 0,
|
|
2646
|
+
height: P.height,
|
|
2647
|
+
width: P.width
|
|
2648
|
+
}, v.details.width = $, v.details.height = O;
|
|
2649
|
+
}
|
|
2650
|
+
if (v.type === "video" && v.details.src) {
|
|
2651
|
+
const E = await bn(v.details.src), j = m.details.width || 0, H = m.details.height || 0;
|
|
2652
|
+
let $ = E.width, O = E.height;
|
|
2653
|
+
const F = E.width / E.height;
|
|
2654
|
+
j / H > F ? ($ = j, O = j / F) : (O = H, $ = H * F), P.crop = {
|
|
2655
|
+
x: 0,
|
|
2656
|
+
y: 0,
|
|
2657
|
+
height: P.height,
|
|
2658
|
+
width: P.width
|
|
2659
|
+
}, v.details.width = $, v.details.height = O;
|
|
2660
|
+
}
|
|
2661
|
+
m.details = { ...P, ...v.details }, v.details = m.details;
|
|
2662
|
+
}
|
|
2663
|
+
const x = { ...m, ...v };
|
|
2664
|
+
I.trackItemDetailsMap[h] = x, I.trackItemsMap[h] = {
|
|
2665
|
+
...I.trackItemsMap[h],
|
|
2666
|
+
type: v.type
|
|
2667
|
+
}, t.updateState(
|
|
2668
|
+
{
|
|
2669
|
+
trackItemDetailsMap: {
|
|
2670
|
+
...I.trackItemDetailsMap
|
|
2671
|
+
},
|
|
2672
|
+
trackItemsMap: {
|
|
2673
|
+
...I.trackItemsMap
|
|
2674
|
+
}
|
|
2675
|
+
},
|
|
2676
|
+
{
|
|
2677
|
+
updateHistory: !0,
|
|
2678
|
+
kind: "update:details"
|
|
2679
|
+
}
|
|
2680
|
+
);
|
|
2681
|
+
}
|
|
2682
|
+
});
|
|
2683
|
+
return {
|
|
2684
|
+
unsubscribe: () => {
|
|
2685
|
+
y.unsubscribe(), M.unsubscribe(), C.unsubscribe(), A.unsubscribe(), T.unsubscribe(), S.unsubscribe(), k.unsubscribe();
|
|
2686
|
+
}
|
|
2687
|
+
};
|
|
2688
|
+
}
|
|
2689
|
+
const vi = { Date: !0, RegExp: !0, String: !0, Number: !0 };
|
|
2690
|
+
function Is(t, r, n = { cyclesFix: !0 }, s = []) {
|
|
2691
|
+
var p, S;
|
|
2692
|
+
let a = [];
|
|
2693
|
+
const c = Array.isArray(t);
|
|
2694
|
+
for (const A in t) {
|
|
2695
|
+
const k = t[A], T = c ? +A : A;
|
|
2696
|
+
if (!(A in r)) {
|
|
2697
|
+
a.push({
|
|
2698
|
+
type: "REMOVE",
|
|
2699
|
+
path: [T],
|
|
2700
|
+
oldValue: t[A]
|
|
2701
|
+
});
|
|
2702
|
+
continue;
|
|
2703
|
+
}
|
|
2704
|
+
const y = r[A], M = typeof k == "object" && typeof y == "object" && Array.isArray(k) === Array.isArray(y);
|
|
2705
|
+
if (k && y && M && !vi[(S = (p = Object.getPrototypeOf(k)) == null ? void 0 : p.constructor) == null ? void 0 : S.name] && (!n.cyclesFix || !s.includes(k))) {
|
|
2706
|
+
const C = Is(k, y, n, n.cyclesFix ? s.concat([k]) : []);
|
|
2707
|
+
a.push.apply(a, C.map((u) => (u.path.unshift(T), u)));
|
|
2708
|
+
} else k !== y && // treat NaN values as equivalent
|
|
2709
|
+
!(Number.isNaN(k) && Number.isNaN(y)) && !(M && (isNaN(k) ? k + "" == y + "" : +k == +y)) && a.push({
|
|
2710
|
+
path: [T],
|
|
2711
|
+
type: "CHANGE",
|
|
2712
|
+
value: y,
|
|
2713
|
+
oldValue: k
|
|
2714
|
+
});
|
|
2715
|
+
}
|
|
2716
|
+
const f = Array.isArray(r);
|
|
2717
|
+
for (const A in r)
|
|
2718
|
+
A in t || a.push({
|
|
2719
|
+
type: "CREATE",
|
|
2720
|
+
path: [f ? +A : A],
|
|
2721
|
+
value: r[A]
|
|
2722
|
+
});
|
|
2723
|
+
return a;
|
|
2724
|
+
}
|
|
2725
|
+
var Dn = Symbol.for("immer-nothing"), He = Symbol.for("immer-draftable"), St = Symbol.for("immer-state"), gs = process.env.NODE_ENV !== "production" ? [
|
|
2726
|
+
// All error codes, starting by 0:
|
|
2727
|
+
function(t) {
|
|
2728
|
+
return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
|
|
2729
|
+
},
|
|
2730
|
+
function(t) {
|
|
2731
|
+
return `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${t}'`;
|
|
2732
|
+
},
|
|
2733
|
+
"This object has been frozen and should not be mutated",
|
|
2734
|
+
function(t) {
|
|
2735
|
+
return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + t;
|
|
2736
|
+
},
|
|
2737
|
+
"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",
|
|
2738
|
+
"Immer forbids circular references",
|
|
2739
|
+
"The first or second argument to `produce` must be a function",
|
|
2740
|
+
"The third argument to `produce` must be a function or undefined",
|
|
2741
|
+
"First argument to `createDraft` must be a plain object, an array, or an immerable object",
|
|
2742
|
+
"First argument to `finishDraft` must be a draft returned by `createDraft`",
|
|
2743
|
+
function(t) {
|
|
2744
|
+
return `'current' expects a draft, got: ${t}`;
|
|
2745
|
+
},
|
|
2746
|
+
"Object.defineProperty() cannot be used on an Immer draft",
|
|
2747
|
+
"Object.setPrototypeOf() cannot be used on an Immer draft",
|
|
2748
|
+
"Immer only supports deleting array indices",
|
|
2749
|
+
"Immer only supports setting array indices and the 'length' property",
|
|
2750
|
+
function(t) {
|
|
2751
|
+
return `'original' expects a draft, got: ${t}`;
|
|
2752
|
+
}
|
|
2753
|
+
// Note: if more errors are added, the errorOffset in Patches.ts should be increased
|
|
2754
|
+
// See Patches.ts for additional errors
|
|
2755
|
+
] : [];
|
|
2756
|
+
function rt(t, ...r) {
|
|
2757
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2758
|
+
const n = gs[t], s = typeof n == "function" ? n.apply(null, r) : n;
|
|
2759
|
+
throw new Error(`[Immer] ${s}`);
|
|
2760
|
+
}
|
|
2761
|
+
throw new Error(
|
|
2762
|
+
`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`
|
|
2763
|
+
);
|
|
2764
|
+
}
|
|
2765
|
+
var le = Object.getPrototypeOf;
|
|
2766
|
+
function de(t) {
|
|
2767
|
+
return !!t && !!t[St];
|
|
2768
|
+
}
|
|
2769
|
+
function Jt(t) {
|
|
2770
|
+
var r;
|
|
2771
|
+
return t ? bs(t) || Array.isArray(t) || !!t[He] || !!((r = t.constructor) != null && r[He]) || Ke(t) || Xe(t) : !1;
|
|
2772
|
+
}
|
|
2773
|
+
var ki = Object.prototype.constructor.toString();
|
|
2774
|
+
function bs(t) {
|
|
2775
|
+
if (!t || typeof t != "object")
|
|
2776
|
+
return !1;
|
|
2777
|
+
const r = le(t);
|
|
2778
|
+
if (r === null)
|
|
2779
|
+
return !0;
|
|
2780
|
+
const n = Object.hasOwnProperty.call(r, "constructor") && r.constructor;
|
|
2781
|
+
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === ki;
|
|
2782
|
+
}
|
|
2783
|
+
function Le(t, r) {
|
|
2784
|
+
fe(t) === 0 ? Reflect.ownKeys(t).forEach((n) => {
|
|
2785
|
+
r(n, t[n], t);
|
|
2786
|
+
}) : t.forEach((n, s) => r(s, n, t));
|
|
2787
|
+
}
|
|
2788
|
+
function fe(t) {
|
|
2789
|
+
const r = t[St];
|
|
2790
|
+
return r ? r.type_ : Array.isArray(t) ? 1 : Ke(t) ? 2 : Xe(t) ? 3 : 0;
|
|
2791
|
+
}
|
|
2792
|
+
function $e(t, r) {
|
|
2793
|
+
return fe(t) === 2 ? t.has(r) : Object.prototype.hasOwnProperty.call(t, r);
|
|
2794
|
+
}
|
|
2795
|
+
function un(t, r) {
|
|
2796
|
+
return fe(t) === 2 ? t.get(r) : t[r];
|
|
2797
|
+
}
|
|
2798
|
+
function _s(t, r, n) {
|
|
2799
|
+
const s = fe(t);
|
|
2800
|
+
s === 2 ? t.set(r, n) : s === 3 ? t.add(n) : t[r] = n;
|
|
2801
|
+
}
|
|
2802
|
+
function Si(t, r) {
|
|
2803
|
+
return t === r ? t !== 0 || 1 / t === 1 / r : t !== t && r !== r;
|
|
2804
|
+
}
|
|
2805
|
+
function Ke(t) {
|
|
2806
|
+
return t instanceof Map;
|
|
2807
|
+
}
|
|
2808
|
+
function Xe(t) {
|
|
2809
|
+
return t instanceof Set;
|
|
2810
|
+
}
|
|
2811
|
+
function ce(t) {
|
|
2812
|
+
return t.copy_ || t.base_;
|
|
2813
|
+
}
|
|
2814
|
+
function vn(t, r) {
|
|
2815
|
+
if (Ke(t))
|
|
2816
|
+
return new Map(t);
|
|
2817
|
+
if (Xe(t))
|
|
2818
|
+
return new Set(t);
|
|
2819
|
+
if (Array.isArray(t))
|
|
2820
|
+
return Array.prototype.slice.call(t);
|
|
2821
|
+
const n = bs(t);
|
|
2822
|
+
if (r === !0 || r === "class_only" && !n) {
|
|
2823
|
+
const s = Object.getOwnPropertyDescriptors(t);
|
|
2824
|
+
delete s[St];
|
|
2825
|
+
let a = Reflect.ownKeys(s);
|
|
2826
|
+
for (let c = 0; c < a.length; c++) {
|
|
2827
|
+
const f = a[c], p = s[f];
|
|
2828
|
+
p.writable === !1 && (p.writable = !0, p.configurable = !0), (p.get || p.set) && (s[f] = {
|
|
2829
|
+
configurable: !0,
|
|
2830
|
+
writable: !0,
|
|
2831
|
+
// could live with !!desc.set as well here...
|
|
2832
|
+
enumerable: p.enumerable,
|
|
2833
|
+
value: t[f]
|
|
2834
|
+
});
|
|
2835
|
+
}
|
|
2836
|
+
return Object.create(le(t), s);
|
|
2837
|
+
} else {
|
|
2838
|
+
const s = le(t);
|
|
2839
|
+
if (s !== null && n)
|
|
2840
|
+
return { ...t };
|
|
2841
|
+
const a = Object.create(s);
|
|
2842
|
+
return Object.assign(a, t);
|
|
2843
|
+
}
|
|
2844
|
+
}
|
|
2845
|
+
function On(t, r = !1) {
|
|
2846
|
+
return vr(t) || de(t) || !Jt(t) || (fe(t) > 1 && (t.set = t.add = t.clear = t.delete = wi), Object.freeze(t), r && Object.entries(t).forEach(([n, s]) => On(s, !0))), t;
|
|
2847
|
+
}
|
|
2848
|
+
function wi() {
|
|
2849
|
+
rt(2);
|
|
2850
|
+
}
|
|
2851
|
+
function vr(t) {
|
|
2852
|
+
return Object.isFrozen(t);
|
|
2853
|
+
}
|
|
2854
|
+
var kn = {};
|
|
2855
|
+
function pe(t) {
|
|
2856
|
+
const r = kn[t];
|
|
2857
|
+
return r || rt(0, t), r;
|
|
2858
|
+
}
|
|
2859
|
+
function Ti(t, r) {
|
|
2860
|
+
kn[t] || (kn[t] = r);
|
|
2861
|
+
}
|
|
2862
|
+
var Ue;
|
|
2863
|
+
function vs() {
|
|
2864
|
+
return Ue;
|
|
2865
|
+
}
|
|
2866
|
+
function Mi(t, r) {
|
|
2867
|
+
return {
|
|
2868
|
+
drafts_: [],
|
|
2869
|
+
parent_: t,
|
|
2870
|
+
immer_: r,
|
|
2871
|
+
// Whenever the modified draft contains a draft from another scope, we
|
|
2872
|
+
// need to prevent auto-freezing so the unowned draft can be finalized.
|
|
2873
|
+
canAutoFreeze_: !0,
|
|
2874
|
+
unfinalizedDrafts_: 0
|
|
2875
|
+
};
|
|
2876
|
+
}
|
|
2877
|
+
function Wn(t, r) {
|
|
2878
|
+
r && (pe("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = r);
|
|
2879
|
+
}
|
|
2880
|
+
function Sn(t) {
|
|
2881
|
+
wn(t), t.drafts_.forEach(Ei), t.drafts_ = null;
|
|
2882
|
+
}
|
|
2883
|
+
function wn(t) {
|
|
2884
|
+
t === Ue && (Ue = t.parent_);
|
|
2885
|
+
}
|
|
2886
|
+
function Gn(t) {
|
|
2887
|
+
return Ue = Mi(Ue, t);
|
|
2888
|
+
}
|
|
2889
|
+
function Ei(t) {
|
|
2890
|
+
const r = t[St];
|
|
2891
|
+
r.type_ === 0 || r.type_ === 1 ? r.revoke_() : r.revoked_ = !0;
|
|
2892
|
+
}
|
|
2893
|
+
function Yn(t, r) {
|
|
2894
|
+
r.unfinalizedDrafts_ = r.drafts_.length;
|
|
2895
|
+
const n = r.drafts_[0];
|
|
2896
|
+
return t !== void 0 && t !== n ? (n[St].modified_ && (Sn(r), rt(4)), Jt(t) && (t = yr(r, t), r.parent_ || Ir(r, t)), r.patches_ && pe("Patches").generateReplacementPatches_(
|
|
2897
|
+
n[St].base_,
|
|
2898
|
+
t,
|
|
2899
|
+
r.patches_,
|
|
2900
|
+
r.inversePatches_
|
|
2901
|
+
)) : t = yr(r, n, []), Sn(r), r.patches_ && r.patchListener_(r.patches_, r.inversePatches_), t !== Dn ? t : void 0;
|
|
2902
|
+
}
|
|
2903
|
+
function yr(t, r, n) {
|
|
2904
|
+
if (vr(r))
|
|
2905
|
+
return r;
|
|
2906
|
+
const s = r[St];
|
|
2907
|
+
if (!s)
|
|
2908
|
+
return Le(
|
|
2909
|
+
r,
|
|
2910
|
+
(a, c) => Bn(t, s, r, a, c, n)
|
|
2911
|
+
), r;
|
|
2912
|
+
if (s.scope_ !== t)
|
|
2913
|
+
return r;
|
|
2914
|
+
if (!s.modified_)
|
|
2915
|
+
return Ir(t, s.base_, !0), s.base_;
|
|
2916
|
+
if (!s.finalized_) {
|
|
2917
|
+
s.finalized_ = !0, s.scope_.unfinalizedDrafts_--;
|
|
2918
|
+
const a = s.copy_;
|
|
2919
|
+
let c = a, f = !1;
|
|
2920
|
+
s.type_ === 3 && (c = new Set(a), a.clear(), f = !0), Le(
|
|
2921
|
+
c,
|
|
2922
|
+
(p, S) => Bn(t, s, a, p, S, n, f)
|
|
2923
|
+
), Ir(t, a, !1), n && t.patches_ && pe("Patches").generatePatches_(
|
|
2924
|
+
s,
|
|
2925
|
+
n,
|
|
2926
|
+
t.patches_,
|
|
2927
|
+
t.inversePatches_
|
|
2928
|
+
);
|
|
2929
|
+
}
|
|
2930
|
+
return s.copy_;
|
|
2931
|
+
}
|
|
2932
|
+
function Bn(t, r, n, s, a, c, f) {
|
|
2933
|
+
if (process.env.NODE_ENV !== "production" && a === n && rt(5), de(a)) {
|
|
2934
|
+
const p = c && r && r.type_ !== 3 && // Set objects are atomic since they have no keys.
|
|
2935
|
+
!$e(r.assigned_, s) ? c.concat(s) : void 0, S = yr(t, a, p);
|
|
2936
|
+
if (_s(n, s, S), de(S))
|
|
2937
|
+
t.canAutoFreeze_ = !1;
|
|
2938
|
+
else
|
|
2939
|
+
return;
|
|
2940
|
+
} else f && n.add(a);
|
|
2941
|
+
if (Jt(a) && !vr(a)) {
|
|
2942
|
+
if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1)
|
|
2943
|
+
return;
|
|
2944
|
+
yr(t, a), (!r || !r.scope_.parent_) && typeof s != "symbol" && Object.prototype.propertyIsEnumerable.call(n, s) && Ir(t, a);
|
|
2945
|
+
}
|
|
2946
|
+
}
|
|
2947
|
+
function Ir(t, r, n = !1) {
|
|
2948
|
+
!t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && On(r, n);
|
|
2949
|
+
}
|
|
2950
|
+
function Ai(t, r) {
|
|
2951
|
+
const n = Array.isArray(t), s = {
|
|
2952
|
+
type_: n ? 1 : 0,
|
|
2953
|
+
// Track which produce call this is associated with.
|
|
2954
|
+
scope_: r ? r.scope_ : vs(),
|
|
2955
|
+
// True for both shallow and deep changes.
|
|
2956
|
+
modified_: !1,
|
|
2957
|
+
// Used during finalization.
|
|
2958
|
+
finalized_: !1,
|
|
2959
|
+
// Track which properties have been assigned (true) or deleted (false).
|
|
2960
|
+
assigned_: {},
|
|
2961
|
+
// The parent draft state.
|
|
2962
|
+
parent_: r,
|
|
2963
|
+
// The base state.
|
|
2964
|
+
base_: t,
|
|
2965
|
+
// The base proxy.
|
|
2966
|
+
draft_: null,
|
|
2967
|
+
// set below
|
|
2968
|
+
// The base copy with any updated values.
|
|
2969
|
+
copy_: null,
|
|
2970
|
+
// Called by the `produce` function.
|
|
2971
|
+
revoke_: null,
|
|
2972
|
+
isManual_: !1
|
|
2973
|
+
};
|
|
2974
|
+
let a = s, c = xn;
|
|
2975
|
+
n && (a = [s], c = We);
|
|
2976
|
+
const { revoke: f, proxy: p } = Proxy.revocable(a, c);
|
|
2977
|
+
return s.draft_ = p, s.revoke_ = f, p;
|
|
2978
|
+
}
|
|
2979
|
+
var xn = {
|
|
2980
|
+
get(t, r) {
|
|
2981
|
+
if (r === St)
|
|
2982
|
+
return t;
|
|
2983
|
+
const n = ce(t);
|
|
2984
|
+
if (!$e(n, r))
|
|
2985
|
+
return Di(t, n, r);
|
|
2986
|
+
const s = n[r];
|
|
2987
|
+
return t.finalized_ || !Jt(s) ? s : s === ln(t.base_, r) ? (dn(t), t.copy_[r] = Mn(s, t)) : s;
|
|
2988
|
+
},
|
|
2989
|
+
has(t, r) {
|
|
2990
|
+
return r in ce(t);
|
|
2991
|
+
},
|
|
2992
|
+
ownKeys(t) {
|
|
2993
|
+
return Reflect.ownKeys(ce(t));
|
|
2994
|
+
},
|
|
2995
|
+
set(t, r, n) {
|
|
2996
|
+
const s = ks(ce(t), r);
|
|
2997
|
+
if (s != null && s.set)
|
|
2998
|
+
return s.set.call(t.draft_, n), !0;
|
|
2999
|
+
if (!t.modified_) {
|
|
3000
|
+
const a = ln(ce(t), r), c = a == null ? void 0 : a[St];
|
|
3001
|
+
if (c && c.base_ === n)
|
|
3002
|
+
return t.copy_[r] = n, t.assigned_[r] = !1, !0;
|
|
3003
|
+
if (Si(n, a) && (n !== void 0 || $e(t.base_, r)))
|
|
3004
|
+
return !0;
|
|
3005
|
+
dn(t), Tn(t);
|
|
3006
|
+
}
|
|
3007
|
+
return t.copy_[r] === n && // special case: handle new props with value 'undefined'
|
|
3008
|
+
(n !== void 0 || r in t.copy_) || // special case: NaN
|
|
3009
|
+
Number.isNaN(n) && Number.isNaN(t.copy_[r]) || (t.copy_[r] = n, t.assigned_[r] = !0), !0;
|
|
3010
|
+
},
|
|
3011
|
+
deleteProperty(t, r) {
|
|
3012
|
+
return ln(t.base_, r) !== void 0 || r in t.base_ ? (t.assigned_[r] = !1, dn(t), Tn(t)) : delete t.assigned_[r], t.copy_ && delete t.copy_[r], !0;
|
|
3013
|
+
},
|
|
3014
|
+
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
3015
|
+
// the same guarantee in ES5 mode.
|
|
3016
|
+
getOwnPropertyDescriptor(t, r) {
|
|
3017
|
+
const n = ce(t), s = Reflect.getOwnPropertyDescriptor(n, r);
|
|
3018
|
+
return s && {
|
|
3019
|
+
writable: !0,
|
|
3020
|
+
configurable: t.type_ !== 1 || r !== "length",
|
|
3021
|
+
enumerable: s.enumerable,
|
|
3022
|
+
value: n[r]
|
|
3023
|
+
};
|
|
3024
|
+
},
|
|
3025
|
+
defineProperty() {
|
|
3026
|
+
rt(11);
|
|
3027
|
+
},
|
|
3028
|
+
getPrototypeOf(t) {
|
|
3029
|
+
return le(t.base_);
|
|
3030
|
+
},
|
|
3031
|
+
setPrototypeOf() {
|
|
3032
|
+
rt(12);
|
|
3033
|
+
}
|
|
3034
|
+
}, We = {};
|
|
3035
|
+
Le(xn, (t, r) => {
|
|
3036
|
+
We[t] = function() {
|
|
3037
|
+
return arguments[0] = arguments[0][0], r.apply(this, arguments);
|
|
3038
|
+
};
|
|
3039
|
+
});
|
|
3040
|
+
We.deleteProperty = function(t, r) {
|
|
3041
|
+
return process.env.NODE_ENV !== "production" && isNaN(parseInt(r)) && rt(13), We.set.call(this, t, r, void 0);
|
|
3042
|
+
};
|
|
3043
|
+
We.set = function(t, r, n) {
|
|
3044
|
+
return process.env.NODE_ENV !== "production" && r !== "length" && isNaN(parseInt(r)) && rt(14), xn.set.call(this, t[0], r, n, t[0]);
|
|
3045
|
+
};
|
|
3046
|
+
function ln(t, r) {
|
|
3047
|
+
const n = t[St];
|
|
3048
|
+
return (n ? ce(n) : t)[r];
|
|
3049
|
+
}
|
|
3050
|
+
function Di(t, r, n) {
|
|
3051
|
+
var a;
|
|
3052
|
+
const s = ks(r, n);
|
|
3053
|
+
return s ? "value" in s ? s.value : (
|
|
3054
|
+
// This is a very special case, if the prop is a getter defined by the
|
|
3055
|
+
// prototype, we should invoke it with the draft as context!
|
|
3056
|
+
(a = s.get) == null ? void 0 : a.call(t.draft_)
|
|
3057
|
+
) : void 0;
|
|
3058
|
+
}
|
|
3059
|
+
function ks(t, r) {
|
|
3060
|
+
if (!(r in t))
|
|
3061
|
+
return;
|
|
3062
|
+
let n = le(t);
|
|
3063
|
+
for (; n; ) {
|
|
3064
|
+
const s = Object.getOwnPropertyDescriptor(n, r);
|
|
3065
|
+
if (s)
|
|
3066
|
+
return s;
|
|
3067
|
+
n = le(n);
|
|
3068
|
+
}
|
|
3069
|
+
}
|
|
3070
|
+
function Tn(t) {
|
|
3071
|
+
t.modified_ || (t.modified_ = !0, t.parent_ && Tn(t.parent_));
|
|
3072
|
+
}
|
|
3073
|
+
function dn(t) {
|
|
3074
|
+
t.copy_ || (t.copy_ = vn(
|
|
3075
|
+
t.base_,
|
|
3076
|
+
t.scope_.immer_.useStrictShallowCopy_
|
|
3077
|
+
));
|
|
3078
|
+
}
|
|
3079
|
+
var Oi = class {
|
|
3080
|
+
constructor(t) {
|
|
3081
|
+
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (r, n, s) => {
|
|
3082
|
+
if (typeof r == "function" && typeof n != "function") {
|
|
3083
|
+
const c = n;
|
|
3084
|
+
n = r;
|
|
3085
|
+
const f = this;
|
|
3086
|
+
return function(S = c, ...A) {
|
|
3087
|
+
return f.produce(S, (k) => n.call(this, k, ...A));
|
|
3088
|
+
};
|
|
3089
|
+
}
|
|
3090
|
+
typeof n != "function" && rt(6), s !== void 0 && typeof s != "function" && rt(7);
|
|
3091
|
+
let a;
|
|
3092
|
+
if (Jt(r)) {
|
|
3093
|
+
const c = Gn(this), f = Mn(r, void 0);
|
|
3094
|
+
let p = !0;
|
|
3095
|
+
try {
|
|
3096
|
+
a = n(f), p = !1;
|
|
3097
|
+
} finally {
|
|
3098
|
+
p ? Sn(c) : wn(c);
|
|
3099
|
+
}
|
|
3100
|
+
return Wn(c, s), Yn(a, c);
|
|
3101
|
+
} else if (!r || typeof r != "object") {
|
|
3102
|
+
if (a = n(r), a === void 0 && (a = r), a === Dn && (a = void 0), this.autoFreeze_ && On(a, !0), s) {
|
|
3103
|
+
const c = [], f = [];
|
|
3104
|
+
pe("Patches").generateReplacementPatches_(r, a, c, f), s(c, f);
|
|
3105
|
+
}
|
|
3106
|
+
return a;
|
|
3107
|
+
} else
|
|
3108
|
+
rt(1, r);
|
|
3109
|
+
}, this.produceWithPatches = (r, n) => {
|
|
3110
|
+
if (typeof r == "function")
|
|
3111
|
+
return (f, ...p) => this.produceWithPatches(f, (S) => r(S, ...p));
|
|
3112
|
+
let s, a;
|
|
3113
|
+
return [this.produce(r, n, (f, p) => {
|
|
3114
|
+
s = f, a = p;
|
|
3115
|
+
}), s, a];
|
|
3116
|
+
}, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
|
|
3117
|
+
}
|
|
3118
|
+
createDraft(t) {
|
|
3119
|
+
Jt(t) || rt(8), de(t) && (t = xi(t));
|
|
3120
|
+
const r = Gn(this), n = Mn(t, void 0);
|
|
3121
|
+
return n[St].isManual_ = !0, wn(r), n;
|
|
3122
|
+
}
|
|
3123
|
+
finishDraft(t, r) {
|
|
3124
|
+
const n = t && t[St];
|
|
3125
|
+
(!n || !n.isManual_) && rt(9);
|
|
3126
|
+
const { scope_: s } = n;
|
|
3127
|
+
return Wn(s, r), Yn(void 0, s);
|
|
3128
|
+
}
|
|
3129
|
+
/**
|
|
3130
|
+
* Pass true to automatically freeze all copies created by Immer.
|
|
3131
|
+
*
|
|
3132
|
+
* By default, auto-freezing is enabled.
|
|
3133
|
+
*/
|
|
3134
|
+
setAutoFreeze(t) {
|
|
3135
|
+
this.autoFreeze_ = t;
|
|
3136
|
+
}
|
|
3137
|
+
/**
|
|
3138
|
+
* Pass true to enable strict shallow copy.
|
|
3139
|
+
*
|
|
3140
|
+
* By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
|
|
3141
|
+
*/
|
|
3142
|
+
setUseStrictShallowCopy(t) {
|
|
3143
|
+
this.useStrictShallowCopy_ = t;
|
|
3144
|
+
}
|
|
3145
|
+
applyPatches(t, r) {
|
|
3146
|
+
let n;
|
|
3147
|
+
for (n = r.length - 1; n >= 0; n--) {
|
|
3148
|
+
const a = r[n];
|
|
3149
|
+
if (a.path.length === 0 && a.op === "replace") {
|
|
3150
|
+
t = a.value;
|
|
3151
|
+
break;
|
|
3152
|
+
}
|
|
3153
|
+
}
|
|
3154
|
+
n > -1 && (r = r.slice(n + 1));
|
|
3155
|
+
const s = pe("Patches").applyPatches_;
|
|
3156
|
+
return de(t) ? s(t, r) : this.produce(
|
|
3157
|
+
t,
|
|
3158
|
+
(a) => s(a, r)
|
|
3159
|
+
);
|
|
3160
|
+
}
|
|
3161
|
+
};
|
|
3162
|
+
function Mn(t, r) {
|
|
3163
|
+
const n = Ke(t) ? pe("MapSet").proxyMap_(t, r) : Xe(t) ? pe("MapSet").proxySet_(t, r) : Ai(t, r);
|
|
3164
|
+
return (r ? r.scope_ : vs()).drafts_.push(n), n;
|
|
3165
|
+
}
|
|
3166
|
+
function xi(t) {
|
|
3167
|
+
return de(t) || rt(10, t), Ss(t);
|
|
3168
|
+
}
|
|
3169
|
+
function Ss(t) {
|
|
3170
|
+
if (!Jt(t) || vr(t))
|
|
3171
|
+
return t;
|
|
3172
|
+
const r = t[St];
|
|
3173
|
+
let n;
|
|
3174
|
+
if (r) {
|
|
3175
|
+
if (!r.modified_)
|
|
3176
|
+
return r.base_;
|
|
3177
|
+
r.finalized_ = !0, n = vn(t, r.scope_.immer_.useStrictShallowCopy_);
|
|
3178
|
+
} else
|
|
3179
|
+
n = vn(t, !0);
|
|
3180
|
+
return Le(n, (s, a) => {
|
|
3181
|
+
_s(n, s, Ss(a));
|
|
3182
|
+
}), r && (r.finalized_ = !1), n;
|
|
3183
|
+
}
|
|
3184
|
+
function Kn() {
|
|
3185
|
+
process.env.NODE_ENV !== "production" && gs.push(
|
|
3186
|
+
'Sets cannot have "replace" patches.',
|
|
3187
|
+
function(y) {
|
|
3188
|
+
return "Unsupported patch operation: " + y;
|
|
3189
|
+
},
|
|
3190
|
+
function(y) {
|
|
3191
|
+
return "Cannot apply patch, path doesn't resolve: " + y;
|
|
3192
|
+
},
|
|
3193
|
+
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
|
|
3194
|
+
);
|
|
3195
|
+
const r = "replace", n = "add", s = "remove";
|
|
3196
|
+
function a(y, M, C, u) {
|
|
3197
|
+
switch (y.type_) {
|
|
3198
|
+
case 0:
|
|
3199
|
+
case 2:
|
|
3200
|
+
return f(
|
|
3201
|
+
y,
|
|
3202
|
+
M,
|
|
3203
|
+
C,
|
|
3204
|
+
u
|
|
3205
|
+
);
|
|
3206
|
+
case 1:
|
|
3207
|
+
return c(y, M, C, u);
|
|
3208
|
+
case 3:
|
|
3209
|
+
return p(
|
|
3210
|
+
y,
|
|
3211
|
+
M,
|
|
3212
|
+
C,
|
|
3213
|
+
u
|
|
3214
|
+
);
|
|
3215
|
+
}
|
|
3216
|
+
}
|
|
3217
|
+
function c(y, M, C, u) {
|
|
3218
|
+
let { base_: d, assigned_: g } = y, b = y.copy_;
|
|
3219
|
+
b.length < d.length && ([d, b] = [b, d], [C, u] = [u, C]);
|
|
3220
|
+
for (let _ = 0; _ < d.length; _++)
|
|
3221
|
+
if (g[_] && b[_] !== d[_]) {
|
|
3222
|
+
const h = M.concat([_]);
|
|
3223
|
+
C.push({
|
|
3224
|
+
op: r,
|
|
3225
|
+
path: h,
|
|
3226
|
+
// Need to maybe clone it, as it can in fact be the original value
|
|
3227
|
+
// due to the base/copy inversion at the start of this function
|
|
3228
|
+
value: T(b[_])
|
|
3229
|
+
}), u.push({
|
|
3230
|
+
op: r,
|
|
3231
|
+
path: h,
|
|
3232
|
+
value: T(d[_])
|
|
3233
|
+
});
|
|
3234
|
+
}
|
|
3235
|
+
for (let _ = d.length; _ < b.length; _++) {
|
|
3236
|
+
const h = M.concat([_]);
|
|
3237
|
+
C.push({
|
|
3238
|
+
op: n,
|
|
3239
|
+
path: h,
|
|
3240
|
+
// Need to maybe clone it, as it can in fact be the original value
|
|
3241
|
+
// due to the base/copy inversion at the start of this function
|
|
3242
|
+
value: T(b[_])
|
|
3243
|
+
});
|
|
3244
|
+
}
|
|
3245
|
+
for (let _ = b.length - 1; d.length <= _; --_) {
|
|
3246
|
+
const h = M.concat([_]);
|
|
3247
|
+
u.push({
|
|
3248
|
+
op: s,
|
|
3249
|
+
path: h
|
|
3250
|
+
});
|
|
3251
|
+
}
|
|
3252
|
+
}
|
|
3253
|
+
function f(y, M, C, u) {
|
|
3254
|
+
const { base_: d, copy_: g } = y;
|
|
3255
|
+
Le(y.assigned_, (b, _) => {
|
|
3256
|
+
const h = un(d, b), v = un(g, b), I = _ ? $e(d, b) ? r : n : s;
|
|
3257
|
+
if (h === v && I === r)
|
|
3258
|
+
return;
|
|
3259
|
+
const m = M.concat(b);
|
|
3260
|
+
C.push(I === s ? { op: I, path: m } : { op: I, path: m, value: v }), u.push(
|
|
3261
|
+
I === n ? { op: s, path: m } : I === s ? { op: n, path: m, value: T(h) } : { op: r, path: m, value: T(h) }
|
|
3262
|
+
);
|
|
3263
|
+
});
|
|
3264
|
+
}
|
|
3265
|
+
function p(y, M, C, u) {
|
|
3266
|
+
let { base_: d, copy_: g } = y, b = 0;
|
|
3267
|
+
d.forEach((_) => {
|
|
3268
|
+
if (!g.has(_)) {
|
|
3269
|
+
const h = M.concat([b]);
|
|
3270
|
+
C.push({
|
|
3271
|
+
op: s,
|
|
3272
|
+
path: h,
|
|
3273
|
+
value: _
|
|
3274
|
+
}), u.unshift({
|
|
3275
|
+
op: n,
|
|
3276
|
+
path: h,
|
|
3277
|
+
value: _
|
|
3278
|
+
});
|
|
3279
|
+
}
|
|
3280
|
+
b++;
|
|
3281
|
+
}), b = 0, g.forEach((_) => {
|
|
3282
|
+
if (!d.has(_)) {
|
|
3283
|
+
const h = M.concat([b]);
|
|
3284
|
+
C.push({
|
|
3285
|
+
op: n,
|
|
3286
|
+
path: h,
|
|
3287
|
+
value: _
|
|
3288
|
+
}), u.unshift({
|
|
3289
|
+
op: s,
|
|
3290
|
+
path: h,
|
|
3291
|
+
value: _
|
|
3292
|
+
});
|
|
3293
|
+
}
|
|
3294
|
+
b++;
|
|
3295
|
+
});
|
|
3296
|
+
}
|
|
3297
|
+
function S(y, M, C, u) {
|
|
3298
|
+
C.push({
|
|
3299
|
+
op: r,
|
|
3300
|
+
path: [],
|
|
3301
|
+
value: M === Dn ? void 0 : M
|
|
3302
|
+
}), u.push({
|
|
3303
|
+
op: r,
|
|
3304
|
+
path: [],
|
|
3305
|
+
value: y
|
|
3306
|
+
});
|
|
3307
|
+
}
|
|
3308
|
+
function A(y, M) {
|
|
3309
|
+
return M.forEach((C) => {
|
|
3310
|
+
const { path: u, op: d } = C;
|
|
3311
|
+
let g = y;
|
|
3312
|
+
for (let v = 0; v < u.length - 1; v++) {
|
|
3313
|
+
const I = fe(g);
|
|
3314
|
+
let m = u[v];
|
|
3315
|
+
typeof m != "string" && typeof m != "number" && (m = "" + m), (I === 0 || I === 1) && (m === "__proto__" || m === "constructor") && rt(19), typeof g == "function" && m === "prototype" && rt(19), g = un(g, m), typeof g != "object" && rt(18, u.join("/"));
|
|
3316
|
+
}
|
|
3317
|
+
const b = fe(g), _ = k(C.value), h = u[u.length - 1];
|
|
3318
|
+
switch (d) {
|
|
3319
|
+
case r:
|
|
3320
|
+
switch (b) {
|
|
3321
|
+
case 2:
|
|
3322
|
+
return g.set(h, _);
|
|
3323
|
+
case 3:
|
|
3324
|
+
rt(16);
|
|
3325
|
+
default:
|
|
3326
|
+
return g[h] = _;
|
|
3327
|
+
}
|
|
3328
|
+
case n:
|
|
3329
|
+
switch (b) {
|
|
3330
|
+
case 1:
|
|
3331
|
+
return h === "-" ? g.push(_) : g.splice(h, 0, _);
|
|
3332
|
+
case 2:
|
|
3333
|
+
return g.set(h, _);
|
|
3334
|
+
case 3:
|
|
3335
|
+
return g.add(_);
|
|
3336
|
+
default:
|
|
3337
|
+
return g[h] = _;
|
|
3338
|
+
}
|
|
3339
|
+
case s:
|
|
3340
|
+
switch (b) {
|
|
3341
|
+
case 1:
|
|
3342
|
+
return g.splice(h, 1);
|
|
3343
|
+
case 2:
|
|
3344
|
+
return g.delete(h);
|
|
3345
|
+
case 3:
|
|
3346
|
+
return g.delete(C.value);
|
|
3347
|
+
default:
|
|
3348
|
+
return delete g[h];
|
|
3349
|
+
}
|
|
3350
|
+
default:
|
|
3351
|
+
rt(17, d);
|
|
3352
|
+
}
|
|
3353
|
+
}), y;
|
|
3354
|
+
}
|
|
3355
|
+
function k(y) {
|
|
3356
|
+
if (!Jt(y))
|
|
3357
|
+
return y;
|
|
3358
|
+
if (Array.isArray(y))
|
|
3359
|
+
return y.map(k);
|
|
3360
|
+
if (Ke(y))
|
|
3361
|
+
return new Map(
|
|
3362
|
+
Array.from(y.entries()).map(([C, u]) => [C, k(u)])
|
|
3363
|
+
);
|
|
3364
|
+
if (Xe(y))
|
|
3365
|
+
return new Set(Array.from(y).map(k));
|
|
3366
|
+
const M = Object.create(le(y));
|
|
3367
|
+
for (const C in y)
|
|
3368
|
+
M[C] = k(y[C]);
|
|
3369
|
+
return $e(y, He) && (M[He] = y[He]), M;
|
|
3370
|
+
}
|
|
3371
|
+
function T(y) {
|
|
3372
|
+
return de(y) ? k(y) : y;
|
|
3373
|
+
}
|
|
3374
|
+
Ti("Patches", {
|
|
3375
|
+
applyPatches_: A,
|
|
3376
|
+
generatePatches_: a,
|
|
3377
|
+
generateReplacementPatches_: S
|
|
3378
|
+
});
|
|
3379
|
+
}
|
|
3380
|
+
var wt = new Oi(), Pi = wt.produce;
|
|
3381
|
+
wt.produceWithPatches.bind(
|
|
3382
|
+
wt
|
|
3383
|
+
);
|
|
3384
|
+
wt.setAutoFreeze.bind(wt);
|
|
3385
|
+
wt.setUseStrictShallowCopy.bind(wt);
|
|
3386
|
+
var Ci = wt.applyPatches.bind(wt);
|
|
3387
|
+
wt.createDraft.bind(wt);
|
|
3388
|
+
wt.finishDraft.bind(wt);
|
|
3389
|
+
var Ri = 1 / 0, Fi = 9007199254740991, ji = "[object Arguments]", zi = "[object Function]", Ni = "[object GeneratorFunction]", Hi = "[object Symbol]", Li = typeof Dt == "object" && Dt && Dt.Object === Object && Dt, $i = typeof self == "object" && self && self.Object === Object && self, Ui = Li || $i || Function("return this")();
|
|
3390
|
+
function Wi(t, r, n) {
|
|
3391
|
+
switch (n.length) {
|
|
3392
|
+
case 0:
|
|
3393
|
+
return t.call(r);
|
|
3394
|
+
case 1:
|
|
3395
|
+
return t.call(r, n[0]);
|
|
3396
|
+
case 2:
|
|
3397
|
+
return t.call(r, n[0], n[1]);
|
|
3398
|
+
case 3:
|
|
3399
|
+
return t.call(r, n[0], n[1], n[2]);
|
|
3400
|
+
}
|
|
3401
|
+
return t.apply(r, n);
|
|
3402
|
+
}
|
|
3403
|
+
function Gi(t, r) {
|
|
3404
|
+
for (var n = -1, s = t ? t.length : 0, a = Array(s); ++n < s; )
|
|
3405
|
+
a[n] = r(t[n], n, t);
|
|
3406
|
+
return a;
|
|
3407
|
+
}
|
|
3408
|
+
function Yi(t, r) {
|
|
3409
|
+
for (var n = -1, s = r.length, a = t.length; ++n < s; )
|
|
3410
|
+
t[a + n] = r[n];
|
|
3411
|
+
return t;
|
|
3412
|
+
}
|
|
3413
|
+
var Pn = Object.prototype, Bi = Pn.hasOwnProperty, Cn = Pn.toString, Xn = Ui.Symbol, Ki = Pn.propertyIsEnumerable, Vn = Xn ? Xn.isConcatSpreadable : void 0, Jn = Math.max;
|
|
3414
|
+
function Xi(t, r, n, s, a) {
|
|
3415
|
+
var c = -1, f = t.length;
|
|
3416
|
+
for (n || (n = Zi), a || (a = []); ++c < f; ) {
|
|
3417
|
+
var p = t[c];
|
|
3418
|
+
n(p) ? Yi(a, p) : a[a.length] = p;
|
|
3419
|
+
}
|
|
3420
|
+
return a;
|
|
3421
|
+
}
|
|
3422
|
+
function Vi(t, r) {
|
|
3423
|
+
return t = Object(t), Ji(t, r, function(n, s) {
|
|
3424
|
+
return s in t;
|
|
3425
|
+
});
|
|
3426
|
+
}
|
|
3427
|
+
function Ji(t, r, n) {
|
|
3428
|
+
for (var s = -1, a = r.length, c = {}; ++s < a; ) {
|
|
3429
|
+
var f = r[s], p = t[f];
|
|
3430
|
+
n(p, f) && (c[f] = p);
|
|
3431
|
+
}
|
|
3432
|
+
return c;
|
|
3433
|
+
}
|
|
3434
|
+
function qi(t, r) {
|
|
3435
|
+
return r = Jn(r === void 0 ? t.length - 1 : r, 0), function() {
|
|
3436
|
+
for (var n = arguments, s = -1, a = Jn(n.length - r, 0), c = Array(a); ++s < a; )
|
|
3437
|
+
c[s] = n[r + s];
|
|
3438
|
+
s = -1;
|
|
3439
|
+
for (var f = Array(r + 1); ++s < r; )
|
|
3440
|
+
f[s] = n[s];
|
|
3441
|
+
return f[r] = c, Wi(t, this, f);
|
|
3442
|
+
};
|
|
3443
|
+
}
|
|
3444
|
+
function Zi(t) {
|
|
3445
|
+
return ea(t) || ta(t) || !!(Vn && t && t[Vn]);
|
|
3446
|
+
}
|
|
3447
|
+
function Qi(t) {
|
|
3448
|
+
if (typeof t == "string" || oa(t))
|
|
3449
|
+
return t;
|
|
3450
|
+
var r = t + "";
|
|
3451
|
+
return r == "0" && 1 / t == -Ri ? "-0" : r;
|
|
3452
|
+
}
|
|
3453
|
+
function ta(t) {
|
|
3454
|
+
return na(t) && Bi.call(t, "callee") && (!Ki.call(t, "callee") || Cn.call(t) == ji);
|
|
3455
|
+
}
|
|
3456
|
+
var ea = Array.isArray;
|
|
3457
|
+
function ra(t) {
|
|
3458
|
+
return t != null && ia(t.length) && !sa(t);
|
|
3459
|
+
}
|
|
3460
|
+
function na(t) {
|
|
3461
|
+
return ws(t) && ra(t);
|
|
3462
|
+
}
|
|
3463
|
+
function sa(t) {
|
|
3464
|
+
var r = aa(t) ? Cn.call(t) : "";
|
|
3465
|
+
return r == zi || r == Ni;
|
|
3466
|
+
}
|
|
3467
|
+
function ia(t) {
|
|
3468
|
+
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= Fi;
|
|
3469
|
+
}
|
|
3470
|
+
function aa(t) {
|
|
3471
|
+
var r = typeof t;
|
|
3472
|
+
return !!t && (r == "object" || r == "function");
|
|
3473
|
+
}
|
|
3474
|
+
function ws(t) {
|
|
3475
|
+
return !!t && typeof t == "object";
|
|
3476
|
+
}
|
|
3477
|
+
function oa(t) {
|
|
3478
|
+
return typeof t == "symbol" || ws(t) && Cn.call(t) == Hi;
|
|
3479
|
+
}
|
|
3480
|
+
var ca = qi(function(t, r) {
|
|
3481
|
+
return t == null ? {} : Vi(t, Gi(Xi(r), Qi));
|
|
3482
|
+
}), ua = ca;
|
|
3483
|
+
const qn = /* @__PURE__ */ En(ua), la = {
|
|
3484
|
+
width: 1080,
|
|
3485
|
+
height: 1920
|
|
3486
|
+
}, da = 30, fa = {
|
|
3487
|
+
size: la,
|
|
3488
|
+
fps: da,
|
|
3489
|
+
tracks: [],
|
|
3490
|
+
trackItemIds: [],
|
|
3491
|
+
trackItemsMap: {},
|
|
3492
|
+
transitionIds: [],
|
|
3493
|
+
transitionsMap: {},
|
|
3494
|
+
scale: {
|
|
3495
|
+
unit: 1,
|
|
3496
|
+
zoom: 1,
|
|
3497
|
+
segments: 1,
|
|
3498
|
+
index: 1
|
|
3499
|
+
},
|
|
3500
|
+
duration: 0,
|
|
3501
|
+
activeIds: [],
|
|
3502
|
+
trackItemDetailsMap: {},
|
|
3503
|
+
structure: []
|
|
3504
|
+
}, Zn = [
|
|
3505
|
+
"tracks",
|
|
3506
|
+
"trackItemsMap",
|
|
3507
|
+
"trackItemDetailsMap",
|
|
3508
|
+
"transitionIds",
|
|
3509
|
+
"transitionsMap",
|
|
3510
|
+
"trackItemIds",
|
|
3511
|
+
"structure"
|
|
3512
|
+
];
|
|
3513
|
+
class Ua {
|
|
3514
|
+
constructor(r) {
|
|
3515
|
+
ie(this, "stateSubject");
|
|
3516
|
+
ie(this, "stateHistorySubject");
|
|
3517
|
+
ie(this, "prevState");
|
|
3518
|
+
ie(this, "undos", []);
|
|
3519
|
+
ie(this, "redos", []);
|
|
3520
|
+
ie(this, "listener");
|
|
3521
|
+
const n = Object.assign({}, fa, r);
|
|
3522
|
+
this.stateSubject = new Ln(n), this.stateHistorySubject = new Ln({
|
|
3523
|
+
handleRedo: !1,
|
|
3524
|
+
handleUndo: !1
|
|
3525
|
+
}), this.prevState = n, this.initListeners();
|
|
3526
|
+
}
|
|
3527
|
+
initListeners() {
|
|
3528
|
+
_i(this);
|
|
3529
|
+
}
|
|
3530
|
+
destroyListeners() {
|
|
3531
|
+
this.listener && this.listener.unsubscribe();
|
|
3532
|
+
}
|
|
3533
|
+
purge() {
|
|
3534
|
+
this.destroyListeners();
|
|
3535
|
+
}
|
|
3536
|
+
updateHistory(r, n) {
|
|
3537
|
+
const s = qn(r, Zn), a = qn(this.getState(), Zn), c = Is(a, s);
|
|
3538
|
+
c.length && (this.undos.push({ undos: c, type: n }), this.redos = []);
|
|
3539
|
+
}
|
|
3540
|
+
getStateHistory() {
|
|
3541
|
+
return this.stateHistorySubject.getValue();
|
|
3542
|
+
}
|
|
3543
|
+
subscribeHistory(r) {
|
|
3544
|
+
return this.stateHistorySubject.subscribe(r);
|
|
3545
|
+
}
|
|
3546
|
+
// Get the current state
|
|
3547
|
+
getState() {
|
|
3548
|
+
return this.stateSubject.getValue();
|
|
3549
|
+
}
|
|
3550
|
+
// Subscribe to state changes
|
|
3551
|
+
subscribe(r) {
|
|
3552
|
+
return this.stateSubject.subscribe(r);
|
|
3553
|
+
}
|
|
3554
|
+
// Update the state, emitting only if the part of the state has changed
|
|
3555
|
+
updateState(r, n = { updateHistory: !1 }) {
|
|
3556
|
+
const s = this.getState(), a = {
|
|
3557
|
+
...B(s),
|
|
3558
|
+
...B(r)
|
|
3559
|
+
};
|
|
3560
|
+
nt(s, a) || (n.updateHistory && this.updateHistory(a, n.kind), this.prevState = s, this.stateSubject.next(a));
|
|
3561
|
+
}
|
|
3562
|
+
// emit changes for design size
|
|
3563
|
+
subscribeToSize(r) {
|
|
3564
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3565
|
+
nt(n.size, this.prevState.size) || r({ size: n.size });
|
|
3566
|
+
});
|
|
3567
|
+
}
|
|
3568
|
+
// Selectively subscribe to scale changes
|
|
3569
|
+
subscribeToScale(r) {
|
|
3570
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3571
|
+
nt(n.scale, this.prevState.scale) || r({ scale: n.scale });
|
|
3572
|
+
});
|
|
3573
|
+
}
|
|
3574
|
+
// Selectively subscribe to fps changes
|
|
3575
|
+
subscribeToFps(r) {
|
|
3576
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3577
|
+
n.fps !== this.prevState.fps && r({ fps: n.fps });
|
|
3578
|
+
});
|
|
3579
|
+
}
|
|
3580
|
+
subscribeToUpdateTrackItem(r) {
|
|
3581
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3582
|
+
nt(n.trackItemsMap, this.prevState.trackItemsMap) || r({ trackItemsMap: n.trackItemsMap });
|
|
3583
|
+
});
|
|
3584
|
+
}
|
|
3585
|
+
subscribeToUpdateAnimations(r) {
|
|
3586
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3587
|
+
const s = Object.keys(n.trackItemsMap).filter(
|
|
3588
|
+
(a) => {
|
|
3589
|
+
const c = this.prevState.trackItemsMap[a], f = n.trackItemsMap[a];
|
|
3590
|
+
return c && f && !nt(c.animations, f.animations);
|
|
3591
|
+
}
|
|
3592
|
+
);
|
|
3593
|
+
r({ trackItemsMap: n.trackItemsMap, changedAnimationIds: s });
|
|
3594
|
+
});
|
|
3595
|
+
}
|
|
3596
|
+
subscribeToUpdateTrackItemTiming(r) {
|
|
3597
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3598
|
+
if (!nt(n.trackItemsMap, this.prevState.trackItemsMap)) {
|
|
3599
|
+
const s = Object.keys(n.trackItemsMap).filter((c) => {
|
|
3600
|
+
const f = this.prevState.trackItemsMap[c], p = n.trackItemsMap[c];
|
|
3601
|
+
return f && p && !nt(f.trim, p.trim);
|
|
3602
|
+
}), a = Object.keys(n.trackItemsMap).filter(
|
|
3603
|
+
(c) => {
|
|
3604
|
+
const f = this.prevState.trackItemsMap[c], p = n.trackItemsMap[c];
|
|
3605
|
+
return f && p && !nt(f.display, p.display);
|
|
3606
|
+
}
|
|
3607
|
+
);
|
|
3608
|
+
r({
|
|
3609
|
+
trackItemsMap: n.trackItemsMap,
|
|
3610
|
+
changedTrimIds: s.length > 0 ? s : void 0,
|
|
3611
|
+
changedDisplayIds: a.length > 0 ? a : void 0
|
|
3612
|
+
});
|
|
3613
|
+
}
|
|
3614
|
+
});
|
|
3615
|
+
}
|
|
3616
|
+
subscribeToUpdateItemDetails(r) {
|
|
3617
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3618
|
+
nt(n.trackItemDetailsMap, this.prevState.trackItemDetailsMap) || r({ trackItemDetailsMap: n.trackItemDetailsMap });
|
|
3619
|
+
});
|
|
3620
|
+
}
|
|
3621
|
+
// Selectively subscribe to duration changes
|
|
3622
|
+
subscribeToDuration(r) {
|
|
3623
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3624
|
+
n.duration !== this.prevState.duration && r({ duration: n.duration });
|
|
3625
|
+
});
|
|
3626
|
+
}
|
|
3627
|
+
subscribeToHistory(r) {
|
|
3628
|
+
return this.stateHistorySubject.asObservable().subscribe((n) => {
|
|
3629
|
+
if (n.handleRedo) {
|
|
3630
|
+
const s = this.undos[this.undos.length - 1].type;
|
|
3631
|
+
r({ ...this.getState(), type: s }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !1 });
|
|
3632
|
+
}
|
|
3633
|
+
if (n.handleUndo) {
|
|
3634
|
+
const s = this.redos[this.redos.length - 1].type;
|
|
3635
|
+
r({ ...this.getState(), type: s }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !1 });
|
|
3636
|
+
}
|
|
3637
|
+
});
|
|
3638
|
+
}
|
|
3639
|
+
subscribeToAddOrRemoveItems(r) {
|
|
3640
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3641
|
+
const s = [...n.trackItemIds].sort(), a = [...this.prevState.trackItemIds].sort();
|
|
3642
|
+
nt(s, a) || r({ trackItemIds: n.trackItemIds });
|
|
3643
|
+
});
|
|
3644
|
+
}
|
|
3645
|
+
// Selectively subscribe to activeIds changes
|
|
3646
|
+
subscribeToActiveIds(r) {
|
|
3647
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3648
|
+
nt(n.activeIds, this.prevState.activeIds) || r({ activeIds: n.activeIds });
|
|
3649
|
+
});
|
|
3650
|
+
}
|
|
3651
|
+
subscribeToTracks(r) {
|
|
3652
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3653
|
+
const s = n.tracks, c = this.prevState.tracks.map((p) => p.id), f = s.filter(
|
|
3654
|
+
(p) => !c.includes(p.id)
|
|
3655
|
+
);
|
|
3656
|
+
f.length && r({
|
|
3657
|
+
tracks: n.tracks,
|
|
3658
|
+
changedTracks: f.map((p) => p.id)
|
|
3659
|
+
});
|
|
3660
|
+
});
|
|
3661
|
+
}
|
|
3662
|
+
// Selectively subscribe to multiple track-related properties
|
|
3663
|
+
subscribeToState(r) {
|
|
3664
|
+
return this.stateSubject.asObservable().subscribe((n) => {
|
|
3665
|
+
(!nt(n.tracks, this.prevState.tracks) || !nt(n.trackItemIds, this.prevState.trackItemIds) || !nt(n.trackItemsMap, this.prevState.trackItemsMap) || !nt(n.transitionIds, this.prevState.transitionIds) || !nt(n.transitionsMap, this.prevState.transitionsMap) || !nt(
|
|
3666
|
+
n.trackItemDetailsMap,
|
|
3667
|
+
this.prevState.trackItemDetailsMap
|
|
3668
|
+
) || !nt(n.structure, this.prevState.structure)) && r({
|
|
3669
|
+
tracks: n.tracks,
|
|
3670
|
+
trackItemIds: n.trackItemIds,
|
|
3671
|
+
trackItemsMap: n.trackItemsMap,
|
|
3672
|
+
transitionIds: n.transitionIds,
|
|
3673
|
+
transitionsMap: n.transitionsMap,
|
|
3674
|
+
trackItemDetailsMap: n.trackItemDetailsMap,
|
|
3675
|
+
structure: n.structure
|
|
3676
|
+
});
|
|
3677
|
+
});
|
|
3678
|
+
}
|
|
3679
|
+
undo() {
|
|
3680
|
+
const r = this.undos.pop(), n = r == null ? void 0 : r.undos, s = r == null ? void 0 : r.type;
|
|
3681
|
+
if (!n || !s) return;
|
|
3682
|
+
Kn();
|
|
3683
|
+
const {
|
|
3684
|
+
trackItemDetailsMap: a,
|
|
3685
|
+
trackItemIds: c,
|
|
3686
|
+
tracks: f,
|
|
3687
|
+
transitionIds: p,
|
|
3688
|
+
transitionsMap: S,
|
|
3689
|
+
trackItemsMap: A,
|
|
3690
|
+
structure: k
|
|
3691
|
+
} = this.getState(), T = B({
|
|
3692
|
+
trackItemDetailsMap: a,
|
|
3693
|
+
trackItemIds: c,
|
|
3694
|
+
tracks: f,
|
|
3695
|
+
transitionIds: p,
|
|
3696
|
+
transitionsMap: S,
|
|
3697
|
+
trackItemsMap: A,
|
|
3698
|
+
structure: k
|
|
3699
|
+
}), y = [], M = [], C = [], u = [], d = [], g = [], b = [];
|
|
3700
|
+
n.forEach((O) => {
|
|
3701
|
+
let F;
|
|
3702
|
+
const X = O.path.slice(1);
|
|
3703
|
+
O.type === "CREATE" ? F = {
|
|
3704
|
+
path: X,
|
|
3705
|
+
op: "remove",
|
|
3706
|
+
value: O.value
|
|
3707
|
+
} : O.type === "CHANGE" ? F = {
|
|
3708
|
+
path: X,
|
|
3709
|
+
op: "replace",
|
|
3710
|
+
value: O.oldValue
|
|
3711
|
+
} : F = {
|
|
3712
|
+
path: X,
|
|
3713
|
+
op: "add",
|
|
3714
|
+
value: O.oldValue
|
|
3715
|
+
}, O.path.includes("trackItemIds") ? C.push(F) : O.path.includes("transitionIds") ? M.push(F) : O.path.includes("trackItemsMap") ? d.push(F) : O.path.includes("transitionsMap") ? u.push(F) : O.path.includes("tracks") ? y.push(F) : O.path.includes("trackItemDetailsMap") ? g.push(F) : O.path.includes("structure") && b.push(F);
|
|
3716
|
+
});
|
|
3717
|
+
const _ = this.applyPatch(
|
|
3718
|
+
T.tracks,
|
|
3719
|
+
y
|
|
3720
|
+
), h = this.applyPatch(
|
|
3721
|
+
T.transitionIds,
|
|
3722
|
+
M
|
|
3723
|
+
), v = this.applyPatch(
|
|
3724
|
+
T.trackItemIds,
|
|
3725
|
+
C
|
|
3726
|
+
), I = this.applyPatch(
|
|
3727
|
+
T.transitionsMap,
|
|
3728
|
+
u
|
|
3729
|
+
), m = this.applyPatch(
|
|
3730
|
+
T.trackItemsMap,
|
|
3731
|
+
d
|
|
3732
|
+
), P = this.applyPatch(
|
|
3733
|
+
T.trackItemDetailsMap,
|
|
3734
|
+
g
|
|
3735
|
+
), x = this.applyPatch(
|
|
3736
|
+
T.structure,
|
|
3737
|
+
b
|
|
3738
|
+
), E = B({
|
|
3739
|
+
tracks: _,
|
|
3740
|
+
transitionIds: h,
|
|
3741
|
+
trackItemIds: v,
|
|
3742
|
+
transitionsMap: I,
|
|
3743
|
+
trackItemsMap: m,
|
|
3744
|
+
trackItemDetailsMap: P,
|
|
3745
|
+
structure: x
|
|
3746
|
+
}), j = B(this.getState()), H = { ...j, ...E };
|
|
3747
|
+
this.prevState = j, this.redos.push({ redos: n, type: s });
|
|
3748
|
+
const $ = ue(H.trackItemsMap);
|
|
3749
|
+
this.stateSubject.next({ ...H, duration: $ }), this.stateHistorySubject.next({ handleRedo: !1, handleUndo: !0 }), this.updateState(H, { updateHistory: !1 });
|
|
3750
|
+
}
|
|
3751
|
+
applyPatch(r, n) {
|
|
3752
|
+
return n.reverse().reduce((s, a) => Pi(s, (c) => {
|
|
3753
|
+
Ci(c, [a]);
|
|
3754
|
+
}), r);
|
|
3755
|
+
}
|
|
3756
|
+
redo() {
|
|
3757
|
+
const r = this.redos.pop(), n = r == null ? void 0 : r.redos, s = r == null ? void 0 : r.type;
|
|
3758
|
+
if (!n || !s) return;
|
|
3759
|
+
Kn();
|
|
3760
|
+
const {
|
|
3761
|
+
trackItemDetailsMap: a,
|
|
3762
|
+
trackItemIds: c,
|
|
3763
|
+
tracks: f,
|
|
3764
|
+
transitionIds: p,
|
|
3765
|
+
transitionsMap: S,
|
|
3766
|
+
trackItemsMap: A,
|
|
3767
|
+
structure: k
|
|
3768
|
+
} = this.getState(), T = B({
|
|
3769
|
+
trackItemDetailsMap: a,
|
|
3770
|
+
trackItemIds: c,
|
|
3771
|
+
tracks: f,
|
|
3772
|
+
transitionIds: p,
|
|
3773
|
+
transitionsMap: S,
|
|
3774
|
+
trackItemsMap: A,
|
|
3775
|
+
structure: k
|
|
3776
|
+
}), y = [], M = [], C = [], u = [], d = [], g = [], b = [];
|
|
3777
|
+
n.forEach((O) => {
|
|
3778
|
+
let F;
|
|
3779
|
+
const X = O.path.slice(1);
|
|
3780
|
+
O.type === "CREATE" ? F = {
|
|
3781
|
+
path: X,
|
|
3782
|
+
op: "add",
|
|
3783
|
+
value: O.value
|
|
3784
|
+
} : O.type === "CHANGE" ? F = {
|
|
3785
|
+
path: X,
|
|
3786
|
+
op: "replace",
|
|
3787
|
+
value: O.value
|
|
3788
|
+
} : F = {
|
|
3789
|
+
path: X,
|
|
3790
|
+
op: "remove",
|
|
3791
|
+
value: O.oldValue
|
|
3792
|
+
}, O.path.includes("trackItemIds") ? C.push(F) : O.path.includes("transitionIds") ? M.push(F) : O.path.includes("trackItemsMap") ? d.push(F) : O.path.includes("transitionsMap") ? u.push(F) : O.path.includes("trackItemDetailsMap") ? g.push(F) : O.path.includes("structure") ? b.push(F) : y.push(F);
|
|
3793
|
+
});
|
|
3794
|
+
const _ = this.applyPatch(
|
|
3795
|
+
T.tracks,
|
|
3796
|
+
y
|
|
3797
|
+
), h = this.applyPatch(
|
|
3798
|
+
T.transitionIds,
|
|
3799
|
+
M
|
|
3800
|
+
), v = this.applyPatch(
|
|
3801
|
+
T.trackItemIds,
|
|
3802
|
+
C
|
|
3803
|
+
), I = this.applyPatch(
|
|
3804
|
+
T.transitionsMap,
|
|
3805
|
+
u
|
|
3806
|
+
), m = this.applyPatch(
|
|
3807
|
+
T.trackItemsMap,
|
|
3808
|
+
d
|
|
3809
|
+
), P = this.applyPatch(
|
|
3810
|
+
T.trackItemDetailsMap,
|
|
3811
|
+
g
|
|
3812
|
+
), x = this.applyPatch(
|
|
3813
|
+
T.structure,
|
|
3814
|
+
b
|
|
3815
|
+
), E = B({
|
|
3816
|
+
tracks: _,
|
|
3817
|
+
transitionIds: h,
|
|
3818
|
+
trackItemIds: v,
|
|
3819
|
+
transitionsMap: I,
|
|
3820
|
+
trackItemsMap: m,
|
|
3821
|
+
trackItemDetailsMap: P,
|
|
3822
|
+
structure: x
|
|
3823
|
+
}), j = B(this.getState()), H = { ...j, ...E };
|
|
3824
|
+
this.prevState = j, this.undos.push({ undos: n, type: s });
|
|
3825
|
+
const $ = ue(H.trackItemsMap);
|
|
3826
|
+
this.stateSubject.next({ ...H, duration: $ }), this.stateHistorySubject.next({ handleRedo: !0, handleUndo: !1 }), this.updateState(H, { updateHistory: !1 });
|
|
3827
|
+
}
|
|
3828
|
+
toJSON() {
|
|
3829
|
+
const {
|
|
3830
|
+
fps: r,
|
|
3831
|
+
tracks: n,
|
|
3832
|
+
size: s,
|
|
3833
|
+
trackItemDetailsMap: a,
|
|
3834
|
+
trackItemIds: c,
|
|
3835
|
+
transitionsMap: f,
|
|
3836
|
+
trackItemsMap: p,
|
|
3837
|
+
transitionIds: S
|
|
3838
|
+
} = this.getState();
|
|
3839
|
+
return {
|
|
3840
|
+
fps: r,
|
|
3841
|
+
tracks: n,
|
|
3842
|
+
size: s,
|
|
3843
|
+
trackItemDetailsMap: a,
|
|
3844
|
+
trackItemIds: c,
|
|
3845
|
+
transitionsMap: f,
|
|
3846
|
+
trackItemsMap: p,
|
|
3847
|
+
transitionIds: S
|
|
3848
|
+
};
|
|
3849
|
+
}
|
|
3850
|
+
}
|
|
3851
|
+
export {
|
|
3852
|
+
ei as ACTIVE_CLONE,
|
|
3853
|
+
Aa as ACTIVE_DELETE,
|
|
3854
|
+
ti as ACTIVE_PASTE,
|
|
3855
|
+
we as ACTIVE_PREFIX,
|
|
3856
|
+
Ea as ACTIVE_SET,
|
|
3857
|
+
ri as ACTIVE_SPLIT,
|
|
3858
|
+
Xs as ADD_ANIMATION,
|
|
3859
|
+
Bs as ADD_AUDIO,
|
|
3860
|
+
Vs as ADD_CAPTIONS,
|
|
3861
|
+
Ks as ADD_IMAGE,
|
|
3862
|
+
qs as ADD_ITEMS,
|
|
3863
|
+
_a as ADD_MASK,
|
|
3864
|
+
ba as ADD_PLACEHOLDER,
|
|
3865
|
+
Ot as ADD_PREFIX,
|
|
3866
|
+
ma as ADD_SUFFIX,
|
|
3867
|
+
Js as ADD_TEMPLATE,
|
|
3868
|
+
Gs as ADD_TEXT,
|
|
3869
|
+
va as ADD_TRANSITION,
|
|
3870
|
+
Ys as ADD_VIDEO,
|
|
3871
|
+
Ta as DELETE_TEMPLATE_ITEM,
|
|
3872
|
+
Us as DESIGN_LOAD,
|
|
3873
|
+
An as DESIGN_PREFIX,
|
|
3874
|
+
Ws as DESIGN_RESIZE,
|
|
3875
|
+
Zs as EDIT_OBJECT,
|
|
3876
|
+
he as EDIT_PREFIX,
|
|
3877
|
+
Sa as EDIT_SHAPE,
|
|
3878
|
+
wa as EDIT_TEMPLATE_ITEM,
|
|
3879
|
+
ka as EDIT_TEXT,
|
|
3880
|
+
Ma as ENTER_EDIT_MODE,
|
|
3881
|
+
br as HISTORY_PREFIX,
|
|
3882
|
+
oi as HISTORY_REDO,
|
|
3883
|
+
$a as HISTORY_RESET,
|
|
3884
|
+
ai as HISTORY_UNDO,
|
|
3885
|
+
ni as LAYER_CLONE,
|
|
3886
|
+
za as LAYER_COPY,
|
|
3887
|
+
La as LAYER_CUT,
|
|
3888
|
+
si as LAYER_DELETE,
|
|
3889
|
+
ja as LAYER_EDITING_NAME,
|
|
3890
|
+
Oa as LAYER_HIDDEN,
|
|
3891
|
+
Da as LAYER_LOCKED,
|
|
3892
|
+
xa as LAYER_MOVE,
|
|
3893
|
+
Na as LAYER_PASTE,
|
|
3894
|
+
dt as LAYER_PREFIX,
|
|
3895
|
+
Fa as LAYER_RENAME,
|
|
3896
|
+
ii as LAYER_REPLACE,
|
|
3897
|
+
Pa as LAYER_SELECT,
|
|
3898
|
+
Ca as LAYER_SELECTION,
|
|
3899
|
+
Ra as LAYER_SEND_TO,
|
|
3900
|
+
Ha as LAYER_SPLIT,
|
|
3901
|
+
Qs as REPLACE_MEDIA,
|
|
3902
|
+
ga as STATE_CHANGED,
|
|
3903
|
+
$s as STATE_PREFIX,
|
|
3904
|
+
ci as TIMELINE_SCALE_CHANGED,
|
|
3905
|
+
as as TIMELINE_SCALE_PREFIX,
|
|
3906
|
+
ya as TRACKS_CHANGED,
|
|
3907
|
+
Ia as TRACK_ITEMS_CHANGED,
|
|
3908
|
+
Ls as TRACK_ITEMS_PREFIX,
|
|
3909
|
+
Hs as TRACK_PREFIX,
|
|
3910
|
+
Ua as default
|
|
3911
|
+
};
|