@kteneyck/cesium-timeline-react 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cesium-timeline-react.js +714 -706
- package/dist/cesium-timeline-react.umd.cjs +4 -4
- package/dist/index.d.ts +4 -0
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import Be, { useRef as
|
|
1
|
+
import Be, { useRef as v, useState as xe, useEffect as Y, forwardRef as He, useCallback as ne, useImperativeHandle as Ue, useLayoutEffect as qe, useMemo as Se } from "react";
|
|
2
2
|
import * as C from "cesium";
|
|
3
|
-
import { splitForDisplay as Ge, formatDateTime as ke, drawTimeline as Ve, hitTestSwimLane as Ke, hitTestLaneLabel as Ze, isInSwimLaneRegion as Qe, zoomRange as et, TICK_AREA_HEIGHT as ze, DEFAULT_LANE_HEIGHT as Le, LANE_GAP as Ie, SWIM_LANE_SCROLL_SPEED as tt, MIN_SPAN_MS as nt, MAX_SPAN_MS as rt, toJulianDate as
|
|
3
|
+
import { splitForDisplay as Ge, formatDateTime as ke, drawTimeline as Ve, hitTestSwimLane as Ke, hitTestLaneLabel as Ze, isInSwimLaneRegion as Qe, zoomRange as et, TICK_AREA_HEIGHT as ze, DEFAULT_LANE_HEIGHT as Le, LANE_GAP as Ie, SWIM_LANE_SCROLL_SPEED as tt, MIN_SPAN_MS as nt, MAX_SPAN_MS as rt, toJulianDate as he, defaultTheme as ot, generateTicks as st, timeToPosition as ct, snapToTick as it } from "@kteneyck/cesium-timeline-core";
|
|
4
4
|
export * from "@kteneyck/cesium-timeline-core";
|
|
5
|
-
import { TICK_AREA_HEIGHT as
|
|
6
|
-
var
|
|
5
|
+
import { TICK_AREA_HEIGHT as Et } from "@kteneyck/cesium-timeline-core";
|
|
6
|
+
var Te = { exports: {} }, ve = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
9
9
|
* react-jsx-runtime.production.js
|
|
@@ -14,28 +14,28 @@ var Me = { exports: {} }, we = {};
|
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
16
|
var Fe;
|
|
17
|
-
function
|
|
18
|
-
if (Fe) return
|
|
17
|
+
function ut() {
|
|
18
|
+
if (Fe) return ve;
|
|
19
19
|
Fe = 1;
|
|
20
|
-
var D = Symbol.for("react.transitional.element"),
|
|
21
|
-
function
|
|
22
|
-
var
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
for (var
|
|
26
|
-
|
|
27
|
-
} else
|
|
28
|
-
return
|
|
20
|
+
var D = Symbol.for("react.transitional.element"), A = Symbol.for("react.fragment");
|
|
21
|
+
function J(l, g, y) {
|
|
22
|
+
var I = null;
|
|
23
|
+
if (y !== void 0 && (I = "" + y), g.key !== void 0 && (I = "" + g.key), "key" in g) {
|
|
24
|
+
y = {};
|
|
25
|
+
for (var O in g)
|
|
26
|
+
O !== "key" && (y[O] = g[O]);
|
|
27
|
+
} else y = g;
|
|
28
|
+
return g = y.ref, {
|
|
29
29
|
$$typeof: D,
|
|
30
|
-
type:
|
|
31
|
-
key:
|
|
32
|
-
ref:
|
|
33
|
-
props:
|
|
30
|
+
type: l,
|
|
31
|
+
key: I,
|
|
32
|
+
ref: g !== void 0 ? g : null,
|
|
33
|
+
props: y
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
return
|
|
36
|
+
return ve.Fragment = A, ve.jsx = J, ve.jsxs = J, ve;
|
|
37
37
|
}
|
|
38
|
-
var
|
|
38
|
+
var be = {};
|
|
39
39
|
/**
|
|
40
40
|
* @license React
|
|
41
41
|
* react-jsx-runtime.development.js
|
|
@@ -46,125 +46,125 @@ var Te = {};
|
|
|
46
46
|
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*/
|
|
48
48
|
var Oe;
|
|
49
|
-
function
|
|
49
|
+
function at() {
|
|
50
50
|
return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
51
51
|
function D(t) {
|
|
52
52
|
if (t == null) return null;
|
|
53
53
|
if (typeof t == "function")
|
|
54
|
-
return t.$$typeof ===
|
|
54
|
+
return t.$$typeof === H ? null : t.displayName || t.name || null;
|
|
55
55
|
if (typeof t == "string") return t;
|
|
56
56
|
switch (t) {
|
|
57
|
-
case
|
|
57
|
+
case P:
|
|
58
58
|
return "Fragment";
|
|
59
|
-
case
|
|
59
|
+
case B:
|
|
60
60
|
return "Profiler";
|
|
61
|
-
case
|
|
61
|
+
case m:
|
|
62
62
|
return "StrictMode";
|
|
63
|
-
case
|
|
63
|
+
case M:
|
|
64
64
|
return "Suspense";
|
|
65
|
-
case
|
|
65
|
+
case T:
|
|
66
66
|
return "SuspenseList";
|
|
67
|
-
case
|
|
67
|
+
case Q:
|
|
68
68
|
return "Activity";
|
|
69
69
|
}
|
|
70
70
|
if (typeof t == "object")
|
|
71
71
|
switch (typeof t.tag == "number" && console.error(
|
|
72
72
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
73
73
|
), t.$$typeof) {
|
|
74
|
-
case
|
|
74
|
+
case Z:
|
|
75
75
|
return "Portal";
|
|
76
|
-
case
|
|
76
|
+
case d:
|
|
77
77
|
return t.displayName || "Context";
|
|
78
|
-
case
|
|
78
|
+
case b:
|
|
79
79
|
return (t._context.displayName || "Context") + ".Consumer";
|
|
80
|
-
case
|
|
81
|
-
var
|
|
82
|
-
return t = t.displayName, t || (t =
|
|
83
|
-
case
|
|
84
|
-
return
|
|
85
|
-
case
|
|
86
|
-
|
|
80
|
+
case x:
|
|
81
|
+
var a = t.render;
|
|
82
|
+
return t = t.displayName, t || (t = a.displayName || a.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
|
|
83
|
+
case ce:
|
|
84
|
+
return a = t.displayName || null, a !== null ? a : D(t.type) || "Memo";
|
|
85
|
+
case X:
|
|
86
|
+
a = t._payload, t = t._init;
|
|
87
87
|
try {
|
|
88
|
-
return D(t(
|
|
88
|
+
return D(t(a));
|
|
89
89
|
} catch {
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
return null;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function A(t) {
|
|
95
95
|
return "" + t;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function J(t) {
|
|
98
98
|
try {
|
|
99
|
-
|
|
100
|
-
var
|
|
99
|
+
A(t);
|
|
100
|
+
var a = !1;
|
|
101
101
|
} catch {
|
|
102
|
-
|
|
102
|
+
a = !0;
|
|
103
103
|
}
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
var
|
|
107
|
-
return
|
|
108
|
-
|
|
104
|
+
if (a) {
|
|
105
|
+
a = console;
|
|
106
|
+
var E = a.error, L = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
|
107
|
+
return E.call(
|
|
108
|
+
a,
|
|
109
109
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
110
|
-
|
|
111
|
-
),
|
|
110
|
+
L
|
|
111
|
+
), A(t);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
if (t ===
|
|
116
|
-
if (typeof t == "object" && t !== null && t.$$typeof ===
|
|
114
|
+
function l(t) {
|
|
115
|
+
if (t === P) return "<>";
|
|
116
|
+
if (typeof t == "object" && t !== null && t.$$typeof === X)
|
|
117
117
|
return "<...>";
|
|
118
118
|
try {
|
|
119
|
-
var
|
|
120
|
-
return
|
|
119
|
+
var a = D(t);
|
|
120
|
+
return a ? "<" + a + ">" : "<...>";
|
|
121
121
|
} catch {
|
|
122
122
|
return "<...>";
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
var t =
|
|
125
|
+
function g() {
|
|
126
|
+
var t = U.A;
|
|
127
127
|
return t === null ? null : t.getOwner();
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function y() {
|
|
130
130
|
return Error("react-stack-top-frame");
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
if (
|
|
134
|
-
var
|
|
135
|
-
if (
|
|
132
|
+
function I(t) {
|
|
133
|
+
if (w.call(t, "key")) {
|
|
134
|
+
var a = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
135
|
+
if (a && a.isReactWarning) return !1;
|
|
136
136
|
}
|
|
137
137
|
return t.key !== void 0;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
function
|
|
141
|
-
|
|
139
|
+
function O(t, a) {
|
|
140
|
+
function E() {
|
|
141
|
+
k || (k = !0, console.error(
|
|
142
142
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
143
|
-
|
|
143
|
+
a
|
|
144
144
|
));
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
get:
|
|
146
|
+
E.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
147
|
+
get: E,
|
|
148
148
|
configurable: !0
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function z() {
|
|
152
152
|
var t = D(this.type);
|
|
153
|
-
return
|
|
153
|
+
return j[t] || (j[t] = !0, console.error(
|
|
154
154
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
155
155
|
)), t = this.props.ref, t !== void 0 ? t : null;
|
|
156
156
|
}
|
|
157
|
-
function R(t,
|
|
158
|
-
var
|
|
157
|
+
function R(t, a, E, L, q, ue) {
|
|
158
|
+
var _ = E.ref;
|
|
159
159
|
return t = {
|
|
160
|
-
$$typeof:
|
|
160
|
+
$$typeof: K,
|
|
161
161
|
type: t,
|
|
162
|
-
key:
|
|
163
|
-
props:
|
|
164
|
-
_owner:
|
|
165
|
-
}, (
|
|
162
|
+
key: a,
|
|
163
|
+
props: E,
|
|
164
|
+
_owner: L
|
|
165
|
+
}, (_ !== void 0 ? _ : null) !== null ? Object.defineProperty(t, "ref", {
|
|
166
166
|
enumerable: !1,
|
|
167
|
-
get:
|
|
167
|
+
get: z
|
|
168
168
|
}) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
|
|
169
169
|
configurable: !1,
|
|
170
170
|
enumerable: !1,
|
|
@@ -179,141 +179,143 @@ function ut() {
|
|
|
179
179
|
configurable: !1,
|
|
180
180
|
enumerable: !1,
|
|
181
181
|
writable: !0,
|
|
182
|
-
value:
|
|
182
|
+
value: q
|
|
183
183
|
}), Object.defineProperty(t, "_debugTask", {
|
|
184
184
|
configurable: !1,
|
|
185
185
|
enumerable: !1,
|
|
186
186
|
writable: !0,
|
|
187
|
-
value:
|
|
187
|
+
value: ue
|
|
188
188
|
}), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
var
|
|
192
|
-
if (
|
|
193
|
-
if (
|
|
194
|
-
if (
|
|
195
|
-
for (
|
|
196
|
-
|
|
197
|
-
Object.freeze && Object.freeze(
|
|
190
|
+
function W(t, a, E, L, q, ue) {
|
|
191
|
+
var _ = a.children;
|
|
192
|
+
if (_ !== void 0)
|
|
193
|
+
if (L)
|
|
194
|
+
if (S(_)) {
|
|
195
|
+
for (L = 0; L < _.length; L++)
|
|
196
|
+
ee(_[L]);
|
|
197
|
+
Object.freeze && Object.freeze(_);
|
|
198
198
|
} else
|
|
199
199
|
console.error(
|
|
200
200
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
201
201
|
);
|
|
202
|
-
else
|
|
203
|
-
if (
|
|
204
|
-
|
|
205
|
-
var
|
|
206
|
-
return
|
|
202
|
+
else ee(_);
|
|
203
|
+
if (w.call(a, "key")) {
|
|
204
|
+
_ = D(t);
|
|
205
|
+
var ae = Object.keys(a).filter(function(h) {
|
|
206
|
+
return h !== "key";
|
|
207
207
|
});
|
|
208
|
-
|
|
208
|
+
L = 0 < ae.length ? "{key: someKey, " + ae.join(": ..., ") + ": ...}" : "{key: someKey}", ie[_ + L] || (ae = 0 < ae.length ? "{" + ae.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
209
209
|
`A props object containing a "key" prop is being spread into JSX:
|
|
210
210
|
let props = %s;
|
|
211
211
|
<%s {...props} />
|
|
212
212
|
React keys must be passed directly to JSX without using spread:
|
|
213
213
|
let props = %s;
|
|
214
214
|
<%s key={someKey} {...props} />`,
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
),
|
|
215
|
+
L,
|
|
216
|
+
_,
|
|
217
|
+
ae,
|
|
218
|
+
_
|
|
219
|
+
), ie[_ + L] = !0);
|
|
220
220
|
}
|
|
221
|
-
if (
|
|
222
|
-
|
|
223
|
-
for (var
|
|
224
|
-
|
|
225
|
-
} else
|
|
226
|
-
return
|
|
227
|
-
|
|
221
|
+
if (_ = null, E !== void 0 && (J(E), _ = "" + E), I(a) && (J(a.key), _ = "" + a.key), "key" in a) {
|
|
222
|
+
E = {};
|
|
223
|
+
for (var oe in a)
|
|
224
|
+
oe !== "key" && (E[oe] = a[oe]);
|
|
225
|
+
} else E = a;
|
|
226
|
+
return _ && O(
|
|
227
|
+
E,
|
|
228
228
|
typeof t == "function" ? t.displayName || t.name || "Unknown" : t
|
|
229
229
|
), R(
|
|
230
230
|
t,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
231
|
+
_,
|
|
232
|
+
E,
|
|
233
|
+
g(),
|
|
234
|
+
q,
|
|
235
|
+
ue
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
|
-
function
|
|
239
|
-
|
|
238
|
+
function ee(t) {
|
|
239
|
+
te(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === X && (t._payload.status === "fulfilled" ? te(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
return typeof t == "object" && t !== null && t.$$typeof ===
|
|
241
|
+
function te(t) {
|
|
242
|
+
return typeof t == "object" && t !== null && t.$$typeof === K;
|
|
243
243
|
}
|
|
244
|
-
var
|
|
244
|
+
var V = Be, K = Symbol.for("react.transitional.element"), Z = Symbol.for("react.portal"), P = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), d = Symbol.for("react.context"), x = Symbol.for("react.forward_ref"), M = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), ce = Symbol.for("react.memo"), X = Symbol.for("react.lazy"), Q = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), U = V.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, w = Object.prototype.hasOwnProperty, S = Array.isArray, i = console.createTask ? console.createTask : function() {
|
|
245
245
|
return null;
|
|
246
246
|
};
|
|
247
|
-
|
|
247
|
+
V = {
|
|
248
248
|
react_stack_bottom_frame: function(t) {
|
|
249
249
|
return t();
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
var
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
)(),
|
|
256
|
-
|
|
257
|
-
var
|
|
258
|
-
return
|
|
252
|
+
var k, j = {}, $ = V.react_stack_bottom_frame.bind(
|
|
253
|
+
V,
|
|
254
|
+
y
|
|
255
|
+
)(), re = i(l(y)), ie = {};
|
|
256
|
+
be.Fragment = P, be.jsx = function(t, a, E) {
|
|
257
|
+
var L = 1e4 > U.recentlyCreatedOwnerStacks++;
|
|
258
|
+
return W(
|
|
259
259
|
t,
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
a,
|
|
261
|
+
E,
|
|
262
262
|
!1,
|
|
263
|
-
|
|
264
|
-
|
|
263
|
+
L ? Error("react-stack-top-frame") : $,
|
|
264
|
+
L ? i(l(t)) : re
|
|
265
265
|
);
|
|
266
|
-
},
|
|
267
|
-
var
|
|
268
|
-
return
|
|
266
|
+
}, be.jsxs = function(t, a, E) {
|
|
267
|
+
var L = 1e4 > U.recentlyCreatedOwnerStacks++;
|
|
268
|
+
return W(
|
|
269
269
|
t,
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
a,
|
|
271
|
+
E,
|
|
272
272
|
!0,
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
L ? Error("react-stack-top-frame") : $,
|
|
274
|
+
L ? i(l(t)) : re
|
|
275
275
|
);
|
|
276
276
|
};
|
|
277
|
-
})()),
|
|
277
|
+
})()), be;
|
|
278
278
|
}
|
|
279
279
|
var Pe;
|
|
280
280
|
function lt() {
|
|
281
|
-
return Pe || (Pe = 1, process.env.NODE_ENV === "production" ?
|
|
281
|
+
return Pe || (Pe = 1, process.env.NODE_ENV === "production" ? Te.exports = ut() : Te.exports = at()), Te.exports;
|
|
282
282
|
}
|
|
283
|
-
var
|
|
284
|
-
const dt = 520, ft = () => /* @__PURE__ */
|
|
285
|
-
/* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
] }),
|
|
283
|
+
var u = lt();
|
|
284
|
+
const dt = 520, ft = () => /* @__PURE__ */ u.jsxs("svg", { width: "14", height: "16", viewBox: "0 0 14 16", fill: "currentColor", "aria-hidden": "true", children: [
|
|
285
|
+
/* @__PURE__ */ u.jsx("rect", { x: "1", y: "0", width: "4", height: "16", rx: "1" }),
|
|
286
|
+
/* @__PURE__ */ u.jsx("rect", { x: "9", y: "0", width: "4", height: "16", rx: "1" })
|
|
287
|
+
] }), Ne = () => /* @__PURE__ */ u.jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ u.jsx("polyline", { points: "3,5 7,9 11,5" }) }), Je = () => /* @__PURE__ */ u.jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ u.jsx("polyline", { points: "3,9 7,5 11,9" }) }), mt = ({
|
|
288
288
|
currentTime: D,
|
|
289
|
-
isPlaying:
|
|
290
|
-
multiplier:
|
|
291
|
-
dateTimeFormat:
|
|
292
|
-
isLive:
|
|
293
|
-
hasStartTime:
|
|
294
|
-
hasEndTime:
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
289
|
+
isPlaying: A,
|
|
290
|
+
multiplier: J,
|
|
291
|
+
dateTimeFormat: l,
|
|
292
|
+
isLive: g,
|
|
293
|
+
hasStartTime: y,
|
|
294
|
+
hasEndTime: I,
|
|
295
|
+
showJumpToStart: O = !0,
|
|
296
|
+
showJumpToEnd: z = !0,
|
|
297
|
+
onPlayPause: R,
|
|
298
|
+
onJumpToStart: W,
|
|
299
|
+
onRewind: ee,
|
|
300
|
+
onFastForward: te,
|
|
301
|
+
onJumpToEnd: V,
|
|
302
|
+
onJumpToLive: K,
|
|
303
|
+
onResetSpeed: Z,
|
|
304
|
+
onDateTimeClick: P,
|
|
305
|
+
theme: m,
|
|
306
|
+
swimLanesVisible: B,
|
|
307
|
+
onToggleSwimLanes: b
|
|
306
308
|
}) => {
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
const
|
|
310
|
-
if (!
|
|
311
|
-
const
|
|
312
|
-
|
|
309
|
+
const d = J < 0, x = J > 1, M = J === 1, T = Math.abs(J), ce = v(null), [X, Q] = xe(!1);
|
|
310
|
+
Y(() => {
|
|
311
|
+
const i = ce.current;
|
|
312
|
+
if (!i) return;
|
|
313
|
+
const k = new ResizeObserver(([j]) => {
|
|
314
|
+
Q(j.contentRect.width < dt);
|
|
313
315
|
});
|
|
314
|
-
return
|
|
316
|
+
return k.observe(i), () => k.disconnect();
|
|
315
317
|
}, []);
|
|
316
|
-
const
|
|
318
|
+
const H = {
|
|
317
319
|
background: "none",
|
|
318
320
|
border: "1px solid transparent",
|
|
319
321
|
cursor: "pointer",
|
|
@@ -330,64 +332,64 @@ const dt = 520, ft = () => /* @__PURE__ */ a.jsxs("svg", { width: "14", height:
|
|
|
330
332
|
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
331
333
|
flexShrink: 0,
|
|
332
334
|
lineHeight: 1
|
|
333
|
-
}, U = (
|
|
334
|
-
...
|
|
335
|
-
color:
|
|
336
|
-
borderColor:
|
|
337
|
-
}),
|
|
338
|
-
|
|
339
|
-
},
|
|
340
|
-
|
|
335
|
+
}, U = (i) => ({
|
|
336
|
+
...H,
|
|
337
|
+
color: i ? m.buttonActiveColor : m.buttonColor,
|
|
338
|
+
borderColor: i ? `${m.buttonActiveColor}33` : "transparent"
|
|
339
|
+
}), w = (i, k) => {
|
|
340
|
+
i.currentTarget.style.backgroundColor = k ? `${m.buttonActiveColor}22` : m.buttonHoverColor + "44";
|
|
341
|
+
}, S = (i) => {
|
|
342
|
+
i.currentTarget.style.backgroundColor = "transparent";
|
|
341
343
|
};
|
|
342
|
-
return /* @__PURE__ */
|
|
344
|
+
return /* @__PURE__ */ u.jsxs(
|
|
343
345
|
"div",
|
|
344
346
|
{
|
|
345
|
-
ref:
|
|
347
|
+
ref: ce,
|
|
346
348
|
style: {
|
|
347
|
-
display:
|
|
348
|
-
gridTemplateColumns:
|
|
349
|
+
display: X ? "flex" : "grid",
|
|
350
|
+
gridTemplateColumns: X ? void 0 : "1fr auto 1fr",
|
|
349
351
|
alignItems: "center",
|
|
350
352
|
padding: "6px 16px",
|
|
351
|
-
backgroundColor:
|
|
352
|
-
borderBottom: `1px solid ${
|
|
353
|
+
backgroundColor: m.controlBarBackground,
|
|
354
|
+
borderBottom: `1px solid ${m.controlBarBorder}`,
|
|
353
355
|
fontFamily: "system-ui, -apple-system, sans-serif"
|
|
354
356
|
},
|
|
355
357
|
children: [
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ u.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 }, children: [
|
|
359
|
+
/* @__PURE__ */ u.jsx(
|
|
358
360
|
"div",
|
|
359
361
|
{
|
|
360
|
-
onClick:
|
|
361
|
-
title:
|
|
362
|
+
onClick: P,
|
|
363
|
+
title: P ? "Click to jump to a date/time" : void 0,
|
|
362
364
|
style: {
|
|
363
|
-
color:
|
|
365
|
+
color: m.labelColor,
|
|
364
366
|
fontFamily: "monospace",
|
|
365
367
|
lineHeight: 1.15,
|
|
366
|
-
cursor:
|
|
368
|
+
cursor: P ? "pointer" : "default",
|
|
367
369
|
borderRadius: "4px",
|
|
368
370
|
padding: "2px 4px",
|
|
369
371
|
transition: "background 0.15s"
|
|
370
372
|
},
|
|
371
|
-
onMouseEnter: (
|
|
372
|
-
|
|
373
|
+
onMouseEnter: (i) => {
|
|
374
|
+
P && (i.currentTarget.style.background = m.buttonHoverColor + "44");
|
|
373
375
|
},
|
|
374
|
-
onMouseLeave: (
|
|
376
|
+
onMouseLeave: (i) => i.currentTarget.style.background = "transparent",
|
|
375
377
|
children: (() => {
|
|
376
|
-
const { timeFormat:
|
|
377
|
-
return /* @__PURE__ */
|
|
378
|
-
|
|
379
|
-
|
|
378
|
+
const { timeFormat: i, dateFormat: k } = Ge(l);
|
|
379
|
+
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
380
|
+
i && /* @__PURE__ */ u.jsx("div", { style: { fontSize: "2em", fontWeight: "bold", letterSpacing: "0.02em" }, children: ke(D, i) }),
|
|
381
|
+
k && /* @__PURE__ */ u.jsx("div", { style: { fontSize: "1.15em", letterSpacing: "0.03em", color: m.buttonActiveColor }, children: ke(D, k) })
|
|
380
382
|
] });
|
|
381
383
|
})()
|
|
382
384
|
}
|
|
383
385
|
),
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ u.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "2px", justifyContent: "center" }, children: [
|
|
387
|
+
/* @__PURE__ */ u.jsx(
|
|
386
388
|
"button",
|
|
387
389
|
{
|
|
388
|
-
onClick:
|
|
390
|
+
onClick: K,
|
|
389
391
|
style: {
|
|
390
|
-
...
|
|
392
|
+
...H,
|
|
391
393
|
fontSize: "11px",
|
|
392
394
|
fontWeight: "bold",
|
|
393
395
|
letterSpacing: "0.05em",
|
|
@@ -395,500 +397,502 @@ const dt = 520, ft = () => /* @__PURE__ */ a.jsxs("svg", { width: "14", height:
|
|
|
395
397
|
minWidth: "52px",
|
|
396
398
|
height: "20px",
|
|
397
399
|
borderRadius: "3px",
|
|
398
|
-
color:
|
|
399
|
-
backgroundColor:
|
|
400
|
-
borderColor:
|
|
401
|
-
opacity:
|
|
400
|
+
color: g ? m.controlBarBackground : m.buttonActiveColor,
|
|
401
|
+
backgroundColor: g ? m.buttonActiveColor : "transparent",
|
|
402
|
+
borderColor: m.buttonActiveColor,
|
|
403
|
+
opacity: g ? 1 : 0.55
|
|
402
404
|
},
|
|
403
|
-
onMouseEnter: (
|
|
404
|
-
|
|
405
|
+
onMouseEnter: (i) => {
|
|
406
|
+
i.currentTarget.style.opacity = "1";
|
|
405
407
|
},
|
|
406
|
-
onMouseLeave: (
|
|
407
|
-
|
|
408
|
+
onMouseLeave: (i) => {
|
|
409
|
+
i.currentTarget.style.opacity = g ? "1" : "0.55";
|
|
408
410
|
},
|
|
409
|
-
title:
|
|
410
|
-
children:
|
|
411
|
+
title: g ? "Currently live" : "Jump to live (now)",
|
|
412
|
+
children: g ? "● LIVE" : "LIVE"
|
|
411
413
|
}
|
|
412
414
|
),
|
|
413
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ u.jsx("div", { style: { height: "20px", display: "flex", alignItems: "center" }, children: !M && /* @__PURE__ */ u.jsx(
|
|
414
416
|
"button",
|
|
415
417
|
{
|
|
416
|
-
onClick: () =>
|
|
418
|
+
onClick: () => Z(),
|
|
417
419
|
style: {
|
|
418
|
-
...
|
|
420
|
+
...H,
|
|
419
421
|
fontSize: "11px",
|
|
420
|
-
color:
|
|
421
|
-
borderColor: `${
|
|
422
|
+
color: m.buttonActiveColor,
|
|
423
|
+
borderColor: `${m.buttonActiveColor}44`,
|
|
422
424
|
width: "52px",
|
|
423
425
|
minWidth: "52px",
|
|
424
426
|
height: "20px"
|
|
425
427
|
},
|
|
426
|
-
onMouseEnter: (
|
|
427
|
-
onMouseLeave:
|
|
428
|
+
onMouseEnter: (i) => w(i, !0),
|
|
429
|
+
onMouseLeave: S,
|
|
428
430
|
title: "Reset to 1× speed",
|
|
429
|
-
children:
|
|
431
|
+
children: d ? `◀ ${T}×` : `${T}× ▶`
|
|
430
432
|
}
|
|
431
433
|
) })
|
|
432
434
|
] })
|
|
433
435
|
] }),
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
-
|
|
436
|
+
/* @__PURE__ */ u.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "2px", ...X ? { flex: 1, justifyContent: "center" } : {} }, children: [
|
|
437
|
+
O && /* @__PURE__ */ u.jsx(
|
|
436
438
|
"button",
|
|
437
439
|
{
|
|
438
|
-
onClick:
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
440
|
+
onClick: y ? W : void 0,
|
|
441
|
+
disabled: !y,
|
|
442
|
+
style: { ...U(!1), opacity: y ? 1 : 0.3, cursor: y ? "pointer" : "default" },
|
|
443
|
+
onMouseEnter: y ? (i) => w(i, !1) : void 0,
|
|
444
|
+
onMouseLeave: y ? S : void 0,
|
|
445
|
+
title: y ? "Jump to start" : "No start time set",
|
|
443
446
|
children: "⏮"
|
|
444
447
|
}
|
|
445
448
|
),
|
|
446
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ u.jsx(
|
|
447
450
|
"button",
|
|
448
451
|
{
|
|
449
|
-
onClick:
|
|
450
|
-
style: { ...U(
|
|
451
|
-
onMouseEnter: (
|
|
452
|
-
onMouseLeave:
|
|
453
|
-
title:
|
|
454
|
-
children:
|
|
455
|
-
/* @__PURE__ */
|
|
456
|
-
|
|
452
|
+
onClick: ee,
|
|
453
|
+
style: { ...U(d), width: "64px", minWidth: "64px", gap: "3px" },
|
|
454
|
+
onMouseEnter: (i) => w(i, d),
|
|
455
|
+
onMouseLeave: S,
|
|
456
|
+
title: d ? `Reverse ${T}× — click to speed up, press play to stop` : "Rewind",
|
|
457
|
+
children: d ? /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
458
|
+
/* @__PURE__ */ u.jsxs("span", { style: { fontSize: "11px", fontWeight: "bold" }, children: [
|
|
459
|
+
T,
|
|
457
460
|
"×"
|
|
458
461
|
] }),
|
|
459
462
|
"◀◀"
|
|
460
463
|
] }) : "◀◀"
|
|
461
464
|
}
|
|
462
465
|
),
|
|
463
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ u.jsx(
|
|
464
467
|
"button",
|
|
465
468
|
{
|
|
466
|
-
onClick: () =>
|
|
469
|
+
onClick: () => R(!A),
|
|
467
470
|
style: {
|
|
468
|
-
...
|
|
469
|
-
color:
|
|
471
|
+
...H,
|
|
472
|
+
color: m.buttonActiveColor,
|
|
470
473
|
fontSize: "18px",
|
|
471
474
|
width: "40px",
|
|
472
475
|
minWidth: "40px",
|
|
473
476
|
height: "40px",
|
|
474
|
-
borderColor: `${
|
|
477
|
+
borderColor: `${m.buttonActiveColor}55`,
|
|
475
478
|
borderRadius: "50%",
|
|
476
|
-
paddingLeft:
|
|
479
|
+
paddingLeft: A ? "0" : "2px"
|
|
477
480
|
},
|
|
478
|
-
onMouseEnter: (
|
|
479
|
-
onMouseLeave:
|
|
480
|
-
title:
|
|
481
|
-
children:
|
|
481
|
+
onMouseEnter: (i) => w(i, !0),
|
|
482
|
+
onMouseLeave: S,
|
|
483
|
+
title: A ? "Pause" : d ? "Play (reset to 1×)" : "Play",
|
|
484
|
+
children: A ? /* @__PURE__ */ u.jsx(ft, {}) : "▶"
|
|
482
485
|
}
|
|
483
486
|
),
|
|
484
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ u.jsx(
|
|
485
488
|
"button",
|
|
486
489
|
{
|
|
487
|
-
onClick:
|
|
488
|
-
style: { ...U(
|
|
489
|
-
onMouseEnter: (
|
|
490
|
-
onMouseLeave:
|
|
491
|
-
title:
|
|
492
|
-
children:
|
|
490
|
+
onClick: te,
|
|
491
|
+
style: { ...U(x), width: "64px", minWidth: "64px", gap: "3px" },
|
|
492
|
+
onMouseEnter: (i) => w(i, x),
|
|
493
|
+
onMouseLeave: S,
|
|
494
|
+
title: x ? `${T}× speed — click to increase, click again at max to reset` : "Fast forward",
|
|
495
|
+
children: x ? /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
493
496
|
"▶▶",
|
|
494
|
-
/* @__PURE__ */
|
|
495
|
-
|
|
497
|
+
/* @__PURE__ */ u.jsxs("span", { style: { fontSize: "11px", fontWeight: "bold" }, children: [
|
|
498
|
+
T,
|
|
496
499
|
"×"
|
|
497
500
|
] })
|
|
498
501
|
] }) : "▶▶"
|
|
499
502
|
}
|
|
500
503
|
),
|
|
501
|
-
|
|
504
|
+
z && /* @__PURE__ */ u.jsx(
|
|
502
505
|
"button",
|
|
503
506
|
{
|
|
504
|
-
onClick:
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
507
|
+
onClick: I ? V : void 0,
|
|
508
|
+
disabled: !I,
|
|
509
|
+
style: { ...U(!1), opacity: I ? 1 : 0.3, cursor: I ? "pointer" : "default" },
|
|
510
|
+
onMouseEnter: I ? (i) => w(i, !1) : void 0,
|
|
511
|
+
onMouseLeave: I ? S : void 0,
|
|
512
|
+
title: I ? "Jump to end" : "No end time set",
|
|
509
513
|
children: "⏭"
|
|
510
514
|
}
|
|
511
515
|
)
|
|
512
516
|
] }),
|
|
513
|
-
!
|
|
517
|
+
!X && /* @__PURE__ */ u.jsx("div", { style: { display: "flex", justifyContent: "flex-end", alignItems: "center" }, children: b != null && B != null && /* @__PURE__ */ u.jsx(
|
|
514
518
|
"button",
|
|
515
519
|
{
|
|
516
|
-
onClick:
|
|
520
|
+
onClick: b,
|
|
517
521
|
style: {
|
|
518
|
-
...
|
|
519
|
-
color:
|
|
520
|
-
borderColor: `${
|
|
522
|
+
...H,
|
|
523
|
+
color: m.buttonActiveColor,
|
|
524
|
+
borderColor: `${m.buttonActiveColor}33`
|
|
521
525
|
},
|
|
522
|
-
onMouseEnter: (
|
|
523
|
-
onMouseLeave:
|
|
524
|
-
title:
|
|
525
|
-
children:
|
|
526
|
+
onMouseEnter: (i) => w(i, B),
|
|
527
|
+
onMouseLeave: S,
|
|
528
|
+
title: B ? "Collapse swim lanes" : "Expand swim lanes",
|
|
529
|
+
children: B ? /* @__PURE__ */ u.jsx(Ne, {}) : /* @__PURE__ */ u.jsx(Je, {})
|
|
526
530
|
}
|
|
527
531
|
) }),
|
|
528
|
-
|
|
532
|
+
X && b != null && B != null && /* @__PURE__ */ u.jsx(
|
|
529
533
|
"button",
|
|
530
534
|
{
|
|
531
|
-
onClick:
|
|
535
|
+
onClick: b,
|
|
532
536
|
style: {
|
|
533
|
-
...
|
|
534
|
-
color:
|
|
535
|
-
borderColor: `${
|
|
537
|
+
...H,
|
|
538
|
+
color: m.buttonActiveColor,
|
|
539
|
+
borderColor: `${m.buttonActiveColor}33`,
|
|
536
540
|
marginLeft: "4px"
|
|
537
541
|
},
|
|
538
|
-
onMouseEnter: (
|
|
539
|
-
onMouseLeave:
|
|
540
|
-
title:
|
|
541
|
-
children:
|
|
542
|
+
onMouseEnter: (i) => w(i, B),
|
|
543
|
+
onMouseLeave: S,
|
|
544
|
+
title: B ? "Collapse swim lanes" : "Expand swim lanes",
|
|
545
|
+
children: B ? /* @__PURE__ */ u.jsx(Ne, {}) : /* @__PURE__ */ u.jsx(Je, {})
|
|
542
546
|
}
|
|
543
547
|
)
|
|
544
548
|
]
|
|
545
549
|
}
|
|
546
550
|
);
|
|
547
551
|
}, We = He(
|
|
548
|
-
(D,
|
|
552
|
+
(D, A) => {
|
|
549
553
|
const {
|
|
550
|
-
currentTime:
|
|
551
|
-
defaultStartMs:
|
|
552
|
-
defaultEndMs:
|
|
553
|
-
theme:
|
|
554
|
-
maxTicks:
|
|
555
|
-
onTimeChange:
|
|
556
|
-
onDragStart:
|
|
554
|
+
currentTime: J,
|
|
555
|
+
defaultStartMs: l,
|
|
556
|
+
defaultEndMs: g,
|
|
557
|
+
theme: y,
|
|
558
|
+
maxTicks: I,
|
|
559
|
+
onTimeChange: O,
|
|
560
|
+
onDragStart: z,
|
|
557
561
|
onDragEnd: R,
|
|
558
|
-
swimLanes:
|
|
559
|
-
showSwimLanes:
|
|
560
|
-
onSwimLaneItemClick:
|
|
561
|
-
onSwimLaneItemHover:
|
|
562
|
-
onSwimLaneItemDoubleClick:
|
|
563
|
-
onSwimLaneItemContextMenu:
|
|
564
|
-
onSwimLaneReorder:
|
|
565
|
-
} = D,
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
}, [
|
|
569
|
-
|
|
570
|
-
}, [
|
|
571
|
-
const
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
}, [
|
|
575
|
-
|
|
576
|
-
}, [
|
|
577
|
-
|
|
578
|
-
}, [
|
|
579
|
-
|
|
580
|
-
}, [
|
|
581
|
-
|
|
582
|
-
}, [
|
|
583
|
-
|
|
584
|
-
}, [
|
|
585
|
-
|
|
586
|
-
}, [
|
|
587
|
-
const
|
|
588
|
-
startMs:
|
|
589
|
-
endMs:
|
|
590
|
-
currentMs:
|
|
591
|
-
theme:
|
|
592
|
-
maxTicks:
|
|
593
|
-
swimLanes:
|
|
594
|
-
showSwimLanes:
|
|
595
|
-
scrollTop:
|
|
596
|
-
reorderState:
|
|
562
|
+
swimLanes: W,
|
|
563
|
+
showSwimLanes: ee,
|
|
564
|
+
onSwimLaneItemClick: te,
|
|
565
|
+
onSwimLaneItemHover: V,
|
|
566
|
+
onSwimLaneItemDoubleClick: K,
|
|
567
|
+
onSwimLaneItemContextMenu: Z,
|
|
568
|
+
onSwimLaneReorder: P
|
|
569
|
+
} = D, m = v(null), B = v(y), b = v(I), d = v(l), x = v(g), M = v(C.JulianDate.toDate(J).getTime());
|
|
570
|
+
Y(() => {
|
|
571
|
+
B.current = y;
|
|
572
|
+
}, [y]), Y(() => {
|
|
573
|
+
b.current = I;
|
|
574
|
+
}, [I]);
|
|
575
|
+
const T = v(W ?? []), ce = v(ee ?? (W != null && W.length > 0)), X = v(0), Q = v(null), H = v(null), U = v(te), w = v(V), S = v(K), i = v(Z), k = v(P);
|
|
576
|
+
Y(() => {
|
|
577
|
+
U.current = te;
|
|
578
|
+
}, [te]), Y(() => {
|
|
579
|
+
w.current = V;
|
|
580
|
+
}, [V]), Y(() => {
|
|
581
|
+
S.current = K;
|
|
582
|
+
}, [K]), Y(() => {
|
|
583
|
+
i.current = Z;
|
|
584
|
+
}, [Z]), Y(() => {
|
|
585
|
+
k.current = P;
|
|
586
|
+
}, [P]), Y(() => {
|
|
587
|
+
T.current = W ?? [], h();
|
|
588
|
+
}, [W]), Y(() => {
|
|
589
|
+
ce.current = ee ?? (W != null && W.length > 0), h();
|
|
590
|
+
}, [ee, W]);
|
|
591
|
+
const j = v(null), $ = v(null), re = v(!1), ie = v(0), t = v("none"), a = v(0), E = v(0), L = v(0), q = v("none"), ue = v(0), _ = v(0), ae = (e, n) => Math.hypot(n.clientX - e.clientX, n.clientY - e.clientY), oe = ne(() => ({
|
|
592
|
+
startMs: d.current,
|
|
593
|
+
endMs: x.current,
|
|
594
|
+
currentMs: M.current,
|
|
595
|
+
theme: B.current,
|
|
596
|
+
maxTicks: b.current,
|
|
597
|
+
swimLanes: T.current,
|
|
598
|
+
showSwimLanes: ce.current,
|
|
599
|
+
scrollTop: X.current,
|
|
600
|
+
reorderState: H.current
|
|
597
601
|
}), []);
|
|
598
|
-
Ue(
|
|
602
|
+
Ue(A, () => ({
|
|
599
603
|
zoomTo(e, n, r) {
|
|
600
|
-
const
|
|
601
|
-
|
|
604
|
+
const c = Math.max(nt, Math.min(rt, n - e)), o = (e + n) / 2;
|
|
605
|
+
d.current = o - c / 2, x.current = o + c / 2, r !== void 0 && (M.current = r), h();
|
|
602
606
|
},
|
|
603
607
|
getVisibleRange() {
|
|
604
|
-
return { startMs:
|
|
608
|
+
return { startMs: d.current, endMs: x.current };
|
|
605
609
|
},
|
|
606
610
|
startFollow(e) {
|
|
607
|
-
if (
|
|
608
|
-
|
|
611
|
+
if (ie.current = e, $.current !== null) return;
|
|
612
|
+
re.current = !0;
|
|
609
613
|
let n = performance.now();
|
|
610
614
|
const r = () => {
|
|
611
|
-
const
|
|
612
|
-
n =
|
|
613
|
-
const
|
|
614
|
-
|
|
615
|
+
const c = performance.now(), o = c - n;
|
|
616
|
+
n = c;
|
|
617
|
+
const s = o * ie.current;
|
|
618
|
+
d.current += s, x.current += s, M.current += s, h(), $.current = requestAnimationFrame(r);
|
|
615
619
|
};
|
|
616
|
-
|
|
620
|
+
$.current = requestAnimationFrame(r);
|
|
617
621
|
},
|
|
618
622
|
stopFollow() {
|
|
619
|
-
|
|
623
|
+
re.current = !1, $.current !== null && (cancelAnimationFrame($.current), $.current = null);
|
|
620
624
|
},
|
|
621
625
|
correctFollow(e) {
|
|
622
|
-
if (!
|
|
623
|
-
const n = e -
|
|
624
|
-
|
|
626
|
+
if (!re.current) return;
|
|
627
|
+
const n = e - M.current;
|
|
628
|
+
M.current = e, d.current += n, x.current += n;
|
|
625
629
|
},
|
|
626
630
|
// ── Swim lane CRUD ──────────────────────────────────────────────
|
|
627
631
|
appendSwimLane(e) {
|
|
628
|
-
|
|
632
|
+
T.current = [...T.current, e], h();
|
|
629
633
|
},
|
|
630
634
|
updateSwimLane(e, n) {
|
|
631
|
-
|
|
635
|
+
T.current = T.current.map(
|
|
632
636
|
(r) => r.id === e ? { ...r, ...n, id: r.id } : r
|
|
633
|
-
),
|
|
637
|
+
), h();
|
|
634
638
|
},
|
|
635
639
|
removeSwimLane(e) {
|
|
636
|
-
|
|
640
|
+
T.current = T.current.filter((n) => n.id !== e), h();
|
|
637
641
|
},
|
|
638
642
|
reorderSwimLanes(e) {
|
|
639
|
-
const n = new Map(
|
|
640
|
-
for (const
|
|
641
|
-
const o = n.get(
|
|
643
|
+
const n = new Map(T.current.map((c) => [c.id, c])), r = [];
|
|
644
|
+
for (const c of e) {
|
|
645
|
+
const o = n.get(c);
|
|
642
646
|
o && r.push(o);
|
|
643
647
|
}
|
|
644
|
-
|
|
648
|
+
T.current = r, h();
|
|
645
649
|
}
|
|
646
650
|
}));
|
|
647
|
-
const
|
|
648
|
-
const e =
|
|
651
|
+
const h = ne(() => {
|
|
652
|
+
const e = m.current;
|
|
649
653
|
if (!e) return;
|
|
650
654
|
const n = e.getContext("2d");
|
|
651
655
|
if (!n) return;
|
|
652
|
-
const r = e.getBoundingClientRect(),
|
|
653
|
-
if (
|
|
654
|
-
const
|
|
655
|
-
(e.width !==
|
|
656
|
-
const
|
|
657
|
-
|
|
658
|
-
}, [
|
|
656
|
+
const r = e.getBoundingClientRect(), c = r.width, o = r.height;
|
|
657
|
+
if (c === 0 || o === 0) return;
|
|
658
|
+
const s = window.devicePixelRatio || 1, f = Math.round(c * s), p = Math.round(o * s);
|
|
659
|
+
(e.width !== f || e.height !== p) && (e.width = f, e.height = p), n.save(), n.scale(s, s);
|
|
660
|
+
const F = Ve(n, c, o, oe());
|
|
661
|
+
F !== X.current && (X.current = F), n.restore();
|
|
662
|
+
}, [oe]);
|
|
659
663
|
qe(() => {
|
|
660
|
-
|
|
661
|
-
const e =
|
|
664
|
+
h();
|
|
665
|
+
const e = m.current;
|
|
662
666
|
if (!e) return;
|
|
663
|
-
const n = new ResizeObserver(() =>
|
|
667
|
+
const n = new ResizeObserver(() => h());
|
|
664
668
|
return n.observe(e), () => n.disconnect();
|
|
665
|
-
}, [
|
|
666
|
-
if (
|
|
667
|
-
const e = C.JulianDate.toDate(
|
|
668
|
-
|
|
669
|
-
}, [
|
|
670
|
-
const
|
|
671
|
-
if (
|
|
669
|
+
}, [h]), Y(() => {
|
|
670
|
+
if (re.current) return;
|
|
671
|
+
const e = C.JulianDate.toDate(J).getTime();
|
|
672
|
+
M.current !== e && (M.current = e, h());
|
|
673
|
+
}, [J, h]);
|
|
674
|
+
const le = ne((e) => {
|
|
675
|
+
if (j.current !== null) return;
|
|
672
676
|
const n = () => {
|
|
673
|
-
const r =
|
|
674
|
-
if (
|
|
675
|
-
const
|
|
676
|
-
|
|
677
|
+
const r = m.current, c = x.current - d.current, o = e * c * 0.01;
|
|
678
|
+
if (d.current += o, x.current += o, r) {
|
|
679
|
+
const s = r.getBoundingClientRect(), f = Math.max(0, Math.min(s.width, E.current - s.left)), p = d.current + f / s.width * (x.current - d.current);
|
|
680
|
+
M.current = p, O(C.JulianDate.fromDate(new Date(p)));
|
|
677
681
|
}
|
|
678
|
-
|
|
682
|
+
h(), j.current = requestAnimationFrame(n);
|
|
679
683
|
};
|
|
680
|
-
|
|
681
|
-
}, [
|
|
682
|
-
|
|
683
|
-
}, []), se =
|
|
684
|
+
j.current = requestAnimationFrame(n);
|
|
685
|
+
}, [h, O]), N = ne(() => {
|
|
686
|
+
j.current !== null && (cancelAnimationFrame(j.current), j.current = null);
|
|
687
|
+
}, []), se = ne((e, n, r, c) => Ke(e, n, r, c, oe()), [oe]), de = ne((e, n, r) => Ze(e, n, r, oe()), [oe]), me = ne((e, n) => Qe(e, n, oe()), [oe]), ye = ne((e) => {
|
|
684
688
|
e.preventDefault();
|
|
685
|
-
const n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left,
|
|
686
|
-
if (e.button === 0 &&
|
|
687
|
-
const o =
|
|
689
|
+
const n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left, c = e.clientY - n.top;
|
|
690
|
+
if (e.button === 0 && k.current) {
|
|
691
|
+
const o = de(r, c, n.height);
|
|
688
692
|
if (o) {
|
|
689
|
-
const
|
|
690
|
-
|
|
693
|
+
const f = T.current.findIndex((p) => p.id === o.id);
|
|
694
|
+
H.current = {
|
|
691
695
|
dragging: !0,
|
|
692
696
|
dragLaneId: o.id,
|
|
693
697
|
dragStartY: e.clientY,
|
|
694
698
|
currentY: e.clientY,
|
|
695
|
-
insertIndex:
|
|
699
|
+
insertIndex: f
|
|
696
700
|
}, e.currentTarget.style.cursor = "grabbing";
|
|
697
701
|
return;
|
|
698
702
|
}
|
|
699
703
|
}
|
|
700
|
-
if (e.button === 0 &&
|
|
701
|
-
const o = (
|
|
702
|
-
if (!(Math.abs(r - o) <= 10) && se(r,
|
|
703
|
-
|
|
704
|
+
if (e.button === 0 && me(c, n.height)) {
|
|
705
|
+
const o = (M.current - d.current) / (x.current - d.current) * n.width;
|
|
706
|
+
if (!(Math.abs(r - o) <= 10) && se(r, c, n.width, n.height)) {
|
|
707
|
+
L.current = performance.now();
|
|
704
708
|
return;
|
|
705
709
|
}
|
|
706
710
|
}
|
|
707
711
|
if (e.button === 0) {
|
|
708
|
-
t.current = "scrub",
|
|
709
|
-
const o =
|
|
710
|
-
|
|
712
|
+
t.current = "scrub", E.current = e.clientX, e.currentTarget.style.cursor = "grabbing", z == null || z();
|
|
713
|
+
const o = d.current + r / n.width * (x.current - d.current);
|
|
714
|
+
M.current = o, h(), O(C.JulianDate.fromDate(new Date(o)));
|
|
711
715
|
} else if (e.button === 1)
|
|
712
|
-
t.current = "slide",
|
|
716
|
+
t.current = "slide", a.current = e.clientX;
|
|
713
717
|
else if (e.button === 2) {
|
|
714
|
-
if (
|
|
718
|
+
if (i.current && me(c, n.height))
|
|
715
719
|
return;
|
|
716
|
-
t.current = "zoom",
|
|
720
|
+
t.current = "zoom", a.current = e.clientX;
|
|
717
721
|
}
|
|
718
|
-
}, [
|
|
719
|
-
|
|
722
|
+
}, [h, O, z, de, me, se]);
|
|
723
|
+
Y(() => {
|
|
720
724
|
const e = (r) => {
|
|
721
|
-
const
|
|
722
|
-
if (
|
|
723
|
-
|
|
724
|
-
const p =
|
|
725
|
+
const c = H.current;
|
|
726
|
+
if (c && c.dragging) {
|
|
727
|
+
c.currentY = r.clientY;
|
|
728
|
+
const p = m.current;
|
|
725
729
|
if (p) {
|
|
726
|
-
const
|
|
727
|
-
let
|
|
728
|
-
const _e =
|
|
730
|
+
const F = p.getBoundingClientRect(), G = r.clientY - F.top;
|
|
731
|
+
let we = -X.current;
|
|
732
|
+
const _e = T.current;
|
|
729
733
|
let je = _e.length;
|
|
730
|
-
for (let
|
|
731
|
-
const Ae = _e[
|
|
732
|
-
if (
|
|
733
|
-
je =
|
|
734
|
+
for (let Ee = 0; Ee < _e.length; Ee++) {
|
|
735
|
+
const Ae = _e[Ee].height ?? Le, $e = we + Ae / 2;
|
|
736
|
+
if (G < $e) {
|
|
737
|
+
je = Ee;
|
|
734
738
|
break;
|
|
735
739
|
}
|
|
736
|
-
|
|
740
|
+
we += Ae + Ie;
|
|
737
741
|
}
|
|
738
|
-
|
|
742
|
+
c.insertIndex = je;
|
|
739
743
|
}
|
|
740
|
-
|
|
744
|
+
h();
|
|
741
745
|
return;
|
|
742
746
|
}
|
|
743
747
|
if (t.current === "none") return;
|
|
744
|
-
const o =
|
|
748
|
+
const o = m.current;
|
|
745
749
|
if (!o) return;
|
|
746
|
-
const
|
|
750
|
+
const s = o.getBoundingClientRect(), f = s.width;
|
|
747
751
|
if (t.current === "scrub") {
|
|
748
|
-
|
|
749
|
-
const p = r.clientX -
|
|
750
|
-
p <
|
|
751
|
-
const
|
|
752
|
-
|
|
752
|
+
E.current = r.clientX;
|
|
753
|
+
const p = r.clientX - s.left, F = f * 0.08;
|
|
754
|
+
p < F ? le(-1) : p > f - F ? le(1) : N();
|
|
755
|
+
const G = Math.max(0, Math.min(f, p)), fe = d.current + G / f * (x.current - d.current);
|
|
756
|
+
M.current = fe, h(), O(C.JulianDate.fromDate(new Date(fe)));
|
|
753
757
|
} else if (t.current === "slide") {
|
|
754
|
-
const p =
|
|
755
|
-
if (
|
|
756
|
-
const
|
|
757
|
-
|
|
758
|
+
const p = a.current - r.clientX;
|
|
759
|
+
if (a.current = r.clientX, p !== 0) {
|
|
760
|
+
const F = p / f * (x.current - d.current);
|
|
761
|
+
d.current += F, x.current += F, h();
|
|
758
762
|
}
|
|
759
763
|
} else if (t.current === "zoom") {
|
|
760
|
-
const p =
|
|
761
|
-
|
|
764
|
+
const p = a.current - r.clientX;
|
|
765
|
+
a.current = r.clientX, p !== 0 && pe(Math.pow(1.01, p));
|
|
762
766
|
}
|
|
763
767
|
}, n = () => {
|
|
764
|
-
var
|
|
765
|
-
const r =
|
|
768
|
+
var c;
|
|
769
|
+
const r = H.current;
|
|
766
770
|
if (r && r.dragging) {
|
|
767
|
-
const o = Math.abs(r.currentY - r.dragStartY),
|
|
768
|
-
if (o > 5 &&
|
|
769
|
-
const p = [...
|
|
770
|
-
p.splice(
|
|
771
|
+
const o = Math.abs(r.currentY - r.dragStartY), s = T.current, f = s.findIndex((p) => p.id === r.dragLaneId);
|
|
772
|
+
if (o > 5 && f >= 0 && r.insertIndex !== f && r.insertIndex !== f + 1) {
|
|
773
|
+
const p = [...s], [F] = p.splice(f, 1), G = r.insertIndex > f ? r.insertIndex - 1 : r.insertIndex;
|
|
774
|
+
p.splice(G, 0, F), T.current = p, (c = k.current) == null || c.call(k, p.map((fe) => fe.id));
|
|
771
775
|
}
|
|
772
|
-
|
|
776
|
+
H.current = null, m.current && (m.current.style.cursor = "default"), h();
|
|
773
777
|
return;
|
|
774
778
|
}
|
|
775
|
-
|
|
779
|
+
N(), t.current = "none", m.current && (m.current.style.cursor = "default"), R == null || R();
|
|
776
780
|
};
|
|
777
781
|
return document.addEventListener("mousemove", e), document.addEventListener("mouseup", n), () => {
|
|
778
782
|
document.removeEventListener("mousemove", e), document.removeEventListener("mouseup", n);
|
|
779
783
|
};
|
|
780
|
-
}, [
|
|
781
|
-
const pe =
|
|
782
|
-
const n = et(
|
|
783
|
-
|
|
784
|
-
}, [
|
|
784
|
+
}, [h, O, R, le, N]);
|
|
785
|
+
const pe = ne((e) => {
|
|
786
|
+
const n = et(d.current, x.current, e);
|
|
787
|
+
d.current = n.startMs, x.current = n.endMs, h();
|
|
788
|
+
}, [h]), ge = ne((e) => {
|
|
785
789
|
e.preventDefault();
|
|
786
|
-
const n =
|
|
790
|
+
const n = m.current;
|
|
787
791
|
if (!n) return;
|
|
788
|
-
const r = n.getBoundingClientRect(),
|
|
789
|
-
if (o &&
|
|
790
|
-
const
|
|
791
|
-
if (
|
|
792
|
+
const r = n.getBoundingClientRect(), c = e.clientY - r.top, o = ce.current, s = T.current;
|
|
793
|
+
if (o && s.length > 0) {
|
|
794
|
+
const f = Math.max(0, r.height - ze);
|
|
795
|
+
if (c >= 0 && c < f) {
|
|
792
796
|
let p = 0;
|
|
793
|
-
for (const
|
|
794
|
-
const
|
|
795
|
-
if (
|
|
796
|
-
|
|
797
|
+
for (const G of s) p += (G.height ?? Le) + Ie;
|
|
798
|
+
const F = Math.max(0, p - f);
|
|
799
|
+
if (F > 0) {
|
|
800
|
+
X.current = Math.max(0, Math.min(F, X.current + e.deltaY * tt)), h();
|
|
797
801
|
return;
|
|
798
802
|
}
|
|
799
803
|
}
|
|
800
804
|
}
|
|
801
805
|
pe(Math.pow(1.05, e.deltaY > 0 ? -1 : 1));
|
|
802
|
-
}, [pe,
|
|
803
|
-
|
|
804
|
-
const e =
|
|
806
|
+
}, [pe, h]);
|
|
807
|
+
Y(() => {
|
|
808
|
+
const e = m.current;
|
|
805
809
|
if (e)
|
|
806
|
-
return e.addEventListener("wheel",
|
|
807
|
-
}, [
|
|
808
|
-
const e =
|
|
810
|
+
return e.addEventListener("wheel", ge, { passive: !1 }), () => e.removeEventListener("wheel", ge);
|
|
811
|
+
}, [ge]), Y(() => {
|
|
812
|
+
const e = m.current;
|
|
809
813
|
if (!e) return;
|
|
810
814
|
const n = (o) => {
|
|
811
815
|
o.preventDefault();
|
|
812
|
-
const
|
|
816
|
+
const s = e.getBoundingClientRect();
|
|
813
817
|
if (o.touches.length === 1) {
|
|
814
|
-
const
|
|
815
|
-
|
|
816
|
-
} else o.touches.length >= 2 && (
|
|
818
|
+
const f = o.touches[0].clientX - s.left, p = Math.max(0, Math.min(s.width, f)), F = d.current + p / s.width * (x.current - d.current);
|
|
819
|
+
q.current = "scrub", ue.current = o.touches[0].clientX, E.current = o.touches[0].clientX, M.current = F, h(), z == null || z(), O(C.JulianDate.fromDate(new Date(F)));
|
|
820
|
+
} else o.touches.length >= 2 && (q.current = "pinch", _.current = ae(o.touches[0], o.touches[1]));
|
|
817
821
|
}, r = (o) => {
|
|
818
822
|
o.preventDefault();
|
|
819
|
-
const
|
|
820
|
-
if (
|
|
821
|
-
const
|
|
822
|
-
if (
|
|
823
|
-
else if (
|
|
823
|
+
const s = e.getBoundingClientRect();
|
|
824
|
+
if (q.current === "scrub" && o.touches.length >= 1) {
|
|
825
|
+
const f = o.touches[0].clientX - s.left, p = s.width * 0.08;
|
|
826
|
+
if (E.current = o.touches[0].clientX, f < p) le(-1);
|
|
827
|
+
else if (f > s.width - p) le(1);
|
|
824
828
|
else {
|
|
825
|
-
|
|
826
|
-
const
|
|
827
|
-
|
|
829
|
+
N();
|
|
830
|
+
const F = Math.max(0, Math.min(s.width, f)), G = d.current + F / s.width * (x.current - d.current);
|
|
831
|
+
M.current = G, h(), O(C.JulianDate.fromDate(new Date(G)));
|
|
828
832
|
}
|
|
829
|
-
} else if (
|
|
830
|
-
const
|
|
831
|
-
if (
|
|
832
|
-
const p =
|
|
833
|
-
|
|
833
|
+
} else if (q.current === "slide" && o.touches.length >= 1) {
|
|
834
|
+
const f = ue.current - o.touches[0].clientX;
|
|
835
|
+
if (ue.current = o.touches[0].clientX, f !== 0) {
|
|
836
|
+
const p = f / s.width * (x.current - d.current);
|
|
837
|
+
d.current += p, x.current += p, h();
|
|
834
838
|
}
|
|
835
|
-
} else if (
|
|
836
|
-
const
|
|
837
|
-
|
|
839
|
+
} else if (q.current === "pinch" && o.touches.length >= 2) {
|
|
840
|
+
const f = ae(o.touches[0], o.touches[1]);
|
|
841
|
+
f > 0 && _.current > 0 && pe(_.current / f), _.current = f;
|
|
838
842
|
}
|
|
839
|
-
},
|
|
840
|
-
|
|
843
|
+
}, c = (o) => {
|
|
844
|
+
N(), q.current === "scrub" && (R == null || R()), o.touches.length === 0 ? q.current = "none" : o.touches.length === 1 && (q.current = "slide", ue.current = o.touches[0].clientX);
|
|
841
845
|
};
|
|
842
|
-
return e.addEventListener("touchstart", n, { passive: !1 }), e.addEventListener("touchmove", r, { passive: !1 }), e.addEventListener("touchend",
|
|
843
|
-
e.removeEventListener("touchstart", n), e.removeEventListener("touchmove", r), e.removeEventListener("touchend",
|
|
846
|
+
return e.addEventListener("touchstart", n, { passive: !1 }), e.addEventListener("touchmove", r, { passive: !1 }), e.addEventListener("touchend", c, { passive: !1 }), () => {
|
|
847
|
+
e.removeEventListener("touchstart", n), e.removeEventListener("touchmove", r), e.removeEventListener("touchend", c);
|
|
844
848
|
};
|
|
845
|
-
}, [
|
|
846
|
-
const
|
|
847
|
-
var
|
|
849
|
+
}, [h, z, R, O, pe, le, N]);
|
|
850
|
+
const Me = ne((e) => {
|
|
851
|
+
var f, p, F;
|
|
848
852
|
if (t.current !== "none") return;
|
|
849
|
-
const n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left,
|
|
850
|
-
if (
|
|
851
|
-
const
|
|
852
|
-
if (
|
|
853
|
-
e.currentTarget.style.cursor =
|
|
854
|
-
else if (fe && (
|
|
853
|
+
const n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left, c = e.clientY - n.top, o = (M.current - d.current) / (x.current - d.current) * n.width, s = Math.abs(r - o) <= 10;
|
|
854
|
+
if (me(c, n.height)) {
|
|
855
|
+
const G = se(r, c, n.width, n.height), fe = Q.current;
|
|
856
|
+
if (G)
|
|
857
|
+
e.currentTarget.style.cursor = s ? "grab" : "pointer", (!fe || fe.item.id !== G.item.id || fe.lane.id !== G.lane.id) && (Q.current = G, (f = w.current) == null || f.call(w, { laneId: G.lane.id, item: G.item, originalEvent: e.nativeEvent }), h());
|
|
858
|
+
else if (fe && (Q.current = null, (p = w.current) == null || p.call(w, null), h()), s)
|
|
855
859
|
e.currentTarget.style.cursor = "grab";
|
|
856
860
|
else {
|
|
857
|
-
const
|
|
858
|
-
e.currentTarget.style.cursor =
|
|
861
|
+
const we = de(r, c, n.height);
|
|
862
|
+
e.currentTarget.style.cursor = we && k.current ? "grab" : "default";
|
|
859
863
|
}
|
|
860
864
|
return;
|
|
861
865
|
}
|
|
862
|
-
|
|
863
|
-
}, [
|
|
864
|
-
var h;
|
|
865
|
-
if (performance.now() - A.current > 300) return;
|
|
866
|
-
const r = e.currentTarget.getBoundingClientRect(), s = e.clientX - r.left, o = e.clientY - r.top, f = se(s, o, r.width, r.height);
|
|
867
|
-
f && ((h = L.current) == null || h.call(L, { laneId: f.lane.id, item: f.item, originalEvent: e.nativeEvent }));
|
|
868
|
-
}, [se]), d = oe((e) => {
|
|
866
|
+
Q.current && (Q.current = null, (F = w.current) == null || F.call(w, null), h()), e.currentTarget.style.cursor = s ? "grab" : "default";
|
|
867
|
+
}, [h, se, me, de]), Re = ne((e) => {
|
|
869
868
|
var f;
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
869
|
+
if (performance.now() - L.current > 300) return;
|
|
870
|
+
const r = e.currentTarget.getBoundingClientRect(), c = e.clientX - r.left, o = e.clientY - r.top, s = se(c, o, r.width, r.height);
|
|
871
|
+
s && ((f = U.current) == null || f.call(U, { laneId: s.lane.id, item: s.item, originalEvent: e.nativeEvent }));
|
|
872
|
+
}, [se]), Ce = ne((e) => {
|
|
873
|
+
var s;
|
|
874
|
+
const n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left, c = e.clientY - n.top, o = se(r, c, n.width, n.height);
|
|
875
|
+
o && ((s = S.current) == null || s.call(S, { laneId: o.lane.id, item: o.item, originalEvent: e.nativeEvent }));
|
|
876
|
+
}, [se]), De = ne((e) => {
|
|
877
|
+
const n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left, c = e.clientY - n.top, o = se(r, c, n.width, n.height);
|
|
878
|
+
o && i.current ? (e.preventDefault(), i.current({ laneId: o.lane.id, item: o.item, originalEvent: e.nativeEvent })) : e.preventDefault();
|
|
875
879
|
}, [se]);
|
|
876
|
-
return
|
|
877
|
-
|
|
878
|
-
}, []), /* @__PURE__ */
|
|
880
|
+
return Y(() => () => {
|
|
881
|
+
j.current !== null && cancelAnimationFrame(j.current), $.current !== null && cancelAnimationFrame($.current);
|
|
882
|
+
}, []), /* @__PURE__ */ u.jsx(
|
|
879
883
|
"canvas",
|
|
880
884
|
{
|
|
881
|
-
ref:
|
|
885
|
+
ref: m,
|
|
882
886
|
style: { width: "100%", flex: 1, minHeight: 0, display: "block", cursor: "default" },
|
|
883
|
-
onMouseDown:
|
|
884
|
-
onMouseMove:
|
|
885
|
-
onClick:
|
|
886
|
-
onDoubleClick:
|
|
887
|
+
onMouseDown: ye,
|
|
888
|
+
onMouseMove: Me,
|
|
889
|
+
onClick: Re,
|
|
890
|
+
onDoubleClick: Ce,
|
|
887
891
|
onMouseLeave: () => {
|
|
888
892
|
var e;
|
|
889
|
-
|
|
893
|
+
Q.current && (Q.current = null, (e = w.current) == null || e.call(w, null), h()), t.current === "none" && m.current && (m.current.style.cursor = "default");
|
|
890
894
|
},
|
|
891
|
-
onContextMenu:
|
|
895
|
+
onContextMenu: De
|
|
892
896
|
}
|
|
893
897
|
);
|
|
894
898
|
}
|
|
@@ -896,169 +900,173 @@ const dt = 520, ft = () => /* @__PURE__ */ a.jsxs("svg", { width: "14", height:
|
|
|
896
900
|
We.displayName = "TimelineCanvas";
|
|
897
901
|
const Xe = [2, 4, 8, 16, 32, 100, 1], Ye = [1, 2, 4, 8, 16, 32, 100], xt = ({
|
|
898
902
|
startTime: D,
|
|
899
|
-
endTime:
|
|
900
|
-
currentTime:
|
|
901
|
-
clock:
|
|
902
|
-
onTimeChange:
|
|
903
|
-
onPlayPause:
|
|
904
|
-
onMultiplierChange:
|
|
905
|
-
height:
|
|
906
|
-
showControls:
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
903
|
+
endTime: A,
|
|
904
|
+
currentTime: J,
|
|
905
|
+
clock: l,
|
|
906
|
+
onTimeChange: g,
|
|
907
|
+
onPlayPause: y,
|
|
908
|
+
onMultiplierChange: I,
|
|
909
|
+
height: O,
|
|
910
|
+
showControls: z = !0,
|
|
911
|
+
showJumpToStart: R,
|
|
912
|
+
showJumpToEnd: W,
|
|
913
|
+
enableDrag: ee = !0,
|
|
914
|
+
dateTimeFormat: te,
|
|
915
|
+
onDateTimeClick: V,
|
|
916
|
+
jumpToTime: K,
|
|
917
|
+
maxTicks: Z,
|
|
918
|
+
ffSpeeds: P = Xe,
|
|
919
|
+
rwSpeeds: m = Ye,
|
|
920
|
+
theme: B,
|
|
921
|
+
className: b,
|
|
922
|
+
swimLanes: d,
|
|
923
|
+
showSwimLanes: x,
|
|
924
|
+
onShowSwimLanesChange: M,
|
|
925
|
+
swimLaneTransition: T = "animated",
|
|
926
|
+
onSwimLaneItemClick: ce,
|
|
927
|
+
onSwimLaneItemHover: X,
|
|
928
|
+
onSwimLaneItemDoubleClick: Q,
|
|
929
|
+
onSwimLaneItemContextMenu: H,
|
|
924
930
|
onSwimLaneReorder: U
|
|
925
931
|
}) => {
|
|
926
|
-
const
|
|
927
|
-
() =>
|
|
928
|
-
), [re
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
}, [
|
|
932
|
-
const
|
|
933
|
-
const
|
|
934
|
-
|
|
935
|
-
},
|
|
936
|
-
|
|
937
|
-
const
|
|
938
|
-
if (!
|
|
939
|
-
const
|
|
940
|
-
return
|
|
941
|
-
}, [
|
|
942
|
-
const
|
|
943
|
-
|
|
944
|
-
if (!
|
|
945
|
-
const
|
|
946
|
-
if (!
|
|
947
|
-
const
|
|
948
|
-
if (
|
|
949
|
-
const { startMs:
|
|
950
|
-
|
|
932
|
+
const w = () => Date.now(), S = D ? C.JulianDate.toDate(he(D)).getTime() : w() - 432e5, i = A ? C.JulianDate.toDate(he(A)).getTime() : w() + 12 * 3600 * 1e3, [k, j] = xe(
|
|
933
|
+
() => he(J ?? D ?? C.JulianDate.fromDate(/* @__PURE__ */ new Date()))
|
|
934
|
+
), [$, re] = xe((l == null ? void 0 : l.shouldAnimate) ?? !1), [ie, t] = xe((l == null ? void 0 : l.multiplier) ?? 1), [a, E] = xe(x ?? !0);
|
|
935
|
+
Y(() => {
|
|
936
|
+
x != null && E(x);
|
|
937
|
+
}, [x]);
|
|
938
|
+
const L = () => {
|
|
939
|
+
const e = !a;
|
|
940
|
+
E(e), M == null || M(e);
|
|
941
|
+
}, q = d != null && d.length > 0, ue = v(null), [_, ae] = xe(0);
|
|
942
|
+
Y(() => {
|
|
943
|
+
const e = ue.current;
|
|
944
|
+
if (!e) return;
|
|
945
|
+
const n = new ResizeObserver(([r]) => ae(r.borderBoxSize[0].blockSize));
|
|
946
|
+
return n.observe(e), () => n.disconnect();
|
|
947
|
+
}, [z]);
|
|
948
|
+
const h = q && !a ? `${_ + ze}px` : O != null ? `${O}px` : "100%", le = v(!1), N = v(null), se = { ...ot, ...B };
|
|
949
|
+
Y(() => {
|
|
950
|
+
if (!l) return;
|
|
951
|
+
const e = () => {
|
|
952
|
+
if (!le.current) {
|
|
953
|
+
const n = C.JulianDate.clone(l.currentTime);
|
|
954
|
+
if (j(n), re(l.shouldAnimate), t(l.multiplier), N.current) {
|
|
955
|
+
const { startMs: r, endMs: c } = N.current.getVisibleRange(), o = c - r, s = C.JulianDate.toDate(n).getTime(), f = s - r;
|
|
956
|
+
f <= o * 0.1 ? N.current.zoomTo(s - o * 0.1, s + o * 0.9, s) : f >= o * 0.9 && N.current.zoomTo(s - o * 0.9, s + o * 0.1, s);
|
|
951
957
|
}
|
|
952
958
|
}
|
|
953
959
|
};
|
|
954
|
-
return
|
|
955
|
-
|
|
960
|
+
return l.onTick.addEventListener(e), () => {
|
|
961
|
+
l.onTick.removeEventListener(e);
|
|
956
962
|
};
|
|
957
|
-
}, [
|
|
958
|
-
if (
|
|
959
|
-
const
|
|
960
|
-
if (
|
|
961
|
-
const
|
|
962
|
-
if (
|
|
963
|
-
const { startMs:
|
|
964
|
-
|
|
963
|
+
}, [l]), Y(() => {
|
|
964
|
+
if (l) return;
|
|
965
|
+
const e = setInterval(() => {
|
|
966
|
+
if (le.current) return;
|
|
967
|
+
const n = C.JulianDate.fromDate(/* @__PURE__ */ new Date());
|
|
968
|
+
if (j(n), N.current) {
|
|
969
|
+
const { startMs: r, endMs: c } = N.current.getVisibleRange(), o = c - r, s = C.JulianDate.toDate(n).getTime(), f = s - r;
|
|
970
|
+
f <= o * 0.1 ? N.current.zoomTo(s - o * 0.1, s + o * 0.9, s) : f >= o * 0.9 && N.current.zoomTo(s - o * 0.9, s + o * 0.1, s);
|
|
965
971
|
}
|
|
966
972
|
}, 1e3);
|
|
967
|
-
return () => clearInterval(
|
|
968
|
-
}, [
|
|
969
|
-
if (!
|
|
970
|
-
const
|
|
971
|
-
if (
|
|
972
|
-
const { startMs:
|
|
973
|
-
|
|
973
|
+
return () => clearInterval(e);
|
|
974
|
+
}, [l]), Y(() => {
|
|
975
|
+
if (!K) return;
|
|
976
|
+
const e = he(K);
|
|
977
|
+
if (me(e), N.current) {
|
|
978
|
+
const { startMs: n, endMs: r } = N.current.getVisibleRange(), c = r - n, o = C.JulianDate.toDate(e).getTime();
|
|
979
|
+
N.current.zoomTo(o - c / 2, o + c / 2);
|
|
974
980
|
}
|
|
975
|
-
}, [
|
|
976
|
-
const
|
|
977
|
-
|
|
978
|
-
},
|
|
979
|
-
|
|
980
|
-
},
|
|
981
|
-
|
|
982
|
-
}, he = () => {
|
|
983
|
-
const d = G.length > 0 ? G : Xe, M = F > 1 ? F : 1, e = d.indexOf(M), n = d[e < 0 || e === d.length - 1 ? 0 : e + 1];
|
|
984
|
-
ie(n);
|
|
985
|
-
}, Re = () => {
|
|
986
|
-
const d = x.length > 0 ? x : Ye, M = F < 0 ? Math.abs(F) : 0, e = d.indexOf(M), n = -d[e < 0 || e === d.length - 1 ? 0 : e + 1];
|
|
987
|
-
ie(n);
|
|
981
|
+
}, [K]);
|
|
982
|
+
const de = (e, n = !0) => {
|
|
983
|
+
l && (l.multiplier = e, n && (l.shouldAnimate = !0)), t(e), n && re(!0), I == null || I(e);
|
|
984
|
+
}, me = (e) => {
|
|
985
|
+
j(e), l && (l.currentTime = C.JulianDate.clone(e)), g == null || g(e);
|
|
986
|
+
}, ye = (e) => {
|
|
987
|
+
e && ie < 0 && de(1, !1), l && (l.shouldAnimate = e), re(e), y == null || y(e);
|
|
988
988
|
}, pe = () => {
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
989
|
+
const e = P.length > 0 ? P : Xe, n = ie > 1 ? ie : 1, r = e.indexOf(n), c = e[r < 0 || r === e.length - 1 ? 0 : r + 1];
|
|
990
|
+
de(c);
|
|
991
|
+
}, ge = () => {
|
|
992
|
+
const e = m.length > 0 ? m : Ye, n = ie < 0 ? Math.abs(ie) : 0, r = e.indexOf(n), c = -e[r < 0 || r === e.length - 1 ? 0 : r + 1];
|
|
993
|
+
de(c);
|
|
994
|
+
}, Me = () => {
|
|
995
|
+
var n;
|
|
996
|
+
const e = he(D ?? C.JulianDate.fromDate(new Date(S)));
|
|
997
|
+
l && (l.currentTime = C.JulianDate.clone(e)), j(e), (n = N.current) == null || n.zoomTo(S, i);
|
|
998
|
+
}, Re = () => {
|
|
999
|
+
var n;
|
|
1000
|
+
const e = he(A ?? C.JulianDate.fromDate(new Date(i)));
|
|
1001
|
+
l && (l.currentTime = C.JulianDate.clone(e)), j(e), (n = N.current) == null || n.zoomTo(S, i);
|
|
996
1002
|
}, Ce = () => {
|
|
997
|
-
var
|
|
998
|
-
const
|
|
999
|
-
|
|
1000
|
-
const
|
|
1001
|
-
(
|
|
1002
|
-
}, De = Math.abs(C.JulianDate.toDate(
|
|
1003
|
-
return /* @__PURE__ */
|
|
1003
|
+
var r;
|
|
1004
|
+
const e = C.JulianDate.fromDate(/* @__PURE__ */ new Date());
|
|
1005
|
+
l && (l.currentTime = C.JulianDate.clone(e)), j(e), de(1);
|
|
1006
|
+
const n = Date.now();
|
|
1007
|
+
(r = N.current) == null || r.zoomTo(n - 12 * 3600 * 1e3, n + 12 * 3600 * 1e3);
|
|
1008
|
+
}, De = Math.abs(C.JulianDate.toDate(k).getTime() - Date.now()) < 1e4;
|
|
1009
|
+
return /* @__PURE__ */ u.jsxs(
|
|
1004
1010
|
"div",
|
|
1005
1011
|
{
|
|
1006
|
-
className:
|
|
1012
|
+
className: b,
|
|
1007
1013
|
style: {
|
|
1008
1014
|
width: "100%",
|
|
1009
|
-
height:
|
|
1015
|
+
height: h,
|
|
1010
1016
|
overflow: "hidden",
|
|
1011
1017
|
display: "flex",
|
|
1012
1018
|
flexDirection: "column",
|
|
1013
1019
|
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
1014
|
-
transition:
|
|
1020
|
+
transition: T === "animated" ? "height 0.2s ease" : void 0
|
|
1015
1021
|
},
|
|
1016
1022
|
children: [
|
|
1017
|
-
|
|
1023
|
+
z && /* @__PURE__ */ u.jsx("div", { ref: ue, children: /* @__PURE__ */ u.jsx(
|
|
1018
1024
|
mt,
|
|
1019
1025
|
{
|
|
1020
|
-
currentTime:
|
|
1021
|
-
isPlaying:
|
|
1022
|
-
multiplier:
|
|
1026
|
+
currentTime: k,
|
|
1027
|
+
isPlaying: $,
|
|
1028
|
+
multiplier: ie,
|
|
1023
1029
|
isLive: De,
|
|
1024
1030
|
hasStartTime: D != null,
|
|
1025
|
-
hasEndTime:
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
+
hasEndTime: A != null,
|
|
1032
|
+
showJumpToStart: R,
|
|
1033
|
+
showJumpToEnd: W,
|
|
1034
|
+
onPlayPause: ye,
|
|
1035
|
+
onJumpToStart: Me,
|
|
1036
|
+
onRewind: ge,
|
|
1037
|
+
onFastForward: pe,
|
|
1038
|
+
onJumpToEnd: Re,
|
|
1031
1039
|
onJumpToLive: Ce,
|
|
1032
|
-
onResetSpeed: () =>
|
|
1033
|
-
onDateTimeClick:
|
|
1034
|
-
dateTimeFormat:
|
|
1035
|
-
theme:
|
|
1036
|
-
swimLanesVisible:
|
|
1037
|
-
onToggleSwimLanes:
|
|
1040
|
+
onResetSpeed: () => de(1),
|
|
1041
|
+
onDateTimeClick: V,
|
|
1042
|
+
dateTimeFormat: te,
|
|
1043
|
+
theme: se,
|
|
1044
|
+
swimLanesVisible: q ? a : void 0,
|
|
1045
|
+
onToggleSwimLanes: q ? L : void 0
|
|
1038
1046
|
}
|
|
1039
1047
|
) }),
|
|
1040
|
-
|
|
1048
|
+
ee !== !1 && /* @__PURE__ */ u.jsx(
|
|
1041
1049
|
We,
|
|
1042
1050
|
{
|
|
1043
|
-
ref:
|
|
1044
|
-
currentTime:
|
|
1045
|
-
defaultStartMs:
|
|
1046
|
-
defaultEndMs:
|
|
1047
|
-
theme:
|
|
1048
|
-
maxTicks:
|
|
1049
|
-
onTimeChange:
|
|
1051
|
+
ref: N,
|
|
1052
|
+
currentTime: k,
|
|
1053
|
+
defaultStartMs: S,
|
|
1054
|
+
defaultEndMs: i,
|
|
1055
|
+
theme: se,
|
|
1056
|
+
maxTicks: Z,
|
|
1057
|
+
onTimeChange: me,
|
|
1050
1058
|
onDragStart: () => {
|
|
1051
|
-
|
|
1059
|
+
le.current = !0;
|
|
1052
1060
|
},
|
|
1053
1061
|
onDragEnd: () => {
|
|
1054
|
-
|
|
1062
|
+
le.current = !1;
|
|
1055
1063
|
},
|
|
1056
|
-
swimLanes:
|
|
1057
|
-
showSwimLanes:
|
|
1058
|
-
onSwimLaneItemClick:
|
|
1059
|
-
onSwimLaneItemHover:
|
|
1060
|
-
onSwimLaneItemDoubleClick:
|
|
1061
|
-
onSwimLaneItemContextMenu:
|
|
1064
|
+
swimLanes: d,
|
|
1065
|
+
showSwimLanes: a,
|
|
1066
|
+
onSwimLaneItemClick: ce,
|
|
1067
|
+
onSwimLaneItemHover: X,
|
|
1068
|
+
onSwimLaneItemDoubleClick: Q,
|
|
1069
|
+
onSwimLaneItemContextMenu: H,
|
|
1062
1070
|
onSwimLaneReorder: U
|
|
1063
1071
|
}
|
|
1064
1072
|
)
|
|
@@ -1067,127 +1075,127 @@ const Xe = [2, 4, 8, 16, 32, 100, 1], Ye = [1, 2, 4, 8, 16, 32, 100], xt = ({
|
|
|
1067
1075
|
);
|
|
1068
1076
|
}, gt = ({
|
|
1069
1077
|
startTime: D,
|
|
1070
|
-
endTime:
|
|
1071
|
-
currentTime:
|
|
1072
|
-
width:
|
|
1073
|
-
height:
|
|
1074
|
-
tickInterval:
|
|
1075
|
-
showLabels:
|
|
1076
|
-
snapToTicks:
|
|
1077
|
-
enableDrag:
|
|
1078
|
+
endTime: A,
|
|
1079
|
+
currentTime: J,
|
|
1080
|
+
width: l,
|
|
1081
|
+
height: g,
|
|
1082
|
+
tickInterval: y,
|
|
1083
|
+
showLabels: I,
|
|
1084
|
+
snapToTicks: O,
|
|
1085
|
+
enableDrag: z,
|
|
1078
1086
|
theme: R,
|
|
1079
|
-
onTimeChange:
|
|
1080
|
-
onVisibleRangeChange:
|
|
1081
|
-
onDragStart:
|
|
1082
|
-
onDragEnd:
|
|
1087
|
+
onTimeChange: W,
|
|
1088
|
+
onVisibleRangeChange: ee,
|
|
1089
|
+
onDragStart: te,
|
|
1090
|
+
onDragEnd: V
|
|
1083
1091
|
}) => {
|
|
1084
|
-
const
|
|
1085
|
-
() => st(D,
|
|
1086
|
-
[D,
|
|
1087
|
-
),
|
|
1088
|
-
() => ct(
|
|
1089
|
-
[
|
|
1090
|
-
),
|
|
1091
|
-
if (!
|
|
1092
|
-
const
|
|
1093
|
-
if (!(Math.abs(
|
|
1094
|
-
let
|
|
1095
|
-
|
|
1096
|
-
const
|
|
1097
|
-
|
|
1092
|
+
const K = Se(
|
|
1093
|
+
() => st(D, A, y, l),
|
|
1094
|
+
[D, A, y, l]
|
|
1095
|
+
), Z = Se(
|
|
1096
|
+
() => ct(J, D, A, l),
|
|
1097
|
+
[J, D, A, l]
|
|
1098
|
+
), P = v(null), m = (b) => {
|
|
1099
|
+
if (!z) return;
|
|
1100
|
+
const d = b.currentTarget.getBoundingClientRect(), x = b.clientX - d.left, M = Math.max(0, Math.min(l, x));
|
|
1101
|
+
if (!(Math.abs(M - Z) <= 10)) {
|
|
1102
|
+
let j = M;
|
|
1103
|
+
O && (j = it(M, K, 10));
|
|
1104
|
+
const $ = new Date(D).getTime(), re = new Date(A).getTime();
|
|
1105
|
+
W(C.JulianDate.fromDate(new Date($ + j / l * (re - $))));
|
|
1098
1106
|
return;
|
|
1099
1107
|
}
|
|
1100
|
-
|
|
1101
|
-
const
|
|
1102
|
-
let
|
|
1103
|
-
const
|
|
1104
|
-
|
|
1105
|
-
if (
|
|
1106
|
-
const
|
|
1107
|
-
|
|
1108
|
+
te == null || te();
|
|
1109
|
+
const ce = b.clientX, X = new Date(J).getTime(), Q = new Date(D).getTime(), U = (new Date(A).getTime() - Q) / l;
|
|
1110
|
+
let w = 0, S = !1;
|
|
1111
|
+
const i = (j) => {
|
|
1112
|
+
w = j.clientX - ce, S = !0, P.current || (P.current = requestAnimationFrame(() => {
|
|
1113
|
+
if (S) {
|
|
1114
|
+
const $ = X + w * U;
|
|
1115
|
+
W(C.JulianDate.fromDate(new Date($))), S = !1;
|
|
1108
1116
|
}
|
|
1109
|
-
|
|
1117
|
+
P.current = null;
|
|
1110
1118
|
}));
|
|
1111
|
-
},
|
|
1112
|
-
document.removeEventListener("mousemove",
|
|
1119
|
+
}, k = () => {
|
|
1120
|
+
document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", k), P.current !== null && (cancelAnimationFrame(P.current), P.current = null), V == null || V();
|
|
1113
1121
|
};
|
|
1114
|
-
document.addEventListener("mousemove",
|
|
1115
|
-
},
|
|
1116
|
-
|
|
1117
|
-
const
|
|
1118
|
-
if (Math.abs(
|
|
1119
|
-
const
|
|
1120
|
-
|
|
1121
|
-
C.JulianDate.fromDate(new Date(
|
|
1122
|
-
C.JulianDate.fromDate(new Date(
|
|
1122
|
+
document.addEventListener("mousemove", i), document.addEventListener("mouseup", k);
|
|
1123
|
+
}, B = (b) => {
|
|
1124
|
+
b.preventDefault();
|
|
1125
|
+
const d = b.shiftKey ? b.deltaY : b.deltaX !== 0 ? b.deltaX : b.deltaY;
|
|
1126
|
+
if (Math.abs(d) < 1) return;
|
|
1127
|
+
const x = new Date(D).getTime(), M = new Date(A).getTime(), T = d / l * (M - x) * 0.5;
|
|
1128
|
+
ee == null || ee(
|
|
1129
|
+
C.JulianDate.fromDate(new Date(x + T)),
|
|
1130
|
+
C.JulianDate.fromDate(new Date(M + T))
|
|
1123
1131
|
);
|
|
1124
1132
|
};
|
|
1125
|
-
return /* @__PURE__ */
|
|
1133
|
+
return /* @__PURE__ */ u.jsxs(
|
|
1126
1134
|
"svg",
|
|
1127
1135
|
{
|
|
1128
1136
|
width: "100%",
|
|
1129
|
-
height:
|
|
1137
|
+
height: g,
|
|
1130
1138
|
style: { backgroundColor: R.backgroundColor, display: "block", cursor: "default" },
|
|
1131
|
-
onMouseDown:
|
|
1132
|
-
onWheel:
|
|
1139
|
+
onMouseDown: m,
|
|
1140
|
+
onWheel: B,
|
|
1133
1141
|
children: [
|
|
1134
|
-
/* @__PURE__ */
|
|
1135
|
-
|
|
1136
|
-
/* @__PURE__ */
|
|
1142
|
+
/* @__PURE__ */ u.jsx("rect", { width: l, height: g, fill: R.backgroundColor }),
|
|
1143
|
+
K.map((b, d) => /* @__PURE__ */ u.jsxs("g", { children: [
|
|
1144
|
+
/* @__PURE__ */ u.jsx(
|
|
1137
1145
|
"line",
|
|
1138
1146
|
{
|
|
1139
|
-
x1:
|
|
1140
|
-
y1:
|
|
1141
|
-
x2:
|
|
1142
|
-
y2:
|
|
1143
|
-
stroke:
|
|
1147
|
+
x1: b.position,
|
|
1148
|
+
y1: g - (b.isMajor ? R.majorTickHeight : R.minorTickHeight),
|
|
1149
|
+
x2: b.position,
|
|
1150
|
+
y2: g,
|
|
1151
|
+
stroke: b.isMajor ? R.majorTickColor : R.tickColor,
|
|
1144
1152
|
strokeWidth: "1"
|
|
1145
1153
|
}
|
|
1146
1154
|
),
|
|
1147
|
-
|
|
1155
|
+
I && b.isMajor && b.label && /* @__PURE__ */ u.jsx(
|
|
1148
1156
|
"text",
|
|
1149
1157
|
{
|
|
1150
|
-
x:
|
|
1151
|
-
y:
|
|
1158
|
+
x: b.position,
|
|
1159
|
+
y: g - R.majorTickHeight - 5,
|
|
1152
1160
|
textAnchor: "middle",
|
|
1153
1161
|
fill: R.labelColor,
|
|
1154
1162
|
fontSize: R.fontSize,
|
|
1155
1163
|
fontFamily: "monospace",
|
|
1156
|
-
children:
|
|
1164
|
+
children: b.label
|
|
1157
1165
|
}
|
|
1158
1166
|
)
|
|
1159
|
-
] },
|
|
1160
|
-
/* @__PURE__ */
|
|
1167
|
+
] }, d)),
|
|
1168
|
+
/* @__PURE__ */ u.jsx(
|
|
1161
1169
|
"line",
|
|
1162
1170
|
{
|
|
1163
|
-
x1:
|
|
1171
|
+
x1: Z,
|
|
1164
1172
|
y1: 0,
|
|
1165
|
-
x2:
|
|
1166
|
-
y2:
|
|
1173
|
+
x2: Z,
|
|
1174
|
+
y2: g,
|
|
1167
1175
|
stroke: R.indicatorColor,
|
|
1168
1176
|
strokeWidth: R.indicatorLineWidth,
|
|
1169
1177
|
pointerEvents: "none"
|
|
1170
1178
|
}
|
|
1171
1179
|
),
|
|
1172
|
-
|
|
1180
|
+
z && /* @__PURE__ */ u.jsx(
|
|
1173
1181
|
"rect",
|
|
1174
1182
|
{
|
|
1175
|
-
x: Math.max(0,
|
|
1183
|
+
x: Math.max(0, Z - 10),
|
|
1176
1184
|
y: 0,
|
|
1177
1185
|
width: 20,
|
|
1178
|
-
height:
|
|
1186
|
+
height: g,
|
|
1179
1187
|
fill: "transparent",
|
|
1180
1188
|
style: { cursor: "ew-resize" },
|
|
1181
1189
|
pointerEvents: "visiblePainted"
|
|
1182
1190
|
}
|
|
1183
1191
|
),
|
|
1184
|
-
/* @__PURE__ */
|
|
1192
|
+
/* @__PURE__ */ u.jsx("circle", { cx: Z, cy: 5, r: 4, fill: R.indicatorColor, pointerEvents: "none" })
|
|
1185
1193
|
]
|
|
1186
1194
|
}
|
|
1187
1195
|
);
|
|
1188
1196
|
};
|
|
1189
1197
|
export {
|
|
1190
|
-
|
|
1198
|
+
Et as TICK_AREA_HEIGHT,
|
|
1191
1199
|
xt as Timeline,
|
|
1192
1200
|
We as TimelineCanvas,
|
|
1193
1201
|
mt as TimelineControls,
|