@jaeungkim/gantt-chart 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,9 +1,10 @@
1
- import * as Ne from "react";
2
- import Ce, { useState as oe, useMemo as _e, useEffect as xe, useRef as V } from "react";
3
- function ne(n) {
4
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
1
+ import * as ye from "react";
2
+ import Ye, { useRef as Ne, useState as St, useMemo as Me, useEffect as Ie } from "react";
3
+ import { flushSync as Mt } from "react-dom";
4
+ function se(s) {
5
+ return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
5
6
  }
6
- var Se = { exports: {} }, ge = {};
7
+ var we = { exports: {} }, xe = {};
7
8
  /**
8
9
  * @license React
9
10
  * react-jsx-runtime.production.js
@@ -13,29 +14,29 @@ var Se = { exports: {} }, ge = {};
13
14
  * This source code is licensed under the MIT license found in the
14
15
  * LICENSE file in the root directory of this source tree.
15
16
  */
16
- var Ue;
17
- function lt() {
18
- if (Ue) return ge;
19
- Ue = 1;
20
- var n = Symbol.for("react.transitional.element"), o = Symbol.for("react.fragment");
21
- function a(i, s, e) {
22
- var l = null;
23
- if (e !== void 0 && (l = "" + e), s.key !== void 0 && (l = "" + s.key), "key" in s) {
17
+ var Je;
18
+ function It() {
19
+ if (Je) return xe;
20
+ Je = 1;
21
+ var s = Symbol.for("react.transitional.element"), c = Symbol.for("react.fragment");
22
+ function t(r, n, e) {
23
+ var a = null;
24
+ if (e !== void 0 && (a = "" + e), n.key !== void 0 && (a = "" + n.key), "key" in n) {
24
25
  e = {};
25
- for (var u in s)
26
- u !== "key" && (e[u] = s[u]);
27
- } else e = s;
28
- return s = e.ref, {
29
- $$typeof: n,
30
- type: i,
31
- key: l,
32
- ref: s !== void 0 ? s : null,
26
+ for (var i in n)
27
+ i !== "key" && (e[i] = n[i]);
28
+ } else e = n;
29
+ return n = e.ref, {
30
+ $$typeof: s,
31
+ type: r,
32
+ key: a,
33
+ ref: n !== void 0 ? n : null,
33
34
  props: e
34
35
  };
35
36
  }
36
- return ge.Fragment = o, ge.jsx = a, ge.jsxs = a, ge;
37
+ return xe.Fragment = c, xe.jsx = t, xe.jsxs = t, xe;
37
38
  }
38
- var ve = {};
39
+ var be = {};
39
40
  /**
40
41
  * @license React
41
42
  * react-jsx-runtime.development.js
@@ -45,429 +46,967 @@ var ve = {};
45
46
  * This source code is licensed under the MIT license found in the
46
47
  * LICENSE file in the root directory of this source tree.
47
48
  */
48
- var ze;
49
- function ft() {
50
- return ze || (ze = 1, process.env.NODE_ENV !== "production" && function() {
51
- function n(t) {
52
- if (t == null) return null;
53
- if (typeof t == "function")
54
- return t.$$typeof === x ? null : t.displayName || t.name || null;
55
- if (typeof t == "string") return t;
56
- switch (t) {
57
- case k:
49
+ var Ke;
50
+ function Et() {
51
+ return Ke || (Ke = 1, process.env.NODE_ENV !== "production" && function() {
52
+ function s(o) {
53
+ if (o == null) return null;
54
+ if (typeof o == "function")
55
+ return o.$$typeof === O ? null : o.displayName || o.name || null;
56
+ if (typeof o == "string") return o;
57
+ switch (o) {
58
+ case j:
58
59
  return "Fragment";
59
- case L:
60
- return "Portal";
61
60
  case W:
61
+ return "Portal";
62
+ case D:
62
63
  return "Profiler";
63
- case P:
64
+ case I:
64
65
  return "StrictMode";
65
- case B:
66
+ case Y:
66
67
  return "Suspense";
67
- case ee:
68
+ case V:
68
69
  return "SuspenseList";
69
70
  }
70
- if (typeof t == "object")
71
- switch (typeof t.tag == "number" && console.error(
71
+ if (typeof o == "object")
72
+ switch (typeof o.tag == "number" && console.error(
72
73
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
73
- ), t.$$typeof) {
74
- case d:
75
- return (t.displayName || "Context") + ".Provider";
76
- case $:
77
- return (t._context.displayName || "Context") + ".Consumer";
78
- case O:
79
- var b = t.render;
80
- return t = t.displayName, t || (t = b.displayName || b.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
81
- case I:
82
- return b = t.displayName || null, b !== null ? b : n(t.type) || "Memo";
83
- case D:
84
- b = t._payload, t = t._init;
74
+ ), o.$$typeof) {
75
+ case m:
76
+ return (o.displayName || "Context") + ".Provider";
77
+ case l:
78
+ return (o._context.displayName || "Context") + ".Consumer";
79
+ case C:
80
+ var _ = o.render;
81
+ return o = o.displayName, o || (o = _.displayName || _.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
82
+ case F:
83
+ return _ = o.displayName || null, _ !== null ? _ : s(o.type) || "Memo";
84
+ case k:
85
+ _ = o._payload, o = o._init;
85
86
  try {
86
- return n(t(b));
87
+ return s(o(_));
87
88
  } catch {
88
89
  }
89
90
  }
90
91
  return null;
91
92
  }
92
- function o(t) {
93
- return "" + t;
93
+ function c(o) {
94
+ return "" + o;
94
95
  }
95
- function a(t) {
96
+ function t(o) {
96
97
  try {
97
- o(t);
98
- var b = !1;
98
+ c(o);
99
+ var _ = !1;
99
100
  } catch {
100
- b = !0;
101
+ _ = !0;
101
102
  }
102
- if (b) {
103
- b = console;
104
- var w = b.error, q = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
105
- return w.call(
106
- b,
103
+ if (_) {
104
+ _ = console;
105
+ var z = _.error, B = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
106
+ return z.call(
107
+ _,
107
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
108
- q
109
- ), o(t);
109
+ B
110
+ ), c(o);
110
111
  }
111
112
  }
112
- function i() {
113
+ function r() {
113
114
  }
114
- function s() {
115
- if (Y === 0) {
116
- J = console.log, se = console.info, re = console.warn, de = console.error, ae = console.group, G = console.groupCollapsed, te = console.groupEnd;
117
- var t = {
115
+ function n() {
116
+ if (J === 0) {
117
+ ne = console.log, ue = console.info, oe = console.warn, he = console.error, ae = console.group, ee = console.groupCollapsed, ie = console.groupEnd;
118
+ var o = {
118
119
  configurable: !0,
119
120
  enumerable: !0,
120
- value: i,
121
+ value: r,
121
122
  writable: !0
122
123
  };
123
124
  Object.defineProperties(console, {
124
- info: t,
125
- log: t,
126
- warn: t,
127
- error: t,
128
- group: t,
129
- groupCollapsed: t,
130
- groupEnd: t
125
+ info: o,
126
+ log: o,
127
+ warn: o,
128
+ error: o,
129
+ group: o,
130
+ groupCollapsed: o,
131
+ groupEnd: o
131
132
  });
132
133
  }
133
- Y++;
134
+ J++;
134
135
  }
135
136
  function e() {
136
- if (Y--, Y === 0) {
137
- var t = { configurable: !0, enumerable: !0, writable: !0 };
137
+ if (J--, J === 0) {
138
+ var o = { configurable: !0, enumerable: !0, writable: !0 };
138
139
  Object.defineProperties(console, {
139
- log: C({}, t, { value: J }),
140
- info: C({}, t, { value: se }),
141
- warn: C({}, t, { value: re }),
142
- error: C({}, t, { value: de }),
143
- group: C({}, t, { value: ae }),
144
- groupCollapsed: C({}, t, { value: G }),
145
- groupEnd: C({}, t, { value: te })
140
+ log: U({}, o, { value: ne }),
141
+ info: U({}, o, { value: ue }),
142
+ warn: U({}, o, { value: oe }),
143
+ error: U({}, o, { value: he }),
144
+ group: U({}, o, { value: ae }),
145
+ groupCollapsed: U({}, o, { value: ee }),
146
+ groupEnd: U({}, o, { value: ie })
146
147
  });
147
148
  }
148
- 0 > Y && console.error(
149
+ 0 > J && console.error(
149
150
  "disabledDepth fell below zero. This is a bug in React. Please file an issue."
150
151
  );
151
152
  }
152
- function l(t) {
153
- if (ie === void 0)
153
+ function a(o) {
154
+ if (ce === void 0)
154
155
  try {
155
156
  throw Error();
156
- } catch (w) {
157
- var b = w.stack.trim().match(/\n( *(at )?)/);
158
- ie = b && b[1] || "", fe = -1 < w.stack.indexOf(`
159
- at`) ? " (<anonymous>)" : -1 < w.stack.indexOf("@") ? "@unknown:0:0" : "";
157
+ } catch (z) {
158
+ var _ = z.stack.trim().match(/\n( *(at )?)/);
159
+ ce = _ && _[1] || "", pe = -1 < z.stack.indexOf(`
160
+ at`) ? " (<anonymous>)" : -1 < z.stack.indexOf("@") ? "@unknown:0:0" : "";
160
161
  }
161
162
  return `
162
- ` + ie + t + fe;
163
+ ` + ce + o + pe;
163
164
  }
164
- function u(t, b) {
165
- if (!t || je) return "";
166
- var w = Ze.get(t);
167
- if (w !== void 0) return w;
168
- je = !0, w = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
169
- var q = null;
170
- q = R.H, R.H = null, s();
165
+ function i(o, _) {
166
+ if (!o || qe) return "";
167
+ var z = He.get(o);
168
+ if (z !== void 0) return z;
169
+ qe = !0, z = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
170
+ var B = null;
171
+ B = A.H, A.H = null, n();
171
172
  try {
172
- var X = {
173
+ var te = {
173
174
  DetermineComponentFrameRoot: function() {
174
175
  try {
175
- if (b) {
176
- var le = function() {
176
+ if (_) {
177
+ var me = function() {
177
178
  throw Error();
178
179
  };
179
- if (Object.defineProperty(le.prototype, "props", {
180
+ if (Object.defineProperty(me.prototype, "props", {
180
181
  set: function() {
181
182
  throw Error();
182
183
  }
183
184
  }), typeof Reflect == "object" && Reflect.construct) {
184
185
  try {
185
- Reflect.construct(le, []);
186
- } catch (ce) {
187
- var De = ce;
186
+ Reflect.construct(me, []);
187
+ } catch (de) {
188
+ var De = de;
188
189
  }
189
- Reflect.construct(t, [], le);
190
+ Reflect.construct(o, [], me);
190
191
  } else {
191
192
  try {
192
- le.call();
193
- } catch (ce) {
194
- De = ce;
193
+ me.call();
194
+ } catch (de) {
195
+ De = de;
195
196
  }
196
- t.call(le.prototype);
197
+ o.call(me.prototype);
197
198
  }
198
199
  } else {
199
200
  try {
200
201
  throw Error();
201
- } catch (ce) {
202
- De = ce;
202
+ } catch (de) {
203
+ De = de;
203
204
  }
204
- (le = t()) && typeof le.catch == "function" && le.catch(function() {
205
+ (me = o()) && typeof me.catch == "function" && me.catch(function() {
205
206
  });
206
207
  }
207
- } catch (ce) {
208
- if (ce && De && typeof ce.stack == "string")
209
- return [ce.stack, De.stack];
208
+ } catch (de) {
209
+ if (de && De && typeof de.stack == "string")
210
+ return [de.stack, De.stack];
210
211
  }
211
212
  return [null, null];
212
213
  }
213
214
  };
214
- X.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
215
- var U = Object.getOwnPropertyDescriptor(
216
- X.DetermineComponentFrameRoot,
215
+ te.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
216
+ var X = Object.getOwnPropertyDescriptor(
217
+ te.DetermineComponentFrameRoot,
217
218
  "name"
218
219
  );
219
- U && U.configurable && Object.defineProperty(
220
- X.DetermineComponentFrameRoot,
220
+ X && X.configurable && Object.defineProperty(
221
+ te.DetermineComponentFrameRoot,
221
222
  "name",
222
223
  { value: "DetermineComponentFrameRoot" }
223
224
  );
224
- var _ = X.DetermineComponentFrameRoot(), ue = _[0], he = _[1];
225
- if (ue && he) {
226
- var Q = ue.split(`
227
- `), pe = he.split(`
225
+ var H = te.DetermineComponentFrameRoot(), le = H[0], ve = H[1];
226
+ if (le && ve) {
227
+ var re = le.split(`
228
+ `), ge = ve.split(`
228
229
  `);
229
- for (_ = U = 0; U < Q.length && !Q[U].includes(
230
+ for (H = X = 0; X < re.length && !re[X].includes(
230
231
  "DetermineComponentFrameRoot"
231
232
  ); )
232
- U++;
233
- for (; _ < pe.length && !pe[_].includes(
233
+ X++;
234
+ for (; H < ge.length && !ge[H].includes(
234
235
  "DetermineComponentFrameRoot"
235
236
  ); )
236
- _++;
237
- if (U === Q.length || _ === pe.length)
238
- for (U = Q.length - 1, _ = pe.length - 1; 1 <= U && 0 <= _ && Q[U] !== pe[_]; )
239
- _--;
240
- for (; 1 <= U && 0 <= _; U--, _--)
241
- if (Q[U] !== pe[_]) {
242
- if (U !== 1 || _ !== 1)
237
+ H++;
238
+ if (X === re.length || H === ge.length)
239
+ for (X = re.length - 1, H = ge.length - 1; 1 <= X && 0 <= H && re[X] !== ge[H]; )
240
+ H--;
241
+ for (; 1 <= X && 0 <= H; X--, H--)
242
+ if (re[X] !== ge[H]) {
243
+ if (X !== 1 || H !== 1)
243
244
  do
244
- if (U--, _--, 0 > _ || Q[U] !== pe[_]) {
245
- var $e = `
246
- ` + Q[U].replace(
245
+ if (X--, H--, 0 > H || re[X] !== ge[H]) {
246
+ var Se = `
247
+ ` + re[X].replace(
247
248
  " at new ",
248
249
  " at "
249
250
  );
250
- return t.displayName && $e.includes("<anonymous>") && ($e = $e.replace("<anonymous>", t.displayName)), typeof t == "function" && Ze.set(t, $e), $e;
251
+ return o.displayName && Se.includes("<anonymous>") && (Se = Se.replace("<anonymous>", o.displayName)), typeof o == "function" && He.set(o, Se), Se;
251
252
  }
252
- while (1 <= U && 0 <= _);
253
+ while (1 <= X && 0 <= H);
253
254
  break;
254
255
  }
255
256
  }
256
257
  } finally {
257
- je = !1, R.H = q, e(), Error.prepareStackTrace = w;
258
+ qe = !1, A.H = B, e(), Error.prepareStackTrace = z;
258
259
  }
259
- return Q = (Q = t ? t.displayName || t.name : "") ? l(Q) : "", typeof t == "function" && Ze.set(t, Q), Q;
260
+ return re = (re = o ? o.displayName || o.name : "") ? a(re) : "", typeof o == "function" && He.set(o, re), re;
260
261
  }
261
- function p(t) {
262
- if (t == null) return "";
263
- if (typeof t == "function") {
264
- var b = t.prototype;
265
- return u(
266
- t,
267
- !(!b || !b.isReactComponent)
262
+ function d(o) {
263
+ if (o == null) return "";
264
+ if (typeof o == "function") {
265
+ var _ = o.prototype;
266
+ return i(
267
+ o,
268
+ !(!_ || !_.isReactComponent)
268
269
  );
269
270
  }
270
- if (typeof t == "string") return l(t);
271
- switch (t) {
272
- case B:
273
- return l("Suspense");
274
- case ee:
275
- return l("SuspenseList");
271
+ if (typeof o == "string") return a(o);
272
+ switch (o) {
273
+ case Y:
274
+ return a("Suspense");
275
+ case V:
276
+ return a("SuspenseList");
276
277
  }
277
- if (typeof t == "object")
278
- switch (t.$$typeof) {
279
- case O:
280
- return t = u(t.render, !1), t;
281
- case I:
282
- return p(t.type);
283
- case D:
284
- b = t._payload, t = t._init;
278
+ if (typeof o == "object")
279
+ switch (o.$$typeof) {
280
+ case C:
281
+ return o = i(o.render, !1), o;
282
+ case F:
283
+ return d(o.type);
284
+ case k:
285
+ _ = o._payload, o = o._init;
285
286
  try {
286
- return p(t(b));
287
+ return d(o(_));
287
288
  } catch {
288
289
  }
289
290
  }
290
291
  return "";
291
292
  }
292
- function m() {
293
- var t = R.A;
294
- return t === null ? null : t.getOwner();
293
+ function h() {
294
+ var o = A.A;
295
+ return o === null ? null : o.getOwner();
295
296
  }
296
- function g(t) {
297
- if (j.call(t, "key")) {
298
- var b = Object.getOwnPropertyDescriptor(t, "key").get;
299
- if (b && b.isReactWarning) return !1;
297
+ function v(o) {
298
+ if (N.call(o, "key")) {
299
+ var _ = Object.getOwnPropertyDescriptor(o, "key").get;
300
+ if (_ && _.isReactWarning) return !1;
300
301
  }
301
- return t.key !== void 0;
302
+ return o.key !== void 0;
302
303
  }
303
- function r(t, b) {
304
- function w() {
305
- Ae || (Ae = !0, console.error(
304
+ function p(o, _) {
305
+ function z() {
306
+ Ve || (Ve = !0, console.error(
306
307
  "%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)",
307
- b
308
+ _
308
309
  ));
309
310
  }
310
- w.isReactWarning = !0, Object.defineProperty(t, "key", {
311
- get: w,
311
+ z.isReactWarning = !0, Object.defineProperty(o, "key", {
312
+ get: z,
312
313
  configurable: !0
313
314
  });
314
315
  }
315
- function c() {
316
- var t = n(this.type);
317
- return qe[t] || (qe[t] = !0, console.error(
316
+ function f() {
317
+ var o = s(this.type);
318
+ return Ge[o] || (Ge[o] = !0, console.error(
318
319
  "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."
319
- )), t = this.props.ref, t !== void 0 ? t : null;
320
+ )), o = this.props.ref, o !== void 0 ? o : null;
320
321
  }
321
- function y(t, b, w, q, X, U) {
322
- return w = U.ref, t = {
323
- $$typeof: Z,
324
- type: t,
325
- key: b,
326
- props: U,
327
- _owner: X
328
- }, (w !== void 0 ? w : null) !== null ? Object.defineProperty(t, "ref", {
322
+ function g(o, _, z, B, te, X) {
323
+ return z = X.ref, o = {
324
+ $$typeof: L,
325
+ type: o,
326
+ key: _,
327
+ props: X,
328
+ _owner: te
329
+ }, (z !== void 0 ? z : null) !== null ? Object.defineProperty(o, "ref", {
329
330
  enumerable: !1,
330
- get: c
331
- }) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
331
+ get: f
332
+ }) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
332
333
  configurable: !1,
333
334
  enumerable: !1,
334
335
  writable: !0,
335
336
  value: 0
336
- }), Object.defineProperty(t, "_debugInfo", {
337
+ }), Object.defineProperty(o, "_debugInfo", {
337
338
  configurable: !1,
338
339
  enumerable: !1,
339
340
  writable: !0,
340
341
  value: null
341
- }), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
342
+ }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
342
343
  }
343
- function h(t, b, w, q, X, U) {
344
- if (typeof t == "string" || typeof t == "function" || t === k || t === W || t === P || t === B || t === ee || t === v || typeof t == "object" && t !== null && (t.$$typeof === D || t.$$typeof === I || t.$$typeof === d || t.$$typeof === $ || t.$$typeof === O || t.$$typeof === N || t.getModuleId !== void 0)) {
345
- var _ = b.children;
346
- if (_ !== void 0)
347
- if (q)
348
- if (z(_)) {
349
- for (q = 0; q < _.length; q++)
350
- f(_[q], t);
351
- Object.freeze && Object.freeze(_);
344
+ function $(o, _, z, B, te, X) {
345
+ if (typeof o == "string" || typeof o == "function" || o === j || o === D || o === I || o === Y || o === V || o === E || typeof o == "object" && o !== null && (o.$$typeof === k || o.$$typeof === F || o.$$typeof === m || o.$$typeof === l || o.$$typeof === C || o.$$typeof === G || o.getModuleId !== void 0)) {
346
+ var H = _.children;
347
+ if (H !== void 0)
348
+ if (B)
349
+ if (Z(H)) {
350
+ for (B = 0; B < H.length; B++)
351
+ u(H[B], o);
352
+ Object.freeze && Object.freeze(H);
352
353
  } else
353
354
  console.error(
354
355
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
355
356
  );
356
- else f(_, t);
357
+ else u(H, o);
357
358
  } else
358
- _ = "", (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), t === null ? q = "null" : z(t) ? q = "array" : t !== void 0 && t.$$typeof === Z ? (q = "<" + (n(t.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : q = typeof t, console.error(
359
+ H = "", (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (H += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), o === null ? B = "null" : Z(o) ? B = "array" : o !== void 0 && o.$$typeof === L ? (B = "<" + (s(o.type) || "Unknown") + " />", H = " Did you accidentally export a JSX literal instead of a component?") : B = typeof o, console.error(
359
360
  "React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
360
- q,
361
- _
361
+ B,
362
+ H
362
363
  );
363
- if (j.call(b, "key")) {
364
- _ = n(t);
365
- var ue = Object.keys(b).filter(function(Q) {
366
- return Q !== "key";
364
+ if (N.call(_, "key")) {
365
+ H = s(o);
366
+ var le = Object.keys(_).filter(function(re) {
367
+ return re !== "key";
367
368
  });
368
- q = 0 < ue.length ? "{key: someKey, " + ue.join(": ..., ") + ": ...}" : "{key: someKey}", We[_ + q] || (ue = 0 < ue.length ? "{" + ue.join(": ..., ") + ": ...}" : "{}", console.error(
369
+ B = 0 < le.length ? "{key: someKey, " + le.join(": ..., ") + ": ...}" : "{key: someKey}", Xe[H + B] || (le = 0 < le.length ? "{" + le.join(": ..., ") + ": ...}" : "{}", console.error(
369
370
  `A props object containing a "key" prop is being spread into JSX:
370
371
  let props = %s;
371
372
  <%s {...props} />
372
373
  React keys must be passed directly to JSX without using spread:
373
374
  let props = %s;
374
375
  <%s key={someKey} {...props} />`,
375
- q,
376
- _,
377
- ue,
378
- _
379
- ), We[_ + q] = !0);
376
+ B,
377
+ H,
378
+ le,
379
+ H
380
+ ), Xe[H + B] = !0);
380
381
  }
381
- if (_ = null, w !== void 0 && (a(w), _ = "" + w), g(b) && (a(b.key), _ = "" + b.key), "key" in b) {
382
- w = {};
383
- for (var he in b)
384
- he !== "key" && (w[he] = b[he]);
385
- } else w = b;
386
- return _ && r(
387
- w,
388
- typeof t == "function" ? t.displayName || t.name || "Unknown" : t
389
- ), y(t, _, U, X, m(), w);
382
+ if (H = null, z !== void 0 && (t(z), H = "" + z), v(_) && (t(_.key), H = "" + _.key), "key" in _) {
383
+ z = {};
384
+ for (var ve in _)
385
+ ve !== "key" && (z[ve] = _[ve]);
386
+ } else z = _;
387
+ return H && p(
388
+ z,
389
+ typeof o == "function" ? o.displayName || o.name || "Unknown" : o
390
+ ), g(o, H, X, te, h(), z);
390
391
  }
391
- function f(t, b) {
392
- if (typeof t == "object" && t && t.$$typeof !== dt) {
393
- if (z(t))
394
- for (var w = 0; w < t.length; w++) {
395
- var q = t[w];
396
- S(q) && E(q, b);
392
+ function u(o, _) {
393
+ if (typeof o == "object" && o && o.$$typeof !== wt) {
394
+ if (Z(o))
395
+ for (var z = 0; z < o.length; z++) {
396
+ var B = o[z];
397
+ w(B) && T(B, _);
397
398
  }
398
- else if (S(t))
399
- t._store && (t._store.validated = 1);
400
- else if (t === null || typeof t != "object" ? w = null : (w = T && t[T] || t["@@iterator"], w = typeof w == "function" ? w : null), typeof w == "function" && w !== t.entries && (w = w.call(t), w !== t))
401
- for (; !(t = w.next()).done; )
402
- S(t.value) && E(t.value, b);
399
+ else if (w(o))
400
+ o._store && (o._store.validated = 1);
401
+ else if (o === null || typeof o != "object" ? z = null : (z = P && o[P] || o["@@iterator"], z = typeof z == "function" ? z : null), typeof z == "function" && z !== o.entries && (z = z.call(o), z !== o))
402
+ for (; !(o = z.next()).done; )
403
+ w(o.value) && T(o.value, _);
403
404
  }
404
405
  }
405
- function S(t) {
406
- return typeof t == "object" && t !== null && t.$$typeof === Z;
406
+ function w(o) {
407
+ return typeof o == "object" && o !== null && o.$$typeof === L;
407
408
  }
408
- function E(t, b) {
409
- if (t._store && !t._store.validated && t.key == null && (t._store.validated = 1, b = F(b), !He[b])) {
410
- He[b] = !0;
411
- var w = "";
412
- t && t._owner != null && t._owner !== m() && (w = null, typeof t._owner.tag == "number" ? w = n(t._owner.type) : typeof t._owner.name == "string" && (w = t._owner.name), w = " It was passed a child from " + w + ".");
413
- var q = R.getCurrentStack;
414
- R.getCurrentStack = function() {
415
- var X = p(t.type);
416
- return q && (X += q() || ""), X;
409
+ function T(o, _) {
410
+ if (o._store && !o._store.validated && o.key == null && (o._store.validated = 1, _ = R(_), !Ze[_])) {
411
+ Ze[_] = !0;
412
+ var z = "";
413
+ o && o._owner != null && o._owner !== h() && (z = null, typeof o._owner.tag == "number" ? z = s(o._owner.type) : typeof o._owner.name == "string" && (z = o._owner.name), z = " It was passed a child from " + z + ".");
414
+ var B = A.getCurrentStack;
415
+ A.getCurrentStack = function() {
416
+ var te = d(o.type);
417
+ return B && (te += B() || ""), te;
417
418
  }, console.error(
418
419
  'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
419
- b,
420
- w
421
- ), R.getCurrentStack = q;
420
+ _,
421
+ z
422
+ ), A.getCurrentStack = B;
422
423
  }
423
424
  }
424
- function F(t) {
425
- var b = "", w = m();
426
- return w && (w = n(w.type)) && (b = `
425
+ function R(o) {
426
+ var _ = "", z = h();
427
+ return z && (z = s(z.type)) && (_ = `
427
428
 
428
- Check the render method of \`` + w + "`."), b || (t = n(t)) && (b = `
429
+ Check the render method of \`` + z + "`."), _ || (o = s(o)) && (_ = `
429
430
 
430
- Check the top-level render call using <` + t + ">."), b;
431
+ Check the top-level render call using <` + o + ">."), _;
432
+ }
433
+ var M = Ye, L = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), j = Symbol.for("react.fragment"), I = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), l = Symbol.for("react.consumer"), m = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), Y = Symbol.for("react.suspense"), V = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), E = Symbol.for("react.offscreen"), P = Symbol.iterator, O = Symbol.for("react.client.reference"), A = M.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, U = Object.assign, G = Symbol.for("react.client.reference"), Z = Array.isArray, J = 0, ne, ue, oe, he, ae, ee, ie;
434
+ r.__reactDisabledLog = !0;
435
+ var ce, pe, qe = !1, He = new (typeof WeakMap == "function" ? WeakMap : Map)(), wt = Symbol.for("react.client.reference"), Ve, Ge = {}, Xe = {}, Ze = {};
436
+ be.Fragment = j, be.jsx = function(o, _, z, B, te) {
437
+ return $(o, _, z, !1, B, te);
438
+ }, be.jsxs = function(o, _, z, B, te) {
439
+ return $(o, _, z, !0, B, te);
440
+ };
441
+ }()), be;
442
+ }
443
+ var Qe;
444
+ function kt() {
445
+ return Qe || (Qe = 1, process.env.NODE_ENV === "production" ? we.exports = It() : we.exports = Et()), we.exports;
446
+ }
447
+ var q = kt();
448
+ function $e(s, c, t) {
449
+ let r = t.initialDeps ?? [], n;
450
+ function e() {
451
+ var a, i, d, h;
452
+ let v;
453
+ t.key && ((a = t.debug) != null && a.call(t)) && (v = Date.now());
454
+ const p = s();
455
+ if (!(p.length !== r.length || p.some(($, u) => r[u] !== $)))
456
+ return n;
457
+ r = p;
458
+ let g;
459
+ if (t.key && ((i = t.debug) != null && i.call(t)) && (g = Date.now()), n = c(...p), t.key && ((d = t.debug) != null && d.call(t))) {
460
+ const $ = Math.round((Date.now() - v) * 100) / 100, u = Math.round((Date.now() - g) * 100) / 100, w = u / 16, T = (R, M) => {
461
+ for (R = String(R); R.length < M; )
462
+ R = " " + R;
463
+ return R;
464
+ };
465
+ console.info(
466
+ `%c⏱ ${T(u, 5)} /${T($, 5)} ms`,
467
+ `
468
+ font-size: .6rem;
469
+ font-weight: bold;
470
+ color: hsl(${Math.max(
471
+ 0,
472
+ Math.min(120 - 120 * w, 120)
473
+ )}deg 100% 31%);`,
474
+ t == null ? void 0 : t.key
475
+ );
431
476
  }
432
- var M = Ce, Z = Symbol.for("react.transitional.element"), L = Symbol.for("react.portal"), k = Symbol.for("react.fragment"), P = Symbol.for("react.strict_mode"), W = Symbol.for("react.profiler"), $ = Symbol.for("react.consumer"), d = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), ee = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), T = Symbol.iterator, x = Symbol.for("react.client.reference"), R = M.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, C = Object.assign, N = Symbol.for("react.client.reference"), z = Array.isArray, Y = 0, J, se, re, de, ae, G, te;
433
- i.__reactDisabledLog = !0;
434
- var ie, fe, je = !1, Ze = new (typeof WeakMap == "function" ? WeakMap : Map)(), dt = Symbol.for("react.client.reference"), Ae, qe = {}, We = {}, He = {};
435
- ve.Fragment = k, ve.jsx = function(t, b, w, q, X) {
436
- return h(t, b, w, !1, q, X);
437
- }, ve.jsxs = function(t, b, w, q, X) {
438
- return h(t, b, w, !0, q, X);
477
+ return (h = t == null ? void 0 : t.onChange) == null || h.call(t, n), n;
478
+ }
479
+ return e.updateDeps = (a) => {
480
+ r = a;
481
+ }, e;
482
+ }
483
+ function Ue(s, c) {
484
+ if (s === void 0)
485
+ throw new Error("Unexpected undefined");
486
+ return s;
487
+ }
488
+ const Ot = (s, c) => Math.abs(s - c) < 1, Tt = (s, c, t) => {
489
+ let r;
490
+ return function(...n) {
491
+ s.clearTimeout(r), r = s.setTimeout(() => c.apply(this, n), t);
492
+ };
493
+ }, Rt = (s) => s, Ct = (s) => {
494
+ const c = Math.max(s.startIndex - s.overscan, 0), t = Math.min(s.endIndex + s.overscan, s.count - 1), r = [];
495
+ for (let n = c; n <= t; n++)
496
+ r.push(n);
497
+ return r;
498
+ }, Ft = (s, c) => {
499
+ const t = s.scrollElement;
500
+ if (!t)
501
+ return;
502
+ const r = s.targetWindow;
503
+ if (!r)
504
+ return;
505
+ const n = (a) => {
506
+ const { width: i, height: d } = a;
507
+ c({ width: Math.round(i), height: Math.round(d) });
508
+ };
509
+ if (n(t.getBoundingClientRect()), !r.ResizeObserver)
510
+ return () => {
511
+ };
512
+ const e = new r.ResizeObserver((a) => {
513
+ const i = () => {
514
+ const d = a[0];
515
+ if (d != null && d.borderBoxSize) {
516
+ const h = d.borderBoxSize[0];
517
+ if (h) {
518
+ n({ width: h.inlineSize, height: h.blockSize });
519
+ return;
520
+ }
521
+ }
522
+ n(t.getBoundingClientRect());
523
+ };
524
+ s.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(i) : i();
525
+ });
526
+ return e.observe(t, { box: "border-box" }), () => {
527
+ e.unobserve(t);
528
+ };
529
+ }, et = {
530
+ passive: !0
531
+ }, tt = typeof window > "u" ? !0 : "onscrollend" in window, _t = (s, c) => {
532
+ const t = s.scrollElement;
533
+ if (!t)
534
+ return;
535
+ const r = s.targetWindow;
536
+ if (!r)
537
+ return;
538
+ let n = 0;
539
+ const e = s.options.useScrollendEvent && tt ? () => {
540
+ } : Tt(
541
+ r,
542
+ () => {
543
+ c(n, !1);
544
+ },
545
+ s.options.isScrollingResetDelay
546
+ ), a = (v) => () => {
547
+ const { horizontal: p, isRtl: f } = s.options;
548
+ n = p ? t.scrollLeft * (f && -1 || 1) : t.scrollTop, e(), c(n, v);
549
+ }, i = a(!0), d = a(!1);
550
+ d(), t.addEventListener("scroll", i, et);
551
+ const h = s.options.useScrollendEvent && tt;
552
+ return h && t.addEventListener("scrollend", d, et), () => {
553
+ t.removeEventListener("scroll", i), h && t.removeEventListener("scrollend", d);
554
+ };
555
+ }, zt = (s, c, t) => {
556
+ if (c != null && c.borderBoxSize) {
557
+ const r = c.borderBoxSize[0];
558
+ if (r)
559
+ return Math.round(
560
+ r[t.options.horizontal ? "inlineSize" : "blockSize"]
561
+ );
562
+ }
563
+ return Math.round(
564
+ s.getBoundingClientRect()[t.options.horizontal ? "width" : "height"]
565
+ );
566
+ }, jt = (s, {
567
+ adjustments: c = 0,
568
+ behavior: t
569
+ }, r) => {
570
+ var n, e;
571
+ const a = s + c;
572
+ (e = (n = r.scrollElement) == null ? void 0 : n.scrollTo) == null || e.call(n, {
573
+ [r.options.horizontal ? "left" : "top"]: a,
574
+ behavior: t
575
+ });
576
+ };
577
+ class Pt {
578
+ constructor(c) {
579
+ this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollToIndexTimeoutId = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
580
+ let t = null;
581
+ const r = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((n) => {
582
+ n.forEach((e) => {
583
+ const a = () => {
584
+ this._measureElement(e.target, e);
585
+ };
586
+ this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(a) : a();
587
+ });
588
+ }));
589
+ return {
590
+ disconnect: () => {
591
+ var n;
592
+ (n = r()) == null || n.disconnect(), t = null;
593
+ },
594
+ observe: (n) => {
595
+ var e;
596
+ return (e = r()) == null ? void 0 : e.observe(n, { box: "border-box" });
597
+ },
598
+ unobserve: (n) => {
599
+ var e;
600
+ return (e = r()) == null ? void 0 : e.unobserve(n);
601
+ }
602
+ };
603
+ })(), this.range = null, this.setOptions = (t) => {
604
+ Object.entries(t).forEach(([r, n]) => {
605
+ typeof n > "u" && delete t[r];
606
+ }), this.options = {
607
+ debug: !1,
608
+ initialOffset: 0,
609
+ overscan: 1,
610
+ paddingStart: 0,
611
+ paddingEnd: 0,
612
+ scrollPaddingStart: 0,
613
+ scrollPaddingEnd: 0,
614
+ horizontal: !1,
615
+ getItemKey: Rt,
616
+ rangeExtractor: Ct,
617
+ onChange: () => {
618
+ },
619
+ measureElement: zt,
620
+ initialRect: { width: 0, height: 0 },
621
+ scrollMargin: 0,
622
+ gap: 0,
623
+ indexAttribute: "data-index",
624
+ initialMeasurementsCache: [],
625
+ lanes: 1,
626
+ isScrollingResetDelay: 150,
627
+ enabled: !0,
628
+ isRtl: !1,
629
+ useScrollendEvent: !1,
630
+ useAnimationFrameWithResizeObserver: !1,
631
+ ...t
632
+ };
633
+ }, this.notify = (t) => {
634
+ var r, n;
635
+ (n = (r = this.options).onChange) == null || n.call(r, this, t);
636
+ }, this.maybeNotify = $e(
637
+ () => (this.calculateRange(), [
638
+ this.isScrolling,
639
+ this.range ? this.range.startIndex : null,
640
+ this.range ? this.range.endIndex : null
641
+ ]),
642
+ (t) => {
643
+ this.notify(t);
644
+ },
645
+ {
646
+ key: process.env.NODE_ENV !== "production" && "maybeNotify",
647
+ debug: () => this.options.debug,
648
+ initialDeps: [
649
+ this.isScrolling,
650
+ this.range ? this.range.startIndex : null,
651
+ this.range ? this.range.endIndex : null
652
+ ]
653
+ }
654
+ ), this.cleanup = () => {
655
+ this.unsubs.filter(Boolean).forEach((t) => t()), this.unsubs = [], this.observer.disconnect(), this.scrollElement = null, this.targetWindow = null;
656
+ }, this._didMount = () => () => {
657
+ this.cleanup();
658
+ }, this._willUpdate = () => {
659
+ var t;
660
+ const r = this.options.enabled ? this.options.getScrollElement() : null;
661
+ if (this.scrollElement !== r) {
662
+ if (this.cleanup(), !r) {
663
+ this.maybeNotify();
664
+ return;
665
+ }
666
+ this.scrollElement = r, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((t = this.scrollElement) == null ? void 0 : t.window) ?? null, this.elementsCache.forEach((n) => {
667
+ this.observer.observe(n);
668
+ }), this._scrollToOffset(this.getScrollOffset(), {
669
+ adjustments: void 0,
670
+ behavior: void 0
671
+ }), this.unsubs.push(
672
+ this.options.observeElementRect(this, (n) => {
673
+ this.scrollRect = n, this.maybeNotify();
674
+ })
675
+ ), this.unsubs.push(
676
+ this.options.observeElementOffset(this, (n, e) => {
677
+ this.scrollAdjustments = 0, this.scrollDirection = e ? this.getScrollOffset() < n ? "forward" : "backward" : null, this.scrollOffset = n, this.isScrolling = e, this.maybeNotify();
678
+ })
679
+ );
680
+ }
681
+ }, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (t, r) => {
682
+ const n = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map();
683
+ for (let a = r - 1; a >= 0; a--) {
684
+ const i = t[a];
685
+ if (n.has(i.lane))
686
+ continue;
687
+ const d = e.get(
688
+ i.lane
689
+ );
690
+ if (d == null || i.end > d.end ? e.set(i.lane, i) : i.end < d.end && n.set(i.lane, !0), n.size === this.options.lanes)
691
+ break;
692
+ }
693
+ return e.size === this.options.lanes ? Array.from(e.values()).sort((a, i) => a.end === i.end ? a.index - i.index : a.end - i.end)[0] : void 0;
694
+ }, this.getMeasurementOptions = $e(
695
+ () => [
696
+ this.options.count,
697
+ this.options.paddingStart,
698
+ this.options.scrollMargin,
699
+ this.options.getItemKey,
700
+ this.options.enabled
701
+ ],
702
+ (t, r, n, e, a) => (this.pendingMeasuredCacheIndexes = [], {
703
+ count: t,
704
+ paddingStart: r,
705
+ scrollMargin: n,
706
+ getItemKey: e,
707
+ enabled: a
708
+ }),
709
+ {
710
+ key: !1
711
+ }
712
+ ), this.getMeasurements = $e(
713
+ () => [this.getMeasurementOptions(), this.itemSizeCache],
714
+ ({ count: t, paddingStart: r, scrollMargin: n, getItemKey: e, enabled: a }, i) => {
715
+ if (!a)
716
+ return this.measurementsCache = [], this.itemSizeCache.clear(), [];
717
+ this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((v) => {
718
+ this.itemSizeCache.set(v.key, v.size);
719
+ }));
720
+ const d = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
721
+ this.pendingMeasuredCacheIndexes = [];
722
+ const h = this.measurementsCache.slice(0, d);
723
+ for (let v = d; v < t; v++) {
724
+ const p = e(v), f = this.options.lanes === 1 ? h[v - 1] : this.getFurthestMeasurement(h, v), g = f ? f.end + this.options.gap : r + n, $ = i.get(p), u = typeof $ == "number" ? $ : this.options.estimateSize(v), w = g + u, T = f ? f.lane : v % this.options.lanes;
725
+ h[v] = {
726
+ index: v,
727
+ start: g,
728
+ size: u,
729
+ end: w,
730
+ key: p,
731
+ lane: T
732
+ };
733
+ }
734
+ return this.measurementsCache = h, h;
735
+ },
736
+ {
737
+ key: process.env.NODE_ENV !== "production" && "getMeasurements",
738
+ debug: () => this.options.debug
739
+ }
740
+ ), this.calculateRange = $e(
741
+ () => [
742
+ this.getMeasurements(),
743
+ this.getSize(),
744
+ this.getScrollOffset(),
745
+ this.options.lanes
746
+ ],
747
+ (t, r, n, e) => this.range = t.length > 0 && r > 0 ? At({
748
+ measurements: t,
749
+ outerSize: r,
750
+ scrollOffset: n,
751
+ lanes: e
752
+ }) : null,
753
+ {
754
+ key: process.env.NODE_ENV !== "production" && "calculateRange",
755
+ debug: () => this.options.debug
756
+ }
757
+ ), this.getVirtualIndexes = $e(
758
+ () => {
759
+ let t = null, r = null;
760
+ const n = this.calculateRange();
761
+ return n && (t = n.startIndex, r = n.endIndex), this.maybeNotify.updateDeps([this.isScrolling, t, r]), [
762
+ this.options.rangeExtractor,
763
+ this.options.overscan,
764
+ this.options.count,
765
+ t,
766
+ r
767
+ ];
768
+ },
769
+ (t, r, n, e, a) => e === null || a === null ? [] : t({
770
+ startIndex: e,
771
+ endIndex: a,
772
+ overscan: r,
773
+ count: n
774
+ }),
775
+ {
776
+ key: process.env.NODE_ENV !== "production" && "getVirtualIndexes",
777
+ debug: () => this.options.debug
778
+ }
779
+ ), this.indexFromElement = (t) => {
780
+ const r = this.options.indexAttribute, n = t.getAttribute(r);
781
+ return n ? parseInt(n, 10) : (console.warn(
782
+ `Missing attribute name '${r}={index}' on measured element.`
783
+ ), -1);
784
+ }, this._measureElement = (t, r) => {
785
+ const n = this.indexFromElement(t), e = this.measurementsCache[n];
786
+ if (!e)
787
+ return;
788
+ const a = e.key, i = this.elementsCache.get(a);
789
+ i !== t && (i && this.observer.unobserve(i), this.observer.observe(t), this.elementsCache.set(a, t)), t.isConnected && this.resizeItem(n, this.options.measureElement(t, r, this));
790
+ }, this.resizeItem = (t, r) => {
791
+ const n = this.measurementsCache[t];
792
+ if (!n)
793
+ return;
794
+ const e = this.itemSizeCache.get(n.key) ?? n.size, a = r - e;
795
+ a !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(n, a, this) : n.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", a), this._scrollToOffset(this.getScrollOffset(), {
796
+ adjustments: this.scrollAdjustments += a,
797
+ behavior: void 0
798
+ })), this.pendingMeasuredCacheIndexes.push(n.index), this.itemSizeCache = new Map(this.itemSizeCache.set(n.key, r)), this.notify(!1));
799
+ }, this.measureElement = (t) => {
800
+ if (!t) {
801
+ this.elementsCache.forEach((r, n) => {
802
+ r.isConnected || (this.observer.unobserve(r), this.elementsCache.delete(n));
803
+ });
804
+ return;
805
+ }
806
+ this._measureElement(t, void 0);
807
+ }, this.getVirtualItems = $e(
808
+ () => [this.getVirtualIndexes(), this.getMeasurements()],
809
+ (t, r) => {
810
+ const n = [];
811
+ for (let e = 0, a = t.length; e < a; e++) {
812
+ const i = t[e], d = r[i];
813
+ n.push(d);
814
+ }
815
+ return n;
816
+ },
817
+ {
818
+ key: process.env.NODE_ENV !== "production" && "getVirtualItems",
819
+ debug: () => this.options.debug
820
+ }
821
+ ), this.getVirtualItemForOffset = (t) => {
822
+ const r = this.getMeasurements();
823
+ if (r.length !== 0)
824
+ return Ue(
825
+ r[xt(
826
+ 0,
827
+ r.length - 1,
828
+ (n) => Ue(r[n]).start,
829
+ t
830
+ )]
831
+ );
832
+ }, this.getOffsetForAlignment = (t, r, n = 0) => {
833
+ const e = this.getSize(), a = this.getScrollOffset();
834
+ r === "auto" && (r = t >= a + e ? "end" : "start"), r === "center" ? t += (n - e) / 2 : r === "end" && (t -= e);
835
+ const i = this.options.horizontal ? "scrollWidth" : "scrollHeight", h = (this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[i] : this.scrollElement[i] : 0) - e;
836
+ return Math.max(Math.min(h, t), 0);
837
+ }, this.getOffsetForIndex = (t, r = "auto") => {
838
+ t = Math.max(0, Math.min(t, this.options.count - 1));
839
+ const n = this.measurementsCache[t];
840
+ if (!n)
841
+ return;
842
+ const e = this.getSize(), a = this.getScrollOffset();
843
+ if (r === "auto")
844
+ if (n.end >= a + e - this.options.scrollPaddingEnd)
845
+ r = "end";
846
+ else if (n.start <= a + this.options.scrollPaddingStart)
847
+ r = "start";
848
+ else
849
+ return [a, r];
850
+ const i = r === "end" ? n.end + this.options.scrollPaddingEnd : n.start - this.options.scrollPaddingStart;
851
+ return [
852
+ this.getOffsetForAlignment(i, r, n.size),
853
+ r
854
+ ];
855
+ }, this.isDynamicMode = () => this.elementsCache.size > 0, this.cancelScrollToIndex = () => {
856
+ this.scrollToIndexTimeoutId !== null && this.targetWindow && (this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId), this.scrollToIndexTimeoutId = null);
857
+ }, this.scrollToOffset = (t, { align: r = "start", behavior: n } = {}) => {
858
+ this.cancelScrollToIndex(), n === "smooth" && this.isDynamicMode() && console.warn(
859
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
860
+ ), this._scrollToOffset(this.getOffsetForAlignment(t, r), {
861
+ adjustments: void 0,
862
+ behavior: n
863
+ });
864
+ }, this.scrollToIndex = (t, { align: r = "auto", behavior: n } = {}) => {
865
+ t = Math.max(0, Math.min(t, this.options.count - 1)), this.cancelScrollToIndex(), n === "smooth" && this.isDynamicMode() && console.warn(
866
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
867
+ );
868
+ const e = this.getOffsetForIndex(t, r);
869
+ if (!e) return;
870
+ const [a, i] = e;
871
+ this._scrollToOffset(a, { adjustments: void 0, behavior: n }), n !== "smooth" && this.isDynamicMode() && this.targetWindow && (this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
872
+ if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
873
+ this.options.getItemKey(t)
874
+ )) {
875
+ const [h] = Ue(
876
+ this.getOffsetForIndex(t, i)
877
+ );
878
+ Ot(h, this.getScrollOffset()) || this.scrollToIndex(t, { align: i, behavior: n });
879
+ } else
880
+ this.scrollToIndex(t, { align: i, behavior: n });
881
+ }));
882
+ }, this.scrollBy = (t, { behavior: r } = {}) => {
883
+ this.cancelScrollToIndex(), r === "smooth" && this.isDynamicMode() && console.warn(
884
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
885
+ ), this._scrollToOffset(this.getScrollOffset() + t, {
886
+ adjustments: void 0,
887
+ behavior: r
888
+ });
889
+ }, this.getTotalSize = () => {
890
+ var t;
891
+ const r = this.getMeasurements();
892
+ let n;
893
+ if (r.length === 0)
894
+ n = this.options.paddingStart;
895
+ else if (this.options.lanes === 1)
896
+ n = ((t = r[r.length - 1]) == null ? void 0 : t.end) ?? 0;
897
+ else {
898
+ const e = Array(this.options.lanes).fill(null);
899
+ let a = r.length - 1;
900
+ for (; a >= 0 && e.some((i) => i === null); ) {
901
+ const i = r[a];
902
+ e[i.lane] === null && (e[i.lane] = i.end), a--;
903
+ }
904
+ n = Math.max(...e.filter((i) => i !== null));
905
+ }
906
+ return Math.max(
907
+ n - this.options.scrollMargin + this.options.paddingEnd,
908
+ 0
909
+ );
910
+ }, this._scrollToOffset = (t, {
911
+ adjustments: r,
912
+ behavior: n
913
+ }) => {
914
+ this.options.scrollToFn(t, { behavior: n, adjustments: r }, this);
915
+ }, this.measure = () => {
916
+ this.itemSizeCache = /* @__PURE__ */ new Map(), this.notify(!1);
917
+ }, this.setOptions(c);
918
+ }
919
+ }
920
+ const xt = (s, c, t, r) => {
921
+ for (; s <= c; ) {
922
+ const n = (s + c) / 2 | 0, e = t(n);
923
+ if (e < r)
924
+ s = n + 1;
925
+ else if (e > r)
926
+ c = n - 1;
927
+ else
928
+ return n;
929
+ }
930
+ return s > 0 ? s - 1 : 0;
931
+ };
932
+ function At({
933
+ measurements: s,
934
+ outerSize: c,
935
+ scrollOffset: t,
936
+ lanes: r
937
+ }) {
938
+ const n = s.length - 1, e = (d) => s[d].start;
939
+ if (s.length <= r)
940
+ return {
941
+ startIndex: 0,
942
+ endIndex: n
439
943
  };
440
- }()), ve;
944
+ let a = xt(
945
+ 0,
946
+ n,
947
+ e,
948
+ t
949
+ ), i = a;
950
+ if (r === 1)
951
+ for (; i < n && s[i].end < t + c; )
952
+ i++;
953
+ else if (r > 1) {
954
+ const d = Array(r).fill(0);
955
+ for (; i < n && d.some((v) => v < t + c); ) {
956
+ const v = s[i];
957
+ d[v.lane] = v.end, i++;
958
+ }
959
+ const h = Array(r).fill(t + c);
960
+ for (; a >= 0 && h.some((v) => v >= t); ) {
961
+ const v = s[a];
962
+ h[v.lane] = v.start, a--;
963
+ }
964
+ a = Math.max(0, a - a % r), i = Math.min(n, i + (r - 1 - i % r));
965
+ }
966
+ return { startIndex: a, endIndex: i };
441
967
  }
442
- var Ye;
443
- function pt() {
444
- return Ye || (Ye = 1, process.env.NODE_ENV === "production" ? Se.exports = lt() : Se.exports = ft()), Se.exports;
968
+ const nt = typeof document < "u" ? ye.useLayoutEffect : ye.useEffect;
969
+ function Lt(s) {
970
+ const c = ye.useReducer(() => ({}), {})[1], t = {
971
+ ...s,
972
+ onChange: (n, e) => {
973
+ var a;
974
+ e ? Mt(c) : c(), (a = s.onChange) == null || a.call(s, n, e);
975
+ }
976
+ }, [r] = ye.useState(
977
+ () => new Pt(t)
978
+ );
979
+ return r.setOptions(t), nt(() => r._didMount(), []), nt(() => r._willUpdate()), r;
980
+ }
981
+ function rt(s) {
982
+ return Lt({
983
+ observeElementRect: Ft,
984
+ observeElementOffset: _t,
985
+ scrollToFn: jt,
986
+ ...s
987
+ });
445
988
  }
446
- var A = pt();
447
- const ut = 2.375 * 16, Be = 3, K = {
989
+ const We = 38, st = 3, fe = {
448
990
  day: {
449
991
  labelUnit: "day",
992
+ // laebel unit for the top header
450
993
  tickUnit: "hour",
451
994
  unitPerTick: 1,
452
- dragStepUnit: "minute",
453
- dragStepAmount: 15,
454
- basePxPerDragStep: 16,
455
- formatTickLabel: (n) => n.format("h A"),
456
- // → 9:12 AM, 12:00 PM, 3:45 PM // 09:00, 10:00...
457
- formatHeaderLabel: (n) => n.format("MMM D")
458
- // Jun 1
995
+ dragStepUnit: "hour",
996
+ dragStepAmount: 1,
997
+ basePxPerDragStep: 32,
998
+ formatTickLabel: (s) => s.format("hh"),
999
+ formatHeaderLabel: (s) => s.format("MMM D")
459
1000
  },
460
1001
  week: {
461
- labelUnit: "week",
1002
+ labelUnit: "month",
462
1003
  tickUnit: "day",
463
1004
  unitPerTick: 1,
464
1005
  dragStepUnit: "hour",
465
1006
  dragStepAmount: 6,
466
- basePxPerDragStep: 32,
467
- formatTickLabel: (n) => n.format("D"),
468
- // 1, 2, 3...
469
- formatHeaderLabel: (n) => n.format("MMM")
470
- // Jun
1007
+ basePxPerDragStep: 54,
1008
+ formatTickLabel: (s) => s.format("D"),
1009
+ formatHeaderLabel: (s) => s.format("MMM")
471
1010
  },
472
1011
  month: {
473
1012
  labelUnit: "month",
@@ -475,1374 +1014,2173 @@ const ut = 2.375 * 16, Be = 3, K = {
475
1014
  unitPerTick: 1,
476
1015
  dragStepUnit: "day",
477
1016
  dragStepAmount: 1,
478
- basePxPerDragStep: 64,
479
- formatTickLabel: (n) => n.format("D"),
480
- // 1, 2, 3...
481
- formatHeaderLabel: (n) => n.format("MMM YYYY")
482
- // Jun 2024
1017
+ basePxPerDragStep: 32,
1018
+ formatTickLabel: (s) => s.format("D"),
1019
+ formatHeaderLabel: (s) => s.format("MMM YYYY")
483
1020
  },
484
1021
  year: {
485
- labelUnit: "year",
486
- tickUnit: "day",
487
- unitPerTick: 7,
1022
+ labelUnit: "month",
1023
+ tickUnit: "month",
1024
+ unitPerTick: 1,
488
1025
  dragStepUnit: "day",
489
- dragStepAmount: 1,
490
- basePxPerDragStep: 16,
491
- formatTickLabel: (n) => n.format("D"),
492
- // Jan, Feb...
493
- formatHeaderLabel: (n) => n.format("YYYY")
494
- // 2024
1026
+ dragStepAmount: 7,
1027
+ basePxPerDragStep: 28,
1028
+ formatTickLabel: (s) => s.format("D"),
1029
+ formatHeaderLabel: (s) => s.format("MMM YYYY")
495
1030
  }
496
- };
497
- var be = { exports: {} }, ht = be.exports, Ge;
498
- function mt() {
499
- return Ge || (Ge = 1, function(n, o) {
500
- (function(a, i) {
501
- n.exports = i();
502
- })(ht, function() {
503
- var a = 1e3, i = 6e4, s = 36e5, e = "millisecond", l = "second", u = "minute", p = "hour", m = "day", g = "week", r = "month", c = "quarter", y = "year", h = "date", f = "Invalid Date", S = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, E = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, F = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(I) {
504
- var D = ["th", "st", "nd", "rd"], v = I % 100;
505
- return "[" + I + (D[(v - 20) % 10] || D[v] || D[0]) + "]";
506
- } }, M = function(I, D, v) {
507
- var T = String(I);
508
- return !T || T.length >= D ? I : "" + Array(D + 1 - T.length).join(v) + I;
509
- }, Z = { s: M, z: function(I) {
510
- var D = -I.utcOffset(), v = Math.abs(D), T = Math.floor(v / 60), x = v % 60;
511
- return (D <= 0 ? "+" : "-") + M(T, 2, "0") + ":" + M(x, 2, "0");
512
- }, m: function I(D, v) {
513
- if (D.date() < v.date()) return -I(v, D);
514
- var T = 12 * (v.year() - D.year()) + (v.month() - D.month()), x = D.clone().add(T, r), R = v - x < 0, j = D.clone().add(T + (R ? -1 : 1), r);
515
- return +(-(T + (v - x) / (R ? x - j : j - x)) || 0);
516
- }, a: function(I) {
517
- return I < 0 ? Math.ceil(I) || 0 : Math.floor(I);
518
- }, p: function(I) {
519
- return { M: r, y, w: g, d: m, D: h, h: p, m: u, s: l, ms: e, Q: c }[I] || String(I || "").toLowerCase().replace(/s$/, "");
520
- }, u: function(I) {
521
- return I === void 0;
522
- } }, L = "en", k = {};
523
- k[L] = F;
524
- var P = "$isDayjsObject", W = function(I) {
525
- return I instanceof B || !(!I || !I[P]);
526
- }, $ = function I(D, v, T) {
527
- var x;
528
- if (!D) return L;
529
- if (typeof D == "string") {
530
- var R = D.toLowerCase();
531
- k[R] && (x = R), v && (k[R] = v, x = R);
532
- var j = D.split("-");
533
- if (!x && j.length > 1) return I(j[0]);
1031
+ }, it = (s) => {
1032
+ let c;
1033
+ const t = /* @__PURE__ */ new Set(), r = (h, v) => {
1034
+ const p = typeof h == "function" ? h(c) : h;
1035
+ if (!Object.is(p, c)) {
1036
+ const f = c;
1037
+ c = v ?? (typeof p != "object" || p === null) ? p : Object.assign({}, c, p), t.forEach((g) => g(c, f));
1038
+ }
1039
+ }, n = () => c, i = { setState: r, getState: n, getInitialState: () => d, subscribe: (h) => (t.add(h), () => t.delete(h)) }, d = c = s(r, n, i);
1040
+ return i;
1041
+ }, Nt = (s) => s ? it(s) : it, Wt = (s) => s;
1042
+ function qt(s, c = Wt) {
1043
+ const t = Ye.useSyncExternalStore(
1044
+ s.subscribe,
1045
+ () => c(s.getState()),
1046
+ () => c(s.getInitialState())
1047
+ );
1048
+ return Ye.useDebugValue(t), t;
1049
+ }
1050
+ const Ht = (s) => {
1051
+ const c = Nt(s), t = (r) => qt(c, r);
1052
+ return Object.assign(t, c), t;
1053
+ }, Ut = (s) => Ht;
1054
+ function bt(s, c) {
1055
+ let t;
1056
+ try {
1057
+ t = s();
1058
+ } catch {
1059
+ return;
1060
+ }
1061
+ return {
1062
+ getItem: (n) => {
1063
+ var e;
1064
+ const a = (d) => d === null ? null : JSON.parse(d, void 0), i = (e = t.getItem(n)) != null ? e : null;
1065
+ return i instanceof Promise ? i.then(a) : a(i);
1066
+ },
1067
+ setItem: (n, e) => t.setItem(
1068
+ n,
1069
+ JSON.stringify(e, void 0)
1070
+ ),
1071
+ removeItem: (n) => t.removeItem(n)
1072
+ };
1073
+ }
1074
+ const Be = (s) => (c) => {
1075
+ try {
1076
+ const t = s(c);
1077
+ return t instanceof Promise ? t : {
1078
+ then(r) {
1079
+ return Be(r)(t);
1080
+ },
1081
+ catch(r) {
1082
+ return this;
1083
+ }
1084
+ };
1085
+ } catch (t) {
1086
+ return {
1087
+ then(r) {
1088
+ return this;
1089
+ },
1090
+ catch(r) {
1091
+ return Be(r)(t);
1092
+ }
1093
+ };
1094
+ }
1095
+ }, Yt = (s, c) => (t, r, n) => {
1096
+ let e = {
1097
+ storage: bt(() => localStorage),
1098
+ partialize: (u) => u,
1099
+ version: 0,
1100
+ merge: (u, w) => ({
1101
+ ...w,
1102
+ ...u
1103
+ }),
1104
+ ...c
1105
+ }, a = !1;
1106
+ const i = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
1107
+ let h = e.storage;
1108
+ if (!h)
1109
+ return s(
1110
+ (...u) => {
1111
+ console.warn(
1112
+ `[zustand persist middleware] Unable to update item '${e.name}', the given storage is currently unavailable.`
1113
+ ), t(...u);
1114
+ },
1115
+ r,
1116
+ n
1117
+ );
1118
+ const v = () => {
1119
+ const u = e.partialize({ ...r() });
1120
+ return h.setItem(e.name, {
1121
+ state: u,
1122
+ version: e.version
1123
+ });
1124
+ }, p = n.setState;
1125
+ n.setState = (u, w) => {
1126
+ p(u, w), v();
1127
+ };
1128
+ const f = s(
1129
+ (...u) => {
1130
+ t(...u), v();
1131
+ },
1132
+ r,
1133
+ n
1134
+ );
1135
+ n.getInitialState = () => f;
1136
+ let g;
1137
+ const $ = () => {
1138
+ var u, w;
1139
+ if (!h) return;
1140
+ a = !1, i.forEach((R) => {
1141
+ var M;
1142
+ return R((M = r()) != null ? M : f);
1143
+ });
1144
+ const T = ((w = e.onRehydrateStorage) == null ? void 0 : w.call(e, (u = r()) != null ? u : f)) || void 0;
1145
+ return Be(h.getItem.bind(h))(e.name).then((R) => {
1146
+ if (R)
1147
+ if (typeof R.version == "number" && R.version !== e.version) {
1148
+ if (e.migrate) {
1149
+ const M = e.migrate(
1150
+ R.state,
1151
+ R.version
1152
+ );
1153
+ return M instanceof Promise ? M.then((L) => [!0, L]) : [!0, M];
1154
+ }
1155
+ console.error(
1156
+ "State loaded from storage couldn't be migrated since no migrate function was provided"
1157
+ );
1158
+ } else
1159
+ return [!1, R.state];
1160
+ return [!1, void 0];
1161
+ }).then((R) => {
1162
+ var M;
1163
+ const [L, W] = R;
1164
+ if (g = e.merge(
1165
+ W,
1166
+ (M = r()) != null ? M : f
1167
+ ), t(g, !0), L)
1168
+ return v();
1169
+ }).then(() => {
1170
+ T == null || T(g, void 0), g = r(), a = !0, d.forEach((R) => R(g));
1171
+ }).catch((R) => {
1172
+ T == null || T(void 0, R);
1173
+ });
1174
+ };
1175
+ return n.persist = {
1176
+ setOptions: (u) => {
1177
+ e = {
1178
+ ...e,
1179
+ ...u
1180
+ }, u.storage && (h = u.storage);
1181
+ },
1182
+ clearStorage: () => {
1183
+ h == null || h.removeItem(e.name);
1184
+ },
1185
+ getOptions: () => e,
1186
+ rehydrate: () => $(),
1187
+ hasHydrated: () => a,
1188
+ onHydrate: (u) => (i.add(u), () => {
1189
+ i.delete(u);
1190
+ }),
1191
+ onFinishHydration: (u) => (d.add(u), () => {
1192
+ d.delete(u);
1193
+ })
1194
+ }, e.skipHydration || $(), g || f;
1195
+ }, Bt = Yt, Q = Ut()(
1196
+ Bt(
1197
+ (s) => ({
1198
+ rawTasks: [],
1199
+ transformedTasks: [],
1200
+ bottomRowCells: [],
1201
+ topHeaderGroups: [],
1202
+ selectedScale: "month",
1203
+ currentTask: null,
1204
+ dragOffsets: {},
1205
+ setCurrentTask: (c) => s({
1206
+ currentTask: c
1207
+ }),
1208
+ setSelectedScale: (c) => s({
1209
+ selectedScale: c
1210
+ }),
1211
+ setRawTasks: (c) => s({
1212
+ rawTasks: c
1213
+ }),
1214
+ setBottomRowCells: (c) => s({
1215
+ bottomRowCells: c
1216
+ }),
1217
+ setTopHeaderGroups: (c) => s({ topHeaderGroups: c }),
1218
+ setTransformedTasks: (c) => s({
1219
+ transformedTasks: c
1220
+ }),
1221
+ setDragOffset: (c, t) => s((r) => ({ dragOffsets: { ...r.dragOffsets, [c]: t } })),
1222
+ clearDragOffset: (c) => s((t) => {
1223
+ const { [c]: r, ...n } = t.dragOffsets;
1224
+ return { dragOffsets: n };
1225
+ })
1226
+ }),
1227
+ {
1228
+ name: "gantt-storage",
1229
+ storage: bt(() => sessionStorage),
1230
+ partialize: (s) => ({ selectedScale: s.selectedScale })
1231
+ }
1232
+ )
1233
+ );
1234
+ var Ee = { exports: {} }, Vt = Ee.exports, ot;
1235
+ function Gt() {
1236
+ return ot || (ot = 1, function(s, c) {
1237
+ (function(t, r) {
1238
+ s.exports = r();
1239
+ })(Vt, function() {
1240
+ var t = 1e3, r = 6e4, n = 36e5, e = "millisecond", a = "second", i = "minute", d = "hour", h = "day", v = "week", p = "month", f = "quarter", g = "year", $ = "date", u = "Invalid Date", w = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, T = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, R = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(F) {
1241
+ var k = ["th", "st", "nd", "rd"], E = F % 100;
1242
+ return "[" + F + (k[(E - 20) % 10] || k[E] || k[0]) + "]";
1243
+ } }, M = function(F, k, E) {
1244
+ var P = String(F);
1245
+ return !P || P.length >= k ? F : "" + Array(k + 1 - P.length).join(E) + F;
1246
+ }, L = { s: M, z: function(F) {
1247
+ var k = -F.utcOffset(), E = Math.abs(k), P = Math.floor(E / 60), O = E % 60;
1248
+ return (k <= 0 ? "+" : "-") + M(P, 2, "0") + ":" + M(O, 2, "0");
1249
+ }, m: function F(k, E) {
1250
+ if (k.date() < E.date()) return -F(E, k);
1251
+ var P = 12 * (E.year() - k.year()) + (E.month() - k.month()), O = k.clone().add(P, p), A = E - O < 0, N = k.clone().add(P + (A ? -1 : 1), p);
1252
+ return +(-(P + (E - O) / (A ? O - N : N - O)) || 0);
1253
+ }, a: function(F) {
1254
+ return F < 0 ? Math.ceil(F) || 0 : Math.floor(F);
1255
+ }, p: function(F) {
1256
+ return { M: p, y: g, w: v, d: h, D: $, h: d, m: i, s: a, ms: e, Q: f }[F] || String(F || "").toLowerCase().replace(/s$/, "");
1257
+ }, u: function(F) {
1258
+ return F === void 0;
1259
+ } }, W = "en", j = {};
1260
+ j[W] = R;
1261
+ var I = "$isDayjsObject", D = function(F) {
1262
+ return F instanceof Y || !(!F || !F[I]);
1263
+ }, l = function F(k, E, P) {
1264
+ var O;
1265
+ if (!k) return W;
1266
+ if (typeof k == "string") {
1267
+ var A = k.toLowerCase();
1268
+ j[A] && (O = A), E && (j[A] = E, O = A);
1269
+ var N = k.split("-");
1270
+ if (!O && N.length > 1) return F(N[0]);
534
1271
  } else {
535
- var C = D.name;
536
- k[C] = D, x = C;
1272
+ var U = k.name;
1273
+ j[U] = k, O = U;
537
1274
  }
538
- return !T && x && (L = x), x || !T && L;
539
- }, d = function(I, D) {
540
- if (W(I)) return I.clone();
541
- var v = typeof D == "object" ? D : {};
542
- return v.date = I, v.args = arguments, new B(v);
543
- }, O = Z;
544
- O.l = $, O.i = W, O.w = function(I, D) {
545
- return d(I, { locale: D.$L, utc: D.$u, x: D.$x, $offset: D.$offset });
1275
+ return !P && O && (W = O), O || !P && W;
1276
+ }, m = function(F, k) {
1277
+ if (D(F)) return F.clone();
1278
+ var E = typeof k == "object" ? k : {};
1279
+ return E.date = F, E.args = arguments, new Y(E);
1280
+ }, C = L;
1281
+ C.l = l, C.i = D, C.w = function(F, k) {
1282
+ return m(F, { locale: k.$L, utc: k.$u, x: k.$x, $offset: k.$offset });
546
1283
  };
547
- var B = function() {
548
- function I(v) {
549
- this.$L = $(v.locale, null, !0), this.parse(v), this.$x = this.$x || v.x || {}, this[P] = !0;
1284
+ var Y = function() {
1285
+ function F(E) {
1286
+ this.$L = l(E.locale, null, !0), this.parse(E), this.$x = this.$x || E.x || {}, this[I] = !0;
550
1287
  }
551
- var D = I.prototype;
552
- return D.parse = function(v) {
553
- this.$d = function(T) {
554
- var x = T.date, R = T.utc;
555
- if (x === null) return /* @__PURE__ */ new Date(NaN);
556
- if (O.u(x)) return /* @__PURE__ */ new Date();
557
- if (x instanceof Date) return new Date(x);
558
- if (typeof x == "string" && !/Z$/i.test(x)) {
559
- var j = x.match(S);
560
- if (j) {
561
- var C = j[2] - 1 || 0, N = (j[7] || "0").substring(0, 3);
562
- return R ? new Date(Date.UTC(j[1], C, j[3] || 1, j[4] || 0, j[5] || 0, j[6] || 0, N)) : new Date(j[1], C, j[3] || 1, j[4] || 0, j[5] || 0, j[6] || 0, N);
1288
+ var k = F.prototype;
1289
+ return k.parse = function(E) {
1290
+ this.$d = function(P) {
1291
+ var O = P.date, A = P.utc;
1292
+ if (O === null) return /* @__PURE__ */ new Date(NaN);
1293
+ if (C.u(O)) return /* @__PURE__ */ new Date();
1294
+ if (O instanceof Date) return new Date(O);
1295
+ if (typeof O == "string" && !/Z$/i.test(O)) {
1296
+ var N = O.match(w);
1297
+ if (N) {
1298
+ var U = N[2] - 1 || 0, G = (N[7] || "0").substring(0, 3);
1299
+ return A ? new Date(Date.UTC(N[1], U, N[3] || 1, N[4] || 0, N[5] || 0, N[6] || 0, G)) : new Date(N[1], U, N[3] || 1, N[4] || 0, N[5] || 0, N[6] || 0, G);
563
1300
  }
564
1301
  }
565
- return new Date(x);
566
- }(v), this.init();
567
- }, D.init = function() {
568
- var v = this.$d;
569
- this.$y = v.getFullYear(), this.$M = v.getMonth(), this.$D = v.getDate(), this.$W = v.getDay(), this.$H = v.getHours(), this.$m = v.getMinutes(), this.$s = v.getSeconds(), this.$ms = v.getMilliseconds();
570
- }, D.$utils = function() {
571
- return O;
572
- }, D.isValid = function() {
573
- return this.$d.toString() !== f;
574
- }, D.isSame = function(v, T) {
575
- var x = d(v);
576
- return this.startOf(T) <= x && x <= this.endOf(T);
577
- }, D.isAfter = function(v, T) {
578
- return d(v) < this.startOf(T);
579
- }, D.isBefore = function(v, T) {
580
- return this.endOf(T) < d(v);
581
- }, D.$g = function(v, T, x) {
582
- return O.u(v) ? this[T] : this.set(x, v);
583
- }, D.unix = function() {
1302
+ return new Date(O);
1303
+ }(E), this.init();
1304
+ }, k.init = function() {
1305
+ var E = this.$d;
1306
+ this.$y = E.getFullYear(), this.$M = E.getMonth(), this.$D = E.getDate(), this.$W = E.getDay(), this.$H = E.getHours(), this.$m = E.getMinutes(), this.$s = E.getSeconds(), this.$ms = E.getMilliseconds();
1307
+ }, k.$utils = function() {
1308
+ return C;
1309
+ }, k.isValid = function() {
1310
+ return this.$d.toString() !== u;
1311
+ }, k.isSame = function(E, P) {
1312
+ var O = m(E);
1313
+ return this.startOf(P) <= O && O <= this.endOf(P);
1314
+ }, k.isAfter = function(E, P) {
1315
+ return m(E) < this.startOf(P);
1316
+ }, k.isBefore = function(E, P) {
1317
+ return this.endOf(P) < m(E);
1318
+ }, k.$g = function(E, P, O) {
1319
+ return C.u(E) ? this[P] : this.set(O, E);
1320
+ }, k.unix = function() {
584
1321
  return Math.floor(this.valueOf() / 1e3);
585
- }, D.valueOf = function() {
1322
+ }, k.valueOf = function() {
586
1323
  return this.$d.getTime();
587
- }, D.startOf = function(v, T) {
588
- var x = this, R = !!O.u(T) || T, j = O.p(v), C = function(ae, G) {
589
- var te = O.w(x.$u ? Date.UTC(x.$y, G, ae) : new Date(x.$y, G, ae), x);
590
- return R ? te : te.endOf(m);
591
- }, N = function(ae, G) {
592
- return O.w(x.toDate()[ae].apply(x.toDate("s"), (R ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(G)), x);
593
- }, z = this.$W, Y = this.$M, J = this.$D, se = "set" + (this.$u ? "UTC" : "");
594
- switch (j) {
595
- case y:
596
- return R ? C(1, 0) : C(31, 11);
597
- case r:
598
- return R ? C(1, Y) : C(0, Y + 1);
1324
+ }, k.startOf = function(E, P) {
1325
+ var O = this, A = !!C.u(P) || P, N = C.p(E), U = function(ae, ee) {
1326
+ var ie = C.w(O.$u ? Date.UTC(O.$y, ee, ae) : new Date(O.$y, ee, ae), O);
1327
+ return A ? ie : ie.endOf(h);
1328
+ }, G = function(ae, ee) {
1329
+ return C.w(O.toDate()[ae].apply(O.toDate("s"), (A ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ee)), O);
1330
+ }, Z = this.$W, J = this.$M, ne = this.$D, ue = "set" + (this.$u ? "UTC" : "");
1331
+ switch (N) {
599
1332
  case g:
600
- var re = this.$locale().weekStart || 0, de = (z < re ? z + 7 : z) - re;
601
- return C(R ? J - de : J + (6 - de), Y);
602
- case m:
603
- case h:
604
- return N(se + "Hours", 0);
1333
+ return A ? U(1, 0) : U(31, 11);
605
1334
  case p:
606
- return N(se + "Minutes", 1);
607
- case u:
608
- return N(se + "Seconds", 2);
609
- case l:
610
- return N(se + "Milliseconds", 3);
1335
+ return A ? U(1, J) : U(0, J + 1);
1336
+ case v:
1337
+ var oe = this.$locale().weekStart || 0, he = (Z < oe ? Z + 7 : Z) - oe;
1338
+ return U(A ? ne - he : ne + (6 - he), J);
1339
+ case h:
1340
+ case $:
1341
+ return G(ue + "Hours", 0);
1342
+ case d:
1343
+ return G(ue + "Minutes", 1);
1344
+ case i:
1345
+ return G(ue + "Seconds", 2);
1346
+ case a:
1347
+ return G(ue + "Milliseconds", 3);
611
1348
  default:
612
1349
  return this.clone();
613
1350
  }
614
- }, D.endOf = function(v) {
615
- return this.startOf(v, !1);
616
- }, D.$set = function(v, T) {
617
- var x, R = O.p(v), j = "set" + (this.$u ? "UTC" : ""), C = (x = {}, x[m] = j + "Date", x[h] = j + "Date", x[r] = j + "Month", x[y] = j + "FullYear", x[p] = j + "Hours", x[u] = j + "Minutes", x[l] = j + "Seconds", x[e] = j + "Milliseconds", x)[R], N = R === m ? this.$D + (T - this.$W) : T;
618
- if (R === r || R === y) {
619
- var z = this.clone().set(h, 1);
620
- z.$d[C](N), z.init(), this.$d = z.set(h, Math.min(this.$D, z.daysInMonth())).$d;
621
- } else C && this.$d[C](N);
1351
+ }, k.endOf = function(E) {
1352
+ return this.startOf(E, !1);
1353
+ }, k.$set = function(E, P) {
1354
+ var O, A = C.p(E), N = "set" + (this.$u ? "UTC" : ""), U = (O = {}, O[h] = N + "Date", O[$] = N + "Date", O[p] = N + "Month", O[g] = N + "FullYear", O[d] = N + "Hours", O[i] = N + "Minutes", O[a] = N + "Seconds", O[e] = N + "Milliseconds", O)[A], G = A === h ? this.$D + (P - this.$W) : P;
1355
+ if (A === p || A === g) {
1356
+ var Z = this.clone().set($, 1);
1357
+ Z.$d[U](G), Z.init(), this.$d = Z.set($, Math.min(this.$D, Z.daysInMonth())).$d;
1358
+ } else U && this.$d[U](G);
622
1359
  return this.init(), this;
623
- }, D.set = function(v, T) {
624
- return this.clone().$set(v, T);
625
- }, D.get = function(v) {
626
- return this[O.p(v)]();
627
- }, D.add = function(v, T) {
628
- var x, R = this;
629
- v = Number(v);
630
- var j = O.p(T), C = function(Y) {
631
- var J = d(R);
632
- return O.w(J.date(J.date() + Math.round(Y * v)), R);
1360
+ }, k.set = function(E, P) {
1361
+ return this.clone().$set(E, P);
1362
+ }, k.get = function(E) {
1363
+ return this[C.p(E)]();
1364
+ }, k.add = function(E, P) {
1365
+ var O, A = this;
1366
+ E = Number(E);
1367
+ var N = C.p(P), U = function(J) {
1368
+ var ne = m(A);
1369
+ return C.w(ne.date(ne.date() + Math.round(J * E)), A);
633
1370
  };
634
- if (j === r) return this.set(r, this.$M + v);
635
- if (j === y) return this.set(y, this.$y + v);
636
- if (j === m) return C(1);
637
- if (j === g) return C(7);
638
- var N = (x = {}, x[u] = i, x[p] = s, x[l] = a, x)[j] || 1, z = this.$d.getTime() + v * N;
639
- return O.w(z, this);
640
- }, D.subtract = function(v, T) {
641
- return this.add(-1 * v, T);
642
- }, D.format = function(v) {
643
- var T = this, x = this.$locale();
644
- if (!this.isValid()) return x.invalidDate || f;
645
- var R = v || "YYYY-MM-DDTHH:mm:ssZ", j = O.z(this), C = this.$H, N = this.$m, z = this.$M, Y = x.weekdays, J = x.months, se = x.meridiem, re = function(G, te, ie, fe) {
646
- return G && (G[te] || G(T, R)) || ie[te].slice(0, fe);
647
- }, de = function(G) {
648
- return O.s(C % 12 || 12, G, "0");
649
- }, ae = se || function(G, te, ie) {
650
- var fe = G < 12 ? "AM" : "PM";
651
- return ie ? fe.toLowerCase() : fe;
1371
+ if (N === p) return this.set(p, this.$M + E);
1372
+ if (N === g) return this.set(g, this.$y + E);
1373
+ if (N === h) return U(1);
1374
+ if (N === v) return U(7);
1375
+ var G = (O = {}, O[i] = r, O[d] = n, O[a] = t, O)[N] || 1, Z = this.$d.getTime() + E * G;
1376
+ return C.w(Z, this);
1377
+ }, k.subtract = function(E, P) {
1378
+ return this.add(-1 * E, P);
1379
+ }, k.format = function(E) {
1380
+ var P = this, O = this.$locale();
1381
+ if (!this.isValid()) return O.invalidDate || u;
1382
+ var A = E || "YYYY-MM-DDTHH:mm:ssZ", N = C.z(this), U = this.$H, G = this.$m, Z = this.$M, J = O.weekdays, ne = O.months, ue = O.meridiem, oe = function(ee, ie, ce, pe) {
1383
+ return ee && (ee[ie] || ee(P, A)) || ce[ie].slice(0, pe);
1384
+ }, he = function(ee) {
1385
+ return C.s(U % 12 || 12, ee, "0");
1386
+ }, ae = ue || function(ee, ie, ce) {
1387
+ var pe = ee < 12 ? "AM" : "PM";
1388
+ return ce ? pe.toLowerCase() : pe;
652
1389
  };
653
- return R.replace(E, function(G, te) {
654
- return te || function(ie) {
655
- switch (ie) {
1390
+ return A.replace(T, function(ee, ie) {
1391
+ return ie || function(ce) {
1392
+ switch (ce) {
656
1393
  case "YY":
657
- return String(T.$y).slice(-2);
1394
+ return String(P.$y).slice(-2);
658
1395
  case "YYYY":
659
- return O.s(T.$y, 4, "0");
1396
+ return C.s(P.$y, 4, "0");
660
1397
  case "M":
661
- return z + 1;
1398
+ return Z + 1;
662
1399
  case "MM":
663
- return O.s(z + 1, 2, "0");
1400
+ return C.s(Z + 1, 2, "0");
664
1401
  case "MMM":
665
- return re(x.monthsShort, z, J, 3);
1402
+ return oe(O.monthsShort, Z, ne, 3);
666
1403
  case "MMMM":
667
- return re(J, z);
1404
+ return oe(ne, Z);
668
1405
  case "D":
669
- return T.$D;
1406
+ return P.$D;
670
1407
  case "DD":
671
- return O.s(T.$D, 2, "0");
1408
+ return C.s(P.$D, 2, "0");
672
1409
  case "d":
673
- return String(T.$W);
1410
+ return String(P.$W);
674
1411
  case "dd":
675
- return re(x.weekdaysMin, T.$W, Y, 2);
1412
+ return oe(O.weekdaysMin, P.$W, J, 2);
676
1413
  case "ddd":
677
- return re(x.weekdaysShort, T.$W, Y, 3);
1414
+ return oe(O.weekdaysShort, P.$W, J, 3);
678
1415
  case "dddd":
679
- return Y[T.$W];
1416
+ return J[P.$W];
680
1417
  case "H":
681
- return String(C);
1418
+ return String(U);
682
1419
  case "HH":
683
- return O.s(C, 2, "0");
1420
+ return C.s(U, 2, "0");
684
1421
  case "h":
685
- return de(1);
1422
+ return he(1);
686
1423
  case "hh":
687
- return de(2);
1424
+ return he(2);
688
1425
  case "a":
689
- return ae(C, N, !0);
1426
+ return ae(U, G, !0);
690
1427
  case "A":
691
- return ae(C, N, !1);
1428
+ return ae(U, G, !1);
692
1429
  case "m":
693
- return String(N);
1430
+ return String(G);
694
1431
  case "mm":
695
- return O.s(N, 2, "0");
1432
+ return C.s(G, 2, "0");
696
1433
  case "s":
697
- return String(T.$s);
1434
+ return String(P.$s);
698
1435
  case "ss":
699
- return O.s(T.$s, 2, "0");
1436
+ return C.s(P.$s, 2, "0");
700
1437
  case "SSS":
701
- return O.s(T.$ms, 3, "0");
1438
+ return C.s(P.$ms, 3, "0");
702
1439
  case "Z":
703
- return j;
1440
+ return N;
704
1441
  }
705
1442
  return null;
706
- }(G) || j.replace(":", "");
1443
+ }(ee) || N.replace(":", "");
707
1444
  });
708
- }, D.utcOffset = function() {
1445
+ }, k.utcOffset = function() {
709
1446
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
710
- }, D.diff = function(v, T, x) {
711
- var R, j = this, C = O.p(T), N = d(v), z = (N.utcOffset() - this.utcOffset()) * i, Y = this - N, J = function() {
712
- return O.m(j, N);
1447
+ }, k.diff = function(E, P, O) {
1448
+ var A, N = this, U = C.p(P), G = m(E), Z = (G.utcOffset() - this.utcOffset()) * r, J = this - G, ne = function() {
1449
+ return C.m(N, G);
713
1450
  };
714
- switch (C) {
715
- case y:
716
- R = J() / 12;
1451
+ switch (U) {
1452
+ case g:
1453
+ A = ne() / 12;
717
1454
  break;
718
- case r:
719
- R = J();
1455
+ case p:
1456
+ A = ne();
720
1457
  break;
721
- case c:
722
- R = J() / 3;
1458
+ case f:
1459
+ A = ne() / 3;
723
1460
  break;
724
- case g:
725
- R = (Y - z) / 6048e5;
1461
+ case v:
1462
+ A = (J - Z) / 6048e5;
726
1463
  break;
727
- case m:
728
- R = (Y - z) / 864e5;
1464
+ case h:
1465
+ A = (J - Z) / 864e5;
729
1466
  break;
730
- case p:
731
- R = Y / s;
1467
+ case d:
1468
+ A = J / n;
732
1469
  break;
733
- case u:
734
- R = Y / i;
1470
+ case i:
1471
+ A = J / r;
735
1472
  break;
736
- case l:
737
- R = Y / a;
1473
+ case a:
1474
+ A = J / t;
738
1475
  break;
739
1476
  default:
740
- R = Y;
1477
+ A = J;
741
1478
  }
742
- return x ? R : O.a(R);
743
- }, D.daysInMonth = function() {
744
- return this.endOf(r).$D;
745
- }, D.$locale = function() {
746
- return k[this.$L];
747
- }, D.locale = function(v, T) {
748
- if (!v) return this.$L;
749
- var x = this.clone(), R = $(v, T, !0);
750
- return R && (x.$L = R), x;
751
- }, D.clone = function() {
752
- return O.w(this.$d, this);
753
- }, D.toDate = function() {
1479
+ return O ? A : C.a(A);
1480
+ }, k.daysInMonth = function() {
1481
+ return this.endOf(p).$D;
1482
+ }, k.$locale = function() {
1483
+ return j[this.$L];
1484
+ }, k.locale = function(E, P) {
1485
+ if (!E) return this.$L;
1486
+ var O = this.clone(), A = l(E, P, !0);
1487
+ return A && (O.$L = A), O;
1488
+ }, k.clone = function() {
1489
+ return C.w(this.$d, this);
1490
+ }, k.toDate = function() {
754
1491
  return new Date(this.valueOf());
755
- }, D.toJSON = function() {
1492
+ }, k.toJSON = function() {
756
1493
  return this.isValid() ? this.toISOString() : null;
757
- }, D.toISOString = function() {
1494
+ }, k.toISOString = function() {
758
1495
  return this.$d.toISOString();
759
- }, D.toString = function() {
1496
+ }, k.toString = function() {
760
1497
  return this.$d.toUTCString();
761
- }, I;
762
- }(), ee = B.prototype;
763
- return d.prototype = ee, [["$ms", e], ["$s", l], ["$m", u], ["$H", p], ["$W", m], ["$M", r], ["$y", y], ["$D", h]].forEach(function(I) {
764
- ee[I[1]] = function(D) {
765
- return this.$g(D, I[0], I[1]);
1498
+ }, F;
1499
+ }(), V = Y.prototype;
1500
+ return m.prototype = V, [["$ms", e], ["$s", a], ["$m", i], ["$H", d], ["$W", h], ["$M", p], ["$y", g], ["$D", $]].forEach(function(F) {
1501
+ V[F[1]] = function(k) {
1502
+ return this.$g(k, F[0], F[1]);
766
1503
  };
767
- }), d.extend = function(I, D) {
768
- return I.$i || (I(D, B, d), I.$i = !0), d;
769
- }, d.locale = $, d.isDayjs = W, d.unix = function(I) {
770
- return d(1e3 * I);
771
- }, d.en = k[L], d.Ls = k, d.p = {}, d;
1504
+ }), m.extend = function(F, k) {
1505
+ return F.$i || (F(k, Y, m), F.$i = !0), m;
1506
+ }, m.locale = l, m.isDayjs = D, m.unix = function(F) {
1507
+ return m(1e3 * F);
1508
+ }, m.en = j[W], m.Ls = j, m.p = {}, m;
772
1509
  });
773
- }(be)), be.exports;
774
- }
775
- var $t = mt();
776
- const H = /* @__PURE__ */ ne($t);
777
- function gt(n, o, a, i) {
778
- if (!a.length)
779
- return { barMarginLeftAmount: 0, barWidthSize: 0 };
780
- const { tickUnit: s, unitPerTick: e } = K[i], l = a.reduce((f, S) => f + S.widthPx, 0), u = a[0].startDate, p = a[a.length - 1].startDate, m = H(p).add(e, s).diff(u), g = l / m, r = n.diff(u), c = o.diff(u), y = r * g, h = Math.max(c - r, 1) * g;
781
- return { barMarginLeftAmount: y, barWidthSize: h };
782
- }
783
- function vt(n) {
784
- let o = 1 / 0, a = -1 / 0;
785
- for (const { startDate: i, endDate: s } of Object.values(n)) {
786
- const e = H(i).valueOf(), l = H(s).valueOf();
787
- Number.isNaN(e) || (o = Math.min(o, e)), Number.isNaN(l) || (a = Math.max(a, l));
788
- }
789
- return { minDate: H(o), maxDate: H(a) };
790
- }
791
- function yt(n, o, a) {
792
- const { tickUnit: i, unitPerTick: s } = K[a];
793
- return {
794
- paddedMinDate: n.subtract(
795
- Be * s,
796
- i
797
- ),
798
- paddedMaxDate: o.add(Be * s, i)
799
- };
800
- }
801
- function Dt(n, o, a) {
802
- const { tickUnit: i, unitPerTick: s, basePxPerDragStep: e, dragStepUnit: l, dragStepAmount: u } = K[a], p = [];
803
- let m = n.startOf(i);
804
- for (; m.isBefore(o); ) {
805
- const g = H(m).add(s, i).diff(m, l) / u;
806
- p.push({
807
- startDate: m,
808
- widthPx: g * e
809
- }), m = m.add(s, i);
810
- }
811
- return p;
1510
+ }(Ee)), Ee.exports;
812
1511
  }
813
- function ct(n, o) {
814
- const { labelUnit: a, formatHeaderLabel: i } = K[o], s = [];
815
- let e = null, l = "", u = 0, p = null;
816
- return n.forEach((m, g) => {
817
- const r = m.startDate.startOf(a), c = r.valueOf(), y = (i == null ? void 0 : i(r)) ?? r.format();
818
- c === e ? u += m.widthPx : (e !== null && s.push({
819
- label: l,
820
- widthPx: u,
821
- startDate: p
822
- }), e = c, l = y, u = m.widthPx, p = r), g === n.length - 1 && s.push({
823
- label: l,
824
- widthPx: u,
825
- startDate: p
1512
+ var Xt = Gt();
1513
+ const K = /* @__PURE__ */ se(Xt);
1514
+ var ke = { exports: {} }, Zt = ke.exports, at;
1515
+ function Jt() {
1516
+ return at || (at = 1, function(s, c) {
1517
+ (function(t, r) {
1518
+ s.exports = r();
1519
+ })(Zt, function() {
1520
+ var t, r, n = 1e3, e = 6e4, a = 36e5, i = 864e5, d = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, h = 31536e6, v = 2628e6, p = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, f = { years: h, months: v, days: i, hours: a, minutes: e, seconds: n, milliseconds: 1, weeks: 6048e5 }, g = function(j) {
1521
+ return j instanceof L;
1522
+ }, $ = function(j, I, D) {
1523
+ return new L(j, D, I.$l);
1524
+ }, u = function(j) {
1525
+ return r.p(j) + "s";
1526
+ }, w = function(j) {
1527
+ return j < 0;
1528
+ }, T = function(j) {
1529
+ return w(j) ? Math.ceil(j) : Math.floor(j);
1530
+ }, R = function(j) {
1531
+ return Math.abs(j);
1532
+ }, M = function(j, I) {
1533
+ return j ? w(j) ? { negative: !0, format: "" + R(j) + I } : { negative: !1, format: "" + j + I } : { negative: !1, format: "" };
1534
+ }, L = function() {
1535
+ function j(D, l, m) {
1536
+ var C = this;
1537
+ if (this.$d = {}, this.$l = m, D === void 0 && (this.$ms = 0, this.parseFromMilliseconds()), l) return $(D * f[u(l)], this);
1538
+ if (typeof D == "number") return this.$ms = D, this.parseFromMilliseconds(), this;
1539
+ if (typeof D == "object") return Object.keys(D).forEach(function(F) {
1540
+ C.$d[u(F)] = D[F];
1541
+ }), this.calMilliseconds(), this;
1542
+ if (typeof D == "string") {
1543
+ var Y = D.match(p);
1544
+ if (Y) {
1545
+ var V = Y.slice(2).map(function(F) {
1546
+ return F != null ? Number(F) : 0;
1547
+ });
1548
+ return this.$d.years = V[0], this.$d.months = V[1], this.$d.weeks = V[2], this.$d.days = V[3], this.$d.hours = V[4], this.$d.minutes = V[5], this.$d.seconds = V[6], this.calMilliseconds(), this;
1549
+ }
1550
+ }
1551
+ return this;
1552
+ }
1553
+ var I = j.prototype;
1554
+ return I.calMilliseconds = function() {
1555
+ var D = this;
1556
+ this.$ms = Object.keys(this.$d).reduce(function(l, m) {
1557
+ return l + (D.$d[m] || 0) * f[m];
1558
+ }, 0);
1559
+ }, I.parseFromMilliseconds = function() {
1560
+ var D = this.$ms;
1561
+ this.$d.years = T(D / h), D %= h, this.$d.months = T(D / v), D %= v, this.$d.days = T(D / i), D %= i, this.$d.hours = T(D / a), D %= a, this.$d.minutes = T(D / e), D %= e, this.$d.seconds = T(D / n), D %= n, this.$d.milliseconds = D;
1562
+ }, I.toISOString = function() {
1563
+ var D = M(this.$d.years, "Y"), l = M(this.$d.months, "M"), m = +this.$d.days || 0;
1564
+ this.$d.weeks && (m += 7 * this.$d.weeks);
1565
+ var C = M(m, "D"), Y = M(this.$d.hours, "H"), V = M(this.$d.minutes, "M"), F = this.$d.seconds || 0;
1566
+ this.$d.milliseconds && (F += this.$d.milliseconds / 1e3, F = Math.round(1e3 * F) / 1e3);
1567
+ var k = M(F, "S"), E = D.negative || l.negative || C.negative || Y.negative || V.negative || k.negative, P = Y.format || V.format || k.format ? "T" : "", O = (E ? "-" : "") + "P" + D.format + l.format + C.format + P + Y.format + V.format + k.format;
1568
+ return O === "P" || O === "-P" ? "P0D" : O;
1569
+ }, I.toJSON = function() {
1570
+ return this.toISOString();
1571
+ }, I.format = function(D) {
1572
+ var l = D || "YYYY-MM-DDTHH:mm:ss", m = { Y: this.$d.years, YY: r.s(this.$d.years, 2, "0"), YYYY: r.s(this.$d.years, 4, "0"), M: this.$d.months, MM: r.s(this.$d.months, 2, "0"), D: this.$d.days, DD: r.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: r.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: r.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: r.s(this.$d.seconds, 2, "0"), SSS: r.s(this.$d.milliseconds, 3, "0") };
1573
+ return l.replace(d, function(C, Y) {
1574
+ return Y || String(m[C]);
1575
+ });
1576
+ }, I.as = function(D) {
1577
+ return this.$ms / f[u(D)];
1578
+ }, I.get = function(D) {
1579
+ var l = this.$ms, m = u(D);
1580
+ return m === "milliseconds" ? l %= 1e3 : l = m === "weeks" ? T(l / f[m]) : this.$d[m], l || 0;
1581
+ }, I.add = function(D, l, m) {
1582
+ var C;
1583
+ return C = l ? D * f[u(l)] : g(D) ? D.$ms : $(D, this).$ms, $(this.$ms + C * (m ? -1 : 1), this);
1584
+ }, I.subtract = function(D, l) {
1585
+ return this.add(D, l, !0);
1586
+ }, I.locale = function(D) {
1587
+ var l = this.clone();
1588
+ return l.$l = D, l;
1589
+ }, I.clone = function() {
1590
+ return $(this.$ms, this);
1591
+ }, I.humanize = function(D) {
1592
+ return t().add(this.$ms, "ms").locale(this.$l).fromNow(!D);
1593
+ }, I.valueOf = function() {
1594
+ return this.asMilliseconds();
1595
+ }, I.milliseconds = function() {
1596
+ return this.get("milliseconds");
1597
+ }, I.asMilliseconds = function() {
1598
+ return this.as("milliseconds");
1599
+ }, I.seconds = function() {
1600
+ return this.get("seconds");
1601
+ }, I.asSeconds = function() {
1602
+ return this.as("seconds");
1603
+ }, I.minutes = function() {
1604
+ return this.get("minutes");
1605
+ }, I.asMinutes = function() {
1606
+ return this.as("minutes");
1607
+ }, I.hours = function() {
1608
+ return this.get("hours");
1609
+ }, I.asHours = function() {
1610
+ return this.as("hours");
1611
+ }, I.days = function() {
1612
+ return this.get("days");
1613
+ }, I.asDays = function() {
1614
+ return this.as("days");
1615
+ }, I.weeks = function() {
1616
+ return this.get("weeks");
1617
+ }, I.asWeeks = function() {
1618
+ return this.as("weeks");
1619
+ }, I.months = function() {
1620
+ return this.get("months");
1621
+ }, I.asMonths = function() {
1622
+ return this.as("months");
1623
+ }, I.years = function() {
1624
+ return this.get("years");
1625
+ }, I.asYears = function() {
1626
+ return this.as("years");
1627
+ }, j;
1628
+ }(), W = function(j, I, D) {
1629
+ return j.add(I.years() * D, "y").add(I.months() * D, "M").add(I.days() * D, "d").add(I.hours() * D, "h").add(I.minutes() * D, "m").add(I.seconds() * D, "s").add(I.milliseconds() * D, "ms");
1630
+ };
1631
+ return function(j, I, D) {
1632
+ t = D, r = D().$utils(), D.duration = function(C, Y) {
1633
+ var V = D.locale();
1634
+ return $(C, { $l: V }, Y);
1635
+ }, D.isDuration = g;
1636
+ var l = I.prototype.add, m = I.prototype.subtract;
1637
+ I.prototype.add = function(C, Y) {
1638
+ return g(C) ? W(this, C, 1) : l.bind(this)(C, Y);
1639
+ }, I.prototype.subtract = function(C, Y) {
1640
+ return g(C) ? W(this, C, -1) : m.bind(this)(C, Y);
1641
+ };
1642
+ };
826
1643
  });
827
- }), s;
828
- }
829
- function St(n, o, a, i, s, e) {
830
- const { minDate: l, maxDate: u } = vt(n);
831
- a(l), i(u);
832
- const { paddedMinDate: p, paddedMaxDate: m } = yt(
833
- l,
834
- u,
835
- o
836
- ), g = Dt(
837
- p,
838
- m,
839
- o
840
- ), r = ct(g, o);
841
- s(g), e(r);
1644
+ }(ke)), ke.exports;
842
1645
  }
843
- const xt = ({
844
- bottomRowCells: n,
845
- selectedScale: o,
846
- scrollRef: a
847
- }) => {
848
- var g;
849
- const i = K[o], [s, e] = oe(0), l = _e(
850
- () => ct(n, o),
851
- [n, o]
852
- ), u = _e(() => {
853
- const r = [];
854
- for (const c of l) {
855
- const y = r[r.length - 1];
856
- y && y.label === c.label ? y.widthPx += c.widthPx : r.push({ ...c });
857
- }
858
- return r;
859
- }, [l]), p = _e(() => {
860
- let r = 0;
861
- return u.map((c) => {
862
- const y = { ...c, left: r };
863
- return r += c.widthPx, y;
864
- });
865
- }, [u]);
866
- xe(() => {
867
- const r = a.current;
868
- if (!r) return;
869
- const c = () => {
870
- const y = r.scrollLeft;
871
- for (let h = p.length - 1; h >= 0; h--)
872
- if (y >= p[h].left) {
873
- e(h);
874
- break;
875
- }
876
- };
877
- return r.addEventListener("scroll", c), c(), () => r.removeEventListener("scroll", c);
878
- }, [p]);
879
- const m = ((g = p[s]) == null ? void 0 : g.label) ?? "";
880
- return /* @__PURE__ */ A.jsx(
881
- "div",
882
- {
883
- style: {
884
- position: "sticky",
885
- top: 0,
886
- zIndex: 30,
887
- backgroundColor: "#F0F1F2"
888
- },
889
- children: /* @__PURE__ */ A.jsxs(
890
- "div",
891
- {
892
- style: {
893
- display: "flex",
894
- minWidth: "max-content",
895
- flexDirection: "column"
896
- // backgroundColor: '#F0F1F2',
897
- },
898
- children: [
899
- /* @__PURE__ */ A.jsxs(
900
- "div",
901
- {
902
- style: {
903
- position: "relative",
904
- display: "flex",
905
- height: "32px"
906
- // backgroundColor: '#F0F1F2',
907
- },
908
- children: [
909
- /* @__PURE__ */ A.jsx(
910
- "div",
911
- {
912
- style: {
913
- position: "sticky",
914
- left: 0,
915
- zIndex: 40,
916
- display: "flex",
917
- width: "96px",
918
- flexShrink: 0,
919
- alignItems: "center",
920
- justifyContent: "center",
921
- backgroundColor: "#F0F1F2",
922
- // borderBottom: '1px solid #D6D6D8',
923
- fontSize: "0.875rem",
924
- fontWeight: "bold"
925
- },
926
- children: m
927
- }
928
- ),
929
- /* @__PURE__ */ A.jsx(
930
- "div",
931
- {
932
- style: {
933
- display: "flex"
934
- },
935
- children: p.map((r, c) => /* @__PURE__ */ A.jsx(
936
- "div",
937
- {
938
- style: {
939
- padding: "8px 16px",
940
- fontSize: "0.875rem",
941
- fontWeight: "bold",
942
- textAlign: "left",
943
- width: `${r.widthPx}px`,
944
- // borderBottom: '1px solid #D6D6D8',
945
- backgroundColor: "#F0F1F2"
946
- },
947
- children: /* @__PURE__ */ A.jsx(
948
- "p",
949
- {
950
- style: {
951
- margin: 0,
952
- padding: "0 16px"
953
- },
954
- children: c === 0 ? "" : r.label
955
- }
956
- )
957
- },
958
- c
959
- ))
960
- }
961
- )
962
- ]
963
- }
964
- ),
965
- /* @__PURE__ */ A.jsx(
966
- "div",
967
- {
968
- style: {
969
- borderTop: "1px solid #D6D6D8",
970
- display: "flex"
971
- },
972
- children: n.map((r, c) => {
973
- var h;
974
- const y = ((h = i.formatTickLabel) == null ? void 0 : h.call(i, r.startDate)) || "";
975
- return /* @__PURE__ */ A.jsx(
976
- "div",
977
- {
978
- style: {
979
- position: "relative",
980
- padding: "4px",
981
- textAlign: "center",
982
- fontSize: "0.75rem",
983
- width: `${r.widthPx}px`
984
- },
985
- children: y
986
- },
987
- c
988
- );
989
- })
990
- }
991
- )
992
- ]
993
- }
994
- )
995
- }
996
- );
997
- };
998
- var we = { exports: {} }, bt = we.exports, Xe;
999
- function wt() {
1000
- return Xe || (Xe = 1, function(n, o) {
1001
- (function(a, i) {
1002
- n.exports = i();
1003
- })(bt, function() {
1004
- return function(a, i, s) {
1005
- i.prototype.isBetween = function(e, l, u, p) {
1006
- var m = s(e), g = s(l), r = (p = p || "()")[0] === "(", c = p[1] === ")";
1007
- return (r ? this.isAfter(m, u) : !this.isBefore(m, u)) && (c ? this.isBefore(g, u) : !this.isAfter(g, u)) || (r ? this.isBefore(m, u) : !this.isAfter(m, u)) && (c ? this.isAfter(g, u) : !this.isBefore(g, u));
1646
+ var Kt = Jt();
1647
+ const Qt = /* @__PURE__ */ se(Kt);
1648
+ var Oe = { exports: {} }, en = Oe.exports, ut;
1649
+ function tn() {
1650
+ return ut || (ut = 1, function(s, c) {
1651
+ (function(t, r) {
1652
+ s.exports = r();
1653
+ })(en, function() {
1654
+ return function(t, r, n) {
1655
+ r.prototype.isBetween = function(e, a, i, d) {
1656
+ var h = n(e), v = n(a), p = (d = d || "()")[0] === "(", f = d[1] === ")";
1657
+ return (p ? this.isAfter(h, i) : !this.isBefore(h, i)) && (f ? this.isBefore(v, i) : !this.isAfter(v, i)) || (p ? this.isBefore(h, i) : !this.isAfter(h, i)) && (f ? this.isAfter(v, i) : !this.isBefore(v, i));
1008
1658
  };
1009
1659
  };
1010
1660
  });
1011
- }(we)), we.exports;
1661
+ }(Oe)), Oe.exports;
1012
1662
  }
1013
- var Tt = wt();
1014
- const kt = /* @__PURE__ */ ne(Tt);
1015
- var Te = { exports: {} }, Et = Te.exports, Ve;
1016
- function Mt() {
1017
- return Ve || (Ve = 1, function(n, o) {
1018
- (function(a, i) {
1019
- n.exports = i();
1020
- })(Et, function() {
1021
- var a = "day";
1022
- return function(i, s, e) {
1023
- var l = function(m) {
1024
- return m.add(4 - m.isoWeekday(), a);
1025
- }, u = s.prototype;
1026
- u.isoWeekYear = function() {
1027
- return l(this).year();
1028
- }, u.isoWeek = function(m) {
1029
- if (!this.$utils().u(m)) return this.add(7 * (m - this.isoWeek()), a);
1030
- var g, r, c, y, h = l(this), f = (g = this.isoWeekYear(), r = this.$u, c = (r ? e.utc : e)().year(g).startOf("year"), y = 4 - c.isoWeekday(), c.isoWeekday() > 4 && (y += 7), c.add(y, a));
1031
- return h.diff(f, "week") + 1;
1032
- }, u.isoWeekday = function(m) {
1033
- return this.$utils().u(m) ? this.day() || 7 : this.day(this.day() % 7 ? m : m - 7);
1663
+ var nn = tn();
1664
+ const rn = /* @__PURE__ */ se(nn);
1665
+ var Te = { exports: {} }, sn = Te.exports, ct;
1666
+ function on() {
1667
+ return ct || (ct = 1, function(s, c) {
1668
+ (function(t, r) {
1669
+ s.exports = r();
1670
+ })(sn, function() {
1671
+ var t = "day";
1672
+ return function(r, n, e) {
1673
+ var a = function(h) {
1674
+ return h.add(4 - h.isoWeekday(), t);
1675
+ }, i = n.prototype;
1676
+ i.isoWeekYear = function() {
1677
+ return a(this).year();
1678
+ }, i.isoWeek = function(h) {
1679
+ if (!this.$utils().u(h)) return this.add(7 * (h - this.isoWeek()), t);
1680
+ var v, p, f, g, $ = a(this), u = (v = this.isoWeekYear(), p = this.$u, f = (p ? e.utc : e)().year(v).startOf("year"), g = 4 - f.isoWeekday(), f.isoWeekday() > 4 && (g += 7), f.add(g, t));
1681
+ return $.diff(u, "week") + 1;
1682
+ }, i.isoWeekday = function(h) {
1683
+ return this.$utils().u(h) ? this.day() || 7 : this.day(this.day() % 7 ? h : h - 7);
1034
1684
  };
1035
- var p = u.startOf;
1036
- u.startOf = function(m, g) {
1037
- var r = this.$utils(), c = !!r.u(g) || g;
1038
- return r.p(m) === "isoweek" ? c ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : p.bind(this)(m, g);
1685
+ var d = i.startOf;
1686
+ i.startOf = function(h, v) {
1687
+ var p = this.$utils(), f = !!p.u(v) || v;
1688
+ return p.p(h) === "isoweek" ? f ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : d.bind(this)(h, v);
1039
1689
  };
1040
1690
  };
1041
1691
  });
1042
1692
  }(Te)), Te.exports;
1043
1693
  }
1044
- var It = Mt();
1045
- const Ot = /* @__PURE__ */ ne(It);
1046
- var ke = { exports: {} }, Rt = ke.exports, Je;
1047
- function Lt() {
1048
- return Je || (Je = 1, function(n, o) {
1049
- (function(a, i) {
1050
- n.exports = i();
1051
- })(Rt, function() {
1052
- return function(a, i) {
1053
- i.prototype.isSameOrAfter = function(s, e) {
1054
- return this.isSame(s, e) || this.isAfter(s, e);
1694
+ var an = on();
1695
+ const un = /* @__PURE__ */ se(an);
1696
+ var Re = { exports: {} }, cn = Re.exports, lt;
1697
+ function ln() {
1698
+ return lt || (lt = 1, function(s, c) {
1699
+ (function(t, r) {
1700
+ s.exports = r();
1701
+ })(cn, function() {
1702
+ return function(t, r) {
1703
+ r.prototype.isSameOrAfter = function(n, e) {
1704
+ return this.isSame(n, e) || this.isAfter(n, e);
1055
1705
  };
1056
1706
  };
1057
1707
  });
1058
- }(ke)), ke.exports;
1708
+ }(Re)), Re.exports;
1059
1709
  }
1060
- var Ft = Lt();
1061
- const jt = /* @__PURE__ */ ne(Ft);
1062
- var Ee = { exports: {} }, Zt = Ee.exports, Qe;
1063
- function _t() {
1064
- return Qe || (Qe = 1, function(n, o) {
1065
- (function(a, i) {
1066
- n.exports = i();
1067
- })(Zt, function() {
1068
- return function(a, i) {
1069
- i.prototype.isSameOrBefore = function(s, e) {
1070
- return this.isSame(s, e) || this.isBefore(s, e);
1710
+ var dn = ln();
1711
+ const fn = /* @__PURE__ */ se(dn);
1712
+ var Ce = { exports: {} }, hn = Ce.exports, dt;
1713
+ function mn() {
1714
+ return dt || (dt = 1, function(s, c) {
1715
+ (function(t, r) {
1716
+ s.exports = r();
1717
+ })(hn, function() {
1718
+ return function(t, r) {
1719
+ r.prototype.isSameOrBefore = function(n, e) {
1720
+ return this.isSame(n, e) || this.isBefore(n, e);
1071
1721
  };
1072
1722
  };
1073
1723
  });
1074
- }(Ee)), Ee.exports;
1724
+ }(Ce)), Ce.exports;
1075
1725
  }
1076
- var Pt = _t();
1077
- const Ct = /* @__PURE__ */ ne(Pt);
1078
- var Me = { exports: {} }, At = Me.exports, Ke;
1079
- function qt() {
1080
- return Ke || (Ke = 1, function(n, o) {
1081
- (function(a, i) {
1082
- n.exports = i();
1083
- })(At, function() {
1084
- return function(a, i, s) {
1085
- i.prototype.isToday = function() {
1086
- var e = "YYYY-MM-DD", l = s();
1087
- return this.format(e) === l.format(e);
1726
+ var pn = mn();
1727
+ const gn = /* @__PURE__ */ se(pn);
1728
+ var Fe = { exports: {} }, vn = Fe.exports, ft;
1729
+ function $n() {
1730
+ return ft || (ft = 1, function(s, c) {
1731
+ (function(t, r) {
1732
+ s.exports = r();
1733
+ })(vn, function() {
1734
+ return function(t, r, n) {
1735
+ r.prototype.isToday = function() {
1736
+ var e = "YYYY-MM-DD", a = n();
1737
+ return this.format(e) === a.format(e);
1088
1738
  };
1089
1739
  };
1090
1740
  });
1091
- }(Me)), Me.exports;
1741
+ }(Fe)), Fe.exports;
1092
1742
  }
1093
- var Wt = qt();
1094
- const Ht = /* @__PURE__ */ ne(Wt);
1095
- var Ie = { exports: {} }, Nt = Ie.exports, et;
1096
- function Ut() {
1097
- return et || (et = 1, function(n, o) {
1098
- (function(a, i) {
1099
- n.exports = i();
1100
- })(Nt, function() {
1101
- return function(a, i, s) {
1102
- var e = i.prototype, l = function(r) {
1103
- return r && (r.indexOf ? r : r.s);
1104
- }, u = function(r, c, y, h, f) {
1105
- var S = r.name ? r : r.$locale(), E = l(S[c]), F = l(S[y]), M = E || F.map(function(L) {
1106
- return L.slice(0, h);
1743
+ var yn = $n();
1744
+ const Sn = /* @__PURE__ */ se(yn);
1745
+ var _e = { exports: {} }, xn = _e.exports, ht;
1746
+ function bn() {
1747
+ return ht || (ht = 1, function(s, c) {
1748
+ (function(t, r) {
1749
+ s.exports = r();
1750
+ })(xn, function() {
1751
+ return function(t, r, n) {
1752
+ var e = r.prototype, a = function(p) {
1753
+ return p && (p.indexOf ? p : p.s);
1754
+ }, i = function(p, f, g, $, u) {
1755
+ var w = p.name ? p : p.$locale(), T = a(w[f]), R = a(w[g]), M = T || R.map(function(W) {
1756
+ return W.slice(0, $);
1107
1757
  });
1108
- if (!f) return M;
1109
- var Z = S.weekStart;
1110
- return M.map(function(L, k) {
1111
- return M[(k + (Z || 0)) % 7];
1758
+ if (!u) return M;
1759
+ var L = w.weekStart;
1760
+ return M.map(function(W, j) {
1761
+ return M[(j + (L || 0)) % 7];
1112
1762
  });
1113
- }, p = function() {
1114
- return s.Ls[s.locale()];
1115
- }, m = function(r, c) {
1116
- return r.formats[c] || function(y) {
1117
- return y.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(h, f, S) {
1118
- return f || S.slice(1);
1763
+ }, d = function() {
1764
+ return n.Ls[n.locale()];
1765
+ }, h = function(p, f) {
1766
+ return p.formats[f] || function(g) {
1767
+ return g.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function($, u, w) {
1768
+ return u || w.slice(1);
1119
1769
  });
1120
- }(r.formats[c.toUpperCase()]);
1121
- }, g = function() {
1122
- var r = this;
1123
- return { months: function(c) {
1124
- return c ? c.format("MMMM") : u(r, "months");
1125
- }, monthsShort: function(c) {
1126
- return c ? c.format("MMM") : u(r, "monthsShort", "months", 3);
1770
+ }(p.formats[f.toUpperCase()]);
1771
+ }, v = function() {
1772
+ var p = this;
1773
+ return { months: function(f) {
1774
+ return f ? f.format("MMMM") : i(p, "months");
1775
+ }, monthsShort: function(f) {
1776
+ return f ? f.format("MMM") : i(p, "monthsShort", "months", 3);
1127
1777
  }, firstDayOfWeek: function() {
1128
- return r.$locale().weekStart || 0;
1129
- }, weekdays: function(c) {
1130
- return c ? c.format("dddd") : u(r, "weekdays");
1131
- }, weekdaysMin: function(c) {
1132
- return c ? c.format("dd") : u(r, "weekdaysMin", "weekdays", 2);
1133
- }, weekdaysShort: function(c) {
1134
- return c ? c.format("ddd") : u(r, "weekdaysShort", "weekdays", 3);
1135
- }, longDateFormat: function(c) {
1136
- return m(r.$locale(), c);
1778
+ return p.$locale().weekStart || 0;
1779
+ }, weekdays: function(f) {
1780
+ return f ? f.format("dddd") : i(p, "weekdays");
1781
+ }, weekdaysMin: function(f) {
1782
+ return f ? f.format("dd") : i(p, "weekdaysMin", "weekdays", 2);
1783
+ }, weekdaysShort: function(f) {
1784
+ return f ? f.format("ddd") : i(p, "weekdaysShort", "weekdays", 3);
1785
+ }, longDateFormat: function(f) {
1786
+ return h(p.$locale(), f);
1137
1787
  }, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
1138
1788
  };
1139
1789
  e.localeData = function() {
1140
- return g.bind(this)();
1141
- }, s.localeData = function() {
1142
- var r = p();
1790
+ return v.bind(this)();
1791
+ }, n.localeData = function() {
1792
+ var p = d();
1143
1793
  return { firstDayOfWeek: function() {
1144
- return r.weekStart || 0;
1794
+ return p.weekStart || 0;
1145
1795
  }, weekdays: function() {
1146
- return s.weekdays();
1796
+ return n.weekdays();
1147
1797
  }, weekdaysShort: function() {
1148
- return s.weekdaysShort();
1798
+ return n.weekdaysShort();
1149
1799
  }, weekdaysMin: function() {
1150
- return s.weekdaysMin();
1800
+ return n.weekdaysMin();
1151
1801
  }, months: function() {
1152
- return s.months();
1802
+ return n.months();
1153
1803
  }, monthsShort: function() {
1154
- return s.monthsShort();
1155
- }, longDateFormat: function(c) {
1156
- return m(r, c);
1157
- }, meridiem: r.meridiem, ordinal: r.ordinal };
1158
- }, s.months = function() {
1159
- return u(p(), "months");
1160
- }, s.monthsShort = function() {
1161
- return u(p(), "monthsShort", "months", 3);
1162
- }, s.weekdays = function(r) {
1163
- return u(p(), "weekdays", null, null, r);
1164
- }, s.weekdaysShort = function(r) {
1165
- return u(p(), "weekdaysShort", "weekdays", 3, r);
1166
- }, s.weekdaysMin = function(r) {
1167
- return u(p(), "weekdaysMin", "weekdays", 2, r);
1804
+ return n.monthsShort();
1805
+ }, longDateFormat: function(f) {
1806
+ return h(p, f);
1807
+ }, meridiem: p.meridiem, ordinal: p.ordinal };
1808
+ }, n.months = function() {
1809
+ return i(d(), "months");
1810
+ }, n.monthsShort = function() {
1811
+ return i(d(), "monthsShort", "months", 3);
1812
+ }, n.weekdays = function(p) {
1813
+ return i(d(), "weekdays", null, null, p);
1814
+ }, n.weekdaysShort = function(p) {
1815
+ return i(d(), "weekdaysShort", "weekdays", 3, p);
1816
+ }, n.weekdaysMin = function(p) {
1817
+ return i(d(), "weekdaysMin", "weekdays", 2, p);
1168
1818
  };
1169
1819
  };
1170
1820
  });
1171
- }(Ie)), Ie.exports;
1821
+ }(_e)), _e.exports;
1172
1822
  }
1173
- var zt = Ut();
1174
- const Yt = /* @__PURE__ */ ne(zt);
1175
- var Oe = { exports: {} }, Bt = Oe.exports, tt;
1176
- function Gt() {
1177
- return tt || (tt = 1, function(n, o) {
1178
- (function(a, i) {
1179
- n.exports = i();
1180
- })(Bt, function() {
1181
- var a = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, i = {};
1182
- return function(s, e, l) {
1183
- var u, p = function(c, y, h) {
1184
- h === void 0 && (h = {});
1185
- var f = new Date(c), S = function(E, F) {
1186
- F === void 0 && (F = {});
1187
- var M = F.timeZoneName || "short", Z = E + "|" + M, L = i[Z];
1188
- return L || (L = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: E, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: M }), i[Z] = L), L;
1189
- }(y, h);
1190
- return S.formatToParts(f);
1191
- }, m = function(c, y) {
1192
- for (var h = p(c, y), f = [], S = 0; S < h.length; S += 1) {
1193
- var E = h[S], F = E.type, M = E.value, Z = a[F];
1194
- Z >= 0 && (f[Z] = parseInt(M, 10));
1823
+ var Dn = bn();
1824
+ const wn = /* @__PURE__ */ se(Dn);
1825
+ var ze = { exports: {} }, Mn = ze.exports, mt;
1826
+ function In() {
1827
+ return mt || (mt = 1, function(s, c) {
1828
+ (function(t, r) {
1829
+ s.exports = r();
1830
+ })(Mn, function() {
1831
+ return function(t, r, n) {
1832
+ var e = function(a, i) {
1833
+ if (!i || !i.length || i.length === 1 && !i[0] || i.length === 1 && Array.isArray(i[0]) && !i[0].length) return null;
1834
+ var d;
1835
+ i.length === 1 && i[0].length > 0 && (i = i[0]), d = (i = i.filter(function(v) {
1836
+ return v;
1837
+ }))[0];
1838
+ for (var h = 1; h < i.length; h += 1) i[h].isValid() && !i[h][a](d) || (d = i[h]);
1839
+ return d;
1840
+ };
1841
+ n.max = function() {
1842
+ var a = [].slice.call(arguments, 0);
1843
+ return e("isAfter", a);
1844
+ }, n.min = function() {
1845
+ var a = [].slice.call(arguments, 0);
1846
+ return e("isBefore", a);
1847
+ };
1848
+ };
1849
+ });
1850
+ }(ze)), ze.exports;
1851
+ }
1852
+ var En = In();
1853
+ const kn = /* @__PURE__ */ se(En);
1854
+ var je = { exports: {} }, On = je.exports, pt;
1855
+ function Tn() {
1856
+ return pt || (pt = 1, function(s, c) {
1857
+ (function(t, r) {
1858
+ s.exports = r();
1859
+ })(On, function() {
1860
+ var t = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, r = {};
1861
+ return function(n, e, a) {
1862
+ var i, d = function(f, g, $) {
1863
+ $ === void 0 && ($ = {});
1864
+ var u = new Date(f), w = function(T, R) {
1865
+ R === void 0 && (R = {});
1866
+ var M = R.timeZoneName || "short", L = T + "|" + M, W = r[L];
1867
+ return W || (W = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: T, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: M }), r[L] = W), W;
1868
+ }(g, $);
1869
+ return w.formatToParts(u);
1870
+ }, h = function(f, g) {
1871
+ for (var $ = d(f, g), u = [], w = 0; w < $.length; w += 1) {
1872
+ var T = $[w], R = T.type, M = T.value, L = t[R];
1873
+ L >= 0 && (u[L] = parseInt(M, 10));
1195
1874
  }
1196
- var L = f[3], k = L === 24 ? 0 : L, P = f[0] + "-" + f[1] + "-" + f[2] + " " + k + ":" + f[4] + ":" + f[5] + ":000", W = +c;
1197
- return (l.utc(P).valueOf() - (W -= W % 1e3)) / 6e4;
1198
- }, g = e.prototype;
1199
- g.tz = function(c, y) {
1200
- c === void 0 && (c = u);
1201
- var h, f = this.utcOffset(), S = this.toDate(), E = S.toLocaleString("en-US", { timeZone: c }), F = Math.round((S - new Date(E)) / 1e3 / 60), M = 15 * -Math.round(S.getTimezoneOffset() / 15) - F;
1202
- if (!Number(M)) h = this.utcOffset(0, y);
1203
- else if (h = l(E, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(M, !0), y) {
1204
- var Z = h.utcOffset();
1205
- h = h.add(f - Z, "minute");
1875
+ var W = u[3], j = W === 24 ? 0 : W, I = u[0] + "-" + u[1] + "-" + u[2] + " " + j + ":" + u[4] + ":" + u[5] + ":000", D = +f;
1876
+ return (a.utc(I).valueOf() - (D -= D % 1e3)) / 6e4;
1877
+ }, v = e.prototype;
1878
+ v.tz = function(f, g) {
1879
+ f === void 0 && (f = i);
1880
+ var $, u = this.utcOffset(), w = this.toDate(), T = w.toLocaleString("en-US", { timeZone: f }), R = Math.round((w - new Date(T)) / 1e3 / 60), M = 15 * -Math.round(w.getTimezoneOffset() / 15) - R;
1881
+ if (!Number(M)) $ = this.utcOffset(0, g);
1882
+ else if ($ = a(T, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(M, !0), g) {
1883
+ var L = $.utcOffset();
1884
+ $ = $.add(u - L, "minute");
1206
1885
  }
1207
- return h.$x.$timezone = c, h;
1208
- }, g.offsetName = function(c) {
1209
- var y = this.$x.$timezone || l.tz.guess(), h = p(this.valueOf(), y, { timeZoneName: c }).find(function(f) {
1210
- return f.type.toLowerCase() === "timezonename";
1886
+ return $.$x.$timezone = f, $;
1887
+ }, v.offsetName = function(f) {
1888
+ var g = this.$x.$timezone || a.tz.guess(), $ = d(this.valueOf(), g, { timeZoneName: f }).find(function(u) {
1889
+ return u.type.toLowerCase() === "timezonename";
1211
1890
  });
1212
- return h && h.value;
1891
+ return $ && $.value;
1213
1892
  };
1214
- var r = g.startOf;
1215
- g.startOf = function(c, y) {
1216
- if (!this.$x || !this.$x.$timezone) return r.call(this, c, y);
1217
- var h = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
1218
- return r.call(h, c, y).tz(this.$x.$timezone, !0);
1219
- }, l.tz = function(c, y, h) {
1220
- var f = h && y, S = h || y || u, E = m(+l(), S);
1221
- if (typeof c != "string") return l(c).tz(S);
1222
- var F = function(k, P, W) {
1223
- var $ = k - 60 * P * 1e3, d = m($, W);
1224
- if (P === d) return [$, P];
1225
- var O = m($ -= 60 * (d - P) * 1e3, W);
1226
- return d === O ? [$, d] : [k - 60 * Math.min(d, O) * 1e3, Math.max(d, O)];
1227
- }(l.utc(c, f).valueOf(), E, S), M = F[0], Z = F[1], L = l(M).utcOffset(Z);
1228
- return L.$x.$timezone = S, L;
1229
- }, l.tz.guess = function() {
1893
+ var p = v.startOf;
1894
+ v.startOf = function(f, g) {
1895
+ if (!this.$x || !this.$x.$timezone) return p.call(this, f, g);
1896
+ var $ = a(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
1897
+ return p.call($, f, g).tz(this.$x.$timezone, !0);
1898
+ }, a.tz = function(f, g, $) {
1899
+ var u = $ && g, w = $ || g || i, T = h(+a(), w);
1900
+ if (typeof f != "string") return a(f).tz(w);
1901
+ var R = function(j, I, D) {
1902
+ var l = j - 60 * I * 1e3, m = h(l, D);
1903
+ if (I === m) return [l, I];
1904
+ var C = h(l -= 60 * (m - I) * 1e3, D);
1905
+ return m === C ? [l, m] : [j - 60 * Math.min(m, C) * 1e3, Math.max(m, C)];
1906
+ }(a.utc(f, u).valueOf(), T, w), M = R[0], L = R[1], W = a(M).utcOffset(L);
1907
+ return W.$x.$timezone = w, W;
1908
+ }, a.tz.guess = function() {
1230
1909
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
1231
- }, l.tz.setDefault = function(c) {
1232
- u = c;
1910
+ }, a.tz.setDefault = function(f) {
1911
+ i = f;
1233
1912
  };
1234
1913
  };
1235
1914
  });
1236
- }(Oe)), Oe.exports;
1915
+ }(je)), je.exports;
1237
1916
  }
1238
- var Xt = Gt();
1239
- const Vt = /* @__PURE__ */ ne(Xt);
1240
- var Re = { exports: {} }, Jt = Re.exports, nt;
1241
- function Qt() {
1242
- return nt || (nt = 1, function(n, o) {
1243
- (function(a, i) {
1244
- n.exports = i();
1245
- })(Jt, function() {
1246
- return function(a, i, s) {
1247
- s.updateLocale = function(e, l) {
1248
- var u = s.Ls[e];
1249
- if (u) return (l ? Object.keys(l) : []).forEach(function(p) {
1250
- u[p] = l[p];
1251
- }), u;
1917
+ var Rn = Tn();
1918
+ const Cn = /* @__PURE__ */ se(Rn);
1919
+ var Pe = { exports: {} }, Fn = Pe.exports, gt;
1920
+ function _n() {
1921
+ return gt || (gt = 1, function(s, c) {
1922
+ (function(t, r) {
1923
+ s.exports = r();
1924
+ })(Fn, function() {
1925
+ return function(t, r, n) {
1926
+ n.updateLocale = function(e, a) {
1927
+ var i = n.Ls[e];
1928
+ if (i) return (a ? Object.keys(a) : []).forEach(function(d) {
1929
+ i[d] = a[d];
1930
+ }), i;
1252
1931
  };
1253
1932
  };
1254
1933
  });
1255
- }(Re)), Re.exports;
1934
+ }(Pe)), Pe.exports;
1256
1935
  }
1257
- var Kt = Qt();
1258
- const en = /* @__PURE__ */ ne(Kt);
1259
- var Le = { exports: {} }, tn = Le.exports, rt;
1260
- function nn() {
1261
- return rt || (rt = 1, function(n, o) {
1262
- (function(a, i) {
1263
- n.exports = i();
1264
- })(tn, function() {
1265
- var a = "minute", i = /[+-]\d\d(?::?\d\d)?/g, s = /([+-]|\d\d)/g;
1266
- return function(e, l, u) {
1267
- var p = l.prototype;
1268
- u.utc = function(f) {
1269
- var S = { date: f, utc: !0, args: arguments };
1270
- return new l(S);
1271
- }, p.utc = function(f) {
1272
- var S = u(this.toDate(), { locale: this.$L, utc: !0 });
1273
- return f ? S.add(this.utcOffset(), a) : S;
1274
- }, p.local = function() {
1275
- return u(this.toDate(), { locale: this.$L, utc: !1 });
1936
+ var zn = _n();
1937
+ const jn = /* @__PURE__ */ se(zn);
1938
+ var Ae = { exports: {} }, Pn = Ae.exports, vt;
1939
+ function An() {
1940
+ return vt || (vt = 1, function(s, c) {
1941
+ (function(t, r) {
1942
+ s.exports = r();
1943
+ })(Pn, function() {
1944
+ var t = "minute", r = /[+-]\d\d(?::?\d\d)?/g, n = /([+-]|\d\d)/g;
1945
+ return function(e, a, i) {
1946
+ var d = a.prototype;
1947
+ i.utc = function(u) {
1948
+ var w = { date: u, utc: !0, args: arguments };
1949
+ return new a(w);
1950
+ }, d.utc = function(u) {
1951
+ var w = i(this.toDate(), { locale: this.$L, utc: !0 });
1952
+ return u ? w.add(this.utcOffset(), t) : w;
1953
+ }, d.local = function() {
1954
+ return i(this.toDate(), { locale: this.$L, utc: !1 });
1276
1955
  };
1277
- var m = p.parse;
1278
- p.parse = function(f) {
1279
- f.utc && (this.$u = !0), this.$utils().u(f.$offset) || (this.$offset = f.$offset), m.call(this, f);
1956
+ var h = d.parse;
1957
+ d.parse = function(u) {
1958
+ u.utc && (this.$u = !0), this.$utils().u(u.$offset) || (this.$offset = u.$offset), h.call(this, u);
1280
1959
  };
1281
- var g = p.init;
1282
- p.init = function() {
1960
+ var v = d.init;
1961
+ d.init = function() {
1283
1962
  if (this.$u) {
1284
- var f = this.$d;
1285
- this.$y = f.getUTCFullYear(), this.$M = f.getUTCMonth(), this.$D = f.getUTCDate(), this.$W = f.getUTCDay(), this.$H = f.getUTCHours(), this.$m = f.getUTCMinutes(), this.$s = f.getUTCSeconds(), this.$ms = f.getUTCMilliseconds();
1286
- } else g.call(this);
1963
+ var u = this.$d;
1964
+ this.$y = u.getUTCFullYear(), this.$M = u.getUTCMonth(), this.$D = u.getUTCDate(), this.$W = u.getUTCDay(), this.$H = u.getUTCHours(), this.$m = u.getUTCMinutes(), this.$s = u.getUTCSeconds(), this.$ms = u.getUTCMilliseconds();
1965
+ } else v.call(this);
1287
1966
  };
1288
- var r = p.utcOffset;
1289
- p.utcOffset = function(f, S) {
1290
- var E = this.$utils().u;
1291
- if (E(f)) return this.$u ? 0 : E(this.$offset) ? r.call(this) : this.$offset;
1292
- if (typeof f == "string" && (f = function(L) {
1293
- L === void 0 && (L = "");
1294
- var k = L.match(i);
1295
- if (!k) return null;
1296
- var P = ("" + k[0]).match(s) || ["-", 0, 0], W = P[0], $ = 60 * +P[1] + +P[2];
1297
- return $ === 0 ? 0 : W === "+" ? $ : -$;
1298
- }(f), f === null)) return this;
1299
- var F = Math.abs(f) <= 16 ? 60 * f : f, M = this;
1300
- if (S) return M.$offset = F, M.$u = f === 0, M;
1301
- if (f !== 0) {
1302
- var Z = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
1303
- (M = this.local().add(F + Z, a)).$offset = F, M.$x.$localOffset = Z;
1967
+ var p = d.utcOffset;
1968
+ d.utcOffset = function(u, w) {
1969
+ var T = this.$utils().u;
1970
+ if (T(u)) return this.$u ? 0 : T(this.$offset) ? p.call(this) : this.$offset;
1971
+ if (typeof u == "string" && (u = function(W) {
1972
+ W === void 0 && (W = "");
1973
+ var j = W.match(r);
1974
+ if (!j) return null;
1975
+ var I = ("" + j[0]).match(n) || ["-", 0, 0], D = I[0], l = 60 * +I[1] + +I[2];
1976
+ return l === 0 ? 0 : D === "+" ? l : -l;
1977
+ }(u), u === null)) return this;
1978
+ var R = Math.abs(u) <= 16 ? 60 * u : u, M = this;
1979
+ if (w) return M.$offset = R, M.$u = u === 0, M;
1980
+ if (u !== 0) {
1981
+ var L = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
1982
+ (M = this.local().add(R + L, t)).$offset = R, M.$x.$localOffset = L;
1304
1983
  } else M = this.utc();
1305
1984
  return M;
1306
1985
  };
1307
- var c = p.format;
1308
- p.format = function(f) {
1309
- var S = f || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
1310
- return c.call(this, S);
1311
- }, p.valueOf = function() {
1312
- var f = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
1313
- return this.$d.valueOf() - 6e4 * f;
1314
- }, p.isUTC = function() {
1986
+ var f = d.format;
1987
+ d.format = function(u) {
1988
+ var w = u || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
1989
+ return f.call(this, w);
1990
+ }, d.valueOf = function() {
1991
+ var u = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
1992
+ return this.$d.valueOf() - 6e4 * u;
1993
+ }, d.isUTC = function() {
1315
1994
  return !!this.$u;
1316
- }, p.toISOString = function() {
1995
+ }, d.toISOString = function() {
1317
1996
  return this.toDate().toISOString();
1318
- }, p.toString = function() {
1997
+ }, d.toString = function() {
1319
1998
  return this.toDate().toUTCString();
1320
1999
  };
1321
- var y = p.toDate;
1322
- p.toDate = function(f) {
1323
- return f === "s" && this.$offset ? u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : y.call(this);
2000
+ var g = d.toDate;
2001
+ d.toDate = function(u) {
2002
+ return u === "s" && this.$offset ? i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : g.call(this);
1324
2003
  };
1325
- var h = p.diff;
1326
- p.diff = function(f, S, E) {
1327
- if (f && this.$u === f.$u) return h.call(this, f, S, E);
1328
- var F = this.local(), M = u(f).local();
1329
- return h.call(F, M, S, E);
2004
+ var $ = d.diff;
2005
+ d.diff = function(u, w, T) {
2006
+ if (u && this.$u === u.$u) return $.call(this, u, w, T);
2007
+ var R = this.local(), M = i(u).local();
2008
+ return $.call(R, M, w, T);
1330
2009
  };
1331
2010
  };
1332
2011
  });
1333
- }(Le)), Le.exports;
2012
+ }(Ae)), Ae.exports;
1334
2013
  }
1335
- var rn = nn();
1336
- const an = /* @__PURE__ */ ne(rn);
1337
- var Fe = { exports: {} }, on = Fe.exports, at;
1338
- function sn() {
1339
- return at || (at = 1, function(n, o) {
1340
- (function(a, i) {
1341
- n.exports = i();
1342
- })(on, function() {
1343
- return function(a, i) {
1344
- i.prototype.weekday = function(s) {
1345
- var e = this.$locale().weekStart || 0, l = this.$W, u = (l < e ? l + 7 : l) - e;
1346
- return this.$utils().u(s) ? u : this.subtract(u, "day").add(s, "day");
2014
+ var Ln = An();
2015
+ const Nn = /* @__PURE__ */ se(Ln);
2016
+ var Le = { exports: {} }, Wn = Le.exports, $t;
2017
+ function qn() {
2018
+ return $t || ($t = 1, function(s, c) {
2019
+ (function(t, r) {
2020
+ s.exports = r();
2021
+ })(Wn, function() {
2022
+ return function(t, r) {
2023
+ r.prototype.weekday = function(n) {
2024
+ var e = this.$locale().weekStart || 0, a = this.$W, i = (a < e ? a + 7 : a) - e;
2025
+ return this.$utils().u(n) ? i : this.subtract(i, "day").add(n, "day");
1347
2026
  };
1348
2027
  };
1349
2028
  });
1350
- }(Fe)), Fe.exports;
1351
- }
1352
- var un = sn();
1353
- const cn = /* @__PURE__ */ ne(un);
1354
- H.extend(cn);
1355
- H.extend(Ht);
1356
- H.extend(an);
1357
- H.extend(Vt);
1358
- H.extend(jt);
1359
- H.extend(Ct);
1360
- H.extend(kt);
1361
- H.extend(Yt);
1362
- H.extend(en);
1363
- H.extend(Ot);
1364
- function dn(n) {
1365
- return [...n].sort((o, a) => {
1366
- const i = o.sequence.split(".").map(Number), s = a.sequence.split(".").map(Number);
1367
- for (let e = 0; e < Math.max(i.length, s.length); e++) {
1368
- const l = i[e] || 0, u = s[e] || 0;
1369
- if (l !== u) return l - u;
1370
- }
1371
- return 0;
1372
- });
2029
+ }(Le)), Le.exports;
1373
2030
  }
1374
- function ln(n) {
1375
- return n.split(".").length - 1;
2031
+ var Hn = qn();
2032
+ const Un = /* @__PURE__ */ se(Hn);
2033
+ K.extend(kn);
2034
+ K.extend(Qt);
2035
+ K.extend(Un);
2036
+ K.extend(Sn);
2037
+ K.extend(Nn);
2038
+ K.extend(Cn);
2039
+ K.extend(fn);
2040
+ K.extend(gn);
2041
+ K.extend(rn);
2042
+ K.extend(wn);
2043
+ K.extend(jn);
2044
+ K.extend(un);
2045
+ function Yn(s, c) {
2046
+ const t = Q((g) => g.setCurrentTask), r = Q((g) => g.rawTasks), n = Q((g) => g.selectedScale), e = Q((g) => g.setDragOffset), a = Q((g) => g.clearDragOffset), i = Q((g) => g.setRawTasks), d = Ne(null), h = Ne(null), v = (g) => {
2047
+ const $ = g.target, u = $.closest('[data-mode="left"]') ? "left" : $.closest('[data-mode="right"]') ? "right" : "bar";
2048
+ d.current = {
2049
+ mode: u,
2050
+ initialClientX: g.clientX,
2051
+ initialLeft: s.barLeft,
2052
+ initialWidth: s.barWidth,
2053
+ initialStartDate: s.startDate,
2054
+ initialEndDate: s.endDate,
2055
+ dragSteps: 0
2056
+ }, t(s), g.currentTarget.setPointerCapture(g.pointerId), h.current = g.pointerId, document.addEventListener("pointermove", p), document.addEventListener("pointerup", f), document.addEventListener("pointercancel", f);
2057
+ }, p = (g) => {
2058
+ const $ = d.current;
2059
+ if (!$) return;
2060
+ const { basePxPerDragStep: u } = fe[n], w = fe[n], T = w.dragStepAmount * {
2061
+ minute: 1,
2062
+ hour: 60,
2063
+ day: 60 * 24,
2064
+ week: 60 * 24 * 7,
2065
+ month: 60 * 24 * 30
2066
+ }[w.dragStepUnit] / w.basePxPerDragStep, R = u;
2067
+ let M = g.clientX - $.initialClientX;
2068
+ $.mode === "left" ? (M = Math.min(M, $.initialWidth - R), M < 0 && (M = Math.floor(M / u) * u)) : $.mode === "right" && (M = Math.max(M, -$.initialWidth + R), M > 0 && (M = Math.ceil(M / u) * u));
2069
+ const L = Math.round(M / u);
2070
+ if (L === $.dragSteps) return;
2071
+ $.dragSteps = L;
2072
+ const W = $.dragSteps * u, j = W * T;
2073
+ let I = K($.initialStartDate), D = K($.initialEndDate);
2074
+ $.mode === "bar" ? (I = I.add(j, "minute"), D = D.add(j, "minute")) : $.mode === "left" ? I = I.add(j, "minute") : $.mode === "right" && (D = D.add(j, "minute"));
2075
+ const l = $.mode === "bar" ? { offsetX: W, offsetWidth: 0, offsetStartDate: I, offsetEndDate: D } : $.mode === "left" ? {
2076
+ offsetX: W,
2077
+ offsetWidth: -W,
2078
+ offsetStartDate: I,
2079
+ offsetEndDate: D
2080
+ } : {
2081
+ offsetX: 0,
2082
+ offsetWidth: W,
2083
+ offsetStartDate: I,
2084
+ offsetEndDate: D
2085
+ };
2086
+ e(s.id, l);
2087
+ }, f = () => {
2088
+ var M;
2089
+ document.removeEventListener("pointermove", p), document.removeEventListener("pointerup", f), document.removeEventListener("pointercancel", f);
2090
+ const g = d.current;
2091
+ if (!g) return;
2092
+ const { dragStepAmount: $, dragStepUnit: u } = fe[n], w = (L) => K(L).add(
2093
+ g.dragSteps * $,
2094
+ u
2095
+ ).toISOString(), T = r.map((L) => {
2096
+ if (L.id !== s.id) return L;
2097
+ switch (g.mode) {
2098
+ case "bar":
2099
+ return {
2100
+ ...L,
2101
+ startDate: w(g.initialStartDate),
2102
+ endDate: w(g.initialEndDate)
2103
+ };
2104
+ case "left":
2105
+ return {
2106
+ ...L,
2107
+ startDate: w(g.initialStartDate)
2108
+ };
2109
+ default:
2110
+ return {
2111
+ ...L,
2112
+ endDate: w(g.initialEndDate)
2113
+ };
2114
+ }
2115
+ });
2116
+ t(null), a(s.id), i(T), c == null || c(T);
2117
+ const R = h.current;
2118
+ R !== null && ((M = document.getElementById(`task-${s.id}`)) == null || M.releasePointerCapture(R)), h.current = null, d.current = null;
2119
+ };
2120
+ return { onPointerDown: v };
1376
2121
  }
1377
- function Pe(n, o, a) {
1378
- const i = dn(n);
1379
- let s = 0;
1380
- return i.map((e) => {
1381
- s++;
1382
- const l = ln(e.sequence), { barMarginLeftAmount: u, barWidthSize: p } = gt(
1383
- H(e.startDate),
1384
- H(e.endDate),
1385
- o,
1386
- a
2122
+ const Bn = (s) => /* @__PURE__ */ ye.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...s }, /* @__PURE__ */ ye.createElement("path", { d: "M10.2 4L10.2 20L7.8 20L7.8 4L10.2 4ZM15 4L15 20L12.6 20L12.6 4L15 4ZM5.4 15.0999L5.4 7.8999L1.8 11.4999L5.4 15.0999ZM17.4 7.8999L17.4 15.0999L21 11.4999L17.4 7.8999Z" }));
2123
+ function yt({
2124
+ side: s,
2125
+ hoveredHandle: c,
2126
+ setHoveredHandle: t
2127
+ }) {
2128
+ return /* @__PURE__ */ q.jsx(
2129
+ "button",
2130
+ {
2131
+ "data-mode": s,
2132
+ onMouseEnter: () => t(s),
2133
+ onMouseLeave: () => t("none"),
2134
+ style: {
2135
+ position: "absolute",
2136
+ top: 0,
2137
+ [s]: -18.4,
2138
+ width: 32,
2139
+ height: "100%",
2140
+ display: "flex",
2141
+ alignItems: "center",
2142
+ justifyContent: "center",
2143
+ cursor: "w-resize",
2144
+ background: "transparent",
2145
+ border: "none",
2146
+ padding: 0
2147
+ },
2148
+ children: /* @__PURE__ */ q.jsx(
2149
+ Bn,
2150
+ {
2151
+ style: {
2152
+ width: 24,
2153
+ height: 24,
2154
+ fill: "#919294",
2155
+ opacity: c === s ? 1 : 0
2156
+ }
2157
+ }
2158
+ )
2159
+ }
2160
+ );
2161
+ }
2162
+ function Vn({
2163
+ currentTask: s,
2164
+ onTasksChange: c
2165
+ }) {
2166
+ const t = Ne(null), { onPointerDown: r } = Yn(s, c), n = Q(
2167
+ (h) => h.dragOffsets[s.id]
2168
+ ), e = (n == null ? void 0 : n.offsetX) ?? 0, a = (n == null ? void 0 : n.offsetWidth) ?? 0, [i, d] = St(
2169
+ "none"
2170
+ );
2171
+ return /* @__PURE__ */ q.jsxs(
2172
+ "div",
2173
+ {
2174
+ ref: t,
2175
+ id: `task-${s.id}`,
2176
+ onPointerDown: r,
2177
+ style: {
2178
+ position: "relative",
2179
+ display: "flex",
2180
+ alignItems: "center",
2181
+ background: "#D6D6D8",
2182
+ transform: `translateX(${s.barLeft + e}px)`,
2183
+ width: s.barWidth + a,
2184
+ height: We / 2,
2185
+ userSelect: "none"
2186
+ },
2187
+ children: [
2188
+ /* @__PURE__ */ q.jsx(
2189
+ yt,
2190
+ {
2191
+ side: "left",
2192
+ hoveredHandle: i,
2193
+ setHoveredHandle: d
2194
+ }
2195
+ ),
2196
+ /* @__PURE__ */ q.jsx(
2197
+ yt,
2198
+ {
2199
+ side: "right",
2200
+ hoveredHandle: i,
2201
+ setHoveredHandle: d
2202
+ }
2203
+ )
2204
+ ]
2205
+ }
2206
+ );
2207
+ }
2208
+ function Gn(s) {
2209
+ return [...s].sort((c, t) => {
2210
+ const r = c.sequence.split(".").map(Number), n = t.sequence.split(".").map(Number);
2211
+ for (let e = 0; e < Math.max(r.length, n.length); e++) {
2212
+ const a = r[e] || 0, i = n[e] || 0;
2213
+ if (a !== i) return a - i;
2214
+ }
2215
+ return 0;
2216
+ });
2217
+ }
2218
+ function Xn(s) {
2219
+ return s.split(".").length - 1;
2220
+ }
2221
+ function Zn(s, c, t) {
2222
+ const r = Gn(s);
2223
+ let n = 0;
2224
+ return r.map((e) => {
2225
+ n++;
2226
+ const a = Xn(e.sequence), { barMarginLeftAmount: i, barWidthSize: d } = Jn(
2227
+ K(e.startDate),
2228
+ K(e.endDate),
2229
+ c,
2230
+ t
1387
2231
  );
1388
2232
  return {
1389
2233
  ...e,
1390
- barLeft: u,
1391
- barWidth: p,
1392
- depth: l,
1393
- order: s,
1394
- originalOrder: s
2234
+ barLeft: i,
2235
+ barWidth: d,
2236
+ depth: a,
2237
+ order: n,
2238
+ originalOrder: n
1395
2239
  };
1396
2240
  });
1397
2241
  }
1398
- const ot = (n) => {
1399
- let o;
1400
- const a = /* @__PURE__ */ new Set(), i = (m, g) => {
1401
- const r = typeof m == "function" ? m(o) : m;
1402
- if (!Object.is(r, o)) {
1403
- const c = o;
1404
- o = g ?? (typeof r != "object" || r === null) ? r : Object.assign({}, o, r), a.forEach((y) => y(o, c));
2242
+ function Jn(s, c, t, r) {
2243
+ if (!t.length)
2244
+ return { barMarginLeftAmount: 0, barWidthSize: 0 };
2245
+ const { tickUnit: n, unitPerTick: e } = fe[r];
2246
+ let a = 0, i = 0, d = !1;
2247
+ for (const h of t) {
2248
+ const v = h.startDate, p = v.add(e, n), f = h.widthPx;
2249
+ if (p.isSameOrBefore(s)) {
2250
+ a += f;
2251
+ continue;
1405
2252
  }
1406
- }, s = () => o, u = { setState: i, getState: s, getInitialState: () => p, subscribe: (m) => (a.add(m), () => a.delete(m)) }, p = o = n(i, s, u);
1407
- return u;
1408
- }, fn = (n) => n ? ot(n) : ot, pn = (n) => n;
1409
- function hn(n, o = pn) {
1410
- const a = Ce.useSyncExternalStore(
1411
- n.subscribe,
1412
- () => o(n.getState()),
1413
- () => o(n.getInitialState())
1414
- );
1415
- return Ce.useDebugValue(a), a;
2253
+ if (v.isSameOrAfter(c))
2254
+ break;
2255
+ const g = s.isAfter(v) ? s : v, $ = c.isBefore(p) ? c : p, u = p.diff(v), T = $.diff(g) / u;
2256
+ if (!d && g.isAfter(v)) {
2257
+ const R = g.diff(v) / u;
2258
+ a += R * f;
2259
+ }
2260
+ i += T * f, d = !0;
2261
+ }
2262
+ return {
2263
+ barMarginLeftAmount: a,
2264
+ barWidthSize: Math.max(i, 1)
2265
+ };
1416
2266
  }
1417
- const st = (n) => {
1418
- const o = fn(n), a = (i) => hn(o, i);
1419
- return Object.assign(a, o), a;
1420
- }, mn = (n) => n ? st(n) : st, ye = mn((n, o) => ({
1421
- rawTasks: [],
1422
- transformedTasks: [],
1423
- bottomRowCells: [],
1424
- topHeaderGroups: [],
1425
- selectedScale: "month",
1426
- minDate: H(),
1427
- maxDate: H(),
1428
- draggingTaskMeta: null,
1429
- setSelectedScale: (a) => {
1430
- const { rawTasks: i, bottomRowCells: s } = o(), e = Pe(i, s, a);
1431
- n({ selectedScale: a, transformedTasks: e });
1432
- },
1433
- setRawTasks: (a) => {
1434
- const { bottomRowCells: i, selectedScale: s } = o(), e = Pe(a, i, s);
1435
- n({ rawTasks: a, transformedTasks: e });
1436
- },
1437
- setBottomRowCells: (a) => {
1438
- const { rawTasks: i, selectedScale: s } = o(), e = Pe(i, a, s);
1439
- n({ bottomRowCells: a, transformedTasks: e });
1440
- },
1441
- setTopHeaderGroups: (a) => n({ topHeaderGroups: a }),
1442
- setMinDate: (a) => n({ minDate: a }),
1443
- setMaxDate: (a) => n({ maxDate: a }),
1444
- setDraggingTaskMeta: (a) => n({ draggingTaskMeta: a }),
1445
- clearDraggingTaskMeta: () => n({ draggingTaskMeta: null })
1446
- })), $n = [{ id: "1", name: "Project Kickoff", startDate: "2024-06-01T09:00:00Z", endDate: "2024-06-01T11:00:00Z", parentId: null, sequence: "1", dependencies: [] }, { id: "2", name: "Requirement Gathering", startDate: "2024-06-02T09:00:00Z", endDate: "2024-06-05T17:00:00Z", parentId: null, sequence: "2", dependencies: [{ targetId: "1", type: "FS" }] }, { id: "3", name: "Stakeholder Interviews", startDate: "2024-06-02T10:00:00Z", endDate: "2024-06-03T17:00:00Z", parentId: "2", sequence: "2.1", dependencies: [{ targetId: "1", type: "SF" }] }, { id: "4", name: "Market Analysis", startDate: "2024-06-06T09:00:00Z", endDate: "2024-06-07T17:00:00Z", parentId: null, sequence: "3", dependencies: [{ targetId: "2", type: "FS" }] }, { id: "5", name: "Design System Creation", startDate: "2024-06-08T09:00:00Z", endDate: "2024-06-12T17:00:00Z", parentId: null, sequence: "4", dependencies: [{ targetId: "2", type: "FS" }, { targetId: "3", type: "SS" }] }, { id: "6", name: "UI/UX Design", startDate: "2024-06-13T09:00:00Z", endDate: "2024-06-16T17:00:00Z", parentId: "5", sequence: "4.1", dependencies: [{ targetId: "5", type: "FS" }] }, { id: "7", name: "Prototyping", startDate: "2024-06-17T09:00:00Z", endDate: "2024-06-20T17:00:00Z", parentId: "6", sequence: "4.1.1", dependencies: [{ targetId: "6", type: "FS" }] }, { id: "8", name: "Frontend Development", startDate: "2024-06-21T09:00:00Z", endDate: "2024-06-30T17:00:00Z", parentId: null, sequence: "5", dependencies: [{ targetId: "7", type: "FS" }] }, { id: "9", name: "Backend Development", startDate: "2024-07-01T09:00:00Z", endDate: "2024-07-10T17:00:00Z", parentId: null, sequence: "6", dependencies: [{ targetId: "7", type: "FS" }] }, { id: "10", name: "API Integration", startDate: "2024-07-11T09:00:00Z", endDate: "2024-07-15T17:00:00Z", parentId: "9", sequence: "6.1", dependencies: [{ targetId: "9", type: "FS" }] }, { id: "11", name: "Module Development", startDate: "2024-07-16T09:00:00Z", endDate: "2024-07-20T17:00:00Z", parentId: "8", sequence: "5.1", dependencies: [{ targetId: "8", type: "FS" }] }, { id: "12", name: "Unit Testing", startDate: "2024-07-21T09:00:00Z", endDate: "2024-07-25T17:00:00Z", parentId: "8", sequence: "5.2", dependencies: [{ targetId: "8", type: "FS" }] }, { id: "13", name: "Integration Testing", startDate: "2024-07-26T09:00:00Z", endDate: "2024-07-30T17:00:00Z", parentId: "10", sequence: "6.1.1", dependencies: [{ targetId: "10", type: "FS" }] }, { id: "14", name: "Code Review", startDate: "2024-07-31T09:00:00Z", endDate: "2024-08-04T17:00:00Z", parentId: "10", sequence: "6.1.2", dependencies: [{ targetId: "13", type: "FS" }] }, { id: "15", name: "Community Feedback", startDate: "2024-08-05T09:00:00Z", endDate: "2024-08-08T17:00:00Z", parentId: null, sequence: "7", dependencies: [{ targetId: "14", type: "FS" }] }, { id: "16", name: "Documentation Drafting", startDate: "2024-08-09T09:00:00Z", endDate: "2024-08-12T17:00:00Z", parentId: null, sequence: "8", dependencies: [{ targetId: "14", type: "FS" }] }, { id: "17", name: "Documentation Finalization", startDate: "2024-08-13T09:00:00Z", endDate: "2024-08-16T17:00:00Z", parentId: "16", sequence: "8.1", dependencies: [{ targetId: "16", type: "FS" }] }, { id: "18", name: "Pre-release Demo", startDate: "2024-08-17T09:00:00Z", endDate: "2024-08-20T17:00:00Z", parentId: null, sequence: "9", dependencies: [{ targetId: "15", type: "FS" }] }, { id: "19", name: "Bug Fixing", startDate: "2024-08-21T09:00:00Z", endDate: "2024-08-25T17:00:00Z", parentId: null, sequence: "10", dependencies: [{ targetId: "15", type: "FS" }] }, { id: "20", name: "Release Candidate", startDate: "2024-08-26T09:00:00Z", endDate: "2024-08-30T17:00:00Z", parentId: null, sequence: "11", dependencies: [{ targetId: "18", type: "FS" }] }, { id: "21", name: "Final Release", startDate: "2024-08-31T09:00:00Z", endDate: "2024-09-02T17:00:00Z", parentId: null, sequence: "12", dependencies: [{ targetId: "20", type: "FS" }] }, { id: "22", name: "Post-release Monitoring", startDate: "2024-09-03T09:00:00Z", endDate: "2024-09-04T17:00:00Z", parentId: null, sequence: "13", dependencies: [{ targetId: "21", type: "FS" }] }, { id: "23", name: "Community Engagement", startDate: "2024-09-05T09:00:00Z", endDate: "2024-09-06T17:00:00Z", parentId: null, sequence: "14", dependencies: [{ targetId: "21", type: "FS" }] }, { id: "24", name: "Feature Iteration Planning", startDate: "2024-09-07T09:00:00Z", endDate: "2024-09-08T17:00:00Z", parentId: null, sequence: "15", dependencies: [{ targetId: "22", type: "FS" }] }, { id: "25", name: "Additional Module Development", startDate: "2024-09-09T09:00:00Z", endDate: "2024-09-10T17:00:00Z", parentId: "24", sequence: "15.1", dependencies: [{ targetId: "24", type: "FS" }] }, { id: "26", name: "Additional Testing", startDate: "2024-09-11T09:00:00Z", endDate: "2024-09-12T17:00:00Z", parentId: "25", sequence: "15.1.1", dependencies: [{ targetId: "25", type: "FS" }] }, { id: "27", name: "Code Refactoring", startDate: "2024-09-13T09:00:00Z", endDate: "2024-09-14T17:00:00Z", parentId: null, sequence: "16", dependencies: [{ targetId: "26", type: "FS" }] }, { id: "28", name: "Performance Optimization", startDate: "2024-09-15T09:00:00Z", endDate: "2024-09-16T17:00:00Z", parentId: "27", sequence: "16.1", dependencies: [{ targetId: "27", type: "FS" }] }, { id: "29", name: "Security Audit", startDate: "2024-09-17T09:00:00Z", endDate: "2024-09-18T17:00:00Z", parentId: null, sequence: "17", dependencies: [{ targetId: "28", type: "FS" }] }, { id: "30", name: "Final QA", startDate: "2024-09-19T09:00:00Z", endDate: "2024-09-20T17:00:00Z", parentId: null, sequence: "18", dependencies: [{ targetId: "29", type: "FS" }] }, { id: "31", name: "Launch Webinar", startDate: "2024-09-21T09:00:00Z", endDate: "2024-09-22T17:00:00Z", parentId: null, sequence: "19", dependencies: [{ targetId: "21", type: "SS" }] }, { id: "32", name: "Marketing Campaign", startDate: "2024-09-23T09:00:00Z", endDate: "2024-09-24T17:00:00Z", parentId: null, sequence: "20", dependencies: [{ targetId: "21", type: "SF" }] }, { id: "33", name: "Post-release Bug Fixing", startDate: "2024-09-25T09:00:00Z", endDate: "2024-09-26T17:00:00Z", parentId: null, sequence: "21", dependencies: [{ targetId: "22", type: "SS" }] }, { id: "34", name: "Version 1.1 Planning", startDate: "2024-09-27T09:00:00Z", endDate: "2024-09-28T17:00:00Z", parentId: null, sequence: "22", dependencies: [{ targetId: "24", type: "FS" }] }, { id: "35", name: "Feature Implementation", startDate: "2024-09-29T09:00:00Z", endDate: "2024-09-30T17:00:00Z", parentId: "34", sequence: "22.1", dependencies: [{ targetId: "34", type: "FS" }] }, { id: "36", name: "Beta Testing", startDate: "2024-10-01T09:00:00Z", endDate: "2024-10-02T17:00:00Z", parentId: "35", sequence: "22.1.1", dependencies: [{ targetId: "35", type: "FS" }] }, { id: "37", name: "Community Beta Feedback", startDate: "2024-10-03T09:00:00Z", endDate: "2024-10-04T17:00:00Z", parentId: "36", sequence: "22.1.2", dependencies: [{ targetId: "36", type: "FS" }] }, { id: "38", name: "Final Beta Fixes", startDate: "2024-10-05T09:00:00Z", endDate: "2024-10-06T17:00:00Z", parentId: "37", sequence: "22.1.3", dependencies: [{ targetId: "37", type: "FS" }] }, { id: "39", name: "Documentation Update", startDate: "2024-10-07T09:00:00Z", endDate: "2024-10-08T17:00:00Z", parentId: "17", sequence: "8.1.1", dependencies: [{ targetId: "17", type: "FS" }] }, { id: "40", name: "Final Release Version 1.1", startDate: "2024-10-09T09:00:00Z", endDate: "2024-10-10T17:00:00Z", parentId: null, sequence: "23", dependencies: [{ targetId: "38", type: "FS" }] }, { id: "41", name: "Project Retrospective", startDate: "2024-10-11T09:00:00Z", endDate: "2024-10-12T17:00:00Z", parentId: null, sequence: "24", dependencies: [{ targetId: "40", type: "FS" }] }], it = (n) => /* @__PURE__ */ Ne.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ Ne.createElement("path", { d: "M10.2 4L10.2 20L7.8 20L7.8 4L10.2 4ZM15 4L15 20L12.6 20L12.6 4L15 4ZM5.4 15.0999L5.4 7.8999L1.8 11.4999L5.4 15.0999ZM17.4 7.8999L17.4 15.0999L21 11.4999L17.4 7.8999Z" }));
1447
- function me(n, o) {
1448
- const { basePxPerDragStep: a } = K[o];
1449
- return Math.round(n / a);
2267
+ function Kn(s) {
2268
+ let c = 1 / 0, t = -1 / 0;
2269
+ for (const { startDate: r, endDate: n } of Object.values(s)) {
2270
+ const e = K(r).valueOf(), a = K(n).valueOf();
2271
+ Number.isNaN(e) || (c = Math.min(c, e)), Number.isNaN(a) || (t = Math.max(t, a));
2272
+ }
2273
+ return { minDate: K(c), maxDate: K(t) };
1450
2274
  }
1451
- function gn(n, o, a) {
1452
- const {
1453
- rawTasks: i,
1454
- selectedScale: s,
1455
- setRawTasks: e,
1456
- setDraggingTaskMeta: l,
1457
- clearDraggingTaskMeta: u
1458
- } = ye(), [p, m] = oe(o), g = V(o), r = V(null), c = V(o), y = V(n.startDate), h = V(n.endDate), f = (F) => {
1459
- r.current = F.clientX, c.current = o, y.current = n.startDate, h.current = n.endDate, m(o), g.current = o, l({ taskId: n.id, type: "bar" }), document.addEventListener("mousemove", S), document.addEventListener("mouseup", E);
1460
- }, S = (F) => {
1461
- if (r.current === null) return;
1462
- const M = F.clientX - r.current, L = me(M, s) * K[s].basePxPerDragStep, k = c.current + L;
1463
- m(k), g.current = k;
1464
- }, E = () => {
1465
- document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", E);
1466
- const F = g.current - c.current, M = me(F, s), { dragStepUnit: Z, dragStepAmount: L } = K[s], k = i.map(
1467
- (P) => P.id === n.id ? {
1468
- ...P,
1469
- startDate: H(y.current).add(M * L, Z).toISOString(),
1470
- endDate: H(h.current).add(M * L, Z).toISOString()
1471
- } : P
1472
- );
1473
- e(k), a == null || a(k), u(), r.current = null;
2275
+ function Qn(s, c, t) {
2276
+ const { tickUnit: r, unitPerTick: n } = fe[t];
2277
+ return {
2278
+ paddedMinDate: s.subtract(
2279
+ st * n,
2280
+ r
2281
+ ),
2282
+ paddedMaxDate: c.add(st * n, r)
1474
2283
  };
1475
- return { onDragStart: f, tempLeft: p };
1476
2284
  }
1477
- function vn(n, o, a, i) {
2285
+ function er(s, c, t) {
1478
2286
  const {
1479
- rawTasks: s,
1480
- selectedScale: e,
1481
- setRawTasks: l,
1482
- setDraggingTaskMeta: u,
1483
- clearDraggingTaskMeta: p
1484
- } = ye(), [m, g] = oe(o), [r, c] = oe(a), y = V(o), h = V(a), f = V(null), S = V(o), E = V(a), F = V(n.startDate), M = (k) => {
1485
- k.stopPropagation(), f.current = k.clientX, S.current = o, E.current = a, F.current = n.startDate, g(o), c(a), y.current = o, h.current = a, u({ taskId: n.id, type: "left" }), document.addEventListener("mousemove", Z), document.addEventListener("mouseup", L);
1486
- }, Z = (k) => {
1487
- if (f.current == null) return;
1488
- const P = k.clientX - f.current, $ = me(P, e) * K[e].basePxPerDragStep, d = S.current + $, O = E.current - $;
1489
- O < 1 || (g(d), c(O), y.current = d, h.current = O);
1490
- }, L = () => {
1491
- document.removeEventListener("mousemove", Z), document.removeEventListener("mouseup", L);
1492
- const k = y.current - S.current, P = me(k, e), { dragStepUnit: W, dragStepAmount: $ } = K[e], d = s.map((O) => {
1493
- if (O.id !== n.id) return O;
1494
- const B = H(F.current).add(
1495
- P * $,
1496
- W
1497
- );
1498
- return B.isAfter(H(O.endDate)) ? O : { ...O, startDate: B.toISOString() };
1499
- });
1500
- l(d), i == null || i(d), p(), f.current = null;
1501
- };
1502
- return { onDragStart: M, tempLeft: m, tempWidth: r };
2287
+ tickUnit: r,
2288
+ unitPerTick: n,
2289
+ basePxPerDragStep: e,
2290
+ dragStepUnit: a,
2291
+ dragStepAmount: i
2292
+ } = fe[t], d = [];
2293
+ let h = s.startOf(r);
2294
+ for (; h.isBefore(c); ) {
2295
+ const v = K(h).add(n, r).diff(h, a) / i;
2296
+ d.push({
2297
+ startDate: h,
2298
+ widthPx: v * e
2299
+ }), h = h.add(n, r);
2300
+ }
2301
+ return d;
1503
2302
  }
1504
- function yn(n, o, a) {
1505
- const {
1506
- rawTasks: i,
1507
- selectedScale: s,
1508
- setRawTasks: e,
1509
- setDraggingTaskMeta: l,
1510
- clearDraggingTaskMeta: u
1511
- } = ye(), [p, m] = oe(o), g = V(o), r = V(null), c = V(o), y = V(n.endDate), h = (E) => {
1512
- E.stopPropagation(), r.current = E.clientX, c.current = o, y.current = n.endDate, m(o), g.current = o, l({ taskId: n.id, type: "right" }), document.addEventListener("mousemove", f), document.addEventListener("mouseup", S);
1513
- }, f = (E) => {
1514
- if (r.current === null) return;
1515
- const F = E.clientX - r.current, Z = me(F, s) * K[s].basePxPerDragStep, L = c.current + Z;
1516
- L < 1 || (m(L), g.current = L);
1517
- }, S = () => {
1518
- document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", S);
1519
- const E = g.current - c.current, F = me(E, s), { dragStepUnit: M, dragStepAmount: Z } = K[s], L = i.map((k) => {
1520
- if (k.id !== n.id) return k;
1521
- const P = H(y.current).add(
1522
- F * Z,
1523
- M
1524
- );
1525
- return P.isBefore(H(k.startDate)) ? k : { ...k, endDate: P.toISOString() };
2303
+ function Dt(s, c) {
2304
+ const { labelUnit: t, formatHeaderLabel: r } = fe[c], n = [];
2305
+ let e = null, a = "", i = 0, d = null;
2306
+ return s.forEach((h, v) => {
2307
+ const p = h.startDate.startOf(t), f = p.valueOf(), g = (r == null ? void 0 : r(p)) ?? p.format();
2308
+ f === e ? i += h.widthPx : (e !== null && n.push({
2309
+ label: a,
2310
+ widthPx: i,
2311
+ startDate: d
2312
+ }), e = f, a = g, i = h.widthPx, d = p), v === s.length - 1 && n.push({
2313
+ label: a,
2314
+ widthPx: i,
2315
+ startDate: d
1526
2316
  });
1527
- e(L), a == null || a(L), u(), r.current = null;
1528
- };
1529
- return { onDragStart: h, tempWidth: p };
2317
+ }), n;
1530
2318
  }
1531
- function Dn(n, o, a, i, s) {
1532
- if (a < 0 || s < 0)
1533
- return `M ${o} ${a} h ${(i - o) / 2}`;
1534
- const e = 7, l = 11, u = 25, p = 20, m = `M ${o} ${a}`, g = i - o, r = s - a, c = Math.abs(g), y = Math.abs(r), h = s <= a, f = s >= a, S = i >= o, E = i <= o, F = c > p, M = Math.abs(g / 2), Z = Math.abs(r / 2);
1535
- function L() {
1536
- function $() {
1537
- return (S || E) && f && !F ? "downSmallHorizontal" : (S || E) && h && !F ? "upSmallHorizontal" : f && E ? "downLeft" : f && S ? "downRight" : h && E ? "upLeft" : h && S ? "upRight" : "";
2319
+ function tr(s, c, t, r, n) {
2320
+ const { minDate: e, maxDate: a } = Kn(
2321
+ Object.fromEntries(
2322
+ s.map((f) => [
2323
+ f.id,
2324
+ { startDate: f.startDate, endDate: f.endDate }
2325
+ ])
2326
+ )
2327
+ ), { paddedMinDate: i, paddedMaxDate: d } = Qn(
2328
+ e,
2329
+ a,
2330
+ c
2331
+ ), h = er(
2332
+ i,
2333
+ d,
2334
+ c
2335
+ ), v = Dt(h, c), p = Zn(s, h, c);
2336
+ t(h), r(v), n(p);
2337
+ }
2338
+ const nr = ({
2339
+ bottomRowCells: s,
2340
+ selectedScale: c,
2341
+ width: t,
2342
+ scrollRef: r
2343
+ }) => {
2344
+ const n = fe[c], [e, a] = St(0), i = Q((f) => f.currentTask), d = Q((f) => {
2345
+ if (!i) return "";
2346
+ const g = i.id;
2347
+ return f.dragOffsets[g] ?? "";
2348
+ }), h = Me(
2349
+ () => Dt(s, c),
2350
+ [s, c]
2351
+ ), v = Me(() => {
2352
+ const f = [];
2353
+ for (const g of h) {
2354
+ const $ = f[f.length - 1];
2355
+ $ && $.label === g.label ? $.widthPx += g.widthPx : f.push({ ...g });
1538
2356
  }
1539
- let d = m;
1540
- switch ($()) {
2357
+ return f;
2358
+ }, [h]), p = Me(() => {
2359
+ let f = 0;
2360
+ return v.map((g) => {
2361
+ const $ = { ...g, left: f };
2362
+ return f += g.widthPx, $;
2363
+ });
2364
+ }, [v]);
2365
+ return Ie(() => {
2366
+ const f = r.current;
2367
+ if (!f) return;
2368
+ const g = () => {
2369
+ const $ = f.scrollLeft;
2370
+ for (let u = p.length - 1; u >= 0; u--)
2371
+ if ($ >= p[u].left) {
2372
+ a(u);
2373
+ break;
2374
+ }
2375
+ };
2376
+ return f.addEventListener("scroll", g), g(), () => f.removeEventListener("scroll", g);
2377
+ }, [p]), /* @__PURE__ */ q.jsx(
2378
+ "div",
2379
+ {
2380
+ style: {
2381
+ width: `${t}px`,
2382
+ position: "sticky",
2383
+ top: 0,
2384
+ zIndex: 30,
2385
+ backgroundColor: "#F0F1F2"
2386
+ },
2387
+ children: /* @__PURE__ */ q.jsxs(
2388
+ "div",
2389
+ {
2390
+ style: {
2391
+ display: "flex",
2392
+ flexDirection: "column"
2393
+ },
2394
+ children: [
2395
+ /* @__PURE__ */ q.jsx(
2396
+ "div",
2397
+ {
2398
+ style: {
2399
+ position: "relative",
2400
+ display: "flex",
2401
+ height: "32px"
2402
+ },
2403
+ children: /* @__PURE__ */ q.jsx(
2404
+ "div",
2405
+ {
2406
+ style: {
2407
+ display: "flex"
2408
+ },
2409
+ children: p.map((f, g) => {
2410
+ const $ = g === e;
2411
+ return /* @__PURE__ */ q.jsx(
2412
+ "div",
2413
+ {
2414
+ style: {
2415
+ padding: "8px 0px",
2416
+ fontSize: "14px",
2417
+ fontWeight: "bold",
2418
+ textAlign: "left",
2419
+ width: `${f.widthPx}px`,
2420
+ zIndex: 40,
2421
+ backgroundColor: "#F0F1F2",
2422
+ ...$ && {
2423
+ position: "sticky",
2424
+ left: 0
2425
+ }
2426
+ },
2427
+ children: /* @__PURE__ */ q.jsx(
2428
+ "p",
2429
+ {
2430
+ style: {
2431
+ margin: 0,
2432
+ padding: "0 0px",
2433
+ whiteSpace: "nowrap"
2434
+ },
2435
+ children: f.label
2436
+ }
2437
+ )
2438
+ },
2439
+ g
2440
+ );
2441
+ })
2442
+ }
2443
+ )
2444
+ }
2445
+ ),
2446
+ /* @__PURE__ */ q.jsxs(
2447
+ "div",
2448
+ {
2449
+ style: {
2450
+ borderTop: "1px solid #D6D6D8",
2451
+ display: "flex"
2452
+ },
2453
+ children: [
2454
+ /* @__PURE__ */ q.jsx("div", { children: d && i && /* @__PURE__ */ q.jsxs(
2455
+ "div",
2456
+ {
2457
+ style: {
2458
+ position: "absolute",
2459
+ left: `${d.offsetX + ((i == null ? void 0 : i.barLeft) ?? 0)}px`,
2460
+ zIndex: 60,
2461
+ backgroundColor: "#D6D6D8",
2462
+ width: `${d.offsetWidth + ((i == null ? void 0 : i.barWidth) ?? 0)}px`,
2463
+ height: "22px",
2464
+ display: "flex",
2465
+ alignItems: "center",
2466
+ borderRadius: "100px",
2467
+ opacity: 0.7,
2468
+ fontSize: "12px",
2469
+ overflow: "hidden",
2470
+ justifyContent: "space-between"
2471
+ },
2472
+ children: [
2473
+ c === "week" && /* @__PURE__ */ q.jsxs(q.Fragment, { children: [
2474
+ /* @__PURE__ */ q.jsx("p", { children: d.offsetStartDate.format("h A") }),
2475
+ /* @__PURE__ */ q.jsx("p", { children: d.offsetEndDate.format("h A") })
2476
+ ] }),
2477
+ c === "year" && /* @__PURE__ */ q.jsxs(q.Fragment, { children: [
2478
+ /* @__PURE__ */ q.jsx("p", { children: d.offsetStartDate.format("D") }),
2479
+ /* @__PURE__ */ q.jsx("p", { children: d.offsetEndDate.format("D") })
2480
+ ] })
2481
+ ]
2482
+ }
2483
+ ) }),
2484
+ s.map((f, g) => {
2485
+ var w;
2486
+ const $ = ((w = n.formatTickLabel) == null ? void 0 : w.call(n, f.startDate)) || "", u = `bottom-row-${f.startDate}-${g}`;
2487
+ return /* @__PURE__ */ q.jsx(
2488
+ "div",
2489
+ {
2490
+ style: {
2491
+ position: "relative",
2492
+ lineHeight: "normal",
2493
+ padding: "4px 0",
2494
+ fontSize: "12px",
2495
+ width: `${f.widthPx}px`
2496
+ },
2497
+ children: $
2498
+ },
2499
+ u
2500
+ );
2501
+ })
2502
+ ]
2503
+ }
2504
+ )
2505
+ ]
2506
+ }
2507
+ )
2508
+ }
2509
+ );
2510
+ };
2511
+ function rr(s, c, t, r, n) {
2512
+ if (t < 0 || n < 0)
2513
+ return `M ${c} ${t} h ${(r - c) / 2}`;
2514
+ const e = 7, a = 11, i = 25, d = 20, h = `M ${c} ${t}`, v = r - c, p = n - t, f = Math.abs(v), g = Math.abs(p), $ = n <= t, u = n >= t, w = r >= c, T = r <= c, R = f > d, M = Math.abs(v / 2), L = Math.abs(p / 2);
2515
+ function W() {
2516
+ function l() {
2517
+ return (w || T) && u && !R ? "downSmallHorizontal" : (w || T) && $ && !R ? "upSmallHorizontal" : u && T ? "downLeft" : u && w ? "downRight" : $ && T ? "upLeft" : $ && w ? "upRight" : "";
2518
+ }
2519
+ let m = h;
2520
+ switch (l()) {
1541
2521
  case "downRight": {
1542
- d += ` h ${M - e}`, d += ` a ${e} ${e} 0 0 1 ${e} ${e}`, d += ` v ${r - e * 2}`, d += ` a ${e} ${e} 0 0 0 ${e} ${e}`, d += ` h ${M - e}`;
2522
+ m += ` h ${M - e}`, m += ` a ${e} ${e} 0 0 1 ${e} ${e}`, m += ` v ${p - e * 2}`, m += ` a ${e} ${e} 0 0 0 ${e} ${e}`, m += ` h ${M - e}`;
1543
2523
  break;
1544
2524
  }
1545
2525
  case "upRight": {
1546
- d += ` h ${M - e}`, d += ` a ${e} ${e} 0 0 0 ${e} -${e}`, d += ` v -${y - e * 2}`, d += ` a ${e} ${e} 0 0 1 ${e} -${e}`, d += ` h ${M - e}`;
2526
+ m += ` h ${M - e}`, m += ` a ${e} ${e} 0 0 0 ${e} -${e}`, m += ` v -${g - e * 2}`, m += ` a ${e} ${e} 0 0 1 ${e} -${e}`, m += ` h ${M - e}`;
1547
2527
  break;
1548
2528
  }
1549
2529
  case "downLeft":
1550
2530
  case "downSmallHorizontal": {
1551
- const B = a + r / 2;
1552
- d += ` h ${l}`, d += ` a ${e} ${e} 0 0 1 ${e} ${e}`, d += ` v ${B - a - e * 2}`, d += ` a ${e} ${e} 0 0 1 -${e} ${e}`, d += ` h ${g - 2 * l}`, d += ` a ${e} ${e} 0 0 0 -${e} ${e}`, d += ` v ${B - a - e * 2}`, d += ` a ${e} ${e} 0 0 0 ${e} ${e}`, d += ` h ${l}`;
2531
+ const Y = t + p / 2;
2532
+ m += ` h ${a}`, m += ` a ${e} ${e} 0 0 1 ${e} ${e}`, m += ` v ${Y - t - e * 2}`, m += ` a ${e} ${e} 0 0 1 -${e} ${e}`, m += ` h ${v - 2 * a}`, m += ` a ${e} ${e} 0 0 0 -${e} ${e}`, m += ` v ${Y - t - e * 2}`, m += ` a ${e} ${e} 0 0 0 ${e} ${e}`, m += ` h ${a}`;
1553
2533
  break;
1554
2534
  }
1555
2535
  case "upLeft":
1556
2536
  case "upSmallHorizontal": {
1557
- const B = a + r / 2;
1558
- d += ` h ${l}`, d += ` a ${e} ${e} 0 0 0 ${e} -${e}`, d += ` v -${a - B - e * 2}`, d += ` a ${e} ${e} 0 0 0 -${e} -${e}`, d += ` h ${g - 2 * l}`, d += ` a ${e} ${e} 0 0 1 -${e} -${e}`, d += ` v -${a - B - e * 2}`, d += ` a ${e} ${e} 0 0 1 ${e} -${e}`, d += ` h ${l}`;
2537
+ const Y = t + p / 2;
2538
+ m += ` h ${a}`, m += ` a ${e} ${e} 0 0 0 ${e} -${e}`, m += ` v -${t - Y - e * 2}`, m += ` a ${e} ${e} 0 0 0 -${e} -${e}`, m += ` h ${v - 2 * a}`, m += ` a ${e} ${e} 0 0 1 -${e} -${e}`, m += ` v -${t - Y - e * 2}`, m += ` a ${e} ${e} 0 0 1 ${e} -${e}`, m += ` h ${a}`;
1559
2539
  break;
1560
2540
  }
1561
2541
  default:
1562
- return d;
2542
+ return m;
1563
2543
  }
1564
- return d;
2544
+ return m;
1565
2545
  }
1566
- function k() {
1567
- let $ = m;
1568
- return f && E ? ($ += ` h ${u - l}`, $ += ` a ${e} ${e} 0 0 1 ${e} ${e}`, $ += ` v ${r - e * 2}`, $ += ` a ${e} ${e} 0 0 1 -${e} ${e}`, $ += ` h ${g - e * 2}`) : f && S ? ($ += ` h ${g + u - l}`, $ += ` a ${e} ${e} 0 0 1 ${e} ${e}`, $ += ` v ${r - e * 2}`, $ += ` a ${e} ${e} 0 0 1 -${e} ${e}`, $ += ` h -${u - l}`) : h && E ? ($ += ` h ${u - l}`, $ += ` a ${e} ${e} 0 0 0 ${e} -${e}`, $ += ` v ${r + e * 2}`, $ += ` a ${e} ${e} 0 0 0 -${e} -${e}`, $ += ` h ${g - u + l}`) : h && S && ($ += ` h ${g + u - l}`, $ += ` a ${e} ${e} 0 0 0 ${e} -${e}`, $ += ` v ${r + e * 2}`, $ += ` a ${e} ${e} 0 0 0 -${e} -${e}`, $ += ` h -${u - l}`), $;
2546
+ function j() {
2547
+ let l = h;
2548
+ return u && T ? (l += ` h ${i - a}`, l += ` a ${e} ${e} 0 0 1 ${e} ${e}`, l += ` v ${p - e * 2}`, l += ` a ${e} ${e} 0 0 1 -${e} ${e}`, l += ` h ${v - e * 2}`) : u && w ? (l += ` h ${v + i - a}`, l += ` a ${e} ${e} 0 0 1 ${e} ${e}`, l += ` v ${p - e * 2}`, l += ` a ${e} ${e} 0 0 1 -${e} ${e}`, l += ` h -${i - a}`) : $ && T ? (l += ` h ${i - a}`, l += ` a ${e} ${e} 0 0 0 ${e} -${e}`, l += ` v ${p + e * 2}`, l += ` a ${e} ${e} 0 0 0 -${e} -${e}`, l += ` h ${v - i + a}`) : $ && w && (l += ` h ${v + i - a}`, l += ` a ${e} ${e} 0 0 0 ${e} -${e}`, l += ` v ${p + e * 2}`, l += ` a ${e} ${e} 0 0 0 -${e} -${e}`, l += ` h -${i - a}`), l;
1569
2549
  }
1570
- function P() {
1571
- function $() {
1572
- return (S || E) && f && !F ? "downSmallHorizontal" : (S || E) && h && !F ? "upSmallHorizontal" : f && E ? "downLeft" : f && S ? "downRight" : h && E ? "upLeft" : h && S ? "upRight" : "";
2550
+ function I() {
2551
+ function l() {
2552
+ return (w || T) && u && !R ? "downSmallHorizontal" : (w || T) && $ && !R ? "upSmallHorizontal" : u && T ? "downLeft" : u && w ? "downRight" : $ && T ? "upLeft" : $ && w ? "upRight" : "";
1573
2553
  }
1574
- let d = m;
1575
- switch ($()) {
2554
+ let m = h;
2555
+ switch (l()) {
1576
2556
  case "downRight":
1577
2557
  case "downSmallHorizontal": {
1578
- d += " h -11", d += ` a ${e} ${e} 0 0 0 -${e} ${e}`, d += ` v ${Z - e * 2}`, d += ` a ${e} ${e} 0 0 0 ${e} ${e}`, d += ` h ${l * 2 + g}`, d += ` a ${e} ${e} 0 0 1 ${e} ${e}`, d += ` v ${Z - e * 2}`, d += ` a ${e} ${e} 0 0 1 -${e} ${e}`, d += " h -11";
2558
+ m += " h -11", m += ` a ${e} ${e} 0 0 0 -${e} ${e}`, m += ` v ${L - e * 2}`, m += ` a ${e} ${e} 0 0 0 ${e} ${e}`, m += ` h ${a * 2 + v}`, m += ` a ${e} ${e} 0 0 1 ${e} ${e}`, m += ` v ${L - e * 2}`, m += ` a ${e} ${e} 0 0 1 -${e} ${e}`, m += " h -11";
1579
2559
  break;
1580
2560
  }
1581
2561
  case "upRight":
1582
2562
  case "upSmallHorizontal": {
1583
- d += " h -11", d += ` a ${e} ${e} 0 0 1 -${e} -${e}`, d += ` v ${-(Z - e * 2)}`, d += ` a ${e} ${e} 0 0 1 ${e} -${e}`, d += ` h ${l * 2 + g}`, d += ` a ${e} ${e} 0 0 0 ${e} -${e}`, d += ` v ${-(Z - e * 2)}`, d += ` a ${e} ${e} 0 0 0 -${e} -${e}`, d += " h -11";
2563
+ m += " h -11", m += ` a ${e} ${e} 0 0 1 -${e} -${e}`, m += ` v ${-(L - e * 2)}`, m += ` a ${e} ${e} 0 0 1 ${e} -${e}`, m += ` h ${a * 2 + v}`, m += ` a ${e} ${e} 0 0 0 ${e} -${e}`, m += ` v ${-(L - e * 2)}`, m += ` a ${e} ${e} 0 0 0 -${e} -${e}`, m += " h -11";
1584
2564
  break;
1585
2565
  }
1586
2566
  case "downLeft": {
1587
- d += ` h ${-M + e}`, d += ` a ${e} ${e} 0 0 0 -${e} ${e}`, d += ` v ${y - e * 2}`, d += ` a ${e} ${e} 0 0 1 -${e} ${e}`, d += ` h ${-M + e}`;
2567
+ m += ` h ${-M + e}`, m += ` a ${e} ${e} 0 0 0 -${e} ${e}`, m += ` v ${g - e * 2}`, m += ` a ${e} ${e} 0 0 1 -${e} ${e}`, m += ` h ${-M + e}`;
1588
2568
  break;
1589
2569
  }
1590
2570
  case "upLeft": {
1591
- d += ` h ${-(M - e)}`, d += ` a ${e} ${e} 0 0 1 -${e} -${e}`, d += ` v ${-(y - e * 2)}`, d += ` a ${e} ${e} 0 0 0 -${e} -${e}`, d += ` h ${-M + e}`;
2571
+ m += ` h ${-(M - e)}`, m += ` a ${e} ${e} 0 0 1 -${e} -${e}`, m += ` v ${-(g - e * 2)}`, m += ` a ${e} ${e} 0 0 0 -${e} -${e}`, m += ` h ${-M + e}`;
1592
2572
  break;
1593
2573
  }
1594
2574
  default:
1595
- return d;
2575
+ return m;
1596
2576
  }
1597
- return d;
2577
+ return m;
1598
2578
  }
1599
- function W() {
1600
- let $ = m;
1601
- return f && E ? ($ += ` h ${g - u}`, $ += ` a ${e} ${e} 0 0 0 -${e} ${e}`, $ += ` v ${r - e * 2}`, $ += ` a ${e} ${e} 0 0 0 ${e} ${e}`, $ += ` h ${u}`) : f && S ? ($ += " h -25", $ += ` a ${e} ${e} 0 0 0 -${e} ${e}`, $ += ` v ${r - e * 2}`, $ += ` a ${e} ${e} 0 0 0 ${e} ${e}`, $ += ` h ${g + u}`) : h && E ? ($ += ` h ${g - u}`, $ += ` a ${e} ${e} 0 0 1 -${e} -${e}`, $ += ` v ${r + e * 2}`, $ += ` a ${e} ${e} 0 0 1 ${e} -${e}`, $ += ` h ${u}`) : h && S && ($ += " h -25", $ += ` a ${e} ${e} 0 0 1 -${e} -${e}`, $ += ` v ${r + e * 2}`, $ += ` a ${e} ${e} 0 0 1 ${e} -${e}`, $ += ` h ${g + u}`), $;
2579
+ function D() {
2580
+ let l = h;
2581
+ return u && T ? (l += ` h ${v - i}`, l += ` a ${e} ${e} 0 0 0 -${e} ${e}`, l += ` v ${p - e * 2}`, l += ` a ${e} ${e} 0 0 0 ${e} ${e}`, l += ` h ${i}`) : u && w ? (l += " h -25", l += ` a ${e} ${e} 0 0 0 -${e} ${e}`, l += ` v ${p - e * 2}`, l += ` a ${e} ${e} 0 0 0 ${e} ${e}`, l += ` h ${v + i}`) : $ && T ? (l += ` h ${v - i}`, l += ` a ${e} ${e} 0 0 1 -${e} -${e}`, l += ` v ${p + e * 2}`, l += ` a ${e} ${e} 0 0 1 ${e} -${e}`, l += ` h ${i}`) : $ && w && (l += " h -25", l += ` a ${e} ${e} 0 0 1 -${e} -${e}`, l += ` v ${p + e * 2}`, l += ` a ${e} ${e} 0 0 1 ${e} -${e}`, l += ` h ${v + i}`), l;
1602
2582
  }
1603
- switch (n) {
2583
+ switch (s) {
1604
2584
  case "FS":
1605
- return L();
2585
+ return W();
1606
2586
  case "FF":
1607
- return k();
2587
+ return j();
1608
2588
  case "SF":
1609
- return P();
2589
+ return I();
1610
2590
  case "SS":
1611
- return W();
2591
+ return D();
1612
2592
  default:
1613
- return `${m} L ${i} ${s}`;
2593
+ return `${h} L ${r} ${n}`;
1614
2594
  }
1615
2595
  }
1616
- function Sn({ allTasks: n, currentTask: o, onTasksChange: a }) {
1617
- const [i, s] = oe(!1), [e, l] = oe(!1), { onDragStart: u, tempLeft: p } = gn(o, o.barLeft, a), {
1618
- onDragStart: m,
1619
- tempLeft: g,
1620
- tempWidth: r
1621
- } = vn(
1622
- o,
1623
- o.barLeft,
1624
- o.barWidth,
1625
- a
1626
- ), { onDragStart: c, tempWidth: y } = yn(
1627
- o,
1628
- o.barWidth,
1629
- a
1630
- ), { draggingTaskMeta: h } = ye(), f = (h == null ? void 0 : h.taskId) === o.id;
1631
- let S = !1, E = !1, F = !1;
1632
- f && ((h == null ? void 0 : h.type) === "left" ? S = !0 : (h == null ? void 0 : h.type) === "right" ? E = !0 : (h == null ? void 0 : h.type) === "bar" && (F = !0));
1633
- let M = o.barLeft, Z = o.barWidth;
1634
- S ? (M = g, Z = r) : E ? Z = y : F && (M = p);
1635
- const L = () => /* @__PURE__ */ A.jsx(
1636
- "button",
1637
- {
1638
- type: "button",
1639
- onMouseDown: m,
1640
- onMouseEnter: () => s(!0),
1641
- onMouseLeave: () => s(!1),
1642
- style: {
1643
- position: "absolute",
1644
- top: 0,
1645
- left: "-1.15rem",
1646
- width: "2rem",
1647
- height: "100%",
1648
- display: "flex",
1649
- alignItems: "center",
1650
- justifyContent: "center",
1651
- cursor: "w-resize",
1652
- background: "transparent",
1653
- border: "none",
1654
- padding: 0
1655
- },
1656
- children: /* @__PURE__ */ A.jsx(
1657
- it,
1658
- {
1659
- style: {
1660
- height: "1.5rem",
1661
- width: "1.5rem",
1662
- fill: "#919294",
1663
- opacity: i ? 1 : 0
1664
- // transition: 'opacity 50ms ease-in-out',
1665
- }
1666
- }
1667
- )
2596
+ function sr({
2597
+ transformedTasks: s,
2598
+ visibleRowIndexes: c
2599
+ }) {
2600
+ const t = Q((e) => e.dragOffsets), r = new Set(c), n = [];
2601
+ for (const e of s) {
2602
+ const a = e.order - 1;
2603
+ if (!r.has(a)) continue;
2604
+ const i = t[e.id], d = (i == null ? void 0 : i.offsetX) ?? 0, h = (i == null ? void 0 : i.offsetWidth) ?? 0;
2605
+ for (const v of e.dependencies ?? []) {
2606
+ const p = s.find((j) => j.id === v.targetId);
2607
+ if (!p) continue;
2608
+ const f = p.order - 1, g = We, $ = f * g + g / 2 - 4, u = a * g + g / 2 + 4, w = p.barLeft, T = p.barLeft + p.barWidth, R = e.barLeft + d, M = R + e.barWidth + h, [L, W] = {
2609
+ FS: [T, R],
2610
+ SS: [w, R],
2611
+ FF: [T, M],
2612
+ SF: [w, M]
2613
+ }[v.type];
2614
+ n.push({ ...v, fromX: L, fromY: $, toX: W, toY: u });
1668
2615
  }
1669
- ), k = () => /* @__PURE__ */ A.jsx(
1670
- "button",
2616
+ }
2617
+ return /* @__PURE__ */ q.jsxs(
2618
+ "svg",
1671
2619
  {
1672
- type: "button",
1673
- onMouseDown: c,
1674
- onMouseEnter: () => l(!0),
1675
- onMouseLeave: () => l(!1),
1676
2620
  style: {
1677
2621
  position: "absolute",
1678
2622
  top: 0,
1679
- right: "-1.15rem",
1680
- width: "2rem",
1681
- height: "100%",
1682
- display: "flex",
1683
- alignItems: "center",
1684
- justifyContent: "center",
1685
- cursor: "w-resize",
1686
- background: "transparent",
1687
- border: "none",
1688
- padding: 0
2623
+ left: 0,
2624
+ width: "100%",
2625
+ height: `${s.length * We}px`,
2626
+ pointerEvents: "none",
2627
+ zIndex: 5
1689
2628
  },
1690
- children: /* @__PURE__ */ A.jsx(
1691
- it,
1692
- {
1693
- style: {
1694
- height: "1.5rem",
1695
- width: "1.5rem",
1696
- fill: "#919294",
1697
- opacity: e ? 1 : 0
1698
- // transition: 'opacity 150ms ease-in-out',
2629
+ children: [
2630
+ /* @__PURE__ */ q.jsx("defs", { children: /* @__PURE__ */ q.jsx(
2631
+ "marker",
2632
+ {
2633
+ id: "arrowhead",
2634
+ markerWidth: "6",
2635
+ markerHeight: "6",
2636
+ refX: "5.25",
2637
+ refY: "3",
2638
+ orient: "auto",
2639
+ children: /* @__PURE__ */ q.jsx("polygon", { points: "0 0, 6 3, 0 6" })
1699
2640
  }
1700
- }
1701
- )
1702
- }
1703
- ), P = (o.dependencies || []).map((W) => {
1704
- const $ = n.find((D) => D.id === W.targetId);
1705
- if (!$) return null;
1706
- const d = ut, O = ($.order - 1) * d + d / 2, B = (o.order - 1) * d + d / 2;
1707
- let ee, I;
1708
- switch (W.type) {
1709
- case "FS":
1710
- ee = $.barLeft + $.barWidth, I = o.barLeft;
1711
- break;
1712
- case "SS":
1713
- ee = $.barLeft, I = o.barLeft;
1714
- break;
1715
- case "FF":
1716
- ee = $.barLeft + $.barWidth, I = o.barLeft + o.barWidth;
1717
- break;
1718
- case "SF":
1719
- ee = $.barLeft, I = o.barLeft + o.barWidth;
1720
- break;
1721
- default:
1722
- return console.warn(`Unknown dependency type: ${W.type}`), null;
2641
+ ) }),
2642
+ n.map((e, a) => /* @__PURE__ */ q.jsx(
2643
+ "path",
2644
+ {
2645
+ d: rr(
2646
+ e.type,
2647
+ e.fromX,
2648
+ e.fromY,
2649
+ e.toX,
2650
+ e.toY
2651
+ ),
2652
+ markerEnd: "url(#arrowhead)",
2653
+ fill: "none",
2654
+ style: { stroke: "#000", strokeWidth: 0.75 }
2655
+ },
2656
+ a
2657
+ ))
2658
+ ]
1723
2659
  }
1724
- return {
1725
- ...W,
1726
- fromX: ee,
1727
- fromY: O,
1728
- toX: I,
1729
- toY: B
1730
- };
1731
- }).filter(Boolean);
1732
- return /* @__PURE__ */ A.jsxs(A.Fragment, { children: [
1733
- /* @__PURE__ */ A.jsxs(
1734
- "div",
1735
- {
1736
- role: "button",
1737
- tabIndex: 0,
1738
- onMouseDown: u,
1739
- style: {
1740
- position: "relative",
1741
- display: "flex",
1742
- alignItems: "center",
1743
- backgroundColor: "#D6D6D8",
1744
- marginLeft: `${M}px`,
1745
- width: `${Z}px`,
1746
- height: "1rem"
1747
- },
1748
- children: [
1749
- L(),
1750
- k()
1751
- ]
1752
- }
1753
- ),
1754
- /* @__PURE__ */ A.jsxs(
1755
- "svg",
1756
- {
1757
- style: {
1758
- position: "absolute",
1759
- top: 0,
1760
- left: 0,
1761
- zIndex: 10,
1762
- width: "100%",
1763
- height: "100%",
1764
- pointerEvents: "none"
1765
- },
1766
- children: [
1767
- /* @__PURE__ */ A.jsx("defs", { children: /* @__PURE__ */ A.jsx(
1768
- "marker",
1769
- {
1770
- id: "arrowhead",
1771
- markerWidth: "6",
1772
- markerHeight: "6",
1773
- refX: "5.25",
1774
- refY: "3",
1775
- orient: "auto",
1776
- children: /* @__PURE__ */ A.jsx("polygon", { points: "0 0, 6 3, 0 6", fill: "#000" })
1777
- }
1778
- ) }),
1779
- P.map((W, $) => /* @__PURE__ */ A.jsx(
1780
- "path",
1781
- {
1782
- d: Dn(
1783
- W.type,
1784
- W.fromX,
1785
- W.fromY,
1786
- W.toX,
1787
- W.toY
1788
- ),
1789
- fill: "none",
1790
- markerEnd: "url(#arrowhead)",
1791
- style: { stroke: "#000", strokeWidth: 0.75 }
1792
- },
1793
- $
1794
- ))
1795
- ]
1796
- }
1797
- )
1798
- ] });
2660
+ );
1799
2661
  }
1800
- function bn({ tasks: n, onTasksChange: o, ganttHeight: a, columnWidth: i }) {
1801
- const [s, e] = oe(a || 500), [l, u] = oe(i || 1e3), [p, m] = oe(n || []), g = V(null), {
1802
- rawTasks: r,
1803
- transformedTasks: c,
1804
- selectedScale: y,
1805
- setSelectedScale: h,
1806
- bottomRowCells: f,
1807
- topHeaderGroups: S,
1808
- setRawTasks: E,
1809
- setBottomRowCells: F,
1810
- setTopHeaderGroups: M,
1811
- setMinDate: Z,
1812
- setMaxDate: L
1813
- } = ye();
1814
- return xe(() => {
1815
- n.length === 0 ? m($n) : m(n);
1816
- }, [n]), xe(() => {
1817
- if (!p.length) return;
1818
- const k = Object.fromEntries(
1819
- p.map((P) => [
1820
- P.id,
1821
- { startDate: P.startDate, endDate: P.endDate }
1822
- ])
1823
- );
1824
- St(
1825
- k,
1826
- y,
1827
- Z,
1828
- L,
1829
- F,
1830
- M
2662
+ function S(s, c) {
2663
+ const t = new Date(s);
2664
+ return t.setUTCDate(t.getUTCDate() + c), t;
2665
+ }
2666
+ function y(s, c, t = 0, r = 0) {
2667
+ const n = new Date(s);
2668
+ return n.setUTCHours(c, t, r, 0), n;
2669
+ }
2670
+ function x(s) {
2671
+ return s.toISOString().split(".")[0] + "Z";
2672
+ }
2673
+ const ir = /* @__PURE__ */ new Date(), b = y(new Date(ir), 0, 0, 0), or = [
2674
+ {
2675
+ id: "1",
2676
+ name: "Project Kickoff",
2677
+ startDate: x(y(S(b, 0), 9)),
2678
+ endDate: x(y(S(b, 0), 11)),
2679
+ parentId: null,
2680
+ sequence: "1",
2681
+ dependencies: []
2682
+ },
2683
+ {
2684
+ id: "2",
2685
+ name: "Requirement Gathering",
2686
+ startDate: x(y(S(b, 1), 9)),
2687
+ endDate: x(y(S(b, 4), 17)),
2688
+ parentId: null,
2689
+ sequence: "2",
2690
+ dependencies: [{ targetId: "1", type: "FS" }]
2691
+ },
2692
+ {
2693
+ id: "3",
2694
+ name: "Design Kickoff Meeting",
2695
+ startDate: x(y(S(b, 3), 9)),
2696
+ endDate: x(y(S(b, 3), 17)),
2697
+ parentId: null,
2698
+ sequence: "2.1",
2699
+ dependencies: [{ targetId: "2", type: "SS" }]
2700
+ },
2701
+ {
2702
+ id: "4",
2703
+ name: "Technical Design Review",
2704
+ startDate: x(y(S(b, 5), 9)),
2705
+ endDate: x(y(S(b, 7), 17)),
2706
+ parentId: null,
2707
+ sequence: "3",
2708
+ dependencies: [{ targetId: "3", type: "FS" }]
2709
+ },
2710
+ {
2711
+ id: "5",
2712
+ name: "Frontend Architecture Planning",
2713
+ startDate: x(y(S(b, 8), 9)),
2714
+ endDate: x(y(S(b, 10), 17)),
2715
+ parentId: null,
2716
+ sequence: "4",
2717
+ dependencies: [{ targetId: "4", type: "FS" }]
2718
+ },
2719
+ {
2720
+ id: "6",
2721
+ name: "Backend Architecture Planning",
2722
+ startDate: x(y(S(b, 9), 9)),
2723
+ endDate: x(y(S(b, 11), 17)),
2724
+ parentId: null,
2725
+ sequence: "5",
2726
+ dependencies: [{ targetId: "4", type: "FS" }]
2727
+ },
2728
+ {
2729
+ id: "7",
2730
+ name: "Frontend UI Design",
2731
+ startDate: x(y(S(b, 12), 9)),
2732
+ endDate: x(y(S(b, 17), 17)),
2733
+ parentId: "5",
2734
+ sequence: "4.1",
2735
+ dependencies: [{ targetId: "5", type: "FS" }]
2736
+ },
2737
+ {
2738
+ id: "8",
2739
+ name: "Backend Database Schema Design",
2740
+ startDate: x(y(S(b, 14), 9)),
2741
+ endDate: x(y(S(b, 17), 17)),
2742
+ parentId: "6",
2743
+ sequence: "5.1",
2744
+ dependencies: [{ targetId: "6", type: "FS" }]
2745
+ },
2746
+ {
2747
+ id: "9",
2748
+ name: "User Authentication Development",
2749
+ startDate: x(y(S(b, 18), 9)),
2750
+ endDate: x(y(S(b, 22), 17)),
2751
+ parentId: "7",
2752
+ sequence: "6",
2753
+ dependencies: [{ targetId: "7", type: "FS" }]
2754
+ },
2755
+ {
2756
+ id: "10",
2757
+ name: "Payment Integration Development",
2758
+ startDate: x(y(S(b, 18), 9)),
2759
+ endDate: x(y(S(b, 22), 17)),
2760
+ parentId: "8",
2761
+ sequence: "7",
2762
+ dependencies: [{ targetId: "8", type: "FS" }]
2763
+ },
2764
+ {
2765
+ id: "11",
2766
+ name: "API Endpoints Development",
2767
+ startDate: x(y(S(b, 23), 9)),
2768
+ endDate: x(y(S(b, 27), 17)),
2769
+ parentId: "9",
2770
+ sequence: "6.1",
2771
+ dependencies: [{ targetId: "9", type: "SS" }]
2772
+ },
2773
+ {
2774
+ id: "12",
2775
+ name: "Frontend Component Development",
2776
+ startDate: x(y(S(b, 23), 9)),
2777
+ endDate: x(y(S(b, 28), 17)),
2778
+ parentId: "7",
2779
+ sequence: "4.2",
2780
+ dependencies: [{ targetId: "7", type: "SS" }]
2781
+ },
2782
+ {
2783
+ id: "13",
2784
+ name: "Integration of Frontend and Backend",
2785
+ startDate: x(y(S(b, 28), 9)),
2786
+ endDate: x(y(S(b, 31), 17)),
2787
+ parentId: null,
2788
+ sequence: "8",
2789
+ dependencies: [
2790
+ { targetId: "11", type: "FS" },
2791
+ { targetId: "12", type: "FS" }
2792
+ ]
2793
+ },
2794
+ {
2795
+ id: "14",
2796
+ name: "Performance Optimization",
2797
+ startDate: x(y(S(b, 32), 9)),
2798
+ endDate: x(y(S(b, 35), 17)),
2799
+ parentId: null,
2800
+ sequence: "9",
2801
+ dependencies: [{ targetId: "13", type: "FS" }]
2802
+ },
2803
+ {
2804
+ id: "15",
2805
+ name: "User Acceptance Testing (UAT)",
2806
+ startDate: x(y(S(b, 36), 9)),
2807
+ endDate: x(y(S(b, 39), 17)),
2808
+ parentId: null,
2809
+ sequence: "10",
2810
+ dependencies: [{ targetId: "14", type: "FS" }]
2811
+ },
2812
+ {
2813
+ id: "16",
2814
+ name: "Bug Fixing and Refinement",
2815
+ startDate: x(y(S(b, 40), 9)),
2816
+ endDate: x(y(S(b, 43), 17)),
2817
+ parentId: null,
2818
+ sequence: "11",
2819
+ dependencies: [{ targetId: "15", type: "FS" }]
2820
+ },
2821
+ {
2822
+ id: "17",
2823
+ name: "Pre-Release Demo",
2824
+ startDate: x(y(S(b, 44), 9)),
2825
+ endDate: x(y(S(b, 46), 17)),
2826
+ parentId: null,
2827
+ sequence: "12",
2828
+ dependencies: [{ targetId: "16", type: "FS" }]
2829
+ },
2830
+ {
2831
+ id: "18",
2832
+ name: "Final Release and Deployment",
2833
+ startDate: x(y(S(b, 47), 9)),
2834
+ endDate: x(y(S(b, 50), 17)),
2835
+ parentId: null,
2836
+ sequence: "13",
2837
+ dependencies: [{ targetId: "17", type: "FS" }]
2838
+ },
2839
+ {
2840
+ id: "19",
2841
+ name: "Post-Release Monitoring",
2842
+ startDate: x(y(S(b, 51), 9)),
2843
+ endDate: x(y(S(b, 53), 17)),
2844
+ parentId: null,
2845
+ sequence: "14",
2846
+ dependencies: [{ targetId: "18", type: "FS" }]
2847
+ },
2848
+ {
2849
+ id: "20",
2850
+ name: "Community Engagement and Feedback Collection",
2851
+ startDate: x(y(S(b, 54), 9)),
2852
+ endDate: x(y(S(b, 57), 17)),
2853
+ parentId: null,
2854
+ sequence: "15",
2855
+ dependencies: [{ targetId: "19", type: "FS" }]
2856
+ },
2857
+ {
2858
+ id: "21",
2859
+ name: "Feature Iteration and Updates",
2860
+ startDate: x(y(S(b, 58), 9)),
2861
+ endDate: x(y(S(b, 60), 17)),
2862
+ parentId: null,
2863
+ sequence: "16",
2864
+ dependencies: [{ targetId: "20", type: "SS" }]
2865
+ },
2866
+ {
2867
+ id: "22",
2868
+ name: "Maintenance and Bug Fixing",
2869
+ startDate: x(y(S(b, 61), 9)),
2870
+ endDate: x(y(S(b, 63), 17)),
2871
+ parentId: null,
2872
+ sequence: "17",
2873
+ dependencies: [{ targetId: "21", type: "FS" }]
2874
+ },
2875
+ {
2876
+ id: "23",
2877
+ name: "Database Optimization",
2878
+ startDate: x(y(S(b, 64), 9)),
2879
+ endDate: x(y(S(b, 67), 17)),
2880
+ parentId: null,
2881
+ sequence: "18",
2882
+ dependencies: [{ targetId: "22", type: "FS" }]
2883
+ },
2884
+ {
2885
+ id: "24",
2886
+ name: "Scaling Infrastructure",
2887
+ startDate: x(y(S(b, 68), 9)),
2888
+ endDate: x(y(S(b, 71), 17)),
2889
+ parentId: null,
2890
+ sequence: "19",
2891
+ dependencies: [{ targetId: "23", type: "FS" }]
2892
+ },
2893
+ {
2894
+ id: "25",
2895
+ name: "Security Patch Deployment",
2896
+ startDate: x(y(S(b, 72), 9)),
2897
+ endDate: x(y(S(b, 74), 17)),
2898
+ parentId: null,
2899
+ sequence: "20",
2900
+ dependencies: [{ targetId: "24", type: "FS" }]
2901
+ },
2902
+ {
2903
+ id: "26",
2904
+ name: "Code Refactoring",
2905
+ startDate: x(y(S(b, 75), 9)),
2906
+ endDate: x(y(S(b, 77), 17)),
2907
+ parentId: null,
2908
+ sequence: "21",
2909
+ dependencies: [{ targetId: "25", type: "FS" }]
2910
+ },
2911
+ {
2912
+ id: "27",
2913
+ name: "Mobile Optimization",
2914
+ startDate: x(y(S(b, 78), 9)),
2915
+ endDate: x(y(S(b, 80), 17)),
2916
+ parentId: null,
2917
+ sequence: "22",
2918
+ dependencies: [{ targetId: "26", type: "FS" }]
2919
+ },
2920
+ {
2921
+ id: "28",
2922
+ name: "Testing Environment Setup",
2923
+ startDate: x(y(S(b, 81), 9)),
2924
+ endDate: x(y(S(b, 83), 17)),
2925
+ parentId: null,
2926
+ sequence: "23",
2927
+ dependencies: [{ targetId: "27", type: "FS" }]
2928
+ },
2929
+ {
2930
+ id: "29",
2931
+ name: "Load Testing",
2932
+ startDate: x(y(S(b, 84), 9)),
2933
+ endDate: x(y(S(b, 86), 17)),
2934
+ parentId: null,
2935
+ sequence: "24",
2936
+ dependencies: [{ targetId: "28", type: "FS" }]
2937
+ },
2938
+ {
2939
+ id: "30",
2940
+ name: "API Rate Limiting Implementation",
2941
+ startDate: x(y(S(b, 87), 9)),
2942
+ endDate: x(y(S(b, 89), 17)),
2943
+ parentId: null,
2944
+ sequence: "25",
2945
+ dependencies: [{ targetId: "29", type: "FS" }]
2946
+ },
2947
+ {
2948
+ id: "31",
2949
+ name: "Security Audit",
2950
+ startDate: x(y(S(b, 90), 9)),
2951
+ endDate: x(y(S(b, 92), 17)),
2952
+ parentId: null,
2953
+ sequence: "26",
2954
+ dependencies: [{ targetId: "30", type: "FS" }]
2955
+ },
2956
+ {
2957
+ id: "32",
2958
+ name: "Documentation Update",
2959
+ startDate: x(y(S(b, 93), 9)),
2960
+ endDate: x(y(S(b, 96), 17)),
2961
+ parentId: null,
2962
+ sequence: "27",
2963
+ dependencies: [{ targetId: "31", type: "FS" }]
2964
+ },
2965
+ {
2966
+ id: "33",
2967
+ name: "Feature Freeze",
2968
+ startDate: x(y(S(b, 97), 9)),
2969
+ endDate: x(y(S(b, 99), 17)),
2970
+ parentId: null,
2971
+ sequence: "28",
2972
+ dependencies: [{ targetId: "32", type: "FS" }]
2973
+ },
2974
+ {
2975
+ id: "34",
2976
+ name: "Release Candidate Preparation",
2977
+ startDate: x(y(S(b, 100), 9)),
2978
+ endDate: x(y(S(b, 102), 17)),
2979
+ parentId: null,
2980
+ sequence: "29",
2981
+ dependencies: [{ targetId: "33", type: "FS" }]
2982
+ },
2983
+ {
2984
+ id: "35",
2985
+ name: "User Documentation",
2986
+ startDate: x(y(S(b, 103), 9)),
2987
+ endDate: x(y(S(b, 105), 17)),
2988
+ parentId: null,
2989
+ sequence: "30",
2990
+ dependencies: [{ targetId: "32", type: "SS" }]
2991
+ },
2992
+ {
2993
+ id: "36",
2994
+ name: "Final Testing",
2995
+ startDate: x(y(S(b, 106), 9)),
2996
+ endDate: x(y(S(b, 109), 17)),
2997
+ parentId: null,
2998
+ sequence: "31",
2999
+ dependencies: [{ targetId: "34", type: "FS" }]
3000
+ },
3001
+ {
3002
+ id: "37",
3003
+ name: "Code Deployment",
3004
+ startDate: x(y(S(b, 110), 9)),
3005
+ endDate: x(y(S(b, 112), 17)),
3006
+ parentId: null,
3007
+ sequence: "32",
3008
+ dependencies: [{ targetId: "36", type: "FS" }]
3009
+ },
3010
+ {
3011
+ id: "38",
3012
+ name: "Monitoring Setup",
3013
+ startDate: x(y(S(b, 113), 9)),
3014
+ endDate: x(y(S(b, 115), 17)),
3015
+ parentId: null,
3016
+ sequence: "33",
3017
+ dependencies: [{ targetId: "37", type: "FS" }]
3018
+ },
3019
+ {
3020
+ id: "39",
3021
+ name: "Post-Deployment Testing",
3022
+ startDate: x(y(S(b, 116), 9)),
3023
+ endDate: x(y(S(b, 118), 17)),
3024
+ parentId: null,
3025
+ sequence: "34",
3026
+ dependencies: [{ targetId: "38", type: "FS" }]
3027
+ },
3028
+ {
3029
+ id: "40",
3030
+ name: "Bug Tracking and Resolution",
3031
+ startDate: x(y(S(b, 119), 9)),
3032
+ endDate: x(y(S(b, 121), 17)),
3033
+ parentId: null,
3034
+ sequence: "35",
3035
+ dependencies: [{ targetId: "39", type: "FS" }]
3036
+ },
3037
+ {
3038
+ id: "41",
3039
+ name: "Feature Enhancement Planning",
3040
+ startDate: x(y(S(b, 122), 9)),
3041
+ endDate: x(y(S(b, 124), 17)),
3042
+ parentId: null,
3043
+ sequence: "36",
3044
+ dependencies: [{ targetId: "40", type: "FS" }]
3045
+ },
3046
+ {
3047
+ id: "42",
3048
+ name: "New Feature Design",
3049
+ startDate: x(y(S(b, 125), 9)),
3050
+ endDate: x(y(S(b, 128), 17)),
3051
+ parentId: "41",
3052
+ sequence: "36.1",
3053
+ dependencies: [{ targetId: "41", type: "FS" }]
3054
+ },
3055
+ {
3056
+ id: "43",
3057
+ name: "New Feature Development",
3058
+ startDate: x(y(S(b, 129), 9)),
3059
+ endDate: x(y(S(b, 133), 17)),
3060
+ parentId: "42",
3061
+ sequence: "36.2",
3062
+ dependencies: [{ targetId: "42", type: "FS" }]
3063
+ },
3064
+ {
3065
+ id: "44",
3066
+ name: "Testing of New Feature",
3067
+ startDate: x(y(S(b, 134), 9)),
3068
+ endDate: x(y(S(b, 136), 17)),
3069
+ parentId: "43",
3070
+ sequence: "36.3",
3071
+ dependencies: [{ targetId: "43", type: "FS" }]
3072
+ },
3073
+ {
3074
+ id: "45",
3075
+ name: "User Acceptance Testing (UAT) for New Feature",
3076
+ startDate: x(y(S(b, 137), 9)),
3077
+ endDate: x(y(S(b, 140), 17)),
3078
+ parentId: "44",
3079
+ sequence: "36.4",
3080
+ dependencies: [{ targetId: "44", type: "FS" }]
3081
+ },
3082
+ {
3083
+ id: "46",
3084
+ name: "Feature Release",
3085
+ startDate: x(y(S(b, 141), 9)),
3086
+ endDate: x(y(S(b, 143), 17)),
3087
+ parentId: null,
3088
+ sequence: "37",
3089
+ dependencies: [{ targetId: "45", type: "FS" }]
3090
+ },
3091
+ {
3092
+ id: "47",
3093
+ name: "Performance Testing for New Feature",
3094
+ startDate: x(y(S(b, 144), 9)),
3095
+ endDate: x(y(S(b, 146), 17)),
3096
+ parentId: null,
3097
+ sequence: "38",
3098
+ dependencies: [{ targetId: "46", type: "FS" }]
3099
+ },
3100
+ {
3101
+ id: "48",
3102
+ name: "Final Code Review for New Feature",
3103
+ startDate: x(y(S(b, 147), 9)),
3104
+ endDate: x(y(S(b, 149), 17)),
3105
+ parentId: null,
3106
+ sequence: "39",
3107
+ dependencies: [{ targetId: "47", type: "FS" }]
3108
+ },
3109
+ {
3110
+ id: "49",
3111
+ name: "Production Deployment",
3112
+ startDate: x(y(S(b, 150), 9)),
3113
+ endDate: x(y(S(b, 152), 17)),
3114
+ parentId: null,
3115
+ sequence: "40",
3116
+ dependencies: [{ targetId: "48", type: "FS" }]
3117
+ },
3118
+ {
3119
+ id: "50",
3120
+ name: "Post-Deployment Support",
3121
+ startDate: x(y(S(b, 153), 9)),
3122
+ endDate: x(y(S(b, 156), 17)),
3123
+ parentId: null,
3124
+ sequence: "41",
3125
+ dependencies: [{ targetId: "49", type: "FS" }]
3126
+ }
3127
+ ];
3128
+ function cr({ tasks: s, onTasksChange: c, ganttHeight: t, columnWidth: r }) {
3129
+ var D;
3130
+ const n = Q((l) => l.rawTasks), e = Q((l) => l.setRawTasks), a = Q((l) => l.transformedTasks), i = Q(
3131
+ (l) => l.setTransformedTasks
3132
+ ), d = Q((l) => l.selectedScale), h = Q((l) => l.setSelectedScale), v = Q((l) => l.bottomRowCells), p = Q((l) => l.setBottomRowCells), f = Q((l) => l.topHeaderGroups), g = Q((l) => l.setTopHeaderGroups);
3133
+ Ie(() => {
3134
+ s.length === 0 ? e(or) : e(s);
3135
+ }, [s]), Ie(() => {
3136
+ n.length && tr(
3137
+ n,
3138
+ d,
3139
+ p,
3140
+ g,
3141
+ i
1831
3142
  );
1832
- }, [p, y]), xe(() => {
1833
- !f.length || !p.length || r.length === 0 && E(p);
1834
- }, [f, p]), /* @__PURE__ */ A.jsx(
3143
+ }, [n, d]);
3144
+ const $ = Ne(null), u = rt({
3145
+ count: a.length,
3146
+ getScrollElement: () => $.current,
3147
+ estimateSize: () => We,
3148
+ overscan: 5
3149
+ }), w = rt({
3150
+ horizontal: !0,
3151
+ count: v.length,
3152
+ getScrollElement: () => $.current,
3153
+ estimateSize: (l) => {
3154
+ var m;
3155
+ return ((m = v[l]) == null ? void 0 : m.widthPx) ?? 32;
3156
+ },
3157
+ overscan: 5
3158
+ }), T = w.getVirtualItems(), R = ((D = T[0]) == null ? void 0 : D.start) ?? 0, M = T[T.length - 1], L = M ? M.start + M.size : 0;
3159
+ function W(l, m, C, Y) {
3160
+ return l + m >= C && l <= Y;
3161
+ }
3162
+ const j = Me(
3163
+ () => v.reduce((l, m) => l + m.widthPx, 0),
3164
+ [v]
3165
+ ), I = u.getVirtualItems().map((l) => l.index);
3166
+ return Ie(() => {
3167
+ if (!v.length) return;
3168
+ const l = requestAnimationFrame(() => {
3169
+ w.measure();
3170
+ });
3171
+ return () => cancelAnimationFrame(l);
3172
+ }, [v, w]), /* @__PURE__ */ q.jsx(
1835
3173
  "section",
1836
3174
  {
1837
3175
  style: {
1838
3176
  position: "relative",
1839
3177
  overflow: "auto",
1840
- height: `${s}px`,
1841
- width: `${l}px`,
3178
+ height: typeof t == "number" ? `${t}px` : t,
3179
+ width: typeof r == "number" ? `${r}px` : r,
1842
3180
  backgroundColor: "#FFF",
1843
3181
  fontFamily: "Noto Sans, sans-serif"
1844
3182
  },
1845
- children: /* @__PURE__ */ A.jsx(
3183
+ children: /* @__PURE__ */ q.jsx(
1846
3184
  "div",
1847
3185
  {
1848
3186
  style: {
@@ -1851,7 +3189,7 @@ function bn({ tasks: n, onTasksChange: o, ganttHeight: a, columnWidth: i }) {
1851
3189
  overflow: "hidden",
1852
3190
  backgroundColor: "#FFF"
1853
3191
  },
1854
- children: /* @__PURE__ */ A.jsxs(
3192
+ children: /* @__PURE__ */ q.jsxs(
1855
3193
  "section",
1856
3194
  {
1857
3195
  style: {
@@ -1862,7 +3200,7 @@ function bn({ tasks: n, onTasksChange: o, ganttHeight: a, columnWidth: i }) {
1862
3200
  flexDirection: "column"
1863
3201
  },
1864
3202
  children: [
1865
- /* @__PURE__ */ A.jsx(
3203
+ /* @__PURE__ */ q.jsx(
1866
3204
  "div",
1867
3205
  {
1868
3206
  style: {
@@ -1873,101 +3211,99 @@ function bn({ tasks: n, onTasksChange: o, ganttHeight: a, columnWidth: i }) {
1873
3211
  display: "flex",
1874
3212
  justifyContent: "flex-end",
1875
3213
  alignItems: "center"
1876
- // padding: '4px 8px',
1877
- // backgroundColor: '#FFF',
1878
- // borderBottom: '1px solid #E6E7E9',
1879
3214
  },
1880
- children: /* @__PURE__ */ A.jsx(
3215
+ children: /* @__PURE__ */ q.jsx(
1881
3216
  "select",
1882
3217
  {
1883
3218
  style: {
1884
- // backgroundColor: '#FFF',
1885
3219
  padding: "4px 8px",
1886
- fontSize: "0.875rem",
3220
+ fontSize: "14px",
1887
3221
  borderRadius: "6px",
1888
3222
  border: "1px solid #E6E7E9"
1889
3223
  },
1890
- value: y,
1891
- onChange: (k) => {
1892
- const P = k.target.value;
1893
- h(P);
3224
+ value: d,
3225
+ onChange: (l) => {
3226
+ const m = l.target.value;
3227
+ h(m);
1894
3228
  },
1895
- children: Object.keys(K).map((k) => /* @__PURE__ */ A.jsx("option", { value: k, children: K[k].labelUnit }, k))
3229
+ children: Object.keys(fe).map((l) => /* @__PURE__ */ q.jsx("option", { value: l, children: l }, l))
1896
3230
  }
1897
3231
  )
1898
3232
  }
1899
3233
  ),
1900
- /* @__PURE__ */ A.jsx(
3234
+ /* @__PURE__ */ q.jsxs(
1901
3235
  "div",
1902
3236
  {
1903
- ref: g,
3237
+ ref: $,
3238
+ className: "List",
1904
3239
  style: {
1905
- flexGrow: 1,
1906
- overflowX: "auto"
3240
+ height: "100%",
3241
+ width: "100%",
3242
+ overflow: "auto"
1907
3243
  },
1908
- children: /* @__PURE__ */ A.jsxs(
1909
- "div",
1910
- {
1911
- style: {
1912
- display: "flex",
1913
- minWidth: "max-content",
1914
- flexDirection: "column"
1915
- // backgroundColor: '#FFF',
1916
- },
1917
- children: [
1918
- /* @__PURE__ */ A.jsx(
1919
- xt,
1920
- {
1921
- topHeaderGroups: S,
1922
- bottomRowCells: f,
1923
- selectedScale: y,
1924
- scrollRef: g
1925
- }
1926
- ),
1927
- /* @__PURE__ */ A.jsx(
1928
- "div",
1929
- {
1930
- style: {
1931
- position: "relative",
1932
- display: "flex"
1933
- },
1934
- children: /* @__PURE__ */ A.jsx(
3244
+ children: [
3245
+ /* @__PURE__ */ q.jsx(
3246
+ nr,
3247
+ {
3248
+ topHeaderGroups: f,
3249
+ bottomRowCells: v,
3250
+ selectedScale: d,
3251
+ width: j,
3252
+ scrollRef: $
3253
+ }
3254
+ ),
3255
+ /* @__PURE__ */ q.jsxs(
3256
+ "div",
3257
+ {
3258
+ style: {
3259
+ height: `${u.getTotalSize()}px`,
3260
+ width: `${j}px`,
3261
+ position: "relative"
3262
+ },
3263
+ children: [
3264
+ /* @__PURE__ */ q.jsx(
3265
+ sr,
3266
+ {
3267
+ transformedTasks: a,
3268
+ visibleRowIndexes: I
3269
+ }
3270
+ ),
3271
+ u.getVirtualItems().map((l) => {
3272
+ const m = a[l.index], C = m.barLeft ?? 0, Y = m.barWidth ?? 0, V = W(
3273
+ C,
3274
+ Y,
3275
+ R,
3276
+ L
3277
+ );
3278
+ return /* @__PURE__ */ q.jsx(
1935
3279
  "div",
1936
3280
  {
1937
3281
  style: {
3282
+ position: "absolute",
3283
+ top: 0,
3284
+ left: 0,
3285
+ height: `${l.size - 1}px`,
3286
+ transform: `translateY(${l.start}px)`,
1938
3287
  display: "flex",
1939
- flexGrow: 1,
1940
- flexDirection: "column"
3288
+ width: "100%",
3289
+ alignItems: "center",
3290
+ borderBottom: "1px solid #E6E7E9"
1941
3291
  },
1942
- children: c.map((k) => /* @__PURE__ */ A.jsx(
1943
- "div",
3292
+ children: V && /* @__PURE__ */ q.jsx(q.Fragment, { children: /* @__PURE__ */ q.jsx(
3293
+ Vn,
1944
3294
  {
1945
- style: {
1946
- display: "flex",
1947
- width: "100%",
1948
- alignItems: "center",
1949
- borderBottom: "1px solid #E6E7E9",
1950
- height: `${ut}px`,
1951
- backgroundColor: "#FFF"
1952
- },
1953
- children: /* @__PURE__ */ A.jsx(
1954
- Sn,
1955
- {
1956
- allTasks: c,
1957
- currentTask: k,
1958
- onTasksChange: o
1959
- }
1960
- )
1961
- },
1962
- k.id
1963
- ))
1964
- }
1965
- )
1966
- }
1967
- )
1968
- ]
1969
- }
1970
- )
3295
+ currentTask: m,
3296
+ onTasksChange: c
3297
+ }
3298
+ ) })
3299
+ },
3300
+ l.index
3301
+ );
3302
+ })
3303
+ ]
3304
+ }
3305
+ )
3306
+ ]
1971
3307
  }
1972
3308
  )
1973
3309
  ]
@@ -1979,5 +3315,5 @@ function bn({ tasks: n, onTasksChange: o, ganttHeight: a, columnWidth: i }) {
1979
3315
  );
1980
3316
  }
1981
3317
  export {
1982
- bn as ReactGanttChart
3318
+ cr as ReactGanttChart
1983
3319
  };