react-timelane 0.0.1 → 0.0.3
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/components/Timelane.d.ts +17 -0
- package/dist/components/TimelaneAside.d.ts +13 -0
- package/dist/components/TimelaneBackground.d.ts +5 -0
- package/dist/components/TimelaneBody.d.ts +6 -0
- package/dist/components/TimelaneBodyInner.d.ts +16 -0
- package/dist/components/{TimelineHeader/TimelineHeader.d.ts → TimelaneHeader/TimelaneHeader.d.ts} +2 -2
- package/dist/components/{TimelineHeader → TimelaneHeader}/index.d.ts +1 -1
- package/dist/components/{core/CoreItem → TimelaneItem}/DragResizeComponent.d.ts +2 -2
- package/dist/components/TimelaneItem/TimelaneItem.d.ts +14 -0
- package/dist/components/{core/CoreSwimlane → TimelaneLane}/AvailableSpaceIndicator.d.ts +3 -3
- package/dist/components/{core/CoreSwimlane → TimelaneLane}/DropTarget.d.ts +1 -1
- package/dist/components/{core/CoreSwimlane → TimelaneLane}/OverlapIndicator.d.ts +1 -1
- package/dist/components/{core/CoreSwimlane/CoreSwimlane.d.ts → TimelaneLane/TimelaneLane.d.ts} +7 -7
- package/dist/components/TimelaneLayout/TimelaneLayout.d.ts +23 -0
- package/dist/components/TimelaneSelectionLayer.d.ts +6 -0
- package/dist/components/TimelaneSettingsContext.d.ts +7 -0
- package/dist/components/TimelaneSettingsProvider.d.ts +7 -0
- package/dist/components/{TimelineWrapper.d.ts → TimelaneWrapper.d.ts} +7 -4
- package/dist/components/utils.d.ts +27 -0
- package/dist/hooks/useScroll.d.ts +3 -3
- package/dist/hooks/useTimelaneContext.d.ts +1 -0
- package/dist/index.d.ts +10 -11
- package/dist/react-timelane.css +1 -1
- package/dist/react-timelane.js +1122 -1169
- package/dist/types/Item.d.ts +12 -0
- package/dist/types/Lane.d.ts +5 -0
- package/dist/types/LaneId.d.ts +1 -0
- package/dist/types/{TimelineSettings.d.ts → TimelaneSettings.d.ts} +1 -1
- package/dist/types/index.d.ts +4 -4
- package/package.json +1 -1
- package/vite.config.ts +1 -1
- package/dist/components/TimelineAside.d.ts +0 -13
- package/dist/components/TimelineBackground.d.ts +0 -5
- package/dist/components/TimelineBody.d.ts +0 -13
- package/dist/components/TimelineSelectionLayer.d.ts +0 -6
- package/dist/components/TimelineSettingsContext.d.ts +0 -7
- package/dist/components/TimelineSettingsProvider.d.ts +0 -7
- package/dist/components/core/CoreItem/CoreItemComponent.d.ts +0 -14
- package/dist/components/core/CoreSwimlane/utils.d.ts +0 -13
- package/dist/components/core/utils.d.ts +0 -15
- package/dist/components/layout/TimelineLayout.d.ts +0 -23
- package/dist/hooks/useTimelineContext.d.ts +0 -1
- package/dist/types/CoreItem.d.ts +0 -12
- package/dist/types/SwimlaneId.d.ts +0 -1
- package/dist/types/SwimlaneT.d.ts +0 -5
- /package/dist/components/{TimelineHeader → TimelaneHeader}/DaysHeader.d.ts +0 -0
- /package/dist/components/{TimelineHeader → TimelaneHeader}/MonthsHeader.d.ts +0 -0
- /package/dist/components/{TimelineHeader → TimelaneHeader}/WeeksHeader.d.ts +0 -0
- /package/dist/components/{TimelineHeader → TimelaneHeader}/renderingUtils.d.ts +0 -0
- /package/dist/components/{core/CoreSwimlane → TimelaneLane}/DropPreview.d.ts +0 -0
package/dist/react-timelane.js
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
function
|
|
4
|
-
const t =
|
|
5
|
-
return /* @__PURE__ */
|
|
1
|
+
import { jsx as y, jsxs as Q, Fragment as Oe } from "react/jsx-runtime";
|
|
2
|
+
import kt, { useRef as le, createContext as Qt, useContext as Jt, useEffect as re, memo as Zt, useCallback as Ve, useMemo as er, PureComponent as tr, useState as V } from "react";
|
|
3
|
+
function H({ children: e }) {
|
|
4
|
+
const t = le(null);
|
|
5
|
+
return /* @__PURE__ */ y(
|
|
6
6
|
"div",
|
|
7
7
|
{
|
|
8
|
-
className: "
|
|
8
|
+
className: "timelane-layout",
|
|
9
9
|
onWheel: (r) => {
|
|
10
10
|
t.current && (r.ctrlKey || r.shiftKey) && (t.current.scrollLeft += r.deltaY, r.preventDefault());
|
|
11
11
|
},
|
|
12
12
|
ref: t,
|
|
13
|
-
children: /* @__PURE__ */
|
|
13
|
+
children: /* @__PURE__ */ y("div", { className: "timelane-layout-inner", children: e })
|
|
14
14
|
}
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
|
-
function tr({ children: e }) {
|
|
18
|
-
return /* @__PURE__ */ v("div", { className: "timeline-layout-header", children: e });
|
|
19
|
-
}
|
|
20
17
|
function rr({ children: e }) {
|
|
21
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ y("div", { className: "timelane-layout-header", children: e });
|
|
22
19
|
}
|
|
23
20
|
function nr({ children: e }) {
|
|
24
|
-
return /* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ y("div", { className: "timelane-layout-background", children: e });
|
|
25
22
|
}
|
|
26
23
|
function ir({ children: e }) {
|
|
27
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ y("div", { className: "timelane-layout-body", children: e });
|
|
25
|
+
}
|
|
26
|
+
function ar({ children: e }) {
|
|
27
|
+
return /* @__PURE__ */ y("div", { className: "timelane-layout-footer", children: e });
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function or({
|
|
30
30
|
side: e = "left",
|
|
31
31
|
children: t
|
|
32
32
|
}) {
|
|
33
|
-
return /* @__PURE__ */
|
|
33
|
+
return /* @__PURE__ */ y(
|
|
34
34
|
"div",
|
|
35
35
|
{
|
|
36
|
-
className: `
|
|
36
|
+
className: `timelane-layout-aside ${e == "left" ? "timelane-layout-aside-left" : "timelane-layout-aside-right"}`,
|
|
37
37
|
children: t
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function sr({
|
|
42
42
|
corner: e = "top left",
|
|
43
43
|
children: t
|
|
44
44
|
}) {
|
|
45
45
|
let r = "";
|
|
46
46
|
switch (e) {
|
|
47
47
|
case "top left":
|
|
48
|
-
r = "
|
|
48
|
+
r = "timelane-layout-corner-top-left";
|
|
49
49
|
break;
|
|
50
50
|
case "top right":
|
|
51
|
-
r = "
|
|
51
|
+
r = "timelane-layout-corner-top-right";
|
|
52
52
|
break;
|
|
53
53
|
case "bottom left":
|
|
54
|
-
r = "
|
|
54
|
+
r = "timelane-layout-corner-bottom-left";
|
|
55
55
|
break;
|
|
56
56
|
case "bottom right":
|
|
57
|
-
r = "
|
|
57
|
+
r = "timelane-layout-corner-bottom-right";
|
|
58
58
|
break;
|
|
59
59
|
}
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const
|
|
60
|
+
return /* @__PURE__ */ y("div", { className: `timelane-layout-corner ${r}`, children: t });
|
|
61
|
+
}
|
|
62
|
+
H.Header = rr;
|
|
63
|
+
H.Body = ir;
|
|
64
|
+
H.Background = nr;
|
|
65
|
+
H.Footer = ar;
|
|
66
|
+
H.Aside = or;
|
|
67
|
+
H.Corner = sr;
|
|
68
|
+
const ur = {
|
|
69
69
|
start: new Date(2025, 1, 1),
|
|
70
70
|
end: new Date(2025, 5, 1),
|
|
71
71
|
pixelsPerDay: 30,
|
|
@@ -75,27 +75,27 @@ const sr = {
|
|
|
75
75
|
showDays: !0,
|
|
76
76
|
allowOverlaps: !0,
|
|
77
77
|
focusedDate: null
|
|
78
|
-
},
|
|
79
|
-
settings:
|
|
78
|
+
}, cr = {
|
|
79
|
+
settings: ur,
|
|
80
80
|
setSettings: () => {
|
|
81
81
|
}
|
|
82
|
-
},
|
|
83
|
-
function
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
}, Nt = Qt(cr), pe = () => Jt(Nt);
|
|
83
|
+
function lr({
|
|
84
|
+
lanes: e,
|
|
85
|
+
focusedLane: t,
|
|
86
|
+
setFocusedLane: r = () => {
|
|
87
87
|
},
|
|
88
|
-
|
|
88
|
+
onLaneHeaderClick: n = () => {
|
|
89
89
|
},
|
|
90
|
-
|
|
90
|
+
onLaneHeaderDoubleClick: i = () => {
|
|
91
91
|
},
|
|
92
|
-
|
|
92
|
+
onLaneHeaderContextMenu: a = () => {
|
|
93
93
|
},
|
|
94
|
-
|
|
94
|
+
renderLaneHeader: u = fr
|
|
95
95
|
}) {
|
|
96
|
-
const { settings: c } =
|
|
97
|
-
return /* @__PURE__ */
|
|
98
|
-
|
|
96
|
+
const { settings: c } = pe();
|
|
97
|
+
return /* @__PURE__ */ y(H.Aside, { children: /* @__PURE__ */ y("div", { className: "timelane-aside", children: e && e.map((s) => /* @__PURE__ */ y(
|
|
98
|
+
dr,
|
|
99
99
|
{
|
|
100
100
|
height: c.pixelsPerResource,
|
|
101
101
|
isFocused: t ? t.id === s.id : !1,
|
|
@@ -107,9 +107,9 @@ function fa({
|
|
|
107
107
|
children: u(s)
|
|
108
108
|
},
|
|
109
109
|
s.id
|
|
110
|
-
)) });
|
|
110
|
+
)) }) });
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function dr({
|
|
113
113
|
height: e,
|
|
114
114
|
isFocused: t,
|
|
115
115
|
onClick: r,
|
|
@@ -117,10 +117,10 @@ function cr({
|
|
|
117
117
|
onContextMenu: i,
|
|
118
118
|
children: a
|
|
119
119
|
}) {
|
|
120
|
-
return /* @__PURE__ */
|
|
120
|
+
return /* @__PURE__ */ y(
|
|
121
121
|
"div",
|
|
122
122
|
{
|
|
123
|
-
className: `
|
|
123
|
+
className: `timelane-aside-swimlane-header ${t ? "timelane-aside-swimlane-header-focused" : ""}`,
|
|
124
124
|
style: { height: `${e}px` },
|
|
125
125
|
onClick: r,
|
|
126
126
|
onDoubleClick: n,
|
|
@@ -129,44 +129,44 @@ function cr({
|
|
|
129
129
|
}
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
return /* @__PURE__ */
|
|
132
|
+
function fr(e) {
|
|
133
|
+
return /* @__PURE__ */ y("div", { children: e.id });
|
|
134
134
|
}
|
|
135
|
-
const
|
|
136
|
-
function
|
|
137
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" &&
|
|
135
|
+
const At = 6048e5, hr = 864e5, Qe = Symbol.for("constructDateFrom");
|
|
136
|
+
function C(e, t) {
|
|
137
|
+
return typeof e == "function" ? e(t) : e && typeof e == "object" && Qe in e ? e[Qe](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
138
138
|
}
|
|
139
139
|
function N(e, t) {
|
|
140
|
-
return
|
|
140
|
+
return C(t || e, e);
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function de(e, t, r) {
|
|
143
143
|
const n = N(e, r == null ? void 0 : r.in);
|
|
144
|
-
return isNaN(t) ?
|
|
144
|
+
return isNaN(t) ? C(e, NaN) : (t && n.setDate(n.getDate() + t), n);
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function zt(e, t) {
|
|
147
147
|
return N(e, t == null ? void 0 : t.in).getDay() === 0;
|
|
148
148
|
}
|
|
149
|
-
let
|
|
150
|
-
function
|
|
151
|
-
return
|
|
149
|
+
let gr = {};
|
|
150
|
+
function Me() {
|
|
151
|
+
return gr;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function B(e, t) {
|
|
154
154
|
var c, s, o, f;
|
|
155
|
-
const r =
|
|
155
|
+
const r = Me(), n = (t == null ? void 0 : t.weekStartsOn) ?? ((s = (c = t == null ? void 0 : t.locale) == null ? void 0 : c.options) == null ? void 0 : s.weekStartsOn) ?? r.weekStartsOn ?? ((f = (o = r.locale) == null ? void 0 : o.options) == null ? void 0 : f.weekStartsOn) ?? 0, i = N(e, t == null ? void 0 : t.in), a = i.getDay(), u = (a < n ? 7 : 0) + a - n;
|
|
156
156
|
return i.setDate(i.getDate() - u), i.setHours(0, 0, 0, 0), i;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
159
|
-
return
|
|
158
|
+
function De(e, t) {
|
|
159
|
+
return B(e, { ...t, weekStartsOn: 1 });
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
const r = N(e, t == null ? void 0 : t.in), n = r.getFullYear(), i =
|
|
161
|
+
function _t(e, t) {
|
|
162
|
+
const r = N(e, t == null ? void 0 : t.in), n = r.getFullYear(), i = C(r, 0);
|
|
163
163
|
i.setFullYear(n + 1, 0, 4), i.setHours(0, 0, 0, 0);
|
|
164
|
-
const a =
|
|
164
|
+
const a = De(i), u = C(r, 0);
|
|
165
165
|
u.setFullYear(n, 0, 4), u.setHours(0, 0, 0, 0);
|
|
166
|
-
const c =
|
|
166
|
+
const c = De(u);
|
|
167
167
|
return r.getTime() >= a.getTime() ? n + 1 : r.getTime() >= c.getTime() ? n : n - 1;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Je(e) {
|
|
170
170
|
const t = N(e), r = new Date(
|
|
171
171
|
Date.UTC(
|
|
172
172
|
t.getFullYear(),
|
|
@@ -180,92 +180,92 @@ function Qe(e) {
|
|
|
180
180
|
);
|
|
181
181
|
return r.setUTCFullYear(t.getFullYear()), +e - +r;
|
|
182
182
|
}
|
|
183
|
-
function
|
|
184
|
-
const r =
|
|
183
|
+
function je(e, ...t) {
|
|
184
|
+
const r = C.bind(
|
|
185
185
|
null,
|
|
186
186
|
e || t.find((n) => typeof n == "object")
|
|
187
187
|
);
|
|
188
188
|
return t.map(r);
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function Te(e, t) {
|
|
191
191
|
const r = N(e, t == null ? void 0 : t.in);
|
|
192
192
|
return r.setHours(0, 0, 0, 0), r;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
195
|
-
const [n, i] =
|
|
194
|
+
function q(e, t, r) {
|
|
195
|
+
const [n, i] = je(
|
|
196
196
|
r == null ? void 0 : r.in,
|
|
197
197
|
e,
|
|
198
198
|
t
|
|
199
|
-
), a =
|
|
200
|
-
return Math.round((c - s) /
|
|
199
|
+
), a = Te(n), u = Te(i), c = +a - Je(a), s = +u - Je(u);
|
|
200
|
+
return Math.round((c - s) / hr);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
const r =
|
|
204
|
-
return n.setFullYear(r, 0, 4), n.setHours(0, 0, 0, 0),
|
|
202
|
+
function pr(e, t) {
|
|
203
|
+
const r = _t(e, t), n = C(e, 0);
|
|
204
|
+
return n.setFullYear(r, 0, 4), n.setHours(0, 0, 0, 0), De(n);
|
|
205
205
|
}
|
|
206
|
-
function
|
|
207
|
-
return
|
|
206
|
+
function mr(e, t, r) {
|
|
207
|
+
return de(e, t * 7, r);
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function yr(e, t) {
|
|
210
210
|
let r, n = t == null ? void 0 : t.in;
|
|
211
211
|
return e.forEach((i) => {
|
|
212
|
-
!n && typeof i == "object" && (n =
|
|
212
|
+
!n && typeof i == "object" && (n = C.bind(null, i));
|
|
213
213
|
const a = N(i, n);
|
|
214
214
|
(!r || r < a || isNaN(+a)) && (r = a);
|
|
215
|
-
}),
|
|
215
|
+
}), C(n, r || NaN);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function vr(e, t) {
|
|
218
218
|
let r, n = t == null ? void 0 : t.in;
|
|
219
219
|
return e.forEach((i) => {
|
|
220
|
-
!n && typeof i == "object" && (n =
|
|
220
|
+
!n && typeof i == "object" && (n = C.bind(null, i));
|
|
221
221
|
const a = N(i, n);
|
|
222
222
|
(!r || r > a || isNaN(+a)) && (r = a);
|
|
223
|
-
}),
|
|
223
|
+
}), C(n, r || NaN);
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
const [n, i] =
|
|
225
|
+
function br(e, t, r) {
|
|
226
|
+
const [n, i] = je(
|
|
227
227
|
r == null ? void 0 : r.in,
|
|
228
228
|
e,
|
|
229
229
|
t
|
|
230
230
|
);
|
|
231
|
-
return +
|
|
231
|
+
return +Te(n) == +Te(i);
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function wr(e) {
|
|
234
234
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
235
235
|
}
|
|
236
|
-
function
|
|
237
|
-
return !(!
|
|
236
|
+
function xr(e) {
|
|
237
|
+
return !(!wr(e) && typeof e != "number" || isNaN(+N(e)));
|
|
238
238
|
}
|
|
239
|
-
function
|
|
240
|
-
const [r, n] =
|
|
239
|
+
function Be(e, t) {
|
|
240
|
+
const [r, n] = je(e, t.start, t.end);
|
|
241
241
|
return { start: r, end: n };
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
const { start: r, end: n } =
|
|
243
|
+
function Wt(e, t) {
|
|
244
|
+
const { start: r, end: n } = Be(t == null ? void 0 : t.in, e);
|
|
245
245
|
let i = +r > +n;
|
|
246
246
|
const a = i ? +r : +n, u = i ? n : r;
|
|
247
247
|
u.setHours(0, 0, 0, 0);
|
|
248
248
|
let c = 1;
|
|
249
249
|
const s = [];
|
|
250
250
|
for (; +u <= a; )
|
|
251
|
-
s.push(
|
|
251
|
+
s.push(C(r, u)), u.setDate(u.getDate() + c), u.setHours(0, 0, 0, 0);
|
|
252
252
|
return i ? s.reverse() : s;
|
|
253
253
|
}
|
|
254
|
-
function
|
|
255
|
-
const { start: r, end: n } =
|
|
254
|
+
function Sr(e, t) {
|
|
255
|
+
const { start: r, end: n } = Be(t == null ? void 0 : t.in, e);
|
|
256
256
|
let i = +r > +n;
|
|
257
257
|
const a = i ? +r : +n, u = i ? n : r;
|
|
258
258
|
u.setHours(0, 0, 0, 0), u.setDate(1);
|
|
259
259
|
let c = 1;
|
|
260
260
|
const s = [];
|
|
261
261
|
for (; +u <= a; )
|
|
262
|
-
s.push(
|
|
262
|
+
s.push(C(r, u)), u.setMonth(u.getMonth() + c);
|
|
263
263
|
return i ? s.reverse() : s;
|
|
264
264
|
}
|
|
265
|
-
function
|
|
266
|
-
const { start: r, end: n } =
|
|
265
|
+
function Or(e, t) {
|
|
266
|
+
const { start: r, end: n } = Be(t == null ? void 0 : t.in, e);
|
|
267
267
|
let i = +r > +n;
|
|
268
|
-
const a =
|
|
268
|
+
const a = B(i ? n : r, t), u = B(i ? r : n, t);
|
|
269
269
|
a.setHours(15), u.setHours(15);
|
|
270
270
|
const c = +u.getTime();
|
|
271
271
|
let s = a, o = (t == null ? void 0 : t.step) ?? 1;
|
|
@@ -273,14 +273,14 @@ function xr(e, t) {
|
|
|
273
273
|
o < 0 && (o = -o, i = !i);
|
|
274
274
|
const f = [];
|
|
275
275
|
for (; +s <= c; )
|
|
276
|
-
s.setHours(0), f.push(
|
|
276
|
+
s.setHours(0), f.push(C(r, s)), s = mr(s, o), s.setHours(15);
|
|
277
277
|
return i ? f.reverse() : f;
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function Dr(e, t) {
|
|
280
280
|
const r = N(e, t == null ? void 0 : t.in);
|
|
281
281
|
return r.setFullYear(r.getFullYear(), 0, 1), r.setHours(0, 0, 0, 0), r;
|
|
282
282
|
}
|
|
283
|
-
const
|
|
283
|
+
const Tr = {
|
|
284
284
|
lessThanXSeconds: {
|
|
285
285
|
one: "less than a second",
|
|
286
286
|
other: "less than {{count}} seconds"
|
|
@@ -342,54 +342,54 @@ const Or = {
|
|
|
342
342
|
one: "almost 1 year",
|
|
343
343
|
other: "almost {{count}} years"
|
|
344
344
|
}
|
|
345
|
-
},
|
|
345
|
+
}, Mr = (e, t, r) => {
|
|
346
346
|
let n;
|
|
347
|
-
const i =
|
|
347
|
+
const i = Tr[e];
|
|
348
348
|
return typeof i == "string" ? n = i : t === 1 ? n = i.one : n = i.other.replace("{{count}}", t.toString()), r != null && r.addSuffix ? r.comparison && r.comparison > 0 ? "in " + n : n + " ago" : n;
|
|
349
349
|
};
|
|
350
|
-
function
|
|
350
|
+
function Ee(e) {
|
|
351
351
|
return (t = {}) => {
|
|
352
352
|
const r = t.width ? String(t.width) : e.defaultWidth;
|
|
353
353
|
return e.formats[r] || e.formats[e.defaultWidth];
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
|
-
const
|
|
356
|
+
const Er = {
|
|
357
357
|
full: "EEEE, MMMM do, y",
|
|
358
358
|
long: "MMMM do, y",
|
|
359
359
|
medium: "MMM d, y",
|
|
360
360
|
short: "MM/dd/yyyy"
|
|
361
|
-
},
|
|
361
|
+
}, Pr = {
|
|
362
362
|
full: "h:mm:ss a zzzz",
|
|
363
363
|
long: "h:mm:ss a z",
|
|
364
364
|
medium: "h:mm:ss a",
|
|
365
365
|
short: "h:mm a"
|
|
366
|
-
},
|
|
366
|
+
}, Rr = {
|
|
367
367
|
full: "{{date}} 'at' {{time}}",
|
|
368
368
|
long: "{{date}} 'at' {{time}}",
|
|
369
369
|
medium: "{{date}}, {{time}}",
|
|
370
370
|
short: "{{date}}, {{time}}"
|
|
371
|
-
},
|
|
372
|
-
date:
|
|
373
|
-
formats:
|
|
371
|
+
}, kr = {
|
|
372
|
+
date: Ee({
|
|
373
|
+
formats: Er,
|
|
374
374
|
defaultWidth: "full"
|
|
375
375
|
}),
|
|
376
|
-
time:
|
|
377
|
-
formats:
|
|
376
|
+
time: Ee({
|
|
377
|
+
formats: Pr,
|
|
378
378
|
defaultWidth: "full"
|
|
379
379
|
}),
|
|
380
|
-
dateTime:
|
|
381
|
-
formats:
|
|
380
|
+
dateTime: Ee({
|
|
381
|
+
formats: Rr,
|
|
382
382
|
defaultWidth: "full"
|
|
383
383
|
})
|
|
384
|
-
},
|
|
384
|
+
}, Nr = {
|
|
385
385
|
lastWeek: "'last' eeee 'at' p",
|
|
386
386
|
yesterday: "'yesterday at' p",
|
|
387
387
|
today: "'today at' p",
|
|
388
388
|
tomorrow: "'tomorrow at' p",
|
|
389
389
|
nextWeek: "eeee 'at' p",
|
|
390
390
|
other: "P"
|
|
391
|
-
},
|
|
392
|
-
function
|
|
391
|
+
}, Ar = (e, t, r, n) => Nr[e];
|
|
392
|
+
function ae(e) {
|
|
393
393
|
return (t, r) => {
|
|
394
394
|
const n = r != null && r.context ? String(r.context) : "standalone";
|
|
395
395
|
let i;
|
|
@@ -404,15 +404,15 @@ function ie(e) {
|
|
|
404
404
|
return i[a];
|
|
405
405
|
};
|
|
406
406
|
}
|
|
407
|
-
const
|
|
407
|
+
const zr = {
|
|
408
408
|
narrow: ["B", "A"],
|
|
409
409
|
abbreviated: ["BC", "AD"],
|
|
410
410
|
wide: ["Before Christ", "Anno Domini"]
|
|
411
|
-
},
|
|
411
|
+
}, _r = {
|
|
412
412
|
narrow: ["1", "2", "3", "4"],
|
|
413
413
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
414
414
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
415
|
-
},
|
|
415
|
+
}, Wr = {
|
|
416
416
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
417
417
|
abbreviated: [
|
|
418
418
|
"Jan",
|
|
@@ -455,7 +455,7 @@ const Nr = {
|
|
|
455
455
|
"Friday",
|
|
456
456
|
"Saturday"
|
|
457
457
|
]
|
|
458
|
-
},
|
|
458
|
+
}, Lr = {
|
|
459
459
|
narrow: {
|
|
460
460
|
am: "a",
|
|
461
461
|
pm: "p",
|
|
@@ -486,7 +486,7 @@ const Nr = {
|
|
|
486
486
|
evening: "evening",
|
|
487
487
|
night: "night"
|
|
488
488
|
}
|
|
489
|
-
},
|
|
489
|
+
}, Hr = {
|
|
490
490
|
narrow: {
|
|
491
491
|
am: "a",
|
|
492
492
|
pm: "p",
|
|
@@ -517,7 +517,7 @@ const Nr = {
|
|
|
517
517
|
evening: "in the evening",
|
|
518
518
|
night: "at night"
|
|
519
519
|
}
|
|
520
|
-
},
|
|
520
|
+
}, Ir = (e, t) => {
|
|
521
521
|
const r = Number(e), n = r % 100;
|
|
522
522
|
if (n > 20 || n < 10)
|
|
523
523
|
switch (n % 10) {
|
|
@@ -529,40 +529,40 @@ const Nr = {
|
|
|
529
529
|
return r + "rd";
|
|
530
530
|
}
|
|
531
531
|
return r + "th";
|
|
532
|
-
},
|
|
533
|
-
ordinalNumber:
|
|
534
|
-
era:
|
|
535
|
-
values:
|
|
532
|
+
}, jr = {
|
|
533
|
+
ordinalNumber: Ir,
|
|
534
|
+
era: ae({
|
|
535
|
+
values: zr,
|
|
536
536
|
defaultWidth: "wide"
|
|
537
537
|
}),
|
|
538
|
-
quarter:
|
|
539
|
-
values:
|
|
538
|
+
quarter: ae({
|
|
539
|
+
values: _r,
|
|
540
540
|
defaultWidth: "wide",
|
|
541
541
|
argumentCallback: (e) => e - 1
|
|
542
542
|
}),
|
|
543
|
-
month:
|
|
544
|
-
values:
|
|
543
|
+
month: ae({
|
|
544
|
+
values: Wr,
|
|
545
545
|
defaultWidth: "wide"
|
|
546
546
|
}),
|
|
547
|
-
day:
|
|
547
|
+
day: ae({
|
|
548
548
|
values: Cr,
|
|
549
549
|
defaultWidth: "wide"
|
|
550
550
|
}),
|
|
551
|
-
dayPeriod:
|
|
552
|
-
values:
|
|
551
|
+
dayPeriod: ae({
|
|
552
|
+
values: Lr,
|
|
553
553
|
defaultWidth: "wide",
|
|
554
|
-
formattingValues:
|
|
554
|
+
formattingValues: Hr,
|
|
555
555
|
defaultFormattingWidth: "wide"
|
|
556
556
|
})
|
|
557
557
|
};
|
|
558
|
-
function
|
|
558
|
+
function oe(e) {
|
|
559
559
|
return (t, r = {}) => {
|
|
560
560
|
const n = r.width, i = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], a = t.match(i);
|
|
561
561
|
if (!a)
|
|
562
562
|
return null;
|
|
563
|
-
const u = a[0], c = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], s = Array.isArray(c) ?
|
|
563
|
+
const u = a[0], c = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], s = Array.isArray(c) ? Yr(c, (l) => l.test(u)) : (
|
|
564
564
|
// [TODO] -- I challenge you to fix the type
|
|
565
|
-
|
|
565
|
+
Br(c, (l) => l.test(u))
|
|
566
566
|
);
|
|
567
567
|
let o;
|
|
568
568
|
o = e.valueCallback ? e.valueCallback(s) : s, o = r.valueCallback ? (
|
|
@@ -573,17 +573,17 @@ function ae(e) {
|
|
|
573
573
|
return { value: o, rest: f };
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
|
-
function
|
|
576
|
+
function Br(e, t) {
|
|
577
577
|
for (const r in e)
|
|
578
578
|
if (Object.prototype.hasOwnProperty.call(e, r) && t(e[r]))
|
|
579
579
|
return r;
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function Yr(e, t) {
|
|
582
582
|
for (let r = 0; r < e.length; r++)
|
|
583
583
|
if (t(e[r]))
|
|
584
584
|
return r;
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function Fr(e) {
|
|
587
587
|
return (t, r = {}) => {
|
|
588
588
|
const n = t.match(e.matchPattern);
|
|
589
589
|
if (!n) return null;
|
|
@@ -595,23 +595,23 @@ function Yr(e) {
|
|
|
595
595
|
return { value: u, rest: c };
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
|
-
const
|
|
598
|
+
const $r = /^(\d+)(th|st|nd|rd)?/i, qr = /\d+/i, Xr = {
|
|
599
599
|
narrow: /^(b|a)/i,
|
|
600
600
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
601
601
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
602
|
-
},
|
|
602
|
+
}, Ur = {
|
|
603
603
|
any: [/^b/i, /^(a|c)/i]
|
|
604
|
-
},
|
|
604
|
+
}, Gr = {
|
|
605
605
|
narrow: /^[1234]/i,
|
|
606
606
|
abbreviated: /^q[1234]/i,
|
|
607
607
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
608
|
-
},
|
|
608
|
+
}, Kr = {
|
|
609
609
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
610
|
-
},
|
|
610
|
+
}, Vr = {
|
|
611
611
|
narrow: /^[jfmasond]/i,
|
|
612
612
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
613
613
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
614
|
-
},
|
|
614
|
+
}, Qr = {
|
|
615
615
|
narrow: [
|
|
616
616
|
/^j/i,
|
|
617
617
|
/^f/i,
|
|
@@ -640,18 +640,18 @@ const Fr = /^(\d+)(th|st|nd|rd)?/i, Br = /\d+/i, $r = {
|
|
|
640
640
|
/^n/i,
|
|
641
641
|
/^d/i
|
|
642
642
|
]
|
|
643
|
-
},
|
|
643
|
+
}, Jr = {
|
|
644
644
|
narrow: /^[smtwf]/i,
|
|
645
645
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
646
646
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
647
647
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
648
|
-
},
|
|
648
|
+
}, Zr = {
|
|
649
649
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
650
650
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
651
|
-
},
|
|
651
|
+
}, en = {
|
|
652
652
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
653
653
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
654
|
-
},
|
|
654
|
+
}, tn = {
|
|
655
655
|
any: {
|
|
656
656
|
am: /^a/i,
|
|
657
657
|
pm: /^p/i,
|
|
@@ -662,80 +662,80 @@ const Fr = /^(\d+)(th|st|nd|rd)?/i, Br = /\d+/i, $r = {
|
|
|
662
662
|
evening: /evening/i,
|
|
663
663
|
night: /night/i
|
|
664
664
|
}
|
|
665
|
-
},
|
|
666
|
-
ordinalNumber:
|
|
667
|
-
matchPattern:
|
|
668
|
-
parsePattern:
|
|
665
|
+
}, rn = {
|
|
666
|
+
ordinalNumber: Fr({
|
|
667
|
+
matchPattern: $r,
|
|
668
|
+
parsePattern: qr,
|
|
669
669
|
valueCallback: (e) => parseInt(e, 10)
|
|
670
670
|
}),
|
|
671
|
-
era:
|
|
672
|
-
matchPatterns: $r,
|
|
673
|
-
defaultMatchWidth: "wide",
|
|
674
|
-
parsePatterns: qr,
|
|
675
|
-
defaultParseWidth: "any"
|
|
676
|
-
}),
|
|
677
|
-
quarter: ae({
|
|
671
|
+
era: oe({
|
|
678
672
|
matchPatterns: Xr,
|
|
679
673
|
defaultMatchWidth: "wide",
|
|
680
674
|
parsePatterns: Ur,
|
|
681
|
-
defaultParseWidth: "any"
|
|
682
|
-
valueCallback: (e) => e + 1
|
|
675
|
+
defaultParseWidth: "any"
|
|
683
676
|
}),
|
|
684
|
-
|
|
677
|
+
quarter: oe({
|
|
685
678
|
matchPatterns: Gr,
|
|
686
679
|
defaultMatchWidth: "wide",
|
|
687
680
|
parsePatterns: Kr,
|
|
688
|
-
defaultParseWidth: "any"
|
|
681
|
+
defaultParseWidth: "any",
|
|
682
|
+
valueCallback: (e) => e + 1
|
|
689
683
|
}),
|
|
690
|
-
|
|
684
|
+
month: oe({
|
|
691
685
|
matchPatterns: Vr,
|
|
692
686
|
defaultMatchWidth: "wide",
|
|
693
687
|
parsePatterns: Qr,
|
|
694
688
|
defaultParseWidth: "any"
|
|
695
689
|
}),
|
|
696
|
-
|
|
690
|
+
day: oe({
|
|
697
691
|
matchPatterns: Jr,
|
|
698
|
-
defaultMatchWidth: "
|
|
692
|
+
defaultMatchWidth: "wide",
|
|
699
693
|
parsePatterns: Zr,
|
|
700
694
|
defaultParseWidth: "any"
|
|
695
|
+
}),
|
|
696
|
+
dayPeriod: oe({
|
|
697
|
+
matchPatterns: en,
|
|
698
|
+
defaultMatchWidth: "any",
|
|
699
|
+
parsePatterns: tn,
|
|
700
|
+
defaultParseWidth: "any"
|
|
701
701
|
})
|
|
702
|
-
},
|
|
702
|
+
}, nn = {
|
|
703
703
|
code: "en-US",
|
|
704
|
-
formatDistance:
|
|
705
|
-
formatLong:
|
|
706
|
-
formatRelative:
|
|
707
|
-
localize:
|
|
708
|
-
match:
|
|
704
|
+
formatDistance: Mr,
|
|
705
|
+
formatLong: kr,
|
|
706
|
+
formatRelative: Ar,
|
|
707
|
+
localize: jr,
|
|
708
|
+
match: rn,
|
|
709
709
|
options: {
|
|
710
710
|
weekStartsOn: 0,
|
|
711
711
|
firstWeekContainsDate: 1
|
|
712
712
|
}
|
|
713
713
|
};
|
|
714
|
-
function
|
|
714
|
+
function an(e, t) {
|
|
715
715
|
const r = N(e, t == null ? void 0 : t.in);
|
|
716
|
-
return
|
|
716
|
+
return q(r, Dr(r)) + 1;
|
|
717
717
|
}
|
|
718
|
-
function
|
|
719
|
-
const r = N(e, t == null ? void 0 : t.in), n = +
|
|
720
|
-
return Math.round(n /
|
|
718
|
+
function on(e, t) {
|
|
719
|
+
const r = N(e, t == null ? void 0 : t.in), n = +De(r) - +pr(r);
|
|
720
|
+
return Math.round(n / At) + 1;
|
|
721
721
|
}
|
|
722
|
-
function
|
|
722
|
+
function Ct(e, t) {
|
|
723
723
|
var f, l, d, h;
|
|
724
|
-
const r = N(e, t == null ? void 0 : t.in), n = r.getFullYear(), i =
|
|
724
|
+
const r = N(e, t == null ? void 0 : t.in), n = r.getFullYear(), i = Me(), a = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((l = (f = t == null ? void 0 : t.locale) == null ? void 0 : f.options) == null ? void 0 : l.firstWeekContainsDate) ?? i.firstWeekContainsDate ?? ((h = (d = i.locale) == null ? void 0 : d.options) == null ? void 0 : h.firstWeekContainsDate) ?? 1, u = C((t == null ? void 0 : t.in) || e, 0);
|
|
725
725
|
u.setFullYear(n + 1, 0, a), u.setHours(0, 0, 0, 0);
|
|
726
|
-
const c =
|
|
726
|
+
const c = B(u, t), s = C((t == null ? void 0 : t.in) || e, 0);
|
|
727
727
|
s.setFullYear(n, 0, a), s.setHours(0, 0, 0, 0);
|
|
728
|
-
const o =
|
|
728
|
+
const o = B(s, t);
|
|
729
729
|
return +r >= +c ? n + 1 : +r >= +o ? n : n - 1;
|
|
730
730
|
}
|
|
731
|
-
function
|
|
731
|
+
function sn(e, t) {
|
|
732
732
|
var c, s, o, f;
|
|
733
|
-
const r =
|
|
734
|
-
return a.setFullYear(i, 0, n), a.setHours(0, 0, 0, 0),
|
|
733
|
+
const r = Me(), n = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((s = (c = t == null ? void 0 : t.locale) == null ? void 0 : c.options) == null ? void 0 : s.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((f = (o = r.locale) == null ? void 0 : o.options) == null ? void 0 : f.firstWeekContainsDate) ?? 1, i = Ct(e, t), a = C((t == null ? void 0 : t.in) || e, 0);
|
|
734
|
+
return a.setFullYear(i, 0, n), a.setHours(0, 0, 0, 0), B(a, t);
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
const r = N(e, t == null ? void 0 : t.in), n = +
|
|
738
|
-
return Math.round(n /
|
|
736
|
+
function un(e, t) {
|
|
737
|
+
const r = N(e, t == null ? void 0 : t.in), n = +B(r, t) - +sn(r, t);
|
|
738
|
+
return Math.round(n / At) + 1;
|
|
739
739
|
}
|
|
740
740
|
function T(e, t) {
|
|
741
741
|
const r = e < 0 ? "-" : "", n = Math.abs(e).toString().padStart(t, "0");
|
|
@@ -795,14 +795,14 @@ const Y = {
|
|
|
795
795
|
);
|
|
796
796
|
return T(i, t.length);
|
|
797
797
|
}
|
|
798
|
-
},
|
|
798
|
+
}, Z = {
|
|
799
799
|
midnight: "midnight",
|
|
800
800
|
noon: "noon",
|
|
801
801
|
morning: "morning",
|
|
802
802
|
afternoon: "afternoon",
|
|
803
803
|
evening: "evening",
|
|
804
804
|
night: "night"
|
|
805
|
-
},
|
|
805
|
+
}, Ze = {
|
|
806
806
|
// Era
|
|
807
807
|
G: function(e, t, r) {
|
|
808
808
|
const n = e.getFullYear() > 0 ? 1 : 0;
|
|
@@ -831,7 +831,7 @@ const Y = {
|
|
|
831
831
|
},
|
|
832
832
|
// Local week-numbering year
|
|
833
833
|
Y: function(e, t, r, n) {
|
|
834
|
-
const i =
|
|
834
|
+
const i = Ct(e, n), a = i > 0 ? i : 1 - i;
|
|
835
835
|
if (t === "YY") {
|
|
836
836
|
const u = a % 100;
|
|
837
837
|
return T(u, 2);
|
|
@@ -840,7 +840,7 @@ const Y = {
|
|
|
840
840
|
},
|
|
841
841
|
// ISO week-numbering year
|
|
842
842
|
R: function(e, t) {
|
|
843
|
-
const r =
|
|
843
|
+
const r = _t(e);
|
|
844
844
|
return T(r, t.length);
|
|
845
845
|
},
|
|
846
846
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -985,12 +985,12 @@ const Y = {
|
|
|
985
985
|
},
|
|
986
986
|
// Local week of year
|
|
987
987
|
w: function(e, t, r, n) {
|
|
988
|
-
const i =
|
|
988
|
+
const i = un(e, n);
|
|
989
989
|
return t === "wo" ? r.ordinalNumber(i, { unit: "week" }) : T(i, t.length);
|
|
990
990
|
},
|
|
991
991
|
// ISO week of year
|
|
992
992
|
I: function(e, t, r) {
|
|
993
|
-
const n =
|
|
993
|
+
const n = on(e);
|
|
994
994
|
return t === "Io" ? r.ordinalNumber(n, { unit: "week" }) : T(n, t.length);
|
|
995
995
|
},
|
|
996
996
|
// Day of the month
|
|
@@ -999,7 +999,7 @@ const Y = {
|
|
|
999
999
|
},
|
|
1000
1000
|
// Day of year
|
|
1001
1001
|
D: function(e, t, r) {
|
|
1002
|
-
const n =
|
|
1002
|
+
const n = an(e);
|
|
1003
1003
|
return t === "Do" ? r.ordinalNumber(n, { unit: "dayOfYear" }) : T(n, t.length);
|
|
1004
1004
|
},
|
|
1005
1005
|
// Day of week
|
|
@@ -1185,7 +1185,7 @@ const Y = {
|
|
|
1185
1185
|
b: function(e, t, r) {
|
|
1186
1186
|
const n = e.getHours();
|
|
1187
1187
|
let i;
|
|
1188
|
-
switch (n === 12 ? i =
|
|
1188
|
+
switch (n === 12 ? i = Z.noon : n === 0 ? i = Z.midnight : i = n / 12 >= 1 ? "pm" : "am", t) {
|
|
1189
1189
|
case "b":
|
|
1190
1190
|
case "bb":
|
|
1191
1191
|
return r.dayPeriod(i, {
|
|
@@ -1214,7 +1214,7 @@ const Y = {
|
|
|
1214
1214
|
B: function(e, t, r) {
|
|
1215
1215
|
const n = e.getHours();
|
|
1216
1216
|
let i;
|
|
1217
|
-
switch (n >= 17 ? i =
|
|
1217
|
+
switch (n >= 17 ? i = Z.evening : n >= 12 ? i = Z.afternoon : n >= 4 ? i = Z.morning : i = Z.night, t) {
|
|
1218
1218
|
case "B":
|
|
1219
1219
|
case "BB":
|
|
1220
1220
|
case "BBB":
|
|
@@ -1277,13 +1277,13 @@ const Y = {
|
|
|
1277
1277
|
switch (t) {
|
|
1278
1278
|
// Hours and optional minutes
|
|
1279
1279
|
case "X":
|
|
1280
|
-
return
|
|
1280
|
+
return tt(n);
|
|
1281
1281
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1282
1282
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1283
1283
|
// so this token always has the same output as `XX`
|
|
1284
1284
|
case "XXXX":
|
|
1285
1285
|
case "XX":
|
|
1286
|
-
return
|
|
1286
|
+
return K(n);
|
|
1287
1287
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
1288
1288
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1289
1289
|
// so this token always has the same output as `XXX`
|
|
@@ -1291,7 +1291,7 @@ const Y = {
|
|
|
1291
1291
|
case "XXX":
|
|
1292
1292
|
// Hours and minutes with `:` delimiter
|
|
1293
1293
|
default:
|
|
1294
|
-
return
|
|
1294
|
+
return K(n, ":");
|
|
1295
1295
|
}
|
|
1296
1296
|
},
|
|
1297
1297
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
@@ -1300,13 +1300,13 @@ const Y = {
|
|
|
1300
1300
|
switch (t) {
|
|
1301
1301
|
// Hours and optional minutes
|
|
1302
1302
|
case "x":
|
|
1303
|
-
return
|
|
1303
|
+
return tt(n);
|
|
1304
1304
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1305
1305
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1306
1306
|
// so this token always has the same output as `xx`
|
|
1307
1307
|
case "xxxx":
|
|
1308
1308
|
case "xx":
|
|
1309
|
-
return
|
|
1309
|
+
return K(n);
|
|
1310
1310
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
1311
1311
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1312
1312
|
// so this token always has the same output as `xxx`
|
|
@@ -1314,7 +1314,7 @@ const Y = {
|
|
|
1314
1314
|
case "xxx":
|
|
1315
1315
|
// Hours and minutes with `:` delimiter
|
|
1316
1316
|
default:
|
|
1317
|
-
return
|
|
1317
|
+
return K(n, ":");
|
|
1318
1318
|
}
|
|
1319
1319
|
},
|
|
1320
1320
|
// Timezone (GMT)
|
|
@@ -1325,11 +1325,11 @@ const Y = {
|
|
|
1325
1325
|
case "O":
|
|
1326
1326
|
case "OO":
|
|
1327
1327
|
case "OOO":
|
|
1328
|
-
return "GMT" +
|
|
1328
|
+
return "GMT" + et(n, ":");
|
|
1329
1329
|
// Long
|
|
1330
1330
|
case "OOOO":
|
|
1331
1331
|
default:
|
|
1332
|
-
return "GMT" +
|
|
1332
|
+
return "GMT" + K(n, ":");
|
|
1333
1333
|
}
|
|
1334
1334
|
},
|
|
1335
1335
|
// Timezone (specific non-location)
|
|
@@ -1340,11 +1340,11 @@ const Y = {
|
|
|
1340
1340
|
case "z":
|
|
1341
1341
|
case "zz":
|
|
1342
1342
|
case "zzz":
|
|
1343
|
-
return "GMT" +
|
|
1343
|
+
return "GMT" + et(n, ":");
|
|
1344
1344
|
// Long
|
|
1345
1345
|
case "zzzz":
|
|
1346
1346
|
default:
|
|
1347
|
-
return "GMT" +
|
|
1347
|
+
return "GMT" + K(n, ":");
|
|
1348
1348
|
}
|
|
1349
1349
|
},
|
|
1350
1350
|
// Seconds timestamp
|
|
@@ -1357,18 +1357,18 @@ const Y = {
|
|
|
1357
1357
|
return T(+e, t.length);
|
|
1358
1358
|
}
|
|
1359
1359
|
};
|
|
1360
|
-
function
|
|
1360
|
+
function et(e, t = "") {
|
|
1361
1361
|
const r = e > 0 ? "-" : "+", n = Math.abs(e), i = Math.trunc(n / 60), a = n % 60;
|
|
1362
1362
|
return a === 0 ? r + String(i) : r + String(i) + t + T(a, 2);
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1365
|
-
return e % 60 === 0 ? (e > 0 ? "-" : "+") + T(Math.abs(e) / 60, 2) :
|
|
1364
|
+
function tt(e, t) {
|
|
1365
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + T(Math.abs(e) / 60, 2) : K(e, t);
|
|
1366
1366
|
}
|
|
1367
|
-
function
|
|
1367
|
+
function K(e, t = "") {
|
|
1368
1368
|
const r = e > 0 ? "-" : "+", n = Math.abs(e), i = T(Math.trunc(n / 60), 2), a = T(n % 60, 2);
|
|
1369
1369
|
return r + i + t + a;
|
|
1370
1370
|
}
|
|
1371
|
-
const
|
|
1371
|
+
const rt = (e, t) => {
|
|
1372
1372
|
switch (e) {
|
|
1373
1373
|
case "P":
|
|
1374
1374
|
return t.date({ width: "short" });
|
|
@@ -1380,7 +1380,7 @@ const tt = (e, t) => {
|
|
|
1380
1380
|
default:
|
|
1381
1381
|
return t.date({ width: "full" });
|
|
1382
1382
|
}
|
|
1383
|
-
},
|
|
1383
|
+
}, Lt = (e, t) => {
|
|
1384
1384
|
switch (e) {
|
|
1385
1385
|
case "p":
|
|
1386
1386
|
return t.time({ width: "short" });
|
|
@@ -1392,10 +1392,10 @@ const tt = (e, t) => {
|
|
|
1392
1392
|
default:
|
|
1393
1393
|
return t.time({ width: "full" });
|
|
1394
1394
|
}
|
|
1395
|
-
},
|
|
1395
|
+
}, cn = (e, t) => {
|
|
1396
1396
|
const r = e.match(/(P+)(p+)?/) || [], n = r[1], i = r[2];
|
|
1397
1397
|
if (!i)
|
|
1398
|
-
return
|
|
1398
|
+
return rt(e, t);
|
|
1399
1399
|
let a;
|
|
1400
1400
|
switch (n) {
|
|
1401
1401
|
case "P":
|
|
@@ -1412,47 +1412,47 @@ const tt = (e, t) => {
|
|
|
1412
1412
|
a = t.dateTime({ width: "full" });
|
|
1413
1413
|
break;
|
|
1414
1414
|
}
|
|
1415
|
-
return a.replace("{{date}}",
|
|
1416
|
-
},
|
|
1417
|
-
p:
|
|
1418
|
-
P:
|
|
1419
|
-
},
|
|
1420
|
-
function
|
|
1421
|
-
return
|
|
1422
|
-
}
|
|
1423
|
-
function
|
|
1424
|
-
return
|
|
1425
|
-
}
|
|
1426
|
-
function
|
|
1427
|
-
const n =
|
|
1428
|
-
if (console.warn(n),
|
|
1429
|
-
}
|
|
1430
|
-
function
|
|
1415
|
+
return a.replace("{{date}}", rt(n, t)).replace("{{time}}", Lt(i, t));
|
|
1416
|
+
}, ln = {
|
|
1417
|
+
p: Lt,
|
|
1418
|
+
P: cn
|
|
1419
|
+
}, dn = /^D+$/, fn = /^Y+$/, hn = ["D", "DD", "YY", "YYYY"];
|
|
1420
|
+
function gn(e) {
|
|
1421
|
+
return dn.test(e);
|
|
1422
|
+
}
|
|
1423
|
+
function pn(e) {
|
|
1424
|
+
return fn.test(e);
|
|
1425
|
+
}
|
|
1426
|
+
function mn(e, t, r) {
|
|
1427
|
+
const n = yn(e, t, r);
|
|
1428
|
+
if (console.warn(n), hn.includes(e)) throw new RangeError(n);
|
|
1429
|
+
}
|
|
1430
|
+
function yn(e, t, r) {
|
|
1431
1431
|
const n = e[0] === "Y" ? "years" : "days of the month";
|
|
1432
1432
|
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1433
1433
|
}
|
|
1434
|
-
const
|
|
1435
|
-
function
|
|
1434
|
+
const vn = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, bn = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, wn = /^'([^]*?)'?$/, xn = /''/g, Sn = /[a-zA-Z]/;
|
|
1435
|
+
function j(e, t, r) {
|
|
1436
1436
|
var f, l, d, h;
|
|
1437
|
-
const n =
|
|
1438
|
-
if (!
|
|
1437
|
+
const n = Me(), i = n.locale ?? nn, a = n.firstWeekContainsDate ?? ((l = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : l.firstWeekContainsDate) ?? 1, u = n.weekStartsOn ?? ((h = (d = n.locale) == null ? void 0 : d.options) == null ? void 0 : h.weekStartsOn) ?? 0, c = N(e, r == null ? void 0 : r.in);
|
|
1438
|
+
if (!xr(c))
|
|
1439
1439
|
throw new RangeError("Invalid time value");
|
|
1440
|
-
let s = t.match(
|
|
1440
|
+
let s = t.match(bn).map((g) => {
|
|
1441
1441
|
const p = g[0];
|
|
1442
1442
|
if (p === "p" || p === "P") {
|
|
1443
|
-
const m =
|
|
1443
|
+
const m = ln[p];
|
|
1444
1444
|
return m(g, i.formatLong);
|
|
1445
1445
|
}
|
|
1446
1446
|
return g;
|
|
1447
|
-
}).join("").match(
|
|
1447
|
+
}).join("").match(vn).map((g) => {
|
|
1448
1448
|
if (g === "''")
|
|
1449
1449
|
return { isToken: !1, value: "'" };
|
|
1450
1450
|
const p = g[0];
|
|
1451
1451
|
if (p === "'")
|
|
1452
|
-
return { isToken: !1, value:
|
|
1453
|
-
if (
|
|
1452
|
+
return { isToken: !1, value: On(g) };
|
|
1453
|
+
if (Ze[p])
|
|
1454
1454
|
return { isToken: !0, value: g };
|
|
1455
|
-
if (p.match(
|
|
1455
|
+
if (p.match(Sn))
|
|
1456
1456
|
throw new RangeError(
|
|
1457
1457
|
"Format string contains an unescaped latin alphabet character `" + p + "`"
|
|
1458
1458
|
);
|
|
@@ -1467,67 +1467,67 @@ function I(e, t, r) {
|
|
|
1467
1467
|
return s.map((g) => {
|
|
1468
1468
|
if (!g.isToken) return g.value;
|
|
1469
1469
|
const p = g.value;
|
|
1470
|
-
(
|
|
1471
|
-
const m =
|
|
1470
|
+
(pn(p) || gn(p)) && mn(p, t, String(e));
|
|
1471
|
+
const m = Ze[p[0]];
|
|
1472
1472
|
return m(c, p, i.localize, o);
|
|
1473
1473
|
}).join("");
|
|
1474
1474
|
}
|
|
1475
|
-
function
|
|
1476
|
-
const t = e.match(
|
|
1477
|
-
return t ? t[1].replace(
|
|
1475
|
+
function On(e) {
|
|
1476
|
+
const t = e.match(wn);
|
|
1477
|
+
return t ? t[1].replace(xn, "'") : e;
|
|
1478
1478
|
}
|
|
1479
|
-
function
|
|
1479
|
+
function Dn(e, t) {
|
|
1480
1480
|
return N(e, t == null ? void 0 : t.in).getDay();
|
|
1481
1481
|
}
|
|
1482
|
-
function
|
|
1482
|
+
function Tn(e, t) {
|
|
1483
1483
|
const r = N(e, t == null ? void 0 : t.in), n = r.getMonth();
|
|
1484
1484
|
return r.setFullYear(r.getFullYear(), n + 1, 0), r.setHours(0, 0, 0, 0), N(r, t == null ? void 0 : t.in);
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1487
|
-
let n = t -
|
|
1488
|
-
return n <= 0 && (n += 7),
|
|
1486
|
+
function Mn(e, t, r) {
|
|
1487
|
+
let n = t - Dn(e, r);
|
|
1488
|
+
return n <= 0 && (n += 7), de(e, n, r);
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1491
|
-
return
|
|
1490
|
+
function En(e, t) {
|
|
1491
|
+
return Mn(e, 0, t);
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function _e(e, t, r) {
|
|
1494
1494
|
const n = N(e, r == null ? void 0 : r.in);
|
|
1495
1495
|
return n.setHours(t), n;
|
|
1496
1496
|
}
|
|
1497
1497
|
function Ye(e, t, r) {
|
|
1498
|
-
const n =
|
|
1498
|
+
const n = Rn(e, t, r), i = Pn(e, t);
|
|
1499
1499
|
return { width: n, height: i };
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function Pn(e, t) {
|
|
1502
1502
|
return t.pixelsPerResource;
|
|
1503
1503
|
}
|
|
1504
|
-
function
|
|
1504
|
+
function Rn(e, t, r) {
|
|
1505
1505
|
return Math.abs(
|
|
1506
|
-
(
|
|
1506
|
+
(q(r.end, r.start) + 1) * t.pixelsPerDay
|
|
1507
1507
|
);
|
|
1508
1508
|
}
|
|
1509
1509
|
function Fe(e, t, r, n) {
|
|
1510
|
-
const i =
|
|
1510
|
+
const i = Ht(e, t, n), a = Nn(e, t, r.start, n);
|
|
1511
1511
|
return {
|
|
1512
1512
|
...i,
|
|
1513
1513
|
...a
|
|
1514
1514
|
};
|
|
1515
1515
|
}
|
|
1516
|
-
function
|
|
1517
|
-
const n =
|
|
1516
|
+
function Ht(e, t, r) {
|
|
1517
|
+
const n = q(e.end, e.start) * r.pixelsPerDay, i = e.size / t.capacity * r.pixelsPerResource;
|
|
1518
1518
|
return { width: n, height: i };
|
|
1519
1519
|
}
|
|
1520
|
-
function
|
|
1521
|
-
return
|
|
1520
|
+
function $e(e, t, r) {
|
|
1521
|
+
return q(e, t) * r.pixelsPerDay + r.pixelsPerDay / 2;
|
|
1522
1522
|
}
|
|
1523
|
-
function
|
|
1523
|
+
function kn(e, t, r) {
|
|
1524
1524
|
return e / t * r.pixelsPerResource;
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1527
|
-
const i =
|
|
1526
|
+
function Nn(e, t, r, n) {
|
|
1527
|
+
const i = $e(e.start, r, n), a = kn(e.offset, t.capacity, n);
|
|
1528
1528
|
return { x: i, y: a };
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1530
|
+
function te(e, t) {
|
|
1531
1531
|
const r = e.element.getBoundingClientRect(), n = {
|
|
1532
1532
|
x: r.x - t.initial.input.pageX,
|
|
1533
1533
|
y: r.y - t.initial.input.pageY
|
|
@@ -1540,16 +1540,16 @@ function Z(e, t) {
|
|
|
1540
1540
|
relative: i
|
|
1541
1541
|
};
|
|
1542
1542
|
}
|
|
1543
|
-
function
|
|
1543
|
+
function It(e, t, r, n, i) {
|
|
1544
1544
|
return {
|
|
1545
1545
|
id: e.id,
|
|
1546
1546
|
swimlaneId: t.id,
|
|
1547
|
-
start:
|
|
1548
|
-
|
|
1547
|
+
start: _e(
|
|
1548
|
+
de(i.start, Math.floor(r.x / n.pixelsPerDay)),
|
|
1549
1549
|
12
|
|
1550
1550
|
),
|
|
1551
|
-
end:
|
|
1552
|
-
|
|
1551
|
+
end: _e(
|
|
1552
|
+
de(
|
|
1553
1553
|
i.start,
|
|
1554
1554
|
Math.floor(
|
|
1555
1555
|
(r.x + r.width) / n.pixelsPerDay
|
|
@@ -1566,25 +1566,171 @@ function Ht(e, t, r, n, i) {
|
|
|
1566
1566
|
payload: e.payload
|
|
1567
1567
|
};
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
const
|
|
1573
|
-
|
|
1574
|
-
|
|
1569
|
+
function An(e, t, r, n, i, a, u, c, s) {
|
|
1570
|
+
if (n === null)
|
|
1571
|
+
return null;
|
|
1572
|
+
const o = Ye(
|
|
1573
|
+
e,
|
|
1574
|
+
a,
|
|
1575
|
+
c
|
|
1576
|
+
), f = t.filter((d) => d.id !== r.id).map((d) => Fe(d, e, c, a));
|
|
1577
|
+
let l = null;
|
|
1578
|
+
return l = zn(
|
|
1579
|
+
e,
|
|
1580
|
+
r,
|
|
1581
|
+
i,
|
|
1582
|
+
a,
|
|
1583
|
+
n
|
|
1584
|
+
), l = Wn(l, u), l = _n(
|
|
1585
|
+
l,
|
|
1586
|
+
o
|
|
1587
|
+
), l = Cn(
|
|
1588
|
+
l,
|
|
1589
|
+
f,
|
|
1590
|
+
o,
|
|
1591
|
+
s
|
|
1592
|
+
), l;
|
|
1593
|
+
}
|
|
1594
|
+
function zn(e, t, r, n, i) {
|
|
1595
|
+
const { width: a, height: u } = Ht(t, e, n), c = i.x + a * r.relative.x, s = i.y + u * r.relative.y;
|
|
1596
|
+
return {
|
|
1597
|
+
x: c,
|
|
1598
|
+
y: s,
|
|
1599
|
+
width: a,
|
|
1600
|
+
height: u
|
|
1601
|
+
};
|
|
1602
|
+
}
|
|
1603
|
+
function _n(e, t) {
|
|
1604
|
+
const r = Math.max(
|
|
1605
|
+
0,
|
|
1606
|
+
Math.min(e.x, t.width - e.width)
|
|
1607
|
+
), n = Math.max(
|
|
1608
|
+
0,
|
|
1609
|
+
Math.min(e.y, t.height - e.height)
|
|
1610
|
+
);
|
|
1611
|
+
return {
|
|
1612
|
+
...e,
|
|
1613
|
+
x: r,
|
|
1614
|
+
y: n
|
|
1615
|
+
};
|
|
1616
|
+
}
|
|
1617
|
+
function Wn(e, t) {
|
|
1618
|
+
const r = {
|
|
1619
|
+
...e
|
|
1620
|
+
};
|
|
1621
|
+
return t && t.x && (r.x = nt(r.x, t.x, t.offsetX || 0)), t && t.y && (r.y = nt(r.y, t.y, t.offsetY || 0)), r;
|
|
1622
|
+
}
|
|
1623
|
+
function nt(e, t, r) {
|
|
1624
|
+
return Math.max(
|
|
1625
|
+
r,
|
|
1626
|
+
r + Math.round((e - r) / t) * t
|
|
1627
|
+
);
|
|
1628
|
+
}
|
|
1629
|
+
function Cn(e, t, r, n) {
|
|
1630
|
+
const i = {
|
|
1631
|
+
...e
|
|
1632
|
+
};
|
|
1633
|
+
if (!n) {
|
|
1634
|
+
let a = !0;
|
|
1635
|
+
for (; a; ) {
|
|
1636
|
+
const u = t.find((c) => ue(i, c));
|
|
1637
|
+
u !== void 0 ? i.y = u.y + u.height : a = !1;
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
return In(i, r) ? i : null;
|
|
1641
|
+
}
|
|
1642
|
+
function ue(e, t) {
|
|
1643
|
+
return !(e.x >= t.x + t.width || t.x >= e.x + e.width || e.y >= t.y + t.height || t.y >= e.y + e.height);
|
|
1644
|
+
}
|
|
1645
|
+
function Ln(e, t) {
|
|
1646
|
+
const r = Math.max(e.x, t.x), n = Math.max(e.y, t.y), i = Math.min(e.x + e.width, t.x + t.width), a = Math.min(e.y + e.height, t.y + t.height);
|
|
1647
|
+
return r < i && n < a ? {
|
|
1648
|
+
x: r,
|
|
1649
|
+
y: n,
|
|
1650
|
+
width: i - r,
|
|
1651
|
+
height: a - n
|
|
1652
|
+
} : null;
|
|
1653
|
+
}
|
|
1654
|
+
function Hn(e, t) {
|
|
1655
|
+
return !(e.start >= t.end || t.start >= e.end || e.offset >= t.offset + t.size || t.offset >= e.offset + e.size);
|
|
1656
|
+
}
|
|
1657
|
+
function In(e, t) {
|
|
1658
|
+
return e.x >= 0 && e.y >= 0 && e.x + e.width <= t.width && e.y + e.height <= t.height;
|
|
1659
|
+
}
|
|
1660
|
+
function jn(e, t, r, n, i) {
|
|
1661
|
+
const a = Bn(
|
|
1662
|
+
e,
|
|
1663
|
+
t,
|
|
1664
|
+
r.capacity,
|
|
1665
|
+
n
|
|
1666
|
+
);
|
|
1667
|
+
if (a) {
|
|
1668
|
+
const u = Yn(
|
|
1669
|
+
e,
|
|
1670
|
+
i.start,
|
|
1671
|
+
i.end,
|
|
1672
|
+
n,
|
|
1673
|
+
a
|
|
1674
|
+
);
|
|
1675
|
+
if (u)
|
|
1676
|
+
return {
|
|
1677
|
+
start: u.lower,
|
|
1678
|
+
end: u.upper,
|
|
1679
|
+
minOffset: a.lower,
|
|
1680
|
+
maxOffset: a.upper
|
|
1681
|
+
};
|
|
1682
|
+
}
|
|
1683
|
+
return null;
|
|
1684
|
+
}
|
|
1685
|
+
function Bn(e, t, r, n) {
|
|
1686
|
+
const i = n.filter((f) => f.start <= e && f.end >= e);
|
|
1687
|
+
if (i.find(
|
|
1688
|
+
(f) => f.offset <= t && f.offset + f.size >= t
|
|
1689
|
+
))
|
|
1690
|
+
return null;
|
|
1691
|
+
const u = i.filter((f) => f.offset + f.size <= t), c = i.filter((f) => f.offset >= t), s = u.length > 0 ? Math.max(...u.map((f) => f.offset + f.size)) : 0, o = c.length > 0 ? Math.min(...c.map((f) => f.offset)) : r;
|
|
1692
|
+
return {
|
|
1693
|
+
lower: s,
|
|
1694
|
+
upper: o
|
|
1695
|
+
};
|
|
1696
|
+
}
|
|
1697
|
+
function Yn(e, t, r, n, i) {
|
|
1698
|
+
const a = {
|
|
1699
|
+
start: t,
|
|
1700
|
+
end: r,
|
|
1701
|
+
offset: i.lower,
|
|
1702
|
+
size: i.upper - i.lower
|
|
1703
|
+
}, u = n.filter(
|
|
1704
|
+
(l) => Hn(l, a)
|
|
1705
|
+
);
|
|
1706
|
+
if (u.length === 0)
|
|
1707
|
+
return {
|
|
1708
|
+
lower: t,
|
|
1709
|
+
upper: r
|
|
1710
|
+
};
|
|
1711
|
+
const c = u.filter((l) => l.end <= e), s = u.filter((l) => l.start >= e), o = c.length > 0 ? yr(c.map((l) => l.end)) : t, f = s.length > 0 ? vr(s.map((l) => l.start)) : r;
|
|
1712
|
+
return {
|
|
1713
|
+
lower: o,
|
|
1714
|
+
upper: f
|
|
1715
|
+
};
|
|
1716
|
+
}
|
|
1717
|
+
function Fn({ focusedDay: e }) {
|
|
1718
|
+
const { settings: t } = pe();
|
|
1719
|
+
return /* @__PURE__ */ y(H.Background, { children: /* @__PURE__ */ y("div", { className: "timelane-background", children: /* @__PURE__ */ Q("div", { className: "timelane-background-inner", children: [
|
|
1720
|
+
e && /* @__PURE__ */ y(
|
|
1575
1721
|
"div",
|
|
1576
1722
|
{
|
|
1577
|
-
className: "
|
|
1723
|
+
className: "timelane-background-focused-day-position",
|
|
1578
1724
|
style: {
|
|
1579
1725
|
width: `${t.pixelsPerDay}px`,
|
|
1580
|
-
marginLeft: `${
|
|
1726
|
+
marginLeft: `${$e(e, t.start, t) - t.pixelsPerDay / 2}px`
|
|
1581
1727
|
}
|
|
1582
1728
|
}
|
|
1583
1729
|
),
|
|
1584
|
-
/* @__PURE__ */
|
|
1730
|
+
/* @__PURE__ */ y(
|
|
1585
1731
|
"div",
|
|
1586
1732
|
{
|
|
1587
|
-
id: "
|
|
1733
|
+
id: "timelane-background-date-anchor",
|
|
1588
1734
|
style: {
|
|
1589
1735
|
position: "absolute",
|
|
1590
1736
|
top: 0,
|
|
@@ -1593,260 +1739,74 @@ function ha({
|
|
|
1593
1739
|
}
|
|
1594
1740
|
}
|
|
1595
1741
|
),
|
|
1596
|
-
|
|
1742
|
+
Wt(t).map((r, n) => /* @__PURE__ */ y(
|
|
1597
1743
|
"div",
|
|
1598
1744
|
{
|
|
1599
|
-
className: `
|
|
1745
|
+
className: `timelane-background-day-label ${zt(r) ? "timelane-background-day-label-sunday" : ""} `,
|
|
1600
1746
|
style: { width: `${t.pixelsPerDay}px` },
|
|
1601
|
-
"data-day":
|
|
1747
|
+
"data-day": j(r, "yyyy-MM-dd")
|
|
1602
1748
|
},
|
|
1603
1749
|
n
|
|
1604
1750
|
))
|
|
1605
|
-
] }) });
|
|
1751
|
+
] }) }) });
|
|
1606
1752
|
}
|
|
1607
|
-
function
|
|
1608
|
-
|
|
1609
|
-
return /* @__PURE__ */ v(Se, { children: r > 4 ? I(e, "LLLL yyyy") : /* @__PURE__ */ v(Se, {}) });
|
|
1753
|
+
function $n(e) {
|
|
1754
|
+
if (Array.isArray(e)) return e;
|
|
1610
1755
|
}
|
|
1611
|
-
function
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1756
|
+
function qn(e, t) {
|
|
1757
|
+
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1758
|
+
if (r != null) {
|
|
1759
|
+
var n, i, a, u, c = [], s = !0, o = !1;
|
|
1760
|
+
try {
|
|
1761
|
+
if (a = (r = r.call(e)).next, t !== 0) for (; !(s = (n = a.call(r)).done) && (c.push(n.value), c.length !== t); s = !0) ;
|
|
1762
|
+
} catch (f) {
|
|
1763
|
+
o = !0, i = f;
|
|
1764
|
+
} finally {
|
|
1765
|
+
try {
|
|
1766
|
+
if (!s && r.return != null && (u = r.return(), Object(u) !== u)) return;
|
|
1767
|
+
} finally {
|
|
1768
|
+
if (o) throw i;
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
return c;
|
|
1772
|
+
}
|
|
1620
1773
|
}
|
|
1621
|
-
function
|
|
1622
|
-
|
|
1623
|
-
|
|
1774
|
+
function We(e, t) {
|
|
1775
|
+
(t == null || t > e.length) && (t = e.length);
|
|
1776
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
1777
|
+
return n;
|
|
1624
1778
|
}
|
|
1625
|
-
function
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
},
|
|
1631
|
-
render: i = An,
|
|
1632
|
-
onDayClick: a = () => {
|
|
1633
|
-
}
|
|
1634
|
-
}) {
|
|
1635
|
-
return /* @__PURE__ */ v("div", { className: "timeline-header-days", children: Ct(e).map((u, c) => /* @__PURE__ */ v(
|
|
1636
|
-
"div",
|
|
1637
|
-
{
|
|
1638
|
-
className: `timeline-header-day-label ${r && yr(r, u) ? "timeline-header-day-label-focused" : ""}`,
|
|
1639
|
-
style: { width: `${t.pixelsPerDay}px` },
|
|
1640
|
-
onClick: (s) => {
|
|
1641
|
-
a({ day: u, e: s }), n(u);
|
|
1642
|
-
},
|
|
1643
|
-
children: i(u)
|
|
1644
|
-
},
|
|
1645
|
-
c
|
|
1646
|
-
)) });
|
|
1647
|
-
}
|
|
1648
|
-
function Cn({
|
|
1649
|
-
range: e,
|
|
1650
|
-
pixels: t,
|
|
1651
|
-
setFocusedDay: r = () => {
|
|
1652
|
-
},
|
|
1653
|
-
render: n = Nn,
|
|
1654
|
-
onWeekClick: i = () => {
|
|
1655
|
-
}
|
|
1656
|
-
}) {
|
|
1657
|
-
return /* @__PURE__ */ v("div", { className: "timeline-header-weeks", children: xr(e, { weekStartsOn: 1 }).map((a, u) => {
|
|
1658
|
-
a < e.start && (a = e.start);
|
|
1659
|
-
let c = At(a) ? a : Tn(a);
|
|
1660
|
-
c > e.end && (c = e.end);
|
|
1661
|
-
const s = B(c, a) + 1;
|
|
1662
|
-
return /* @__PURE__ */ v(
|
|
1663
|
-
"div",
|
|
1664
|
-
{
|
|
1665
|
-
className: "timeline-header-week-label",
|
|
1666
|
-
style: {
|
|
1667
|
-
width: `${t.pixelsPerDay * s}px`
|
|
1668
|
-
},
|
|
1669
|
-
onClick: (o) => {
|
|
1670
|
-
i({ firstDay: a, lastDay: c, e: o }), r(a);
|
|
1671
|
-
},
|
|
1672
|
-
children: n(a, c)
|
|
1673
|
-
},
|
|
1674
|
-
u
|
|
1675
|
-
);
|
|
1676
|
-
}) });
|
|
1677
|
-
}
|
|
1678
|
-
function _n({
|
|
1679
|
-
range: e,
|
|
1680
|
-
pixels: t,
|
|
1681
|
-
setFocusedDay: r = () => {
|
|
1682
|
-
},
|
|
1683
|
-
render: n = kn,
|
|
1684
|
-
onMonthClick: i = () => {
|
|
1685
|
-
}
|
|
1686
|
-
}) {
|
|
1687
|
-
return /* @__PURE__ */ v("div", { className: "timeline-header-months", children: wr(e).map((a, u) => {
|
|
1688
|
-
a < e.start && (a = e.start);
|
|
1689
|
-
let c = On(a);
|
|
1690
|
-
c > e.end && (c = e.end);
|
|
1691
|
-
const s = B(c, a) + 1;
|
|
1692
|
-
return /* @__PURE__ */ v(
|
|
1693
|
-
"div",
|
|
1694
|
-
{
|
|
1695
|
-
className: "timeline-header-month-label",
|
|
1696
|
-
style: {
|
|
1697
|
-
width: `${t.pixelsPerDay * s}px`
|
|
1698
|
-
},
|
|
1699
|
-
onClick: (o) => {
|
|
1700
|
-
i({ firstDay: a, lastDay: c, e: o }), r(a);
|
|
1701
|
-
},
|
|
1702
|
-
children: n(a, c)
|
|
1703
|
-
},
|
|
1704
|
-
u
|
|
1705
|
-
);
|
|
1706
|
-
}) });
|
|
1707
|
-
}
|
|
1708
|
-
function ga({
|
|
1709
|
-
focusedDay: e,
|
|
1710
|
-
setFocusedDay: t = () => {
|
|
1711
|
-
},
|
|
1712
|
-
renderMonthHeader: r,
|
|
1713
|
-
renderWeekHeader: n,
|
|
1714
|
-
renderDayHeader: i,
|
|
1715
|
-
onMonthClick: a,
|
|
1716
|
-
onDayClick: u,
|
|
1717
|
-
onWeekClick: c
|
|
1718
|
-
}) {
|
|
1719
|
-
const { settings: s } = ge();
|
|
1720
|
-
return /* @__PURE__ */ K("div", { className: "timeline-header", children: [
|
|
1721
|
-
s.showMonths && /* @__PURE__ */ v(
|
|
1722
|
-
_n,
|
|
1723
|
-
{
|
|
1724
|
-
range: s,
|
|
1725
|
-
pixels: s,
|
|
1726
|
-
setFocusedDay: t,
|
|
1727
|
-
render: r,
|
|
1728
|
-
onMonthClick: a
|
|
1729
|
-
}
|
|
1730
|
-
),
|
|
1731
|
-
s.showWeeks && /* @__PURE__ */ v(
|
|
1732
|
-
Cn,
|
|
1733
|
-
{
|
|
1734
|
-
range: s,
|
|
1735
|
-
pixels: s,
|
|
1736
|
-
setFocusedDay: t,
|
|
1737
|
-
render: n,
|
|
1738
|
-
onWeekClick: c
|
|
1739
|
-
}
|
|
1740
|
-
),
|
|
1741
|
-
s.showDays && /* @__PURE__ */ v(
|
|
1742
|
-
zn,
|
|
1743
|
-
{
|
|
1744
|
-
range: s,
|
|
1745
|
-
pixels: s,
|
|
1746
|
-
focusedDay: e,
|
|
1747
|
-
setFocusedDay: t,
|
|
1748
|
-
render: i,
|
|
1749
|
-
onDayClick: u
|
|
1750
|
-
}
|
|
1751
|
-
)
|
|
1752
|
-
] });
|
|
1753
|
-
}
|
|
1754
|
-
const Wn = ({
|
|
1755
|
-
settings: e,
|
|
1756
|
-
children: t
|
|
1757
|
-
}) => {
|
|
1758
|
-
const [r, n] = G(e);
|
|
1759
|
-
return ee(() => {
|
|
1760
|
-
n((i) => ({ ...i, _settings: e }));
|
|
1761
|
-
}, [e]), /* @__PURE__ */ v(kt.Provider, { value: { settings: r, setSettings: n }, children: t });
|
|
1762
|
-
};
|
|
1763
|
-
function pa({
|
|
1764
|
-
children: e,
|
|
1765
|
-
start: t = new Date(2025, 1, 1),
|
|
1766
|
-
end: r = new Date(2025, 5, 1),
|
|
1767
|
-
pixelsPerDay: n = 30,
|
|
1768
|
-
pixelsPerResource: i = 100,
|
|
1769
|
-
showMonths: a = !0,
|
|
1770
|
-
showWeeks: u = !0,
|
|
1771
|
-
showDays: c = !0,
|
|
1772
|
-
allowOverlaps: s = !0,
|
|
1773
|
-
focusedDate: o = null
|
|
1774
|
-
}) {
|
|
1775
|
-
return /* @__PURE__ */ v("div", { className: "timeline", children: /* @__PURE__ */ v(
|
|
1776
|
-
Wn,
|
|
1777
|
-
{
|
|
1778
|
-
settings: {
|
|
1779
|
-
start: t,
|
|
1780
|
-
end: r,
|
|
1781
|
-
pixelsPerDay: n,
|
|
1782
|
-
pixelsPerResource: i,
|
|
1783
|
-
showDays: c,
|
|
1784
|
-
showMonths: a,
|
|
1785
|
-
showWeeks: u,
|
|
1786
|
-
allowOverlaps: s,
|
|
1787
|
-
focusedDate: o
|
|
1788
|
-
},
|
|
1789
|
-
children: e
|
|
1790
|
-
}
|
|
1791
|
-
) });
|
|
1792
|
-
}
|
|
1793
|
-
function Ln(e) {
|
|
1794
|
-
if (Array.isArray(e)) return e;
|
|
1795
|
-
}
|
|
1796
|
-
function Hn(e, t) {
|
|
1797
|
-
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1798
|
-
if (r != null) {
|
|
1799
|
-
var n, i, a, u, c = [], s = !0, o = !1;
|
|
1800
|
-
try {
|
|
1801
|
-
if (a = (r = r.call(e)).next, t !== 0) for (; !(s = (n = a.call(r)).done) && (c.push(n.value), c.length !== t); s = !0) ;
|
|
1802
|
-
} catch (f) {
|
|
1803
|
-
o = !0, i = f;
|
|
1804
|
-
} finally {
|
|
1805
|
-
try {
|
|
1806
|
-
if (!s && r.return != null && (u = r.return(), Object(u) !== u)) return;
|
|
1807
|
-
} finally {
|
|
1808
|
-
if (o) throw i;
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
return c;
|
|
1812
|
-
}
|
|
1813
|
-
}
|
|
1814
|
-
function Ce(e, t) {
|
|
1815
|
-
(t == null || t > e.length) && (t = e.length);
|
|
1816
|
-
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
1817
|
-
return n;
|
|
1818
|
-
}
|
|
1819
|
-
function It(e, t) {
|
|
1820
|
-
if (e) {
|
|
1821
|
-
if (typeof e == "string") return Ce(e, t);
|
|
1822
|
-
var r = {}.toString.call(e).slice(8, -1);
|
|
1823
|
-
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ce(e, t) : void 0;
|
|
1779
|
+
function jt(e, t) {
|
|
1780
|
+
if (e) {
|
|
1781
|
+
if (typeof e == "string") return We(e, t);
|
|
1782
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
1783
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? We(e, t) : void 0;
|
|
1824
1784
|
}
|
|
1825
1785
|
}
|
|
1826
|
-
function
|
|
1786
|
+
function Xn() {
|
|
1827
1787
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1828
1788
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1829
1789
|
}
|
|
1830
|
-
function
|
|
1831
|
-
return
|
|
1790
|
+
function Bt(e, t) {
|
|
1791
|
+
return $n(e) || qn(e, t) || jt(e, t) || Xn();
|
|
1832
1792
|
}
|
|
1833
|
-
var
|
|
1793
|
+
var Pe = {}, se = {}, it;
|
|
1834
1794
|
function Yt() {
|
|
1835
|
-
if (
|
|
1836
|
-
|
|
1795
|
+
if (it) return se;
|
|
1796
|
+
it = 1, Object.defineProperty(se, "__esModule", { value: !0 }), se.bind = void 0;
|
|
1837
1797
|
function e(t, r) {
|
|
1838
1798
|
var n = r.type, i = r.listener, a = r.options;
|
|
1839
1799
|
return t.addEventListener(n, i, a), function() {
|
|
1840
1800
|
t.removeEventListener(n, i, a);
|
|
1841
1801
|
};
|
|
1842
1802
|
}
|
|
1843
|
-
return
|
|
1803
|
+
return se.bind = e, se;
|
|
1844
1804
|
}
|
|
1845
|
-
var
|
|
1846
|
-
function
|
|
1847
|
-
if (
|
|
1848
|
-
|
|
1849
|
-
var e =
|
|
1805
|
+
var G = {}, at;
|
|
1806
|
+
function Un() {
|
|
1807
|
+
if (at) return G;
|
|
1808
|
+
at = 1;
|
|
1809
|
+
var e = G && G.__assign || function() {
|
|
1850
1810
|
return e = Object.assign || function(a) {
|
|
1851
1811
|
for (var u, c = 1, s = arguments.length; c < s; c++) {
|
|
1852
1812
|
u = arguments[c];
|
|
@@ -1855,7 +1815,7 @@ function jn() {
|
|
|
1855
1815
|
return a;
|
|
1856
1816
|
}, e.apply(this, arguments);
|
|
1857
1817
|
};
|
|
1858
|
-
Object.defineProperty(
|
|
1818
|
+
Object.defineProperty(G, "__esModule", { value: !0 }), G.bindAll = void 0;
|
|
1859
1819
|
var t = /* @__PURE__ */ Yt();
|
|
1860
1820
|
function r(a) {
|
|
1861
1821
|
if (!(typeof a > "u"))
|
|
@@ -1880,62 +1840,62 @@ function jn() {
|
|
|
1880
1840
|
});
|
|
1881
1841
|
};
|
|
1882
1842
|
}
|
|
1883
|
-
return
|
|
1843
|
+
return G.bindAll = i, G;
|
|
1884
1844
|
}
|
|
1885
|
-
var
|
|
1886
|
-
function
|
|
1887
|
-
return
|
|
1845
|
+
var ot;
|
|
1846
|
+
function Gn() {
|
|
1847
|
+
return ot || (ot = 1, function(e) {
|
|
1888
1848
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.bindAll = e.bind = void 0;
|
|
1889
1849
|
var t = /* @__PURE__ */ Yt();
|
|
1890
1850
|
Object.defineProperty(e, "bind", { enumerable: !0, get: function() {
|
|
1891
1851
|
return t.bind;
|
|
1892
1852
|
} });
|
|
1893
|
-
var r = /* @__PURE__ */
|
|
1853
|
+
var r = /* @__PURE__ */ Un();
|
|
1894
1854
|
Object.defineProperty(e, "bindAll", { enumerable: !0, get: function() {
|
|
1895
1855
|
return r.bindAll;
|
|
1896
1856
|
} });
|
|
1897
|
-
}(
|
|
1857
|
+
}(Pe)), Pe;
|
|
1898
1858
|
}
|
|
1899
|
-
var
|
|
1900
|
-
function
|
|
1859
|
+
var ne = /* @__PURE__ */ Gn(), Ft = "data-pdnd-honey-pot";
|
|
1860
|
+
function $t(e) {
|
|
1901
1861
|
return e instanceof Element && e.hasAttribute(Ft);
|
|
1902
1862
|
}
|
|
1903
|
-
function
|
|
1904
|
-
var t = document.elementsFromPoint(e.x, e.y), r =
|
|
1905
|
-
return n ?
|
|
1863
|
+
function qt(e) {
|
|
1864
|
+
var t = document.elementsFromPoint(e.x, e.y), r = Bt(t, 2), n = r[0], i = r[1];
|
|
1865
|
+
return n ? $t(n) ? i ?? null : n : null;
|
|
1906
1866
|
}
|
|
1907
|
-
function
|
|
1867
|
+
function fe(e) {
|
|
1908
1868
|
"@babel/helpers - typeof";
|
|
1909
|
-
return
|
|
1869
|
+
return fe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1910
1870
|
return typeof t;
|
|
1911
1871
|
} : function(t) {
|
|
1912
1872
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1913
|
-
},
|
|
1873
|
+
}, fe(e);
|
|
1914
1874
|
}
|
|
1915
|
-
function
|
|
1916
|
-
if (
|
|
1875
|
+
function Kn(e, t) {
|
|
1876
|
+
if (fe(e) != "object" || !e) return e;
|
|
1917
1877
|
var r = e[Symbol.toPrimitive];
|
|
1918
1878
|
if (r !== void 0) {
|
|
1919
1879
|
var n = r.call(e, t);
|
|
1920
|
-
if (
|
|
1880
|
+
if (fe(n) != "object") return n;
|
|
1921
1881
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1922
1882
|
}
|
|
1923
1883
|
return (t === "string" ? String : Number)(e);
|
|
1924
1884
|
}
|
|
1925
|
-
function
|
|
1926
|
-
var t =
|
|
1927
|
-
return
|
|
1885
|
+
function Vn(e) {
|
|
1886
|
+
var t = Kn(e, "string");
|
|
1887
|
+
return fe(t) == "symbol" ? t : t + "";
|
|
1928
1888
|
}
|
|
1929
|
-
function
|
|
1930
|
-
return (t =
|
|
1889
|
+
function qe(e, t, r) {
|
|
1890
|
+
return (t = Vn(t)) in e ? Object.defineProperty(e, t, {
|
|
1931
1891
|
value: r,
|
|
1932
1892
|
enumerable: !0,
|
|
1933
1893
|
configurable: !0,
|
|
1934
1894
|
writable: !0
|
|
1935
1895
|
}) : e[t] = r, e;
|
|
1936
1896
|
}
|
|
1937
|
-
var
|
|
1938
|
-
function
|
|
1897
|
+
var Qn = 2147483647;
|
|
1898
|
+
function st(e, t) {
|
|
1939
1899
|
var r = Object.keys(e);
|
|
1940
1900
|
if (Object.getOwnPropertySymbols) {
|
|
1941
1901
|
var n = Object.getOwnPropertySymbols(e);
|
|
@@ -1945,52 +1905,52 @@ function at(e, t) {
|
|
|
1945
1905
|
}
|
|
1946
1906
|
return r;
|
|
1947
1907
|
}
|
|
1948
|
-
function
|
|
1908
|
+
function ut(e) {
|
|
1949
1909
|
for (var t = 1; t < arguments.length; t++) {
|
|
1950
1910
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
1951
|
-
t % 2 ?
|
|
1952
|
-
|
|
1953
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) :
|
|
1911
|
+
t % 2 ? st(Object(r), !0).forEach(function(n) {
|
|
1912
|
+
qe(e, n, r[n]);
|
|
1913
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : st(Object(r)).forEach(function(n) {
|
|
1954
1914
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1955
1915
|
});
|
|
1956
1916
|
}
|
|
1957
1917
|
return e;
|
|
1958
1918
|
}
|
|
1959
|
-
var
|
|
1960
|
-
function
|
|
1919
|
+
var he = 2, ct = he / 2;
|
|
1920
|
+
function Jn(e) {
|
|
1961
1921
|
return {
|
|
1962
1922
|
x: Math.floor(e.x),
|
|
1963
1923
|
y: Math.floor(e.y)
|
|
1964
1924
|
};
|
|
1965
1925
|
}
|
|
1966
|
-
function
|
|
1926
|
+
function Zn(e) {
|
|
1967
1927
|
return {
|
|
1968
|
-
x: e.x -
|
|
1969
|
-
y: e.y -
|
|
1928
|
+
x: e.x - ct,
|
|
1929
|
+
y: e.y - ct
|
|
1970
1930
|
};
|
|
1971
1931
|
}
|
|
1972
|
-
function
|
|
1932
|
+
function ei(e) {
|
|
1973
1933
|
return {
|
|
1974
1934
|
x: Math.max(e.x, 0),
|
|
1975
1935
|
y: Math.max(e.y, 0)
|
|
1976
1936
|
};
|
|
1977
1937
|
}
|
|
1978
|
-
function
|
|
1938
|
+
function ti(e) {
|
|
1979
1939
|
return {
|
|
1980
|
-
x: Math.min(e.x, window.innerWidth -
|
|
1981
|
-
y: Math.min(e.y, window.innerHeight -
|
|
1940
|
+
x: Math.min(e.x, window.innerWidth - he),
|
|
1941
|
+
y: Math.min(e.y, window.innerHeight - he)
|
|
1982
1942
|
};
|
|
1983
1943
|
}
|
|
1984
|
-
function
|
|
1985
|
-
var t = e.client, r =
|
|
1944
|
+
function lt(e) {
|
|
1945
|
+
var t = e.client, r = ti(ei(Zn(Jn(t))));
|
|
1986
1946
|
return DOMRect.fromRect({
|
|
1987
1947
|
x: r.x,
|
|
1988
1948
|
y: r.y,
|
|
1989
|
-
width:
|
|
1990
|
-
height:
|
|
1949
|
+
width: he,
|
|
1950
|
+
height: he
|
|
1991
1951
|
});
|
|
1992
1952
|
}
|
|
1993
|
-
function
|
|
1953
|
+
function dt(e) {
|
|
1994
1954
|
var t = e.clientRect;
|
|
1995
1955
|
return {
|
|
1996
1956
|
left: "".concat(t.left, "px"),
|
|
@@ -1999,7 +1959,7 @@ function ct(e) {
|
|
|
1999
1959
|
height: "".concat(t.height, "px")
|
|
2000
1960
|
};
|
|
2001
1961
|
}
|
|
2002
|
-
function
|
|
1962
|
+
function ri(e) {
|
|
2003
1963
|
var t = e.client, r = e.clientRect;
|
|
2004
1964
|
return (
|
|
2005
1965
|
// is within horizontal bounds
|
|
@@ -2007,13 +1967,13 @@ function Kn(e) {
|
|
|
2007
1967
|
t.y >= r.y && t.y <= r.y + r.height
|
|
2008
1968
|
);
|
|
2009
1969
|
}
|
|
2010
|
-
function
|
|
1970
|
+
function ni(e) {
|
|
2011
1971
|
var t = e.initial, r = document.createElement("div");
|
|
2012
1972
|
r.setAttribute(Ft, "true");
|
|
2013
|
-
var n =
|
|
1973
|
+
var n = lt({
|
|
2014
1974
|
client: t
|
|
2015
1975
|
});
|
|
2016
|
-
Object.assign(r.style,
|
|
1976
|
+
Object.assign(r.style, ut(ut({
|
|
2017
1977
|
// Setting a background color explicitly to avoid any inherited styles.
|
|
2018
1978
|
// Looks like this could be `opacity: 0`, but worried that _might_
|
|
2019
1979
|
// cause the element to be ignored on some platforms.
|
|
@@ -2024,7 +1984,7 @@ function Vn(e) {
|
|
|
2024
1984
|
padding: 0,
|
|
2025
1985
|
margin: 0,
|
|
2026
1986
|
boxSizing: "border-box"
|
|
2027
|
-
},
|
|
1987
|
+
}, dt({
|
|
2028
1988
|
clientRect: n
|
|
2029
1989
|
})), {}, {
|
|
2030
1990
|
// We want this element to absorb pointer events,
|
|
@@ -2033,18 +1993,18 @@ function Vn(e) {
|
|
|
2033
1993
|
// Want to make sure the honey pot is top of everything else.
|
|
2034
1994
|
// Don't need to worry about native drag previews, as they will
|
|
2035
1995
|
// have been rendered (and removed) before the honey pot is rendered
|
|
2036
|
-
zIndex:
|
|
1996
|
+
zIndex: Qn
|
|
2037
1997
|
})), document.body.appendChild(r);
|
|
2038
|
-
var i =
|
|
1998
|
+
var i = ne.bind(window, {
|
|
2039
1999
|
type: "pointermove",
|
|
2040
2000
|
listener: function(u) {
|
|
2041
2001
|
var c = {
|
|
2042
2002
|
x: u.clientX,
|
|
2043
2003
|
y: u.clientY
|
|
2044
2004
|
};
|
|
2045
|
-
n =
|
|
2005
|
+
n = lt({
|
|
2046
2006
|
client: c
|
|
2047
|
-
}), Object.assign(r.style,
|
|
2007
|
+
}), Object.assign(r.style, dt({
|
|
2048
2008
|
clientRect: n
|
|
2049
2009
|
}));
|
|
2050
2010
|
},
|
|
@@ -2055,7 +2015,7 @@ function Vn(e) {
|
|
|
2055
2015
|
});
|
|
2056
2016
|
return function(u) {
|
|
2057
2017
|
var c = u.current;
|
|
2058
|
-
if (i(),
|
|
2018
|
+
if (i(), ri({
|
|
2059
2019
|
client: c,
|
|
2060
2020
|
clientRect: n
|
|
2061
2021
|
})) {
|
|
@@ -2065,7 +2025,7 @@ function Vn(e) {
|
|
|
2065
2025
|
function s() {
|
|
2066
2026
|
o(), r.remove();
|
|
2067
2027
|
}
|
|
2068
|
-
var o =
|
|
2028
|
+
var o = ne.bindAll(window, [
|
|
2069
2029
|
{
|
|
2070
2030
|
type: "pointerdown",
|
|
2071
2031
|
listener: s
|
|
@@ -2107,10 +2067,10 @@ function Vn(e) {
|
|
|
2107
2067
|
});
|
|
2108
2068
|
};
|
|
2109
2069
|
}
|
|
2110
|
-
function
|
|
2070
|
+
function ii() {
|
|
2111
2071
|
var e = null;
|
|
2112
2072
|
function t() {
|
|
2113
|
-
return e = null,
|
|
2073
|
+
return e = null, ne.bind(window, {
|
|
2114
2074
|
type: "pointermove",
|
|
2115
2075
|
listener: function(i) {
|
|
2116
2076
|
e = {
|
|
@@ -2134,7 +2094,7 @@ function Qn() {
|
|
|
2134
2094
|
x: s.clientX,
|
|
2135
2095
|
y: s.clientY
|
|
2136
2096
|
};
|
|
2137
|
-
n =
|
|
2097
|
+
n = ni({
|
|
2138
2098
|
initial: o
|
|
2139
2099
|
});
|
|
2140
2100
|
}
|
|
@@ -2154,20 +2114,20 @@ function Qn() {
|
|
|
2154
2114
|
getOnPostDispatch: r
|
|
2155
2115
|
};
|
|
2156
2116
|
}
|
|
2157
|
-
function
|
|
2158
|
-
if (Array.isArray(e)) return
|
|
2117
|
+
function ai(e) {
|
|
2118
|
+
if (Array.isArray(e)) return We(e);
|
|
2159
2119
|
}
|
|
2160
|
-
function
|
|
2120
|
+
function oi(e) {
|
|
2161
2121
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
2162
2122
|
}
|
|
2163
|
-
function
|
|
2123
|
+
function si() {
|
|
2164
2124
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2165
2125
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
2166
2126
|
}
|
|
2167
|
-
function
|
|
2168
|
-
return
|
|
2127
|
+
function Xt(e) {
|
|
2128
|
+
return ai(e) || oi(e) || jt(e) || si();
|
|
2169
2129
|
}
|
|
2170
|
-
function
|
|
2130
|
+
function ie(e) {
|
|
2171
2131
|
var t = null;
|
|
2172
2132
|
return function() {
|
|
2173
2133
|
if (!t) {
|
|
@@ -2181,23 +2141,23 @@ function ne(e) {
|
|
|
2181
2141
|
return t.result;
|
|
2182
2142
|
};
|
|
2183
2143
|
}
|
|
2184
|
-
var
|
|
2144
|
+
var ui = ie(function() {
|
|
2185
2145
|
return process.env.NODE_ENV === "test" ? !1 : navigator.userAgent.includes("Firefox");
|
|
2186
|
-
}),
|
|
2146
|
+
}), Xe = ie(function() {
|
|
2187
2147
|
if (process.env.NODE_ENV === "test")
|
|
2188
2148
|
return !1;
|
|
2189
2149
|
var t = navigator, r = t.userAgent;
|
|
2190
2150
|
return r.includes("AppleWebKit") && !r.includes("Chrome");
|
|
2191
|
-
}),
|
|
2151
|
+
}), Ce = {
|
|
2192
2152
|
isLeavingWindow: Symbol("leaving"),
|
|
2193
2153
|
isEnteringWindow: Symbol("entering")
|
|
2194
2154
|
};
|
|
2195
|
-
function
|
|
2155
|
+
function ci(e) {
|
|
2196
2156
|
var t = e.dragLeave;
|
|
2197
|
-
return
|
|
2157
|
+
return Xe() ? t.hasOwnProperty(Ce.isLeavingWindow) : !1;
|
|
2198
2158
|
}
|
|
2199
2159
|
(function() {
|
|
2200
|
-
if (typeof window > "u" || process.env.NODE_ENV === "test" || !
|
|
2160
|
+
if (typeof window > "u" || process.env.NODE_ENV === "test" || !Xe())
|
|
2201
2161
|
return;
|
|
2202
2162
|
function t() {
|
|
2203
2163
|
return {
|
|
@@ -2209,7 +2169,7 @@ function ri(e) {
|
|
|
2209
2169
|
function n() {
|
|
2210
2170
|
r = t();
|
|
2211
2171
|
}
|
|
2212
|
-
|
|
2172
|
+
ne.bindAll(
|
|
2213
2173
|
window,
|
|
2214
2174
|
[{
|
|
2215
2175
|
type: "dragstart",
|
|
@@ -2225,12 +2185,12 @@ function ri(e) {
|
|
|
2225
2185
|
}, {
|
|
2226
2186
|
type: "dragenter",
|
|
2227
2187
|
listener: function(a) {
|
|
2228
|
-
!r.isOverWindow && r.enterCount === 0 && (a[
|
|
2188
|
+
!r.isOverWindow && r.enterCount === 0 && (a[Ce.isEnteringWindow] = !0), r.isOverWindow = !0, r.enterCount++;
|
|
2229
2189
|
}
|
|
2230
2190
|
}, {
|
|
2231
2191
|
type: "dragleave",
|
|
2232
2192
|
listener: function(a) {
|
|
2233
|
-
r.enterCount--, r.isOverWindow && r.enterCount === 0 && (a[
|
|
2193
|
+
r.enterCount--, r.isOverWindow && r.enterCount === 0 && (a[Ce.isLeavingWindow] = !0, r.isOverWindow = !1);
|
|
2234
2194
|
}
|
|
2235
2195
|
}],
|
|
2236
2196
|
// using `capture: true` so that adding event listeners
|
|
@@ -2240,19 +2200,19 @@ function ri(e) {
|
|
|
2240
2200
|
}
|
|
2241
2201
|
);
|
|
2242
2202
|
})();
|
|
2243
|
-
function
|
|
2203
|
+
function li(e) {
|
|
2244
2204
|
return "nodeName" in e;
|
|
2245
2205
|
}
|
|
2246
|
-
function
|
|
2247
|
-
return
|
|
2206
|
+
function di(e) {
|
|
2207
|
+
return li(e) && e.ownerDocument !== document;
|
|
2248
2208
|
}
|
|
2249
|
-
function
|
|
2209
|
+
function fi(e) {
|
|
2250
2210
|
var t = e.dragLeave, r = t.type, n = t.relatedTarget;
|
|
2251
|
-
return r !== "dragleave" ? !1 :
|
|
2211
|
+
return r !== "dragleave" ? !1 : Xe() ? ci({
|
|
2252
2212
|
dragLeave: t
|
|
2253
|
-
}) : n == null ? !0 :
|
|
2213
|
+
}) : n == null ? !0 : ui() ? di(n) : n instanceof HTMLIFrameElement;
|
|
2254
2214
|
}
|
|
2255
|
-
function
|
|
2215
|
+
function hi(e) {
|
|
2256
2216
|
var t = e.onDragEnd;
|
|
2257
2217
|
return [
|
|
2258
2218
|
// ## Detecting drag ending for removed draggables
|
|
@@ -2296,7 +2256,7 @@ function oi(e) {
|
|
|
2296
2256
|
}
|
|
2297
2257
|
];
|
|
2298
2258
|
}
|
|
2299
|
-
function
|
|
2259
|
+
function ce(e) {
|
|
2300
2260
|
return {
|
|
2301
2261
|
altKey: e.altKey,
|
|
2302
2262
|
button: e.button,
|
|
@@ -2310,7 +2270,7 @@ function ue(e) {
|
|
|
2310
2270
|
pageY: e.pageY
|
|
2311
2271
|
};
|
|
2312
2272
|
}
|
|
2313
|
-
var
|
|
2273
|
+
var gi = function(t) {
|
|
2314
2274
|
var r = [], n = null, i = function() {
|
|
2315
2275
|
for (var u = arguments.length, c = new Array(u), s = 0; s < u; s++)
|
|
2316
2276
|
c[s] = arguments[s];
|
|
@@ -2321,9 +2281,9 @@ var si = function(t) {
|
|
|
2321
2281
|
return i.cancel = function() {
|
|
2322
2282
|
n && (cancelAnimationFrame(n), n = null);
|
|
2323
2283
|
}, i;
|
|
2324
|
-
},
|
|
2284
|
+
}, Re = gi(function(e) {
|
|
2325
2285
|
return e();
|
|
2326
|
-
}),
|
|
2286
|
+
}), me = /* @__PURE__ */ function() {
|
|
2327
2287
|
var e = null;
|
|
2328
2288
|
function t(n) {
|
|
2329
2289
|
var i = requestAnimationFrame(function() {
|
|
@@ -2342,7 +2302,7 @@ var si = function(t) {
|
|
|
2342
2302
|
flush: r
|
|
2343
2303
|
};
|
|
2344
2304
|
}();
|
|
2345
|
-
function
|
|
2305
|
+
function pi(e) {
|
|
2346
2306
|
var t = e.source, r = e.initial, n = e.dispatchEvent, i = {
|
|
2347
2307
|
dropTargets: []
|
|
2348
2308
|
};
|
|
@@ -2365,7 +2325,7 @@ function ui(e) {
|
|
|
2365
2325
|
location: f,
|
|
2366
2326
|
nativeSetDragImage: o
|
|
2367
2327
|
}
|
|
2368
|
-
}),
|
|
2328
|
+
}), me.schedule(function() {
|
|
2369
2329
|
a({
|
|
2370
2330
|
eventName: "onDragStart",
|
|
2371
2331
|
payload: {
|
|
@@ -2377,7 +2337,7 @@ function ui(e) {
|
|
|
2377
2337
|
},
|
|
2378
2338
|
dragUpdate: function(s) {
|
|
2379
2339
|
var o = s.current;
|
|
2380
|
-
|
|
2340
|
+
me.flush(), Re.cancel(), a({
|
|
2381
2341
|
eventName: "onDropTargetChange",
|
|
2382
2342
|
payload: {
|
|
2383
2343
|
source: t,
|
|
@@ -2391,8 +2351,8 @@ function ui(e) {
|
|
|
2391
2351
|
},
|
|
2392
2352
|
drag: function(s) {
|
|
2393
2353
|
var o = s.current;
|
|
2394
|
-
|
|
2395
|
-
|
|
2354
|
+
Re(function() {
|
|
2355
|
+
me.flush();
|
|
2396
2356
|
var f = {
|
|
2397
2357
|
initial: r,
|
|
2398
2358
|
previous: i,
|
|
@@ -2409,7 +2369,7 @@ function ui(e) {
|
|
|
2409
2369
|
},
|
|
2410
2370
|
drop: function(s) {
|
|
2411
2371
|
var o = s.current, f = s.updatedSourcePayload;
|
|
2412
|
-
|
|
2372
|
+
me.flush(), Re.cancel(), a({
|
|
2413
2373
|
eventName: "onDrop",
|
|
2414
2374
|
payload: {
|
|
2415
2375
|
source: f ?? t,
|
|
@@ -2424,16 +2384,16 @@ function ui(e) {
|
|
|
2424
2384
|
};
|
|
2425
2385
|
return u;
|
|
2426
2386
|
}
|
|
2427
|
-
var
|
|
2387
|
+
var Le = {
|
|
2428
2388
|
isActive: !1
|
|
2429
2389
|
};
|
|
2430
|
-
function
|
|
2431
|
-
return !
|
|
2390
|
+
function Ut() {
|
|
2391
|
+
return !Le.isActive;
|
|
2432
2392
|
}
|
|
2433
|
-
function
|
|
2393
|
+
function mi(e) {
|
|
2434
2394
|
return e.dataTransfer ? e.dataTransfer.setDragImage.bind(e.dataTransfer) : null;
|
|
2435
2395
|
}
|
|
2436
|
-
function
|
|
2396
|
+
function yi(e) {
|
|
2437
2397
|
var t = e.current, r = e.next;
|
|
2438
2398
|
if (t.length !== r.length)
|
|
2439
2399
|
return !0;
|
|
@@ -2442,30 +2402,30 @@ function li(e) {
|
|
|
2442
2402
|
return !0;
|
|
2443
2403
|
return !1;
|
|
2444
2404
|
}
|
|
2445
|
-
function
|
|
2405
|
+
function vi(e) {
|
|
2446
2406
|
var t = e.event, r = e.dragType, n = e.getDropTargetsOver, i = e.dispatchEvent;
|
|
2447
|
-
if (!
|
|
2407
|
+
if (!Ut())
|
|
2448
2408
|
return;
|
|
2449
|
-
var a =
|
|
2409
|
+
var a = bi({
|
|
2450
2410
|
event: t,
|
|
2451
2411
|
dragType: r,
|
|
2452
2412
|
getDropTargetsOver: n
|
|
2453
2413
|
});
|
|
2454
|
-
|
|
2414
|
+
Le.isActive = !0;
|
|
2455
2415
|
var u = {
|
|
2456
2416
|
current: a
|
|
2457
2417
|
};
|
|
2458
|
-
|
|
2418
|
+
ke({
|
|
2459
2419
|
event: t,
|
|
2460
2420
|
current: a.dropTargets
|
|
2461
2421
|
});
|
|
2462
|
-
var c =
|
|
2422
|
+
var c = pi({
|
|
2463
2423
|
source: r.payload,
|
|
2464
2424
|
dispatchEvent: i,
|
|
2465
2425
|
initial: a
|
|
2466
2426
|
});
|
|
2467
2427
|
function s(h) {
|
|
2468
|
-
var g =
|
|
2428
|
+
var g = yi({
|
|
2469
2429
|
current: u.current.dropTargets,
|
|
2470
2430
|
next: h.dropTargets
|
|
2471
2431
|
});
|
|
@@ -2474,7 +2434,7 @@ function di(e) {
|
|
|
2474
2434
|
});
|
|
2475
2435
|
}
|
|
2476
2436
|
function o(h) {
|
|
2477
|
-
var g =
|
|
2437
|
+
var g = ce(h), p = $t(h.target) ? qt({
|
|
2478
2438
|
x: g.clientX,
|
|
2479
2439
|
y: g.clientY
|
|
2480
2440
|
}) : h.target, m = n({
|
|
@@ -2483,7 +2443,7 @@ function di(e) {
|
|
|
2483
2443
|
source: r.payload,
|
|
2484
2444
|
current: u.current.dropTargets
|
|
2485
2445
|
});
|
|
2486
|
-
m.length && (h.preventDefault(),
|
|
2446
|
+
m.length && (h.preventDefault(), ke({
|
|
2487
2447
|
event: h,
|
|
2488
2448
|
current: m
|
|
2489
2449
|
})), s({
|
|
@@ -2501,9 +2461,9 @@ function di(e) {
|
|
|
2501
2461
|
}), l();
|
|
2502
2462
|
}
|
|
2503
2463
|
function l() {
|
|
2504
|
-
|
|
2464
|
+
Le.isActive = !1, d();
|
|
2505
2465
|
}
|
|
2506
|
-
var d =
|
|
2466
|
+
var d = ne.bindAll(
|
|
2507
2467
|
window,
|
|
2508
2468
|
[{
|
|
2509
2469
|
// 👋 Note: we are repurposing the `dragover` event as our `drag` event
|
|
@@ -2524,7 +2484,7 @@ function di(e) {
|
|
|
2524
2484
|
}, {
|
|
2525
2485
|
type: "dragleave",
|
|
2526
2486
|
listener: function(g) {
|
|
2527
|
-
|
|
2487
|
+
fi({
|
|
2528
2488
|
dragLeave: g
|
|
2529
2489
|
}) && (s({
|
|
2530
2490
|
input: u.current.input,
|
|
@@ -2537,12 +2497,12 @@ function di(e) {
|
|
|
2537
2497
|
listener: function(g) {
|
|
2538
2498
|
if (u.current = {
|
|
2539
2499
|
dropTargets: u.current.dropTargets,
|
|
2540
|
-
input:
|
|
2500
|
+
input: ce(g)
|
|
2541
2501
|
}, !u.current.dropTargets.length) {
|
|
2542
2502
|
f();
|
|
2543
2503
|
return;
|
|
2544
2504
|
}
|
|
2545
|
-
g.preventDefault(),
|
|
2505
|
+
g.preventDefault(), ke({
|
|
2546
2506
|
event: g,
|
|
2547
2507
|
current: u.current.dropTargets
|
|
2548
2508
|
}), c.drop({
|
|
@@ -2564,10 +2524,10 @@ function di(e) {
|
|
|
2564
2524
|
listener: function(g) {
|
|
2565
2525
|
u.current = {
|
|
2566
2526
|
dropTargets: u.current.dropTargets,
|
|
2567
|
-
input:
|
|
2527
|
+
input: ce(g)
|
|
2568
2528
|
}, f();
|
|
2569
2529
|
}
|
|
2570
|
-
}].concat(
|
|
2530
|
+
}].concat(Xt(hi({
|
|
2571
2531
|
onDragEnd: f
|
|
2572
2532
|
}))),
|
|
2573
2533
|
// Once we have started a managed drag operation it is important that we see / own all drag events
|
|
@@ -2579,15 +2539,15 @@ function di(e) {
|
|
|
2579
2539
|
}
|
|
2580
2540
|
);
|
|
2581
2541
|
c.start({
|
|
2582
|
-
nativeSetDragImage:
|
|
2542
|
+
nativeSetDragImage: mi(t)
|
|
2583
2543
|
});
|
|
2584
2544
|
}
|
|
2585
|
-
function
|
|
2545
|
+
function ke(e) {
|
|
2586
2546
|
var t, r = e.event, n = e.current, i = (t = n[0]) === null || t === void 0 ? void 0 : t.dropEffect;
|
|
2587
2547
|
i != null && r.dataTransfer && (r.dataTransfer.dropEffect = i);
|
|
2588
2548
|
}
|
|
2589
|
-
function
|
|
2590
|
-
var t = e.event, r = e.dragType, n = e.getDropTargetsOver, i =
|
|
2549
|
+
function bi(e) {
|
|
2550
|
+
var t = e.event, r = e.dragType, n = e.getDropTargetsOver, i = ce(t);
|
|
2591
2551
|
if (r.startedFrom === "external")
|
|
2592
2552
|
return {
|
|
2593
2553
|
input: i,
|
|
@@ -2604,12 +2564,12 @@ function fi(e) {
|
|
|
2604
2564
|
dropTargets: a
|
|
2605
2565
|
};
|
|
2606
2566
|
}
|
|
2607
|
-
var
|
|
2608
|
-
canStart:
|
|
2609
|
-
start:
|
|
2610
|
-
},
|
|
2611
|
-
function
|
|
2612
|
-
var t = e.typeKey, r = e.mount, n =
|
|
2567
|
+
var ft = {
|
|
2568
|
+
canStart: Ut,
|
|
2569
|
+
start: vi
|
|
2570
|
+
}, He = /* @__PURE__ */ new Map();
|
|
2571
|
+
function wi(e) {
|
|
2572
|
+
var t = e.typeKey, r = e.mount, n = He.get(t);
|
|
2613
2573
|
if (n)
|
|
2614
2574
|
return n.usageCount++, n;
|
|
2615
2575
|
var i = {
|
|
@@ -2617,15 +2577,15 @@ function hi(e) {
|
|
|
2617
2577
|
unmount: r(),
|
|
2618
2578
|
usageCount: 1
|
|
2619
2579
|
};
|
|
2620
|
-
return
|
|
2580
|
+
return He.set(t, i), i;
|
|
2621
2581
|
}
|
|
2622
|
-
function
|
|
2623
|
-
var t =
|
|
2582
|
+
function xi(e) {
|
|
2583
|
+
var t = wi(e);
|
|
2624
2584
|
return function() {
|
|
2625
|
-
t.usageCount--, !(t.usageCount > 0) && (t.unmount(),
|
|
2585
|
+
t.usageCount--, !(t.usageCount > 0) && (t.unmount(), He.delete(e.typeKey));
|
|
2626
2586
|
};
|
|
2627
2587
|
}
|
|
2628
|
-
function
|
|
2588
|
+
function Ue() {
|
|
2629
2589
|
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
|
2630
2590
|
t[r] = arguments[r];
|
|
2631
2591
|
return function() {
|
|
@@ -2634,13 +2594,13 @@ function Xe() {
|
|
|
2634
2594
|
});
|
|
2635
2595
|
};
|
|
2636
2596
|
}
|
|
2637
|
-
function
|
|
2597
|
+
function Gt(e, t) {
|
|
2638
2598
|
var r = t.attribute, n = t.value;
|
|
2639
2599
|
return e.setAttribute(r, n), function() {
|
|
2640
2600
|
return e.removeAttribute(r);
|
|
2641
2601
|
};
|
|
2642
2602
|
}
|
|
2643
|
-
function
|
|
2603
|
+
function ht(e, t) {
|
|
2644
2604
|
var r = Object.keys(e);
|
|
2645
2605
|
if (Object.getOwnPropertySymbols) {
|
|
2646
2606
|
var n = Object.getOwnPropertySymbols(e);
|
|
@@ -2653,18 +2613,18 @@ function dt(e, t) {
|
|
|
2653
2613
|
function F(e) {
|
|
2654
2614
|
for (var t = 1; t < arguments.length; t++) {
|
|
2655
2615
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
2656
|
-
t % 2 ?
|
|
2657
|
-
|
|
2658
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) :
|
|
2616
|
+
t % 2 ? ht(Object(r), !0).forEach(function(n) {
|
|
2617
|
+
qe(e, n, r[n]);
|
|
2618
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ht(Object(r)).forEach(function(n) {
|
|
2659
2619
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
2660
2620
|
});
|
|
2661
2621
|
}
|
|
2662
2622
|
return e;
|
|
2663
2623
|
}
|
|
2664
|
-
function
|
|
2624
|
+
function Ne(e, t) {
|
|
2665
2625
|
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
2666
2626
|
if (!r) {
|
|
2667
|
-
if (Array.isArray(e) || (r =
|
|
2627
|
+
if (Array.isArray(e) || (r = Si(e)) || t) {
|
|
2668
2628
|
r && (e = r);
|
|
2669
2629
|
var n = 0, i = function() {
|
|
2670
2630
|
};
|
|
@@ -2693,22 +2653,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2693
2653
|
}
|
|
2694
2654
|
} };
|
|
2695
2655
|
}
|
|
2696
|
-
function
|
|
2656
|
+
function Si(e, t) {
|
|
2697
2657
|
if (e) {
|
|
2698
|
-
if (typeof e == "string") return
|
|
2658
|
+
if (typeof e == "string") return gt(e, t);
|
|
2699
2659
|
var r = {}.toString.call(e).slice(8, -1);
|
|
2700
|
-
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ?
|
|
2660
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? gt(e, t) : void 0;
|
|
2701
2661
|
}
|
|
2702
2662
|
}
|
|
2703
|
-
function
|
|
2663
|
+
function gt(e, t) {
|
|
2704
2664
|
(t == null || t > e.length) && (t = e.length);
|
|
2705
2665
|
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
2706
2666
|
return n;
|
|
2707
2667
|
}
|
|
2708
|
-
function
|
|
2668
|
+
function Ae(e) {
|
|
2709
2669
|
return e.slice(0).reverse();
|
|
2710
2670
|
}
|
|
2711
|
-
function
|
|
2671
|
+
function Oi(e) {
|
|
2712
2672
|
var t = e.typeKey, r = e.defaultDropEffect, n = /* @__PURE__ */ new WeakMap(), i = "data-drop-target-for-".concat(t), a = "[".concat(i, "]");
|
|
2713
2673
|
function u(h) {
|
|
2714
2674
|
return n.set(h.element, h), function() {
|
|
@@ -2726,11 +2686,11 @@ function mi(e) {
|
|
|
2726
2686
|
as it can result in some strange browser event ordering.
|
|
2727
2687
|
`.replace(/\s{2,}/g, " ").trim());
|
|
2728
2688
|
}
|
|
2729
|
-
var p =
|
|
2689
|
+
var p = Ue(Gt(h.element, {
|
|
2730
2690
|
attribute: i,
|
|
2731
2691
|
value: "true"
|
|
2732
2692
|
}), u(h));
|
|
2733
|
-
return
|
|
2693
|
+
return ie(p);
|
|
2734
2694
|
}
|
|
2735
2695
|
function s(h) {
|
|
2736
2696
|
var g, p, m, b, O = h.source, x = h.target, w = h.input, M = h.result, S = M === void 0 ? [] : M;
|
|
@@ -2749,19 +2709,19 @@ function mi(e) {
|
|
|
2749
2709
|
var E = n.get(z);
|
|
2750
2710
|
if (E == null)
|
|
2751
2711
|
return S;
|
|
2752
|
-
var
|
|
2712
|
+
var v = {
|
|
2753
2713
|
input: w,
|
|
2754
2714
|
source: O,
|
|
2755
2715
|
element: E.element
|
|
2756
2716
|
};
|
|
2757
|
-
if (E.canDrop && !E.canDrop(
|
|
2717
|
+
if (E.canDrop && !E.canDrop(v))
|
|
2758
2718
|
return s({
|
|
2759
2719
|
source: O,
|
|
2760
2720
|
target: E.element.parentElement,
|
|
2761
2721
|
input: w,
|
|
2762
2722
|
result: S
|
|
2763
2723
|
});
|
|
2764
|
-
var D = (g = (p = E.getData) === null || p === void 0 ? void 0 : p.call(E,
|
|
2724
|
+
var D = (g = (p = E.getData) === null || p === void 0 ? void 0 : p.call(E, v)) !== null && g !== void 0 ? g : {}, P = (m = (b = E.getDropEffect) === null || b === void 0 ? void 0 : b.call(E, v)) !== null && m !== void 0 ? m : r, R = {
|
|
2765
2725
|
data: D,
|
|
2766
2726
|
element: E.element,
|
|
2767
2727
|
dropEffect: P,
|
|
@@ -2774,11 +2734,11 @@ function mi(e) {
|
|
|
2774
2734
|
target: E.element.parentElement,
|
|
2775
2735
|
input: w,
|
|
2776
2736
|
// Using bubble ordering. Same ordering as `event.getPath()`
|
|
2777
|
-
result: [].concat(
|
|
2737
|
+
result: [].concat(Xt(S), [R])
|
|
2778
2738
|
});
|
|
2779
2739
|
}
|
|
2780
2740
|
function o(h) {
|
|
2781
|
-
var g = h.eventName, p = h.payload, m =
|
|
2741
|
+
var g = h.eventName, p = h.payload, m = Ne(p.location.current.dropTargets), b;
|
|
2782
2742
|
try {
|
|
2783
2743
|
for (m.s(); !(b = m.n()).done; ) {
|
|
2784
2744
|
var O, x = b.value, w = n.get(x.element), M = F(F({}, p), {}, {
|
|
@@ -2804,9 +2764,9 @@ function mi(e) {
|
|
|
2804
2764
|
onDragStart: o,
|
|
2805
2765
|
onDrop: o,
|
|
2806
2766
|
onDropTargetChange: function(g) {
|
|
2807
|
-
var p = g.payload, m = new Set(p.location.current.dropTargets.map(function(
|
|
2808
|
-
return
|
|
2809
|
-
})), b = /* @__PURE__ */ new Set(), O =
|
|
2767
|
+
var p = g.payload, m = new Set(p.location.current.dropTargets.map(function(U) {
|
|
2768
|
+
return U.element;
|
|
2769
|
+
})), b = /* @__PURE__ */ new Set(), O = Ne(p.location.previous.dropTargets), x;
|
|
2810
2770
|
try {
|
|
2811
2771
|
for (O.s(); !(x = O.n()).done; ) {
|
|
2812
2772
|
var w, M = x.value;
|
|
@@ -2815,28 +2775,28 @@ function mi(e) {
|
|
|
2815
2775
|
self: M
|
|
2816
2776
|
});
|
|
2817
2777
|
if (S == null || (w = S.onDropTargetChange) === null || w === void 0 || w.call(S, E), !z) {
|
|
2818
|
-
var
|
|
2819
|
-
S == null || (
|
|
2778
|
+
var v;
|
|
2779
|
+
S == null || (v = S.onDragLeave) === null || v === void 0 || v.call(S, E);
|
|
2820
2780
|
}
|
|
2821
2781
|
}
|
|
2822
|
-
} catch (
|
|
2823
|
-
O.e(
|
|
2782
|
+
} catch (U) {
|
|
2783
|
+
O.e(U);
|
|
2824
2784
|
} finally {
|
|
2825
2785
|
O.f();
|
|
2826
2786
|
}
|
|
2827
|
-
var D =
|
|
2787
|
+
var D = Ne(p.location.current.dropTargets), P;
|
|
2828
2788
|
try {
|
|
2829
2789
|
for (D.s(); !(P = D.n()).done; ) {
|
|
2830
|
-
var R, L,
|
|
2831
|
-
if (!b.has(
|
|
2832
|
-
var
|
|
2833
|
-
self:
|
|
2834
|
-
}), A = n.get(
|
|
2835
|
-
A == null || (R = A.onDropTargetChange) === null || R === void 0 || R.call(A,
|
|
2790
|
+
var R, L, X = P.value;
|
|
2791
|
+
if (!b.has(X.element)) {
|
|
2792
|
+
var J = F(F({}, p), {}, {
|
|
2793
|
+
self: X
|
|
2794
|
+
}), A = n.get(X.element);
|
|
2795
|
+
A == null || (R = A.onDropTargetChange) === null || R === void 0 || R.call(A, J), A == null || (L = A.onDragEnter) === null || L === void 0 || L.call(A, J);
|
|
2836
2796
|
}
|
|
2837
2797
|
}
|
|
2838
|
-
} catch (
|
|
2839
|
-
D.e(
|
|
2798
|
+
} catch (U) {
|
|
2799
|
+
D.e(U);
|
|
2840
2800
|
} finally {
|
|
2841
2801
|
D.f();
|
|
2842
2802
|
}
|
|
@@ -2853,10 +2813,10 @@ function mi(e) {
|
|
|
2853
2813
|
});
|
|
2854
2814
|
if (O.length >= b.length)
|
|
2855
2815
|
return O;
|
|
2856
|
-
for (var x =
|
|
2857
|
-
var z, E = x[S],
|
|
2858
|
-
if (
|
|
2859
|
-
M.push(
|
|
2816
|
+
for (var x = Ae(b), w = Ae(O), M = [], S = 0; S < x.length; S++) {
|
|
2817
|
+
var z, E = x[S], v = w[S];
|
|
2818
|
+
if (v != null) {
|
|
2819
|
+
M.push(v);
|
|
2860
2820
|
continue;
|
|
2861
2821
|
}
|
|
2862
2822
|
var D = M[S - 1], P = x[S - 1];
|
|
@@ -2877,7 +2837,7 @@ function mi(e) {
|
|
|
2877
2837
|
isActiveDueToStickiness: !0
|
|
2878
2838
|
}));
|
|
2879
2839
|
}
|
|
2880
|
-
return
|
|
2840
|
+
return Ae(M);
|
|
2881
2841
|
}
|
|
2882
2842
|
return {
|
|
2883
2843
|
dropTargetForConsumers: c,
|
|
@@ -2885,10 +2845,10 @@ function mi(e) {
|
|
|
2885
2845
|
dispatchEvent: l
|
|
2886
2846
|
};
|
|
2887
2847
|
}
|
|
2888
|
-
function
|
|
2848
|
+
function Di(e, t) {
|
|
2889
2849
|
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
2890
2850
|
if (!r) {
|
|
2891
|
-
if (Array.isArray(e) || (r =
|
|
2851
|
+
if (Array.isArray(e) || (r = Ti(e)) || t) {
|
|
2892
2852
|
r && (e = r);
|
|
2893
2853
|
var n = 0, i = function() {
|
|
2894
2854
|
};
|
|
@@ -2917,19 +2877,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2917
2877
|
}
|
|
2918
2878
|
} };
|
|
2919
2879
|
}
|
|
2920
|
-
function
|
|
2880
|
+
function Ti(e, t) {
|
|
2921
2881
|
if (e) {
|
|
2922
|
-
if (typeof e == "string") return
|
|
2882
|
+
if (typeof e == "string") return pt(e, t);
|
|
2923
2883
|
var r = {}.toString.call(e).slice(8, -1);
|
|
2924
|
-
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ?
|
|
2884
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? pt(e, t) : void 0;
|
|
2925
2885
|
}
|
|
2926
2886
|
}
|
|
2927
|
-
function
|
|
2887
|
+
function pt(e, t) {
|
|
2928
2888
|
(t == null || t > e.length) && (t = e.length);
|
|
2929
2889
|
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
2930
2890
|
return n;
|
|
2931
2891
|
}
|
|
2932
|
-
function
|
|
2892
|
+
function mt(e, t) {
|
|
2933
2893
|
var r = Object.keys(e);
|
|
2934
2894
|
if (Object.getOwnPropertySymbols) {
|
|
2935
2895
|
var n = Object.getOwnPropertySymbols(e);
|
|
@@ -2939,29 +2899,29 @@ function gt(e, t) {
|
|
|
2939
2899
|
}
|
|
2940
2900
|
return r;
|
|
2941
2901
|
}
|
|
2942
|
-
function
|
|
2902
|
+
function Mi(e) {
|
|
2943
2903
|
for (var t = 1; t < arguments.length; t++) {
|
|
2944
2904
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
2945
|
-
t % 2 ?
|
|
2946
|
-
|
|
2947
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) :
|
|
2905
|
+
t % 2 ? mt(Object(r), !0).forEach(function(n) {
|
|
2906
|
+
qe(e, n, r[n]);
|
|
2907
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : mt(Object(r)).forEach(function(n) {
|
|
2948
2908
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
2949
2909
|
});
|
|
2950
2910
|
}
|
|
2951
2911
|
return e;
|
|
2952
2912
|
}
|
|
2953
|
-
function
|
|
2913
|
+
function Ei() {
|
|
2954
2914
|
var e = /* @__PURE__ */ new Set(), t = null;
|
|
2955
2915
|
function r(a) {
|
|
2956
2916
|
t && (!a.canMonitor || a.canMonitor(t.canMonitorArgs)) && t.active.add(a);
|
|
2957
2917
|
}
|
|
2958
2918
|
function n(a) {
|
|
2959
|
-
var u =
|
|
2919
|
+
var u = Mi({}, a);
|
|
2960
2920
|
e.add(u), r(u);
|
|
2961
2921
|
function c() {
|
|
2962
2922
|
e.delete(u), t && t.active.delete(u);
|
|
2963
2923
|
}
|
|
2964
|
-
return
|
|
2924
|
+
return ie(c);
|
|
2965
2925
|
}
|
|
2966
2926
|
function i(a) {
|
|
2967
2927
|
var u = a.eventName, c = a.payload;
|
|
@@ -2973,7 +2933,7 @@ function wi() {
|
|
|
2973
2933
|
},
|
|
2974
2934
|
active: /* @__PURE__ */ new Set()
|
|
2975
2935
|
};
|
|
2976
|
-
var s =
|
|
2936
|
+
var s = Di(e), o;
|
|
2977
2937
|
try {
|
|
2978
2938
|
for (s.s(); !(o = s.n()).done; ) {
|
|
2979
2939
|
var f = o.value;
|
|
@@ -3001,8 +2961,8 @@ function wi() {
|
|
|
3001
2961
|
monitorForConsumers: n
|
|
3002
2962
|
};
|
|
3003
2963
|
}
|
|
3004
|
-
function
|
|
3005
|
-
var t = e.typeKey, r = e.mount, n = e.dispatchEventToSource, i = e.onPostDispatch, a = e.defaultDropEffect, u =
|
|
2964
|
+
function Pi(e) {
|
|
2965
|
+
var t = e.typeKey, r = e.mount, n = e.dispatchEventToSource, i = e.onPostDispatch, a = e.defaultDropEffect, u = Ei(), c = Oi({
|
|
3006
2966
|
typeKey: t,
|
|
3007
2967
|
defaultDropEffect: a
|
|
3008
2968
|
});
|
|
@@ -3011,7 +2971,7 @@ function xi(e) {
|
|
|
3011
2971
|
}
|
|
3012
2972
|
function o(l) {
|
|
3013
2973
|
var d = l.event, h = l.dragType;
|
|
3014
|
-
|
|
2974
|
+
ft.start({
|
|
3015
2975
|
event: d,
|
|
3016
2976
|
dragType: h,
|
|
3017
2977
|
getDropTargetsOver: c.getIsOver,
|
|
@@ -3021,12 +2981,12 @@ function xi(e) {
|
|
|
3021
2981
|
function f() {
|
|
3022
2982
|
function l() {
|
|
3023
2983
|
var d = {
|
|
3024
|
-
canStart:
|
|
2984
|
+
canStart: ft.canStart,
|
|
3025
2985
|
start: o
|
|
3026
2986
|
};
|
|
3027
2987
|
return r(d);
|
|
3028
2988
|
}
|
|
3029
|
-
return
|
|
2989
|
+
return xi({
|
|
3030
2990
|
typeKey: t,
|
|
3031
2991
|
mount: l
|
|
3032
2992
|
});
|
|
@@ -3037,19 +2997,19 @@ function xi(e) {
|
|
|
3037
2997
|
monitor: u.monitorForConsumers
|
|
3038
2998
|
};
|
|
3039
2999
|
}
|
|
3040
|
-
var
|
|
3000
|
+
var Ri = ie(function() {
|
|
3041
3001
|
return navigator.userAgent.toLocaleLowerCase().includes("android");
|
|
3042
|
-
}),
|
|
3043
|
-
function
|
|
3044
|
-
return
|
|
3045
|
-
|
|
3002
|
+
}), ki = "pdnd:android-fallback", yt = "text/plain", Ni = "text/uri-list", Ai = "application/vnd.pdnd", ge = /* @__PURE__ */ new WeakMap();
|
|
3003
|
+
function zi(e) {
|
|
3004
|
+
return ge.set(e.element, e), function() {
|
|
3005
|
+
ge.delete(e.element);
|
|
3046
3006
|
};
|
|
3047
3007
|
}
|
|
3048
|
-
var
|
|
3008
|
+
var vt = ii(), Ge = Pi({
|
|
3049
3009
|
typeKey: "element",
|
|
3050
3010
|
defaultDropEffect: "move",
|
|
3051
3011
|
mount: function(t) {
|
|
3052
|
-
return
|
|
3012
|
+
return Ue(vt.bindEvents(), ne.bind(document, {
|
|
3053
3013
|
type: "dragstart",
|
|
3054
3014
|
listener: function(n) {
|
|
3055
3015
|
var i, a, u, c, s, o;
|
|
@@ -3069,10 +3029,10 @@ var mt = Qn(), Ue = xi({
|
|
|
3069
3029
|
var f = n.target;
|
|
3070
3030
|
if (!(f instanceof HTMLElement))
|
|
3071
3031
|
return null;
|
|
3072
|
-
var l =
|
|
3032
|
+
var l = ge.get(f);
|
|
3073
3033
|
if (!l)
|
|
3074
3034
|
return null;
|
|
3075
|
-
var d =
|
|
3035
|
+
var d = ce(n), h = {
|
|
3076
3036
|
element: l.element,
|
|
3077
3037
|
dragHandle: (i = l.dragHandle) !== null && i !== void 0 ? i : null,
|
|
3078
3038
|
input: d
|
|
@@ -3080,7 +3040,7 @@ var mt = Qn(), Ue = xi({
|
|
|
3080
3040
|
if (l.canDrag && !l.canDrag(h))
|
|
3081
3041
|
return n.preventDefault(), null;
|
|
3082
3042
|
if (l.dragHandle) {
|
|
3083
|
-
var g =
|
|
3043
|
+
var g = qt({
|
|
3084
3044
|
x: d.clientX,
|
|
3085
3045
|
y: d.clientY
|
|
3086
3046
|
});
|
|
@@ -3090,10 +3050,10 @@ var mt = Qn(), Ue = xi({
|
|
|
3090
3050
|
var p = (a = (u = l.getInitialDataForExternal) === null || u === void 0 ? void 0 : u.call(l, h)) !== null && a !== void 0 ? a : null;
|
|
3091
3051
|
if (p)
|
|
3092
3052
|
for (var m = 0, b = Object.entries(p); m < b.length; m++) {
|
|
3093
|
-
var O =
|
|
3053
|
+
var O = Bt(b[m], 2), x = O[0], w = O[1];
|
|
3094
3054
|
n.dataTransfer.setData(x, w ?? "");
|
|
3095
3055
|
}
|
|
3096
|
-
|
|
3056
|
+
Ri() && !n.dataTransfer.types.includes(yt) && !n.dataTransfer.types.includes(Ni) && n.dataTransfer.setData(yt, ki), n.dataTransfer.setData(Ai, "");
|
|
3097
3057
|
var M = {
|
|
3098
3058
|
element: l.element,
|
|
3099
3059
|
dragHandle: (c = l.dragHandle) !== null && c !== void 0 ? c : null,
|
|
@@ -3113,7 +3073,7 @@ var mt = Qn(), Ue = xi({
|
|
|
3113
3073
|
},
|
|
3114
3074
|
dispatchEventToSource: function(t) {
|
|
3115
3075
|
var r, n, i = t.eventName, a = t.payload;
|
|
3116
|
-
(r =
|
|
3076
|
+
(r = ge.get(a.source.element)) === null || r === void 0 || (n = r[i]) === null || n === void 0 || n.call(
|
|
3117
3077
|
r,
|
|
3118
3078
|
// I cannot seem to get the types right here.
|
|
3119
3079
|
// TS doesn't seem to like that one event can need `nativeSetDragImage`
|
|
@@ -3121,43 +3081,43 @@ var mt = Qn(), Ue = xi({
|
|
|
3121
3081
|
a
|
|
3122
3082
|
);
|
|
3123
3083
|
},
|
|
3124
|
-
onPostDispatch:
|
|
3125
|
-
}),
|
|
3126
|
-
function
|
|
3084
|
+
onPostDispatch: vt.getOnPostDispatch()
|
|
3085
|
+
}), _i = Ge.dropTarget, Wi = Ge.monitor;
|
|
3086
|
+
function Ci(e) {
|
|
3127
3087
|
if (process.env.NODE_ENV !== "production" && e.dragHandle && !e.element.contains(e.dragHandle) && console.warn("Drag handle element must be contained in draggable element", {
|
|
3128
3088
|
element: e.element,
|
|
3129
3089
|
dragHandle: e.dragHandle
|
|
3130
3090
|
}), process.env.NODE_ENV !== "production") {
|
|
3131
|
-
var t =
|
|
3091
|
+
var t = ge.get(e.element);
|
|
3132
3092
|
t && console.warn("You have already registered a `draggable` on the same element", {
|
|
3133
3093
|
existing: t,
|
|
3134
3094
|
proposed: e
|
|
3135
3095
|
});
|
|
3136
3096
|
}
|
|
3137
|
-
var r =
|
|
3097
|
+
var r = Ue(
|
|
3138
3098
|
// making the draggable register the adapter rather than drop targets
|
|
3139
3099
|
// this is because you *must* have a draggable element to start a drag
|
|
3140
3100
|
// but you _might_ not have any drop targets immediately
|
|
3141
3101
|
// (You might create drop targets async)
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3102
|
+
Ge.registerUsage(),
|
|
3103
|
+
zi(e),
|
|
3104
|
+
Gt(e.element, {
|
|
3145
3105
|
attribute: "draggable",
|
|
3146
3106
|
value: "true"
|
|
3147
3107
|
})
|
|
3148
3108
|
);
|
|
3149
|
-
return
|
|
3109
|
+
return ie(r);
|
|
3150
3110
|
}
|
|
3151
|
-
var
|
|
3152
|
-
function
|
|
3111
|
+
var Li = process.env.NODE_ENV === "production", bt = "Invariant failed";
|
|
3112
|
+
function Ie(e, t) {
|
|
3153
3113
|
if (!e) {
|
|
3154
|
-
if (
|
|
3155
|
-
throw new Error(
|
|
3156
|
-
var r =
|
|
3114
|
+
if (Li)
|
|
3115
|
+
throw new Error(bt);
|
|
3116
|
+
var r = bt;
|
|
3157
3117
|
throw new Error(r);
|
|
3158
3118
|
}
|
|
3159
3119
|
}
|
|
3160
|
-
function
|
|
3120
|
+
function Hi({
|
|
3161
3121
|
children: e,
|
|
3162
3122
|
onDragStart: t = () => {
|
|
3163
3123
|
},
|
|
@@ -3170,53 +3130,53 @@ function Ni({
|
|
|
3170
3130
|
onDragLeave: a = () => {
|
|
3171
3131
|
}
|
|
3172
3132
|
}) {
|
|
3173
|
-
const u =
|
|
3174
|
-
return
|
|
3133
|
+
const u = le(null);
|
|
3134
|
+
return re(() => {
|
|
3175
3135
|
const c = u.current;
|
|
3176
|
-
return
|
|
3136
|
+
return Ie(c), _i({
|
|
3177
3137
|
element: c,
|
|
3178
3138
|
getData: () => ({ drop: "drop" }),
|
|
3179
3139
|
onDragStart: ({ source: s, location: o }) => {
|
|
3180
|
-
const f =
|
|
3140
|
+
const f = ye(o), l = te(s, o);
|
|
3181
3141
|
t(f, l, s.data);
|
|
3182
3142
|
},
|
|
3183
3143
|
onDragEnter: ({ source: s, location: o }) => {
|
|
3184
|
-
const f =
|
|
3144
|
+
const f = ye(o), l = te(s, o);
|
|
3185
3145
|
i(f, l, s.data);
|
|
3186
3146
|
},
|
|
3187
3147
|
onDrag: ({ source: s, location: o }) => {
|
|
3188
|
-
const f =
|
|
3148
|
+
const f = ye(o), l = te(s, o);
|
|
3189
3149
|
r(f, l, s.data);
|
|
3190
3150
|
},
|
|
3191
3151
|
onDrop: ({ source: s, location: o }) => {
|
|
3192
|
-
const f =
|
|
3152
|
+
const f = ye(o), l = te(s, o);
|
|
3193
3153
|
n(f, l, s.data);
|
|
3194
3154
|
},
|
|
3195
3155
|
onDragLeave: ({ source: s, location: o }) => {
|
|
3196
|
-
const f =
|
|
3156
|
+
const f = te(s, o);
|
|
3197
3157
|
a(f, s.data);
|
|
3198
3158
|
}
|
|
3199
3159
|
});
|
|
3200
|
-
}, [r, a, t, n, i]), /* @__PURE__ */
|
|
3160
|
+
}, [r, a, t, n, i]), /* @__PURE__ */ y("div", { className: "timelane-drop-target", ref: u, children: e });
|
|
3201
3161
|
}
|
|
3202
|
-
function
|
|
3162
|
+
function ye(e) {
|
|
3203
3163
|
const t = e.current.dropTargets[0].element.getBoundingClientRect();
|
|
3204
3164
|
return {
|
|
3205
3165
|
x: e.current.input.pageX - t.x,
|
|
3206
3166
|
y: e.current.input.pageY - t.y
|
|
3207
3167
|
};
|
|
3208
3168
|
}
|
|
3209
|
-
function
|
|
3169
|
+
function Ii({
|
|
3210
3170
|
x: e,
|
|
3211
3171
|
y: t,
|
|
3212
3172
|
width: r,
|
|
3213
3173
|
height: n,
|
|
3214
3174
|
children: i
|
|
3215
3175
|
}) {
|
|
3216
|
-
return /* @__PURE__ */
|
|
3176
|
+
return /* @__PURE__ */ y(
|
|
3217
3177
|
"div",
|
|
3218
3178
|
{
|
|
3219
|
-
className: "
|
|
3179
|
+
className: "timelane-drop-preview",
|
|
3220
3180
|
style: {
|
|
3221
3181
|
left: `${e}px`,
|
|
3222
3182
|
top: `${t}px`,
|
|
@@ -3227,155 +3187,7 @@ function Ai({
|
|
|
3227
3187
|
}
|
|
3228
3188
|
);
|
|
3229
3189
|
}
|
|
3230
|
-
|
|
3231
|
-
if (n === null)
|
|
3232
|
-
return null;
|
|
3233
|
-
const o = Ye(
|
|
3234
|
-
e,
|
|
3235
|
-
a,
|
|
3236
|
-
c
|
|
3237
|
-
), f = t.filter((d) => d.id !== r.id).map((d) => Fe(d, e, c, a));
|
|
3238
|
-
let l = null;
|
|
3239
|
-
return l = Ci(
|
|
3240
|
-
e,
|
|
3241
|
-
r,
|
|
3242
|
-
i,
|
|
3243
|
-
a,
|
|
3244
|
-
n
|
|
3245
|
-
), l = Wi(l, u), l = _i(
|
|
3246
|
-
l,
|
|
3247
|
-
o
|
|
3248
|
-
), l = Li(
|
|
3249
|
-
l,
|
|
3250
|
-
f,
|
|
3251
|
-
o,
|
|
3252
|
-
s
|
|
3253
|
-
), l;
|
|
3254
|
-
}
|
|
3255
|
-
function Ci(e, t, r, n, i) {
|
|
3256
|
-
const { width: a, height: u } = Lt(t, e, n), c = i.x + a * r.relative.x, s = i.y + u * r.relative.y;
|
|
3257
|
-
return {
|
|
3258
|
-
x: c,
|
|
3259
|
-
y: s,
|
|
3260
|
-
width: a,
|
|
3261
|
-
height: u
|
|
3262
|
-
};
|
|
3263
|
-
}
|
|
3264
|
-
function _i(e, t) {
|
|
3265
|
-
const r = Math.max(
|
|
3266
|
-
0,
|
|
3267
|
-
Math.min(e.x, t.width - e.width)
|
|
3268
|
-
), n = Math.max(
|
|
3269
|
-
0,
|
|
3270
|
-
Math.min(e.y, t.height - e.height)
|
|
3271
|
-
);
|
|
3272
|
-
return {
|
|
3273
|
-
...e,
|
|
3274
|
-
x: r,
|
|
3275
|
-
y: n
|
|
3276
|
-
};
|
|
3277
|
-
}
|
|
3278
|
-
function Wi(e, t) {
|
|
3279
|
-
const r = {
|
|
3280
|
-
...e
|
|
3281
|
-
};
|
|
3282
|
-
return t && t.x && (r.x = vt(r.x, t.x, t.offsetX || 0)), t && t.y && (r.y = vt(r.y, t.y, t.offsetY || 0)), r;
|
|
3283
|
-
}
|
|
3284
|
-
function vt(e, t, r) {
|
|
3285
|
-
return Math.max(
|
|
3286
|
-
r,
|
|
3287
|
-
r + Math.round((e - r) / t) * t
|
|
3288
|
-
);
|
|
3289
|
-
}
|
|
3290
|
-
function Li(e, t, r, n) {
|
|
3291
|
-
const i = {
|
|
3292
|
-
...e
|
|
3293
|
-
};
|
|
3294
|
-
if (!n) {
|
|
3295
|
-
let a = !0;
|
|
3296
|
-
for (; a; ) {
|
|
3297
|
-
const u = t.find((c) => se(i, c));
|
|
3298
|
-
u !== void 0 ? i.y = u.y + u.height : a = !1;
|
|
3299
|
-
}
|
|
3300
|
-
}
|
|
3301
|
-
return ji(i, r) ? i : null;
|
|
3302
|
-
}
|
|
3303
|
-
function se(e, t) {
|
|
3304
|
-
return !(e.x >= t.x + t.width || t.x >= e.x + e.width || e.y >= t.y + t.height || t.y >= e.y + e.height);
|
|
3305
|
-
}
|
|
3306
|
-
function Hi(e, t) {
|
|
3307
|
-
const r = Math.max(e.x, t.x), n = Math.max(e.y, t.y), i = Math.min(e.x + e.width, t.x + t.width), a = Math.min(e.y + e.height, t.y + t.height);
|
|
3308
|
-
return r < i && n < a ? {
|
|
3309
|
-
x: r,
|
|
3310
|
-
y: n,
|
|
3311
|
-
width: i - r,
|
|
3312
|
-
height: a - n
|
|
3313
|
-
} : null;
|
|
3314
|
-
}
|
|
3315
|
-
function Ii(e, t) {
|
|
3316
|
-
return !(e.start >= t.end || t.start >= e.end || e.offset >= t.offset + t.size || t.offset >= e.offset + e.size);
|
|
3317
|
-
}
|
|
3318
|
-
function ji(e, t) {
|
|
3319
|
-
return e.x >= 0 && e.y >= 0 && e.x + e.width <= t.width && e.y + e.height <= t.height;
|
|
3320
|
-
}
|
|
3321
|
-
function Yi(e, t, r, n, i) {
|
|
3322
|
-
const a = Fi(
|
|
3323
|
-
e,
|
|
3324
|
-
t,
|
|
3325
|
-
r.capacity,
|
|
3326
|
-
n
|
|
3327
|
-
);
|
|
3328
|
-
if (a) {
|
|
3329
|
-
const u = Bi(
|
|
3330
|
-
e,
|
|
3331
|
-
i.start,
|
|
3332
|
-
i.end,
|
|
3333
|
-
n,
|
|
3334
|
-
a
|
|
3335
|
-
);
|
|
3336
|
-
if (u)
|
|
3337
|
-
return {
|
|
3338
|
-
start: u.lower,
|
|
3339
|
-
end: u.upper,
|
|
3340
|
-
minOffset: a.lower,
|
|
3341
|
-
maxOffset: a.upper
|
|
3342
|
-
};
|
|
3343
|
-
}
|
|
3344
|
-
return null;
|
|
3345
|
-
}
|
|
3346
|
-
function Fi(e, t, r, n) {
|
|
3347
|
-
const i = n.filter((f) => f.start <= e && f.end >= e);
|
|
3348
|
-
if (i.find(
|
|
3349
|
-
(f) => f.offset <= t && f.offset + f.size >= t
|
|
3350
|
-
))
|
|
3351
|
-
return null;
|
|
3352
|
-
const u = i.filter((f) => f.offset + f.size <= t), c = i.filter((f) => f.offset >= t), s = u.length > 0 ? Math.max(...u.map((f) => f.offset + f.size)) : 0, o = c.length > 0 ? Math.min(...c.map((f) => f.offset)) : r;
|
|
3353
|
-
return {
|
|
3354
|
-
lower: s,
|
|
3355
|
-
upper: o
|
|
3356
|
-
};
|
|
3357
|
-
}
|
|
3358
|
-
function Bi(e, t, r, n, i) {
|
|
3359
|
-
const a = {
|
|
3360
|
-
start: t,
|
|
3361
|
-
end: r,
|
|
3362
|
-
offset: i.lower,
|
|
3363
|
-
size: i.upper - i.lower
|
|
3364
|
-
}, u = n.filter(
|
|
3365
|
-
(l) => Ii(l, a)
|
|
3366
|
-
);
|
|
3367
|
-
if (u.length === 0)
|
|
3368
|
-
return {
|
|
3369
|
-
lower: t,
|
|
3370
|
-
upper: r
|
|
3371
|
-
};
|
|
3372
|
-
const c = u.filter((l) => l.end <= e), s = u.filter((l) => l.start >= e), o = c.length > 0 ? pr(c.map((l) => l.end)) : t, f = s.length > 0 ? mr(s.map((l) => l.start)) : r;
|
|
3373
|
-
return {
|
|
3374
|
-
lower: o,
|
|
3375
|
-
upper: f
|
|
3376
|
-
};
|
|
3377
|
-
}
|
|
3378
|
-
var ye = { exports: {} }, C = {};
|
|
3190
|
+
var ve = { exports: {} }, _ = {};
|
|
3379
3191
|
/**
|
|
3380
3192
|
* @license React
|
|
3381
3193
|
* react-dom.production.js
|
|
@@ -3385,11 +3197,11 @@ var ye = { exports: {} }, C = {};
|
|
|
3385
3197
|
* This source code is licensed under the MIT license found in the
|
|
3386
3198
|
* LICENSE file in the root directory of this source tree.
|
|
3387
3199
|
*/
|
|
3388
|
-
var
|
|
3389
|
-
function
|
|
3390
|
-
if (
|
|
3391
|
-
|
|
3392
|
-
var e =
|
|
3200
|
+
var wt;
|
|
3201
|
+
function ji() {
|
|
3202
|
+
if (wt) return _;
|
|
3203
|
+
wt = 1;
|
|
3204
|
+
var e = kt;
|
|
3393
3205
|
function t(s) {
|
|
3394
3206
|
var o = "https://react.dev/errors/" + s;
|
|
3395
3207
|
if (1 < arguments.length) {
|
|
@@ -3434,23 +3246,23 @@ function $i() {
|
|
|
3434
3246
|
if (typeof o == "string")
|
|
3435
3247
|
return o === "use-credentials" ? o : "";
|
|
3436
3248
|
}
|
|
3437
|
-
return
|
|
3249
|
+
return _.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = n, _.createPortal = function(s, o) {
|
|
3438
3250
|
var f = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
|
|
3439
3251
|
if (!o || o.nodeType !== 1 && o.nodeType !== 9 && o.nodeType !== 11)
|
|
3440
3252
|
throw Error(t(299));
|
|
3441
3253
|
return a(s, o, null, f);
|
|
3442
|
-
},
|
|
3254
|
+
}, _.flushSync = function(s) {
|
|
3443
3255
|
var o = u.T, f = n.p;
|
|
3444
3256
|
try {
|
|
3445
3257
|
if (u.T = null, n.p = 2, s) return s();
|
|
3446
3258
|
} finally {
|
|
3447
3259
|
u.T = o, n.p = f, n.d.f();
|
|
3448
3260
|
}
|
|
3449
|
-
},
|
|
3261
|
+
}, _.preconnect = function(s, o) {
|
|
3450
3262
|
typeof s == "string" && (o ? (o = o.crossOrigin, o = typeof o == "string" ? o === "use-credentials" ? o : "" : void 0) : o = null, n.d.C(s, o));
|
|
3451
|
-
},
|
|
3263
|
+
}, _.prefetchDNS = function(s) {
|
|
3452
3264
|
typeof s == "string" && n.d.D(s);
|
|
3453
|
-
},
|
|
3265
|
+
}, _.preinit = function(s, o) {
|
|
3454
3266
|
if (typeof s == "string" && o && typeof o.as == "string") {
|
|
3455
3267
|
var f = o.as, l = c(f, o.crossOrigin), d = typeof o.integrity == "string" ? o.integrity : void 0, h = typeof o.fetchPriority == "string" ? o.fetchPriority : void 0;
|
|
3456
3268
|
f === "style" ? n.d.S(
|
|
@@ -3468,7 +3280,7 @@ function $i() {
|
|
|
3468
3280
|
nonce: typeof o.nonce == "string" ? o.nonce : void 0
|
|
3469
3281
|
});
|
|
3470
3282
|
}
|
|
3471
|
-
},
|
|
3283
|
+
}, _.preinitModule = function(s, o) {
|
|
3472
3284
|
if (typeof s == "string")
|
|
3473
3285
|
if (typeof o == "object" && o !== null) {
|
|
3474
3286
|
if (o.as == null || o.as === "script") {
|
|
@@ -3483,7 +3295,7 @@ function $i() {
|
|
|
3483
3295
|
});
|
|
3484
3296
|
}
|
|
3485
3297
|
} else o == null && n.d.M(s);
|
|
3486
|
-
},
|
|
3298
|
+
}, _.preload = function(s, o) {
|
|
3487
3299
|
if (typeof s == "string" && typeof o == "object" && o !== null && typeof o.as == "string") {
|
|
3488
3300
|
var f = o.as, l = c(f, o.crossOrigin);
|
|
3489
3301
|
n.d.L(s, f, {
|
|
@@ -3498,7 +3310,7 @@ function $i() {
|
|
|
3498
3310
|
media: typeof o.media == "string" ? o.media : void 0
|
|
3499
3311
|
});
|
|
3500
3312
|
}
|
|
3501
|
-
},
|
|
3313
|
+
}, _.preloadModule = function(s, o) {
|
|
3502
3314
|
if (typeof s == "string")
|
|
3503
3315
|
if (o) {
|
|
3504
3316
|
var f = c(o.as, o.crossOrigin);
|
|
@@ -3508,17 +3320,17 @@ function $i() {
|
|
|
3508
3320
|
integrity: typeof o.integrity == "string" ? o.integrity : void 0
|
|
3509
3321
|
});
|
|
3510
3322
|
} else n.d.m(s);
|
|
3511
|
-
},
|
|
3323
|
+
}, _.requestFormReset = function(s) {
|
|
3512
3324
|
n.d.r(s);
|
|
3513
|
-
},
|
|
3325
|
+
}, _.unstable_batchedUpdates = function(s, o) {
|
|
3514
3326
|
return s(o);
|
|
3515
|
-
},
|
|
3327
|
+
}, _.useFormState = function(s, o, f) {
|
|
3516
3328
|
return u.H.useFormState(s, o, f);
|
|
3517
|
-
},
|
|
3329
|
+
}, _.useFormStatus = function() {
|
|
3518
3330
|
return u.H.useHostTransitionStatus();
|
|
3519
|
-
},
|
|
3331
|
+
}, _.version = "19.1.0", _;
|
|
3520
3332
|
}
|
|
3521
|
-
var
|
|
3333
|
+
var W = {};
|
|
3522
3334
|
/**
|
|
3523
3335
|
* @license React
|
|
3524
3336
|
* react-dom.development.js
|
|
@@ -3528,9 +3340,9 @@ var _ = {};
|
|
|
3528
3340
|
* This source code is licensed under the MIT license found in the
|
|
3529
3341
|
* LICENSE file in the root directory of this source tree.
|
|
3530
3342
|
*/
|
|
3531
|
-
var
|
|
3532
|
-
function
|
|
3533
|
-
return
|
|
3343
|
+
var xt;
|
|
3344
|
+
function Bi() {
|
|
3345
|
+
return xt || (xt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
3534
3346
|
function e() {
|
|
3535
3347
|
}
|
|
3536
3348
|
function t(l) {
|
|
@@ -3577,7 +3389,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
3577
3389
|
), l;
|
|
3578
3390
|
}
|
|
3579
3391
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
3580
|
-
var c =
|
|
3392
|
+
var c = kt, s = {
|
|
3581
3393
|
d: {
|
|
3582
3394
|
f: e,
|
|
3583
3395
|
r: function() {
|
|
@@ -3598,12 +3410,12 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
3598
3410
|
}, o = Symbol.for("react.portal"), f = c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
3599
3411
|
typeof Map == "function" && Map.prototype != null && typeof Map.prototype.forEach == "function" && typeof Set == "function" && Set.prototype != null && typeof Set.prototype.clear == "function" && typeof Set.prototype.forEach == "function" || console.error(
|
|
3600
3412
|
"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
|
|
3601
|
-
),
|
|
3413
|
+
), W.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = s, W.createPortal = function(l, d) {
|
|
3602
3414
|
var h = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
|
|
3603
3415
|
if (!d || d.nodeType !== 1 && d.nodeType !== 9 && d.nodeType !== 11)
|
|
3604
3416
|
throw Error("Target container is not a DOM element.");
|
|
3605
3417
|
return r(l, d, null, h);
|
|
3606
|
-
},
|
|
3418
|
+
}, W.flushSync = function(l) {
|
|
3607
3419
|
var d = f.T, h = s.p;
|
|
3608
3420
|
try {
|
|
3609
3421
|
if (f.T = null, s.p = 2, l)
|
|
@@ -3613,7 +3425,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
3613
3425
|
"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
|
|
3614
3426
|
);
|
|
3615
3427
|
}
|
|
3616
|
-
},
|
|
3428
|
+
}, W.preconnect = function(l, d) {
|
|
3617
3429
|
typeof l == "string" && l ? d != null && typeof d != "object" ? console.error(
|
|
3618
3430
|
"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
|
|
3619
3431
|
a(d)
|
|
@@ -3624,7 +3436,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
3624
3436
|
"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
|
|
3625
3437
|
i(l)
|
|
3626
3438
|
), typeof l == "string" && (d ? (d = d.crossOrigin, d = typeof d == "string" ? d === "use-credentials" ? d : "" : void 0) : d = null, s.d.C(l, d));
|
|
3627
|
-
},
|
|
3439
|
+
}, W.prefetchDNS = function(l) {
|
|
3628
3440
|
if (typeof l != "string" || !l)
|
|
3629
3441
|
console.error(
|
|
3630
3442
|
"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
|
|
@@ -3641,7 +3453,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
3641
3453
|
);
|
|
3642
3454
|
}
|
|
3643
3455
|
typeof l == "string" && s.d.D(l);
|
|
3644
|
-
},
|
|
3456
|
+
}, W.preinit = function(l, d) {
|
|
3645
3457
|
if (typeof l == "string" && l ? d == null || typeof d != "object" ? console.error(
|
|
3646
3458
|
"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
|
|
3647
3459
|
a(d)
|
|
@@ -3668,7 +3480,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
3668
3480
|
nonce: typeof d.nonce == "string" ? d.nonce : void 0
|
|
3669
3481
|
});
|
|
3670
3482
|
}
|
|
3671
|
-
},
|
|
3483
|
+
}, W.preinitModule = function(l, d) {
|
|
3672
3484
|
var h = "";
|
|
3673
3485
|
if (typeof l == "string" && l || (h += " The `href` argument encountered was " + i(l) + "."), d !== void 0 && typeof d != "object" ? h += " The `options` argument encountered was " + i(d) + "." : d && "as" in d && d.as !== "script" && (h += " The `as` option encountered was " + a(d.as) + "."), h)
|
|
3674
3486
|
console.error(
|
|
@@ -3694,7 +3506,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
3694
3506
|
integrity: typeof d.integrity == "string" ? d.integrity : void 0,
|
|
3695
3507
|
nonce: typeof d.nonce == "string" ? d.nonce : void 0
|
|
3696
3508
|
})) : d == null && s.d.M(l));
|
|
3697
|
-
},
|
|
3509
|
+
}, W.preload = function(l, d) {
|
|
3698
3510
|
var h = "";
|
|
3699
3511
|
if (typeof l == "string" && l || (h += " The `href` argument encountered was " + i(l) + "."), d == null || typeof d != "object" ? h += " The `options` argument encountered was " + i(d) + "." : typeof d.as == "string" && d.as || (h += " The `as` option encountered was " + i(d.as) + "."), h && console.error(
|
|
3700
3512
|
'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
|
|
@@ -3717,7 +3529,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
3717
3529
|
media: typeof d.media == "string" ? d.media : void 0
|
|
3718
3530
|
});
|
|
3719
3531
|
}
|
|
3720
|
-
},
|
|
3532
|
+
}, W.preloadModule = function(l, d) {
|
|
3721
3533
|
var h = "";
|
|
3722
3534
|
typeof l == "string" && l || (h += " The `href` argument encountered was " + i(l) + "."), d !== void 0 && typeof d != "object" ? h += " The `options` argument encountered was " + i(d) + "." : d && "as" in d && typeof d.as != "string" && (h += " The `as` option encountered was " + i(d.as) + "."), h && console.error(
|
|
3723
3535
|
'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
|
|
@@ -3730,21 +3542,21 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
|
|
|
3730
3542
|
crossOrigin: h,
|
|
3731
3543
|
integrity: typeof d.integrity == "string" ? d.integrity : void 0
|
|
3732
3544
|
})) : s.d.m(l));
|
|
3733
|
-
},
|
|
3545
|
+
}, W.requestFormReset = function(l) {
|
|
3734
3546
|
s.d.r(l);
|
|
3735
|
-
},
|
|
3547
|
+
}, W.unstable_batchedUpdates = function(l, d) {
|
|
3736
3548
|
return l(d);
|
|
3737
|
-
},
|
|
3549
|
+
}, W.useFormState = function(l, d, h) {
|
|
3738
3550
|
return u().useFormState(l, d, h);
|
|
3739
|
-
},
|
|
3551
|
+
}, W.useFormStatus = function() {
|
|
3740
3552
|
return u().useHostTransitionStatus();
|
|
3741
|
-
},
|
|
3742
|
-
}()),
|
|
3553
|
+
}, W.version = "19.1.0", typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
3554
|
+
}()), W;
|
|
3743
3555
|
}
|
|
3744
|
-
var
|
|
3745
|
-
function
|
|
3746
|
-
if (
|
|
3747
|
-
|
|
3556
|
+
var St;
|
|
3557
|
+
function Yi() {
|
|
3558
|
+
if (St) return ve.exports;
|
|
3559
|
+
St = 1;
|
|
3748
3560
|
function e() {
|
|
3749
3561
|
if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function")) {
|
|
3750
3562
|
if (process.env.NODE_ENV !== "production")
|
|
@@ -3756,9 +3568,9 @@ function Xi() {
|
|
|
3756
3568
|
}
|
|
3757
3569
|
}
|
|
3758
3570
|
}
|
|
3759
|
-
return process.env.NODE_ENV === "production" ? (e(),
|
|
3571
|
+
return process.env.NODE_ENV === "production" ? (e(), ve.exports = ji()) : ve.exports = Bi(), ve.exports;
|
|
3760
3572
|
}
|
|
3761
|
-
var
|
|
3573
|
+
var Fi = Yi(), k = function() {
|
|
3762
3574
|
return k = Object.assign || function(e) {
|
|
3763
3575
|
for (var t, r = 1, n = arguments.length; r < n; r++) {
|
|
3764
3576
|
t = arguments[r];
|
|
@@ -3766,42 +3578,42 @@ var Ui = Xi(), k = function() {
|
|
|
3766
3578
|
}
|
|
3767
3579
|
return e;
|
|
3768
3580
|
}, k.apply(this, arguments);
|
|
3769
|
-
},
|
|
3581
|
+
}, Ot = {
|
|
3770
3582
|
width: "100%",
|
|
3771
3583
|
height: "10px",
|
|
3772
3584
|
top: "0px",
|
|
3773
3585
|
left: "0px",
|
|
3774
3586
|
cursor: "row-resize"
|
|
3775
|
-
},
|
|
3587
|
+
}, Dt = {
|
|
3776
3588
|
width: "10px",
|
|
3777
3589
|
height: "100%",
|
|
3778
3590
|
top: "0px",
|
|
3779
3591
|
left: "0px",
|
|
3780
3592
|
cursor: "col-resize"
|
|
3781
|
-
},
|
|
3593
|
+
}, be = {
|
|
3782
3594
|
width: "20px",
|
|
3783
3595
|
height: "20px",
|
|
3784
3596
|
position: "absolute",
|
|
3785
3597
|
zIndex: 1
|
|
3786
|
-
},
|
|
3787
|
-
top: k(k({},
|
|
3788
|
-
right: k(k({},
|
|
3789
|
-
bottom: k(k({},
|
|
3790
|
-
left: k(k({},
|
|
3791
|
-
topRight: k(k({},
|
|
3792
|
-
bottomRight: k(k({},
|
|
3793
|
-
bottomLeft: k(k({},
|
|
3794
|
-
topLeft: k(k({},
|
|
3795
|
-
},
|
|
3796
|
-
var t = e.onResizeStart, r = e.direction, n = e.children, i = e.replaceStyles, a = e.className, u =
|
|
3598
|
+
}, $i = {
|
|
3599
|
+
top: k(k({}, Ot), { top: "-5px" }),
|
|
3600
|
+
right: k(k({}, Dt), { left: void 0, right: "-5px" }),
|
|
3601
|
+
bottom: k(k({}, Ot), { top: void 0, bottom: "-5px" }),
|
|
3602
|
+
left: k(k({}, Dt), { left: "-5px" }),
|
|
3603
|
+
topRight: k(k({}, be), { right: "-10px", top: "-10px", cursor: "ne-resize" }),
|
|
3604
|
+
bottomRight: k(k({}, be), { right: "-10px", bottom: "-10px", cursor: "se-resize" }),
|
|
3605
|
+
bottomLeft: k(k({}, be), { left: "-10px", bottom: "-10px", cursor: "sw-resize" }),
|
|
3606
|
+
topLeft: k(k({}, be), { left: "-10px", top: "-10px", cursor: "nw-resize" })
|
|
3607
|
+
}, qi = Zt(function(e) {
|
|
3608
|
+
var t = e.onResizeStart, r = e.direction, n = e.children, i = e.replaceStyles, a = e.className, u = Ve(function(o) {
|
|
3797
3609
|
t(o, r);
|
|
3798
|
-
}, [t, r]), c =
|
|
3610
|
+
}, [t, r]), c = Ve(function(o) {
|
|
3799
3611
|
t(o, r);
|
|
3800
|
-
}, [t, r]), s =
|
|
3801
|
-
return k(k({ position: "absolute", userSelect: "none" },
|
|
3612
|
+
}, [t, r]), s = er(function() {
|
|
3613
|
+
return k(k({ position: "absolute", userSelect: "none" }, $i[r]), i ?? {});
|
|
3802
3614
|
}, [i, r]);
|
|
3803
|
-
return
|
|
3804
|
-
}),
|
|
3615
|
+
return y("div", { className: a || void 0, style: s, onMouseDown: u, onTouchStart: c, children: n });
|
|
3616
|
+
}), Xi = /* @__PURE__ */ function() {
|
|
3805
3617
|
var e = function(t, r) {
|
|
3806
3618
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
|
|
3807
3619
|
n.__proto__ = i;
|
|
@@ -3818,37 +3630,37 @@ var Ui = Xi(), k = function() {
|
|
|
3818
3630
|
}
|
|
3819
3631
|
t.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype, new n());
|
|
3820
3632
|
};
|
|
3821
|
-
}(),
|
|
3822
|
-
return
|
|
3633
|
+
}(), I = function() {
|
|
3634
|
+
return I = Object.assign || function(e) {
|
|
3823
3635
|
for (var t, r = 1, n = arguments.length; r < n; r++) {
|
|
3824
3636
|
t = arguments[r];
|
|
3825
3637
|
for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
3826
3638
|
}
|
|
3827
3639
|
return e;
|
|
3828
|
-
},
|
|
3829
|
-
},
|
|
3640
|
+
}, I.apply(this, arguments);
|
|
3641
|
+
}, Ui = {
|
|
3830
3642
|
width: "auto",
|
|
3831
3643
|
height: "auto"
|
|
3832
|
-
},
|
|
3644
|
+
}, we = function(e, t, r) {
|
|
3833
3645
|
return Math.max(Math.min(e, r), t);
|
|
3834
|
-
},
|
|
3646
|
+
}, Tt = function(e, t, r) {
|
|
3835
3647
|
var n = Math.round(e / t);
|
|
3836
3648
|
return n * t + r * (n - 1);
|
|
3837
|
-
},
|
|
3649
|
+
}, ee = function(e, t) {
|
|
3838
3650
|
return new RegExp(e, "i").test(t);
|
|
3839
|
-
},
|
|
3651
|
+
}, xe = function(e) {
|
|
3840
3652
|
return !!(e.touches && e.touches.length);
|
|
3841
|
-
},
|
|
3653
|
+
}, Gi = function(e) {
|
|
3842
3654
|
return !!((e.clientX || e.clientX === 0) && (e.clientY || e.clientY === 0));
|
|
3843
|
-
},
|
|
3655
|
+
}, Mt = function(e, t, r) {
|
|
3844
3656
|
r === void 0 && (r = 0);
|
|
3845
3657
|
var n = t.reduce(function(a, u, c) {
|
|
3846
3658
|
return Math.abs(u - e) < Math.abs(t[a] - e) ? c : a;
|
|
3847
3659
|
}, 0), i = Math.abs(t[n] - e);
|
|
3848
3660
|
return r === 0 || i < r ? t[n] : e;
|
|
3849
|
-
},
|
|
3661
|
+
}, ze = function(e) {
|
|
3850
3662
|
return e = e.toString(), e === "auto" || e.endsWith("px") || e.endsWith("%") || e.endsWith("vh") || e.endsWith("vw") || e.endsWith("vmax") || e.endsWith("vmin") ? e : "".concat(e, "px");
|
|
3851
|
-
},
|
|
3663
|
+
}, Se = function(e, t, r, n) {
|
|
3852
3664
|
if (e && typeof e == "string") {
|
|
3853
3665
|
if (e.endsWith("px"))
|
|
3854
3666
|
return Number(e.replace("px", ""));
|
|
@@ -3866,16 +3678,16 @@ var Ui = Xi(), k = function() {
|
|
|
3866
3678
|
}
|
|
3867
3679
|
}
|
|
3868
3680
|
return e;
|
|
3869
|
-
},
|
|
3870
|
-
return n =
|
|
3681
|
+
}, Ki = function(e, t, r, n, i, a, u) {
|
|
3682
|
+
return n = Se(n, e.width, t, r), i = Se(i, e.height, t, r), a = Se(a, e.width, t, r), u = Se(u, e.height, t, r), {
|
|
3871
3683
|
maxWidth: typeof n > "u" ? void 0 : Number(n),
|
|
3872
3684
|
maxHeight: typeof i > "u" ? void 0 : Number(i),
|
|
3873
3685
|
minWidth: typeof a > "u" ? void 0 : Number(a),
|
|
3874
3686
|
minHeight: typeof u > "u" ? void 0 : Number(u)
|
|
3875
3687
|
};
|
|
3876
|
-
},
|
|
3688
|
+
}, Vi = function(e) {
|
|
3877
3689
|
return Array.isArray(e) ? e : [e, e];
|
|
3878
|
-
},
|
|
3690
|
+
}, Qi = [
|
|
3879
3691
|
"as",
|
|
3880
3692
|
"ref",
|
|
3881
3693
|
"style",
|
|
@@ -3907,10 +3719,10 @@ var Ui = Xi(), k = function() {
|
|
|
3907
3719
|
"scale",
|
|
3908
3720
|
"resizeRatio",
|
|
3909
3721
|
"snapGap"
|
|
3910
|
-
],
|
|
3722
|
+
], Et = "__resizable_base__", Ji = (
|
|
3911
3723
|
/** @class */
|
|
3912
3724
|
function(e) {
|
|
3913
|
-
|
|
3725
|
+
Xi(t, e);
|
|
3914
3726
|
function t(r) {
|
|
3915
3727
|
var n, i, a, u, c = e.call(this, r) || this;
|
|
3916
3728
|
return c.ratio = 1, c.resizable = null, c.parentLeft = 0, c.parentTop = 0, c.resizableLeft = 0, c.resizableRight = 0, c.resizableTop = 0, c.resizableBottom = 0, c.targetLeft = 0, c.targetTop = 0, c.delta = {
|
|
@@ -3923,7 +3735,7 @@ var Ui = Xi(), k = function() {
|
|
|
3923
3735
|
if (!s)
|
|
3924
3736
|
return null;
|
|
3925
3737
|
var o = c.window.document.createElement("div");
|
|
3926
|
-
return o.style.width = "100%", o.style.height = "100%", o.style.position = "absolute", o.style.transform = "scale(0, 0)", o.style.left = "0", o.style.flex = "0 0 100%", o.classList ? o.classList.add(
|
|
3738
|
+
return o.style.width = "100%", o.style.height = "100%", o.style.position = "absolute", o.style.transform = "scale(0, 0)", o.style.left = "0", o.style.flex = "0 0 100%", o.classList ? o.classList.add(Et) : o.className += Et, s.appendChild(o), o;
|
|
3927
3739
|
}, c.removeBase = function(s) {
|
|
3928
3740
|
var o = c.parentNode;
|
|
3929
3741
|
o && o.removeChild(s);
|
|
@@ -3968,7 +3780,7 @@ var Ui = Xi(), k = function() {
|
|
|
3968
3780
|
configurable: !0
|
|
3969
3781
|
}), Object.defineProperty(t.prototype, "propsSize", {
|
|
3970
3782
|
get: function() {
|
|
3971
|
-
return this.props.size || this.props.defaultSize ||
|
|
3783
|
+
return this.props.size || this.props.defaultSize || Ui;
|
|
3972
3784
|
},
|
|
3973
3785
|
enumerable: !1,
|
|
3974
3786
|
configurable: !0
|
|
@@ -3995,8 +3807,8 @@ var Ui = Xi(), k = function() {
|
|
|
3995
3807
|
var o = r.getParentSize(), f = Number(r.state[c].toString().replace("px", "")), l = f / o[c] * 100;
|
|
3996
3808
|
return "".concat(l, "%");
|
|
3997
3809
|
}
|
|
3998
|
-
return
|
|
3999
|
-
}, a = n && typeof n.width < "u" && !this.state.isResizing ?
|
|
3810
|
+
return ze(r.state[c]);
|
|
3811
|
+
}, a = n && typeof n.width < "u" && !this.state.isResizing ? ze(n.width) : i("width"), u = n && typeof n.height < "u" && !this.state.isResizing ? ze(n.height) : i("height");
|
|
4000
3812
|
return { width: a, height: u };
|
|
4001
3813
|
},
|
|
4002
3814
|
enumerable: !1,
|
|
@@ -4036,22 +3848,22 @@ var Ui = Xi(), k = function() {
|
|
|
4036
3848
|
var i = this.propsSize && this.propsSize[n];
|
|
4037
3849
|
return this.state[n] === "auto" && this.state.original[n] === r && (typeof i > "u" || i === "auto") ? "auto" : r;
|
|
4038
3850
|
}, t.prototype.calculateNewMaxFromBoundary = function(r, n) {
|
|
4039
|
-
var i = this.props.boundsByDirection, a = this.state.direction, u = i &&
|
|
3851
|
+
var i = this.props.boundsByDirection, a = this.state.direction, u = i && ee("left", a), c = i && ee("top", a), s, o;
|
|
4040
3852
|
if (this.props.bounds === "parent") {
|
|
4041
3853
|
var f = this.parentNode;
|
|
4042
3854
|
f && (s = u ? this.resizableRight - this.parentLeft : f.offsetWidth + (this.parentLeft - this.resizableLeft), o = c ? this.resizableBottom - this.parentTop : f.offsetHeight + (this.parentTop - this.resizableTop));
|
|
4043
3855
|
} else this.props.bounds === "window" ? this.window && (s = u ? this.resizableRight : this.window.innerWidth - this.resizableLeft, o = c ? this.resizableBottom : this.window.innerHeight - this.resizableTop) : this.props.bounds && (s = u ? this.resizableRight - this.targetLeft : this.props.bounds.offsetWidth + (this.targetLeft - this.resizableLeft), o = c ? this.resizableBottom - this.targetTop : this.props.bounds.offsetHeight + (this.targetTop - this.resizableTop));
|
|
4044
3856
|
return s && Number.isFinite(s) && (r = r && r < s ? r : s), o && Number.isFinite(o) && (n = n && n < o ? n : o), { maxWidth: r, maxHeight: n };
|
|
4045
3857
|
}, t.prototype.calculateNewSizeFromDirection = function(r, n) {
|
|
4046
|
-
var i = this.props.scale || 1, a =
|
|
4047
|
-
return
|
|
3858
|
+
var i = this.props.scale || 1, a = Vi(this.props.resizeRatio || 1), u = a[0], c = a[1], s = this.state, o = s.direction, f = s.original, l = this.props, d = l.lockAspectRatio, h = l.lockAspectRatioExtraHeight, g = l.lockAspectRatioExtraWidth, p = f.width, m = f.height, b = h || 0, O = g || 0;
|
|
3859
|
+
return ee("right", o) && (p = f.width + (r - f.x) * u / i, d && (m = (p - O) / this.ratio + b)), ee("left", o) && (p = f.width - (r - f.x) * u / i, d && (m = (p - O) / this.ratio + b)), ee("bottom", o) && (m = f.height + (n - f.y) * c / i, d && (p = (m - b) * this.ratio + O)), ee("top", o) && (m = f.height - (n - f.y) * c / i, d && (p = (m - b) * this.ratio + O)), { newWidth: p, newHeight: m };
|
|
4048
3860
|
}, t.prototype.calculateNewSizeFromAspectRatio = function(r, n, i, a) {
|
|
4049
3861
|
var u = this.props, c = u.lockAspectRatio, s = u.lockAspectRatioExtraHeight, o = u.lockAspectRatioExtraWidth, f = typeof a.width > "u" ? 10 : a.width, l = typeof i.width > "u" || i.width < 0 ? r : i.width, d = typeof a.height > "u" ? 10 : a.height, h = typeof i.height > "u" || i.height < 0 ? n : i.height, g = s || 0, p = o || 0;
|
|
4050
3862
|
if (c) {
|
|
4051
3863
|
var m = (d - g) * this.ratio + p, b = (h - g) * this.ratio + p, O = (f - p) / this.ratio + g, x = (l - p) / this.ratio + g, w = Math.max(f, m), M = Math.min(l, b), S = Math.max(d, O), z = Math.min(h, x);
|
|
4052
|
-
r =
|
|
3864
|
+
r = we(r, w, M), n = we(n, S, z);
|
|
4053
3865
|
} else
|
|
4054
|
-
r =
|
|
3866
|
+
r = we(r, f, l), n = we(n, d, h);
|
|
4055
3867
|
return { newWidth: r, newHeight: n };
|
|
4056
3868
|
}, t.prototype.setBoundingClientRect = function() {
|
|
4057
3869
|
var r = 1 / (this.props.scale || 1);
|
|
@@ -4073,7 +3885,7 @@ var Ui = Xi(), k = function() {
|
|
|
4073
3885
|
}, t.prototype.onResizeStart = function(r, n) {
|
|
4074
3886
|
if (!(!this.resizable || !this.window)) {
|
|
4075
3887
|
var i = 0, a = 0;
|
|
4076
|
-
if (r.nativeEvent &&
|
|
3888
|
+
if (r.nativeEvent && Gi(r.nativeEvent) ? (i = r.nativeEvent.clientX, a = r.nativeEvent.clientY) : r.nativeEvent && xe(r.nativeEvent) && (i = r.nativeEvent.touches[0].clientX, a = r.nativeEvent.touches[0].clientY), this.props.onResizeStart && this.resizable) {
|
|
4077
3889
|
var u = this.props.onResizeStart(r, n, this.resizable);
|
|
4078
3890
|
if (u === !1)
|
|
4079
3891
|
return;
|
|
@@ -4096,7 +3908,7 @@ var Ui = Xi(), k = function() {
|
|
|
4096
3908
|
height: this.size.height
|
|
4097
3909
|
},
|
|
4098
3910
|
isResizing: !0,
|
|
4099
|
-
backgroundStyle:
|
|
3911
|
+
backgroundStyle: I(I({}, this.state.backgroundStyle), { cursor: this.window.getComputedStyle(r.target).cursor || "auto" }),
|
|
4100
3912
|
direction: n,
|
|
4101
3913
|
flexBasis: c
|
|
4102
3914
|
};
|
|
@@ -4105,18 +3917,18 @@ var Ui = Xi(), k = function() {
|
|
|
4105
3917
|
}, t.prototype.onMouseMove = function(r) {
|
|
4106
3918
|
var n = this;
|
|
4107
3919
|
if (!(!this.state.isResizing || !this.resizable || !this.window)) {
|
|
4108
|
-
if (this.window.TouchEvent &&
|
|
3920
|
+
if (this.window.TouchEvent && xe(r))
|
|
4109
3921
|
try {
|
|
4110
3922
|
r.preventDefault(), r.stopPropagation();
|
|
4111
3923
|
} catch {
|
|
4112
3924
|
}
|
|
4113
|
-
var i = this.props, a = i.maxWidth, u = i.maxHeight, c = i.minWidth, s = i.minHeight, o =
|
|
3925
|
+
var i = this.props, a = i.maxWidth, u = i.maxHeight, c = i.minWidth, s = i.minHeight, o = xe(r) ? r.touches[0].clientX : r.clientX, f = xe(r) ? r.touches[0].clientY : r.clientY, l = this.state, d = l.direction, h = l.original, g = l.width, p = l.height, m = this.getParentSize(), b = Ki(m, this.window.innerWidth, this.window.innerHeight, a, u, c, s);
|
|
4114
3926
|
a = b.maxWidth, u = b.maxHeight, c = b.minWidth, s = b.minHeight;
|
|
4115
3927
|
var O = this.calculateNewSizeFromDirection(o, f), x = O.newHeight, w = O.newWidth, M = this.calculateNewMaxFromBoundary(a, u);
|
|
4116
|
-
this.props.snap && this.props.snap.x && (w =
|
|
3928
|
+
this.props.snap && this.props.snap.x && (w = Mt(w, this.props.snap.x, this.props.snapGap)), this.props.snap && this.props.snap.y && (x = Mt(x, this.props.snap.y, this.props.snapGap));
|
|
4117
3929
|
var S = this.calculateNewSizeFromAspectRatio(w, x, { width: M.maxWidth, height: M.maxHeight }, { width: c, height: s });
|
|
4118
3930
|
if (w = S.newWidth, x = S.newHeight, this.props.grid) {
|
|
4119
|
-
var z =
|
|
3931
|
+
var z = Tt(w, this.props.grid[0], this.props.gridGap ? this.props.gridGap[0] : 0), E = Tt(x, this.props.grid[1], this.props.gridGap ? this.props.gridGap[1] : 0), v = this.props.snapGap || 0, D = v === 0 || Math.abs(z - w) <= v ? z : w, P = v === 0 || Math.abs(E - x) <= v ? E : x;
|
|
4120
3932
|
w = D, x = P;
|
|
4121
3933
|
}
|
|
4122
3934
|
var R = {
|
|
@@ -4128,11 +3940,11 @@ var Ui = Xi(), k = function() {
|
|
|
4128
3940
|
var L = w / m.width * 100;
|
|
4129
3941
|
w = "".concat(L, "%");
|
|
4130
3942
|
} else if (g.endsWith("vw")) {
|
|
4131
|
-
var
|
|
4132
|
-
w = "".concat(
|
|
3943
|
+
var X = w / this.window.innerWidth * 100;
|
|
3944
|
+
w = "".concat(X, "vw");
|
|
4133
3945
|
} else if (g.endsWith("vh")) {
|
|
4134
|
-
var
|
|
4135
|
-
w = "".concat(
|
|
3946
|
+
var J = w / this.window.innerHeight * 100;
|
|
3947
|
+
w = "".concat(J, "vh");
|
|
4136
3948
|
}
|
|
4137
3949
|
}
|
|
4138
3950
|
if (p && typeof p == "string") {
|
|
@@ -4140,11 +3952,11 @@ var Ui = Xi(), k = function() {
|
|
|
4140
3952
|
var L = x / m.height * 100;
|
|
4141
3953
|
x = "".concat(L, "%");
|
|
4142
3954
|
} else if (p.endsWith("vw")) {
|
|
4143
|
-
var
|
|
4144
|
-
x = "".concat(
|
|
3955
|
+
var X = x / this.window.innerWidth * 100;
|
|
3956
|
+
x = "".concat(X, "vw");
|
|
4145
3957
|
} else if (p.endsWith("vh")) {
|
|
4146
|
-
var
|
|
4147
|
-
x = "".concat(
|
|
3958
|
+
var J = x / this.window.innerHeight * 100;
|
|
3959
|
+
x = "".concat(J, "vh");
|
|
4148
3960
|
}
|
|
4149
3961
|
}
|
|
4150
3962
|
var A = {
|
|
@@ -4152,16 +3964,16 @@ var Ui = Xi(), k = function() {
|
|
|
4152
3964
|
height: this.createSizeForCssProperty(x, "height")
|
|
4153
3965
|
};
|
|
4154
3966
|
this.flexDir === "row" ? A.flexBasis = A.width : this.flexDir === "column" && (A.flexBasis = A.height);
|
|
4155
|
-
var
|
|
4156
|
-
|
|
3967
|
+
var U = this.state.width !== A.width, Kt = this.state.height !== A.height, Vt = this.state.flexBasis !== A.flexBasis, Ke = U || Kt || Vt;
|
|
3968
|
+
Ke && Fi.flushSync(function() {
|
|
4157
3969
|
n.setState(A);
|
|
4158
|
-
}), this.props.onResize &&
|
|
3970
|
+
}), this.props.onResize && Ke && this.props.onResize(r, d, this.resizable, R);
|
|
4159
3971
|
}
|
|
4160
3972
|
}, t.prototype.onMouseUp = function(r) {
|
|
4161
3973
|
var n, i, a = this.state, u = a.isResizing, c = a.direction;
|
|
4162
3974
|
a.original, !(!u || !this.resizable) && (this.props.onResizeStop && this.props.onResizeStop(r, c, this.resizable, this.delta), this.props.size && this.setState({ width: (n = this.props.size.width) !== null && n !== void 0 ? n : "auto", height: (i = this.props.size.height) !== null && i !== void 0 ? i : "auto" }), this.unbindEvents(), this.setState({
|
|
4163
3975
|
isResizing: !1,
|
|
4164
|
-
backgroundStyle:
|
|
3976
|
+
backgroundStyle: I(I({}, this.state.backgroundStyle), { cursor: "auto" })
|
|
4165
3977
|
}));
|
|
4166
3978
|
}, t.prototype.updateSize = function(r) {
|
|
4167
3979
|
var n, i;
|
|
@@ -4171,22 +3983,22 @@ var Ui = Xi(), k = function() {
|
|
|
4171
3983
|
if (!i)
|
|
4172
3984
|
return null;
|
|
4173
3985
|
var f = Object.keys(i).map(function(l) {
|
|
4174
|
-
return i[l] !== !1 ?
|
|
3986
|
+
return i[l] !== !1 ? y(qi, { direction: l, onResizeStart: r.onResizeStart, replaceStyles: a && a[l], className: u && u[l], children: o && o[l] ? o[l] : null }, l) : null;
|
|
4175
3987
|
});
|
|
4176
|
-
return
|
|
3988
|
+
return y("div", { className: s, style: c, children: f });
|
|
4177
3989
|
}, t.prototype.render = function() {
|
|
4178
3990
|
var r = this, n = Object.keys(this.props).reduce(function(u, c) {
|
|
4179
|
-
return
|
|
4180
|
-
}, {}), i =
|
|
3991
|
+
return Qi.indexOf(c) !== -1 || (u[c] = r.props[c]), u;
|
|
3992
|
+
}, {}), i = I(I(I({ position: "relative", userSelect: this.state.isResizing ? "none" : "auto" }, this.props.style), this.sizeStyle), { maxWidth: this.props.maxWidth, maxHeight: this.props.maxHeight, minWidth: this.props.minWidth, minHeight: this.props.minHeight, boxSizing: "border-box", flexShrink: 0 });
|
|
4181
3993
|
this.state.flexBasis && (i.flexBasis = this.state.flexBasis);
|
|
4182
3994
|
var a = this.props.as || "div";
|
|
4183
|
-
return
|
|
3995
|
+
return Q(a, I({ style: i, className: this.props.className }, n, {
|
|
4184
3996
|
// `ref` is after `extendsProps` to ensure this one wins over a version
|
|
4185
3997
|
// passed in
|
|
4186
3998
|
ref: function(u) {
|
|
4187
3999
|
u && (r.resizable = u);
|
|
4188
4000
|
},
|
|
4189
|
-
children: [this.state.isResizing &&
|
|
4001
|
+
children: [this.state.isResizing && y("div", { style: this.state.backgroundStyle }), this.props.children, this.renderResizer()]
|
|
4190
4002
|
}));
|
|
4191
4003
|
}, t.defaultProps = {
|
|
4192
4004
|
as: "div",
|
|
@@ -4216,9 +4028,9 @@ var Ui = Xi(), k = function() {
|
|
|
4216
4028
|
resizeRatio: 1,
|
|
4217
4029
|
snapGap: 0
|
|
4218
4030
|
}, t;
|
|
4219
|
-
}(
|
|
4031
|
+
}(tr)
|
|
4220
4032
|
);
|
|
4221
|
-
function
|
|
4033
|
+
function Zi({
|
|
4222
4034
|
item: e,
|
|
4223
4035
|
rectangle: t,
|
|
4224
4036
|
boundingRectangle: r,
|
|
@@ -4229,14 +4041,14 @@ function na({
|
|
|
4229
4041
|
onUpdate: c,
|
|
4230
4042
|
onResizeStart: s
|
|
4231
4043
|
}) {
|
|
4232
|
-
const o =
|
|
4233
|
-
return
|
|
4044
|
+
const o = le(null), f = le(null), [l, d] = V(t);
|
|
4045
|
+
return re(() => {
|
|
4234
4046
|
d(t);
|
|
4235
|
-
}, [t]),
|
|
4047
|
+
}, [t]), re(() => (Ie(o.current), Ie(f.current), Ci({
|
|
4236
4048
|
element: o.current,
|
|
4237
4049
|
dragHandle: f.current,
|
|
4238
4050
|
onDragStart: ({ source: h, location: g }) => {
|
|
4239
|
-
const p =
|
|
4051
|
+
const p = te(h, g);
|
|
4240
4052
|
a(p.absolute, p.relative);
|
|
4241
4053
|
},
|
|
4242
4054
|
onDrag: () => {
|
|
@@ -4246,12 +4058,12 @@ function na({
|
|
|
4246
4058
|
u();
|
|
4247
4059
|
},
|
|
4248
4060
|
getInitialData: () => ({ ...e })
|
|
4249
|
-
})), [e, i, a, u]), /* @__PURE__ */
|
|
4061
|
+
})), [e, i, a, u]), /* @__PURE__ */ y(
|
|
4250
4062
|
"div",
|
|
4251
4063
|
{
|
|
4252
|
-
id: `
|
|
4253
|
-
className: "
|
|
4254
|
-
"data-
|
|
4064
|
+
id: `timelane-item-${e.id}`,
|
|
4065
|
+
className: "timelane-item",
|
|
4066
|
+
"data-timelane-item-id": e.id,
|
|
4255
4067
|
ref: o,
|
|
4256
4068
|
style: {
|
|
4257
4069
|
width: `${l.width}px`,
|
|
@@ -4269,8 +4081,8 @@ function na({
|
|
|
4269
4081
|
onClick: (h) => {
|
|
4270
4082
|
h.stopPropagation();
|
|
4271
4083
|
},
|
|
4272
|
-
children: /* @__PURE__ */
|
|
4273
|
-
|
|
4084
|
+
children: /* @__PURE__ */ y(
|
|
4085
|
+
Ji,
|
|
4274
4086
|
{
|
|
4275
4087
|
enable: {
|
|
4276
4088
|
right: !0,
|
|
@@ -4279,8 +4091,8 @@ function na({
|
|
|
4279
4091
|
bottom: !0
|
|
4280
4092
|
},
|
|
4281
4093
|
handleClasses: {
|
|
4282
|
-
left: "
|
|
4283
|
-
right: "
|
|
4094
|
+
left: "timelane-item-resize-handle timelane-item-resize-handle-left",
|
|
4095
|
+
right: "timelane-item-resize-handle timelane-item-resize-handle-right"
|
|
4284
4096
|
},
|
|
4285
4097
|
size: {
|
|
4286
4098
|
width: l.width,
|
|
@@ -4331,14 +4143,14 @@ function na({
|
|
|
4331
4143
|
}), c(b);
|
|
4332
4144
|
},
|
|
4333
4145
|
style: { overflow: "hidden" },
|
|
4334
|
-
children: /* @__PURE__ */
|
|
4146
|
+
children: /* @__PURE__ */ y("div", { className: "timelane-item-drag-handle", ref: f, children: n })
|
|
4335
4147
|
}
|
|
4336
4148
|
)
|
|
4337
4149
|
}
|
|
4338
4150
|
);
|
|
4339
4151
|
}
|
|
4340
|
-
function
|
|
4341
|
-
|
|
4152
|
+
function ea({
|
|
4153
|
+
lane: e,
|
|
4342
4154
|
item: t,
|
|
4343
4155
|
settings: r,
|
|
4344
4156
|
children: n,
|
|
@@ -4348,13 +4160,9 @@ function ia({
|
|
|
4348
4160
|
onUpdate: c,
|
|
4349
4161
|
onResizeStart: s
|
|
4350
4162
|
}) {
|
|
4351
|
-
const o = Fe(t, e, r, r), f = Ye(
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
r
|
|
4355
|
-
);
|
|
4356
|
-
return /* @__PURE__ */ v(
|
|
4357
|
-
na,
|
|
4163
|
+
const o = Fe(t, e, r, r), f = Ye(e, r, r);
|
|
4164
|
+
return /* @__PURE__ */ y(
|
|
4165
|
+
Zi,
|
|
4358
4166
|
{
|
|
4359
4167
|
item: t,
|
|
4360
4168
|
rectangle: o,
|
|
@@ -4363,7 +4171,7 @@ function ia({
|
|
|
4363
4171
|
onDragStart: i,
|
|
4364
4172
|
onDrop: u,
|
|
4365
4173
|
onUpdate: (l) => {
|
|
4366
|
-
const d =
|
|
4174
|
+
const d = It(
|
|
4367
4175
|
t,
|
|
4368
4176
|
e,
|
|
4369
4177
|
l,
|
|
@@ -4377,8 +4185,8 @@ function ia({
|
|
|
4377
4185
|
}
|
|
4378
4186
|
);
|
|
4379
4187
|
}
|
|
4380
|
-
function
|
|
4381
|
-
return /* @__PURE__ */
|
|
4188
|
+
function ta({ overlap: e }) {
|
|
4189
|
+
return /* @__PURE__ */ y(
|
|
4382
4190
|
"div",
|
|
4383
4191
|
{
|
|
4384
4192
|
style: {
|
|
@@ -4394,10 +4202,10 @@ function aa({ overlap: e }) {
|
|
|
4394
4202
|
}
|
|
4395
4203
|
);
|
|
4396
4204
|
}
|
|
4397
|
-
function
|
|
4205
|
+
function Pt(e) {
|
|
4398
4206
|
return "id" in e && "swimlaneId" in e && "start" in e && "end" in e && "size" in e && "offset" in e;
|
|
4399
4207
|
}
|
|
4400
|
-
function
|
|
4208
|
+
function ra({
|
|
4401
4209
|
swimlane: e,
|
|
4402
4210
|
items: t,
|
|
4403
4211
|
focused: r = !1,
|
|
@@ -4411,41 +4219,41 @@ function oa({
|
|
|
4411
4219
|
},
|
|
4412
4220
|
onContextMenu: c = () => {
|
|
4413
4221
|
},
|
|
4414
|
-
renderItem: s =
|
|
4222
|
+
renderItem: s = na,
|
|
4415
4223
|
onResizeStart: o = () => {
|
|
4416
4224
|
}
|
|
4417
4225
|
}) {
|
|
4418
|
-
const { settings: f } =
|
|
4226
|
+
const { settings: f } = pe(), l = {
|
|
4419
4227
|
x: f.pixelsPerDay,
|
|
4420
4228
|
offsetX: f.pixelsPerDay / 2
|
|
4421
4229
|
}, d = Ye(
|
|
4422
4230
|
e,
|
|
4423
4231
|
f,
|
|
4424
4232
|
f
|
|
4425
|
-
), [h, g] =
|
|
4233
|
+
), [h, g] = V(null), [p, m] = V(
|
|
4426
4234
|
null
|
|
4427
4235
|
);
|
|
4428
|
-
function b(
|
|
4429
|
-
const D =
|
|
4430
|
-
return
|
|
4431
|
-
|
|
4236
|
+
function b(v) {
|
|
4237
|
+
const D = v.currentTarget.getBoundingClientRect();
|
|
4238
|
+
return _e(
|
|
4239
|
+
de(
|
|
4432
4240
|
f.start,
|
|
4433
|
-
(
|
|
4241
|
+
(v.clientX - D.left) / f.pixelsPerDay
|
|
4434
4242
|
),
|
|
4435
4243
|
12
|
|
4436
4244
|
);
|
|
4437
4245
|
}
|
|
4438
|
-
function O(
|
|
4439
|
-
const D =
|
|
4440
|
-
return (
|
|
4246
|
+
function O(v) {
|
|
4247
|
+
const D = v.currentTarget.getBoundingClientRect();
|
|
4248
|
+
return (v.pageY - D.top) / D.height * e.capacity;
|
|
4441
4249
|
}
|
|
4442
|
-
function x(
|
|
4443
|
-
if (!
|
|
4444
|
-
const R =
|
|
4250
|
+
function x(v, D, P) {
|
|
4251
|
+
if (!Pt(P)) return;
|
|
4252
|
+
const R = An(
|
|
4445
4253
|
e,
|
|
4446
4254
|
t,
|
|
4447
4255
|
P,
|
|
4448
|
-
|
|
4256
|
+
v,
|
|
4449
4257
|
D,
|
|
4450
4258
|
f,
|
|
4451
4259
|
l,
|
|
@@ -4454,9 +4262,9 @@ function oa({
|
|
|
4454
4262
|
);
|
|
4455
4263
|
m(R);
|
|
4456
4264
|
}
|
|
4457
|
-
function w(
|
|
4458
|
-
if (!
|
|
4459
|
-
const R =
|
|
4265
|
+
function w(v, D, P) {
|
|
4266
|
+
if (!Pt(P) || p === null) return;
|
|
4267
|
+
const R = It(
|
|
4460
4268
|
P,
|
|
4461
4269
|
e,
|
|
4462
4270
|
p,
|
|
@@ -4468,50 +4276,50 @@ function oa({
|
|
|
4468
4276
|
function M() {
|
|
4469
4277
|
m(null);
|
|
4470
4278
|
}
|
|
4471
|
-
function S(
|
|
4472
|
-
const P = b(
|
|
4279
|
+
function S(v, D) {
|
|
4280
|
+
const P = b(v), R = O(v), L = jn(
|
|
4473
4281
|
P,
|
|
4474
4282
|
R,
|
|
4475
4283
|
e,
|
|
4476
4284
|
t,
|
|
4477
4285
|
f
|
|
4478
4286
|
);
|
|
4479
|
-
D == "single" ? a(P, L,
|
|
4287
|
+
D == "single" ? a(P, L, v) : u(P, L, v);
|
|
4480
4288
|
}
|
|
4481
|
-
const z = t.map((
|
|
4482
|
-
id:
|
|
4483
|
-
...Fe(
|
|
4289
|
+
const z = t.map((v) => ({
|
|
4290
|
+
id: v.id,
|
|
4291
|
+
...Fe(v, e, f, f)
|
|
4484
4292
|
})), E = z.flatMap(
|
|
4485
|
-
(
|
|
4486
|
-
).filter((
|
|
4487
|
-
return /* @__PURE__ */
|
|
4293
|
+
(v) => z.map((D) => v.id < D.id ? Ln(v, D) : null)
|
|
4294
|
+
).filter((v) => v !== null);
|
|
4295
|
+
return /* @__PURE__ */ y(
|
|
4488
4296
|
"div",
|
|
4489
4297
|
{
|
|
4490
|
-
id: `
|
|
4491
|
-
className: `
|
|
4492
|
-
"data-
|
|
4298
|
+
id: `timelane-swimlane-${e.id}`,
|
|
4299
|
+
className: `timelane-swimlane ${r ? "timelane-swimlane-focused" : ""}`,
|
|
4300
|
+
"data-timelane-swimlane-id": e.id,
|
|
4493
4301
|
style: d,
|
|
4494
4302
|
onMouseUp: i,
|
|
4495
|
-
onClick: (
|
|
4496
|
-
onDoubleClick: (
|
|
4497
|
-
onContextMenu: (
|
|
4498
|
-
c(b(
|
|
4303
|
+
onClick: (v) => S(v, "single"),
|
|
4304
|
+
onDoubleClick: (v) => S(v, "double"),
|
|
4305
|
+
onContextMenu: (v) => {
|
|
4306
|
+
c(b(v), v);
|
|
4499
4307
|
},
|
|
4500
|
-
children: /* @__PURE__ */
|
|
4501
|
-
|
|
4308
|
+
children: /* @__PURE__ */ Q(
|
|
4309
|
+
Hi,
|
|
4502
4310
|
{
|
|
4503
4311
|
onDrag: x,
|
|
4504
4312
|
onDragLeave: M,
|
|
4505
4313
|
onDrop: w,
|
|
4506
4314
|
children: [
|
|
4507
|
-
t.map((
|
|
4508
|
-
|
|
4315
|
+
t.map((v, D) => /* @__PURE__ */ y(
|
|
4316
|
+
ea,
|
|
4509
4317
|
{
|
|
4510
|
-
item:
|
|
4318
|
+
item: v,
|
|
4511
4319
|
settings: f,
|
|
4512
|
-
|
|
4320
|
+
lane: e,
|
|
4513
4321
|
onDragStart: () => {
|
|
4514
|
-
g(
|
|
4322
|
+
g(v);
|
|
4515
4323
|
},
|
|
4516
4324
|
onDrag: () => {
|
|
4517
4325
|
},
|
|
@@ -4520,72 +4328,45 @@ function oa({
|
|
|
4520
4328
|
},
|
|
4521
4329
|
onUpdate: n,
|
|
4522
4330
|
onResizeStart: () => {
|
|
4523
|
-
o(
|
|
4331
|
+
o(v.payload);
|
|
4524
4332
|
},
|
|
4525
4333
|
children: s(
|
|
4526
|
-
|
|
4527
|
-
h !== null && h.id ===
|
|
4334
|
+
v,
|
|
4335
|
+
h !== null && h.id === v.id
|
|
4528
4336
|
)
|
|
4529
4337
|
},
|
|
4530
4338
|
D
|
|
4531
4339
|
)),
|
|
4532
|
-
p && /* @__PURE__ */
|
|
4533
|
-
E.map((
|
|
4340
|
+
p && /* @__PURE__ */ y(Ii, { ...p }),
|
|
4341
|
+
E.map((v, D) => /* @__PURE__ */ y(ta, { overlap: v }, D))
|
|
4534
4342
|
]
|
|
4535
4343
|
}
|
|
4536
4344
|
)
|
|
4537
4345
|
}
|
|
4538
4346
|
);
|
|
4539
4347
|
}
|
|
4540
|
-
function
|
|
4541
|
-
return /* @__PURE__ */
|
|
4348
|
+
function na(e, t) {
|
|
4349
|
+
return /* @__PURE__ */ Q("div", { children: [
|
|
4542
4350
|
e.id,
|
|
4543
4351
|
" (",
|
|
4544
|
-
|
|
4352
|
+
j(e.start, "yyyy-mm-dd"),
|
|
4545
4353
|
" -",
|
|
4546
4354
|
" ",
|
|
4547
|
-
|
|
4355
|
+
j(e.end, "yyyy-mm-dd"),
|
|
4548
4356
|
")",
|
|
4549
4357
|
t ? "dragging" : ""
|
|
4550
4358
|
] });
|
|
4551
4359
|
}
|
|
4552
|
-
function
|
|
4553
|
-
lanes: e,
|
|
4554
|
-
items: t,
|
|
4555
|
-
renderItem: r,
|
|
4556
|
-
onItemUpdate: n = () => {
|
|
4557
|
-
},
|
|
4558
|
-
onLaneClick: i = () => {
|
|
4559
|
-
},
|
|
4560
|
-
onLaneDoubleClick: a = () => {
|
|
4561
|
-
},
|
|
4562
|
-
onLaneContextMenu: u = () => {
|
|
4563
|
-
}
|
|
4564
|
-
}) {
|
|
4565
|
-
return /* @__PURE__ */ v("div", { className: "timeline-body", children: e.map((c) => /* @__PURE__ */ v(
|
|
4566
|
-
oa,
|
|
4567
|
-
{
|
|
4568
|
-
swimlane: c,
|
|
4569
|
-
items: t.filter((s) => s.swimlaneId === c.id),
|
|
4570
|
-
renderItem: r,
|
|
4571
|
-
onItemUpdate: n,
|
|
4572
|
-
onClick: (s, o, f) => i(c, s, o, f),
|
|
4573
|
-
onDoubleClick: (s, o, f) => a(c, s, o, f),
|
|
4574
|
-
onContextMenu: (s, o) => u(c, s, o)
|
|
4575
|
-
},
|
|
4576
|
-
c.id
|
|
4577
|
-
)) });
|
|
4578
|
-
}
|
|
4579
|
-
function ya({
|
|
4360
|
+
function ia({
|
|
4580
4361
|
children: e,
|
|
4581
4362
|
onSelect: t
|
|
4582
4363
|
}) {
|
|
4583
|
-
const [r, n] =
|
|
4584
|
-
|
|
4364
|
+
const [r, n] = V([]), i = le(null), [a, u] = V(null), [c, s] = V(null);
|
|
4365
|
+
re(() => Wi({
|
|
4585
4366
|
onDragStart: (d) => {
|
|
4586
4367
|
n([d.source.data.id]);
|
|
4587
4368
|
}
|
|
4588
|
-
}), []),
|
|
4369
|
+
}), []), re(() => {
|
|
4589
4370
|
t(r);
|
|
4590
4371
|
}, [t, r]);
|
|
4591
4372
|
function o(d) {
|
|
@@ -4603,11 +4384,11 @@ function ya({
|
|
|
4603
4384
|
...h,
|
|
4604
4385
|
x: h.x - g.left,
|
|
4605
4386
|
y: h.y - g.top
|
|
4606
|
-
}), document.querySelectorAll(".
|
|
4607
|
-
|
|
4608
|
-
|
|
4387
|
+
}), document.querySelectorAll(".timelane-drop-target").forEach((p) => {
|
|
4388
|
+
ue(p.getBoundingClientRect(), h) && p.querySelectorAll(".timelane-item").forEach((m) => {
|
|
4389
|
+
ue(m.getBoundingClientRect(), h) ? m.classList.add("timelane-item-marked") : m.classList.remove("timelane-item-marked");
|
|
4609
4390
|
});
|
|
4610
|
-
}), (h.width > 5 || h.height > 5) && !i.current && (i.current =
|
|
4391
|
+
}), (h.width > 5 || h.height > 5) && !i.current && (i.current = Rt, window.addEventListener("click", Rt, !0));
|
|
4611
4392
|
}
|
|
4612
4393
|
}
|
|
4613
4394
|
function l(d) {
|
|
@@ -4619,17 +4400,17 @@ function ya({
|
|
|
4619
4400
|
width: Math.abs(d.clientX - a.x),
|
|
4620
4401
|
height: Math.abs(d.clientY - a.y)
|
|
4621
4402
|
}, g = Array.from(
|
|
4622
|
-
document.querySelectorAll(".
|
|
4623
|
-
).filter((p) =>
|
|
4624
|
-
g.length > 0 && (d.shiftKey || d.ctrlKey ? n((p) => Array.from(/* @__PURE__ */ new Set([...p, ...g]))) : n(g)), document.querySelectorAll(".
|
|
4625
|
-
p.classList.remove("
|
|
4403
|
+
document.querySelectorAll(".timelane-drop-target")
|
|
4404
|
+
).filter((p) => ue(p.getBoundingClientRect(), h)).map((p) => Array.from(p.querySelectorAll(".timelane-item"))).flatMap((p) => p).filter((p) => ue(p.getBoundingClientRect(), h)).map((p) => p instanceof HTMLElement ? Number.parseInt(p.dataset.timelaneItemId || "-1") : -1).filter((p) => p > 0);
|
|
4405
|
+
g.length > 0 && (d.shiftKey || d.ctrlKey ? n((p) => Array.from(/* @__PURE__ */ new Set([...p, ...g]))) : n(g)), document.querySelectorAll(".timelane-item-marked").forEach((p) => {
|
|
4406
|
+
p.classList.remove("timelane-item-marked");
|
|
4626
4407
|
});
|
|
4627
4408
|
}
|
|
4628
4409
|
u(null), s(null), requestAnimationFrame(() => {
|
|
4629
4410
|
i.current && i.current !== null && (window.removeEventListener("click", i.current, !0), i.current = null);
|
|
4630
4411
|
});
|
|
4631
4412
|
}
|
|
4632
|
-
return /* @__PURE__ */
|
|
4413
|
+
return /* @__PURE__ */ Q(
|
|
4633
4414
|
"div",
|
|
4634
4415
|
{
|
|
4635
4416
|
onMouseDown: o,
|
|
@@ -4639,17 +4420,17 @@ function ya({
|
|
|
4639
4420
|
position: "relative"
|
|
4640
4421
|
},
|
|
4641
4422
|
children: [
|
|
4642
|
-
c && /* @__PURE__ */
|
|
4423
|
+
c && /* @__PURE__ */ y(aa, { rect: c }),
|
|
4643
4424
|
e
|
|
4644
4425
|
]
|
|
4645
4426
|
}
|
|
4646
4427
|
);
|
|
4647
4428
|
}
|
|
4648
|
-
const
|
|
4429
|
+
const Rt = (e) => {
|
|
4649
4430
|
e.preventDefault(), e.stopPropagation();
|
|
4650
4431
|
};
|
|
4651
|
-
function
|
|
4652
|
-
return /* @__PURE__ */
|
|
4432
|
+
function aa({ rect: e }) {
|
|
4433
|
+
return /* @__PURE__ */ y(
|
|
4653
4434
|
"div",
|
|
4654
4435
|
{
|
|
4655
4436
|
id: "mouse-selection-indicator",
|
|
@@ -4665,18 +4446,190 @@ function ua({ rect: e }) {
|
|
|
4665
4446
|
}
|
|
4666
4447
|
);
|
|
4667
4448
|
}
|
|
4668
|
-
|
|
4669
|
-
|
|
4449
|
+
function oa({
|
|
4450
|
+
onSelect: e = () => {
|
|
4451
|
+
},
|
|
4452
|
+
children: t
|
|
4453
|
+
}) {
|
|
4454
|
+
return /* @__PURE__ */ y(H.Body, { children: /* @__PURE__ */ y(ia, { onSelect: e, children: /* @__PURE__ */ y("div", { className: "timelane-body", children: t }) }) });
|
|
4455
|
+
}
|
|
4456
|
+
function sa(e, t) {
|
|
4457
|
+
const r = q(t, e) + 1;
|
|
4458
|
+
return /* @__PURE__ */ y(Oe, { children: r > 4 ? j(e, "LLLL yyyy") : /* @__PURE__ */ y(Oe, {}) });
|
|
4459
|
+
}
|
|
4460
|
+
function ua(e, t) {
|
|
4461
|
+
const r = q(t, e) + 1, n = `KW ${j(e, "w")} (${j(
|
|
4462
|
+
e,
|
|
4463
|
+
"MM-dd"
|
|
4464
|
+
)} - ${j(t, "MM-dd")}`;
|
|
4465
|
+
return /* @__PURE__ */ y("div", { title: n, children: r > 2 ? /* @__PURE__ */ Q(Oe, { children: [
|
|
4466
|
+
"KW ",
|
|
4467
|
+
j(e, "w")
|
|
4468
|
+
] }) : /* @__PURE__ */ y(Oe, {}) });
|
|
4469
|
+
}
|
|
4470
|
+
function ca(e) {
|
|
4471
|
+
const t = `${j(e, "yyyy-MM-dd")}`;
|
|
4472
|
+
return /* @__PURE__ */ y("div", { title: t, children: j(e, "d") });
|
|
4473
|
+
}
|
|
4474
|
+
function la({
|
|
4475
|
+
range: e,
|
|
4476
|
+
pixels: t,
|
|
4477
|
+
setFocusedDay: r = () => {
|
|
4478
|
+
},
|
|
4479
|
+
render: n = sa,
|
|
4480
|
+
onMonthClick: i = () => {
|
|
4481
|
+
}
|
|
4482
|
+
}) {
|
|
4483
|
+
return /* @__PURE__ */ y("div", { className: "timelane-header-months", children: Sr(e).map((a, u) => {
|
|
4484
|
+
a < e.start && (a = e.start);
|
|
4485
|
+
let c = Tn(a);
|
|
4486
|
+
c > e.end && (c = e.end);
|
|
4487
|
+
const s = q(c, a) + 1;
|
|
4488
|
+
return /* @__PURE__ */ y(
|
|
4489
|
+
"div",
|
|
4490
|
+
{
|
|
4491
|
+
className: "timelane-header-month-label",
|
|
4492
|
+
style: {
|
|
4493
|
+
width: `${t.pixelsPerDay * s}px`
|
|
4494
|
+
},
|
|
4495
|
+
onClick: (o) => {
|
|
4496
|
+
i({ firstDay: a, lastDay: c, e: o }), r(a);
|
|
4497
|
+
},
|
|
4498
|
+
children: n(a, c)
|
|
4499
|
+
},
|
|
4500
|
+
u
|
|
4501
|
+
);
|
|
4502
|
+
}) });
|
|
4503
|
+
}
|
|
4504
|
+
function da({
|
|
4505
|
+
range: e,
|
|
4506
|
+
pixels: t,
|
|
4507
|
+
setFocusedDay: r = () => {
|
|
4508
|
+
},
|
|
4509
|
+
render: n = ua,
|
|
4510
|
+
onWeekClick: i = () => {
|
|
4511
|
+
}
|
|
4512
|
+
}) {
|
|
4513
|
+
return /* @__PURE__ */ y("div", { className: "timelane-header-weeks", children: Or(e, { weekStartsOn: 1 }).map((a, u) => {
|
|
4514
|
+
a < e.start && (a = e.start);
|
|
4515
|
+
let c = zt(a) ? a : En(a);
|
|
4516
|
+
c > e.end && (c = e.end);
|
|
4517
|
+
const s = q(c, a) + 1;
|
|
4518
|
+
return /* @__PURE__ */ y(
|
|
4519
|
+
"div",
|
|
4520
|
+
{
|
|
4521
|
+
className: "timelane-header-week-label",
|
|
4522
|
+
style: {
|
|
4523
|
+
width: `${t.pixelsPerDay * s}px`
|
|
4524
|
+
},
|
|
4525
|
+
onClick: (o) => {
|
|
4526
|
+
i({ firstDay: a, lastDay: c, e: o }), r(a);
|
|
4527
|
+
},
|
|
4528
|
+
children: n(a, c)
|
|
4529
|
+
},
|
|
4530
|
+
u
|
|
4531
|
+
);
|
|
4532
|
+
}) });
|
|
4533
|
+
}
|
|
4534
|
+
function fa({
|
|
4535
|
+
range: e,
|
|
4536
|
+
pixels: t,
|
|
4537
|
+
focusedDay: r,
|
|
4538
|
+
setFocusedDay: n = () => {
|
|
4539
|
+
},
|
|
4540
|
+
render: i = ca,
|
|
4541
|
+
onDayClick: a = () => {
|
|
4542
|
+
}
|
|
4543
|
+
}) {
|
|
4544
|
+
return /* @__PURE__ */ y("div", { className: "timelane-header-days", children: Wt(e).map((u, c) => /* @__PURE__ */ y(
|
|
4545
|
+
"div",
|
|
4546
|
+
{
|
|
4547
|
+
className: `timelane-header-day-label ${r && br(r, u) ? "timelane-header-day-label-focused" : ""}`,
|
|
4548
|
+
style: { width: `${t.pixelsPerDay}px` },
|
|
4549
|
+
onClick: (s) => {
|
|
4550
|
+
a({ day: u, e: s }), n(u);
|
|
4551
|
+
},
|
|
4552
|
+
children: i(u)
|
|
4553
|
+
},
|
|
4554
|
+
c
|
|
4555
|
+
)) });
|
|
4556
|
+
}
|
|
4557
|
+
function ha({
|
|
4558
|
+
focusedDay: e,
|
|
4559
|
+
setFocusedDay: t = () => {
|
|
4560
|
+
},
|
|
4561
|
+
renderMonthHeader: r,
|
|
4562
|
+
renderWeekHeader: n,
|
|
4563
|
+
renderDayHeader: i,
|
|
4564
|
+
onMonthClick: a,
|
|
4565
|
+
onDayClick: u,
|
|
4566
|
+
onWeekClick: c
|
|
4567
|
+
}) {
|
|
4568
|
+
const { settings: s } = pe();
|
|
4569
|
+
return /* @__PURE__ */ y(H.Header, { children: /* @__PURE__ */ Q("div", { className: "timelane-header", children: [
|
|
4570
|
+
s.showMonths && /* @__PURE__ */ y(
|
|
4571
|
+
la,
|
|
4572
|
+
{
|
|
4573
|
+
range: s,
|
|
4574
|
+
pixels: s,
|
|
4575
|
+
setFocusedDay: t,
|
|
4576
|
+
render: r,
|
|
4577
|
+
onMonthClick: a
|
|
4578
|
+
}
|
|
4579
|
+
),
|
|
4580
|
+
s.showWeeks && /* @__PURE__ */ y(
|
|
4581
|
+
da,
|
|
4582
|
+
{
|
|
4583
|
+
range: s,
|
|
4584
|
+
pixels: s,
|
|
4585
|
+
setFocusedDay: t,
|
|
4586
|
+
render: n,
|
|
4587
|
+
onWeekClick: c
|
|
4588
|
+
}
|
|
4589
|
+
),
|
|
4590
|
+
s.showDays && /* @__PURE__ */ y(
|
|
4591
|
+
fa,
|
|
4592
|
+
{
|
|
4593
|
+
range: s,
|
|
4594
|
+
pixels: s,
|
|
4595
|
+
focusedDay: e,
|
|
4596
|
+
setFocusedDay: t,
|
|
4597
|
+
render: i,
|
|
4598
|
+
onDayClick: u
|
|
4599
|
+
}
|
|
4600
|
+
)
|
|
4601
|
+
] }) });
|
|
4602
|
+
}
|
|
4603
|
+
function $({ children: e }) {
|
|
4604
|
+
return /* @__PURE__ */ y("div", { className: "timelane", children: /* @__PURE__ */ y(H, { children: e }) });
|
|
4605
|
+
}
|
|
4606
|
+
$.Container = $;
|
|
4607
|
+
$.Header = ha;
|
|
4608
|
+
$.Body = oa;
|
|
4609
|
+
$.Background = Fn;
|
|
4610
|
+
$.Aside = lr;
|
|
4611
|
+
$.Lane = ra;
|
|
4612
|
+
$.Layout = H;
|
|
4613
|
+
const ya = ({
|
|
4614
|
+
settings: e,
|
|
4615
|
+
children: t
|
|
4616
|
+
}) => {
|
|
4617
|
+
const [r, n] = V(e);
|
|
4618
|
+
return re(() => {
|
|
4619
|
+
n((i) => ({ ...i, _settings: e }));
|
|
4620
|
+
}, [e]), /* @__PURE__ */ y(Nt.Provider, { value: { settings: r, setSettings: n }, children: t });
|
|
4621
|
+
}, va = () => {
|
|
4622
|
+
const { settings: e } = pe();
|
|
4670
4623
|
function t(a) {
|
|
4671
4624
|
a instanceof Object ? (a.horz !== void 0 && r(a.horz), a.vert !== void 0 && n(a.vert)) : i(a);
|
|
4672
4625
|
}
|
|
4673
4626
|
function r(a) {
|
|
4674
4627
|
window.requestAnimationFrame(() => {
|
|
4675
4628
|
const u = document.getElementById(
|
|
4676
|
-
"
|
|
4629
|
+
"timelane-background-date-anchor"
|
|
4677
4630
|
);
|
|
4678
4631
|
if (u) {
|
|
4679
|
-
const c =
|
|
4632
|
+
const c = $e(a, e.start, e);
|
|
4680
4633
|
u.style.setProperty("left", `${c}px`), u.scrollIntoView({
|
|
4681
4634
|
block: "nearest",
|
|
4682
4635
|
inline: "center",
|
|
@@ -4688,7 +4641,7 @@ const va = () => {
|
|
|
4688
4641
|
function n(a) {
|
|
4689
4642
|
window.requestAnimationFrame(() => {
|
|
4690
4643
|
const u = document.getElementById(
|
|
4691
|
-
`
|
|
4644
|
+
`timelane-swimlane-${a}`
|
|
4692
4645
|
);
|
|
4693
4646
|
u && u.scrollIntoView({ block: "center", behavior: "smooth" });
|
|
4694
4647
|
});
|
|
@@ -4696,7 +4649,7 @@ const va = () => {
|
|
|
4696
4649
|
function i(a) {
|
|
4697
4650
|
window.requestAnimationFrame(() => {
|
|
4698
4651
|
const u = document.getElementById(
|
|
4699
|
-
`
|
|
4652
|
+
`timelane-item-${a}`
|
|
4700
4653
|
);
|
|
4701
4654
|
u && u.scrollIntoView({
|
|
4702
4655
|
block: "center",
|
|
@@ -4708,37 +4661,37 @@ const va = () => {
|
|
|
4708
4661
|
return { scrollTo: t, scrollToDate: r, scrollToItem: i, scrollToLane: n };
|
|
4709
4662
|
};
|
|
4710
4663
|
export {
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4664
|
+
fa as DaysHeader,
|
|
4665
|
+
la as MonthsHeader,
|
|
4666
|
+
$ as Timelane,
|
|
4667
|
+
lr as TimelaneAside,
|
|
4668
|
+
Fn as TimelaneBackground,
|
|
4669
|
+
oa as TimelaneBody,
|
|
4670
|
+
ha as TimelaneHeader,
|
|
4671
|
+
ra as TimelaneLane,
|
|
4672
|
+
H as TimelaneLayout,
|
|
4673
|
+
ya as TimelaneSettingsProvider,
|
|
4674
|
+
da as WeeksHeader,
|
|
4675
|
+
$e as dateToPixel,
|
|
4676
|
+
ue as doOverlap,
|
|
4677
|
+
jn as getAvailableSpace,
|
|
4678
|
+
An as getDropPreviewRectangle,
|
|
4726
4679
|
Ye as getDropTargetDimensions,
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4680
|
+
Pn as getDropTargetHeight,
|
|
4681
|
+
Rn as getDropTargetWidth,
|
|
4682
|
+
te as getGrabPosition,
|
|
4683
|
+
Ht as getItemDimensions,
|
|
4684
|
+
Nn as getItemPosition,
|
|
4732
4685
|
Fe as getItemRectangle,
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4686
|
+
Ln as getOverlap,
|
|
4687
|
+
It as getUpdatedItem,
|
|
4688
|
+
Pt as isItem,
|
|
4689
|
+
In as isWithinTargetDimensions,
|
|
4690
|
+
Hn as itemsDoOverlap,
|
|
4691
|
+
kn as offsetToPixel,
|
|
4692
|
+
ca as renderDayHeader,
|
|
4693
|
+
sa as renderMonthHeader,
|
|
4694
|
+
ua as renderWeekHeader,
|
|
4742
4695
|
va as useScroll,
|
|
4743
|
-
|
|
4696
|
+
pe as useTimelaneContext
|
|
4744
4697
|
};
|