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