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