@weing-dev/ui-kit-primitive 0.3.1 → 0.4.1
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/Divider-m-B4TrPH.js +29 -0
- package/dist/Divider.css +1 -0
- package/dist/Icon-DExqF865.js +1166 -0
- package/dist/bind-D3ZJ5k4I.js +47 -0
- package/dist/calendar.css +1 -0
- package/dist/calendar.d.ts +10 -0
- package/dist/calendar.js +4075 -0
- package/dist/chart.d.ts +2 -0
- package/dist/chart.js +94 -0
- package/dist/color-B71xRiyK.js +384 -0
- package/dist/compiler-runtime-BFrE5JtX.js +326 -0
- package/dist/components/Form/Dropdown/Dropdown.d.ts +2 -1
- package/dist/components/LNB/LNB.context.d.ts +14 -14
- package/dist/components/LNB/LNB.d.ts +8 -6
- package/dist/components/LNB/makeNavigation.d.ts +11 -6
- package/dist/display.css +1 -0
- package/dist/display.d.ts +15 -0
- package/dist/display.js +5280 -0
- package/dist/editor-style.css +7 -0
- package/dist/editor-style.d.ts +0 -0
- package/dist/editor-style.js +1 -0
- package/dist/editor.css +1 -0
- package/dist/editor.d.ts +5 -0
- package/dist/editor.js +338 -0
- package/dist/entry/calendar.d.ts +10 -0
- package/dist/entry/chart.d.ts +2 -0
- package/dist/entry/display.d.ts +15 -0
- package/dist/entry/editor-style.d.ts +0 -0
- package/dist/entry/editor.d.ts +5 -0
- package/dist/entry/feedback.d.ts +6 -0
- package/dist/entry/form.d.ts +17 -0
- package/dist/entry/icon.d.ts +5 -0
- package/dist/entry/navigation.d.ts +9 -0
- package/dist/entry/table.d.ts +3 -0
- package/dist/entry/types.d.ts +1 -1
- package/dist/entry/video-player-style.d.ts +0 -0
- package/dist/entry/video-player.d.ts +3 -0
- package/dist/feedback.css +1 -0
- package/dist/feedback.d.ts +6 -0
- package/dist/feedback.js +385 -0
- package/dist/form.css +1 -0
- package/dist/form.d.ts +17 -0
- package/dist/form.js +3548 -0
- package/dist/icon.d.ts +5 -0
- package/dist/icon.js +18 -0
- package/dist/index.css +1 -7
- package/dist/index.js +3947 -3931
- package/dist/index.umd.cjs +26 -26
- package/dist/navigation.css +1 -0
- package/dist/navigation.d.ts +9 -0
- package/dist/navigation.js +1036 -0
- package/dist/table.css +1 -0
- package/dist/table.d.ts +3 -0
- package/dist/table.js +184 -0
- package/dist/usePopper-DvYrGFkh.js +1038 -0
- package/dist/video-player-style.css +1 -0
- package/dist/video-player-style.d.ts +0 -0
- package/dist/video-player-style.js +1 -0
- package/dist/video-player.css +1 -0
- package/dist/video-player.d.ts +3 -0
- package/dist/video-player.js +1751 -0
- package/package.json +44 -2
- package/dist/components/GlobalStyle/GlobalStyle.d.ts +0 -2
package/dist/calendar.js
ADDED
|
@@ -0,0 +1,4075 @@
|
|
|
1
|
+
import { c as xe, j as $ } from "./compiler-runtime-BFrE5JtX.js";
|
|
2
|
+
import S, { useLayoutEffect as In, useEffect as ee, useRef as J, useCallback as ve, useMemo as ie, useState as _e, createContext as gt, memo as Hn, useReducer as zn, useContext as ht } from "react";
|
|
3
|
+
import { a as pt, g as Yt, c as Ft } from "./bind-D3ZJ5k4I.js";
|
|
4
|
+
import C from "dayjs";
|
|
5
|
+
import { a as dn } from "./Icon-DExqF865.js";
|
|
6
|
+
import { unstable_batchedUpdates as xt, createPortal as Pn } from "react-dom";
|
|
7
|
+
import { u as Bn } from "./usePopper-DvYrGFkh.js";
|
|
8
|
+
const jn = "_CaledarRoot_1715d_3", Fn = "_CalendarHeaderDate_1715d_9", Wn = "_CalendarDayTextList_1715d_27", Xn = "_CalednarDayTextColumn_1715d_34", Vn = "_sunday_1715d_57", Un = "_saturday_1715d_60", Zn = "_CalendarBody_1715d_63", qn = "_CalendarBodyColumn_1715d_67", Gn = "_selected_1715d_76", Kn = "_between_1715d_79", Jn = "_start_1715d_82", Qn = "_end_1715d_91", er = "_both_1715d_100", tr = "_today_1715d_103", nr = "_CalendarBodyColumnText_1715d_116", rr = {
|
|
9
|
+
CaledarRoot: jn,
|
|
10
|
+
CalendarHeaderDate: Fn,
|
|
11
|
+
CalendarDayTextList: Wn,
|
|
12
|
+
CalednarDayTextColumn: Xn,
|
|
13
|
+
sunday: Vn,
|
|
14
|
+
saturday: Un,
|
|
15
|
+
CalendarBody: Zn,
|
|
16
|
+
CalendarBodyColumn: qn,
|
|
17
|
+
selected: Gn,
|
|
18
|
+
between: Kn,
|
|
19
|
+
start: Jn,
|
|
20
|
+
end: Qn,
|
|
21
|
+
both: er,
|
|
22
|
+
today: tr,
|
|
23
|
+
CalendarBodyColumnText: nr
|
|
24
|
+
};
|
|
25
|
+
var fn = { exports: {} };
|
|
26
|
+
(function(t, e) {
|
|
27
|
+
(function(n, r) {
|
|
28
|
+
t.exports = r();
|
|
29
|
+
})(pt, function() {
|
|
30
|
+
var n = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, r = {};
|
|
31
|
+
return function(o, s, a) {
|
|
32
|
+
var i, c = function(h, g, p) {
|
|
33
|
+
p === void 0 && (p = {});
|
|
34
|
+
var f = new Date(h), m = function(D, y) {
|
|
35
|
+
y === void 0 && (y = {});
|
|
36
|
+
var v = y.timeZoneName || "short", M = D + "|" + v, x = r[M];
|
|
37
|
+
return x || (x = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: D, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: v }), r[M] = x), x;
|
|
38
|
+
}(g, p);
|
|
39
|
+
return m.formatToParts(f);
|
|
40
|
+
}, l = function(h, g) {
|
|
41
|
+
for (var p = c(h, g), f = [], m = 0; m < p.length; m += 1) {
|
|
42
|
+
var D = p[m], y = D.type, v = D.value, M = n[y];
|
|
43
|
+
M >= 0 && (f[M] = parseInt(v, 10));
|
|
44
|
+
}
|
|
45
|
+
var x = f[3], T = x === 24 ? 0 : x, w = f[0] + "-" + f[1] + "-" + f[2] + " " + T + ":" + f[4] + ":" + f[5] + ":000", b = +h;
|
|
46
|
+
return (a.utc(w).valueOf() - (b -= b % 1e3)) / 6e4;
|
|
47
|
+
}, u = s.prototype;
|
|
48
|
+
u.tz = function(h, g) {
|
|
49
|
+
h === void 0 && (h = i);
|
|
50
|
+
var p, f = this.utcOffset(), m = this.toDate(), D = m.toLocaleString("en-US", { timeZone: h }), y = Math.round((m - new Date(D)) / 1e3 / 60), v = 15 * -Math.round(m.getTimezoneOffset() / 15) - y;
|
|
51
|
+
if (!Number(v)) p = this.utcOffset(0, g);
|
|
52
|
+
else if (p = a(D, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(v, !0), g) {
|
|
53
|
+
var M = p.utcOffset();
|
|
54
|
+
p = p.add(f - M, "minute");
|
|
55
|
+
}
|
|
56
|
+
return p.$x.$timezone = h, p;
|
|
57
|
+
}, u.offsetName = function(h) {
|
|
58
|
+
var g = this.$x.$timezone || a.tz.guess(), p = c(this.valueOf(), g, { timeZoneName: h }).find(function(f) {
|
|
59
|
+
return f.type.toLowerCase() === "timezonename";
|
|
60
|
+
});
|
|
61
|
+
return p && p.value;
|
|
62
|
+
};
|
|
63
|
+
var d = u.startOf;
|
|
64
|
+
u.startOf = function(h, g) {
|
|
65
|
+
if (!this.$x || !this.$x.$timezone) return d.call(this, h, g);
|
|
66
|
+
var p = a(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
67
|
+
return d.call(p, h, g).tz(this.$x.$timezone, !0);
|
|
68
|
+
}, a.tz = function(h, g, p) {
|
|
69
|
+
var f = p && g, m = p || g || i, D = l(+a(), m);
|
|
70
|
+
if (typeof h != "string") return a(h).tz(m);
|
|
71
|
+
var y = function(T, w, b) {
|
|
72
|
+
var E = T - 60 * w * 1e3, A = l(E, b);
|
|
73
|
+
if (w === A) return [E, w];
|
|
74
|
+
var Y = l(E -= 60 * (A - w) * 1e3, b);
|
|
75
|
+
return A === Y ? [E, A] : [T - 60 * Math.min(A, Y) * 1e3, Math.max(A, Y)];
|
|
76
|
+
}(a.utc(h, f).valueOf(), D, m), v = y[0], M = y[1], x = a(v).utcOffset(M);
|
|
77
|
+
return x.$x.$timezone = m, x;
|
|
78
|
+
}, a.tz.guess = function() {
|
|
79
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
80
|
+
}, a.tz.setDefault = function(h) {
|
|
81
|
+
i = h;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
})(fn);
|
|
86
|
+
var or = fn.exports;
|
|
87
|
+
const hn = /* @__PURE__ */ Yt(or);
|
|
88
|
+
var mn = { exports: {} };
|
|
89
|
+
(function(t, e) {
|
|
90
|
+
(function(n, r) {
|
|
91
|
+
t.exports = r();
|
|
92
|
+
})(pt, function() {
|
|
93
|
+
var n = "minute", r = /[+-]\d\d(?::?\d\d)?/g, o = /([+-]|\d\d)/g;
|
|
94
|
+
return function(s, a, i) {
|
|
95
|
+
var c = a.prototype;
|
|
96
|
+
i.utc = function(f) {
|
|
97
|
+
var m = { date: f, utc: !0, args: arguments };
|
|
98
|
+
return new a(m);
|
|
99
|
+
}, c.utc = function(f) {
|
|
100
|
+
var m = i(this.toDate(), { locale: this.$L, utc: !0 });
|
|
101
|
+
return f ? m.add(this.utcOffset(), n) : m;
|
|
102
|
+
}, c.local = function() {
|
|
103
|
+
return i(this.toDate(), { locale: this.$L, utc: !1 });
|
|
104
|
+
};
|
|
105
|
+
var l = c.parse;
|
|
106
|
+
c.parse = function(f) {
|
|
107
|
+
f.utc && (this.$u = !0), this.$utils().u(f.$offset) || (this.$offset = f.$offset), l.call(this, f);
|
|
108
|
+
};
|
|
109
|
+
var u = c.init;
|
|
110
|
+
c.init = function() {
|
|
111
|
+
if (this.$u) {
|
|
112
|
+
var f = this.$d;
|
|
113
|
+
this.$y = f.getUTCFullYear(), this.$M = f.getUTCMonth(), this.$D = f.getUTCDate(), this.$W = f.getUTCDay(), this.$H = f.getUTCHours(), this.$m = f.getUTCMinutes(), this.$s = f.getUTCSeconds(), this.$ms = f.getUTCMilliseconds();
|
|
114
|
+
} else u.call(this);
|
|
115
|
+
};
|
|
116
|
+
var d = c.utcOffset;
|
|
117
|
+
c.utcOffset = function(f, m) {
|
|
118
|
+
var D = this.$utils().u;
|
|
119
|
+
if (D(f)) return this.$u ? 0 : D(this.$offset) ? d.call(this) : this.$offset;
|
|
120
|
+
if (typeof f == "string" && (f = function(x) {
|
|
121
|
+
x === void 0 && (x = "");
|
|
122
|
+
var T = x.match(r);
|
|
123
|
+
if (!T) return null;
|
|
124
|
+
var w = ("" + T[0]).match(o) || ["-", 0, 0], b = w[0], E = 60 * +w[1] + +w[2];
|
|
125
|
+
return E === 0 ? 0 : b === "+" ? E : -E;
|
|
126
|
+
}(f), f === null)) return this;
|
|
127
|
+
var y = Math.abs(f) <= 16 ? 60 * f : f, v = this;
|
|
128
|
+
if (m) return v.$offset = y, v.$u = f === 0, v;
|
|
129
|
+
if (f !== 0) {
|
|
130
|
+
var M = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
131
|
+
(v = this.local().add(y + M, n)).$offset = y, v.$x.$localOffset = M;
|
|
132
|
+
} else v = this.utc();
|
|
133
|
+
return v;
|
|
134
|
+
};
|
|
135
|
+
var h = c.format;
|
|
136
|
+
c.format = function(f) {
|
|
137
|
+
var m = f || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
138
|
+
return h.call(this, m);
|
|
139
|
+
}, c.valueOf = function() {
|
|
140
|
+
var f = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
141
|
+
return this.$d.valueOf() - 6e4 * f;
|
|
142
|
+
}, c.isUTC = function() {
|
|
143
|
+
return !!this.$u;
|
|
144
|
+
}, c.toISOString = function() {
|
|
145
|
+
return this.toDate().toISOString();
|
|
146
|
+
}, c.toString = function() {
|
|
147
|
+
return this.toDate().toUTCString();
|
|
148
|
+
};
|
|
149
|
+
var g = c.toDate;
|
|
150
|
+
c.toDate = function(f) {
|
|
151
|
+
return f === "s" && this.$offset ? i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : g.call(this);
|
|
152
|
+
};
|
|
153
|
+
var p = c.diff;
|
|
154
|
+
c.diff = function(f, m, D) {
|
|
155
|
+
if (f && this.$u === f.$u) return p.call(this, f, m, D);
|
|
156
|
+
var y = this.local(), v = i(f).local();
|
|
157
|
+
return p.call(y, v, m, D);
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
});
|
|
161
|
+
})(mn);
|
|
162
|
+
var sr = mn.exports;
|
|
163
|
+
const vn = /* @__PURE__ */ Yt(sr);
|
|
164
|
+
var gn = { exports: {} };
|
|
165
|
+
(function(t, e) {
|
|
166
|
+
(function(n, r) {
|
|
167
|
+
t.exports = r();
|
|
168
|
+
})(pt, function() {
|
|
169
|
+
var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, r = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, o = /\d/, s = /\d\d/, a = /\d\d?/, i = /\d*[^-_:/,()\s\d]+/, c = {}, l = function(m) {
|
|
170
|
+
return (m = +m) + (m > 68 ? 1900 : 2e3);
|
|
171
|
+
}, u = function(m) {
|
|
172
|
+
return function(D) {
|
|
173
|
+
this[m] = +D;
|
|
174
|
+
};
|
|
175
|
+
}, d = [/[+-]\d\d:?(\d\d)?|Z/, function(m) {
|
|
176
|
+
(this.zone || (this.zone = {})).offset = function(D) {
|
|
177
|
+
if (!D || D === "Z") return 0;
|
|
178
|
+
var y = D.match(/([+-]|\d\d)/g), v = 60 * y[1] + (+y[2] || 0);
|
|
179
|
+
return v === 0 ? 0 : y[0] === "+" ? -v : v;
|
|
180
|
+
}(m);
|
|
181
|
+
}], h = function(m) {
|
|
182
|
+
var D = c[m];
|
|
183
|
+
return D && (D.indexOf ? D : D.s.concat(D.f));
|
|
184
|
+
}, g = function(m, D) {
|
|
185
|
+
var y, v = c.meridiem;
|
|
186
|
+
if (v) {
|
|
187
|
+
for (var M = 1; M <= 24; M += 1) if (m.indexOf(v(M, 0, D)) > -1) {
|
|
188
|
+
y = M > 12;
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
} else y = m === (D ? "pm" : "PM");
|
|
192
|
+
return y;
|
|
193
|
+
}, p = { A: [i, function(m) {
|
|
194
|
+
this.afternoon = g(m, !1);
|
|
195
|
+
}], a: [i, function(m) {
|
|
196
|
+
this.afternoon = g(m, !0);
|
|
197
|
+
}], Q: [o, function(m) {
|
|
198
|
+
this.month = 3 * (m - 1) + 1;
|
|
199
|
+
}], S: [o, function(m) {
|
|
200
|
+
this.milliseconds = 100 * +m;
|
|
201
|
+
}], SS: [s, function(m) {
|
|
202
|
+
this.milliseconds = 10 * +m;
|
|
203
|
+
}], SSS: [/\d{3}/, function(m) {
|
|
204
|
+
this.milliseconds = +m;
|
|
205
|
+
}], s: [a, u("seconds")], ss: [a, u("seconds")], m: [a, u("minutes")], mm: [a, u("minutes")], H: [a, u("hours")], h: [a, u("hours")], HH: [a, u("hours")], hh: [a, u("hours")], D: [a, u("day")], DD: [s, u("day")], Do: [i, function(m) {
|
|
206
|
+
var D = c.ordinal, y = m.match(/\d+/);
|
|
207
|
+
if (this.day = y[0], D) for (var v = 1; v <= 31; v += 1) D(v).replace(/\[|\]/g, "") === m && (this.day = v);
|
|
208
|
+
}], w: [a, u("week")], ww: [s, u("week")], M: [a, u("month")], MM: [s, u("month")], MMM: [i, function(m) {
|
|
209
|
+
var D = h("months"), y = (h("monthsShort") || D.map(function(v) {
|
|
210
|
+
return v.slice(0, 3);
|
|
211
|
+
})).indexOf(m) + 1;
|
|
212
|
+
if (y < 1) throw new Error();
|
|
213
|
+
this.month = y % 12 || y;
|
|
214
|
+
}], MMMM: [i, function(m) {
|
|
215
|
+
var D = h("months").indexOf(m) + 1;
|
|
216
|
+
if (D < 1) throw new Error();
|
|
217
|
+
this.month = D % 12 || D;
|
|
218
|
+
}], Y: [/[+-]?\d+/, u("year")], YY: [s, function(m) {
|
|
219
|
+
this.year = l(m);
|
|
220
|
+
}], YYYY: [/\d{4}/, u("year")], Z: d, ZZ: d };
|
|
221
|
+
function f(m) {
|
|
222
|
+
var D, y;
|
|
223
|
+
D = m, y = c && c.formats;
|
|
224
|
+
for (var v = (m = D.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(A, Y, R) {
|
|
225
|
+
var O = R && R.toUpperCase();
|
|
226
|
+
return Y || y[R] || n[R] || y[O].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(_, N, k) {
|
|
227
|
+
return N || k.slice(1);
|
|
228
|
+
});
|
|
229
|
+
})).match(r), M = v.length, x = 0; x < M; x += 1) {
|
|
230
|
+
var T = v[x], w = p[T], b = w && w[0], E = w && w[1];
|
|
231
|
+
v[x] = E ? { regex: b, parser: E } : T.replace(/^\[|\]$/g, "");
|
|
232
|
+
}
|
|
233
|
+
return function(A) {
|
|
234
|
+
for (var Y = {}, R = 0, O = 0; R < M; R += 1) {
|
|
235
|
+
var _ = v[R];
|
|
236
|
+
if (typeof _ == "string") O += _.length;
|
|
237
|
+
else {
|
|
238
|
+
var N = _.regex, k = _.parser, I = A.slice(O), X = N.exec(I)[0];
|
|
239
|
+
k.call(Y, X), A = A.replace(X, "");
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return function(F) {
|
|
243
|
+
var q = F.afternoon;
|
|
244
|
+
if (q !== void 0) {
|
|
245
|
+
var L = F.hours;
|
|
246
|
+
q ? L < 12 && (F.hours += 12) : L === 12 && (F.hours = 0), delete F.afternoon;
|
|
247
|
+
}
|
|
248
|
+
}(Y), Y;
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
return function(m, D, y) {
|
|
252
|
+
y.p.customParseFormat = !0, m && m.parseTwoDigitYear && (l = m.parseTwoDigitYear);
|
|
253
|
+
var v = D.prototype, M = v.parse;
|
|
254
|
+
v.parse = function(x) {
|
|
255
|
+
var T = x.date, w = x.utc, b = x.args;
|
|
256
|
+
this.$u = w;
|
|
257
|
+
var E = b[1];
|
|
258
|
+
if (typeof E == "string") {
|
|
259
|
+
var A = b[2] === !0, Y = b[3] === !0, R = A || Y, O = b[2];
|
|
260
|
+
Y && (O = b[2]), c = this.$locale(), !A && O && (c = y.Ls[O]), this.$d = function(I, X, F, q) {
|
|
261
|
+
try {
|
|
262
|
+
if (["x", "X"].indexOf(X) > -1) return new Date((X === "X" ? 1e3 : 1) * I);
|
|
263
|
+
var L = f(X)(I), te = L.year, P = L.month, me = L.day, ge = L.hours, ne = L.minutes, B = L.seconds, z = L.milliseconds, j = L.zone, V = L.week, U = /* @__PURE__ */ new Date(), Z = me || (te || P ? 1 : U.getDate()), re = te || U.getFullYear(), ce = 0;
|
|
264
|
+
te && !P || (ce = P > 0 ? P - 1 : U.getMonth());
|
|
265
|
+
var pe, De = ge || 0, He = ne || 0, Ee = B || 0, Oe = z || 0;
|
|
266
|
+
return j ? new Date(Date.UTC(re, ce, Z, De, He, Ee, Oe + 60 * j.offset * 1e3)) : F ? new Date(Date.UTC(re, ce, Z, De, He, Ee, Oe)) : (pe = new Date(re, ce, Z, De, He, Ee, Oe), V && (pe = q(pe).week(V).toDate()), pe);
|
|
267
|
+
} catch {
|
|
268
|
+
return /* @__PURE__ */ new Date("");
|
|
269
|
+
}
|
|
270
|
+
}(T, E, w, y), this.init(), O && O !== !0 && (this.$L = this.locale(O).$L), R && T != this.format(E) && (this.$d = /* @__PURE__ */ new Date("")), c = {};
|
|
271
|
+
} else if (E instanceof Array) for (var _ = E.length, N = 1; N <= _; N += 1) {
|
|
272
|
+
b[1] = E[N - 1];
|
|
273
|
+
var k = y.apply(this, b);
|
|
274
|
+
if (k.isValid()) {
|
|
275
|
+
this.$d = k.$d, this.$L = k.$L, this.init();
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
N === _ && (this.$d = /* @__PURE__ */ new Date(""));
|
|
279
|
+
}
|
|
280
|
+
else M.call(this, x);
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
});
|
|
284
|
+
})(gn);
|
|
285
|
+
var ir = gn.exports;
|
|
286
|
+
const ar = /* @__PURE__ */ Yt(ir);
|
|
287
|
+
C.extend(vn);
|
|
288
|
+
C.extend(hn);
|
|
289
|
+
C.extend(ar);
|
|
290
|
+
const lr = {
|
|
291
|
+
addMonth: () => {
|
|
292
|
+
},
|
|
293
|
+
addWeek: () => {
|
|
294
|
+
},
|
|
295
|
+
subtractMonth: () => {
|
|
296
|
+
},
|
|
297
|
+
subtractWeek: () => {
|
|
298
|
+
},
|
|
299
|
+
isWeekDay: !0,
|
|
300
|
+
isWeekend: !0,
|
|
301
|
+
isMondayStart: !1,
|
|
302
|
+
calendarType: "month",
|
|
303
|
+
lang: "ko",
|
|
304
|
+
excludeDates: []
|
|
305
|
+
}, je = S.createContext(lr), cr = (t) => {
|
|
306
|
+
const e = xe.c(32), {
|
|
307
|
+
children: n
|
|
308
|
+
} = t, r = ur;
|
|
309
|
+
let o;
|
|
310
|
+
e[0] !== t.currentDate ? (o = r(t.currentDate).format("YYYY-MM-DD"), e[0] = t.currentDate, e[1] = o) : o = e[1];
|
|
311
|
+
const [s, a] = S.useState(o);
|
|
312
|
+
let i;
|
|
313
|
+
e[2] !== t.currentDate ? (i = r(t.currentDate).set("date", 1).format("YYYY-MM-DD"), e[2] = t.currentDate, e[3] = i) : i = e[3];
|
|
314
|
+
const [c, l] = S.useState(i);
|
|
315
|
+
let u;
|
|
316
|
+
e[4] !== t.currentDate ? (u = r(t.currentDate).startOf("week").format("YYYY-MM-DD"), e[4] = t.currentDate, e[5] = u) : u = e[5];
|
|
317
|
+
const [d, h] = S.useState(u);
|
|
318
|
+
let g;
|
|
319
|
+
e[6] !== s ? (g = (Y, R) => {
|
|
320
|
+
const O = Y === void 0 ? 1 : Y, _ = r(s).add(O, R).format("YYYY-MM-DD");
|
|
321
|
+
a(_), h(r(_).startOf("week").format("YYYY-MM-DD")), l(r(_).set("date", 1).format("YYYY-MM-DD"));
|
|
322
|
+
}, e[6] = s, e[7] = g) : g = e[7];
|
|
323
|
+
const p = g;
|
|
324
|
+
let f, m;
|
|
325
|
+
e[8] !== t.currentDate ? (f = () => {
|
|
326
|
+
if (t.currentDate) {
|
|
327
|
+
const Y = r(t.currentDate);
|
|
328
|
+
a(Y.format("YYYY-MM-DD")), l(Y.set("date", 1).format("YYYY-MM-DD")), h(Y.startOf("week").format("YYYY-MM-DD"));
|
|
329
|
+
}
|
|
330
|
+
}, m = [t.currentDate], e[8] = t.currentDate, e[9] = f, e[10] = m) : (f = e[9], m = e[10]), S.useEffect(f, m);
|
|
331
|
+
let D, y, v, M;
|
|
332
|
+
e[11] !== p ? (D = (Y) => {
|
|
333
|
+
const R = Y === void 0 ? 1 : Y;
|
|
334
|
+
return p.call(null, R, "week");
|
|
335
|
+
}, y = (Y) => {
|
|
336
|
+
const R = Y === void 0 ? 1 : Y;
|
|
337
|
+
return p.call(null, R, "month");
|
|
338
|
+
}, v = (Y) => {
|
|
339
|
+
const R = Y === void 0 ? 1 : Y;
|
|
340
|
+
return p.call(null, R * -1, "week");
|
|
341
|
+
}, M = (Y) => {
|
|
342
|
+
const R = Y === void 0 ? 1 : Y;
|
|
343
|
+
return p.call(null, R * -1, "month");
|
|
344
|
+
}, e[11] = p, e[12] = D, e[13] = y, e[14] = v, e[15] = M) : (D = e[12], y = e[13], v = e[14], M = e[15]);
|
|
345
|
+
const x = t.isWeekend ?? !0, T = t.isWeekDay ?? !0, w = t.isMondayStart ?? !1, b = t.calendarType ?? "month";
|
|
346
|
+
let E;
|
|
347
|
+
e[16] !== s || e[17] !== c || e[18] !== d || e[19] !== t || e[20] !== x || e[21] !== T || e[22] !== w || e[23] !== b || e[24] !== D || e[25] !== y || e[26] !== v || e[27] !== M ? (E = {
|
|
348
|
+
...t,
|
|
349
|
+
currentDate: s,
|
|
350
|
+
currentMonthFirst: c,
|
|
351
|
+
currentWeekFirst: d,
|
|
352
|
+
addWeek: D,
|
|
353
|
+
addMonth: y,
|
|
354
|
+
subtractWeek: v,
|
|
355
|
+
subtractMonth: M,
|
|
356
|
+
isWeekend: x,
|
|
357
|
+
isWeekDay: T,
|
|
358
|
+
isMondayStart: w,
|
|
359
|
+
calendarType: b,
|
|
360
|
+
handleDatePress: t.handleDatePress,
|
|
361
|
+
selectedDate: t.selectedDate,
|
|
362
|
+
excludeDates: t.excludeDates
|
|
363
|
+
}, e[16] = s, e[17] = c, e[18] = d, e[19] = t, e[20] = x, e[21] = T, e[22] = w, e[23] = b, e[24] = D, e[25] = y, e[26] = v, e[27] = M, e[28] = E) : E = e[28];
|
|
364
|
+
let A;
|
|
365
|
+
return e[29] !== n || e[30] !== E ? (A = /* @__PURE__ */ $.jsx(je.Provider, { value: E, children: n }), e[29] = n, e[30] = E, e[31] = A) : A = e[31], A;
|
|
366
|
+
};
|
|
367
|
+
function ur(t) {
|
|
368
|
+
return t ? t.includes("T") || t.includes("Z") ? C(t) : t.includes("GMT") ? C(new Date(t)) : C(t, "YYYY-MM-DD") : C();
|
|
369
|
+
}
|
|
370
|
+
const dr = /* @__PURE__ */ new Map([["ko", ["일", "월", "화", "수", "목", "금", "토"]], ["en", ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]], ["ja", ["日", "月", "火", "水", "木", "金", "土"]], ["zh", ["日", "一", "二", "三", "四", "五", "六"]], ["vi", ["CN", "T2", "T3", "T4", "T5", "T6", "T7"]], ["fr", ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"]], ["de", ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"]], ["es", ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"]], ["it", ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"]], ["ru", ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"]]]), fr = ({
|
|
371
|
+
columns: t,
|
|
372
|
+
start: e,
|
|
373
|
+
end: n,
|
|
374
|
+
isMondayStart: r = !1,
|
|
375
|
+
isWeekDay: o = !0,
|
|
376
|
+
isWeekend: s = !0
|
|
377
|
+
}) => {
|
|
378
|
+
const a = [...t];
|
|
379
|
+
let i = e.day();
|
|
380
|
+
r && (i = i === 0 ? 6 : i - 1);
|
|
381
|
+
const c = i;
|
|
382
|
+
if (c > 0) {
|
|
383
|
+
const d = C(e).subtract(1, "day");
|
|
384
|
+
for (let h = 0; h < c; h++) {
|
|
385
|
+
const g = C(d).subtract(h, "day"), p = g.day();
|
|
386
|
+
(o && p >= 1 && p <= 5 || s && (p === 0 || p === 6)) && a.unshift(g);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
let l = n.day();
|
|
390
|
+
r && (l = l === 0 ? 6 : l - 1);
|
|
391
|
+
const u = 6 - l;
|
|
392
|
+
if (u > 0)
|
|
393
|
+
for (let d = 1; d <= u; d++) {
|
|
394
|
+
const h = C(n).add(d, "day"), g = h.day();
|
|
395
|
+
(o && g >= 1 && g <= 5 || s && (g === 0 || g === 6)) && a.push(h);
|
|
396
|
+
}
|
|
397
|
+
return a;
|
|
398
|
+
}, hr = ({
|
|
399
|
+
date: t,
|
|
400
|
+
isWeekDay: e = !0,
|
|
401
|
+
isWeekend: n = !0,
|
|
402
|
+
isMondayStart: r = !1
|
|
403
|
+
}) => {
|
|
404
|
+
const o = C(t).startOf("month"), s = C(t).endOf("month"), a = C(s).get("date"), i = [];
|
|
405
|
+
for (let l = 0; l < a; l++) {
|
|
406
|
+
const u = C(o).add(l, "day"), d = u.day();
|
|
407
|
+
e && d >= 1 && d <= 5 && i.push(u), n && (d === 0 || d === 6) && i.push(u);
|
|
408
|
+
}
|
|
409
|
+
return fr({
|
|
410
|
+
columns: i,
|
|
411
|
+
start: o,
|
|
412
|
+
end: s,
|
|
413
|
+
isMondayStart: r,
|
|
414
|
+
isWeekDay: e,
|
|
415
|
+
isWeekend: n
|
|
416
|
+
});
|
|
417
|
+
}, mr = ({
|
|
418
|
+
date: t,
|
|
419
|
+
isWeekDay: e = !0,
|
|
420
|
+
isWeekend: n = !0,
|
|
421
|
+
isMondayStart: r = !1
|
|
422
|
+
}) => {
|
|
423
|
+
const o = C(t).startOf("week").add(r ? 1 : 0, "day"), s = [], a = [
|
|
424
|
+
C(o).add(6, "day"),
|
|
425
|
+
// 토요일
|
|
426
|
+
C(o).add(0, "day")
|
|
427
|
+
// 일요일
|
|
428
|
+
], i = new Array(5).fill(0).map((c, l) => C(o).add(l + 1, "day"));
|
|
429
|
+
return e && !n ? i : n && !e ? a : (r ? s.push(...i, ...a) : s.push(a[1], ...i, a[0]), s);
|
|
430
|
+
}, Kt = (t, e = "ko") => {
|
|
431
|
+
var n;
|
|
432
|
+
return (n = dr.get(e)) == null ? void 0 : n[t];
|
|
433
|
+
}, Ie = Ft.bind(rr), vr = (t) => {
|
|
434
|
+
const e = xe.c(31), {
|
|
435
|
+
as: n,
|
|
436
|
+
className: r,
|
|
437
|
+
isFill: o,
|
|
438
|
+
columnClassName: s,
|
|
439
|
+
columnAs: a
|
|
440
|
+
} = t, {
|
|
441
|
+
handleDatePress: i,
|
|
442
|
+
excludeDates: c,
|
|
443
|
+
minDate: l,
|
|
444
|
+
maxDate: u
|
|
445
|
+
} = S.useContext(je), {
|
|
446
|
+
currentWeekFirst: d,
|
|
447
|
+
currentMonthFirst: h,
|
|
448
|
+
calendarType: g,
|
|
449
|
+
isWeekend: p,
|
|
450
|
+
isWeekDay: f,
|
|
451
|
+
isMondayStart: m,
|
|
452
|
+
selectedDate: D
|
|
453
|
+
} = S.useContext(je);
|
|
454
|
+
let y;
|
|
455
|
+
if (Array.isArray(D)) {
|
|
456
|
+
const x = D[0] || "", T = D[1] || "";
|
|
457
|
+
let w;
|
|
458
|
+
e[0] !== x || e[1] !== T ? (w = {
|
|
459
|
+
start: x,
|
|
460
|
+
end: T
|
|
461
|
+
}, e[0] = x, e[1] = T, e[2] = w) : w = e[2], y = w;
|
|
462
|
+
} else {
|
|
463
|
+
const x = D || "";
|
|
464
|
+
let T;
|
|
465
|
+
e[3] !== x ? (T = {
|
|
466
|
+
start: x,
|
|
467
|
+
end: ""
|
|
468
|
+
}, e[3] = x, e[4] = T) : T = e[4], y = T;
|
|
469
|
+
}
|
|
470
|
+
const v = y;
|
|
471
|
+
let M;
|
|
472
|
+
if (e[5] !== n || e[6] !== g || e[7] !== r || e[8] !== a || e[9] !== s || e[10] !== h || e[11] !== d || e[12] !== c || e[13] !== i || e[14] !== o || e[15] !== m || e[16] !== f || e[17] !== p || e[18] !== u || e[19] !== l || e[20] !== D || e[21] !== v) {
|
|
473
|
+
const x = mr({
|
|
474
|
+
date: d ?? "",
|
|
475
|
+
isWeekDay: f,
|
|
476
|
+
isWeekend: p,
|
|
477
|
+
isMondayStart: m
|
|
478
|
+
}), T = hr({
|
|
479
|
+
date: h ?? "",
|
|
480
|
+
isWeekDay: f,
|
|
481
|
+
isWeekend: p,
|
|
482
|
+
isMondayStart: m
|
|
483
|
+
}), w = g === "month" ? T : x, b = p && f ? 7 : p ? 2 : 5;
|
|
484
|
+
let E;
|
|
485
|
+
e[23] !== c || e[24] !== u || e[25] !== l ? (E = (_) => !!(c != null && c.includes(_) || l && C(_).isBefore(l, "day") || u && C(_).isAfter(u, "day")), e[23] = c, e[24] = u, e[25] = l, e[26] = E) : E = e[26];
|
|
486
|
+
const A = E;
|
|
487
|
+
let Y;
|
|
488
|
+
e[27] !== i || e[28] !== D || e[29] !== v ? (Y = (_) => {
|
|
489
|
+
if (Array.isArray(D))
|
|
490
|
+
if (v.start && !v.end) {
|
|
491
|
+
const N = C(v.start).isBefore(_);
|
|
492
|
+
i == null || i([N ? v.start : _, N ? _ : v.end]);
|
|
493
|
+
return;
|
|
494
|
+
} else {
|
|
495
|
+
i == null || i([_, ""]);
|
|
496
|
+
return;
|
|
497
|
+
}
|
|
498
|
+
else
|
|
499
|
+
i == null || i(_);
|
|
500
|
+
}, e[27] = i, e[28] = D, e[29] = v, e[30] = Y) : Y = e[30];
|
|
501
|
+
const R = Y, O = () => w.map((_) => {
|
|
502
|
+
const N = C(v.start).isSame(_, "D"), k = C(v.end).isSame(_, "D");
|
|
503
|
+
if (a) {
|
|
504
|
+
const I = {
|
|
505
|
+
date: _.format("YYYY-MM-DD"),
|
|
506
|
+
visible: o ? !0 : _.isSame(h, "month"),
|
|
507
|
+
className: s,
|
|
508
|
+
selected: N || k,
|
|
509
|
+
onClick: i,
|
|
510
|
+
disabled: A(_.format("YYYY-MM-DD")),
|
|
511
|
+
between: !!v.start && !!v.end && C(v.start).isBefore(_) && C(v.end).isAfter(_),
|
|
512
|
+
both: N && k,
|
|
513
|
+
start: !!v.start && !!v.end && N,
|
|
514
|
+
end: !!v.start && !!v.end && k,
|
|
515
|
+
columns: w
|
|
516
|
+
};
|
|
517
|
+
return S.createElement(a, {
|
|
518
|
+
key: _.toString(),
|
|
519
|
+
...I
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
return /* @__PURE__ */ $.jsx("button", { className: Ie("CalendarBodyColumn", s, {
|
|
523
|
+
today: _.isSame(C(), "day"),
|
|
524
|
+
between: v.start && v.end && C(v.start).isBefore(_) && C(v.end).isAfter(_),
|
|
525
|
+
both: N && k,
|
|
526
|
+
start: v.start && v.end && N,
|
|
527
|
+
end: v.start && v.end && k
|
|
528
|
+
}), disabled: A(_.format("YYYY-MM-DD")), style: {
|
|
529
|
+
visibility: o || _.isSame(h, "month") ? "visible" : "hidden"
|
|
530
|
+
}, onClick: R == null ? void 0 : R.bind(null, _.format("YYYY-MM-DD")), children: /* @__PURE__ */ $.jsx("span", { className: Ie("CalendarBodyColumnText", {
|
|
531
|
+
selected: N || k
|
|
532
|
+
}), children: _.format(_.isSame(h, "month") ? "D" : "M.D") }) }, _.toString());
|
|
533
|
+
});
|
|
534
|
+
M = n ? n({
|
|
535
|
+
columns: w,
|
|
536
|
+
className: r,
|
|
537
|
+
columnRender: O
|
|
538
|
+
}) : /* @__PURE__ */ $.jsx("div", { className: Ie("CalendarBody", r), style: {
|
|
539
|
+
gridTemplateColumns: `repeat(${b}, 1fr)`,
|
|
540
|
+
gridTemplateRows: `repeat(${Math.ceil(w.length / b)}, 1fr)`
|
|
541
|
+
}, children: O() }), e[5] = n, e[6] = g, e[7] = r, e[8] = a, e[9] = s, e[10] = h, e[11] = d, e[12] = c, e[13] = i, e[14] = o, e[15] = m, e[16] = f, e[17] = p, e[18] = u, e[19] = l, e[20] = D, e[21] = v, e[22] = M;
|
|
542
|
+
} else
|
|
543
|
+
M = e[22];
|
|
544
|
+
return M;
|
|
545
|
+
}, gr = (t) => {
|
|
546
|
+
const e = xe.c(15), {
|
|
547
|
+
as: n,
|
|
548
|
+
className: r,
|
|
549
|
+
disabled: o,
|
|
550
|
+
moveValue: s
|
|
551
|
+
} = t, {
|
|
552
|
+
calendarType: a,
|
|
553
|
+
addMonth: i,
|
|
554
|
+
addWeek: c,
|
|
555
|
+
maxDate: l,
|
|
556
|
+
currentMonthFirst: u
|
|
557
|
+
} = S.useContext(je);
|
|
558
|
+
let d;
|
|
559
|
+
e[0] !== i || e[1] !== c || e[2] !== a || e[3] !== s ? (d = () => {
|
|
560
|
+
a === "month" ? i(s) : c(s);
|
|
561
|
+
}, e[0] = i, e[1] = c, e[2] = a, e[3] = s, e[4] = d) : d = e[4];
|
|
562
|
+
const h = d, g = o || (l ? !!C(u).isSame(l, "month") : !1);
|
|
563
|
+
let p;
|
|
564
|
+
e[5] !== r ? (p = Ie("CalendarDirectionButton", "next", r), e[5] = r, e[6] = p) : p = e[6];
|
|
565
|
+
let f;
|
|
566
|
+
e[7] !== n || e[8] !== g ? (f = n ? n({
|
|
567
|
+
disabled: g
|
|
568
|
+
}) : /* @__PURE__ */ $.jsx(dn, { name: "GoNext", size: 24, color: g ? "var(--textDisabled, rgba(0, 0, 0, 0.2))" : "var(--textPrimary, #1c252e)" }), e[7] = n, e[8] = g, e[9] = f) : f = e[9];
|
|
569
|
+
let m;
|
|
570
|
+
return e[10] !== h || e[11] !== g || e[12] !== p || e[13] !== f ? (m = /* @__PURE__ */ $.jsx("button", { className: p, onClick: h, disabled: g, children: f }), e[10] = h, e[11] = g, e[12] = p, e[13] = f, e[14] = m) : m = e[14], m;
|
|
571
|
+
}, pr = (t) => {
|
|
572
|
+
const e = xe.c(14), {
|
|
573
|
+
as: n,
|
|
574
|
+
className: r,
|
|
575
|
+
disabled: o,
|
|
576
|
+
moveValue: s
|
|
577
|
+
} = t, {
|
|
578
|
+
calendarType: a,
|
|
579
|
+
subtractWeek: i,
|
|
580
|
+
subtractMonth: c,
|
|
581
|
+
minDate: l,
|
|
582
|
+
currentMonthFirst: u
|
|
583
|
+
} = S.useContext(je);
|
|
584
|
+
let d;
|
|
585
|
+
e[0] !== a || e[1] !== s || e[2] !== c || e[3] !== i ? (d = () => {
|
|
586
|
+
a === "month" ? c(s) : i(s);
|
|
587
|
+
}, e[0] = a, e[1] = s, e[2] = c, e[3] = i, e[4] = d) : d = e[4];
|
|
588
|
+
const h = d;
|
|
589
|
+
let g;
|
|
590
|
+
if (e[5] !== n || e[6] !== r || e[7] !== u || e[8] !== o || e[9] !== h || e[10] !== l) {
|
|
591
|
+
const p = o || (l ? C(u).isSame(l, "month") : !1);
|
|
592
|
+
let f;
|
|
593
|
+
e[12] !== r ? (f = Ie("CalendarDirectionButton", "prev", r), e[12] = r, e[13] = f) : f = e[13], g = /* @__PURE__ */ $.jsx("button", { className: f, onClick: h, disabled: p, children: n ? n({
|
|
594
|
+
disabled: p
|
|
595
|
+
}) : /* @__PURE__ */ $.jsx(dn, { name: "GoBefore", size: 24, color: p ? "var(--textDisabled, rgba(0, 0, 0, 0.2))" : "var(--textPrimary, #1c252e)" }) }), e[5] = n, e[6] = r, e[7] = u, e[8] = o, e[9] = h, e[10] = l, e[11] = g;
|
|
596
|
+
} else
|
|
597
|
+
g = e[11];
|
|
598
|
+
return g;
|
|
599
|
+
}, Dr = (t) => {
|
|
600
|
+
const {
|
|
601
|
+
as: e,
|
|
602
|
+
column: n = /* @__PURE__ */ $.jsx(yr, {}),
|
|
603
|
+
className: r
|
|
604
|
+
} = t, {
|
|
605
|
+
isWeekDay: o,
|
|
606
|
+
isWeekend: s,
|
|
607
|
+
isMondayStart: a,
|
|
608
|
+
lang: i
|
|
609
|
+
} = S.useContext(je), c = S.useMemo(() => {
|
|
610
|
+
const l = [];
|
|
611
|
+
if (!o && !s)
|
|
612
|
+
return [];
|
|
613
|
+
const u = o ? new Array(5).fill(0).map((h, g) => g + 1) : [], d = s ? new Array(2).fill(0).map((h, g) => (g + 6) % 7) : [];
|
|
614
|
+
return !o && s ? d : (a ? l.push(...u, ...d) : l.push(d[1], ...u, d[0]), l.filter((h) => h !== void 0));
|
|
615
|
+
}, [a, o, s]);
|
|
616
|
+
return e ? e({
|
|
617
|
+
columns: c.map((l) => Kt(l, i))
|
|
618
|
+
}) : /* @__PURE__ */ $.jsx("div", { className: Ie("CalendarDayTextList", r), style: {
|
|
619
|
+
gridTemplateColumns: `repeat(${c.length}, 1fr)`
|
|
620
|
+
}, children: c.map((l) => S.cloneElement(n, {
|
|
621
|
+
key: l,
|
|
622
|
+
children: Kt(l, i),
|
|
623
|
+
day: l
|
|
624
|
+
})) });
|
|
625
|
+
}, yr = (t) => {
|
|
626
|
+
const e = xe.c(7), {
|
|
627
|
+
children: n,
|
|
628
|
+
day: r,
|
|
629
|
+
className: o
|
|
630
|
+
} = t, s = r === 6, a = r === 0;
|
|
631
|
+
let i;
|
|
632
|
+
e[0] !== o || e[1] !== s || e[2] !== a ? (i = Ie("CalednarDayTextColumn", o, {
|
|
633
|
+
saturday: s,
|
|
634
|
+
sunday: a
|
|
635
|
+
}), e[0] = o, e[1] = s, e[2] = a, e[3] = i) : i = e[3];
|
|
636
|
+
let c;
|
|
637
|
+
return e[4] !== n || e[5] !== i ? (c = /* @__PURE__ */ $.jsx("p", { className: i, children: n }), e[4] = n, e[5] = i, e[6] = c) : c = e[6], c;
|
|
638
|
+
}, br = (t) => {
|
|
639
|
+
const e = xe.c(8), {
|
|
640
|
+
className: n,
|
|
641
|
+
format: r
|
|
642
|
+
} = t, o = r === void 0 ? "YYYY-MM" : r, {
|
|
643
|
+
currentDate: s
|
|
644
|
+
} = S.useContext(je);
|
|
645
|
+
let a;
|
|
646
|
+
e[0] !== n ? (a = Ie("CalendarHeaderDate", n), e[0] = n, e[1] = a) : a = e[1];
|
|
647
|
+
let i;
|
|
648
|
+
e[2] !== s || e[3] !== o ? (i = C(s).format(o), e[2] = s, e[3] = o, e[4] = i) : i = e[4];
|
|
649
|
+
let c;
|
|
650
|
+
return e[5] !== a || e[6] !== i ? (c = /* @__PURE__ */ $.jsx("p", { className: a, children: i }), e[5] = a, e[6] = i, e[7] = c) : c = e[7], c;
|
|
651
|
+
}, xr = (t) => {
|
|
652
|
+
const e = xe.c(12);
|
|
653
|
+
let n, r, o;
|
|
654
|
+
e[0] !== t ? ({
|
|
655
|
+
children: n,
|
|
656
|
+
className: r,
|
|
657
|
+
...o
|
|
658
|
+
} = t, e[0] = t, e[1] = n, e[2] = r, e[3] = o) : (n = e[1], r = e[2], o = e[3]);
|
|
659
|
+
let s;
|
|
660
|
+
e[4] !== r ? (s = Ie("CaledarRoot", r), e[4] = r, e[5] = s) : s = e[5];
|
|
661
|
+
let a;
|
|
662
|
+
e[6] !== n || e[7] !== s ? (a = /* @__PURE__ */ $.jsx("div", { className: s, children: n }), e[6] = n, e[7] = s, e[8] = a) : a = e[8];
|
|
663
|
+
let i;
|
|
664
|
+
return e[9] !== o || e[10] !== a ? (i = /* @__PURE__ */ $.jsx(cr, { ...o, children: a }), e[9] = o, e[10] = a, e[11] = i) : i = e[11], i;
|
|
665
|
+
}, Qs = {
|
|
666
|
+
Root: xr,
|
|
667
|
+
HeaderDate: br,
|
|
668
|
+
DayTextList: Dr,
|
|
669
|
+
Prev: pr,
|
|
670
|
+
Next: gr,
|
|
671
|
+
Body: vr
|
|
672
|
+
}, wr = "_Body_1px9a_2", Cr = "_ColumnWrap_1px9a_11", Mr = "_Column_1px9a_11", Sr = "_visible_1px9a_23", Tr = "_selected_1px9a_26", Yr = "_Text_1px9a_32", _r = {
|
|
673
|
+
Body: wr,
|
|
674
|
+
ColumnWrap: Cr,
|
|
675
|
+
Column: Mr,
|
|
676
|
+
visible: Sr,
|
|
677
|
+
selected: Tr,
|
|
678
|
+
Date: "_Date_1px9a_29",
|
|
679
|
+
Text: Yr
|
|
680
|
+
};
|
|
681
|
+
var Er = { exports: {} };
|
|
682
|
+
(function(t, e) {
|
|
683
|
+
(function(n, r) {
|
|
684
|
+
t.exports = r(C);
|
|
685
|
+
})(pt, function(n) {
|
|
686
|
+
function r(a) {
|
|
687
|
+
return a && typeof a == "object" && "default" in a ? a : { default: a };
|
|
688
|
+
}
|
|
689
|
+
var o = r(n), s = { name: "ko", weekdays: "일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"), weekdaysShort: "일_월_화_수_목_금_토".split("_"), weekdaysMin: "일_월_화_수_목_금_토".split("_"), months: "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"), monthsShort: "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"), ordinal: function(a) {
|
|
690
|
+
return a + "일";
|
|
691
|
+
}, formats: { LT: "A h:mm", LTS: "A h:mm:ss", L: "YYYY.MM.DD.", LL: "YYYY년 MMMM D일", LLL: "YYYY년 MMMM D일 A h:mm", LLLL: "YYYY년 MMMM D일 dddd A h:mm", l: "YYYY.MM.DD.", ll: "YYYY년 MMMM D일", lll: "YYYY년 MMMM D일 A h:mm", llll: "YYYY년 MMMM D일 dddd A h:mm" }, meridiem: function(a) {
|
|
692
|
+
return a < 12 ? "오전" : "오후";
|
|
693
|
+
}, relativeTime: { future: "%s 후", past: "%s 전", s: "몇 초", m: "1분", mm: "%d분", h: "한 시간", hh: "%d시간", d: "하루", dd: "%d일", M: "한 달", MM: "%d달", y: "일 년", yy: "%d년" } };
|
|
694
|
+
return o.default.locale(s, null, !0), s;
|
|
695
|
+
});
|
|
696
|
+
})(Er);
|
|
697
|
+
const Rr = {
|
|
698
|
+
columnWidth: 48,
|
|
699
|
+
isDragging: !1,
|
|
700
|
+
hasMoved: !1,
|
|
701
|
+
startX: 0,
|
|
702
|
+
setIsDragging: () => {
|
|
703
|
+
},
|
|
704
|
+
setHasMoved: () => {
|
|
705
|
+
},
|
|
706
|
+
setStartX: () => {
|
|
707
|
+
}
|
|
708
|
+
}, Wt = S.createContext(Rr);
|
|
709
|
+
C.locale("ko");
|
|
710
|
+
const ct = Ft.bind(_r), Ar = (t) => {
|
|
711
|
+
const e = xe.c(37), {
|
|
712
|
+
date: n,
|
|
713
|
+
visible: r,
|
|
714
|
+
className: o,
|
|
715
|
+
selected: s,
|
|
716
|
+
onClick: a,
|
|
717
|
+
disabled: i,
|
|
718
|
+
between: c,
|
|
719
|
+
both: l,
|
|
720
|
+
start: u,
|
|
721
|
+
end: d,
|
|
722
|
+
dateClassName: h,
|
|
723
|
+
textClassName: g
|
|
724
|
+
} = t, {
|
|
725
|
+
columnWidth: p,
|
|
726
|
+
isDragging: f,
|
|
727
|
+
hasMoved: m
|
|
728
|
+
} = S.use(Wt);
|
|
729
|
+
let D;
|
|
730
|
+
e[0] !== n || e[1] !== m || e[2] !== f || e[3] !== a ? (D = (_) => {
|
|
731
|
+
if (f || m) {
|
|
732
|
+
_.preventDefault();
|
|
733
|
+
return;
|
|
734
|
+
}
|
|
735
|
+
a == null || a(n);
|
|
736
|
+
}, e[0] = n, e[1] = m, e[2] = f, e[3] = a, e[4] = D) : D = e[4];
|
|
737
|
+
const y = D;
|
|
738
|
+
let v;
|
|
739
|
+
e[5] !== c || e[6] !== l || e[7] !== o || e[8] !== d || e[9] !== s || e[10] !== u || e[11] !== r ? (v = ct("Column", o, {
|
|
740
|
+
between: c,
|
|
741
|
+
both: l,
|
|
742
|
+
start: u,
|
|
743
|
+
end: d,
|
|
744
|
+
visible: r,
|
|
745
|
+
selected: s
|
|
746
|
+
}), e[5] = c, e[6] = l, e[7] = o, e[8] = d, e[9] = s, e[10] = u, e[11] = r, e[12] = v) : v = e[12];
|
|
747
|
+
const M = r || C(n).isSame(C(), "month") ? "visible" : "hidden", x = `${p}px`;
|
|
748
|
+
let T;
|
|
749
|
+
e[13] !== M || e[14] !== x ? (T = {
|
|
750
|
+
visibility: M,
|
|
751
|
+
width: x
|
|
752
|
+
}, e[13] = M, e[14] = x, e[15] = T) : T = e[15];
|
|
753
|
+
let w;
|
|
754
|
+
e[16] !== h ? (w = ct("Date", h), e[16] = h, e[17] = w) : w = e[17];
|
|
755
|
+
let b;
|
|
756
|
+
e[18] !== n ? (b = C(n).format("ddd"), e[18] = n, e[19] = b) : b = e[19];
|
|
757
|
+
let E;
|
|
758
|
+
e[20] !== w || e[21] !== b ? (E = /* @__PURE__ */ $.jsx("div", { className: w, children: b }), e[20] = w, e[21] = b, e[22] = E) : E = e[22];
|
|
759
|
+
let A;
|
|
760
|
+
e[23] !== g ? (A = ct("Text", g), e[23] = g, e[24] = A) : A = e[24];
|
|
761
|
+
let Y;
|
|
762
|
+
e[25] !== n ? (Y = C(n).format("D"), e[25] = n, e[26] = Y) : Y = e[26];
|
|
763
|
+
let R;
|
|
764
|
+
e[27] !== A || e[28] !== Y ? (R = /* @__PURE__ */ $.jsx("div", { className: A, children: Y }), e[27] = A, e[28] = Y, e[29] = R) : R = e[29];
|
|
765
|
+
let O;
|
|
766
|
+
return e[30] !== i || e[31] !== y || e[32] !== v || e[33] !== R || e[34] !== T || e[35] !== E ? (O = /* @__PURE__ */ $.jsxs("button", { className: v, disabled: i, style: T, onClick: y, children: [
|
|
767
|
+
E,
|
|
768
|
+
R
|
|
769
|
+
] }), e[30] = i, e[31] = y, e[32] = v, e[33] = R, e[34] = T, e[35] = E, e[36] = O) : O = e[36], O;
|
|
770
|
+
}, $r = (t) => {
|
|
771
|
+
const e = xe.c(53), {
|
|
772
|
+
className: n,
|
|
773
|
+
columnWrapClassName: r,
|
|
774
|
+
columnRender: o
|
|
775
|
+
} = t, {
|
|
776
|
+
isDragging: s,
|
|
777
|
+
startX: a,
|
|
778
|
+
setIsDragging: i,
|
|
779
|
+
setHasMoved: c,
|
|
780
|
+
setStartX: l,
|
|
781
|
+
bodyRef: u,
|
|
782
|
+
columnWrapRef: d
|
|
783
|
+
} = S.use(Wt), [h, g] = S.useState(0), [p, f] = S.useState(0), [m, D] = S.useState(0), [y, v] = S.useState(0), [M, x] = S.useState(0), [T, w] = S.useState(!1), b = S.useRef(null);
|
|
784
|
+
let E;
|
|
785
|
+
e[0] !== c || e[1] !== i || e[2] !== a ? (E = (B) => {
|
|
786
|
+
i(!0), c(!1);
|
|
787
|
+
const z = "touches" in B ? B.touches[0].clientX : B.clientX;
|
|
788
|
+
g(z), f(a), D(Date.now()), v(z), x(0), b.current && (cancelAnimationFrame(b.current), b.current = null);
|
|
789
|
+
}, e[0] = c, e[1] = i, e[2] = a, e[3] = E) : E = e[3];
|
|
790
|
+
const A = E;
|
|
791
|
+
let Y;
|
|
792
|
+
e[4] !== u || e[5] !== d || e[6] !== h || e[7] !== s || e[8] !== y || e[9] !== m || e[10] !== p || e[11] !== c || e[12] !== l ? (Y = (B) => {
|
|
793
|
+
if (!s || !(d != null && d.current) || !(u != null && u.current))
|
|
794
|
+
return;
|
|
795
|
+
const z = "touches" in B ? B.touches[0].clientX : B.clientX;
|
|
796
|
+
Math.abs(z - h) > 5 && c(!0);
|
|
797
|
+
const j = Date.now(), V = j - m;
|
|
798
|
+
V > 0 && x((z - y) / V), D(j), v(z);
|
|
799
|
+
const U = z - h, Z = p + U, re = d.current.scrollWidth - u.current.clientWidth;
|
|
800
|
+
if (Z > 0 || Z < -re) {
|
|
801
|
+
w(!0);
|
|
802
|
+
const ce = Z > 0 ? Z / 3 : -re + (Z + re) / 3;
|
|
803
|
+
l(ce);
|
|
804
|
+
} else
|
|
805
|
+
w(!1), l(Z);
|
|
806
|
+
}, e[4] = u, e[5] = d, e[6] = h, e[7] = s, e[8] = y, e[9] = m, e[10] = p, e[11] = c, e[12] = l, e[13] = Y) : Y = e[13];
|
|
807
|
+
const R = Y;
|
|
808
|
+
let O;
|
|
809
|
+
e[14] !== u || e[15] !== d || e[16] !== s || e[17] !== T || e[18] !== c || e[19] !== i || e[20] !== l || e[21] !== a || e[22] !== M ? (O = () => {
|
|
810
|
+
if (s) {
|
|
811
|
+
if (i(!1), T && (u != null && u.current) && (d != null && d.current)) {
|
|
812
|
+
const B = d.current.scrollWidth - u.current.clientWidth, z = a > 0 ? 0 : -B;
|
|
813
|
+
let j = a;
|
|
814
|
+
const V = () => {
|
|
815
|
+
const U = z - j;
|
|
816
|
+
if (Math.abs(U) < 0.5) {
|
|
817
|
+
l(z), w(!1), b.current && (cancelAnimationFrame(b.current), b.current = null);
|
|
818
|
+
return;
|
|
819
|
+
}
|
|
820
|
+
j = j + U * 0.2, l(j), b.current = requestAnimationFrame(V);
|
|
821
|
+
};
|
|
822
|
+
b.current && cancelAnimationFrame(b.current), b.current = requestAnimationFrame(V);
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
825
|
+
if (Math.abs(M) > 0.1) {
|
|
826
|
+
let B = M * 30, z = a;
|
|
827
|
+
const j = () => {
|
|
828
|
+
var Z, re;
|
|
829
|
+
if (Math.abs(B) < 0.1) {
|
|
830
|
+
b.current && (cancelAnimationFrame(b.current), b.current = null);
|
|
831
|
+
return;
|
|
832
|
+
}
|
|
833
|
+
B = B * 0.8, z = z + B;
|
|
834
|
+
const V = (((Z = d == null ? void 0 : d.current) == null ? void 0 : Z.scrollWidth) ?? 0) - (((re = u == null ? void 0 : u.current) == null ? void 0 : re.clientWidth) ?? 0), U = Math.min(0, Math.max(-V, z));
|
|
835
|
+
U !== z && (B = 0), z = U, l(z), b.current = requestAnimationFrame(j);
|
|
836
|
+
};
|
|
837
|
+
b.current && cancelAnimationFrame(b.current), b.current = requestAnimationFrame(j);
|
|
838
|
+
}
|
|
839
|
+
setTimeout(() => {
|
|
840
|
+
c(!1);
|
|
841
|
+
}, 0);
|
|
842
|
+
}
|
|
843
|
+
}, e[14] = u, e[15] = d, e[16] = s, e[17] = T, e[18] = c, e[19] = i, e[20] = l, e[21] = a, e[22] = M, e[23] = O) : O = e[23];
|
|
844
|
+
const _ = O;
|
|
845
|
+
let N, k;
|
|
846
|
+
e[24] !== _ || e[25] !== R || e[26] !== s ? (N = () => {
|
|
847
|
+
const B = (j) => {
|
|
848
|
+
R(j);
|
|
849
|
+
}, z = () => {
|
|
850
|
+
_();
|
|
851
|
+
};
|
|
852
|
+
return s ? (window.addEventListener("mousemove", B), window.addEventListener("mouseup", z)) : (window.removeEventListener("mousemove", B), window.removeEventListener("mouseup", z)), () => {
|
|
853
|
+
window.removeEventListener("mousemove", B), window.removeEventListener("mouseup", z);
|
|
854
|
+
};
|
|
855
|
+
}, k = [s, R, _], e[24] = _, e[25] = R, e[26] = s, e[27] = N, e[28] = k) : (N = e[27], k = e[28]), S.useEffect(N, k);
|
|
856
|
+
let I, X;
|
|
857
|
+
e[29] === Symbol.for("react.memo_cache_sentinel") ? (I = () => () => {
|
|
858
|
+
b.current && (cancelAnimationFrame(b.current), b.current = null);
|
|
859
|
+
}, X = [], e[29] = I, e[30] = X) : (I = e[29], X = e[30]), S.useEffect(I, X);
|
|
860
|
+
let F;
|
|
861
|
+
e[31] !== n ? (F = ct("Body", n), e[31] = n, e[32] = F) : F = e[32];
|
|
862
|
+
let q;
|
|
863
|
+
e[33] !== r ? (q = ct("ColumnWrap", r), e[33] = r, e[34] = q) : q = e[34];
|
|
864
|
+
const L = `translateX(${a}px)`, te = a === 0 && !s ? "transform 0.05s linear" : "none";
|
|
865
|
+
let P;
|
|
866
|
+
e[35] !== te || e[36] !== L ? (P = {
|
|
867
|
+
transform: L,
|
|
868
|
+
transition: te
|
|
869
|
+
}, e[35] = te, e[36] = L, e[37] = P) : P = e[37];
|
|
870
|
+
let me;
|
|
871
|
+
e[38] !== o || e[39] !== a ? (me = a !== void 0 ? o() : null, e[38] = o, e[39] = a, e[40] = me) : me = e[40];
|
|
872
|
+
let ge;
|
|
873
|
+
e[41] !== d || e[42] !== P || e[43] !== me || e[44] !== q ? (ge = /* @__PURE__ */ $.jsx("div", { ref: d, className: q, style: P, children: me }), e[41] = d, e[42] = P, e[43] = me, e[44] = q, e[45] = ge) : ge = e[45];
|
|
874
|
+
let ne;
|
|
875
|
+
return e[46] !== u || e[47] !== _ || e[48] !== R || e[49] !== A || e[50] !== ge || e[51] !== F ? (ne = /* @__PURE__ */ $.jsx("div", { ref: u, className: F, onMouseDown: A, onTouchStart: A, onTouchMove: R, onTouchEnd: _, children: ge }), e[46] = u, e[47] = _, e[48] = R, e[49] = A, e[50] = ge, e[51] = F, e[52] = ne) : ne = e[52], ne;
|
|
876
|
+
}, Or = (t) => {
|
|
877
|
+
const e = xe.c(18), {
|
|
878
|
+
children: n,
|
|
879
|
+
columnWidth: r
|
|
880
|
+
} = t, o = r === void 0 ? 48 : r, {
|
|
881
|
+
currentDate: s
|
|
882
|
+
} = S.use(je), [a, i] = S.useState(!1), [c, l] = S.useState(!1), [u, d] = S.useState(0), [h, g] = S.useState(!0), p = S.useRef(null), f = S.useRef(null), m = S.useRef(null);
|
|
883
|
+
let D;
|
|
884
|
+
e[0] !== h || e[1] !== u ? (D = {
|
|
885
|
+
startX: u,
|
|
886
|
+
isFirstRender: h
|
|
887
|
+
}, e[0] = h, e[1] = u, e[2] = D) : D = e[2];
|
|
888
|
+
const y = S.useRef(D);
|
|
889
|
+
let v;
|
|
890
|
+
e[3] !== h || e[4] !== u ? (v = () => {
|
|
891
|
+
y.current = {
|
|
892
|
+
startX: u,
|
|
893
|
+
isFirstRender: h
|
|
894
|
+
};
|
|
895
|
+
}, e[3] = h, e[4] = u, e[5] = v) : v = e[5], S.useEffect(v);
|
|
896
|
+
let M, x;
|
|
897
|
+
e[6] !== o || e[7] !== s ? (M = () => {
|
|
898
|
+
const b = C(s).date() - 1;
|
|
899
|
+
if (b !== -1 && (p != null && p.current) && (f != null && f.current) && o) {
|
|
900
|
+
const E = p.current.offsetWidth, A = E / 2, Y = b * o, R = A - Y - o / 2, O = f.current.scrollWidth - E, _ = Math.min(0, Math.max(-O, R));
|
|
901
|
+
if (y.current.isFirstRender) {
|
|
902
|
+
d(_), g(!1);
|
|
903
|
+
return;
|
|
904
|
+
}
|
|
905
|
+
const N = y.current.startX, k = _ - N, I = performance.now(), X = (F) => {
|
|
906
|
+
const q = F - I, L = Math.min(q / 250, 1), te = N + k * (L * (2 - L));
|
|
907
|
+
d(te), L < 1 ? m.current = requestAnimationFrame(X) : m.current && (cancelAnimationFrame(m.current), m.current = null);
|
|
908
|
+
};
|
|
909
|
+
m.current && (cancelAnimationFrame(m.current), m.current = null), m.current = requestAnimationFrame(X);
|
|
910
|
+
}
|
|
911
|
+
return () => {
|
|
912
|
+
m.current && (cancelAnimationFrame(m.current), m.current = null);
|
|
913
|
+
};
|
|
914
|
+
}, x = [s, o, g, d], e[6] = o, e[7] = s, e[8] = M, e[9] = x) : (M = e[8], x = e[9]), S.useEffect(M, x);
|
|
915
|
+
let T;
|
|
916
|
+
e[10] !== o || e[11] !== c || e[12] !== a || e[13] !== u ? (T = {
|
|
917
|
+
columnWidth: o,
|
|
918
|
+
isDragging: a,
|
|
919
|
+
hasMoved: c,
|
|
920
|
+
startX: u,
|
|
921
|
+
setIsDragging: i,
|
|
922
|
+
setHasMoved: l,
|
|
923
|
+
setStartX: d,
|
|
924
|
+
bodyRef: p,
|
|
925
|
+
columnWrapRef: f
|
|
926
|
+
}, e[10] = o, e[11] = c, e[12] = a, e[13] = u, e[14] = T) : T = e[14];
|
|
927
|
+
let w;
|
|
928
|
+
return e[15] !== n || e[16] !== T ? (w = /* @__PURE__ */ $.jsx(Wt.Provider, { value: T, children: n }), e[15] = n, e[16] = T, e[17] = w) : w = e[17], w;
|
|
929
|
+
}, ei = {
|
|
930
|
+
Column: Ar,
|
|
931
|
+
Body: $r,
|
|
932
|
+
Root: Or
|
|
933
|
+
}, Nr = "_WeeklyCalendarRoot_15h4n_3", Lr = "_CalendarHeader_15h4n_12", kr = "_Empty_15h4n_16", Ir = "_CalendarHeaderContent_15h4n_19", Hr = "_CalendarBody_15h4n_24", zr = "_StandardTime_15h4n_30", Pr = "_DateCellRow_15h4n_36", Br = "_DateCell_15h4n_36", jr = "_today_15h4n_50", Fr = "_DayText_15h4n_53", Wr = "_TimelineWrapper_15h4n_61", Xr = "_noLines_15h4n_69", Vr = "_Timeline_15h4n_61", Ur = "_TimeText_15h4n_78", Zr = "_DateColumnRow_15h4n_84", qr = "_DateColumnRowInner_15h4n_90", Gr = "_DateColumn_15h4n_84", Kr = "_DateColumnInner_15h4n_107", Jr = "_TodayIndicator_15h4n_112", Qr = "_TimeCriteria_15h4n_131", eo = "_TimeCriteriaCell_15h4n_134", to = "_EventItem_15h4n_137", no = "_dragging_15h4n_146", ro = "_allowCreate_15h4n_149", oo = "_draggable_15h4n_155", so = {
|
|
934
|
+
WeeklyCalendarRoot: Nr,
|
|
935
|
+
CalendarHeader: Lr,
|
|
936
|
+
Empty: kr,
|
|
937
|
+
CalendarHeaderContent: Ir,
|
|
938
|
+
CalendarBody: Hr,
|
|
939
|
+
StandardTime: zr,
|
|
940
|
+
DateCellRow: Pr,
|
|
941
|
+
DateCell: Br,
|
|
942
|
+
today: jr,
|
|
943
|
+
DayText: Fr,
|
|
944
|
+
Date: "_Date_15h4n_36",
|
|
945
|
+
TimelineWrapper: Wr,
|
|
946
|
+
noLines: Xr,
|
|
947
|
+
Timeline: Vr,
|
|
948
|
+
TimeText: Ur,
|
|
949
|
+
DateColumnRow: Zr,
|
|
950
|
+
DateColumnRowInner: qr,
|
|
951
|
+
DateColumn: Gr,
|
|
952
|
+
DateColumnInner: Kr,
|
|
953
|
+
TodayIndicator: Jr,
|
|
954
|
+
TimeCriteria: Qr,
|
|
955
|
+
TimeCriteriaCell: eo,
|
|
956
|
+
EventItem: to,
|
|
957
|
+
dragging: no,
|
|
958
|
+
allowCreate: ro,
|
|
959
|
+
draggable: oo
|
|
960
|
+
}, _t = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
961
|
+
function tt(t) {
|
|
962
|
+
const e = Object.prototype.toString.call(t);
|
|
963
|
+
return e === "[object Window]" || // In Electron context the Window object serializes to [object global]
|
|
964
|
+
e === "[object global]";
|
|
965
|
+
}
|
|
966
|
+
function Xt(t) {
|
|
967
|
+
return "nodeType" in t;
|
|
968
|
+
}
|
|
969
|
+
function we(t) {
|
|
970
|
+
var e, n;
|
|
971
|
+
return t ? tt(t) ? t : Xt(t) && (e = (n = t.ownerDocument) == null ? void 0 : n.defaultView) != null ? e : window : window;
|
|
972
|
+
}
|
|
973
|
+
function Vt(t) {
|
|
974
|
+
const {
|
|
975
|
+
Document: e
|
|
976
|
+
} = we(t);
|
|
977
|
+
return t instanceof e;
|
|
978
|
+
}
|
|
979
|
+
function Dt(t) {
|
|
980
|
+
return tt(t) ? !1 : t instanceof we(t).HTMLElement;
|
|
981
|
+
}
|
|
982
|
+
function pn(t) {
|
|
983
|
+
return t instanceof we(t).SVGElement;
|
|
984
|
+
}
|
|
985
|
+
function nt(t) {
|
|
986
|
+
return t ? tt(t) ? t.document : Xt(t) ? Vt(t) ? t : Dt(t) || pn(t) ? t.ownerDocument : document : document : document;
|
|
987
|
+
}
|
|
988
|
+
const Fe = _t ? In : ee;
|
|
989
|
+
function Ut(t) {
|
|
990
|
+
const e = J(t);
|
|
991
|
+
return Fe(() => {
|
|
992
|
+
e.current = t;
|
|
993
|
+
}), ve(function() {
|
|
994
|
+
for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
|
|
995
|
+
r[o] = arguments[o];
|
|
996
|
+
return e.current == null ? void 0 : e.current(...r);
|
|
997
|
+
}, []);
|
|
998
|
+
}
|
|
999
|
+
function io() {
|
|
1000
|
+
const t = J(null), e = ve((r, o) => {
|
|
1001
|
+
t.current = setInterval(r, o);
|
|
1002
|
+
}, []), n = ve(() => {
|
|
1003
|
+
t.current !== null && (clearInterval(t.current), t.current = null);
|
|
1004
|
+
}, []);
|
|
1005
|
+
return [e, n];
|
|
1006
|
+
}
|
|
1007
|
+
function mt(t, e) {
|
|
1008
|
+
e === void 0 && (e = [t]);
|
|
1009
|
+
const n = J(t);
|
|
1010
|
+
return Fe(() => {
|
|
1011
|
+
n.current !== t && (n.current = t);
|
|
1012
|
+
}, e), n;
|
|
1013
|
+
}
|
|
1014
|
+
function yt(t, e) {
|
|
1015
|
+
const n = J();
|
|
1016
|
+
return ie(
|
|
1017
|
+
() => {
|
|
1018
|
+
const r = t(n.current);
|
|
1019
|
+
return n.current = r, r;
|
|
1020
|
+
},
|
|
1021
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1022
|
+
[...e]
|
|
1023
|
+
);
|
|
1024
|
+
}
|
|
1025
|
+
function Ct(t) {
|
|
1026
|
+
const e = Ut(t), n = J(null), r = ve(
|
|
1027
|
+
(o) => {
|
|
1028
|
+
o !== n.current && (e == null || e(o, n.current)), n.current = o;
|
|
1029
|
+
},
|
|
1030
|
+
//eslint-disable-next-line
|
|
1031
|
+
[]
|
|
1032
|
+
);
|
|
1033
|
+
return [n, r];
|
|
1034
|
+
}
|
|
1035
|
+
function Ht(t) {
|
|
1036
|
+
const e = J();
|
|
1037
|
+
return ee(() => {
|
|
1038
|
+
e.current = t;
|
|
1039
|
+
}, [t]), e.current;
|
|
1040
|
+
}
|
|
1041
|
+
let Nt = {};
|
|
1042
|
+
function Et(t, e) {
|
|
1043
|
+
return ie(() => {
|
|
1044
|
+
if (e)
|
|
1045
|
+
return e;
|
|
1046
|
+
const n = Nt[t] == null ? 0 : Nt[t] + 1;
|
|
1047
|
+
return Nt[t] = n, t + "-" + n;
|
|
1048
|
+
}, [t, e]);
|
|
1049
|
+
}
|
|
1050
|
+
function Dn(t) {
|
|
1051
|
+
return function(e) {
|
|
1052
|
+
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
1053
|
+
r[o - 1] = arguments[o];
|
|
1054
|
+
return r.reduce((s, a) => {
|
|
1055
|
+
const i = Object.entries(a);
|
|
1056
|
+
for (const [c, l] of i) {
|
|
1057
|
+
const u = s[c];
|
|
1058
|
+
u != null && (s[c] = u + t * l);
|
|
1059
|
+
}
|
|
1060
|
+
return s;
|
|
1061
|
+
}, {
|
|
1062
|
+
...e
|
|
1063
|
+
});
|
|
1064
|
+
};
|
|
1065
|
+
}
|
|
1066
|
+
const et = /* @__PURE__ */ Dn(1), Mt = /* @__PURE__ */ Dn(-1);
|
|
1067
|
+
function ao(t) {
|
|
1068
|
+
return "clientX" in t && "clientY" in t;
|
|
1069
|
+
}
|
|
1070
|
+
function yn(t) {
|
|
1071
|
+
if (!t)
|
|
1072
|
+
return !1;
|
|
1073
|
+
const {
|
|
1074
|
+
KeyboardEvent: e
|
|
1075
|
+
} = we(t.target);
|
|
1076
|
+
return e && t instanceof e;
|
|
1077
|
+
}
|
|
1078
|
+
function lo(t) {
|
|
1079
|
+
if (!t)
|
|
1080
|
+
return !1;
|
|
1081
|
+
const {
|
|
1082
|
+
TouchEvent: e
|
|
1083
|
+
} = we(t.target);
|
|
1084
|
+
return e && t instanceof e;
|
|
1085
|
+
}
|
|
1086
|
+
function zt(t) {
|
|
1087
|
+
if (lo(t)) {
|
|
1088
|
+
if (t.touches && t.touches.length) {
|
|
1089
|
+
const {
|
|
1090
|
+
clientX: e,
|
|
1091
|
+
clientY: n
|
|
1092
|
+
} = t.touches[0];
|
|
1093
|
+
return {
|
|
1094
|
+
x: e,
|
|
1095
|
+
y: n
|
|
1096
|
+
};
|
|
1097
|
+
} else if (t.changedTouches && t.changedTouches.length) {
|
|
1098
|
+
const {
|
|
1099
|
+
clientX: e,
|
|
1100
|
+
clientY: n
|
|
1101
|
+
} = t.changedTouches[0];
|
|
1102
|
+
return {
|
|
1103
|
+
x: e,
|
|
1104
|
+
y: n
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
return ao(t) ? {
|
|
1109
|
+
x: t.clientX,
|
|
1110
|
+
y: t.clientY
|
|
1111
|
+
} : null;
|
|
1112
|
+
}
|
|
1113
|
+
const Jt = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
1114
|
+
function co(t) {
|
|
1115
|
+
return t.matches(Jt) ? t : t.querySelector(Jt);
|
|
1116
|
+
}
|
|
1117
|
+
const uo = {
|
|
1118
|
+
display: "none"
|
|
1119
|
+
};
|
|
1120
|
+
function fo(t) {
|
|
1121
|
+
let {
|
|
1122
|
+
id: e,
|
|
1123
|
+
value: n
|
|
1124
|
+
} = t;
|
|
1125
|
+
return S.createElement("div", {
|
|
1126
|
+
id: e,
|
|
1127
|
+
style: uo
|
|
1128
|
+
}, n);
|
|
1129
|
+
}
|
|
1130
|
+
function ho(t) {
|
|
1131
|
+
let {
|
|
1132
|
+
id: e,
|
|
1133
|
+
announcement: n,
|
|
1134
|
+
ariaLiveType: r = "assertive"
|
|
1135
|
+
} = t;
|
|
1136
|
+
const o = {
|
|
1137
|
+
position: "fixed",
|
|
1138
|
+
top: 0,
|
|
1139
|
+
left: 0,
|
|
1140
|
+
width: 1,
|
|
1141
|
+
height: 1,
|
|
1142
|
+
margin: -1,
|
|
1143
|
+
border: 0,
|
|
1144
|
+
padding: 0,
|
|
1145
|
+
overflow: "hidden",
|
|
1146
|
+
clip: "rect(0 0 0 0)",
|
|
1147
|
+
clipPath: "inset(100%)",
|
|
1148
|
+
whiteSpace: "nowrap"
|
|
1149
|
+
};
|
|
1150
|
+
return S.createElement("div", {
|
|
1151
|
+
id: e,
|
|
1152
|
+
style: o,
|
|
1153
|
+
role: "status",
|
|
1154
|
+
"aria-live": r,
|
|
1155
|
+
"aria-atomic": !0
|
|
1156
|
+
}, n);
|
|
1157
|
+
}
|
|
1158
|
+
function mo() {
|
|
1159
|
+
const [t, e] = _e("");
|
|
1160
|
+
return {
|
|
1161
|
+
announce: ve((r) => {
|
|
1162
|
+
r != null && e(r);
|
|
1163
|
+
}, []),
|
|
1164
|
+
announcement: t
|
|
1165
|
+
};
|
|
1166
|
+
}
|
|
1167
|
+
const bn = /* @__PURE__ */ gt(null);
|
|
1168
|
+
function vo(t) {
|
|
1169
|
+
const e = ht(bn);
|
|
1170
|
+
ee(() => {
|
|
1171
|
+
if (!e)
|
|
1172
|
+
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
1173
|
+
return e(t);
|
|
1174
|
+
}, [t, e]);
|
|
1175
|
+
}
|
|
1176
|
+
function go() {
|
|
1177
|
+
const [t] = _e(() => /* @__PURE__ */ new Set()), e = ve((r) => (t.add(r), () => t.delete(r)), [t]);
|
|
1178
|
+
return [ve((r) => {
|
|
1179
|
+
let {
|
|
1180
|
+
type: o,
|
|
1181
|
+
event: s
|
|
1182
|
+
} = r;
|
|
1183
|
+
t.forEach((a) => {
|
|
1184
|
+
var i;
|
|
1185
|
+
return (i = a[o]) == null ? void 0 : i.call(a, s);
|
|
1186
|
+
});
|
|
1187
|
+
}, [t]), e];
|
|
1188
|
+
}
|
|
1189
|
+
const po = {
|
|
1190
|
+
draggable: `
|
|
1191
|
+
To pick up a draggable item, press the space bar.
|
|
1192
|
+
While dragging, use the arrow keys to move the item.
|
|
1193
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
1194
|
+
`
|
|
1195
|
+
}, Do = {
|
|
1196
|
+
onDragStart(t) {
|
|
1197
|
+
let {
|
|
1198
|
+
active: e
|
|
1199
|
+
} = t;
|
|
1200
|
+
return "Picked up draggable item " + e.id + ".";
|
|
1201
|
+
},
|
|
1202
|
+
onDragOver(t) {
|
|
1203
|
+
let {
|
|
1204
|
+
active: e,
|
|
1205
|
+
over: n
|
|
1206
|
+
} = t;
|
|
1207
|
+
return n ? "Draggable item " + e.id + " was moved over droppable area " + n.id + "." : "Draggable item " + e.id + " is no longer over a droppable area.";
|
|
1208
|
+
},
|
|
1209
|
+
onDragEnd(t) {
|
|
1210
|
+
let {
|
|
1211
|
+
active: e,
|
|
1212
|
+
over: n
|
|
1213
|
+
} = t;
|
|
1214
|
+
return n ? "Draggable item " + e.id + " was dropped over droppable area " + n.id : "Draggable item " + e.id + " was dropped.";
|
|
1215
|
+
},
|
|
1216
|
+
onDragCancel(t) {
|
|
1217
|
+
let {
|
|
1218
|
+
active: e
|
|
1219
|
+
} = t;
|
|
1220
|
+
return "Dragging was cancelled. Draggable item " + e.id + " was dropped.";
|
|
1221
|
+
}
|
|
1222
|
+
};
|
|
1223
|
+
function yo(t) {
|
|
1224
|
+
let {
|
|
1225
|
+
announcements: e = Do,
|
|
1226
|
+
container: n,
|
|
1227
|
+
hiddenTextDescribedById: r,
|
|
1228
|
+
screenReaderInstructions: o = po
|
|
1229
|
+
} = t;
|
|
1230
|
+
const {
|
|
1231
|
+
announce: s,
|
|
1232
|
+
announcement: a
|
|
1233
|
+
} = mo(), i = Et("DndLiveRegion"), [c, l] = _e(!1);
|
|
1234
|
+
if (ee(() => {
|
|
1235
|
+
l(!0);
|
|
1236
|
+
}, []), vo(ie(() => ({
|
|
1237
|
+
onDragStart(d) {
|
|
1238
|
+
let {
|
|
1239
|
+
active: h
|
|
1240
|
+
} = d;
|
|
1241
|
+
s(e.onDragStart({
|
|
1242
|
+
active: h
|
|
1243
|
+
}));
|
|
1244
|
+
},
|
|
1245
|
+
onDragMove(d) {
|
|
1246
|
+
let {
|
|
1247
|
+
active: h,
|
|
1248
|
+
over: g
|
|
1249
|
+
} = d;
|
|
1250
|
+
e.onDragMove && s(e.onDragMove({
|
|
1251
|
+
active: h,
|
|
1252
|
+
over: g
|
|
1253
|
+
}));
|
|
1254
|
+
},
|
|
1255
|
+
onDragOver(d) {
|
|
1256
|
+
let {
|
|
1257
|
+
active: h,
|
|
1258
|
+
over: g
|
|
1259
|
+
} = d;
|
|
1260
|
+
s(e.onDragOver({
|
|
1261
|
+
active: h,
|
|
1262
|
+
over: g
|
|
1263
|
+
}));
|
|
1264
|
+
},
|
|
1265
|
+
onDragEnd(d) {
|
|
1266
|
+
let {
|
|
1267
|
+
active: h,
|
|
1268
|
+
over: g
|
|
1269
|
+
} = d;
|
|
1270
|
+
s(e.onDragEnd({
|
|
1271
|
+
active: h,
|
|
1272
|
+
over: g
|
|
1273
|
+
}));
|
|
1274
|
+
},
|
|
1275
|
+
onDragCancel(d) {
|
|
1276
|
+
let {
|
|
1277
|
+
active: h,
|
|
1278
|
+
over: g
|
|
1279
|
+
} = d;
|
|
1280
|
+
s(e.onDragCancel({
|
|
1281
|
+
active: h,
|
|
1282
|
+
over: g
|
|
1283
|
+
}));
|
|
1284
|
+
}
|
|
1285
|
+
}), [s, e])), !c)
|
|
1286
|
+
return null;
|
|
1287
|
+
const u = S.createElement(S.Fragment, null, S.createElement(fo, {
|
|
1288
|
+
id: r,
|
|
1289
|
+
value: o.draggable
|
|
1290
|
+
}), S.createElement(ho, {
|
|
1291
|
+
id: i,
|
|
1292
|
+
announcement: a
|
|
1293
|
+
}));
|
|
1294
|
+
return n ? Pn(u, n) : u;
|
|
1295
|
+
}
|
|
1296
|
+
var se;
|
|
1297
|
+
(function(t) {
|
|
1298
|
+
t.DragStart = "dragStart", t.DragMove = "dragMove", t.DragEnd = "dragEnd", t.DragCancel = "dragCancel", t.DragOver = "dragOver", t.RegisterDroppable = "registerDroppable", t.SetDroppableDisabled = "setDroppableDisabled", t.UnregisterDroppable = "unregisterDroppable";
|
|
1299
|
+
})(se || (se = {}));
|
|
1300
|
+
function St() {
|
|
1301
|
+
}
|
|
1302
|
+
const Re = /* @__PURE__ */ Object.freeze({
|
|
1303
|
+
x: 0,
|
|
1304
|
+
y: 0
|
|
1305
|
+
});
|
|
1306
|
+
function bo(t, e) {
|
|
1307
|
+
let {
|
|
1308
|
+
data: {
|
|
1309
|
+
value: n
|
|
1310
|
+
}
|
|
1311
|
+
} = t, {
|
|
1312
|
+
data: {
|
|
1313
|
+
value: r
|
|
1314
|
+
}
|
|
1315
|
+
} = e;
|
|
1316
|
+
return r - n;
|
|
1317
|
+
}
|
|
1318
|
+
function xo(t, e) {
|
|
1319
|
+
if (!t || t.length === 0)
|
|
1320
|
+
return null;
|
|
1321
|
+
const [n] = t;
|
|
1322
|
+
return n[e];
|
|
1323
|
+
}
|
|
1324
|
+
function wo(t, e) {
|
|
1325
|
+
const n = Math.max(e.top, t.top), r = Math.max(e.left, t.left), o = Math.min(e.left + e.width, t.left + t.width), s = Math.min(e.top + e.height, t.top + t.height), a = o - r, i = s - n;
|
|
1326
|
+
if (r < o && n < s) {
|
|
1327
|
+
const c = e.width * e.height, l = t.width * t.height, u = a * i, d = u / (c + l - u);
|
|
1328
|
+
return Number(d.toFixed(4));
|
|
1329
|
+
}
|
|
1330
|
+
return 0;
|
|
1331
|
+
}
|
|
1332
|
+
const Co = (t) => {
|
|
1333
|
+
let {
|
|
1334
|
+
collisionRect: e,
|
|
1335
|
+
droppableRects: n,
|
|
1336
|
+
droppableContainers: r
|
|
1337
|
+
} = t;
|
|
1338
|
+
const o = [];
|
|
1339
|
+
for (const s of r) {
|
|
1340
|
+
const {
|
|
1341
|
+
id: a
|
|
1342
|
+
} = s, i = n.get(a);
|
|
1343
|
+
if (i) {
|
|
1344
|
+
const c = wo(i, e);
|
|
1345
|
+
c > 0 && o.push({
|
|
1346
|
+
id: a,
|
|
1347
|
+
data: {
|
|
1348
|
+
droppableContainer: s,
|
|
1349
|
+
value: c
|
|
1350
|
+
}
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
return o.sort(bo);
|
|
1355
|
+
};
|
|
1356
|
+
function Mo(t, e, n) {
|
|
1357
|
+
return {
|
|
1358
|
+
...t,
|
|
1359
|
+
scaleX: e && n ? e.width / n.width : 1,
|
|
1360
|
+
scaleY: e && n ? e.height / n.height : 1
|
|
1361
|
+
};
|
|
1362
|
+
}
|
|
1363
|
+
function xn(t, e) {
|
|
1364
|
+
return t && e ? {
|
|
1365
|
+
x: t.left - e.left,
|
|
1366
|
+
y: t.top - e.top
|
|
1367
|
+
} : Re;
|
|
1368
|
+
}
|
|
1369
|
+
function So(t) {
|
|
1370
|
+
return function(n) {
|
|
1371
|
+
for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
|
|
1372
|
+
o[s - 1] = arguments[s];
|
|
1373
|
+
return o.reduce((a, i) => ({
|
|
1374
|
+
...a,
|
|
1375
|
+
top: a.top + t * i.y,
|
|
1376
|
+
bottom: a.bottom + t * i.y,
|
|
1377
|
+
left: a.left + t * i.x,
|
|
1378
|
+
right: a.right + t * i.x
|
|
1379
|
+
}), {
|
|
1380
|
+
...n
|
|
1381
|
+
});
|
|
1382
|
+
};
|
|
1383
|
+
}
|
|
1384
|
+
const To = /* @__PURE__ */ So(1);
|
|
1385
|
+
function Yo(t) {
|
|
1386
|
+
if (t.startsWith("matrix3d(")) {
|
|
1387
|
+
const e = t.slice(9, -1).split(/, /);
|
|
1388
|
+
return {
|
|
1389
|
+
x: +e[12],
|
|
1390
|
+
y: +e[13],
|
|
1391
|
+
scaleX: +e[0],
|
|
1392
|
+
scaleY: +e[5]
|
|
1393
|
+
};
|
|
1394
|
+
} else if (t.startsWith("matrix(")) {
|
|
1395
|
+
const e = t.slice(7, -1).split(/, /);
|
|
1396
|
+
return {
|
|
1397
|
+
x: +e[4],
|
|
1398
|
+
y: +e[5],
|
|
1399
|
+
scaleX: +e[0],
|
|
1400
|
+
scaleY: +e[3]
|
|
1401
|
+
};
|
|
1402
|
+
}
|
|
1403
|
+
return null;
|
|
1404
|
+
}
|
|
1405
|
+
function _o(t, e, n) {
|
|
1406
|
+
const r = Yo(e);
|
|
1407
|
+
if (!r)
|
|
1408
|
+
return t;
|
|
1409
|
+
const {
|
|
1410
|
+
scaleX: o,
|
|
1411
|
+
scaleY: s,
|
|
1412
|
+
x: a,
|
|
1413
|
+
y: i
|
|
1414
|
+
} = r, c = t.left - a - (1 - o) * parseFloat(n), l = t.top - i - (1 - s) * parseFloat(n.slice(n.indexOf(" ") + 1)), u = o ? t.width / o : t.width, d = s ? t.height / s : t.height;
|
|
1415
|
+
return {
|
|
1416
|
+
width: u,
|
|
1417
|
+
height: d,
|
|
1418
|
+
top: l,
|
|
1419
|
+
right: c + u,
|
|
1420
|
+
bottom: l + d,
|
|
1421
|
+
left: c
|
|
1422
|
+
};
|
|
1423
|
+
}
|
|
1424
|
+
const Eo = {
|
|
1425
|
+
ignoreTransform: !1
|
|
1426
|
+
};
|
|
1427
|
+
function bt(t, e) {
|
|
1428
|
+
e === void 0 && (e = Eo);
|
|
1429
|
+
let n = t.getBoundingClientRect();
|
|
1430
|
+
if (e.ignoreTransform) {
|
|
1431
|
+
const {
|
|
1432
|
+
transform: l,
|
|
1433
|
+
transformOrigin: u
|
|
1434
|
+
} = we(t).getComputedStyle(t);
|
|
1435
|
+
l && (n = _o(n, l, u));
|
|
1436
|
+
}
|
|
1437
|
+
const {
|
|
1438
|
+
top: r,
|
|
1439
|
+
left: o,
|
|
1440
|
+
width: s,
|
|
1441
|
+
height: a,
|
|
1442
|
+
bottom: i,
|
|
1443
|
+
right: c
|
|
1444
|
+
} = n;
|
|
1445
|
+
return {
|
|
1446
|
+
top: r,
|
|
1447
|
+
left: o,
|
|
1448
|
+
width: s,
|
|
1449
|
+
height: a,
|
|
1450
|
+
bottom: i,
|
|
1451
|
+
right: c
|
|
1452
|
+
};
|
|
1453
|
+
}
|
|
1454
|
+
function Qt(t) {
|
|
1455
|
+
return bt(t, {
|
|
1456
|
+
ignoreTransform: !0
|
|
1457
|
+
});
|
|
1458
|
+
}
|
|
1459
|
+
function Ro(t) {
|
|
1460
|
+
const e = t.innerWidth, n = t.innerHeight;
|
|
1461
|
+
return {
|
|
1462
|
+
top: 0,
|
|
1463
|
+
left: 0,
|
|
1464
|
+
right: e,
|
|
1465
|
+
bottom: n,
|
|
1466
|
+
width: e,
|
|
1467
|
+
height: n
|
|
1468
|
+
};
|
|
1469
|
+
}
|
|
1470
|
+
function Ao(t, e) {
|
|
1471
|
+
return e === void 0 && (e = we(t).getComputedStyle(t)), e.position === "fixed";
|
|
1472
|
+
}
|
|
1473
|
+
function $o(t, e) {
|
|
1474
|
+
e === void 0 && (e = we(t).getComputedStyle(t));
|
|
1475
|
+
const n = /(auto|scroll|overlay)/;
|
|
1476
|
+
return ["overflow", "overflowX", "overflowY"].some((o) => {
|
|
1477
|
+
const s = e[o];
|
|
1478
|
+
return typeof s == "string" ? n.test(s) : !1;
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1481
|
+
function Zt(t, e) {
|
|
1482
|
+
const n = [];
|
|
1483
|
+
function r(o) {
|
|
1484
|
+
if (e != null && n.length >= e || !o)
|
|
1485
|
+
return n;
|
|
1486
|
+
if (Vt(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
|
|
1487
|
+
return n.push(o.scrollingElement), n;
|
|
1488
|
+
if (!Dt(o) || pn(o) || n.includes(o))
|
|
1489
|
+
return n;
|
|
1490
|
+
const s = we(t).getComputedStyle(o);
|
|
1491
|
+
return o !== t && $o(o, s) && n.push(o), Ao(o, s) ? n : r(o.parentNode);
|
|
1492
|
+
}
|
|
1493
|
+
return t ? r(t) : n;
|
|
1494
|
+
}
|
|
1495
|
+
function wn(t) {
|
|
1496
|
+
const [e] = Zt(t, 1);
|
|
1497
|
+
return e ?? null;
|
|
1498
|
+
}
|
|
1499
|
+
function Lt(t) {
|
|
1500
|
+
return !_t || !t ? null : tt(t) ? t : Xt(t) ? Vt(t) || t === nt(t).scrollingElement ? window : Dt(t) ? t : null : null;
|
|
1501
|
+
}
|
|
1502
|
+
function Cn(t) {
|
|
1503
|
+
return tt(t) ? t.scrollX : t.scrollLeft;
|
|
1504
|
+
}
|
|
1505
|
+
function Mn(t) {
|
|
1506
|
+
return tt(t) ? t.scrollY : t.scrollTop;
|
|
1507
|
+
}
|
|
1508
|
+
function Pt(t) {
|
|
1509
|
+
return {
|
|
1510
|
+
x: Cn(t),
|
|
1511
|
+
y: Mn(t)
|
|
1512
|
+
};
|
|
1513
|
+
}
|
|
1514
|
+
var le;
|
|
1515
|
+
(function(t) {
|
|
1516
|
+
t[t.Forward = 1] = "Forward", t[t.Backward = -1] = "Backward";
|
|
1517
|
+
})(le || (le = {}));
|
|
1518
|
+
function Sn(t) {
|
|
1519
|
+
return !_t || !t ? !1 : t === document.scrollingElement;
|
|
1520
|
+
}
|
|
1521
|
+
function Tn(t) {
|
|
1522
|
+
const e = {
|
|
1523
|
+
x: 0,
|
|
1524
|
+
y: 0
|
|
1525
|
+
}, n = Sn(t) ? {
|
|
1526
|
+
height: window.innerHeight,
|
|
1527
|
+
width: window.innerWidth
|
|
1528
|
+
} : {
|
|
1529
|
+
height: t.clientHeight,
|
|
1530
|
+
width: t.clientWidth
|
|
1531
|
+
}, r = {
|
|
1532
|
+
x: t.scrollWidth - n.width,
|
|
1533
|
+
y: t.scrollHeight - n.height
|
|
1534
|
+
}, o = t.scrollTop <= e.y, s = t.scrollLeft <= e.x, a = t.scrollTop >= r.y, i = t.scrollLeft >= r.x;
|
|
1535
|
+
return {
|
|
1536
|
+
isTop: o,
|
|
1537
|
+
isLeft: s,
|
|
1538
|
+
isBottom: a,
|
|
1539
|
+
isRight: i,
|
|
1540
|
+
maxScroll: r,
|
|
1541
|
+
minScroll: e
|
|
1542
|
+
};
|
|
1543
|
+
}
|
|
1544
|
+
const Oo = {
|
|
1545
|
+
x: 0.2,
|
|
1546
|
+
y: 0.2
|
|
1547
|
+
};
|
|
1548
|
+
function No(t, e, n, r, o) {
|
|
1549
|
+
let {
|
|
1550
|
+
top: s,
|
|
1551
|
+
left: a,
|
|
1552
|
+
right: i,
|
|
1553
|
+
bottom: c
|
|
1554
|
+
} = n;
|
|
1555
|
+
r === void 0 && (r = 10), o === void 0 && (o = Oo);
|
|
1556
|
+
const {
|
|
1557
|
+
isTop: l,
|
|
1558
|
+
isBottom: u,
|
|
1559
|
+
isLeft: d,
|
|
1560
|
+
isRight: h
|
|
1561
|
+
} = Tn(t), g = {
|
|
1562
|
+
x: 0,
|
|
1563
|
+
y: 0
|
|
1564
|
+
}, p = {
|
|
1565
|
+
x: 0,
|
|
1566
|
+
y: 0
|
|
1567
|
+
}, f = {
|
|
1568
|
+
height: e.height * o.y,
|
|
1569
|
+
width: e.width * o.x
|
|
1570
|
+
};
|
|
1571
|
+
return !l && s <= e.top + f.height ? (g.y = le.Backward, p.y = r * Math.abs((e.top + f.height - s) / f.height)) : !u && c >= e.bottom - f.height && (g.y = le.Forward, p.y = r * Math.abs((e.bottom - f.height - c) / f.height)), !h && i >= e.right - f.width ? (g.x = le.Forward, p.x = r * Math.abs((e.right - f.width - i) / f.width)) : !d && a <= e.left + f.width && (g.x = le.Backward, p.x = r * Math.abs((e.left + f.width - a) / f.width)), {
|
|
1572
|
+
direction: g,
|
|
1573
|
+
speed: p
|
|
1574
|
+
};
|
|
1575
|
+
}
|
|
1576
|
+
function Lo(t) {
|
|
1577
|
+
if (t === document.scrollingElement) {
|
|
1578
|
+
const {
|
|
1579
|
+
innerWidth: s,
|
|
1580
|
+
innerHeight: a
|
|
1581
|
+
} = window;
|
|
1582
|
+
return {
|
|
1583
|
+
top: 0,
|
|
1584
|
+
left: 0,
|
|
1585
|
+
right: s,
|
|
1586
|
+
bottom: a,
|
|
1587
|
+
width: s,
|
|
1588
|
+
height: a
|
|
1589
|
+
};
|
|
1590
|
+
}
|
|
1591
|
+
const {
|
|
1592
|
+
top: e,
|
|
1593
|
+
left: n,
|
|
1594
|
+
right: r,
|
|
1595
|
+
bottom: o
|
|
1596
|
+
} = t.getBoundingClientRect();
|
|
1597
|
+
return {
|
|
1598
|
+
top: e,
|
|
1599
|
+
left: n,
|
|
1600
|
+
right: r,
|
|
1601
|
+
bottom: o,
|
|
1602
|
+
width: t.clientWidth,
|
|
1603
|
+
height: t.clientHeight
|
|
1604
|
+
};
|
|
1605
|
+
}
|
|
1606
|
+
function Yn(t) {
|
|
1607
|
+
return t.reduce((e, n) => et(e, Pt(n)), Re);
|
|
1608
|
+
}
|
|
1609
|
+
function ko(t) {
|
|
1610
|
+
return t.reduce((e, n) => e + Cn(n), 0);
|
|
1611
|
+
}
|
|
1612
|
+
function Io(t) {
|
|
1613
|
+
return t.reduce((e, n) => e + Mn(n), 0);
|
|
1614
|
+
}
|
|
1615
|
+
function Ho(t, e) {
|
|
1616
|
+
if (e === void 0 && (e = bt), !t)
|
|
1617
|
+
return;
|
|
1618
|
+
const {
|
|
1619
|
+
top: n,
|
|
1620
|
+
left: r,
|
|
1621
|
+
bottom: o,
|
|
1622
|
+
right: s
|
|
1623
|
+
} = e(t);
|
|
1624
|
+
wn(t) && (o <= 0 || s <= 0 || n >= window.innerHeight || r >= window.innerWidth) && t.scrollIntoView({
|
|
1625
|
+
block: "center",
|
|
1626
|
+
inline: "center"
|
|
1627
|
+
});
|
|
1628
|
+
}
|
|
1629
|
+
const zo = [["x", ["left", "right"], ko], ["y", ["top", "bottom"], Io]];
|
|
1630
|
+
class qt {
|
|
1631
|
+
constructor(e, n) {
|
|
1632
|
+
this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
|
|
1633
|
+
const r = Zt(n), o = Yn(r);
|
|
1634
|
+
this.rect = {
|
|
1635
|
+
...e
|
|
1636
|
+
}, this.width = e.width, this.height = e.height;
|
|
1637
|
+
for (const [s, a, i] of zo)
|
|
1638
|
+
for (const c of a)
|
|
1639
|
+
Object.defineProperty(this, c, {
|
|
1640
|
+
get: () => {
|
|
1641
|
+
const l = i(r), u = o[s] - l;
|
|
1642
|
+
return this.rect[c] + u;
|
|
1643
|
+
},
|
|
1644
|
+
enumerable: !0
|
|
1645
|
+
});
|
|
1646
|
+
Object.defineProperty(this, "rect", {
|
|
1647
|
+
enumerable: !1
|
|
1648
|
+
});
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
class ut {
|
|
1652
|
+
constructor(e) {
|
|
1653
|
+
this.target = void 0, this.listeners = [], this.removeAll = () => {
|
|
1654
|
+
this.listeners.forEach((n) => {
|
|
1655
|
+
var r;
|
|
1656
|
+
return (r = this.target) == null ? void 0 : r.removeEventListener(...n);
|
|
1657
|
+
});
|
|
1658
|
+
}, this.target = e;
|
|
1659
|
+
}
|
|
1660
|
+
add(e, n, r) {
|
|
1661
|
+
var o;
|
|
1662
|
+
(o = this.target) == null || o.addEventListener(e, n, r), this.listeners.push([e, n, r]);
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
function Po(t) {
|
|
1666
|
+
const {
|
|
1667
|
+
EventTarget: e
|
|
1668
|
+
} = we(t);
|
|
1669
|
+
return t instanceof e ? t : nt(t);
|
|
1670
|
+
}
|
|
1671
|
+
function kt(t, e) {
|
|
1672
|
+
const n = Math.abs(t.x), r = Math.abs(t.y);
|
|
1673
|
+
return typeof e == "number" ? Math.sqrt(n ** 2 + r ** 2) > e : "x" in e && "y" in e ? n > e.x && r > e.y : "x" in e ? n > e.x : "y" in e ? r > e.y : !1;
|
|
1674
|
+
}
|
|
1675
|
+
var Ye;
|
|
1676
|
+
(function(t) {
|
|
1677
|
+
t.Click = "click", t.DragStart = "dragstart", t.Keydown = "keydown", t.ContextMenu = "contextmenu", t.Resize = "resize", t.SelectionChange = "selectionchange", t.VisibilityChange = "visibilitychange";
|
|
1678
|
+
})(Ye || (Ye = {}));
|
|
1679
|
+
function en(t) {
|
|
1680
|
+
t.preventDefault();
|
|
1681
|
+
}
|
|
1682
|
+
function Bo(t) {
|
|
1683
|
+
t.stopPropagation();
|
|
1684
|
+
}
|
|
1685
|
+
var W;
|
|
1686
|
+
(function(t) {
|
|
1687
|
+
t.Space = "Space", t.Down = "ArrowDown", t.Right = "ArrowRight", t.Left = "ArrowLeft", t.Up = "ArrowUp", t.Esc = "Escape", t.Enter = "Enter", t.Tab = "Tab";
|
|
1688
|
+
})(W || (W = {}));
|
|
1689
|
+
const _n = {
|
|
1690
|
+
start: [W.Space, W.Enter],
|
|
1691
|
+
cancel: [W.Esc],
|
|
1692
|
+
end: [W.Space, W.Enter, W.Tab]
|
|
1693
|
+
}, jo = (t, e) => {
|
|
1694
|
+
let {
|
|
1695
|
+
currentCoordinates: n
|
|
1696
|
+
} = e;
|
|
1697
|
+
switch (t.code) {
|
|
1698
|
+
case W.Right:
|
|
1699
|
+
return {
|
|
1700
|
+
...n,
|
|
1701
|
+
x: n.x + 25
|
|
1702
|
+
};
|
|
1703
|
+
case W.Left:
|
|
1704
|
+
return {
|
|
1705
|
+
...n,
|
|
1706
|
+
x: n.x - 25
|
|
1707
|
+
};
|
|
1708
|
+
case W.Down:
|
|
1709
|
+
return {
|
|
1710
|
+
...n,
|
|
1711
|
+
y: n.y + 25
|
|
1712
|
+
};
|
|
1713
|
+
case W.Up:
|
|
1714
|
+
return {
|
|
1715
|
+
...n,
|
|
1716
|
+
y: n.y - 25
|
|
1717
|
+
};
|
|
1718
|
+
}
|
|
1719
|
+
};
|
|
1720
|
+
class En {
|
|
1721
|
+
constructor(e) {
|
|
1722
|
+
this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = e;
|
|
1723
|
+
const {
|
|
1724
|
+
event: {
|
|
1725
|
+
target: n
|
|
1726
|
+
}
|
|
1727
|
+
} = e;
|
|
1728
|
+
this.props = e, this.listeners = new ut(nt(n)), this.windowListeners = new ut(we(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
1729
|
+
}
|
|
1730
|
+
attach() {
|
|
1731
|
+
this.handleStart(), this.windowListeners.add(Ye.Resize, this.handleCancel), this.windowListeners.add(Ye.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(Ye.Keydown, this.handleKeyDown));
|
|
1732
|
+
}
|
|
1733
|
+
handleStart() {
|
|
1734
|
+
const {
|
|
1735
|
+
activeNode: e,
|
|
1736
|
+
onStart: n
|
|
1737
|
+
} = this.props, r = e.node.current;
|
|
1738
|
+
r && Ho(r), n(Re);
|
|
1739
|
+
}
|
|
1740
|
+
handleKeyDown(e) {
|
|
1741
|
+
if (yn(e)) {
|
|
1742
|
+
const {
|
|
1743
|
+
active: n,
|
|
1744
|
+
context: r,
|
|
1745
|
+
options: o
|
|
1746
|
+
} = this.props, {
|
|
1747
|
+
keyboardCodes: s = _n,
|
|
1748
|
+
coordinateGetter: a = jo,
|
|
1749
|
+
scrollBehavior: i = "smooth"
|
|
1750
|
+
} = o, {
|
|
1751
|
+
code: c
|
|
1752
|
+
} = e;
|
|
1753
|
+
if (s.end.includes(c)) {
|
|
1754
|
+
this.handleEnd(e);
|
|
1755
|
+
return;
|
|
1756
|
+
}
|
|
1757
|
+
if (s.cancel.includes(c)) {
|
|
1758
|
+
this.handleCancel(e);
|
|
1759
|
+
return;
|
|
1760
|
+
}
|
|
1761
|
+
const {
|
|
1762
|
+
collisionRect: l
|
|
1763
|
+
} = r.current, u = l ? {
|
|
1764
|
+
x: l.left,
|
|
1765
|
+
y: l.top
|
|
1766
|
+
} : Re;
|
|
1767
|
+
this.referenceCoordinates || (this.referenceCoordinates = u);
|
|
1768
|
+
const d = a(e, {
|
|
1769
|
+
active: n,
|
|
1770
|
+
context: r.current,
|
|
1771
|
+
currentCoordinates: u
|
|
1772
|
+
});
|
|
1773
|
+
if (d) {
|
|
1774
|
+
const h = Mt(d, u), g = {
|
|
1775
|
+
x: 0,
|
|
1776
|
+
y: 0
|
|
1777
|
+
}, {
|
|
1778
|
+
scrollableAncestors: p
|
|
1779
|
+
} = r.current;
|
|
1780
|
+
for (const f of p) {
|
|
1781
|
+
const m = e.code, {
|
|
1782
|
+
isTop: D,
|
|
1783
|
+
isRight: y,
|
|
1784
|
+
isLeft: v,
|
|
1785
|
+
isBottom: M,
|
|
1786
|
+
maxScroll: x,
|
|
1787
|
+
minScroll: T
|
|
1788
|
+
} = Tn(f), w = Lo(f), b = {
|
|
1789
|
+
x: Math.min(m === W.Right ? w.right - w.width / 2 : w.right, Math.max(m === W.Right ? w.left : w.left + w.width / 2, d.x)),
|
|
1790
|
+
y: Math.min(m === W.Down ? w.bottom - w.height / 2 : w.bottom, Math.max(m === W.Down ? w.top : w.top + w.height / 2, d.y))
|
|
1791
|
+
}, E = m === W.Right && !y || m === W.Left && !v, A = m === W.Down && !M || m === W.Up && !D;
|
|
1792
|
+
if (E && b.x !== d.x) {
|
|
1793
|
+
const Y = f.scrollLeft + h.x, R = m === W.Right && Y <= x.x || m === W.Left && Y >= T.x;
|
|
1794
|
+
if (R && !h.y) {
|
|
1795
|
+
f.scrollTo({
|
|
1796
|
+
left: Y,
|
|
1797
|
+
behavior: i
|
|
1798
|
+
});
|
|
1799
|
+
return;
|
|
1800
|
+
}
|
|
1801
|
+
R ? g.x = f.scrollLeft - Y : g.x = m === W.Right ? f.scrollLeft - x.x : f.scrollLeft - T.x, g.x && f.scrollBy({
|
|
1802
|
+
left: -g.x,
|
|
1803
|
+
behavior: i
|
|
1804
|
+
});
|
|
1805
|
+
break;
|
|
1806
|
+
} else if (A && b.y !== d.y) {
|
|
1807
|
+
const Y = f.scrollTop + h.y, R = m === W.Down && Y <= x.y || m === W.Up && Y >= T.y;
|
|
1808
|
+
if (R && !h.x) {
|
|
1809
|
+
f.scrollTo({
|
|
1810
|
+
top: Y,
|
|
1811
|
+
behavior: i
|
|
1812
|
+
});
|
|
1813
|
+
return;
|
|
1814
|
+
}
|
|
1815
|
+
R ? g.y = f.scrollTop - Y : g.y = m === W.Down ? f.scrollTop - x.y : f.scrollTop - T.y, g.y && f.scrollBy({
|
|
1816
|
+
top: -g.y,
|
|
1817
|
+
behavior: i
|
|
1818
|
+
});
|
|
1819
|
+
break;
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
this.handleMove(e, et(Mt(d, this.referenceCoordinates), g));
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
handleMove(e, n) {
|
|
1827
|
+
const {
|
|
1828
|
+
onMove: r
|
|
1829
|
+
} = this.props;
|
|
1830
|
+
e.preventDefault(), r(n);
|
|
1831
|
+
}
|
|
1832
|
+
handleEnd(e) {
|
|
1833
|
+
const {
|
|
1834
|
+
onEnd: n
|
|
1835
|
+
} = this.props;
|
|
1836
|
+
e.preventDefault(), this.detach(), n();
|
|
1837
|
+
}
|
|
1838
|
+
handleCancel(e) {
|
|
1839
|
+
const {
|
|
1840
|
+
onCancel: n
|
|
1841
|
+
} = this.props;
|
|
1842
|
+
e.preventDefault(), this.detach(), n();
|
|
1843
|
+
}
|
|
1844
|
+
detach() {
|
|
1845
|
+
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
En.activators = [{
|
|
1849
|
+
eventName: "onKeyDown",
|
|
1850
|
+
handler: (t, e, n) => {
|
|
1851
|
+
let {
|
|
1852
|
+
keyboardCodes: r = _n,
|
|
1853
|
+
onActivation: o
|
|
1854
|
+
} = e, {
|
|
1855
|
+
active: s
|
|
1856
|
+
} = n;
|
|
1857
|
+
const {
|
|
1858
|
+
code: a
|
|
1859
|
+
} = t.nativeEvent;
|
|
1860
|
+
if (r.start.includes(a)) {
|
|
1861
|
+
const i = s.activatorNode.current;
|
|
1862
|
+
return i && t.target !== i ? !1 : (t.preventDefault(), o == null || o({
|
|
1863
|
+
event: t.nativeEvent
|
|
1864
|
+
}), !0);
|
|
1865
|
+
}
|
|
1866
|
+
return !1;
|
|
1867
|
+
}
|
|
1868
|
+
}];
|
|
1869
|
+
function tn(t) {
|
|
1870
|
+
return !!(t && "distance" in t);
|
|
1871
|
+
}
|
|
1872
|
+
function nn(t) {
|
|
1873
|
+
return !!(t && "delay" in t);
|
|
1874
|
+
}
|
|
1875
|
+
class Gt {
|
|
1876
|
+
constructor(e, n, r) {
|
|
1877
|
+
var o;
|
|
1878
|
+
r === void 0 && (r = Po(e.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = e, this.events = n;
|
|
1879
|
+
const {
|
|
1880
|
+
event: s
|
|
1881
|
+
} = e, {
|
|
1882
|
+
target: a
|
|
1883
|
+
} = s;
|
|
1884
|
+
this.props = e, this.events = n, this.document = nt(a), this.documentListeners = new ut(this.document), this.listeners = new ut(r), this.windowListeners = new ut(we(a)), this.initialCoordinates = (o = zt(s)) != null ? o : Re, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
|
|
1885
|
+
}
|
|
1886
|
+
attach() {
|
|
1887
|
+
const {
|
|
1888
|
+
events: e,
|
|
1889
|
+
props: {
|
|
1890
|
+
options: {
|
|
1891
|
+
activationConstraint: n,
|
|
1892
|
+
bypassActivationConstraint: r
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
} = this;
|
|
1896
|
+
if (this.listeners.add(e.move.name, this.handleMove, {
|
|
1897
|
+
passive: !1
|
|
1898
|
+
}), this.listeners.add(e.end.name, this.handleEnd), e.cancel && this.listeners.add(e.cancel.name, this.handleCancel), this.windowListeners.add(Ye.Resize, this.handleCancel), this.windowListeners.add(Ye.DragStart, en), this.windowListeners.add(Ye.VisibilityChange, this.handleCancel), this.windowListeners.add(Ye.ContextMenu, en), this.documentListeners.add(Ye.Keydown, this.handleKeydown), n) {
|
|
1899
|
+
if (r != null && r({
|
|
1900
|
+
event: this.props.event,
|
|
1901
|
+
activeNode: this.props.activeNode,
|
|
1902
|
+
options: this.props.options
|
|
1903
|
+
}))
|
|
1904
|
+
return this.handleStart();
|
|
1905
|
+
if (nn(n)) {
|
|
1906
|
+
this.timeoutId = setTimeout(this.handleStart, n.delay), this.handlePending(n);
|
|
1907
|
+
return;
|
|
1908
|
+
}
|
|
1909
|
+
if (tn(n)) {
|
|
1910
|
+
this.handlePending(n);
|
|
1911
|
+
return;
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
this.handleStart();
|
|
1915
|
+
}
|
|
1916
|
+
detach() {
|
|
1917
|
+
this.listeners.removeAll(), this.windowListeners.removeAll(), setTimeout(this.documentListeners.removeAll, 50), this.timeoutId !== null && (clearTimeout(this.timeoutId), this.timeoutId = null);
|
|
1918
|
+
}
|
|
1919
|
+
handlePending(e, n) {
|
|
1920
|
+
const {
|
|
1921
|
+
active: r,
|
|
1922
|
+
onPending: o
|
|
1923
|
+
} = this.props;
|
|
1924
|
+
o(r, e, this.initialCoordinates, n);
|
|
1925
|
+
}
|
|
1926
|
+
handleStart() {
|
|
1927
|
+
const {
|
|
1928
|
+
initialCoordinates: e
|
|
1929
|
+
} = this, {
|
|
1930
|
+
onStart: n
|
|
1931
|
+
} = this.props;
|
|
1932
|
+
e && (this.activated = !0, this.documentListeners.add(Ye.Click, Bo, {
|
|
1933
|
+
capture: !0
|
|
1934
|
+
}), this.removeTextSelection(), this.documentListeners.add(Ye.SelectionChange, this.removeTextSelection), n(e));
|
|
1935
|
+
}
|
|
1936
|
+
handleMove(e) {
|
|
1937
|
+
var n;
|
|
1938
|
+
const {
|
|
1939
|
+
activated: r,
|
|
1940
|
+
initialCoordinates: o,
|
|
1941
|
+
props: s
|
|
1942
|
+
} = this, {
|
|
1943
|
+
onMove: a,
|
|
1944
|
+
options: {
|
|
1945
|
+
activationConstraint: i
|
|
1946
|
+
}
|
|
1947
|
+
} = s;
|
|
1948
|
+
if (!o)
|
|
1949
|
+
return;
|
|
1950
|
+
const c = (n = zt(e)) != null ? n : Re, l = Mt(o, c);
|
|
1951
|
+
if (!r && i) {
|
|
1952
|
+
if (tn(i)) {
|
|
1953
|
+
if (i.tolerance != null && kt(l, i.tolerance))
|
|
1954
|
+
return this.handleCancel();
|
|
1955
|
+
if (kt(l, i.distance))
|
|
1956
|
+
return this.handleStart();
|
|
1957
|
+
}
|
|
1958
|
+
if (nn(i) && kt(l, i.tolerance))
|
|
1959
|
+
return this.handleCancel();
|
|
1960
|
+
this.handlePending(i, l);
|
|
1961
|
+
return;
|
|
1962
|
+
}
|
|
1963
|
+
e.cancelable && e.preventDefault(), a(c);
|
|
1964
|
+
}
|
|
1965
|
+
handleEnd() {
|
|
1966
|
+
const {
|
|
1967
|
+
onAbort: e,
|
|
1968
|
+
onEnd: n
|
|
1969
|
+
} = this.props;
|
|
1970
|
+
this.detach(), this.activated || e(this.props.active), n();
|
|
1971
|
+
}
|
|
1972
|
+
handleCancel() {
|
|
1973
|
+
const {
|
|
1974
|
+
onAbort: e,
|
|
1975
|
+
onCancel: n
|
|
1976
|
+
} = this.props;
|
|
1977
|
+
this.detach(), this.activated || e(this.props.active), n();
|
|
1978
|
+
}
|
|
1979
|
+
handleKeydown(e) {
|
|
1980
|
+
e.code === W.Esc && this.handleCancel();
|
|
1981
|
+
}
|
|
1982
|
+
removeTextSelection() {
|
|
1983
|
+
var e;
|
|
1984
|
+
(e = this.document.getSelection()) == null || e.removeAllRanges();
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
const Fo = {
|
|
1988
|
+
cancel: {
|
|
1989
|
+
name: "pointercancel"
|
|
1990
|
+
},
|
|
1991
|
+
move: {
|
|
1992
|
+
name: "pointermove"
|
|
1993
|
+
},
|
|
1994
|
+
end: {
|
|
1995
|
+
name: "pointerup"
|
|
1996
|
+
}
|
|
1997
|
+
};
|
|
1998
|
+
class Rn extends Gt {
|
|
1999
|
+
constructor(e) {
|
|
2000
|
+
const {
|
|
2001
|
+
event: n
|
|
2002
|
+
} = e, r = nt(n.target);
|
|
2003
|
+
super(e, Fo, r);
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
Rn.activators = [{
|
|
2007
|
+
eventName: "onPointerDown",
|
|
2008
|
+
handler: (t, e) => {
|
|
2009
|
+
let {
|
|
2010
|
+
nativeEvent: n
|
|
2011
|
+
} = t, {
|
|
2012
|
+
onActivation: r
|
|
2013
|
+
} = e;
|
|
2014
|
+
return !n.isPrimary || n.button !== 0 ? !1 : (r == null || r({
|
|
2015
|
+
event: n
|
|
2016
|
+
}), !0);
|
|
2017
|
+
}
|
|
2018
|
+
}];
|
|
2019
|
+
const Wo = {
|
|
2020
|
+
move: {
|
|
2021
|
+
name: "mousemove"
|
|
2022
|
+
},
|
|
2023
|
+
end: {
|
|
2024
|
+
name: "mouseup"
|
|
2025
|
+
}
|
|
2026
|
+
};
|
|
2027
|
+
var Bt;
|
|
2028
|
+
(function(t) {
|
|
2029
|
+
t[t.RightClick = 2] = "RightClick";
|
|
2030
|
+
})(Bt || (Bt = {}));
|
|
2031
|
+
class Xo extends Gt {
|
|
2032
|
+
constructor(e) {
|
|
2033
|
+
super(e, Wo, nt(e.event.target));
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
Xo.activators = [{
|
|
2037
|
+
eventName: "onMouseDown",
|
|
2038
|
+
handler: (t, e) => {
|
|
2039
|
+
let {
|
|
2040
|
+
nativeEvent: n
|
|
2041
|
+
} = t, {
|
|
2042
|
+
onActivation: r
|
|
2043
|
+
} = e;
|
|
2044
|
+
return n.button === Bt.RightClick ? !1 : (r == null || r({
|
|
2045
|
+
event: n
|
|
2046
|
+
}), !0);
|
|
2047
|
+
}
|
|
2048
|
+
}];
|
|
2049
|
+
const It = {
|
|
2050
|
+
cancel: {
|
|
2051
|
+
name: "touchcancel"
|
|
2052
|
+
},
|
|
2053
|
+
move: {
|
|
2054
|
+
name: "touchmove"
|
|
2055
|
+
},
|
|
2056
|
+
end: {
|
|
2057
|
+
name: "touchend"
|
|
2058
|
+
}
|
|
2059
|
+
};
|
|
2060
|
+
class Vo extends Gt {
|
|
2061
|
+
constructor(e) {
|
|
2062
|
+
super(e, It);
|
|
2063
|
+
}
|
|
2064
|
+
static setup() {
|
|
2065
|
+
return window.addEventListener(It.move.name, e, {
|
|
2066
|
+
capture: !1,
|
|
2067
|
+
passive: !1
|
|
2068
|
+
}), function() {
|
|
2069
|
+
window.removeEventListener(It.move.name, e);
|
|
2070
|
+
};
|
|
2071
|
+
function e() {
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
Vo.activators = [{
|
|
2076
|
+
eventName: "onTouchStart",
|
|
2077
|
+
handler: (t, e) => {
|
|
2078
|
+
let {
|
|
2079
|
+
nativeEvent: n
|
|
2080
|
+
} = t, {
|
|
2081
|
+
onActivation: r
|
|
2082
|
+
} = e;
|
|
2083
|
+
const {
|
|
2084
|
+
touches: o
|
|
2085
|
+
} = n;
|
|
2086
|
+
return o.length > 1 ? !1 : (r == null || r({
|
|
2087
|
+
event: n
|
|
2088
|
+
}), !0);
|
|
2089
|
+
}
|
|
2090
|
+
}];
|
|
2091
|
+
var dt;
|
|
2092
|
+
(function(t) {
|
|
2093
|
+
t[t.Pointer = 0] = "Pointer", t[t.DraggableRect = 1] = "DraggableRect";
|
|
2094
|
+
})(dt || (dt = {}));
|
|
2095
|
+
var Tt;
|
|
2096
|
+
(function(t) {
|
|
2097
|
+
t[t.TreeOrder = 0] = "TreeOrder", t[t.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
2098
|
+
})(Tt || (Tt = {}));
|
|
2099
|
+
function Uo(t) {
|
|
2100
|
+
let {
|
|
2101
|
+
acceleration: e,
|
|
2102
|
+
activator: n = dt.Pointer,
|
|
2103
|
+
canScroll: r,
|
|
2104
|
+
draggingRect: o,
|
|
2105
|
+
enabled: s,
|
|
2106
|
+
interval: a = 5,
|
|
2107
|
+
order: i = Tt.TreeOrder,
|
|
2108
|
+
pointerCoordinates: c,
|
|
2109
|
+
scrollableAncestors: l,
|
|
2110
|
+
scrollableAncestorRects: u,
|
|
2111
|
+
delta: d,
|
|
2112
|
+
threshold: h
|
|
2113
|
+
} = t;
|
|
2114
|
+
const g = qo({
|
|
2115
|
+
delta: d,
|
|
2116
|
+
disabled: !s
|
|
2117
|
+
}), [p, f] = io(), m = J({
|
|
2118
|
+
x: 0,
|
|
2119
|
+
y: 0
|
|
2120
|
+
}), D = J({
|
|
2121
|
+
x: 0,
|
|
2122
|
+
y: 0
|
|
2123
|
+
}), y = ie(() => {
|
|
2124
|
+
switch (n) {
|
|
2125
|
+
case dt.Pointer:
|
|
2126
|
+
return c ? {
|
|
2127
|
+
top: c.y,
|
|
2128
|
+
bottom: c.y,
|
|
2129
|
+
left: c.x,
|
|
2130
|
+
right: c.x
|
|
2131
|
+
} : null;
|
|
2132
|
+
case dt.DraggableRect:
|
|
2133
|
+
return o;
|
|
2134
|
+
}
|
|
2135
|
+
}, [n, o, c]), v = J(null), M = ve(() => {
|
|
2136
|
+
const T = v.current;
|
|
2137
|
+
if (!T)
|
|
2138
|
+
return;
|
|
2139
|
+
const w = m.current.x * D.current.x, b = m.current.y * D.current.y;
|
|
2140
|
+
T.scrollBy(w, b);
|
|
2141
|
+
}, []), x = ie(() => i === Tt.TreeOrder ? [...l].reverse() : l, [i, l]);
|
|
2142
|
+
ee(
|
|
2143
|
+
() => {
|
|
2144
|
+
if (!s || !l.length || !y) {
|
|
2145
|
+
f();
|
|
2146
|
+
return;
|
|
2147
|
+
}
|
|
2148
|
+
for (const T of x) {
|
|
2149
|
+
if ((r == null ? void 0 : r(T)) === !1)
|
|
2150
|
+
continue;
|
|
2151
|
+
const w = l.indexOf(T), b = u[w];
|
|
2152
|
+
if (!b)
|
|
2153
|
+
continue;
|
|
2154
|
+
const {
|
|
2155
|
+
direction: E,
|
|
2156
|
+
speed: A
|
|
2157
|
+
} = No(T, b, y, e, h);
|
|
2158
|
+
for (const Y of ["x", "y"])
|
|
2159
|
+
g[Y][E[Y]] || (A[Y] = 0, E[Y] = 0);
|
|
2160
|
+
if (A.x > 0 || A.y > 0) {
|
|
2161
|
+
f(), v.current = T, p(M, a), m.current = A, D.current = E;
|
|
2162
|
+
return;
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
m.current = {
|
|
2166
|
+
x: 0,
|
|
2167
|
+
y: 0
|
|
2168
|
+
}, D.current = {
|
|
2169
|
+
x: 0,
|
|
2170
|
+
y: 0
|
|
2171
|
+
}, f();
|
|
2172
|
+
},
|
|
2173
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2174
|
+
[
|
|
2175
|
+
e,
|
|
2176
|
+
M,
|
|
2177
|
+
r,
|
|
2178
|
+
f,
|
|
2179
|
+
s,
|
|
2180
|
+
a,
|
|
2181
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2182
|
+
JSON.stringify(y),
|
|
2183
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2184
|
+
JSON.stringify(g),
|
|
2185
|
+
p,
|
|
2186
|
+
l,
|
|
2187
|
+
x,
|
|
2188
|
+
u,
|
|
2189
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2190
|
+
JSON.stringify(h)
|
|
2191
|
+
]
|
|
2192
|
+
);
|
|
2193
|
+
}
|
|
2194
|
+
const Zo = {
|
|
2195
|
+
x: {
|
|
2196
|
+
[le.Backward]: !1,
|
|
2197
|
+
[le.Forward]: !1
|
|
2198
|
+
},
|
|
2199
|
+
y: {
|
|
2200
|
+
[le.Backward]: !1,
|
|
2201
|
+
[le.Forward]: !1
|
|
2202
|
+
}
|
|
2203
|
+
};
|
|
2204
|
+
function qo(t) {
|
|
2205
|
+
let {
|
|
2206
|
+
delta: e,
|
|
2207
|
+
disabled: n
|
|
2208
|
+
} = t;
|
|
2209
|
+
const r = Ht(e);
|
|
2210
|
+
return yt((o) => {
|
|
2211
|
+
if (n || !r || !o)
|
|
2212
|
+
return Zo;
|
|
2213
|
+
const s = {
|
|
2214
|
+
x: Math.sign(e.x - r.x),
|
|
2215
|
+
y: Math.sign(e.y - r.y)
|
|
2216
|
+
};
|
|
2217
|
+
return {
|
|
2218
|
+
x: {
|
|
2219
|
+
[le.Backward]: o.x[le.Backward] || s.x === -1,
|
|
2220
|
+
[le.Forward]: o.x[le.Forward] || s.x === 1
|
|
2221
|
+
},
|
|
2222
|
+
y: {
|
|
2223
|
+
[le.Backward]: o.y[le.Backward] || s.y === -1,
|
|
2224
|
+
[le.Forward]: o.y[le.Forward] || s.y === 1
|
|
2225
|
+
}
|
|
2226
|
+
};
|
|
2227
|
+
}, [n, e, r]);
|
|
2228
|
+
}
|
|
2229
|
+
function Go(t, e) {
|
|
2230
|
+
const n = e != null ? t.get(e) : void 0, r = n ? n.node.current : null;
|
|
2231
|
+
return yt((o) => {
|
|
2232
|
+
var s;
|
|
2233
|
+
return e == null ? null : (s = r ?? o) != null ? s : null;
|
|
2234
|
+
}, [r, e]);
|
|
2235
|
+
}
|
|
2236
|
+
function Ko(t, e) {
|
|
2237
|
+
return ie(() => t.reduce((n, r) => {
|
|
2238
|
+
const {
|
|
2239
|
+
sensor: o
|
|
2240
|
+
} = r, s = o.activators.map((a) => ({
|
|
2241
|
+
eventName: a.eventName,
|
|
2242
|
+
handler: e(a.handler, r)
|
|
2243
|
+
}));
|
|
2244
|
+
return [...n, ...s];
|
|
2245
|
+
}, []), [t, e]);
|
|
2246
|
+
}
|
|
2247
|
+
var vt;
|
|
2248
|
+
(function(t) {
|
|
2249
|
+
t[t.Always = 0] = "Always", t[t.BeforeDragging = 1] = "BeforeDragging", t[t.WhileDragging = 2] = "WhileDragging";
|
|
2250
|
+
})(vt || (vt = {}));
|
|
2251
|
+
var jt;
|
|
2252
|
+
(function(t) {
|
|
2253
|
+
t.Optimized = "optimized";
|
|
2254
|
+
})(jt || (jt = {}));
|
|
2255
|
+
const rn = /* @__PURE__ */ new Map();
|
|
2256
|
+
function Jo(t, e) {
|
|
2257
|
+
let {
|
|
2258
|
+
dragging: n,
|
|
2259
|
+
dependencies: r,
|
|
2260
|
+
config: o
|
|
2261
|
+
} = e;
|
|
2262
|
+
const [s, a] = _e(null), {
|
|
2263
|
+
frequency: i,
|
|
2264
|
+
measure: c,
|
|
2265
|
+
strategy: l
|
|
2266
|
+
} = o, u = J(t), d = m(), h = mt(d), g = ve(function(D) {
|
|
2267
|
+
D === void 0 && (D = []), !h.current && a((y) => y === null ? D : y.concat(D.filter((v) => !y.includes(v))));
|
|
2268
|
+
}, [h]), p = J(null), f = yt((D) => {
|
|
2269
|
+
if (d && !n)
|
|
2270
|
+
return rn;
|
|
2271
|
+
if (!D || D === rn || u.current !== t || s != null) {
|
|
2272
|
+
const y = /* @__PURE__ */ new Map();
|
|
2273
|
+
for (let v of t) {
|
|
2274
|
+
if (!v)
|
|
2275
|
+
continue;
|
|
2276
|
+
if (s && s.length > 0 && !s.includes(v.id) && v.rect.current) {
|
|
2277
|
+
y.set(v.id, v.rect.current);
|
|
2278
|
+
continue;
|
|
2279
|
+
}
|
|
2280
|
+
const M = v.node.current, x = M ? new qt(c(M), M) : null;
|
|
2281
|
+
v.rect.current = x, x && y.set(v.id, x);
|
|
2282
|
+
}
|
|
2283
|
+
return y;
|
|
2284
|
+
}
|
|
2285
|
+
return D;
|
|
2286
|
+
}, [t, s, n, d, c]);
|
|
2287
|
+
return ee(() => {
|
|
2288
|
+
u.current = t;
|
|
2289
|
+
}, [t]), ee(
|
|
2290
|
+
() => {
|
|
2291
|
+
d || g();
|
|
2292
|
+
},
|
|
2293
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2294
|
+
[n, d]
|
|
2295
|
+
), ee(
|
|
2296
|
+
() => {
|
|
2297
|
+
s && s.length > 0 && a(null);
|
|
2298
|
+
},
|
|
2299
|
+
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2300
|
+
[JSON.stringify(s)]
|
|
2301
|
+
), ee(
|
|
2302
|
+
() => {
|
|
2303
|
+
d || typeof i != "number" || p.current !== null || (p.current = setTimeout(() => {
|
|
2304
|
+
g(), p.current = null;
|
|
2305
|
+
}, i));
|
|
2306
|
+
},
|
|
2307
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2308
|
+
[i, d, g, ...r]
|
|
2309
|
+
), {
|
|
2310
|
+
droppableRects: f,
|
|
2311
|
+
measureDroppableContainers: g,
|
|
2312
|
+
measuringScheduled: s != null
|
|
2313
|
+
};
|
|
2314
|
+
function m() {
|
|
2315
|
+
switch (l) {
|
|
2316
|
+
case vt.Always:
|
|
2317
|
+
return !1;
|
|
2318
|
+
case vt.BeforeDragging:
|
|
2319
|
+
return n;
|
|
2320
|
+
default:
|
|
2321
|
+
return !n;
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
function An(t, e) {
|
|
2326
|
+
return yt((n) => t ? n || (typeof e == "function" ? e(t) : t) : null, [e, t]);
|
|
2327
|
+
}
|
|
2328
|
+
function Qo(t, e) {
|
|
2329
|
+
return An(t, e);
|
|
2330
|
+
}
|
|
2331
|
+
function es(t) {
|
|
2332
|
+
let {
|
|
2333
|
+
callback: e,
|
|
2334
|
+
disabled: n
|
|
2335
|
+
} = t;
|
|
2336
|
+
const r = Ut(e), o = ie(() => {
|
|
2337
|
+
if (n || typeof window > "u" || typeof window.MutationObserver > "u")
|
|
2338
|
+
return;
|
|
2339
|
+
const {
|
|
2340
|
+
MutationObserver: s
|
|
2341
|
+
} = window;
|
|
2342
|
+
return new s(r);
|
|
2343
|
+
}, [r, n]);
|
|
2344
|
+
return ee(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
2345
|
+
}
|
|
2346
|
+
function Rt(t) {
|
|
2347
|
+
let {
|
|
2348
|
+
callback: e,
|
|
2349
|
+
disabled: n
|
|
2350
|
+
} = t;
|
|
2351
|
+
const r = Ut(e), o = ie(
|
|
2352
|
+
() => {
|
|
2353
|
+
if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
|
|
2354
|
+
return;
|
|
2355
|
+
const {
|
|
2356
|
+
ResizeObserver: s
|
|
2357
|
+
} = window;
|
|
2358
|
+
return new s(r);
|
|
2359
|
+
},
|
|
2360
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2361
|
+
[n]
|
|
2362
|
+
);
|
|
2363
|
+
return ee(() => () => o == null ? void 0 : o.disconnect(), [o]), o;
|
|
2364
|
+
}
|
|
2365
|
+
function ts(t) {
|
|
2366
|
+
return new qt(bt(t), t);
|
|
2367
|
+
}
|
|
2368
|
+
function on(t, e, n) {
|
|
2369
|
+
e === void 0 && (e = ts);
|
|
2370
|
+
const [r, o] = _e(null);
|
|
2371
|
+
function s() {
|
|
2372
|
+
o((c) => {
|
|
2373
|
+
if (!t)
|
|
2374
|
+
return null;
|
|
2375
|
+
if (t.isConnected === !1) {
|
|
2376
|
+
var l;
|
|
2377
|
+
return (l = c ?? n) != null ? l : null;
|
|
2378
|
+
}
|
|
2379
|
+
const u = e(t);
|
|
2380
|
+
return JSON.stringify(c) === JSON.stringify(u) ? c : u;
|
|
2381
|
+
});
|
|
2382
|
+
}
|
|
2383
|
+
const a = es({
|
|
2384
|
+
callback(c) {
|
|
2385
|
+
if (t)
|
|
2386
|
+
for (const l of c) {
|
|
2387
|
+
const {
|
|
2388
|
+
type: u,
|
|
2389
|
+
target: d
|
|
2390
|
+
} = l;
|
|
2391
|
+
if (u === "childList" && d instanceof HTMLElement && d.contains(t)) {
|
|
2392
|
+
s();
|
|
2393
|
+
break;
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
}
|
|
2397
|
+
}), i = Rt({
|
|
2398
|
+
callback: s
|
|
2399
|
+
});
|
|
2400
|
+
return Fe(() => {
|
|
2401
|
+
s(), t ? (i == null || i.observe(t), a == null || a.observe(document.body, {
|
|
2402
|
+
childList: !0,
|
|
2403
|
+
subtree: !0
|
|
2404
|
+
})) : (i == null || i.disconnect(), a == null || a.disconnect());
|
|
2405
|
+
}, [t]), r;
|
|
2406
|
+
}
|
|
2407
|
+
function ns(t) {
|
|
2408
|
+
const e = An(t);
|
|
2409
|
+
return xn(t, e);
|
|
2410
|
+
}
|
|
2411
|
+
const sn = [];
|
|
2412
|
+
function rs(t) {
|
|
2413
|
+
const e = J(t), n = yt((r) => t ? r && r !== sn && t && e.current && t.parentNode === e.current.parentNode ? r : Zt(t) : sn, [t]);
|
|
2414
|
+
return ee(() => {
|
|
2415
|
+
e.current = t;
|
|
2416
|
+
}, [t]), n;
|
|
2417
|
+
}
|
|
2418
|
+
function os(t) {
|
|
2419
|
+
const [e, n] = _e(null), r = J(t), o = ve((s) => {
|
|
2420
|
+
const a = Lt(s.target);
|
|
2421
|
+
a && n((i) => i ? (i.set(a, Pt(a)), new Map(i)) : null);
|
|
2422
|
+
}, []);
|
|
2423
|
+
return ee(() => {
|
|
2424
|
+
const s = r.current;
|
|
2425
|
+
if (t !== s) {
|
|
2426
|
+
a(s);
|
|
2427
|
+
const i = t.map((c) => {
|
|
2428
|
+
const l = Lt(c);
|
|
2429
|
+
return l ? (l.addEventListener("scroll", o, {
|
|
2430
|
+
passive: !0
|
|
2431
|
+
}), [l, Pt(l)]) : null;
|
|
2432
|
+
}).filter((c) => c != null);
|
|
2433
|
+
n(i.length ? new Map(i) : null), r.current = t;
|
|
2434
|
+
}
|
|
2435
|
+
return () => {
|
|
2436
|
+
a(t), a(s);
|
|
2437
|
+
};
|
|
2438
|
+
function a(i) {
|
|
2439
|
+
i.forEach((c) => {
|
|
2440
|
+
const l = Lt(c);
|
|
2441
|
+
l == null || l.removeEventListener("scroll", o);
|
|
2442
|
+
});
|
|
2443
|
+
}
|
|
2444
|
+
}, [o, t]), ie(() => t.length ? e ? Array.from(e.values()).reduce((s, a) => et(s, a), Re) : Yn(t) : Re, [t, e]);
|
|
2445
|
+
}
|
|
2446
|
+
function an(t, e) {
|
|
2447
|
+
e === void 0 && (e = []);
|
|
2448
|
+
const n = J(null);
|
|
2449
|
+
return ee(
|
|
2450
|
+
() => {
|
|
2451
|
+
n.current = null;
|
|
2452
|
+
},
|
|
2453
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2454
|
+
e
|
|
2455
|
+
), ee(() => {
|
|
2456
|
+
const r = t !== Re;
|
|
2457
|
+
r && !n.current && (n.current = t), !r && n.current && (n.current = null);
|
|
2458
|
+
}, [t]), n.current ? Mt(t, n.current) : Re;
|
|
2459
|
+
}
|
|
2460
|
+
function ss(t) {
|
|
2461
|
+
ee(
|
|
2462
|
+
() => {
|
|
2463
|
+
if (!_t)
|
|
2464
|
+
return;
|
|
2465
|
+
const e = t.map((n) => {
|
|
2466
|
+
let {
|
|
2467
|
+
sensor: r
|
|
2468
|
+
} = n;
|
|
2469
|
+
return r.setup == null ? void 0 : r.setup();
|
|
2470
|
+
});
|
|
2471
|
+
return () => {
|
|
2472
|
+
for (const n of e)
|
|
2473
|
+
n == null || n();
|
|
2474
|
+
};
|
|
2475
|
+
},
|
|
2476
|
+
// TO-DO: Sensors length could theoretically change which would not be a valid dependency
|
|
2477
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2478
|
+
t.map((e) => {
|
|
2479
|
+
let {
|
|
2480
|
+
sensor: n
|
|
2481
|
+
} = e;
|
|
2482
|
+
return n;
|
|
2483
|
+
})
|
|
2484
|
+
);
|
|
2485
|
+
}
|
|
2486
|
+
function is(t, e) {
|
|
2487
|
+
return ie(() => t.reduce((n, r) => {
|
|
2488
|
+
let {
|
|
2489
|
+
eventName: o,
|
|
2490
|
+
handler: s
|
|
2491
|
+
} = r;
|
|
2492
|
+
return n[o] = (a) => {
|
|
2493
|
+
s(a, e);
|
|
2494
|
+
}, n;
|
|
2495
|
+
}, {}), [t, e]);
|
|
2496
|
+
}
|
|
2497
|
+
function $n(t) {
|
|
2498
|
+
return ie(() => t ? Ro(t) : null, [t]);
|
|
2499
|
+
}
|
|
2500
|
+
const ln = [];
|
|
2501
|
+
function as(t, e) {
|
|
2502
|
+
e === void 0 && (e = bt);
|
|
2503
|
+
const [n] = t, r = $n(n ? we(n) : null), [o, s] = _e(ln);
|
|
2504
|
+
function a() {
|
|
2505
|
+
s(() => t.length ? t.map((c) => Sn(c) ? r : new qt(e(c), c)) : ln);
|
|
2506
|
+
}
|
|
2507
|
+
const i = Rt({
|
|
2508
|
+
callback: a
|
|
2509
|
+
});
|
|
2510
|
+
return Fe(() => {
|
|
2511
|
+
i == null || i.disconnect(), a(), t.forEach((c) => i == null ? void 0 : i.observe(c));
|
|
2512
|
+
}, [t]), o;
|
|
2513
|
+
}
|
|
2514
|
+
function ls(t) {
|
|
2515
|
+
if (!t)
|
|
2516
|
+
return null;
|
|
2517
|
+
if (t.children.length > 1)
|
|
2518
|
+
return t;
|
|
2519
|
+
const e = t.children[0];
|
|
2520
|
+
return Dt(e) ? e : t;
|
|
2521
|
+
}
|
|
2522
|
+
function cs(t) {
|
|
2523
|
+
let {
|
|
2524
|
+
measure: e
|
|
2525
|
+
} = t;
|
|
2526
|
+
const [n, r] = _e(null), o = ve((l) => {
|
|
2527
|
+
for (const {
|
|
2528
|
+
target: u
|
|
2529
|
+
} of l)
|
|
2530
|
+
if (Dt(u)) {
|
|
2531
|
+
r((d) => {
|
|
2532
|
+
const h = e(u);
|
|
2533
|
+
return d ? {
|
|
2534
|
+
...d,
|
|
2535
|
+
width: h.width,
|
|
2536
|
+
height: h.height
|
|
2537
|
+
} : h;
|
|
2538
|
+
});
|
|
2539
|
+
break;
|
|
2540
|
+
}
|
|
2541
|
+
}, [e]), s = Rt({
|
|
2542
|
+
callback: o
|
|
2543
|
+
}), a = ve((l) => {
|
|
2544
|
+
const u = ls(l);
|
|
2545
|
+
s == null || s.disconnect(), u && (s == null || s.observe(u)), r(u ? e(u) : null);
|
|
2546
|
+
}, [e, s]), [i, c] = Ct(a);
|
|
2547
|
+
return ie(() => ({
|
|
2548
|
+
nodeRef: i,
|
|
2549
|
+
rect: n,
|
|
2550
|
+
setRef: c
|
|
2551
|
+
}), [n, i, c]);
|
|
2552
|
+
}
|
|
2553
|
+
const us = [{
|
|
2554
|
+
sensor: Rn,
|
|
2555
|
+
options: {}
|
|
2556
|
+
}, {
|
|
2557
|
+
sensor: En,
|
|
2558
|
+
options: {}
|
|
2559
|
+
}], ds = {
|
|
2560
|
+
current: {}
|
|
2561
|
+
}, wt = {
|
|
2562
|
+
draggable: {
|
|
2563
|
+
measure: Qt
|
|
2564
|
+
},
|
|
2565
|
+
droppable: {
|
|
2566
|
+
measure: Qt,
|
|
2567
|
+
strategy: vt.WhileDragging,
|
|
2568
|
+
frequency: jt.Optimized
|
|
2569
|
+
},
|
|
2570
|
+
dragOverlay: {
|
|
2571
|
+
measure: bt
|
|
2572
|
+
}
|
|
2573
|
+
};
|
|
2574
|
+
class ft extends Map {
|
|
2575
|
+
get(e) {
|
|
2576
|
+
var n;
|
|
2577
|
+
return e != null && (n = super.get(e)) != null ? n : void 0;
|
|
2578
|
+
}
|
|
2579
|
+
toArray() {
|
|
2580
|
+
return Array.from(this.values());
|
|
2581
|
+
}
|
|
2582
|
+
getEnabled() {
|
|
2583
|
+
return this.toArray().filter((e) => {
|
|
2584
|
+
let {
|
|
2585
|
+
disabled: n
|
|
2586
|
+
} = e;
|
|
2587
|
+
return !n;
|
|
2588
|
+
});
|
|
2589
|
+
}
|
|
2590
|
+
getNodeFor(e) {
|
|
2591
|
+
var n, r;
|
|
2592
|
+
return (n = (r = this.get(e)) == null ? void 0 : r.node.current) != null ? n : void 0;
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
const fs = {
|
|
2596
|
+
activatorEvent: null,
|
|
2597
|
+
active: null,
|
|
2598
|
+
activeNode: null,
|
|
2599
|
+
activeNodeRect: null,
|
|
2600
|
+
collisions: null,
|
|
2601
|
+
containerNodeRect: null,
|
|
2602
|
+
draggableNodes: /* @__PURE__ */ new Map(),
|
|
2603
|
+
droppableRects: /* @__PURE__ */ new Map(),
|
|
2604
|
+
droppableContainers: /* @__PURE__ */ new ft(),
|
|
2605
|
+
over: null,
|
|
2606
|
+
dragOverlay: {
|
|
2607
|
+
nodeRef: {
|
|
2608
|
+
current: null
|
|
2609
|
+
},
|
|
2610
|
+
rect: null,
|
|
2611
|
+
setRef: St
|
|
2612
|
+
},
|
|
2613
|
+
scrollableAncestors: [],
|
|
2614
|
+
scrollableAncestorRects: [],
|
|
2615
|
+
measuringConfiguration: wt,
|
|
2616
|
+
measureDroppableContainers: St,
|
|
2617
|
+
windowRect: null,
|
|
2618
|
+
measuringScheduled: !1
|
|
2619
|
+
}, hs = {
|
|
2620
|
+
activatorEvent: null,
|
|
2621
|
+
activators: [],
|
|
2622
|
+
active: null,
|
|
2623
|
+
activeNodeRect: null,
|
|
2624
|
+
ariaDescribedById: {
|
|
2625
|
+
draggable: ""
|
|
2626
|
+
},
|
|
2627
|
+
dispatch: St,
|
|
2628
|
+
draggableNodes: /* @__PURE__ */ new Map(),
|
|
2629
|
+
over: null,
|
|
2630
|
+
measureDroppableContainers: St
|
|
2631
|
+
}, At = /* @__PURE__ */ gt(hs), ms = /* @__PURE__ */ gt(fs);
|
|
2632
|
+
function vs() {
|
|
2633
|
+
return {
|
|
2634
|
+
draggable: {
|
|
2635
|
+
active: null,
|
|
2636
|
+
initialCoordinates: {
|
|
2637
|
+
x: 0,
|
|
2638
|
+
y: 0
|
|
2639
|
+
},
|
|
2640
|
+
nodes: /* @__PURE__ */ new Map(),
|
|
2641
|
+
translate: {
|
|
2642
|
+
x: 0,
|
|
2643
|
+
y: 0
|
|
2644
|
+
}
|
|
2645
|
+
},
|
|
2646
|
+
droppable: {
|
|
2647
|
+
containers: new ft()
|
|
2648
|
+
}
|
|
2649
|
+
};
|
|
2650
|
+
}
|
|
2651
|
+
function gs(t, e) {
|
|
2652
|
+
switch (e.type) {
|
|
2653
|
+
case se.DragStart:
|
|
2654
|
+
return {
|
|
2655
|
+
...t,
|
|
2656
|
+
draggable: {
|
|
2657
|
+
...t.draggable,
|
|
2658
|
+
initialCoordinates: e.initialCoordinates,
|
|
2659
|
+
active: e.active
|
|
2660
|
+
}
|
|
2661
|
+
};
|
|
2662
|
+
case se.DragMove:
|
|
2663
|
+
return t.draggable.active == null ? t : {
|
|
2664
|
+
...t,
|
|
2665
|
+
draggable: {
|
|
2666
|
+
...t.draggable,
|
|
2667
|
+
translate: {
|
|
2668
|
+
x: e.coordinates.x - t.draggable.initialCoordinates.x,
|
|
2669
|
+
y: e.coordinates.y - t.draggable.initialCoordinates.y
|
|
2670
|
+
}
|
|
2671
|
+
}
|
|
2672
|
+
};
|
|
2673
|
+
case se.DragEnd:
|
|
2674
|
+
case se.DragCancel:
|
|
2675
|
+
return {
|
|
2676
|
+
...t,
|
|
2677
|
+
draggable: {
|
|
2678
|
+
...t.draggable,
|
|
2679
|
+
active: null,
|
|
2680
|
+
initialCoordinates: {
|
|
2681
|
+
x: 0,
|
|
2682
|
+
y: 0
|
|
2683
|
+
},
|
|
2684
|
+
translate: {
|
|
2685
|
+
x: 0,
|
|
2686
|
+
y: 0
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2689
|
+
};
|
|
2690
|
+
case se.RegisterDroppable: {
|
|
2691
|
+
const {
|
|
2692
|
+
element: n
|
|
2693
|
+
} = e, {
|
|
2694
|
+
id: r
|
|
2695
|
+
} = n, o = new ft(t.droppable.containers);
|
|
2696
|
+
return o.set(r, n), {
|
|
2697
|
+
...t,
|
|
2698
|
+
droppable: {
|
|
2699
|
+
...t.droppable,
|
|
2700
|
+
containers: o
|
|
2701
|
+
}
|
|
2702
|
+
};
|
|
2703
|
+
}
|
|
2704
|
+
case se.SetDroppableDisabled: {
|
|
2705
|
+
const {
|
|
2706
|
+
id: n,
|
|
2707
|
+
key: r,
|
|
2708
|
+
disabled: o
|
|
2709
|
+
} = e, s = t.droppable.containers.get(n);
|
|
2710
|
+
if (!s || r !== s.key)
|
|
2711
|
+
return t;
|
|
2712
|
+
const a = new ft(t.droppable.containers);
|
|
2713
|
+
return a.set(n, {
|
|
2714
|
+
...s,
|
|
2715
|
+
disabled: o
|
|
2716
|
+
}), {
|
|
2717
|
+
...t,
|
|
2718
|
+
droppable: {
|
|
2719
|
+
...t.droppable,
|
|
2720
|
+
containers: a
|
|
2721
|
+
}
|
|
2722
|
+
};
|
|
2723
|
+
}
|
|
2724
|
+
case se.UnregisterDroppable: {
|
|
2725
|
+
const {
|
|
2726
|
+
id: n,
|
|
2727
|
+
key: r
|
|
2728
|
+
} = e, o = t.droppable.containers.get(n);
|
|
2729
|
+
if (!o || r !== o.key)
|
|
2730
|
+
return t;
|
|
2731
|
+
const s = new ft(t.droppable.containers);
|
|
2732
|
+
return s.delete(n), {
|
|
2733
|
+
...t,
|
|
2734
|
+
droppable: {
|
|
2735
|
+
...t.droppable,
|
|
2736
|
+
containers: s
|
|
2737
|
+
}
|
|
2738
|
+
};
|
|
2739
|
+
}
|
|
2740
|
+
default:
|
|
2741
|
+
return t;
|
|
2742
|
+
}
|
|
2743
|
+
}
|
|
2744
|
+
function ps(t) {
|
|
2745
|
+
let {
|
|
2746
|
+
disabled: e
|
|
2747
|
+
} = t;
|
|
2748
|
+
const {
|
|
2749
|
+
active: n,
|
|
2750
|
+
activatorEvent: r,
|
|
2751
|
+
draggableNodes: o
|
|
2752
|
+
} = ht(At), s = Ht(r), a = Ht(n == null ? void 0 : n.id);
|
|
2753
|
+
return ee(() => {
|
|
2754
|
+
if (!e && !r && s && a != null) {
|
|
2755
|
+
if (!yn(s) || document.activeElement === s.target)
|
|
2756
|
+
return;
|
|
2757
|
+
const i = o.get(a);
|
|
2758
|
+
if (!i)
|
|
2759
|
+
return;
|
|
2760
|
+
const {
|
|
2761
|
+
activatorNode: c,
|
|
2762
|
+
node: l
|
|
2763
|
+
} = i;
|
|
2764
|
+
if (!c.current && !l.current)
|
|
2765
|
+
return;
|
|
2766
|
+
requestAnimationFrame(() => {
|
|
2767
|
+
for (const u of [c.current, l.current]) {
|
|
2768
|
+
if (!u)
|
|
2769
|
+
continue;
|
|
2770
|
+
const d = co(u);
|
|
2771
|
+
if (d) {
|
|
2772
|
+
d.focus();
|
|
2773
|
+
break;
|
|
2774
|
+
}
|
|
2775
|
+
}
|
|
2776
|
+
});
|
|
2777
|
+
}
|
|
2778
|
+
}, [r, e, o, a, s]), null;
|
|
2779
|
+
}
|
|
2780
|
+
function Ds(t, e) {
|
|
2781
|
+
let {
|
|
2782
|
+
transform: n,
|
|
2783
|
+
...r
|
|
2784
|
+
} = e;
|
|
2785
|
+
return t != null && t.length ? t.reduce((o, s) => s({
|
|
2786
|
+
transform: o,
|
|
2787
|
+
...r
|
|
2788
|
+
}), n) : n;
|
|
2789
|
+
}
|
|
2790
|
+
function ys(t) {
|
|
2791
|
+
return ie(
|
|
2792
|
+
() => ({
|
|
2793
|
+
draggable: {
|
|
2794
|
+
...wt.draggable,
|
|
2795
|
+
...t == null ? void 0 : t.draggable
|
|
2796
|
+
},
|
|
2797
|
+
droppable: {
|
|
2798
|
+
...wt.droppable,
|
|
2799
|
+
...t == null ? void 0 : t.droppable
|
|
2800
|
+
},
|
|
2801
|
+
dragOverlay: {
|
|
2802
|
+
...wt.dragOverlay,
|
|
2803
|
+
...t == null ? void 0 : t.dragOverlay
|
|
2804
|
+
}
|
|
2805
|
+
}),
|
|
2806
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2807
|
+
[t == null ? void 0 : t.draggable, t == null ? void 0 : t.droppable, t == null ? void 0 : t.dragOverlay]
|
|
2808
|
+
);
|
|
2809
|
+
}
|
|
2810
|
+
function bs(t) {
|
|
2811
|
+
let {
|
|
2812
|
+
activeNode: e,
|
|
2813
|
+
measure: n,
|
|
2814
|
+
initialRect: r,
|
|
2815
|
+
config: o = !0
|
|
2816
|
+
} = t;
|
|
2817
|
+
const s = J(!1), {
|
|
2818
|
+
x: a,
|
|
2819
|
+
y: i
|
|
2820
|
+
} = typeof o == "boolean" ? {
|
|
2821
|
+
x: o,
|
|
2822
|
+
y: o
|
|
2823
|
+
} : o;
|
|
2824
|
+
Fe(() => {
|
|
2825
|
+
if (!a && !i || !e) {
|
|
2826
|
+
s.current = !1;
|
|
2827
|
+
return;
|
|
2828
|
+
}
|
|
2829
|
+
if (s.current || !r)
|
|
2830
|
+
return;
|
|
2831
|
+
const l = e == null ? void 0 : e.node.current;
|
|
2832
|
+
if (!l || l.isConnected === !1)
|
|
2833
|
+
return;
|
|
2834
|
+
const u = n(l), d = xn(u, r);
|
|
2835
|
+
if (a || (d.x = 0), i || (d.y = 0), s.current = !0, Math.abs(d.x) > 0 || Math.abs(d.y) > 0) {
|
|
2836
|
+
const h = wn(l);
|
|
2837
|
+
h && h.scrollBy({
|
|
2838
|
+
top: d.y,
|
|
2839
|
+
left: d.x
|
|
2840
|
+
});
|
|
2841
|
+
}
|
|
2842
|
+
}, [e, a, i, r, n]);
|
|
2843
|
+
}
|
|
2844
|
+
const On = /* @__PURE__ */ gt({
|
|
2845
|
+
...Re,
|
|
2846
|
+
scaleX: 1,
|
|
2847
|
+
scaleY: 1
|
|
2848
|
+
});
|
|
2849
|
+
var Be;
|
|
2850
|
+
(function(t) {
|
|
2851
|
+
t[t.Uninitialized = 0] = "Uninitialized", t[t.Initializing = 1] = "Initializing", t[t.Initialized = 2] = "Initialized";
|
|
2852
|
+
})(Be || (Be = {}));
|
|
2853
|
+
const xs = /* @__PURE__ */ Hn(function(e) {
|
|
2854
|
+
var n, r, o, s;
|
|
2855
|
+
let {
|
|
2856
|
+
id: a,
|
|
2857
|
+
accessibility: i,
|
|
2858
|
+
autoScroll: c = !0,
|
|
2859
|
+
children: l,
|
|
2860
|
+
sensors: u = us,
|
|
2861
|
+
collisionDetection: d = Co,
|
|
2862
|
+
measuring: h,
|
|
2863
|
+
modifiers: g,
|
|
2864
|
+
...p
|
|
2865
|
+
} = e;
|
|
2866
|
+
const f = zn(gs, void 0, vs), [m, D] = f, [y, v] = go(), [M, x] = _e(Be.Uninitialized), T = M === Be.Initialized, {
|
|
2867
|
+
draggable: {
|
|
2868
|
+
active: w,
|
|
2869
|
+
nodes: b,
|
|
2870
|
+
translate: E
|
|
2871
|
+
},
|
|
2872
|
+
droppable: {
|
|
2873
|
+
containers: A
|
|
2874
|
+
}
|
|
2875
|
+
} = m, Y = w != null ? b.get(w) : null, R = J({
|
|
2876
|
+
initial: null,
|
|
2877
|
+
translated: null
|
|
2878
|
+
}), O = ie(() => {
|
|
2879
|
+
var G;
|
|
2880
|
+
return w != null ? {
|
|
2881
|
+
id: w,
|
|
2882
|
+
// It's possible for the active node to unmount while dragging
|
|
2883
|
+
data: (G = Y == null ? void 0 : Y.data) != null ? G : ds,
|
|
2884
|
+
rect: R
|
|
2885
|
+
} : null;
|
|
2886
|
+
}, [w, Y]), _ = J(null), [N, k] = _e(null), [I, X] = _e(null), F = mt(p, Object.values(p)), q = Et("DndDescribedBy", a), L = ie(() => A.getEnabled(), [A]), te = ys(h), {
|
|
2887
|
+
droppableRects: P,
|
|
2888
|
+
measureDroppableContainers: me,
|
|
2889
|
+
measuringScheduled: ge
|
|
2890
|
+
} = Jo(L, {
|
|
2891
|
+
dragging: T,
|
|
2892
|
+
dependencies: [E.x, E.y],
|
|
2893
|
+
config: te.droppable
|
|
2894
|
+
}), ne = Go(b, w), B = ie(() => I ? zt(I) : null, [I]), z = Pe(), j = Qo(ne, te.draggable.measure);
|
|
2895
|
+
bs({
|
|
2896
|
+
activeNode: w != null ? b.get(w) : null,
|
|
2897
|
+
config: z.layoutShiftCompensation,
|
|
2898
|
+
initialRect: j,
|
|
2899
|
+
measure: te.draggable.measure
|
|
2900
|
+
});
|
|
2901
|
+
const V = on(ne, te.draggable.measure, j), U = on(ne ? ne.parentElement : null), Z = J({
|
|
2902
|
+
activatorEvent: null,
|
|
2903
|
+
active: null,
|
|
2904
|
+
activeNode: ne,
|
|
2905
|
+
collisionRect: null,
|
|
2906
|
+
collisions: null,
|
|
2907
|
+
droppableRects: P,
|
|
2908
|
+
draggableNodes: b,
|
|
2909
|
+
draggingNode: null,
|
|
2910
|
+
draggingNodeRect: null,
|
|
2911
|
+
droppableContainers: A,
|
|
2912
|
+
over: null,
|
|
2913
|
+
scrollableAncestors: [],
|
|
2914
|
+
scrollAdjustedTranslate: null
|
|
2915
|
+
}), re = A.getNodeFor((n = Z.current.over) == null ? void 0 : n.id), ce = cs({
|
|
2916
|
+
measure: te.dragOverlay.measure
|
|
2917
|
+
}), pe = (r = ce.nodeRef.current) != null ? r : ne, De = T ? (o = ce.rect) != null ? o : V : null, He = !!(ce.nodeRef.current && ce.rect), Ee = ns(He ? null : V), Oe = $n(pe ? we(pe) : null), be = rs(T ? re ?? ne : null), Ge = as(be), Ne = Ds(g, {
|
|
2918
|
+
transform: {
|
|
2919
|
+
x: E.x - Ee.x,
|
|
2920
|
+
y: E.y - Ee.y,
|
|
2921
|
+
scaleX: 1,
|
|
2922
|
+
scaleY: 1
|
|
2923
|
+
},
|
|
2924
|
+
activatorEvent: I,
|
|
2925
|
+
active: O,
|
|
2926
|
+
activeNodeRect: V,
|
|
2927
|
+
containerNodeRect: U,
|
|
2928
|
+
draggingNodeRect: De,
|
|
2929
|
+
over: Z.current.over,
|
|
2930
|
+
overlayNodeRect: ce.rect,
|
|
2931
|
+
scrollableAncestors: be,
|
|
2932
|
+
scrollableAncestorRects: Ge,
|
|
2933
|
+
windowRect: Oe
|
|
2934
|
+
}), We = B ? et(B, E) : null, Xe = os(be), $t = an(Xe), Ke = an(Xe, [V]), Ve = et(Ne, $t), Ae = De ? To(De, Ne) : null, Le = O && Ae ? d({
|
|
2935
|
+
active: O,
|
|
2936
|
+
collisionRect: Ae,
|
|
2937
|
+
droppableRects: P,
|
|
2938
|
+
droppableContainers: L,
|
|
2939
|
+
pointerCoordinates: We
|
|
2940
|
+
}) : null, ke = xo(Le, "id"), [Se, Je] = _e(null), ot = He ? Ne : et(Ne, Ke), st = Mo(ot, (s = Se == null ? void 0 : Se.rect) != null ? s : null, V), Ue = J(null), Qe = ve(
|
|
2941
|
+
(G, ae) => {
|
|
2942
|
+
let {
|
|
2943
|
+
sensor: ue,
|
|
2944
|
+
options: ye
|
|
2945
|
+
} = ae;
|
|
2946
|
+
if (_.current == null)
|
|
2947
|
+
return;
|
|
2948
|
+
const oe = b.get(_.current);
|
|
2949
|
+
if (!oe)
|
|
2950
|
+
return;
|
|
2951
|
+
const de = G.nativeEvent, fe = new ue({
|
|
2952
|
+
active: _.current,
|
|
2953
|
+
activeNode: oe,
|
|
2954
|
+
event: de,
|
|
2955
|
+
options: ye,
|
|
2956
|
+
// Sensors need to be instantiated with refs for arguments that change over time
|
|
2957
|
+
// otherwise they are frozen in time with the stale arguments
|
|
2958
|
+
context: Z,
|
|
2959
|
+
onAbort(Q) {
|
|
2960
|
+
if (!b.get(Q))
|
|
2961
|
+
return;
|
|
2962
|
+
const {
|
|
2963
|
+
onDragAbort: K
|
|
2964
|
+
} = F.current, Me = {
|
|
2965
|
+
id: Q
|
|
2966
|
+
};
|
|
2967
|
+
K == null || K(Me), y({
|
|
2968
|
+
type: "onDragAbort",
|
|
2969
|
+
event: Me
|
|
2970
|
+
});
|
|
2971
|
+
},
|
|
2972
|
+
onPending(Q, H, K, Me) {
|
|
2973
|
+
if (!b.get(Q))
|
|
2974
|
+
return;
|
|
2975
|
+
const {
|
|
2976
|
+
onDragPending: qe
|
|
2977
|
+
} = F.current, $e = {
|
|
2978
|
+
id: Q,
|
|
2979
|
+
constraint: H,
|
|
2980
|
+
initialCoordinates: K,
|
|
2981
|
+
offset: Me
|
|
2982
|
+
};
|
|
2983
|
+
qe == null || qe($e), y({
|
|
2984
|
+
type: "onDragPending",
|
|
2985
|
+
event: $e
|
|
2986
|
+
});
|
|
2987
|
+
},
|
|
2988
|
+
onStart(Q) {
|
|
2989
|
+
const H = _.current;
|
|
2990
|
+
if (H == null)
|
|
2991
|
+
return;
|
|
2992
|
+
const K = b.get(H);
|
|
2993
|
+
if (!K)
|
|
2994
|
+
return;
|
|
2995
|
+
const {
|
|
2996
|
+
onDragStart: Me
|
|
2997
|
+
} = F.current, Te = {
|
|
2998
|
+
activatorEvent: de,
|
|
2999
|
+
active: {
|
|
3000
|
+
id: H,
|
|
3001
|
+
data: K.data,
|
|
3002
|
+
rect: R
|
|
3003
|
+
}
|
|
3004
|
+
};
|
|
3005
|
+
xt(() => {
|
|
3006
|
+
Me == null || Me(Te), x(Be.Initializing), D({
|
|
3007
|
+
type: se.DragStart,
|
|
3008
|
+
initialCoordinates: Q,
|
|
3009
|
+
active: H
|
|
3010
|
+
}), y({
|
|
3011
|
+
type: "onDragStart",
|
|
3012
|
+
event: Te
|
|
3013
|
+
}), k(Ue.current), X(de);
|
|
3014
|
+
});
|
|
3015
|
+
},
|
|
3016
|
+
onMove(Q) {
|
|
3017
|
+
D({
|
|
3018
|
+
type: se.DragMove,
|
|
3019
|
+
coordinates: Q
|
|
3020
|
+
});
|
|
3021
|
+
},
|
|
3022
|
+
onEnd: Ce(se.DragEnd),
|
|
3023
|
+
onCancel: Ce(se.DragCancel)
|
|
3024
|
+
});
|
|
3025
|
+
Ue.current = fe;
|
|
3026
|
+
function Ce(Q) {
|
|
3027
|
+
return async function() {
|
|
3028
|
+
const {
|
|
3029
|
+
active: K,
|
|
3030
|
+
collisions: Me,
|
|
3031
|
+
over: Te,
|
|
3032
|
+
scrollAdjustedTranslate: qe
|
|
3033
|
+
} = Z.current;
|
|
3034
|
+
let $e = null;
|
|
3035
|
+
if (K && qe) {
|
|
3036
|
+
const {
|
|
3037
|
+
cancelDrop: lt
|
|
3038
|
+
} = F.current;
|
|
3039
|
+
$e = {
|
|
3040
|
+
activatorEvent: de,
|
|
3041
|
+
active: K,
|
|
3042
|
+
collisions: Me,
|
|
3043
|
+
delta: qe,
|
|
3044
|
+
over: Te
|
|
3045
|
+
}, Q === se.DragEnd && typeof lt == "function" && await Promise.resolve(lt($e)) && (Q = se.DragCancel);
|
|
3046
|
+
}
|
|
3047
|
+
_.current = null, xt(() => {
|
|
3048
|
+
D({
|
|
3049
|
+
type: Q
|
|
3050
|
+
}), x(Be.Uninitialized), Je(null), k(null), X(null), Ue.current = null;
|
|
3051
|
+
const lt = Q === se.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
3052
|
+
if ($e) {
|
|
3053
|
+
const Ot = F.current[lt];
|
|
3054
|
+
Ot == null || Ot($e), y({
|
|
3055
|
+
type: lt,
|
|
3056
|
+
event: $e
|
|
3057
|
+
});
|
|
3058
|
+
}
|
|
3059
|
+
});
|
|
3060
|
+
};
|
|
3061
|
+
}
|
|
3062
|
+
},
|
|
3063
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3064
|
+
[b]
|
|
3065
|
+
), it = ve((G, ae) => (ue, ye) => {
|
|
3066
|
+
const oe = ue.nativeEvent, de = b.get(ye);
|
|
3067
|
+
if (
|
|
3068
|
+
// Another sensor is already instantiating
|
|
3069
|
+
_.current !== null || // No active draggable
|
|
3070
|
+
!de || // Event has already been captured
|
|
3071
|
+
oe.dndKit || oe.defaultPrevented
|
|
3072
|
+
)
|
|
3073
|
+
return;
|
|
3074
|
+
const fe = {
|
|
3075
|
+
active: de
|
|
3076
|
+
};
|
|
3077
|
+
G(ue, ae.options, fe) === !0 && (oe.dndKit = {
|
|
3078
|
+
capturedBy: ae.sensor
|
|
3079
|
+
}, _.current = ye, Qe(ue, ae));
|
|
3080
|
+
}, [b, Qe]), Ze = Ko(u, it);
|
|
3081
|
+
ss(u), Fe(() => {
|
|
3082
|
+
V && M === Be.Initializing && x(Be.Initialized);
|
|
3083
|
+
}, [V, M]), ee(
|
|
3084
|
+
() => {
|
|
3085
|
+
const {
|
|
3086
|
+
onDragMove: G
|
|
3087
|
+
} = F.current, {
|
|
3088
|
+
active: ae,
|
|
3089
|
+
activatorEvent: ue,
|
|
3090
|
+
collisions: ye,
|
|
3091
|
+
over: oe
|
|
3092
|
+
} = Z.current;
|
|
3093
|
+
if (!ae || !ue)
|
|
3094
|
+
return;
|
|
3095
|
+
const de = {
|
|
3096
|
+
active: ae,
|
|
3097
|
+
activatorEvent: ue,
|
|
3098
|
+
collisions: ye,
|
|
3099
|
+
delta: {
|
|
3100
|
+
x: Ve.x,
|
|
3101
|
+
y: Ve.y
|
|
3102
|
+
},
|
|
3103
|
+
over: oe
|
|
3104
|
+
};
|
|
3105
|
+
xt(() => {
|
|
3106
|
+
G == null || G(de), y({
|
|
3107
|
+
type: "onDragMove",
|
|
3108
|
+
event: de
|
|
3109
|
+
});
|
|
3110
|
+
});
|
|
3111
|
+
},
|
|
3112
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3113
|
+
[Ve.x, Ve.y]
|
|
3114
|
+
), ee(
|
|
3115
|
+
() => {
|
|
3116
|
+
const {
|
|
3117
|
+
active: G,
|
|
3118
|
+
activatorEvent: ae,
|
|
3119
|
+
collisions: ue,
|
|
3120
|
+
droppableContainers: ye,
|
|
3121
|
+
scrollAdjustedTranslate: oe
|
|
3122
|
+
} = Z.current;
|
|
3123
|
+
if (!G || _.current == null || !ae || !oe)
|
|
3124
|
+
return;
|
|
3125
|
+
const {
|
|
3126
|
+
onDragOver: de
|
|
3127
|
+
} = F.current, fe = ye.get(ke), Ce = fe && fe.rect.current ? {
|
|
3128
|
+
id: fe.id,
|
|
3129
|
+
rect: fe.rect.current,
|
|
3130
|
+
data: fe.data,
|
|
3131
|
+
disabled: fe.disabled
|
|
3132
|
+
} : null, Q = {
|
|
3133
|
+
active: G,
|
|
3134
|
+
activatorEvent: ae,
|
|
3135
|
+
collisions: ue,
|
|
3136
|
+
delta: {
|
|
3137
|
+
x: oe.x,
|
|
3138
|
+
y: oe.y
|
|
3139
|
+
},
|
|
3140
|
+
over: Ce
|
|
3141
|
+
};
|
|
3142
|
+
xt(() => {
|
|
3143
|
+
Je(Ce), de == null || de(Q), y({
|
|
3144
|
+
type: "onDragOver",
|
|
3145
|
+
event: Q
|
|
3146
|
+
});
|
|
3147
|
+
});
|
|
3148
|
+
},
|
|
3149
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3150
|
+
[ke]
|
|
3151
|
+
), Fe(() => {
|
|
3152
|
+
Z.current = {
|
|
3153
|
+
activatorEvent: I,
|
|
3154
|
+
active: O,
|
|
3155
|
+
activeNode: ne,
|
|
3156
|
+
collisionRect: Ae,
|
|
3157
|
+
collisions: Le,
|
|
3158
|
+
droppableRects: P,
|
|
3159
|
+
draggableNodes: b,
|
|
3160
|
+
draggingNode: pe,
|
|
3161
|
+
draggingNodeRect: De,
|
|
3162
|
+
droppableContainers: A,
|
|
3163
|
+
over: Se,
|
|
3164
|
+
scrollableAncestors: be,
|
|
3165
|
+
scrollAdjustedTranslate: Ve
|
|
3166
|
+
}, R.current = {
|
|
3167
|
+
initial: De,
|
|
3168
|
+
translated: Ae
|
|
3169
|
+
};
|
|
3170
|
+
}, [O, ne, Le, Ae, b, pe, De, P, A, Se, be, Ve]), Uo({
|
|
3171
|
+
...z,
|
|
3172
|
+
delta: E,
|
|
3173
|
+
draggingRect: Ae,
|
|
3174
|
+
pointerCoordinates: We,
|
|
3175
|
+
scrollableAncestors: be,
|
|
3176
|
+
scrollableAncestorRects: Ge
|
|
3177
|
+
});
|
|
3178
|
+
const at = ie(() => ({
|
|
3179
|
+
active: O,
|
|
3180
|
+
activeNode: ne,
|
|
3181
|
+
activeNodeRect: V,
|
|
3182
|
+
activatorEvent: I,
|
|
3183
|
+
collisions: Le,
|
|
3184
|
+
containerNodeRect: U,
|
|
3185
|
+
dragOverlay: ce,
|
|
3186
|
+
draggableNodes: b,
|
|
3187
|
+
droppableContainers: A,
|
|
3188
|
+
droppableRects: P,
|
|
3189
|
+
over: Se,
|
|
3190
|
+
measureDroppableContainers: me,
|
|
3191
|
+
scrollableAncestors: be,
|
|
3192
|
+
scrollableAncestorRects: Ge,
|
|
3193
|
+
measuringConfiguration: te,
|
|
3194
|
+
measuringScheduled: ge,
|
|
3195
|
+
windowRect: Oe
|
|
3196
|
+
}), [O, ne, V, I, Le, U, ce, b, A, P, Se, me, be, Ge, te, ge, Oe]), ze = ie(() => ({
|
|
3197
|
+
activatorEvent: I,
|
|
3198
|
+
activators: Ze,
|
|
3199
|
+
active: O,
|
|
3200
|
+
activeNodeRect: V,
|
|
3201
|
+
ariaDescribedById: {
|
|
3202
|
+
draggable: q
|
|
3203
|
+
},
|
|
3204
|
+
dispatch: D,
|
|
3205
|
+
draggableNodes: b,
|
|
3206
|
+
over: Se,
|
|
3207
|
+
measureDroppableContainers: me
|
|
3208
|
+
}), [I, Ze, O, V, D, q, b, Se, me]);
|
|
3209
|
+
return S.createElement(bn.Provider, {
|
|
3210
|
+
value: v
|
|
3211
|
+
}, S.createElement(At.Provider, {
|
|
3212
|
+
value: ze
|
|
3213
|
+
}, S.createElement(ms.Provider, {
|
|
3214
|
+
value: at
|
|
3215
|
+
}, S.createElement(On.Provider, {
|
|
3216
|
+
value: st
|
|
3217
|
+
}, l)), S.createElement(ps, {
|
|
3218
|
+
disabled: (i == null ? void 0 : i.restoreFocus) === !1
|
|
3219
|
+
})), S.createElement(yo, {
|
|
3220
|
+
...i,
|
|
3221
|
+
hiddenTextDescribedById: q
|
|
3222
|
+
}));
|
|
3223
|
+
function Pe() {
|
|
3224
|
+
const G = (N == null ? void 0 : N.autoScrollEnabled) === !1, ae = typeof c == "object" ? c.enabled === !1 : c === !1, ue = T && !G && !ae;
|
|
3225
|
+
return typeof c == "object" ? {
|
|
3226
|
+
...c,
|
|
3227
|
+
enabled: ue
|
|
3228
|
+
} : {
|
|
3229
|
+
enabled: ue
|
|
3230
|
+
};
|
|
3231
|
+
}
|
|
3232
|
+
}), ws = /* @__PURE__ */ gt(null), cn = "button", Cs = "Draggable";
|
|
3233
|
+
function Ms(t) {
|
|
3234
|
+
let {
|
|
3235
|
+
id: e,
|
|
3236
|
+
data: n,
|
|
3237
|
+
disabled: r = !1,
|
|
3238
|
+
attributes: o
|
|
3239
|
+
} = t;
|
|
3240
|
+
const s = Et(Cs), {
|
|
3241
|
+
activators: a,
|
|
3242
|
+
activatorEvent: i,
|
|
3243
|
+
active: c,
|
|
3244
|
+
activeNodeRect: l,
|
|
3245
|
+
ariaDescribedById: u,
|
|
3246
|
+
draggableNodes: d,
|
|
3247
|
+
over: h
|
|
3248
|
+
} = ht(At), {
|
|
3249
|
+
role: g = cn,
|
|
3250
|
+
roleDescription: p = "draggable",
|
|
3251
|
+
tabIndex: f = 0
|
|
3252
|
+
} = o ?? {}, m = (c == null ? void 0 : c.id) === e, D = ht(m ? On : ws), [y, v] = Ct(), [M, x] = Ct(), T = is(a, e), w = mt(n);
|
|
3253
|
+
Fe(
|
|
3254
|
+
() => (d.set(e, {
|
|
3255
|
+
id: e,
|
|
3256
|
+
key: s,
|
|
3257
|
+
node: y,
|
|
3258
|
+
activatorNode: M,
|
|
3259
|
+
data: w
|
|
3260
|
+
}), () => {
|
|
3261
|
+
const E = d.get(e);
|
|
3262
|
+
E && E.key === s && d.delete(e);
|
|
3263
|
+
}),
|
|
3264
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3265
|
+
[d, e]
|
|
3266
|
+
);
|
|
3267
|
+
const b = ie(() => ({
|
|
3268
|
+
role: g,
|
|
3269
|
+
tabIndex: f,
|
|
3270
|
+
"aria-disabled": r,
|
|
3271
|
+
"aria-pressed": m && g === cn ? !0 : void 0,
|
|
3272
|
+
"aria-roledescription": p,
|
|
3273
|
+
"aria-describedby": u.draggable
|
|
3274
|
+
}), [r, g, f, m, p, u.draggable]);
|
|
3275
|
+
return {
|
|
3276
|
+
active: c,
|
|
3277
|
+
activatorEvent: i,
|
|
3278
|
+
activeNodeRect: l,
|
|
3279
|
+
attributes: b,
|
|
3280
|
+
isDragging: m,
|
|
3281
|
+
listeners: r ? void 0 : T,
|
|
3282
|
+
node: y,
|
|
3283
|
+
over: h,
|
|
3284
|
+
setNodeRef: v,
|
|
3285
|
+
setActivatorNodeRef: x,
|
|
3286
|
+
transform: D
|
|
3287
|
+
};
|
|
3288
|
+
}
|
|
3289
|
+
const Ss = "Droppable", Ts = {
|
|
3290
|
+
timeout: 25
|
|
3291
|
+
};
|
|
3292
|
+
function Ys(t) {
|
|
3293
|
+
let {
|
|
3294
|
+
data: e,
|
|
3295
|
+
disabled: n = !1,
|
|
3296
|
+
id: r,
|
|
3297
|
+
resizeObserverConfig: o
|
|
3298
|
+
} = t;
|
|
3299
|
+
const s = Et(Ss), {
|
|
3300
|
+
active: a,
|
|
3301
|
+
dispatch: i,
|
|
3302
|
+
over: c,
|
|
3303
|
+
measureDroppableContainers: l
|
|
3304
|
+
} = ht(At), u = J({
|
|
3305
|
+
disabled: n
|
|
3306
|
+
}), d = J(!1), h = J(null), g = J(null), {
|
|
3307
|
+
disabled: p,
|
|
3308
|
+
updateMeasurementsFor: f,
|
|
3309
|
+
timeout: m
|
|
3310
|
+
} = {
|
|
3311
|
+
...Ts,
|
|
3312
|
+
...o
|
|
3313
|
+
}, D = mt(f ?? r), y = ve(
|
|
3314
|
+
() => {
|
|
3315
|
+
if (!d.current) {
|
|
3316
|
+
d.current = !0;
|
|
3317
|
+
return;
|
|
3318
|
+
}
|
|
3319
|
+
g.current != null && clearTimeout(g.current), g.current = setTimeout(() => {
|
|
3320
|
+
l(Array.isArray(D.current) ? D.current : [D.current]), g.current = null;
|
|
3321
|
+
}, m);
|
|
3322
|
+
},
|
|
3323
|
+
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3324
|
+
[m]
|
|
3325
|
+
), v = Rt({
|
|
3326
|
+
callback: y,
|
|
3327
|
+
disabled: p || !a
|
|
3328
|
+
}), M = ve((b, E) => {
|
|
3329
|
+
v && (E && (v.unobserve(E), d.current = !1), b && v.observe(b));
|
|
3330
|
+
}, [v]), [x, T] = Ct(M), w = mt(e);
|
|
3331
|
+
return ee(() => {
|
|
3332
|
+
!v || !x.current || (v.disconnect(), d.current = !1, v.observe(x.current));
|
|
3333
|
+
}, [x, v]), ee(
|
|
3334
|
+
() => (i({
|
|
3335
|
+
type: se.RegisterDroppable,
|
|
3336
|
+
element: {
|
|
3337
|
+
id: r,
|
|
3338
|
+
key: s,
|
|
3339
|
+
disabled: n,
|
|
3340
|
+
node: x,
|
|
3341
|
+
rect: h,
|
|
3342
|
+
data: w
|
|
3343
|
+
}
|
|
3344
|
+
}), () => i({
|
|
3345
|
+
type: se.UnregisterDroppable,
|
|
3346
|
+
key: s,
|
|
3347
|
+
id: r
|
|
3348
|
+
})),
|
|
3349
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3350
|
+
[r]
|
|
3351
|
+
), ee(() => {
|
|
3352
|
+
n !== u.current.disabled && (i({
|
|
3353
|
+
type: se.SetDroppableDisabled,
|
|
3354
|
+
id: r,
|
|
3355
|
+
key: s,
|
|
3356
|
+
disabled: n
|
|
3357
|
+
}), u.current.disabled = n);
|
|
3358
|
+
}, [r, s, n, i]), {
|
|
3359
|
+
active: a,
|
|
3360
|
+
rect: h,
|
|
3361
|
+
isOver: (c == null ? void 0 : c.id) === r,
|
|
3362
|
+
node: x,
|
|
3363
|
+
over: c,
|
|
3364
|
+
setNodeRef: T
|
|
3365
|
+
};
|
|
3366
|
+
}
|
|
3367
|
+
const Nn = {
|
|
3368
|
+
minHour: 0,
|
|
3369
|
+
maxHour: 24,
|
|
3370
|
+
columnCount: 5,
|
|
3371
|
+
step: 15,
|
|
3372
|
+
enableCreateByDrag: !0,
|
|
3373
|
+
enableMoveByDrag: !0,
|
|
3374
|
+
popperHideDelay: 200,
|
|
3375
|
+
popperOffset: [0, 0]
|
|
3376
|
+
}, rt = S.createContext(Nn);
|
|
3377
|
+
C.extend(vn);
|
|
3378
|
+
C.extend(hn);
|
|
3379
|
+
const _s = (t) => {
|
|
3380
|
+
const [e, n] = t.split(":"), r = e[0], o = e.slice(1);
|
|
3381
|
+
return `GMT ${r}${o}${n !== "00" ? `:${n}` : ""}`;
|
|
3382
|
+
}, Es = () => {
|
|
3383
|
+
const t = C.tz.guess(), e = C().tz(t).format("Z");
|
|
3384
|
+
return _s(e);
|
|
3385
|
+
}, Rs = /* @__PURE__ */ new Map([["ko", ["일", "월", "화", "수", "목", "금", "토"]], ["en", ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]], ["ja", ["日", "月", "火", "水", "木", "金", "土"]], ["zh", ["日", "一", "二", "三", "四", "五", "六"]], ["vi", ["CN", "T2", "T3", "T4", "T5", "T6", "T7"]], ["fr", ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"]], ["de", ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"]], ["es", ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"]], ["it", ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"]], ["ru", ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"]]]), Ln = (t, e = "ko") => {
|
|
3386
|
+
var n;
|
|
3387
|
+
return (n = Rs.get(e)) == null ? void 0 : n[t];
|
|
3388
|
+
};
|
|
3389
|
+
function un(t) {
|
|
3390
|
+
const {
|
|
3391
|
+
clickOffsetY: e,
|
|
3392
|
+
columnHeight: n,
|
|
3393
|
+
date: r,
|
|
3394
|
+
minHour: o = 0,
|
|
3395
|
+
maxHour: s = 24,
|
|
3396
|
+
step: a = 15
|
|
3397
|
+
} = t, i = e / n, c = Math.max(0, Math.min(1, i)), l = s - o, d = (o + c * l) * 60, h = d % a, g = a / 2;
|
|
3398
|
+
let p = 0;
|
|
3399
|
+
h >= g ? p = d + (a - h) : p = d - h;
|
|
3400
|
+
const f = Math.floor(p / 60), m = Math.floor(p % 60);
|
|
3401
|
+
return C(r).startOf("day").add(f, "hour").add(m, "minute");
|
|
3402
|
+
}
|
|
3403
|
+
function As(t) {
|
|
3404
|
+
const {
|
|
3405
|
+
id: e,
|
|
3406
|
+
startTime: n,
|
|
3407
|
+
endTime: r,
|
|
3408
|
+
createdAt: o
|
|
3409
|
+
} = t, s = C(n);
|
|
3410
|
+
if (!r)
|
|
3411
|
+
return [{
|
|
3412
|
+
...t,
|
|
3413
|
+
// id, startTime, createdAt 그대로
|
|
3414
|
+
isAllDay: !0
|
|
3415
|
+
}];
|
|
3416
|
+
const a = C(r);
|
|
3417
|
+
if (a.isBefore(s))
|
|
3418
|
+
return [{
|
|
3419
|
+
...t,
|
|
3420
|
+
isAllDay: !1,
|
|
3421
|
+
realStartTime: s.format("YYYY-MM-DD HH:mm:ss"),
|
|
3422
|
+
realEndTime: a.format("YYYY-MM-DD HH:mm:ss")
|
|
3423
|
+
}];
|
|
3424
|
+
if (a.diff(s, "hours", !0) >= 24)
|
|
3425
|
+
return [{
|
|
3426
|
+
...t,
|
|
3427
|
+
isAllDay: !0,
|
|
3428
|
+
realStartTime: s.format("YYYY-MM-DD HH:mm:ss"),
|
|
3429
|
+
realEndTime: a.format("YYYY-MM-DD HH:mm:ss")
|
|
3430
|
+
}];
|
|
3431
|
+
const c = [];
|
|
3432
|
+
let l = s.clone();
|
|
3433
|
+
for (; l.isBefore(a); ) {
|
|
3434
|
+
const u = l.endOf("day"), d = u.isBefore(a) ? u : a;
|
|
3435
|
+
c.push({
|
|
3436
|
+
...t,
|
|
3437
|
+
id: e,
|
|
3438
|
+
createdAt: o,
|
|
3439
|
+
// 여기서는 endTime이 존재 -> currentEnd도 잘 정의됨
|
|
3440
|
+
startTime: l.format("YYYY-MM-DD HH:mm:ss"),
|
|
3441
|
+
endTime: d.format("YYYY-MM-DD HH:mm:ss"),
|
|
3442
|
+
isAllDay: !1,
|
|
3443
|
+
realStartTime: s.format("YYYY-MM-DD HH:mm:ss"),
|
|
3444
|
+
realEndTime: a.format("YYYY-MM-DD HH:mm:ss")
|
|
3445
|
+
}), l = d.add(1, "millisecond");
|
|
3446
|
+
}
|
|
3447
|
+
return c;
|
|
3448
|
+
}
|
|
3449
|
+
function $s(t) {
|
|
3450
|
+
const e = [];
|
|
3451
|
+
for (const n of t) {
|
|
3452
|
+
const r = As(n);
|
|
3453
|
+
e.push(...r);
|
|
3454
|
+
}
|
|
3455
|
+
return e;
|
|
3456
|
+
}
|
|
3457
|
+
function Os({
|
|
3458
|
+
startTime: t,
|
|
3459
|
+
endTime: e,
|
|
3460
|
+
minHour: n,
|
|
3461
|
+
maxHour: r
|
|
3462
|
+
}) {
|
|
3463
|
+
const o = C(t), s = C(e), a = o.startOf("day"), i = a.add(n, "hour").valueOf(), c = a.add(r, "hour").valueOf(), l = c - i;
|
|
3464
|
+
let u = o.valueOf(), d = s.valueOf();
|
|
3465
|
+
u < i && (u = i), d > c && (d = c), d < u && (d = u);
|
|
3466
|
+
const h = (u - i) / l, g = (d - i) / l, p = h * 100, f = Math.max(0, g - h) * 100;
|
|
3467
|
+
return {
|
|
3468
|
+
topPercent: p,
|
|
3469
|
+
heightPercent: f
|
|
3470
|
+
};
|
|
3471
|
+
}
|
|
3472
|
+
function Ns(t, e, n, r) {
|
|
3473
|
+
const o = C(t), s = C(e), a = o.startOf("day"), i = a.add(n, "hour").valueOf(), c = a.add(r, "hour").valueOf(), l = o.valueOf();
|
|
3474
|
+
return s.valueOf() > i && l < c;
|
|
3475
|
+
}
|
|
3476
|
+
function Ls({
|
|
3477
|
+
events: t,
|
|
3478
|
+
minHour: e,
|
|
3479
|
+
maxHour: n
|
|
3480
|
+
}) {
|
|
3481
|
+
const r = [...t].sort((l, u) => {
|
|
3482
|
+
const d = C(l.startTime).valueOf(), h = C(u.startTime).valueOf();
|
|
3483
|
+
if (d !== h) return d - h;
|
|
3484
|
+
const g = l.endTime ? C(l.endTime).valueOf() : d, p = u.endTime ? C(u.endTime).valueOf() : h;
|
|
3485
|
+
if (g !== p) return g - p;
|
|
3486
|
+
const f = l.title || "", m = u.title || "";
|
|
3487
|
+
return f !== m ? f.localeCompare(m) : C(l.createdAt).valueOf() - C(u.createdAt).valueOf();
|
|
3488
|
+
}), o = [], s = [];
|
|
3489
|
+
function a(l) {
|
|
3490
|
+
for (let u = s.length - 1; u >= 0; u--)
|
|
3491
|
+
s[u].ev.endVal <= l && s.splice(u, 1);
|
|
3492
|
+
}
|
|
3493
|
+
function i() {
|
|
3494
|
+
const l = /* @__PURE__ */ new Set();
|
|
3495
|
+
for (const d of s)
|
|
3496
|
+
l.add(d.ev.columnIndex);
|
|
3497
|
+
let u = 0;
|
|
3498
|
+
for (; l.has(u); )
|
|
3499
|
+
u++;
|
|
3500
|
+
return u;
|
|
3501
|
+
}
|
|
3502
|
+
for (const l of r) {
|
|
3503
|
+
const u = C(l.startTime).valueOf(), d = l.endTime ? C(l.endTime).valueOf() : u;
|
|
3504
|
+
a(u);
|
|
3505
|
+
const h = l.endTime || l.startTime, {
|
|
3506
|
+
topPercent: g,
|
|
3507
|
+
heightPercent: p
|
|
3508
|
+
} = Os({
|
|
3509
|
+
startTime: l.startTime,
|
|
3510
|
+
endTime: h,
|
|
3511
|
+
minHour: e,
|
|
3512
|
+
maxHour: n
|
|
3513
|
+
});
|
|
3514
|
+
if (p <= 0 && !Ns(l.startTime, h, e, n))
|
|
3515
|
+
continue;
|
|
3516
|
+
const f = {
|
|
3517
|
+
...l,
|
|
3518
|
+
startVal: u,
|
|
3519
|
+
endVal: d,
|
|
3520
|
+
duration: d - u,
|
|
3521
|
+
created: C(l.createdAt).valueOf(),
|
|
3522
|
+
columnIndex: -1,
|
|
3523
|
+
columnsCount: 1,
|
|
3524
|
+
topPercent: g,
|
|
3525
|
+
heightPercent: p,
|
|
3526
|
+
zIndex: 1,
|
|
3527
|
+
startStr: l.startTime,
|
|
3528
|
+
endStr: l.endTime || l.startTime,
|
|
3529
|
+
realStartTime: l.realStartTime,
|
|
3530
|
+
realEndTime: l.realEndTime
|
|
3531
|
+
}, m = i();
|
|
3532
|
+
f.columnIndex = m, s.push({
|
|
3533
|
+
ev: f
|
|
3534
|
+
});
|
|
3535
|
+
let D = 0;
|
|
3536
|
+
for (const v of s)
|
|
3537
|
+
v.ev.columnIndex > D && (D = v.ev.columnIndex);
|
|
3538
|
+
const y = D + 1;
|
|
3539
|
+
for (const v of s)
|
|
3540
|
+
v.ev.columnsCount = Math.max(v.ev.columnsCount, y);
|
|
3541
|
+
o.push(f);
|
|
3542
|
+
}
|
|
3543
|
+
for (let l = 0; l < o.length; l++)
|
|
3544
|
+
for (let u = l + 1; u < o.length; u++) {
|
|
3545
|
+
const d = o[l], h = o[u];
|
|
3546
|
+
d.startVal < h.endVal && h.startVal < d.endVal && (d.duration !== h.duration ? d.duration < h.duration ? d.zIndex <= h.zIndex && (d.zIndex = h.zIndex + 1) : h.zIndex <= d.zIndex && (h.zIndex = d.zIndex + 1) : d.created < h.created ? h.zIndex <= d.zIndex && (h.zIndex = d.zIndex + 1) : d.created > h.created && d.zIndex <= h.zIndex && (d.zIndex = h.zIndex + 1));
|
|
3547
|
+
}
|
|
3548
|
+
return o.map((l) => {
|
|
3549
|
+
const u = 100 / l.columnsCount, d = u * l.columnIndex;
|
|
3550
|
+
return {
|
|
3551
|
+
...l,
|
|
3552
|
+
leftPercent: d,
|
|
3553
|
+
widthPercent: u,
|
|
3554
|
+
startTime: l.startStr,
|
|
3555
|
+
endTime: l.endStr
|
|
3556
|
+
};
|
|
3557
|
+
});
|
|
3558
|
+
}
|
|
3559
|
+
var kn = { exports: {} };
|
|
3560
|
+
(function(t, e) {
|
|
3561
|
+
(function(n, r) {
|
|
3562
|
+
t.exports = r();
|
|
3563
|
+
})(pt, function() {
|
|
3564
|
+
return function(n, r, o) {
|
|
3565
|
+
var s = function(a, i) {
|
|
3566
|
+
if (!i || !i.length || i.length === 1 && !i[0] || i.length === 1 && Array.isArray(i[0]) && !i[0].length) return null;
|
|
3567
|
+
var c;
|
|
3568
|
+
i.length === 1 && i[0].length > 0 && (i = i[0]), c = (i = i.filter(function(u) {
|
|
3569
|
+
return u;
|
|
3570
|
+
}))[0];
|
|
3571
|
+
for (var l = 1; l < i.length; l += 1) i[l].isValid() && !i[l][a](c) || (c = i[l]);
|
|
3572
|
+
return c;
|
|
3573
|
+
};
|
|
3574
|
+
o.max = function() {
|
|
3575
|
+
var a = [].slice.call(arguments, 0);
|
|
3576
|
+
return s("isAfter", a);
|
|
3577
|
+
}, o.min = function() {
|
|
3578
|
+
var a = [].slice.call(arguments, 0);
|
|
3579
|
+
return s("isBefore", a);
|
|
3580
|
+
};
|
|
3581
|
+
};
|
|
3582
|
+
});
|
|
3583
|
+
})(kn);
|
|
3584
|
+
var ks = kn.exports;
|
|
3585
|
+
const Is = /* @__PURE__ */ Yt(ks);
|
|
3586
|
+
C.extend(Is);
|
|
3587
|
+
const he = Ft.bind(so), Hs = (t) => {
|
|
3588
|
+
const {
|
|
3589
|
+
id: e,
|
|
3590
|
+
height: n,
|
|
3591
|
+
widthPercent: r,
|
|
3592
|
+
leftPercent: o,
|
|
3593
|
+
topPercent: s,
|
|
3594
|
+
title: a,
|
|
3595
|
+
realStartTime: i,
|
|
3596
|
+
realEndTime: c
|
|
3597
|
+
} = t, {
|
|
3598
|
+
currentDate: l,
|
|
3599
|
+
columnCount: u,
|
|
3600
|
+
enableMoveByDrag: d,
|
|
3601
|
+
popperHideDelay: h,
|
|
3602
|
+
popperOffset: g,
|
|
3603
|
+
eventItemAs: p,
|
|
3604
|
+
eventItemPopperAs: f
|
|
3605
|
+
} = S.useContext(rt), {
|
|
3606
|
+
setNodeRef: m,
|
|
3607
|
+
listeners: D,
|
|
3608
|
+
attributes: y,
|
|
3609
|
+
transform: v,
|
|
3610
|
+
active: M
|
|
3611
|
+
} = Ms({
|
|
3612
|
+
id: e,
|
|
3613
|
+
data: {
|
|
3614
|
+
supports: new Array(u).fill(0).map((L, te) => C(l).add(te, "day").format("YYYY-MM-DD")),
|
|
3615
|
+
attributes: {
|
|
3616
|
+
"data-id": e
|
|
3617
|
+
}
|
|
3618
|
+
}
|
|
3619
|
+
}), [x, T] = S.useState(null), [w, b] = S.useState(null), [E, A] = S.useState(null), [Y, R] = S.useState(!1), O = S.useRef(null), {
|
|
3620
|
+
styles: _,
|
|
3621
|
+
attributes: N
|
|
3622
|
+
} = Bn(x, w, {
|
|
3623
|
+
placement: "auto",
|
|
3624
|
+
// \`)
|
|
3625
|
+
modifiers: [
|
|
3626
|
+
{
|
|
3627
|
+
name: "arrow",
|
|
3628
|
+
options: {
|
|
3629
|
+
element: E
|
|
3630
|
+
}
|
|
3631
|
+
},
|
|
3632
|
+
{
|
|
3633
|
+
name: "offset",
|
|
3634
|
+
options: {
|
|
3635
|
+
offset: g
|
|
3636
|
+
}
|
|
3637
|
+
}
|
|
3638
|
+
// y축으로 8px 정도 띄움
|
|
3639
|
+
]
|
|
3640
|
+
}), k = (M == null ? void 0 : M.id) === e, I = S.useCallback(() => {
|
|
3641
|
+
O.current && (clearTimeout(O.current), O.current = null), R(!0);
|
|
3642
|
+
}, []), X = S.useCallback(() => {
|
|
3643
|
+
O.current = window.setTimeout(() => {
|
|
3644
|
+
R(!1);
|
|
3645
|
+
}, h);
|
|
3646
|
+
}, [h]), F = () => p ? S.createElement(p, {
|
|
3647
|
+
key: e,
|
|
3648
|
+
...t,
|
|
3649
|
+
onMouseEnter: I,
|
|
3650
|
+
// 마우스가 참조 요소 위로 올라가면 툴팁 보이기
|
|
3651
|
+
onMouseLeave: X,
|
|
3652
|
+
// 마우스가 참조 요소에서 벗어나면 툴팁 숨기기 (지연)
|
|
3653
|
+
ref: T,
|
|
3654
|
+
style: {
|
|
3655
|
+
top: `${s}%`,
|
|
3656
|
+
height: n,
|
|
3657
|
+
width: `min(${r}%, 100%)`,
|
|
3658
|
+
left: `${o}%`,
|
|
3659
|
+
color: "black",
|
|
3660
|
+
overflow: "hidden",
|
|
3661
|
+
alignSelf: "flex-start",
|
|
3662
|
+
position: "absolute",
|
|
3663
|
+
borderRadius: 4,
|
|
3664
|
+
cursor: d ? "move" : "default",
|
|
3665
|
+
transform: d && v ? `translate(${v.x}px, ${v.y}px)` : void 0
|
|
3666
|
+
}
|
|
3667
|
+
}) : null, q = () => f ? S.createElement(f, {
|
|
3668
|
+
...t,
|
|
3669
|
+
popperRef: b,
|
|
3670
|
+
onMouseEnter: I,
|
|
3671
|
+
// 마우스가 커스텀 Popper 위로 올라가면 툴팁 보이기 (숨김 타이머 취소)
|
|
3672
|
+
onMouseLeave: X,
|
|
3673
|
+
// 마우스가 커스텀 Popper에서 벗어나면 툴팁 숨기기 (지연)
|
|
3674
|
+
popperStyle: {
|
|
3675
|
+
..._.popper,
|
|
3676
|
+
// pointerEvents: "none", // 툴팁 자체는 클릭 막기 (원한다면) -> 마우스 이벤트 유지를 위해 제거 또는 주석 해제 필요
|
|
3677
|
+
zIndex: 9999,
|
|
3678
|
+
background: "#333",
|
|
3679
|
+
// 기본 스타일 예시, 커스텀 컴포넌트에서 재정의 가능
|
|
3680
|
+
color: "#fff",
|
|
3681
|
+
padding: "6px 8px",
|
|
3682
|
+
borderRadius: 4,
|
|
3683
|
+
fontSize: 12,
|
|
3684
|
+
boxShadow: "0 2px 4px rgba(0,0,0,0.3)"
|
|
3685
|
+
},
|
|
3686
|
+
popperAttributes: {
|
|
3687
|
+
...N.popper
|
|
3688
|
+
},
|
|
3689
|
+
title: a,
|
|
3690
|
+
realStartTime: i,
|
|
3691
|
+
realEndTime: c,
|
|
3692
|
+
arrowRef: A,
|
|
3693
|
+
arrowStyle: {
|
|
3694
|
+
..._.arrow,
|
|
3695
|
+
width: "8px",
|
|
3696
|
+
height: "8px",
|
|
3697
|
+
transform: "rotate(90deg)"
|
|
3698
|
+
},
|
|
3699
|
+
arrowAttributes: {
|
|
3700
|
+
...N.arrow
|
|
3701
|
+
}
|
|
3702
|
+
}) : null;
|
|
3703
|
+
return /* @__PURE__ */ $.jsxs("div", { ...d ? y : {}, ...d ? D : {}, ref: m, children: [
|
|
3704
|
+
p ? F() : /* @__PURE__ */ $.jsx(
|
|
3705
|
+
"div",
|
|
3706
|
+
{
|
|
3707
|
+
"data-id": e,
|
|
3708
|
+
className: he("EventItem", {
|
|
3709
|
+
dragging: k && d,
|
|
3710
|
+
draggable: d
|
|
3711
|
+
}),
|
|
3712
|
+
ref: T,
|
|
3713
|
+
style: {
|
|
3714
|
+
top: `${s}%`,
|
|
3715
|
+
height: n,
|
|
3716
|
+
width: `min(${r}%, 100%)`,
|
|
3717
|
+
left: `${o}%`,
|
|
3718
|
+
color: "white",
|
|
3719
|
+
overflow: "hidden",
|
|
3720
|
+
alignSelf: "flex-start",
|
|
3721
|
+
position: "absolute",
|
|
3722
|
+
borderRadius: 4,
|
|
3723
|
+
border: "1px solid #ccc",
|
|
3724
|
+
cursor: d ? "move" : "default",
|
|
3725
|
+
transform: d && v ? `translate(${v.x}px, ${v.y}px)` : void 0
|
|
3726
|
+
},
|
|
3727
|
+
onMouseEnter: I,
|
|
3728
|
+
onMouseLeave: X,
|
|
3729
|
+
onMouseDown: (L) => {
|
|
3730
|
+
d && L.stopPropagation();
|
|
3731
|
+
},
|
|
3732
|
+
onClick: (L) => {
|
|
3733
|
+
L.stopPropagation();
|
|
3734
|
+
},
|
|
3735
|
+
children: a
|
|
3736
|
+
},
|
|
3737
|
+
e
|
|
3738
|
+
),
|
|
3739
|
+
!k && Y && // isHover 대신 showPopper 사용 -> showPopper 상태에 따라 툴팁 렌더링
|
|
3740
|
+
(f ? q() : (
|
|
3741
|
+
// 기본 Popper 렌더링
|
|
3742
|
+
/* @__PURE__ */ $.jsxs(
|
|
3743
|
+
"div",
|
|
3744
|
+
{
|
|
3745
|
+
ref: b,
|
|
3746
|
+
onMouseEnter: I,
|
|
3747
|
+
onMouseLeave: X,
|
|
3748
|
+
style: {
|
|
3749
|
+
..._.popper,
|
|
3750
|
+
// pointerEvents: "none", // 툴팁 자체는 클릭 막기 (원한다면) -> 이 줄이 있으면 Popper 위에서 마우스 이벤트 감지 안됨. 제거 또는 주석 처리.
|
|
3751
|
+
// 사용자가 원한 동작을 위해서는 제거되어야 합니다.
|
|
3752
|
+
zIndex: 9999,
|
|
3753
|
+
background: "#333",
|
|
3754
|
+
color: "#fff",
|
|
3755
|
+
padding: "6px 8px",
|
|
3756
|
+
borderRadius: 4,
|
|
3757
|
+
fontSize: 12,
|
|
3758
|
+
boxShadow: "0 2px 4px rgba(0,0,0,0.3)"
|
|
3759
|
+
},
|
|
3760
|
+
...N.popper,
|
|
3761
|
+
children: [
|
|
3762
|
+
/* @__PURE__ */ $.jsxs("div", { style: {
|
|
3763
|
+
whiteSpace: "nowrap"
|
|
3764
|
+
}, children: [
|
|
3765
|
+
/* @__PURE__ */ $.jsx("div", { children: /* @__PURE__ */ $.jsx("strong", { children: a }) }),
|
|
3766
|
+
/* @__PURE__ */ $.jsxs("div", { children: [
|
|
3767
|
+
C(i).format("MM.DD HH:mm"),
|
|
3768
|
+
c && ` ~ ${C(c).format("MM.DD HH:mm")}`
|
|
3769
|
+
] })
|
|
3770
|
+
] }),
|
|
3771
|
+
/* @__PURE__ */ $.jsx("div", { ref: A, style: {
|
|
3772
|
+
..._.arrow,
|
|
3773
|
+
width: "8px",
|
|
3774
|
+
height: "8px",
|
|
3775
|
+
// background: "#333",
|
|
3776
|
+
transform: "rotate(90deg)"
|
|
3777
|
+
}, ...N.arrow })
|
|
3778
|
+
]
|
|
3779
|
+
}
|
|
3780
|
+
)
|
|
3781
|
+
))
|
|
3782
|
+
] });
|
|
3783
|
+
}, zs = (t) => {
|
|
3784
|
+
const e = xe.c(83), {
|
|
3785
|
+
date: n
|
|
3786
|
+
} = t, {
|
|
3787
|
+
minHour: r,
|
|
3788
|
+
maxHour: o,
|
|
3789
|
+
step: s,
|
|
3790
|
+
events: a,
|
|
3791
|
+
enableCreateByDrag: i,
|
|
3792
|
+
itemHeight: c,
|
|
3793
|
+
type: l
|
|
3794
|
+
} = S.useContext(rt), u = a === void 0 ? [] : a, d = c === void 0 ? 48 : c, h = l === void 0 ? "default" : l, [g, p] = S.useState(null), [f, m] = S.useState(null);
|
|
3795
|
+
let D;
|
|
3796
|
+
e[0] !== n ? (D = {
|
|
3797
|
+
id: n
|
|
3798
|
+
}, e[0] = n, e[1] = D) : D = e[1];
|
|
3799
|
+
const {
|
|
3800
|
+
setNodeRef: y
|
|
3801
|
+
} = Ys(D);
|
|
3802
|
+
let v;
|
|
3803
|
+
e[2] !== n ? (v = (H) => !H.isAllDay && C(H.startTime).format("YYYY-MM-DD") === n, e[2] = n, e[3] = v) : v = e[3];
|
|
3804
|
+
const M = Ls({
|
|
3805
|
+
events: u.filter(v),
|
|
3806
|
+
minHour: r,
|
|
3807
|
+
maxHour: o
|
|
3808
|
+
});
|
|
3809
|
+
let x;
|
|
3810
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (x = C().valueOf(), e[4] = x) : x = e[4];
|
|
3811
|
+
const T = x;
|
|
3812
|
+
let w, b;
|
|
3813
|
+
if (e[5] !== n || e[6] !== o || e[7] !== r) {
|
|
3814
|
+
const H = C(n).startOf("day").add(r, "hour").format("YYYY-MM-DD HH:mm"), K = C(n).startOf("day").add(o, "hour").subtract(1, "millisecond").format("YYYY-MM-DD HH:mm");
|
|
3815
|
+
w = C(H).valueOf(), b = C(K).valueOf(), e[5] = n, e[6] = o, e[7] = r, e[8] = w, e[9] = b;
|
|
3816
|
+
} else
|
|
3817
|
+
w = e[8], b = e[9];
|
|
3818
|
+
const A = b - w, R = (T - w) / A * 100, O = R > 100 ? 100 : R <= 0 ? 0 : R;
|
|
3819
|
+
let _;
|
|
3820
|
+
e[10] !== O ? (_ = () => {
|
|
3821
|
+
m(O);
|
|
3822
|
+
}, e[10] = O, e[11] = _) : _ = e[11];
|
|
3823
|
+
let N;
|
|
3824
|
+
e[12] === Symbol.for("react.memo_cache_sentinel") ? (N = [], e[12] = N) : N = e[12], S.useEffect(_, N);
|
|
3825
|
+
let k;
|
|
3826
|
+
e[13] !== n ? (k = C().isSame(n, "day"), e[13] = n, e[14] = k) : k = e[14];
|
|
3827
|
+
const I = k, X = Xs, q = (o - r) * d;
|
|
3828
|
+
let L;
|
|
3829
|
+
e[15] !== n ? (L = (H) => C(H.startTime).format("YYYY-MM-DD") === n && !H.isAllDay, e[15] = n, e[16] = L) : L = e[16];
|
|
3830
|
+
const te = M.filter(L), [P, me] = S.useState(!1), [ge, ne] = S.useState(null), [B, z] = S.useState(null), [j, V] = S.useState(null), [U, Z] = S.useState(null), [re, ce] = S.useState(null), pe = S.useRef(null);
|
|
3831
|
+
let De;
|
|
3832
|
+
e[17] !== n || e[18] !== i || e[19] !== o || e[20] !== r || e[21] !== s ? (De = (H) => {
|
|
3833
|
+
if (!i || H.button !== 0)
|
|
3834
|
+
return;
|
|
3835
|
+
me(!0);
|
|
3836
|
+
const K = H.nativeEvent.offsetY;
|
|
3837
|
+
if (ne(K), z(K), pe.current) {
|
|
3838
|
+
const Me = pe.current.clientHeight, Te = un({
|
|
3839
|
+
clickOffsetY: K,
|
|
3840
|
+
columnHeight: Me,
|
|
3841
|
+
date: n,
|
|
3842
|
+
minHour: r,
|
|
3843
|
+
maxHour: o,
|
|
3844
|
+
step: s
|
|
3845
|
+
});
|
|
3846
|
+
ce(Te), V(Te), Z(Te);
|
|
3847
|
+
}
|
|
3848
|
+
}, e[17] = n, e[18] = i, e[19] = o, e[20] = r, e[21] = s, e[22] = De) : De = e[22];
|
|
3849
|
+
const He = De;
|
|
3850
|
+
let Ee;
|
|
3851
|
+
e[23] !== n || e[24] !== re || e[25] !== i || e[26] !== P || e[27] !== o || e[28] !== r || e[29] !== s ? (Ee = (H) => {
|
|
3852
|
+
if (!i || !P || !re)
|
|
3853
|
+
return;
|
|
3854
|
+
const K = H.nativeEvent.offsetY;
|
|
3855
|
+
if (z(K), !pe.current)
|
|
3856
|
+
return;
|
|
3857
|
+
const Me = pe.current.clientHeight, Te = un({
|
|
3858
|
+
clickOffsetY: K,
|
|
3859
|
+
columnHeight: Me,
|
|
3860
|
+
date: n,
|
|
3861
|
+
minHour: r,
|
|
3862
|
+
maxHour: o,
|
|
3863
|
+
step: s
|
|
3864
|
+
}), qe = C.min(re, Te), $e = C.max(re, Te);
|
|
3865
|
+
V(qe), Z($e);
|
|
3866
|
+
}, e[23] = n, e[24] = re, e[25] = i, e[26] = P, e[27] = o, e[28] = r, e[29] = s, e[30] = Ee) : Ee = e[30];
|
|
3867
|
+
const Oe = Ee;
|
|
3868
|
+
let be;
|
|
3869
|
+
e[31] !== i || e[32] !== P || e[33] !== U || e[34] !== j ? (be = (H) => {
|
|
3870
|
+
i && (H.stopPropagation(), P && (me(!1), j && U && j.isSame(U), ce(null), ne(null), z(null), V(null), Z(null)));
|
|
3871
|
+
}, e[31] = i, e[32] = P, e[33] = U, e[34] = j, e[35] = be) : be = e[35];
|
|
3872
|
+
const Ge = be;
|
|
3873
|
+
let Ne = 0, We = 0;
|
|
3874
|
+
if (ge !== null && B !== null) {
|
|
3875
|
+
const H = Math.min(ge, B), K = Math.max(ge, B);
|
|
3876
|
+
Ne = H, We = K - H;
|
|
3877
|
+
}
|
|
3878
|
+
let Xe;
|
|
3879
|
+
e[36] !== j ? (Xe = (j == null ? void 0 : j.format("HH:mm")) ?? "", e[36] = j, e[37] = Xe) : Xe = e[37];
|
|
3880
|
+
const $t = Xe;
|
|
3881
|
+
let Ke;
|
|
3882
|
+
e[38] !== U ? (Ke = (U == null ? void 0 : U.format("HH:mm")) ?? "", e[38] = U, e[39] = Ke) : Ke = e[39];
|
|
3883
|
+
const Ae = `(제목 없음)
|
|
3884
|
+
${$t} ~ ${Ke}`, Le = P && i;
|
|
3885
|
+
let ke;
|
|
3886
|
+
e[40] !== i || e[41] !== Le || e[42] !== h ? (ke = he("DateColumn", h, {
|
|
3887
|
+
dragging: Le,
|
|
3888
|
+
allowCreate: i
|
|
3889
|
+
}), e[40] = i, e[41] = Le, e[42] = h, e[43] = ke) : ke = e[43];
|
|
3890
|
+
const Se = i ? He : void 0, Je = i ? Oe : void 0, ot = i ? Ge : void 0, st = i ? "cell" : "default", Ue = d - 1 + "px", Qe = d - 1 + "px", it = d + "px";
|
|
3891
|
+
let Ze;
|
|
3892
|
+
e[44] !== st || e[45] !== Ue || e[46] !== Qe || e[47] !== it ? (Ze = {
|
|
3893
|
+
cursor: st,
|
|
3894
|
+
"--bg-start-white": Ue,
|
|
3895
|
+
"--bg-end-white": Qe,
|
|
3896
|
+
"--bg-line-white": it
|
|
3897
|
+
}, e[44] = st, e[45] = Ue, e[46] = Qe, e[47] = it, e[48] = Ze) : Ze = e[48];
|
|
3898
|
+
const at = Ze;
|
|
3899
|
+
let ze;
|
|
3900
|
+
e[49] === Symbol.for("react.memo_cache_sentinel") ? (ze = he("DateColumnInner"), e[49] = ze) : ze = e[49];
|
|
3901
|
+
let Pe;
|
|
3902
|
+
e[50] !== q ? (Pe = {
|
|
3903
|
+
height: q
|
|
3904
|
+
}, e[50] = q, e[51] = Pe) : Pe = e[51];
|
|
3905
|
+
let G;
|
|
3906
|
+
e[52] !== I || e[53] !== f ? (G = I && f ? /* @__PURE__ */ $.jsx("div", { className: he("TodayIndicator"), style: {
|
|
3907
|
+
top: `${f}%`
|
|
3908
|
+
} }) : null, e[52] = I, e[53] = f, e[54] = G) : G = e[54];
|
|
3909
|
+
let ae;
|
|
3910
|
+
e[55] !== (g == null ? void 0 : g.clientHeight) ? (ae = (H) => {
|
|
3911
|
+
const K = Math.max(((g == null ? void 0 : g.clientHeight) || 0) * (H.heightPercent / 100), 24);
|
|
3912
|
+
return /* @__PURE__ */ $.jsx(Hs, { ...H, endTime: H.realEndTime, height: K, title: H.title ?? "" }, H.id);
|
|
3913
|
+
}, e[55] = g == null ? void 0 : g.clientHeight, e[56] = ae) : ae = e[56];
|
|
3914
|
+
const ue = te.map(ae);
|
|
3915
|
+
let ye;
|
|
3916
|
+
e[57] !== P || e[58] !== We || e[59] !== Ne || e[60] !== Ae ? (ye = P && /* @__PURE__ */ $.jsx("div", { style: {
|
|
3917
|
+
position: "absolute",
|
|
3918
|
+
top: Ne,
|
|
3919
|
+
left: 0,
|
|
3920
|
+
width: "100%",
|
|
3921
|
+
height: We,
|
|
3922
|
+
backgroundColor: "#F4511E",
|
|
3923
|
+
pointerEvents: "none",
|
|
3924
|
+
fontSize: 11,
|
|
3925
|
+
borderRadius: 4,
|
|
3926
|
+
padding: 4,
|
|
3927
|
+
boxShadow: "0 0 4px rgba(0,0,0,0.2)",
|
|
3928
|
+
whiteSpace: "pre-wrap",
|
|
3929
|
+
color: "white",
|
|
3930
|
+
zIndex: 100
|
|
3931
|
+
}, children: Ae }), e[57] = P, e[58] = We, e[59] = Ne, e[60] = Ae, e[61] = ye) : ye = e[61];
|
|
3932
|
+
let oe;
|
|
3933
|
+
e[62] !== ze || e[63] !== Pe || e[64] !== G || e[65] !== ue || e[66] !== ye ? (oe = /* @__PURE__ */ $.jsxs("div", { className: ze, ref: pe, style: Pe, children: [
|
|
3934
|
+
G,
|
|
3935
|
+
ue,
|
|
3936
|
+
ye
|
|
3937
|
+
] }), e[62] = ze, e[63] = Pe, e[64] = G, e[65] = ue, e[66] = ye, e[67] = oe) : oe = e[67];
|
|
3938
|
+
const de = `${q}px`;
|
|
3939
|
+
let fe;
|
|
3940
|
+
e[68] !== de ? (fe = {
|
|
3941
|
+
width: 8,
|
|
3942
|
+
height: de
|
|
3943
|
+
}, e[68] = de, e[69] = fe) : fe = e[69];
|
|
3944
|
+
let Ce;
|
|
3945
|
+
e[70] !== p || e[71] !== fe ? (Ce = /* @__PURE__ */ $.jsx("div", { ref: p, style: fe }), e[70] = p, e[71] = fe, e[72] = Ce) : Ce = e[72];
|
|
3946
|
+
let Q;
|
|
3947
|
+
return e[73] !== X || e[74] !== y || e[75] !== ke || e[76] !== Se || e[77] !== Je || e[78] !== ot || e[79] !== at || e[80] !== oe || e[81] !== Ce ? (Q = /* @__PURE__ */ $.jsxs("div", { className: ke, ref: y, onClick: X, onMouseDown: Se, onMouseMove: Je, onMouseUp: ot, style: at, children: [
|
|
3948
|
+
oe,
|
|
3949
|
+
Ce
|
|
3950
|
+
] }), e[73] = X, e[74] = y, e[75] = ke, e[76] = Se, e[77] = Je, e[78] = ot, e[79] = at, e[80] = oe, e[81] = Ce, e[82] = Q) : Q = e[82], Q;
|
|
3951
|
+
}, Ps = (t) => {
|
|
3952
|
+
const {
|
|
3953
|
+
onScroll: e
|
|
3954
|
+
} = t, {
|
|
3955
|
+
currentDate: n = C().format("YYYY-MM-DD"),
|
|
3956
|
+
columnCount: r,
|
|
3957
|
+
minHour: o,
|
|
3958
|
+
maxHour: s
|
|
3959
|
+
} = S.useContext(rt), a = Array.from({
|
|
3960
|
+
length: r
|
|
3961
|
+
}, (l, u) => ({
|
|
3962
|
+
date: C(n).add(u, "day").format("YYYY-MM-DD"),
|
|
3963
|
+
dayText: Ln(C(n).add(u, "day").get("day"), "ko")
|
|
3964
|
+
})), i = s - o, c = Array.from({
|
|
3965
|
+
length: i
|
|
3966
|
+
}, (l, u) => C().startOf("day").add(o + u, "hour").format("HH:mm"));
|
|
3967
|
+
return /* @__PURE__ */ $.jsx("div", { className: he("DateColumnRow"), onScroll: e, children: /* @__PURE__ */ $.jsxs("div", { className: he("DateColumnRowInner"), children: [
|
|
3968
|
+
/* @__PURE__ */ $.jsx("div", { className: he("TimeCriteria"), children: c.map((l) => /* @__PURE__ */ $.jsx("div", { className: he("TimeCriteriaCell") }, l)) }),
|
|
3969
|
+
a.map((l) => /* @__PURE__ */ $.jsx(zs, { date: l.date }, l.date))
|
|
3970
|
+
] }) });
|
|
3971
|
+
}, Bs = () => {
|
|
3972
|
+
const {
|
|
3973
|
+
currentDate: t = C().format("YYYY-MM-DD"),
|
|
3974
|
+
columnCount: e
|
|
3975
|
+
} = S.useContext(rt), n = Array.from({
|
|
3976
|
+
length: e
|
|
3977
|
+
}, (r, o) => ({
|
|
3978
|
+
realDate: C(t).add(o, "day"),
|
|
3979
|
+
date: C(t).add(o, "day").format("DD"),
|
|
3980
|
+
dayText: Ln(C(t).add(o, "day").get("day"), "ko")
|
|
3981
|
+
}));
|
|
3982
|
+
return /* @__PURE__ */ $.jsx("div", { className: he("DateCellRow"), children: n.map((r) => /* @__PURE__ */ $.jsxs("div", { className: he("DateCell", {
|
|
3983
|
+
today: C().isSame(r.realDate, "day")
|
|
3984
|
+
}), children: [
|
|
3985
|
+
/* @__PURE__ */ $.jsx("div", { className: he("DayText"), children: r.dayText }),
|
|
3986
|
+
/* @__PURE__ */ $.jsx("div", { className: he("Date"), children: r.date })
|
|
3987
|
+
] }, r.date)) });
|
|
3988
|
+
}, js = () => {
|
|
3989
|
+
const t = xe.c(1);
|
|
3990
|
+
let e;
|
|
3991
|
+
return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ $.jsx("div", { className: he("ShrinkedColumn", "StandardTime"), children: Es() }), t[0] = e) : e = t[0], e;
|
|
3992
|
+
}, Fs = (t) => {
|
|
3993
|
+
const e = xe.c(11), {
|
|
3994
|
+
className: n,
|
|
3995
|
+
as: r
|
|
3996
|
+
} = t, {
|
|
3997
|
+
minHour: o,
|
|
3998
|
+
maxHour: s,
|
|
3999
|
+
itemHeight: a,
|
|
4000
|
+
type: i
|
|
4001
|
+
} = S.useContext(rt), c = a === void 0 ? 48 : a, l = i === void 0 ? "default" : i, u = s - o;
|
|
4002
|
+
let d;
|
|
4003
|
+
if (e[0] !== r || e[1] !== n || e[2] !== u || e[3] !== c || e[4] !== s || e[5] !== o || e[6] !== l) {
|
|
4004
|
+
const h = Array.from({
|
|
4005
|
+
length: u + 1
|
|
4006
|
+
}, (f, m) => C().startOf("day").add(o + m, "hour").format("HH:mm")), g = (f) => r ? S.createElement(r, {
|
|
4007
|
+
key: f.toString(),
|
|
4008
|
+
itemHeight: c,
|
|
4009
|
+
minHour: o,
|
|
4010
|
+
maxHour: s,
|
|
4011
|
+
time: f
|
|
4012
|
+
}) : /* @__PURE__ */ $.jsx("div", { className: he("Timeline"), style: {
|
|
4013
|
+
height: c
|
|
4014
|
+
}, children: /* @__PURE__ */ $.jsx("span", { className: he("TimeText"), children: f }) }, f);
|
|
4015
|
+
let p;
|
|
4016
|
+
e[8] !== n || e[9] !== l ? (p = he("TimelineWrapper", n, l), e[8] = n, e[9] = l, e[10] = p) : p = e[10], d = /* @__PURE__ */ $.jsx("div", { className: p, children: h.map((f) => g(f)) }), e[0] = r, e[1] = n, e[2] = u, e[3] = c, e[4] = s, e[5] = o, e[6] = l, e[7] = d;
|
|
4017
|
+
} else
|
|
4018
|
+
d = e[7];
|
|
4019
|
+
return d;
|
|
4020
|
+
}, Ws = (t) => {
|
|
4021
|
+
const e = xe.c(31);
|
|
4022
|
+
let n, r, o, s, a, i, c;
|
|
4023
|
+
e[0] !== t ? ({
|
|
4024
|
+
children: n,
|
|
4025
|
+
enableCreateByDrag: a,
|
|
4026
|
+
enableMoveByDrag: i,
|
|
4027
|
+
type: c,
|
|
4028
|
+
className: r,
|
|
4029
|
+
events: o,
|
|
4030
|
+
...s
|
|
4031
|
+
} = t, e[0] = t, e[1] = n, e[2] = r, e[3] = o, e[4] = s, e[5] = a, e[6] = i, e[7] = c) : (n = e[1], r = e[2], o = e[3], s = e[4], a = e[5], i = e[6], c = e[7]);
|
|
4032
|
+
const l = a === void 0 ? !0 : a, u = i === void 0 ? !0 : i, d = c === void 0 ? "default" : c;
|
|
4033
|
+
let h;
|
|
4034
|
+
e[8] !== u ? (h = function() {
|
|
4035
|
+
}, e[8] = u, e[9] = h) : h = e[9];
|
|
4036
|
+
const g = h;
|
|
4037
|
+
let p;
|
|
4038
|
+
e[10] !== o ? (p = o || [], e[10] = o, e[11] = p) : p = e[11];
|
|
4039
|
+
let f;
|
|
4040
|
+
e[12] !== p ? (f = $s(p), e[12] = p, e[13] = f) : f = e[13];
|
|
4041
|
+
let m;
|
|
4042
|
+
e[14] !== l || e[15] !== u || e[16] !== s || e[17] !== f || e[18] !== d ? (m = {
|
|
4043
|
+
...Nn,
|
|
4044
|
+
...s,
|
|
4045
|
+
events: f,
|
|
4046
|
+
type: d,
|
|
4047
|
+
enableCreateByDrag: l,
|
|
4048
|
+
enableMoveByDrag: u
|
|
4049
|
+
}, e[14] = l, e[15] = u, e[16] = s, e[17] = f, e[18] = d, e[19] = m) : m = e[19];
|
|
4050
|
+
const D = m;
|
|
4051
|
+
let y;
|
|
4052
|
+
e[20] !== r ? (y = he("WeeklyCalendarRoot", r), e[20] = r, e[21] = y) : y = e[21];
|
|
4053
|
+
let v;
|
|
4054
|
+
e[22] !== n || e[23] !== y ? (v = /* @__PURE__ */ $.jsx("div", { className: y, children: n }), e[22] = n, e[23] = y, e[24] = v) : v = e[24];
|
|
4055
|
+
let M;
|
|
4056
|
+
e[25] !== D || e[26] !== v ? (M = /* @__PURE__ */ $.jsx(rt, { value: D, children: v }), e[25] = D, e[26] = v, e[27] = M) : M = e[27];
|
|
4057
|
+
let x;
|
|
4058
|
+
return e[28] !== g || e[29] !== M ? (x = /* @__PURE__ */ $.jsx(xs, { onDragEnd: g, children: M }), e[28] = g, e[29] = M, e[30] = x) : x = e[30], x;
|
|
4059
|
+
}, ti = {
|
|
4060
|
+
Root: Ws,
|
|
4061
|
+
Timelines: Fs,
|
|
4062
|
+
StandardTime: js,
|
|
4063
|
+
DateCellRow: Bs,
|
|
4064
|
+
DateColumnRow: Ps
|
|
4065
|
+
};
|
|
4066
|
+
function Xs() {
|
|
4067
|
+
}
|
|
4068
|
+
export {
|
|
4069
|
+
Qs as Calendar,
|
|
4070
|
+
je as CalendarContext,
|
|
4071
|
+
ei as ScrollCalendar,
|
|
4072
|
+
Wt as ScrollCalendarContext,
|
|
4073
|
+
ti as WeeklyCalendar,
|
|
4074
|
+
rt as WeeklyCalendarContext
|
|
4075
|
+
};
|