@byomakase/omakase-player 0.2.0 → 0.2.2
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/omakase-player.cjs.js +6 -6
- package/dist/omakase-player.cjs.js.map +1 -1
- package/dist/omakase-player.d.ts +1 -0
- package/dist/omakase-player.es.js +431 -431
- package/dist/omakase-player.es.js.map +1 -1
- package/dist/omakase-player.umd.js +6 -6
- package/dist/omakase-player.umd.js.map +1 -1
- package/dist/video/video-controller.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1201,7 +1201,7 @@ var vr = "absoluteOpacity", nr = "allEventListeners", ot = "absoluteTransform",
|
|
|
1201
1201
|
"transformsEnabledChange.konva"
|
|
1202
1202
|
].join(yr);
|
|
1203
1203
|
let ch = 1;
|
|
1204
|
-
class
|
|
1204
|
+
class P {
|
|
1205
1205
|
constructor(e) {
|
|
1206
1206
|
this._id = ch++, this.eventListeners = {}, this.attrs = {}, this.index = 0, this._allEventListeners = null, this.parent = null, this._cache = /* @__PURE__ */ new Map(), this._attachedDepsListeners = /* @__PURE__ */ new Map(), this._lastPos = null, this._batchingTransformChange = !1, this._needClearTransformCache = !1, this._filterUpToDate = !1, this._isUnderCache = !1, this._dragEventId = null, this._shouldFireChangeEvents = !1, this.setAttrs(e), this._shouldFireChangeEvents = !0;
|
|
1207
1207
|
}
|
|
@@ -1939,73 +1939,73 @@ class x {
|
|
|
1939
1939
|
return y._isString(e) && (e = JSON.parse(e)), this._createNode(e, t);
|
|
1940
1940
|
}
|
|
1941
1941
|
static _createNode(e, t) {
|
|
1942
|
-
var i =
|
|
1942
|
+
var i = P.prototype.getClassName.call(e), s = e.children, n, a, o;
|
|
1943
1943
|
t && (e.attrs.container = t), D[i] || (y.warn('Can not find a node with class name "' + i + '". Fallback to "Shape".'), i = "Shape");
|
|
1944
1944
|
const h = D[i];
|
|
1945
1945
|
if (n = new h(e.attrs), s)
|
|
1946
1946
|
for (a = s.length, o = 0; o < a; o++)
|
|
1947
|
-
n.add(
|
|
1947
|
+
n.add(P._createNode(s[o]));
|
|
1948
1948
|
return n;
|
|
1949
1949
|
}
|
|
1950
1950
|
}
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1951
|
+
P.prototype.nodeType = "Node";
|
|
1952
|
+
P.prototype._attrsAffectingSize = [];
|
|
1953
|
+
P.prototype.eventListeners = {};
|
|
1954
|
+
P.prototype.on.call(P.prototype, uh, function() {
|
|
1955
1955
|
if (this._batchingTransformChange) {
|
|
1956
1956
|
this._needClearTransformCache = !0;
|
|
1957
1957
|
return;
|
|
1958
1958
|
}
|
|
1959
1959
|
this._clearCache(Et), this._clearSelfAndDescendantCache(ot);
|
|
1960
1960
|
});
|
|
1961
|
-
|
|
1961
|
+
P.prototype.on.call(P.prototype, "visibleChange.konva", function() {
|
|
1962
1962
|
this._clearSelfAndDescendantCache(ws);
|
|
1963
1963
|
});
|
|
1964
|
-
|
|
1964
|
+
P.prototype.on.call(P.prototype, "listeningChange.konva", function() {
|
|
1965
1965
|
this._clearSelfAndDescendantCache(_s);
|
|
1966
1966
|
});
|
|
1967
|
-
|
|
1967
|
+
P.prototype.on.call(P.prototype, "opacityChange.konva", function() {
|
|
1968
1968
|
this._clearSelfAndDescendantCache(vr);
|
|
1969
1969
|
});
|
|
1970
1970
|
const ce = g.addGetterSetter;
|
|
1971
|
-
ce(
|
|
1972
|
-
ce(
|
|
1973
|
-
ce(
|
|
1974
|
-
ce(
|
|
1975
|
-
ce(
|
|
1976
|
-
ce(
|
|
1977
|
-
ce(
|
|
1978
|
-
ce(
|
|
1979
|
-
ce(
|
|
1980
|
-
ce(
|
|
1981
|
-
g.addComponentsGetterSetter(
|
|
1982
|
-
ce(
|
|
1983
|
-
ce(
|
|
1984
|
-
g.addComponentsGetterSetter(
|
|
1985
|
-
ce(
|
|
1986
|
-
ce(
|
|
1987
|
-
g.addComponentsGetterSetter(
|
|
1988
|
-
ce(
|
|
1989
|
-
ce(
|
|
1990
|
-
ce(
|
|
1991
|
-
ce(
|
|
1992
|
-
ce(
|
|
1993
|
-
ce(
|
|
1994
|
-
ce(
|
|
1995
|
-
ce(
|
|
1971
|
+
ce(P, "zIndex");
|
|
1972
|
+
ce(P, "absolutePosition");
|
|
1973
|
+
ce(P, "position");
|
|
1974
|
+
ce(P, "x", 0, k());
|
|
1975
|
+
ce(P, "y", 0, k());
|
|
1976
|
+
ce(P, "globalCompositeOperation", "source-over", pi());
|
|
1977
|
+
ce(P, "opacity", 1, k());
|
|
1978
|
+
ce(P, "name", "", pi());
|
|
1979
|
+
ce(P, "id", "", pi());
|
|
1980
|
+
ce(P, "rotation", 0, k());
|
|
1981
|
+
g.addComponentsGetterSetter(P, "scale", ["x", "y"]);
|
|
1982
|
+
ce(P, "scaleX", 1, k());
|
|
1983
|
+
ce(P, "scaleY", 1, k());
|
|
1984
|
+
g.addComponentsGetterSetter(P, "skew", ["x", "y"]);
|
|
1985
|
+
ce(P, "skewX", 0, k());
|
|
1986
|
+
ce(P, "skewY", 0, k());
|
|
1987
|
+
g.addComponentsGetterSetter(P, "offset", ["x", "y"]);
|
|
1988
|
+
ce(P, "offsetX", 0, k());
|
|
1989
|
+
ce(P, "offsetY", 0, k());
|
|
1990
|
+
ce(P, "dragDistance", null, k());
|
|
1991
|
+
ce(P, "width", 0, k());
|
|
1992
|
+
ce(P, "height", 0, k());
|
|
1993
|
+
ce(P, "listening", !0, qe());
|
|
1994
|
+
ce(P, "preventDefault", !0, qe());
|
|
1995
|
+
ce(P, "filters", null, function(r) {
|
|
1996
1996
|
return this._filterUpToDate = !1, r;
|
|
1997
1997
|
});
|
|
1998
|
-
ce(
|
|
1999
|
-
ce(
|
|
2000
|
-
ce(
|
|
2001
|
-
ce(
|
|
2002
|
-
ce(
|
|
2003
|
-
g.backCompat(
|
|
1998
|
+
ce(P, "visible", !0, qe());
|
|
1999
|
+
ce(P, "transformsEnabled", "all", pi());
|
|
2000
|
+
ce(P, "size");
|
|
2001
|
+
ce(P, "dragBoundFunc");
|
|
2002
|
+
ce(P, "draggable", !1, qe());
|
|
2003
|
+
g.backCompat(P, {
|
|
2004
2004
|
rotateDeg: "rotate",
|
|
2005
2005
|
setRotationDeg: "setRotation",
|
|
2006
2006
|
getRotationDeg: "getRotation"
|
|
2007
2007
|
});
|
|
2008
|
-
class De extends
|
|
2008
|
+
class De extends P {
|
|
2009
2009
|
constructor() {
|
|
2010
2010
|
super(...arguments), this.children = [];
|
|
2011
2011
|
}
|
|
@@ -2071,7 +2071,7 @@ class De extends x {
|
|
|
2071
2071
|
return !1;
|
|
2072
2072
|
}
|
|
2073
2073
|
toObject() {
|
|
2074
|
-
var e =
|
|
2074
|
+
var e = P.prototype.toObject.call(this);
|
|
2075
2075
|
return e.children = [], this.getChildren().forEach((t) => {
|
|
2076
2076
|
e.children.push(t.toObject());
|
|
2077
2077
|
}), e;
|
|
@@ -2085,7 +2085,7 @@ class De extends x {
|
|
|
2085
2085
|
return !1;
|
|
2086
2086
|
}
|
|
2087
2087
|
clone(e) {
|
|
2088
|
-
var t =
|
|
2088
|
+
var t = P.prototype.clone.call(this, e);
|
|
2089
2089
|
return this.getChildren().forEach(function(i) {
|
|
2090
2090
|
t.add(i.clone());
|
|
2091
2091
|
}), t;
|
|
@@ -2690,7 +2690,7 @@ function xh() {
|
|
|
2690
2690
|
function Ph() {
|
|
2691
2691
|
this._clearCache(qa);
|
|
2692
2692
|
}
|
|
2693
|
-
class E extends
|
|
2693
|
+
class E extends P {
|
|
2694
2694
|
constructor(e) {
|
|
2695
2695
|
super(e);
|
|
2696
2696
|
let t;
|
|
@@ -2797,7 +2797,7 @@ class E extends x {
|
|
|
2797
2797
|
return i.getContext().clear(), this.drawHit(i, null, !0), s = i.context.getImageData(Math.round(e.x), Math.round(e.y), 1, 1).data, s[3] > 0;
|
|
2798
2798
|
}
|
|
2799
2799
|
destroy() {
|
|
2800
|
-
return
|
|
2800
|
+
return P.prototype.destroy.call(this), delete Mi[this.colorKey], delete this.colorKey, this;
|
|
2801
2801
|
}
|
|
2802
2802
|
_useBufferCanvas(e) {
|
|
2803
2803
|
var t;
|
|
@@ -3037,19 +3037,19 @@ class Wt extends De {
|
|
|
3037
3037
|
return t && t.content && (t.content.removeChild(this.getNativeCanvasElement()), e < t.children.length - 1 ? t.content.insertBefore(this.getNativeCanvasElement(), t.children[e + 1].getCanvas()._canvas) : t.content.appendChild(this.getNativeCanvasElement())), this;
|
|
3038
3038
|
}
|
|
3039
3039
|
moveToTop() {
|
|
3040
|
-
|
|
3040
|
+
P.prototype.moveToTop.call(this);
|
|
3041
3041
|
var e = this.getStage();
|
|
3042
3042
|
return e && e.content && (e.content.removeChild(this.getNativeCanvasElement()), e.content.appendChild(this.getNativeCanvasElement())), !0;
|
|
3043
3043
|
}
|
|
3044
3044
|
moveUp() {
|
|
3045
|
-
var e =
|
|
3045
|
+
var e = P.prototype.moveUp.call(this);
|
|
3046
3046
|
if (!e)
|
|
3047
3047
|
return !1;
|
|
3048
3048
|
var t = this.getStage();
|
|
3049
3049
|
return !t || !t.content ? !1 : (t.content.removeChild(this.getNativeCanvasElement()), this.index < t.children.length - 1 ? t.content.insertBefore(this.getNativeCanvasElement(), t.children[this.index + 1].getCanvas()._canvas) : t.content.appendChild(this.getNativeCanvasElement()), !0);
|
|
3050
3050
|
}
|
|
3051
3051
|
moveDown() {
|
|
3052
|
-
if (
|
|
3052
|
+
if (P.prototype.moveDown.call(this)) {
|
|
3053
3053
|
var e = this.getStage();
|
|
3054
3054
|
if (e) {
|
|
3055
3055
|
var t = e.children;
|
|
@@ -3060,7 +3060,7 @@ class Wt extends De {
|
|
|
3060
3060
|
return !1;
|
|
3061
3061
|
}
|
|
3062
3062
|
moveToBottom() {
|
|
3063
|
-
if (
|
|
3063
|
+
if (P.prototype.moveToBottom.call(this)) {
|
|
3064
3064
|
var e = this.getStage();
|
|
3065
3065
|
if (e) {
|
|
3066
3066
|
var t = e.children;
|
|
@@ -3075,7 +3075,7 @@ class Wt extends De {
|
|
|
3075
3075
|
}
|
|
3076
3076
|
remove() {
|
|
3077
3077
|
var e = this.getNativeCanvasElement();
|
|
3078
|
-
return
|
|
3078
|
+
return P.prototype.remove.call(this), e && e.parentNode && y._isInDocument(e) && e.parentNode.removeChild(e), this;
|
|
3079
3079
|
}
|
|
3080
3080
|
getStage() {
|
|
3081
3081
|
return this.parent;
|
|
@@ -3088,7 +3088,7 @@ class Wt extends De {
|
|
|
3088
3088
|
t !== "Group" && t !== "Shape" && y.throw("You may only add groups and shapes to a layer.");
|
|
3089
3089
|
}
|
|
3090
3090
|
_toKonvaCanvas(e) {
|
|
3091
|
-
return e = e || {}, e.width = e.width || this.getWidth(), e.height = e.height || this.getHeight(), e.x = e.x !== void 0 ? e.x : this.x(), e.y = e.y !== void 0 ? e.y : this.y(),
|
|
3091
|
+
return e = e || {}, e.width = e.width || this.getWidth(), e.height = e.height || this.getHeight(), e.x = e.x !== void 0 ? e.x : this.x(), e.y = e.y !== void 0 ? e.y : this.y(), P.prototype._toKonvaCanvas.call(this, e);
|
|
3092
3092
|
}
|
|
3093
3093
|
_checkVisibility() {
|
|
3094
3094
|
this.visible() ? this.canvas._canvas.style.display = "block" : this.canvas._canvas.style.display = "none";
|
|
@@ -3445,7 +3445,7 @@ class ye {
|
|
|
3445
3445
|
}
|
|
3446
3446
|
ye.attrs = {};
|
|
3447
3447
|
ye.tweens = {};
|
|
3448
|
-
|
|
3448
|
+
P.prototype.to = function(r) {
|
|
3449
3449
|
var e = r.onFinish;
|
|
3450
3450
|
r.node = this, r.onFinish = function() {
|
|
3451
3451
|
this.destroy(), e && e();
|
|
@@ -3511,7 +3511,7 @@ const Li = {
|
|
|
3511
3511
|
}, In = y._assign(D, {
|
|
3512
3512
|
Util: y,
|
|
3513
3513
|
Transform: Ge,
|
|
3514
|
-
Node:
|
|
3514
|
+
Node: P,
|
|
3515
3515
|
Container: De,
|
|
3516
3516
|
Stage: jr,
|
|
3517
3517
|
stages: br,
|
|
@@ -3875,7 +3875,7 @@ class he extends E {
|
|
|
3875
3875
|
isNaN(_) ? f.push(0) : f.push(_);
|
|
3876
3876
|
}
|
|
3877
3877
|
for (; f.length > 0 && !isNaN(f[0]); ) {
|
|
3878
|
-
var w = null, b = [], T = h,
|
|
3878
|
+
var w = null, b = [], T = h, L = l, A, G, R, H, $, I, K, W, le, ne;
|
|
3879
3879
|
switch (p) {
|
|
3880
3880
|
case "l":
|
|
3881
3881
|
h += f.shift(), l += f.shift(), w = "L", b.push(h, l);
|
|
@@ -3916,10 +3916,10 @@ class he extends E {
|
|
|
3916
3916
|
b.push(h + f.shift(), l + f.shift(), h + f.shift(), l + f.shift()), h += f.shift(), l += f.shift(), w = "C", b.push(h, l);
|
|
3917
3917
|
break;
|
|
3918
3918
|
case "S":
|
|
3919
|
-
G = h,
|
|
3919
|
+
G = h, R = l, A = a[a.length - 1], A.command === "C" && (G = h + (h - A.points[2]), R = l + (l - A.points[3])), b.push(G, R, f.shift(), f.shift()), h = f.shift(), l = f.shift(), w = "C", b.push(h, l);
|
|
3920
3920
|
break;
|
|
3921
3921
|
case "s":
|
|
3922
|
-
G = h,
|
|
3922
|
+
G = h, R = l, A = a[a.length - 1], A.command === "C" && (G = h + (h - A.points[2]), R = l + (l - A.points[3])), b.push(G, R, h + f.shift(), l + f.shift()), h += f.shift(), l += f.shift(), w = "C", b.push(h, l);
|
|
3923
3923
|
break;
|
|
3924
3924
|
case "Q":
|
|
3925
3925
|
b.push(f.shift(), f.shift()), h = f.shift(), l = f.shift(), b.push(h, l);
|
|
@@ -3928,16 +3928,16 @@ class he extends E {
|
|
|
3928
3928
|
b.push(h + f.shift(), l + f.shift()), h += f.shift(), l += f.shift(), w = "Q", b.push(h, l);
|
|
3929
3929
|
break;
|
|
3930
3930
|
case "T":
|
|
3931
|
-
G = h,
|
|
3931
|
+
G = h, R = l, A = a[a.length - 1], A.command === "Q" && (G = h + (h - A.points[0]), R = l + (l - A.points[1])), h = f.shift(), l = f.shift(), w = "Q", b.push(G, R, h, l);
|
|
3932
3932
|
break;
|
|
3933
3933
|
case "t":
|
|
3934
|
-
G = h,
|
|
3934
|
+
G = h, R = l, A = a[a.length - 1], A.command === "Q" && (G = h + (h - A.points[0]), R = l + (l - A.points[1])), h += f.shift(), l += f.shift(), w = "Q", b.push(G, R, h, l);
|
|
3935
3935
|
break;
|
|
3936
3936
|
case "A":
|
|
3937
|
-
H = f.shift(), $ = f.shift(),
|
|
3937
|
+
H = f.shift(), $ = f.shift(), I = f.shift(), K = f.shift(), W = f.shift(), le = h, ne = l, h = f.shift(), l = f.shift(), w = "A", b = this.convertEndpointToCenterParameterization(le, ne, h, l, K, W, H, $, I);
|
|
3938
3938
|
break;
|
|
3939
3939
|
case "a":
|
|
3940
|
-
H = f.shift(), $ = f.shift(),
|
|
3940
|
+
H = f.shift(), $ = f.shift(), I = f.shift(), K = f.shift(), W = f.shift(), le = h, ne = l, h += f.shift(), l += f.shift(), w = "A", b = this.convertEndpointToCenterParameterization(le, ne, h, l, K, W, H, $, I);
|
|
3941
3941
|
break;
|
|
3942
3942
|
}
|
|
3943
3943
|
a.push({
|
|
@@ -3945,9 +3945,9 @@ class he extends E {
|
|
|
3945
3945
|
points: b,
|
|
3946
3946
|
start: {
|
|
3947
3947
|
x: T,
|
|
3948
|
-
y:
|
|
3948
|
+
y: L
|
|
3949
3949
|
},
|
|
3950
|
-
pathLength: this.calcLength(T,
|
|
3950
|
+
pathLength: this.calcLength(T, L, w || p, b)
|
|
3951
3951
|
});
|
|
3952
3952
|
}
|
|
3953
3953
|
(p === "z" || p === "Z") && a.push({
|
|
@@ -3992,12 +3992,12 @@ class he extends E {
|
|
|
3992
3992
|
n === a && (f *= -1), isNaN(f) && (f = 0);
|
|
3993
3993
|
var m = f * o * c / h, v = f * -h * u / o, _ = (e + i) / 2 + Math.cos(d) * m - Math.sin(d) * v, w = (t + s) / 2 + Math.sin(d) * m + Math.cos(d) * v, b = function($) {
|
|
3994
3994
|
return Math.sqrt($[0] * $[0] + $[1] * $[1]);
|
|
3995
|
-
}, T = function($,
|
|
3996
|
-
return ($[0] *
|
|
3997
|
-
},
|
|
3998
|
-
return ($[0] *
|
|
3999
|
-
},
|
|
4000
|
-
return T(G,
|
|
3995
|
+
}, T = function($, I) {
|
|
3996
|
+
return ($[0] * I[0] + $[1] * I[1]) / (b($) * b(I));
|
|
3997
|
+
}, L = function($, I) {
|
|
3998
|
+
return ($[0] * I[1] < $[1] * I[0] ? -1 : 1) * Math.acos(T($, I));
|
|
3999
|
+
}, A = L([1, 0], [(u - m) / o, (c - v) / h]), G = [(u - m) / o, (c - v) / h], R = [(-1 * u - m) / o, (-1 * c - v) / h], H = L(G, R);
|
|
4000
|
+
return T(G, R) <= -1 && (H = Math.PI), T(G, R) >= 1 && (H = 0), a === 0 && H > 0 && (H = H - 2 * Math.PI), a === 1 && H < 0 && (H = H + 2 * Math.PI), [_, w, o, h, A, H, d, a];
|
|
4001
4001
|
}
|
|
4002
4002
|
}
|
|
4003
4003
|
he.prototype.className = "Path";
|
|
@@ -4485,15 +4485,15 @@ class me extends E {
|
|
|
4485
4485
|
if (this.text()) {
|
|
4486
4486
|
var s = this.padding(), n = this.fontSize(), a = this.lineHeight() * n, o = this.verticalAlign(), h = 0, l = this.align(), d = this.getWidth(), u = this.letterSpacing(), c = this.fill(), p = this.textDecoration(), f = p.indexOf("underline") !== -1, m = p.indexOf("line-through") !== -1, v, _ = 0, _ = a / 2, w = 0, b = 0;
|
|
4487
4487
|
for (e.setAttr("font", this._getContextFont()), e.setAttr("textBaseline", Fn), e.setAttr("textAlign", Qa), o === Fn ? h = (this.getHeight() - i * a - s * 2) / 2 : o === Zh && (h = this.getHeight() - i * a - s * 2), e.translate(s, h + s), v = 0; v < i; v++) {
|
|
4488
|
-
var w = 0, b = 0, T = t[v],
|
|
4489
|
-
if (e.save(), l === Xh ? w += d -
|
|
4490
|
-
|
|
4491
|
-
for (var
|
|
4492
|
-
var W =
|
|
4493
|
-
W === " " && !G && l === Si && (w += (d - s * 2 -
|
|
4488
|
+
var w = 0, b = 0, T = t[v], L = T.text, A = T.width, G = T.lastInParagraph, R, H, $;
|
|
4489
|
+
if (e.save(), l === Xh ? w += d - A - s * 2 : l === Bh && (w += (d - A - s * 2) / 2), f && (e.save(), e.beginPath(), e.moveTo(w, _ + b + Math.round(n / 2)), R = L.split(" ").length - 1, H = R === 0, $ = l === Si && G && !H ? d - s * 2 : A, e.lineTo(w + Math.round($), _ + b + Math.round(n / 2)), e.lineWidth = n / 15, e.strokeStyle = c, e.stroke(), e.restore()), m && (e.save(), e.beginPath(), e.moveTo(w, _ + b), R = L.split(" ").length - 1, H = R === 0, $ = l === Si && G && !H ? d - s * 2 : A, e.lineTo(w + Math.round($), _ + b), e.lineWidth = n / 15, e.strokeStyle = c, e.stroke(), e.restore()), u !== 0 || l === Si) {
|
|
4490
|
+
R = L.split(" ").length - 1;
|
|
4491
|
+
for (var I = Ja(L), K = 0; K < I.length; K++) {
|
|
4492
|
+
var W = I[K];
|
|
4493
|
+
W === " " && !G && l === Si && (w += (d - s * 2 - A) / R), this._partialTextX = w, this._partialTextY = _ + b, this._partialText = W, e.fillStrokeShape(this), w += this.measureSize(W).width + u;
|
|
4494
4494
|
}
|
|
4495
4495
|
} else
|
|
4496
|
-
this._partialTextX = w, this._partialTextY = _ + b, this._partialText =
|
|
4496
|
+
this._partialTextX = w, this._partialTextY = _ + b, this._partialText = L, e.fillStrokeShape(this);
|
|
4497
4497
|
e.restore(), i > 1 && (_ += a);
|
|
4498
4498
|
}
|
|
4499
4499
|
}
|
|
@@ -4548,33 +4548,33 @@ class me extends E {
|
|
|
4548
4548
|
`), t = +this.fontSize(), i = 0, s = this.lineHeight() * t, n = this.attrs.width, a = this.attrs.height, o = n !== Yt && n !== void 0, h = a !== Yt && a !== void 0, l = this.padding(), d = n - l * 2, u = a - l * 2, c = 0, p = this.wrap(), f = p !== Hn, m = p !== Yh && f, v = this.ellipsis();
|
|
4549
4549
|
this.textArr = [], cs().font = this._getContextFont();
|
|
4550
4550
|
for (var _ = v ? this._getTextWidth(us) : 0, w = 0, b = e.length; w < b; ++w) {
|
|
4551
|
-
var T = e[w],
|
|
4552
|
-
if (o &&
|
|
4551
|
+
var T = e[w], L = this._getTextWidth(T);
|
|
4552
|
+
if (o && L > d)
|
|
4553
4553
|
for (; T.length > 0; ) {
|
|
4554
|
-
for (var
|
|
4555
|
-
var $ =
|
|
4556
|
-
K <= d ? (
|
|
4554
|
+
for (var A = 0, G = T.length, R = "", H = 0; A < G; ) {
|
|
4555
|
+
var $ = A + G >>> 1, I = T.slice(0, $ + 1), K = this._getTextWidth(I) + _;
|
|
4556
|
+
K <= d ? (A = $ + 1, R = I, H = K) : G = $;
|
|
4557
4557
|
}
|
|
4558
|
-
if (
|
|
4558
|
+
if (R) {
|
|
4559
4559
|
if (m) {
|
|
4560
|
-
var W, le = T[
|
|
4561
|
-
ne && H <= d ? W =
|
|
4560
|
+
var W, le = T[R.length], ne = le === ur || le === Dn;
|
|
4561
|
+
ne && H <= d ? W = R.length : W = Math.max(R.lastIndexOf(ur), R.lastIndexOf(Dn)) + 1, W > 0 && (A = W, R = R.slice(0, A), H = this._getTextWidth(R));
|
|
4562
4562
|
}
|
|
4563
|
-
|
|
4563
|
+
R = R.trimRight(), this._addTextLine(R), i = Math.max(i, H), c += s;
|
|
4564
4564
|
var U = this._shouldHandleEllipsis(c);
|
|
4565
4565
|
if (U) {
|
|
4566
4566
|
this._tryToAddEllipsisToLastLine();
|
|
4567
4567
|
break;
|
|
4568
4568
|
}
|
|
4569
|
-
if (T = T.slice(
|
|
4570
|
-
this._addTextLine(T), c += s, i = Math.max(i,
|
|
4569
|
+
if (T = T.slice(A), T = T.trimLeft(), T.length > 0 && (L = this._getTextWidth(T), L <= d)) {
|
|
4570
|
+
this._addTextLine(T), c += s, i = Math.max(i, L);
|
|
4571
4571
|
break;
|
|
4572
4572
|
}
|
|
4573
4573
|
} else
|
|
4574
4574
|
break;
|
|
4575
4575
|
}
|
|
4576
4576
|
else
|
|
4577
|
-
this._addTextLine(T), c += s, i = Math.max(i,
|
|
4577
|
+
this._addTextLine(T), c += s, i = Math.max(i, L), this._shouldHandleEllipsis(c) && w < b - 1 && this._tryToAddEllipsisToLastLine();
|
|
4578
4578
|
if (h && c + s > u)
|
|
4579
4579
|
break;
|
|
4580
4580
|
this.textArr[this.textArr.length - 1] && (this.textArr[this.textArr.length - 1].lastInParagraph = !0);
|
|
@@ -4732,10 +4732,10 @@ class Ce extends E {
|
|
|
4732
4732
|
}
|
|
4733
4733
|
p !== void 0 && (le = he.getLineLength(c.x, c.y, p.x, p.y)), we && (we = !1, f = void 0);
|
|
4734
4734
|
}
|
|
4735
|
-
}, b = "C", T = e._getTextSize(b).width + i,
|
|
4735
|
+
}, b = "C", T = e._getTextSize(b).width + i, L = l / T - 1, A = 0; A < L && (w(b), !(c === void 0 || p === void 0)); A++)
|
|
4736
4736
|
c = p;
|
|
4737
4737
|
for (var G = 0; G < d.length && (w(d[G]), !(c === void 0 || p === void 0)); G++) {
|
|
4738
|
-
var
|
|
4738
|
+
var R = he.getLineLength(c.x, c.y, p.x, p.y), H = 0;
|
|
4739
4739
|
if (n)
|
|
4740
4740
|
try {
|
|
4741
4741
|
H = n(d[G - 1], d[G]) * this.fontSize();
|
|
@@ -4743,12 +4743,12 @@ class Ce extends E {
|
|
|
4743
4743
|
H = 0;
|
|
4744
4744
|
}
|
|
4745
4745
|
c.x += H, p.x += H, this.textWidth += H;
|
|
4746
|
-
var $ = he.getPointOnLine(H +
|
|
4746
|
+
var $ = he.getPointOnLine(H + R / 2, c.x, c.y, p.x, p.y), I = Math.atan2(p.y - c.y, p.x - c.x);
|
|
4747
4747
|
this.glyphInfo.push({
|
|
4748
4748
|
transposeX: $.x,
|
|
4749
4749
|
transposeY: $.y,
|
|
4750
4750
|
text: d[G],
|
|
4751
|
-
rotation:
|
|
4751
|
+
rotation: I,
|
|
4752
4752
|
p0: c,
|
|
4753
4753
|
p1: p
|
|
4754
4754
|
}), c = p;
|
|
@@ -5172,23 +5172,23 @@ class oe extends oi {
|
|
|
5172
5172
|
console.error(new Error("Wrong position argument of selection resizer: " + this._movingAnchorName));
|
|
5173
5173
|
var w = this.centeredScaling() || e.altKey;
|
|
5174
5174
|
if (w) {
|
|
5175
|
-
var b = this.findOne(".top-left"), T = this.findOne(".bottom-right"),
|
|
5175
|
+
var b = this.findOne(".top-left"), T = this.findOne(".bottom-right"), L = b.x(), A = b.y(), G = this.getWidth() - T.x(), R = this.getHeight() - T.y();
|
|
5176
5176
|
T.move({
|
|
5177
|
-
x: -
|
|
5178
|
-
y: -
|
|
5177
|
+
x: -L,
|
|
5178
|
+
y: -A
|
|
5179
5179
|
}), b.move({
|
|
5180
5180
|
x: G,
|
|
5181
|
-
y:
|
|
5181
|
+
y: R
|
|
5182
5182
|
});
|
|
5183
5183
|
}
|
|
5184
5184
|
var H = this.findOne(".top-left").getAbsolutePosition();
|
|
5185
5185
|
t = H.x, i = H.y;
|
|
5186
|
-
var $ = this.findOne(".bottom-right").x() - this.findOne(".top-left").x(),
|
|
5186
|
+
var $ = this.findOne(".bottom-right").x() - this.findOne(".top-left").x(), I = this.findOne(".bottom-right").y() - this.findOne(".top-left").y();
|
|
5187
5187
|
this._fitNodesInto({
|
|
5188
5188
|
x: t,
|
|
5189
5189
|
y: i,
|
|
5190
5190
|
width: $,
|
|
5191
|
-
height:
|
|
5191
|
+
height: I,
|
|
5192
5192
|
rotation: D.getAngle(this.rotation())
|
|
5193
5193
|
}, e);
|
|
5194
5194
|
}
|
|
@@ -5372,7 +5372,7 @@ class oe extends oi {
|
|
|
5372
5372
|
return this.getStage() && this._cursorChange && this.getStage().content && (this.getStage().content.style.cursor = ""), oi.prototype.destroy.call(this), this.detach(), this._removeEvents(), this;
|
|
5373
5373
|
}
|
|
5374
5374
|
toObject() {
|
|
5375
|
-
return
|
|
5375
|
+
return P.prototype.toObject.call(this);
|
|
5376
5376
|
}
|
|
5377
5377
|
getClientRect() {
|
|
5378
5378
|
return this.nodes().length > 0 ? super.getClientRect() : { x: 0, y: 0, width: 0, height: 0 };
|
|
@@ -5962,44 +5962,44 @@ var cd = [
|
|
|
5962
5962
|
24
|
|
5963
5963
|
];
|
|
5964
5964
|
function pd(r, e) {
|
|
5965
|
-
var t = r.data, i = r.width, s = r.height, n, a, o, h, l, d, u, c, p, f, m, v, _, w, b, T,
|
|
5965
|
+
var t = r.data, i = r.width, s = r.height, n, a, o, h, l, d, u, c, p, f, m, v, _, w, b, T, L, A, G, R, H, $, I, K, W = e + e + 1, le = i - 1, ne = s - 1, U = e + 1, we = U * (U + 1) / 2, Re = new Vn(), Ve = null, te = Re, ve = null, Ie = null, St = cd[e], Tt = fd[e];
|
|
5966
5966
|
for (o = 1; o < W; o++)
|
|
5967
5967
|
te = te.next = new Vn(), o === U && (Ve = te);
|
|
5968
5968
|
for (te.next = Re, u = d = 0, a = 0; a < s; a++) {
|
|
5969
|
-
for (T =
|
|
5970
|
-
te.r =
|
|
5969
|
+
for (T = L = A = G = c = p = f = m = 0, v = U * (R = t[d]), _ = U * (H = t[d + 1]), w = U * ($ = t[d + 2]), b = U * (I = t[d + 3]), c += we * R, p += we * H, f += we * $, m += we * I, te = Re, o = 0; o < U; o++)
|
|
5970
|
+
te.r = R, te.g = H, te.b = $, te.a = I, te = te.next;
|
|
5971
5971
|
for (o = 1; o < U; o++)
|
|
5972
|
-
h = d + ((le < o ? le : o) << 2), c += (te.r =
|
|
5972
|
+
h = d + ((le < o ? le : o) << 2), c += (te.r = R = t[h]) * (K = U - o), p += (te.g = H = t[h + 1]) * K, f += (te.b = $ = t[h + 2]) * K, m += (te.a = I = t[h + 3]) * K, T += R, L += H, A += $, G += I, te = te.next;
|
|
5973
5973
|
for (ve = Re, Ie = Ve, n = 0; n < i; n++)
|
|
5974
|
-
t[d + 3] =
|
|
5974
|
+
t[d + 3] = I = m * St >> Tt, I !== 0 ? (I = 255 / I, t[d] = (c * St >> Tt) * I, t[d + 1] = (p * St >> Tt) * I, t[d + 2] = (f * St >> Tt) * I) : t[d] = t[d + 1] = t[d + 2] = 0, c -= v, p -= _, f -= w, m -= b, v -= ve.r, _ -= ve.g, w -= ve.b, b -= ve.a, h = u + ((h = n + e + 1) < le ? h : le) << 2, T += ve.r = t[h], L += ve.g = t[h + 1], A += ve.b = t[h + 2], G += ve.a = t[h + 3], c += T, p += L, f += A, m += G, ve = ve.next, v += R = Ie.r, _ += H = Ie.g, w += $ = Ie.b, b += I = Ie.a, T -= R, L -= H, A -= $, G -= I, Ie = Ie.next, d += 4;
|
|
5975
5975
|
u += i;
|
|
5976
5976
|
}
|
|
5977
5977
|
for (n = 0; n < i; n++) {
|
|
5978
|
-
for (
|
|
5979
|
-
te.r =
|
|
5978
|
+
for (L = A = G = T = p = f = m = c = 0, d = n << 2, v = U * (R = t[d]), _ = U * (H = t[d + 1]), w = U * ($ = t[d + 2]), b = U * (I = t[d + 3]), c += we * R, p += we * H, f += we * $, m += we * I, te = Re, o = 0; o < U; o++)
|
|
5979
|
+
te.r = R, te.g = H, te.b = $, te.a = I, te = te.next;
|
|
5980
5980
|
for (l = i, o = 1; o <= e; o++)
|
|
5981
|
-
d = l + n << 2, c += (te.r =
|
|
5981
|
+
d = l + n << 2, c += (te.r = R = t[d]) * (K = U - o), p += (te.g = H = t[d + 1]) * K, f += (te.b = $ = t[d + 2]) * K, m += (te.a = I = t[d + 3]) * K, T += R, L += H, A += $, G += I, te = te.next, o < ne && (l += i);
|
|
5982
5982
|
for (d = n, ve = Re, Ie = Ve, a = 0; a < s; a++)
|
|
5983
|
-
h = d << 2, t[h + 3] =
|
|
5983
|
+
h = d << 2, t[h + 3] = I = m * St >> Tt, I > 0 ? (I = 255 / I, t[h] = (c * St >> Tt) * I, t[h + 1] = (p * St >> Tt) * I, t[h + 2] = (f * St >> Tt) * I) : t[h] = t[h + 1] = t[h + 2] = 0, c -= v, p -= _, f -= w, m -= b, v -= ve.r, _ -= ve.g, w -= ve.b, b -= ve.a, h = n + ((h = a + U) < ne ? h : ne) * i << 2, c += T += ve.r = t[h], p += L += ve.g = t[h + 1], f += A += ve.b = t[h + 2], m += G += ve.a = t[h + 3], ve = ve.next, v += R = Ie.r, _ += H = Ie.g, w += $ = Ie.b, b += I = Ie.a, T -= R, L -= H, A -= $, G -= I, Ie = Ie.next, d += i;
|
|
5984
5984
|
}
|
|
5985
5985
|
}
|
|
5986
5986
|
const md = function(e) {
|
|
5987
5987
|
var t = Math.round(this.blurRadius());
|
|
5988
5988
|
t > 0 && pd(e, t);
|
|
5989
5989
|
};
|
|
5990
|
-
g.addGetterSetter(
|
|
5990
|
+
g.addGetterSetter(P, "blurRadius", 0, k(), g.afterSetFilter);
|
|
5991
5991
|
const gd = function(r) {
|
|
5992
5992
|
var e = this.brightness() * 255, t = r.data, i = t.length, s;
|
|
5993
5993
|
for (s = 0; s < i; s += 4)
|
|
5994
5994
|
t[s] += e, t[s + 1] += e, t[s + 2] += e;
|
|
5995
5995
|
};
|
|
5996
|
-
g.addGetterSetter(
|
|
5996
|
+
g.addGetterSetter(P, "brightness", 0, k(), g.afterSetFilter);
|
|
5997
5997
|
const vd = function(r) {
|
|
5998
5998
|
var e = Math.pow((this.contrast() + 100) / 100, 2), t = r.data, i = t.length, s = 150, n = 150, a = 150, o;
|
|
5999
5999
|
for (o = 0; o < i; o += 4)
|
|
6000
6000
|
s = t[o], n = t[o + 1], a = t[o + 2], s /= 255, s -= 0.5, s *= e, s += 0.5, s *= 255, n /= 255, n -= 0.5, n *= e, n += 0.5, n *= 255, a /= 255, a -= 0.5, a *= e, a += 0.5, a *= 255, s = s < 0 ? 0 : s > 255 ? 255 : s, n = n < 0 ? 0 : n > 255 ? 255 : n, a = a < 0 ? 0 : a > 255 ? 255 : a, t[o] = s, t[o + 1] = n, t[o + 2] = a;
|
|
6001
6001
|
};
|
|
6002
|
-
g.addGetterSetter(
|
|
6002
|
+
g.addGetterSetter(P, "contrast", 0, k(), g.afterSetFilter);
|
|
6003
6003
|
const yd = function(r) {
|
|
6004
6004
|
var e = this.embossStrength() * 10, t = this.embossWhiteLevel() * 255, i = this.embossDirection(), s = this.embossBlend(), n = 0, a = 0, o = r.data, h = r.width, l = r.height, d = h * 4, u = l;
|
|
6005
6005
|
switch (i) {
|
|
@@ -6037,21 +6037,21 @@ const yd = function(r) {
|
|
|
6037
6037
|
do {
|
|
6038
6038
|
var v = c + (m - 1) * 4, _ = a;
|
|
6039
6039
|
m + _ < 1 && (_ = 0), m + _ > h && (_ = 0);
|
|
6040
|
-
var w = f + (m - 1 + _) * 4, b = o[v] - o[w], T = o[v + 1] - o[w + 1],
|
|
6041
|
-
if (
|
|
6042
|
-
var $ = o[v] +
|
|
6043
|
-
o[v] = $ > 255 ? 255 : $ < 0 ? 0 : $, o[v + 1] =
|
|
6040
|
+
var w = f + (m - 1 + _) * 4, b = o[v] - o[w], T = o[v + 1] - o[w + 1], L = o[v + 2] - o[w + 2], A = b, G = A > 0 ? A : -A, R = T > 0 ? T : -T, H = L > 0 ? L : -L;
|
|
6041
|
+
if (R > G && (A = T), H > G && (A = L), A *= e, s) {
|
|
6042
|
+
var $ = o[v] + A, I = o[v + 1] + A, K = o[v + 2] + A;
|
|
6043
|
+
o[v] = $ > 255 ? 255 : $ < 0 ? 0 : $, o[v + 1] = I > 255 ? 255 : I < 0 ? 0 : I, o[v + 2] = K > 255 ? 255 : K < 0 ? 0 : K;
|
|
6044
6044
|
} else {
|
|
6045
|
-
var W = t -
|
|
6045
|
+
var W = t - A;
|
|
6046
6046
|
W < 0 ? W = 0 : W > 255 && (W = 255), o[v] = o[v + 1] = o[v + 2] = W;
|
|
6047
6047
|
}
|
|
6048
6048
|
} while (--m);
|
|
6049
6049
|
} while (--u);
|
|
6050
6050
|
};
|
|
6051
|
-
g.addGetterSetter(
|
|
6052
|
-
g.addGetterSetter(
|
|
6053
|
-
g.addGetterSetter(
|
|
6054
|
-
g.addGetterSetter(
|
|
6051
|
+
g.addGetterSetter(P, "embossStrength", 0.5, k(), g.afterSetFilter);
|
|
6052
|
+
g.addGetterSetter(P, "embossWhiteLevel", 0.5, k(), g.afterSetFilter);
|
|
6053
|
+
g.addGetterSetter(P, "embossDirection", "top-left", null, g.afterSetFilter);
|
|
6054
|
+
g.addGetterSetter(P, "embossBlend", !1, null, g.afterSetFilter);
|
|
6055
6055
|
function fs(r, e, t, i, s) {
|
|
6056
6056
|
var n = t - e, a = s - i, o;
|
|
6057
6057
|
return n === 0 ? i + a / 2 : a === 0 ? i : (o = (r - e) / n, o = a * o + i, o);
|
|
@@ -6062,32 +6062,32 @@ const bd = function(r) {
|
|
|
6062
6062
|
for (c = 0; c < t; c += 4)
|
|
6063
6063
|
n = e[c + 0], n < i ? i = n : n > s && (s = n), h = e[c + 1], h < a ? a = h : h > o && (o = h), u = e[c + 2], u < l ? l = u : u > d && (d = u);
|
|
6064
6064
|
s === i && (s = 255, i = 0), o === a && (o = 255, a = 0), d === l && (d = 255, l = 0);
|
|
6065
|
-
var f, m, v, _, w, b, T,
|
|
6066
|
-
for (p > 0 ? (m = s + p * (255 - s), v = i - p * (i - 0), w = o + p * (255 - o), b = a - p * (a - 0),
|
|
6067
|
-
e[c + 0] = fs(e[c + 0], i, s, v, m), e[c + 1] = fs(e[c + 1], a, o, b, w), e[c + 2] = fs(e[c + 2], l, d,
|
|
6065
|
+
var f, m, v, _, w, b, T, L, A;
|
|
6066
|
+
for (p > 0 ? (m = s + p * (255 - s), v = i - p * (i - 0), w = o + p * (255 - o), b = a - p * (a - 0), L = d + p * (255 - d), A = l - p * (l - 0)) : (f = (s + i) * 0.5, m = s + p * (s - f), v = i + p * (i - f), _ = (o + a) * 0.5, w = o + p * (o - _), b = a + p * (a - _), T = (d + l) * 0.5, L = d + p * (d - T), A = l + p * (l - T)), c = 0; c < t; c += 4)
|
|
6067
|
+
e[c + 0] = fs(e[c + 0], i, s, v, m), e[c + 1] = fs(e[c + 1], a, o, b, w), e[c + 2] = fs(e[c + 2], l, d, A, L);
|
|
6068
6068
|
}
|
|
6069
6069
|
};
|
|
6070
|
-
g.addGetterSetter(
|
|
6070
|
+
g.addGetterSetter(P, "enhance", 0, k(), g.afterSetFilter);
|
|
6071
6071
|
const _d = function(r) {
|
|
6072
6072
|
var e = r.data, t = e.length, i, s;
|
|
6073
6073
|
for (i = 0; i < t; i += 4)
|
|
6074
6074
|
s = 0.34 * e[i] + 0.5 * e[i + 1] + 0.16 * e[i + 2], e[i] = s, e[i + 1] = s, e[i + 2] = s;
|
|
6075
6075
|
};
|
|
6076
|
-
g.addGetterSetter(
|
|
6077
|
-
g.addGetterSetter(
|
|
6078
|
-
g.addGetterSetter(
|
|
6076
|
+
g.addGetterSetter(P, "hue", 0, k(), g.afterSetFilter);
|
|
6077
|
+
g.addGetterSetter(P, "saturation", 0, k(), g.afterSetFilter);
|
|
6078
|
+
g.addGetterSetter(P, "luminance", 0, k(), g.afterSetFilter);
|
|
6079
6079
|
const wd = function(r) {
|
|
6080
|
-
var e = r.data, t = e.length, i = 1, s = Math.pow(2, this.saturation()), n = Math.abs(this.hue() + 360) % 360, a = this.luminance() * 127, o, h = i * s * Math.cos(n * Math.PI / 180), l = i * s * Math.sin(n * Math.PI / 180), d = 0.299 * i + 0.701 * h + 0.167 * l, u = 0.587 * i - 0.587 * h + 0.33 * l, c = 0.114 * i - 0.114 * h - 0.497 * l, p = 0.299 * i - 0.299 * h - 0.328 * l, f = 0.587 * i + 0.413 * h + 0.035 * l, m = 0.114 * i - 0.114 * h + 0.293 * l, v = 0.299 * i - 0.3 * h + 1.25 * l, _ = 0.587 * i - 0.586 * h - 1.05 * l, w = 0.114 * i + 0.886 * h - 0.2 * l, b, T,
|
|
6080
|
+
var e = r.data, t = e.length, i = 1, s = Math.pow(2, this.saturation()), n = Math.abs(this.hue() + 360) % 360, a = this.luminance() * 127, o, h = i * s * Math.cos(n * Math.PI / 180), l = i * s * Math.sin(n * Math.PI / 180), d = 0.299 * i + 0.701 * h + 0.167 * l, u = 0.587 * i - 0.587 * h + 0.33 * l, c = 0.114 * i - 0.114 * h - 0.497 * l, p = 0.299 * i - 0.299 * h - 0.328 * l, f = 0.587 * i + 0.413 * h + 0.035 * l, m = 0.114 * i - 0.114 * h + 0.293 * l, v = 0.299 * i - 0.3 * h + 1.25 * l, _ = 0.587 * i - 0.586 * h - 1.05 * l, w = 0.114 * i + 0.886 * h - 0.2 * l, b, T, L, A;
|
|
6081
6081
|
for (o = 0; o < t; o += 4)
|
|
6082
|
-
b = e[o + 0], T = e[o + 1],
|
|
6082
|
+
b = e[o + 0], T = e[o + 1], L = e[o + 2], A = e[o + 3], e[o + 0] = d * b + u * T + c * L + a, e[o + 1] = p * b + f * T + m * L + a, e[o + 2] = v * b + _ * T + w * L + a, e[o + 3] = A;
|
|
6083
6083
|
}, Sd = function(r) {
|
|
6084
|
-
var e = r.data, t = e.length, i = Math.pow(2, this.value()), s = Math.pow(2, this.saturation()), n = Math.abs(this.hue() + 360) % 360, a, o = i * s * Math.cos(n * Math.PI / 180), h = i * s * Math.sin(n * Math.PI / 180), l = 0.299 * i + 0.701 * o + 0.167 * h, d = 0.587 * i - 0.587 * o + 0.33 * h, u = 0.114 * i - 0.114 * o - 0.497 * h, c = 0.299 * i - 0.299 * o - 0.328 * h, p = 0.587 * i + 0.413 * o + 0.035 * h, f = 0.114 * i - 0.114 * o + 0.293 * h, m = 0.299 * i - 0.3 * o + 1.25 * h, v = 0.587 * i - 0.586 * o - 1.05 * h, _ = 0.114 * i + 0.886 * o - 0.2 * h, w, b, T,
|
|
6084
|
+
var e = r.data, t = e.length, i = Math.pow(2, this.value()), s = Math.pow(2, this.saturation()), n = Math.abs(this.hue() + 360) % 360, a, o = i * s * Math.cos(n * Math.PI / 180), h = i * s * Math.sin(n * Math.PI / 180), l = 0.299 * i + 0.701 * o + 0.167 * h, d = 0.587 * i - 0.587 * o + 0.33 * h, u = 0.114 * i - 0.114 * o - 0.497 * h, c = 0.299 * i - 0.299 * o - 0.328 * h, p = 0.587 * i + 0.413 * o + 0.035 * h, f = 0.114 * i - 0.114 * o + 0.293 * h, m = 0.299 * i - 0.3 * o + 1.25 * h, v = 0.587 * i - 0.586 * o - 1.05 * h, _ = 0.114 * i + 0.886 * o - 0.2 * h, w, b, T, L;
|
|
6085
6085
|
for (a = 0; a < t; a += 4)
|
|
6086
|
-
w = e[a + 0], b = e[a + 1], T = e[a + 2],
|
|
6086
|
+
w = e[a + 0], b = e[a + 1], T = e[a + 2], L = e[a + 3], e[a + 0] = l * w + d * b + u * T, e[a + 1] = c * w + p * b + f * T, e[a + 2] = m * w + v * b + _ * T, e[a + 3] = L;
|
|
6087
6087
|
};
|
|
6088
|
-
g.addGetterSetter(
|
|
6089
|
-
g.addGetterSetter(
|
|
6090
|
-
g.addGetterSetter(
|
|
6088
|
+
g.addGetterSetter(P, "hue", 0, k(), g.afterSetFilter);
|
|
6089
|
+
g.addGetterSetter(P, "saturation", 0, k(), g.afterSetFilter);
|
|
6090
|
+
g.addGetterSetter(P, "value", 0, k(), g.afterSetFilter);
|
|
6091
6091
|
const Td = function(r) {
|
|
6092
6092
|
var e = r.data, t = e.length, i;
|
|
6093
6093
|
for (i = 0; i < t; i += 4)
|
|
@@ -6096,17 +6096,17 @@ const Td = function(r) {
|
|
|
6096
6096
|
var Cd = function(r, e, t) {
|
|
6097
6097
|
var i = r.data, s = e.data, n = r.width, a = r.height, o = t.polarCenterX || n / 2, h = t.polarCenterY || a / 2, l, d, u, c = 0, p = 0, f = 0, m = 0, v, _ = Math.sqrt(o * o + h * h);
|
|
6098
6098
|
d = n - o, u = a - h, v = Math.sqrt(d * d + u * u), _ = v > _ ? v : _;
|
|
6099
|
-
var w = a, b = n, T,
|
|
6100
|
-
for (
|
|
6101
|
-
for (G = Math.sin(
|
|
6102
|
-
d = Math.floor(o + _ * T / w *
|
|
6099
|
+
var w = a, b = n, T, L, A = 360 / b * Math.PI / 180, G, R;
|
|
6100
|
+
for (L = 0; L < b; L += 1)
|
|
6101
|
+
for (G = Math.sin(L * A), R = Math.cos(L * A), T = 0; T < w; T += 1)
|
|
6102
|
+
d = Math.floor(o + _ * T / w * R), u = Math.floor(h + _ * T / w * G), l = (u * n + d) * 4, c = i[l + 0], p = i[l + 1], f = i[l + 2], m = i[l + 3], l = (L + T * n) * 4, s[l + 0] = c, s[l + 1] = p, s[l + 2] = f, s[l + 3] = m;
|
|
6103
6103
|
}, Ed = function(r, e, t) {
|
|
6104
6104
|
var i = r.data, s = e.data, n = r.width, a = r.height, o = t.polarCenterX || n / 2, h = t.polarCenterY || a / 2, l, d, u, c, p, f = 0, m = 0, v = 0, _ = 0, w, b = Math.sqrt(o * o + h * h);
|
|
6105
6105
|
d = n - o, u = a - h, w = Math.sqrt(d * d + u * u), b = w > b ? w : b;
|
|
6106
|
-
var T = a,
|
|
6106
|
+
var T = a, L = n, A, G, R = t.polarRotation || 0, H, $;
|
|
6107
6107
|
for (d = 0; d < n; d += 1)
|
|
6108
6108
|
for (u = 0; u < a; u += 1)
|
|
6109
|
-
c = d - o, p = u - h,
|
|
6109
|
+
c = d - o, p = u - h, A = Math.sqrt(c * c + p * p) * T / b, G = (Math.atan2(p, c) * 180 / Math.PI + 360 + R) % 360, G = G * L / 360, H = Math.floor(G), $ = Math.floor(A), l = ($ * n + H) * 4, f = i[l + 0], m = i[l + 1], v = i[l + 2], _ = i[l + 3], l = (u * n + d) * 4, s[l + 0] = f, s[l + 1] = m, s[l + 2] = v, s[l + 3] = _;
|
|
6110
6110
|
};
|
|
6111
6111
|
const kd = function(r) {
|
|
6112
6112
|
var e = r.width, t = r.height, i, s, n, a, o, h, l, d, u, c, p = Math.round(this.kaleidoscopePower()), f = Math.round(this.kaleidoscopeAngle()), m = Math.floor(e * (f % 360) / 360);
|
|
@@ -6121,9 +6121,9 @@ const kd = function(r) {
|
|
|
6121
6121
|
for (var w = e / Math.pow(2, p); w <= 8; )
|
|
6122
6122
|
w = w * 2, p -= 1;
|
|
6123
6123
|
w = Math.ceil(w);
|
|
6124
|
-
var b = w, T = 0,
|
|
6125
|
-
for (m + w > e && (T = b,
|
|
6126
|
-
for (i = T; i !==
|
|
6124
|
+
var b = w, T = 0, L = b, A = 1;
|
|
6125
|
+
for (m + w > e && (T = b, L = 0, A = -1), s = 0; s < t; s += 1)
|
|
6126
|
+
for (i = T; i !== L; i += A)
|
|
6127
6127
|
n = Math.round(i + m) % e, u = (e * s + n) * 4, o = _.data[u + 0], h = _.data[u + 1], l = _.data[u + 2], d = _.data[u + 3], c = (e * s + i) * 4, _.data[c + 0] = o, _.data[c + 1] = h, _.data[c + 2] = l, _.data[c + 3] = d;
|
|
6128
6128
|
for (s = 0; s < t; s += 1)
|
|
6129
6129
|
for (b = Math.floor(w), a = 0; a < p; a += 1) {
|
|
@@ -6134,8 +6134,8 @@ const kd = function(r) {
|
|
|
6134
6134
|
Ed(_, r, { polarRotation: 0 });
|
|
6135
6135
|
}
|
|
6136
6136
|
};
|
|
6137
|
-
g.addGetterSetter(
|
|
6138
|
-
g.addGetterSetter(
|
|
6137
|
+
g.addGetterSetter(P, "kaleidoscopePower", 2, k(), g.afterSetFilter);
|
|
6138
|
+
g.addGetterSetter(P, "kaleidoscopeAngle", 0, k(), g.afterSetFilter);
|
|
6139
6139
|
function fr(r, e, t) {
|
|
6140
6140
|
var i = (t * r.width + e) * 4, s = [];
|
|
6141
6141
|
return s.push(r.data[i++], r.data[i++], r.data[i++], r.data[i++]), s;
|
|
@@ -6215,13 +6215,13 @@ const Rd = function(r) {
|
|
|
6215
6215
|
var e = this.threshold(), t = Pd(r, e);
|
|
6216
6216
|
return t && (t = Od(t, r.width, r.height), t = Md(t, r.width, r.height), t = Ld(t, r.width, r.height), Ad(r, t)), r;
|
|
6217
6217
|
};
|
|
6218
|
-
g.addGetterSetter(
|
|
6218
|
+
g.addGetterSetter(P, "threshold", 0, k(), g.afterSetFilter);
|
|
6219
6219
|
const Id = function(r) {
|
|
6220
6220
|
var e = this.noise() * 255, t = r.data, i = t.length, s = e / 2, n;
|
|
6221
6221
|
for (n = 0; n < i; n += 4)
|
|
6222
6222
|
t[n + 0] += s - 2 * s * Math.random(), t[n + 1] += s - 2 * s * Math.random(), t[n + 2] += s - 2 * s * Math.random();
|
|
6223
6223
|
};
|
|
6224
|
-
g.addGetterSetter(
|
|
6224
|
+
g.addGetterSetter(P, "noise", 0.2, k(), g.afterSetFilter);
|
|
6225
6225
|
const Nd = function(r) {
|
|
6226
6226
|
var e = Math.ceil(this.pixelSize()), t = r.width, i = r.height, s, n, a, o, h, l, d, u = Math.ceil(t / e), c = Math.ceil(i / e), p, f, m, v, _, w, b, T = r.data;
|
|
6227
6227
|
if (e <= 0) {
|
|
@@ -6240,38 +6240,38 @@ const Nd = function(r) {
|
|
|
6240
6240
|
n >= i || (a = (t * n + s) * 4, T[a + 0] = o, T[a + 1] = h, T[a + 2] = l, T[a + 3] = d);
|
|
6241
6241
|
}
|
|
6242
6242
|
};
|
|
6243
|
-
g.addGetterSetter(
|
|
6243
|
+
g.addGetterSetter(P, "pixelSize", 8, k(), g.afterSetFilter);
|
|
6244
6244
|
const Gd = function(r) {
|
|
6245
6245
|
var e = Math.round(this.levels() * 254) + 1, t = r.data, i = t.length, s = 255 / e, n;
|
|
6246
6246
|
for (n = 0; n < i; n += 1)
|
|
6247
6247
|
t[n] = Math.floor(t[n] / s) * s;
|
|
6248
6248
|
};
|
|
6249
|
-
g.addGetterSetter(
|
|
6249
|
+
g.addGetterSetter(P, "levels", 0.5, k(), g.afterSetFilter);
|
|
6250
6250
|
const Dd = function(r) {
|
|
6251
6251
|
var e = r.data, t = e.length, i = this.red(), s = this.green(), n = this.blue(), a, o;
|
|
6252
6252
|
for (a = 0; a < t; a += 4)
|
|
6253
6253
|
o = (0.34 * e[a] + 0.5 * e[a + 1] + 0.16 * e[a + 2]) / 255, e[a] = o * i, e[a + 1] = o * s, e[a + 2] = o * n, e[a + 3] = e[a + 3];
|
|
6254
6254
|
};
|
|
6255
|
-
g.addGetterSetter(
|
|
6255
|
+
g.addGetterSetter(P, "red", 0, function(r) {
|
|
6256
6256
|
return this._filterUpToDate = !1, r > 255 ? 255 : r < 0 ? 0 : Math.round(r);
|
|
6257
6257
|
});
|
|
6258
|
-
g.addGetterSetter(
|
|
6258
|
+
g.addGetterSetter(P, "green", 0, function(r) {
|
|
6259
6259
|
return this._filterUpToDate = !1, r > 255 ? 255 : r < 0 ? 0 : Math.round(r);
|
|
6260
6260
|
});
|
|
6261
|
-
g.addGetterSetter(
|
|
6261
|
+
g.addGetterSetter(P, "blue", 0, Aa, g.afterSetFilter);
|
|
6262
6262
|
const Fd = function(r) {
|
|
6263
6263
|
var e = r.data, t = e.length, i = this.red(), s = this.green(), n = this.blue(), a = this.alpha(), o, h;
|
|
6264
6264
|
for (o = 0; o < t; o += 4)
|
|
6265
6265
|
h = 1 - a, e[o] = i * a + e[o] * h, e[o + 1] = s * a + e[o + 1] * h, e[o + 2] = n * a + e[o + 2] * h;
|
|
6266
6266
|
};
|
|
6267
|
-
g.addGetterSetter(
|
|
6267
|
+
g.addGetterSetter(P, "red", 0, function(r) {
|
|
6268
6268
|
return this._filterUpToDate = !1, r > 255 ? 255 : r < 0 ? 0 : Math.round(r);
|
|
6269
6269
|
});
|
|
6270
|
-
g.addGetterSetter(
|
|
6270
|
+
g.addGetterSetter(P, "green", 0, function(r) {
|
|
6271
6271
|
return this._filterUpToDate = !1, r > 255 ? 255 : r < 0 ? 0 : Math.round(r);
|
|
6272
6272
|
});
|
|
6273
|
-
g.addGetterSetter(
|
|
6274
|
-
g.addGetterSetter(
|
|
6273
|
+
g.addGetterSetter(P, "blue", 0, Aa, g.afterSetFilter);
|
|
6274
|
+
g.addGetterSetter(P, "alpha", 1, function(r) {
|
|
6275
6275
|
return this._filterUpToDate = !1, r > 1 ? 1 : r < 0 ? 0 : r;
|
|
6276
6276
|
});
|
|
6277
6277
|
const Hd = function(r) {
|
|
@@ -6292,8 +6292,8 @@ const Hd = function(r) {
|
|
|
6292
6292
|
for (s = 0; s < i; s += 1)
|
|
6293
6293
|
t[s] = t[s] < e ? 0 : 255;
|
|
6294
6294
|
};
|
|
6295
|
-
g.addGetterSetter(
|
|
6296
|
-
const
|
|
6295
|
+
g.addGetterSetter(P, "threshold", 0.5, k(), g.afterSetFilter);
|
|
6296
|
+
const O = In.Util._assign(In, {
|
|
6297
6297
|
Arc: vt,
|
|
6298
6298
|
Arrow: Ut,
|
|
6299
6299
|
Circle: mi,
|
|
@@ -7799,7 +7799,7 @@ function ju(r, e) {
|
|
|
7799
7799
|
}));
|
|
7800
7800
|
});
|
|
7801
7801
|
}
|
|
7802
|
-
function
|
|
7802
|
+
function x(r) {
|
|
7803
7803
|
return Fe(function(e, t) {
|
|
7804
7804
|
Ke(r).subscribe(Ae(t, function() {
|
|
7805
7805
|
return t.complete();
|
|
@@ -7953,7 +7953,7 @@ const N = ae.arrayToEnum([
|
|
|
7953
7953
|
default:
|
|
7954
7954
|
return N.unknown;
|
|
7955
7955
|
}
|
|
7956
|
-
},
|
|
7956
|
+
}, M = ae.arrayToEnum([
|
|
7957
7957
|
"invalid_type",
|
|
7958
7958
|
"invalid_literal",
|
|
7959
7959
|
"custom",
|
|
@@ -8030,52 +8030,52 @@ it.create = (r) => new it(r);
|
|
|
8030
8030
|
const Ii = (r, e) => {
|
|
8031
8031
|
let t;
|
|
8032
8032
|
switch (r.code) {
|
|
8033
|
-
case
|
|
8033
|
+
case M.invalid_type:
|
|
8034
8034
|
r.received === N.undefined ? t = "Required" : t = `Expected ${r.expected}, received ${r.received}`;
|
|
8035
8035
|
break;
|
|
8036
|
-
case
|
|
8036
|
+
case M.invalid_literal:
|
|
8037
8037
|
t = `Invalid literal value, expected ${JSON.stringify(r.expected, ae.jsonStringifyReplacer)}`;
|
|
8038
8038
|
break;
|
|
8039
|
-
case
|
|
8039
|
+
case M.unrecognized_keys:
|
|
8040
8040
|
t = `Unrecognized key(s) in object: ${ae.joinValues(r.keys, ", ")}`;
|
|
8041
8041
|
break;
|
|
8042
|
-
case
|
|
8042
|
+
case M.invalid_union:
|
|
8043
8043
|
t = "Invalid input";
|
|
8044
8044
|
break;
|
|
8045
|
-
case
|
|
8045
|
+
case M.invalid_union_discriminator:
|
|
8046
8046
|
t = `Invalid discriminator value. Expected ${ae.joinValues(r.options)}`;
|
|
8047
8047
|
break;
|
|
8048
|
-
case
|
|
8048
|
+
case M.invalid_enum_value:
|
|
8049
8049
|
t = `Invalid enum value. Expected ${ae.joinValues(r.options)}, received '${r.received}'`;
|
|
8050
8050
|
break;
|
|
8051
|
-
case
|
|
8051
|
+
case M.invalid_arguments:
|
|
8052
8052
|
t = "Invalid function arguments";
|
|
8053
8053
|
break;
|
|
8054
|
-
case
|
|
8054
|
+
case M.invalid_return_type:
|
|
8055
8055
|
t = "Invalid function return type";
|
|
8056
8056
|
break;
|
|
8057
|
-
case
|
|
8057
|
+
case M.invalid_date:
|
|
8058
8058
|
t = "Invalid date";
|
|
8059
8059
|
break;
|
|
8060
|
-
case
|
|
8060
|
+
case M.invalid_string:
|
|
8061
8061
|
typeof r.validation == "object" ? "startsWith" in r.validation ? t = `Invalid input: must start with "${r.validation.startsWith}"` : "endsWith" in r.validation ? t = `Invalid input: must end with "${r.validation.endsWith}"` : ae.assertNever(r.validation) : r.validation !== "regex" ? t = `Invalid ${r.validation}` : t = "Invalid";
|
|
8062
8062
|
break;
|
|
8063
|
-
case
|
|
8063
|
+
case M.too_small:
|
|
8064
8064
|
r.type === "array" ? t = `Array must contain ${r.exact ? "exactly" : r.inclusive ? "at least" : "more than"} ${r.minimum} element(s)` : r.type === "string" ? t = `String must contain ${r.exact ? "exactly" : r.inclusive ? "at least" : "over"} ${r.minimum} character(s)` : r.type === "number" ? t = `Number must be ${r.exact ? "exactly equal to " : r.inclusive ? "greater than or equal to " : "greater than "}${r.minimum}` : r.type === "date" ? t = `Date must be ${r.exact ? "exactly equal to " : r.inclusive ? "greater than or equal to " : "greater than "}${new Date(r.minimum)}` : t = "Invalid input";
|
|
8065
8065
|
break;
|
|
8066
|
-
case
|
|
8066
|
+
case M.too_big:
|
|
8067
8067
|
r.type === "array" ? t = `Array must contain ${r.exact ? "exactly" : r.inclusive ? "at most" : "less than"} ${r.maximum} element(s)` : r.type === "string" ? t = `String must contain ${r.exact ? "exactly" : r.inclusive ? "at most" : "under"} ${r.maximum} character(s)` : r.type === "number" ? t = `Number must be ${r.exact ? "exactly" : r.inclusive ? "less than or equal to" : "less than"} ${r.maximum}` : r.type === "date" ? t = `Date must be ${r.exact ? "exactly" : r.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(r.maximum)}` : t = "Invalid input";
|
|
8068
8068
|
break;
|
|
8069
|
-
case
|
|
8069
|
+
case M.custom:
|
|
8070
8070
|
t = "Invalid input";
|
|
8071
8071
|
break;
|
|
8072
|
-
case
|
|
8072
|
+
case M.invalid_intersection_types:
|
|
8073
8073
|
t = "Intersection results could not be merged";
|
|
8074
8074
|
break;
|
|
8075
|
-
case
|
|
8075
|
+
case M.not_multiple_of:
|
|
8076
8076
|
t = `Number must be a multiple of ${r.multipleOf}`;
|
|
8077
8077
|
break;
|
|
8078
|
-
case
|
|
8078
|
+
case M.not_finite:
|
|
8079
8079
|
t = "Number must be finite";
|
|
8080
8080
|
break;
|
|
8081
8081
|
default:
|
|
@@ -8279,7 +8279,7 @@ class Q {
|
|
|
8279
8279
|
const i = (s) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(s) : t;
|
|
8280
8280
|
return this._refinement((s, n) => {
|
|
8281
8281
|
const a = e(s), o = () => n.addIssue({
|
|
8282
|
-
code:
|
|
8282
|
+
code: M.custom,
|
|
8283
8283
|
...i(s)
|
|
8284
8284
|
});
|
|
8285
8285
|
return typeof Promise < "u" && a instanceof Promise ? a.then((h) => h ? !0 : (o(), !1)) : a ? !0 : (o(), !1);
|
|
@@ -8374,7 +8374,7 @@ class mt extends Q {
|
|
|
8374
8374
|
constructor() {
|
|
8375
8375
|
super(...arguments), this._regex = (e, t, i) => this.refinement((s) => e.test(s), {
|
|
8376
8376
|
validation: t,
|
|
8377
|
-
code:
|
|
8377
|
+
code: M.invalid_string,
|
|
8378
8378
|
...ee.errToObj(i)
|
|
8379
8379
|
}), this.nonempty = (e) => this.min(1, ee.errToObj(e)), this.trim = () => new mt({
|
|
8380
8380
|
...this._def,
|
|
@@ -8387,7 +8387,7 @@ class mt extends Q {
|
|
|
8387
8387
|
return B(
|
|
8388
8388
|
n,
|
|
8389
8389
|
{
|
|
8390
|
-
code:
|
|
8390
|
+
code: M.invalid_type,
|
|
8391
8391
|
expected: N.string,
|
|
8392
8392
|
received: n.parsedType
|
|
8393
8393
|
}
|
|
@@ -8399,7 +8399,7 @@ class mt extends Q {
|
|
|
8399
8399
|
for (const n of this._def.checks)
|
|
8400
8400
|
if (n.kind === "min")
|
|
8401
8401
|
e.data.length < n.value && (s = this._getOrReturnCtx(e, s), B(s, {
|
|
8402
|
-
code:
|
|
8402
|
+
code: M.too_small,
|
|
8403
8403
|
minimum: n.value,
|
|
8404
8404
|
type: "string",
|
|
8405
8405
|
inclusive: !0,
|
|
@@ -8408,7 +8408,7 @@ class mt extends Q {
|
|
|
8408
8408
|
}), i.dirty());
|
|
8409
8409
|
else if (n.kind === "max")
|
|
8410
8410
|
e.data.length > n.value && (s = this._getOrReturnCtx(e, s), B(s, {
|
|
8411
|
-
code:
|
|
8411
|
+
code: M.too_big,
|
|
8412
8412
|
maximum: n.value,
|
|
8413
8413
|
type: "string",
|
|
8414
8414
|
inclusive: !0,
|
|
@@ -8418,14 +8418,14 @@ class mt extends Q {
|
|
|
8418
8418
|
else if (n.kind === "length") {
|
|
8419
8419
|
const a = e.data.length > n.value, o = e.data.length < n.value;
|
|
8420
8420
|
(a || o) && (s = this._getOrReturnCtx(e, s), a ? B(s, {
|
|
8421
|
-
code:
|
|
8421
|
+
code: M.too_big,
|
|
8422
8422
|
maximum: n.value,
|
|
8423
8423
|
type: "string",
|
|
8424
8424
|
inclusive: !0,
|
|
8425
8425
|
exact: !0,
|
|
8426
8426
|
message: n.message
|
|
8427
8427
|
}) : o && B(s, {
|
|
8428
|
-
code:
|
|
8428
|
+
code: M.too_small,
|
|
8429
8429
|
minimum: n.value,
|
|
8430
8430
|
type: "string",
|
|
8431
8431
|
inclusive: !0,
|
|
@@ -8435,25 +8435,25 @@ class mt extends Q {
|
|
|
8435
8435
|
} else if (n.kind === "email")
|
|
8436
8436
|
ec.test(e.data) || (s = this._getOrReturnCtx(e, s), B(s, {
|
|
8437
8437
|
validation: "email",
|
|
8438
|
-
code:
|
|
8438
|
+
code: M.invalid_string,
|
|
8439
8439
|
message: n.message
|
|
8440
8440
|
}), i.dirty());
|
|
8441
8441
|
else if (n.kind === "uuid")
|
|
8442
8442
|
Qu.test(e.data) || (s = this._getOrReturnCtx(e, s), B(s, {
|
|
8443
8443
|
validation: "uuid",
|
|
8444
|
-
code:
|
|
8444
|
+
code: M.invalid_string,
|
|
8445
8445
|
message: n.message
|
|
8446
8446
|
}), i.dirty());
|
|
8447
8447
|
else if (n.kind === "cuid")
|
|
8448
8448
|
Ku.test(e.data) || (s = this._getOrReturnCtx(e, s), B(s, {
|
|
8449
8449
|
validation: "cuid",
|
|
8450
|
-
code:
|
|
8450
|
+
code: M.invalid_string,
|
|
8451
8451
|
message: n.message
|
|
8452
8452
|
}), i.dirty());
|
|
8453
8453
|
else if (n.kind === "cuid2")
|
|
8454
8454
|
Ju.test(e.data) || (s = this._getOrReturnCtx(e, s), B(s, {
|
|
8455
8455
|
validation: "cuid2",
|
|
8456
|
-
code:
|
|
8456
|
+
code: M.invalid_string,
|
|
8457
8457
|
message: n.message
|
|
8458
8458
|
}), i.dirty());
|
|
8459
8459
|
else if (n.kind === "url")
|
|
@@ -8462,25 +8462,25 @@ class mt extends Q {
|
|
|
8462
8462
|
} catch {
|
|
8463
8463
|
s = this._getOrReturnCtx(e, s), B(s, {
|
|
8464
8464
|
validation: "url",
|
|
8465
|
-
code:
|
|
8465
|
+
code: M.invalid_string,
|
|
8466
8466
|
message: n.message
|
|
8467
8467
|
}), i.dirty();
|
|
8468
8468
|
}
|
|
8469
8469
|
else
|
|
8470
8470
|
n.kind === "regex" ? (n.regex.lastIndex = 0, n.regex.test(e.data) || (s = this._getOrReturnCtx(e, s), B(s, {
|
|
8471
8471
|
validation: "regex",
|
|
8472
|
-
code:
|
|
8472
|
+
code: M.invalid_string,
|
|
8473
8473
|
message: n.message
|
|
8474
8474
|
}), i.dirty())) : n.kind === "trim" ? e.data = e.data.trim() : n.kind === "startsWith" ? e.data.startsWith(n.value) || (s = this._getOrReturnCtx(e, s), B(s, {
|
|
8475
|
-
code:
|
|
8475
|
+
code: M.invalid_string,
|
|
8476
8476
|
validation: { startsWith: n.value },
|
|
8477
8477
|
message: n.message
|
|
8478
8478
|
}), i.dirty()) : n.kind === "endsWith" ? e.data.endsWith(n.value) || (s = this._getOrReturnCtx(e, s), B(s, {
|
|
8479
|
-
code:
|
|
8479
|
+
code: M.invalid_string,
|
|
8480
8480
|
validation: { endsWith: n.value },
|
|
8481
8481
|
message: n.message
|
|
8482
8482
|
}), i.dirty()) : n.kind === "datetime" ? tc(n).test(e.data) || (s = this._getOrReturnCtx(e, s), B(s, {
|
|
8483
|
-
code:
|
|
8483
|
+
code: M.invalid_string,
|
|
8484
8484
|
validation: "datetime",
|
|
8485
8485
|
message: n.message
|
|
8486
8486
|
}), i.dirty()) : ae.assertNever(n);
|
|
@@ -8615,7 +8615,7 @@ class Ot extends Q {
|
|
|
8615
8615
|
if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== N.number) {
|
|
8616
8616
|
const n = this._getOrReturnCtx(e);
|
|
8617
8617
|
return B(n, {
|
|
8618
|
-
code:
|
|
8618
|
+
code: M.invalid_type,
|
|
8619
8619
|
expected: N.number,
|
|
8620
8620
|
received: n.parsedType
|
|
8621
8621
|
}), Y;
|
|
@@ -8624,30 +8624,30 @@ class Ot extends Q {
|
|
|
8624
8624
|
const s = new Le();
|
|
8625
8625
|
for (const n of this._def.checks)
|
|
8626
8626
|
n.kind === "int" ? ae.isInteger(e.data) || (i = this._getOrReturnCtx(e, i), B(i, {
|
|
8627
|
-
code:
|
|
8627
|
+
code: M.invalid_type,
|
|
8628
8628
|
expected: "integer",
|
|
8629
8629
|
received: "float",
|
|
8630
8630
|
message: n.message
|
|
8631
8631
|
}), s.dirty()) : n.kind === "min" ? (n.inclusive ? e.data < n.value : e.data <= n.value) && (i = this._getOrReturnCtx(e, i), B(i, {
|
|
8632
|
-
code:
|
|
8632
|
+
code: M.too_small,
|
|
8633
8633
|
minimum: n.value,
|
|
8634
8634
|
type: "number",
|
|
8635
8635
|
inclusive: n.inclusive,
|
|
8636
8636
|
exact: !1,
|
|
8637
8637
|
message: n.message
|
|
8638
8638
|
}), s.dirty()) : n.kind === "max" ? (n.inclusive ? e.data > n.value : e.data >= n.value) && (i = this._getOrReturnCtx(e, i), B(i, {
|
|
8639
|
-
code:
|
|
8639
|
+
code: M.too_big,
|
|
8640
8640
|
maximum: n.value,
|
|
8641
8641
|
type: "number",
|
|
8642
8642
|
inclusive: n.inclusive,
|
|
8643
8643
|
exact: !1,
|
|
8644
8644
|
message: n.message
|
|
8645
8645
|
}), s.dirty()) : n.kind === "multipleOf" ? ic(e.data, n.value) !== 0 && (i = this._getOrReturnCtx(e, i), B(i, {
|
|
8646
|
-
code:
|
|
8646
|
+
code: M.not_multiple_of,
|
|
8647
8647
|
multipleOf: n.value,
|
|
8648
8648
|
message: n.message
|
|
8649
8649
|
}), s.dirty()) : n.kind === "finite" ? Number.isFinite(e.data) || (i = this._getOrReturnCtx(e, i), B(i, {
|
|
8650
|
-
code:
|
|
8650
|
+
code: M.not_finite,
|
|
8651
8651
|
message: n.message
|
|
8652
8652
|
}), s.dirty()) : ae.assertNever(n);
|
|
8653
8653
|
return { status: s.value, value: e.data };
|
|
@@ -8771,7 +8771,7 @@ class Ni extends Q {
|
|
|
8771
8771
|
if (this._def.coerce && (e.data = BigInt(e.data)), this._getType(e) !== N.bigint) {
|
|
8772
8772
|
const i = this._getOrReturnCtx(e);
|
|
8773
8773
|
return B(i, {
|
|
8774
|
-
code:
|
|
8774
|
+
code: M.invalid_type,
|
|
8775
8775
|
expected: N.bigint,
|
|
8776
8776
|
received: i.parsedType
|
|
8777
8777
|
}), Y;
|
|
@@ -8792,7 +8792,7 @@ class Gi extends Q {
|
|
|
8792
8792
|
if (this._def.coerce && (e.data = Boolean(e.data)), this._getType(e) !== N.boolean) {
|
|
8793
8793
|
const i = this._getOrReturnCtx(e);
|
|
8794
8794
|
return B(i, {
|
|
8795
|
-
code:
|
|
8795
|
+
code: M.invalid_type,
|
|
8796
8796
|
expected: N.boolean,
|
|
8797
8797
|
received: i.parsedType
|
|
8798
8798
|
}), Y;
|
|
@@ -8810,7 +8810,7 @@ class $t extends Q {
|
|
|
8810
8810
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== N.date) {
|
|
8811
8811
|
const n = this._getOrReturnCtx(e);
|
|
8812
8812
|
return B(n, {
|
|
8813
|
-
code:
|
|
8813
|
+
code: M.invalid_type,
|
|
8814
8814
|
expected: N.date,
|
|
8815
8815
|
received: n.parsedType
|
|
8816
8816
|
}), Y;
|
|
@@ -8818,21 +8818,21 @@ class $t extends Q {
|
|
|
8818
8818
|
if (isNaN(e.data.getTime())) {
|
|
8819
8819
|
const n = this._getOrReturnCtx(e);
|
|
8820
8820
|
return B(n, {
|
|
8821
|
-
code:
|
|
8821
|
+
code: M.invalid_date
|
|
8822
8822
|
}), Y;
|
|
8823
8823
|
}
|
|
8824
8824
|
const i = new Le();
|
|
8825
8825
|
let s;
|
|
8826
8826
|
for (const n of this._def.checks)
|
|
8827
8827
|
n.kind === "min" ? e.data.getTime() < n.value && (s = this._getOrReturnCtx(e, s), B(s, {
|
|
8828
|
-
code:
|
|
8828
|
+
code: M.too_small,
|
|
8829
8829
|
message: n.message,
|
|
8830
8830
|
inclusive: !0,
|
|
8831
8831
|
exact: !1,
|
|
8832
8832
|
minimum: n.value,
|
|
8833
8833
|
type: "date"
|
|
8834
8834
|
}), i.dirty()) : n.kind === "max" ? e.data.getTime() > n.value && (s = this._getOrReturnCtx(e, s), B(s, {
|
|
8835
|
-
code:
|
|
8835
|
+
code: M.too_big,
|
|
8836
8836
|
message: n.message,
|
|
8837
8837
|
inclusive: !0,
|
|
8838
8838
|
exact: !1,
|
|
@@ -8888,7 +8888,7 @@ class Nr extends Q {
|
|
|
8888
8888
|
if (this._getType(e) !== N.symbol) {
|
|
8889
8889
|
const i = this._getOrReturnCtx(e);
|
|
8890
8890
|
return B(i, {
|
|
8891
|
-
code:
|
|
8891
|
+
code: M.invalid_type,
|
|
8892
8892
|
expected: N.symbol,
|
|
8893
8893
|
received: i.parsedType
|
|
8894
8894
|
}), Y;
|
|
@@ -8905,7 +8905,7 @@ class Di extends Q {
|
|
|
8905
8905
|
if (this._getType(e) !== N.undefined) {
|
|
8906
8906
|
const i = this._getOrReturnCtx(e);
|
|
8907
8907
|
return B(i, {
|
|
8908
|
-
code:
|
|
8908
|
+
code: M.invalid_type,
|
|
8909
8909
|
expected: N.undefined,
|
|
8910
8910
|
received: i.parsedType
|
|
8911
8911
|
}), Y;
|
|
@@ -8922,7 +8922,7 @@ class Fi extends Q {
|
|
|
8922
8922
|
if (this._getType(e) !== N.null) {
|
|
8923
8923
|
const i = this._getOrReturnCtx(e);
|
|
8924
8924
|
return B(i, {
|
|
8925
|
-
code:
|
|
8925
|
+
code: M.invalid_type,
|
|
8926
8926
|
expected: N.null,
|
|
8927
8927
|
received: i.parsedType
|
|
8928
8928
|
}), Y;
|
|
@@ -8962,7 +8962,7 @@ class gt extends Q {
|
|
|
8962
8962
|
_parse(e) {
|
|
8963
8963
|
const t = this._getOrReturnCtx(e);
|
|
8964
8964
|
return B(t, {
|
|
8965
|
-
code:
|
|
8965
|
+
code: M.invalid_type,
|
|
8966
8966
|
expected: N.never,
|
|
8967
8967
|
received: t.parsedType
|
|
8968
8968
|
}), Y;
|
|
@@ -8977,7 +8977,7 @@ class Gr extends Q {
|
|
|
8977
8977
|
if (this._getType(e) !== N.undefined) {
|
|
8978
8978
|
const i = this._getOrReturnCtx(e);
|
|
8979
8979
|
return B(i, {
|
|
8980
|
-
code:
|
|
8980
|
+
code: M.invalid_type,
|
|
8981
8981
|
expected: N.void,
|
|
8982
8982
|
received: i.parsedType
|
|
8983
8983
|
}), Y;
|
|
@@ -8994,14 +8994,14 @@ class Ze extends Q {
|
|
|
8994
8994
|
const { ctx: t, status: i } = this._processInputParams(e), s = this._def;
|
|
8995
8995
|
if (t.parsedType !== N.array)
|
|
8996
8996
|
return B(t, {
|
|
8997
|
-
code:
|
|
8997
|
+
code: M.invalid_type,
|
|
8998
8998
|
expected: N.array,
|
|
8999
8999
|
received: t.parsedType
|
|
9000
9000
|
}), Y;
|
|
9001
9001
|
if (s.exactLength !== null) {
|
|
9002
9002
|
const a = t.data.length > s.exactLength.value, o = t.data.length < s.exactLength.value;
|
|
9003
9003
|
(a || o) && (B(t, {
|
|
9004
|
-
code: a ?
|
|
9004
|
+
code: a ? M.too_big : M.too_small,
|
|
9005
9005
|
minimum: o ? s.exactLength.value : void 0,
|
|
9006
9006
|
maximum: a ? s.exactLength.value : void 0,
|
|
9007
9007
|
type: "array",
|
|
@@ -9011,14 +9011,14 @@ class Ze extends Q {
|
|
|
9011
9011
|
}), i.dirty());
|
|
9012
9012
|
}
|
|
9013
9013
|
if (s.minLength !== null && t.data.length < s.minLength.value && (B(t, {
|
|
9014
|
-
code:
|
|
9014
|
+
code: M.too_small,
|
|
9015
9015
|
minimum: s.minLength.value,
|
|
9016
9016
|
type: "array",
|
|
9017
9017
|
inclusive: !0,
|
|
9018
9018
|
exact: !1,
|
|
9019
9019
|
message: s.minLength.message
|
|
9020
9020
|
}), i.dirty()), s.maxLength !== null && t.data.length > s.maxLength.value && (B(t, {
|
|
9021
|
-
code:
|
|
9021
|
+
code: M.too_big,
|
|
9022
9022
|
maximum: s.maxLength.value,
|
|
9023
9023
|
type: "array",
|
|
9024
9024
|
inclusive: !0,
|
|
@@ -9098,7 +9098,7 @@ class pe extends Q {
|
|
|
9098
9098
|
if (this._getType(e) !== N.object) {
|
|
9099
9099
|
const l = this._getOrReturnCtx(e);
|
|
9100
9100
|
return B(l, {
|
|
9101
|
-
code:
|
|
9101
|
+
code: M.invalid_type,
|
|
9102
9102
|
expected: N.object,
|
|
9103
9103
|
received: l.parsedType
|
|
9104
9104
|
}), Y;
|
|
@@ -9126,7 +9126,7 @@ class pe extends Q {
|
|
|
9126
9126
|
});
|
|
9127
9127
|
else if (l === "strict")
|
|
9128
9128
|
o.length > 0 && (B(s, {
|
|
9129
|
-
code:
|
|
9129
|
+
code: M.unrecognized_keys,
|
|
9130
9130
|
keys: o
|
|
9131
9131
|
}), i.dirty());
|
|
9132
9132
|
else if (l !== "strip")
|
|
@@ -9378,7 +9378,7 @@ class Hi extends Q {
|
|
|
9378
9378
|
return t.common.issues.push(...o.ctx.common.issues), o.result;
|
|
9379
9379
|
const a = n.map((o) => new it(o.ctx.common.issues));
|
|
9380
9380
|
return B(t, {
|
|
9381
|
-
code:
|
|
9381
|
+
code: M.invalid_union,
|
|
9382
9382
|
unionErrors: a
|
|
9383
9383
|
}), Y;
|
|
9384
9384
|
}
|
|
@@ -9425,7 +9425,7 @@ class Hi extends Q {
|
|
|
9425
9425
|
return t.common.issues.push(...n.ctx.common.issues), n.result;
|
|
9426
9426
|
const o = a.map((h) => new it(h));
|
|
9427
9427
|
return B(t, {
|
|
9428
|
-
code:
|
|
9428
|
+
code: M.invalid_union,
|
|
9429
9429
|
unionErrors: o
|
|
9430
9430
|
}), Y;
|
|
9431
9431
|
}
|
|
@@ -9445,7 +9445,7 @@ class Yr extends Q {
|
|
|
9445
9445
|
const { ctx: t } = this._processInputParams(e);
|
|
9446
9446
|
if (t.parsedType !== N.object)
|
|
9447
9447
|
return B(t, {
|
|
9448
|
-
code:
|
|
9448
|
+
code: M.invalid_type,
|
|
9449
9449
|
expected: N.object,
|
|
9450
9450
|
received: t.parsedType
|
|
9451
9451
|
}), Y;
|
|
@@ -9459,7 +9459,7 @@ class Yr extends Q {
|
|
|
9459
9459
|
path: t.path,
|
|
9460
9460
|
parent: t
|
|
9461
9461
|
}) : (B(t, {
|
|
9462
|
-
code:
|
|
9462
|
+
code: M.invalid_union_discriminator,
|
|
9463
9463
|
options: Array.from(this.optionsMap.keys()),
|
|
9464
9464
|
path: [i]
|
|
9465
9465
|
}), Y);
|
|
@@ -9536,7 +9536,7 @@ class Bi extends Q {
|
|
|
9536
9536
|
return Y;
|
|
9537
9537
|
const o = Is(n.value, a.value);
|
|
9538
9538
|
return o.valid ? ((Rs(n) || Rs(a)) && t.dirty(), { status: t.value, value: o.data }) : (B(i, {
|
|
9539
|
-
code:
|
|
9539
|
+
code: M.invalid_intersection_types
|
|
9540
9540
|
}), Y);
|
|
9541
9541
|
};
|
|
9542
9542
|
return i.common.async ? Promise.all([
|
|
@@ -9572,20 +9572,20 @@ class st extends Q {
|
|
|
9572
9572
|
const { status: t, ctx: i } = this._processInputParams(e);
|
|
9573
9573
|
if (i.parsedType !== N.array)
|
|
9574
9574
|
return B(i, {
|
|
9575
|
-
code:
|
|
9575
|
+
code: M.invalid_type,
|
|
9576
9576
|
expected: N.array,
|
|
9577
9577
|
received: i.parsedType
|
|
9578
9578
|
}), Y;
|
|
9579
9579
|
if (i.data.length < this._def.items.length)
|
|
9580
9580
|
return B(i, {
|
|
9581
|
-
code:
|
|
9581
|
+
code: M.too_small,
|
|
9582
9582
|
minimum: this._def.items.length,
|
|
9583
9583
|
inclusive: !0,
|
|
9584
9584
|
exact: !1,
|
|
9585
9585
|
type: "array"
|
|
9586
9586
|
}), Y;
|
|
9587
9587
|
!this._def.rest && i.data.length > this._def.items.length && (B(i, {
|
|
9588
|
-
code:
|
|
9588
|
+
code: M.too_big,
|
|
9589
9589
|
maximum: this._def.items.length,
|
|
9590
9590
|
inclusive: !0,
|
|
9591
9591
|
exact: !1,
|
|
@@ -9628,7 +9628,7 @@ class $i extends Q {
|
|
|
9628
9628
|
const { status: t, ctx: i } = this._processInputParams(e);
|
|
9629
9629
|
if (i.parsedType !== N.object)
|
|
9630
9630
|
return B(i, {
|
|
9631
|
-
code:
|
|
9631
|
+
code: M.invalid_type,
|
|
9632
9632
|
expected: N.object,
|
|
9633
9633
|
received: i.parsedType
|
|
9634
9634
|
}), Y;
|
|
@@ -9662,7 +9662,7 @@ class Fr extends Q {
|
|
|
9662
9662
|
const { status: t, ctx: i } = this._processInputParams(e);
|
|
9663
9663
|
if (i.parsedType !== N.map)
|
|
9664
9664
|
return B(i, {
|
|
9665
|
-
code:
|
|
9665
|
+
code: M.invalid_type,
|
|
9666
9666
|
expected: N.map,
|
|
9667
9667
|
received: i.parsedType
|
|
9668
9668
|
}), Y;
|
|
@@ -9704,20 +9704,20 @@ class Vt extends Q {
|
|
|
9704
9704
|
const { status: t, ctx: i } = this._processInputParams(e);
|
|
9705
9705
|
if (i.parsedType !== N.set)
|
|
9706
9706
|
return B(i, {
|
|
9707
|
-
code:
|
|
9707
|
+
code: M.invalid_type,
|
|
9708
9708
|
expected: N.set,
|
|
9709
9709
|
received: i.parsedType
|
|
9710
9710
|
}), Y;
|
|
9711
9711
|
const s = this._def;
|
|
9712
9712
|
s.minSize !== null && i.data.size < s.minSize.value && (B(i, {
|
|
9713
|
-
code:
|
|
9713
|
+
code: M.too_small,
|
|
9714
9714
|
minimum: s.minSize.value,
|
|
9715
9715
|
type: "set",
|
|
9716
9716
|
inclusive: !0,
|
|
9717
9717
|
exact: !1,
|
|
9718
9718
|
message: s.minSize.message
|
|
9719
9719
|
}), t.dirty()), s.maxSize !== null && i.data.size > s.maxSize.value && (B(i, {
|
|
9720
|
-
code:
|
|
9720
|
+
code: M.too_big,
|
|
9721
9721
|
maximum: s.maxSize.value,
|
|
9722
9722
|
type: "set",
|
|
9723
9723
|
inclusive: !0,
|
|
@@ -9771,7 +9771,7 @@ class ni extends Q {
|
|
|
9771
9771
|
const { ctx: t } = this._processInputParams(e);
|
|
9772
9772
|
if (t.parsedType !== N.function)
|
|
9773
9773
|
return B(t, {
|
|
9774
|
-
code:
|
|
9774
|
+
code: M.invalid_type,
|
|
9775
9775
|
expected: N.function,
|
|
9776
9776
|
received: t.parsedType
|
|
9777
9777
|
}), Y;
|
|
@@ -9786,7 +9786,7 @@ class ni extends Q {
|
|
|
9786
9786
|
Ii
|
|
9787
9787
|
].filter((l) => !!l),
|
|
9788
9788
|
issueData: {
|
|
9789
|
-
code:
|
|
9789
|
+
code: M.invalid_arguments,
|
|
9790
9790
|
argumentsError: h
|
|
9791
9791
|
}
|
|
9792
9792
|
});
|
|
@@ -9802,7 +9802,7 @@ class ni extends Q {
|
|
|
9802
9802
|
Ii
|
|
9803
9803
|
].filter((l) => !!l),
|
|
9804
9804
|
issueData: {
|
|
9805
|
-
code:
|
|
9805
|
+
code: M.invalid_return_type,
|
|
9806
9806
|
returnTypeError: h
|
|
9807
9807
|
}
|
|
9808
9808
|
});
|
|
@@ -9878,7 +9878,7 @@ class zi extends Q {
|
|
|
9878
9878
|
const t = this._getOrReturnCtx(e);
|
|
9879
9879
|
return B(t, {
|
|
9880
9880
|
received: t.data,
|
|
9881
|
-
code:
|
|
9881
|
+
code: M.invalid_literal,
|
|
9882
9882
|
expected: this._def.value
|
|
9883
9883
|
}), Y;
|
|
9884
9884
|
}
|
|
@@ -9907,14 +9907,14 @@ class Mt extends Q {
|
|
|
9907
9907
|
return B(t, {
|
|
9908
9908
|
expected: ae.joinValues(i),
|
|
9909
9909
|
received: t.parsedType,
|
|
9910
|
-
code:
|
|
9910
|
+
code: M.invalid_type
|
|
9911
9911
|
}), Y;
|
|
9912
9912
|
}
|
|
9913
9913
|
if (this._def.values.indexOf(e.data) === -1) {
|
|
9914
9914
|
const t = this._getOrReturnCtx(e), i = this._def.values;
|
|
9915
9915
|
return B(t, {
|
|
9916
9916
|
received: t.data,
|
|
9917
|
-
code:
|
|
9917
|
+
code: M.invalid_enum_value,
|
|
9918
9918
|
options: i
|
|
9919
9919
|
}), Y;
|
|
9920
9920
|
}
|
|
@@ -9957,14 +9957,14 @@ class Wi extends Q {
|
|
|
9957
9957
|
return B(i, {
|
|
9958
9958
|
expected: ae.joinValues(s),
|
|
9959
9959
|
received: i.parsedType,
|
|
9960
|
-
code:
|
|
9960
|
+
code: M.invalid_type
|
|
9961
9961
|
}), Y;
|
|
9962
9962
|
}
|
|
9963
9963
|
if (t.indexOf(e.data) === -1) {
|
|
9964
9964
|
const s = ae.objectValues(t);
|
|
9965
9965
|
return B(i, {
|
|
9966
9966
|
received: i.data,
|
|
9967
|
-
code:
|
|
9967
|
+
code: M.invalid_enum_value,
|
|
9968
9968
|
options: s
|
|
9969
9969
|
}), Y;
|
|
9970
9970
|
}
|
|
@@ -9987,7 +9987,7 @@ class ui extends Q {
|
|
|
9987
9987
|
const { ctx: t } = this._processInputParams(e);
|
|
9988
9988
|
if (t.parsedType !== N.promise && t.common.async === !1)
|
|
9989
9989
|
return B(t, {
|
|
9990
|
-
code:
|
|
9990
|
+
code: M.invalid_type,
|
|
9991
9991
|
expected: N.promise,
|
|
9992
9992
|
received: t.parsedType
|
|
9993
9993
|
}), Y;
|
|
@@ -10164,7 +10164,7 @@ class Br extends Q {
|
|
|
10164
10164
|
if (this._getType(e) !== N.nan) {
|
|
10165
10165
|
const i = this._getOrReturnCtx(e);
|
|
10166
10166
|
return B(i, {
|
|
10167
|
-
code:
|
|
10167
|
+
code: M.invalid_type,
|
|
10168
10168
|
expected: N.nan,
|
|
10169
10169
|
received: i.parsedType
|
|
10170
10170
|
}), Y;
|
|
@@ -10364,7 +10364,7 @@ var _e = /* @__PURE__ */ Object.freeze({
|
|
|
10364
10364
|
unknown: fc,
|
|
10365
10365
|
void: mc,
|
|
10366
10366
|
NEVER: Bc,
|
|
10367
|
-
ZodIssueCode:
|
|
10367
|
+
ZodIssueCode: M,
|
|
10368
10368
|
quotelessJson: Xu,
|
|
10369
10369
|
ZodError: it
|
|
10370
10370
|
});
|
|
@@ -10413,27 +10413,27 @@ class er extends Je {
|
|
|
10413
10413
|
super(e), this.stylesProvider = lt.instance(), this.id = ai.id()(this.config.id), this.description = ai.description()(this.config.description);
|
|
10414
10414
|
}
|
|
10415
10415
|
createCanvasNode() {
|
|
10416
|
-
return this.bodyGroup = new
|
|
10416
|
+
return this.bodyGroup = new O.Group({
|
|
10417
10417
|
...this.timelinePosition,
|
|
10418
10418
|
width: this.timeline.getBodyGroupRect().width,
|
|
10419
10419
|
height: this.styleAdapter.style.height
|
|
10420
|
-
}), this.bodyBackground = new
|
|
10420
|
+
}), this.bodyBackground = new O.Rect({
|
|
10421
10421
|
...F.POSITION_TOP_LEFT,
|
|
10422
10422
|
...this.bodyGroup.getSize(),
|
|
10423
10423
|
fill: this.styleAdapter.style.backgroundFill,
|
|
10424
10424
|
opacity: this.styleAdapter.style.backgroundOpacity,
|
|
10425
10425
|
listening: !1
|
|
10426
|
-
}), this.leftGroup = new
|
|
10426
|
+
}), this.leftGroup = new O.Group({
|
|
10427
10427
|
...F.POSITION_TOP_LEFT,
|
|
10428
10428
|
width: this.timeline.getLeftPanelRect().width,
|
|
10429
10429
|
listening: !1
|
|
10430
|
-
}), this.leftBackground = new
|
|
10430
|
+
}), this.leftBackground = new O.Rect({
|
|
10431
10431
|
...F.POSITION_TOP_LEFT,
|
|
10432
10432
|
...this.leftGroup.getSize(),
|
|
10433
10433
|
fill: this.styleAdapter.style.leftBackgroundFill,
|
|
10434
10434
|
opacity: this.styleAdapter.style.leftBackgroundOpacity,
|
|
10435
10435
|
listening: !1
|
|
10436
|
-
}), this.leftPanelText = new
|
|
10436
|
+
}), this.leftPanelText = new O.Text({
|
|
10437
10437
|
...F.POSITION_TOP_LEFT,
|
|
10438
10438
|
text: this.description,
|
|
10439
10439
|
fontSize: this.style.descriptionFontSize,
|
|
@@ -10446,11 +10446,11 @@ class er extends Je {
|
|
|
10446
10446
|
}), this.leftGroup.add(this.leftBackground), this.leftGroup.add(this.leftPanelText), this.bodyGroup.add(this.bodyBackground), this.bodyGroup.add(this.leftGroup), this.bodyGroup;
|
|
10447
10447
|
}
|
|
10448
10448
|
afterCanvasNodeInit() {
|
|
10449
|
-
this.settleLayout(), this.timeline.onZoom$.pipe(
|
|
10449
|
+
this.settleLayout(), this.timeline.onZoom$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
10450
10450
|
this.settleLayout();
|
|
10451
|
-
}), this.stylesProvider.onChange$.pipe(
|
|
10451
|
+
}), this.stylesProvider.onChange$.pipe(x(this.onDestroy$), $e((e) => !!e)).subscribe((e) => {
|
|
10452
10452
|
this.onStylesProviderChange();
|
|
10453
|
-
}), this.styleAdapter.onChange$.pipe(
|
|
10453
|
+
}), this.styleAdapter.onChange$.pipe(x(this.onDestroy$), $e((e) => !!e)).subscribe((e) => {
|
|
10454
10454
|
this.onStyleChange();
|
|
10455
10455
|
});
|
|
10456
10456
|
}
|
|
@@ -10547,13 +10547,13 @@ class Uo extends Je {
|
|
|
10547
10547
|
super(e), this.onChange$ = new V(), this.onClick$ = new V(), this.onMouseEnter$ = new V(), this.onMouseLeave$ = new V(), this.id = ai.id()(this.config.id), this.description = ai.description()(this.config.description), this.editable = ai.boolean()(this.config.editable), this.observation = this.config.observation;
|
|
10548
10548
|
}
|
|
10549
10549
|
createCanvasNode() {
|
|
10550
|
-
return this.group = new
|
|
10550
|
+
return this.group = new O.Group({
|
|
10551
10551
|
...F.POSITION_TOP_LEFT,
|
|
10552
10552
|
...this.timeline.getTimecodedGroupDimension()
|
|
10553
10553
|
}), this.group;
|
|
10554
10554
|
}
|
|
10555
10555
|
afterCanvasNodeInit() {
|
|
10556
|
-
this.timeline.onZoom$.pipe(
|
|
10556
|
+
this.timeline.onZoom$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
10557
10557
|
this.onMeasurementsChange();
|
|
10558
10558
|
}), this.group.on("click", (e) => {
|
|
10559
10559
|
this.onClick$.next({});
|
|
@@ -10622,11 +10622,11 @@ class jo extends Je {
|
|
|
10622
10622
|
}
|
|
10623
10623
|
createCanvasNode() {
|
|
10624
10624
|
let e = this.getVerticalMeasurement();
|
|
10625
|
-
return this.group = new
|
|
10625
|
+
return this.group = new O.Group({
|
|
10626
10626
|
x: this.x,
|
|
10627
10627
|
y: e.y,
|
|
10628
10628
|
draggable: this.editable
|
|
10629
|
-
}), this.line = new
|
|
10629
|
+
}), this.line = new O.Line({
|
|
10630
10630
|
stroke: this.style.color,
|
|
10631
10631
|
strokeWidth: this.style.lineStrokeWidth,
|
|
10632
10632
|
opacity: this.style.lineOpacity,
|
|
@@ -10637,7 +10637,7 @@ class jo extends Je {
|
|
|
10637
10637
|
e.height
|
|
10638
10638
|
],
|
|
10639
10639
|
listening: !1
|
|
10640
|
-
}), this.handleGroup = new
|
|
10640
|
+
}), this.handleGroup = new O.Group({
|
|
10641
10641
|
x: 0,
|
|
10642
10642
|
y: this.markerLane.getPosition().y - e.y + this.markerLane.getDimension().height / 2
|
|
10643
10643
|
}), this.symbol = this.createSymbol(), this.handleGroup.add(this.symbol), this.handleGroup.on("mouseover", (t) => {
|
|
@@ -11284,7 +11284,7 @@ var ue = function() {
|
|
|
11284
11284
|
i.shift();
|
|
11285
11285
|
}
|
|
11286
11286
|
return function(i, s, n, a, o, h) {
|
|
11287
|
-
var l, d, u, c, p, f, m, v, _, w, b, T,
|
|
11287
|
+
var l, d, u, c, p, f, m, v, _, w, b, T, L, A, G, R, H, $, I, K, W = i.constructor, le = i.s == s.s ? 1 : -1, ne = i.d, U = s.d;
|
|
11288
11288
|
if (!ne || !ne[0] || !U || !U[0])
|
|
11289
11289
|
return new W(
|
|
11290
11290
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
@@ -11293,22 +11293,22 @@ var ue = function() {
|
|
|
11293
11293
|
ne && ne[0] == 0 || !U ? le * 0 : le / 0
|
|
11294
11294
|
)
|
|
11295
11295
|
);
|
|
11296
|
-
for (h ? (p = 1, d = i.e - s.e) : (h = je, p = j, d = Me(i.e / p) - Me(s.e / p)),
|
|
11296
|
+
for (h ? (p = 1, d = i.e - s.e) : (h = je, p = j, d = Me(i.e / p) - Me(s.e / p)), I = U.length, H = ne.length, _ = new W(le), w = _.d = [], u = 0; U[u] == (ne[u] || 0); u++)
|
|
11297
11297
|
;
|
|
11298
|
-
if (U[u] > (ne[u] || 0) && d--, n == null ? (
|
|
11298
|
+
if (U[u] > (ne[u] || 0) && d--, n == null ? (A = n = W.precision, a = W.rounding) : o ? A = n + (i.e - s.e) + 1 : A = n, A < 0)
|
|
11299
11299
|
w.push(1), f = !0;
|
|
11300
11300
|
else {
|
|
11301
|
-
if (
|
|
11302
|
-
for (c = 0, U = U[0],
|
|
11301
|
+
if (A = A / p + 2 | 0, u = 0, I == 1) {
|
|
11302
|
+
for (c = 0, U = U[0], A++; (u < H || c) && A--; u++)
|
|
11303
11303
|
G = c * h + (ne[u] || 0), w[u] = G / U | 0, c = G % U | 0;
|
|
11304
11304
|
f = c || u < H;
|
|
11305
11305
|
} else {
|
|
11306
|
-
for (c = h / (U[0] + 1) | 0, c > 1 && (U = r(U, c, h), ne = r(ne, c, h),
|
|
11306
|
+
for (c = h / (U[0] + 1) | 0, c > 1 && (U = r(U, c, h), ne = r(ne, c, h), I = U.length, H = ne.length), R = I, b = ne.slice(0, I), T = b.length; T < I; )
|
|
11307
11307
|
b[T++] = 0;
|
|
11308
11308
|
K = U.slice(), K.unshift(0), $ = U[0], U[1] >= h / 2 && ++$;
|
|
11309
11309
|
do
|
|
11310
|
-
c = 0, l = e(U, b,
|
|
11311
|
-
while ((
|
|
11310
|
+
c = 0, l = e(U, b, I, T), l < 0 ? (L = b[0], I != T && (L = L * h + (b[1] || 0)), c = L / $ | 0, c > 1 ? (c >= h && (c = h - 1), m = r(U, c, h), v = m.length, T = b.length, l = e(m, b, v, T), l == 1 && (c--, t(m, I < v ? K : U, v, h))) : (c == 0 && (l = c = 1), m = U.slice()), v = m.length, v < T && m.unshift(0), t(b, m, T, h), l == -1 && (T = b.length, l = e(U, b, I, T), l < 1 && (c++, t(b, I < T ? K : U, T, h))), T = b.length) : l === 0 && (c++, b = [0]), w[u++] = c, l && b[0] ? b[T++] = ne[R] || 0 : (b = [ne[R]], T = 1);
|
|
11311
|
+
while ((R++ < H || b[0] !== void 0) && A--);
|
|
11312
11312
|
f = b[0] !== void 0;
|
|
11313
11313
|
}
|
|
11314
11314
|
w[0] || w.shift();
|
|
@@ -11863,14 +11863,14 @@ class ia extends jo {
|
|
|
11863
11863
|
switch (this.style.markerSymbolType) {
|
|
11864
11864
|
case "triangle":
|
|
11865
11865
|
let t = Z.sqrt(2).mul(this.style.markerSymbolSize).toNumber() / 2;
|
|
11866
|
-
return new
|
|
11866
|
+
return new O.Line({
|
|
11867
11867
|
points: this.style.periodMarkerHandleType === "start" ? [-t, 0, 0, 0, 0, t] : [0, 0, t, 0, 0, t],
|
|
11868
11868
|
fill: this.style.color,
|
|
11869
11869
|
closed: !0,
|
|
11870
11870
|
offsetY: t / 2
|
|
11871
11871
|
});
|
|
11872
11872
|
case "circle":
|
|
11873
|
-
return new
|
|
11873
|
+
return new O.Arc({
|
|
11874
11874
|
fill: this.style.color,
|
|
11875
11875
|
innerRadius: 0,
|
|
11876
11876
|
outerRadius: this.style.markerSymbolSize / 2,
|
|
@@ -11878,7 +11878,7 @@ class ia extends jo {
|
|
|
11878
11878
|
rotation: this.style.periodMarkerHandleType === "start" ? 90 : -90
|
|
11879
11879
|
});
|
|
11880
11880
|
case "square":
|
|
11881
|
-
return new
|
|
11881
|
+
return new O.Line({
|
|
11882
11882
|
points: [
|
|
11883
11883
|
0,
|
|
11884
11884
|
0,
|
|
@@ -11948,7 +11948,7 @@ class Nf extends Uo {
|
|
|
11948
11948
|
if (this.selectedAreaRect && this.selectedAreaRect.destroy(), this.markerHandleRect && this.markerHandleRect.destroy(), !this.hasStart() || !this.hasEnd())
|
|
11949
11949
|
return;
|
|
11950
11950
|
let e = this.startMarkerHandle.getVerticalMeasurement(), t = this.timeline.timeToTimelinePosition(this.observation.start), i = this.timeline.timeToTimelinePosition(this.observation.end);
|
|
11951
|
-
this.selectedAreaRect = new
|
|
11951
|
+
this.selectedAreaRect = new O.Rect({
|
|
11952
11952
|
x: t,
|
|
11953
11953
|
y: e.y,
|
|
11954
11954
|
width: i - t,
|
|
@@ -11961,7 +11961,7 @@ class Nf extends Uo {
|
|
|
11961
11961
|
y: this.startMarkerHandle.getHandleGroup().y(),
|
|
11962
11962
|
height: this.startMarkerHandle.getHandleGroup().getClientRect().height
|
|
11963
11963
|
};
|
|
11964
|
-
this.markerHandleRect = new
|
|
11964
|
+
this.markerHandleRect = new O.Rect({
|
|
11965
11965
|
x: t,
|
|
11966
11966
|
y: e.y + s.y - s.height / 2,
|
|
11967
11967
|
width: i - t,
|
|
@@ -12046,7 +12046,7 @@ class Nf extends Uo {
|
|
|
12046
12046
|
super.setEditable(e);
|
|
12047
12047
|
}
|
|
12048
12048
|
afterCanvasNodeInit() {
|
|
12049
|
-
super.afterCanvasNodeInit(), this.styleAdapter.onChange$.pipe(
|
|
12049
|
+
super.afterCanvasNodeInit(), this.styleAdapter.onChange$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
12050
12050
|
this.hasStart() && this.initStartMarkerHandle(), this.hasEnd() && this.initEndMarkerHandle(), this.hasStart() && this.hasEnd() && this.initSelectedAreaRect();
|
|
12051
12051
|
});
|
|
12052
12052
|
}
|
|
@@ -12079,7 +12079,7 @@ class Gf extends jo {
|
|
|
12079
12079
|
switch (this.style.markerSymbolType) {
|
|
12080
12080
|
case "triangle":
|
|
12081
12081
|
let t = Z.sqrt(2).mul(this.style.markerSymbolSize).toNumber() / 2;
|
|
12082
|
-
return new
|
|
12082
|
+
return new O.Line({
|
|
12083
12083
|
points: [
|
|
12084
12084
|
-t,
|
|
12085
12085
|
0,
|
|
@@ -12093,12 +12093,12 @@ class Gf extends jo {
|
|
|
12093
12093
|
offsetY: t / 2
|
|
12094
12094
|
});
|
|
12095
12095
|
case "circle":
|
|
12096
|
-
return new
|
|
12096
|
+
return new O.Circle({
|
|
12097
12097
|
fill: this.style.color,
|
|
12098
12098
|
radius: this.style.markerSymbolSize / 2
|
|
12099
12099
|
});
|
|
12100
12100
|
case "square":
|
|
12101
|
-
return new
|
|
12101
|
+
return new O.Rect({
|
|
12102
12102
|
fill: this.style.color,
|
|
12103
12103
|
width: this.style.markerSymbolSize,
|
|
12104
12104
|
height: this.style.markerSymbolSize,
|
|
@@ -12192,7 +12192,7 @@ class aa extends er {
|
|
|
12192
12192
|
}), this.onMarkerFocus$ = new V(), this.markers = [], this.markersMap = /* @__PURE__ */ new Map();
|
|
12193
12193
|
}
|
|
12194
12194
|
createCanvasNode() {
|
|
12195
|
-
return super.createCanvasNode(), this.markersGroup = new
|
|
12195
|
+
return super.createCanvasNode(), this.markersGroup = new O.Group({
|
|
12196
12196
|
...F.POSITION_TOP_LEFT,
|
|
12197
12197
|
...this.timeline.getTimecodedGroupDimension()
|
|
12198
12198
|
}), this.timeline.addToTimecodedMarkersGroup(this.markersGroup), this.bodyGroup;
|
|
@@ -12223,9 +12223,9 @@ class aa extends er {
|
|
|
12223
12223
|
throw new Error("MarkerLane not initalized. Maybe you forgot to add MarkerLane to Timeline?");
|
|
12224
12224
|
if (this.markersMap.has(e.getId()))
|
|
12225
12225
|
throw new Error(`Marker with id=${e.getId()} already exists`);
|
|
12226
|
-
return e.setMarkerLane(this), e.setTimeline(this.timeline), e.onClick$.pipe(
|
|
12226
|
+
return e.setMarkerLane(this), e.setTimeline(this.timeline), e.onClick$.pipe(x(this.onDestroy$)).subscribe((t) => {
|
|
12227
12227
|
this.focusMarker(e.getId());
|
|
12228
|
-
}), e.onMouseEnter$.pipe(
|
|
12228
|
+
}), e.onMouseEnter$.pipe(x(this.onDestroy$)).subscribe((t) => {
|
|
12229
12229
|
this.focusMarker(e.getId());
|
|
12230
12230
|
}), this.markers.push(e), this.markersMap.set(e.getId(), e), this.markersGroup.add(e.initCanvasNode()), e;
|
|
12231
12231
|
}
|
|
@@ -12265,7 +12265,7 @@ class Hf {
|
|
|
12265
12265
|
class yi {
|
|
12266
12266
|
static createGoldenRatioWedge(e) {
|
|
12267
12267
|
let t = new Z(e.height).div(F.GOLDEN_RATIO + 1).toDecimalPlaces(2).toNumber(), i = e.height - t, s = i / 2;
|
|
12268
|
-
return new
|
|
12268
|
+
return new O.Line({
|
|
12269
12269
|
points: [
|
|
12270
12270
|
e.x - s,
|
|
12271
12271
|
e.y,
|
|
@@ -12286,7 +12286,7 @@ class yi {
|
|
|
12286
12286
|
}
|
|
12287
12287
|
static createTriangle(e) {
|
|
12288
12288
|
let t = e.height / 2;
|
|
12289
|
-
return new
|
|
12289
|
+
return new O.Line({
|
|
12290
12290
|
points: [
|
|
12291
12291
|
e.x - t,
|
|
12292
12292
|
e.y,
|
|
@@ -12301,7 +12301,7 @@ class yi {
|
|
|
12301
12301
|
});
|
|
12302
12302
|
}
|
|
12303
12303
|
static createEventCatcher(e = {}) {
|
|
12304
|
-
return new
|
|
12304
|
+
return new O.Rect({
|
|
12305
12305
|
...F.POSITION_TOP_LEFT,
|
|
12306
12306
|
opacity: 0,
|
|
12307
12307
|
listening: !0,
|
|
@@ -12309,7 +12309,7 @@ class yi {
|
|
|
12309
12309
|
});
|
|
12310
12310
|
}
|
|
12311
12311
|
static createDebugRect() {
|
|
12312
|
-
return new
|
|
12312
|
+
return new O.Rect({
|
|
12313
12313
|
...F.POSITION_TOP_LEFT,
|
|
12314
12314
|
width: 100,
|
|
12315
12315
|
height: 100,
|
|
@@ -14090,20 +14090,20 @@ class km extends Je {
|
|
|
14090
14090
|
...Sa.style,
|
|
14091
14091
|
...e.style
|
|
14092
14092
|
}
|
|
14093
|
-
}), this.textTrackCue = this.config.textTrackCue, this.x = this.config.x, this.width = this.config.width, this.listening = this.config.listening, this.subtitlesLane = t, this.subtitlesLane.onSettleLayout$.pipe(
|
|
14093
|
+
}), this.textTrackCue = this.config.textTrackCue, this.x = this.config.x, this.width = this.config.width, this.listening = this.config.listening, this.subtitlesLane = t, this.subtitlesLane.onSettleLayout$.pipe(x(this.onDestroy$)).subscribe(() => {
|
|
14094
14094
|
let i = this.subtitlesLane.resolveItemHorizontalMeasurement(this.getTextTrackCue());
|
|
14095
14095
|
this.setHorizontalMeasurement(i);
|
|
14096
14096
|
});
|
|
14097
14097
|
}
|
|
14098
14098
|
createCanvasNode() {
|
|
14099
|
-
return this.group = new
|
|
14099
|
+
return this.group = new O.Group({
|
|
14100
14100
|
x: this.x,
|
|
14101
14101
|
y: 0,
|
|
14102
14102
|
width: this.width,
|
|
14103
14103
|
height: this.style.height,
|
|
14104
14104
|
visible: this.style.visible,
|
|
14105
14105
|
listening: this.listening
|
|
14106
|
-
}), this.backgroundRect = new
|
|
14106
|
+
}), this.backgroundRect = new O.Rect({
|
|
14107
14107
|
x: 0,
|
|
14108
14108
|
y: 0,
|
|
14109
14109
|
width: this.group.width(),
|
|
@@ -14182,14 +14182,14 @@ class Ta extends er {
|
|
|
14182
14182
|
}), this.subtitlesLaneItemsMap = /* @__PURE__ */ new Map(), this.onSettleLayout$ = new V(), this._subtitlesVttUrl = this.config.subtitlesVttUrl;
|
|
14183
14183
|
}
|
|
14184
14184
|
createCanvasNode() {
|
|
14185
|
-
return super.createCanvasNode(), this.timecodedGroup = new
|
|
14185
|
+
return super.createCanvasNode(), this.timecodedGroup = new O.Group({
|
|
14186
14186
|
...this.timelinePosition,
|
|
14187
14187
|
width: this.timeline.getTimecodedGroupDimension().width,
|
|
14188
14188
|
height: this.bodyGroup.height()
|
|
14189
14189
|
}), this.timecodedEventCatcher = yi.createEventCatcher({
|
|
14190
14190
|
width: this.timecodedGroup.width(),
|
|
14191
14191
|
height: this.timecodedGroup.height()
|
|
14192
|
-
}), this.subtitlesLaneItemsGroup = new
|
|
14192
|
+
}), this.subtitlesLaneItemsGroup = new O.Group({
|
|
14193
14193
|
...F.POSITION_TOP_LEFT,
|
|
14194
14194
|
y: this.style.paddingTop,
|
|
14195
14195
|
width: this.timecodedGroup.width(),
|
|
@@ -14271,14 +14271,14 @@ class Ws extends Je {
|
|
|
14271
14271
|
super(vi(e, Pm)), this.onClick$ = new V(), this.onMouseOver$ = new V(), this.onMouseMove$ = new V(), this.onMouseOut$ = new V(), this.onMouseLeave$ = new V(), this.listening = this.config.listening;
|
|
14272
14272
|
}
|
|
14273
14273
|
createCanvasNode() {
|
|
14274
|
-
return this.group = new
|
|
14274
|
+
return this.group = new O.Group({
|
|
14275
14275
|
x: this.style.x,
|
|
14276
14276
|
y: this.style.y,
|
|
14277
14277
|
width: this.style.width,
|
|
14278
14278
|
height: this.style.height,
|
|
14279
14279
|
visible: this.style.visible,
|
|
14280
14280
|
listening: this.listening
|
|
14281
|
-
}), this.backgroundRect = new
|
|
14281
|
+
}), this.backgroundRect = new O.Rect({
|
|
14282
14282
|
x: 0,
|
|
14283
14283
|
y: 0,
|
|
14284
14284
|
width: this.group.width(),
|
|
@@ -14405,7 +14405,7 @@ class ss extends gn {
|
|
|
14405
14405
|
class dt {
|
|
14406
14406
|
static createKonvaImage(e) {
|
|
14407
14407
|
return new se((t) => {
|
|
14408
|
-
|
|
14408
|
+
O.Image.fromURL(e, (i) => {
|
|
14409
14409
|
t.next(i), t.complete();
|
|
14410
14410
|
}, (i) => {
|
|
14411
14411
|
console.error(i), t.error(i);
|
|
@@ -14451,14 +14451,14 @@ class Ca extends er {
|
|
|
14451
14451
|
}), this.thumbnailsMap = /* @__PURE__ */ new Map(), this.thumbnailsVisibleSet = /* @__PURE__ */ new Set(), this.onSettleLayout$ = new V(), this.eventStreamBreaker$ = new V(), this.onClick$ = new V(), this._thumbnailVttUrl = this.config.thumbnailVttUrl, this._axiosConfig = this.config.axiosConfig;
|
|
14452
14452
|
}
|
|
14453
14453
|
createCanvasNode() {
|
|
14454
|
-
return super.createCanvasNode(), this.timecodedGroup = new
|
|
14454
|
+
return super.createCanvasNode(), this.timecodedGroup = new O.Group({
|
|
14455
14455
|
...this.timelinePosition,
|
|
14456
14456
|
width: this.timeline.getTimecodedGroupDimension().width,
|
|
14457
14457
|
height: this.bodyGroup.height()
|
|
14458
14458
|
}), this.timecodedEventCatcher = yi.createEventCatcher({
|
|
14459
14459
|
width: this.timecodedGroup.width(),
|
|
14460
14460
|
height: this.timecodedGroup.height()
|
|
14461
|
-
}), this.thumbnailsGroup = new
|
|
14461
|
+
}), this.thumbnailsGroup = new O.Group({
|
|
14462
14462
|
x: 0,
|
|
14463
14463
|
y: this.style.height / 2 - this.style.thumbnailHeight / 2,
|
|
14464
14464
|
width: this.timecodedGroup.width(),
|
|
@@ -14481,9 +14481,9 @@ class Ca extends er {
|
|
|
14481
14481
|
}), this.onSettleLayout$.next();
|
|
14482
14482
|
}
|
|
14483
14483
|
afterCanvasNodeInit() {
|
|
14484
|
-
super.afterCanvasNodeInit(), this.fetchAndCreateThumbnails(), this.onSettleLayout$.pipe(
|
|
14484
|
+
super.afterCanvasNodeInit(), this.fetchAndCreateThumbnails(), this.onSettleLayout$.pipe(x(this.onDestroy$)).subscribe(() => {
|
|
14485
14485
|
this.hideThumbnailHover(), this.adjustThumbnails();
|
|
14486
|
-
}), this.onSettleLayout$.pipe(
|
|
14486
|
+
}), this.onSettleLayout$.pipe(x(this.onDestroy$)).pipe(Ro(100)).subscribe(() => {
|
|
14487
14487
|
this.createAndAdjustThumbnails();
|
|
14488
14488
|
}), this.timecodedGroup.on("mouseout mouseleave", (e) => {
|
|
14489
14489
|
this.hideThumbnailHover();
|
|
@@ -14544,15 +14544,15 @@ class Ca extends er {
|
|
|
14544
14544
|
strokeWidth: this.style.thumbnailStrokeWidth
|
|
14545
14545
|
}
|
|
14546
14546
|
});
|
|
14547
|
-
return n.setThumbnailVttCue(e), n.initCanvasNode(), n.setImage(t), n.onClick$.pipe(
|
|
14547
|
+
return n.setThumbnailVttCue(e), n.initCanvasNode(), n.setImage(t), n.onClick$.pipe(x(this.eventStreamBreaker$)).subscribe((a) => {
|
|
14548
14548
|
this.onClick$.next(a);
|
|
14549
|
-
}), n.onMouseOver$.pipe(
|
|
14549
|
+
}), n.onMouseOver$.pipe(x(this.eventStreamBreaker$)).subscribe((a) => {
|
|
14550
14550
|
this.showThumbnailHover(a.thumbnail);
|
|
14551
|
-
}), n.onMouseMove$.pipe(
|
|
14551
|
+
}), n.onMouseMove$.pipe(x(this.eventStreamBreaker$)).subscribe((a) => {
|
|
14552
14552
|
this.showThumbnailHover(a.thumbnail);
|
|
14553
|
-
}), n.onMouseOut$.pipe(
|
|
14553
|
+
}), n.onMouseOut$.pipe(x(this.eventStreamBreaker$)).subscribe((a) => {
|
|
14554
14554
|
this.hideThumbnailHover();
|
|
14555
|
-
}), n.onMouseLeave$.pipe(
|
|
14555
|
+
}), n.onMouseLeave$.pipe(x(this.eventStreamBreaker$)).subscribe((a) => {
|
|
14556
14556
|
this.hideThumbnailHover();
|
|
14557
14557
|
}), n;
|
|
14558
14558
|
}
|
|
@@ -14647,7 +14647,7 @@ class Om extends Je {
|
|
|
14647
14647
|
}), this.audioVttCue = this.config.audioVttCue, this.x = this.config.x, this.width = this.config.width, this.listening = this.config.listening;
|
|
14648
14648
|
}
|
|
14649
14649
|
createCanvasNode() {
|
|
14650
|
-
this.group = new
|
|
14650
|
+
this.group = new O.Group({
|
|
14651
14651
|
x: this.x,
|
|
14652
14652
|
y: 0,
|
|
14653
14653
|
width: this.width,
|
|
@@ -14656,7 +14656,7 @@ class Om extends Je {
|
|
|
14656
14656
|
listening: this.listening
|
|
14657
14657
|
});
|
|
14658
14658
|
let e = this.style.height / 2, t = this.resolveMaxSampleBarHeight(), i = this.resolveMinSampleBarHeight();
|
|
14659
|
-
return this.maxSampleBar = new
|
|
14659
|
+
return this.maxSampleBar = new O.Rect({
|
|
14660
14660
|
x: 0,
|
|
14661
14661
|
width: this.group.width(),
|
|
14662
14662
|
y: e - t,
|
|
@@ -14669,7 +14669,7 @@ class Om extends Je {
|
|
|
14669
14669
|
perfectDrawEnabled: !1,
|
|
14670
14670
|
shadowForStrokeEnabled: !1,
|
|
14671
14671
|
hitStrokeWidth: 0
|
|
14672
|
-
}), this.minSampleBar = new
|
|
14672
|
+
}), this.minSampleBar = new O.Rect({
|
|
14673
14673
|
x: 0,
|
|
14674
14674
|
width: this.group.width(),
|
|
14675
14675
|
y: e,
|
|
@@ -14746,14 +14746,14 @@ class Lm extends er {
|
|
|
14746
14746
|
}), this.audioTrackLaneItemsMap = /* @__PURE__ */ new Map(), this.onSettleLayout$ = new V(), this._audioVttFileUrl = this.config.audioVttFileUrl;
|
|
14747
14747
|
}
|
|
14748
14748
|
createCanvasNode() {
|
|
14749
|
-
return super.createCanvasNode(), this.timecodedGroup = new
|
|
14749
|
+
return super.createCanvasNode(), this.timecodedGroup = new O.Group({
|
|
14750
14750
|
...this.timelinePosition,
|
|
14751
14751
|
width: this.timeline.getTimecodedGroupDimension().width,
|
|
14752
14752
|
height: this.bodyGroup.height()
|
|
14753
14753
|
}), this.timecodedEventCatcher = yi.createEventCatcher({
|
|
14754
14754
|
width: this.timecodedGroup.width(),
|
|
14755
14755
|
height: this.timecodedGroup.height()
|
|
14756
|
-
}), this.audioTrackLaneItemsGroup = new
|
|
14756
|
+
}), this.audioTrackLaneItemsGroup = new O.Group({
|
|
14757
14757
|
...F.POSITION_TOP_LEFT,
|
|
14758
14758
|
y: this.style.paddingTop,
|
|
14759
14759
|
width: this.timecodedGroup.width(),
|
|
@@ -14770,12 +14770,12 @@ class Lm extends er {
|
|
|
14770
14770
|
}), this.onSettleLayout$.next();
|
|
14771
14771
|
}
|
|
14772
14772
|
afterCanvasNodeInit() {
|
|
14773
|
-
super.afterCanvasNodeInit(), this.fetchAndCreateAudioTrack(), this.onSettleLayout$.pipe(
|
|
14773
|
+
super.afterCanvasNodeInit(), this.fetchAndCreateAudioTrack(), this.onSettleLayout$.pipe(x(this.onDestroy$)).subscribe(() => {
|
|
14774
14774
|
this.settlePosition();
|
|
14775
14775
|
}), xu([
|
|
14776
14776
|
this.onSettleLayout$,
|
|
14777
14777
|
this.timeline.onScroll$
|
|
14778
|
-
]).pipe(
|
|
14778
|
+
]).pipe(x(this.onDestroy$), Ro(100)).subscribe(() => {
|
|
14779
14779
|
this.settleAll();
|
|
14780
14780
|
});
|
|
14781
14781
|
}
|
|
@@ -14878,8 +14878,8 @@ class Lm extends er {
|
|
|
14878
14878
|
function Us(r) {
|
|
14879
14879
|
if (r.from === r.to)
|
|
14880
14880
|
return;
|
|
14881
|
-
let e = r.from < r.to, t = e ? r.to - r.from : r.from - r.to, i = new
|
|
14882
|
-
let n =
|
|
14881
|
+
let e = r.from < r.to, t = e ? r.to - r.from : r.from - r.to, i = new O.Animation((s) => {
|
|
14882
|
+
let n = O.Easings.StrongEaseInOut(s.time, 0, t, r.duration);
|
|
14883
14883
|
if (n >= t)
|
|
14884
14884
|
r.onUpdateHandler(s, r.to), i.stop(), r.onCompleteHandler && (r.onCompleteHandler(s, r.to), i = null);
|
|
14885
14885
|
else {
|
|
@@ -14908,36 +14908,36 @@ class Im extends Je {
|
|
|
14908
14908
|
super(vi(e, Rm)), this.onScroll$ = new V(), this.onZoom$ = new V(), this.x = this.config.x, this.y = this.config.y, this.width = this.config.width, this.zoomMax = this.config.zoomMax, this.scrollStepNumberOfDivisions = this.config.scrollStepNumberOfDivisions;
|
|
14909
14909
|
}
|
|
14910
14910
|
createCanvasNode() {
|
|
14911
|
-
return this.group = new
|
|
14911
|
+
return this.group = new O.Group({
|
|
14912
14912
|
x: this.x,
|
|
14913
14913
|
y: this.y,
|
|
14914
14914
|
width: this.width,
|
|
14915
14915
|
height: this.style.height
|
|
14916
|
-
}), this.background = new
|
|
14916
|
+
}), this.background = new O.Rect({
|
|
14917
14917
|
...F.POSITION_TOP_LEFT,
|
|
14918
14918
|
width: this.group.width(),
|
|
14919
14919
|
height: this.style.height,
|
|
14920
14920
|
fill: this.style.backgroundFill,
|
|
14921
14921
|
opacity: this.style.backgroundFillOpacity
|
|
14922
|
-
}), this.handleGroup = new
|
|
14922
|
+
}), this.handleGroup = new O.Group({
|
|
14923
14923
|
...F.POSITION_TOP_LEFT,
|
|
14924
14924
|
width: this.group.width(),
|
|
14925
14925
|
height: this.style.height
|
|
14926
|
-
}), this.handleBar = new
|
|
14926
|
+
}), this.handleBar = new O.Rect({
|
|
14927
14927
|
...F.POSITION_TOP_LEFT,
|
|
14928
14928
|
width: this.handleGroup.width(),
|
|
14929
14929
|
height: this.style.height,
|
|
14930
14930
|
fill: this.style.handleBarFill,
|
|
14931
14931
|
opacity: this.style.handleBarOpacity,
|
|
14932
14932
|
draggable: !0
|
|
14933
|
-
}), this.leftZoomHandle = new
|
|
14933
|
+
}), this.leftZoomHandle = new O.Circle({
|
|
14934
14934
|
...F.POSITION_TOP_LEFT,
|
|
14935
14935
|
fill: this.style.handleBarFill,
|
|
14936
14936
|
radius: this.style.height / 2,
|
|
14937
14937
|
y: this.style.height / 2,
|
|
14938
14938
|
opacity: this.style.handleOpacity,
|
|
14939
14939
|
draggable: !0
|
|
14940
|
-
}), this.rightZoomHandle = new
|
|
14940
|
+
}), this.rightZoomHandle = new O.Circle({
|
|
14941
14941
|
...F.POSITION_TOP_LEFT,
|
|
14942
14942
|
fill: this.style.handleBarFill,
|
|
14943
14943
|
radius: this.style.height / 2,
|
|
@@ -14947,7 +14947,7 @@ class Im extends Je {
|
|
|
14947
14947
|
}), this.handleGroup.add(this.background), this.handleGroup.add(this.handleBar), this.group.add(this.background), this.group.add(this.handleGroup), this.handleGroup.add(this.leftZoomHandle), this.handleGroup.add(this.rightZoomHandle), this.group;
|
|
14948
14948
|
}
|
|
14949
14949
|
afterCanvasNodeInit() {
|
|
14950
|
-
this.styleAdapter.onChange$.pipe(
|
|
14950
|
+
this.styleAdapter.onChange$.pipe(x(this.onDestroy$), $e((n) => !!n)).subscribe((n) => {
|
|
14951
14951
|
this.onStyleChange();
|
|
14952
14952
|
}), this.group.on("click", (n) => {
|
|
14953
14953
|
this.clickScrollTo(this.group.getRelativePointerPosition().x);
|
|
@@ -15133,25 +15133,25 @@ class Gm extends Je {
|
|
|
15133
15133
|
super(vi(e, Nm)), this.stylesProvider = lt.instance(), this.timeline = t;
|
|
15134
15134
|
}
|
|
15135
15135
|
createCanvasNode() {
|
|
15136
|
-
return this.group = new
|
|
15136
|
+
return this.group = new O.Group({
|
|
15137
15137
|
x: this.style.x,
|
|
15138
15138
|
y: this.style.y,
|
|
15139
15139
|
visible: this.style.visible,
|
|
15140
15140
|
listening: !1
|
|
15141
|
-
}), this.line = new
|
|
15141
|
+
}), this.line = new O.Line({
|
|
15142
15142
|
points: [this.style.x, 0, this.style.x, this.style.height],
|
|
15143
15143
|
stroke: this.style.fill,
|
|
15144
15144
|
strokeWidth: this.style.lineWidth,
|
|
15145
15145
|
listening: !1
|
|
15146
|
-
}), this.symbol = new
|
|
15146
|
+
}), this.symbol = new O.Circle({
|
|
15147
15147
|
y: this.style.symbolY,
|
|
15148
15148
|
fill: this.style.fill,
|
|
15149
15149
|
radius: this.style.symbolHeight / 2,
|
|
15150
15150
|
offsetY: -this.style.symbolHeight / 2
|
|
15151
|
-
}), this.group.add(this.symbol), this.group.add(this.line), this.label = new
|
|
15151
|
+
}), this.group.add(this.symbol), this.group.add(this.line), this.label = new O.Label({
|
|
15152
15152
|
...F.POSITION_TOP_LEFT,
|
|
15153
15153
|
listening: !1
|
|
15154
|
-
}), this.text = new
|
|
15154
|
+
}), this.text = new O.Text({
|
|
15155
15155
|
fontSize: this.style.textFontSize,
|
|
15156
15156
|
fontFamily: this.stylesProvider.styles.omakasePlayerStyle.fontFamily,
|
|
15157
15157
|
fill: this.style.textFill,
|
|
@@ -15161,9 +15161,9 @@ class Gm extends Je {
|
|
|
15161
15161
|
}), this.label.y(-this.text.getSelfRect().height), this.label.add(this.text), this.group.add(this.label), this.group;
|
|
15162
15162
|
}
|
|
15163
15163
|
afterCanvasNodeInit() {
|
|
15164
|
-
this.styleAdapter.onChange$.pipe(
|
|
15164
|
+
this.styleAdapter.onChange$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15165
15165
|
this.onMeasurementsChange();
|
|
15166
|
-
}), this.stylesProvider.onChange$.pipe($e((e) => !!e),
|
|
15166
|
+
}), this.stylesProvider.onChange$.pipe($e((e) => !!e), x(this.onDestroy$)).subscribe((e) => {
|
|
15167
15167
|
this.text.setAttrs({
|
|
15168
15168
|
fontFamily: this.stylesProvider.styles.omakasePlayerStyle.fontFamily
|
|
15169
15169
|
});
|
|
@@ -15204,26 +15204,26 @@ class Fm extends Je {
|
|
|
15204
15204
|
super(vi(e, Dm)), this.timeline = t, this.videoController = i;
|
|
15205
15205
|
}
|
|
15206
15206
|
createCanvasNode() {
|
|
15207
|
-
return this.group = new
|
|
15207
|
+
return this.group = new O.Group({
|
|
15208
15208
|
...F.POSITION_TOP_LEFT,
|
|
15209
15209
|
listening: !1
|
|
15210
|
-
}), this.background = new
|
|
15210
|
+
}), this.background = new O.Rect({
|
|
15211
15211
|
...F.POSITION_TOP_LEFT,
|
|
15212
15212
|
height: this.style.scrubberHeight,
|
|
15213
15213
|
fill: this.style.backgroundFill,
|
|
15214
15214
|
opacity: this.style.backgroundOpacity,
|
|
15215
15215
|
listening: !1
|
|
15216
|
-
}), this.playProgressBackground = new
|
|
15216
|
+
}), this.playProgressBackground = new O.Rect({
|
|
15217
15217
|
...F.POSITION_TOP_LEFT,
|
|
15218
15218
|
height: this.style.scrubberHeight,
|
|
15219
15219
|
fill: this.style.playProgressFill,
|
|
15220
15220
|
opacity: this.style.playProgressOpacity,
|
|
15221
15221
|
listening: !1
|
|
15222
|
-
}), this.playheadGroup = new
|
|
15222
|
+
}), this.playheadGroup = new O.Group({
|
|
15223
15223
|
...F.POSITION_TOP_LEFT,
|
|
15224
15224
|
visible: this.style.visible,
|
|
15225
15225
|
listening: !1
|
|
15226
|
-
}), this.playheadLine = new
|
|
15226
|
+
}), this.playheadLine = new O.Line({
|
|
15227
15227
|
points: [0, 0, 0, 0],
|
|
15228
15228
|
stroke: this.style.fill,
|
|
15229
15229
|
strokeWidth: this.style.lineWidth,
|
|
@@ -15232,23 +15232,23 @@ class Fm extends Je {
|
|
|
15232
15232
|
...F.POSITION_TOP_LEFT,
|
|
15233
15233
|
height: this.style.symbolHeight,
|
|
15234
15234
|
color: this.style.fill
|
|
15235
|
-
}), this.bufferedGroup = new
|
|
15235
|
+
}), this.bufferedGroup = new O.Group({
|
|
15236
15236
|
...F.POSITION_TOP_LEFT,
|
|
15237
15237
|
listening: !1
|
|
15238
15238
|
}), this.group.add(this.background), this.group.add(this.bufferedGroup), this.group.add(this.playProgressBackground), this.playheadGroup.add(this.playheadLine), this.playheadGroup.add(this.playheadSymbol), this.group.add(this.playheadGroup), this.group;
|
|
15239
15239
|
}
|
|
15240
15240
|
afterCanvasNodeInit() {
|
|
15241
|
-
this.settleLayout(), this.timeline.onZoom$.pipe(
|
|
15241
|
+
this.settleLayout(), this.timeline.onZoom$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15242
15242
|
this.settleLayout();
|
|
15243
|
-
}), this.videoController.onVideoLoading$.pipe(
|
|
15243
|
+
}), this.videoController.onVideoLoading$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15244
15244
|
this.group.visible(!1);
|
|
15245
|
-
}), this.videoController.onVideoLoaded$.pipe(
|
|
15245
|
+
}), this.videoController.onVideoLoaded$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15246
15246
|
this.group.visible(!0), this.doPlayProgress(), this.doBufferingProgress();
|
|
15247
|
-
}), this.videoController.onVideoTimeChange$.pipe(
|
|
15247
|
+
}), this.videoController.onVideoTimeChange$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15248
15248
|
this.doPlayProgress();
|
|
15249
|
-
}), this.videoController.onSeeking$.pipe(
|
|
15249
|
+
}), this.videoController.onSeeking$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15250
15250
|
this.doPlayProgress(), this.doBufferingProgress();
|
|
15251
|
-
}), this.videoController.onBuffering$.pipe(
|
|
15251
|
+
}), this.videoController.onBuffering$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15252
15252
|
this.doBufferingProgress();
|
|
15253
15253
|
});
|
|
15254
15254
|
}
|
|
@@ -15293,7 +15293,7 @@ class Fm extends Je {
|
|
|
15293
15293
|
}
|
|
15294
15294
|
createBuffers(e) {
|
|
15295
15295
|
e.forEach((t) => {
|
|
15296
|
-
let i = this.timeline.timeToTimelinePosition(t.start), s = this.timeline.timeToTimelinePosition(t.end), n = new
|
|
15296
|
+
let i = this.timeline.timeToTimelinePosition(t.start), s = this.timeline.timeToTimelinePosition(t.end), n = new O.Rect({
|
|
15297
15297
|
x: i,
|
|
15298
15298
|
y: 0,
|
|
15299
15299
|
width: s - i,
|
|
@@ -15321,14 +15321,14 @@ class Ol extends Je {
|
|
|
15321
15321
|
super(vi(e, Hm)), this.stylesProvider = lt.instance(), this.videoEventStreamBreaker$ = new V(), this.videoController = t;
|
|
15322
15322
|
}
|
|
15323
15323
|
createCanvasNode() {
|
|
15324
|
-
return this.group = new
|
|
15324
|
+
return this.group = new O.Group({
|
|
15325
15325
|
x: this.style.x,
|
|
15326
15326
|
y: this.style.y,
|
|
15327
15327
|
width: this.style.width,
|
|
15328
15328
|
height: this.style.height,
|
|
15329
15329
|
listening: !1,
|
|
15330
15330
|
visible: this.style.visible
|
|
15331
|
-
}), this.text = new
|
|
15331
|
+
}), this.text = new O.Text({
|
|
15332
15332
|
...F.POSITION_TOP_LEFT,
|
|
15333
15333
|
width: this.group.width(),
|
|
15334
15334
|
height: this.group.height(),
|
|
@@ -15342,11 +15342,11 @@ class Ol extends Je {
|
|
|
15342
15342
|
}), this.group.add(this.text), this.group;
|
|
15343
15343
|
}
|
|
15344
15344
|
afterCanvasNodeInit() {
|
|
15345
|
-
super.afterCanvasNodeInit(), this.stylesProvider.onChange$.pipe($e((e) => !!e),
|
|
15345
|
+
super.afterCanvasNodeInit(), this.stylesProvider.onChange$.pipe($e((e) => !!e), x(this.onDestroy$)).subscribe((e) => {
|
|
15346
15346
|
this.text.setAttrs({
|
|
15347
15347
|
fontFamily: this.stylesProvider.styles.omakasePlayerStyle.fontFamily
|
|
15348
15348
|
});
|
|
15349
|
-
}), this.videoController.onVideoLoaded$.pipe($e((e) => !!e),
|
|
15349
|
+
}), this.videoController.onVideoLoaded$.pipe($e((e) => !!e), x(this.onDestroy$)).subscribe((e) => {
|
|
15350
15350
|
this.onVideoLoadedEvent(e);
|
|
15351
15351
|
});
|
|
15352
15352
|
}
|
|
@@ -15357,7 +15357,7 @@ class Ol extends Je {
|
|
|
15357
15357
|
this.videoEventStreamBreaker$ && (this.videoEventStreamBreaker$.next(), this.videoEventStreamBreaker$.complete()), this.videoEventStreamBreaker$ = new V();
|
|
15358
15358
|
}
|
|
15359
15359
|
onVideoLoadedEvent(e) {
|
|
15360
|
-
this.fireVideoEventStreamBreaker(), this.text.text(this.videoController.formatTimestamp(0)), this.videoController.onVideoTimeChange$.pipe(
|
|
15360
|
+
this.fireVideoEventStreamBreaker(), this.text.text(this.videoController.formatTimestamp(0)), this.videoController.onVideoTimeChange$.pipe(x(this.videoEventStreamBreaker$)).subscribe((t) => {
|
|
15361
15361
|
this.text.text(this.videoController.formatTimestamp(t.currentTime));
|
|
15362
15362
|
});
|
|
15363
15363
|
}
|
|
@@ -15401,14 +15401,14 @@ class $m extends er {
|
|
|
15401
15401
|
}), this.onClick$ = new V(), this.onMouseEnter$ = new V(), this.onMouseOver$ = new V(), this.onMouseMove$ = new V(), this.onMouseOut$ = new V(), this.onMouseLeave$ = new V(), this.videoController = t;
|
|
15402
15402
|
}
|
|
15403
15403
|
createCanvasNode() {
|
|
15404
|
-
return super.createCanvasNode(), this.timecodedGroup = new
|
|
15404
|
+
return super.createCanvasNode(), this.timecodedGroup = new O.Group({
|
|
15405
15405
|
...this.timelinePosition,
|
|
15406
15406
|
width: this.timeline.getTimecodedGroupDimension().width,
|
|
15407
15407
|
height: this.bodyGroup.height()
|
|
15408
15408
|
}), this.timecodedEventCatcher = yi.createEventCatcher({
|
|
15409
15409
|
width: this.timecodedGroup.width(),
|
|
15410
15410
|
height: this.timecodedGroup.height()
|
|
15411
|
-
}), this.ticksGroup = new
|
|
15411
|
+
}), this.ticksGroup = new O.Group({
|
|
15412
15412
|
...F.POSITION_TOP_LEFT,
|
|
15413
15413
|
width: this.timecodedGroup.width(),
|
|
15414
15414
|
height: this.timecodedGroup.height()
|
|
@@ -15454,9 +15454,9 @@ class $m extends er {
|
|
|
15454
15454
|
evt: e.evt,
|
|
15455
15455
|
position: this.timecodedGroup.getRelativePointerPosition()
|
|
15456
15456
|
});
|
|
15457
|
-
}), this.videoController.onVideoLoading$.pipe(
|
|
15457
|
+
}), this.videoController.onVideoLoading$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15458
15458
|
this.clearContent();
|
|
15459
|
-
}), this.videoController.onVideoLoaded$.pipe(
|
|
15459
|
+
}), this.videoController.onVideoLoaded$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15460
15460
|
this.settleLayout();
|
|
15461
15461
|
});
|
|
15462
15462
|
}
|
|
@@ -15480,34 +15480,34 @@ class $m extends er {
|
|
|
15480
15480
|
if (o)
|
|
15481
15481
|
this.ticksGroup.getChildren()[c].x(v);
|
|
15482
15482
|
else {
|
|
15483
|
-
let T = new
|
|
15483
|
+
let T = new O.Group({
|
|
15484
15484
|
x: v,
|
|
15485
15485
|
y: h
|
|
15486
|
-
}),
|
|
15486
|
+
}), L = 0, A = new O.Line({
|
|
15487
15487
|
points: [
|
|
15488
|
-
|
|
15488
|
+
L,
|
|
15489
15489
|
w,
|
|
15490
|
-
|
|
15490
|
+
L,
|
|
15491
15491
|
w + _
|
|
15492
15492
|
],
|
|
15493
15493
|
stroke: this.style.tickFill,
|
|
15494
15494
|
strokeWidth: 1,
|
|
15495
15495
|
listening: !1
|
|
15496
15496
|
});
|
|
15497
|
-
T.add(
|
|
15498
|
-
let G = new
|
|
15497
|
+
T.add(A);
|
|
15498
|
+
let G = new O.Text({
|
|
15499
15499
|
fontSize: this.style.timecodeFontSize,
|
|
15500
15500
|
fontFamily: this.stylesProvider.styles.omakasePlayerStyle.fontFamily,
|
|
15501
15501
|
fill: this.style.timecodeFill,
|
|
15502
15502
|
text: `${this.timeline.timelinePositionToTimeFormatted(v)}`,
|
|
15503
15503
|
listening: !1
|
|
15504
|
-
}),
|
|
15504
|
+
}), R = G.getSelfRect(), H = p ? L + l : f ? L - R.width - d : L - R.width / 2, $ = b - R.height;
|
|
15505
15505
|
G.setAttrs({
|
|
15506
15506
|
x: H,
|
|
15507
15507
|
y: $
|
|
15508
15508
|
});
|
|
15509
|
-
let
|
|
15510
|
-
|
|
15509
|
+
let I = m;
|
|
15510
|
+
I = p ? this.style.timecodeShowFirst : I, I && (T.add(G), T.x() + (G.x() > 0 ? 0 : G.x()), T.y(), G.width()), this.ticksGroup.add(T);
|
|
15511
15511
|
}
|
|
15512
15512
|
}
|
|
15513
15513
|
}
|
|
@@ -15560,56 +15560,56 @@ class zm extends Je {
|
|
|
15560
15560
|
}
|
|
15561
15561
|
createCanvasNode() {
|
|
15562
15562
|
let e = this.resolveStageDimension();
|
|
15563
|
-
return this.width = e.width, this.stage = new
|
|
15563
|
+
return this.width = e.width, this.stage = new O.Stage({
|
|
15564
15564
|
container: this.timelineHTMLElementId,
|
|
15565
15565
|
...e
|
|
15566
|
-
}), this.layer = new
|
|
15566
|
+
}), this.layer = new O.Layer(), this.stage.add(this.layer), this.layoutGroup = new O.Group({
|
|
15567
15567
|
...F.POSITION_TOP_LEFT
|
|
15568
|
-
}), this.layer.add(this.layoutGroup), this.layoutBackground = new
|
|
15568
|
+
}), this.layer.add(this.layoutGroup), this.layoutBackground = new O.Rect({
|
|
15569
15569
|
...F.POSITION_TOP_LEFT,
|
|
15570
15570
|
fill: this.style.backgroundFill
|
|
15571
|
-
}), this.headerGroup = new
|
|
15571
|
+
}), this.headerGroup = new O.Group({
|
|
15572
15572
|
...F.POSITION_TOP_LEFT
|
|
15573
|
-
}), this.headerBackground = new
|
|
15573
|
+
}), this.headerBackground = new O.Rect({
|
|
15574
15574
|
...F.POSITION_TOP_LEFT,
|
|
15575
15575
|
fill: this.style.headerBackgroundFill
|
|
15576
|
-
}), this.footerGroup = new
|
|
15576
|
+
}), this.footerGroup = new O.Group({
|
|
15577
15577
|
...F.POSITION_TOP_LEFT
|
|
15578
|
-
}), this.footerBackground = new
|
|
15578
|
+
}), this.footerBackground = new O.Rect({
|
|
15579
15579
|
...F.POSITION_TOP_LEFT,
|
|
15580
15580
|
fill: this.style.footerBackgroundFill
|
|
15581
|
-
}), this.bodyGroup = new
|
|
15581
|
+
}), this.bodyGroup = new O.Group({
|
|
15582
15582
|
...F.POSITION_TOP_LEFT
|
|
15583
|
-
}), this.bodyContentGroup = new
|
|
15583
|
+
}), this.bodyContentGroup = new O.Group({
|
|
15584
15584
|
...F.POSITION_TOP_LEFT
|
|
15585
|
-
}), this.leftPanel = new
|
|
15585
|
+
}), this.leftPanel = new O.Group({
|
|
15586
15586
|
...F.POSITION_TOP_LEFT
|
|
15587
|
-
}), this.rightPanel = new
|
|
15587
|
+
}), this.rightPanel = new O.Group({
|
|
15588
15588
|
...F.POSITION_TOP_LEFT
|
|
15589
|
-
}), this.timecodedContainer = new
|
|
15589
|
+
}), this.timecodedContainer = new O.Group({
|
|
15590
15590
|
...F.POSITION_TOP_LEFT
|
|
15591
|
-
}), this.timecodedGroup = new
|
|
15591
|
+
}), this.timecodedGroup = new O.Group({
|
|
15592
15592
|
...F.POSITION_TOP_LEFT,
|
|
15593
15593
|
draggable: !0
|
|
15594
|
-
}), this.timecodedBaseGroup = new
|
|
15594
|
+
}), this.timecodedBaseGroup = new O.Group({
|
|
15595
15595
|
...F.POSITION_TOP_LEFT,
|
|
15596
15596
|
name: "timecodedBaseGroup"
|
|
15597
|
-
}), this.timecodedThumbnailsGroup = new
|
|
15597
|
+
}), this.timecodedThumbnailsGroup = new O.Group({
|
|
15598
15598
|
...F.POSITION_TOP_LEFT,
|
|
15599
15599
|
name: "timecodedThumbnailsGroup"
|
|
15600
|
-
}), this.timecodedSubtitlesGroup = new
|
|
15600
|
+
}), this.timecodedSubtitlesGroup = new O.Group({
|
|
15601
15601
|
...F.POSITION_TOP_LEFT,
|
|
15602
15602
|
name: "timecodedSubtitlesGroup"
|
|
15603
|
-
}), this.timecodedAudioGroup = new
|
|
15603
|
+
}), this.timecodedAudioGroup = new O.Group({
|
|
15604
15604
|
...F.POSITION_TOP_LEFT,
|
|
15605
15605
|
name: "timecodedAudioGroup"
|
|
15606
|
-
}), this.timecodedMarkersGroup = new
|
|
15606
|
+
}), this.timecodedMarkersGroup = new O.Group({
|
|
15607
15607
|
...F.POSITION_TOP_LEFT,
|
|
15608
15608
|
name: "timecodedMarkersGroup"
|
|
15609
|
-
}), this.timecodedSurfaceGroup = new
|
|
15609
|
+
}), this.timecodedSurfaceGroup = new O.Group({
|
|
15610
15610
|
...F.POSITION_TOP_LEFT,
|
|
15611
15611
|
name: "timecodedSurfaceGroup"
|
|
15612
|
-
}), this.timecodedBackground = new
|
|
15612
|
+
}), this.timecodedBackground = new O.Rect({
|
|
15613
15613
|
...F.POSITION_TOP_LEFT,
|
|
15614
15614
|
fill: "yellow",
|
|
15615
15615
|
opacity: 0,
|
|
@@ -15665,11 +15665,11 @@ class zm extends Je {
|
|
|
15665
15665
|
]), this.stage;
|
|
15666
15666
|
}
|
|
15667
15667
|
afterCanvasNodeInit() {
|
|
15668
|
-
this.videoController.onVideoLoading$.pipe($e((e) => !!e),
|
|
15668
|
+
this.videoController.onVideoLoading$.pipe($e((e) => !!e), x(this.onDestroy$)).subscribe((e) => {
|
|
15669
15669
|
this.clearContent();
|
|
15670
|
-
}), this.videoController.onVideoLoaded$.pipe($e((e) => !!e),
|
|
15670
|
+
}), this.videoController.onVideoLoaded$.pipe($e((e) => !!e), x(this.onDestroy$)).subscribe((e) => {
|
|
15671
15671
|
this.onVideoLoadedEvent(e);
|
|
15672
|
-
}), be(window, "resize").pipe(
|
|
15672
|
+
}), be(window, "resize").pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15673
15673
|
setTimeout(() => {
|
|
15674
15674
|
this.onWindowResize(e);
|
|
15675
15675
|
}, 200);
|
|
@@ -15717,7 +15717,7 @@ class zm extends Je {
|
|
|
15717
15717
|
et.cursor("grabbing");
|
|
15718
15718
|
}), this.timecodedGroup.on("dragend", (e) => {
|
|
15719
15719
|
et.cursor("default");
|
|
15720
|
-
}), this.scrubberLane.onMouseMove$.pipe(
|
|
15720
|
+
}), this.scrubberLane.onMouseMove$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15721
15721
|
if (!this.videoController.isVideoLoaded())
|
|
15722
15722
|
return;
|
|
15723
15723
|
this.mouseWheelEnabled = !0;
|
|
@@ -15726,20 +15726,20 @@ class zm extends Je {
|
|
|
15726
15726
|
let s = this.thumbnailVttFile.findCue(i);
|
|
15727
15727
|
this.showThumbnailHover(s);
|
|
15728
15728
|
}
|
|
15729
|
-
}), this.scrubberLane.onMouseEnter$.pipe(
|
|
15729
|
+
}), this.scrubberLane.onMouseEnter$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15730
15730
|
this.mouseWheelEnabled = !0;
|
|
15731
|
-
}), this.scrubberLane.onMouseLeave$.pipe(
|
|
15731
|
+
}), this.scrubberLane.onMouseLeave$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15732
15732
|
this.hideThumbnailHover(), this.mouseWheelEnabled = !1;
|
|
15733
|
-
}), this.scrubberLane.onClick$.pipe(
|
|
15733
|
+
}), this.scrubberLane.onClick$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15734
15734
|
if (!this.videoController.isVideoLoaded())
|
|
15735
15735
|
return;
|
|
15736
15736
|
this.updateScrollWithPlayhead();
|
|
15737
15737
|
let t = this.timecodedGroup.getRelativePointerPosition().x;
|
|
15738
15738
|
this.playheadHoverMove(t), this.videoController.isVideoLoaded() && this.videoController.seekToTimestamp(this.timelinePositionToTime(t)).subscribe(() => {
|
|
15739
15739
|
});
|
|
15740
|
-
}), this.scrollbar.onScroll$.pipe(
|
|
15740
|
+
}), this.scrollbar.onScroll$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15741
15741
|
this.videoController.isVideoLoaded() && (this.setHorizontalScrollPercent(this.scrollbar.getScrollHandlePercent()), this.updateScrollWithPlayhead(), this.onScroll$.next(this.createScrollEvent()));
|
|
15742
|
-
}), this.scrollbar.onZoom$.pipe(
|
|
15742
|
+
}), this.scrollbar.onZoom$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
15743
15743
|
this.videoController.isVideoLoaded() && (this.zoomByPercent(e.zoomPercent, !1), this.updateScrollWithPlayhead());
|
|
15744
15744
|
}), this.thumbnailVttUrl && this.fetchThumbnailVttFile().subscribe();
|
|
15745
15745
|
}
|
|
@@ -16073,9 +16073,9 @@ class zm extends Je {
|
|
|
16073
16073
|
// endregion
|
|
16074
16074
|
// region video
|
|
16075
16075
|
onVideoLoadedEvent(e) {
|
|
16076
|
-
this.fireVideoEventBreaker(), this.clearContent(), this.syncVideoMetadata(), this.videoController.onVideoTimeChange$.pipe(
|
|
16076
|
+
this.fireVideoEventBreaker(), this.clearContent(), this.syncVideoMetadata(), this.videoController.onVideoTimeChange$.pipe(x(this.videoEventBreaker$)).subscribe((t) => {
|
|
16077
16077
|
this.syncVideoMetadata();
|
|
16078
|
-
}), this.videoController.onPlay$.pipe(
|
|
16078
|
+
}), this.videoController.onPlay$.pipe(x(this.videoEventBreaker$)).subscribe((t) => {
|
|
16079
16079
|
this.updateScrollWithPlayhead();
|
|
16080
16080
|
});
|
|
16081
16081
|
}
|
|
@@ -16471,9 +16471,9 @@ const We = {
|
|
|
16471
16471
|
};
|
|
16472
16472
|
class jm {
|
|
16473
16473
|
constructor(e, t) {
|
|
16474
|
-
if (this.browserProvider = ti.instance(), this.helpMenuGroups = [], this._isVideoLoaded = !1, this.frameDurationSpillOverCorrection = 1e-6, this.syncLoopMaxIterations = 20, this.seekInProgress = !1, this.videoStalledCheckIntervalMs = 700, this.videoFrameCallback$ = new Qt(null), this.videoEventBreaker$ = new V(), this.seekBreaker$ = new V(), this.onVideoLoaded$ = new Qt(void 0), this.onVideoLoading$ = new V(), this.onPlay$ = new V(), this.onPause$ = new V(), this.onVideoTimeChange$ = new V(), this.onSeeking$ = new V(), this.onSeeked$ = new V(), this.onBuffering$ = new V(), this.onEnded$ = new V(), this.onAudioSwitched$ = new V(), this.onPlaybackState$ = new V(), this.onHelpMenuChange$ = new Qt(void 0), this.onVideoError$ = new V(), this.domController = e, this.crossorigin = t, this.videoElement = this.domController.videoElement, this.videoElement.crossOrigin = this.crossorigin, !this.videoElement)
|
|
16474
|
+
if (this.browserProvider = ti.instance(), this.helpMenuGroups = [], this._isVideoLoaded = !1, this.frameDurationSpillOverCorrection = 1e-6, this.syncLoopMaxIterations = 20, this.seekInProgress = !1, this.videoStalledCheckIntervalMs = 700, this.videoFrameCallback$ = new Qt(null), this.videoEventBreaker$ = new V(), this.onDestroy$ = new V(), this.seekBreaker$ = new V(), this.onVideoLoaded$ = new Qt(void 0), this.onVideoLoading$ = new V(), this.onPlay$ = new V(), this.onPause$ = new V(), this.onVideoTimeChange$ = new V(), this.onSeeking$ = new V(), this.onSeeked$ = new V(), this.onBuffering$ = new V(), this.onEnded$ = new V(), this.onAudioSwitched$ = new V(), this.onPlaybackState$ = new V(), this.onHelpMenuChange$ = new Qt(void 0), this.onVideoError$ = new V(), this.domController = e, this.crossorigin = t, this.videoElement = this.domController.videoElement, this.videoElement.crossOrigin = this.crossorigin, !this.videoElement)
|
|
16475
16475
|
throw new Error("VideoController element not set");
|
|
16476
|
-
this.videoFrameCallback$.subscribe((i) => {
|
|
16476
|
+
this.videoFrameCallback$.pipe(x(this.onDestroy$)).subscribe((i) => {
|
|
16477
16477
|
i && (this.seekInProgress || (this.isPlaying() ? this.videoTimeChangeHandlerExecutor() : this.isPaused()));
|
|
16478
16478
|
});
|
|
16479
16479
|
}
|
|
@@ -16500,7 +16500,7 @@ class jm {
|
|
|
16500
16500
|
}
|
|
16501
16501
|
}
|
|
16502
16502
|
initEventHandlers() {
|
|
16503
|
-
be(this.videoElement, We.PAUSE).pipe(
|
|
16503
|
+
be(this.videoElement, We.PAUSE).pipe(x(this.videoEventBreaker$)).subscribe((e) => {
|
|
16504
16504
|
if (this.browserProvider.isSafari) {
|
|
16505
16505
|
let t = this.getCurrentTime() + this.video.frameDuration;
|
|
16506
16506
|
this._seekTimeAndSyncNoEmitEvents(t).subscribe((i) => {
|
|
@@ -16510,32 +16510,32 @@ class jm {
|
|
|
16510
16510
|
this.syncVideoFrames({}).subscribe((t) => {
|
|
16511
16511
|
this.videoTimeChangeHandlerExecutor(), this.onPause$.next({});
|
|
16512
16512
|
});
|
|
16513
|
-
}), be(this.videoElement, We.WAITING).pipe(
|
|
16513
|
+
}), be(this.videoElement, We.WAITING).pipe(x(this.videoEventBreaker$)).subscribe((e) => {
|
|
16514
16514
|
this.playbackStateMachine.waiting = !0;
|
|
16515
|
-
}), be(this.videoElement, We.PLAYING).pipe(
|
|
16515
|
+
}), be(this.videoElement, We.PLAYING).pipe(x(this.videoEventBreaker$)).subscribe((e) => {
|
|
16516
16516
|
this.playbackStateMachine.setPlaying(), this.videoStalledCheckLastCurrentTime = void 0;
|
|
16517
|
-
}), be(this.videoElement, We.PAUSE).pipe(
|
|
16517
|
+
}), be(this.videoElement, We.PAUSE).pipe(x(this.videoEventBreaker$)).subscribe((e) => {
|
|
16518
16518
|
this.playbackStateMachine.setPaused(), this.videoStalledCheckLastCurrentTime = void 0;
|
|
16519
|
-
}), be(this.videoElement, We.TIMEUPDATE).pipe(
|
|
16520
|
-
}), be(this.videoElement, We.PROGRESS).pipe(
|
|
16519
|
+
}), be(this.videoElement, We.TIMEUPDATE).pipe(x(this.videoEventBreaker$)).subscribe((e) => {
|
|
16520
|
+
}), be(this.videoElement, We.PROGRESS).pipe(x(this.videoEventBreaker$)).subscribe((e) => {
|
|
16521
16521
|
this.onBuffering$.next({
|
|
16522
16522
|
bufferedTimespans: this.getBufferedTimespans()
|
|
16523
16523
|
});
|
|
16524
|
-
}), be(this.videoElement, We.ENDED).pipe(
|
|
16524
|
+
}), be(this.videoElement, We.ENDED).pipe(x(this.videoEventBreaker$)).subscribe((e) => {
|
|
16525
16525
|
this.onEnded$.next({});
|
|
16526
|
-
}), this.playbackStateMachine.onChange$.pipe(
|
|
16526
|
+
}), this.playbackStateMachine.onChange$.pipe(x(this.videoEventBreaker$)).subscribe((e) => {
|
|
16527
16527
|
this.onPlaybackState$.next(e);
|
|
16528
|
-
}), this.onPlay$.pipe(
|
|
16528
|
+
}), this.onPlay$.pipe(x(this.videoEventBreaker$)).subscribe((e) => {
|
|
16529
16529
|
this.playbackStateMachine.setPlaying(), this.videoStalledCheckLastCurrentTime = void 0;
|
|
16530
|
-
}), this.onPause$.pipe(
|
|
16530
|
+
}), this.onPause$.pipe(x(this.videoEventBreaker$)).subscribe((e) => {
|
|
16531
16531
|
this.playbackStateMachine.setPaused(), this.videoStalledCheckLastCurrentTime = void 0;
|
|
16532
|
-
}), this.onSeeking$.pipe(
|
|
16532
|
+
}), this.onSeeking$.pipe(x(this.videoEventBreaker$)).subscribe((e) => {
|
|
16533
16533
|
this.playbackStateMachine.seeking = !0;
|
|
16534
|
-
}), this.onSeeked$.pipe(
|
|
16534
|
+
}), this.onSeeked$.pipe(x(this.videoEventBreaker$)).subscribe((e) => {
|
|
16535
16535
|
this.playbackStateMachine.seeking = !1;
|
|
16536
|
-
}), this.onEnded$.pipe(
|
|
16536
|
+
}), this.onEnded$.pipe(x(this.videoEventBreaker$)).subscribe((e) => {
|
|
16537
16537
|
this.playbackStateMachine.setEnded(), this.videoStalledCheckLastCurrentTime = void 0;
|
|
16538
|
-
}), Bu(this.videoStalledCheckIntervalMs).pipe(
|
|
16538
|
+
}), Bu(this.videoStalledCheckIntervalMs).pipe(x(this.videoEventBreaker$)).subscribe((e) => {
|
|
16539
16539
|
let t = this.getCurrentTime();
|
|
16540
16540
|
if (!this.videoStalledCheckLastCurrentTime) {
|
|
16541
16541
|
this.videoStalledCheckLastCurrentTime = t;
|
|
@@ -16577,7 +16577,7 @@ class jm {
|
|
|
16577
16577
|
syncVideoFrames(e) {
|
|
16578
16578
|
return console.debug("syncFrames - START", e), new se((t) => {
|
|
16579
16579
|
let i = new Qt(!1), s = new V(), n = this.syncLoopMaxIterations;
|
|
16580
|
-
this.seekBreaker$.pipe(
|
|
16580
|
+
this.seekBreaker$.pipe(x(s)).subscribe(() => {
|
|
16581
16581
|
console.debug("%csyncFrames - seek breaker triggered", "color: gray"), i.next(!0), a();
|
|
16582
16582
|
});
|
|
16583
16583
|
let a = () => {
|
|
@@ -16640,7 +16640,7 @@ class jm {
|
|
|
16640
16640
|
p === m || !m ? (console.debug(`%csyncFrames - OK: currentTimeFrame[${p}] === mediaTimeFrame[${m}]`, "color: green"), a()) : (console.debug(`%csyncFrames - CORRECTION; currentTimeFrame[${p}] ${p > m ? ">" : "<"} mediaTimeFrame[${m}]`, "color: red"), p > m ? o(Z.add(c, this.syncStepCurrentTimeMediaTime).toNumber()) : o(f + this.syncStepCurrentTimeMediaTime));
|
|
16641
16641
|
console.debug("syncFrames.syncLoop - END");
|
|
16642
16642
|
};
|
|
16643
|
-
this.videoFrameCallback$.pipe(Wu((e.seekToFrame, 0)),
|
|
16643
|
+
this.videoFrameCallback$.pipe(Wu((e.seekToFrame, 0)), x(s)).subscribe((u) => {
|
|
16644
16644
|
console.debug("syncFrames.syncLoop - videoFrameCallback$ trigger", u), d(u);
|
|
16645
16645
|
});
|
|
16646
16646
|
}
|
|
@@ -16648,12 +16648,12 @@ class jm {
|
|
|
16648
16648
|
}
|
|
16649
16649
|
seekTimeAndSync(e, t = {}) {
|
|
16650
16650
|
return new se((i) => {
|
|
16651
|
-
this.seekInProgress && (this.seekBreaker$.next(), this.seekBreaker$.complete(), this.seekBreaker$ = new V()), this.seekInProgress = !0, isNaN(e) || (e = e < 0 ? 0 : e > this.getDuration() ? this.getDuration() : e, be(this.videoElement, We.SEEKING).pipe(
|
|
16651
|
+
this.seekInProgress && (this.seekBreaker$.next(), this.seekBreaker$.complete(), this.seekBreaker$ = new V()), this.seekInProgress = !0, isNaN(e) || (e = e < 0 ? 0 : e > this.getDuration() ? this.getDuration() : e, be(this.videoElement, We.SEEKING).pipe(x(this.seekBreaker$), ct(1)).subscribe((s) => {
|
|
16652
16652
|
this.onSeeking$.next({
|
|
16653
16653
|
newTime: e,
|
|
16654
16654
|
currentTime: this.getCurrentTime()
|
|
16655
16655
|
});
|
|
16656
|
-
}), be(this.videoElement, We.SEEKED).pipe(
|
|
16656
|
+
}), be(this.videoElement, We.SEEKED).pipe(x(this.seekBreaker$), ct(1)).subscribe((s) => {
|
|
16657
16657
|
this.syncVideoFrames(t).subscribe((n) => {
|
|
16658
16658
|
this.onSeeked$.next({
|
|
16659
16659
|
currentTime: this.getCurrentTime()
|
|
@@ -16861,7 +16861,7 @@ class jm {
|
|
|
16861
16861
|
}
|
|
16862
16862
|
// endregion
|
|
16863
16863
|
destroy() {
|
|
16864
|
-
this.videoEventBreaker$ && (this.videoEventBreaker$.next(), this.videoEventBreaker$.complete()), this.videoElement = null, this.domController = null;
|
|
16864
|
+
this.videoEventBreaker$ && (this.videoEventBreaker$.next(), this.videoEventBreaker$.complete()), this.onDestroy$ && (this.onDestroy$.next(), this.onDestroy$.complete()), this.videoElement = null, this.domController = null, this._isVideoLoaded = !1;
|
|
16865
16865
|
}
|
|
16866
16866
|
}
|
|
16867
16867
|
class Xm {
|
|
@@ -17111,7 +17111,7 @@ var Xs = {}, Jm = {
|
|
|
17111
17111
|
w[b - 1] = arguments[b];
|
|
17112
17112
|
v.fn.apply(v.context, w);
|
|
17113
17113
|
} else {
|
|
17114
|
-
var T = v.length,
|
|
17114
|
+
var T = v.length, L;
|
|
17115
17115
|
for (b = 0; b < T; b++)
|
|
17116
17116
|
switch (v[b].once && this.removeListener(l, v[b].fn, void 0, !0), _) {
|
|
17117
17117
|
case 1:
|
|
@@ -17128,8 +17128,8 @@ var Xs = {}, Jm = {
|
|
|
17128
17128
|
break;
|
|
17129
17129
|
default:
|
|
17130
17130
|
if (!w)
|
|
17131
|
-
for (
|
|
17132
|
-
w[
|
|
17131
|
+
for (L = 1, w = new Array(_ - 1); L < _; L++)
|
|
17132
|
+
w[L - 1] = arguments[L];
|
|
17133
17133
|
v[b].fn.apply(v[b].context, w);
|
|
17134
17134
|
}
|
|
17135
17135
|
}
|
|
@@ -17311,30 +17311,30 @@ class tg {
|
|
|
17311
17311
|
let t = [this.divButtonPlay, this.divButtonPause, this.divButtonLoading, this.divButtonReplay, this.divButtonError], i = () => {
|
|
17312
17312
|
this.showTemporaryOnMouseMoveTimeoutId && clearTimeout(this.showTemporaryOnMouseMoveTimeoutId);
|
|
17313
17313
|
};
|
|
17314
|
-
be(this.divPlayerWrapper, "mousemove").pipe(
|
|
17314
|
+
be(this.divPlayerWrapper, "mousemove").pipe(x(this.videoEventBreaker$)).subscribe((s) => {
|
|
17315
17315
|
if (this._videoController.isVideoLoaded() && !(this._videoController.getPlaybackState().ended || this._videoController.getPlaybackState().waiting || this._videoController.getPlaybackState().seeking)) {
|
|
17316
17316
|
let n = this._videoController.isPlaying() ? this.divButtonPause : this.divButtonPlay;
|
|
17317
17317
|
i(), this.hideElements(this.divButtonPause, this.divButtonPlay).showElements(n, this.divButtonHelp), this.showTemporaryOnMouseMoveTimeoutId = setTimeout(() => {
|
|
17318
17318
|
this.hideElements(n), this.isShown(this.divHelpMenu) || this.hideElements(this.divButtonHelp, this.divHelpMenu);
|
|
17319
17319
|
}, 1e3);
|
|
17320
17320
|
}
|
|
17321
|
-
}), be(this.divPlayerWrapper, "mouseleave").pipe(
|
|
17321
|
+
}), be(this.divPlayerWrapper, "mouseleave").pipe(x(this.videoEventBreaker$)).subscribe((s) => {
|
|
17322
17322
|
this.hideElements(this.divButtonPlay, this.divButtonPause), this.hideElements(this.divButtonHelp, this.divHelpMenu);
|
|
17323
|
-
}), be(this.divPlayerWrapper, "click").pipe(
|
|
17323
|
+
}), be(this.divPlayerWrapper, "click").pipe(x(this.videoEventBreaker$)).subscribe((s) => {
|
|
17324
17324
|
(s.target === this._videoElement || s.target === this.divButtonPlay || s.target === this.divButtonPause || s.target === this.divButtonReplay || s.target === this.divButtonLoading) && this._videoController.togglePlayPause();
|
|
17325
|
-
}), be(this._videoElement, "contextmenu").pipe(
|
|
17325
|
+
}), be(this._videoElement, "contextmenu").pipe(x(this.videoEventBreaker$)).subscribe((s) => {
|
|
17326
17326
|
s.preventDefault();
|
|
17327
|
-
}), this._videoElement.controls = !1, this._videoController.onVideoLoading$.pipe(
|
|
17327
|
+
}), this._videoElement.controls = !1, this._videoController.onVideoLoading$.pipe(x(this.videoEventBreaker$)).subscribe((s) => {
|
|
17328
17328
|
this.hideElements(...t).hideElements(this.divErrorMessage).showElements(this.divButtonLoading);
|
|
17329
|
-
}), this._videoController.onVideoLoaded$.pipe(
|
|
17329
|
+
}), this._videoController.onVideoLoaded$.pipe(x(this.videoEventBreaker$)).subscribe((s) => {
|
|
17330
17330
|
this.hideElements(...t).hideElements(this.divErrorMessage), s || this.showElements(this.divButtonLoading);
|
|
17331
|
-
}), this._videoController.onPlaybackState$.pipe(
|
|
17331
|
+
}), this._videoController.onPlaybackState$.pipe(x(this.videoEventBreaker$)).subscribe((s) => {
|
|
17332
17332
|
i(), s.waiting && s.playing ? this.hideElements(...t).hideElements(this.divErrorMessage).showElements(this.divButtonLoading) : s.playing ? (this.hideElements(...t).hideElements(this.divErrorMessage), s.seeking && s.waiting && this.showElements(this.divButtonLoading)) : s.paused ? (this.hideElements(...t).hideElements(this.divErrorMessage), s.seeking && s.waiting ? this.showElements(this.divButtonLoading) : s.ended && this.showElements(this.divButtonReplay)) : s.seeking && s.waiting && this.hideElements(...t).hideElements(this.divErrorMessage).showElements(this.divButtonLoading);
|
|
17333
|
-
}), this._videoController.onVideoError$.pipe(
|
|
17333
|
+
}), this._videoController.onVideoError$.pipe(x(this.videoEventBreaker$)).subscribe((s) => {
|
|
17334
17334
|
this.hideElements(...t).showElements(this.divErrorMessage, this.divButtonError), this.divErrorMessage.innerHTML = s.message;
|
|
17335
|
-
}), be(this.divButtonHelp, "click").pipe(
|
|
17335
|
+
}), be(this.divButtonHelp, "click").pipe(x(this.videoEventBreaker$)).subscribe((s) => {
|
|
17336
17336
|
s.target === this.divButtonHelp && (this.isShown(this.divHelpMenu) ? this.hideElements(this.divHelpMenu) : this.showElements(this.divHelpMenu));
|
|
17337
|
-
}), this._videoController.onHelpMenuChange$.pipe(
|
|
17337
|
+
}), this._videoController.onHelpMenuChange$.pipe(x(this.videoEventBreaker$)).subscribe(() => {
|
|
17338
17338
|
this.helpChangeHandler();
|
|
17339
17339
|
});
|
|
17340
17340
|
}
|
|
@@ -17359,7 +17359,7 @@ const Ml = {
|
|
|
17359
17359
|
};
|
|
17360
17360
|
class rg {
|
|
17361
17361
|
constructor(e) {
|
|
17362
|
-
this.stylesProvider = lt.instance(), this.eventEmitter = new Xs(), this.config = {
|
|
17362
|
+
this.stylesProvider = lt.instance(), this.eventEmitter = new Xs(), this.onDestroy$ = new V(), this.config = {
|
|
17363
17363
|
...Pa,
|
|
17364
17364
|
...e,
|
|
17365
17365
|
style: {
|
|
@@ -17371,7 +17371,7 @@ class rg {
|
|
|
17371
17371
|
...this.config.style
|
|
17372
17372
|
}), this.stylesProvider.styles = {
|
|
17373
17373
|
omakasePlayerStyle: this.style
|
|
17374
|
-
}, this.styleAdapter.onChange$.subscribe((t) => {
|
|
17374
|
+
}, this.styleAdapter.onChange$.pipe(x(this.onDestroy$)).subscribe((t) => {
|
|
17375
17375
|
this.stylesProvider.styles = {
|
|
17376
17376
|
omakasePlayerStyle: this.style
|
|
17377
17377
|
};
|
|
@@ -17392,7 +17392,7 @@ class rg {
|
|
|
17392
17392
|
createTimeline(e) {
|
|
17393
17393
|
return new se((t) => {
|
|
17394
17394
|
let i = () => {
|
|
17395
|
-
console.debug("Creating timeline"), this._timeline = new zm(e, this.videoController), this.domController.timeline = this.timeline, this._timeline.initCanvasNode(), this._timeline.onScroll$.subscribe((s) => {
|
|
17395
|
+
console.debug("Creating timeline"), this._timeline = new zm(e, this.videoController), this.domController.timeline = this.timeline, this._timeline.initCanvasNode(), this._timeline.onScroll$.pipe(x(this.onDestroy$)).subscribe((s) => {
|
|
17396
17396
|
this.emit("omakaseTimelineScroll", s);
|
|
17397
17397
|
}), this._timeline.onZoom$.subscribe((s) => {
|
|
17398
17398
|
this.emit("omakaseTimelineZoom", s);
|
|
@@ -17404,33 +17404,33 @@ class rg {
|
|
|
17404
17404
|
});
|
|
17405
17405
|
}
|
|
17406
17406
|
bindEventHandlers() {
|
|
17407
|
-
this.videoController.onPlay$.subscribe((e) => {
|
|
17407
|
+
this.videoController.onPlay$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
17408
17408
|
this.emit("omakaseVideoPlay", e);
|
|
17409
|
-
}), this.videoController.onPause$.subscribe((e) => {
|
|
17409
|
+
}), this.videoController.onPause$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
17410
17410
|
this.emit("omakaseVideoPause", e);
|
|
17411
|
-
}), this.videoController.onVideoLoaded$.pipe($e((e) => !!e)).subscribe((e) => {
|
|
17411
|
+
}), this.videoController.onVideoLoaded$.pipe(x(this.onDestroy$), $e((e) => !!e)).subscribe((e) => {
|
|
17412
17412
|
this.emit("omakaseVideoLoaded", e);
|
|
17413
|
-
}), this.videoController.onVideoTimeChange$.subscribe((e) => {
|
|
17413
|
+
}), this.videoController.onVideoTimeChange$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
17414
17414
|
this.emit("omakaseVideoTimeChange", e);
|
|
17415
|
-
}), this.videoController.onSeeking$.subscribe((e) => {
|
|
17415
|
+
}), this.videoController.onSeeking$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
17416
17416
|
this.emit("omakaseVideoSeeking", e);
|
|
17417
|
-
}), this.videoController.onSeeked$.subscribe((e) => {
|
|
17417
|
+
}), this.videoController.onSeeked$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
17418
17418
|
this.emit("omakaseVideoSeeked", e);
|
|
17419
|
-
}), this.videoController.onBuffering$.subscribe((e) => {
|
|
17419
|
+
}), this.videoController.onBuffering$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
17420
17420
|
this.emit("omakaseVideoBuffering", e);
|
|
17421
|
-
}), this.videoController.onEnded$.subscribe((e) => {
|
|
17421
|
+
}), this.videoController.onEnded$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
17422
17422
|
this.emit("omakaseVideoEnded", e);
|
|
17423
|
-
}), this.videoController.onAudioSwitched$.subscribe((e) => {
|
|
17423
|
+
}), this.videoController.onAudioSwitched$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
17424
17424
|
this.emit("omakaseVideoAudioSwitched", e);
|
|
17425
|
-
}), this.audioController.onAudioSwitched$.subscribe((e) => {
|
|
17425
|
+
}), this.audioController.onAudioSwitched$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
17426
17426
|
this.emit("omakaseAudioSwitched", e);
|
|
17427
|
-
}), this.subtitlesController.onCreate$.subscribe((e) => {
|
|
17427
|
+
}), this.subtitlesController.onCreate$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
17428
17428
|
this.emit("omakaseSubtitlesCreate", e);
|
|
17429
|
-
}), this.subtitlesController.onRemove$.subscribe((e) => {
|
|
17429
|
+
}), this.subtitlesController.onRemove$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
17430
17430
|
this.emit("omakaseSubtitlesRemove", e);
|
|
17431
|
-
}), this.subtitlesController.onShow$.subscribe((e) => {
|
|
17431
|
+
}), this.subtitlesController.onShow$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
17432
17432
|
this.emit("omakaseSubtitlesShow", e);
|
|
17433
|
-
}), this.subtitlesController.onHide$.subscribe((e) => {
|
|
17433
|
+
}), this.subtitlesController.onHide$.pipe(x(this.onDestroy$)).subscribe((e) => {
|
|
17434
17434
|
this.emit("omakaseSubtitlesHide", e);
|
|
17435
17435
|
});
|
|
17436
17436
|
}
|
|
@@ -17479,8 +17479,8 @@ class rg {
|
|
|
17479
17479
|
return Qm;
|
|
17480
17480
|
}
|
|
17481
17481
|
destroy() {
|
|
17482
|
-
this.timeline.getLanes().forEach((e) => {
|
|
17483
|
-
e.clearContent(), e.destroy();
|
|
17482
|
+
this.onDestroy$ && (console.log("destroying omakase player"), this.onDestroy$.next(), this.onDestroy$.complete()), this.timeline.getLanes().forEach((e) => {
|
|
17483
|
+
e != null && (e.clearContent(), e.destroy());
|
|
17484
17484
|
}), this.timeline.destroy(), this.video.getHls().off(ze.Events.ERROR), this.video.getHls().destroy(), this.subtitlesController.destroy(), this.domController.destroy(), this.videoController.destroy();
|
|
17485
17485
|
}
|
|
17486
17486
|
}
|